:root {
  --sky: #a9c3d3;
  --ink: #2a3037;
  --ink-soft: #6b7680;
  --white: #ffffff;
  --glass-a: rgba(112, 120, 110, .58);
  --glass-b: rgba(168, 156, 140, .48);
  --glass-c: rgba(236, 168, 138, .58);
  --line: rgba(255, 255, 255, .22);
  --red: #d9775f;
  --black: #2f3a44;
  --glow: rgba(255, 236, 222, .9);
  --r-card: 44px;
  --font: 'Urbanist', ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--white); background: var(--sky);
  overflow: hidden; -webkit-font-smoothing: antialiased; letter-spacing: .005em;
  user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; background: linear-gradient(180deg, #8fb3c9 0%, #a9c3d3 45%, #c7d5dc 100%); overflow: hidden; }
.sky i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .85; animation: drift 38s ease-in-out infinite alternate; }
.sky .b1 { width: 70vmax; height: 55vmax; left: -20vmax; bottom: -25vmax; background: #eef1f0; }
.sky .b2 { width: 45vmax; height: 40vmax; right: -12vmax; bottom: -10vmax; background: #f1e2d6; animation-duration: 46s; }
.sky .b3 { width: 40vmax; height: 30vmax; left: 25vw; top: -14vmax; background: #b9d0de; animation-duration: 52s; }
.sky .b4 { width: 30vmax; height: 30vmax; right: 10vw; top: 20vh; background: #f6d9c6; opacity: .45; animation-duration: 60s; }
@keyframes drift { to { transform: translate3d(6vmax, -4vmax, 0) scale(1.12); } }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- glass ---------- */
.card {
  position: relative;
  background: linear-gradient(100deg, var(--glass-a) 0%, var(--glass-b) 52%, var(--glass-c) 100%);
  backdrop-filter: blur(26px) saturate(1.15); -webkit-backdrop-filter: blur(26px) saturate(1.15);
  border: 1px solid var(--line); border-radius: var(--r-card);
  box-shadow: 0 30px 80px -30px rgba(40, 60, 80, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.grab { position: absolute; top: 12px; left: 50%; width: 30px; height: 6px; transform: translateX(-50%);
  border-top: 1.5px solid rgba(255,255,255,.75); border-bottom: 1.5px solid rgba(255,255,255,.45); }
.glass { background: rgba(255,255,255,.18); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); }
.plus-circle { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 200;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), rgba(255,255,255,.08)); border: 1px solid rgba(255,255,255,.18); }

/* ---------- gooey bar (the screenshot's 8 | Activate | 19) ---------- */
.goo { position: relative; height: 84px; width: 100%; }
.goo-shapes, .goo-ui { position: absolute; inset: 0; display: flex; align-items: center; }
.goo-shapes { filter: url(#goo); }
.goo-shapes span { background: var(--white); display: block; transition: opacity .3s, transform .3s; }
.goo .c { width: 84px; height: 84px; border-radius: 50%; flex: none; }
.goo .p { flex: 1; height: 68px; border-radius: 34px; margin: 0 -2px; }
.goo-ui button { color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; transition: transform .15s, opacity .25s; }
.goo-ui button:active:not(:disabled) { transform: scale(.94); }
.goo-ui .p { font-weight: 500; font-size: 17px; gap: 4px; }
.goo-ui .p small { font-weight: 400; font-size: 12px; color: var(--ink-soft); }
.goo-ui .c b { font-weight: 300; font-size: 30px; letter-spacing: -.02em; }
.goo-ui .c small { font-size: 11px; color: var(--ink-soft); margin-top: 4px; }
.goo-ui button:disabled { opacity: .35; }
.goo.off .goo-shapes { opacity: .55; }
.goo.off .goo-ui .p { opacity: .7; }
.goo.big { height: 90px; }
.goo.big .c { width: 90px; height: 90px; }
.goo.big .p { height: 72px; }

/* ---------- lobby ---------- */
.screen { position: fixed; inset: 0; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.intro { width: min(400px, 100%); padding: 44px 22px 22px; animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.row { display: flex; align-items: center; justify-content: space-between; }
.intro .top { padding: 0 6px 0 10px; }
.intro h1 { margin: 0; font-weight: 300; font-size: 30px; letter-spacing: -.01em; }
.intro .mid { margin: 26px 0 22px; padding: 0 10px; gap: 10px; }
.intro .mid p { margin: 0; font-size: 15px; font-weight: 400; line-height: 1.35; }
.intro .mid .right { text-align: right; opacity: .7; font-weight: 300; }
.chipstack { position: relative; width: 70px; height: 60px; flex: none; }
.chipstack i { position: absolute; left: 6px; width: 58px; height: 18px; border-radius: 50%;
  background: linear-gradient(180deg, #fff 0%, #e8ecef 60%, #c9d0d5 100%);
  box-shadow: 0 3px 0 #b8c0c6, 0 8px 16px -6px rgba(0,0,0,.35); }
.chipstack i:nth-child(1) { top: 34px; } .chipstack i:nth-child(2) { top: 22px; } .chipstack i:nth-child(3) { top: 10px; }
.chipstack i::after { content: ''; position: absolute; inset: 4px 14px; border-radius: 50%; border: 1px dashed rgba(217,119,95,.55); }
.field { display: block; margin: 0 0 14px; }
.field input { width: 100%; height: 54px; border-radius: 27px; border: 1px solid rgba(255,255,255,.3); padding: 0 22px;
  background: rgba(255,255,255,.14); color: #fff; font: 400 17px var(--font); outline: none; transition: background .2s, border-color .2s; }
.field input::placeholder { color: rgba(255,255,255,.65); }
.field input:focus { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.6); }
.botpick { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 0 6px 0 18px; }
.botpick > span { font-size: 15px; opacity: .85; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 24px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.seg button { width: 36px; height: 36px; border-radius: 50%; font-size: 15px; font-weight: 400; transition: background .2s, color .2s; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 500; }
.ava.bot { background: linear-gradient(135deg, #e3ebf0 0%, #f2d5c4 100%); }
.ava.bot::after { content: ''; position: absolute; left: 50%; top: -3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9); }
.meta .nm small { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-left: 4px; }
.status .acts { display: flex; gap: 8px; }
.pill.ghost { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.foot { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); right: 22px; margin: 0; font-size: 12px; font-weight: 500; opacity: .55; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- game layout ---------- */
#game { display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.topbar { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 300; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #fff, #eab199); box-shadow: 0 0 12px rgba(255,255,255,.7); }
.brand .code { margin-left: 6px; font-size: 12px; font-weight: 500; letter-spacing: .12em; padding: 6px 10px; border-radius: 20px; background: rgba(255,255,255,.18); }
.tb-right { display: flex; gap: 8px; align-items: center; }
.pill { height: 40px; padding: 0 16px; border-radius: 20px; display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 14px; }
.pill.white { background: #fff; color: var(--ink); }
.pill .ic { font-size: 13px; opacity: .6; }
.circle { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.menu { position: absolute; right: 16px; top: 62px; width: 220px; padding: 8px; border-radius: 26px; display: flex; flex-direction: column; animation: pop .22s ease-out; }
.menu button { text-align: left; padding: 13px 16px; border-radius: 18px; font-size: 15px; }
.menu button:hover { background: rgba(255,255,255,.14); }
.menu .danger { color: #ffe0d6; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

.stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 34px 54px 44px; }
.table { position: relative; width: min(100%, 980px); height: 100%; max-height: 560px; }
.felt { position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(100deg, var(--glass-a) 0%, var(--glass-b) 52%, var(--glass-c) 100%);
  backdrop-filter: blur(26px) saturate(1.15); -webkit-backdrop-filter: blur(26px) saturate(1.15);
  border: 1px solid var(--line); box-shadow: 0 40px 100px -40px rgba(40,60,80,.4), inset 0 1px 0 rgba(255,255,255,.25); }
.felt::after { content: ''; position: absolute; inset: 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); }
.tcenter { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0; pointer-events: none; }
.tcenter > * { pointer-events: auto; }
.pot { display: flex; flex-direction: column; align-items: center; line-height: 1; transition: opacity .3s; }
.pot small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.pot b { font-size: 34px; font-weight: 200; letter-spacing: -.02em; }
.pot.empty { opacity: 0; }
.board { display: flex; gap: 8px; height: var(--ch); --cw: clamp(38px, 6.2vw, 62px); --ch: calc(var(--cw) * 1.4); }
.status { min-height: 22px; font-size: 14px; font-weight: 400; text-align: center; opacity: .92; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.status .pill { pointer-events: auto; }

/* cards */
.cardf { width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .16); position: relative; flex: none;
  background: linear-gradient(160deg, #fff 0%, #f4f2ef 100%); color: var(--black);
  box-shadow: 0 10px 24px -10px rgba(30,40,50,.45), inset 0 0 0 1px rgba(0,0,0,.04);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s, box-shadow .35s; }
.cardf.red { color: var(--red); }
.cardf .rk { position: absolute; left: 13%; top: 8%; font-size: calc(var(--cw) * .42); font-weight: 500; line-height: 1; letter-spacing: -.03em; }
.cardf .st { position: absolute; right: 12%; bottom: 7%; font-size: calc(var(--cw) * .48); line-height: 1; }
.cardf .st.s { left: 14%; top: 42%; right: auto; bottom: auto; font-size: calc(var(--cw) * .22); opacity: .9; }
.cardf.slot { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.cardf.back { background: linear-gradient(135deg, #f4e1d5 0%, #c9d6de 100%); }
.cardf.back::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid rgba(255,255,255,.8);
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.7), rgba(255,255,255,0) 70%); }
.cardf.deal { animation: deal .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes deal { from { opacity: 0; transform: translateY(-18px) rotate(-6deg) scale(.9); } }
.cardf.dim { opacity: .45; }
.cardf.hi { transform: translateY(-6px); box-shadow: 0 0 0 2px #fff, 0 14px 30px -10px rgba(255,236,222,.9); }

/* seats */
.seats { position: absolute; inset: 0; }
.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: left .6s cubic-bezier(.2,.8,.2,1), top .6s cubic-bezier(.2,.8,.2,1), opacity .4s; z-index: 2; }
.seat .hole { display: flex; height: 40px; --cw: 28px; --ch: 40px; margin-bottom: -16px; z-index: 0; }
.seat .hole .cardf:first-child { transform: rotate(-8deg) translateX(4px); }
.seat .hole .cardf:last-child { transform: rotate(8deg) translateX(-4px); }
.seat.shown .hole { --cw: 40px; --ch: 56px; height: 56px; margin-bottom: -10px; }
.seat.shown .hole .cardf:first-child, .seat.shown .hole .cardf:last-child { transform: none; }
.seat.shown .hole .cardf + .cardf { margin-left: 4px; }
.pod { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; min-width: 128px; border-radius: 30px;
  background: rgba(255,255,255,.2); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.28); box-shadow: 0 16px 34px -18px rgba(30,45,60,.5); transition: background .3s, box-shadow .3s, opacity .3s; }
.ava { position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 500; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff, #e9e3dd); }
.ava::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; opacity: 0;
  background: conic-gradient(#fff calc(var(--p, 1) * 1turn), rgba(255,255,255,.18) 0);
  -webkit-mask: radial-gradient(circle, transparent 23px, #000 24px); mask: radial-gradient(circle, transparent 23px, #000 24px); transition: opacity .3s; }
.seat.turn .ava::before { opacity: 1; }
.seat.turn .pod { background: rgba(255,255,255,.34); box-shadow: 0 0 0 1px rgba(255,255,255,.6), 0 18px 40px -14px rgba(255,236,222,.8); }
.seat.urgent .ava::before { background: conic-gradient(#ffd2c2 calc(var(--p, 1) * 1turn), rgba(255,255,255,.18) 0); }
.ava .off { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #c9cfd4; border: 2px solid #fff; }
.meta { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.meta .nm { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.meta .sk { font-size: 13px; font-weight: 300; opacity: .85; }
.tag { position: absolute; top: -9px; right: 10px; padding: 3px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: #fff; color: var(--ink); box-shadow: 0 4px 10px -4px rgba(0,0,0,.25); }
.tag.soft { background: rgba(255,255,255,.3); color: #fff; }
.tag.cd { right: auto; left: 50%; top: auto; bottom: -11px; transform: translateX(-50%); background: var(--red); color: #fff; font-variant-numeric: tabular-nums; }
.dealer { position: absolute; left: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 11px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 4px 10px -3px rgba(0,0,0,.3); z-index: 2; }
.seat.folded .pod, .seat.out .pod { opacity: .5; }
.seat.folded .hole { opacity: 0; }
.seat.win .pod { background: rgba(255,255,255,.42); box-shadow: 0 0 0 2px #fff, 0 0 50px 4px rgba(255,236,222,.7); }
.won { position: absolute; bottom: -30px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 13px; font-weight: 500;
  padding: 5px 11px; border-radius: 14px; background: #fff; color: var(--ink); animation: winpop .5s cubic-bezier(.2,1.4,.4,1) both; }
.won small { font-weight: 400; color: var(--ink-soft); margin-left: 4px; }
@keyframes winpop { from { opacity: 0; transform: translate(-50%, 8px) scale(.8); } }
.bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 16px;
  background: rgba(255,255,255,.9); color: var(--ink); font-size: 13px; font-weight: 500; z-index: 3; animation: pop .3s ease-out;
  transition: left .5s, top .5s; }
.bet::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #fff 30%, var(--red) 32%, var(--red) 52%, #fff 54%, #fff 64%, var(--red) 66%); }

/* hero / my cards */
.hero { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 16px 14px; gap: 6px; z-index: 5; }
.mycards { display: flex; gap: 10px; height: 0; --cw: 78px; --ch: 110px; position: relative; top: calc(var(--ch) * -0.82); }
.mycards .cardf:first-child { transform: rotate(-5deg) translateY(4px); }
.mycards .cardf:last-child { transform: rotate(5deg) translateY(4px); }
.mycards.folded .cardf { opacity: .4; transform: translateY(16px) !important; }
.myinfo { width: min(460px, 100%); display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; padding: 0 10px; min-height: 44px; }
.mystack, .mytime { display: flex; flex-direction: column; line-height: 1; }
.mytime { align-items: flex-end; transition: opacity .3s; opacity: .35; }
.mytime.on { opacity: 1; }
.mytime.urgent b { color: #ffe0d4; animation: pulse .8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.mystack small, .mytime small { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 4px; }
.mystack b, .mytime b { font-size: 26px; font-weight: 200; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.myhand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; padding-bottom: 2px; }
.myhand b { font-size: 15px; font-weight: 500; white-space: nowrap; }
.myhand b:empty { display: none; }
.myhand span { display: flex; gap: 4px; }
.myhand span i { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 9px; background: rgba(255,255,255,.22); }
.tbar { position: absolute; left: 92px; right: 92px; bottom: 15px; height: 3px; border-radius: 2px; background: var(--ink); opacity: 0; transform-origin: left; pointer-events: none; transition: opacity .3s; }
.tbar.on { opacity: .18; }
.tbar.urgent { background: var(--red); opacity: .8; }
.chips { position: fixed; left: 16px; top: calc(env(safe-area-inset-top) + 66px); width: 210px; padding: 6px; border-radius: 26px; z-index: 15; }
.chips-head { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.chips-head span { opacity: .75; }
.chips-head b { font-size: 13px; letter-spacing: 0; font-weight: 500; text-transform: none; display: none; }
.chips ol { list-style: none; margin: 0; padding: 0 0 4px; }
.chips li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: baseline; padding: 6px 12px; border-radius: 14px; font-size: 14px; }
.chips li.me { background: rgba(255,255,255,.16); }
.chips li .n { font-size: 11px; opacity: .55; font-variant-numeric: tabular-nums; }
.chips li .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips li .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.chips li .d { grid-column: 3; text-align: right; font-size: 11px; opacity: .7; margin-top: -2px; }
.chips li .d.up { color: #f4fff0; opacity: .9; }
.chips.collapsed ol { display: none; }
.chips.collapsed .chips-head b { display: block; }
.cardf.core { box-shadow: 0 0 0 2px rgba(255,255,255,.95), 0 12px 26px -10px rgba(255,236,222,.9); }
.board .cardf.core { transform: translateY(-4px); }
.seg.wide button { width: 46px; border-radius: 18px; font-size: 14px; }
#dock { width: min(460px, 100%); }

/* raise sheet */
.sheet { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); width: min(420px, calc(100% - 24px)); transform: translateX(-50%);
  padding: 36px 20px 20px; z-index: 30; animation: sheet .35s cubic-bezier(.2,.9,.2,1) both; }
@keyframes sheet { from { opacity: 0; transform: translate(-50%, 30px); } }
.sheet .top { padding: 0 2px 0 8px; }
.sheet .lbl { font-size: 15px; opacity: .85; }
.plus-circle.x { width: 44px; height: 44px; font-size: 15px; }
.raise-val { font-size: 72px; font-weight: 200; letter-spacing: -.03em; line-height: 1; padding: 6px 8px 18px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; margin: 0 0 12px; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff var(--fill, 0%), rgba(255,255,255,.25) 0); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff var(--fill, 0%), rgba(255,255,255,.25) 0); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 6px 14px -4px rgba(0,0,0,.35); }
input[type=range]::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; }
.presets { display: flex; gap: 6px; margin-bottom: 16px; }
.presets button { flex: 1; height: 36px; border-radius: 18px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); font-size: 13px; font-weight: 500; }
.presets button:active { background: rgba(255,255,255,.35); }

/* toast */
.toast { position: fixed; top: max(70px, calc(env(safe-area-inset-top) + 60px)); left: 50%; transform: translateX(-50%); z-index: 50;
  padding: 11px 18px; border-radius: 22px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 14px; font-weight: 500;
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.35); animation: pop .25s ease-out; max-width: calc(100% - 32px); text-align: center; }

/* portrait / small */
@media (max-width: 720px), (orientation: portrait) {
  .chips { width: auto; min-width: 150px; left: 12px; top: calc(env(safe-area-inset-top) + 60px); }
  .chips li { font-size: 13px; padding: 5px 10px; }
  .mystack b, .mytime b { font-size: 22px; }
  .tbar { left: 82px; right: 82px; bottom: 13px; }
  .stage { padding: 40px 34px 60px; }
  .table { max-height: none; width: min(100%, 460px); }
  .pod { min-width: 0; padding: 4px 10px 4px 4px; gap: 7px; }
  .ava { width: 36px; height: 36px; font-size: 13px; }
  .ava::before { -webkit-mask: radial-gradient(circle, transparent 19px, #000 20px); mask: radial-gradient(circle, transparent 19px, #000 20px); }
  .meta .nm { font-size: 12px; max-width: 64px; }
  .meta .sk { font-size: 12px; }
  .seat .hole { --cw: 22px; --ch: 32px; height: 32px; margin-bottom: -12px; }
  .seat.shown .hole { --cw: 32px; --ch: 45px; height: 45px; }
  .board { gap: 5px; --cw: clamp(36px, 11vw, 54px); }
  .pot b { font-size: 28px; }
  .mycards { --cw: 66px; --ch: 92px; }
  .goo { height: 76px; } .goo .c { width: 76px; height: 76px; } .goo .p { height: 62px; }
  .goo-ui .c b { font-size: 26px; }
  .goo.big { height: 84px; } .goo.big .c { width: 84px; height: 84px; } .goo.big .p { height: 68px; }
  .brand .code { display: none; }
}
@media (max-height: 640px) and (orientation: landscape) {
  .stage { padding: 26px 70px 30px; }
  .mycards { --cw: 56px; --ch: 78px; }
  .goo { height: 64px; } .goo .c { width: 64px; height: 64px; } .goo .p { height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .sky i { animation: none; } }

/* ---------- v4: tournament, reactions, history, podium ---------- */
.seg.txt button { width: auto; padding: 0 14px; border-radius: 18px; font-size: 14px; }
.lvl { margin-left: 6px; font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 20px; background: rgba(255,255,255,.18); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lvl b { font-weight: 600; }
.lvl.soon { background: rgba(255,255,255,.92); color: var(--ink); }
.reacts { position: absolute; right: 16px; top: 62px; display: flex; gap: 2px; padding: 6px; border-radius: 30px; animation: pop .22s ease-out; z-index: 25; }
.reacts button { width: 42px; height: 42px; border-radius: 50%; font-size: 22px; transition: transform .15s, background .15s; }
.reacts button:hover { background: rgba(255,255,255,.18); }
.reacts button:active { transform: scale(.85); }
.rbub { position: absolute; z-index: 12; font-size: 34px; line-height: 1; pointer-events: none; transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 14px rgba(40,60,80,.3)); animation: rbub 2.6s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rbub {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(.3); }
  14% { opacity: 1; transform: translate(-50%, -110%) scale(1.15); }
  24% { transform: translate(-50%, -105%) scale(1); }
  78% { opacity: 1; transform: translate(-50%, -150%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(.9); }
}
.seat.folded.shown .hole { opacity: .9; }
.hist { max-height: min(76vh, 640px); display: flex; flex-direction: column; }
.hlist { overflow-y: auto; margin: 10px -8px 0; padding: 0 8px 4px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.hlist .empty { opacity: .7; padding: 14px 8px; font-size: 14px; }
.hentry { padding: 12px 14px; border-radius: 22px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); }
.hhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.hhead b { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.hhead .hb { display: flex; gap: 3px; --cw: 24px; --ch: 34px; }
.hhead .hb .cardf { box-shadow: none; }
.hrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.hrow .hn { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.hrow .hn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.hrow .hn small { font-size: 12px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow.me .hn span::after { content: ' · du'; font-weight: 400; opacity: .6; }
.hrow .hc { display: flex; gap: 3px; --cw: 24px; --ch: 34px; }
.hrow .hc i { font-style: normal; font-size: 11px; opacity: .55; letter-spacing: .06em; text-transform: uppercase; }
.hrow .hv { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 54px; text-align: right; opacity: .8; }
.hrow .hv.up { opacity: 1; font-weight: 600; }
.podium-wrap { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px 16px; background: rgba(60,80,100,.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .4s ease-out; }
@keyframes fade { from { opacity: 0; } }
.podium-card { width: min(420px, 100%); padding: 40px 22px 22px; text-align: center; animation: rise .7s cubic-bezier(.2,.8,.2,1) both; }
.podium-card .pk { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .75; }
.podium-card h2 { margin: 6px 0 22px; font-size: 34px; font-weight: 300; letter-spacing: -.01em; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 170px; margin-bottom: 14px; }
.step { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.step .ava { width: 48px; height: 48px; font-size: 16px; }
.step .sn { font-size: 13px; font-weight: 500; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step .blk { width: 100%; border-radius: 18px 18px 6px 6px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.3);
  display: grid; place-items: center; font-size: 26px; font-weight: 200; transform-origin: bottom; animation: grow .8s cubic-bezier(.2,.9,.2,1) both; }
.step.p1 .blk { height: 92px; background: #fff; color: var(--ink); font-weight: 300; animation-delay: .5s; }
.step.p2 .blk { height: 64px; animation-delay: .3s; }
.step.p3 .blk { height: 44px; animation-delay: .1s; }
@keyframes grow { from { transform: scaleY(0); } }
.podrest { list-style: none; margin: 0 0 18px; padding: 0; font-size: 14px; opacity: .85; }
.podrest li { display: flex; justify-content: space-between; padding: 5px 12px; }
.podbtns { display: flex; gap: 8px; justify-content: center; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--r)); } }
@media (max-width: 720px), (orientation: portrait) {
  .lvl { font-size: 11px; padding: 5px 9px; }
  .reacts { left: 12px; right: 12px; justify-content: space-between; top: 58px; }
  .reacts button { width: 36px; height: 36px; font-size: 20px; }
  .rbub { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
@media (max-width: 720px), (orientation: portrait) { #game.tourOn #inviteBtn { display: none; } }

/* =================== v5: BOLD & BLACK =================== */
:root {
  --ink: #0a0a0a; --ink-soft: #6e6e73; --white: #fff; --red: #ff3b30; --black: #0a0a0a;
  --bg: #000; --s1: #141416; --s2: #1f1f22; --s3: #2c2c30; --line: #2a2a2e; --mute: #8e8e93; --yel: #ffd60a;
  --font: 'Inter Tight', ui-sans-serif, system-ui, sans-serif; color-scheme: dark;
}
body { background: var(--bg); letter-spacing: -.005em; font-weight: 600; }
.sky, .grain { display: none; }
.card { background: var(--s1); backdrop-filter: none; -webkit-backdrop-filter: none; border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.8); }
.grab { background: var(--s3); }
.glass { background: var(--s2); backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
.plus-circle { background: var(--s2); border: 0; color: #fff; font-weight: 700; }
.plus-circle.x { background: var(--s2); }

/* goo dock -> solid buttons */
.goo-shapes { display: none; }
.goo-ui { gap: 8px; }
.goo-ui button { color: #fff; }
.goo-ui .c { background: var(--s2); }
.goo-ui .p { background: #fff; color: #000; border-radius: 34px; margin: 0; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.goo-ui .p small { color: #555; font-weight: 700; font-size: 13px; }
.goo-ui .c b { font-weight: 700; }
.goo-ui .c small { color: var(--mute); font-weight: 600; }
.goo.off .goo-ui .p { background: var(--s2); color: #fff; opacity: 1; }
.goo.off .goo-ui .p small { color: var(--mute); }
.goo-ui button:disabled { opacity: .3; }

/* lobby */
.intro h1 { font-weight: 900; font-size: 44px; letter-spacing: -.035em; }
.intro .mid p { font-weight: 600; }
.intro .mid .right { color: var(--mute); opacity: 1; }
.chipstack i { background: #fff; box-shadow: 0 2px 0 #c9c9c9; }
.chipstack i::after { border-color: var(--red); }
.field input { background: var(--s2); border: 2px solid transparent; color: #fff; font-weight: 700; }
.field input::placeholder { color: var(--mute); }
.field input:focus { background: var(--s2); border-color: #fff; }
.botpick > span { opacity: 1; color: var(--mute); font-weight: 700; }
.seg { background: var(--s2); border: 0; }
.seg button { color: #fff; font-weight: 700; }
.seg button.on { background: #fff; color: #000; font-weight: 800; }
.foot { color: var(--mute); opacity: 1; font-weight: 700; }
.avapick { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; padding: 2px 2px 6px; scrollbar-width: none; }
.avapick::-webkit-scrollbar { display: none; }
.avapick button, .avagrid button { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--s2); font-size: 24px; display: grid; place-items: center; transition: transform .15s, box-shadow .15s; }
.avapick button.on, .avagrid button.on { box-shadow: 0 0 0 3px #fff; transform: scale(1.06); }
.avagrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 10px; padding: 14px 4px 4px; justify-items: center; }
.avagrid button { width: 52px; height: 52px; font-size: 28px; }

/* topbar */
.brand { font-weight: 900; font-size: 24px; letter-spacing: -.03em; }
.brand .dot { background: var(--red); box-shadow: none; }
.brand .code, .lvl { background: var(--s2); font-weight: 700; }
.lvl.soon { background: var(--yel); color: #000; }
.pill { font-weight: 800; }
.pill.white { background: #fff; color: #000; }
.pill.ghost { background: var(--s2); border: 0; }
.menu button { font-weight: 700; }
.menu button:hover { background: var(--s2); }
.menu .danger { color: var(--red); }

/* table */
.felt { background: radial-gradient(ellipse at 50% 40%, #17171a 0%, #0c0c0e 70%) !important; border: 1px solid var(--line); box-shadow: inset 0 0 80px rgba(0,0,0,.6) !important; }
.felt::after { border-color: #1d1d21; }
.felt .grab { display: none; }
.pot small { color: var(--mute); opacity: 1; font-weight: 700; }
.pot b { font-weight: 900; font-size: 40px; letter-spacing: -.03em; }
.status { font-weight: 700; opacity: 1; }

/* cards */
.cardf { background: #fff !important; color: #0a0a0a; box-shadow: 0 10px 24px -8px rgba(0,0,0,.7) !important; }
.cardf.red { color: var(--red); }
.cardf .rk { font-weight: 800; letter-spacing: -.05em; }
.cardf.slot { background: transparent !important; box-shadow: inset 0 0 0 2px #232327 !important; }
.cardf.back { background: repeating-linear-gradient(45deg, #fff 0 5px, #0a0a0a 5px 9px) !important; box-shadow: inset 0 0 0 4px #fff, 0 10px 24px -8px rgba(0,0,0,.7) !important; }
.cardf.back::after { display: none; }
.cardf.dim { opacity: .3; }
.cardf.hi, .cardf.core { box-shadow: 0 0 0 3px var(--yel), 0 14px 30px -10px rgba(255,214,10,.45) !important; }

/* seats */
.pod { background: var(--s1); border: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.ava { background: var(--s3); color: #fff; font-weight: 800; }
.ava.emo { font-size: 26px; background: var(--s2); }
.ava.bot { background: var(--s3); }
.ava.bot.emo { background: var(--s2); }
.ava.bot::after { background: var(--mute); box-shadow: none; }
.ava .off { background: #555; border-color: var(--s1); }
.ava::before { background: conic-gradient(#fff calc(var(--p, 1) * 1turn), #2a2a2e 0) !important; }
.seat.urgent .ava::before { background: conic-gradient(var(--red) calc(var(--p, 1) * 1turn), #2a2a2e 0) !important; }
.meta .nm { font-weight: 700; color: var(--mute); }
.meta .sk { font-weight: 800; font-size: 16px; opacity: 1; letter-spacing: -.01em; }
.seat.turn .pod { background: var(--s2); border-color: #fff; box-shadow: 0 0 0 1px #fff, 0 0 40px -6px rgba(255,255,255,.35); }
.seat.turn .meta .nm { color: #fff; }
.seat.win .pod { background: var(--s2); border-color: var(--yel); box-shadow: 0 0 0 2px var(--yel), 0 0 50px -4px rgba(255,214,10,.45); }
.seat.folded .pod, .seat.out .pod { opacity: .4; }
.tag { background: #fff; color: #000; font-weight: 800; }
.tag.soft { background: var(--s3); color: #fff; }
.tag.cd { background: var(--red); }
.tag.eq { right: auto; left: -8px; top: auto; bottom: -10px; background: var(--yel); color: #000; font-size: 12px; padding: 3px 8px; letter-spacing: 0; animation: pop .25s ease-out; }
.dealer { background: #fff; color: #000; font-weight: 900; box-shadow: 0 0 0 2px #000; }
.won { background: var(--yel); color: #000; font-weight: 900; font-size: 14px; }
.won small { color: #5a4a00; font-weight: 700; }
.bet { background: var(--s1); border: 1px solid var(--line); color: var(--yel); font-weight: 800; font-size: 14px; backdrop-filter: none; -webkit-backdrop-filter: none; }
.bet::before { background: radial-gradient(circle, var(--yel) 30%, #000 32%, #000 46%, var(--yel) 48%); }
.fchip { position: absolute; z-index: 11; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--yel) 30%, #000 32%, #000 46%, var(--yel) 48%); box-shadow: 0 4px 10px rgba(0,0,0,.6); }

/* hero */
.mystack small, .mytime small { color: var(--mute); opacity: 1; font-weight: 700; }
.mystack b, .mytime b { font-weight: 900; letter-spacing: -.03em; }
.mytime.urgent b { color: var(--red); }
.myhand b { font-weight: 800; font-size: 16px; }
.myhand span i { background: var(--yel); color: #000; font-weight: 800; }
.tbar { background: #000; }
.tbar.on { opacity: .25; }
.tbar.urgent { background: var(--red); opacity: 1; }
.pre { display: flex; gap: 6px; width: min(460px, 100%); padding: 0 4px; }
.pre button { flex: 1; height: 38px; border-radius: 19px; background: var(--s1); border: 2px solid var(--s3); color: var(--mute); font-size: 13px; font-weight: 800; transition: background .15s, color .15s, border-color .15s; }
.pre button.on { background: #fff; border-color: #fff; color: #000; }

/* chips panel, sheets, history, toast */
.chips li.me { background: var(--s2); }
.chips li .v { font-weight: 800; }
.chips li .d { color: var(--mute); opacity: 1; font-weight: 600; }
.chips li .d.up { color: var(--yel); }
.chips-head span { color: var(--mute); opacity: 1; font-weight: 800; }
.raise-val { font-weight: 900; letter-spacing: -.05em; }
input[type=range]::-webkit-slider-runnable-track { background: linear-gradient(90deg, #fff var(--fill, 0%), var(--s3) 0); }
input[type=range]::-moz-range-track { background: linear-gradient(90deg, #fff var(--fill, 0%), var(--s3) 0); }
.presets button { background: var(--s2); border: 0; font-weight: 800; }
.presets button:active { background: #fff; color: #000; }
.hentry { background: var(--s2); border: 0; }
.hrow { border-color: var(--s3); }
.hrow .hn span { font-weight: 800; }
.hrow .hn small { color: var(--mute); opacity: 1; font-weight: 600; }
.hrow .hv.up { color: var(--yel); }
.toast { background: #fff; color: #000; font-weight: 800; }
.reacts button:hover { background: var(--s2); }
.podium-wrap { background: rgba(0,0,0,.7); }
.podium-card h2 { font-weight: 900; letter-spacing: -.035em; font-size: 40px; }
.step .blk { background: var(--s2); border: 0; font-weight: 900; }
.step.p1 .blk { background: var(--yel); color: #000; font-weight: 900; }
.step .ava.emo { font-size: 28px; }

/* ---------- intro: shuffle ring ---------- */
.shuffle { position: fixed; inset: 0; z-index: 100; background: radial-gradient(ellipse at 50% 45%, #1a1a1e 0%, #000 65%); display: grid; place-items: center; overflow: hidden; perspective: 1100px; cursor: pointer; transition: opacity .6s ease, visibility .6s; }
.shuffle.gone { opacity: 0; visibility: hidden; }
.sh-stage { transform-style: preserve-3d; transform: rotateX(18deg) rotateY(-28deg); animation: shTilt 3.2s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes shTilt { from { transform: rotateX(38deg) rotateY(-50deg) scale(.6); } 60% { transform: rotateX(14deg) rotateY(-20deg) scale(1); } to { transform: rotateX(6deg) rotateY(-8deg) scale(1.05); } }
.sh-ring { position: relative; width: 0; height: 0; transform-style: preserve-3d; animation: shSpin 3.2s cubic-bezier(.5,0,.25,1) forwards; }
@keyframes shSpin { from { transform: rotateZ(0); } to { transform: rotateZ(-520deg); } }
.sh-c { position: absolute; left: -26px; top: -37px; width: 52px; height: 74px; border-radius: 7px; transform-style: preserve-3d; backface-visibility: visible;
  transform: rotateZ(var(--a)) translateY(calc(var(--R) * -1)) rotateX(68deg);
  animation: shIn .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d); box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.sh-c.f { background: #fff; color: #0a0a0a; font-weight: 800; font-size: 20px; padding: 5px 7px; line-height: 1; }
.sh-c.f.r { color: var(--red); }
.sh-c.b1 { background: repeating-linear-gradient(45deg, #fff 0 4px, #0a0a0a 4px 7px); box-shadow: inset 0 0 0 3px #fff, 0 6px 18px rgba(0,0,0,.6); }
.sh-c.b2 { background: repeating-linear-gradient(45deg, var(--red) 0 4px, #fff 4px 7px); box-shadow: inset 0 0 0 3px #fff, 0 6px 18px rgba(0,0,0,.6); }
@keyframes shIn { from { opacity: 0; transform: rotateZ(var(--a)) translateY(0) rotateX(0) scale(.4); } }
.shuffle.burst .sh-c { animation: shOut .85s cubic-bezier(.5,0,.75,0) forwards; animation-delay: calc(var(--d) * .25); }
@keyframes shOut { from { transform: rotateZ(var(--a)) translateY(calc(var(--R) * -1)) rotateX(68deg); opacity: 1; }
  to { transform: rotateZ(calc(var(--a) + 40deg)) translateY(calc(var(--R) * -6)) translateZ(500px) rotateX(200deg); opacity: 0; } }
.sh-word { position: absolute; bottom: 14vh; left: 0; right: 0; text-align: center; margin: 0; font-size: 15px; font-weight: 800; letter-spacing: .4em; text-transform: uppercase; color: var(--mute); padding-left: .4em; animation: fade 1s .6s both; }

@media (max-width: 720px), (orientation: portrait) {
  .meta .sk { font-size: 14px; }
  .ava.emo { font-size: 21px; }
  .pre button { height: 34px; font-size: 12px; }
}
.felt { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
