/* Page reset (the artifact viewer supplied this; the web app ships its own). */
:root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; padding: 0; font: 14px -apple-system, BlinkMacSystemFont, sans-serif; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
img { max-width: 100%; }
[hidden]:not([hidden=until-found i]) { display: none !important; }
input, button { -webkit-user-select: none; user-select: none; }

/* Layout: iPhone 17 Pro frame (402×874pt screen) holding a one-screen game; news on top, position and quote controls in the thumb zone */
:root {
  --page: #0B0C0E;
  --bg: #1D2026;
  --panel: #292D34;
  --panel-2: #333840;
  --line: #444A54;
  --range: #59606C;
  --fg: #EDEFF2;
  --muted: #ABB2BC;
  --dim: #7F8793;
  --yes: #4C8DFF;
  --yes-ink: #A3C6FF;
  --yes-btn: #2D6BDC;
  --yes-bg: #233A61;
  --no: #FF9F43;
  --no-ink: #FFC890;
  --no-bg: #4D3418;
  --on-btn: #FFFFFF;
  --good: #6FDB9C;
  --good-bg: #1F3D2C;
  --frame-a: #3A3D43;
  --frame-b: #1B1D21;
  --frame-edge: #5A5E66;
  --ink: #000000;
  --yes-tint: rgba(76, 141, 255, 0.26);
  --no-tint: rgba(255, 159, 67, 0.24);
  --row: 12px;
  --bg-hi: #2B3038;
  --news: #C9D1DB;
  --news-ink: #E3E8EE;
  --news-tint: rgba(201, 209, 219, 0.14);
  --news-glow: rgba(220, 228, 238, 0.32);
  --hot: #FF4D4F;
  --hot-ink: #FF8A8C;
  --hot-tint: rgba(255, 77, 79, 0.2);
  --hot-glow: rgba(255, 77, 79, 0.5);
  --hot-bg: #C62A2F;
  --ideal: #6FDB9C;
  --gold: #F5C451;
  --scrim: rgba(0, 0, 0, 0.45);
  --flame: #FF7A1A;
  --lp-bg: #131829;
  --lp-chip: #1E2438;
  --cta-glint: rgba(255, 255, 255, 0.55);
  --t-bronze: #C08457;
  --t-silver: #B8C2CC;
  --t-gold: #F5C451;
  --t-sapphire: #4C8DFF;
  --t-ruby: #E5484D;
  --t-emerald: #3DD68C;
  --t-amethyst: #A78BFA;
  --t-pearl: #EDE3D5;
  --t-obsidian: #6B7078;
  --t-diamond: #7FE3F2;
  --gold-tint: rgba(245, 196, 81, 0.2);
  --p1: #D9B26F;
  --p2: #4FB3A9;
  --p3: #8FA1B3;
  --font-ui: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-num: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
html, body { height: 100%; }
body { background: var(--page); color: var(--fg); font-family: var(--font-ui); font-size: 15px; line-height: 1.4; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--yes-ink); outline-offset: 2px; }
a { color: var(--yes-ink); }
h1, h2, p { margin: 0; }
h1, h2 { text-wrap: balance; }

