:root {
  --bg: #0e0d0c;
  --panel: #1a1816;
  --panel2: #24211e;
  --line: rgba(255, 255, 255, 0.09);
  --txt: #f3eee6;
  --mut: #a79f93;
  --gold: #e8b84a;
  --gold2: #c8922a;
  --green: #2fa36b;
  --red: #e0564f;
  --blue: #4f9be8;
  --r: 14px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--txt);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
#cv { position: fixed; inset: 0; touch-action: none; display: block; }

/* ---------- ekranlar ---------- */
.screen { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-t)) calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l)); overflow-y: auto; }
#scrMenu, #scrSetup, #scrCareer, #scrShop { background:
  radial-gradient(1200px 600px at 50% -10%, rgba(47, 163, 107, 0.25), transparent 60%),
  radial-gradient(900px 500px at 100% 110%, rgba(232, 184, 74, 0.10), transparent 60%), var(--bg); }
.modal { background: rgba(5, 5, 5, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 30; }

.menu-wrap { width: min(760px, 100%); display: flex; flex-direction: column; gap: 22px; margin: auto; }
.brand { text-align: center; }
.logo { width: 150px; height: 80px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)); }
.brand h1 { margin: 2px 0 2px; font-size: clamp(30px, 6vw, 44px); font-weight: 500; letter-spacing: 0.5px; }
.brand h1 b { color: var(--gold); font-weight: 800; }
.tag { margin: 0; color: var(--mut); letter-spacing: 1px; }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 16px; border-radius: var(--r);
  background: linear-gradient(160deg, var(--panel2), var(--panel)); border: 1px solid var(--line); transition: transform 0.12s, border-color 0.12s; }
