/* RKT ACADEMY - per-game screen pieces (Rug Escape, Spot the Bot, Candle, Risk, Launch, Detective, Slippage, Narrative) */
/* ---------- RUG ESCAPE ---------- */
.rug-chart .chart { height: auto; }
.price .pl { font-size: .6rem; margin: 0 6px 0 0; color: var(--dim); letter-spacing: .1em; }
.risk-read { display: grid; gap: 4px; } .risk-read:empty { display: none; }
.rr-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line2); }
.rr-head small { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; color: var(--dim); } .rr-head b { font-family: var(--f-display); }
.rr-head.lvl-low b { color: var(--good); } .rr-head.lvl-elevated { border-color: var(--gold); } .rr-head.lvl-elevated b { color: var(--gold); } .rr-head.lvl-high { border-color: var(--red); background: rgba(255,84,112,.1); } .rr-head.lvl-high b { color: var(--red); }
.risk-read ul { margin: 0; padding-left: 1.2em; font-size: .8rem; color: #c3ccd8; } .risk-read p { margin: 0; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.feed li { font-size: .85rem; padding: 7px 10px; border-left: 3px solid var(--line2); background: rgba(21,27,35,.7); border-radius: 0 6px 6px 0; color: #c3ccd8; }
.feed li.warn { border-left-color: var(--gold); color: #f3d48d; background: rgba(229,180,69,.08); } .feed li.decoy { border-left-color: var(--purple); } .feed li.quiet { color: var(--dim); }
.rug-clues, .rug-acct { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rug-clues .clue, .rug-acct .clue, .acct.slim .clue { padding: 6px 4px; } .rug-clues .clue b, .rug-acct .clue b { font-size: .85rem; }
.actions.four-up { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.actions.four-up .act { min-height: 60px; padding: 6px 4px; } .actions.four-up .act b { font-size: .8rem; } .actions.four-up .act small { font-size: .58rem; line-height: 1.2; }
@media (max-width: 380px) { .actions.four-up .act small { display: none; } }

/* ---------- SPOT THE BOT / NARRATIVE ---------- */
.actions.grid2 { grid-template-columns: repeat(2, 1fr); gap: 8px; } @media (min-width: 760px) { .actions.grid2 { grid-template-columns: repeat(4, 1fr); } }
.actions.grid2 .act { min-height: 56px; } .act.cy { border-color: rgba(111,168,255,.7); background: rgba(111,168,255,.08); }
.wdot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.wallet-intel { background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 6px 10px; } .wallet-intel summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; font-family: var(--f-display); font-size: .82rem; text-transform: uppercase; }
.wallet-intel .tx-wrap { margin: 6px 0 4px; } .wtable td { font-size: .72rem; }
.chip.ev-link { border-color: var(--red); color: #f5a0ad; } .chip.ev-auto { border-color: var(--cyan); color: var(--cyan); } .chip.ev-group { border-color: var(--gold); color: var(--gold); } .chip.ev-weak { color: var(--dim); } .chip.ev-ctx { border-color: var(--line2); color: var(--text2); }
.bot-context { margin: 0 0 8px; }
.feedback p { color: #c3ccd8; font-size: .9rem; }
.chain-panel { padding: 10px; background: #080b0f; border: 1px solid var(--line2); border-radius: 10px; display: grid; gap: 6px; } .chain-panel > small { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; color: var(--cyan); }
.acct.slim { grid-template-columns: repeat(3, 1fr); gap: 6px; } .acct.slim .clue b { font-size: .8rem; word-break: break-word; }
@media (min-width: 640px) { .acct.slim { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); } }
@media (max-width: 639px) { .acct.slim:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); } }
.chain-note { margin: 0; color: var(--gold); font-size: .82rem; }
.post-feed { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 2px; overscroll-behavior: contain; }
.post { padding: 9px 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; animation: rowIn .3s both; animation-delay: calc(var(--i) * 35ms); }
.post-h { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .74rem; font-family: var(--f-mono); } .post-h b { color: var(--cyan); }
.post p { margin: 4px 0; font-size: .9rem; } .post-f { font-family: var(--f-mono); font-size: .7rem; }

/* ---------- CANDLE ---------- */
.depth-wrap .depth-svg, .depth { width: 100%; display: block; }
.depth-wrap { margin-top: -6px; }

/* ---------- RISK ---------- */
.risk-card h2 { font-size: 1.05rem; }
.setup-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-family: var(--f-mono); font-size: .74rem; color: #cdc8e0; } .setup-info li::before { content: "› "; color: var(--accent); }
.seg-wrap { display: grid; gap: 4px; } .seg-l { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; color: var(--dim); }
.seg { display: grid; gap: 6px; } .seg-btn { min-height: 46px; font-size: .78rem; padding: 0 4px; }
.ticket { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; } @media (min-width: 640px) { .ticket { grid-template-columns: repeat(3, 1fr); } }
.ticket .clue { padding: 6px; } .ticket .clue b { font-size: .82rem; }
.res-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.tagx { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; padding: 4px 8px; border: 1px solid var(--line2); border-radius: 4px; color: var(--dim); } .tagx.good { border-color: var(--good); color: var(--good); } .tagx.bad { border-color: var(--red); color: #f58a9b; }
.fill { margin: 0; font-family: var(--f-mono); font-size: .78rem; color: #cdc8e0; }
.jnotes { margin: 0; padding-left: 1.2em; font-size: .85rem; color: #f0c76a; }

/* ---------- LAUNCH ---------- */
.launch-meters { grid-template-columns: repeat(2, 1fr); gap: 8px 12px; } @media (min-width: 760px) { .launch-meters { grid-template-columns: repeat(4, 1fr); } }
.launch-meters .meter .m-top { font-size: .72rem; }
.fx-hint { font-family: var(--f-mono); font-size: .68rem !important; color: var(--cyan) !important; }
.shock { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--purple); border-radius: 8px; background: rgba(169,156,245,.1); font-size: .85rem; } .shock b { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; color: var(--purple); }

/* ---------- DETECTIVE ---------- */
.case-card.solved { border-color: rgba(76,214,154,.5); } .case-card.solved small { color: var(--good); }
.claims { display: grid; gap: 8px; }
.claim { padding: 10px; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; display: grid; gap: 6px; } .claim.bad { border-color: var(--red); box-shadow: inset 3px 0 0 var(--red); } .claim p { margin: 0; font-size: .9rem; }
.claim-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cbtn { min-height: 44px; padding: 4px; background: var(--panel2); color: var(--dim); border: 1px solid var(--line2); border-radius: 6px; cursor: pointer; font: 700 .7rem var(--f-body); touch-action: manipulation; }
.cbtn.sel.c-fact { background: var(--cyan); color: #0b0e12; border-color: var(--cyan); } .cbtn.sel.c-inference { background: var(--gold); color: #1a1100; border-color: var(--gold); } .cbtn.sel.c-unsupported { background: var(--red); color: #fff; border-color: var(--red); }
.cbtn[disabled] { cursor: default; }

/* ---------- SLIPPAGE ---------- */
.slip-card h2 { font-size: 1.02rem; }
.curve-host .chart { height: auto; }
.slider-box { display: grid; gap: 8px; }
.slip-opts .choice b { font-family: var(--f-body); font-weight: 700; text-transform: none; font-size: .92rem; }

/* home hero: cabinet slideshow scales with the number of games */
.cab-slide { animation-duration: calc(var(--n, 6) * 3s); animation-name: slideN; }
@keyframes slideN { 0% { opacity: 0; } 2%, 11% { opacity: 1; } 13%, 100% { opacity: 0; } }

/* layout guard: wide tables scroll inside their wrapper instead of stretching the page */
.play-area { grid-template-columns: minmax(0, 1fr); }
.play-area > *, .bot, .narrative, .rug, .risk, .candle, .launch, .detective, .slippage { min-width: 0; max-width: 100%; }
.bot, .narrative, .slippage, .rug, .risk, .candle, .launch, .detective { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.sticky-ctrl { position: sticky; bottom: calc(6px + var(--safe-b)); z-index: 12; background: linear-gradient(to top, var(--bg) 70%, rgba(11,14,18,0)); margin: 0 calc(-1 * max(14px, var(--safe-l))); padding: 10px max(14px, var(--safe-r)) 4px max(14px, var(--safe-l)); }
.sticky-ctrl .timer { margin: 0 0 6px; }
.sticky-ctrl .actions { position: static; background: none; margin: 0; padding: 0; }
.locked > .actions { position: static; background: none; margin: 0; padding: 0; }
.graph .nlabel, .graph .elabel { paint-order: stroke; stroke: #080b0f; stroke-width: 3px; stroke-linejoin: round; }
.slip-opts.short { display: grid; grid-template-columns: repeat(3, 1fr); } .slip-opts.short .choice { text-align: center; padding: 8px 4px; }
.slip-opts.short .choice:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
@media (min-width: 1180px) { .cabinets { grid-template-columns: repeat(4, 1fr); } .cabinet .concept { font-size: .86rem; } }
.academy-copy .lvl small { grid-column: 2; }
.page.result { overflow-x: clip; }
.preopen { height: 190px; display: grid; place-content: center; text-align: center; gap: 6px; background: repeating-linear-gradient(to bottom, transparent 0 46px, rgba(255,255,255,.05) 46px 47px); }
.preopen span { font-family: var(--f-display); letter-spacing: .3em; color: var(--accent); animation: blink 2.2s steps(1) infinite; } .preopen small { color: var(--dim); font-family: var(--f-mono); font-size: .7rem; }
@media (min-width: 700px) { .preopen { height: 260px; } }
.chart-wrap .chart { max-height: 320px; } .curve-host .chart { max-height: 240px; }

/* ---------- final pass: Rug Escape mobile hierarchy ---------- */
.market-head { align-items: flex-end; }
.mh-left { display: grid; gap: 2px; } .mh-left small { font-size: .66rem; }
.mcap-head { display: grid; justify-items: end; line-height: 1.05; }
.mcap-head small { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; color: var(--dim); }
.mcap-head b { font-family: var(--f-display); font-size: clamp(1.25rem, 6vw, 1.7rem); font-variant-numeric: tabular-nums; }
.mcap-head em { font-style: normal; font-family: var(--f-mono); font-size: .75rem; }
.mcap-head .up { color: var(--good); } .mcap-head .down { color: var(--bad); }
/* Sticky controls are an opaque panel that sits in the document flow: the space is reserved at the end of the
   game area, so scrolling always brings every stat fully above it. Nothing reads through it. */
.sticky-ctrl { bottom: 0; background: var(--bg); border-top: 1px solid var(--line2); box-shadow: 0 -12px 18px -10px rgba(8,11,15,.95); padding-top: 10px; padding-bottom: calc(10px + var(--safe-b)); margin-top: 4px; }
.in-game .stage { padding-bottom: 0; }
.in-game .view, html.in-game-root { scroll-padding-bottom: 150px; }
.actions.four-up .act[disabled] { opacity: .38; border-style: dashed; filter: grayscale(.7); }
.actions.four-up .act[disabled] small { color: var(--dim); }
/* compact in-game header on phones: title + buttons on one row, score + context on the next */
@media (max-width: 1099px) {
  .hud { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; padding-bottom: 6px; }
  .hud-title { grid-column: 1; grid-row: 1; }
  .hud-btns { grid-column: 2; grid-row: 1 / span 2; }
  .hud-score { grid-column: 1; grid-row: 2; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .hud-score .counter { font-size: 1.5rem; }
  .hud-sub { grid-column: 1; grid-row: 3; font-size: .66rem; }
  .hud-btns .icon-btn { min-width: 44px; min-height: 44px; }
}
.rug { gap: 8px; }
.in-game .view { padding-bottom: var(--safe-b); }
.rug .feed li { padding: 5px 10px; }
.risk-read ul { margin: 2px 0 0; }
.turn-secs { margin-left: 8px; font-family: var(--f-mono); font-size: .72rem; color: var(--dim); font-variant-numeric: tabular-nums; }
/* Short screens cannot fit the board above a sticky bar without covering stats: controls return to the flow,
   directly under the position panel, and the turn countdown stays visible in the market header. */
@media (max-height: 720px) { .sticky-ctrl { position: static; box-shadow: none; } }
@media (max-width: 360px) { .hud-title b { font-size: .8rem; } .hud-sub { display: none; } .hud-btns { gap: 4px; } }
.spot-note { margin: 0; font-size: .8rem; color: var(--dim); } .spot-note b { font-family: var(--f-mono); font-size: .7rem; color: var(--cyan); margin-right: 6px; }
.seg.n3 { grid-template-columns: repeat(3, 1fr); } .seg.n4 { grid-template-columns: repeat(4, 1fr); } .seg.n7 { grid-template-columns: repeat(7, 1fr); }
/* seven size buttons do not fit 320-400px at a 44px tap target: wrap to two rows */
@media (max-width: 420px) { .seg.n7 { grid-template-columns: repeat(4, 1fr); } .seg-btn { min-height: 44px; } }
.seg > * { min-width: 0; }
body.arming #main a, body.arming #main button, body.arming .tabbar, body.arming .topbar, body.arming .drawer { pointer-events: none; }


/* V3.1: result header stacks (a short title no longer floats to the right of the kicker); achievement banner is compact on phones */
.res-head.result-head { display: block; }
@media (max-width: 639px) {
  .ach-toast { padding: 8px 12px; gap: 10px; pointer-events: none; } .ach-toast .at-ico { width: 36px; height: 36px; } .ach-toast .at-txt span { display: none; }
}