/* phone frame */
.stage { min-height: 100%; display: grid; place-items: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { position: relative; width: 422px; height: 894px; }
.phone { position: absolute; top: 0; left: 0; width: 422px; height: 894px; padding: 10px; border-radius: 68px; background: linear-gradient(150deg, var(--frame-a), var(--frame-b) 45%, var(--frame-a)); box-shadow: inset 0 0 0 1.5px var(--frame-edge), 0 40px 90px -20px var(--ink); transform-origin: 0 0; }
.phone::before, .phone::after { content: ""; position: absolute; width: 4px; border-radius: 2px; background: var(--frame-a); }
.phone::before { left: -3px; top: 190px; height: 36px; }
.phone::after { right: -3px; top: 250px; height: 104px; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 58px; overflow: hidden; background-color: var(--bg);
  background-image: linear-gradient(180deg, var(--bg-hi), var(--bg) 60%); }
.sbar { position: absolute; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 32px 0 48px; font-weight: 600; font-size: 16px; z-index: 2; }
.island { position: absolute; top: 11px; left: 50%; width: 126px; height: 37px; margin-left: -63px; border-radius: 20px; background: var(--ink); }
.sicons { display: flex; gap: 6px; align-items: center; }
.sicons svg { fill: var(--fg); }
.homebar { position: absolute; bottom: 8px; left: 50%; width: 140px; height: 5px; margin-left: -70px; border-radius: 3px; background: var(--fg); z-index: 2; }
.app { position: absolute; inset: 54px 0 30px; padding-inline: 16px; }
.glow { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; opacity: 0; box-shadow: inset 0 0 70px 6px var(--news-glow); }
.glow.breaking { box-shadow: inset 0 0 80px 10px var(--hot-glow); }
.glow.on { animation: glow 2s ease-out; }
@keyframes glow { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

/* on a real phone, drop the frame and run full screen */
.bare .stage { display: block; height: 100%; padding: 0; }
.bare .wrap { width: 100%; height: 100%; }
.bare .phone { position: static; width: 100%; height: 100%; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.bare .phone::before, .bare .phone::after, .bare .sbar, .bare .homebar { display: none; }
.bare .screen { border-radius: 0; }
.bare .app { inset: 0; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* shared */
.scr { height: 100%; display: flex; flex-direction: column; gap: 14px; padding-block: 8px 12px; }
.top { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.brand { font-weight: 700; letter-spacing: 0.2em; font-size: 13px; }
.back { background: none; border: 0; padding: 4px 0; color: var(--yes-ink); font-size: 15px; cursor: pointer; }
.hdr-r { display: flex; align-items: center; gap: 8px; }
.chip svg { stroke: var(--gold); }
/* Streak flame: lit once you've played today, grey while today's hand is still owed. */
.streak { display: inline-flex; align-items: center; gap: 4px; padding: 6px 9px; border-radius: 8px; background: var(--panel-2); font-family: var(--font-num); font-size: 13px; font-weight: 600; color: var(--dim); }
.streak.lit { color: var(--flame); }
.goal { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--panel); }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; }
.goal-top b { font-family: var(--font-num); font-size: 13px; }
.goal-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.goal-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--flame); transition: width 0.4s ease-out; }
.goal.done .goal-bar i { background: var(--good); }
/* Rating card and leagues */
.rank { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; align-items: center; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--panel); text-align: left; cursor: pointer; }
.rank-t { display: flex; flex-direction: column; }
.rank-t b { font-size: 17px; }
.rank-t span { font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.rank-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 3px; background: currentColor; }
.rank-d { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.badge { display: grid; place-items: center; }
.badge.big svg { width: 52px; height: 52px; }
.league-head { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.tiers { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.tiers i { height: 6px; border-radius: 3px; opacity: 0.3; }
.tiers i.on { opacity: 1; }
#lgList { gap: 4px; }
.lg-row { display: grid; grid-template-columns: 22px 24px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 12px; border-radius: 8px; background: var(--panel); font-size: 14px; transition: filter 0.2s ease-out, opacity 0.2s ease-out; }
.lg-row.you { box-shadow: inset 0 0 0 1px var(--yes); }
.lg-row .rk { font-family: var(--font-num); color: var(--dim); }
.lg-row .av { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; background: var(--panel-2); font-size: 11px; font-weight: 700; }
.lg-row .av img { width: 100%; height: 100%; object-fit: cover; }
.lg-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lg-row .el { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.lg-row .wk { min-width: 44px; text-align: right; font-family: var(--font-num); font-size: 12px; font-variant-numeric: tabular-nums; }
.prog-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.prog-row svg { flex: none; }
.prog-row b { font-family: var(--font-num); }
.promo { padding: 10px 12px; border-radius: 8px; text-align: center; font-weight: 700; color: var(--ink); animation: pop-in 0.5s ease-out; }
@keyframes pop-in { from { transform: scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--panel-2); color: var(--muted); }
.avatar svg { stroke: currentColor; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-num); font-size: 13px; padding: 6px 11px; border-radius: 8px; background: var(--panel-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card { background: var(--panel); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.eyebrow { font-family: var(--font-num); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fine { font-size: 12px; color: var(--dim); }
.note { font-size: 13px; color: var(--muted); }
.grow { flex: 1; }
.btn { min-height: 54px; border-radius: 10px; border: 0; font-size: 17px; font-weight: 600; cursor: pointer; padding: 0 16px; }
.btn.primary { background: var(--yes-btn); color: var(--on-btn); }
.btn.ghost { background: var(--panel-2); color: var(--fg); }
.btn:active:not(:disabled) { opacity: 0.85; }
.btn:disabled { opacity: 0.4; cursor: default; }
.good { color: var(--good); }
.bad { color: var(--no-ink); }

/* menu */
.h-menu { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.hero { display: flex; flex-direction: column; gap: 6px; padding: 6px 2px 4px; }
.logo { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.menu { display: flex; flex-direction: column; gap: 10px; }
.mi { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-height: 76px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--panel); text-align: left; cursor: pointer; }
.mi:active { background: var(--panel-2); }
.mi-ic { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2); color: var(--fg); }
.mi-ic svg { stroke: currentColor; }
.mi-t { grid-column: 2; grid-row: 1 / 3; font-size: 17px; font-weight: 600; }
.mi:has(.mi-d) .mi-t { grid-row: 1; }
.mi-d { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.mi-go { grid-column: 3; grid-row: 1 / 3; font-size: 22px; color: var(--dim); }
.mi.featured { background: linear-gradient(135deg, var(--yes-bg), var(--panel) 75%); box-shadow: inset 0 0 0 1px var(--yes); }
.mi.featured .mi-ic { background: var(--yes-btn); color: var(--on-btn); }
.mi .tag { vertical-align: 2px; }
.center { text-align: center; }
.rules li { font-size: 15px; }
.opts { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; }
.opt { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 11px 16px; border-radius: 10px; background: var(--panel); border: 1.5px solid transparent; cursor: pointer; }
.opt input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { border-color: var(--yes); background: var(--panel-2); }
.opt:has(input:focus-visible), .seg label:has(input:focus-visible) { outline: 2px solid var(--yes-ink); outline-offset: 2px; }
.opt-t { font-size: 17px; font-weight: 600; }
.opt-d { grid-column: 1; font-size: 13px; color: var(--muted); }
.opt-m { grid-column: 2; grid-row: 1 / 3; align-self: center; font-family: var(--font-num); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--panel); }
.seg label { position: relative; text-align: center; padding: 9px; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg label:has(input:checked) { background: var(--panel-2); color: var(--fg); }
.toggle { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--yes); }

/* lobby and table */
.list { display: flex; flex-direction: column; gap: 8px; }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 14px; border-radius: 8px; background: var(--panel); }
.lrow .nm { font-weight: 600; }
.lobby-nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lobby-nm > span:not(.stack):not(.tag) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack { display: flex; flex: none; }
.stack i { display: grid; place-items: center; width: 22px; height: 22px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--panel); font-style: normal; font-size: 10px; font-weight: 700; color: var(--ink); }
.stack i:first-child { margin-left: 0; }
.lrow .d { grid-column: 1; font-size: 13px; color: var(--muted); }
.lrow .act { grid-column: 2; grid-row: 1 / 3; }
.small-btn { min-height: 40px; padding: 0 16px; border-radius: 8px; border: 0; background: var(--yes-btn); color: var(--on-btn); font-weight: 600; cursor: pointer; }
.small-btn:disabled { opacity: 0.4; cursor: default; }
.tag { font-family: var(--font-num); font-size: 11px; font-weight: 400; padding: 2px 6px; border-radius: 4px; background: var(--panel-2); color: var(--muted); margin-left: 6px; }
.code { font-family: var(--font-num); font-size: 34px; font-weight: 600; letter-spacing: 0.12em; }

/* setup */
.q-big { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.stat-k { font-size: 12px; color: var(--muted); }
.stat-v { font-family: var(--font-num); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pays { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay { font-size: 13px; font-weight: 500; padding: 8px 10px; border-radius: 8px; text-align: center; }
.pay.yes { background: var(--yes-bg); color: var(--yes-ink); }
.pay.no { background: var(--no-bg); color: var(--no-ink); }
.how { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-direction: column; gap: 10px; }
.how li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; }
.how li span:first-child { font-family: var(--font-num); color: var(--dim); }
.tip { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 10px; background: var(--good-bg); color: var(--good); font-size: 14px; }
.tip b { font-family: var(--font-num); }

/* play */
.hud { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.timer { font-family: var(--font-num); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hud-l { display: flex; align-items: center; gap: 10px; }
.quit { min-height: 36px; padding: 0 8px 0 0; border: 0; background: none; color: var(--yes-ink); font-size: 15px; cursor: pointer; white-space: nowrap; }
.quit.armed { color: var(--no-ink); font-weight: 600; }
.stand { flex: 1; min-width: 0; text-align: center; font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.combo { display: flex; gap: 6px; align-items: baseline; font-family: var(--font-num); font-size: 12px; padding: 6px 12px; border-radius: 8px; background: var(--panel-2); color: var(--muted); }
.combo b { font-size: 15px; color: var(--fg); }
/* Combo: gold while it's running, a double gold flash when it goes up, a red flash and shake when it's lost. */
.combo.hot { background: var(--gold-tint); color: var(--gold); }
.combo.hot b { color: var(--gold); }
.combo.pop, .combo.lost { color: inherit; }
.combo.pop b, .combo.lost b { color: inherit; }
.combo.pop { animation: combo-pop 0.8s ease-out; }
.combo.lost { animation: combo-lost 0.6s ease-out; }
@keyframes combo-pop {
  0% { transform: scale(1); }
  12% { transform: scale(1.3); background: var(--gold); color: var(--ink); }
  30% { background: var(--gold-tint); color: var(--gold); }
  48% { transform: scale(1.15); background: var(--gold); color: var(--ink); }
  100% { transform: scale(1); }
}
@keyframes combo-lost {
  0%, 45% { background: var(--hot-bg); color: var(--on-btn); }
  15% { transform: translateX(-5px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-3px); }
  100% { transform: none; }
}
.bonus-float { position: absolute; right: 10px; top: 0; font-family: var(--font-num); font-size: 15px; font-weight: 700; color: var(--gold); pointer-events: none; animation: rise 1s ease-out forwards; }
@keyframes rise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-28px); opacity: 0; } }
.prog { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--yes); transform-origin: left; }
.warn .timer { color: var(--no); }
.warn .prog i { background: var(--no); }
/* Players strip (tables): one cell per player, ranked by P&L right now. */
.players { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pl { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 8px; border-radius: 8px; background: var(--panel); }
.pl.you { box-shadow: inset 0 0 0 1px var(--yes); }
.pl-top { display: flex; align-items: center; gap: 5px; min-width: 0; }
.pl-top i { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-style: normal; font-size: 10px; font-weight: 700; color: var(--ink); }
.pl-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.pl-rank { font-family: var(--font-num); font-size: 10px; color: var(--muted); }
.pl.lead .pl-rank { color: var(--good); font-weight: 600; }
.pl-pnl { font-family: var(--font-num); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-pos { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-num); font-size: 10px; color: var(--muted); }
.q { font-size: 22px; font-weight: 600; line-height: 1.2; }
.sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.feed-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.feed { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 40px; }
.clue { position: relative; background: var(--panel-2); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: inset 0 0 0 1px var(--news); animation: arrive 0.45s ease-out; }
.clue::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; background: var(--news-tint); animation: fl 1.8s ease-out; }
.clue.breaking { background: var(--hot-bg); color: var(--on-btn); box-shadow: 0 0 24px -4px var(--hot-glow); }
.clue.breaking .meta, .clue.breaking .kind { color: var(--on-btn); }
.clue.breaking::after { background: var(--on-btn); }
.clue p { font-size: 17px; line-height: 1.35; font-weight: 500; }
.meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-num); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kind { color: var(--news-ink); }
.breaking .kind { color: var(--hot-ink); }
.new { display: none; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: var(--news); color: var(--ink); font-weight: 600; }
.breaking .new { background: var(--on-btn); color: var(--hot-bg); }
.fresh .new { display: inline-block; }
.old { display: flex; flex-direction: column; gap: 1px; padding-inline: 4px; font-size: 14px; color: var(--muted); }
.old .kind { font-family: var(--font-num); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.old { cursor: pointer; transition: filter 0.2s ease-out, opacity 0.2s ease-out; }
.old.breaking .kind { align-self: flex-start; padding: 1px 6px; border-radius: 4px; background: var(--hot-bg); color: var(--on-btn); }
.old.peek { filter: none !important; opacity: 1 !important; }
.empty { color: var(--dim); text-align: center; padding-top: 24px; }
@keyframes arrive { from { transform: translateY(-12px) scale(0.97); } to { transform: none; } }

/* Dock: one solid card. Position on the left, the price ladder on the right under the thumb. */
.dock { display: flex; flex-direction: column; gap: 10px; }
.msg { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 8px); padding: 7px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 8px; background: var(--panel-2); box-shadow: 0 8px 22px -6px var(--ink); font-size: 13px; color: var(--muted); text-align: center; z-index: 1; pointer-events: none; }
.msg:empty { display: none; }
.msg.hint { color: var(--no-ink); }
.msg.win { color: var(--good); }
.deck { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 84px; grid-template-rows: auto auto; gap: 12px; align-items: stretch; }
.deck .pos-area { grid-column: 1; grid-row: 1; }
.deck .ladder { grid-column: 2; grid-row: 1 / 3; }
.deck .act-row { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; }
.chart-btn { height: 47px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; }
.chart-btn svg { stroke: currentColor; }
.pos-area { position: relative; display: flex; flex-direction: column; gap: 11px; padding: 15px 14px; border-radius: 12px; background: var(--panel); }
.pos-area::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; }
.pos-area.fl-buy::after { background: var(--no-tint); animation: fl 0.9s ease-out; }
.pos-area.fl-sell::after { background: var(--yes-tint); animation: fl 0.9s ease-out; }
@keyframes fl { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
.book { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.book .r { text-align: right; }
.posv { font-family: var(--font-num); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
.posv.long { color: var(--yes-ink); }
.posv.short { color: var(--no-ink); }
.avg { font-family: var(--font-num); font-size: 11px; color: var(--muted); min-height: 15px; }
.pnlv { font-family: var(--font-num); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.meter { position: relative; height: 6px; border-radius: 3px; background: var(--line); }
.meter::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--dim); }
.meter i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.meter i.long { background: var(--yes); }
.meter i.short { background: var(--no); }
.outs { display: flex; justify-content: space-between; font-family: var(--font-num); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.outs b { font-weight: 600; }
.sep { height: 1px; background: var(--line); }
.qnums { display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; }
.qn span { display: block; font-family: var(--font-num); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.qn b { font-family: var(--font-num); font-size: 28px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.qn.buy { color: var(--no-ink); }
.qn.sell { color: var(--yes-ink); text-align: right; }
.spread { font-family: var(--font-num); font-size: 11px; color: var(--muted); padding: 3px 8px; background: var(--bg); border-radius: 6px; margin-bottom: 3px; white-space: nowrap; }

/* Ladder: one row per price, highest at the top, numbers on the left so the thumb doesn't cover them.
   Drag up or down to move the quote band; the ladder scrolls only near its edges. A tap steps the spread 4 → 6 → 10. */
.ladder { position: relative; min-height: 150px; border-radius: 12px; background: var(--panel); overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ladder:active { cursor: grabbing; }
.lad-view { position: absolute; inset: 0; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.lad-list { position: absolute; left: 0; right: 0; top: 0; transition: transform 0.18s ease-out; }
.lr { position: absolute; left: 0; right: 0; height: var(--row); line-height: var(--row); padding-left: 10px; font-family: var(--font-num); font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.lr::before { content: ""; position: absolute; right: 10px; top: 50%; width: 8px; height: 1px; background: var(--line); }
.lr.five { color: var(--muted); }
.lr.five::before { width: 16px; background: var(--dim); }
.lad-others i { position: absolute; right: 4px; width: 6px; height: 6px; margin-top: 3px; border-radius: 50%; }
.lad-others i.ob { background: var(--no); }
.lad-others i.oa { background: var(--yes); }
.lad-band { position: absolute; left: 4px; right: 4px; border-radius: 6px; transition: top 0.18s ease-out, height 0.18s ease-out;
  background: linear-gradient(180deg, var(--yes-tint), transparent 50%, var(--no-tint)); box-shadow: inset 0 0 0 1px var(--range); }
.lb { position: absolute; left: 0; right: 0; height: var(--row); display: flex; align-items: center; gap: 5px; padding: 0 8px; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.lb b { font-size: 13px; font-weight: 600; transition: font-size 0.15s ease-out; }
.lb small { font-size: 9px; font-weight: 500; letter-spacing: 0.08em; }
.dragging .lb b { font-size: 16px; }
.lb-ask { top: 4px; color: var(--yes-ink); }
.lb-bid { bottom: 4px; color: var(--no-ink); }
.lr.q { color: transparent; }
.lr.mid { color: var(--fg); font-weight: 700; font-size: 12px; }
.lr.mid::before { width: 22px; height: 2px; background: var(--fg); }
.lb.hit { animation: hit 0.35s ease-out; }
@keyframes hit { 50% { transform: scale(1.18); } }
.lad-ideal { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--ideal); transition: top 0.3s ease-out; pointer-events: none; z-index: 1; }
.lad-ideal span, .lad-edge span { position: absolute; right: 6px; top: -12px; color: var(--ideal); font-family: var(--font-num); font-size: 9px; font-weight: 600; letter-spacing: 0.04em; }
.lad-edge { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--ideal); z-index: 2; pointer-events: none; }
.lad-edge.top { top: 6px; }
.lad-edge.top span { top: 3px; }
.lad-edge.bot { bottom: 18px; }
.lad-grip { position: absolute; left: 50%; bottom: 6px; width: 28px; height: 4px; margin-left: -14px; border-radius: 2px; background: var(--line); pointer-events: none; }

/* Big readout beside the ladder while the thumb is on it. */
.callout { position: absolute; right: calc(84px + 16px); width: 104px; transform: translateY(-50%); padding: 8px 12px; border-radius: 8px; background: var(--panel-2); box-shadow: 0 12px 28px -8px var(--ink), inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 2px; opacity: 0; pointer-events: none; transition: opacity 0.2s ease-out, top 0.18s ease-out; z-index: 2; }
.callout.show { opacity: 1; }
.callout::after { content: ""; position: absolute; right: -7px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-right: 0; border-left-color: var(--panel-2); }
.callout div { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.callout b { font-size: 28px; line-height: 1.05; font-weight: 600; }
.callout small { font-size: 10px; letter-spacing: 0.08em; }
.co-ask { color: var(--yes-ink); }
.co-bid { color: var(--no-ink); }
.co-spread { justify-content: center !important; padding: 2px 0; border-block: 1px solid var(--line); font-size: 11px; color: var(--muted); }

.close { height: 47px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; font-weight: 500; cursor: pointer; padding: 0 8px; }
.close.sell { background: var(--yes-ink); border-color: var(--yes-ink); color: var(--ink); font-weight: 600; }
.close.buy { background: var(--no-ink); border-color: var(--no-ink); color: var(--ink); font-weight: 600; }
.close.sell:active, .close.buy:active { opacity: 0.85; }
.close:disabled { opacity: 0.35; cursor: default; }

/* result */
#scrPrint, #scrLeague { overflow-y: auto; }
#scrLeague > * { flex-shrink: 0; }
#scrPrint > * { flex-shrink: 0; }
.res { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.big { font-family: var(--font-num); font-size: 56px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.outcome { margin-top: 6px; padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.outcome.yes { background: var(--yes-btn); color: var(--on-btn); }
.outcome.no { background: var(--no); color: var(--ink); }
.score { display: flex; justify-content: space-between; align-items: baseline; }
.score b { font-family: var(--font-num); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.score span { color: var(--muted); }
.brow { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.brow b { font-family: var(--font-num); font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }
.rows { display: flex; flex-direction: column; gap: 2px; }
.trow { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 6px; }
.trow.you { background: var(--panel-2); }
.trow .rk { font-family: var(--font-num); color: var(--dim); }
.trow .nm { font-weight: 600; overflow-wrap: anywhere; }
.trow .nt { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.trow .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 12px; font-family: var(--font-num); font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 16px; height: 0; vertical-align: middle; margin-right: 4px; border-top: 2.5px solid var(--yes); }
.legend i.f { border-top: 2px dashed var(--fg); }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-clue { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 2 3; }
.c-fair { fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-dasharray: 5 4; }
.c-you { fill: none; stroke: var(--yes); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { fill: var(--yes); }
.c-txt { fill: var(--muted); font-family: var(--font-num); font-size: 10px; }

/* Chart sheet: slides up over the game while the round keeps running. */
.scrim { position: absolute; inset: 0; z-index: 4; background: var(--scrim); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; padding-bottom: max(34px, env(safe-area-inset-bottom, 0px)); border-radius: 14px 14px 0 0; background: var(--panel); box-shadow: 0 -12px 30px var(--ink); animation: sheet-in 0.25s ease-out; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
.sheet-h { display: flex; justify-content: space-between; align-items: center; }
.sheet-x { width: 36px; height: 36px; border-radius: 8px; border: 0; background: var(--panel-2); font-size: 15px; cursor: pointer; }
.legend { flex-wrap: wrap; row-gap: 4px; }
.legend i.band { height: 8px; border: 0; background: var(--range); }
.legend i.dot { width: 8px; height: 8px; border: 0; border-radius: 50%; }
.legend i.dot.buy { background: var(--no); }
.legend i.dot.sell { background: var(--yes); }
.legend i.up { width: 6px; height: 10px; border: 0; background: var(--good); }
.legend i.down { width: 6px; height: 10px; border: 0; background: var(--hot); }
.legend i.news { border-top: 2px dashed var(--news); }
.legend i.ideal { border-top: 2px dashed var(--ideal); }
.c-band { fill: var(--range); opacity: 0.45; }
.c-bandline { fill: none; stroke: var(--range); stroke-width: 1; }
.c-mid { fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-linejoin: round; }
.c-buy { fill: var(--no); stroke: var(--panel); stroke-width: 1; }
.c-sell { fill: var(--yes); stroke: var(--panel); stroke-width: 1; }
.c-news { stroke: var(--news); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.6; }
.c-hot { stroke: var(--hot); stroke-width: 1.5; stroke-dasharray: 3 3; }
.c-ideal { fill: none; stroke: var(--ideal); stroke-width: 1.5; stroke-dasharray: 5 4; }
.c-now { stroke: var(--muted); stroke-width: 1; }
.c-up { fill: var(--good); stroke: var(--good); }
.c-down { fill: var(--hot); stroke: var(--hot); }
.lesson { font-size: 15px; padding-inline: 4px; }
details { background: var(--panel); border-radius: 12px; padding: 14px 18px; font-size: 13px; color: var(--muted); }
summary { cursor: pointer; color: var(--fg); font-weight: 500; font-size: 14px; }
.reveal { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.reveal-name { font-size: 17px; font-weight: 600; color: var(--fg); }
.hash { font-family: var(--font-num); font-size: 12px; color: var(--yes-ink); word-break: break-all; }
pre { margin: 0; padding: 10px; background: var(--bg); border-radius: 6px; font-family: var(--font-num); font-size: 11px; color: var(--fg); overflow-x: auto; }
.verify { min-height: 20px; }
.verify.ok { color: var(--good); }
.verify.bad { color: var(--no-ink); }
.actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding-top: 18px; background: linear-gradient(transparent, var(--bg) 35%); margin-top: auto; }

@media (prefers-reduced-motion: reduce) {
  .promo, .sheet, .clue, .clue::after, .lb.hit, .combo.pop, .combo.lost, .bonus-float, .glow.on, .pos-area.fl-buy::after, .pos-area.fl-sell::after { animation: none; }
  .lad-list, .lad-band { transition: none; }
}

/* Web app additions: name entry, join by code, connection state */
.name-in, .code-in { width: 100%; min-height: 52px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font-family: var(--font-ui); font-size: 17px; -webkit-user-select: text; user-select: text; }
.name-in:focus, .code-in:focus { outline: none; border-color: var(--yes); }
.code-in { font-family: var(--font-num); font-size: 20px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; text-align: center; }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.join-row .btn { min-height: 52px; }
.lrow .elo { grid-column: 2; grid-row: 1 / 3; font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.lrow .off { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--dim); }

/* Landing: full screen over the app column, in the spirit of a clean product hero:
   a small logo and Log in on top, one sentence, one button, and a live wall of price ladders. */
#scrLanding { position: fixed; inset: 0; z-index: 20; height: auto; padding: 0; gap: 0; background: var(--lp-bg); color: var(--fg);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.lp-nav { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1040px; margin: 0 auto;
  padding: 22px max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); }
.lp-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 400; letter-spacing: -0.01em; }
.lp-login { min-height: 40px; padding: 0 16px; border: 0; border-radius: 4px; background: var(--lp-chip); color: var(--fg); font-size: 15px; cursor: pointer; }
.lp-login:hover { background: var(--panel-2); }
.lp-hero { position: relative; flex: 1; display: flex; align-items: center; width: 100%; max-width: 1040px; margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) 6vh max(20px, env(safe-area-inset-left, 0px)); }
/* A soft backdrop, not a picture: blurred, dimmed, and fading out on every side (no hard edges). */
.lp-visual { position: absolute; top: 4%; bottom: 8%; right: 0; width: 72%;
  -webkit-mask-image: radial-gradient(ellipse 50% 48% at 58% 50%, #000 20%, rgba(0,0,0,0.6) 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 48% at 58% 50%, #000 20%, rgba(0,0,0,0.6) 50%, transparent 100%); }
.lp-visual canvas { width: 100%; height: 100%; display: block; filter: blur(1.6px); opacity: 0.55; }
.lp-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 40px; max-width: 640px; }
.lp-h1 { font-size: clamp(32px, 4.2vw, 46px); line-height: 1.12; font-weight: 300; letter-spacing: -0.02em; text-wrap: balance; }
.lp-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 4px;
  background: var(--no); color: var(--ink); font-size: 16px; font-weight: 500; cursor: pointer; transition: transform 0.15s ease-out;
  animation: cta-glow 3.2s ease-in-out infinite; }
.lp-cta::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cta-glint), transparent); animation: cta-glint 3.6s ease-in-out infinite; }
@keyframes cta-glint { 0%, 55% { left: -40%; } 85%, 100% { left: 120%; } }
@keyframes cta-glow { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 28px 2px var(--no-tint); } }
.lp-cta:hover svg { transform: translateX(3px); }
.lp-cta svg { transition: transform 0.15s ease-out; }
.lp-cta:active { transform: scale(0.98); }
/* Phones: the ladders fill the top, the sentence and button sit below. */
@media (prefers-reduced-motion: reduce) { .lp-cta, .lp-cta::after { animation: none; } }
@media (max-width: 720px) {
  .lp-logo { font-size: 18px; }
  .lp-hero { flex-direction: column; justify-content: flex-end; align-items: stretch; padding-bottom: max(28px, env(safe-area-inset-bottom, 0px)); }
  .lp-visual { top: 2%; bottom: 26%; left: -10%; right: -10%; width: auto;
    -webkit-mask-image: radial-gradient(ellipse 52% 50% at 50% 45%, #000 15%, rgba(0,0,0,0.55) 50%, transparent 100%);
    mask-image: radial-gradient(ellipse 52% 50% at 50% 45%, #000 15%, rgba(0,0,0,0.55) 50%, transparent 100%); }
  .lp-copy { gap: 28px; max-width: none; }
  .lp-h1 { font-size: clamp(28px, 8.2vw, 36px); }
  .lp-cta { width: 100%; justify-content: space-between; min-height: 56px; font-size: 17px; }
}

.auth { display: flex; flex-direction: column; gap: 8px; }
/* The code's six boxes: one real input over them, transparent; the boxes draw its digits and which one is next. */
.code-boxes { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 52px)); justify-content: center; gap: 8px; width: 100%; margin-block: 8px; }
.code-box { aspect-ratio: 5 / 6; display: grid; place-items: center; border-radius: 10px; border: 2px solid var(--line); background: var(--panel);
  font-family: var(--font-num); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.code-box.filled { border-color: var(--range); }
.code-box.current { border-color: var(--yes); box-shadow: 0 0 0 3px var(--yes-tint); }
.code-boxes.wrong .code-box { border-color: var(--hot); }
.code-boxes input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: transparent;
  caret-color: transparent; font-size: 16px; outline: none; cursor: text; }
.code-boxes input::selection { background: transparent; }
.auth .btn { margin-top: 8px; }
.field-l { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 6px; }
.link { min-height: 44px; border: 0; background: none; color: var(--yes-ink); font-size: 15px; cursor: pointer; }
.link.inline { min-height: 0; padding: 0; font-size: inherit; }
.center b { color: var(--fg); }
/* One phone-width column on every screen; no device frame. */
.bare .stage { display: flex; justify-content: center; }
.bare .wrap { max-width: 480px; }

/* iPhone tap haptics (tapSwitch in app.js): a real switch, all but invisible, over the control. */
.tap-switch { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; margin: 0; opacity: 0.01; cursor: pointer; touch-action: none; }
.tap-wrap { position: relative; display: grid; }
.tap-wrap > button { width: 100%; }
@media (max-width: 720px) { .lp-copy .tap-wrap { align-self: stretch; } }
