/* ==========================================================================
   SEZEN MASA — "Sedef & Ceviz" teması
   Ceviz ahşap, sedef kakma, yeşil çuha, pirinç ve fildişi. Mobil öncelikli.
   ========================================================================== */
:root {
  --walnut-950: #160d08;
  --walnut-900: #1f130d;
  --walnut-800: #2a1a12;
  --walnut-700: #3b2619;
  --walnut-600: #533522;
  --walnut-400: #8a5e3b;
  --felt-800: #0a3a30;
  --felt-700: #0e4a3d;
  --felt-600: #13594a;
  --felt-500: #1b6c59;
  --sedef: #efe8da;
  --sedef-2: #dfe9ec;
  --sedef-3: #f1e1e6;
  --brass: #c9a045;
  --brass-hi: #ecd085;
  --brass-lo: #84641f;
  --nar: #b3323b;
  --ink: #f4ecdf;
  --ink-dim: #cdbca5;
  --ink-mute: #9b8770;
  --good: #6fbf8e;
  --warn: #e6b45a;
  --bad: #e2675f;
  --ivory: #fbf6ea;
  --ivory-2: #e9dfc8;
  --ov: 239, 232, 218;          /* zemin üstü yarı saydam katman rengi (koyu temada açık) */
  --panel-rgb: 31, 19, 13;       /* yarı saydam panel rengi */
  --shadow-rgb: 0, 0, 0;
  --on-light: #2a1a12;           /* açık zemin (sedef, kart, balon) üstündeki yazı */
  --on-light-soft: #533522;
  --sink: 0, 0, 0;               /* çökük alanlar (girdi, segment, rozet zemini) */
  --card-rgb: 83, 53, 34;
  --accent-rgb: 201, 160, 69;
  --accent-hi-rgb: 236, 208, 133;
  --table-logo: url("../table_logo.png");
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --display: 'Alegreya', 'Iowan Old Style', Georgia, serif;
  --ui: 'Alegreya Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --top-h: calc(56px + env(safe-area-inset-top));
  --tab-h: calc(62px + env(safe-area-inset-bottom));
  --sheen: linear-gradient(118deg, var(--sedef) 0%, var(--sedef-2) 32%, var(--sedef-3) 58%, #f3efdc 82%, var(--sedef) 100%);
  --inlay:
    linear-gradient(135deg, var(--sedef) 25%, transparent 25%) -5px 0 / 10px 8px,
    linear-gradient(225deg, var(--sedef) 25%, transparent 25%) -5px 0 / 10px 8px,
    linear-gradient(315deg, var(--sedef) 25%, transparent 25%) 0 0 / 10px 8px,
    linear-gradient(45deg, var(--sedef) 25%, transparent 25%) 0 0 / 10px 8px,
    var(--walnut-700);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(var(--accent-rgb), .10), transparent 60%),
    repeating-linear-gradient(93deg, rgba(255, 255, 255, .014) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(87deg, rgba(0, 0, 0, .08) 0 1px, transparent 1px 13px),
    var(--walnut-900);
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.15; margin: 0; letter-spacing: .005em; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ------------------------------------------------------------- çip simgesi */
.chip {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: none; vertical-align: -3px; position: relative;
  background: radial-gradient(circle at 34% 28%, #fff4c8 0%, #f0cf72 28%, #c99a38 62%, #8d6620 100%);
  box-shadow: inset 0 0 0 1.5px rgba(122, 86, 22, .9), inset 0 0 0 3.5px rgba(255, 236, 170, .55), 0 1px 2px rgba(0, 0, 0, .5);
}
.chip::after { content: ''; position: absolute; inset: 30%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(122, 86, 22, .55); }
.chip.big { width: 44px; height: 44px; }

/* ------------------------------------------------------------- avatar: emaye madalyon */
.av {
  --s: 40px;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--s); height: var(--s); border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .16), transparent 46%),
    radial-gradient(circle at 50% 50%, hsl(var(--h) 40% 36%) 0%, hsl(var(--h) 46% 22%) 62%, hsl(var(--h) 50% 13%) 100%);
  box-shadow:
    inset 0 0 0 max(1.5px, calc(var(--s) * .045)) #d6af57,
    inset 0 0 0 max(2.5px, calc(var(--s) * .07)) rgba(38, 22, 10, .75),
    inset 0 1px max(3px, calc(var(--s) * .1)) rgba(0, 0, 0, .35),
    0 0 0 1px rgba(var(--panel-rgb), .6),
    0 2px 6px rgba(0, 0, 0, .45);
  line-height: 1;
}
.av::before { content: ''; position: absolute; inset: calc(var(--s) * .13); border-radius: 50%; border: 1px solid rgba(240, 211, 138, .2); pointer-events: none; }
.av::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(160deg, rgba(255, 255, 255, .2), transparent 35%); pointer-events: none; }
.av-letter { font-family: var(--display); font-weight: 800; font-size: calc(var(--s) * .44); color: #f5e1ad; text-shadow: 0 1px 0 rgba(0, 0, 0, .55), 0 0 6px rgba(240, 211, 138, .25); transform: translateY(-.02em); }
.av-svg { width: 58%; height: 58%; fill: none; stroke: #efd18a; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .55)); }
.av-svg .f { fill: #efd18a; stroke: none; }
.av-bot { position: absolute; right: calc(var(--s) * -.06); bottom: calc(var(--s) * -.06); width: max(15px, calc(var(--s) * .38)); height: max(15px, calc(var(--s) * .38)); border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: radial-gradient(circle at 40% 35%, #2c4a52, #14262c); box-shadow: 0 0 0 1.5px #d6af57, 0 1px 3px rgba(0, 0, 0, .5); }
.av-bot svg { width: 62%; height: 62%; fill: #9be3d2; }

/* ------------------------------------------------------------- butonlar */
.btn {
  appearance: none; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px;
  transition: transform .12s ease, filter .12s ease, background .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.sm { padding: 8px 12px; min-height: 38px; font-size: 14.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn small { font-weight: 500; opacity: .8; font-size: 12px; }
.btn.primary { background: linear-gradient(180deg, var(--felt-500), var(--felt-700)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 3px 0 var(--felt-800), 0 6px 14px rgba(0, 0, 0, .35); }
.btn.brass { background: linear-gradient(180deg, var(--brass-hi), var(--brass) 55%, #a9832f); color: #2a1a0a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--brass-lo), 0 6px 14px rgba(0, 0, 0, .35); }
.btn.ghost { background: rgba(var(--ov), .07); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(var(--ov), .2); }
.btn.danger { background: rgba(179, 50, 59, .18); color: #ffb9b3; box-shadow: inset 0 0 0 1.5px rgba(226, 103, 95, .5); }
.btn.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-hi-rgb), .55), 0 3px 0 var(--felt-800); } 50% { box-shadow: 0 0 0 7px rgba(var(--accent-hi-rgb), 0), 0 3px 0 var(--felt-800); } }
.chipbtn { border: 0; border-radius: 999px; padding: 7px 12px; font-size: 13.5px; font-weight: 700; background: rgba(var(--ov), .1); color: var(--ink-dim); min-height: 34px; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 12px; background: rgba(var(--ov), .07); font-size: 18px; }
.back { width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(var(--ov), .08); font-size: 28px; line-height: 1; flex: none; }
.switch { width: 50px; height: 30px; border-radius: 999px; border: 0; background: rgba(var(--ov), .16); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); transition: transform .2s; }
.switch.on { background: var(--felt-500); }
.switch.on::after { transform: translateX(20px); }
input[type=range] { accent-color: var(--brass); width: 150px; }

/* ------------------------------------------------------------- üst çubuk */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); padding: env(safe-area-inset-top) 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(180deg, rgba(var(--panel-rgb), .97), rgba(var(--panel-rgb), .9));
  backdrop-filter: blur(8px);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: var(--inlay); opacity: .9; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.brand { border: 0; background: none; padding: 0; display: flex; align-items: center; }
.brand-img { height: 34px; width: auto; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.chip-pill { display: flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 6px 6px 6px 10px; background: rgba(var(--sink), .35); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .45); font-weight: 800; font-variant-numeric: tabular-nums; }
.chip-pill .plus { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: var(--on-light); font-size: 17px; line-height: 1; }
.me-btn { border: 0; background: none; padding: 0; border-radius: 50%; }

/* ------------------------------------------------------------- sekme çubuğu */
#views { padding: 22px 14px calc(var(--tab-h) + 24px); max-width: 1080px; margin: 0 auto; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--tab-h); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: linear-gradient(0deg, var(--walnut-950), rgba(var(--panel-rgb), .96));
  box-shadow: 0 -1px 0 rgba(var(--ov), .08), 0 -8px 24px rgba(0, 0, 0, .45);
}
.tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--ink-mute); }
.tabbar .ti { font-size: 21px; line-height: 1; height: 24px; display: grid; place-items: center; filter: grayscale(.6); }
.tabbar button.on { color: var(--brass-hi); }
.tabbar button.on .ti { filter: none; transform: translateY(-1px); }
.ti-chip .chip { width: 20px; height: 20px; }

/* ------------------------------------------------------------- salon */
.notice { margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: var(--sheen); color: var(--on-light); font-weight: 700; font-size: 15px; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.notice.warn { background: rgba(230, 180, 90, .16); color: #f6dba3; box-shadow: inset 0 0 0 1.5px rgba(230, 180, 90, .5); }
pre.bank { white-space: pre-wrap; font-family: var(--ui); font-size: 15px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--sink), .3); margin: 10px 0; color: var(--ink); user-select: text; }
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(26px, 6.4vw, 38px); }
.hero-text p { color: var(--ink-dim); margin-top: 6px; max-width: 46ch; }
.guest-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-m); background: rgba(var(--accent-rgb), .1); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .35); max-width: 460px; }
.guest-card p { font-size: 14.5px; color: var(--ink-dim); }
.guest-card .btn { white-space: nowrap; }
@media (max-width: 440px) { #soundBtn { display: none; } }
.guest-card b { color: var(--brass-hi); }

.game-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 620px) { .game-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
.game-card {
  position: relative; display: grid; grid-template-columns: 132px 1fr; grid-template-rows: 1fr auto; gap: 0 14px;
  padding: 12px; border-radius: var(--radius-l); cursor: pointer;
  background: linear-gradient(180deg, rgba(var(--card-rgb), .55), rgba(var(--panel-rgb), .75));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 26px rgba(0, 0, 0, .35);
}
.gc-art { grid-row: 1 / 3; border-radius: 14px; overflow: hidden; position: relative; padding: 5px; background: var(--inlay); }
.gc-body h2 { font-size: 24px; margin-top: 2px; }
.gc-body p { font-size: 14px; color: var(--ink-dim); margin-top: 4px; }
.gc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12.5px; color: var(--ink-mute); font-weight: 700; }
.gc-actions { display: flex; gap: 8px; margin-top: 10px; }
.fine { margin-top: 26px; font-size: 13px; color: var(--ink-mute); max-width: 70ch; }

