/* =====================================================================
   TEMA: Vişne çürüğü kadife masa · damarlı ahşap kavisli ıstaka ·
         Osmanlı süslemeli mermer taşlar · altın detaylar
   Renk/doku değişiklikleri için önce :root değişkenlerine bakın.
   ===================================================================== */
:root {
  /* masa örtüsü */
  --felt-hi: #8e1b31;
  --felt-mid: #5c0c1c;
  --felt-lo: #2a030a;
  --bg: #1a0206;

  /* altın */
  --gold-1: #fff0b3;
  --gold-2: #e0ad45;
  --gold-3: #a8761c;
  --gold-line: rgba(224, 173, 69, .55);
  --gold-grad: linear-gradient(180deg, #fff0b3 0%, #e7b94f 40%, #b07d1e 70%, #f0cf75 100%);

  /* metin */
  --ink: #f6ead0;
  --muted: #d3b98e;
  --bad: #ff8a8a;
  --good: #7fdca0;

  /* taş */
  --fake: #1e7a4f;

  /* ölçüler: tüm ıstaka ve taşlar --tw (taş genişliği) üzerinden ölçeklenir */
  --chatw: 0px;   /* açık sohbet paneli genişliği (masaüstü) */
  --tw: clamp(14px, min(calc((100vw - var(--chatw) - 24px) / 19.2), calc((100vh - 575px) / 4.8)), 56px);
  --th: calc(var(--tw) * 1.36);
  --stw: clamp(14px, calc(var(--tw) * .56), 26px);
  --sth: calc(var(--stw) * 1.36);
  --arc: calc(var(--tw) * .37);   /* ıstaka kavis derinliği (rack.js E=45 ile uyumlu) */
  --tilt: 4.9deg;                  /* uçlardaki taş eğimi */

  /* dokular (SVG) */
  --tile-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 126' preserveAspectRatio='none'%3E%3Cdefs%3E%3Cg id='o'%3E%3Crect x='6' y='6' width='88' height='114' rx='11' fill='none' stroke-width='1.7'/%3E%3Crect x='10' y='10' width='80' height='106' rx='8' fill='none' stroke-width='.9'/%3E%3Cpath stroke='none' d='M13 13c6 0 9 3 9 9-6 0-9-3-9-9zM87 13c-6 0-9 3-9 9 6 0 9-3 9-9zM13 113c6 0 9-3 9-9-6 0-9 3-9 9zM87 113c-6 0-9-3-9-9 6 0 9 3 9 9z'/%3E%3Cpath fill='none' stroke-width='.9' d='M25 13c4 0 6 3 3 5M13 25c0 4 3 6 5 3M75 13c-4 0-6 3-3 5M87 25c0 4-3 6-5 3M25 113c4 0 6-3 3-5M13 101c0-4 3-6 5-3M75 113c-4 0-6-3-3-5M87 101c0-4-3-6-5-3'/%3E%3Cpath stroke='none' d='M50 2.5l3.5 3.5-3.5 3.5-3.5-3.5zM50 116.5l3.5 3.5-3.5 3.5-3.5-3.5z'/%3E%3Cpath fill='none' stroke-width='.8' d='M36 108q14-6 28 0M40 112q10-4 20 0'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23o' transform='translate(0 1)' fill='%23fff' stroke='%23fff' fill-opacity='1' stroke-opacity='1'/%3E%3Cuse href='%23o' fill='%23435a82' stroke='%23435a82' fill-opacity='.6' stroke-opacity='.78'/%3E%3C/svg%3E");
  --back-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23e0ad45' stroke-width='3'%3E%3Crect x='25' y='25' width='50' height='50'/%3E%3Crect x='25' y='25' width='50' height='50' transform='rotate(45 50 50)'/%3E%3Ccircle cx='50' cy='50' r='11'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='4' fill='%23e0ad45'/%3E%3C/svg%3E");
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='none' stroke='%23e8c36a' stroke-opacity='.075' stroke-width='1'%3E%3Crect x='29' y='29' width='38' height='38'/%3E%3Crect x='29' y='29' width='38' height='38' transform='rotate(45 48 48)'/%3E%3Ccircle cx='48' cy='48' r='9'/%3E%3Cpath d='M0 0L20 20M96 0L76 20M0 96L20 76M96 96L76 76'/%3E%3C/g%3E%3C/svg%3E");
  --felt-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cg fill='none' stroke='%23f0c878' stroke-opacity='.16' stroke-width='.6'%3E%3Crect x='7.25' y='7.25' width='9.5' height='9.5'/%3E%3Crect x='7.25' y='7.25' width='9.5' height='9.5' transform='rotate(45 12 12)'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3Cpath d='M0 0L5 5M24 0L19 5M0 24L5 19M24 24L19 19'/%3E%3C/g%3E%3C/svg%3E");
  --velvet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
body { display: flex; flex-direction: column; user-select: none; -webkit-user-select: none; }

/* ============ Butonlar ============ */
button {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .2px;
  border: 1px solid var(--gold-line); border-radius: 9px; padding: 8px 14px;
  background: linear-gradient(180deg, #4a0c1a, #26040c);
  color: #f3dfae; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,220,160,.15), 0 3px 0 #140105, 0 4px 8px rgba(0,0,0,.4);
  transition: transform .08s, filter .15s, box-shadow .08s;
}
button:hover:not(:disabled) { filter: brightness(1.15); }
button:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,220,160,.15), 0 1px 0 #140105; }
button.primary {
  background: linear-gradient(180deg, #fff0b3 0%, #e7b94f 45%, #b07d1e 100%);
  color: #3a1d00; border-color: #fff0b3; text-shadow: 0 1px 0 rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 0 #6e4a0c, 0 4px 10px rgba(0,0,0,.45);
}
button.primary:active:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 0 #6e4a0c; }
button.ghost { background: rgba(255,230,180,.06); box-shadow: none; }
button:disabled { opacity: .38; cursor: default; }

/* ============ Üst bar ============ */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #2b040c, #170105);
  border-bottom: 1px solid var(--gold-line);
  box-shadow: 0 4px 12px rgba(0,0,0,.5);
  position: relative; z-index: 2;
}
.brand { font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: 20px; letter-spacing: 1.5px; white-space: nowrap;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hand-info { flex: 1; color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; gap: 6px; }

/* ============ Masa (kadife) ============ */
.board {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(84px, auto) minmax(0, 1fr) minmax(84px, auto);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "top top top" "left center right" "me me me";
  gap: 8px; padding: 10px 16px 6px;
  background:
    var(--pattern),
    var(--velvet),
    radial-gradient(ellipse 80% 70% at 50% 42%, var(--felt-hi) 0%, var(--felt-mid) 55%, var(--felt-lo) 100%);
  box-shadow: inset 0 0 120px rgba(0,0,0,.6);
}
.seat-top { grid-area: top; justify-self: center; }
.seat-left { grid-area: left; align-self: center; }
.seat-right { grid-area: right; align-self: center; }

/* ============ Oyuncu kartları ============ */
.board > .seat { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.seat-card {
  display: flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, rgba(48,5,15,.85), rgba(22,2,7,.85));
  border: 1px solid var(--gold-line); border-radius: 14px; padding: 6px 12px 6px 6px;
  box-shadow: 0 8px 18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,160,.12);
  max-width: 100%;
}
.seat-card { position: relative; transition: transform .3s, opacity .3s; }
.seat-card.active { border-color: var(--gold-1); border-width: 2px; transform: scale(1.1); animation: seatPulse 1.4s ease-in-out infinite; z-index: 2; }
.seat-card.active::after {
  content: 'SIRADA'; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px; padding: 1px 8px; border-radius: 999px;
  background: var(--gold-grad); color: #3a1d00; box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
.seat-card.idle { opacity: .72; }
.avatar { position: relative; }
.avatar .ring {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: #fff0b3; border-right-color: #e0ad45;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes seatPulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(0,0,0,.45), 0 0 0 0 rgba(240,200,100,.0); }
  50% { box-shadow: 0 8px 18px rgba(0,0,0,.45), 0 0 30px 6px rgba(240,200,100,.6); }
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: 16px; color: #ffe7a6;
  background: radial-gradient(circle at 35% 30%, #a3233d, #4a0816);
  box-shadow: 0 0 0 2px #e0ad45, 0 0 0 4px #4a0816, 0 0 0 5px rgba(224,173,69,.6), 0 4px 8px rgba(0,0,0,.5);
}
.seat-meta { display: flex; flex-direction: column; min-width: 0; }
.seat-meta b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-meta small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.badge-open {
  align-self: flex-start; margin-top: 3px;
  font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 6px;
  background: var(--gold-grad); color: #3a1d00;
}
.backs { display: flex; padding-left: 5px; }
.backs i {
  width: 10px; height: 22px; border-radius: 3px; margin-left: -5px;
  background: linear-gradient(145deg, #8e1b33, #4a0814);
  box-shadow: inset 0 0 0 1px #e0ad45, 0 2px 2px rgba(0,0,0,.4);
}
/* Rakip ıstakaları (arka yüz). Ölçüler rack.js OPP ile aynı: 7 x 1.25 taş genişliği */
.opp-rack { position: relative; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)) drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.opp-rack-svg { display: block; width: 100%; height: 100%; }
.opp-top { width: calc(var(--tw) * 7); height: calc(var(--tw) * 1.25); margin-top: 2px; }
.opp-left, .opp-right { width: calc(var(--tw) * 1.25); height: min(calc(var(--tw) * 7), 40vh); }
.seat-left, .seat-right { flex-direction: row; gap: 6px; }
.seat-left .seat-info { order: 0; } .seat-left .opp-rack { order: 1; }
.seat-right .seat-info { order: 1; } .seat-right .opp-rack { order: 0; }
.seat-left .seat-card, .seat-right .seat-card { flex-direction: column; padding: 6px; text-align: center; }
.seat-left .seat-meta, .seat-right .seat-meta { align-items: center; }
.seat-left .badge-open, .seat-right .badge-open { align-self: center; }

/* ============ Orta alan ============ */
.center {
  grid-area: center; min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "p2 deck p1" "melds melds melds" "p3 log p0";
  gap: 8px;
}
.pile-slot.p0 { grid-area: p0; } .pile-slot.p1 { grid-area: p1; }
.pile-slot.p2 { grid-area: p2; } .pile-slot.p3 { grid-area: p3; }

.pile {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 7px 7px 5px; border-radius: 12px;
  border: 1px solid rgba(224,173,69,.3);
  background: rgba(20,1,5,.28);
  box-shadow: inset 0 3px 10px rgba(0,0,0,.55);
}
.pile small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pile.takeable { border-color: var(--gold-1); cursor: pointer; animation: glow 1.4s ease-in-out infinite; }
.pile.takeable .tile { cursor: grab; }
.pile.droppable { border: 1px dashed var(--gold-2); }
.is-dragging .pile.droppable { background: rgba(224,173,69,.14); animation: glow 1s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: inset 0 3px 10px rgba(0,0,0,.55), 0 0 0 rgba(240,200,100,0); }
  50% { box-shadow: inset 0 3px 10px rgba(0,0,0,.55), 0 0 16px rgba(240,200,100,.55); }
}

.deck-area { grid-area: deck; display: flex; align-items: center; justify-content: center; gap: 20px; }
.deck, .indicator { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; border-radius: 12px; border: 1px solid transparent; }
.deck .stack { position: relative; }
.deck .stack .tile + .tile { position: absolute; left: 0; }
.deck .stack .tile:nth-child(2) { top: -3px; }
.deck .stack .tile:nth-child(3) { top: -6px; }
.deck.clickable { border-color: var(--gold-1); cursor: pointer; animation: glow 1.4s ease-in-out infinite; }
.deck small, .indicator small { font-size: 11px; color: var(--muted); white-space: nowrap; }

.table-melds {
  grid-area: melds; min-height: 0; overflow: auto;
  background: rgba(20,1,5,.3);
  border: 1px solid rgba(224,173,69,.4);
  outline: 1px solid rgba(224,173,69,.18); outline-offset: 3px;
  border-radius: 14px; padding: 8px;
  box-shadow: inset 0 6px 22px rgba(0,0,0,.55);
  display: flex; flex-direction: column; gap: 5px;
}
.table-melds .empty-note { margin: auto; color: var(--muted); font-size: 13px; text-align: center; font-style: italic; }
.meld-row { display: flex; gap: 6px; align-items: flex-start; }
.meld-row .owner { flex: none; width: 46px; font-size: 11px; color: var(--gold-2); padding-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Cinzel, Georgia, serif; }
.meld-row .melds { display: flex; flex-wrap: wrap; gap: 5px 6px; min-width: 0; }
.meld {
  display: flex; gap: 1px; align-items: center; padding: 3px 3px 4px; border-radius: 8px;
  background: rgba(255,235,190,.06); border: 1px solid rgba(224,173,69,.18);
}
.meld em { font-style: normal; font-size: 10px; color: var(--muted); margin-left: 4px; }
.meld.target { cursor: pointer; }
.meld.target:hover, .is-dragging .meld.target { border-color: var(--gold-1); background: rgba(224,173,69,.12); }
.meld.fresh-meld { animation: meldGlow 1.8s ease-out; }
@keyframes meldGlow {
  0% { box-shadow: 0 0 0 2px var(--gold-1), 0 0 28px rgba(246,220,140,.9); transform: scale(1.04); }
  100% { box-shadow: 0 0 0 0 rgba(246,220,140,0); transform: none; }
}

.log { grid-area: log; font-size: 11px; color: var(--muted); align-self: end; text-align: center; line-height: 1.5; overflow: hidden; }
.log div:last-child { color: var(--ink); }

/* ============ Oyuncu alanı ============ */
.me { grid-area: me; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.me-head { display: flex; align-items: center; gap: 12px; font-size: 13px; flex-wrap: wrap; justify-content: center; }
.me-head .meter { padding: 3px 9px; border-radius: 7px; background: rgba(20,1,5,.45); border: 1px solid rgba(224,173,69,.3); }
.me-head .meter.ok { background: var(--gold-grad); color: #3a1d00; font-weight: 800; border-color: var(--gold-1); }
.me-head .turn { color: var(--gold-1); font-weight: 700; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }

/* ============ Istaka (katmanlı 3B — çizim js/rack.js) ============ */
/* Istaka + el + sıra vurgusu */
/* yatırma (rotateX) ıstakayı görsel olarak kısaltır; boşalan yeri geri al */
.rack-area { position: relative; z-index: 3; margin-top: calc(var(--tw) * -.15); margin-bottom: calc(var(--tw) * -.25);
  transform: translateY(var(--rack-dy, 0px)); transition: transform .18s ease-out; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.rack-moving .rack-area { transition: none; }
/* 2 sn basılı tutma: altta dolan çubuk, süre dolunca ıstaka parlar ve kaydırılabilir */
.rack-area::after { content: ''; position: absolute; left: 50%; bottom: calc(var(--tw) * -.1); height: 4px; width: 0;
  transform: translateX(-50%); border-radius: 4px; background: #3ee083; box-shadow: 0 0 10px #3ee08399; opacity: 0; pointer-events: none; }
.rack-area.rack-holding::after { opacity: 1; animation: rackHold 2s linear forwards; }
@keyframes rackHold { from { width: 0; } to { width: 60%; } }
.rack-moving .rack-area { filter: drop-shadow(0 0 12px #3ee08388); }
.rack-moving, .rack-moving * { cursor: ns-resize !important; user-select: none; }
#rackArea .tile { cursor: grab; }
.rack-wrap {
  position: relative; z-index: 1;
  padding: calc(var(--tw) * .45) calc(var(--tw) * .9) calc(var(--tw) * 1.17);
  /* yukarıdan bakış: üst kenar uzaklaşır, raf yüzeyleri görünür */
  transform: perspective(900px) rotateX(27deg);
  transform-origin: 50% 100%;
}
/* ıstakanın masaya düşen gölgesi */
.rack-area::after {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  left: 4%; right: 4%; bottom: calc(var(--tw) * -.35); height: calc(var(--tw) * 1.1);
  background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.6), rgba(0,0,0,0) 70%);
  filter: blur(6px);
}
.turn-glow {
  position: absolute; z-index: 0; pointer-events: none;
  inset: calc(var(--tw) * -.6) calc(var(--tw) * -.4);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 55%, rgba(255,214,120,.55), rgba(255,190,80,.18) 45%, rgba(255,190,80,0) 70%);
  opacity: 0; transition: opacity .4s;
}
.my-turn .turn-glow { opacity: 1; animation: turnGlow 1.8s ease-in-out infinite; }
@keyframes turnGlow { 50% { opacity: .55; } }

/* sol el görseli eklenince .hand stili buraya gelecek */

.rack-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; will-change: transform; }
.rack-back { z-index: 0; filter: drop-shadow(0 22px 18px rgba(0,0,0,.62)) drop-shadow(0 6px 4px rgba(0,0,0,.5)); }
.rack-fg1 { z-index: 2; }
.rack-fg2 { z-index: 4; }
.rack {
  position: relative; display: grid;
  grid-template-columns: repeat(16, var(--tw));
  column-gap: calc(var(--tw) * .07);
}
.slot {
  width: var(--tw); height: calc(var(--th) + var(--tw) * .3);
  padding-top: calc(var(--tw) * .04);
  border-radius: 6px;
  transform: translateY(calc(var(--t, 0) * var(--t, 0) * var(--arc))) rotate(calc(var(--t, 0) * var(--tilt)));
}
.slot.r1 { z-index: 1; }   /* üst raf dudağının arkasında */
.slot.r2 { z-index: 3; }   /* ön yüzün arkasında */
.is-dragging .slot:hover { background: radial-gradient(ellipse at 50% 45%, rgba(255,230,160,.25), transparent 70%); }

.controls { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }

/* ============ Taşlar ============
   .tile = taşın gövdesi (kalınlık/kenar), .face = mermer yüz.
   Masadaki/atılan taşlarda kalınlık altta; ıstakadakiler arkaya yaslı olduğu için üst kenar görünür. */
.tile {
  --w: var(--tw); --h: var(--th);
  --r: calc(var(--w) * .17);
  --thick: calc(var(--h) * .075);
  width: var(--w); height: var(--h); flex: none;
  position: relative;
  border-radius: var(--r);
  /* gövde = taşın kalınlığı (ay taşı, yarı saydam) */
  background: linear-gradient(180deg, rgba(226,234,246,.72) 0%, rgba(176,192,216,.74) 55%, rgba(128,146,176,.82) 100%);
  box-shadow: 0 1px 1px rgba(0,0,0,.35), 0 3px 7px rgba(0,0,0,.3);
  color: var(--tc, #222);
  user-select: none; -webkit-user-select: none; touch-action: none;
  transition: transform .14s, box-shadow .14s;
}
.tile .face {
  position: absolute; left: 0; right: 0; top: 0; bottom: var(--thick);
  border-radius: var(--r);
  display: flex; flex-direction: column; align-items: center;
  padding-top: calc(var(--h) * .1);
  /* AY TAŞI: süt beyazı, yarı saydam, içinde mavi ışıltı (adularesans) */
  background:
    radial-gradient(55% 40% at var(--mx, 60%) var(--my, 45%), rgba(130,180,255,.55), rgba(130,180,255,0) 72%),
    radial-gradient(40% 30% at calc(100% - var(--mx, 60%)) calc(var(--my, 45%) + 25%), rgba(190,170,255,.28), rgba(190,170,255,0) 70%),
    radial-gradient(110% 60% at 30% 6%, rgba(255,255,255,.85), rgba(255,255,255,0) 55%),
    linear-gradient(165deg, rgba(240,244,252,.56) 0%, rgba(218,228,244,.46) 50%, rgba(196,210,232,.56) 100%);
  box-shadow:
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 0 0 1px rgba(110,132,170,.4),
    inset 0 -3px 6px rgba(80,104,150,.22),
    inset 0 0 14px rgba(255,255,255,.4);
}
.tile .face::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: var(--tile-frame) center / 100% 100% no-repeat;
  pointer-events: none;
}
/* ıstakadaki taş: ince üst kenar ışık alır, alt kısmı raf dudağının arkasında */
.tile.mine {
  --top: calc(var(--h) * .05);
  background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(214,226,242,.85) var(--top), rgba(185,200,222,.1) calc(var(--top) + 2px), rgba(185,200,222,.05) 100%);
  box-shadow: 0 0 1px 1px rgba(30,10,2,.32), 1px -1px 5px rgba(20,6,0,.25);
}
.tile.mine .face { top: var(--top); bottom: 0; }
#rack .tile { cursor: grab; }
#rack .tile:hover { transform: translateY(-4px); }

.tile .n {
  position: relative;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 900; font-size: calc(var(--w) * .56); line-height: 1;
  /* kazınmış + boyanmış: alt kenarda ışık, üst kenarda gölge */
  text-shadow: 0 1px 0 rgba(255,255,255,1), 0 -1px 0 rgba(20,30,60,.4), 0 0 1px rgba(0,0,0,.25), 0 0 6px rgba(255,255,255,.6);
}
.tile .pip {
  position: relative; display: block;
  width: calc(var(--w) * .27); height: calc(var(--w) * .27);
  margin-top: auto; margin-bottom: calc(var(--h) * .12);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,1)) drop-shadow(0 -1px 0 rgba(40,20,0,.35));
}
.tile .pip i {
  display: block; width: 100%; height: 100%; background: var(--tc);
  clip-path: polygon(50% 0, 60.3% 25.1%, 85.4% 14.6%, 74.9% 39.7%, 100% 50%, 74.9% 60.3%, 85.4% 85.4%, 60.3% 74.9%, 50% 100%, 39.7% 74.9%, 14.6% 85.4%, 25.1% 60.3%, 0 50%, 25.1% 39.7%, 14.6% 14.6%, 39.7% 25.1%);
}
.tile.fake { --tc: var(--fake); }
.tile.fake .face { justify-content: center; padding-top: 0; }
.tile .lale {
  position: relative; display: block;
  width: calc(var(--w) * .56); height: calc(var(--w) * .76);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,1)) drop-shadow(0 -1px 0 rgba(40,20,0,.3));
}
.tile .lale path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile .lale path.f { fill: currentColor; }
.tile.joker .face { box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 2px var(--gold-2), inset 0 -3px 6px rgba(80,104,150,.22), inset 0 0 14px rgba(255,255,255,.45); }
.tile.joker { box-shadow: 0 0 1px 1px rgba(30,10,2,.45), 0 0 12px rgba(246,220,140,.65); }
.tile .badge {
  position: absolute; top: -6px; right: -6px; z-index: 1;
  font-size: 8px; font-weight: 800; padding: 1px 4px; border-radius: 5px;
  background: var(--gold-grad); color: #3a1d00; box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.tile.sm { --w: var(--stw); --h: var(--sth); box-shadow: 0 1px 1px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.28); }
.tile.sm .badge { display: none; }
.tile.back { background: linear-gradient(180deg, #6a0d1e, #2c030b); }
.tile.back .face {
  background: var(--back-motif) center / 72% auto no-repeat, linear-gradient(145deg, #9a2139, #5a0b19);
  box-shadow: inset 0 0 0 2px #e0ad45, inset 0 0 0 4px #5b0b19, inset 0 0 0 5px rgba(224,173,69,.55), inset 0 1px 0 rgba(255,255,255,.25);
}
.tile.back .face::before { display: none; }
.tile.empty { background: rgba(255,235,190,.04); box-shadow: inset 0 0 0 1px rgba(224,173,69,.25); }
.tile.selected, #rack .tile.selected:hover {
  transform: translateY(-11px);
  box-shadow: 0 0 0 2px var(--gold-1), 0 10px 14px rgba(0,0,0,.45), 0 0 16px rgba(246,220,140,.6);
}
.tile.fresh .face { box-shadow: inset 0 1.5px 0 #fff, inset 0 0 0 1px rgba(110,132,170,.4), inset 0 0 12px rgba(240,190,80,.6); }
.tile.dragging { opacity: .25; }
.tile.ghost { position: fixed; z-index: 1000; pointer-events: none; transform: rotate(-4deg) scale(1.12); box-shadow: 0 18px 26px rgba(0,0,0,.5), 0 2px 3px rgba(0,0,0,.4); }
.tile.flying { position: fixed; z-index: 700; pointer-events: none; margin: 0; transition: none; }

/* ============ Efektler ============ */
.banner {
  position: fixed; left: 50%; top: 40%; z-index: 750; pointer-events: none;
  padding: 14px 56px; white-space: nowrap;
  font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: clamp(18px, 3.6vw, 36px); letter-spacing: 1px;
  color: var(--gold-1); text-shadow: 0 2px 0 #4a2a00, 0 0 18px rgba(246,220,140,.6);
  background: linear-gradient(90deg, transparent, rgba(30,2,8,.92) 18%, rgba(30,2,8,.92) 82%, transparent);
  border-top: 1px solid var(--gold-line); border-bottom: 1px solid var(--gold-line);
  animation: banner 2s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(.98); }
}
.confetti { position: fixed; top: -24px; z-index: 760; pointer-events: none; border-radius: 2px; }

/* ============ Durum, bildirim, pencere ============ */
.status {
  text-align: center; font-size: 13px; padding: 7px 16px 10px; color: var(--muted);
  background: linear-gradient(180deg, #1f0207, #140104);
  border-top: 1px solid var(--gold-line);
}
.status b { color: var(--gold-1); }
.status button { margin-left: 8px; padding: 4px 12px; }
.toast {
  position: fixed; top: 58px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(180deg, #fbf3df, #efe2c2); color: #3a1206;
  border: 1px solid #c9a24a;
  padding: 10px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 26px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 900;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.bad { background: linear-gradient(180deg, #ffe7e2, #f5c9c0); color: #6b0a14; border-color: #b3122e; animation: shake .4s; }
@keyframes shake { 20%, 60% { margin-left: -6px; } 40%, 80% { margin-left: 6px; } }

.modal { position: fixed; inset: 0; background: rgba(10,0,3,.62); display: none; align-items: center; justify-content: center; z-index: 800; padding: 16px; backdrop-filter: blur(2px); }
.modal.open { display: flex; }
.modal.open .card { animation: cardIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.card {
  background: radial-gradient(120% 80% at 50% 0%, #fffaf0, #f3e6c8);
  color: #2a0d06; border-radius: 16px; width: min(660px, 100%); max-height: 86vh; overflow: auto; padding: 22px;
  border: 1px solid #c9a24a;
  box-shadow: inset 0 0 0 5px #fbf3df, inset 0 0 0 6px rgba(201,162,74,.7), 0 24px 60px rgba(0,0,0,.6);
}
.card h2 { margin: 0 0 14px; font-size: 21px; font-family: Cinzel, Georgia, serif; color: #6b0f22; }
.card h3 { margin: 16px 0 6px; font-size: 15px; color: #6b0f22; }
.card p, .card li { font-size: 14px; line-height: 1.5; }
.card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.card th, .card td { padding: 7px 8px; border-bottom: 1px solid #e0d0a8; text-align: left; }
.card th { color: #6b0f22; }
.card td.num, .card th.num { text-align: right; font-variant-numeric: tabular-nums; }
.card tr.win td { background: linear-gradient(90deg, #ffefb8, #fff7da); font-weight: 700; }
.card .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }

@media (max-width: 640px) {
  .board { padding: 6px 8px; gap: 6px; }
  .seat-meta small, .indicator small, .pile small, .hand-info { display: none; }
  .deck-area { gap: 8px; }
  .avatar { width: 28px; height: 28px; font-size: 13px; }
  .seat-card { padding: 4px; }
  .meld-row { flex-direction: column; gap: 2px; }
  .meld-row .owner { padding-top: 0; }
  .rack-wrap { transform: perspective(700px) rotateX(20deg); }
  button { padding: 7px 9px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   LOBİ · MASA KARTLARI · KREDİ · MASA SEKMELERİ · MASA AÇMA FORMU
   ===================================================================== */
.lobby { display: none; flex: 1; min-height: 0; overflow: auto;
  background: var(--pattern), var(--velvet), radial-gradient(ellipse 80% 70% at 50% 30%, var(--felt-hi) 0%, var(--felt-mid) 55%, var(--felt-lo) 100%); }
.lobby-inner { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
.lobby-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.lobby h1 { margin: 0; font-family: Cinzel, Georgia, serif; font-size: 30px; letter-spacing: 1px;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lobby .sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.lobby h2 { font-family: Cinzel, Georgia, serif; font-size: 17px; color: var(--gold-1); margin: 28px 0 12px; letter-spacing: .5px; }
.lobby h2 small { font-family: system-ui, sans-serif; color: var(--muted); font-size: 12px; margin-left: 6px; }
.lobby-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* kredi göstergesi: altın sikke */
.coin { position: relative; display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -3px; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff6cf 0 18%, #f2c862 40%, #b07d1e 75%, #7a5410 100%);
  box-shadow: inset 0 0 0 2px rgba(122,84,16,.6), 0 1px 2px rgba(0,0,0,.5); }
/* CR101 jetonu: ortada "C" işareti */
.coin { container-type: size; }
.coin::after { content: 'C'; position: absolute; inset: 0; display: grid; place-items: center;
  font: 900 58cqw/1 system-ui, sans-serif; color: rgba(90,58,8,.85); text-shadow: 0 1px 0 rgba(255,240,190,.6); }
.coin.sm { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.wallet { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: rgba(20,1,5,.5); border: 1px solid var(--gold-line); color: var(--gold-1); font-size: 13px; white-space: nowrap; }
.wallet b { font-variant-numeric: tabular-nums; }
.wallet.big { padding: 8px 16px; font-size: 20px; }
.wallet.big .coin { width: 24px; height: 24px; }
.wallet.big small { color: var(--muted); font-size: 12px; }

/* masa kartları */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(58,8,20,.9), rgba(26,3,9,.92));
  border: 1px solid var(--gold-line); box-shadow: 0 10px 24px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,160,.12); }
.tcard.active { border-color: var(--gold-1); box-shadow: 0 10px 24px rgba(0,0,0,.45), 0 0 18px rgba(246,220,140,.35); }
.tcard.preset { background: linear-gradient(180deg, rgba(40,6,15,.75), rgba(20,2,7,.8)); }
.tcard-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tcard h3 { margin: 0; font-family: Cinzel, Georgia, serif; font-size: 16px; color: var(--ink); }
.tcard .st { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tcard .st.turn { color: var(--gold-1); font-weight: 700; }
.tcard .st.done { color: var(--good); }
.tcard .note { margin: 0; font-size: 13px; color: var(--muted); }
.tcard-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.tcard-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tcard-players { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(224,173,69,.12); border: 1px solid rgba(224,173,69,.3); color: #f0dcae; }
.tcard-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; }
.empty-card { grid-column: 1 / -1; padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--gold-line); border-radius: 14px; font-size: 14px; }

/* üst bar: masa sekmeleri */
.table-tabs { display: flex; gap: 6px; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.ttab { padding: 5px 12px; font-size: 12px; white-space: nowrap; background: rgba(255,230,180,.06); box-shadow: none; display: inline-flex; align-items: center; gap: 6px; }
.ttab.on { background: var(--gold-grad); color: #3a1d00; border-color: #fff0b3; }
.ttab .dot { width: 7px; height: 7px; border-radius: 50%; background: #ff6b6b; box-shadow: 0 0 6px #ff6b6b; animation: blink 1.2s infinite; }
.ttab.on .dot { background: #8a1020; box-shadow: none; }

/* oyun sonu kredi sonucu */
.payout { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: #f3e6c8; border: 1px solid #d9c08a; font-size: 14px; }
.payout.win { background: linear-gradient(90deg, #ffefb8, #fff7da); border-color: #c9a24a; }
.payout .coin { width: 26px; height: 26px; }
.payout small { display: block; color: #6b4a2a; margin-top: 2px; }

/* masa açma formu */
.tform h3 { margin: 18px 0 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #5a3a1a; }
.field.wide { grid-column: 1 / -1; }
.field input, .field select {
  font: inherit; font-size: 14px; color: #2a0d06; padding: 7px 9px; border-radius: 8px;
  border: 1px solid #d9c08a; background: #fffaf0; outline: none; }
.field input:focus, .field select:focus { border-color: #b07d1e; box-shadow: 0 0 0 3px rgba(224,173,69,.25); }
.field input:disabled { background: #efe5cf; color: #9a8466; }
.toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 4px 0; }
.toggle input { width: 16px; height: 16px; accent-color: #8a1428; }
.seg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid #d9c08a; font-size: 13px; background: #fffaf0; }
.seg input:checked + span { background: #6b0f22; border-color: #6b0f22; color: #fbf3df; }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(224,173,69,.4); }
button.link { background: none; border: none; box-shadow: none; color: #8a1428; text-decoration: underline; padding: 4px 6px; margin-left: auto; }
.hint { font-size: 12px; color: #7a5a3a; margin: 8px 0 0; }
.card .actions button:not(.primary):not(.link) { background: linear-gradient(180deg, #4a0c1a, #26040c); color: #f3dfae; }

@media (max-width: 640px) {
  .grid2, .grid3, .toggles { grid-template-columns: 1fr 1fr; }
  .table-tabs { display: none; }
  .lobby h1 { font-size: 24px; }
}

/* =====================================================================
   EKRANLAR (app.js): giriş · lobi · oda · oyun · moderasyon
   ===================================================================== */
.screen { display: none; flex: 1; min-height: 0; overflow: auto;
  background: var(--pattern), var(--velvet), radial-gradient(ellipse 80% 70% at 50% 30%, var(--felt-hi) 0%, var(--felt-mid) 55%, var(--felt-lo) 100%); }
body.scr-auth .auth, body.scr-lobby .lobby, body.scr-room .room, body.scr-mod .modpanel { display: block; }
body.scr-home .home { display: flex; }
body.scr-home .topbar { display: none; }
body:not(.scr-game) .board, body:not(.scr-game) .game-only { display: none !important; }
body:not(.scr-game):not(.scr-room) .room-game-only { display: none !important; }
body.scr-auth .top-actions, body.scr-auth .table-tabs, body.scr-boot .top-actions { display: none; }

button.wallet { border-radius: 999px; padding: 5px 12px; font-weight: 600; }
.user-menu { display: inline-flex; gap: 6px; }
.badge-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px;
  font-style: normal; font-size: 11px; font-weight: 800; background: #ff4d5e; color: #fff; }
.turn-timer { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.turn-timer.low { color: #ff8a8a; font-weight: 800; animation: blink .8s infinite; }
.dot.live { background: var(--good); box-shadow: 0 0 6px var(--good); }
.vip { display: inline-block; font-family: system-ui, sans-serif; font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 1px 6px;
  margin-right: 6px; border-radius: 4px; background: var(--gold-grad); color: #3a1d00; vertical-align: 3px; }
.lock { display: inline-block; width: 11px; height: 13px; margin-right: 6px; vertical-align: -1px; border-radius: 2px;
  background: var(--gold-2); position: relative; top: 1px; }
.lock::before { content: ''; position: absolute; left: 2px; top: -6px; width: 5px; height: 7px; border: 2px solid var(--gold-2); border-bottom: 0; border-radius: 5px 5px 0 0; }

/* giriş */
.auth-card { max-width: 380px; margin: 8vh auto; padding: 28px; border-radius: 16px;
  background: radial-gradient(120% 80% at 50% 0%, #fffaf0, #f3e6c8); color: #2a0d06;
  border: 1px solid #c9a24a; box-shadow: inset 0 0 0 5px #fbf3df, inset 0 0 0 6px rgba(201,162,74,.7), 0 24px 60px rgba(0,0,0,.6); }
.auth-brand { font-family: Cinzel, Georgia, serif; font-size: 30px; font-weight: 700; color: #6b0f22; text-align: center; }
.auth-card .sub { text-align: center; color: #6b4a2a; margin: 4px 0 16px; }
.auth-tabs { justify-content: center; margin-bottom: 14px; }
.auth-card .tform { display: flex; flex-direction: column; gap: 12px; }
button.wide { width: 100%; padding: 11px; font-size: 15px; }

/* lobi ekleri */
.presets { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.preset-pill { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 14px; border-radius: 12px; }
.preset-pill small { color: var(--muted); font-weight: 500; font-size: 11px; }
.seats { display: flex; flex-wrap: wrap; gap: 5px; }
.seat-chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: rgba(255,235,190,.1); border: 1px solid rgba(224,173,69,.3); }
.seat-chip.mine { background: var(--gold-grad); color: #3a1d00; border-color: #fff0b3; font-weight: 700; }
.seat-chip.bot { opacity: .7; }
.seat-chip.empty { border-style: dashed; color: var(--muted); }
.seat-chip.away { text-decoration: line-through; opacity: .6; }

/* bekleme odası */
.room-inner { max-width: 820px; margin: 0 auto; padding: 28px 16px 120px; display: flex; flex-direction: column; gap: 16px; }
.room h1 { margin: 0; font-family: Cinzel, Georgia, serif; font-size: 26px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.room .sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }
.room-seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.room-seat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(58,8,20,.9), rgba(26,3,9,.92)); border: 1px solid var(--gold-line); }
.room-seat.mine { border-color: var(--gold-1); box-shadow: 0 0 16px rgba(246,220,140,.3); }
.room-seat.empty { border-style: dashed; opacity: .75; }
.room-seat small { display: block; color: var(--muted); font-size: 12px; }
.room-seat .mini { margin-left: auto; }
.room-actions, .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.room .payout { color: #2a0d06; }
button.mini { padding: 4px 9px; font-size: 12px; }
.hint.warn { color: #8a1428; font-weight: 600; }
.room .hint { color: var(--muted); }

.spect-badge { padding: 3px 10px; border-radius: 999px; background: rgba(46,139,87,.25); border: 1px solid #2e8b57; color: #9fe3bd; font-weight: 700; font-size: 12px; }
.quote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid #c9a24a; background: #f6ecd2; border-radius: 6px; font-size: 14px; }
.quote small { display: block; color: #8a1428; margin-top: 4px; }

/* profil */
.profile-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.profile-head .pname { font-size: 20px; font-family: Cinzel, Georgia, serif; color: #6b0f22; }
.profile-head small { display: block; color: #6b4a2a; }
.avatar.big { width: 52px; height: 52px; font-size: 22px; }
.wallet.light { margin-left: auto; background: #2a0d06; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.stats > div { text-align: center; padding: 10px; border-radius: 10px; background: #f3e6c8; border: 1px solid #e0d0a8; }
.stats b { display: block; font-size: 18px; color: #6b0f22; }
.stats small { color: #6b4a2a; font-size: 12px; }
.packages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.pkg { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px; border-radius: 12px;
  background: linear-gradient(180deg, #fff7da, #f3e0a8); color: #3a1d00; border: 1px solid #c9a24a; box-shadow: 0 3px 0 #b08a3a; }
.pkg b { font-size: 17px; }
.pkg small { color: #6b4a2a; }
.pkg em { font-style: normal; font-size: 12px; color: #8a1428; font-weight: 700; }
.pkg .coin { width: 22px; height: 22px; }

/* moderasyon */
.mod-tabs { margin: 16px 0; }
.mod-tabs span { background: rgba(255,230,180,.08); border-color: var(--gold-line); color: var(--ink); }
.mod-tabs input:checked + span { background: var(--gold-grad); color: #3a1d00; border-color: #fff0b3; }
.report { padding: 14px; margin-bottom: 10px; border-radius: 12px; background: linear-gradient(180deg, rgba(58,8,20,.9), rgba(26,3,9,.92)); border: 1px solid var(--gold-line); }
.report.resolved { opacity: .6; }
.report .r-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.report .r-when { margin-left: auto; color: var(--muted); font-size: 12px; }
.report .quote { background: rgba(255,235,190,.08); color: var(--ink); border-left-color: var(--gold-2); }
.report details { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.report .ctx { padding: 2px 0; }
.report .hint { color: var(--muted); }
table.users { width: 100%; border-collapse: collapse; font-size: 13px; background: rgba(20,1,5,.4); border-radius: 12px; overflow: hidden; }
table.users th, table.users td { padding: 8px 10px; border-bottom: 1px solid rgba(224,173,69,.2); text-align: left; vertical-align: middle; }
table.users th { color: var(--gold-1); font-weight: 700; }
table.users small { display: block; color: var(--muted); }
table.users select, .mini-input { font: inherit; font-size: 12px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--gold-line); background: #2a050d; color: var(--ink); }
.mini-input { width: 80px; margin-right: 4px; }
.modpanel .hint { color: var(--muted); }

@media (max-width: 640px) {
  .room-seats { grid-template-columns: 1fr; }
  .stats, .packages { grid-template-columns: repeat(2, 1fr); }
  .chat-list { height: 160px; }
  .turn-timer { display: none; }
}
.report .quote small { color: #ffb3a8; }

/* =====================================================================
   LOBİ: YUVARLAK MASA + SANDALYELER
   ===================================================================== */
.tcard.round { align-items: stretch; }
.rt-wrap { --ch: 46px; position: relative; width: 250px; height: 250px; margin: 6px auto 4px; }
.rt-table {
  position: absolute; inset: 58px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  background:
    var(--pattern),
    radial-gradient(circle at 45% 35%, #a3233d 0%, var(--felt-mid) 55%, #2c040b 100%);
  box-shadow:
    0 0 0 6px #6b3d23,                     /* ahşap kenar */
    0 0 0 7px #3a1c0c,
    0 0 0 8.5px #e0ad45,                   /* ince altın */
    0 14px 22px rgba(0,0,0,.55),
    inset 0 0 22px rgba(0,0,0,.6);
}
.rt-wrap.is-vip .rt-table { box-shadow: 0 0 0 6px #6b3d23, 0 0 0 7px #3a1c0c, 0 0 0 8.5px #fff0b3, 0 0 0 10px #b07d1e, 0 14px 22px rgba(0,0,0,.55), 0 0 22px rgba(246,220,140,.35), inset 0 0 22px rgba(0,0,0,.6); }
.rt-stake { font-weight: 800; color: var(--gold-1); font-size: 15px; font-variant-numeric: tabular-nums; }
.rt-status { font-size: 11px; color: var(--ink); opacity: .85; }
.rt-count { font-size: 11px; color: var(--muted); }
.rt-closed { font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 1px 7px; margin-top: 2px; border-radius: 999px; background: rgba(0,0,0,.35); color: #ddd; }
.rt-table .lock { margin: 0 0 2px; }

/* sandalye: yuvarlak oturak + kavisli sırtlık, masaya dönük */
.chair { position: absolute; width: var(--ch); height: var(--ch); padding: 0; border: 0; background: none; box-shadow: none;
  display: block; cursor: default; }
.chair .back { position: absolute; left: 8%; right: 8%; top: -7px; height: 13px; border-radius: 12px 12px 5px 5px;
  background: linear-gradient(180deg, #8a5233, #4f2b18); box-shadow: inset 0 1px 0 rgba(255,220,170,.35), 0 2px 3px rgba(0,0,0,.4); }
.chair .seat { position: absolute; inset: 4px 0 0; border-radius: 12px;
  background: radial-gradient(circle at 40% 30%, #b02a45, #5c0c1c 75%);
  box-shadow: inset 0 0 0 2px #e0ad45, inset 0 2px 4px rgba(255,255,255,.2), 0 4px 8px rgba(0,0,0,.5);
  display: grid; place-items: center; }
.chair .av { font-style: normal; font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: 17px; color: #ffe7a6;
  text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.chair.b { left: 50%; bottom: 0; transform: translateX(-50%) rotate(180deg); }
.chair.t { left: 50%; top: 0; transform: translateX(-50%); }
.chair.l { left: 0; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.chair.r { right: 0; top: 50%; transform: translateY(-50%) rotate(90deg); }
/* harf her zaman dik okunsun */
.chair.b .av { transform: rotate(180deg); }
.chair.l .av { transform: rotate(90deg); }
.chair.r .av { transform: rotate(-90deg); }

.chair.bot .seat { background: radial-gradient(circle at 40% 30%, #6b4a52, #352027 75%); box-shadow: inset 0 0 0 2px #9c8a6a, 0 4px 8px rgba(0,0,0,.5); }
.chair.bot .av { color: #d8ccb4; }
.chair.mine .seat { background: radial-gradient(circle at 40% 30%, #fff0b3, #c8902e 75%); box-shadow: inset 0 0 0 2px #fff6d8, 0 0 14px rgba(246,220,140,.7), 0 4px 8px rgba(0,0,0,.5); }
.chair.mine .av { color: #3a1d00; text-shadow: none; }
.chair.away { opacity: .45; }
.chair.empty .back { background: transparent; box-shadow: none; border: 2px dashed rgba(224,173,69,.55); border-bottom: 0; }
.chair.empty .seat { background: rgba(255,235,190,.05); box-shadow: none; border: 2px dashed rgba(224,173,69,.55); }
.chair.empty .av { color: rgba(240,210,150,.7); font-family: system-ui, sans-serif; font-size: 20px; }
button.chair.empty:not(:disabled) { cursor: pointer; }
button.chair.empty:not(:disabled):hover .seat { background: rgba(224,173,69,.2); border-style: solid; }
button.chair.empty:not(:disabled):hover .av { color: var(--gold-1); }
button.chair.empty:disabled { opacity: .7; }

/* sandalye altındaki isim */
.chair-name { position: absolute; font-size: 11px; color: var(--ink); white-space: nowrap; max-width: 92px; overflow: hidden; text-overflow: ellipsis; text-align: center; pointer-events: none; }
.chair-name.muted { color: var(--muted); font-style: italic; }
.chair-name.me-name { color: var(--gold-1); font-weight: 700; }
.chair-name.b { left: 50%; bottom: -26px; transform: translateX(-50%); }
.chair-name.t { left: 50%; top: -28px; transform: translateX(-50%); }
.chair-name.l { left: 0; top: calc(50% + 28px); width: 60px; transform: translateX(-6px); }
.chair-name.r { right: 0; top: calc(50% + 28px); width: 60px; transform: translateX(6px); }
.rt-wrap { margin-top: 20px; margin-bottom: 20px; }

/* İzlemeye kapalı masa: gri */
.rt-wrap.closed { filter: grayscale(1) brightness(.9); }
.tcard.closed { border-color: rgba(190,190,190,.35); background: linear-gradient(180deg, rgba(55,50,52,.9), rgba(28,26,27,.92)); }
.tcard.closed .chip { filter: grayscale(1); }
.tgrid:has(.tcard.round) { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
/* masadaki/atılan okey: herkes görsün */
.tile.table-okey .face { box-shadow: inset 0 0 0 2px var(--gold-2), inset 0 0 10px rgba(246,220,140,.6); }
.tile .okey-dot { position: absolute; top: -5px; right: -5px; z-index: 1; width: 14px; height: 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 9px; line-height: 1; background: var(--gold-grad); color: #3a1d00; box-shadow: 0 1px 3px rgba(0,0,0,.5); }

/* =====================================================================
   SOHBET (modern)
   Masaüstü: sağa yaslanan panel; açıkken oyun alanı ona yer açar (üstüne binmez).
   Mobil:    alttan açılan sayfa; sağ üstte düğme + yeni mesaj önizlemesi.
   ===================================================================== */
:root.chat-docked { --chatw: 330px; }
.chat-fab, .chat-peek, .chat { display: none; }
body.has-chat .chat-fab { display: grid; }
body.has-chat.chat-open .chat { display: flex; }
body.has-chat.chat-open .chat-fab, body.has-chat.chat-open .chat-peek { display: none; }

.chat-fab {
  position: fixed; z-index: 640; right: 14px; top: 62px; width: 46px; height: 46px; padding: 0;
  place-items: center; border-radius: 50%;
  background: linear-gradient(180deg, #fff0b3, #d9a33f 60%, #a8761c); border: 1px solid #fff0b3;
  box-shadow: 0 6px 16px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.6);
}
.chat-fab svg { width: 22px; height: 22px; fill: #3a1d00; }
.chat-fab .badge-n { position: absolute; top: -4px; right: -4px; margin: 0; box-shadow: 0 0 0 2px #1a0206; }
.chat-peek {
  position: fixed; z-index: 639; right: 68px; top: 66px; max-width: min(280px, calc(100vw - 90px));
  padding: 8px 12px; border-radius: 14px 14px 4px 14px; font-size: 13px; line-height: 1.35; cursor: pointer;
  background: rgba(30,4,11,.95); border: 1px solid var(--gold-line); color: var(--ink); box-shadow: 0 8px 20px rgba(0,0,0,.5);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: 0; transform: translateX(10px); transition: opacity .2s, transform .2s; pointer-events: none;
}
body.has-chat .chat-peek { display: block; }
.chat-peek.show { opacity: 1; transform: none; pointer-events: auto; }
.chat-peek b { color: var(--gold-1); margin-right: 4px; }

.chat {
  position: fixed; z-index: 650; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, rgba(34,4,12,.97), rgba(20,2,7,.98));
  border-left: 1px solid var(--gold-line); box-shadow: -10px 0 30px rgba(0,0,0,.45);
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 16px; border-bottom: 1px solid rgba(224,173,69,.25); }
.chat-grip { display: none; }
.chat-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-title b { font-family: Cinzel, Georgia, serif; color: var(--gold-1); font-size: 15px; letter-spacing: .5px; }
.chat-title small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-x { width: 32px; height: 32px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255,230,180,.08); box-shadow: none; }
.chat-x svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; fill: none; }

.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; }
.cm { display: flex; align-items: flex-end; gap: 7px; max-width: 100%; position: relative; }
.cm.cont { margin-top: -3px; }
.cm .cav { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-family: Cinzel, Georgia, serif; font-size: 12px; font-weight: 700; color: #ffe7a6;
  background: radial-gradient(circle at 35% 30%, #a3233d, #4a0816); box-shadow: 0 0 0 1.5px #e0ad45; }
.cm.cont .cav { visibility: hidden; height: 0; }
.cm .cb { max-width: 78%; padding: 7px 11px 8px; border-radius: 16px 16px 16px 5px; background: rgba(255,235,190,.08); border: 1px solid rgba(224,173,69,.18); }
.cm .cmeta { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.cm .cmeta b { font-size: 12px; color: var(--gold-2); }
.cm .cmeta time { font-size: 10px; color: var(--muted); }
.cm .ctext { font-size: 13.5px; line-height: 1.38; word-wrap: break-word; overflow-wrap: anywhere; }
.cm.me { justify-content: flex-end; }
.cm.me .cb { background: linear-gradient(180deg, #f6dc8c, #d9a33f); border-color: #fff0b3; color: #2e1600; border-radius: 16px 16px 5px 16px; }
.cm.me .cmeta b { color: #5a3400; }
.cm.me .cmeta time { color: #7a5420; }
.cm.flag .cb { border-color: rgba(255,120,120,.55); background: rgba(160,20,40,.25); }
.cm.flag .ctext { color: #ffb3b3; }
.cm.sys { justify-content: center; margin: 4px 0; }
.cm.sys span { font-size: 11px; color: var(--muted); padding: 3px 10px; border-radius: 999px; background: rgba(255,235,190,.06); text-align: center; }
.cm.empty { justify-content: center; color: var(--muted); font-size: 13px; padding: 20px 0; }
.cm .crep { align-self: center; width: 24px; height: 24px; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1;
  background: transparent; border: 0; box-shadow: none; color: var(--muted); opacity: 0; transition: opacity .15s; }
.cm:hover .crep, .cm .crep:focus-visible { opacity: 1; }
@media (hover: none) { .cm .crep { opacity: .6; } }

.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px 2px; scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.qr { flex: none; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: rgba(255,235,190,.07); border: 1px solid rgba(224,173,69,.3); box-shadow: none; color: var(--ink); }
.qr:hover { background: rgba(224,173,69,.18); }
.chat-form { display: flex; align-items: center; gap: 8px; padding: 8px 12px 12px; }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--gold-line); background: rgba(255,255,255,.06); color: var(--ink); outline: none; }
.chat-form input:focus { border-color: var(--gold-1); box-shadow: 0 0 0 3px rgba(224,173,69,.18); }
.chat-form .send { width: 40px; height: 40px; flex: none; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, #fff0b3, #d9a33f 60%, #a8761c); border-color: #fff0b3; }
.chat-form .send svg { width: 18px; height: 18px; fill: #3a1d00; }

/* Masaüstü: sağ panel; oyun alanı panel kadar daralır */
@media (min-width: 1100px) {
  .chat { top: 49px; right: 0; bottom: 0; width: var(--chatw, 330px); width: 330px; }
  body.has-chat.chat-open .board, body.has-chat.chat-open .room, body.has-chat.chat-open .status { margin-right: 330px; }
  body.has-chat.chat-open .topbar { padding-right: 16px; }
}
/* Mobil/tablet: alttan açılan sayfa */
@media (max-width: 1099px) {
  .chat { left: 0; right: 0; bottom: 0; height: min(60vh, 460px); border-left: 0; border-top: 1px solid var(--gold-line);
    border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px rgba(0,0,0,.55); animation: sheetUp .22s ease-out; }
  .chat-grip { display: block; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255,235,190,.25); }
  .chat-head { position: relative; padding-top: 16px; }
  .chat-fab { width: 42px; height: 42px; top: 56px; right: 8px; }
  .chat-peek { top: 60px; right: 58px; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }

/* =====================================================================
   MOBİL OYUN EKRANI: ıstaka kenardan kenara; profil bilgisi ıstakanın üzerinde,
   rozete dokununca (ya da üzerine gelince) görünür — sayfayı daraltmaz.
   ===================================================================== */
@media (max-width: 900px) {
  :root { --tw: clamp(14px, min(calc((100vw - 4px) / 18.9), calc((100vh - 470px) / 4.7)), 56px); }
  .board { grid-template-columns: auto minmax(0, 1fr) auto; padding: 4px 0 0; gap: 4px; }
  .center { padding: 0 4px; }
  .me { position: relative; gap: 2px; width: 100%; }
  .rack-area { margin-left: 0; margin-right: 0; }
  .me-head {
    position: absolute; z-index: 20; left: 50%; top: 2px; transform: translate(-50%, -4px);
    max-width: calc(100vw - 16px); padding: 6px 12px; border-radius: 12px;
    background: rgba(22,2,7,.94); border: 1px solid var(--gold-line); box-shadow: 0 8px 20px rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  }
  .me.show-head .me-head { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
}
.badge-n[hidden] { display: none !important; }
@media (max-width: 640px) {
  .topbar { gap: 6px; padding: 6px 8px; }
  .brand { font-size: 16px; letter-spacing: .5px; }
  .top-actions { min-width: 0; overflow-x: auto; scrollbar-width: none; flex-shrink: 1; gap: 4px; }
  .top-actions::-webkit-scrollbar { display: none; }
  .top-actions button, .top-actions .wallet { flex: none; padding: 5px 9px; font-size: 12px; }
  .user-menu { flex: none; }
}

/* Sohbet bildirimleri: sohbet kapalıyken sol üstte birkaç saniye görünür */
body.has-chat .chat-peek {
  display: flex; flex-direction: column; gap: 6px; position: fixed; z-index: 639;
  left: 10px; right: auto; top: 58px; max-width: min(300px, calc(100vw - 70px));
  padding: 0; background: none; border: 0; box-shadow: none; opacity: 1; transform: none; pointer-events: none;
}
body.has-chat.chat-open .chat-peek { display: none; }
.peek {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px 12px 7px 7px; cursor: pointer; pointer-events: auto;
  border-radius: 16px 16px 16px 5px; background: rgba(30,4,11,.94); border: 1px solid var(--gold-line);
  box-shadow: 0 8px 20px rgba(0,0,0,.5); backdrop-filter: blur(4px);
  opacity: 0; transform: translateX(-14px); transition: opacity .25s, transform .25s;
}
.peek.show { opacity: 1; transform: none; }
.peek .pav { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-family: Cinzel, Georgia, serif; font-size: 12px; font-weight: 700; color: #ffe7a6;
  background: radial-gradient(circle at 35% 30%, #a3233d, #4a0816); box-shadow: 0 0 0 1.5px #e0ad45; }
.peek .ptx { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; }
.peek .ptx b { color: var(--gold-1); font-size: 11px; }
.peek .ptx span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
@media (max-width: 1099px) { body.has-chat .chat-peek { top: 54px; left: 8px; } }


/* =====================================================================
   PROFİL YUVARLAKLARI
   Masaüstü: her ıstakanın sağ üst köşesinde. Mobil: rakipler ekranın en üstünde
   (karşıdaki ortada, yandakiler sol/sağ kenarda), rakip ıstakaları gizli.
   Sırası olan oyuncunun çerçevesi yeşil halka; hamle süresi boyunca azalır (--p: 1 → 0).
   ===================================================================== */
.avatar .tring, .me-badge .tring {
  position: absolute; inset: -6px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(#3ee083 calc(var(--p, 1) * 360deg), rgba(10, 0, 3, .55) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  filter: drop-shadow(0 0 6px rgba(62, 224, 131, .75));
}
.avatar.turn, .me-badge.turn { box-shadow: 0 0 0 2px #1f9a55, 0 0 16px rgba(62, 224, 131, .45), 0 4px 8px rgba(0,0,0,.5) !important; }
.avatar.turn.low .tring, .me-badge.turn.low .tring { animation: ringLow .6s ease-in-out infinite; }
@keyframes ringLow { 50% { filter: drop-shadow(0 0 10px rgba(62, 224, 131, 1)); opacity: .7; } }

.me-badge {
  display: grid; place-items: center; position: absolute; z-index: 15; padding: 0; border: 0; border-radius: 50%;
  font-family: Cinzel, Georgia, serif; font-weight: 700; color: #ffe7a6; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #a3233d, #4a0816);
  box-shadow: 0 0 0 2px #e0ad45, 0 4px 8px rgba(0,0,0,.5);
}

/* rakip kartı: sadece yuvarlak + altında isim etiketi */
.seat .seat-card, .seat .seat-card.active {
  padding: 0; gap: 3px; border: 0; border-radius: 0; background: none; box-shadow: none; animation: none; transform: none;
  flex-direction: column; align-items: center; text-align: center;
}
.seat .seat-card.active::after { display: none; }
.seat .seat-card.idle { opacity: 1; }
.seat .seat-meta { align-items: center; }
.seat .seat-meta b { display: block; max-width: 96px; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: rgba(22,2,7,.88); border: 1px solid rgba(224,173,69,.35); }
.seat .seat-card.active .seat-meta b { border-color: #3ee083; color: #b9f7d2; }
.seat .seat-meta small { font-size: 10px; text-shadow: 0 1px 2px #000; }
.seat .badge-open { align-self: center; margin-top: 1px; }

@media (min-width: 901px) {
  .board { padding-top: 26px; }
  .board > .seat { position: relative; justify-self: center; width: max-content; }
  /* rakip profil yuvarlağı ıstakanın sol üst köşesinde; geri sayım halkası onun çevresinde */
  .seat .seat-info { position: absolute; z-index: 5; top: 0; left: 0; transform: translate(-50%, -24px); }
  /* her rakibin yuvarlağı ıstakasının iç köşesine sabit (bize göre saat yönünde döner):
     sağdaki: üst-iç (sol üst), karşıdaki: alt-sol, soldaki: alt-iç (sağ alt) */
  /* rakip yuvarlakları: her biri kendi ıstakasının sağ üst köşesinde */
  .seat-top .seat-info, .seat-left .seat-info, .seat-right .seat-info { top: 18px; left: calc(100% - 20px); }
  .seat .avatar { width: 42px; height: 42px; font-size: 18px; }
  .me-badge { right: calc(var(--tw) * .6); top: calc(var(--tw) * 1.3); transform: translate(50%, -50%);
    width: 46px; height: 46px; font-size: 19px; }
}

@media (max-width: 900px) {
  .board {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "left top right" "center center center" "me me me";
  }
  .opp-rack { display: none; }
  .board > .seat { flex-direction: row; align-self: start; padding: 4px 0 2px; }
  .seat-top { justify-self: center; }
  .seat-left { justify-self: start; margin-left: 8px; }
  .seat-right { justify-self: end; margin-right: 8px; }
  .seat .seat-info { position: static; transform: none; }
  .seat .seat-card, .seat .seat-card.active { flex-direction: row; gap: 6px; text-align: left; }
  .seat-right .seat-card, .seat-right .seat-card.active { flex-direction: row-reverse; text-align: right; }
  .seat .seat-meta { align-items: flex-start; }
  .seat-right .seat-meta { align-items: flex-end; }
  .seat .seat-meta b { max-width: 84px; font-size: 10px; }
  .seat .seat-meta small { display: block; font-size: 9px; color: var(--muted); padding: 0 4px; }
  .seat .badge-open { display: none; }
  .seat .avatar { width: 32px; height: 32px; font-size: 14px; box-shadow: 0 0 0 2px #e0ad45, 0 4px 8px rgba(0,0,0,.5); }
  .me-badge { left: 4px; top: 2px; width: 30px; height: 30px; font-size: 13px; }
  /* sağ üstteki rakiple çakışmasın: sohbet düğmesi ve bildirimler avatar satırının altında */
  /* üst satırın köşeleri boş: sohbet düğmesi sağ üstte */
  .chat-fab { top: 52px; right: 8px; width: 40px; height: 40px; }
  body.has-chat .chat-peek { top: 52px; }
}
@media (max-width: 600px) {
  /* dar ekranda rakip etiketi sadece isim */
  .seat .seat-meta small { display: none; }
  .seat .seat-meta b { max-width: 62px; }
}

/* Mobil: masadaki perler boş alanı verimli kullansın, per toplamları yazılmasın */
@media (max-width: 900px) {
  .table-melds { padding: 5px; gap: 4px; border-radius: 10px; }
  .meld-row, .meld-row { flex-direction: row; gap: 4px; align-items: flex-start; }
  .meld-row .owner { width: 34px; font-size: 9px; padding-top: 4px; }
  .meld-row .melds { gap: 3px 4px; }
  .meld { gap: 1px; padding: 2px 2px 3px; border-radius: 6px; }
  .meld em { display: none; }
  :root { --stw: clamp(13px, calc(var(--tw) * .64), 22px); }
}

/* =====================================================================
   ALT ÇUBUK: oyun düğmeleri (Seri Diz, Çift Diz, Aç, ...); mobilde profil rozeti de burada
   ===================================================================== */
.status { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
.status-msg:empty { display: none; }
.status .controls { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: center; min-width: 0; }
.status .controls button { margin: 0; padding: 8px 16px; font-size: 13px; white-space: nowrap; }
.status .controls:empty { display: none; }
.status .me-badge { position: relative; inset: auto; transform: none; flex: none; width: 36px; height: 36px; font-size: 15px; }

/* =====================================================================
   ORTADAKİ DESTE: yuvarlak çerçeve, yatayda tam ortada; gösterge taşı çemberin sağ kenarında
   ===================================================================== */
.deck-area { position: relative; justify-self: center; gap: 0; }
.deck {
  width: max(62px, calc(var(--tw) * 2.4)); height: max(62px, calc(var(--tw) * 2.4)); padding: 4px 0 0; gap: 3px;
  justify-content: center; border-radius: 50%; border: 2px solid rgba(224,173,69,.6);
  background: radial-gradient(circle at 50% 38%, rgba(255,235,190,.1), rgba(20,1,5,.5) 72%);
  box-shadow: inset 0 4px 14px rgba(0,0,0,.65), 0 0 0 4px rgba(224,173,69,.1), 0 6px 14px rgba(0,0,0,.35);
}
.deck small { font-size: 10px; font-weight: 700; color: var(--gold-2); letter-spacing: .3px; }
.indicator { position: absolute; z-index: 2; left: 100%; top: 50%; padding: 0; border: 0;
  transform: translate(-50%, -50%) rotate(9deg); }
.indicator .tile { box-shadow: 0 5px 10px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.5); }

/* masaüstü: rozet ıstaka köşesinde, alt çubukta sadece düğmeler */
@media (max-width: 900px) {
  /* profil bilgisi: rozete dokununca alt çubuğun üstünde kısa süre görünür, oyunu engellemez */
  .me-head { position: fixed; left: 8px; right: 8px; top: auto; bottom: 62px; width: max-content; margin: 0 auto;
    transform: translateY(6px); pointer-events: none !important; }
  .me.show-head .me-head { transform: none; }

  .status { flex-wrap: nowrap; gap: 6px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .status .controls { flex: 1; gap: 4px; }
  .status .controls button { flex: 1 1 0; min-width: 0; padding: 8px 2px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
  .status.has-msg { flex-wrap: wrap; }
  .status.has-msg .status-msg { flex-basis: 100%; text-align: center; font-size: 12px; }
  .status .me-badge { width: 34px; height: 34px; font-size: 14px; }

  /* masa düzeni: karşıdaki üstte; atılan taşlar + deste; yan rakipler; açık perler; atılan taşlar; ıstaka */
  .center { display: contents; }
  .board {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "top top top" "p2 deck p1" "sides sides sides" "melds melds melds" "p3 log p0" "me me me";
    row-gap: 4px; column-gap: 6px;
  }
  /* açık perler çerçevesine değmesin: altta 10px boşluk */
  .board > .seat-left, .board > .seat-right { grid-area: sides; align-self: center; padding: 0 0 10px; }
  .seat-top { padding-top: 2px; }
  .seat-top .seat-card, .seat-top .seat-card.active { flex-direction: column; gap: 2px; text-align: center; }
  .seat-top .seat-meta { align-items: center; }
  .pile-slot.p2, .pile-slot.p3 { margin-left: 6px; }
  .pile-slot.p1, .pile-slot.p0 { margin-right: 6px; }
  .table-melds { margin: 0 4px; }
  .log { align-self: center; }
}

/* =====================================================================
   OYUN / EL SONU TABLOSU — mobilde her oyuncu bir kart satırı
   ===================================================================== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.table-scroll table.scores th, .table-scroll table.scores td { white-space: nowrap; }
@media (max-width: 600px) {
  .modal { padding: 10px; align-items: flex-end; }
  .card { padding: 16px 14px calc(14px + env(safe-area-inset-bottom)); max-height: 92vh; border-radius: 16px; }
  .card h2 { font-size: 17px; line-height: 1.3; margin-bottom: 10px; }
  .card .actions { flex-direction: column-reverse; gap: 6px; margin-top: 14px; }
  .card .actions button { width: 100%; padding: 11px; font-size: 14px; }

  table.result thead { display: none; }
  table.result, table.result tbody { display: block; }
  table.result tr {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; margin-bottom: 7px; padding: 9px 12px; border-radius: 12px;
    background: rgba(255,255,255,.55); border: 1px solid #e0d0a8;
  }
  table.result tr.win { background: linear-gradient(90deg, #ffefb8, #fff7da); border-color: #c9a24a; box-shadow: 0 2px 8px rgba(201,162,74,.35); }
  table.result tr.win td { background: none; }
  table.result td { display: block; padding: 0; border: 0; text-align: left; }
  table.result .r-name { order: 1; flex: 1 1 0; min-width: 0; font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table.result .r-total { order: 2; font-size: 21px; font-weight: 800; color: #6b0f22; line-height: 1; }
  table.result .r-total::before { content: 'Toplam '; font-size: 10px; font-weight: 700; color: #8a6a3a; }
  table.result .r-status { order: 3; flex-basis: 100%; font-size: 12px; color: #6b4a2a; }
  table.result .r-stat { order: 4; font-size: 11.5px; color: #4a2a14; }
  table.result .r-stat:empty { display: none; }
  table.result .r-stat::before { content: attr(data-label) ': '; color: #8a6a3a; }
  .payout { flex-wrap: wrap; gap: 8px; padding: 10px 12px; font-size: 13px; }
}

/* =====================================================================
   LOBİ ŞABLONU (2026): cam yüzeyler, bento kutular, ikonlu özellik listesi
   ===================================================================== */
:root {
  --glass: linear-gradient(160deg, rgba(255,232,196,.085), rgba(255,232,196,.025) 60%);
  --glass-line: rgba(255,222,170,.16);
  --glass-hi: inset 0 1px 0 rgba(255,236,200,.12);
  --soft: 0 1px 2px rgba(0,0,0,.25), 0 12px 32px -8px rgba(0,0,0,.55);
}
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* üst bölüm */
.lobby-inner { max-width: 1180px; padding: 22px 16px 48px; }
.lobby-hero {
  display: flex; align-items: stretch; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: 24px; background: var(--glass), rgba(26,3,9,.55);
  border: 1px solid var(--glass-line); box-shadow: var(--soft), var(--glass-hi); backdrop-filter: blur(10px);
}
.hero-tx { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; letter-spacing: .4px;
  color: #e9d6ac; padding: 4px 10px; border-radius: 999px; background: rgba(255,232,196,.07); border: 1px solid var(--glass-line); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #3ee083; box-shadow: 0 0 0 3px rgba(62,224,131,.18); }
.lobby-hero h1 { font-size: 34px; margin-top: 10px; }
.lobby-hero .sub { max-width: 46ch; }
.wallet-card {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-width: 190px;
  padding: 14px 18px; border-radius: 18px; text-align: left; cursor: pointer;
  background: linear-gradient(150deg, rgba(246,220,140,.16), rgba(246,220,140,.04)); border: 1px solid rgba(246,220,140,.32);
  box-shadow: var(--glass-hi); color: var(--ink);
}
.wallet-card small { font-size: 11px; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; }
.wallet-card b { display: flex; align-items: center; gap: 8px; font-size: 26px; color: var(--gold-1); font-variant-numeric: tabular-nums; }
.wallet-card b .coin { width: 24px; height: 24px; }
.wallet-card .wc-link { font-size: 12px; color: #e9d6ac; opacity: .8; }
.wallet-card:hover { border-color: var(--gold-1); }

/* hızlı başlat: bento kutular */
.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.bento-tile {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; text-align: left; cursor: pointer;
  background: var(--glass), rgba(26,3,9,.45); border: 1px solid var(--glass-line); box-shadow: var(--glass-hi);
  color: var(--ink); transition: transform .18s, border-color .18s, background .18s;
}
.bento-tile:hover { transform: translateY(-2px); border-color: rgba(246,220,140,.45); }
.bt-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: rgba(246,220,140,.1); color: var(--gold-1); border: 1px solid rgba(246,220,140,.2); }
.bt-ic .ic { width: 20px; height: 20px; }
.bt-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bt-tx b { font-size: 14px; }
.bt-tx small { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.bento-tile.create { background: linear-gradient(150deg, #f6dc8c, #c8902e); border-color: #fff0b3; color: #2e1600; }
.bento-tile.create .bt-ic { background: rgba(46,22,0,.12); border-color: rgba(46,22,0,.2); color: #2e1600; }
.bento-tile.create small { color: rgba(46,22,0,.7); }

/* bölüm başlığı + filtre */
.sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 30px 0 12px; }
.sec-head h2 { margin: 0; }
.sec-head .count { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: #e9d6ac;
  background: rgba(255,232,196,.08); border: 1px solid var(--glass-line); font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 12px;
  background: rgba(10,0,3,.45); border: 1px solid var(--glass-line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; border: 0; background: none; box-shadow: none; color: var(--muted); white-space: nowrap; }
.seg button.on { background: rgba(246,220,140,.16); color: var(--gold-1); box-shadow: inset 0 0 0 1px rgba(246,220,140,.3); }

/* masa kartı */
.tgrid:has(.tcard.round) { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.tcard { gap: 14px; padding: 18px; border-radius: 22px; background: var(--glass), rgba(26,3,9,.6);
  border: 1px solid var(--glass-line); box-shadow: var(--soft), var(--glass-hi); }
.tcard.active { border-color: rgba(246,220,140,.55); box-shadow: var(--soft), var(--glass-hi), 0 0 0 1px rgba(246,220,140,.25), 0 0 28px -6px rgba(246,220,140,.35); }
.tcard-head { align-items: center; }
.tcard h3 { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 16px; }
.tcard h3 > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .ic-lock { width: 15px; height: 15px; color: var(--gold-2); }
.tcard .st { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: rgba(255,232,196,.06); border: 1px solid var(--glass-line); color: var(--muted); }
.tcard .st i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tcard .st-playing { color: #7ff0ae; border-color: rgba(62,224,131,.3); background: rgba(62,224,131,.08); }
.tcard .st-playing i { box-shadow: 0 0 0 3px rgba(62,224,131,.2); animation: blink 1.6s ease-in-out infinite; }
.tcard .st-waiting { color: var(--gold-1); border-color: rgba(246,220,140,.3); }
.rt-wrap { margin: 18px auto 16px; }
.rt-count { display: none; }

/* sayı şeridi */
.tstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 16px; overflow: hidden;
  background: rgba(10,0,3,.35); border: 1px solid var(--glass-line); }
.tstats > div { display: flex; align-items: center; gap: 9px; padding: 10px 12px; min-width: 0; color: var(--gold-2); }
.tstats > div + div { border-left: 1px solid var(--glass-line); }
.tstats span { display: flex; flex-direction: column; min-width: 0; }
.tstats small { font-size: 10.5px; color: var(--muted); letter-spacing: .3px; }
.tstats b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* özellik listesi: iki sütun, ikon + ad + değer */
.specs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.specs li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid rgba(255,222,170,.08); min-width: 0; font-size: 13px; }
.specs li:nth-last-child(-n+2) { border-bottom: 0; }
.sp-ic { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px;
  background: rgba(246,220,140,.09); color: var(--gold-1); }
.sp-ic .ic { width: 16px; height: 16px; }
.sp-l { flex: 1; min-width: 0; color: #e9d6ac; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-v { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.specs li.on .sp-v::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #3ee083; vertical-align: 1px; }
.specs li.off .sp-ic { background: rgba(255,255,255,.04); color: var(--muted); }
.specs li.off .sp-l, .specs li.off .sp-v { color: var(--muted); font-weight: 600; }

/* her satır: ikon solda, ad üstte (küçük), değer altta — dar kartlarda da kesilmez */
.specs li { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "ic l" "ic v"; column-gap: 9px; row-gap: 1px; padding: 7px 0; }
.sp-ic { grid-area: ic; }
.sp-l { grid-area: l; font-size: 11px; color: var(--muted); }
.sp-v { grid-area: v; font-size: 13px; }
.specs li.off .sp-l { color: var(--muted); }

/* alt kısım: sahip + düğmeler */
.tcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto;
  padding-top: 14px; border-top: 1px solid rgba(255,222,170,.1); }
.owner { display: flex; align-items: center; gap: 9px; min-width: 0; }
.owner .av { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; font-style: normal;
  font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: 13px; color: #ffe7a6;
  background: radial-gradient(circle at 35% 30%, #a3233d, #4a0816); box-shadow: 0 0 0 1.5px #e0ad45; }
.owner > span { display: flex; flex-direction: column; min-width: 0; }
.owner small { font-size: 10.5px; color: var(--muted); }
.owner b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-actions { margin-top: 0; flex-wrap: wrap; justify-content: flex-end; }
.tcard-actions button { border-radius: 12px; }
.empty-card { border-radius: 20px; background: rgba(10,0,3,.25); }

/* izlemeye kapalı masa: gri */
.tcard.closed { background: linear-gradient(160deg, rgba(200,200,200,.06), rgba(200,200,200,.02)), rgba(30,28,29,.85); border-color: rgba(200,200,200,.18); }
.tcard.closed .sp-ic, .tcard.closed .bt-ic, .tcard.closed .tstats > div { filter: grayscale(1); }

/* bekleme odasında da aynı liste */
.room .specs { margin: 14px 0; padding: 6px 16px; border-radius: 18px; background: var(--glass), rgba(26,3,9,.5); border: 1px solid var(--glass-line); }

@media (max-width: 640px) {
  .lobby-inner { padding: 14px 10px 40px; }
  .lobby-hero { padding: 16px; border-radius: 20px; gap: 12px; }
  .lobby-hero h1 { font-size: 26px; }
  .hero-side, .wallet-card { width: 100%; }
  .wallet-card { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; }
  .wallet-card small { flex-basis: 100%; }
  .wallet-card .wc-link { margin-left: auto; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bento-tile { padding: 11px; gap: 9px; border-radius: 16px; }
  .bento-tile.create { grid-column: 1 / -1; }
  .bt-ic { width: 32px; height: 32px; border-radius: 10px; }
  .bt-tx b { font-size: 13px; }
  .bt-tx small { font-size: 11px; }
  .sec-head { margin-top: 24px; }
  .seg { margin-left: 0; width: 100%; }
  .seg button { flex: 1; padding: 7px 6px; }
  .tcard { padding: 14px; border-radius: 20px; }
  .specs { column-gap: 10px; }
  .tstats > div { padding: 9px 8px; gap: 6px; }
  .tstats .ic { width: 15px; height: 15px; }
  .tcard-foot { flex-wrap: wrap; }
  .tcard-actions { flex: 1; }
  .tcard-actions button { flex: 1; }
}

/* ============ Hesap / Kredi yükle (koyu cam, mobilde alttan açılan sayfa) ============ */
.card.acct { width: min(560px, 100%); padding: 18px 18px 20px; color: #f6e8cf; border: 1px solid var(--glass-line);
  background: radial-gradient(120% 60% at 50% -10%, rgba(214,160,72,.22), transparent 60%), linear-gradient(180deg, #2a0710, #14020a 70%);
  box-shadow: var(--glass-hi), 0 30px 80px rgba(0,0,0,.7); border-radius: 26px; }
.card.acct h3 { color: #f3d79a; margin: 0; font-size: 14px; letter-spacing: .02em; display: flex; align-items: center; gap: 6px; }
.card.acct .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct .sheet-grip { display: none; }
.acct-top { display: flex; align-items: center; gap: 12px; }
.acct-top .avatar.big { width: 48px; height: 48px; font-size: 20px; }
.acct-id { min-width: 0; flex: 1; }
.acct-id b { display: block; font-size: 18px; font-family: Cinzel, Georgia, serif; color: #fff1d4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-id small { color: #c9ad86; font-size: 12px; }
.acct .icon-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(255,232,196,.07); border: 1px solid var(--glass-line); color: #f3d79a; box-shadow: none; }
.acct .icon-btn .ic { width: 18px; height: 18px; }

.balance-card { margin: 16px 0 12px; padding: 16px; border-radius: 20px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(240,190,90,.22), rgba(240,190,90,.04) 55%), rgba(255,232,196,.04);
  border: 1px solid rgba(240,200,120,.28); box-shadow: var(--glass-hi); }
.balance-card::after { content: ''; position: absolute; right: -40px; top: -50px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,120,.25), transparent 70%); pointer-events: none; }
.balance-card .eyebrow { color: #d9b878; }
.bal { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 14px; }
.bal .coin { width: 28px; height: 28px; align-self: center; }
.bal b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; color: #fff4d8; letter-spacing: -.01em; }
.bal small { color: #c9ad86; font-size: 13px; }
.bal-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bal-stats > div { padding: 8px 4px; border-radius: 12px; background: rgba(0,0,0,.22); text-align: center; }
.bal-stats b { display: block; font-size: 15px; color: #fff1d4; font-variant-numeric: tabular-nums; }
.bal-stats small { font-size: 11px; color: #bfa27c; }
.acct .pos { color: #5fe39a !important; } .acct .neg { color: #ff8a8a !important; }

.daily-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 18px; border-radius: 18px; text-align: left;
  background: linear-gradient(90deg, rgba(62,224,131,.16), rgba(62,224,131,.03)); border: 1px solid rgba(62,224,131,.35); color: inherit; box-shadow: none; }
.daily-card:disabled { background: rgba(255,232,196,.04); border-color: var(--glass-line); opacity: .75; }
.daily-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(62,224,131,.18); color: #7af0ae; flex: none; }
.daily-card:disabled .daily-ic { background: rgba(255,232,196,.06); color: #bfa27c; }
.daily-ic .ic { width: 22px; height: 22px; }
.daily-txt { flex: 1; min-width: 0; } .daily-txt b { display: block; font-size: 14px; } .daily-txt small { color: #c9ad86; font-size: 12px; }
.daily-cta { padding: 7px 16px; border-radius: 999px; background: #3ee083; color: #052712; font-weight: 800; font-size: 13px; }
.daily-card:disabled .daily-cta { background: transparent; color: #7af0ae; }

.acct .sec-head { margin: 4px 0 8px; }
.demo-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; font-size: 12px !important; color: #f3c878;
  background: rgba(240,180,60,.08); border: 1px dashed rgba(240,180,60,.35); }
.pkg-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.pkg2 { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 18px; text-align: left;
  background: var(--glass), rgba(255,232,196,.03); border: 1px solid var(--glass-line); color: inherit; box-shadow: var(--glass-hi);
  transition: transform .15s, border-color .15s, background .15s; }
.pkg2:hover { transform: translateY(-2px); border-color: rgba(240,200,120,.5); }
.pkg2:active { transform: scale(.98); }
.pkg2.hot { border-color: rgba(240,200,120,.55); background: linear-gradient(160deg, rgba(240,190,90,.18), rgba(240,190,90,.03)), rgba(255,232,196,.03); }
.pkg-tag { position: absolute; top: -9px; right: 12px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em;
  background: var(--gold-grad); color: #3a1d00; }
.pkg-coins { display: flex; height: 26px; }
.pkg-coins .coin { width: 24px; height: 24px; margin-right: -12px; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.pkg-coins.c0 .coin:nth-child(n+2), .pkg-coins.c1 .coin:nth-child(n+3) { display: none; }
.pkg-main b { display: block; font-size: 22px; color: #fff1d4; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pkg-main small { font-size: 12px; color: #c9ad86; } .pkg-main i { font-style: normal; color: #7af0ae; font-weight: 700; }
.pkg-price { margin-top: auto; align-self: stretch; text-align: center; padding: 8px; border-radius: 12px; font-weight: 800; font-size: 14px;
  background: var(--gold-grad); color: #3a1d00; }

.game-list { list-style: none; margin: 0 0 14px; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-line); }
.game-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,232,196,.03); }
.game-list li + li { border-top: 1px solid rgba(255,222,170,.08); }
.game-list li.empty { color: #bfa27c; font-size: 13px; justify-content: center; }
.g-rank { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none;
  background: rgba(255,232,196,.08); color: #e6cfa6; }
.g-rank.r1 { background: var(--gold-grad); color: #3a1d00; }
.g-main { flex: 1; min-width: 0; } .g-main b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-main small { color: #bfa27c; font-size: 11.5px; }
.g-won { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }

.pw-box { border-radius: 16px; border: 1px solid var(--glass-line); background: rgba(255,232,196,.03); }
.pw-box summary { cursor: pointer; padding: 12px 14px; font-size: 14px; font-weight: 700; color: #f3d79a; display: flex; align-items: center; gap: 8px; list-style: none; }
.pw-box summary::-webkit-details-marker { display: none; }
.pw-box summary::after { content: '›'; margin-left: auto; font-size: 18px; transition: transform .2s; }
.pw-box[open] summary::after { transform: rotate(90deg); }
.pw-box .tform { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.acct .field span { color: #c9ad86; }
.acct .field input { background: rgba(0,0,0,.3); border-color: var(--glass-line); color: #fff1d4; }
.acct-foot { display: flex; justify-content: center; margin-top: 14px; }
.ghost-danger { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid rgba(255,120,120,.3); color: #ff9c9c; box-shadow: none; border-radius: 999px; padding: 8px 18px; }

@media (min-width: 641px) { .pkg-list { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) {
  #modal:has(.card.acct) { align-items: flex-end; padding: 0; }
  .card.acct { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); border-bottom: 0; }
  .modal.open .card.acct { animation: sheetUp .32s cubic-bezier(.2,.8,.2,1); }
  .acct .sheet-grip { display: block; width: 42px; height: 5px; border-radius: 5px; background: rgba(255,232,196,.25); margin: 2px auto 12px; }
  .bal b { font-size: 30px; }
  .pkg-list { grid-template-columns: 1fr; gap: 8px; }
  .pkg2 { flex-direction: row; align-items: center; padding: 12px; gap: 12px; }
  .pkg-coins { width: 48px; flex: none; }
  .pkg-main { flex: 1; min-width: 0; } .pkg-main b { font-size: 19px; }
  .pkg-price { margin: 0; align-self: center; padding: 9px 12px; min-width: 86px; }
  .pkg-tag { right: auto; left: 14px; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }

/* =====================================================================
   MASAÜSTÜ ORTA ALAN: açık perler alanı iki satıra yayılır (daha geniş/yüksek),
   alt atılan taşlar yanlarda kalır, oyun kaydı destenin soluna taşınır
   ===================================================================== */
@media (min-width: 901px) {
  .center { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "p2 deck p1" "p3 melds p0"; column-gap: 10px; }
  .pile-slot.p3, .pile-slot.p0 { align-self: end; }
  .log { grid-area: deck; justify-self: start; align-self: center; text-align: left; max-width: calc(50% - 90px); max-height: 100%; padding-left: 4px; }
  /* yan rakiplerin sol üst köşedeki profil resmi ekrandan taşmasın */
  .board > .seat-left { margin-left: 40px; }
  .board > .seat-right { margin-right: 6px; }
}



/* =====================================================================
   ANA EKRAN (hub) — konsol paneli tarzı (Xbox uygulamasından ilham):
   koyu grafit zemin, tek yeşil vurgu, düz paneller, tam görselli oyun kutuları,
   beyaz odak halkası. Yerleşim korunur:
     masaüstü / mobil yatay → solda sabit menü, salonlar menünün altından kayar
     mobil dikey            → menü üstte, salonlar altında yatay kayar
   ===================================================================== */
button.brand { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  border: 0; box-shadow: none; padding: 0; cursor: pointer; }

.home {
  --x-bg: #0f1011; --x-panel: #1c1d1f; --x-panel-2: #26282b; --x-line: rgba(255,255,255,.08);
  --x-green: #13a10e; --x-green-2: #0e7a0d; --x-green-hi: #3ad13a; --x-text: #ffffff; --x-dim: #a7abb0; --x-mute: #6f747a;
  --x-font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --x-display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  position: relative; flex-direction: column; overflow: hidden;
  font-family: var(--x-font); color: var(--x-text); font-variant-numeric: tabular-nums;
  background:
    radial-gradient(90% 60% at 85% -10%, rgba(19,161,14,.28), transparent 60%),
    radial-gradient(60% 50% at 0% 0%, rgba(40,60,80,.35), transparent 60%),
    linear-gradient(180deg, #16181a 0%, var(--x-bg) 55%);
}
/* üstte geniş, yumuşak "kahraman" ışığı */
.home::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 46%; pointer-events: none;
  background: linear-gradient(115deg, rgba(19,161,14,.18) 0%, rgba(19,161,14,0) 40%), linear-gradient(180deg, rgba(255,255,255,.04), transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); mask-image: linear-gradient(180deg, #000 40%, transparent); }
.home .ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home button { font-family: inherit; }
/* odak halkası: konsol stili beyaz çerçeve (klavye/kumanda ile gezinme) */
.home :is(button):focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.home-wrap { position: relative; z-index: 1; flex: 1; min-height: 0; width: 100%; max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; padding: 16px 28px 18px; }

/* ---------------- üst ---------------- */
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; min-height: 64px; }
.hp-profile { justify-self: start; display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; overflow: hidden;
  padding: 6px 16px 6px 6px; border-radius: 999px; text-align: left; color: var(--x-text);
  background: rgba(255,255,255,.05); border: 1px solid var(--x-line); box-shadow: none; transition: background .15s; }
.hp-profile:hover { background: rgba(255,255,255,.1); }
.hp-av { position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font: 600 22px var(--x-display); color: #fff; background: linear-gradient(145deg, #2f8f2c, #0b4d0a);
  box-shadow: 0 0 0 2px var(--x-bg), 0 0 0 4px var(--x-green); }
.hp-lvl { position: absolute; right: -6px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  font: 700 11px/22px var(--x-font); font-style: normal; text-align: center; color: #fff; background: var(--x-green); box-shadow: 0 0 0 2px var(--x-bg); }
.hp-id { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hp-id > b { font: 600 16px var(--x-display); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-xp { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hp-bar { width: 160px; max-width: 100%; height: 4px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.12); }
.hp-bar i { display: block; height: 100%; border-radius: 4px; background: var(--x-green-hi); }
.hp-xp small { font-size: 11.5px; color: var(--x-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.home-logo { display: flex; align-items: baseline; gap: 8px; line-height: 1; }
.home-logo b { font: 800 34px var(--x-display); letter-spacing: -1px; color: #fff; }
.home-logo small { font: 600 13px var(--x-font); letter-spacing: 4px; text-transform: uppercase; color: var(--x-green-hi); }

.hp-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.hp-coins { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 5px 0 10px; border-radius: 999px; color: #fff;
  background: rgba(255,255,255,.05); border: 1px solid var(--x-line); box-shadow: none; transition: background .15s; }
.hp-coins:hover { background: rgba(255,255,255,.1); }
.hp-coins .coin { width: 24px; height: 24px; flex: none; }
.hp-coins b { font: 600 16px var(--x-font); min-width: 7ch; text-align: right; }
.hp-plus { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--x-green); }
.hp-plus .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.hp-gift { position: relative; width: 44px; height: 44px; flex: none; padding: 0; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(255,255,255,.05); border: 1px solid var(--x-line); box-shadow: none; transition: background .15s; }
.hp-gift:hover { background: rgba(255,255,255,.1); }
.hp-gift .ic { width: 22px; height: 22px; }
.hp-gift.ready { background: var(--x-green); border-color: var(--x-green-hi); }
.hp-dot { position: absolute; top: 1px; right: 1px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--x-green); }

/* ---------------- orta: solda sabit menü, sağda kayan salon şeridi ---------------- */
.home-main { --side-w: 250px; --head-h: 40px; position: relative; align-self: center; min-width: 0; display: flex; flex-direction: column; }
.row-head { display: flex; align-items: center; gap: 12px; height: var(--head-h); padding-left: calc(var(--side-w) + 20px); }
.row-head h2 { margin: 0; font: 600 18px var(--x-display); color: #fff; letter-spacing: 0; }
.row-head button { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; font-size: 13px;
  color: var(--x-dim); background: none; border: 0; box-shadow: none; }
.row-head button:hover { color: #fff; background: rgba(255,255,255,.06); }
.row-head .ic { width: 14px; height: 14px; }

/* menü: düz koyu panel, satır listesi */
.home-side { position: absolute; z-index: 3; left: 0; top: var(--head-h); bottom: 8px; width: var(--side-w);
  display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px; border-radius: 12px;
  background: rgba(28,29,31,.94); border: 1px solid var(--x-line); box-shadow: 24px 0 32px -12px rgba(15,16,17,.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.feat { position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 8px 12px; border: 0; border-radius: 8px;
  text-align: left; color: #fff; background: transparent; box-shadow: none; transition: background .15s; }
.feat:hover { background: rgba(255,255,255,.07); }
.feat::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: transparent; }
.feat.hot::before { background: var(--x-green-hi); }
.feat-ic { width: 40px; height: 40px; flex: none; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--x-panel-2); }
.feat-ic .ic { width: 22px; height: 22px; }
.feat.hot .feat-ic { background: var(--x-green); }
.feat-tx { min-width: 0; }
.feat-tx b { display: block; font: 600 14.5px var(--x-font); color: #fff; }
.feat-tx small { display: block; font-size: 12px; color: var(--x-dim); }
.feat.hot small { color: var(--x-green-hi); font-weight: 600; }
.feat.locked { padding-right: 44px; }
.feat.locked .feat-ic { color: var(--x-mute); }
.feat.locked .feat-tx b { color: var(--x-dim); }
.feat-lock { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; color: var(--x-mute); }
.feat-lock .ic { width: 16px; height: 16px; }

/* salon şeridi */
.home-modes { min-width: 0; display: flex; align-items: stretch; gap: 12px; overflow-x: auto; overflow-y: hidden;
  padding: 6px 40px 14px calc(var(--side-w) + 20px); scroll-padding-left: calc(var(--side-w) + 20px); scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.home-modes::-webkit-scrollbar { display: none; }
.home-modes.dragging { cursor: grabbing; scroll-snap-type: none; }
.home-modes.dragging .mode-card { pointer-events: none; }

/* oyun kutusu: görsel tüm kutuyu kaplar, yazılar altta */
.mode-card { position: relative; isolation: isolate; container-type: inline-size; flex: 0 0 clamp(190px, calc((100vh - 340px) * .75), 260px); aspect-ratio: 3 / 4; scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: 10px;
  text-align: left; color: #fff; background: var(--x-panel); box-shadow: 0 10px 24px -12px rgba(0,0,0,.9);
  outline: 3px solid transparent; outline-offset: 3px; transition: outline-color .12s; }
.mode-card:hover, .mode-card:focus-visible { outline-color: #fff; }
.mode-art { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; padding-bottom: 42%; border-radius: 0; box-shadow: none; }
.mode-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.88)); }
.t-klasik .mode-art { background: radial-gradient(120% 80% at 50% 20%, #2e6be0, #0f2557 70%); }
.t-usta .mode-art { background: radial-gradient(120% 80% at 50% 20%, #16a37a, #063b2d 70%); }
.t-vip .mode-art { background: radial-gradient(120% 80% at 50% 20%, #d4245c, #4a0720 70%); }
.t-pairs .mode-art { background: radial-gradient(120% 80% at 50% 20%, #6b4bd6, #1d1250 70%); }
.t-cup .mode-art { background: radial-gradient(120% 80% at 50% 20%, #d79a21, #4a2e05 70%); }
.mode-title { position: relative; display: flex; flex-direction: column; padding: 0 14px; line-height: 1.15; }
.mode-title b { font: 700 22px var(--x-display); letter-spacing: -.3px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-title small { font: 500 12px var(--x-font); color: rgba(255,255,255,.75); white-space: nowrap; }
.mode-info { position: relative; display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 6px 14px 0; font-size: 12px; color: rgba(255,255,255,.7); }
.mode-info b { color: #fff; font-weight: 600; }
.mode-info span:last-child { flex-basis: 100%; }
.mode-foot { position: relative; display: grid; padding: 10px 12px 12px; }
.mode-go { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 6px;
  font: 600 13px var(--x-font); color: #fff; background: var(--x-green); transition: background .15s; }
.mode-card:hover .mode-go { background: var(--x-green-hi); color: #062b05; }
.mode-go .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.lock-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 6px; white-space: nowrap;
  font: 600 12.5px var(--x-font); color: #fff; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.18); }
.lock-pill .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.lock-pill .lp-short { display: none; }
@container (max-width: 190px) { .lock-pill .lp-long { display: none; } .lock-pill .lp-short { display: inline; } }
.lock-pill.soon { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.14); }
.mode-card.locked .mode-art > * { filter: grayscale(.85) brightness(.55); }
.mode-card.locked .mode-art { filter: saturate(.45) brightness(.75); }

/* kutu görselleri */
.mtile { position: relative; width: 52px; height: 70px; border-radius: 7px; display: inline-grid; place-items: center;
  background: linear-gradient(180deg, #fff, #e9ebee); box-shadow: inset 0 1px 0 #fff, 0 3px 0 #b9bdc4, 0 12px 20px rgba(0,0,0,.45); }
.mtile b { font: 700 28px var(--x-display); margin-top: -10px; }
.mtile i { position: absolute; bottom: 11px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .85; }
.mtile.c0 { color: #c4122f; } .mtile.c1 { color: #d08300; } .mtile.c2 { color: #1d54b0; } .mtile.c3 { color: #161616; }
.art-tiles { display: flex; gap: 6px; align-items: flex-end; }
.art-tiles .r1 { transform: rotate(-12deg) translateY(4px); } .art-tiles .r2 { transform: rotate(10deg); }
.art-tiles.fan { gap: 0; }
.art-tiles.fan .mtile:nth-child(1) { transform: rotate(-16deg) translate(8px, 6px); }
.art-tiles.fan .mtile:nth-child(2) { z-index: 1; transform: translateY(-6px); }
.art-tiles.fan .mtile:nth-child(3) { transform: rotate(16deg) translate(-8px, 6px); }
.art-cushion, .art-glow, .art-coins { display: none; }
.art-stars { position: absolute; top: 18%; display: flex; gap: 4px; align-items: flex-end; }
.art-stars i { width: 16px; height: 16px; background: #fff;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.art-stars i:nth-child(2), .art-stars i:nth-child(4) { width: 20px; height: 20px; } .art-stars i:nth-child(3) { width: 26px; height: 26px; }
.art-word { margin-top: 26px; font: 800 54px var(--x-display); letter-spacing: -1px; color: #fff; text-shadow: 0 6px 18px rgba(0,0,0,.45); }
.art-cup { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #3a2400; background: #ffd166; box-shadow: 0 10px 24px rgba(0,0,0,.45); }
.art-cup .ic { width: 42px; height: 42px; stroke-width: 1.6; }

/* ---------------- alt ---------------- */
.home-dock { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; }
.dock-group { display: flex; gap: 8px; } .dock-group:last-child { justify-content: flex-end; }
.dock-btn { position: relative; width: 58px; height: 58px; flex: none; padding: 0; border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; color: #fff; background: rgba(255,255,255,.05); border: 1px solid var(--x-line); box-shadow: none; transition: background .15s; }
.dock-btn:hover { background: rgba(255,255,255,.1); }
.dock-btn .ic { width: 22px; height: 22px; }
.dock-btn small { font-size: 10px; color: var(--x-dim); }
.dock-btn .badge-n { position: absolute; top: -5px; right: -5px; background: var(--x-green); box-shadow: 0 0 0 2px var(--x-bg); }
.play-now { position: relative; width: 340px; height: 64px; border: 0; border-radius: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; color: #fff; background: var(--x-green);
  box-shadow: 0 10px 28px -10px rgba(19,161,14,.75); transition: background .15s; }
.play-now:hover { background: var(--x-green-hi); color: #062b05; }
.play-now:active { background: var(--x-green-2); }
.play-now b { font: 700 22px var(--x-display); letter-spacing: .2px; }
.play-now small { display: flex; align-items: center; gap: 6px; font: 500 12.5px var(--x-font); opacity: .85; }
.play-now .dot.live { background: currentColor; box-shadow: none; }

/* ---------------- dar masaüstü ---------------- */
@media (max-width: 999px) {
  .home-main { --side-w: 220px; }
  .mode-card { flex-basis: clamp(180px, calc((100vh - 340px) * .7), 220px); }
  .play-now { width: 290px; }
}

/* ---------------- mobil dikey: menü üstte, salonlar altında kayar ---------------- */
@media (max-width: 760px) and (min-height: 521px) {
  .home-wrap { gap: 12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .home-top { grid-template-columns: minmax(0, 1fr) auto; min-height: 52px; }
  .home-logo { display: none; }
  .hp-profile { gap: 9px; padding: 4px 12px 4px 4px; }
  .hp-av { width: 42px; height: 42px; font-size: 18px; }
  .hp-lvl { min-width: 20px; height: 20px; font-size: 10px; line-height: 20px; }
  .hp-id > b { font-size: 14px; }
  .hp-bar { width: 100px; }
  .hp-xp small { font-size: 10px; }
  .hp-right { gap: 6px; }
  .hp-coins { height: 38px; gap: 6px; padding: 0 3px 0 7px; } .hp-coins .coin { width: 20px; height: 20px; }
  .hp-coins b { font-size: 14px; min-width: 6ch; } .hp-plus { width: 30px; height: 30px; }
  .hp-gift { width: 38px; height: 38px; } .hp-gift .ic { width: 19px; height: 19px; }

  .home-main { gap: 10px; }
  .home-side { position: static; order: -1; width: auto; top: auto; bottom: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
    padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .feat, .feat.locked { min-height: 0; flex-direction: column; gap: 6px; padding: 12px 6px 10px; border-radius: 10px; text-align: center;
    background: var(--x-panel); border: 1px solid var(--x-line); }
  .feat::before { left: 30%; right: 30%; top: auto; bottom: 0; width: auto; height: 3px; }
  .feat-ic { width: 36px; height: 36px; } .feat-ic .ic { width: 20px; height: 20px; }
  .feat-tx b { font-size: 12px; } .feat-tx small { font-size: 10.5px; }
  .feat-lock { top: 6px; right: 6px; transform: none; width: 18px; height: 18px; } .feat-lock .ic { width: 13px; height: 13px; }
  .row-head { padding-left: 0; height: 30px; } .row-head h2 { font-size: 16px; }
  .home-modes { margin: 0 -12px; padding: 4px 12px 10px; scroll-padding-left: 12px; -webkit-mask-image: none; mask-image: none; }
  .mode-card { flex-basis: min(58vw, 230px); }

  .home-dock { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .dock-group { gap: 6px; }
  .dock-group .dock-btn:nth-child(2) { display: none; }
  .dock-btn { width: 52px; height: 52px; } .dock-btn .ic { width: 20px; height: 20px; } .dock-btn small { font-size: 9px; }
  .play-now { width: auto; height: 56px; } .play-now b { font-size: 18px; } .play-now small { font-size: 11px; }
}

/* ---------------- mobil yatay (kısa ekran) ---------------- */
@media (max-height: 520px) {
  .home-wrap { gap: 6px; padding: 6px 16px; }
  .home-top { min-height: 48px; }
  .hp-av { width: 38px; height: 38px; font-size: 16px; }
  .hp-profile { padding: 3px 12px 3px 3px; }
  .home-logo b { font-size: 24px; } .home-logo small { font-size: 10px; }
  .hp-coins { height: 38px; } .hp-gift { width: 38px; height: 38px; }
  .home-main { --side-w: 190px; --head-h: 26px; }
  .row-head h2 { font-size: 14px; } .row-head button { font-size: 11.5px; padding: 3px 8px; }
  .home-side { gap: 2px; padding: 6px; bottom: 4px; }
  .feat { min-height: 0; padding: 5px 8px; gap: 10px; } .feat.locked { padding-right: 34px; }
  .feat-ic { width: 30px; height: 30px; border-radius: 7px; } .feat-ic .ic { width: 17px; height: 17px; }
  .feat-tx b, .feat-tx small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .feat-tx b { font-size: 12.5px; } .feat-tx small { font-size: 10.5px; }
  .home-modes { gap: 10px; padding: 4px 30px 6px calc(var(--side-w) + 14px); scroll-padding-left: calc(var(--side-w) + 14px); }
  .mode-card { flex-basis: 150px; aspect-ratio: 4 / 4.2; }
  .mode-title { padding: 0 10px; } .mode-title b { font-size: 16px; } .mode-title small { font-size: 10px; }
  .mode-info { padding: 4px 10px 0; font-size: 10.5px; } .mode-info span:last-child { display: none; }
  .mode-foot { padding: 6px 8px 8px; }
  .mode-go, .lock-pill { height: 28px; font-size: 11px; }
  .mode-art { padding-bottom: 48%; }
  .mtile { width: 32px; height: 43px; border-radius: 5px; } .mtile b { font-size: 17px; margin-top: -6px; } .mtile i { width: 5px; height: 5px; bottom: 7px; }
  .art-word { font-size: 30px; margin-top: 14px; } .art-stars { top: 12%; } .art-stars i, .art-stars i:nth-child(n) { width: 10px; height: 10px; }
  .art-cup { width: 46px; height: 46px; } .art-cup .ic { width: 26px; height: 26px; }
  .dock-btn { width: 44px; height: 44px; } .dock-btn small { display: none; }
  .play-now { width: 260px; height: 50px; } .play-now b { font-size: 18px; }
}
/* ---------------- lobide geri, kilitli hazır masa, liderlik, oyun sonu XP ---------------- */
.back-home { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px 8px 0; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 13px;
  background: rgba(255,232,196,.06); border: 1px solid var(--glass-line); color: #f3d79a; box-shadow: none; }
.back-home .ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bento-tile.locked { opacity: .6; } .bento-tile.locked .bt-ic { filter: grayscale(1); }
.lead-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-grad); color: #3a1d00; flex: none; }
.lead-ic .ic { width: 26px; height: 26px; }
.lead-list { margin-top: 14px; }
.lead-list li.me { background: rgba(240,190,90,.12); }
.lead-lvl { text-align: right; font-weight: 800; color: #f3d79a; font-size: 14px; } .lead-lvl small { display: block; font-weight: 500; color: #bfa27c; font-size: 11px; }
.xp-gain { margin-top: 4px; font-size: 13px; color: #127a42; font-weight: 700; }


/* =====================================================================
   SALON (lobi): büyük bir oyun salonu — kırmızı halı zemin, tavan ışıkları,
   masalar çerçevesiz olarak zeminde durur, her masanın üstünde spot ışığı
   ===================================================================== */
.lobby {
  background:
    radial-gradient(ellipse 55% 22% at 50% 0%, rgba(255,214,150,.22), transparent 70%),
    radial-gradient(ellipse 30% 18% at 15% 4%, rgba(255,214,150,.12), transparent 70%),
    radial-gradient(ellipse 30% 18% at 85% 4%, rgba(255,214,150,.12), transparent 70%),
    linear-gradient(180deg, rgba(20,0,4,.7) 0, rgba(20,0,4,0) 120px),
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 45%, rgba(10,0,3,.65) 100%),
    var(--pattern),
    linear-gradient(180deg, #7a1124 0%, #5c0b1a 35%, #3d0611 75%, #2a040b 100%);
  background-attachment: fixed, fixed, fixed, fixed, fixed, local, fixed;
}
/* masa listesi: geniş aralıklı salon düzeni */
.lobby .tgrid:has(.tcard.round) { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 34px 28px; }
.lobby .tcard.round, .lobby .tcard.round.active, .lobby .tcard.round.closed {
  position: relative; gap: 10px; padding: 6px 4px 10px; border: 0; border-radius: 0; background: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; }
/* masanın üstünde spot ışığı, altında zemin gölgesi */
.lobby .tcard.round .rt-wrap::before { content: ''; position: absolute; z-index: -1; left: 50%; top: 50%; width: 360px; height: 360px;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,214,150,.2) 0%, rgba(255,214,150,.07) 38%, transparent 66%); }
.lobby .tcard.round .rt-wrap::after { content: ''; position: absolute; z-index: -1; left: 50%; top: 60%; width: 210px; height: 70px;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; background: radial-gradient(ellipse, rgba(0,0,0,.55), transparent 70%); }
.lobby .tcard.round .rt-wrap { isolation: isolate; margin: 34px auto 34px; }
.lobby .tcard.round.active .rt-table { box-shadow: 0 0 0 6px #6b3d23, 0 0 0 7px #3a1c0c, 0 0 0 8.5px #fff0b3, 0 14px 22px rgba(0,0,0,.55),
  0 0 34px rgba(246,220,140,.45), inset 0 0 22px rgba(0,0,0,.6); }
/* başlık: masanın üstünde ortalı */
.lobby .tcard.round .tcard-head { flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.lobby .tcard.round h3 { justify-content: center; font-size: 18px; color: #ffe7a6; text-shadow: 0 2px 6px rgba(0,0,0,.6); max-width: 100%; }
.lobby .tcard.round .st { background: rgba(10,0,3,.45); }
/* bilgi şeridi: çerçevesiz, tek satır */
.lobby .tcard.round .tstats { display: flex; justify-content: center; gap: 18px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.lobby .tcard.round .tstats > div { padding: 0; gap: 7px; }
.lobby .tcard.round .tstats > div + div { border-left: 0; }
.lobby .tcard.round .tstats small { font-size: 10px; }
.lobby .tcard.round .tstats b { font-size: 14px; }
/* özellikler: açılır */
.tspecs { align-self: center; width: min(100%, 360px); }
.tspecs summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; color: var(--muted); padding: 4px 10px; border-radius: 999px; }
.tspecs summary::-webkit-details-marker { display: none; }
.tspecs summary::after { content: '▾'; font-size: 11px; transition: transform .2s; }
.tspecs[open] summary::after { transform: rotate(180deg); }
.tspecs summary:hover { color: var(--gold-1); background: rgba(10,0,3,.3); }
.tspecs .specs { margin-top: 6px; padding: 6px 14px; border-radius: 16px; background: rgba(10,0,3,.45); }
/* alt: sahibi + düğmeler, çizgisiz */
.lobby .tcard.round .tcard-foot { justify-content: center; gap: 14px; padding-top: 2px; border-top: 0; }
.lobby .tcard.round.closed .rt-wrap { filter: grayscale(.85) brightness(.85); }
/* boş durum */
.lobby .empty-card { border-color: rgba(255,222,170,.2); background: rgba(10,0,3,.3); }
@media (max-width: 640px) {
  .lobby .tgrid:has(.tcard.round) { gap: 26px; }
  .lobby .tcard.round .rt-wrap::before { width: 300px; height: 300px; }
  .lobby .tcard.round .tstats { gap: 12px; }
}

/* masa bilgileri: Oyuncu, İzleyici ve El sağ üstte (üst ve sağ sandalye arası),
   masanın kenarını takip eden yay üzerinde alt alta */
.lobby .tcard.round .rt-wrap > .tstats { position: absolute; inset: 0; z-index: 2; display: block; overflow: visible; pointer-events: none; }
.lobby .tcard.round .rt-wrap > .tstats > div { position: absolute; display: flex; align-items: center; gap: 6px; padding: 0; color: var(--gold-2); white-space: nowrap; }
.lobby .tcard.round .rt-wrap > .tstats > div > span { flex-direction: row; align-items: baseline; gap: 5px; }
.lobby .tcard.round .rt-wrap > .tstats .ic { width: 15px; height: 15px; }
.lobby .tcard.round .rt-wrap > .tstats small { font-size: 10.5px; }
.lobby .tcard.round .rt-wrap > .tstats b { font-size: 13px; }
/* üçü de masayla aynı merkezli bir çember üzerinde (yarıçap 90px = masa kenarı + 14px sabit boşluk),
   aralarında eşit 22px dikey aralık */
.lobby .tcard.round .rt-wrap > .tstats > div { transform: translateY(-50%); }
.lobby .tcard.round .rt-wrap > .tstats > div:nth-child(2) { left: 164.2px; top: 44px; } /* Oyuncu */
.lobby .tcard.round .rt-wrap > .tstats > div:nth-child(3) { left: 193.0px; top: 66px; } /* İzleyici */
.lobby .tcard.round .rt-wrap > .tstats > div:nth-child(1) { left: 207.0px; top: 88px; } /* El */

/* =====================================================================
   YENİ MASA AÇ / MASA AYARLARI — koyu cam panel, çip seçiciler, anahtarlar
   ===================================================================== */
.card.tf-sheet { width: min(620px, 100%); padding: 0; display: flex; flex-direction: column; overflow: hidden; max-height: 90vh; }
.tf-sheet > .sheet-grip { margin-top: 8px; }
.tf-head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 12px; }
.tf-head h2 { margin: 0; font: 700 19px Cinzel, Georgia, serif; color: #fff1d4; }
.tf-head small { color: #c9ad86; font-size: 12.5px; }
.tf-head > div { flex: 1; min-width: 0; }
.tf-ic { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; color: #3a1d00; background: var(--gold-grad); }
.tf-ic .ic, .tf .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tf-note { margin: 0 18px 8px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; color: #f3c878; background: rgba(240,180,60,.08); border: 1px solid rgba(240,180,60,.3); }
.tf { flex: 1; min-height: 0; overflow: auto; padding: 4px 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.tf h3 { margin: 0 0 8px; font: 600 12px system-ui, sans-serif; letter-spacing: .6px; text-transform: uppercase; color: #d9b878; }
.tf h3 small { margin-left: 6px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #9d8566; }
.tf-name { display: flex; flex-direction: column; gap: 6px; }
.tf-name span { font-size: 12px; color: #c9ad86; }
.tf-name input { height: 50px; padding: 0 16px; border-radius: 14px; font-size: 17px; font-weight: 600; color: #fff1d4;
  background: rgba(0,0,0,.3); border: 1px solid var(--glass-line); outline: none; transition: border-color .15s, box-shadow .15s; }
.tf-name input:focus, .tf-field input:focus { border-color: rgba(240,200,120,.6); box-shadow: 0 0 0 3px rgba(240,200,120,.15); }
.tf-sec { display: flex; flex-direction: column; }
.tf-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
/* çipler */
.tf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-chip { position: relative; cursor: pointer; }
.tf-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tf-chip > span { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  color: #e6d3b0; background: rgba(255,232,196,.05); border: 1px solid var(--glass-line); transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.tf-chip:hover > span { border-color: rgba(240,200,120,.45); }
.tf-chip input:checked + span { color: #3a1d00; background: var(--gold-grad); border-color: #fff0b3; box-shadow: 0 4px 14px -4px rgba(240,190,90,.6); }
.tf-chip input:focus-visible + span { outline: 2px solid #fff0b3; outline-offset: 2px; }
.tf-chip input:disabled + span { opacity: .45; cursor: not-allowed; }
.tf-chip sup { font-size: 9px; font-weight: 800; color: inherit; opacity: .8; }
.tf-chip em { font-style: normal; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; margin-left: 4px; color: #c9ad86; }
.tf-chip em .ic { width: 12px; height: 12px; }
/* sayaç */
.tf-stepper { display: inline-flex; align-items: center; height: 38px; border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-line); background: rgba(0,0,0,.25); }
.tf-stepper button { width: 38px; height: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: rgba(255,232,196,.06); color: #f3d79a; font-size: 18px; }
.tf-stepper button:hover { background: rgba(255,232,196,.12); }
.tf-stepper input { width: 48px; height: 100%; border: 0; text-align: center; font-size: 16px; font-weight: 700; color: #fff1d4; background: none; -moz-appearance: textfield; }
.tf-stepper input::-webkit-inner-spin-button, .tf-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* anahtarlar */
.tf-list { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid var(--glass-line); background: rgba(255,232,196,.03); }
.tf-switch { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; }
.tf-list .tf-switch + .tf-switch { border-top: 1px solid rgba(255,222,170,.08); }
.tf-switch input { position: absolute; opacity: 0; pointer-events: none; }
.tf-switch i { position: relative; flex: none; width: 40px; height: 23px; border-radius: 999px; background: rgba(255,255,255,.12); transition: background .18s; }
.tf-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .18s; }
.tf-switch input:checked + i { background: linear-gradient(90deg, #3ee083, #22b765); }
.tf-switch input:checked + i::after { transform: translateX(17px); }
.tf-switch input:focus-visible + i { outline: 2px solid #fff0b3; outline-offset: 2px; }
.tf-switch input:disabled + i { opacity: .45; }
.tf-switch span { display: flex; flex-direction: column; min-width: 0; }
.tf-switch b { font-size: 13.5px; font-weight: 600; color: #f6e8cf; }
.tf-switch small { font-size: 11.5px; color: #9d8566; }
.tf-sec > .tf-switch { padding-left: 2px; }
/* alanlar */
.tf-field { display: flex; flex-direction: column; gap: 6px; }
.tf-field span { font-size: 12px; color: #c9ad86; }
.tf-field input { height: 40px; padding: 0 12px; border-radius: 12px; font-size: 14px; color: #fff1d4; background: rgba(0,0,0,.3); border: 1px solid var(--glass-line); outline: none; }
.tf-field input:disabled { opacity: .5; }
.tf-pass { margin-top: 10px; }
.tf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tf-hint { margin: 8px 0 0; font-size: 12px !important; color: #9d8566; }
.tf-hint .link { color: #f3d79a; background: none; border: 0; box-shadow: none; padding: 0 0 0 6px; text-decoration: underline; }
/* gelişmiş */
.tf-adv { border-radius: 16px; border: 1px solid var(--glass-line); background: rgba(255,232,196,.03); }
.tf-adv summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 14px; }
.tf-adv summary::-webkit-details-marker { display: none; }
.tf-adv summary span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #f3d79a; }
.tf-adv summary small { margin-left: auto; font-size: 12px; color: #9d8566; }
.tf-adv summary::after { content: '›'; font-size: 18px; color: #f3d79a; transition: transform .2s; }
.tf-adv[open] summary::after { transform: rotate(90deg); }
.tf-adv > .tf-sec { padding: 0 14px 14px; }
/* alt çubuk */
.tf-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--glass-line);
  background: rgba(10,0,4,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tf-sum { flex: 1; min-width: 0; display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 8px; row-gap: 1px; justify-content: start; }
.tf-sum small { font-size: 11px; color: #9d8566; } .tf-sum b { font-size: 14px; color: #fff1d4; font-variant-numeric: tabular-nums; }
.tf-foot .ghost { height: 44px; padding: 0 16px; border-radius: 12px; background: none; border: 1px solid var(--glass-line); color: #e6d3b0; box-shadow: none; }
.tf-go { height: 44px; padding: 0 24px; border-radius: 12px; font-weight: 800; font-size: 15px; color: #052712; border: 0;
  background: linear-gradient(135deg, #7af0ae, #22b765); box-shadow: 0 8px 20px -8px rgba(62,224,131,.7); }
.tf-go:hover { filter: brightness(1.06); }
@media (max-width: 640px) {
  #modal:has(.card.tf-sheet) { align-items: flex-end; padding: 0; }
  .card.tf-sheet { width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; }
  .tf-row { grid-template-columns: 1fr; gap: 14px; }
  .tf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-foot .ghost { display: none; }
  .tf-go { flex: none; }
}

/* lobi üst: bakiye + yeni masa aç yan yana */
.hero-side { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.new-table { display: flex; align-items: center; gap: 12px; min-width: 200px; padding: 12px 18px 12px 12px; border-radius: 18px; text-align: left; cursor: pointer;
  color: #fff1d4; border: 1px solid rgba(122,240,174,.45);
  background: linear-gradient(135deg, rgba(62,224,131,.22), rgba(62,224,131,.04) 60%), rgba(10,0,4,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 26px -12px rgba(62,224,131,.55); transition: border-color .15s, box-shadow .15s; }
.new-table:hover { border-color: rgba(122,240,174,.8); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 30px -10px rgba(62,224,131,.75); }
.nt-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; color: #052712; background: linear-gradient(135deg, #7af0ae, #22b765); }
.nt-ic .ic { width: 22px; height: 22px; stroke-width: 2.4; }
.new-table b { display: block; font-size: 15px; } .new-table small { font-size: 12px; color: #b9e9cc; }
@media (max-width: 640px) { .hero-side { flex-direction: column; } .new-table { width: 100%; } }

/* =====================================================================
   SALON MASASI: kurallar alt solda ve alt sağda üçer tane, sahibi sol üstte.
   Masayla aynı merkezli çemberler: Oyuncu/İzleyici/El 90px, kurallar ve sahibi 110px (masadan daha uzak), aralıklar eşit.
   Kurallar %50 saydam; masanın üzerine gelince ya da masaya dokununca tam görünür.
   ===================================================================== */
.lobby .tcard.round .rt-wrap > .tspecs-arc { position: absolute; inset: 0; margin-top: 4px; z-index: 2; pointer-events: none; opacity: .5; transition: opacity .2s; }
.lobby .tcard.round:hover .rt-wrap > .tspecs-arc, .lobby .tcard.round.specs-open .rt-wrap > .tspecs-arc, .lobby .tcard.round:focus-within .rt-wrap > .tspecs-arc { opacity: 1; }
.lobby .tcard.round .tspecs-arc > div { position: absolute; display: flex; align-items: center; gap: 5px; transform: translateY(-50%); white-space: nowrap; color: var(--gold-2); pointer-events: auto; }
.lobby .tcard.round .tspecs-arc > div > span { display: flex; align-items: baseline; gap: 4px; }
.lobby .tcard.round .tspecs-arc .ic { width: 14px; height: 14px; }
.lobby .tcard.round .tspecs-arc small { font-size: 10px; color: var(--muted); }
.lobby .tcard.round .tspecs-arc b { font-size: 12px; color: var(--ink); }
.lobby .tcard.round .tspecs-arc > div.off b { color: var(--muted); font-weight: 600; }
/* sol alttakilerde simge çember tarafında (sağda), sağ alttakilerde solda */
.lobby .tcard.round .tspecs-arc > div:nth-child(-n+3) { flex-direction: row-reverse; }
.lobby .tcard.round .tspecs-arc > div:nth-child(1) { right: 219.1px; top: 182px; }
.lobby .tcard.round .tspecs-arc > div:nth-child(2) { right: 203.6px; top: 202px; }
.lobby .tcard.round .tspecs-arc > div:nth-child(3) { right: 176.9px; top: 222px; }
.lobby .tcard.round .tspecs-arc > div:nth-child(4) { left: 219.1px; top: 182px; }
.lobby .tcard.round .tspecs-arc > div:nth-child(5) { left: 203.6px; top: 202px; }
.lobby .tcard.round .tspecs-arc > div:nth-child(6) { left: 176.9px; top: 222px; }
/* masa sahibi: sol üstte, aynı çember üzerinde */
.lobby .tcard.round .rt-wrap > .towner { position: absolute; z-index: 2; right: 194.8px; top: 40px; transform: translateY(-50%);
  display: flex; flex-direction: row-reverse; align-items: center; gap: 7px; text-align: right; pointer-events: none; }
.lobby .tcard.round .towner .av { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-style: normal;
  font: 700 12px Cinzel, Georgia, serif; color: #ffe7a6; background: radial-gradient(circle at 35% 30%, #a3233d, #4a0816); box-shadow: 0 0 0 1.5px #e0ad45; }
.lobby .tcard.round .towner > span { display: flex; flex-direction: column; line-height: 1.15; }
.lobby .tcard.round .towner small { font-size: 10px; color: var(--muted); }
.lobby .tcard.round .towner b { font-size: 12px; color: var(--ink); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby .tcard.round .rt-table[data-action] { cursor: pointer; }
.lobby .tcard.round .tcard-foot { justify-content: center; }
/* yan yazılar kartın dışına taşabilir; komşu masalarla çakışmasın */
.lobby .tgrid:has(.tcard.round) { grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr)); column-gap: 24px; }
/* dar ekranda kurallar: sadece simge + değer (etiket başlıkta), taşmasın */
@media (max-width: 640px) {
  .lobby .tcard.round .tspecs-arc small { display: none; }
  .lobby .tcard.round .tspecs-arc b { font-size: 11.5px; }
  .lobby .tcard.round .towner b { max-width: 64px; }
}

/* =====================================================================
   SALON: köşede "Salondan ayrıl", sağ altta yüzen "Masa aç" düğmesi
   ===================================================================== */
.lobby-hero { position: relative; }
.leave-salon { position: absolute; top: 14px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 11px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #f3d79a; background: rgba(10,0,4,.45); border: 1px solid var(--glass-line); box-shadow: none;
  transition: background .15s, border-color .15s, color .15s; }
.leave-salon:hover { color: #fff; border-color: rgba(255,140,140,.5); background: rgba(160,20,40,.35); }
.leave-salon .ic { width: 16px; height: 16px; }
.lobby-hero .hero-side { align-self: flex-end; margin-top: 34px; }
.lobby-inner { padding-bottom: 120px; }

/* yüzen "Masa aç": dönen ışık kenarlı cam hap */
@property --fab-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.fab-new { position: fixed; z-index: 40; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 26px 0 10px; border: 0; border-radius: 999px; cursor: pointer; isolation: isolate;
  color: #fff; background: conic-gradient(from var(--fab-a), #7af0ae, #39e6ff, #f0cf75, #7af0ae);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.8), 0 0 36px -6px rgba(62,224,131,.55); animation: fabSpin 6s linear infinite; transition: transform .2s, box-shadow .2s; }
.fab-new::before { content: ''; position: absolute; inset: 2px; z-index: -1; border-radius: inherit;
  background: radial-gradient(120% 140% at 0% 0%, rgba(62,224,131,.28), transparent 55%), linear-gradient(180deg, #2a0812, #12020a); }
@keyframes fabSpin { to { --fab-a: 360deg; } }
.fab-new:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -12px rgba(0,0,0,.85), 0 0 48px -4px rgba(62,224,131,.75); }
.fab-new:active { transform: translateY(0) scale(.98); }
.fab-new:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.fab-ic { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #052712;
  background: linear-gradient(135deg, #a8ffd0, #22b765); box-shadow: 0 0 0 4px rgba(62,224,131,.18), 0 6px 16px -4px rgba(62,224,131,.8); }
.fab-ic .ic { width: 24px; height: 24px; stroke-width: 2.6; }
.fab-tx { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.fab-tx b { font-size: 17px; font-weight: 800; letter-spacing: .2px; }
.fab-tx small { font-size: 12px; color: #b9e9cc; }
@media (max-width: 640px) {
  .fab-new { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); height: 60px; justify-content: center; padding: 0 20px 0 8px; }
  .fab-ic { width: 42px; height: 42px; }
  .lobby-hero .hero-side { margin-top: 8px; }
  .leave-salon { top: 12px; right: 12px; height: 32px; padding: 0 12px 0 10px; }
  .lobby-hero .eyebrow { max-width: calc(100% - 140px); }
}
@media (prefers-reduced-motion: reduce) { .fab-new { animation: none; } }

/* =====================================================================
   CRPI logosu (CR101): harfler --logo-a, vurgu (ilk 1 + 0) --logo-o
   ===================================================================== */
.crpi-logo { display: block; height: 1em; width: auto; aspect-ratio: 195 / 80; overflow: visible; }
.crpi-logo .lg-l { fill: var(--logo-a, #f4f1ea); }
.crpi-logo .lg-a { fill: var(--logo-o, #e6c068); }
/* üst çubuk (bordo-altın tema) */
button.brand { display: inline-flex; align-items: center; }
#brandTitle { display: inline-flex; align-items: center; }
.crpi-logo.sm { height: 24px; --logo-a: #f7f2e6; --logo-o: #f0c75e; filter: drop-shadow(0 1px 0 rgba(0,0,0,.4)); }
/* ana ekran (konsol teması) */
.home .home-logo { flex-direction: column; align-items: center; gap: 6px; }
.home .home-logo .crpi-logo { height: 40px; --logo-a: #ffffff; --logo-o: #e9c46a; filter: drop-shadow(0 4px 14px rgba(0,0,0,.45)); }
.home .home-logo small { font: 600 10.5px var(--x-font); letter-spacing: 4px; padding-left: 4px; text-transform: uppercase; color: var(--x-dim); }
@media (max-height: 520px) { .home .home-logo .crpi-logo { height: 28px; } .home .home-logo small { display: none; } }

/* =====================================================================
   Okey salonu üst barı: logo tam ortada, aktif masa sekmeleri yok,
   menü en sağda; menünün hemen solunda CR101 → USDT kuru
   ===================================================================== */
.rate-chip { display: none; }
.rate-chip:not(:empty) { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; color: var(--muted); background: rgba(20,1,5,.35); border: 1px solid rgba(224,173,69,.22); align-self: center; }
.rate-chip .coin { align-self: center; margin-right: 0; }
.rate-chip i { font-style: normal; opacity: .7; }
.rate-chip b { color: var(--gold-1); font-variant-numeric: tabular-nums; }
.rate-chip small { font-size: 10.5px; letter-spacing: .5px; color: #4fd1a5; font-weight: 700; }
body:not(.scr-lobby) .rate-chip { display: none; }
body.scr-lobby .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
body.scr-lobby .topbar > .brand { grid-column: 2; grid-row: 1; justify-self: center; }
body.scr-lobby .topbar > .table-tabs { display: none; }
body.scr-lobby .topbar > .top-actions { grid-column: 3; grid-row: 1; justify-self: end; align-items: center; min-width: 0; }
@media (max-width: 640px) {
  body.scr-lobby .topbar { grid-template-columns: auto minmax(0, 1fr); }
  body.scr-lobby .topbar > .brand { grid-column: 1; justify-self: start; }
  body.scr-lobby .topbar > .top-actions { grid-column: 2; }
  .rate-chip:not(:empty) { padding: 5px 9px; font-size: 11.5px; }
  .rate-chip > span:not(.coin), .rate-chip i { display: none; }
}

/* =====================================================================
   Salon üst barı — sol küme: mesajlar, bildirimler, seviye, bakiye
   ===================================================================== */
.top-left { display: none; }
body.scr-lobby .topbar > .top-left { display: flex; grid-column: 1; grid-row: 1; justify-self: start; align-items: center; gap: 6px; min-width: 0; }
body.scr-lobby .topbar #wallet { display: none; }
.top-left .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tl-btn { position: relative; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 50%;
  background: rgba(20,1,5,.45); border: 1px solid var(--gold-line); color: var(--gold-1); box-shadow: none; }
.tl-btn:hover { background: rgba(224,173,69,.14); }
.tl-n { position: absolute; top: -4px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center;
  font: 700 10px/1 system-ui, sans-serif; font-style: normal; color: #fff; background: #e0364f; box-shadow: 0 0 0 2px #1f0208; }
.tl-lvl { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 4px; border-radius: 999px;
  background: rgba(20,1,5,.45); border: 1px solid var(--gold-line); box-shadow: none; color: var(--ink); }
.tl-lvl > b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 12.5px/1 system-ui, sans-serif;
  color: #2a1803; background: radial-gradient(circle at 35% 30%, #fff1bf, #e2b14c 60%, #a8781f); }
.tl-lvl > span { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tl-lvl small { font-size: 10.5px; color: var(--muted); line-height: 1; letter-spacing: .3px; }
.tl-lvl i { display: block; width: 48px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #4fd1a5 var(--p), rgba(255,255,255,.12) var(--p)); }
.tl-money { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 13px 0 10px; border-radius: 999px;
  background: rgba(20,1,5,.45); border: 1px solid var(--gold-line); box-shadow: none; color: var(--gold-1); font-size: 13px; white-space: nowrap; }
.tl-money b { font-variant-numeric: tabular-nums; }

/* bildirim paneli */
.note-panel { position: fixed; z-index: 60; width: 320px; max-width: calc(100vw - 16px); max-height: min(70vh, 440px); overflow: auto;
  border-radius: 16px; background: rgba(30,4,11,.97); border: 1px solid var(--gold-line); box-shadow: 0 18px 40px rgba(0,0,0,.55);
  backdrop-filter: blur(8px); color: var(--ink); animation: np-in .16s ease-out; }
@keyframes np-in { from { opacity: 0; transform: translateY(-6px); } }
.note-panel header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px;
  background: inherit; border-bottom: 1px solid rgba(224,173,69,.15); }
.note-panel header b { color: #f3d79a; font-size: 14px; }
.np-clear { padding: 3px 10px; font-size: 11.5px; background: transparent; box-shadow: none; color: var(--muted); }
.note-panel ul { list-style: none; margin: 0; padding: 4px 0; }
.note-panel li { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; padding: 9px 14px 9px 24px; position: relative; font-size: 13px; line-height: 1.35; }
.note-panel li + li { border-top: 1px solid rgba(255,255,255,.04); }
.note-panel li::before { content: ''; position: absolute; left: 11px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.18); }
.note-panel li.new::before { background: #4fd1a5; box-shadow: 0 0 6px #4fd1a5; }
.note-panel li.k-report.new::before { background: #e0364f; box-shadow: 0 0 6px #e0364f; }
.note-panel li small { flex: none; color: var(--muted); font-size: 11px; }
.note-panel li b { color: #f3d79a; }
.note-panel li.empty { color: var(--muted); padding-left: 14px; }
.note-panel li.empty::before { display: none; }

/* mesaj kutusu */
.card.acct.dm { display: flex; flex-direction: column; gap: 12px; max-height: min(80vh, 620px); }
.dm .dm-compose { display: flex; gap: 8px; }
.dm .dm-compose input { flex: 1; min-width: 0; }
.dm .dm-compose button.primary { width: 42px; padding: 0; display: grid; place-items: center; }
.dm-list { list-style: none; margin: 0; padding: 0; overflow: auto; min-height: 0; }
.dm-list li.empty { color: var(--muted); padding: 18px 4px; text-align: center; }
.dm-list button { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 8px; border-radius: 12px; text-align: left;
  background: transparent; box-shadow: none; color: inherit; }
.dm-list button:hover { background: rgba(224,173,69,.08); }
.dm-av { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 14px Cinzel, Georgia, serif;
  color: #ffe7a6; background: radial-gradient(circle at 35% 30%, #a3233d, #4a0816); box-shadow: 0 0 0 1.5px #e0ad45; }
.dm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dm-meta small { color: var(--muted); font-size: 11px; }
.dm-meta .tl-n { position: static; box-shadow: none; }
.dm-thread { flex: 1; min-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; }
.dm-msg { max-width: 78%; display: flex; flex-direction: column; gap: 2px; }
.dm-msg p { margin: 0; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; word-break: break-word; }
.dm-msg small { font-size: 10.5px; color: var(--muted); padding: 0 6px; }
.dm-msg.in { align-self: flex-start; }
.dm-msg.in p { background: rgba(255,255,255,.07); border-bottom-left-radius: 5px; }
.dm-msg.out { align-self: flex-end; align-items: flex-end; }
.dm-msg.out p { background: linear-gradient(180deg, #e8c065, #c8962f); color: #2a1803; border-bottom-right-radius: 5px; }
.dm-empty { margin: auto; color: var(--muted); }

@media (max-width: 640px) {
  body.scr-lobby .topbar { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 6px; }
  body.scr-lobby .topbar > .brand { grid-column: 2; justify-self: center; }
  body.scr-lobby .topbar > .top-actions { grid-column: 3; }
  body.scr-lobby .topbar > .top-left { gap: 5px; }
  .tl-btn { width: 30px; height: 30px; }
  .tl-lvl { height: 30px; padding: 0 4px; }
  .tl-lvl > span { display: none; }
  .tl-money { height: 30px; padding: 0 9px 0 7px; font-size: 12px; }
  body.scr-lobby .topbar #userMenu { display: none; }   /* profil: seviye/bakiye düğmesinden */
  .tl-lvl > b { width: 22px; height: 22px; font-size: 11px; }
}

/* atılan taşlar ve okey göstergesi: ortadaki açılmış perlerle aynı boyutta */
.board .pile-slot .tile, .board .indicator .tile { --w: var(--stw); --h: var(--sth); }

/* ortadaki perler biraz daha büyük (masaüstü); atılan taşlar ve okey de aynı boyda */
@media (min-width: 901px) {
  .board { --stw: clamp(14px, calc(var(--tw) * .66), 31px); }
}
/* per toplamları: her perin yanında değil, açanın isminin altında tek sayı */
.meld-row .owner { display: flex; flex-direction: column; gap: 2px; }
.meld-row .owner b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.meld-row .owner i { font: 700 13px/1 system-ui, sans-serif; font-style: normal; color: #f3d79a; font-variant-numeric: tabular-nums; }

/* atılan taşlar: çerçeve/zemin yok, sadece taşın gölgesi; altında sadece adet */
.pile { padding: 0; border: 1px solid transparent; background: none; box-shadow: none; gap: 4px; }
.pile .tile:not(.empty) { box-shadow: 0 4px 10px rgba(0,0,0,.55), 0 1px 2px rgba(0,0,0,.45); }
.pile .tile.empty { background: rgba(0,0,0,.18); border: 1px dashed rgba(224,173,69,.25); box-shadow: none; }
.pile small { font-size: 11px; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.pile.takeable, .pile.droppable { padding: 4px; border-radius: 10px; }

/* rakip puanı: yuvarlağa/isme tıklayınca görünür */
.seat .seat-card[data-seat] { cursor: pointer; }
.seat .seat-meta small.seat-score { display: none; }
.seat .seat-card.show-score .seat-meta small.seat-score { display: block; color: #f3d79a; font-weight: 700; }
.seat .badge-open { white-space: nowrap; }

/* Lobi masa kumaşı: küçük ölçekli desen + kadife doku + spot parlaması (gerçekçi çuha) */
.rt-table {
  background:
    radial-gradient(ellipse 60% 45% at 42% 30%, rgba(255,220,190,.16), transparent 70%),
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(15,0,4,.55) 100%),
    var(--felt-pattern),
    var(--velvet),
    radial-gradient(circle at 45% 35%, #a3233d 0%, var(--felt-mid) 55%, #2c040b 100%);
  background-size: auto, auto, 24px 24px, 110px 110px, auto;
  background-position: center;
}

/* =====================================================================
   ANA EKRAN v3 — oyun dünyaları arasında kayan dikey kart (rail), neon/aurora görünüm
   Düzen: [iskambil dünyası][rail %15][okey dünyası] tek bir şerit; rail tıklanınca şerit kayar.
   ===================================================================== */
.home {
  --rail: max(15vw, 62px);
  --x-bg: #0a0612; --x-panel: #171022; --x-panel-2: #261a3a; --x-line: rgba(255,255,255,.1);
  --x-green: #ff2e7e; --x-green-2: #c9175c; --x-green-hi: #ffc24a; --x-dim: #b9b2c8; --x-mute: #7b7390;
  --ease-swap: cubic-bezier(.76, 0, .2, 1); --ease-pop: cubic-bezier(.2, .8, .2, 1);
  background: #07040d;
}
.home::before { display: none; }
.hub { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; }

/* ---- arka plan: hareketli aurora + perspektifli ızgara ---- */
.hub-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #1b0c30 0%, #0b0615 58%, #05030a 100%); }
.au { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; transition: background-color 1.1s ease, opacity 1.1s ease; }
.au.a1 { width: 56vmax; height: 56vmax; left: -14vmax; top: -26vmax; background-color: #ff2e7e; opacity: .5; animation: au1 19s ease-in-out infinite alternate; }
.au.a2 { width: 46vmax; height: 46vmax; right: -12vmax; bottom: -26vmax; background-color: #ff8a2a; opacity: .36; animation: au2 23s ease-in-out infinite alternate; }
.au.a3 { width: 30vmax; height: 30vmax; left: 46%; top: 26%; background-color: #7a3cff; opacity: .3; animation: au3 27s ease-in-out infinite alternate; }
.hub[data-world="cards"] .au.a1 { background-color: #12c8ff; opacity: .42; }
.hub[data-world="cards"] .au.a2 { background-color: #7a5cff; opacity: .46; }
.hub[data-world="cards"] .au.a3 { background-color: #ff4fd8; opacity: .26; }
@keyframes au1 { to { transform: translate(14vmax, 8vmax) scale(1.15); } }
@keyframes au2 { to { transform: translate(-16vmax, -8vmax) scale(1.2); } }
@keyframes au3 { to { transform: translate(-18vmax, 10vmax) scale(.8); } }
.hub-grid { position: absolute; left: -30%; right: -30%; bottom: 0; height: 52%;
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 60px 60px; transform: perspective(520px) rotateX(62deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 85%); mask-image: linear-gradient(180deg, transparent, #000 85%);
  animation: gridrun 5s linear infinite; opacity: .55; }
@keyframes gridrun { to { background-position: 0 60px, 0 60px; } }

/* ---- şerit ---- */
.hub-track { position: absolute; left: 0; top: 0; bottom: 0; width: calc(200% - var(--rail)); display: flex;
  transform: translateX(calc((var(--rail) - 100%) / 2)); transition: transform .95s var(--ease-swap); will-change: transform; }
.hub[data-world="cards"] .hub-track { transform: translateX(0); }
.world { flex: 0 0 calc((100% - var(--rail)) / 2); min-width: 0; min-height: 0; display: flex; flex-direction: column;
  transition: opacity .55s ease, transform .95s var(--ease-swap); }
.hub[data-world="okey"] .world-cards, .hub[data-world="cards"] .world-okey { opacity: 0; transform: scale(.9); pointer-events: none; }
.world-okey .home-wrap { max-width: 1280px; }

/* ---- rail: dünyalar arasındaki dikey kart ---- */
.rail { position: relative; z-index: 2; flex: 0 0 var(--rail); height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden;
  container-type: inline-size; cursor: pointer; color: #fff; background: #120a22; --glow: #a53cff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 0 70px -4px var(--glow), 0 0 160px -30px var(--glow);
  transition: box-shadow .6s ease, filter .25s ease; }
.hub[data-world="cards"] .rail { --glow: #ff5a3c; }
.rail:hover { filter: brightness(1.12) saturate(1.1); }
.rail:active { filter: brightness(.95); }
.rail::before, .rail::after { content: ''; position: absolute; z-index: 3; top: 0; bottom: 0; width: 2px; pointer-events: none;
  background: linear-gradient(180deg, transparent, #fff 30%, #fff 70%, transparent); background-size: 100% 220%; opacity: .75; animation: edge 3.2s linear infinite; }
.rail::before { left: 0; } .rail::after { right: 0; animation-delay: -1.6s; }
@keyframes edge { from { background-position: 0 120%; } to { background-position: 0 -120%; } }
.rail-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: max(8vh, 30px) 0 max(4vh, 18px); transition: opacity .5s ease .25s, transform .95s var(--ease-swap); }
.rail-face::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(125deg, rgba(255,255,255,.08) 0 2px, transparent 2px 16px), linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(8,2,20,.55)); }
.rail-face > * { position: relative; }
.f-cards { background: linear-gradient(185deg, #1f2bff 0%, #7a2cff 42%, #ff2ea6 100%); }
.f-okey { background: linear-gradient(185deg, #ff2e7e 0%, #ff5a2a 52%, #ffb52a 100%); }
.hub[data-world="okey"] .f-okey, .hub[data-world="cards"] .f-cards { opacity: 0; transform: scale(1.18); pointer-events: none; transition-delay: 0s, 0s; }
.rail-art { display: flex; align-items: flex-end; justify-content: center; --pw: 40cqw; animation: bob 4.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-9px) rotate(-1.5deg); } }
.rail-name { writing-mode: vertical-rl; transform: rotate(180deg); display: flex; flex-direction: column-reverse; align-items: center; gap: 6cqw; min-height: 0; }
.rail-name b { font: 900 clamp(26px, 33cqw, 74px)/1 var(--x-display); letter-spacing: .05em; white-space: nowrap; color: #fff;
  text-shadow: 0 0 22px rgba(255,255,255,.55), 0 6px 22px rgba(0,0,0,.4); }
.rail-name small { font: 700 clamp(9px, 6.6cqw, 13px)/1 var(--x-font); letter-spacing: .32em; text-transform: uppercase; white-space: nowrap; color: rgba(255,255,255,.82); }
.rail-go { display: flex; gap: 2px; }
.rail-go i { width: clamp(9px, 8cqw, 14px); height: clamp(9px, 8cqw, 14px); border: solid #fff; border-width: 3px 3px 0 0; transform: rotate(45deg); opacity: .2; animation: chev 1.2s ease-in-out infinite; }
.rail-go i:nth-child(2) { animation-delay: .15s; } .rail-go i:nth-child(3) { animation-delay: .3s; }
.f-okey .rail-go { transform: scaleX(-1); }
@keyframes chev { 30% { opacity: 1; } 70% { opacity: .2; } }
.rail-shine { position: absolute; z-index: 2; left: 0; right: 0; top: -40%; height: 40%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.28) 50%, transparent); transform: skewY(-12deg); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 55% { top: -40%; } 100% { top: 120%; } }
.hub.swapping .rail { animation: railpunch .95s var(--ease-swap); }
@keyframes railpunch { 40% { transform: scaleX(1.22); filter: brightness(1.35) saturate(1.3); } }
.rail .mtile { width: 30cqw; height: 40cqw; border-radius: 4.5cqw; }
.rail .mtile b { font-size: 17cqw; margin-top: -6cqw; }
.rail .mtile i { width: 5cqw; height: 5cqw; bottom: 6cqw; }
.rail .mtile + .mtile { margin-left: -6cqw; }

/* ---- iskambil kâğıdı ---- */
.pcard { position: relative; flex: none; width: var(--pw, 64px); aspect-ratio: 5 / 7; border-radius: calc(var(--pw, 64px) * .12);
  display: inline-grid; place-items: center; color: #15161c; background: linear-gradient(160deg, #fff, #e6e9f2);
  font-family: 'Times New Roman', 'Apple Symbols', 'Segoe UI Symbol', serif;
  box-shadow: 0 calc(var(--pw, 64px) * .14) calc(var(--pw, 64px) * .3) rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.08); }
.pcard.red { color: #e3173f; }
.pcard b { position: absolute; left: 9%; top: 6%; font: 800 calc(var(--pw, 64px) * .25)/1 var(--x-display, system-ui); letter-spacing: -.04em; }
.pcard i { position: absolute; left: 9%; top: 31%; font-style: normal; font-size: calc(var(--pw, 64px) * .2); line-height: 1; }
.pcard em { margin-top: 14%; font-style: normal; font-size: calc(var(--pw, 64px) * .58); line-height: 1; }
.pcard + .pcard { margin-left: calc(var(--pw, 64px) * -.42); }
.p1 { transform: rotate(-15deg) translateY(8%); } .p2 { z-index: 1; transform: translateY(-9%); } .p3 { transform: rotate(15deg) translateY(8%); }

/* ---- giriş animasyonu (ekran açılışı ve dünya değişimi) ---- */
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.96); } }
.hub.swapping { --d: .38s; }
.hub.enter :is(.home-top, .home-side, .row-head, .mode-card, .home-dock, .cw-top, .cgame, .cw-foot) {
  animation: rise .7s var(--ease-pop) both; animation-delay: calc(var(--d, 0s) + var(--i, 0) * 70ms); }
.home-side { --i: 1; } .row-head { --i: 1; } .home-dock { --i: 5; } .cw-foot { --i: 5; }
.mode-card:nth-child(1) { --i: 2; } .mode-card:nth-child(2) { --i: 3; } .mode-card:nth-child(3) { --i: 4; }
.mode-card:nth-child(4) { --i: 5; } .mode-card:nth-child(n+5) { --i: 6; }

/* ---- okey dünyası: neon kaplama ---- */
.hub .hp-profile, .hub .hp-coins, .hub .hp-gift, .hub .dock-btn, .cw-bal { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.hub .hp-av { background: linear-gradient(145deg, #ff2e7e, #ff8a2a); box-shadow: 0 0 0 2px var(--x-bg), 0 0 0 4px #ff2e7e, 0 0 22px rgba(255,46,126,.7); }
.hub .hp-lvl { background: #ffc24a; color: #2a1200; }
.hub .hp-bar i { background: linear-gradient(90deg, #ff2e7e, #ffc24a); box-shadow: 0 0 10px rgba(255,120,80,.9); }
.hub .hp-plus { background: linear-gradient(145deg, #ff2e7e, #ff8a2a); }
.hub .hp-gift.ready { background: linear-gradient(145deg, #ff2e7e, #ff8a2a); border-color: #ffc24a; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(255,46,126,0), 0 0 26px rgba(255,90,90,.8); } 0%, 100% { box-shadow: 0 0 0 0 rgba(255,46,126,.55); } }
.hub .row-head h2 { font: 800 22px var(--x-display); letter-spacing: -.3px; background: linear-gradient(90deg, #fff, #ffc24a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hub .home-side { border-radius: 20px; background: rgba(22,12,38,.78); border-color: rgba(255,255,255,.12); box-shadow: 24px 0 36px -14px rgba(8,4,16,.95), inset 0 1px 0 rgba(255,255,255,.08); }
.hub .feat { border-radius: 14px; }
.hub .feat-ic { border-radius: 12px; background: rgba(255,255,255,.08); }
.hub .feat.hot .feat-ic { background: linear-gradient(145deg, #ff2e7e, #ff8a2a); box-shadow: 0 0 18px rgba(255,70,110,.7); }
.hub .mode-card { --g: #ff2e7e; border-radius: 20px; outline: 0; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 22px 40px -22px var(--g);
  transition: transform .35s var(--ease-pop), box-shadow .35s ease; }
.hub .mode-card:hover, .hub .mode-card:focus-visible { transform: translateY(-8px) scale(1.025); box-shadow: 0 0 0 2px var(--g), 0 0 44px -6px var(--g), 0 30px 50px -24px var(--g); }
.hub .mode-card::after { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.28) 50%, transparent 62%); transform: translateX(-120%); }
.hub .mode-card:hover::after { transform: translateX(120%); transition: transform .8s ease; }
.hub .t-klasik { --g: #3d8bff; } .hub .t-usta { --g: #12e0a0; } .hub .t-vip { --g: #ff2e7e; } .hub .t-pairs { --g: #9a6bff; } .hub .t-cup { --g: #ffb52a; }
.hub .t-klasik .mode-art { background: radial-gradient(120% 80% at 50% 15%, #4aa0ff, #2343d8 45%, #0c1450 80%); }
.hub .t-usta .mode-art { background: radial-gradient(120% 80% at 50% 15%, #25f0b0, #0b8f72 45%, #04302c 80%); }
.hub .t-vip .mode-art { background: radial-gradient(120% 80% at 50% 15%, #ff5aa0, #d4145e 45%, #45051f 80%); }
.hub .t-pairs .mode-art { background: radial-gradient(120% 80% at 50% 15%, #b08cff, #6a3ee0 45%, #1c0f55 80%); }
.hub .t-cup .mode-art { background: radial-gradient(120% 80% at 50% 15%, #ffd35c, #e08a12 45%, #4a2603 80%); }
.hub .mode-art > * { transition: transform .45s var(--ease-pop); }
.hub .mode-card:hover .mode-art > * { transform: translateY(-6px) scale(1.07); }
.hub .mode-title b { font-weight: 800; font-size: 24px; }
.hub .mode-go { border-radius: 12px; background: linear-gradient(90deg, #ff2e7e, #ff8a2a); box-shadow: 0 8px 20px -8px rgba(255,60,110,.9); }
.hub .mode-card:hover .mode-go { background: linear-gradient(90deg, #ff4a90, #ffc24a); color: #fff; }
.hub .lock-pill { border-radius: 12px; }
.hub .dock-btn { border-radius: 16px; transition: transform .25s var(--ease-pop), background .15s; }
.hub .dock-btn:hover { transform: translateY(-4px); background: rgba(255,255,255,.14); }
.hub .play-now { overflow: hidden; border-radius: 20px; background: linear-gradient(90deg, #ff2e7e, #ff5a2a 55%, #ffb52a); background-size: 180% 100%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 14px 40px -10px rgba(255,70,90,.9); animation: cta 3.2s ease-in-out infinite;
  transition: transform .25s var(--ease-pop), filter .2s; }
.hub .play-now::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.4) 50%, transparent 60%);
  transform: translateX(-120%); animation: ctashine 3.2s ease-in-out infinite; }
.hub .play-now:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.1); color: #fff; background: linear-gradient(90deg, #ff2e7e, #ff5a2a 55%, #ffb52a); }
.hub .play-now:active { transform: scale(.98); }
.hub .play-now b { font-weight: 900; letter-spacing: .4px; text-transform: uppercase; text-shadow: 0 2px 10px rgba(120,0,30,.5); }
@keyframes cta { 50% { background-position: 100% 0; box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 14px 54px -6px rgba(255,120,60,1); } }
@keyframes ctashine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.hub .dock-btn .badge-n { background: #ff2e7e; }

/* ---- iskambil dünyası ---- */
.cw { flex: 1; min-height: 0; width: 100%; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; padding: 22px 28px 20px; }
.cw-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cw-title { min-width: 0; }
.cw-title small { font: 700 11px var(--x-font); letter-spacing: 4px; text-transform: uppercase; color: #6fe9ff; }
.cw-title h1 { margin: 4px 0 6px; font: 900 clamp(40px, 7.2vw, 96px)/.95 var(--x-display); letter-spacing: -.03em;
  background: linear-gradient(90deg, #fff 0%, #8ff0ff 38%, #b79cff 72%, #ff7ad9 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 26px rgba(90,120,255,.55)); }
.cw-title p { margin: 0; font-size: 14px; color: rgba(255,255,255,.72); }
.cw-bal { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 10px; border: 1px solid; border-radius: 999px; color: #fff; box-shadow: none; }
.cw-bal .coin { width: 24px; height: 24px; flex: none; }
.cw-bal b { font: 700 16px var(--x-font); } .cw-bal small { font-size: 11px; color: var(--x-dim); }
.cw-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-content: center; overflow: auto; scrollbar-width: none; padding: 10px 4px; }
.cw-grid::-webkit-scrollbar { display: none; }
.cgame { --g: #12c8ff; position: relative; isolation: isolate; container-type: inline-size; aspect-ratio: 3 / 4; max-height: 420px; width: 100%; justify-self: center; min-width: 0; padding: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; border: 0; border-radius: 22px; text-align: left; color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 24px 44px -24px var(--g); transition: transform .35s var(--ease-pop), box-shadow .35s ease; }
.cgame:hover, .cgame:focus-visible { transform: translateY(-8px) scale(1.025); box-shadow: 0 0 0 2px var(--g), 0 0 46px -6px var(--g), 0 30px 50px -24px var(--g); }
.cgame::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(4,2,14,.7) 78%, rgba(4,2,14,.92)); }
.cg-a { --g: #12c8ff; background: radial-gradient(120% 80% at 50% 12%, #35d9ff, #1a5bff 48%, #0a1250 82%); }
.cg-b { --g: #9a6bff; background: radial-gradient(120% 80% at 50% 12%, #c39cff, #6e3bf0 48%, #1d0e5a 82%); }
.cg-c { --g: #ff4fd8; background: radial-gradient(120% 80% at 50% 12%, #ff8be6, #d81fa8 48%, #4a0440 82%); }
.cg-d { --g: #2dffb0; background: radial-gradient(120% 80% at 50% 12%, #5cffc6, #0fa37c 48%, #04352e 82%); }
.cg-art { position: absolute; z-index: -2; left: 0; right: 0; top: 12%; display: flex; justify-content: center; --pw: 34cqw; transition: transform .45s var(--ease-pop); }
.cgame:hover .cg-art { transform: translateY(-6px) scale(1.07); }
.cg-tx { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 2px; }
.cg-tx b { font: 800 clamp(18px, 13cqw, 28px)/1.05 var(--x-display); letter-spacing: -.3px; }
.cg-tx small { font: 500 12px var(--x-font); color: rgba(255,255,255,.75); }
.cg-tag { position: absolute; top: 12px; right: 12px; padding: 5px 10px; border-radius: 999px; font: 700 10.5px var(--x-font); letter-spacing: .8px; text-transform: uppercase;
  color: #fff; background: rgba(8,4,20,.55); border: 1px solid rgba(255,255,255,.3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cw-foot { display: flex; justify-content: center; }
.cw-back { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px 0 14px; border-radius: 999px; font: 600 14px var(--x-font); color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); box-shadow: none; transition: background .15s, transform .25s var(--ease-pop); }
.cw-back:hover { background: rgba(255,255,255,.16); transform: translateX(4px); }

/* ---- dar ekran ---- */
@media (max-width: 1100px) { .cw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cgame { aspect-ratio: 4 / 3; } .cg-art { --pw: 22cqw; top: 10%; } }
@media (max-width: 760px) and (min-height: 521px) {
  .cw { gap: 12px; padding: 14px 12px calc(12px + env(safe-area-inset-bottom)); }
  .cw-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cw-title p { font-size: 12.5px; }
  .cw-grid { gap: 10px; } .cgame { aspect-ratio: 3 / 4; border-radius: 16px; } .cg-art { --pw: 34cqw; top: 12%; }
  .cg-tx { padding: 0 10px 10px; } .cg-tx small { font-size: 10.5px; } .cg-tag { top: 8px; right: 8px; font-size: 9px; padding: 4px 7px; }
  .hub .hp-gift { display: none; }
  .hub .hp-bar { width: 70px; }
  .hub .mode-title b { font-size: 20px; }
}
@media (max-height: 520px) {
  .rail-art { display: none; } .rail-face { justify-content: center; gap: 12px; padding: 10px 0; }
  .rail-name b { font-size: clamp(20px, 24cqw, 40px); }
  .cw { gap: 8px; padding: 8px 16px; } .cw-title h1 { font-size: 34px; margin: 0; } .cw-title p { display: none; }
  .cw-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 4px; } .cgame { aspect-ratio: auto; height: 100%; max-height: 190px; } .cg-art { --pw: 24cqw; top: 8%; }
  .cw-back { height: 34px; font-size: 12px; }
  .hub .mode-title b { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hub *, .hub *::before, .hub *::after { animation: none !important; }
  .hub-track, .world, .rail-face { transition-duration: .01s; }
}

/* =====================================================================
   BATAK (js/batak.js) — neon masa, alt ortada yelpaze el, ortada dört kâğıtlık el alanı
   ===================================================================== */
body.scr-batak .batak { display: flex; }
body.scr-batak .topbar { display: none; }
.batak { --x-font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --x-display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --cw: clamp(52px, min(9.5vw, 15vh), 98px); --tw: clamp(50px, min(11vw, 12vh), 88px);
  position: relative; flex-direction: column; overflow: hidden; font-family: var(--x-font); color: #fff; font-variant-numeric: tabular-nums;
  background: radial-gradient(70% 55% at 15% 0%, rgba(18,200,255,.32), transparent 65%), radial-gradient(70% 60% at 100% 100%, rgba(122,92,255,.4), transparent 65%),
    radial-gradient(50% 40% at 80% 10%, rgba(255,79,216,.18), transparent 70%), #07040f; }
.batak button { font-family: inherit; }
.bt { flex: 1; min-height: 0; width: 100%; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }

.bt-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 6px; }
.bt-chip { flex: none; height: 40px; padding: 0 16px; border-radius: 999px; font: 600 13.5px var(--x-font); color: #fff; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16); box-shadow: none; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background .15s; }
.bt-chip:hover { background: rgba(255,255,255,.16); }
.bt-info { min-width: 0; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: rgba(255,255,255,.75); }
.bt-info > span { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; white-space: nowrap; background: rgba(8,4,22,.5); border: 1px solid rgba(255,255,255,.12); }
.bt-info b { color: #fff; font-weight: 700; }
.bt-suit { font: 400 1.25em/1 'Times New Roman', 'Apple Symbols', 'Segoe UI Symbol', serif; color: #fff; }
.bt-suit.red { color: #ff4a6e; }

/* ---- masa ---- */
.bt-table { position: relative; min-height: 0; }
.bt-felt { position: absolute; inset: 44px max(8%, 54px) 6px; border-radius: 999px;
  background: radial-gradient(ellipse at 50% 38%, #1c7fd6 0%, #123f9c 48%, #0a1550 100%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.2), 0 0 0 9px rgba(10,6,30,.85), 0 0 0 11px #35d9ff, 0 0 60px -4px rgba(53,217,255,.75), inset 0 0 70px rgba(4,4,30,.75); }
.bt-felt::after { content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: .5; background-image: var(--felt-pattern); background-size: 26px 26px; }
.bt-seat { position: absolute; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: rgba(10,6,28,.82); border: 1px solid rgba(255,255,255,.16); transition: box-shadow .25s, border-color .25s; }
.bt-seat.s2 { left: 50%; top: 4px; transform: translateX(-50%); }
.bt-seat.s3 { left: 8px; top: 50%; transform: translateY(-50%); }
.bt-seat.s1 { right: 8px; top: 50%; transform: translateY(-50%); }
.bt-seat.on { border-color: #ffc24a; box-shadow: 0 0 0 2px rgba(255,194,74,.5), 0 0 26px rgba(255,194,74,.7); }
.bt-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 16px var(--x-display); color: #fff;
  background: linear-gradient(145deg, #12c8ff, #7a5cff); }
.bt-seat.bidder .bt-av { background: linear-gradient(145deg, #ff2e7e, #ff8a2a); }
.bt-nm { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.bt-nm b { font: 600 13.5px var(--x-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.bt-nm small { min-height: 13px; font-size: 11.5px; color: #ffd58a; white-space: nowrap; }
.bt-say { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  font: 800 14px var(--x-display); font-style: normal; color: #1c0d00; background: #ffc24a; box-shadow: 0 6px 16px rgba(0,0,0,.4); animation: btpop .3s cubic-bezier(.2,.8,.2,1.4) both; }
.bt-say.pas { color: #fff; background: rgba(40,34,70,.95); border: 1px solid rgba(255,255,255,.2); font-weight: 600; font-size: 12px; }
@keyframes btpop { from { transform: translateX(-50%) scale(.5); opacity: 0; } }

.bt-trick { position: absolute; left: 50%; top: 50%; width: 0; height: 0; --pw: var(--tw); }
.tk { position: absolute; left: calc(var(--tw) / -2); top: calc(var(--tw) * -.7); transition: transform .42s cubic-bezier(.5,0,.75,0), opacity .42s ease; }
.tk.k0 { transform: translate(0, 46%); } .tk.k1 { transform: translate(78%, 0) rotate(5deg); }
.tk.k2 { transform: translate(0, -46%); } .tk.k3 { transform: translate(-78%, 0) rotate(-5deg); }
.tk.in .pcard { animation: tkin .34s cubic-bezier(.2,.8,.2,1) both; }
.tk.k0.in .pcard { --fx: 0; --fy: 150%; } .tk.k1.in .pcard { --fx: 220%; --fy: 0; } .tk.k2.in .pcard { --fx: 0; --fy: -150%; } .tk.k3.in .pcard { --fx: -220%; --fy: 0; }
@keyframes tkin { from { transform: translate(var(--fx), var(--fy)) scale(.75); opacity: 0; } }
.tk.win { z-index: 1; } .tk.win .pcard { box-shadow: 0 0 0 3px #ffc24a, 0 0 30px rgba(255,194,74,.9), 0 10px 24px rgba(0,0,0,.45); }
.bt-trick.to0 .tk { transform: translate(0, 300%) scale(.35); opacity: 0; } .bt-trick.to1 .tk { transform: translate(420%, 0) scale(.35); opacity: 0; }
.bt-trick.to2 .tk { transform: translate(0, -300%) scale(.35); opacity: 0; } .bt-trick.to3 .tk { transform: translate(-420%, 0) scale(.35); opacity: 0; }
.bt-msg { position: absolute; z-index: 1; left: 50%; bottom: 12%; transform: translateX(-50%); max-width: 80%; padding: 5px 14px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 12.5px; color: rgba(255,255,255,.88); background: rgba(6,4,24,.55); }
.bt-msg:empty { display: none; }

/* ihale / koz paneli */
.bt-panel { position: absolute; z-index: 4; left: 50%; bottom: 8px; transform: translateX(-50%); width: min(94%, 520px); display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px; border-radius: 22px; background: rgba(12,7,32,.92); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 40px -8px #7a5cff;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: btpanel .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes btpanel { from { transform: translate(-50%, 24px) scale(.96); opacity: 0; } }
.bt-panel small { font: 600 12.5px var(--x-font); letter-spacing: .4px; color: rgba(255,255,255,.75); }
.bt-nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bt-num { width: 46px; height: 46px; padding: 0; border: 0; border-radius: 14px; font: 800 18px var(--x-display); color: #fff;
  background: linear-gradient(145deg, #12b4ff, #6a4cff); box-shadow: 0 8px 18px -8px #12b4ff; transition: transform .15s; }
.bt-num:hover { transform: translateY(-3px) scale(1.06); }
.bt-pass { height: 42px; min-width: 150px; padding: 0 24px; border-radius: 999px; font: 700 14px var(--x-font); color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); box-shadow: none; }
.bt-pass:hover { background: rgba(255,255,255,.2); }
.bt-suits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; }
.bt-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 0; border-radius: 16px; color: #15161c; background: linear-gradient(160deg, #fff, #dfe4f2);
  box-shadow: 0 10px 22px -10px rgba(0,0,0,.8); transition: transform .15s; }
.bt-pick:hover { transform: translateY(-4px) scale(1.04); }
.bt-pick.red { color: #e3173f; }
.bt-pick em { font: 400 38px/1 'Times New Roman', 'Apple Symbols', 'Segoe UI Symbol', serif; font-style: normal; }
.bt-pick span { font: 700 12px var(--x-font); color: #2a2c3a; }

/* ---- benim elim ---- */
.bt-me { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); }
.bt-me .bt-seat { position: static; transform: none; }
.bt-hand { --pw: var(--cw); display: flex; justify-content: center; width: 100%; max-width: calc(var(--cw) * 7.6); height: calc(var(--cw) * 1.4); }
.hs { flex: 0 1 var(--cw); min-width: 0; height: 100%; }
.hs:last-child { flex: 0 0 var(--cw); }
.hc { cursor: default; transition: transform .18s cubic-bezier(.2,.8,.2,1), filter .18s, box-shadow .18s; box-shadow: -4px 4px 12px rgba(0,0,0,.4), inset 0 0 0 1px rgba(0,0,0,.1); }
.bt-hand .pcard + .pcard { margin-left: 0; }
.hc.can { cursor: pointer; transform: translateY(-8px); box-shadow: -4px 4px 12px rgba(0,0,0,.4), 0 0 0 2px #ffc24a, 0 0 18px rgba(255,194,74,.6); }
.hc.can:hover, .hc.can:focus-visible { transform: translateY(-24px); outline: 0; }
.hc.no { filter: brightness(.5) saturate(.6); }
.bt-hand.deal .hc { animation: btdeal .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--n) * 35ms); }
@keyframes btdeal { from { transform: translateY(120%) rotate(8deg); opacity: 0; } }

/* ---- el sonu / puanlar ---- */
.bt-over { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(4,2,14,.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: btfade .25s both; }
@keyframes btfade { from { opacity: 0; } }
.bt-card { width: min(100%, 520px); max-height: 100%; overflow: auto; padding: 22px; border-radius: 24px; background: #120a2a; border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 60px -12px #7a5cff; animation: rise .4s cubic-bezier(.2,.8,.2,1) both; }
.bt-card.won { box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 70px -6px #ffc24a; border-color: #ffc24a; }
.bt-card h3 { margin: 0 0 4px; font: 900 26px var(--x-display); letter-spacing: -.4px; color: #fff; }
.bt-card p { margin: 0 0 14px; font-size: 13.5px; color: rgba(255,255,255,.75); }
.bt-table-sc { width: 100%; border-collapse: collapse; font-size: 13px; }
.bt-table-sc th { padding: 6px 4px; font-weight: 600; font-size: 12px; color: rgba(255,255,255,.7); text-align: center; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
.bt-table-sc td { padding: 7px 4px; text-align: center; border-top: 1px solid rgba(255,255,255,.1); font-weight: 700; color: #8ff0c0; }
.bt-table-sc td:first-child { text-align: left; font-weight: 500; color: rgba(255,255,255,.85); white-space: nowrap; }
.bt-table-sc td i { display: block; font-style: normal; font-size: 11px; color: rgba(255,255,255,.55); }
.bt-table-sc td small { display: block; font-weight: 400; font-size: 10.5px; color: rgba(255,255,255,.5); }
.bt-table-sc td.neg { color: #ff6b8a; } .bt-table-sc td.by { background: rgba(255,255,255,.06); }
.bt-table-sc td.empty { text-align: center; font-weight: 400; color: rgba(255,255,255,.55); }
.bt-table-sc tr.tot td { font-size: 16px; color: #fff; border-top: 2px solid rgba(255,255,255,.3); } .bt-table-sc tr.tot td.neg { color: #ff6b8a; }
.bt-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.bt-main, .bt-ghost { height: 46px; padding: 0 26px; border-radius: 14px; font: 700 14.5px var(--x-font); color: #fff; }
.bt-main { border: 0; background: linear-gradient(90deg, #12b4ff, #7a5cff); box-shadow: 0 10px 26px -10px #12b4ff; }
.bt-main:hover { filter: brightness(1.15); }
.bt-ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); box-shadow: none; }
.cgame.live .cg-tag { color: #04121c; background: #6fe9ff; border-color: #fff; box-shadow: 0 0 18px rgba(111,233,255,.8); }

@media (max-width: 760px) {
  .bt-top { padding: 8px 10px 4px; } .bt-chip { height: 36px; padding: 0 12px; font-size: 12.5px; }
  .bt-info { font-size: 11.5px; gap: 4px; } .bt-info > span { height: 26px; padding: 0 9px; }
  .bt-felt { inset: 50px 30px 8px; border-radius: 120px; }
  .bt-seat.s3, .bt-seat.s1 { flex-direction: column; gap: 3px; padding: 5px 7px; border-radius: 16px; text-align: center; }
  .bt-seat.s3 { left: 4px; } .bt-seat.s1 { right: 4px; }
  .bt-seat.s3 .bt-nm, .bt-seat.s1 .bt-nm { align-items: center; } .bt-nm b { max-width: 62px; font-size: 12px; }
  .bt-av { width: 34px; height: 34px; font-size: 14px; }
  .bt-num { width: 42px; height: 42px; font-size: 16px; }
  .bt-card { padding: 16px; } .bt-card h3 { font-size: 22px; }
}
@media (max-height: 520px) {
  .batak { --cw: clamp(44px, 17vh, 70px); --tw: clamp(40px, 15vh, 60px); }
  .bt-top { padding: 4px 12px 0; } .bt-chip { height: 30px; } .bt-info > span { height: 24px; }
  .bt-felt { inset: 30px 16% 2px; }
  .bt-me { flex-direction: row; justify-content: center; gap: 12px; padding: 4px 12px 6px; }
  .bt-msg { bottom: 4%; } .bt-av { width: 30px; height: 30px; }
  .bt-panel { padding: 8px; gap: 6px; } .bt-num { width: 36px; height: 36px; font-size: 15px; } .bt-pass { height: 34px; } .bt-pick { padding: 4px; } .bt-pick em { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .batak *, .batak *::before, .batak *::after { animation: none !important; transition-duration: .01s !important; } }

/* ---- Batak: çok oyunculu ekler ---- */
.tf-adv.only-common .okey-only { display: none; }
.practice-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; padding: 9px 18px 9px 12px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 13.5px;
  background: linear-gradient(90deg, #12b4ff, #7a5cff); border: 0; box-shadow: 0 10px 24px -10px #12b4ff; }
.practice-btn:hover { filter: brightness(1.12); }
.practice-btn .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.practice-btn small { margin-left: 4px; font-weight: 500; opacity: .8; }
.bt-load { place-self: center; grid-row: 2; color: rgba(255,255,255,.7); }
.bt-nm u { text-decoration: none; font-weight: 400; font-size: 11px; color: rgba(255,255,255,.55); }
.bt-seat.away .bt-av { filter: grayscale(1) brightness(.7); }
.bt-clock { position: absolute; left: 14px; right: 14px; bottom: -5px; height: 4px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.18); }
.bt-clock i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #ff2e7e, #ffc24a); transform-origin: 0 50%; transform: scaleX(var(--f, 1));
  animation: btclock linear forwards; }
@keyframes btclock { to { transform: scaleX(0); } }
.bt-pot b { color: #ffd58a; }
.bt-watch { padding: 18px; font-size: 13px; color: rgba(255,255,255,.65); }
.bt-me .bt-say { top: auto; bottom: calc(100% + 6px); }
.bt-auto { margin-right: auto; align-self: center; font-size: 12px; color: rgba(255,255,255,.55); }
.bt-card .payout { margin: 0 0 14px; }
body.scr-batak .chat-fab { top: 62px; right: 12px; }
@media (prefers-reduced-motion: reduce) { .bt-clock i { animation: btclock linear forwards !important; } }
.bt-card .payout { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); box-shadow: none; }
.bt-card .payout.win { background: rgba(255,194,74,.14); border-color: rgba(255,194,74,.6); }
.bt-card .payout b { color: #ffd58a; } .bt-card .payout small { color: rgba(255,255,255,.7); } .bt-card .payout .xp-gain { color: #8ff0c0; font-weight: 700; }

/* =====================================================================
   PİŞTİ · KING · POKER (js/cardgames.js) — Batak masasının üzerine oyuna özel parçalar
   ===================================================================== */
.pcard.back { background: repeating-linear-gradient(45deg, #5a2fd6 0 6px, #7a4cff 6px 12px); border: calc(var(--pw, 64px) * .06) solid #fff; }
.pcard.back > * { display: none; }
.cg-help { margin: 14px 0 0 !important; font-size: 12.5px !important; line-height: 1.5; color: rgba(255,255,255,.6) !important; }
.bt-seat.fold { opacity: .45; }
/* Pişti: ortada yer (üst üste kâğıtlar) ve deste */
.tk.pc { transform: none; } .tk.pc.pstack { transform: translate(-16%, 4%) rotate(-9deg); } .tk.pc.pund { transform: translate(-8%, 2%) rotate(-4deg); }
.tk.pc.ptop { transform: translate(8%, -2%) rotate(5deg); z-index: 1; }
.cg-pile-n { position: absolute; z-index: 1; left: 50%; top: calc(50% + var(--tw) * .82); transform: translateX(-50%); font-size: 12px; white-space: nowrap; color: rgba(255,255,255,.8); }
.cg-pile-n b { color: #ffd58a; }
.g-pisti .bt-msg { bottom: 6%; }
.cg-deck { position: absolute; left: calc(50% - var(--tw) * 2.6); top: 50%; transform: translateY(-50%); --pw: calc(var(--tw) * .62); display: grid; justify-items: center; gap: 4px; }
.cg-deck .pcard { box-shadow: 3px 3px 0 #2a1470, 6px 6px 0 #1c0d52; }
.cg-deck b { font: 700 12px var(--x-font); color: rgba(255,255,255,.85); }
/* King: oyun seçimi */
.kg-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
.kg-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; padding: 7px 4px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #ff2e7e, #a02cff); box-shadow: 0 8px 18px -10px #ff2e7e; transition: transform .15s; }
.kg-opt b { font: 800 13px var(--x-display); } .kg-opt small { font: 500 10.5px var(--x-font) !important; letter-spacing: 0 !important; color: rgba(255,255,255,.85) !important; }
.kg-opt.koz { background: linear-gradient(145deg, #12b4ff, #2bd67b); box-shadow: 0 8px 18px -10px #12b4ff; }
.kg-opt:hover:not(:disabled) { transform: translateY(-3px); }
.kg-opt:disabled { opacity: .35; filter: grayscale(.8); cursor: default; }
/* Poker: ortak kâğıtlar, pot, bahisler */
.pk-board { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); display: flex; gap: calc(var(--tw) * .1); --pw: calc(var(--tw) * .92); }
.pk-slot { width: var(--pw); aspect-ratio: 5 / 7; border-radius: calc(var(--pw) * .12); }
.pk-slot.empty { border: 1.5px dashed rgba(255,255,255,.25); background: rgba(4,4,30,.25); }
.pk-slot .pcard { margin: 0; box-shadow: 0 8px 18px rgba(0,0,0,.45); }
.pk-slot.in .pcard { animation: pkflip .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(max(var(--n), 0) * 120ms); }
@keyframes pkflip { from { transform: translateY(-40%) rotateY(90deg); opacity: 0; } }
.pk-pot { position: absolute; left: 50%; top: calc(46% + var(--tw) * .92); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; color: rgba(255,255,255,.85); background: rgba(6,4,24,.7); border: 1px solid rgba(255,194,74,.5); }
.pk-pot b { color: #ffd58a; font-size: 14px; }
.g-poker .bt-msg { bottom: 4%; }
.pk-d { position: absolute; left: 30px; top: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 800 10px var(--x-display); font-style: normal; color: #1c0d00; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.pk-bet { position: absolute; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 4px; border-radius: 999px; white-space: nowrap; font: 700 12px var(--x-font); font-style: normal; color: #ffd58a; background: rgba(6,4,24,.85); border: 1px solid rgba(255,194,74,.45); }
.bt-seat.s2 .pk-bet { left: 50%; top: calc(100% + 34px); transform: translateX(-50%); }
.bt-seat.s3 .pk-bet { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.bt-seat.s1 .pk-bet { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.bt-me .pk-bet { left: 50%; bottom: calc(100% + 34px); transform: translateX(-50%); }
.pk-hole { display: flex; --pw: 30px; margin-left: 2px; }
.pk-hole .pcard { box-shadow: 0 2px 6px rgba(0,0,0,.4); } .pk-hole .pcard em { display: none; }
.pk-hole .pcard b { font-size: 12px; left: 12%; top: 8%; } .pk-hole .pcard i { font-size: 11px; left: 12%; top: 42%; }
.g-poker .bt-hand { height: calc(var(--cw) * 1.4); gap: 6px; } .g-poker .bt-hand.folded { opacity: .4; }
.g-poker .hs { flex: 0 0 var(--cw); }
.pk-name { position: absolute; right: max(12px, calc(50% - var(--cw) * 3.2)); bottom: calc(16px + env(safe-area-inset-bottom)); padding: 4px 12px; border-radius: 999px; font: 700 12.5px var(--x-font); color: #04121c; background: #6fe9ff; }
.pk-panel { width: min(96%, 560px); gap: 8px; padding: 10px; }
.pk-acts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; width: 100%; }
.pk-btn { height: 48px; padding: 0 8px; border: 0; border-radius: 14px; font: 700 14px var(--x-font); color: #fff; white-space: nowrap; }
.pk-btn b { font-weight: 800; }
.pk-btn.fold { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); box-shadow: none; }
.pk-btn.call { background: linear-gradient(90deg, #12b4ff, #7a5cff); box-shadow: 0 10px 22px -10px #12b4ff; }
.pk-btn.raise { color: #1c0d00; background: linear-gradient(90deg, #ffc24a, #ff8a2a); box-shadow: 0 10px 22px -10px #ffc24a; }
.pk-btn:hover { filter: brightness(1.12); }
.pk-raise { display: flex; align-items: center; gap: 10px; width: 100%; }
.pk-pre { display: flex; gap: 4px; flex: none; }
.pk-pre button { height: 30px; padding: 0 10px; border-radius: 999px; font: 600 11.5px var(--x-font); color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); box-shadow: none; }
.pk-pre button:hover { background: rgba(255,255,255,.22); }
.pk-range { flex: 1; min-width: 0; height: 30px; accent-color: #ffc24a; }
/* kâğıt oyunu lobileri: oyun seçici şerit */
.game-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.game-tabs button { height: 34px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 13px; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); box-shadow: none; }
.game-tabs button.on { color: #fff; background: linear-gradient(90deg, #12b4ff, #7a5cff); border-color: transparent; }
@media (max-width: 760px) {
  .kg-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kg-opt.koz { grid-column: 1 / -1; min-height: 40px; }
  .cg-deck { left: 40px; top: 30%; }
  .pk-board { --pw: min(calc(var(--tw) * .92), 12.5vw); gap: 3px; }
  .g-poker .bt-seat.s3 .pk-hole, .g-poker .bt-seat.s1 .pk-hole { --pw: 24px; margin: 0; }
  .bt-seat.s3 .pk-bet { left: 4px; top: calc(100% + 6px); transform: none; } .bt-seat.s1 .pk-bet { right: 4px; top: calc(100% + 6px); transform: none; }
  .pk-raise { flex-direction: column; align-items: stretch; gap: 4px; } .pk-pre { justify-content: space-between; } .pk-pre button { flex: 1; padding: 0 4px; }
  .pk-btn { height: 44px; font-size: 13px; }
}
@media (max-height: 520px) {
  .pk-panel { padding: 6px; gap: 4px; } .pk-btn { height: 36px; } .pk-raise { flex-direction: row; } .kg-opt { min-height: 38px; padding: 3px; }
  .pk-name { bottom: 6px; }
}
.g-poker .bt-me .bt-seat { position: relative; }
.pk-board { --pw: min(calc(var(--tw) * .8), 8.4vw); }
@media (max-width: 760px) {
  .pk-board { --pw: min(calc(var(--tw) * .92), 12.5vw); }
  .g-poker .bt-seat.s3, .g-poker .bt-seat.s1 { top: 22%; }
}

/* =====================================================================
   ANA EKRAN v4 — sade, tek vurgulu (mavi) tasarım. v3'ün düzenini ve kayan kartını korur;
   neon geçişler, parlamalar ve çok renkli zeminler yerine nötr yüzeyler, ince çizgiler ve yumuşak derinlik.
   Her oyunun/salonun kendi rengi (--g) yalnızca küçük bir ışık ve nokta olarak kullanılır.
   ===================================================================== */
.home {
  --m-bg: #0b0c0f; --m-surface: #15171c; --m-surface-2: #1d2027; --m-line: rgba(255,255,255,.09); --m-line-2: rgba(255,255,255,.18);
  --m-text: #f1f3f6; --m-dim: #a5abb8; --m-blue: #0866ff; --m-blue-hi: #5b9bff;
  --x-bg: var(--m-bg); --x-panel: var(--m-surface); --x-panel-2: var(--m-surface-2); --x-line: var(--m-line);
  --x-green: var(--m-blue); --x-green-2: #0553d1; --x-green-hi: var(--m-blue-hi); --x-dim: var(--m-dim); --x-mute: #6f7684;
  background: var(--m-bg);
}
.hub-bg { background: radial-gradient(90% 60% at 50% -10%, #17213a 0%, rgba(11,12,15,0) 62%), var(--m-bg); }
.au { filter: blur(110px); animation-duration: 40s; }
.au.a1, .hub[data-world="cards"] .au.a1 { background-color: #0866ff; opacity: .16; }
.au.a2, .hub[data-world="cards"] .au.a2 { background-color: #3b4a7a; opacity: .14; }
.au.a3, .hub-grid { display: none; }

/* ---- kayan kart (rail): cam yüzey ---- */
.rail { --glow: transparent; background: var(--m-surface); box-shadow: inset 1px 0 0 var(--m-line), inset -1px 0 0 var(--m-line); transition: background .25s ease; }
.hub[data-world="cards"] .rail { --glow: transparent; }
.rail:hover { filter: none; background: var(--m-surface-2); }
.rail::before, .rail::after, .rail-shine { display: none; }
.rail-face::before { background: radial-gradient(120% 40% at 50% 0%, rgba(8,102,255,.22), transparent 70%); }
.f-cards, .f-okey { background: none; }
.rail-art { animation-duration: 7s; }
.rail-name b { font-weight: 700; letter-spacing: .02em; text-shadow: none; }
.rail-name small { letter-spacing: .24em; color: var(--m-dim); }
.rail-go { width: clamp(30px, 34cqw, 48px); height: clamp(30px, 34cqw, 48px); border-radius: 50%; align-items: center; justify-content: center; gap: 0;
  background: var(--m-blue); box-shadow: 0 8px 24px -8px rgba(8,102,255,.8); transition: transform .3s var(--ease-pop); }
.rail:hover .rail-go { transform: translateX(-4px); } .rail:hover .f-okey .rail-go { transform: scaleX(-1) translateX(-4px); }
.rail-go i { animation: none; opacity: 1; width: 9px; height: 9px; border-width: 2.5px 2.5px 0 0; margin-left: 3px; transform: rotate(-135deg); }
.rail-go i + i { display: none; }
.hub.swapping .rail { animation: none; }

/* ---- üst çubuk, yan panel, alt çubuk ---- */
.hub .hp-profile, .hub .hp-coins, .hub .hp-gift, .hub .dock-btn, .cw-bal { background: var(--m-surface); border-color: var(--m-line); -webkit-backdrop-filter: none; backdrop-filter: none; }
.hub .hp-profile:hover, .hub .hp-coins:hover, .hub .hp-gift:hover, .hub .dock-btn:hover { background: var(--m-surface-2); }
.hub .hp-av { background: var(--m-blue); box-shadow: none; }
.hub .hp-lvl { background: #fff; color: #0b0c0f; }
.hub .hp-bar i { background: var(--m-blue-hi); box-shadow: none; }
.hub .hp-plus { background: var(--m-blue); }
.hub .hp-gift.ready { background: var(--m-blue); border-color: transparent; animation: none; }
.home-logo small { color: var(--m-dim); letter-spacing: 3px; }
.hub .row-head h2 { font: 700 20px var(--x-display); letter-spacing: -.2px; background: none; color: var(--m-text); }
.hub .home-side { border-radius: 24px; background: var(--m-surface); border-color: var(--m-line); box-shadow: 24px 0 36px -14px var(--m-bg); }
.hub .feat-ic { background: var(--m-surface-2); }
.hub .feat.hot .feat-ic { background: var(--m-blue); box-shadow: none; }
.hub .dock-btn { border-radius: 18px; } .hub .dock-btn:hover { transform: translateY(-2px); }
.hub .dock-btn .badge-n { background: var(--m-blue); }
.hub .play-now { border-radius: 999px; background: var(--m-blue); box-shadow: 0 12px 32px -12px rgba(8,102,255,.9); animation: none; }
.hub .play-now::after { display: none; }
.hub .play-now:hover { transform: translateY(-2px); filter: none; background: #2b7bff; }
.hub .play-now b { font-weight: 700; letter-spacing: 0; text-transform: none; text-shadow: none; }

/* ---- salon kartları ve oyun kartları: nötr yüzey + oyunun renginde yumuşak ışık ---- */
.hub .mode-card, .cgame { background: var(--m-surface); border-radius: 26px; box-shadow: inset 0 0 0 1px var(--m-line), 0 24px 40px -30px #000;
  transition: transform .35s var(--ease-pop), box-shadow .25s ease; }
.hub .mode-card:hover, .hub .mode-card:focus-visible, .cgame:hover, .cgame:focus-visible { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--m-line-2), 0 30px 50px -28px #000; }
.hub .mode-card::after, .cgame::after { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; transform: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.1), transparent 65%); }
.hub .mode-card:hover::after, .cgame:hover::after { transform: none; opacity: 1; transition: opacity .3s ease; }
.hub .t-klasik { --g: #4a8dff; } .hub .t-usta { --g: #2fbf8f; } .hub .t-vip { --g: #e0a23a; } .hub .t-pairs { --g: #8f7bff; } .hub .t-cup { --g: #e0a23a; }
.hub .t-klasik .mode-art, .hub .t-usta .mode-art, .hub .t-vip .mode-art, .hub .t-pairs .mode-art, .hub .t-cup .mode-art {
  background: radial-gradient(85% 60% at 50% 22%, color-mix(in srgb, var(--g) 38%, transparent), transparent 72%), var(--m-surface); }
.mode-art::after { background: linear-gradient(180deg, transparent 45%, var(--m-surface) 78%); }
.hub .mode-card:hover .mode-art > * { transform: translateY(-4px) scale(1.04); }
.hub .mode-title b { font-weight: 700; font-size: 22px; }
.hub .mode-go { border-radius: 999px; background: var(--m-blue); box-shadow: none; }
.hub .mode-card:hover .mode-go { background: #2b7bff; color: #fff; }
.hub .lock-pill { border-radius: 999px; }

/* ---- iskambil dünyası ---- */
.cw-title small { letter-spacing: 3px; color: var(--m-blue-hi); }
.cw-title h1 { font: 700 clamp(34px, 5vw, 64px)/1 var(--x-display); letter-spacing: -.035em; background: none; color: var(--m-text); filter: none; }
.cw-title p { color: var(--m-dim); }
.cgame { aspect-ratio: 4 / 5; }
.cgame::before { background: linear-gradient(180deg, transparent 42%, var(--m-surface) 70%); }
.cg-a { --g: #4a8dff; } .cg-b { --g: #8f7bff; } .cg-c { --g: #e0607a; } .cg-d { --g: #2fbf8f; }
.cg-a, .cg-b, .cg-c, .cg-d { background: radial-gradient(85% 55% at 50% 20%, color-mix(in srgb, var(--g) 36%, transparent), transparent 72%), var(--m-surface); }
.cgame:hover .cg-art { transform: translateY(-4px) scale(1.04); }
.cg-tx { padding: 0 20px 10px; gap: 4px; }
.cg-tx b { font-weight: 700; letter-spacing: -.02em; }
.cg-tx small { font-size: 12.5px; color: var(--m-dim); }
.cg-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 14px 14px; padding: 8px 8px 8px 12px; border-radius: 999px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--m-line); }
.cg-live { min-width: 0; display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--x-font); color: var(--m-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-live b { color: var(--m-text); font-weight: 600; }
.cg-live .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #5a6170; }
.cg-live .dot.live { background: var(--g); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 25%, transparent); }
.cg-go { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 999px; font: 600 12.5px var(--x-font); color: #fff; background: var(--m-blue); transition: background .2s; }
.cgame:hover .cg-go { background: #2b7bff; }
.cg-go .ic { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.cw-foot { gap: 10px; }
.cw-back { background: var(--m-surface); border-color: var(--m-line); font-weight: 500; }
.cw-back:hover { background: var(--m-surface-2); transform: none; }
.cw-back .ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (max-width: 1100px) { .cgame { aspect-ratio: 5 / 4; } }
@media (max-width: 760px) and (min-height: 521px) {
  .cgame { aspect-ratio: 3 / 4; border-radius: 20px; } .cg-tx { padding: 0 12px 8px; }
  .cg-meta { margin: 0 8px 8px; padding: 5px 5px 5px 8px; } .cg-live { font-size: 10.5px; } .cg-go { height: 26px; padding: 0 9px; font-size: 11.5px; }
  .cw-back { height: 42px; padding: 0 14px 0 10px; font-size: 13px; }
}
@media (max-height: 520px) { .cgame { aspect-ratio: auto; } .cg-meta { margin: 0 8px 8px; padding: 3px 3px 3px 8px; } .cg-tx { padding: 0 12px 4px; } .cg-tx small { display: none; } }

/* =====================================================================
   KURALLAR PENCERESİ (js/rules.js) ve oyun içi "?" düğmesi
   ===================================================================== */
.bt-right { flex: none; display: flex; gap: 6px; }
.bt-q { width: 40px; padding: 0; font-weight: 700; font-size: 16px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .hero-btns .practice-btn { margin-top: 0; }
.practice-btn.ghost { padding: 9px 18px 9px 14px; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.22); box-shadow: none; }
.practice-btn.ghost:hover { filter: none; background: rgba(255,255,255,.16); }
.gr-over { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(6,7,10,.66);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-family: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif; }
.gr-over.show { display: flex; animation: btfade .2s both; }
.gr-sheet { width: min(100%, 620px); max-height: min(100%, 780px); display: flex; flex-direction: column; overflow: hidden; border-radius: 28px; color: #f1f3f6; background: #15171c;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 40px 100px -20px #000; animation: rise .35s cubic-bezier(.2,.8,.2,1) both; }
.gr-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; }
.gr-tabs { flex: 1; min-width: 0; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: #0b0c0f; overflow-x: auto; scrollbar-width: none; }
.gr-tabs::-webkit-scrollbar { display: none; }
.gr-tabs button { flex: 1; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; font: 600 13px inherit; font-family: inherit; color: #a5abb8; background: none; box-shadow: none; white-space: nowrap; transition: background .2s, color .2s; }
.gr-tabs button:hover { color: #fff; }
.gr-tabs button.on { color: #fff; background: #0866ff; }
.gr-x { flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; font: 400 24px/1 inherit; font-family: inherit; color: #f1f3f6; background: #1d2027; box-shadow: none; }
.gr-x:hover { background: #2a2e37; }
.gr-body { min-height: 0; overflow: auto; padding: 8px 22px 24px; }
.gr-head small { font: 600 11px inherit; font-family: inherit; letter-spacing: 3px; text-transform: uppercase; color: #5b9bff; }
.gr-head h2 { margin: 4px 0 2px; font: 700 34px/1.05 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, sans-serif; letter-spacing: -.03em; color: #fff; }
.gr-head p { margin: 0; font-size: 14px; color: #a5abb8; }
.gr-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 6px; }
.gr-facts span { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 18px; background: #1d2027; }
.gr-facts b { font: 700 22px/1 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif; letter-spacing: -.02em; color: #fff; }
.gr-facts small { font-size: 12px; color: #a5abb8; }
.gr-sec { padding: 16px 0 0; }
.gr-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 600 15px inherit; font-family: inherit; color: #fff; }
.gr-sec h3 i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 11.5px inherit; font-family: inherit; font-style: normal; color: #5b9bff; background: rgba(8,102,255,.18); }
.gr-sec ul { margin: 0; padding: 0 0 0 32px; list-style: none; display: grid; gap: 6px; }
.gr-sec li { position: relative; font-size: 14px; line-height: 1.5; color: #c9ced8; }
.gr-sec li::before { content: ''; position: absolute; left: -16px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: #4b5261; }
.gr-sec dl { margin: 0 0 0 32px; border-radius: 16px; overflow: hidden; background: #1d2027; }
.gr-sec dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 9px 14px; font-size: 13.5px; }
.gr-sec dl div + div { border-top: 1px solid rgba(255,255,255,.07); }
.gr-sec dt { color: #f1f3f6; font-weight: 500; } .gr-sec dd { margin: 0; text-align: right; color: #a5abb8; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .bt-q { width: 36px; }
  .gr-over { padding: 0; align-items: flex-end; } .gr-sheet { width: 100%; max-height: 92%; border-radius: 26px 26px 0 0; }
  .gr-body { padding: 6px 16px calc(20px + env(safe-area-inset-bottom)); } .gr-head h2 { font-size: 28px; }
  .gr-sec ul { padding-left: 22px; } .gr-sec dl { margin-left: 0; } .gr-facts span { padding: 10px; } .gr-facts b { font-size: 18px; }
}
@media (max-width: 1100px) and (min-width: 761px) { .cg-art { --pw: 17cqw; top: 9%; } }