.card:hover:not(:disabled) { border-color: rgba(232, 184, 74, 0.5); transform: translateY(-2px); }
.card:active:not(:disabled) { transform: scale(0.98); }
.card .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(232, 184, 74, 0.12); color: var(--gold); margin-bottom: 6px; }
.card .ic svg { width: 26px; height: 26px; }
.card b { font-size: 17px; }
.card small { color: var(--mut); }
.card.big { grid-row: span 2; justify-content: flex-end; background: linear-gradient(160deg, #1f5e40, #123b28 70%); border-color: rgba(47, 163, 107, 0.5); }
.card.big .ic { background: rgba(255, 255, 255, 0.12); color: #fff; width: 54px; height: 54px; }
.card.big .ic svg { width: 32px; height: 32px; }
.card.big b { font-size: 21px; }
.card.big small { color: #cfe7da; }
.card.soon { opacity: 0.5; cursor: default; }
.menu-foot { display: flex; justify-content: space-between; align-items: center; color: var(--mut); font-size: 13px; }
.menu-foot .by b { color: var(--txt); }
.link { background: none; border: 0; color: var(--mut); padding: 6px 4px; display: inline-flex; gap: 6px; align-items: center; }
.link:hover { color: var(--txt); }
.link.center { display: block; margin: 6px auto 0; }

.panel { width: min(560px, 100%); background: linear-gradient(170deg, var(--panel2), var(--panel)); border: 1px solid var(--line);
  border-radius: 18px; padding: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); margin: auto; }
.panel.small { width: min(400px, 100%); }
.panel.center { text-align: center; }
.panel h2 { margin: 0 0 12px; font-size: 21px; }
.panel h3 { margin: 14px 0 6px; font-size: 15px; color: var(--gold); }
.panel ul { margin: 0 0 10px; padding-left: 18px; color: #ddd5c8; }
.panel li { margin: 4px 0; }
.ph { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ph h2 { margin: 0; }
.back { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 24px; line-height: 1; }
.lbl { color: var(--mut); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 6px; }
.muted { color: var(--mut); margin: 0 0 12px; }

.games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.games.g3 { grid-template-columns: repeat(3, 1fr); }
.gm { padding: 8px 6px 10px; border-radius: 12px; background: var(--panel); border: 2px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gm svg { width: 100%; max-width: 110px; height: auto; border-radius: 6px; }
.gm b { font-size: 13px; }
.gm.on { border-color: var(--gold); background: rgba(232, 184, 74, 0.08); }

.seg { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 10px 6px; border-radius: 9px; color: var(--mut); font-weight: 600; }
.seg button.on { background: var(--gold); color: #1b1408; }
.names { display: flex; gap: 8px; }
input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--txt); font: inherit; user-select: text; }
input:focus { outline: 2px solid var(--gold2); }

.panel > button.wide, .panel button.wide { display: block; width: 100%; margin-top: 10px; }
.panel button:not(.link):not(.back):not(.gm):not(.seg button) { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; }
.panel button.primary, button.primary { background: linear-gradient(180deg, #f0c55c, #d39b2c) !important; color: #1b1408 !important; border: 0 !important; font-weight: 800 !important; box-shadow: 0 6px 18px rgba(232, 184, 74, 0.25); }
.panel button.ghost { background: none !important; color: var(--mut); }
#btnStart { margin-top: 18px; padding: 15px !important; font-size: 17px; }
.row { display: flex; gap: 10px; margin-top: 14px; }
.row button { flex: 1; }

.toggles { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 14px 2px 4px; }
.toggles.col1 { flex-direction: column; }
.sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.sw input { display: none; }
.sw span { width: 40px; height: 23px; border-radius: 12px; background: #3a3631; position: relative; transition: background 0.15s; flex: none; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #ddd; transition: transform 0.15s; }
.sw input:checked + span { background: var(--green); }
.sw input:checked + span::after { transform: translateX(17px); background: #fff; }

/* ---------- oyun içi ---------- */
#hud { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 8px;
  padding: calc(6px + var(--safe-t)) calc(8px + var(--safe-r)) 6px calc(8px + var(--safe-l)); height: calc(56px + var(--safe-t));
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.92), rgba(10, 9, 8, 0.55)); pointer-events: none; }
#hud > * { pointer-events: auto; }
.pl { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 8px; border-radius: 12px; border: 1px solid transparent; transition: background 0.2s, border-color 0.2s; }
.pl.r { flex-direction: row-reverse; text-align: right; }
.pl.on { background: rgba(232, 184, 74, 0.12); border-color: rgba(232, 184, 74, 0.55); }
.av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: #1b1408;
  background: linear-gradient(160deg, #f0c55c, #b98322); }
.pl.r .av { background: linear-gradient(160deg, #8fc7ff, #3b78c4); color: #071a30; }
.pl.on .av { box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(232, 184, 74, 0.6); }
.pi { min-width: 0; }
.nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.sub { display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; color: var(--mut); font-size: 12px; white-space: nowrap; overflow: hidden; min-height: 16px; }
.pl.r .sub { justify-content: flex-end; }
.sc { font-size: 26px; font-weight: 800; min-width: 28px; text-align: center; color: var(--gold); }
.mid { text-align: center; color: var(--mut); font-size: 12px; line-height: 1.25; }
#hudTitle { color: var(--txt); font-weight: 700; font-size: 13px; }
#hudInfo { min-height: 15px; }
#hudInfo b { color: var(--gold); font-size: 15px; }
.ib { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(30, 28, 25, 0.9); display: grid; place-items: center; }
.mb { width: 13px; height: 13px; border-radius: 50%; flex: none; box-shadow: inset -2px -2px 3px rgba(0, 0, 0, 0.35); position: relative; overflow: hidden; }
.mb.st::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #f6f3ea; }
.mb.st::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #f6f3ea; }
.mb.gone { opacity: 0.18; }

.col { position: fixed; z-index: 9; top: calc(64px + var(--safe-t)); bottom: calc(10px + var(--safe-b)); width: 62px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#colPower { left: calc(8px + var(--safe-l)); }
#colFine { right: calc(8px + var(--safe-r)); width: 56px; }
body.lefty #colPower { left: auto; right: calc(8px + var(--safe-r)); }
body.lefty #colFine { right: auto; left: calc(8px + var(--safe-l)); }
body.pr .col { bottom: calc(62px + var(--safe-b)); }
.clabel { font-size: 10px; letter-spacing: 1.5px; color: var(--mut); font-weight: 700; }
.track { flex: 1; width: 100%; border-radius: 14px; position: relative; overflow: hidden; touch-action: none; border: 1px solid var(--line); }
#power { background: linear-gradient(180deg, rgba(30, 28, 25, 0.95), rgba(18, 17, 15, 0.95)); max-height: 360px; }
.pfill { position: absolute; left: 0; right: 0; top: 0; height: 0; background: linear-gradient(180deg, #2fa36b, #e8b84a 55%, #e0564f); opacity: 0.9; }
.pcue { position: absolute; left: 50%; top: 6px; width: 10px; height: calc(100% - 12px); margin-left: -5px; border-radius: 5px;
  background: linear-gradient(180deg, #3a7bd5 0, #3a7bd5 3%, #f4f1ea 3%, #f4f1ea 7%, #e7cc98 7%, #c9a265 55%, #3a170a 56%, #1d0b04 100%); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.pmarks { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-evenly; pointer-events: none; }
.pmarks i { display: block; height: 1px; background: rgba(255, 255, 255, 0.1); margin: 0 6px; }
#fine { max-height: 300px; background: repeating-linear-gradient(180deg, #2b2824 0 3px, #1a1815 3px 9px); box-shadow: inset 0 12px 14px -6px #000, inset 0 -12px 14px -6px #000; }
#btnSpin { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); background: rgba(30, 28, 25, 0.95); display: grid; place-items: center; padding: 0; flex: none; }
.sball { width: 40px; height: 40px; border-radius: 50%; position: relative; background: radial-gradient(circle at 35% 30%, #fff, #e9e5da 40%, #9d978a); }
.sball .sdot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #e0302a; left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 1.5px #fff; }

#prBar { position: fixed; z-index: 9; left: 50%; transform: translateX(-50%); bottom: calc(8px + var(--safe-b)); display: flex; gap: 6px;
  background: rgba(20, 19, 17, 0.92); border: 1px solid var(--line); border-radius: 14px; padding: 5px; }
#prBar button { border: 0; background: none; padding: 8px 12px; border-radius: 10px; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; white-space: nowrap; }
#prBar button:hover { background: rgba(255, 255, 255, 0.06); }
#prBar button.on { background: var(--gold); color: #1b1408; }

#toasts { position: fixed; z-index: 15; top: calc(66px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: max-content; max-width: 90vw; }
.toast { padding: 8px 16px; border-radius: 22px; background: rgba(20, 19, 17, 0.92); border: 1px solid var(--line); font-weight: 700; font-size: 14px; text-align: center;
  animation: tin 0.25s ease-out; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.toast.good { border-color: rgba(47, 163, 107, 0.8); color: #7ee2ad; }
.toast.bad { border-color: rgba(224, 86, 79, 0.8); color: #ff9a94; }
.toast.big { font-size: 22px; padding: 10px 26px; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: all 0.3s; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px) scale(0.95); } }
#think { position: fixed; z-index: 15; bottom: calc(16px + var(--safe-b)); left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 22px;
  background: rgba(20, 19, 17, 0.92); border: 1px solid var(--line); color: var(--mut); display: flex; gap: 10px; align-items: center; font-size: 14px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--gold); animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
#hint { position: fixed; z-index: 14; bottom: calc(16px + var(--safe-b)); left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 22px;
  background: rgba(232, 184, 74, 0.95); color: #1b1408; font-weight: 700; font-size: 14px; pointer-events: none; text-align: center; max-width: 80vw; }
body.pr #hint, body.pr #think { bottom: calc(66px + var(--safe-b)); }

/* falso seçici */
#spinBall { width: 210px; height: 210px; margin: 6px auto 10px; border-radius: 50%; position: relative; touch-action: none; cursor: crosshair;
  background: radial-gradient(circle at 36% 30%, #fff, #ece8de 35%, #a9a294 80%, #7d776b); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
#spinBall i { position: absolute; background: rgba(0, 0, 0, 0.12); }
#spinBall i.h { left: 10%; right: 10%; top: 50%; height: 1px; }
#spinBall i.v { top: 10%; bottom: 10%; left: 50%; width: 1px; }
#spinBall::after { content: ""; position: absolute; inset: 15%; border-radius: 50%; border: 1px dashed rgba(0, 0, 0, 0.18); }
#spinBall .sdot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff7b6e, #c81e18); box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(0, 0, 0, 0.5); left: 50%; top: 50%; }
.spin-help { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--mut); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.stats div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.stats b { display: block; font-size: 20px; color: var(--gold); }
.stats span { font-size: 12px; color: var(--mut); }
#endIcon { font-size: 54px; line-height: 1; margin-bottom: 4px; }
#endIcon svg { width: 70px; height: 70px; }

/* dar ekranlar */
@media (max-width: 640px) {
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .card.big { grid-column: span 2; grid-row: auto; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .games.g3 { grid-template-columns: repeat(3, 1fr); }
  .nm { font-size: 13px; }
  .sc { font-size: 22px; }
  .av { width: 28px; height: 28px; font-size: 13px; }
  .mid { display: none; }
  #hud { grid-template-columns: 1fr 1fr auto; }
}
@media (orientation: portrait) and (max-width: 500px) {
  .col { width: 48px; }
  #colFine { width: 46px; }
  #btnSpin { width: 44px; height: 44px; }
  .sball { width: 32px; height: 32px; }
  .col { top: calc(60px + var(--safe-t)); }
}
@media (max-height: 440px) {
  .menu-wrap { gap: 12px; }
  .logo { width: 110px; height: 56px; }
  .brand h1 { font-size: 28px; }
  .card { padding: 10px 12px; }
  .card .ic { width: 34px; height: 34px; margin-bottom: 2px; }
  .card.big .ic { width: 40px; height: 40px; }
  #spinBall { width: 160px; height: 160px; }
  .panel { padding: 14px; }
  .lbl { margin: 8px 0 4px; }
  #btnStart { margin-top: 12px; padding: 12px !important; }
}
@media (max-height: 440px) and (min-width: 600px) {
  .menu-grid { grid-template-columns: repeat(5, 1fr); }
  .card.big { grid-row: auto; }
}

/* ---------- 2. aşama: jeton, kariyer, mağaza ---------- */
.sp { flex: 1; }
.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: -6px; }
.coinchip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 7px; border-radius: 22px; border: 1px solid rgba(232, 184, 74, 0.35);
  background: rgba(232, 184, 74, 0.1); font-weight: 800; color: #ffe2a0; }
.coinchip.static { cursor: default; }
.coinchip .plus { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: #1b1408; display: grid; place-items: center; font-size: 14px; line-height: 1; }
.coin { width: 20px; height: 20px; border-radius: 50%; display: inline-block; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff3c2, #f0c55c 35%, #b98322 80%); box-shadow: inset 0 0 0 2px rgba(120, 80, 10, 0.45); position: relative; }
.coin::after { content: "N"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 11px/1 system-ui; color: rgba(110, 70, 5, 0.75); }
.tb-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--txt); font-weight: 600; }
.badge { position: absolute; top: -4px; right: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }
.coin-pop { animation: pop 0.5s ease-out; }
@keyframes pop { 40% { transform: scale(1.18); } }

.panel.wide { width: min(860px, 100%); }
.star { width: 14px; height: 14px; display: inline-block; background: #4a443c;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.star.on { background: linear-gradient(180deg, #ffe08a, #e8b84a); }
.starchip { display: inline-flex; align-items: center; gap: 5px; color: var(--mut); font-size: 14px; }
.starchip b { color: var(--txt); }
.chapters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; scrollbar-width: thin; }
.chap { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel); min-width: 128px; text-align: left; }
.chap b { font-size: 14px; }
.chap small { color: var(--mut); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.chap.on { border-color: var(--gold); background: rgba(232, 184, 74, 0.08); }
.chap.locked { opacity: 0.45; }
.chdesc { margin: 4px 2px 10px; }
.lvgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.lv { aspect-ratio: 1 / 1; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel2), var(--panel)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; padding: 4px; }
.lv .n { font-size: 22px; font-weight: 800; line-height: 1; }
.lv .k { position: absolute; top: 6px; left: 7px; color: var(--mut); opacity: 0.8; }
.lv .k svg { width: 14px; height: 14px; display: block; }
.lv .ss { display: flex; gap: 2px; }
.lv .ss .star { width: 12px; height: 12px; }
.lv.done { border-color: rgba(232, 184, 74, 0.35); }
.lv.next { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(232, 184, 74, 0.25); }
.lv.boss { background: linear-gradient(160deg, #3a1f1f, #241413); }
.lv.locked { opacity: 0.35; cursor: default; }
.lv.locked .n { font-size: 0; }
.lv.locked .n::before { content: ""; display: block; width: 18px; height: 20px; background: var(--mut);
  clip-path: polygon(20% 45%, 20% 30%, 30% 12%, 50% 5%, 70% 12%, 80% 30%, 80% 45%, 95% 45%, 95% 100%, 5% 100%, 5% 45%, 30% 45%, 30% 32%, 38% 20%, 50% 16%, 62% 20%, 70% 32%, 70% 45%); }

.lvno { color: var(--gold); font-weight: 700; letter-spacing: 1px; font-size: 12px; text-transform: uppercase; margin-bottom: 4px; }
.lvgoal { font-size: 16px; margin: 0 0 12px; }
.starrules { display: flex; flex-direction: column; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: left; font-size: 13px; color: #ddd5c8; }
.starrules div { display: flex; align-items: center; gap: 8px; }
.starrules .ss { display: inline-flex; gap: 2px; width: 46px; }
.starrules .star { width: 13px; height: 13px; }
.lvbest { margin: 10px 0 2px; color: var(--mut); font-size: 13px; min-height: 18px; display: flex; justify-content: center; align-items: center; gap: 6px; }

.endstars { display: flex; justify-content: center; gap: 10px; margin: 6px 0 4px; }
.endstars .star { width: 46px; height: 46px; transform: scale(0.4); opacity: 0; transition: transform 0.35s cubic-bezier(.3, 1.6, .5, 1), opacity 0.2s; }
.endstars .star.show { transform: scale(1); opacity: 1; }
.endcoins { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 22px; background: rgba(232, 184, 74, 0.12); border: 1px solid rgba(232, 184, 74, 0.4); color: #ffe2a0; font-weight: 800; margin: 6px 0 2px; }

#shopTabs { margin: 4px 0 12px; }
.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.item { border-radius: 14px; border: 2px solid var(--line); background: var(--panel); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.item.eq { border-color: var(--green); }
.item canvas { width: 100%; height: 64px; display: block; border-radius: 8px; background: #0f0e0d; }
.item .row2 { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.item b { font-size: 14px; }
.item button { padding: 7px 10px !important; border-radius: 10px !important; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.item button.own { background: none !important; border: 1px solid var(--line) !important; color: var(--txt); }
.item button.used { background: rgba(47, 163, 107, 0.15) !important; border: 1px solid rgba(47, 163, 107, 0.6) !important; color: #7ee2ad; cursor: default; }
.item button.cant { opacity: 0.55; }
.item .coin { width: 16px; height: 16px; }
.item .coin::after { font-size: 9px; }
.small { font-size: 12px; margin-top: 12px; }

.bigcoin { display: flex; justify-content: center; margin: 4px 0 6px; }
.bigcoin .coin { width: 64px; height: 64px; box-shadow: inset 0 0 0 4px rgba(120, 80, 10, 0.45), 0 8px 24px rgba(232, 184, 74, 0.35); }
.bigcoin .coin::after { font-size: 30px; }
.dailyrow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 6px 0 4px; }
.dailyrow div { border-radius: 10px; border: 1px solid var(--line); background: var(--panel); padding: 6px 2px; font-size: 11px; color: var(--mut); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dailyrow div b { color: var(--txt); font-size: 13px; }
.dailyrow div.past { opacity: 0.45; }
.dailyrow div.today { border-color: var(--gold); background: rgba(232, 184, 74, 0.12); }

@media (max-width: 640px) {
  .lvgrid { grid-template-columns: repeat(4, 1fr); }
  .shopgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 440px) {
  .lvgrid { grid-template-columns: repeat(12, 1fr); }
  .lv .n { font-size: 16px; }
  .endstars .star { width: 34px; height: 34px; }
}

/* ---------- 3. aşama: hesap ve sıralama ---------- */
#scrAccount, #scrRank { background: radial-gradient(1200px 600px at 50% -10%, rgba(47, 163, 107, 0.25), transparent 60%), var(--bg); }
.tb-btn.acc { padding: 4px 10px 4px 4px; }
.accav { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: var(--txt); font-weight: 800; flex: none; }
.accav.on { background: linear-gradient(160deg, #f0c55c, #b98322); color: #1b1408; }
.accav.big { width: 48px; height: 48px; font-size: 20px; background: linear-gradient(160deg, #f0c55c, #b98322); color: #1b1408; }
.syncdot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--bg); }
.syncdot.err { background: var(--red); }
.acc-hero { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; margin: 6px auto 12px; background: rgba(79, 155, 232, 0.12); color: var(--blue); }
#accOut p { text-align: center; }
.acc-code { font: 800 30px/1.2 ui-monospace, Consolas, monospace; letter-spacing: 4px; color: var(--gold); background: var(--panel); border: 1px dashed rgba(232, 184, 74, 0.5); border-radius: 14px; padding: 12px; margin: 8px 0 12px; }
.waitline { display: flex; align-items: center; justify-content: center; gap: 10px; }
.acc-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.acc-card b { display: block; font-size: 17px; }
.acc-card small { color: var(--mut); }
.nickrow { display: flex; gap: 8px; }
.nickrow button { flex: none; }
.syncline { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--mut); }
.acc-err { color: #ff9a94; text-align: center; font-size: 14px; margin: 10px 0 0; }
#rankTabs { margin: 4px 0 10px; }
.rank-me { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(232, 184, 74, 0.1); border: 1px solid rgba(232, 184, 74, 0.4); margin-bottom: 10px; }
.rank-me b { color: var(--gold); }
.ranklist { list-style: none; margin: 0; padding: 0; max-height: min(56vh, 520px); overflow-y: auto; }
.ranklist li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.ranklist li .no { font-weight: 800; color: var(--mut); text-align: center; }
.ranklist li.top1 .no { color: #ffd76a; } .ranklist li.top2 .no { color: #d9dde3; } .ranklist li.top3 .no { color: #e3a46b; }
.ranklist li .v { font-weight: 800; display: inline-flex; align-items: center; gap: 5px; }
.ranklist li.me { background: rgba(232, 184, 74, 0.1); border-radius: 10px; }
.ranklist .empty { display: block; text-align: center; color: var(--mut); padding: 30px 10px; }
@media (max-width: 560px) { .tb-btn .t { display: none; } .tb-btn { padding: 7px 9px; } .tb-btn.acc { padding: 4px; } }
.center { text-align: center; }

/* ---------- 4. aşama: online ---------- */
#scrOnline { background: radial-gradient(1200px 600px at 50% -10%, rgba(79, 155, 232, 0.22), transparent 60%), var(--bg); }
.friendrow { display: flex; gap: 8px; }
.friendrow input { text-transform: uppercase; letter-spacing: 2px; font-weight: 700; text-align: center; min-width: 0; }
.friendrow button { flex: none; }
.resume { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(47, 163, 107, 0.15); border: 1px solid rgba(47, 163, 107, 0.6); margin-bottom: 6px; }
.bigspin { width: 54px; height: 54px; margin: 10px auto 6px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.12); border-top-color: var(--gold); animation: sp 0.9s linear infinite; }
#onWait h3 { margin: 8px 0 4px; font-size: 18px; color: var(--txt); }
.talkwrap { position: relative; }
#talkMenu { position: absolute; right: 0; top: 46px; z-index: 12; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 14px; background: rgba(20, 19, 17, 0.97); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); min-width: 170px; }
#talkMenu button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 9px; font-weight: 600; white-space: nowrap; }
#talkMenu button:hover { background: rgba(255, 255, 255, 0.07); }
#hud { grid-template-columns: 1fr auto 1fr auto auto; }
.tmr { font-weight: 800; color: var(--txt); font-size: 15px; font-variant-numeric: tabular-nums; }
.tmr.warn { color: #ff8a80; }
.offline { color: #ff9a94; }
@media (max-width: 640px) { #hud { grid-template-columns: 1fr 1fr auto auto; } }
.tm { font-size: 12px; font-weight: 800; color: var(--gold); min-height: 0; font-variant-numeric: tabular-nums; }
.tm:empty { display: none; }
.tm.warn { color: #ff8a80; }

/* ---------- 5. aşama: reklam ve satın alma ---------- */
.adbtn { border: 1px solid rgba(79, 155, 232, 0.6) !important; background: rgba(79, 155, 232, 0.12) !important; color: #bfe0ff; }
.adbtn::before { content: "▶ "; }
.item.pack { flex-direction: row; align-items: center; gap: 10px; }
.item.pack .pk-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(232, 184, 74, 0.12); color: var(--gold); font-size: 20px; flex: none; }
.item.pack .pk-ic .coin { width: 26px; height: 26px; }
.item.pack.ad .pk-ic { background: rgba(79, 155, 232, 0.15); color: #8fc7ff; }
.item.pack.noads .pk-ic { background: rgba(47, 163, 107, 0.15); color: #7ee2ad; }
.item.pack .pk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item.pack .pk-t small { color: var(--mut); font-size: 12px; }
.item.pack button { flex: none; }
.item.pack.note { border-style: dashed; }
#shopGrid:has(.pack) { grid-template-columns: 1fr; }
.demoad { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.85); display: grid; place-items: center; }
.demoad-box { width: min(420px, 90vw); background: #f4f1e6; color: #222; border-radius: 16px; padding: 22px; text-align: center; }
.demoad-tag { display: inline-block; background: #e0564f; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; }
.demoad-box h3 { margin: 10px 0 6px; }
.demoad-t { font-size: 34px; font-weight: 800; margin: 10px 0; }
.demoad-x { padding: 10px 20px; border-radius: 10px; border: 0; background: #222; color: #fff; font-weight: 700; }
.demoad-x:disabled { opacity: 0.35; }

/* ---------- telefon yatay (kompakt) görünüm ---------- */
.pval { position: absolute; left: 50%; transform: translate(-50%, -100%); font: 800 12px/1 system-ui; color: #fff; text-shadow: 0 1px 3px #000; pointer-events: none; white-space: nowrap; }
.av { position: relative; }
.pl.saat .av::before { content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(var(--halka, #e8b84a) calc(var(--t, 1) * 360deg), rgba(255, 255, 255, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); }
#rotate { display: none; position: fixed; inset: 0; z-index: 45; background: radial-gradient(600px 400px at 50% 30%, rgba(47, 163, 107, 0.25), transparent 70%), rgba(8, 8, 7, 0.96);
  flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; color: var(--txt); }
#rotate b { font-size: 22px; }
#rotate p { margin: 0 0 8px; color: var(--mut); max-width: 300px; }
#rotate .primary { padding: 13px 22px; border-radius: 14px; font-size: 16px; }
.rot-ic { color: #fff; animation: rotIc 2.2s ease-in-out infinite; }
@keyframes rotIc { 0%, 25% { transform: rotate(0); } 55%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (orientation: portrait) and (pointer: coarse) { body.ingame:not(.dikey) #rotate { display: flex; } }

body.compact #hud { height: auto; grid-template-columns: auto 1fr auto auto auto; gap: 6px; align-items: start;
  padding: calc(5px + var(--safe-t)) calc(8px + var(--safe-r)) 0 calc(8px + var(--safe-l)); background: linear-gradient(180deg, rgba(6, 6, 5, 0.6), transparent); }
body.compact .pl { background: rgba(14, 13, 12, 0.84); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 28px; padding: 3px 12px 3px 3px; gap: 7px;
  max-width: 34vw; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
body.compact .pl.r { padding: 3px 3px 3px 12px; justify-self: end; }
body.compact .pl.on { background: rgba(40, 32, 14, 0.9); border-color: rgba(232, 184, 74, 0.7); }
body.compact .av { width: 34px; height: 34px; font-size: 14px; }
body.compact .nm { font-size: 12.5px; }
body.compact .sub { font-size: 10.5px; min-height: 12px; gap: 1px; }
body.compact .mb { width: 10px; height: 10px; }
body.compact .sc { font-size: 20px; min-width: 20px; }
body.compact .tm { font-size: 10.5px; }
body.compact .mid { display: block; justify-self: center; background: rgba(14, 13, 12, 0.72); border-radius: 14px; padding: 4px 12px; font-size: 10.5px; line-height: 1.2; margin-top: 3px; }
body.compact #hudTitle { font-size: 11.5px; }
body.compact .ib { width: 36px; height: 36px; border-radius: 50%; background: rgba(14, 13, 12, 0.84); }
body.compact #talkMenu { top: 42px; }
body.compact .col { top: calc(56px + var(--safe-t)); bottom: calc(8px + var(--safe-b)); width: 46px; gap: 6px; }
body.compact #colPower { left: calc(6px + var(--safe-l)); }
body.compact #colFine { right: calc(6px + var(--safe-r)); width: 46px; }
body.compact.lefty #colPower { left: auto; right: calc(6px + var(--safe-r)); }
body.compact.lefty #colFine { right: auto; left: calc(6px + var(--safe-l)); }
body.compact .clabel { display: none; }
body.compact .track { border-radius: 23px; background: rgba(14, 13, 12, 0.7) !important; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); border-color: rgba(255, 255, 255, 0.1); }
body.compact #power { max-height: none; }
body.compact #fine { max-height: none; background: repeating-linear-gradient(180deg, rgba(255,255,255,0.14) 0 2px, transparent 2px 9px), rgba(14, 13, 12, 0.7) !important; }
body.compact .pcue { width: 8px; margin-left: -4px; }
body.compact #btnSpin { width: 46px; height: 46px; background: rgba(14, 13, 12, 0.84); }
body.compact .sball { width: 34px; height: 34px; }
body.compact.pr .col { bottom: calc(50px + var(--safe-b)); }
body.compact #prBar { bottom: calc(5px + var(--safe-b)); padding: 3px; border-radius: 12px; background: rgba(14, 13, 12, 0.84); }
body.compact #prBar button { padding: 6px 10px; font-size: 12.5px; }
body.compact #toasts { top: calc(50px + var(--safe-t)); }
body.compact .toast { font-size: 13px; padding: 6px 14px; }
body.compact .toast.big { font-size: 18px; }
body.compact #hint, body.compact #think { bottom: calc(10px + var(--safe-b)); font-size: 13px; }
body.compact.pr #hint, body.compact.pr #think { bottom: calc(52px + var(--safe-b)); }
@media (max-width: 640px) { body.compact .mid { display: none; } body.compact #hud { grid-template-columns: auto 1fr auto auto auto; } body.compact .pl.r { grid-column: 3; } }
@media (max-height: 440px) and (min-width: 600px) {
  .brand { display: flex; align-items: center; justify-content: center; gap: 14px; text-align: left; }
  .brand .logo { width: 92px; height: 48px; }
  .brand h1 { font-size: 26px; margin: 0; }
  .menu-wrap { gap: 10px; }
}

/* ---------- telefon yatay v2: üst/alt şerit yok, her şey yanlarda; masa tüm yükseklikte ---------- */
body.compact #hud { display: block; height: 0; padding: 0; background: none; }
body.compact .mid { display: none !important; }
body.compact .pl { position: fixed; z-index: 11; flex-direction: column; align-items: center; gap: 3px; width: 50px; max-width: none;
  padding: 0; background: none !important; border: 0 !important; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.compact .pl.r { flex-direction: column; padding: 0; justify-self: auto; }
body.compact #p0 { left: calc(6px + var(--safe-l)); top: calc(6px + var(--safe-t)); }
body.compact #p1 { right: calc(6px + var(--safe-r)); top: calc(48px + var(--safe-t)); }
body.compact.lefty #p0 { left: auto; right: calc(6px + var(--safe-r)); top: calc(48px + var(--safe-t)); }
body.compact.lefty #p1 { right: auto; left: calc(6px + var(--safe-l)); top: calc(6px + var(--safe-t)); }
body.compact .pl .pi { display: flex; flex-direction: column; align-items: center; }
body.compact .nm, body.compact .tm { display: none; }
/* grup topları / top rengi: yazı gizli, küçük toplar görünür */
body.compact .sub { font-size: 0; width: 48px; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 0; overflow: visible; }
body.compact .pl.r .sub { justify-content: center; }
body.compact .sub .mb { width: 7px; height: 7px; box-shadow: none; }
body.compact .sub .mb.st::before, body.compact .sub .mb.st::after { height: 2px; }
body.compact .av { width: 38px; height: 38px; font-size: 15px; }
body.compact .pl.on .av { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(232, 184, 74, 0.75); }
body.compact .sc { font-size: 15px; line-height: 1; min-width: 0; }
body.compact .sc:empty { display: none; }
body.compact .ib { position: fixed; z-index: 12; width: 36px; height: 36px; }
body.compact #btnMenu { right: calc(13px + var(--safe-r)); top: calc(6px + var(--safe-t)); }
body.compact .talkwrap { position: fixed; z-index: 12; right: calc(13px + var(--safe-r)); bottom: calc(6px + var(--safe-b)); }
body.compact .talkwrap .ib { position: static; }
body.compact #talkMenu { top: auto; bottom: 42px; right: 0; }
body.compact .col { width: 44px; gap: 6px; }
body.compact #colPower { top: calc(84px + var(--safe-t)); bottom: calc(6px + var(--safe-b)); left: calc(9px + var(--safe-l)); }
body.compact #colFine { top: calc(126px + var(--safe-t)); bottom: calc(6px + var(--safe-b)); right: calc(9px + var(--safe-r)); width: 44px; }
body.compact.ingame:has(#btnTalk:not(.hidden)) #colFine { bottom: calc(48px + var(--safe-b)); }
body.compact.lefty #colPower { left: auto; right: calc(9px + var(--safe-r)); top: calc(126px + var(--safe-t)); }
body.compact.lefty #colFine { right: auto; left: calc(9px + var(--safe-l)); top: calc(84px + var(--safe-t)); }
body.compact #btnSpin { width: 44px; height: 44px; }
body.compact .sball { width: 32px; height: 32px; }
/* pratik: yazısız küçük simgeler, sol altta dikey */
body.compact #prBar { left: calc(6px + var(--safe-l)); right: auto; bottom: calc(6px + var(--safe-b)); transform: none; flex-direction: column; gap: 4px; padding: 3px; border-radius: 14px; }
body.compact #prBar button { font-size: 0; padding: 0; width: 42px; height: 34px; justify-content: center; border-radius: 10px; }
body.compact #prBar button svg { width: 18px; height: 18px; }
body.compact.pr #colPower { bottom: calc(126px + var(--safe-b)); }
body.compact.pr .col { bottom: calc(6px + var(--safe-b)); }
body.compact.pr #colPower { bottom: calc(126px + var(--safe-b)); }
body.compact #toasts { top: calc(8px + var(--safe-t)); }
body.compact #hint, body.compact #think, body.compact.pr #hint, body.compact.pr #think { bottom: calc(8px + var(--safe-b)); padding: 6px 12px; font-size: 12px; }
/* pratik: simgeler sağ sütunda (rakip kartının yeri boş), güç çubuğu tam boy */
body.compact.pr #prBar { left: auto; right: calc(9px + var(--safe-r)); top: calc(48px + var(--safe-t)); bottom: auto; }
body.compact.pr #prBar button { width: 40px; height: 32px; }
body.compact.pr #colPower { bottom: calc(6px + var(--safe-b)); }
body.compact.pr #colFine { top: calc(166px + var(--safe-t)); }
body.compact.pr.lefty #prBar { right: auto; left: calc(9px + var(--safe-l)); }

/* ---------- güzel atış: övgü yazısı ---------- */
#praise { position: fixed; inset: 0; z-index: 42; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.pz-t { position: relative; font: italic 900 clamp(42px, 11vw, 104px)/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: 1px; padding: 0 12px;
  background: linear-gradient(105deg, #f39c12 0%, #ffd34d 30%, #fff 46%, #ffe27a 56%, #f7b733 75%, #e67e22 100%); background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.5px rgba(90, 45, 0, 0.6);
  filter: drop-shadow(0 4px 0 #7a4100) drop-shadow(0 12px 26px rgba(0, 0, 0, 0.65)); }
.pz-s { font: 800 clamp(13px, 2.6vw, 20px)/1.2 system-ui, sans-serif; color: #fff; background: rgba(10, 9, 8, 0.72); padding: 6px 16px; border-radius: 99px;
  border: 1px solid rgba(255, 214, 90, 0.55); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.pz-s:empty { display: none; }
.pz-rays { position: absolute; left: 50%; top: 50%; width: min(120vw, 900px); aspect-ratio: 1; margin: calc(min(120vw, 900px) / -2) 0 0 calc(min(120vw, 900px) / -2);
  background: repeating-conic-gradient(rgba(255, 214, 90, 0.2) 0 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(closest-side, #000 15%, transparent 72%); mask: radial-gradient(closest-side, #000 15%, transparent 72%); opacity: 0; }
.pz-stars { position: absolute; left: 50%; top: 50%; }
.pz-stars i { position: absolute; left: 0; top: 0; color: #ffd34d; font-style: normal; text-shadow: 0 0 10px rgba(255, 200, 60, 0.9); opacity: 0; transform: translate(-50%, -50%); }
#praise.show .pz-t { animation: pzPop 0.75s cubic-bezier(0.2, 1.6, 0.4, 1) both, pzShine 1.5s 0.3s ease-in-out both; }
#praise.show .pz-s { animation: pzSub 0.45s 0.35s both; }
#praise.show .pz-rays { animation: pzRays 2.4s ease-out both; }
#praise.show .pz-stars i { animation: pzStar 1.1s var(--d, 0s) cubic-bezier(0.1, 0.8, 0.3, 1) both; }
#praise.out { animation: pzOut 0.45s ease-in forwards; }
@keyframes pzPop { 0% { transform: scale(0.15) rotate(-12deg); opacity: 0; } 55% { transform: scale(1.18) rotate(2deg); opacity: 1; } 75% { transform: scale(0.95) rotate(-4deg); } 100% { transform: scale(1) rotate(-3deg); } }
@keyframes pzShine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes pzSub { from { opacity: 0; transform: translateY(14px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes pzRays { 0% { opacity: 0; transform: rotate(0) scale(0.4); } 25% { opacity: 1; } 100% { opacity: 0.5; transform: rotate(40deg) scale(1); } }
@keyframes pzStar { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(160deg); } }
@keyframes pzOut { to { opacity: 0; transform: scale(1.2); } }

/* ---------- güzel atış: tekrar ---------- */
#replayUi { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
#replayUi .rbar { position: absolute; left: 0; right: 0; height: 8vh; background: #000; animation: rbarIn 0.35s ease-out both; }
#replayUi .rbar.top { top: 0; } #replayUi .rbar.bot { bottom: 0; --dir: 1; }
@keyframes rbarIn { from { transform: translateY(calc(-100% * (1 - 2 * var(--dir, 0)))); } to { transform: none; } }
#replayUi .rtag { position: absolute; top: calc(8vh + 10px); left: calc(14px + var(--safe-l)); display: flex; align-items: center; gap: 8px;
  font: 800 12px/1 system-ui, sans-serif; letter-spacing: 3px; color: #fff; background: rgba(0, 0, 0, 0.55); padding: 6px 12px; border-radius: 99px; }
#replayUi .rtag i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; animation: rblink 1s steps(2) infinite; }
@keyframes rblink { 50% { opacity: 0.2; } }
#replayUi .rskip { position: absolute; bottom: calc(8vh + 10px); right: calc(14px + var(--safe-r)); pointer-events: auto; font: 700 14px system-ui, sans-serif; color: #fff;
  background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 99px; padding: 8px 16px; cursor: pointer; }
body.replay #hud, body.replay .col, body.replay #prBar, body.replay .talkwrap, body.replay #btnMenu, body.replay .pl, body.replay #hint, body.replay #think { opacity: 0 !important; pointer-events: none !important; }

/* ---------- 3 kişilik 3 top ---------- */
.pl.p3 .av { background: linear-gradient(160deg, #ff8a80, #b3261e); color: #2a0503; }
.pl.out { opacity: 0.4; }
body.three #hud { grid-template-columns: 1fr auto 1fr 1fr auto auto; }
@media (max-width: 640px) { body.three #hud { grid-template-columns: 1fr 1fr 1fr auto auto; } body.three .mid { display: none; } }
#optCount .seg button { font-size: 13px; }
#onCount { margin-bottom: 4px; }
#onCountSeg { margin-bottom: 10px; }
/* telefon: 3. oyuncu solda, ilk oyuncunun altında; güç çubuğu biraz aşağıdan başlar */
body.compact #p2 { left: calc(6px + var(--safe-l)); top: calc(84px + var(--safe-t)); right: auto; }
body.compact.three #colPower { top: calc(162px + var(--safe-t)); }
/* solak: ilk oyuncu sağda, 2. ve 3. oyuncu solda alt alta */
body.compact.three.lefty #p2 { left: calc(6px + var(--safe-l)); right: auto; top: calc(84px + var(--safe-t)); }
body.compact.three.lefty #colFine { top: calc(162px + var(--safe-t)); }
body.compact.three.lefty #colPower { top: calc(126px + var(--safe-t)); }

/* ---------- 3 top karma (serbest + 3 bant) ---------- */
.games.g5 { grid-template-columns: repeat(5, 1fr); }
.games.g5 .gm b { font-size: 12px; line-height: 1.15; text-align: center; }
@media (max-width: 640px) { .games.g5 { grid-template-columns: repeat(3, 1fr); } }
.mixrow { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mixrow label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--mut); font-weight: 700; }
.mixrow input { width: 76px; padding: 10px; font-size: 18px; font-weight: 800; text-align: center; border-radius: 10px; }
.mixrow span { font-size: 20px; font-weight: 800; padding-bottom: 8px; color: var(--mut); }
.mixrow b { padding-bottom: 10px; color: var(--gold); font-size: 14px; }
.pl .sc { position: relative; }
.pl.bant .sc::after { content: "3B"; position: absolute; top: -7px; right: -14px; font-size: 9px; font-weight: 900; letter-spacing: 0.5px; color: #1a1205; background: var(--gold); border-radius: 6px; padding: 1px 4px; }
body.compact .pl.bant .sc::after { position: static; display: inline-block; margin-left: 2px; vertical-align: top; font-size: 8px; padding: 0 3px; }