/* sahne çizimleri */
.scene { position: relative; height: 100%; min-height: 128px; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 3px;
  background: radial-gradient(circle at 50% 40%, var(--felt-500), var(--felt-700) 70%, var(--felt-800)); box-shadow: inset 0 0 18px rgba(0, 0, 0, .55); }
.scene .tile { --tw: 30px; transform: rotate(-4deg); }
.scene .tile:nth-child(2) { transform: translateY(-6px) rotate(1deg); }
.scene .tile:nth-child(3) { transform: rotate(5deg); }
.s-okey .mini-rack { display: flex; gap: 1px; padding: 4px 5px 8px; background: linear-gradient(180deg, #8a5a33, #5a3519); border-radius: 4px; box-shadow: 0 6px 10px rgba(0, 0, 0, .5); transform: rotate(-6deg); }
.s-okey .tile { --tw: 22px; transform: none !important; }
.s-cards .card { --cw: 44px; margin-left: -18px; transform: rotate(-12deg); }
.s-cards .card:first-child { margin-left: 0; }
.s-cards .card:nth-child(2) { transform: translateY(-6px); }
.s-cards .card:nth-child(3) { transform: rotate(12deg); }
.s-cards .koz { position: absolute; right: 8px; top: 6px; font-size: 22px; color: var(--sedef); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.s-cards.pisti .card:nth-child(1) { transform: rotate(-20deg) translateX(10px); }
.s-cards.pisti .card:nth-child(2) { transform: rotate(8deg); }
.s-cards.pisti .card:nth-child(3) { transform: rotate(-3deg) translateY(4px); }
.s-tavla { flex-direction: column; background: linear-gradient(180deg, #7c4a26, #4f2c15); }
.mini-board { position: relative; width: 104px; height: 70px; border-radius: 4px; background: #e8d4a8; box-shadow: inset 0 0 0 4px #5a3519; display: flex; justify-content: space-around; padding: 4px; overflow: hidden; }
.mini-board i { width: 12px; height: 34px; clip-path: polygon(0 0, 100% 0, 50% 100%); background: var(--nar); }
.mini-board i:nth-child(even) { background: var(--felt-600); }
.mini-board b { position: absolute; width: 13px; height: 13px; border-radius: 50%; bottom: 6px; }
.mini-board b.w { background: radial-gradient(circle at 35% 30%, #fff, #d8ccb0); left: 16px; }
.mini-board b.w + b.w { left: 16px; bottom: 19px; }
.mini-board b.k { background: radial-gradient(circle at 35% 30%, #a2453c, #4a1612); right: 18px; }
.mini-board b.k + b.k { bottom: 19px; }
.mini-dice { display: flex; gap: 6px; margin-top: 8px; }
.mini-dice .die { --ds: 22px; }
.s-chess { background: #2f1e14; }
.mini-chess { display: grid; grid-template-columns: repeat(4, 22px); transform: perspective(240px) rotateX(38deg); box-shadow: 0 8px 12px rgba(0, 0, 0, .6); }
.mini-chess i { height: 22px; }
.mini-chess i.l { background: #e4cfa6; } .mini-chess i.d { background: #8b5a33; }
.s-chess .pc.big { position: absolute; font-size: 44px; left: 26px; top: 22px; }
.s-chess .pc.big2 { position: absolute; font-size: 40px; right: 24px; top: 32px; }

/* ------------------------------------------------------------- oda / masa listesi */
.room-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.room-head h1 { font-size: 30px; }
.room-head p { color: var(--ink-dim); font-size: 14.5px; margin-top: 3px; }
.room-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(var(--sink), .3); }
.seg.wrap { flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ink-dim); min-height: 36px; }
.seg button.on { background: var(--sedef); color: var(--on-light); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.table-list { display: grid; gap: 12px; }
@media (min-width: 760px) { .table-list { grid-template-columns: 1fr 1fr; } }
.table-card { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-m); background: rgba(var(--panel-rgb), .75); box-shadow: inset 0 0 0 1px rgba(var(--ov), .06); }
.table-card.playing { opacity: .62; }
.tc-info h3 { font-size: 19px; }
.tc-info p { color: var(--ink-mute); font-size: 13.5px; }
.tc-money { display: flex; gap: 12px; font-size: 13.5px; color: var(--ink-dim); margin-top: 4px; }
.tc-money b { color: var(--brass-hi); font-variant-numeric: tabular-nums; }
.busy { font-size: 13px; color: var(--ink-mute); font-weight: 700; }
.round-table { position: relative; width: 92px; height: 92px; }
.rt-felt { position: absolute; inset: 18px; border-radius: 50%; background: radial-gradient(circle at 45% 40%, var(--felt-500), var(--felt-800)); box-shadow: 0 0 0 4px var(--walnut-600), 0 0 0 5px var(--sedef), 0 4px 10px rgba(0, 0, 0, .5); }
.rs { position: absolute; transform: translate(-50%, -50%); }
.rs.free { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px dashed rgba(var(--ov), .4); color: var(--ink-mute); font-size: 14px; background: rgba(var(--sink), .3); }
.empty, .muted { color: var(--ink-mute); }
.empty { padding: 20px 6px; }
.oc-game { width: 92px; text-align: center; font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--brass-hi); }

.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 30px; }
.page-head p { color: var(--ink-dim); margin-top: 4px; }
.sub-title { font-size: 21px; margin: 24px 0 12px; }
.card-block { margin-top: 18px; padding: 16px; border-radius: var(--radius-m); background: rgba(var(--panel-rgb), .7); }
.card-block h2 { font-size: 20px; margin-bottom: 10px; }
.card-block .btn + .btn { margin-top: 8px; }

/* ------------------------------------------------------------- mağaza */
.gift-row, .lock-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: var(--radius-m); background: rgba(var(--accent-rgb), .1); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .35); margin-bottom: 18px; }
.gift-row p, .lock-card p { color: var(--ink-dim); font-size: 14.5px; }
.lock-card { display: block; }
.lock-card h2 { font-size: 22px; margin-bottom: 6px; }
.pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 760px) { .pkg-grid { grid-template-columns: repeat(4, 1fr); } }
.pkg-grid.locked .pkg { filter: saturate(.4); }
.pkg { position: relative; padding: 16px 12px 12px; border-radius: var(--radius-m); background: linear-gradient(180deg, rgba(var(--card-rgb), .6), rgba(var(--panel-rgb), .8)); text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.pkg h3 { font-size: 22px; font-variant-numeric: tabular-nums; margin-top: 8px; }
.pkg p { color: var(--ink-mute); font-size: 13.5px; margin-bottom: 10px; }
.pkg-chips { display: flex; justify-content: center; height: 30px; align-items: flex-end; }
.pkg-chips .chip { width: 28px; height: 28px; margin-left: -10px; }
.pkg-chips .chip:first-child { margin-left: 0; }
.pkg-tag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 2px 9px; border-radius: 999px; background: var(--brass); color: var(--on-light); font-size: 11.5px; font-weight: 800; }
.warnline { color: var(--warn); margin-top: 14px; }

/* ------------------------------------------------------------- sıralama / profil */
.leaders { display: grid; gap: 6px; }
.ld { display: grid; grid-template-columns: 30px 34px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(var(--panel-rgb), .7); }
.ld.me { box-shadow: inset 0 0 0 1.5px var(--brass); }
.ld-n { font-family: var(--display); font-weight: 800; color: var(--ink-mute); text-align: center; }
.ld:nth-child(-n+3) .ld-n { color: var(--brass-hi); }
.ld-c { display: flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; }
.profile-card { display: flex; align-items: center; gap: 16px; }
.profile-card h1 { font-size: 28px; }
.profile-card p { color: var(--ink-mute); }
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 16px; }
.avatar-pick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 14px; border: 0; background: rgba(var(--ov), .05); font-size: 12px; font-weight: 700; color: var(--ink-mute); transition: background .2s, color .2s; }
.avatar-pick button.on { background: rgba(214, 175, 87, .16); color: var(--brass-hi); box-shadow: inset 0 0 0 1.5px var(--brass); }
.inline-form { display: flex; gap: 8px; }
.inline-form input, .field input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 0; background: rgba(var(--sink), .35); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(var(--ov), .14); min-height: 46px; }
.inline-form input:focus, .field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brass); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.stats div { display: flex; flex-direction: column; }
.stats span { color: var(--ink-mute); font-size: 14px; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(var(--ov), .07); font-size: 14.5px; }
.ledger .pos { color: var(--good); } .ledger .neg { color: var(--ink-dim); }
.hint { color: var(--ink-mute); font-size: 14px; }
.hint.center { text-align: center; margin: 14px 0; }
.online-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.online-actions .inline-form { flex: 1; min-width: 230px; }
.code-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px; border-radius: var(--radius-m); background: var(--sheen); color: var(--on-light); margin-bottom: 18px; }
.code-card span { font-weight: 700; }
.code-card b { font-family: var(--display); font-size: 34px; letter-spacing: .14em; flex: 1; }
.code-card .btn.ghost { color: var(--on-light); box-shadow: inset 0 0 0 1.5px rgba(var(--panel-rgb), .3); }

