/* =====================================================================
   Hushkit · drafting-table look: paper, rulers, selection handles, one violet.
   ===================================================================== */

:root {
  --paper: #f4f2ed;
  --paper-2: #ece9e2;
  --card: #fffefb;
  --ink: #121212;
  --ink-2: #3b3a37;
  --ink-3: #77756e;
  --ink-4: #a9a69e;
  --line: #d8d4ca;
  --line-2: #e6e3db;
  --accent: #5b3df5;
  --accent-ink: #4024d6;
  --accent-soft: #ebe6ff;
  --accent-2: #a796ff;
  --good: #109c66;
  --bad: #dd3f48;
  --mark-ink: #fff;

  --f-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --ruler: 22px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 12px 30px -12px rgba(30, 20, 80, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }
.mono { font-family: var(--f-mono); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { left: 30px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- rulers + grid */

.rulers { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.ruler { position: absolute; background: rgba(244, 242, 237, .92); backdrop-filter: blur(6px); }
.ruler-x { top: 0; left: var(--ruler); right: 0; height: var(--ruler); width: calc(100% - var(--ruler)); border-bottom: 1px solid var(--line); }
.ruler-y { top: var(--ruler); left: 0; bottom: 0; width: var(--ruler); height: calc(100% - var(--ruler)); border-right: 1px solid var(--line); }
.ruler-corner {
  position: absolute; top: 0; left: 0; width: var(--ruler); height: var(--ruler);
  background: var(--paper); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; place-items: center;
}
.ruler-corner svg { width: 11px; height: 11px; fill: none; stroke: var(--accent); stroke-width: 1.3; animation: spin 12s linear infinite; }

.paper-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(18,18,18,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18,18,18,.035) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 40%, transparent 100%);
  animation: grid-in 1.6s var(--ease-out) both;
}

body { padding-left: var(--ruler); padding-top: var(--ruler); }

/* ---------------------------------------------------------------- top bar + banner */

.banner {
  position: relative; z-index: 5;
  background: var(--ink); color: #fff; text-align: center;
  font: 500 13px/1.4 var(--f-mono); padding: 9px 16px; letter-spacing: .01em;
}
.banner::before { content: "●"; color: var(--accent-2); margin-right: 8px; animation: blink 1.4s steps(2) infinite; }

.topbar {
  max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 0;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 19px/1 var(--f-display); letter-spacing: -.01em; }
.mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.brand:hover .mark { animation: wiggle .5s var(--ease); }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 7px 11px; border-radius: 999px; transition: background .2s, color .2s; }
.topnav a:hover { background: var(--paper-2); color: var(--ink); }
.top-x {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  background: var(--ink); color: #fff; padding: 8px 14px 8px 11px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: transform .25s var(--spring), background .2s;
}
.top-x svg { width: 15px; height: 15px; }
.top-x:hover { transform: translateY(-2px); background: var(--accent); }

/* ---------------------------------------------------------------- buttons */

.btn {
  --bg: var(--card); --fg: var(--ink);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 22px; border: 1.5px solid var(--ink); border-radius: 2px;
  background: var(--bg); color: var(--fg); text-decoration: none;
  font: 700 15px/1 var(--f-display); letter-spacing: .005em;
  transition: transform .25s var(--spring), box-shadow .25s var(--ease), background .2s;
  box-shadow: 0 0 0 var(--ink);
  isolation: isolate; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translate(0, 0); box-shadow: 0 0 0 var(--ink); }
.btn-primary { --bg: var(--accent); --fg: #fff; border-color: var(--accent-ink); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn.icon { width: 48px; padding: 0; }
.btn.icon:hover svg { transform: none; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------------------------------------------------------------- hero */

main { overflow-x: clip; }
.hero {
  position: relative;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) var(--gutter) 56px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  min-height: min(820px, calc(100svh - 70px));
}
.hero-copy { position: relative; z-index: 2; }
.hero > * { min-width: 0; }
.built { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 26px; flex-wrap: wrap; }
.built b { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font: 700 15px/1 var(--f-display); }
.built b svg { width: 16px; height: 16px; color: var(--ink); }
.built-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(16,156,102,.5); animation: ping 2s infinite; }
.built-status { font: 500 12px/1 var(--f-mono); color: var(--ink-3); }

.h1 {
  font: 800 clamp(40px, 5.1vw, 76px)/.96 var(--f-display);
  letter-spacing: -.028em; margin: 0 0 26px; position: relative;
}
.h1 .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.h1 .word { display: inline-block; transform: translateY(105%) rotate(4deg); transform-origin: 0 100%; transition: transform .9s var(--ease-out); }
.h1 .accent { color: var(--accent); position: relative; }
.h1 .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .09em; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease-out) 1.25s;
}
body.is-ready .h1 .word { transform: none; }
body.is-ready .h1 .accent::after { transform: scaleX(1); }
.h1 .line:nth-child(1) .word:nth-child(1) { transition-delay: .10s; }
.h1 .line:nth-child(1) .word:nth-child(2) { transition-delay: .17s; }
.h1 .line:nth-child(1) .word:nth-child(3) { transition-delay: .24s; }
.h1 .line:nth-child(2) .word:nth-child(1) { transition-delay: .36s; }
.h1 .line:nth-child(2) .word:nth-child(2) { transition-delay: .43s; }
.h1 .line:nth-child(2) .word:nth-child(3) { transition-delay: .50s; }
.h1 .line:nth-child(2) .word:nth-child(4) { transition-delay: .57s; }
.h1 .line:nth-child(2) .word:nth-child(5) { transition-delay: .64s; }

.lede { font-size: clamp(16px, 1.35vw, 18.5px); color: var(--ink-2); max-width: 34em; margin: 0 0 30px; line-height: 1.6; }
.lede b { color: var(--ink); font-weight: 600; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }

/* CA box */
.ca-box {
  display: inline-flex; align-items: stretch; max-width: 100%;
  border: 1.5px solid var(--ink); background: var(--card); height: 48px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.ca-box:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--accent); }
