/* ==========================================================================
   BREAKBIT — styles
   Paper-white manual pages, ink type, orange / cobalt / lime accents and one
   dark arcade screen in the middle of it all.
   ========================================================================== */
:root {
  --paper: #f2efe6;
  --paper-2: #e8e4d8;
  --paper-3: #ddd8c9;
  --ink: #14193a;
  --ink-2: #2a3058;
  --ink-soft: #5b6080;
  --screen: #0b0e2a;
  --orange: #ff5a1f;
  --orange-d: #d94511;
  --cobalt: #2f4cff;
  --cobalt-d: #1f37d6;
  --lime: #c6f432;
  --lime-d: #a6d118;
  --steel: #8a90a8;
  --white: #fffdf7;

  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --pixel: 'Silkscreen', 'Courier New', monospace;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --bw: 3px;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --radius: 4px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--display);
  font-variation-settings: 'wdth' 100;
  overflow-x: hidden;
  /* printed dot texture */
  background-image: radial-gradient(rgba(20, 25, 58, 0.06) 1px, transparent 1.2px);
  background-size: 6px 6px;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
mark { background: none; color: inherit; }
::selection { background: var(--lime); color: var(--ink); }

:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.screen:focus-visible { outline: 4px solid var(--lime); outline-offset: 4px; }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; font: 700 13px var(--pixel); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- chips & buttons */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 700 11px/1 var(--pixel); letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 7px 4px; border: 2px solid var(--ink); border-radius: 3px; background: var(--white);
  white-space: nowrap;
}
.chip-ticker { background: var(--lime); }
.chip-net { background: var(--paper); }
.chip-ink { background: var(--ink); color: var(--paper); }
.chip-demo { background: #fff3c4; }
.chip-demo.is-live { background: var(--lime); }

.btn {
  --bg: var(--white); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 18px;
  font: 700 14px/1 var(--pixel); letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none;
  background: var(--bg); color: var(--fg);
  border: var(--bw) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer; user-select: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}
.btn svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled], .btn[aria-disabled='true'] { cursor: not-allowed; }
.btn[disabled]:hover, .btn[aria-disabled='true']:hover { transform: none; box-shadow: var(--shadow-sm); }
.btn-lg { min-height: 56px; padding: 0 24px; font-size: 16px; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 12px; box-shadow: 2px 2px 0 var(--ink); }
.btn-primary { --bg: var(--orange); --fg: var(--ink); }
.btn-primary:hover { --bg: #ff6d38; }
.btn-ghost { --bg: transparent; }
.btn-ghost:hover { --bg: var(--white); }
.btn-ink { --bg: var(--ink); --fg: var(--paper); }
.btn-lime { --bg: var(--lime); }
.btn-ghost-dark { --bg: transparent; --fg: var(--paper); border-color: var(--paper); box-shadow: 3px 3px 0 rgba(242, 239, 230, 0.35); }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--white);
  transition: background 0.15s ease, transform 0.08s ease;
}
.icon-btn svg { width: 17px; height: 17px; fill: var(--ink); }
.icon-btn:hover { background: var(--lime); }
.icon-btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; }
.icon-btn[aria-disabled='true']:hover { background: var(--white); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(242, 239, 230, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--bw) solid var(--ink);
}
.header-row { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 9px); grid-auto-rows: 7px; gap: 2px; }
.brand-mark i { background: var(--ink); }
.brand-mark i:nth-child(2) { background: var(--cobalt); }
.brand-mark i:nth-child(4) { background: var(--orange); }
.brand-mark i.o { background: transparent; outline: 2px dashed var(--orange); outline-offset: -2px; }
.brand-word { font: 900 26px/1 var(--display); font-variation-settings: 'wdth' 118; letter-spacing: -0.02em; }
.brand-word b { color: var(--orange); font-weight: 900; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a {
  font: 700 13px/1 var(--pixel); text-transform: uppercase; text-decoration: none; letter-spacing: 0.04em;
  padding: 10px 12px; border: 2px solid transparent; border-radius: var(--radius);
}
.nav > a:hover { border-color: var(--ink); background: var(--white); }
.nav-social { display: flex; gap: 8px; margin-left: 10px; padding-left: 14px; border-left: 2px solid var(--paper-3); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.btn-wallet { --bg: var(--ink); --fg: var(--paper); min-height: 44px; font-size: 13px; white-space: nowrap; }
.btn-wallet .dot { width: 9px; height: 9px; background: var(--steel); border-radius: 0; flex: none; }
.btn-wallet.is-connected { --bg: var(--lime); --fg: var(--ink); }
.btn-wallet.is-connected .dot { background: var(--ink); }
.btn-wallet.is-busy .dot { background: var(--orange); animation: blink 0.6s steps(2) infinite; }

.menu-btn {
  display: none; width: 46px; height: 46px; padding: 0; flex: none;
  border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--white);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.menu-btn i { width: 20px; height: 3px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s; }
.menu-btn[aria-expanded='true'] i:nth-of-type(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded='true'] i:nth-of-type(2) { opacity: 0; }
.menu-btn[aria-expanded='true'] i:nth-of-type(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; border-bottom: var(--bw) solid var(--ink); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--paper-3) 1px, transparent 1px), linear-gradient(90deg, var(--paper-3) 1px, transparent 1px);
  background-size: 48px 48px; opacity: 0.55;
  mask-image: linear-gradient(90deg, transparent, #000 55%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%);
}
.hero-grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
  padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(36px, 5vw, 64px);
}
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 22px; font: 700 12px/1.3 var(--pixel); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
.kicker-num { background: var(--ink); color: var(--lime); padding: 5px 8px 4px; }
.hero-title {
  margin: 0; font: 900 clamp(52px, min(8vw, 12.5vh), 112px)/0.86 var(--display);
  font-variation-settings: 'wdth' 125; letter-spacing: -0.035em; text-transform: uppercase;
}
.hero-title .line { display: block; }
.hero-title mark { position: relative; display: inline-block; padding: 0 0.06em; }
.hl-orange { color: var(--ink); background: var(--orange) !important; box-shadow: 0.08em 0.08em 0 var(--ink); }
.hl-cobalt { color: var(--paper); background: var(--cobalt) !important; box-shadow: 0.08em 0.08em 0 var(--ink); }
.hero-title .line:nth-child(2) { margin: 0.04em 0 0.1em; }
.lede { max-width: 54ch; margin: 28px 0 0; font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.cart {
  justify-self: center; width: min(100%, 380px);
  background: var(--ink); padding: 18px 18px 26px; border-radius: 10px 10px 4px 4px;
  box-shadow: var(--shadow); transform: rotate(2.2deg);
  position: relative;
}
.cart::before { content: ''; position: absolute; left: 50%; bottom: 8px; width: 46%; height: 6px; transform: translateX(-50%); background: repeating-linear-gradient(90deg, #3a4170 0 6px, transparent 6px 10px); }
.cart-label { background: var(--paper); border-radius: 4px; padding: 12px; display: grid; gap: 10px; }
.cart-top, .cart-foot { font: 700 12px/1 var(--pixel); letter-spacing: 0.08em; display: flex; justify-content: space-between; }
.cart-top { font-size: 18px; color: var(--ink); }
.cart-top::after { content: '$BREAKBIT'; font-size: 11px; background: var(--lime); padding: 3px 5px 2px; border: 2px solid var(--ink); }
.cart-foot { font-size: 10px; color: var(--ink-soft); }
.cart-art { position: relative; height: 170px; background: var(--screen); border: 3px solid var(--ink); overflow: hidden; }
.mini-bricks {
  position: absolute; inset: 14px 12px auto; height: 64px;
  display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: 12px; gap: 4px;
}
.mini-bricks::before { content: none; }
.mini-ball { position: absolute; width: 9px; height: 9px; background: #fff; left: 30%; top: 60%; animation: ballpath 3.4s linear infinite; }
.mini-paddle { position: absolute; bottom: 12px; width: 52px; height: 7px; background: var(--paper); box-shadow: inset 6px 0 0 var(--orange), inset -6px 0 0 var(--orange); left: 22%; animation: paddlepath 3.4s ease-in-out infinite; }
@keyframes ballpath {
  0% { left: 30%; top: 84%; } 25% { left: 64%; top: 45%; } 50% { left: 92%; top: 64%; }
  75% { left: 58%; top: 84%; } 100% { left: 30%; top: 84%; }
}
@keyframes paddlepath { 0%, 100% { left: 23%; } 50% { left: 52%; } }

.ca-panel {
  background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: grid; gap: 14px; min-width: 0;
}
.ca-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ca-label { font: 700 13px/1 var(--pixel); text-transform: uppercase; letter-spacing: 0.05em; }
.ca-row { display: flex; gap: 10px; align-items: stretch; }
.ca-value {
  flex: 1; min-width: 0; display: flex; align-items: center;
  font: 700 15px/1.2 var(--mono); padding: 10px 12px;
  background: var(--paper); border: 2px dashed var(--ink-soft); border-radius: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ca-value.is-full { white-space: normal; overflow: visible; word-break: break-all; font-size: 14px; line-height: 1.45; user-select: all; }
.ca-row.is-full { flex-direction: column; }
.ca-row.is-full .btn { align-self: stretch; }
.ca-value.is-soon { font-family: var(--pixel); letter-spacing: 0.04em; color: var(--ink-2); }
.btn-buy {
  --bg: var(--lime); min-height: 58px; font-size: 18px; justify-content: space-between; padding: 0 20px;
}
.btn-buy svg { width: 18px; height: 18px; }
.btn-buy[aria-disabled='true'] {
  --bg: var(--paper-2); --fg: var(--ink-soft); border-style: dashed; box-shadow: none;
  background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(20, 25, 58, 0.05) 10px 20px);
}
.btn-buy[aria-disabled='true']:hover { box-shadow: none; }
.ca-note { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }

.tape { border-top: var(--bw) solid var(--ink); background: var(--ink); color: var(--paper); overflow: hidden; }
.tape-track { display: flex; width: max-content; gap: 26px; padding: 13px 0; font: 700 14px/1 var(--pixel); text-transform: uppercase; letter-spacing: 0.05em; animation: tape 38s linear infinite; }
.tape-track span:nth-child(4n + 2) { color: var(--orange); }
.tape-track span:nth-child(4n) { color: var(--lime); }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- sections */
.play, .board, .about { padding: clamp(56px, 8vw, 110px) 0; }
.board { background: var(--paper-2); border-top: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); }
.section-head { display: grid; gap: 10px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-tag { margin: 0; font: 700 12px/1 var(--pixel); text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange-d); }
.section-tag::before { content: '▶ '; }
.section-title {
  margin: 0; font: 900 clamp(36px, 5.4vw, 72px)/0.92 var(--display); font-variation-settings: 'wdth' 120;
  letter-spacing: -0.03em; text-transform: uppercase; max-width: 18ch;
}
.section-title span { color: var(--cobalt); }
.card-title { margin: 0 0 14px; font: 700 15px/1 var(--pixel); text-transform: uppercase; letter-spacing: 0.06em; }
.small-print { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin: 14px 0 0; }

/* ---------------------------------------------------------------- cabinet */
.cabinet-grid { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.cabinet {
  background: var(--ink); border: var(--bw) solid var(--ink); border-radius: 14px 14px 6px 6px;
  box-shadow: 8px 8px 0 var(--orange), 8px 8px 0 var(--bw) var(--ink);
  padding: 14px; display: grid; gap: 12px;
  /* keep the whole screen inside the viewport while playing */
  width: min(100%, calc((100vh - 250px) * 0.8333 + 34px)); min-width: min(100%, 340px); justify-self: center;
}
.marquee-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--orange); border-radius: 6px; padding: 10px 14px;
  border: 2px solid #000;
}
.marquee-title { font: 900 22px/1 var(--display); font-variation-settings: 'wdth' 125; letter-spacing: -0.01em; color: var(--ink); }
.marquee-title b { color: var(--paper); font-weight: 900; }
.marquee-sub { font: 700 11px/1.1 var(--pixel); text-transform: uppercase; color: var(--ink); text-align: right; }
.hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
.hud > div { background: #1d2350; border: 2px solid #2d3470; border-radius: 4px; padding: 7px 10px 8px; min-width: 0; }
.hud dt { font: 700 10px/1 var(--pixel); text-transform: uppercase; color: #9aa2d4; letter-spacing: 0.06em; }
.hud dd { margin: 5px 0 0; font: 700 20px/1 var(--pixel); color: var(--paper); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud dd.lives { color: var(--orange); letter-spacing: 0.05em; }
.hud dd.bump { animation: bump 0.25s ease; }
@keyframes bump { 50% { transform: scale(1.12); color: var(--lime); } }

.screen {
  position: relative; aspect-ratio: 600 / 720; width: 100%;
  border: 3px solid #000; border-radius: 6px; overflow: hidden; background: var(--screen);
  box-shadow: inset 0 0 0 2px #262c5e;
}
.screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: default; image-rendering: pixelated; }
.screen canvas.is-live { touch-action: none; cursor: none; }
.scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55);
}
.overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center; color: var(--paper);
  background: rgba(11, 14, 42, 0.78);
}
.overlay[hidden] { display: none; }
.overlay[data-overlay='idle'] { background: linear-gradient(180deg, rgba(11, 14, 42, 0.35), rgba(11, 14, 42, 0.88) 60%); }
.ov-tag { margin: 0; font: 700 12px/1 var(--pixel); text-transform: uppercase; letter-spacing: 0.12em; color: var(--lime); }
.ov-title { margin: 0; font: 900 clamp(46px, 9vw, 80px)/0.9 var(--display); font-variation-settings: 'wdth' 125; letter-spacing: -0.03em; }
.ov-title span { color: var(--orange); }
.ov-title.small { font-size: clamp(24px, 4.6vw, 36px); max-width: 16ch; line-height: 1; }
.ov-hint { margin: 0; font: 400 12px/1.5 var(--pixel); color: #b9bfe4; max-width: 34ch; }
.ov-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; width: min(100%, 340px); }
.ov-stats > div { border: 2px solid #3a4180; border-radius: 4px; padding: 8px; }
.ov-stats dt { font: 700 10px/1 var(--pixel); color: #9aa2d4; text-transform: uppercase; }
.ov-stats dd { margin: 6px 0 0; font: 700 22px/1 var(--pixel); }
.ov-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.only-coarse { display: none; }
@media (pointer: coarse) { .only-coarse { display: inline; } .only-fine { display: none; } }

.controls-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ctl {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  background: #1d2350; color: var(--paper); border: 2px solid #2d3470; border-radius: 4px;
  font: 700 12px/1 var(--pixel); text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer;
}
.ctl svg { width: 13px; height: 13px; fill: currentColor; }
.ctl:hover:not([disabled]) { border-color: var(--lime); color: var(--lime); }
.ctl[disabled] { opacity: 0.45; cursor: not-allowed; }
.ctl[aria-pressed='true'] { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ctl[data-sound][aria-pressed='false'] .wave { opacity: 0.25; }

.manual-card { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 2.4vw, 28px); }
.manual-card .card-title:not(:first-child) { margin-top: 26px; padding-top: 22px; border-top: 2px dashed var(--paper-3); }
.keys, .powerups, .brick-key, .fine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.keys li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; }
.keys li span { color: var(--ink-soft); margin-left: auto; font-size: 14px; }
kbd { font: 700 11px/1 var(--pixel); padding: 5px 7px 4px; border: 2px solid var(--ink); border-bottom-width: 4px; border-radius: 4px; background: var(--paper); }
.powerups li { display: flex; gap: 12px; align-items: center; }
.powerups b { display: block; font-size: 15px; }
.powerups small { color: var(--ink-soft); font-size: 13px; }
.pill { flex: none; width: 42px; height: 26px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; font: 700 13px/1 var(--pixel); box-shadow: 2px 2px 0 var(--ink); }
.pill-lime { background: var(--lime); }
.pill-cobalt { background: var(--cobalt); color: var(--paper); }
.pill-orange { background: var(--orange); }
.pill-paper { background: var(--paper); }
.brick-key { grid-template-columns: 1fr 1fr; font-size: 14px; }
.brick-key li { display: flex; align-items: center; gap: 8px; }
.bk { width: 30px; height: 14px; border: 2px solid var(--ink); flex: none; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4); }
.bk-1 { background: var(--lime); } .bk-2 { background: var(--cobalt); } .bk-3 { background: var(--orange); } .bk-s { background: var(--steel); }

/* ---------------------------------------------------------------- leaderboard */
.board-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 40px); align-items: start; }
.board-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.board-meta .btn { margin-left: auto; }
.board-table { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-height: 180px; }
.board-table table { width: 100%; border-collapse: collapse; }
.board-table th { font: 700 11px/1 var(--pixel); text-transform: uppercase; letter-spacing: 0.06em; text-align: left; padding: 14px 16px; background: var(--ink); color: var(--paper); }
.board-table td { padding: 12px 16px; border-top: 2px solid var(--paper-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.board-table th.num, .board-table td.num { text-align: right; }
.board-table tr.is-you td { background: #f3ffd0; }
.board-table .rank { font: 700 15px/1 var(--pixel); width: 64px; }
.board-table tr:nth-child(1) .rank { color: var(--orange-d); }
.board-table .addr { font: 700 14px/1 var(--mono); }
.board-table .you { font: 700 10px/1 var(--pixel); background: var(--lime); border: 2px solid var(--ink); padding: 2px 4px 1px; margin-left: 8px; vertical-align: 2px; }
.board-table .score { font: 700 15px/1 var(--pixel); }
.lb-state { margin: 0; padding: 48px 20px; text-align: center; font: 700 13px/1.6 var(--pixel); text-transform: uppercase; color: var(--ink-soft); }
.lb-state.is-error { color: var(--orange-d); }
.lb-state .btn { margin-top: 14px; }

.submit-card { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 2.4vw, 26px); }
.submit-state { margin: 0; font-size: 15px; color: var(--ink-2); }
.submit-run { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; }
.submit-run > div { background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; padding: 8px 10px; }
.submit-run dt { font: 700 10px/1 var(--pixel); text-transform: uppercase; color: var(--ink-soft); }
.submit-run dd { margin: 6px 0 0; font: 700 20px/1 var(--pixel); }
.submit-who { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; font-size: 14px; }
.submit-who code { font: 700 14px/1 var(--mono); background: var(--paper); padding: 6px 8px; border-radius: 3px; border: 2px solid var(--paper-3); }
.submit-card .btn { width: 100%; }
.submit-card .btn + .btn { margin-top: 10px; }
.sign-explain { font-size: 13px; color: var(--ink-soft); background: var(--paper); border-left: 4px solid var(--cobalt); padding: 10px 12px; margin: 0 0 14px; }
.submit-msg { margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.submit-msg.ok { color: #3c6b00; }
.submit-msg.err { color: var(--orange-d); }

/* ---------------------------------------------------------------- about */
.steps { list-style: none; margin: 0 0 clamp(28px, 4vw, 44px); padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.step { padding: clamp(20px, 2.6vw, 30px); position: relative; }
.step + .step { border-left: var(--bw) solid var(--ink); }
.step-num { font: 900 54px/1 var(--display); font-variation-settings: 'wdth' 125; color: transparent; -webkit-text-stroke: 2px var(--ink); }
.step h3 { margin: 16px 0 6px; font: 900 24px/1.05 var(--display); font-variation-settings: 'wdth' 115; text-transform: uppercase; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--ink-2); }
.step-art { position: absolute; top: clamp(20px, 2.6vw, 30px); right: clamp(20px, 2.6vw, 30px); width: 78px; height: 50px; }
.art-paddle::before { content: ''; position: absolute; left: 30px; top: 6px; width: 12px; height: 12px; background: var(--ink); animation: hop 1.2s ease-in-out infinite; }
.art-paddle i { position: absolute; left: 10px; bottom: 6px; width: 54px; height: 10px; background: var(--orange); border: 2px solid var(--ink); }
@keyframes hop { 50% { transform: translateY(18px); } }
.art-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.art-board i { border: 2px solid var(--ink); background: var(--lime); }
.art-board i:nth-child(2), .art-board i:nth-child(6) { background: var(--cobalt); }
.art-board i:nth-child(4) { background: transparent; border-style: dashed; }
.art-wallet i { position: absolute; inset: 6px 8px; border: 3px solid var(--ink); background: var(--cobalt); border-radius: 4px; }
.art-wallet i::after { content: ''; position: absolute; right: -3px; top: 10px; width: 22px; height: 16px; background: var(--lime); border: 3px solid var(--ink); }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(20px, 3vw, 32px); }
.about-card { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--radius); padding: clamp(20px, 2.6vw, 30px); }
.about-card p { margin: 0 0 12px; color: var(--ink-2); }
.about-card p:last-child { margin-bottom: 0; }
.about-card-ink { background: var(--ink); color: var(--paper); }
.fine li { padding-left: 22px; position: relative; color: #d8dbef; }
.fine li::before { content: ''; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; background: var(--lime); }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: var(--paper); padding: clamp(44px, 6vw, 72px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: start; }
.brand-light .brand-mark i { background: var(--paper); }
.brand-light .brand-mark i:nth-child(2) { background: var(--cobalt); }
.brand-light .brand-mark i:nth-child(4) { background: var(--orange); }
.brand-light .brand-word { font-size: 34px; }
.footer-line { margin: 12px 0 0; font: 700 13px/1.4 var(--pixel); text-transform: uppercase; color: var(--lime); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-links a { font: 700 13px/1 var(--pixel); text-transform: uppercase; text-decoration: none; padding: 11px 14px; border: 2px solid #3a4180; border-radius: 4px; }
.footer-links a:hover { border-color: var(--lime); color: var(--lime); }
.footer-links a[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
.footer-links a[aria-disabled='true']::after { content: ' · soon'; color: #9aa2d4; }
.footer-links a[aria-disabled='true']:hover { border-color: #3a4180; color: inherit; }
.disclaimer { grid-column: 1 / -1; margin: 0; padding-top: 24px; border-top: 2px dashed #3a4180; font-size: 13px; color: #b9bfe4; max-width: 90ch; }
.copyright { grid-column: 1 / -1; margin: 0; font: 400 11px/1 var(--pixel); color: #7d84b5; text-transform: uppercase; }

/* ---------------------------------------------------------------- dialog & toasts */
.dialog { border: var(--bw) solid var(--ink); border-radius: 6px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.dialog::backdrop { background: rgba(20, 25, 58, 0.55); }
.dialog-inner { padding: 22px; display: grid; gap: 14px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0; font: 900 26px/1 var(--display); font-variation-settings: 'wdth' 118; text-transform: uppercase; }
.dialog-x { width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 4px; background: var(--white); cursor: pointer; font-size: 16px; }
.dialog-copy { margin: 0; font-size: 14px; color: var(--ink-2); }
.wallet-list { display: grid; gap: 10px; }
.wallet-opt { justify-content: flex-start; width: 100%; min-height: 54px; }
.wallet-opt img { width: 26px; height: 26px; border-radius: 6px; }
.wallet-opt .tag { margin-left: auto; font-size: 10px; color: var(--ink-soft); }
.wallet-empty { background: var(--white); border: 2px dashed var(--ink-soft); border-radius: 4px; padding: 14px; font-size: 14px; }
.wallet-empty p { margin: 0 0 10px; }
.wallet-empty .row { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-err { margin: 0; color: var(--orange-d); font-weight: 700; font-size: 14px; }

.toasts { position: fixed; z-index: 90; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 4px 4px 0 var(--orange); padding: 12px 14px; font: 700 13px/1.35 var(--pixel); text-transform: uppercase; letter-spacing: 0.02em; animation: toast-in 0.2s ease-out; }
.toast.ok { box-shadow: 4px 4px 0 var(--lime); }
.toast.err { background: var(--orange); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.toast.out { opacity: 0; transform: translateY(8px); transition: 0.25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1020px) {
  .cabinet-grid { grid-template-columns: 1fr; justify-items: center; }
  .cabinet { max-width: 620px; }
  .manual-card { width: 100%; max-width: 620px; }
  .board-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: var(--bw) solid var(--ink);
    padding: 8px var(--gutter) 18px; margin: 0;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav > a { font-size: 16px; padding: 16px 4px; border: 0; border-bottom: 2px dashed var(--paper-3); border-radius: 0; }
  .nav > a:hover { background: none; color: var(--orange-d); }
  .nav-social { margin: 16px 0 0; padding: 0; border: 0; }
  .header-actions { margin-left: auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
  .hero-title { font-size: clamp(44px, 10.5vw, 84px); }
  .hero-title .line { display: inline; }
  .hero-title .line:nth-child(2) { margin: 0; }
  .hero-title .line:nth-child(2)::after { content: ' '; display: block; height: 0.08em; }
  .lede { margin-top: 20px; }
  .hero-ctas { margin-top: 22px; }
  .cart { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: var(--bw) solid var(--ink); }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .brand .chip-ticker { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-row { gap: 10px; min-height: 62px; }
  .brand-word { font-size: 22px; }
  .brand .chip-ticker { display: none; }
  .btn-wallet { min-height: 44px; padding: 0 12px; font-size: 11px; gap: 8px; }
  .btn-wallet .wl-extra { display: none; }
  .hero-title { font-size: clamp(40px, 12.4vw, 64px); }
  .kicker { margin-bottom: 16px; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .cabinet { padding: 10px; border-radius: 10px 10px 4px 4px; box-shadow: 5px 5px 0 var(--orange); }
  .hud > div { padding: 6px 7px 7px; }
  .hud dd { font-size: 16px; }
  .hud dt { font-size: 9px; }
  .marquee-title { font-size: 18px; }
  .controls-bar .ctl { font-size: 10px; gap: 6px; }
  .board-table th, .board-table td { padding: 11px 10px; }
  .board-table .col-level { display: none; }
  .board-table .rank { width: 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .brick-key { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .btn-wallet [data-wallet-label] { font-size: 10px; }
  .ca-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .tape-track { animation: none; flex-wrap: wrap; width: auto; padding-left: var(--gutter); }
  .tape-track span:nth-child(n + 9) { display: none; }
}