/* ------------------------------------------------------------- alt pencere (sheet) */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(var(--panel-rgb), .62); opacity: 0; transition: opacity .25s; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 88dvh; overflow: auto; padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0; background: linear-gradient(180deg, var(--walnut-700), var(--walnut-800) 120px);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 640px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: rgba(var(--ov), .25); margin: 0 auto 10px; }
.sheet-title { font-size: 23px; padding-right: 40px; margin-bottom: 12px; }
.sheet-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(var(--ov), .1); font-size: 15px; }
.sheet-text { color: var(--ink-dim); margin-bottom: 4px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.sheet-actions .btn { flex: 1; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 700; color: var(--ink-dim); }
.form-err { color: var(--bad); min-height: 1.2em; font-size: 14px; }
.auth-seg { width: 100%; margin-bottom: 14px; }
.auth-seg button { flex: 1; }
.menu-list { display: grid; gap: 12px; }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(var(--ov), .07); }
details summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.rules { margin: 6px 0 4px; padding-left: 20px; color: var(--ink-dim); font-size: 14.5px; display: grid; gap: 6px; }

/* bekleme */
.wait-box { text-align: center; }
.wait-box p { color: var(--ink-dim); margin-top: 14px; }
.w-seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.w-seats.big { margin: 8px 0; }
.w-seat { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 86px; opacity: .5; font-size: 14px; }
.w-seat.on { opacity: 1; }
.w-seat.pop .av { animation: popin .4s cubic-bezier(.2, 1.6, .4, 1); }
.w-empty { width: 52px; height: 52px; border-radius: 50%; border: 2px dashed rgba(var(--ov), .3); display: grid; place-items: center; color: var(--ink-mute); }
.w-seats.big .w-empty { width: 56px; height: 56px; }
@keyframes popin { from { transform: scale(.3); opacity: 0; } }

