/* 13花 — game client */

body {
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(130, 32, 58, .22), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(216, 181, 106, .08), transparent 60%),
    repeating-linear-gradient(135deg, rgba(216, 181, 106, .022) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(45deg, rgba(216, 181, 106, .022) 0 1px, transparent 1px 22px),
    var(--bg);
  background-attachment: fixed;
}
#app { min-height: 100dvh; }
.grow { flex: 1; }
.only-mobile { display: none !important; }

/* ───────── boot ───────── */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; }
.boot-star { width: 84px; height: 84px; animation: starPulse 2.2s ease-in-out infinite; filter: drop-shadow(0 0 28px rgba(216, 181, 106, .45)); }
.boot-name { font-family: var(--display); letter-spacing: .34em; font-size: 15px; color: var(--gold); padding-left: .34em; }
@keyframes starPulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.07) rotate(45deg); } }

/* ───────── cards ───────── */
.card {
  width: var(--cw, 64px); aspect-ratio: 100 / 140; border-radius: 9% / 6.4%; flex: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .45), 0 10px 22px rgba(0, 0, 0, .35);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), filter .3s, box-shadow .3s; backface-visibility: hidden;
}
.card-svg { display: block; width: 100%; height: 100%; }
.card.win { transform: translateY(-12%); box-shadow: 0 0 0 2px var(--gold-hi), 0 0 26px rgba(247, 230, 173, .75), 0 10px 22px rgba(0, 0, 0, .4); z-index: 2; }
.card.dim { filter: brightness(.5) saturate(.7); }
.card.deal { animation: dealIn .5s cubic-bezier(.2, .85, .25, 1) both; }
.card.deal.d1 { animation-delay: .1s; } .card.deal.d2 { animation-delay: .2s; }
@keyframes dealIn { from { opacity: 0; transform: translateY(-60%) rotateY(85deg) scale(.9); } }

/* ───────── logo / avatars ───────── */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-star { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(216, 181, 106, .35)); }
.logo-word { font-family: var(--display); font-weight: 700; letter-spacing: .2em; font-size: 17px; white-space: nowrap; }
.logo-word em { font-style: normal; font-weight: 400; color: var(--ivory); margin-left: .45em; }
.logo.big { flex-direction: column; gap: 14px; }
.logo.big .logo-star { width: 76px; height: 76px; }
.logo.big .logo-word { font-size: 30px; letter-spacing: .26em; padding-left: .26em; }

