:root {
  --bg: #0c100f;
  --panel: #131917;
  --panel-2: #1a2220;
  --line: #27322e;
  --text: #e7ece8;
  --muted: #8f9c95;
  --dim: #5f6b65;
  --pass: #b8f05a;
  --pass-ink: #13200a;
  --fail: #ff7d68;
  --fail-ink: #2b0d07;
  --warn: #f2c95c;
  --warn-ink: #2a2005;
  --fixture: #b9a6f2;
  --fixture-ink: #1c1530;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;
  --gutter: 16px;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 12px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); overflow-x: hidden; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--pass); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dd { overflow-wrap: anywhere; }
.mono { font-family: var(--mono); }
.quiet { color: var(--muted); font-size: 14px; }

/* Header */
.top, main, .foot { max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.top { display: flex; align-items: center; gap: 20px; min-height: 60px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font: 800 18px/1 var(--sans); letter-spacing: .02em; text-decoration: none; }
.wordmark-box { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--pass); color: var(--pass-ink); font: 800 12px/1 var(--mono); }
.top-nav { display: none; gap: 4px; margin-left: 12px; }
.top-nav a { padding: 10px 10px; font-size: 14px; color: var(--muted); text-decoration: none; border-radius: 6px; }
.top-nav a:hover { color: var(--text); background: var(--panel); }
.connection { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.connection::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.connection.ok::before { background: var(--pass); }
.connection.running::before { background: var(--pass); animation: pulse 1.2s ease-in-out infinite; }
.connection.error::before { background: var(--fail); }
@keyframes pulse { 50% { opacity: .25; } }

/* Hero */
.hero { padding: 14px 0 14px; }
.kicker { margin: 0 0 8px; font: 600 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--pass); }
h1 { margin: 0 0 8px; font: 800 27px/1.1 var(--sans); letter-spacing: -.02em; max-width: 16ch; }
.lede { margin: 0 0 12px; color: var(--muted); font-size: 14px; max-width: 62ch; }
.trust { margin: -4px 0 12px; padding-left: 10px; border-left: 2px solid var(--pass); font-size: 13px; color: var(--text); max-width: 62ch; }
.board-label { margin: 0 0 5px; font-size: 12px; color: var(--muted); }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.board-item { min-height: 44px; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 6px 8px 6px 10px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--dim); border-radius: 8px; }
.board-item.passed { border-left-color: var(--pass); }
.board-item.failed { border-left-color: var(--fail); }
.board-item.inconclusive { border-left-color: var(--warn); }
.board-item:hover { border-color: var(--muted); }
.board-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-text { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-text.failed { color: var(--fail); }

/* Player */
.player { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
/* Phones: the run label sits beside the project name instead of on its own line. */
#run-kicker { float: right; margin: 5px 0 0 10px; }
.player.is-running { border-color: color-mix(in srgb, var(--pass) 55%, var(--line)); }
.player-head h2 { margin: 0 0 2px; font: 700 20px/1.25 var(--sans); }
.run-product { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.run-product a { color: var(--text); min-height: 36px; display: inline-flex; align-items: center; }
.run-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.notice { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--warn); background: var(--panel-2); font-size: 13px; color: var(--text); }
.player-body { display: grid; gap: 12px; }

.viewer { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
/* Phones: cap the frame by height so the header, screenshot, current step and the first steps share one screen. */
.phone { height: min(42vh, 370px); height: min(42svh, 370px); width: auto; max-width: 100%; aspect-ratio: 390 / 844; border-radius: 22px; padding: 8px; background: #050706; border: 1px solid var(--line); box-shadow: 0 0 0 4px #0f1413; }
.stage { width: 100%; height: 100%; border-radius: 15px; overflow: auto; background: #080b0a; display: flex; align-items: center; justify-content: center; position: relative; scrollbar-width: thin; }
.stage img { display: block; width: 100%; height: auto; align-self: flex-start; }
.stage-empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.stage-empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.api-list { align-self: stretch; width: 100%; margin: 0; padding: 14px 12px; list-style: none; font: 12px/1.5 var(--mono); color: var(--muted); }
.api-list li { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.api-list b { color: var(--pass); font-weight: 600; }
.api-list .bad { color: var(--fail); }
.viewer-bar { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 340px; }
.frame-label { flex: 1; min-width: 0; text-align: center; font-size: 13px; line-height: 1.35; color: var(--text); }
.frame-label b { color: var(--pass); font-weight: 600; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); font-size: 22px; line-height: 1; }
.replay-btn { height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; font-weight: 600; }
.replay-btn[aria-pressed="true"] { background: var(--pass); color: var(--pass-ink); border-color: var(--pass); }

.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.step { border-bottom: 1px solid var(--line); }
.step-btn { width: 100%; min-height: 48px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; text-align: left; background: none; border: 0; }
.step.selected .step-btn { background: var(--panel-2); }
.step-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 11px/1 var(--mono); border: 1px solid var(--line); color: var(--muted); }
.step-num.passed { background: var(--pass); border-color: var(--pass); color: var(--pass-ink); }
.step-num.failed { background: var(--fail); border-color: var(--fail); color: var(--fail-ink); }
.step-num.inconclusive { background: var(--warn); border-color: var(--warn); color: var(--warn-ink); }
.step-num.running { border-color: var(--pass); color: var(--pass); animation: pulse 1.2s ease-in-out infinite; }
.step-name { font-size: 14px; }
.step-hint { display: block; font: 12px/1.4 var(--mono); color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.step-count { font: 12px var(--mono); color: var(--dim); white-space: nowrap; }
.checks { list-style: none; margin: 0; padding: 4px 4px 12px 40px; display: grid; gap: 8px; }
.check { font-size: 13px; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 6px; }
.check-mark { font-weight: 700; }
.check.passed .check-mark { color: var(--pass); }
.check.failed .check-mark { color: var(--fail); }
.check.inconclusive .check-mark { color: var(--warn); }
.check-obs { display: block; font: 12px/1.45 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.check.failed .check-obs { color: #ffb3a6; }
.run-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Shared controls */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn.primary { background: var(--pass); color: var(--pass-ink); border-color: var(--pass); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font: 600 12px/1.4 var(--sans); white-space: nowrap; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pill.passed { background: var(--pass); color: var(--pass-ink); border-color: var(--pass); }
.pill.failed { background: var(--fail); color: var(--fail-ink); border-color: var(--fail); }
.pill.inconclusive { background: var(--warn); color: var(--warn-ink); border-color: var(--warn); }
.pill.fixture { background: var(--fixture); color: var(--fixture-ink); border-color: var(--fixture); }
.pill.running { background: transparent; color: var(--pass); border-color: var(--pass); }
.pill.running::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--pass); animation: pulse 1.2s ease-in-out infinite; }
.tag { font: 600 11px/1 var(--mono); padding: 4px 6px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }

/* Sections */
.block { margin-top: 40px; }
.block-head { margin-bottom: 14px; }
.block-head h2 { margin: 0 0 4px; font: 700 22px/1.2 var(--sans); }
.block-note { margin: 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
.action-message { min-height: 22px; margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* Products */
.product-list { display: grid; gap: 12px; }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 14px 14px 10px; }
.product-head h3 { margin: 0; font: 700 18px/1.2 var(--sans); }
.product-head a { font-size: 13px; color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; }
.product-mint { flex-basis: 100%; font: 12px var(--mono); color: var(--dim); }
.test-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.test-main { min-width: 0; }
.test-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.test-open { background: none; border: 0; padding: 0; text-align: left; font-weight: 600; text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; min-height: 32px; }
.test-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.dots { display: inline-flex; gap: 3px; }
.dot { width: 9px; height: 9px; border-radius: 2px; background: var(--dim); }
.dot.passed { background: var(--pass); }
.dot.failed { background: var(--fail); }
.dot.inconclusive { background: var(--warn); }
.dot.old { opacity: .35; }
.test-row .btn { padding: 0 14px; }

/* Run log */
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.filter-btn { flex: none; min-height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; }
.filter-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.log-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.log-row { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 10px 2px; min-height: 56px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.log-row:hover { background: var(--panel); }
.log-row .dot { grid-row: span 2; height: 100%; min-height: 32px; width: 4px; border-radius: 2px; }
.log-title { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-sub { grid-column: 2; font-size: 12px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-when { grid-row: 1 / span 2; grid-column: 3; text-align: right; font: 12px/1.5 var(--mono); color: var(--muted); }
.log-when b { display: block; font-family: var(--sans); font-weight: 600; }
.log-when b.passed { color: var(--pass); }
.log-when b.failed { color: var(--fail); }
.log-when b.inconclusive { color: var(--warn); }
.log-when b.fixture { color: var(--fixture); }

/* Receipt detail */
.detail { margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.detail-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.detail h2 { margin: 0 0 6px; font: 700 20px/1.25 var(--sans); }
.detail h3 { margin: 22px 0 8px; font: 700 15px/1.3 var(--sans); }
.detail p { margin: 0 0 8px; font-size: 14px; }
.detail .muted { color: var(--muted); }
.detail-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.scope { display: grid; gap: 10px; }
.scope div { padding: 12px; border-radius: 8px; background: var(--panel-2); font-size: 14px; }
.scope div.limits { border-left: 3px solid var(--warn); }
.scope b { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.checks-table { display: grid; gap: 8px; }
.checks-table article { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); font-size: 13px; }
.checks-table article.failed { border-left: 3px solid var(--fail); }
.checks-table article.inconclusive { border-left: 3px solid var(--warn); }
.checks-table code { display: block; margin-top: 4px; font: 12px/1.45 var(--mono); color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.files a { font: 12px var(--mono); padding: 8px 10px; min-height: 36px; border-radius: 6px; background: var(--panel-2); text-decoration: none; display: inline-flex; align-items: center; }
.verify-ok { color: var(--pass); }
.verify-bad { color: var(--fail); }
.source-list { margin: 0; padding-left: 18px; font-size: 13px; }
.source-list a { overflow-wrap: anywhere; }

/* How to read */
.states { display: grid; gap: 10px; margin: 0 0 16px; }
.states div { display: grid; gap: 6px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.states dt, .states dd { margin: 0; }
.states dd { font-size: 14px; color: var(--muted); }
.rules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; max-width: 75ch; }

.foot { margin-top: 48px; padding-top: 18px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 10; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; }

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .top-nav { display: flex; }
  .hero { padding: 48px 0 32px; }
  h1 { font-size: 44px; max-width: 18ch; }
  .lede { font-size: 17px; }
  .board-item { min-height: 54px; padding: 8px 10px 8px 12px; }
  .board-name { font-size: 14px; }
  .lede { font-size: 17px; }
  .player, .detail { padding: 22px; }
  .player-head h2 { font-size: 24px; }
  .player-body { grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: start; }
  #run-kicker { float: none; margin: 0 0 8px; }
  .viewer { position: sticky; top: 12px; }
  .phone { height: auto; width: 100%; max-width: 300px; }
  .scope { grid-template-columns: 1fr 1fr; }
  .states { grid-template-columns: 1fr 1fr; }
  .product-list { grid-template-columns: 1fr 1fr; }
  .log-title, .log-sub { white-space: normal; }
}
@media (min-width: 1040px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 48px; align-items: end; }
  .hero .lede { margin-bottom: 14px; }
  .board { grid-template-columns: 1fr 1fr; }
  .hero .trust { margin-bottom: 0; }
  h1 { font-size: 50px; max-width: 18ch; }
  .player-body { grid-template-columns: 340px minmax(0, 1fr); }
  .phone { max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before { animation: none !important; transition: none !important; }
}

.about { font-size: 14px; }
.about[open] { flex-basis: 100%; }
.about summary { min-height: 36px; display: inline-flex; align-items: center; cursor: pointer; color: var(--text); text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }
.about p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }

.stage img { cursor: zoom-in; }
.zoom { position: fixed; inset: 0; z-index: 20; overflow: auto; background: var(--bg); padding: 60px var(--gutter) 24px; display: flex; flex-direction: column; align-items: center; }
.zoom img { width: 100%; max-width: 430px; height: auto; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-out; }
.zoom-close { position: fixed; top: 10px; right: var(--gutter); z-index: 1; }

.run-test { flex-basis: 100%; color: var(--text); font-size: 15px; font-weight: 600; }
.caption-note { display: block; color: var(--warn); font-size: 12px; }
.spinner { display: block; width: 28px; height: 28px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--pass); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.product-summary { flex-basis: 100%; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.product-summary .dot { border-radius: 50%; }

/* Live mode: mechanic line, buy feed, CA bar */
.mechanic { margin: 0 0 12px; font-size: 14px; color: var(--text); }
.mechanic b { color: var(--pass); }
.buy-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.buy-row { display: grid; grid-template-columns: 10px auto auto minmax(0, 1fr); gap: 10px; align-items: center; min-height: 48px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.buy-row .dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.running { background: var(--pass); animation: pulse 1.2s ease-in-out infinite; }
.buy-wallet { font: 600 13px var(--mono); }
.buy-sol { font: 13px var(--mono); color: var(--muted); }
.buy-what { text-align: right; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buy-row.openable { cursor: pointer; }
.buy-row.openable:hover .buy-what { color: var(--text); text-decoration: underline; }
.ca-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 8px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: rgb(12 16 15 / .96); border-top: 1px solid var(--line); }
.ca-bar .btn { min-height: 44px; padding: 0 14px; }
.ca-text { flex: 1; min-width: 0; font: 13px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-text b { font-family: var(--sans); margin-right: 4px; }
.ca-note { font-size: 13px; color: var(--muted); }
body.has-ca-bar .foot { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
body.has-ca-bar .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { .ca-bar { justify-content: center; } .ca-text { flex: none; } }

/* ?stream=1: full-screen show for the pump.fun livestream (1600x900) */
body.stream .top-nav, body.stream .hero, body.stream #products, body.stream #log, body.stream #how, body.stream .foot, body.stream #receipt-detail, body.stream .run-actions, body.stream #action-message { display: none !important; }
body.stream main { max-width: none; padding: 16px 24px 90px; display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
body.stream .buys { margin-top: 0; }
body.stream .player-body { grid-template-columns: 360px minmax(0, 1fr); }
body.stream .phone { max-width: 360px; height: auto; width: 100%; }
@media (max-width: 1100px) { body.stream main { grid-template-columns: 1fr; } }

#run-kicker.long { float: none; margin: 0 0 4px; }
/* Phones in live mode: the buy mechanic replaces the longer intro so the run stays near the top. */
@media (max-width: 719px) { body.has-ca-bar .lede { display: none; } }
body.stream .top { max-width: none; padding: 0 24px; }
body.stream .player-head h2 { font-size: 34px; }
body.stream #run-kicker { font-size: 16px; float: none; margin: 0 0 6px; }
body.stream .run-test, body.stream .run-facts { font-size: 18px; }
body.stream .step-name { font-size: 18px; }
body.stream .check { font-size: 16px; }
body.stream .phone { height: calc(100vh - 300px); width: auto; max-width: none; }
body.stream .frame-label { font-size: 16px; }
body.stream .buys h2 { font-size: 28px; }
body.stream .buy-row { font-size: 18px; min-height: 58px; }
body.stream .buy-wallet, body.stream .buy-sol, body.stream .buy-what { font-size: 17px; }
body.stream .ca-text { font-size: 18px; }
/* A buyer credit holds a case-sensitive wallet: no capitals transform on it. */
#run-kicker.long { text-transform: none; letter-spacing: 0; font: 600 14px/1.4 var(--sans); }
body.stream #run-kicker.long { font-size: 18px; }

/* ---------- show layer (public/show.js): only real run events trigger these ---------- */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 30; }
.sound-btn { margin-left: auto; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 600; }
.sound-btn[aria-pressed="true"] { color: var(--pass-ink); background: var(--pass); border-color: var(--pass); }
.sound-btn + .connection { margin-left: 10px; }
.player { position: relative; overflow: hidden; }
.player > :not(.fx-rain):not(.fx-slam) { position: relative; z-index: 1; }
.fx-rain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; z-index: 0; pointer-events: none; }

.phone { position: relative; }
.phone.fx-live { box-shadow: 0 0 0 4px #0f1413, 0 0 26px rgb(184 240 90 / .45); animation: fx-glow 1.4s ease-in-out infinite; }
@keyframes fx-glow { 50% { box-shadow: 0 0 0 4px #0f1413, 0 0 48px rgb(184 240 90 / .7); } }
.fx-scan { position: absolute; left: 8px; right: 8px; top: 8px; height: 22%; border-radius: 15px 15px 0 0; pointer-events: none; z-index: 2;
  background: linear-gradient(to bottom, rgb(184 240 90 / 0), rgb(184 240 90 / .28) 85%, rgb(220 255 160 / .95) 100%);
  animation: fx-scan 1.6s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes fx-scan { from { transform: translateY(-100%); } to { transform: translateY(460%); } }
.fx-reticle { position: absolute; width: 64px; height: 64px; left: 40%; top: 40%; pointer-events: none; z-index: 3; transition: left .35s cubic-bezier(.2, .9, .3, 1.2), top .35s cubic-bezier(.2, .9, .3, 1.2);
  background:
    linear-gradient(var(--pass), var(--pass)) top left / 16px 3px no-repeat, linear-gradient(var(--pass), var(--pass)) top left / 3px 16px no-repeat,
    linear-gradient(var(--pass), var(--pass)) top right / 16px 3px no-repeat, linear-gradient(var(--pass), var(--pass)) top right / 3px 16px no-repeat,
    linear-gradient(var(--pass), var(--pass)) bottom left / 16px 3px no-repeat, linear-gradient(var(--pass), var(--pass)) bottom left / 3px 16px no-repeat,
    linear-gradient(var(--pass), var(--pass)) bottom right / 16px 3px no-repeat, linear-gradient(var(--pass), var(--pass)) bottom right / 3px 16px no-repeat; }
.fx-reticle.lock { animation: fx-lock .45s ease-out; }
@keyframes fx-lock { 0% { transform: scale(1.8); opacity: .3; } 60% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1); } }

.fx-hud { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: -4px 0 12px; }
.fx-live-chip { align-self: center; padding: 3px 8px; border-radius: 4px; background: var(--fail); color: var(--fail-ink); font: 800 12px/1.2 var(--mono); letter-spacing: .08em; animation: pulse 1s steps(2) infinite; }
.fx-count { font: 800 44px/1 var(--mono); color: var(--pass); text-shadow: 0 0 18px rgb(184 240 90 / .5); }
.fx-count.pop { animation: fx-pop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes fx-pop { 0% { transform: scale(1.7); } 100% { transform: scale(1); } }
.fx-count-label { font: 700 13px var(--mono); color: var(--pass); text-transform: uppercase; letter-spacing: .06em; }
.fx-steps { font-size: 13px; color: var(--muted); }

.fx-slam { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; text-align: center; pointer-events: none; background: rgb(8 11 10 / .55); animation: fx-slam-bg 1.9s ease-out forwards; }
.fx-slam-main { font: 900 clamp(38px, 9vw, 96px)/1 var(--sans); letter-spacing: -.02em; color: var(--pass); text-shadow: 0 0 30px rgb(184 240 90 / .6), 4px 4px 0 #050706; animation: fx-slam-in .45s cubic-bezier(.2, 1.4, .4, 1); }
.fx-slam-sub { margin-top: 10px; font: 700 clamp(15px, 2.6vw, 24px)/1.3 var(--sans); color: var(--text); text-shadow: 0 2px 0 #050706; }
.fx-slam.red .fx-slam-main { color: var(--fail); text-shadow: 0 0 30px rgb(255 125 104 / .5), 4px 4px 0 #050706; }
.fx-slam.amber .fx-slam-main { color: var(--warn); text-shadow: 0 0 30px rgb(242 201 92 / .5), 4px 4px 0 #050706; }
@keyframes fx-slam-in { 0% { transform: scale(3.2) rotate(-6deg); opacity: 0; } 100% { transform: scale(1) rotate(-2deg); opacity: 1; } }
@keyframes fx-slam-bg { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.fx-flash { position: fixed; inset: 0; z-index: 29; pointer-events: none; animation: fx-flash .45s ease-out forwards; }
@keyframes fx-flash { from { opacity: 1; } to { opacity: 0; } }
.fx-shake { animation: fx-shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes fx-shake { 10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); } 30%, 50%, 70% { transform: translate(-7px, 3px); } 40%, 60% { transform: translate(7px, -3px); } }

.fx-stamp { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.fx-stamp span { padding: 10px 18px; border: 6px solid currentColor; border-radius: 10px; font: 900 clamp(26px, 9vw, 46px)/1 var(--sans); letter-spacing: .04em; transform: rotate(-14deg); background: rgb(5 7 6 / .55);
  mix-blend-mode: normal; animation: fx-stamp .5s cubic-bezier(.2, 1.5, .35, 1) both; box-shadow: 0 0 0 3px rgb(5 7 6 / .6); }
.fx-stamp.pass span { color: var(--pass); }
.fx-stamp.fail span { color: var(--fail); }
.fx-stamp.warn span { color: var(--warn); }
.fx-stamp.fade { transition: opacity 1s; opacity: 0; }
@keyframes fx-stamp { 0% { transform: rotate(-14deg) scale(3.4); opacity: 0; } 70% { transform: rotate(-14deg) scale(.92); opacity: 1; } 100% { transform: rotate(-14deg) scale(1); } }

.fx-toasts { position: fixed; left: var(--gutter); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 16; display: flex; flex-direction: column; gap: 6px; pointer-events: none; max-width: calc(100vw - 2 * var(--gutter)); }
.fx-toast { padding: 9px 14px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--pass); color: var(--text); font: 13px/1.3 var(--mono); box-shadow: 0 0 22px rgb(184 240 90 / .25); animation: fx-toast-in .35s cubic-bezier(.2, 1.4, .4, 1); }
.fx-toast b { color: var(--pass); }
.fx-more { color: var(--muted); }
.fx-toast.out { transition: opacity .4s, transform .4s; opacity: 0; transform: translateX(-20px); }
@keyframes fx-toast-in { from { transform: translateX(-30px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
body.stream .fx-toast { font-size: 18px; padding: 12px 18px; }
body.stream .fx-count { font-size: 64px; }
body.stream .fx-count-label, body.stream .fx-steps { font-size: 16px; }
@media (max-width: 719px) { .fx-count { font-size: 34px; } .sound-btn { padding: 0 10px; } .connection { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .fx-scan, .fx-rain { display: none; } }