/* ------------------------------------------------------------- bildirimler */
#toasts { position: fixed; left: 50%; top: calc(var(--top-h) + 14px); transform: translateX(-50%); z-index: 120; display: grid; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
.toast { padding: 11px 15px; border-radius: 12px; background: rgba(var(--panel-rgb), .96); box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(var(--ov), .12); font-weight: 600; font-size: 14.5px; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
.toast.in { opacity: 1; transform: none; }
.toast.good { box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 3px 0 0 var(--good); }
.toast.warn { box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 3px 0 0 var(--warn); }
.toast.error { box-shadow: 0 8px 24px rgba(0, 0, 0, .5), inset 3px 0 0 var(--bad); }

/* ==========================================================================
   OYUN EKRANI
   ========================================================================== */
.game { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; overflow: hidden;
  background:
    radial-gradient(100% 70% at 50% 40%, rgba(0, 0, 0, 0), rgba(0, 0, 0, .45)),
    repeating-linear-gradient(93deg, rgba(255, 255, 255, .016) 0 2px, transparent 2px 9px),
    var(--walnut-800);
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
.g-top { display: flex; align-items: center; gap: 8px; padding: 6px 10px; height: 52px; flex: none; position: relative; }
.g-top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: var(--inlay); opacity: .75; background-size: 8px 6px; }
.g-back { width: 40px; height: 40px; border: 0; border-radius: 12px; background: rgba(var(--ov), .08); font-size: 28px; line-height: 1; }
.g-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.g-title b { font-family: var(--display); font-size: 19px; }
.g-title small { color: var(--ink-mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-prize { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(var(--sink), .35); box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb), .45); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.g-btn { position: relative; width: 40px; height: 40px; border: 0; border-radius: 12px; background: rgba(var(--ov), .08); font-size: 18px; }
.g-btn .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--nar); font-size: 11px; font-style: normal; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.g-status { flex: none; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink-dim); padding: 10px 12px 4px; min-height: 34px; transition: color .2s; }
.g-status.me { color: var(--brass-hi); }
.g-status.good { color: var(--good); }
.g-status.warn { color: var(--warn); }
.g-stage { flex: 1; min-height: 0; position: relative; display: flex; }
.g-stage > * { flex: 1; min-width: 0; }

/* koltuk rozeti */
.seat { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: rgba(var(--sink), .3); max-width: 100%; transition: background .2s, box-shadow .2s; }
.seat.on { background: rgba(var(--accent-rgb), .2); box-shadow: inset 0 0 0 1.5px var(--brass); }
.seat-av { position: relative; flex: none; }
.ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); pointer-events: none; opacity: 0; }
.seat.on .ring { opacity: 1; }
.ring circle { fill: none; stroke: var(--brass-hi); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear; }
.ring.low circle { stroke: var(--bad); }
.seat-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.seat-meta b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-meta small { font-size: 12px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat.on .seat-meta small { color: var(--ink-dim); }

/* çuha */
.felt {
  position: relative; border-radius: 26px;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(255, 255, 255, .07), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 5px),
    radial-gradient(circle at 50% 50%, var(--felt-500), var(--felt-700) 65%, var(--felt-800));
  box-shadow:
    inset 0 0 0 2px rgba(var(--ov), .55),
    inset 0 0 0 5px var(--walnut-600),
    inset 0 0 40px rgba(0, 0, 0, .5),
    0 0 0 6px var(--walnut-700),
    0 0 0 7px rgba(var(--ov), .25),
    0 14px 30px rgba(0, 0, 0, .5);
}

/* sohbet ve baloncuklar */
.chat { position: absolute; left: 0; right: 0; bottom: 0; z-index: 60; height: min(62dvh, 520px); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--walnut-700), var(--walnut-900)); border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .6);
  transform: translateY(102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); }
.chat.open { transform: none; }
@media (min-width: 900px) { .chat { left: auto; right: 12px; bottom: 12px; width: 360px; border-radius: 20px; height: min(70dvh, 560px); } }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; }
.chat-head b { font-family: var(--display); font-size: 19px; }
.chat-x { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(var(--ov), .1); }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 14px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.msg.me { align-self: flex-end; }
.msg-b { padding: 7px 11px; border-radius: 14px 14px 14px 4px; background: rgba(var(--ov), .1); }
.msg.me .msg-b { background: var(--felt-600); border-radius: 14px 14px 4px 14px; }
.msg-b b { font-size: 12px; color: var(--brass-hi); display: block; }
.msg.me .msg-b b { display: none; }
.msg-b p { font-size: 14.5px; word-break: break-word; }
.msg.sys { align-self: center; max-width: 94%; font-size: 12.5px; color: var(--ink-mute); text-align: center; padding: 2px 8px; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px 4px; scrollbar-width: none; }
.chat-quick button { flex: none; border: 0; border-radius: 999px; padding: 6px 11px; background: rgba(var(--ov), .09); font-size: 13.5px; }
.chat-form { display: flex; gap: 8px; padding: 8px 14px 12px; }
.chat-form input { flex: 1; min-width: 0; border: 0; border-radius: 12px; padding: 10px 12px; background: rgba(var(--sink), .35); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(var(--ov), .14); }
.bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 55; }
.bubble { position: fixed; padding: 7px 11px; border-radius: 14px; background: var(--sheen); color: var(--on-light); font-size: 13.5px; font-weight: 600; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); animation: bubin .25s ease; transition: opacity .3s; }
.bubble.typing { font-style: italic; color: var(--on-light-soft); }
.bubble.out { opacity: 0; }
@keyframes bubin { from { transform: translateY(6px) scale(.9); opacity: 0; } }

/* ==========================================================================
   OKEY TAŞLARI ve ISTAKA
   ========================================================================== */