.av {
  --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; position: relative;
  background: linear-gradient(140deg, hsl(var(--h) 45% 38%), hsl(calc(var(--h) + 40) 50% 18%));
  box-shadow: 0 0 0 1.5px rgba(216, 181, 106, .55), 0 3px 10px rgba(0, 0, 0, .5);
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-i { font-family: var(--display); font-weight: 700; font-size: calc(var(--s) * .36); color: #fff; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.av.av-bot { background: radial-gradient(circle at 50% 35%, #223463, #0a1126); }
.av.av-bot .av-i { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.av.xs { --s: 28px; } .av.sm { --s: 30px; } .av.xl { --s: 92px; }
.avs { display: flex; align-items: center; }
.avs .av { margin-left: -9px; } .avs .av:first-child { margin-left: 0; }
.avs-more { margin-left: 6px; font-size: 12px; color: var(--muted); }

/* ───────── auth ───────── */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-art {
  position: relative; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 55%, var(--felt-hi), var(--felt) 45%, var(--felt-lo) 85%);
  border-right: 1px solid var(--line-strong);
}
.auth-art::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 16px), repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 16px); }
.auth-art::after { content: ""; position: absolute; inset: 22px; border: 1px solid rgba(216, 181, 106, .35); border-radius: 18px; pointer-events: none; }
.auth-glow { position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(247, 230, 173, .22), transparent 65%); filter: blur(10px); }
.auth-fan { position: relative; width: min(60%, 420px); aspect-ratio: 1.5; z-index: 1; }
.auth-fan .card {
  --cw: 36%; position: absolute; left: 32%; bottom: 0; transform-origin: 50% 175%;
  transform: rotate(calc(var(--i) * 12deg)); animation: fanIn .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc((var(--i) + 2) * 80ms);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
@keyframes fanIn { from { transform: rotate(0) translateY(30%); opacity: 0; } }
.auth-side { display: grid; place-items: center; padding: 28px 20px; }
.auth-box { width: min(400px, 100%); display: grid; gap: 18px; }
.auth-tag { text-align: center; color: var(--muted); margin: 0; }
.auth-tag b { color: var(--gold-hi); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: #0a0e14; border: 1px solid var(--line); }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; }
.auth-tabs button.on { background: rgba(216, 181, 106, .16); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line-strong); }
.auth-form { display: grid; gap: 14px; }
.auth-bonus { margin: 0; text-align: center; font-size: 14px; color: var(--text); }
.auth-bonus b { color: var(--gold-hi); }
.auth-fine { margin: 0; text-align: center; font-size: 12px; color: var(--faint); }

/* ───────── top bar ───────── */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 20px;
  background: rgba(7, 9, 13, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.balance { display: flex; align-items: center; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; background: linear-gradient(180deg, #1a1608, #0f0d07); border: 1px solid var(--line-strong); font-size: 15px; }
.balance .star { width: 22px; height: 22px; }
.me-btn { display: flex; align-items: center; gap: 9px; padding: 3px 12px 3px 3px; border-radius: 999px; background: transparent; border: 1px solid transparent; }
.me-btn:hover { border-color: var(--line-strong); background: rgba(216, 181, 106, .06); }
.me-btn .av { --s: 38px; }
.me-name { font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── lobby ───────── */
.lobby-body { max-width: 1440px; margin: 0 auto; padding: 22px 20px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.lobby-main { display: grid; gap: 20px; min-width: 0; }
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  padding: 30px 34px; border-radius: 22px; border: 1px solid var(--line-strong);
  background:
    radial-gradient(520px 300px at 88% 50%, rgba(130, 32, 58, .55), transparent 70%),
    linear-gradient(120deg, #131925 0%, #0b1017 55%, #2a070f 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.hero::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(216, 181, 106, .14); border-radius: 16px; pointer-events: none; }
.hero-kicker { font-family: var(--display); letter-spacing: .22em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.hero-name { font-family: var(--serif); font-weight: 700; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; margin: 2px 0 8px; overflow-wrap: anywhere; }
.hero-sub { margin: 0 0 20px; color: var(--muted); }
.hero-sub .dot { margin-right: 9px; vertical-align: 1px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(69, 192, 140, .18); display: inline-block; flex: none; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-art { position: relative; width: 300px; height: 190px; margin-right: 10px; }
.hero-art .card { --cw: 104px; position: absolute; left: 50%; top: 50%; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.hero-star { position: absolute; width: 54px; height: 54px; right: -6px; bottom: -4px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6)); animation: starPulse 5s ease-in-out infinite; }

.resume { display: grid; gap: 8px; }
.resume-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--gold); background: linear-gradient(90deg, rgba(216, 181, 106, .16), rgba(216, 181, 106, .04)); }

.tabs { display: flex; gap: 8px; padding: 5px; border-radius: 999px; background: rgba(10, 14, 20, .8); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tabs button { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-weight: 600; white-space: nowrap; position: relative; }
.tabs button i { font-style: normal; font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .07); color: var(--muted); }
.tabs button.on { background: rgba(216, 181, 106, .15); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line-strong); }
.tabs button.on i { background: rgba(216, 181, 106, .25); color: var(--gold-hi); }
.badge { background: var(--crimson) !important; color: #fff !important; }

.list { display: grid; gap: 12px; }
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 4px; flex-wrap: wrap; }
.list-head h2 { font-size: 20px; color: var(--ivory); }
.list-head p { margin: 4px 0 0; font-size: 14px; max-width: 60ch; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }

.row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto auto; align-items: center; gap: 16px; padding: 12px 16px 12px 12px;
  border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22, 28, 39, .9), rgba(15, 19, 27, .9)); transition: border-color .15s, transform .15s;
}
.row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.row.house { border-color: rgba(216, 181, 106, .3); }
.row-felt {
  width: 76px; height: 52px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1.05;
  background: radial-gradient(ellipse at 50% 40%, var(--felt-hi), var(--felt-lo)); box-shadow: 0 0 0 3px #2a1b0e, 0 0 0 4px rgba(216, 181, 106, .6), 0 6px 14px rgba(0, 0, 0, .5);
}
.row-felt b { font-size: 13px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.row-felt small { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.row-main h3 { font-size: 16px; color: var(--ivory); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-main p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.row-main .star { width: 1em; height: 1em; }
.row-seats { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 48px; }
.row-seats b { color: var(--ivory); font-size: 17px; }
.row-seats small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.row-act { display: flex; gap: 8px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.tcard { display: grid; gap: 12px; padding: 18px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22, 28, 39, .95), rgba(13, 17, 24, .95)); align-content: start; }
.tcard.running { border-color: rgba(216, 181, 106, .4); }
.tcard header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tcard h3 { font-size: 17px; color: var(--ivory); overflow-wrap: anywhere; }
.tcard-prize { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(120deg, rgba(216, 181, 106, .14), rgba(216, 181, 106, .03)); border: 1px solid var(--line); }
.tcard-prize small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tcard-prize .stars { font-family: var(--serif); font-size: 28px; }
.tcard-prize .star { width: .9em; height: .9em; }
.tcard footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tcard.finished { opacity: .78; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0; }
.facts.three { grid-template-columns: repeat(3, 1fr); }
.facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 1px 0 0; font-weight: 600; color: var(--text); font-size: 14px; }
.places { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.places li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .035); font-size: 14px; }
.places li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.places .up { color: #8be0bb; } .places .down { color: #ffb3ad; }
.places.big li { padding: 10px 12px; font-size: 15px; } .places.big li.me { box-shadow: inset 0 0 0 1px var(--gold); }
.places.tight li { padding: 4px 8px; font-size: 13px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; color: var(--gold-hi); font-weight: 700; }
button.code { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px dashed var(--line-strong); background: rgba(216, 181, 106, .08); font-size: 13px; }
button.code:hover { background: rgba(216, 181, 106, .18); }

.lobby-chat { position: sticky; top: 86px; height: calc(100dvh - 108px); display: flex; flex-direction: column; overflow: hidden; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.side-head h2 { font-size: 14px; color: var(--gold-hi); }
.online { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* ───────── chat ───────── */
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; overscroll-behavior: contain; }
.chat-empty { margin: auto; color: var(--faint); font-size: 14px; text-align: center; padding: 20px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-start; animation: fade .2s; }
.chat-bubble { background: rgba(255, 255, 255, .05); border-radius: 4px 14px 14px 14px; padding: 6px 11px 7px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.chat-bubble b { display: block; font-size: 12px; color: var(--gold); font-weight: 600; }
.chat-msg.mine .chat-bubble { background: rgba(216, 181, 106, .13); }
.chat-sys { font-size: 12.5px; color: var(--muted); text-align: center; padding: 2px 8px; }
.chat-sys.win { color: var(--gold-hi); } .chat-sys.gift { color: #f3a6b6; } .chat-sys.info { color: #9fc4ff; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom) * .3); border-top: 1px solid var(--line); }
.chat-form .input { min-height: 42px; border-radius: 999px; }

/* ───────── table screen ───────── */
.tbl { height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(130, 32, 58, .18), transparent 70%); }
.tbl-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(7, 9, 13, .7); backdrop-filter: blur(10px); z-index: 20; }
.tbl-title { min-width: 0; }
.tbl-title h1 { font-family: var(--display); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-title p { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl-top .balance { height: 34px; font-size: 14px; }
.chat-toggle { position: relative; }
.chat-toggle .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; font: 700 11px/18px var(--sans); text-align: center; padding: 0 4px; font-style: normal; }
.tbl-main { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; }
.arena { container-type: size; display: grid; place-items: center; padding: clamp(34px, 6.5vh, 70px) clamp(30px, 4.5vw, 76px) clamp(30px, 5vh, 56px); min-width: 0; min-height: 0; }
.tbl-side { margin: 10px 10px 10px 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.only-narrow { display: none; }
.info { padding: 10px 14px; display: grid; gap: 6px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); }
.info-row b { color: var(--text); font-variant-numeric: tabular-nums; }

/* felt */
.felt-wrap {
  --av: clamp(40px, 7.4cqw, 86px); --hole: clamp(26px, 3.9cqw, 48px); --hero: clamp(44px, 6.3cqw, 84px); --bw: clamp(34px, 6.3cqw, 84px);
  position: relative; width: min(100cqw, calc(100cqh * 1.92)); aspect-ratio: 1.92; container-type: inline-size;
}
.rail {
  position: absolute; inset: 5.5% 4.5%; border-radius: 50%; padding: clamp(8px, 1.5cqw, 20px);
  background: linear-gradient(160deg, #4a3120 0%, #24160c 40%, #3a2617 70%, #170e07 100%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .8), inset 0 2px 3px rgba(255, 220, 170, .22), inset 0 -4px 10px rgba(0, 0, 0, .6);
}
.felt {
  width: 100%; height: 100%; border-radius: 50%; position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, .03) 0 1px, transparent 1px 7px),
    radial-gradient(ellipse at 50% 42%, var(--felt-hi) 0%, var(--felt) 48%, var(--felt-lo) 100%);
  box-shadow: inset 0 0 0 2px rgba(216, 181, 106, .75), inset 0 0 0 5px rgba(0, 0, 0, .35), inset 0 10px 50px rgba(0, 0, 0, .55);
}
.felt::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1px solid rgba(216, 181, 106, .2); }
.felt-mark { position: absolute; left: 50%; top: 79%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: .8cqw; opacity: .3; font-family: var(--display); letter-spacing: .3em; font-size: clamp(9px, 1.25cqw, 15px); color: var(--gold-hi); white-space: nowrap; }
.felt-mark svg { width: 2.2cqw; height: 2.2cqw; min-width: 14px; min-height: 14px; }

.center { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: clamp(6px, 1.1cqw, 14px); z-index: 4; width: 80%; pointer-events: none; }
.board { display: flex; gap: clamp(4px, .8cqw, 10px); }
.slot { width: var(--bw); aspect-ratio: 100 / 140; border-radius: 9% / 6.4%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); background: rgba(0, 0, 0, .1); }
.slot .card { --cw: 100%; }
.pot { display: grid; justify-items: center; gap: 3px; }
.pot-main { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px 4px 6px; border-radius: 999px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(216, 181, 106, .35); color: var(--ivory); font-size: clamp(12px, 1.5cqw, 16px); }
.pot-main b { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.pot-side { display: flex; gap: 6px; font-size: clamp(10px, 1.1cqw, 12px); color: rgba(255, 255, 255, .7); }
.pot-side em { font-style: normal; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .35); }
.chip { width: 1.25em; height: 1.25em; border-radius: 50%; flex: none; display: inline-block; background: radial-gradient(circle, #f7e6ad 0 26%, #b98a35 27% 42%, #14213f 43% 100%); box-shadow: inset 0 0 0 1.5px #f7e6ad, 0 1px 3px rgba(0, 0, 0, .6); }
.banner { padding: 7px 18px; border-radius: 999px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .12); font-size: clamp(12px, 1.5cqw, 15px); color: var(--ivory); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; text-align: center; animation: rise .3s; }
.banner.soft { color: rgba(255, 255, 255, .75); }
.banner.win { border-color: var(--gold); background: linear-gradient(180deg, rgba(60, 46, 14, .92), rgba(20, 16, 6, .92)); box-shadow: 0 0 34px rgba(216, 181, 106, .35); }
.banner.win b { color: var(--gold-hi); } .banner.win span:last-child { color: var(--muted); }

/* seats */
.seat { position: absolute; transform: translate(-50%, -50%); width: calc(var(--av) * 2.1); display: grid; justify-items: center; z-index: 6; transition: opacity .3s, filter .3s; }
.seat.acting { z-index: 8; }
.seat-av { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; display: grid; }
.seat-av .av { --s: var(--av); box-shadow: 0 0 0 2px rgba(216, 181, 106, .7), 0 0 0 4px rgba(0, 0, 0, .55), 0 8px 18px rgba(0, 0, 0, .6); transition: box-shadow .25s; }
.seat.acting .seat-av .av { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 0 5px rgba(0, 0, 0, .5), 0 0 30px rgba(247, 230, 173, .75); }
.seat.folded .seat-av, .seat.out .seat-av { filter: grayscale(.8) brightness(.6); }
.seat.offline .seat-av { filter: grayscale(1) brightness(.55); }
.seat.winner .seat-av .av { box-shadow: 0 0 0 3px var(--gold-hi), 0 0 44px rgba(247, 230, 173, .95); animation: winPulse 1s ease-in-out infinite alternate; }
@keyframes winPulse { to { box-shadow: 0 0 0 3px #fff6d0, 0 0 64px rgba(247, 230, 173, 1); } }
.bot-tag { display: inline-block; margin-left: 5px; vertical-align: 1px; font: 700 .68em/1 var(--sans); letter-spacing: .08em; font-style: normal; padding: 2px 4px; border-radius: 5px; background: #14213f; color: var(--gold-hi); border: 1px solid rgba(216, 181, 106, .7); }
.ring { position: absolute; inset: -9%; width: 118%; height: 118%; transform: rotate(-90deg); pointer-events: none; }
.ring-bg { fill: none; stroke: rgba(0, 0, 0, .55); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--gold-hi); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100; animation: ring linear forwards; }
@keyframes ring { 0% { stroke-dashoffset: 0; stroke: #f7e6ad; } 65% { stroke: #f7e6ad; } 85% { stroke: #ff8a5c; } 100% { stroke-dashoffset: 100; stroke: #ff4d4d; } }
.plate {
  margin-top: calc(var(--av) * -.2); position: relative; z-index: 2; min-width: calc(var(--av) * 1.5); max-width: calc(var(--av) * 2.1);
  padding: 3px 10px 4px; border-radius: 10px; text-align: center; line-height: 1.2;
  background: linear-gradient(180deg, #1b2130, #0b0e15); border: 1px solid rgba(216, 181, 106, .45); box-shadow: 0 6px 14px rgba(0, 0, 0, .55);
}
.plate-name { display: block; font-size: clamp(10px, 1.25cqw, 13px); font-weight: 600; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate-stack { display: flex; align-items: center; justify-content: center; gap: 3px; font-size: clamp(10.5px, 1.3cqw, 14px); font-weight: 700; color: var(--gold-hi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plate-stack .star { width: 1em; height: 1em; }
.plate-stack em { font-style: normal; font-weight: 600; color: var(--muted); font-size: .92em; }
.plate-stack em.hot { color: #ff9a7a; text-transform: uppercase; letter-spacing: .06em; }
.seat.is-me .plate { border-color: var(--gold); }

.hole { position: absolute; top: 0; left: 74%; display: flex; z-index: 1; pointer-events: none; }
.seat.p-right .hole { left: auto; right: 74%; }
.hole .card { --cw: var(--hole); animation: holeIn .45s cubic-bezier(.2, .8, .2, 1) both; }
.hole .card.h0 { transform: rotate(-7deg); } .hole .card.h1 { transform: rotate(7deg) translateY(4%); margin-left: calc(var(--hole) * -.52); animation-delay: .08s; }
.seat.shown .hole { z-index: 9; top: -14%; left: 78%; }
.seat.p-right.shown .hole { left: auto; right: 78%; }
.seat.shown .hole .card { --cw: calc(var(--hole) * 1.42); }
.seat.shown .hole .card.h1 { margin-left: calc(var(--hole) * -.3); }
.seat.is-me .hole { left: 50%; right: auto; top: auto; bottom: 94%; transform: translateX(-50%); z-index: 3; }
.seat.is-me .hole .card { --cw: var(--hero); }
.seat.is-me .hole .card.h0 { transform: rotate(-5deg); } .seat.is-me .hole .card.h1 { transform: rotate(5deg); margin-left: calc(var(--hero) * -.26); }
.seat.is-me.folded .hole { opacity: .45; filter: grayscale(.6); }
.hole .card.win { transform: translateY(-10%) !important; }
@keyframes holeIn { from { opacity: 0; transform: translate(0, -80%) scale(.6) rotate(-30deg); } }

.act-tag { position: absolute; top: -9%; left: 50%; transform: translateX(-50%); z-index: 5; padding: 2px 9px; border-radius: 999px; font: 700 clamp(9.5px, 1.1cqw, 12px)/1.5 var(--sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; background: #1b2130; border: 1px solid rgba(255, 255, 255, .2); color: var(--ivory); animation: tagIn .25s cubic-bezier(.2, .9, .3, 1.4); }
.act-tag.a-fold { color: #b8bfcc; } .act-tag.a-check { color: #9fc4ff; border-color: rgba(106, 165, 255, .5); }
.act-tag.a-call { color: #8be0bb; border-color: rgba(69, 192, 140, .5); }
.act-tag.a-bet, .act-tag.a-raise { color: var(--gold-hi); border-color: var(--gold); }
.act-tag.a-allin { background: linear-gradient(180deg, #d2463f, #8d1f1a); color: #fff; border-color: #ffb3ad; }
.seat.is-me .act-tag { top: auto; bottom: 100%; left: 108%; transform: none; }
@keyframes tagIn { from { opacity: 0; transform: translateX(-50%) scale(.6); } }
.hand-name { margin-top: 3px; padding: 1px 9px; border-radius: 999px; font-size: clamp(9.5px, 1.1cqw, 12px); font-weight: 600; white-space: nowrap; color: var(--gold-hi); background: rgba(0, 0, 0, .6); border: 1px solid rgba(216, 181, 106, .4); z-index: 3; }
.hand-name.win { background: var(--gold-grad); color: #2a1d05; border-color: #fff3c4; }

.seat.is-empty { z-index: 3; }
.seat-hole { width: calc(var(--av) * .8); height: calc(var(--av) * .8); border-radius: 50%; border: 1.5px dashed rgba(216, 181, 106, .2); background: rgba(0, 0, 0, .25); }
.seat-open { width: var(--av); height: var(--av); border-radius: 50%; border: 1.5px dashed var(--gold); background: rgba(10, 14, 20, .78); color: var(--gold-hi); display: grid; place-content: center; line-height: 1; transition: all .15s; }
.seat-open b { font-size: calc(var(--av) * .34); font-weight: 400; } .seat-open span { font-size: calc(var(--av) * .2); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.seat-open:hover { background: rgba(216, 181, 106, .2); transform: scale(1.06); box-shadow: 0 0 24px rgba(216, 181, 106, .4); }

.bet { position: absolute; transform: translate(-50%, -50%); z-index: 5; display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 3px; border-radius: 999px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(216, 181, 106, .3); color: var(--gold-hi); font: 700 clamp(10.5px, 1.3cqw, 14px)/1.4 var(--sans); font-variant-numeric: tabular-nums; animation: fade .25s; white-space: nowrap; }
.dealer { position: absolute; left: -30%; top: 34%; z-index: 4; width: calc(var(--av) * .34); height: calc(var(--av) * .34); min-width: 17px; min-height: 17px; border-radius: 50%; display: grid; place-items: center; font: 700 calc(var(--av) * .17)/1 var(--display); font-style: normal; color: #2a1d05; background: var(--gold-grad); box-shadow: 0 0 0 1.5px #fff7dc, 0 3px 8px rgba(0, 0, 0, .6); animation: tagIn2 .3s; }
.seat.p-right .dealer { left: auto; right: -30%; }
@keyframes tagIn2 { from { opacity: 0; transform: scale(.4); } }
.bet.mine { transform: translate(calc(-50% + var(--hero) * 1.9), calc(-50% - var(--av) * .5)); }

/* effects */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.fx > * { position: absolute; transform: translate(-50%, -50%); }
.fx-win { font: 700 clamp(15px, 2.2cqw, 26px)/1 var(--serif); color: var(--gold-hi); text-shadow: 0 2px 10px rgba(0, 0, 0, .9), 0 0 22px rgba(216, 181, 106, .8); animation: floatUp 3.2s ease-out forwards; white-space: nowrap; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 12% { opacity: 1; transform: translate(-50%, -110%) scale(1.15); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.fx-sticker { font-size: clamp(38px, 6.4cqw, 76px); animation: stickerLife 2.9s ease forwards; }
@keyframes stickerLife { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 16% { transform: translate(-50%, -50%) scale(1); } 86% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) scale(.9); } }
.fx-bubble { max-width: min(46cqw, 240px); padding: 6px 12px; border-radius: 14px 14px 14px 4px; background: var(--ivory); color: #1a1d26; font-size: clamp(11px, 1.35cqw, 14px); font-weight: 500; line-height: 1.3; box-shadow: 0 8px 22px rgba(0, 0, 0, .55); transform: translate(8%, -150%); animation: bubble 3.6s ease forwards; overflow-wrap: anywhere; z-index: 2; }
.fx-bubble.r { transform: translate(-108%, -150%); border-radius: 14px 14px 4px 14px; }
.fx-bubble.below { transform: translate(8%, 60%); } .fx-bubble.r.below { transform: translate(-108%, 60%); }
@keyframes bubble { 0% { opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
.fx-gift { width: clamp(70px, 13cqw, 150px); aspect-ratio: 1; transition: left 1.15s cubic-bezier(.45, .05, .2, 1), top 1.15s cubic-bezier(.45, .05, .2, 1), opacity .45s; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .6)); z-index: 3; }
.fx-gift.start { opacity: 0; } .fx-gift.out { opacity: 0; }
.fx-gift .gift-svg { width: 100%; height: 100%; display: block; overflow: visible; transform-origin: 50% 50%; animation: giftGrow 1.15s ease-out both; }
.fx-gift.flip .gift-svg { scale: -1 1; }
.fx-gift.land .gift-svg { animation: giftLand .7s cubic-bezier(.2, .9, .3, 1.5) both; }
.fx-gift.land::after { content: ""; position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle, rgba(247, 230, 173, .5), transparent 62%); animation: burst .9s ease-out forwards; z-index: -1; }
@keyframes giftGrow { from { transform: scale(.35); } to { transform: scale(1); } }
@keyframes giftLand { 0% { transform: scale(1); } 40% { transform: scale(1.3) rotate(-4deg); } 100% { transform: scale(1.12); } }
@keyframes burst { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.7); } }

/* gift artwork motion */
.gift-svg { overflow: visible; }
.gift-svg .wheel { animation: spin .45s linear infinite; }
.gift-svg .speed path, .gift-svg .trail path { stroke-dasharray: 14 10; animation: streak .35s linear infinite; }
@keyframes streak { to { stroke-dashoffset: -24; } }
.gift-svg .chassis { animation: carBob .35s ease-in-out infinite alternate; }
@keyframes carBob { to { transform: translateY(-1.2px); } }
.g-rose .bloom { transform-origin: 60px 46px; animation: bloom 1.6s cubic-bezier(.2, .8, .3, 1.2) both, sway 2.4s ease-in-out 1.6s infinite alternate; }
@keyframes bloom { from { transform: scale(.35) rotate(-25deg); } }
@keyframes sway { to { transform: rotate(5deg); } }
.gift-svg .twinkle { transform-origin: 96px 29px; animation: twinkle 1.1s ease-in-out infinite alternate; }
@keyframes twinkle { from { transform: scale(.4) rotate(0); opacity: .4; } to { transform: scale(1.15) rotate(40deg); opacity: 1; } }
.g-champagne .cork { animation: corkPop 1.5s cubic-bezier(.2, .8, .3, 1) .9s both; }
@keyframes corkPop { from { transform: translate(0, 0) rotate(0); } to { transform: translate(6px, -30px) rotate(50deg); opacity: 0; } }
.g-champagne .bub { animation: bubbleUp 1.4s ease-out infinite; opacity: 0; }
.g-champagne .b2 { animation-delay: .25s; } .g-champagne .b3 { animation-delay: .5s; } .g-champagne .b4 { animation-delay: .75s; } .g-champagne .b5 { animation-delay: 1s; }
@keyframes bubbleUp { 0% { transform: translate(18px, 22px) scale(.3); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(-6px, -14px) scale(1.2); opacity: 0; } }
.g-jet .plane { animation: jetBob 1s ease-in-out infinite alternate; }
@keyframes jetBob { from { transform: rotate(-14deg) translateY(1.5px); } to { transform: rotate(-11deg) translateY(-2px); } }

/* stickers */
.sticker { display: inline-grid; place-items: center; line-height: 1; }
.sticker.emoji { font-size: 1em; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.sticker.word { font: 700 .36em/1.02 var(--display); letter-spacing: .08em; padding: .5em .75em; border-radius: .6em; text-align: center; color: #2a1d05; background: var(--gold-grad); box-shadow: inset 0 0 0 .1em #fff3c4, 0 .3em .8em rgba(0, 0, 0, .55); transform: rotate(-6deg); }
.sticker.word i { display: block; font-style: normal; white-space: nowrap; }
.a-pop { animation: sPop 1s ease-in-out infinite alternate; } @keyframes sPop { to { transform: scale(1.14) rotate(4deg); } }
.sticker.word.a-pop { animation-name: sPopW; } @keyframes sPopW { from { transform: rotate(-6deg) scale(1); } to { transform: rotate(-2deg) scale(1.1); } }
.a-slam { animation: sSlam .7s cubic-bezier(.3, 1.6, .5, 1) both; } @keyframes sSlam { from { transform: scale(2.6) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(-6deg); opacity: 1; } }
.a-wobble { animation: sWobble .7s ease-in-out infinite alternate; } @keyframes sWobble { from { transform: rotate(-12deg); } to { transform: rotate(10deg); } }
.a-shake { animation: sShake .22s linear infinite alternate; } @keyframes sShake { from { transform: translateX(-4%) rotate(-5deg); } to { transform: translateX(4%) rotate(5deg); } }
.a-clap { animation: sClap .3s ease-in-out infinite alternate; } @keyframes sClap { to { transform: scale(1.22); } }
.a-flame { animation: sFlame .5s ease-in-out infinite alternate; transform-origin: 50% 90%; } @keyframes sFlame { from { transform: scale(.94, 1.04); } to { transform: scale(1.1, .96) rotate(-3deg); } }
.a-float { animation: sFloat 1.1s ease-in-out infinite alternate; } @keyframes sFloat { from { transform: translateY(8%); } to { transform: translateY(-12%) rotate(-6deg); } }
.a-beat { animation: sBeat .55s ease-in-out infinite alternate; } @keyframes sBeat { to { transform: scale(1.28); } }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sticker-pick { font-size: 44px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .08); background: #0a0e14; transition: all .15s; overflow: hidden; }
.sticker-pick:hover { border-color: var(--gold); background: rgba(216, 181, 106, .1); transform: translateY(-2px); }
.sticker-pick:not(:hover) .sticker { animation: none !important; }
.fun-tabs { margin-bottom: 16px; }
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.gift-pick { display: grid; justify-items: center; gap: 4px; padding: 12px 8px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .08); background: radial-gradient(circle at 50% 30%, #17203a, #0a0e14 70%); transition: all .15s; }
.gift-pick b { font-size: 13px; color: var(--ivory); } .gift-pick .stars { font-size: 13px; }
.gift-pick:hover:not([disabled]) { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .5); }
.gift-pick[disabled] { opacity: .4; cursor: not-allowed; }
.gift-art { width: 78px; height: 78px; display: block; } .gift-art svg { width: 100%; height: 100%; }
.gift-pick:not(:hover) .gift-svg * { animation: none !important; }

/* ───────── action bar ───────── */
.actionbar { position: relative; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(12, 16, 23, .92), #080a0f); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); z-index: 22; }
.actionbar.my-turn { border-top-color: var(--gold); box-shadow: 0 -14px 40px rgba(216, 181, 106, .12); }
.actionbar-in { max-width: 820px; margin: 0 auto; display: flex; align-items: flex-end; gap: 10px; min-height: 58px; }
.tbl.seated .actionbar-in { min-height: 134px; }
.tbl.seated .wait { align-self: center; }
.tbl.seated .fun-btn { align-self: flex-end; }
.turn-clock { position: absolute; left: 0; right: 0; top: -2px; height: 3px; overflow: hidden; }
.turn-clock i { display: block; height: 100%; background: var(--gold-grad); transform-origin: left; animation: clock linear forwards; }
.turn-clock.low i { background: linear-gradient(90deg, #ff8a5c, #ff4d4d); }
@keyframes clock { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.fun-btn { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 1px solid var(--line-strong); background: #0d1118; color: var(--gold-hi); display: grid; place-items: center; }
.fun-btn:hover { background: rgba(216, 181, 106, .14); }
.wait { flex: 1; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 14.5px; text-align: center; flex-wrap: wrap; }
.wait b { color: var(--ivory); }
.actions { flex: 1; display: grid; gap: 8px; min-width: 0; }
.buttons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.act { min-height: 54px; border-radius: 16px; border: 1px solid; display: grid; place-content: center; justify-items: center; line-height: 1.12; font-weight: 700; font-size: 16px; letter-spacing: .02em; transition: transform .1s, filter .15s; }
.act span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.act b { font-size: 17px; font-variant-numeric: tabular-nums; }
.act:active { transform: scale(.97); } .act:hover { filter: brightness(1.12); } .act[disabled] { opacity: .5; }
.act.fold { background: linear-gradient(180deg, #2a1517, #180b0d); border-color: rgba(224, 87, 79, .55); color: #ffb3ad; }
.act.check, .act.call { background: linear-gradient(180deg, #17624b, #0b3528); border-color: rgba(139, 224, 187, .55); color: #dffff0; }
.act.raise { background: var(--gold-grad); border-color: #fff3c4; color: #2a1d05; box-shadow: 0 6px 22px rgba(216, 181, 106, .3); }
.sizer { display: grid; gap: 7px; }
.presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.presets button { min-height: 32px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); background: #0d1118; color: var(--text); font-size: 12.5px; font-weight: 600; }
.presets button:hover { border-color: var(--gold); color: var(--gold-hi); }
.slide { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px 96px; gap: 8px; align-items: center; }
.nudge { height: 36px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); background: #0d1118; color: var(--gold-hi); font-size: 20px; line-height: 1; }
.slide .amt { min-height: 36px; padding: 0 8px; text-align: center; font-weight: 700; border-radius: 10px; -moz-appearance: textfield; appearance: textfield; }
.amt::-webkit-outer-spin-button, .amt::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; margin: 0; touch-action: pan-y; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), #1c2230 var(--p, 0%)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.range::-moz-range-track { height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--gold) var(--p, 0%), #1c2230 var(--p, 0%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--gold-grad); border: 2px solid #fff7dc; box-shadow: 0 3px 10px rgba(0, 0, 0, .6); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #e2bd66; border: 2px solid #fff7dc; }

/* menu */
.menu-back { position: fixed; inset: 0; z-index: 70; }
.menu { position: absolute; top: 54px; right: 10px; min-width: 240px; display: grid; padding: 6px; border-radius: 16px; background: #141a25; border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: rise .16s; }
.menu button { text-align: left; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-weight: 500; }
.menu button:hover { background: rgba(216, 181, 106, .12); color: var(--gold-hi); }
.menu button.danger { color: #ffb3ad; }

/* modal bits */
.code-input { text-align: center; font: 700 26px/1 ui-monospace, Menlo, monospace; letter-spacing: .32em; min-height: 62px; text-transform: uppercase; padding-left: .32em; }
.buyin-amount { text-align: center; } .buyin-amount .stars { font: 700 40px/1.1 var(--serif); } .buyin-amount .star { width: .85em; height: .85em; }
.buyin-ends { display: flex; justify-content: space-between; }
.profile-top { display: flex; align-items: center; gap: 18px; }
.avatar-edit { display: grid; justify-items: center; gap: 6px; border: 0; background: none; color: var(--gold); font-size: 12.5px; font-weight: 600; padding: 0; }
.avatar-edit:hover .av { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 24px rgba(216, 181, 106, .5); }
.profile-name { font-family: var(--serif); font-size: 24px; color: var(--ivory); overflow-wrap: anywhere; }
.profile-top p { margin: 2px 0; } .profile-bal .stars { font-size: 20px; }
.confirm-text { margin: 0; color: var(--text); }
.result-big { text-align: center; display: grid; gap: 4px; padding: 6px 0 10px; }
.result-big p { margin: 0; }
.result-place { font: 700 46px/1.1 var(--serif); }
.places.big + .modal-foot { margin-top: 16px; }
.result-big + .places { margin-top: 6px; }
.result-big .result-place:only-child { font-size: 22px; font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; }
.result-prize { font-size: 20px; margin-top: 8px; } .result-prize .stars { font-size: 26px; font-family: var(--serif); }

/* ───────── responsive ───────── */
@media (max-width: 1179px) {
  .tbl-main { grid-template-columns: minmax(0, 1fr); }
  .tbl-side { display: none; position: fixed; z-index: 60; right: 10px; top: 64px; bottom: 10px; width: min(360px, calc(100% - 20px)); margin: 0; box-shadow: var(--shadow); background: linear-gradient(180deg, #171d29, #0e131b); }
  .tbl.chat-open .tbl-side { display: flex; animation: rise .2s; }
  .only-narrow { display: block; }
}
@media (min-width: 1180px) { .chat-toggle { display: none; } }

@media (max-width: 1023px) {
  .lobby-body { grid-template-columns: minmax(0, 1fr); padding: 14px 12px calc(96px + env(safe-area-inset-bottom)); }
  .lobby-chat { display: none; position: static; height: calc(100dvh - 64px - 78px - env(safe-area-inset-bottom)); }
  .lobby.tab-chat .lobby-chat { display: flex; }
  .lobby.tab-chat .hero, .lobby.tab-chat .resume, .lobby.tab-chat .tab-body { display: none; }
  .lobby.tab-chat .lobby-body { padding-top: 10px; gap: 0; }
  .lobby.tab-chat .lobby-main { display: block; }
  .only-mobile { display: flex !important; }
  .tabs { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; width: auto; border-radius: 0; border: 0; border-top: 1px solid var(--line-strong); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 2px; background: rgba(8, 10, 15, .96); backdrop-filter: blur(12px); display: grid; grid-template-columns: repeat(4, 1fr); }
  .tabs button { flex-direction: column; gap: 3px; min-height: 54px; padding: 4px 2px; font-size: 11.5px; border-radius: 12px; }
  .tabs button i { position: absolute; top: 3px; left: calc(50% + 8px); font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px; }
  .hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .hero-art { display: none; }
  .hero-cta .btn { flex: 1 1 140px; }
  .hero-cta .btn.lg { padding: 0 14px; font-size: 15px; }
  .hero-cta .btn.gold { flex-basis: 100%; }
  .ver { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: 200px auto; }
  .auth-art { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .auth-art::after { inset: 10px; }
  .auth-fan { width: 210px; }
  .auth-side { place-items: start center; padding-top: 22px; }
  .logo.big .logo-star { width: 54px; height: 54px; } .logo.big .logo-word { font-size: 24px; }
  .topbar { padding: 0 12px; height: 58px; }
  .topbar .logo-word em { display: none; }
  .me-name { display: none; } .me-btn { padding: 3px; }
  .row { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px 12px; padding: 12px; }
  .row-felt { width: 60px; height: 42px; } .row-felt b { font-size: 11.5px; }
  .row .avs { grid-column: 1 / 3; grid-row: 2; } .row-seats { grid-column: 3; grid-row: 1; }
  .row-act { grid-column: 3; grid-row: 2; justify-self: end; }
  .row-main p { font-size: 12.5px; }
  .list-head .btn { width: 100%; }
  .modal { padding: 18px; border-radius: 18px; }
  .modal-back { align-items: end; padding: 0; }
  .modal-back .modal { width: 100%; border-radius: 22px 22px 0 0; max-height: 92dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); animation: sheet .25s cubic-bezier(.2, .9, .3, 1); }
  .tbl-top { padding: 0 8px; gap: 6px; height: 52px; }
  .only-wide { display: none !important; }
  .back { padding: 0 10px; }
  .act { min-height: 52px; border-radius: 14px; }
  .slide { grid-template-columns: 34px minmax(0, 1fr) 34px 78px; gap: 6px; }
  .fun-btn { width: 46px; height: 46px; }
  .actionbar { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); } .actionbar-in { gap: 7px; }
  .sticker-grid { gap: 8px; } .sticker-pick { font-size: 36px; }
}
@keyframes sheet { from { transform: translateY(40%); opacity: 0; } }

/* Portrait: stand the table up. */
@media (max-aspect-ratio: 5/6) {
  .arena { padding: 30px 26px 34px; }
  .felt-wrap {
    --av: clamp(42px, 15cqw, 76px); --hole: clamp(24px, 8.4cqw, 44px); --hero: clamp(46px, 15cqw, 78px); --bw: clamp(36px, 12.4cqw, 66px);
    width: min(100cqw, calc(100cqh * .64)); aspect-ratio: .64;
  }
  .rail { inset: 5% 9%; border-radius: 46% / 32%; padding: clamp(7px, 2.4cqw, 14px); }
  .felt { border-radius: 46% / 32%; } .felt::after { border-radius: 46% / 32%; inset: 6%; }
  .felt-mark { top: 70%; font-size: clamp(9px, 2.6cqw, 13px); gap: 1.6cqw; } .felt-mark svg { width: 4.4cqw; height: 4.4cqw; }
  .center { top: 45%; width: 92%; gap: 2cqw; }
  .board { gap: 1.3cqw; }
  .plate-name { font-size: clamp(10px, 2.8cqw, 13px); } .plate-stack { font-size: clamp(10.5px, 2.9cqw, 14px); }
  .act-tag, .hand-name { font-size: clamp(9.5px, 2.5cqw, 12px); }
  .bet { font-size: clamp(10.5px, 2.8cqw, 13px); } .pot-main, .banner { font-size: clamp(12px, 3.2cqw, 15px); } .pot-side { font-size: clamp(10px, 2.5cqw, 12px); }
  .bet.mine { transform: translate(-50%, calc(-50% - var(--av) * .62 - var(--hero) * 1.6)); }
  .fx-win { font-size: clamp(16px, 5cqw, 26px); } .fx-sticker { font-size: clamp(40px, 14cqw, 72px); } .fx-gift { width: clamp(80px, 30cqw, 150px); } .fx-bubble { font-size: clamp(11px, 3cqw, 14px); max-width: 60cqw; }
  .seat.is-me .act-tag { left: 50%; bottom: auto; top: 104%; transform: translateX(-50%); }
}
@media (max-height: 520px) and (min-aspect-ratio: 5/6) {
  .tbl-top { height: 44px; } .arena { padding: 22px 60px 22px; }
  .actionbar { padding-top: 6px; padding-bottom: 6px; } .act { min-height: 44px; } .presets button { min-height: 28px; }
}

/* ───────── 13花 table ───────── */
.t13 .tbl-main { grid-template-columns: minmax(0, 1fr) 330px; }
.arena13 {
  --av: clamp(36px, min(4.2vw, 6.4vh), 54px); --c: clamp(22px, min(3.3vw, 5.2vh), 44px); --cb: clamp(40px, min(5.6vw, 8.4vh), 74px);
  position: relative; container-type: inline-size; min-width: 0; min-height: 0; overflow: hidden;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; padding: 22px 24px 18px;
}
.felt13 {
  position: absolute; inset: 10px; border-radius: 34px; z-index: 0;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 7px),
    radial-gradient(ellipse at 50% 42%, var(--felt-hi) 0%, var(--felt) 50%, var(--felt-lo) 100%);
  box-shadow: 0 0 0 2px rgba(216, 181, 106, .75), 0 0 0 9px #24160c, 0 0 0 10px rgba(216, 181, 106, .35), inset 0 10px 60px rgba(0, 0, 0, .55), 0 24px 60px rgba(0, 0, 0, .6);
}
.felt13 .felt-mark { top: 50%; opacity: .16; font-size: clamp(16px, 3cqw, 34px); gap: 1cqw; }
.felt13 .felt-mark svg { width: 5cqw; height: 5cqw; }
.opps, .mid13, .mine { position: relative; z-index: 2; }
.opps { display: flex; justify-content: space-evenly; align-items: flex-start; gap: 10px; }
.mid13 { display: grid; place-items: center; min-height: 34px; }
.mine { display: grid; justify-items: center; align-content: center; gap: 8px; }
.s13 { display: grid; justify-items: center; gap: 8px; min-width: 0; transition: opacity .3s; }
.s13.out { opacity: .5; }
.s13-head { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.s13 .seat-av .av { --s: var(--av); }
.s13 .plate { min-width: 0; margin-top: 0; text-align: left; padding: 3px 12px 4px; }
.s13 .plate-stack { justify-content: flex-start; }
.s13 .plate-name { font-size: 12.5px; } .s13 .plate-stack { font-size: 13px; }
.s13 .act-tag { position: static; transform: none; animation: none; font-size: 11px; }
.s13 .hand-name { margin: 0; }
.s13.winner .seat-av .av { box-shadow: 0 0 0 3px var(--gold-hi), 0 0 40px rgba(247, 230, 173, .9); }
.s13 .delta { margin: 0; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .16); white-space: nowrap; animation: rise .3s; }
.up { color: #8be0bb; } .down { color: #ffb3ad; }
.s13 .delta.up { border-color: rgba(139, 224, 187, .6); } .s13 .delta.down { border-color: rgba(255, 179, 173, .5); }
.s13 .shot { padding: 3px 10px; border-radius: 8px; font: 700 13px/1.3 var(--display); color: #2a1d05; background: var(--gold-grad); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); animation: sSlam .6s cubic-bezier(.3, 1.6, .5, 1) both; white-space: nowrap; }
.empty13 { align-self: center; padding: 20px 0; }
.empty13 .seat-open, .empty13 .seat-hole { width: var(--av); height: var(--av); }
.empty13 .seat-open span { font-size: 11px; letter-spacing: 0; }

.rows { display: grid; gap: 4px; justify-items: center; }
.rrow { display: flex; align-items: center; gap: 8px; }
.rcards { display: flex; }
.rcards .card { --cw: var(--c); margin-left: calc(var(--c) * -.42); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.rcards .card:first-child { margin-left: 0; }
.rcards .card.face { animation: flip13 .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes flip13 { from { transform: rotateY(90deg) scale(.9); opacity: .2; } }
.rinfo { display: grid; min-width: 62px; font-size: 11.5px; line-height: 1.25; color: var(--ivory); text-shadow: 0 1px 3px rgba(0, 0, 0, .8); animation: fade .3s; }
.rinfo b { font-size: 13px; }
.rows.big .rcards .card { --cw: var(--cb); margin-left: calc(var(--cb) * -.3); }
.rows.big .rinfo { font-size: 13px; min-width: 84px; } .rows.big .rinfo b { font-size: 15px; }
.me13 .s13-head { order: 2; }

/* arranging */
.bar13 .actionbar-in { max-width: 980px; min-height: 0; align-items: center; }
.tbl.t13.seated .actionbar-in { min-height: 64px; }
.arr { min-width: 0; display: grid; gap: 6px; justify-items: center; --cw: clamp(36px, min(5.4vw, 8vh), 64px); }
.bar13 .arr-btns { flex: 1; }
.arr-rows { display: grid; gap: 6px; }
.arr-row { display: flex; align-items: center; gap: 12px; padding: 5px 10px; border-radius: 14px; border: 1px dashed rgba(216, 181, 106, .22); background: rgba(0, 0, 0, .22); cursor: pointer; transition: border-color .15s, background .15s; }
.arr-row.target { border-color: var(--gold); background: rgba(216, 181, 106, .1); }
.arr-label { width: 86px; display: grid; line-height: 1.25; }
.arr-label b { font-family: var(--display); color: var(--gold-hi); font-size: 15px; } .arr-label small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arr-slots { display: flex; gap: 5px; }
.arr-slot { width: var(--cw); aspect-ratio: 100 / 140; border-radius: 9% / 6.4%; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.cardbtn { padding: 0; border: 0; background: none; border-radius: 9% / 6.4%; display: block; transition: transform .15s; }
.cardbtn .card { --cw: var(--cw); }
.arr-slot .cardbtn, .arr-slot .card { width: 100%; }
.arr-msg { font-size: 13px; color: var(--muted); min-height: 18px; text-align: center; }
.arr-msg.bad { color: #ffb3ad; font-weight: 600; }
.tray { display: flex; justify-content: center; min-height: calc(var(--cw) * 1.4 + 14px); padding-top: 14px; }
.tray .cardbtn { width: var(--cw); margin-left: calc(var(--cw) * -.34); }
.tray .cardbtn:first-child { margin-left: 0; }
.tray .cardbtn:hover { transform: translateY(-6px); }
.tray .cardbtn.on { transform: translateY(-14px); }
.tray .cardbtn.on .card { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 20px rgba(247, 230, 173, .7); }
.arr-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rules p { margin: 0; } .rules ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; }
.rule-grid span { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .04); font-size: 13.5px; }
.rule-grid b { color: var(--gold-hi); }
.tabs.two { display: none; }

@media (max-width: 1179px) { .t13 .tbl-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1023px) { .tabs.two { display: grid; grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .arena13 { --av: 36px; --c: clamp(18px, min(6vw, 3.4vh), 28px); --cb: clamp(32px, min(11.5vw, 6.2vh), 50px); padding: 14px 10px 10px; gap: 4px; }
  .felt13 { inset: 6px; border-radius: 22px; box-shadow: 0 0 0 1.5px rgba(216, 181, 106, .75), 0 0 0 5px #24160c, inset 0 10px 40px rgba(0, 0, 0, .55); }
  .opps { gap: 2px; }
  .s13 { gap: 5px; } .s13 .plate { min-width: 0; padding: 2px 7px 3px; } .s13 .plate-name { font-size: 11px; max-width: 80px; } .s13 .plate-stack { font-size: 11.5px; }
  .rrow { flex-direction: column; gap: 0; } .rinfo { display: flex; gap: 5px; min-width: 0; font-size: 10px; } .rinfo b { font-size: 11px; }
  .rows.big .rrow { flex-direction: row; gap: 8px; } .rows.big .rinfo { display: grid; font-size: 11.5px; min-width: 70px; }
  .s13 .shot { font-size: 11px; }
  .s13-head { gap: 5px; }
  .arr { --cw: clamp(30px, min(12.4vw, 6.6vh), 54px); gap: 5px; }
  .arr-row { gap: 6px; padding: 4px 6px; } .arr-label { width: 58px; } .arr-label b { font-size: 13px; } .arr-label small { font-size: 10.5px; }
  .arr-slots { gap: 3px; }
  .tray { width: 100%; padding-top: 12px; } .tray .cardbtn { margin-left: calc(var(--cw) * -.5); }
  .arr-msg { font-size: 11.5px; } .arr-btns .btn { min-height: 38px; padding: 0 13px; font-size: 13px; }
  .bar13 { padding-top: 6px; }
}

/* language switch */
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: #0a0e14; border: 1px solid var(--line); flex: none; }
.lang button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.lang button.on { background: rgba(216, 181, 106, .18); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--line-strong); }
.auth-side { position: relative; }
.lang.corner { position: absolute; top: 16px; right: 16px; }
@media (max-width: 760px) { .topbar .lang button { padding: 0 8px; font-size: 12px; } }