.ca-box > * { border-right: 1px solid var(--line); }
.ca-box > *:last-child { border-right: 0; }
.ca-tick { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; font: 800 15px/1 var(--f-display); white-space: nowrap; }
.ca-tick .mark { width: 20px; height: 20px; }
.ca-addr {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 0 14px;
  background: none; border: 0; border-right: 1px solid var(--line); text-align: left;
}
.ca-addr code { font: 500 13.5px/1 var(--f-mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-label { font: 600 10px/1 var(--f-mono); letter-spacing: .08em; color: #fff; background: var(--ink); padding: 3px 5px; border-radius: 2px; }
.ca-box.has-ca .ca-label { background: var(--accent); }
.ca-box:not(.has-ca) .ca-addr { cursor: default; }
.ca-box:not(.has-ca) .ca-addr code { color: var(--ink-3); font-style: italic; }
.ca-box:not(.has-ca) .ca-addr code::after { content: "▍"; color: var(--accent); margin-left: 2px; animation: blink 1s steps(2) infinite; font-style: normal; }
.ca-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; background: none; border: 0; border-right: 1px solid var(--line);
  font: 600 13.5px/1 var(--f-mono); text-decoration: none; color: var(--ink); white-space: nowrap; transition: background .2s, color .2s;
}
.ca-btn svg { width: 14px; height: 14px; }
.ca-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.ca-btn[disabled], .ca-btn[aria-disabled="true"] { color: var(--ink-4); pointer-events: none; }
.ca-buy { background: var(--ink); color: #fff; }
.ca-buy:hover { background: var(--accent); color: #fff; }
.ca-buy[aria-disabled="true"] { background: var(--paper-2); color: var(--ink-4); }
.ca-box.copied { animation: pop .45s var(--spring); }

.token-stats { display: flex; gap: 18px; margin-top: 14px; font-size: 13px; flex-wrap: wrap; }
.token-stats span { display: inline-flex; gap: 6px; align-items: baseline; }
.token-stats i { font: 500 11px/1 var(--f-mono); color: var(--ink-3); font-style: normal; text-transform: uppercase; letter-spacing: .06em; }
.token-stats b { font: 600 14px/1 var(--f-mono); }
.up { color: var(--good) !important; }
.down { color: var(--bad) !important; }

/* X card */
.x-card {
  margin-top: 22px; display: flex; align-items: center; gap: 14px; max-width: 420px;
  text-decoration: none; padding: 10px 14px 10px 10px; border: 1.5px dashed var(--ink-4); background: rgba(255,255,255,.5);
  transition: border-color .25s, background .25s, transform .3s var(--spring);
}
.x-card:hover { border-style: solid; border-color: var(--ink); background: var(--card); transform: translateY(-2px); }
.x-logo { width: 40px; height: 40px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; transition: background .25s, transform .4s var(--spring); }
.x-logo svg { width: 19px; height: 19px; }
.x-card:hover .x-logo { background: var(--accent); transform: rotate(-8deg) scale(1.05); }
.x-text { display: flex; flex-direction: column; min-width: 0; }
.x-text b { font: 700 15.5px/1.2 var(--f-display); }
.x-text small { font: 500 12.5px/1.4 var(--f-mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-arrow { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); transition: transform .3s var(--ease), background .2s; }
.x-arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.x-card:hover .x-arrow { transform: rotate(45deg); background: var(--ink); color: #fff; }

/* selection box that wanders around the hero */
.selbox {
  position: absolute; z-index: 3; pointer-events: none; top: 0; left: 0; width: 0; height: 0;
  border: 1.2px solid var(--accent);
  opacity: 0;
  transition: transform .85s var(--ease-out), width .85s var(--ease-out), height .85s var(--ease-out), opacity .4s;
}
.selbox.on { opacity: 1; }
.selbox .h { position: absolute; width: 8px; height: 8px; background: var(--card); border: 1.2px solid var(--accent); }
.selbox .tl { left: -4.5px; top: -4.5px; } .selbox .tc { left: calc(50% - 4px); top: -4.5px; } .selbox .tr { right: -4.5px; top: -4.5px; }
.selbox .ml { left: -4.5px; top: calc(50% - 4px); } .selbox .mr { right: -4.5px; top: calc(50% - 4px); }
.selbox .bl { left: -4.5px; bottom: -4.5px; } .selbox .bc { left: calc(50% - 4px); bottom: -4.5px; } .selbox .br { right: -4.5px; bottom: -4.5px; }
.selbox .rot { position: absolute; left: calc(50% - 5px); top: -30px; width: 10px; height: 10px; border-radius: 50%; border: 1.2px solid var(--accent); background: var(--card); }
.selbox .rot::after { content: ""; position: absolute; left: 3.6px; top: 9px; width: 1.2px; height: 17px; background: var(--accent); }
.selbox .dim { position: absolute; right: 0; top: -24px; font: 500 11px/1 var(--f-mono); color: var(--ink-2); white-space: nowrap; }
.selbox .sel-name { position: absolute; left: -1px; bottom: -22px; font: 600 10.5px/1 var(--f-mono); color: #fff; background: var(--accent); padding: 4px 6px; white-space: nowrap; }
.fake-cursor {
  position: absolute; z-index: 4; top: 0; left: 0; pointer-events: none; opacity: 0;
  transition: transform 1s var(--ease-out), opacity .4s;
}
.fake-cursor.on { opacity: 1; }
.fake-cursor svg { width: 20px; height: 20px; fill: var(--ink); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.fake-cursor span { position: absolute; left: 16px; top: 18px; font: 600 11px/1 var(--f-mono); background: var(--ink); color: #fff; padding: 4px 7px; border-radius: 0 6px 6px 6px; white-space: nowrap; }
.fake-cursor.click svg { animation: click .35s var(--ease); }

/* hero art: exploded stack */
.hero-art { margin: 0; position: relative; z-index: 1; }
.stack { width: 100%; height: auto; overflow: visible; }
.stack .axis { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 14 4 2 4; opacity: .55; stroke-dashoffset: 0; animation: dash 6s linear infinite; }
.stack .plate { transition: transform 1.2s var(--ease-out), opacity .8s; opacity: 0; transform: translateY(var(--c, 0px)); }
.stack.in .plate { opacity: 1; transform: none; }
.stack .plate-float { animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.7s); }
.stack .face-top { fill: var(--card); stroke: var(--ink); stroke-width: 1.3; }
.stack .face-l { fill: #e7e3da; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.stack .face-r { fill: #d9d4c8; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.stack .plate.accent .face-top { fill: var(--accent-soft); }
.stack .plate.accent .face-l { fill: #cfc5ff; }
.stack .plate.accent .face-r { fill: #b9abff; }
.stack .plate.ghost .face-top { fill: rgba(255,255,255,.6); stroke-dasharray: 5 4; }
.stack .plate.ghost .face-l, .stack .plate.ghost .face-r { fill: rgba(230,227,219,.5); stroke-dasharray: 5 4; }
.stack .glyph { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.stack .plate.accent .glyph { stroke: var(--accent-ink); }
.stack .lead { stroke: var(--ink-3); stroke-width: 1; fill: none; stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset 1.1s var(--ease-out); }
.stack.in .lead { stroke-dashoffset: 0; }
.stack .tag circle { fill: var(--card); stroke: var(--accent); stroke-width: 1.3; }
.stack .tag text.n { font: 600 13px var(--f-mono); fill: var(--accent); text-anchor: middle; dominant-baseline: central; }
.stack .tag text.t { font: 700 15px var(--f-display); fill: var(--ink); }
.stack .tag text.d { font: 400 12.5px var(--f-body); fill: var(--ink-3); }
.stack .tag { opacity: 0; transition: opacity .6s, transform .6s var(--ease-out); }
.stack.in .tag { opacity: 1; }
.stack .bracket { fill: none; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.stack .bracket-t { font: 500 11.5px var(--f-mono); fill: var(--ink-3); }
.stack .packet { fill: var(--accent); filter: drop-shadow(0 0 6px rgba(91,61,245,.8)); }
.stack .packet-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; }
.stack .tag.hot circle { fill: var(--accent); }
.stack .tag.hot text.n { fill: #fff; }
.stack .plate.hot .face-top { fill: #fff; stroke: var(--accent); stroke-width: 2; }

/* ---------------------------------------------------------------- tape */

.tape {
  border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  overflow: hidden; position: relative; background: rgba(255,255,255,.4);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.tape-track { display: flex; width: max-content; gap: 0; animation: tape 70s linear infinite; padding: 11px 0; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; white-space: nowrap; text-decoration: none; font: 500 13px/1 var(--f-mono); border-right: 1px solid var(--line-2); }
.tape-item img { width: 20px; height: 20px; border-radius: 50%; background: var(--paper-2); object-fit: cover; }
.tape-item b { font-weight: 600; }
.tape-item:hover b { color: var(--accent); }
.tape-empty { padding: 0 24px; font: 500 13px var(--f-mono); color: var(--ink-3); }

/* ---------------------------------------------------------------- sections */

.sec { max-width: var(--wrap); margin: 0 auto; padding: clamp(72px, 10vw, 130px) var(--gutter) 0; position: relative; }
.sec::before {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: clamp(30px, 4.5vw, 56px); height: 9px;
  background:
    linear-gradient(var(--line), var(--line)) 0 4px / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--ink-4) 0 1px, transparent 1px 48px) 0 0 / 100% 9px no-repeat;
  opacity: .7; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-out);
}
.sec.seen::before { transform: scaleX(1); }
.sec-head { margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head.with-side { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.sec-head.with-side > div { max-width: 640px; }
.badge {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1.3px solid var(--accent); color: var(--accent); font: 600 13px/1 var(--f-mono); margin-right: 10px; vertical-align: middle;
  position: relative;
}
.sec.seen .sec-head .badge { animation: badge-in .8s var(--spring) both; }
.badge.sm { width: 22px; height: 22px; font-size: 11px; margin: 0; }
.kicker { font: 500 14px/1 var(--f-body); color: var(--ink-3); vertical-align: middle; }
.sec h2 { font: 800 clamp(34px, 4.6vw, 60px)/1.02 var(--f-display); letter-spacing: -.025em; margin: 20px 0 0; color: var(--ink); text-wrap: balance; }
.sub { color: var(--ink-3); font-size: 17px; max-width: 36em; margin: 18px 0 0; }
.sub.side { max-width: 400px; margin: 0; }

/* reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- film */

.film-frame {
  position: relative; aspect-ratio: 16 / 9; border: 1.5px solid var(--ink); background: var(--card); overflow: hidden;
  background-image:
    linear-gradient(to right, rgba(91,61,245,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(91,61,245,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.film-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; color: var(--ink-3); font-size: 14px; flex-wrap: wrap; }
.film-poster { position: absolute; inset: 0; transition: opacity .6s, transform .8s var(--ease-out); }
.film-frame.playing .film-poster { opacity: 0; transform: scale(1.08); }
.dial { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial-ticks { transform-origin: 400px 225px; animation: spin 80s linear infinite; }
.dial-ticks line { stroke: var(--ink-4); stroke-width: 1; }
.dial-ticks line.major { stroke: var(--ink-3); }
.dial-ticks text { font: 500 11px var(--f-mono); fill: var(--ink-4); text-anchor: middle; dominant-baseline: central; }
.dial-ring { fill: none; stroke: var(--accent); stroke-width: 26; opacity: .14; }
.dial-ring2 { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 7; opacity: .5; }
.dial-arrows { transform-origin: 400px 225px; animation: spin 24s linear infinite reverse; }
.dial-arrows path { fill: var(--accent); opacity: .55; }
.poster-word {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px; font: 800 clamp(24px, 4vw, 44px)/1 var(--f-display); letter-spacing: -.02em;
}
.poster-word .mark { width: 1.05em; height: 1.05em; }
.film-play {
  position: absolute; left: 22px; bottom: 22px; z-index: 5;
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 14px;
  background: var(--card); border: 1.5px solid var(--ink); font: 700 15px/1 var(--f-display);
  transition: transform .25s var(--spring), box-shadow .25s, opacity .3s;
}
.film-play svg { width: 18px; height: 18px; fill: var(--accent); }
.film-play:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.film-frame.playing .film-play { opacity: 0; pointer-events: none; }
.film-frame.ended .film-play { opacity: 1; pointer-events: auto; }
.film-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.06); }
.film-bar i { display: block; height: 100%; width: 0; background: var(--accent); }

.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s, visibility 0s .6s; }
.scene.on { opacity: 1; visibility: visible; transition: opacity .6s, visibility 0s; }
.s-cap {
  position: absolute; left: 0; right: 0; bottom: 12%; margin: 0; text-align: center;
  font: 800 clamp(20px, 3.4vw, 40px)/1.1 var(--f-display); letter-spacing: -.02em;
  opacity: 0; transform: translateY(14px); transition: opacity .7s .5s, transform .7s .5s var(--ease-out);
}
.s-cap em { font-style: normal; color: var(--accent); }
.scene.on .s-cap { opacity: 1; transform: none; }

/* scene 1: pay once */
.s1 .s-node {
  position: absolute; top: 30%; width: 22%; aspect-ratio: 1.5; border: 1.5px solid var(--ink); background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: clamp(10px, 1.3vw, 14px);
  transform: translateY(20px); opacity: 0; transition: transform .7s var(--ease-out), opacity .6s;
}
.s1 .s-node small { color: var(--ink-3); font-family: var(--f-mono); }
.s1 .s-node code { font: 600 1.1em var(--f-mono); }
.s1 .s-node .mark { width: 34%; height: auto; }
.s1 .you { left: 14%; }
.s1 .hub { right: 14%; border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); transition-delay: .2s; }
.s1.on .s-node { transform: none; opacity: 1; }
.s1 .s-wire { position: absolute; left: 36%; right: 36%; top: calc(30% + 7.3%); height: 2px; background: repeating-linear-gradient(90deg, var(--ink-4) 0 6px, transparent 6px 11px); }
.s1 .s-coin { position: absolute; left: 0; top: -9px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); opacity: 0; }
.s1.on .s-coin { animation: coin-fly 1.6s 1.1s var(--ease) 2 both; }

/* scene 2: spokes */
.s2 .s-hub { position: absolute; left: 50%; top: 42%; width: 12%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.4); transition: transform .8s var(--spring); }
.s2 .s-hub .mark { width: 100%; height: 100%; }
.s2.on .s-hub { transform: translate(-50%, -50%) scale(1); }
.s2 .s-spokes { position: absolute; inset: 0; }
.spoke { position: absolute; left: 50%; top: 42%; width: 0; height: 0; }
.spoke i { position: absolute; left: 0; top: 0; height: 1.5px; background: var(--accent); transform-origin: 0 50%; transform: rotate(var(--a)) scaleX(0); width: var(--r); transition: transform .7s var(--ease-out); transition-delay: calc(.5s + var(--k) * .18s); opacity: .5; }
.spoke b {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) translate(calc(cos(var(--a)) * var(--r)), calc(sin(var(--a)) * var(--r))) scale(0);
  font: 600 clamp(9px, 1.1vw, 12px)/1 var(--f-mono); background: var(--card); border: 1.3px solid var(--ink); padding: 6px 8px; white-space: nowrap;
  transition: transform .6s var(--spring); transition-delay: calc(.8s + var(--k) * .18s);
}
.s2.on .spoke i { transform: rotate(var(--a)) scaleX(1); }
.s2.on .spoke b { transform: translate(-50%, -50%) translate(calc(cos(var(--a)) * var(--r)), calc(sin(var(--a)) * var(--r))) scale(1); }

/* scene 3: orbit */
.s3 .s-orbit { position: absolute; left: 50%; top: 40%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.s3 .s-orbit .orb { position: absolute; left: 50%; top: 50%; width: 11%; aspect-ratio: 1; margin: -5.5% 0 0 -5.5%; border-radius: 50%; border: 1.3px solid var(--ink); background: var(--card); display: grid; place-items: center; transform: rotate(var(--a)) translateY(-210%) rotate(calc(-1 * var(--a))); }
.s3.on .s-orbit { animation: spin 14s linear infinite; }
.s3.on .s-orbit .orb { animation: counter 14s linear infinite; }
.s3 .s-orbit .orb svg { width: 56%; height: 56%; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.s3 .s-orbit .orb.lit { background: var(--accent); border-color: var(--accent); }
.s3 .s-orbit .orb.lit svg { stroke: #fff; }
.s3 .s-words { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); height: 1.1em; overflow: hidden; font: 800 clamp(18px, 3vw, 34px)/1.1 var(--f-display); text-align: center; }
.s3 .s-words span { display: block; transform: translateY(var(--y, 0)); transition: transform .5s var(--ease-out); }

/* scene 4: ledger */
.s4 .s-ledger { position: absolute; left: 50%; top: 10%; width: 54%; transform: translateX(-50%); border: 1.5px solid var(--ink); background: var(--card); font: 500 clamp(9px, 1.2vw, 13px)/1 var(--f-mono); }
.s4 .s-ledger .lr { display: flex; justify-content: space-between; padding: .9em 1em; border-bottom: 1px solid var(--line-2); opacity: 0; transform: translateX(-14px); transition: opacity .4s, transform .5s var(--ease-out); transition-delay: calc(var(--k) * .22s + .3s); }
.s4 .s-ledger .lr:last-child { border-bottom: 0; }
.s4 .s-ledger .lr.head { color: var(--ink-3); font-size: .85em; }
.s4 .s-ledger .lr.you { color: var(--ink-4); text-decoration: line-through; text-decoration-color: var(--bad); }
.s4.on .s-ledger .lr { opacity: 1; transform: none; }
.s4 .s-lens { position: absolute; left: 22%; top: 16%; width: 13%; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--accent); background: rgba(91,61,245,.06); box-shadow: 0 0 0 999px rgba(244,242,237,0); opacity: 0; }
.s4 .s-lens::after { content: ""; position: absolute; right: -24%; bottom: -24%; width: 36%; height: 7px; background: var(--accent); transform: rotate(45deg); border-radius: 4px; }
.s4.on .s-lens { animation: lens 5s 1.2s var(--ease) both; }

/* scene 5: end card */
.s5 .s-end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--ink); color: #fff; --mark-ink: var(--ink); }
.s5 .s-end .mark { width: clamp(44px, 8vw, 90px); height: auto; color: var(--accent); transform: scale(0) rotate(-40deg); transition: transform .9s var(--spring) .2s; }
.s5 .s-end b { font: 800 clamp(34px, 7vw, 86px)/1 var(--f-display); letter-spacing: -.03em; clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease-out) .5s; }
.s5 .s-end span { font: 500 clamp(11px, 1.5vw, 16px)/1 var(--f-mono); color: var(--accent-2); opacity: 0; transition: opacity .8s 1.3s; }
.s5.on .s-end .mark { transform: none; }
.s5.on .s-end b { clip-path: inset(0 0 0 0); }
.s5.on .s-end span { opacity: 1; }

/* ---------------------------------------------------------------- ring */

.seg { display: inline-flex; border: 1.3px solid var(--ink); background: var(--card); }
.seg button { border: 0; background: none; padding: 9px 18px; font: 600 14px/1 var(--f-body); color: var(--ink-3); transition: background .2s, color .2s; }
.seg button.on { background: var(--ink); color: #fff; }
.seg.small button { padding: 0 16px; height: 42px; flex: 1; }

.ring-stage { position: relative; max-width: 800px; margin: 0 auto; }
.ring { width: 100%; height: auto; overflow: visible; }
.ring .track { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.ring .track-thin { fill: none; stroke: var(--ink-4); stroke-width: 1; }
.ring .band { fill: none; stroke: var(--accent); stroke-width: 34; opacity: .9; }
.ring .band-shadow { fill: none; stroke: var(--accent-ink); stroke-width: 34; opacity: .25; transform: translate(0, 5px); }
.ring .tick { stroke: var(--ink-3); stroke-width: 1; }
.ring .cat-arc { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.ring .cat-label { font: 500 14px var(--f-body); fill: var(--ink-3); }
.ring .rotor { transition: transform 1s var(--ease-out); transform-origin: 400px 400px; }
.ring .pocket { cursor: pointer; }
.ring .pocket .pk-in { transform-box: fill-box; transform-origin: center; transition: transform .7s var(--ease-out); }
.ring .pocket circle.pk { fill: var(--card); stroke: var(--ink); stroke-width: 1.4; transition: fill .25s, stroke .25s, r .3s var(--spring); }
.ring .pocket .pk-icon { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s; pointer-events: none; }
.ring .pocket:hover circle.pk { fill: var(--accent-soft); stroke: var(--accent); }
.ring .pocket.on circle.pk { fill: var(--ink); stroke: var(--ink); }
.ring .pocket.on .pk-icon { stroke: #fff; }
.ring .pocket .drop-in { opacity: 0; transform: translateY(-16px); transition: opacity .5s, transform .6s var(--spring); transition-delay: calc(var(--k) * 35ms); }
.ring.in .pocket .drop-in { opacity: 1; transform: none; }
.ring .pointer { fill: var(--accent); }
.ring .pointer-line { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 3 3; }
.ring .dim-line { stroke: var(--accent); stroke-width: 1; }
.ring .scan { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 60 2000; opacity: .7; transform-origin: 400px 400px; animation: spin 9s linear infinite; }

.ring-center {
  position: absolute; left: 50%; top: 50%; width: 47%; transform: translate(-50%, -50%);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.ring-center > * { transition: opacity .35s, transform .45s var(--ease-out); }
.ring-center.swap > * { opacity: 0; transform: translateY(8px); }
.rc-code { font-size: 12.5px; color: var(--ink-3); }
.rc-icon { width: 58px; height: 58px; margin: 12px 0 6px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1.4px solid var(--ink); }
.rc-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ring-center h3 { font: 800 clamp(24px, 3vw, 34px)/1.05 var(--f-display); margin: 6px 0 8px; letter-spacing: -.02em; }
.ring-center p { margin: 0 0 14px; color: var(--ink-2); font-size: clamp(13px, 1.4vw, 15.5px); max-width: 30em; }
.rc-venues { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); background: var(--card); font: 500 12.5px/1 var(--f-mono); border-radius: 999px; }
.chip img { width: 15px; height: 15px; border-radius: 50%; }
.rc-actions { display: flex; gap: 8px; }
.ring-caption { display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--ink-3); font-size: 12.5px; margin: 8px 0 0; }
.ring-caption .dimline { flex: 1; max-width: 300px; height: 9px; background: linear-gradient(var(--ink-4), var(--ink-4)) center / 100% 1px no-repeat; position: relative; }
.ring-caption .dimline::before, .ring-caption .dimline::after { content: ""; position: absolute; top: 0; width: 1px; height: 9px; background: var(--ink-4); }
.ring-caption .dimline:first-child::before { left: 0; }
.ring-caption .dimline:last-child::after { right: 0; }

.tool-list { display: none; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.ring-wrap[data-view="list"] .ring-stage, .ring-wrap[data-view="list"] .ring-caption { display: none; }
.ring-wrap[data-view="list"] .tool-list { display: grid; animation: fade-up .5s var(--ease-out); }
.tl-item { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; padding: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); text-align: left; border-top: 0; border-left: 0; transition: background .2s; }
.tl-item:hover { background: var(--accent-soft); }
.tl-item .rc-icon { width: 40px; height: 40px; margin: 0; grid-row: span 3; }
.tl-item .rc-icon svg { width: 20px; height: 20px; }
.tl-item small { font: 500 11.5px var(--f-mono); color: var(--ink-3); }
.tl-item b { font: 700 16px/1.2 var(--f-display); }
.tl-item span { font-size: 13.5px; color: var(--ink-3); line-height: 1.45; }

/* ---------------------------------------------------------------- exploded */

.explode { display: flex; align-items: center; gap: 14px; border: 1.3px solid var(--line); background: var(--card); padding: 12px 16px; font: 600 14px var(--f-body); }
.explode output { width: 3.4em; text-align: right; font-size: 13px; color: var(--ink-3); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 180px; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); transition: transform .2s var(--spring); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.25); }

.exploded { --e: .2; position: relative; height: calc(500px + var(--e) * 440px); }
.exploded.animating { transition: height .9s var(--ease-out); }
.ex-part .num, .ex-part h4, .ex-part p { opacity: clamp(0, calc((var(--e) - .34) * 5), 1); }
.ex-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ex-lines .conn { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 14 4 2 4; animation: dash 5s linear infinite; }
.ex-lines .dim { stroke: var(--accent); stroke-width: 1; }
.ex-part {
  position: absolute; width: min(300px, 40%); text-align: center;
  left: 50%; top: 50%;
  --dx: calc(var(--sx) * (56px + var(--e) * 250px));
  --dy: calc(var(--sy) * (44px + var(--e) * 220px));
  transform: translate(-50%, -50%) translate(var(--dx), var(--dy));
  transition: transform .15s linear;
}
.exploded.animating .ex-part { transition: transform .9s var(--ease-out); }
.ex-part.p1 { --sx: -1; --sy: -1; }
.ex-part.p2 { --sx: 1; --sy: -1; }
.ex-part.p3 { --sx: -1; --sy: 1; }
.ex-part.p4 { --sx: 1; --sy: 1; }
.ex-card {
  width: 172px; height: 172px; margin: 0 auto 14px; border-radius: 50%; border: 1.4px solid var(--ink); background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px;
  position: relative; transition: transform .4s var(--spring), box-shadow .3s;
}
.ex-part:hover .ex-card { transform: scale(1.04); box-shadow: 0 0 0 6px var(--accent-soft); }
.ex-card small { font: 600 13.5px var(--f-display); }
.ex-card code { font: 500 12px var(--f-mono); background: var(--paper); padding: 5px 8px; border-radius: 2px; }
.ex-arrow { font: 600 12px var(--f-mono); color: var(--accent); }
.ex-note, .ex-sig { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.ex-history { gap: 5px; }
.hist { font: 500 11.5px var(--f-mono); padding: 3px 7px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); }
.hist.strike { text-decoration: line-through; color: var(--ink-4); text-decoration-color: var(--bad); }
#hist-job { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.ex-part .num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.3px solid var(--accent); color: var(--accent); font: 600 12px var(--f-mono); background: var(--paper); }
.ex-part h4 { font: 800 19px/1.2 var(--f-display); margin: 10px 0 6px; letter-spacing: -.01em; }
.ex-part p { font-size: 14px; color: var(--ink-3); margin: 0; }
.ex-dim { position: absolute; font: 500 12px var(--f-mono); color: var(--accent); background: var(--paper); padding: 0 6px; transform: translate(-50%, -50%); pointer-events: none; }

/* ---------------------------------------------------------------- live */

.panel { border: 1.4px solid var(--ink); background: var(--card); }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); font: 700 15px var(--f-display); }
.panel > header .dot { width: 18px; height: 18px; border-radius: 50%; border: 1.3px solid var(--accent); display: grid; place-items: center; }
.panel > header .dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.6s steps(2) infinite; }
.live-tag { margin-left: auto; font: 600 11px/1 var(--f-mono); color: var(--good); display: inline-flex; align-items: center; gap: 6px; text-transform: lowercase; }
.live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: ping 2s infinite; }
.live-tag.off { color: var(--ink-4); }
.live-tag.off::before { animation: none; }
.pulse-top { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 18px 16px; border-bottom: 1px solid var(--line-2); }
.pulse-big span { font: 800 clamp(42px, 5vw, 64px)/1 var(--f-display); letter-spacing: -.03em; display: block; font-variant-numeric: tabular-nums; }
.pulse-big small { font: 500 12.5px var(--f-mono); color: var(--ink-3); }
.spark { width: 100%; height: 70px; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-area { fill: url(#spark-grad); fill: rgba(91,61,245,.09); }
.pulse-meta { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-3); min-width: 170px; }
.pulse-meta b { color: var(--ink); font-weight: 600; }
.epoch-bar { height: 4px; background: var(--paper-2); display: block; }
.epoch-bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 1s var(--ease-out); }
.log { list-style: none; margin: 0; padding: 6px 0; max-height: 300px; overflow: hidden; font-size: 13px; }
.log li { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; padding: 7px 16px; animation: row-in .6s var(--ease-out) both; }
.log li:nth-child(odd) { background: rgba(0,0,0,.018); }
.log .t { color: var(--ink-3); }
.log .s { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log a.s { text-decoration: none; }
.log a.s:hover { color: var(--accent); }
.log .n { color: var(--ink-3); text-align: right; }

.feeds { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.coins { list-style: none; margin: 0; padding: 4px 0; height: 470px; overflow: hidden; position: relative; }
.coins::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--card)); pointer-events: none; }
.coins li { animation: row-in .55s var(--ease-out) both; }
.coins li.empty { padding: 18px 16px; color: var(--ink-3); font: 500 13px var(--f-mono); animation: none; }
.coin-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 9px 16px; text-decoration: none; transition: background .2s; }
.coin-row:hover { background: var(--accent-soft); }
.coin-row img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--paper-2); border: 1px solid var(--line-2); }
.coin-row .nm { min-width: 0; display: flex; flex-direction: column; }
.coin-row .nm b { font: 700 14.5px/1.2 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-row .nm small { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-row .rt { text-align: right; font: 500 12.5px/1.35 var(--f-mono); display: flex; flex-direction: column; }
.coin-row .rt small { color: var(--ink-3); }
.coin-row.fresh { background: linear-gradient(90deg, var(--accent-soft), transparent); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--f-mono); padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }

/* ---------------------------------------------------------------- order */

.order { display: grid; grid-template-columns: 1.35fr .9fr; border: 1.4px solid var(--ink); background: var(--card); }
.order-form { padding: clamp(18px, 3vw, 30px); display: flex; flex-direction: column; gap: 18px; border-right: 1px solid var(--line); }
.order-preview { padding: clamp(18px, 3vw, 30px); display: flex; flex-direction: column; align-items: stretch; background: linear-gradient(var(--card), #fbfaf7); position: sticky; top: 40px; align-self: start; }
fieldset { border: 0; margin: 0; padding: 0; }
legend, .field > span { font: 600 13px/1 var(--f-body); color: var(--ink-2); margin-bottom: 9px; display: block; }
.field > span em { font-style: normal; color: var(--ink-4); font-weight: 400; }
.venues { display: flex; gap: 10px; flex-wrap: wrap; }
.venues legend { width: 100%; }
.venue input { position: absolute; opacity: 0; pointer-events: none; }
.venue span { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px 10px 10px; border: 1.3px solid var(--line); background: var(--card); font: 600 14.5px var(--f-body); cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .25s var(--spring); position: relative; }
.venue span img { border-radius: 50%; }
.venue span:hover { border-color: var(--ink-3); }
.venue input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.venue input:checked + span::after { content: ""; position: absolute; top: -5px; right: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); animation: pop .4s var(--spring); }
.venue input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop { display: flex; align-items: center; gap: 16px; padding: 18px; border: 1.5px dashed var(--ink-4); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop-icon { width: 54px; height: 54px; border: 1.3px solid var(--line); display: grid; place-items: center; background: var(--card); flex: none; overflow: hidden; }
.drop-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linejoin: round; }
.drop-icon img { width: 100%; height: 100%; object-fit: cover; }
.drop b { display: block; font: 700 15px var(--f-display); }
.drop small { color: var(--ink-3); font-size: 13px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; position: relative; min-width: 0; }
.field input:not([type="range"]), .field textarea {
  width: 100%; border: 1.3px solid var(--line); background: var(--card); padding: 12px 13px; font: 400 15px var(--f-body); color: var(--ink); border-radius: 0;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field.suffix input { padding-right: 52px; }
.field.suffix i { position: absolute; right: 13px; bottom: 13px; font: 500 13px var(--f-mono); color: var(--ink-3); font-style: normal; }
.field.bad input, .field.bad textarea { border-color: var(--bad); animation: shake .4s; }
.field input[type="range"] { width: 100%; }
.field output { font: 600 13px var(--f-mono); color: var(--accent); margin-left: 6px; }
#when-at { margin-top: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14.5px; color: var(--ink-2); }
.check input { position: absolute; opacity: 0; }
.check .box { width: 20px; height: 20px; border: 1.4px solid var(--ink); flex: none; margin-top: 1px; display: grid; place-items: center; transition: background .2s; }
.check .box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .25s var(--spring); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.buyers { animation: fade-up .4s var(--ease-out); }

.coin-preview { position: relative; width: 170px; height: 170px; margin: 8px auto 18px; }
.cp-img { width: 100%; height: 100%; border-radius: 50%; border: 1.4px solid var(--accent); display: grid; place-items: center; overflow: hidden; background: var(--card); transition: transform .5s var(--spring); }
.cp-img span { font: 800 46px var(--f-display); color: var(--accent); }
.cp-img img { width: 100%; height: 100%; object-fit: cover; animation: pop .5s var(--spring); }
.cp-dim { position: absolute; font-size: 11px; color: var(--accent); }
.cp-dim-x { left: 0; right: 0; top: -18px; text-align: center; }
.cp-dim-x::before, .cp-dim-x::after { content: ""; position: absolute; top: 50%; width: calc(50% - 20px); height: 1px; background: var(--accent); opacity: .5; }
.cp-dim-x::before { left: 0; } .cp-dim-x::after { right: 0; }
.cp-dim-y { right: -34px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.order-preview h3 { text-align: center; font: 800 26px/1.1 var(--f-display); margin: 0; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cp-ticker { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.cp-rows { margin: 20px 0; padding: 0; border-top: 1px solid var(--line-2); }
.cp-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.cp-rows dt { color: var(--ink-3); }
.cp-rows dd { margin: 0; font-weight: 600; text-align: right; }
.cp-rows dd.good { color: var(--good); }
.cp-rows .total dd { color: var(--accent-ink); }
.fine { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 12px 0 0; line-height: 1.5; }
.order-msg { margin: 10px 0 0; font-size: 14px; text-align: center; min-height: 1.4em; }
.order-msg.bad { color: var(--bad); }
.order-msg.good { color: var(--good); }
.tickets { margin-top: 18px; border: 1.4px dashed var(--ink-4); padding: 16px 18px; }
.tickets h4 { margin: 0 0 10px; font-size: 12px; color: var(--ink-3); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.tickets ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticket { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); animation: fade-up .5s var(--ease-out); }
.ticket img, .ticket .ph { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--accent-soft); display: grid; place-items: center; font: 800 14px var(--f-display); color: var(--accent); }
.ticket b { font: 700 15px var(--f-display); }
.ticket small { display: block; font: 500 12px var(--f-mono); color: var(--ink-3); }

/* ---------------------------------------------------------------- coins */

.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.coin-card {
  border: 1.4px solid var(--ink); background: var(--card); padding: 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-height: 250px; justify-content: center; text-decoration: none;
  transition: transform .35s var(--spring), box-shadow .3s;
}
a.coin-card:hover, .coin-card.own:hover { transform: translateY(-4px); box-shadow: 4px 6px 0 var(--ink); }
.coin-card img, .coin-card .ph { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; border: 1.3px solid var(--line); margin-bottom: 8px; background: var(--paper); }
.coin-card .ph { display: grid; place-items: center; font: 800 30px var(--f-display); color: var(--ink-4); border-style: dashed; }
.coin-card b { font: 800 19px/1.1 var(--f-display); }
.coin-card small { color: var(--ink-3); font-size: 13px; }
.coin-card .pill { margin-top: 6px; }
.coin-card .pill.live { background: #dff5ea; color: var(--good); }
.coin-card .pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: ping 2s infinite; }
.coin-card.slot { border-style: dashed; border-color: var(--ink-4); background: transparent; }
.coin-card.slot:hover { border-color: var(--accent); background: var(--accent-soft); }
.coin-card.slot .ph { animation: breathe 3s ease-in-out infinite; }
.coin-card.own img { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); animation: spin-slow 18s linear infinite; }

/* ---------------------------------------------------------------- notes */

.notes { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(20px, 4vw, 56px); align-items: start; }
.status { border: 1.4px solid var(--ink); background: var(--card); }
.status h4 { margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.status table { width: 100%; border-collapse: collapse; font-size: 14px; }
.status th, .status td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.status tr:last-child th, .status tr:last-child td { border-bottom: 0; }
.status th { font-weight: 500; color: var(--ink-3); width: 40%; }
.status td { font: 500 13.5px var(--f-mono); overflow-wrap: anywhere; }
.status td.flash { animation: flash 1s var(--ease-out); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font: 700 clamp(17px, 1.8vw, 21px)/1.25 var(--f-display); position: relative; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat; transition: transform .35s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq summary:hover { color: var(--accent); }
.faq details > div { overflow: hidden; }
.faq details p { margin: 0 0 20px; color: var(--ink-2); max-width: 40em; }

/* ---------------------------------------------------------------- footer */

.foot { max-width: var(--wrap); margin: clamp(90px, 12vw, 150px) auto 0; padding: 0 var(--gutter) 110px; }
.foot-word {
  font: 800 clamp(80px, 21vw, 280px)/.8 var(--f-display); letter-spacing: -.05em; text-align: center;
  color: transparent; -webkit-text-stroke: 1.5px var(--ink); user-select: none;
  background: linear-gradient(90deg, var(--accent) 0 50%, transparent 50%) 100% 0 / 200% 100% no-repeat; -webkit-background-clip: text; background-clip: text;
  transition: background-position 1.2s var(--ease-out);
}
.foot-word:hover, .foot.seen .foot-word { background-position: 0 0; }
.foot-row { display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; font-size: 13.5px; color: var(--ink-3); }
.foot-row nav { display: flex; gap: 18px; }
.foot-row nav a { text-decoration: none; font-weight: 600; color: var(--ink); }
.foot-row nav a:hover { color: var(--accent); }
.foot-row .fine { margin: 0; }

/* ---------------------------------------------------------------- dock */

.dock {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; align-items: stretch; height: 52px;
  background: var(--card); border: 1.5px solid var(--ink); box-shadow: var(--shadow);
  transform: translateY(140%); transition: transform .8s var(--ease-out) .6s;
}
body.is-ready .dock { transform: none; }
.dock > * { border-right: 1px solid var(--line); }
.dock > *:last-child { border-right: 0; }
.dock-brand { display: flex; align-items: center; gap: 9px; padding: 0 16px; text-decoration: none; font: 700 17px var(--f-display); }
.dock-brand .mark { width: 22px; height: 22px; }
.dock-sec { position: relative; }
.dock-sec > button { height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: none; border: 0; font: 700 14px var(--f-display); min-width: 210px; }
.dock-sec > button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; margin-left: auto; transition: transform .3s; }
.dock-sec > button[aria-expanded="true"] svg { transform: rotate(180deg); }
#dock-title { display: inline-block; transition: opacity .25s, transform .3s var(--ease-out); }
#dock-title.swap { opacity: 0; transform: translateY(6px); }
.dock-menu { position: absolute; bottom: calc(100% + 10px); left: -1px; right: -1px; list-style: none; margin: 0; padding: 6px; background: var(--card); border: 1.5px solid var(--ink); box-shadow: var(--shadow); animation: fade-up .25s var(--ease-out); }
.dock-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-decoration: none; font-size: 14px; font-weight: 500; }
.dock-menu a:hover, .dock-menu a.on { background: var(--accent-soft); }
.dock-connect { background: var(--accent); color: #fff; border: 0; padding: 0 22px; font: 700 15px var(--f-display); transition: background .2s; min-width: 120px; }
.dock-connect:hover { background: var(--accent-ink); }
.dock-connect.on { background: var(--ink); font-family: var(--f-mono); font-size: 13px; font-weight: 500; }

/* ---------------------------------------------------------------- sheet + toast */

.sheet { border: 1.5px solid var(--ink); padding: 0; background: var(--card); color: var(--ink); width: min(520px, calc(100vw - 32px)); box-shadow: 8px 8px 0 var(--ink); }
.sheet::backdrop { background: rgba(244,242,237,.7); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-in .45s var(--spring); }
.sheet-in { padding: 28px; position: relative; }
.sheet-x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; }
.sheet-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; }
.sheet-x:hover { background: var(--paper); }
.sh-head { display: flex; align-items: center; gap: 14px; margin: 12px 0 8px; }
.sh-head .rc-icon { margin: 0; }
.sh-head h3 { font: 800 30px/1 var(--f-display); margin: 0; letter-spacing: -.02em; }
.sheet p { color: var(--ink-2); margin: 0 0 16px; }
.sh-steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; border-top: 1px solid var(--line-2); }
.sh-steps li { counter-increment: s; padding: 10px 0 10px 36px; border-bottom: 1px solid var(--line-2); position: relative; font-size: 14.5px; color: var(--ink-2); }
.sh-steps li::before { content: counter(s); position: absolute; left: 0; top: 9px; width: 22px; height: 22px; border-radius: 50%; border: 1.2px solid var(--accent); color: var(--accent); font: 600 11px/20px var(--f-mono); text-align: center; }
.sh-steps b { color: var(--ink); }
.sh-status { margin-bottom: 18px; }
.sh-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sh-actions svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }

.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 11px 16px; font: 500 13.5px var(--f-mono); transition: opacity .3s, transform .4s var(--spring);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- keyframes */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes counter { to { transform: rotate(var(--a)) translateY(-210%) rotate(calc(-1 * var(--a) - 360deg)); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(16,156,102,.45); } 70% { box-shadow: 0 0 0 7px rgba(16,156,102,0); } 100% { box-shadow: 0 0 0 0 rgba(16,156,102,0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes dash { to { stroke-dashoffset: -96; } }
@keyframes tape { to { transform: translateX(-50%); } }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes wiggle { 25% { transform: rotate(-10deg); } 75% { transform: rotate(8deg); } }
@keyframes click { 50% { transform: scale(.8); } }
@keyframes grid-in { from { opacity: 0; background-size: 12px 12px; } }
@keyframes badge-in { from { transform: scale(0) rotate(-90deg); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
@keyframes row-in { from { opacity: 0; transform: translateY(-10px); } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes flash { from { background: var(--accent-soft); } }
@keyframes breathe { 50% { transform: scale(.94); opacity: .6; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes coin-fly { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 20px); opacity: 0; } }
@keyframes lens { 0% { opacity: 0; left: 22%; top: 16%; } 10% { opacity: 1; } 45% { left: 62%; top: 34%; } 75% { left: 30%; top: 52%; } 100% { opacity: 1; left: 64%; top: 60%; } }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { max-width: 520px; margin: 0 auto; width: 100%; }
  .order { grid-template-columns: 1fr; }
  .order-form { border-right: 0; border-bottom: 1px solid var(--line); }
  .order-preview { position: static; }
  .coin-grid { grid-template-columns: repeat(2, 1fr); }
  .notes { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --ruler: 0px; }
  .rulers { display: none; }
  .topnav { display: none; }
  .topbar { justify-content: space-between; }
  .feeds { grid-template-columns: 1fr; }
  .pulse-top { grid-template-columns: 1fr; gap: 12px; }
  .row3 { grid-template-columns: 1fr; }
  .ring-center { width: 62%; }
  .ring-center p { display: none; }
  .rc-venues { display: none; }
  .rc-icon { width: 44px; height: 44px; margin: 6px 0 2px; }
  .rc-icon svg { width: 22px; height: 22px; }
  .rc-code { font-size: 11px; }
  .ring-center h3 { font-size: 22px; margin: 4px 0 10px; }
  .rc-actions .btn { height: 40px; }
  .rc-actions .btn-primary { padding: 0 14px; font-size: 13px; white-space: nowrap; }
  .rc-actions .btn.icon { display: none; }
  .exploded { height: auto; display: grid; grid-template-columns: 1fr; gap: 36px; }
  .ex-part { position: static; transform: none !important; width: 100%; }
  .ex-part .num, .ex-part h4, .ex-part p { opacity: 1; }
  .ex-lines, .ex-dim { display: none; }
  .explode { display: none; }
  .dock { left: 12px; right: 12px; bottom: 12px; height: 50px; }
  .dock-brand span { display: none; }
  .dock-sec { flex: 1; }
  .dock-sec > button { min-width: 0; width: 100%; }
  .dock-connect { min-width: 0; padding: 0 16px; }
  .ca-box { display: flex; width: 100%; }
  .ca-addr { min-width: 0; }
  .sec-head.with-side > div, .sub.side { max-width: 100%; }
  .ca-tick { padding: 0 10px; }
  .ca-tick b { display: none; }
  .ca-addr { flex: 1; padding: 0 10px; }
  .ca-btn { padding: 0 10px; }
  .ca-btn#ca-copy span { display: none; }
  .selbox, .fake-cursor { display: none; }
  .log li { grid-template-columns: 64px 1fr; }
  .log .n { display: none; }
  .film-meta span:last-child { display: none; }
  .s-cap { bottom: 8%; }
}
@media (max-width: 480px) {
  .coin-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .coin-card { min-height: 200px; padding: 14px 10px; }
  .coin-card img, .coin-card .ph { width: 64px; height: 64px; }
  .row2 { grid-template-columns: 1fr; }
  .cta .btn { flex: 1; padding: 0 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .tape-track { animation: none; }
}