.tile {
  --tw: 40px; --tc: #222;
  position: relative; width: var(--tw); height: calc(var(--tw) * 1.42); border-radius: calc(var(--tw) * .14); flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: calc(var(--tw) * .12);
  background: linear-gradient(180deg, var(--ivory) 0%, #f4ecd9 55%, var(--ivory-2) 100%);
  box-shadow: inset 0 -3px 0 #cdbf9f, inset 0 1px 0 #fff, 0 2px 0 #a8987a, 0 3px 5px rgba(0, 0, 0, .35);
  user-select: none; -webkit-user-select: none; touch-action: none; transition: transform .12s ease, box-shadow .12s;
}
.tile .t-num { font-family: var(--ui); font-weight: 800; color: var(--tc); font-size: calc(var(--tw) * .58); line-height: 1; letter-spacing: -.03em; }
.tile .t-dot { width: calc(var(--tw) * .2); height: calc(var(--tw) * .2); border-radius: 50%; background: var(--tc); margin-top: calc(var(--tw) * .1); opacity: .9; }
.tile .t-star { position: absolute; right: 2px; top: 1px; font-style: normal; font-size: calc(var(--tw) * .3); color: var(--brass); text-shadow: 0 0 2px rgba(0, 0, 0, .2); }
.tile.fake .t-fake { color: #1b7a3d; font-size: calc(var(--tw) * .62); line-height: 1; margin-top: calc(var(--tw) * .05); }
.tile .t-cap { font-style: normal; font-size: calc(var(--tw) * .2); color: #1b7a3d; font-weight: 800; }
.tile.joker { box-shadow: inset 0 -3px 0 #cdbf9f, inset 0 1px 0 #fff, 0 2px 0 #a8987a, 0 3px 5px rgba(0, 0, 0, .35), 0 0 0 2px rgba(var(--accent-rgb), .8); }
.tile.sm { --tw: 26px; }
.tile.sel { transform: translateY(-9px); box-shadow: inset 0 -3px 0 #cdbf9f, 0 2px 0 #a8987a, 0 10px 14px rgba(0, 0, 0, .4), 0 0 0 2.5px var(--brass-hi); }
.tile.inmeld::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: 3px; height: 3px; border-radius: 2px; background: var(--felt-500); }
.tile.islek::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: 3px; height: 3px; border-radius: 2px; background: var(--warn); }
.tile.fresh { animation: tilein .35s cubic-bezier(.2, 1.4, .4, 1); }
.tile.lift { opacity: .3; }
.tile.ghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; box-shadow: 0 16px 24px rgba(0, 0, 0, .5), 0 0 0 2px var(--brass-hi); }
.tile.okeyface { box-shadow: inset 0 -3px 0 #cdbf9f, 0 2px 0 #a8987a, 0 0 0 2px var(--brass-hi), 0 0 12px rgba(var(--accent-hi-rgb), .5); }
@keyframes tilein { from { transform: translateY(-14px) scale(1.08); opacity: .2; } }

.okey-board { display: flex; flex-direction: column; height: 100%; padding: 4px 6px 6px; gap: 6px; }
.ob-top { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; }
.ob-mid { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr auto; gap: 6px; }
.ob-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 70px; }
.ob-side:empty { width: 0; }
.ob-side .seat { flex-direction: column; padding: 6px 4px; border-radius: 16px; gap: 4px; text-align: center; width: 70px; }
.ob-side .seat-meta b { font-size: 13px; max-width: 64px; }
.ob-side .seat-meta small { white-space: normal; font-size: 11px; }
.opp-rack { display: flex; gap: 1px; padding: 3px 4px 5px; border-radius: 4px; background: linear-gradient(180deg, #7c4f2c, #4d2d15); box-shadow: 0 3px 6px rgba(0, 0, 0, .4); }
.opp-rack i { width: 9px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, #efe6d0, #cdbf9f); }
.opp-rack.left, .opp-rack.right { flex-direction: column; padding: 4px 3px; }
.opp-rack.left i, .opp-rack.right i { width: 12px; height: 7px; }
.okey-felt {
  display: grid; min-height: 0; padding: 12px; gap: 8px; margin: 6px;
  grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto 1fr auto;
  grid-template-areas: "tl tc tr" "ctr ctr ctr" "mel mel mel" "bl . br";
}
.pile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px; border-radius: 12px; min-width: 64px; transition: background .2s, box-shadow .2s; }
.pile.tl { grid-area: tl; justify-self: start; } .pile.tc { grid-area: tc; } .pile.tr { grid-area: tr; justify-self: end; }
.pile.bl { grid-area: bl; justify-self: start; align-self: end; } .pile.br { grid-area: br; justify-self: end; align-self: end; }
.pile .tile { --tw: 30px; }
.pile-under { position: absolute; top: calc(6px - var(--i) * 0px); left: 50%; transform: translate(calc(-50% + (var(--i) - 1) * 3px), calc(var(--i) * -2px)) rotate(calc((var(--i) - 1) * 4deg)); opacity: .55; }
.pile-under .tile { --tw: 30px; }
.pile-empty { width: 30px; height: 43px; border-radius: 5px; border: 1.5px dashed rgba(var(--ov), .3); }
.pile-cap { font-size: 11px; color: rgba(var(--ov), .7); font-weight: 700; white-space: nowrap; }
.pile.glow { background: rgba(var(--accent-hi-rgb), .14); box-shadow: inset 0 0 0 2px var(--brass-hi); cursor: pointer; animation: glow 1.4s ease-in-out infinite; }
.pile.target { box-shadow: inset 0 0 0 1.5px dashed rgba(var(--accent-hi-rgb), .6); background: rgba(var(--sink), .15); }
.pile.hover, .okey-center.hover, .meld.hover { background: rgba(var(--accent-hi-rgb), .25); box-shadow: inset 0 0 0 2px var(--brass-hi); }
@keyframes glow { 50% { box-shadow: inset 0 0 0 2px var(--brass-hi), 0 0 18px rgba(var(--accent-hi-rgb), .45); } }
.okey-center { grid-area: ctr; display: flex; align-items: center; justify-content: center; gap: 18px; border-radius: 14px; padding: 4px; }
.ind { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: rgba(var(--ov), .8); }
.ind .tile { --tw: 30px; }
.deck { position: relative; width: 58px; height: 62px; border: 0; background: none; padding: 0; }
.deck i { position: absolute; left: 8px; width: 40px; height: 50px; border-radius: 6px; background: linear-gradient(180deg, #f1e8d3, #cfc1a0); box-shadow: 0 2px 0 #9e8e6e; }
.deck i:nth-child(1) { top: 10px; } .deck i:nth-child(2) { top: 6px; } .deck i:nth-child(3) { top: 2px; }
.deck b { position: absolute; left: 0; right: 0; top: 18px; font-size: 17px; font-weight: 800; color: var(--on-light); font-variant-numeric: tabular-nums; }
.deck.glow i:nth-child(3) { box-shadow: 0 2px 0 #9e8e6e, 0 0 0 2.5px var(--brass-hi), 0 0 16px rgba(var(--accent-hi-rgb), .6); }
.deck[disabled] { opacity: .85; cursor: default; }
.melds { grid-area: mel; overflow-y: auto; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 6px; min-height: 0; padding: 2px; }
.meld { display: flex; gap: 1px; padding: 4px; border-radius: 8px; background: rgba(var(--sink), .2); transition: background .2s; }
.meld .tile { --tw: 22px; box-shadow: inset 0 -2px 0 #cdbf9f, 0 1px 0 #a8987a; }
.meld.mine { background: rgba(var(--accent-rgb), .14); }
.meld.can { background: rgba(111, 191, 142, .25); box-shadow: inset 0 0 0 2px var(--good); cursor: pointer; }
.melds-empty { color: rgba(var(--ov), .75); font-size: 13.5px; text-align: center; align-self: center; padding: 8px; }
.okey-board:not(.is101) .okey-felt { grid-template-rows: auto 1fr auto; grid-template-areas: "tl tc tr" "ctr ctr ctr" "bl . br"; }

.ob-bottom { display: flex; flex-direction: column; gap: 6px; }
.ob-me { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ob-me .seat { flex: none; }
.ob-actions { display: flex; gap: 6px; flex: 1; justify-content: flex-end; flex-wrap: nowrap; min-width: 0; }
.ob-actions .btn.sm { padding: 7px 11px; min-height: 38px; white-space: nowrap; flex: none; }
.ob-actions .chipbtn { white-space: nowrap; flex: none; }
.ob-me .seat.compact { padding-right: 4px; }
@media (max-width: 560px) {
  .ob-me .seat.compact .seat-meta { display: none; }
  .ob-me .seat.compact .av { --s: 36px !important; }
  .ob-actions { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .ob-actions .chipbtn { padding: 7px 10px; font-size: 13px; }
  .ob-actions .btn.sm { padding: 7px 10px; font-size: 14px; }
}
.seat.compact .seat-meta small { max-width: 150px; }
.rack {
  --tw: min(48px, calc((100vw - 34px) / 15));
  align-self: center; display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 9px; border-radius: 10px;
  background: linear-gradient(180deg, #9a6638 0%, #74461f 45%, #52300f 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), inset 0 -4px 0 rgba(0, 0, 0, .3), 0 10px 22px rgba(0, 0, 0, .5);
  touch-action: none;
}
.rack-row { display: flex; gap: 1px; padding-bottom: 4px; position: relative; }
.rack-row::after { content: ''; position: absolute; left: -3px; right: -3px; bottom: 0; height: 5px; border-radius: 2px; background: linear-gradient(180deg, #3b2210, #6b4220); }
.slot { width: var(--tw); height: calc(var(--tw) * 1.42); border-radius: 4px; background: rgba(var(--sink), .12); position: relative; z-index: 1; }
.slot .tile { --tw: inherit; width: 100%; height: 100%; }
.slot.hover { background: rgba(var(--accent-hi-rgb), .35); }

/* ==========================================================================
   KARTLAR
   ========================================================================== */
.card {
  --cw: 62px;
  position: relative; width: var(--cw); height: calc(var(--cw) * 1.42); border-radius: calc(var(--cw) * .1); flex: none;
  background: linear-gradient(170deg, #fffdf6, #f1ead8); color: #1b1e27;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .35);
  user-select: none; -webkit-user-select: none; transition: transform .15s ease, box-shadow .15s, filter .15s;
}
.card.red { color: #b3232d; }
.c-idx { position: absolute; left: calc(var(--cw) * .08); top: calc(var(--cw) * .05); display: flex; flex-direction: column; align-items: center; line-height: .95; }
.c-idx b { font-family: var(--ui); font-weight: 800; font-size: calc(var(--cw) * .3); letter-spacing: -.04em; }
.c-idx i { font-style: normal; font-size: calc(var(--cw) * .25); }
.c-idx.br { left: auto; top: auto; right: calc(var(--cw) * .08); bottom: calc(var(--cw) * .05); transform: rotate(180deg); }
.c-pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--cw) * .6); }
.c-face { position: absolute; inset: 20% 18%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: calc(var(--cw) * .46); border-radius: 4px;
  background: repeating-linear-gradient(135deg, rgba(var(--accent-rgb), .18) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1.5px currentColor; }
.card.back {
  background:
    radial-gradient(circle at 50% 50%, transparent 30%, rgba(0, 0, 0, .15) 31%, transparent 33%) 0 0 / 12px 12px,
    linear-gradient(45deg, rgba(var(--ov), .35) 25%, transparent 25%, transparent 75%, rgba(var(--ov), .35) 75%) 0 0 / 10px 10px,
    linear-gradient(45deg, rgba(var(--ov), .35) 25%, transparent 25%, transparent 75%, rgba(var(--ov), .35) 75%) 5px 5px / 10px 10px,
    linear-gradient(160deg, #6b1f25, #3f0f14);
  box-shadow: inset 0 0 0 3px #f6efdf, inset 0 0 0 4px rgba(0, 0, 0, .2), 0 2px 4px rgba(0, 0, 0, .4);
}
.card.mini { --cw: 22px; }

.cards-board { display: flex; flex-direction: column; height: 100%; padding: 4px 6px 6px; gap: 4px; }
.cb-top { display: flex; justify-content: center; min-height: 0; }
.cb-mid { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.cb-side { display: flex; flex-direction: column; align-items: center; }
.cb-side:empty { width: 0; }
.opp { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.opp.left .seat, .opp.right .seat { flex-direction: column; text-align: center; padding: 6px 4px; border-radius: 16px; width: 70px; gap: 4px; }
.opp.left .seat-meta b, .opp.right .seat-meta b { font-size: 13px; max-width: 64px; }
.opp.left .seat-meta small, .opp.right .seat-meta small { white-space: normal; font-size: 11px; }
.opp-cards { display: flex; justify-content: center; height: 34px; }
.opp.left .opp-cards, .opp.right .opp-cards { height: 26px; }
.opp.left .opp-cards .card, .opp.right .opp-cards .card { --cw: 16px; margin-left: -10px; }
.opp-cards .card { margin-left: -14px; transform: rotate(calc(var(--k) * 7deg)); transform-origin: 50% 120%; }
.opp-cards .card:first-child { margin-left: 0; }
.cards-felt { height: 100%; min-height: 220px; margin: 6px; display: grid; place-items: center; }
.trick { position: relative; width: 100%; height: 100%; min-height: 200px; }
.trick-card { position: absolute; left: 50%; top: 50%; animation: cardin .25s ease-out; }
.trick-card .card { --cw: clamp(48px, 13vw, 70px); }
.trick-card.at-bottom { transform: translate(-50%, -18%); }
.trick-card.at-top { transform: translate(-50%, -82%) rotate(180deg); }
.trick-card.at-left { transform: translate(-112%, -50%) rotate(90deg); }
.trick-card.at-right { transform: translate(12%, -50%) rotate(-90deg); }
.trick-card.win .card { box-shadow: 0 0 0 3px var(--brass-hi), 0 0 18px rgba(var(--accent-hi-rgb), .6); }
@keyframes cardin { from { opacity: 0; } }
.trump { position: absolute; left: 14px; top: 12px; display: flex; flex-direction: column; align-items: center; padding: 6px 10px; border-radius: 12px; background: rgba(var(--sink), .28); line-height: 1; color: #fff; }
.trump span { font-size: 11px; font-weight: 700; color: rgba(var(--ov), .8); }
.trump b { font-size: 30px; margin-top: 2px; }
.trump.red b { color: #ff8d8d; }
.trump small { font-size: 10px; color: rgba(var(--ov), .7); margin-top: 2px; }
.roundtag { position: absolute; right: 14px; top: 14px; font-size: 12.5px; font-weight: 700; color: rgba(var(--ov), .85); background: rgba(var(--sink), .28); padding: 4px 9px; border-radius: 999px; }
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(94%, 380px); padding: 12px 10px; border-radius: 18px; background: rgba(var(--panel-rgb), .93); box-shadow: 0 10px 30px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(var(--ov), .12); text-align: center; z-index: 3; animation: popin .25s ease; }
.panel p { font-weight: 700; margin-bottom: 10px; }
.bidgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bidbtn { border: 0; border-radius: 10px; min-height: 44px; font-weight: 800; font-size: 18px; background: var(--sedef); color: var(--on-light); }
.bidbtn.pass { grid-column: span 2; background: rgba(var(--ov), .14); color: var(--ink); }
.suitgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .suitgrid { grid-template-columns: repeat(4, 1fr); } }
.suitbtn { border: 0; border-radius: 12px; min-height: 70px; font-size: 32px; background: var(--sedef); color: #1b1e27; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.suitbtn.red { color: #b3232d; }
.suitbtn small { font-size: 12px; font-weight: 700; margin-top: 4px; }
.cb-bottom { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 4px; }
.hand { --n: 8; display: flex; justify-content: center; padding-top: 14px; max-width: 100%; }
.hand .card { --cw: min(78px, calc((100vw - 24px) / (1 + (var(--n) - 1) * .6))); margin-left: calc(var(--cw) * -.4); transform: rotate(calc(var(--k) * .9deg)) translateY(calc(var(--k) * var(--k) * .5px)); transform-origin: 50% 130%; cursor: pointer; }
.hand .card:first-child { margin-left: 0; }
.hand .card.ok { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .35), 0 0 0 2px rgba(111, 191, 142, .7); }
.hand .card.no { filter: brightness(.62) saturate(.7); }
.hand .card.up { transform: translateY(-16px) rotate(calc(var(--k) * .9deg)); box-shadow: 0 0 0 2.5px var(--brass-hi), 0 12px 18px rgba(0, 0, 0, .45); z-index: 2; }
@media (hover: hover) { .hand .card.ok:hover { transform: translateY(-8px) rotate(calc(var(--k) * .9deg)); } }
.deckstack { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.deckstack .card { --cw: 40px; box-shadow: inset 0 0 0 3px #f6efdf, 2px 2px 0 #3f0f14, 4px 4px 0 #f6efdf, 5px 5px 0 #3f0f14, 0 6px 10px rgba(0, 0, 0, .5); }
.deckstack b { font-weight: 800; font-size: 14px; color: rgba(var(--ov), .9); }
.pisti-pile { position: relative; width: 140px; height: 150px; }
.pile-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(var(--r)); }
.pile-card .card { --cw: clamp(56px, 15vw, 76px); }
.pile-card:last-child { animation: cardin .25s ease-out; }
.pisti-pile em { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 12px; color: rgba(var(--ov), .8); }
.empty-pile { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(var(--ov), .55); font-size: 14px; border: 2px dashed rgba(var(--ov), .2); border-radius: 12px; }
.pisti-flash { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); font-family: var(--display); font-weight: 800; font-size: 34px; color: var(--brass-hi); text-shadow: 0 2px 0 var(--walnut-800), 0 0 20px rgba(var(--accent-hi-rgb), .6); animation: flash 1.2s ease forwards; pointer-events: none; }
@keyframes flash { 0% { transform: translateX(-50%) scale(.4); opacity: 0; } 25% { transform: translateX(-50%) scale(1.15); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-10px); } }

/* ==========================================================================
   TAVLA
   ========================================================================== */
.tavla-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px; height: 100%; justify-content: center; }
.tv-head, .tv-foot { width: min(100%, 760px); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tv-score { text-align: right; line-height: 1.1; }
.tv-score span { font-size: 12px; color: var(--ink-mute); display: block; }
.tv-score b { font-family: var(--display); font-size: 22px; }
.tv-board { --pw: min(56px, calc((100vw - 72px) / 13.9)); display: flex; gap: 6px; width: fit-content; max-width: 100%; }
.tv-frame { display: flex; padding: 10px; border-radius: 12px; gap: 0;
  background: linear-gradient(135deg, #8a542b, #5b3416 50%, #7a4823); box-shadow: inset 0 0 0 2px rgba(var(--ov), .35), 0 12px 26px rgba(0, 0, 0, .55); }
.tv-half { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: calc(var(--pw) * .6); padding: 4px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .025) 0 3px, transparent 3px 8px), linear-gradient(180deg, #ead6ab, #dcc391); box-shadow: inset 0 0 12px rgba(0, 0, 0, .3); }
.tv-half .row { display: flex; }
.pt { position: relative; width: var(--pw); height: calc(var(--pw) * 5.2); display: flex; justify-content: center; cursor: pointer; }
.pt .tri { position: absolute; inset: 0 3%; clip-path: polygon(0 0, 100% 0, 50% 92%); }
.pt.bot .tri { clip-path: polygon(0 100%, 100% 100%, 50% 8%); }
.pt.a .tri { background: linear-gradient(180deg, #a83a32, #7c241f); }
.pt.b .tri { background: linear-gradient(180deg, #2c5e4f, #1a3d33); }
.pt.bot.a .tri { background: linear-gradient(0deg, #a83a32, #7c241f); }
.pt.bot.b .tri { background: linear-gradient(0deg, #2c5e4f, #1a3d33); }
.pt .stack { position: relative; display: flex; flex-direction: column; align-items: center; z-index: 1; }
.pt.bot .stack { flex-direction: column-reverse; justify-content: flex-start; margin-top: auto; }
.chk { width: calc(var(--pw) * .9); height: calc(var(--pw) * .9); border-radius: 50%; flex: none; margin-bottom: -2px; }
.pt.bot .chk { margin-bottom: 0; margin-top: -2px; }
.chk.w { background: radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, .1) 53%, transparent 58%), radial-gradient(circle at 35% 30%, #ffffff, #e7dcc3 60%, #c9b997); box-shadow: 0 2px 2px rgba(0, 0, 0, .4); }
.chk.k { background: radial-gradient(circle at 50% 50%, transparent 52%, rgba(255, 255, 255, .1) 53%, transparent 58%), radial-gradient(circle at 35% 30%, #8a3a30, #4c1712 60%, #2b0b08); box-shadow: 0 2px 2px rgba(0, 0, 0, .5); }
.chk.fresh { box-shadow: 0 0 0 2px var(--brass-hi), 0 2px 3px rgba(0, 0, 0, .4); }
.chk-n { position: absolute; font-style: normal; font-weight: 800; font-size: 12px; color: var(--on-light); background: var(--sedef); border-radius: 8px; padding: 0 5px; top: 50%; }
.pt.src .tri { filter: brightness(1.18); }
.pt.src .stack .chk:last-child, .pt.bot.src .stack .chk:first-child { box-shadow: 0 0 0 2px rgba(var(--accent-hi-rgb), .8); }
.pt.selp .tri { filter: brightness(1.35); }
.pt.tgt::after { content: ''; position: absolute; left: 50%; width: calc(var(--pw) * .5); height: calc(var(--pw) * .5); border-radius: 50%; transform: translateX(-50%); background: rgba(var(--accent-hi-rgb), .85); box-shadow: 0 0 14px rgba(var(--accent-hi-rgb), .9); z-index: 2; animation: glow 1.2s infinite; }
.pt.top.tgt::after { bottom: 6%; } .pt.bot.tgt::after { top: 6%; }
.tv-bar { width: calc(var(--pw) * .9); display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 4px 0; margin: 0 6px; border-radius: 6px; background: linear-gradient(90deg, #4a2b13, #6b4020, #4a2b13); }
.bar-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 40%; justify-content: center; border-radius: 6px; width: 100%; position: relative; }
.bar-slot.src { background: rgba(var(--accent-hi-rgb), .25); cursor: pointer; }
.bar-slot.selp { box-shadow: inset 0 0 0 2px var(--brass-hi); }
.tv-off { width: calc(var(--pw) * .9); display: flex; flex-direction: column; justify-content: space-between; padding: 10px 0; }
.off-slot { border-radius: 8px; padding: 4px 0; }
.off-slot.tgt { background: rgba(var(--accent-hi-rgb), .3); box-shadow: inset 0 0 0 2px var(--brass-hi); cursor: pointer; animation: glow 1.2s infinite; }
.off-stack { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 60px; }
.off-stack i { width: calc(var(--pw) * .8); height: 4px; border-radius: 2px; }
.off-stack.w i { background: #efe6d0; } .off-stack.k i { background: #5a1c16; }
.off-stack b { font-size: 12px; color: var(--ink-dim); margin-top: 2px; }
.tv-center { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; justify-content: center; z-index: 3; pointer-events: none; }
.tv-center > * { pointer-events: auto; }
.roll-btn { min-width: 110px; }
.dice { display: flex; gap: 8px; }
.dice.dim { opacity: .5; }
.die { --ds: calc(var(--pw, 40px) * .95); width: var(--ds); height: var(--ds); padding: calc(var(--ds) * .12); border-radius: calc(var(--ds) * .2); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); flex: none;
  background: linear-gradient(145deg, #ffffff, #e9e0cc); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12), 0 3px 6px rgba(0, 0, 0, .45); }
.die i { display: block; }
.die i.p { width: 70%; height: 70%; margin: 15%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #555, #111); }
.die.used { opacity: .35; }
.die.roll { animation: roll .55s cubic-bezier(.2, .8, .3, 1); }
@keyframes roll { 0% { transform: translateY(-30px) rotate(-200deg) scale(.7); opacity: 0; } 70% { transform: translateY(3px) rotate(10deg); opacity: 1; } }

/* ==========================================================================
   SATRANÇ
   ========================================================================== */
.chess-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 8px; height: 100%; justify-content: center; }
.ch-bar { width: var(--bs); max-width: 100%; display: flex; align-items: center; gap: 8px; }
.chess-wrap { --bs: min(calc(100vw - 16px), calc(100dvh - 300px), 560px); }
.ch-bar .seat { flex: none; }
.caps { flex: 1; display: flex; flex-wrap: wrap; gap: 0; min-width: 0; }
.caps .pc { font-size: 17px; }
.clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 18px; padding: 5px 11px; border-radius: 10px; background: rgba(var(--sink), .35); color: var(--ink-dim); }
.clock.run { background: var(--sedef); color: var(--on-light); }
.clock.low.run { background: var(--bad); color: #fff; }
.board { width: var(--bs); height: var(--bs); display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 6px var(--walnut-600), 0 0 0 7px rgba(var(--ov), .35), 0 14px 30px rgba(0, 0, 0, .55); }
.sq { position: relative; display: grid; place-items: center; cursor: pointer; }
.sq.l { background: #ecd9b4; } .sq.d { background: #a8744a; }
.sq.last.l { background: #e6d27a; } .sq.last.d { background: #b99a45; }
.sq.selp { box-shadow: inset 0 0 0 3px var(--felt-500); }
.sq.tgt::after { content: ''; width: 30%; height: 30%; border-radius: 50%; background: rgba(19, 89, 74, .55); }
.sq.cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(19, 89, 74, .6); }
.sq.chk { background: radial-gradient(circle, #e2675f 0%, #b3323b 45%, transparent 75%), #a8744a; }
.cf, .cr { position: absolute; font-style: normal; font-size: 10px; font-weight: 800; opacity: .7; }
.cf { right: 3px; bottom: 1px; } .cr { left: 3px; top: 1px; }
.sq.l .cf, .sq.l .cr { color: #a8744a; } .sq.d .cf, .sq.d .cr { color: #ecd9b4; }
.pc { font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', 'DejaVu Sans', 'Apple Symbols', serif; line-height: 1; font-variant-emoji: text; }
.sq .pc { font-size: calc(var(--bs) / 8 * .78); z-index: 1; transition: transform .15s; }
.pc.w { color: #fbf5e6; text-shadow: 0 0 1px #1d120b, 0 0 1px #1d120b, 0 0 1px #1d120b, 1px 1px 0 #1d120b, -1px -1px 0 #1d120b, 1px -1px 0 #1d120b, -1px 1px 0 #1d120b, 0 3px 4px rgba(0, 0, 0, .35); }
.pc.k { color: #20140d; text-shadow: 0 0 1px rgba(255, 255, 255, .25), 0 3px 4px rgba(0, 0, 0, .35); }
.sq.selp .pc { transform: scale(1.08); }
.movelist { width: var(--bs); max-width: 100%; white-space: nowrap; overflow-x: auto; font-size: 13.5px; color: var(--ink-dim); padding: 6px 2px; scrollbar-width: thin; }
.movelist b { color: var(--ink-mute); font-weight: 700; margin-left: 4px; }
.promo { display: flex; justify-content: space-around; gap: 8px; }
.promo button { width: 70px; height: 70px; border: 0; border-radius: 14px; background: #ecd9b4; }
.promo .pc { font-size: 48px; }

/* ==========================================================================
   OYUN SONU
   ========================================================================== */
.result { text-align: center; }
.result h2 { font-size: 30px; }
.result.won h2 { color: var(--brass-hi); }
.result > p { color: var(--ink-dim); margin-top: 4px; }
.prize-pop { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 10px; animation: popin .6s cubic-bezier(.2, 1.6, .4, 1); }
.prize-pop b { font-family: var(--display); font-size: 38px; color: var(--brass-hi); font-variant-numeric: tabular-nums; }
.ranking { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; text-align: left; }
.ranking li { display: grid; grid-template-columns: 34px 1fr auto 20px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(var(--sink), .25); }
.ranking li.won { box-shadow: inset 0 0 0 1.5px var(--brass); }
.ranking li.me b { color: var(--brass-hi); }
.ranking span { font-size: 13.5px; color: var(--ink-dim); text-align: right; }
.ranking em { font-style: normal; color: var(--brass-hi); }

/* ==========================================================================
   YATAY TELEFON ve GENİŞ EKRAN
   ========================================================================== */
@media (max-height: 520px) and (orientation: landscape) {
  .g-top { height: 44px; }
  .g-status { padding: 3px 12px 0; min-height: 22px; font-size: 13px; }
  .seat .av { --s: 30px !important; }
  .seat-meta b { font-size: 12.5px; }
  .seat-meta small { font-size: 11px; }
  /* okey */
  .okey-board { position: relative; padding-top: 2px; gap: 4px; }
  .ob-top { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); z-index: 5; flex-direction: row; }
  .ob-top .opp-rack { display: none; }
  .ob-side, .ob-side .seat { width: 64px; }
  .opp-rack.left, .opp-rack.right { display: none; }
  .okey-felt { padding: 8px 10px; gap: 4px; margin: 4px; }
  .okey-board:not(.n3) .okey-felt { padding-top: 34px; }
  .pile { padding: 3px; min-width: 50px; }
  .pile .tile, .pile-under .tile, .ind .tile { --tw: 22px; }
  .pile-empty { width: 22px; height: 31px; }
  .pile-cap { font-size: 10px; }
  .deck { width: 46px; height: 46px; }
  .deck i { width: 30px; height: 36px; left: 8px; }
  .deck b { top: 11px; font-size: 14px; }
  .okey-center { gap: 12px; padding: 0; }
  .meld .tile { --tw: 17px; }
  .ob-bottom { flex-direction: row; align-items: flex-end; gap: 8px; }
  .ob-me { flex-direction: column; align-items: stretch; width: 210px; flex: none; overflow: visible; }
  .ob-me .seat.compact { align-self: flex-start; }
  .ob-actions { flex-wrap: wrap; justify-content: flex-start; overflow: visible; }
  .ob-actions .btn.sm, .ob-actions .chipbtn { min-height: 32px; padding: 5px 9px; font-size: 13px; }
  .rack { --tw: min(34px, calc((100vw - 250px) / 15), calc((100dvh - 230px) / 2.84)); flex: 1; align-self: flex-end; }
  /* kartlar */
  .cb-top .opp-cards { display: none; }
  .cb-top { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); z-index: 5; }
  .cards-board { position: relative; }
  .cards-felt { min-height: 0; margin: 4px; }
  .trick { min-height: 0; }
  .trick-card .card { --cw: calc((100dvh - 150px) / 3.3); }
  .opp.left .opp-cards, .opp.right .opp-cards { display: none; }
  .cb-bottom { flex-direction: row; justify-content: center; align-items: flex-end; }
  .hand { padding-top: 10px; }
  .hand .card { --cw: min(54px, calc((100vw - 220px) / (1 + (var(--n) - 1) * .6))); }
  .pisti-pile { height: 110px; }
  .pile-card .card { --cw: 50px; }
  .panel { padding: 8px; }
  .bidgrid { grid-template-columns: repeat(5, 1fr); }
  .bidbtn { min-height: 34px; font-size: 15px; }
  .suitgrid { grid-template-columns: repeat(4, 1fr); }
  .suitbtn { min-height: 50px; font-size: 24px; }
  /* tavla */
  .tavla-wrap { display: grid; grid-template-columns: auto auto; grid-template-rows: auto 1fr auto; align-content: center; justify-content: center; column-gap: 14px; }
  .tv-head { grid-column: 1; grid-row: 1; flex-direction: column; align-items: flex-start; width: auto; }
  .tv-foot { grid-column: 1; grid-row: 3; width: auto; }
  .tv-board { grid-column: 2; grid-row: 1 / 4; --pw: min(46px, calc((100dvh - 150px) / 11)); }
  /* satranç */
  .chess-wrap { --bs: min(calc(100dvh - 110px), 560px); display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto 1fr; justify-content: center; column-gap: 14px; }
  .chess-wrap .board { grid-row: 1 / 4; grid-column: 1; }
  .chess-wrap .ch-bar { width: 260px; flex-wrap: wrap; }
  .chess-wrap .movelist { width: 260px; white-space: normal; grid-column: 2; }
}
@media (min-width: 900px) {
  .g-stage { max-width: 1180px; margin: 0 auto; width: 100%; }
  .ob-side, .ob-side .seat, .opp.left .seat, .opp.right .seat { width: 110px; }
  .ob-side .seat-meta b, .opp.left .seat-meta b, .opp.right .seat-meta b { max-width: 100px; }
  .pile .tile, .pile-under .tile, .ind .tile { --tw: 38px; }
  .meld .tile { --tw: 28px; }
}
@media (max-width: 380px) {
  .ob-side, .ob-side .seat { width: 60px; }
  .opp-rack.left, .opp-rack.right { display: none; }
  .game-card { grid-template-columns: 104px 1fr; }
  .brand-img { height: 28px; }
}
