/* Modulo, the Elysium holder lottery. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans-Variable.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

@font-face {
  font-family: "Departure Mono";
  src: url("/fonts/DepartureMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* Colours follow the chain: deep ocean, the blues of its wave mark, and the
   amber of a sunrise for the one thing that was chosen. Dark is the default. */
:root {
  --paper: #071116; --paper-2: #0D1B22; --card: #0B171D;
  --ink: #EAF3F4; --ink-2: #A9BCC3; --ink-3: #6F8791; --line: #1C3039;
  --accent: #F5A94E; --accent-ink: #F8BF7A; --on-accent: #1B1204; --ok: #4CC3A0;
  --tint-1: #1F4070; --tint-2: #2A5F8E; --tint-3: #3486A0; --tint-4: #52B0BF; --tint-5: #8FD0D8;
  --mark-ring: #52B0BF;
  --sans: "Instrument Sans", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, "Songti SC", serif;
  --mono: "Departure Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --paper: #F1F6F6; --paper-2: #E2ECED; --card: #FBFDFD;
  --ink: #0B1A22; --ink-2: #40545F; --ink-3: #6C808A; --line: #CCDADD;
  --accent: #EE9A30; --accent-ink: #A45908; --on-accent: #1B1204; --ok: #1B7F68;
  --tint-1: #2B6190; --tint-2: #3585A0; --tint-3: #52B0BF; --tint-4: #8ACBD4; --tint-5: #B5DCE2;
  --mark-ring: #3585A0;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
canvas { display: block; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ink); color: var(--paper); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; }
.skip:focus { top: 12px; }
.wrap { max-width: 1280px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.wrap-any { overflow-wrap: anywhere; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 500; line-height: 1; transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-small { padding: 9px 14px; font-size: 13px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); transition: border-color .18s, color .18s; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 12px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 84%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .mark { flex: none; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .mark { transform: rotate(180deg); }
.brand-name { font: 400 27px/1 var(--display); letter-spacing: -.01em; }
.brand-tag { padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; font: 11px/1 var(--mono); color: var(--ink-3); white-space: nowrap; }
.nav { display: flex; justify-content: center; gap: clamp(14px, 2.2vw, 30px); font-size: 14px; color: var(--ink-2); }
.nav a { white-space: nowrap; padding: 6px 0; border-bottom: 1px solid transparent; transition: color .18s, border-color .18s; }
.nav a:hover { color: var(--ink); border-color: var(--ink); }
.top-side { display: flex; align-items: center; gap: 10px; }
.chain { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font: 11px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.chain i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.chain[data-state="live"] i { background: var(--ok); animation: pulse 2s ease-out infinite; }
.chain[data-state="down"] i { background: var(--accent); }
.chain b { font-weight: 400; color: var(--ink); }
.chain-meta { padding-left: 8px; border-left: 1px solid var(--line); }
#connect[data-state="on"] { background: transparent; color: var(--ink); border-color: var(--line); font-family: var(--mono); font-size: 11px; }
#connect[data-state="wrong"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- hero ---------- */
main { position: relative; isolation: isolate; }
.waves { position: absolute; inset: 0 0 auto; height: min(900px, 120vh); z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 30%, color-mix(in srgb, var(--tint-3) 20%, transparent), transparent 70%),
    radial-gradient(40% 40% at 8% 88%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--waves, none) 0 0 / 72px 36px;
  -webkit-mask-image: radial-gradient(95% 100% at 88% 0%, #000 15%, transparent 80%); mask-image: radial-gradient(95% 100% at 88% 0%, #000 15%, transparent 80%); }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding-block: clamp(28px, 4vw, 56px) clamp(40px, 6vw, 88px); }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font: 11px/1.4 var(--mono); color: var(--ink-2); }
.tag { background: var(--ink); color: var(--paper); padding: 5px 9px; border-radius: 4px; }
.tag b { font-weight: 400; }
h1 { margin: 20px 0 24px; font: 400 clamp(52px, 6.5vw, 98px)/.97 var(--display); letter-spacing: -.022em; }
h1 em { font-style: italic; color: var(--accent); }
.lede { max-width: 34em; font-size: clamp(16px, 1.25vw, 18px); color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; margin-top: clamp(32px, 4vw, 56px); padding-top: 22px; border-top: 1px solid var(--line); }
.stats dt { font-size: 12px; line-height: 1.35; color: var(--ink-3); }
.stats dd { margin-top: 6px; font: 22px/1.15 var(--mono); overflow-wrap: anywhere; }
.stats dd small { display: block; margin-top: 5px; font-size: 11px; color: var(--ink-3); }
.stats .stat-note { margin-top: 4px; font-size: 11px; color: var(--ink-3); }

.hero-machine { min-width: 0; container-type: inline-size; }
.machine {
  position: relative; width: min(100%, 560px); margin-inline: auto; padding: 20px 24px 6px;
  border: 1px solid var(--line); border-radius: 22px;
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--tint-3) 13%, transparent), transparent 62%), var(--card);
  box-shadow: 0 40px 80px -50px color-mix(in srgb, var(--tint-2) 70%, transparent), 0 0 0 1px color-mix(in srgb, var(--tint-4) 6%, transparent) inset;
}
.m-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.m-name, .m-timer span, .m-k { font: 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.m-status { margin-top: 6px; min-height: 1.5em; font-size: 14px; line-height: 1.5; font-weight: 500; }
.m-timer { flex: none; text-align: right; }
.m-timer span, .m-timer b { display: block; }
.m-timer b { margin-top: 5px; font: 400 44px/1 var(--mono); font-variant-numeric: tabular-nums; }
.m-progress { height: 3px; margin-top: 14px; border-radius: 2px; background: var(--line); overflow: hidden; }
.m-progress i { display: block; width: 0; height: 100%; background: var(--ink); }
.m-step { margin-top: 14px; }
.m-k { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.m-k i { padding: 2px 5px; border-radius: 3px; background: var(--paper-2); font-style: normal; letter-spacing: 0; color: var(--ink-2); transition: background .2s, color .2s; }
.m-k > span { margin-left: auto; letter-spacing: 0; text-transform: none; }
.machine[data-phase="hash"] [data-step="hash"] > .m-k > i, .machine[data-phase="wait"] [data-step="hash"] > .m-k > i,
.machine[data-phase="mod"] [data-step="mod"] > .m-k > i, .machine[data-phase="pick"] [data-step="pick"] > .m-k > i,
.machine[data-phase="drop"] .m-k-drop > i { background: var(--accent); color: var(--on-accent); }
.m-hash { --h: 28px; display: grid; grid-template-columns: repeat(32, minmax(0, 1fr)); margin-top: 8px; padding: 6px 0; border-block: 1px solid var(--line); font: 22px/28px var(--mono); text-align: center; }
@container (max-width: 500px) { .m-hash { grid-template-columns: repeat(16, minmax(0, 1fr)); } }
/* one character of a strip shows through each reel; the strip runs last, all, first */
.reel { position: relative; display: block; height: var(--h); overflow: hidden; -webkit-user-select: none; user-select: none; }
.reel i { display: block; font-style: normal; white-space: pre; line-height: var(--h); transform: translateY(calc(var(--d, 1) * var(--h) * -1)); }
.reel[data-s="empty"] i { visibility: hidden; }
.reel[data-s="empty"]::after { content: "·"; position: absolute; inset: 0; line-height: var(--h); color: var(--ink-3); }
.reel[data-s="spin"] { -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.reel[data-s="spin"] i { color: var(--tint-4); animation: reel-spin .46s linear infinite; animation-delay: calc(var(--i) * -71ms); }
.reel[data-s="set"] i { animation: reel-land .36s cubic-bezier(.2, .9, .3, 1.3) both; }
.machine[data-phase="wait"] .reel[data-s="spin"] i { animation-duration: .9s; opacity: .6; }
@keyframes reel-spin { from { transform: translateY(calc(var(--h) * -1)); } to { transform: translateY(calc(var(--h) * (var(--n) + 1) * -1)); } }
@keyframes reel-land { from { transform: translateY(calc((var(--d) - 1.6) * var(--h) * -1)); } }
.m-eq { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; margin-top: 6px; font: 22px/32px var(--mono); font-variant-numeric: tabular-nums; }
.m-eq em { font-style: normal; color: var(--ink-3); }
.m-eq strong { --h: 32px; display: inline-flex; font-weight: 400; color: var(--accent-ink); }
.m-eq strong[data-on="0"] { color: var(--ink-3); }
.m-eq strong .reel { display: inline-block; }
.m-stage { position: relative; margin-top: 8px; }
.m-stage canvas { touch-action: pan-y; cursor: pointer; }
.m-k-drop { position: absolute; left: 0; top: 74px; pointer-events: none; }
.m-k-drop > span { margin-left: 0; letter-spacing: .06em; text-transform: uppercase; }
.m-result { position: absolute; left: 0; right: 0; bottom: 10px; display: grid; grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr); align-items: center; font: 11px/1.5 var(--mono); color: var(--ink-3); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s; }
.machine[data-landed="true"] .m-result { opacity: 1; transform: none; }
.m-result div { min-width: 0; }
.m-result div:first-child { text-align: right; }
.m-result b, .m-result a { display: block; font: 400 22px/1.3 var(--mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-result a { color: var(--accent-ink); pointer-events: auto; }
.m-result a[href]:hover { text-decoration: underline; text-underline-offset: 3px; }
.m-result span { display: block; }
.m-tip { position: fixed; z-index: 30; pointer-events: none; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: 11px/1.7 var(--mono); color: var(--ink-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); white-space: nowrap; }
.m-tip b { font-weight: 400; color: var(--ink); }
.m-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; width: min(100%, 560px); margin: 16px auto 0; }
.m-foot p { font-size: 13px; line-height: 1.55; color: var(--ink-3); }

/* ---------- section heads ---------- */
.sec { padding-block: clamp(56px, 7vw, 104px); border-top: 1px solid var(--line); }
.sec-head { margin-bottom: clamp(28px, 3.5vw, 44px); }
.sec-no { font: 11px/1 var(--mono); color: var(--accent-ink); }
.sec-head h2 { margin: 14px 0 14px; font: 400 clamp(38px, 4.6vw, 64px)/1.03 var(--display); letter-spacing: -.015em; }
.sec-head p:last-child { max-width: 42em; color: var(--ink-2); }
h3 { font-size: 16px; font-weight: 600; }

/* ---------- film ---------- */
.stage {
  --paper: #040B0F; --paper-2: #0B181E; --card: #09151A; --ink: #EAF3F4; --ink-2: #A9BCC3; --ink-3: #6F8791; --line: #1C3039; --accent: #F5A94E; --accent-ink: #F8BF7A;
  background: var(--paper); color: var(--ink); padding-block: clamp(56px, 7vw, 104px); border-block: 1px solid var(--line);
}
.film { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: clamp(24px, 3vw, 44px); align-items: start; }
.film-main { min-width: 0; }
.film-frame { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #071015; }
.film-badge { position: absolute; top: 12px; right: 12px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: rgba(7, 16, 21, .72); font: 11px/1 var(--mono); color: var(--ink-3); }
.film-bar { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.film-toggle { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); transition: background .18s, transform .18s; }
.film-toggle:hover { background: var(--accent); color: var(--on-accent); }
.film-toggle:active { transform: scale(.94); }
.film-toggle .i-pause, .film-toggle[data-playing="true"] .i-play { display: none; }
.film-toggle[data-playing="true"] .i-pause { display: block; }
.film-track { flex: 1; display: flex; align-items: center; gap: 4px; height: 32px; cursor: pointer; touch-action: none; }
.film-seg { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; transition: height .15s; }
.film-seg:nth-child(1), .film-seg:nth-child(2) { flex: 6.5; }
.film-seg:nth-child(3) { flex: 7.5; }
.film-seg:nth-child(4) { flex: 5.5; }
.film-track:hover .film-seg { height: 6px; }
.film-seg i { display: block; width: 0; height: 100%; background: var(--ink); }
.film-time { flex: none; font: 11px/1 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.film-chapters li + li { border-top: 1px solid var(--line); }
.film-chapters button { display: grid; grid-template-columns: 36px 1fr; width: 100%; padding: 16px 0; text-align: left; color: var(--ink-3); transition: color .2s; }
.film-chapters li:first-child button { padding-top: 0; }
.ch-no { font: 11px/2.2 var(--mono); }
.ch-body b { display: block; font-size: 16px; font-weight: 600; color: var(--ink-2); transition: color .2s; }
.ch-body span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.65; }
.film-chapters button:hover b { color: var(--ink); }
.film-chapters [aria-current="true"] { color: var(--ink-2); }
.film-chapters [aria-current="true"] b { color: var(--ink); }
.film-chapters [aria-current="true"] .ch-no { color: var(--accent); }

/* ---------- lab ---------- */
.lab { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.field { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field span { font-size: 13px; color: var(--ink-2); }
.field output { font: 22px/1 var(--mono); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; margin: 6px 0 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: var(--ink); border: 4px solid var(--paper); box-shadow: 0 0 0 1px var(--ink); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 4px solid var(--paper); box-shadow: 0 0 0 1px var(--ink); }
.lab-prob { margin: 28px 0; padding-top: 22px; border-top: 1px solid var(--line); }
.lab-prob span { font-size: 12px; color: var(--ink-3); }
.lab-prob strong { display: block; margin: 10px 0 12px; font: 66px/1 var(--mono); font-weight: 400; letter-spacing: -.02em; }
.lab-prob p { font-size: 14px; color: var(--ink-2); min-height: 1.65em; }
.lab-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lab-board { min-width: 0; padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.lab-out { margin: 10px 0 14px; font-size: 13px; color: var(--ink-3); }
#labWinner.is-you { color: var(--accent-ink); }
.hint { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ---------- key/value lists ---------- */
.kv > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv dt { flex: none; font-size: 13px; color: var(--ink-3); }
.kv dd { min-width: 0; text-align: right; font: 12px/1.6 var(--mono); }
.kv-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
.lab .kv-row { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ---------- rounds ---------- */
.rounds { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(20px, 2.5vw, 32px); align-items: start; }
.ledger { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.ledger-head, .row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 84px minmax(0, 1.15fr) minmax(0, 1fr) 92px; gap: 12px; align-items: center; padding: 13px 16px; }
.ledger-head { font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.row { width: 100%; text-align: left; font: 12px/1.4 var(--mono); border-top: 1px solid var(--line); box-shadow: inset 0 0 0 0 var(--accent); transition: background .15s, box-shadow .15s; }
.ledger-rows .row:first-child { border-top: 0; }
.row:hover { background: var(--paper-2); }
.row[aria-current="true"] { background: var(--paper-2); box-shadow: inset 3px 0 0 0 var(--accent); }
.row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .c-time, .row .c-block { color: var(--ink-2); }
.st { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.st[data-st="paid"] { color: var(--ok); }
.st[data-st="retry"], .st[data-st="prepared"] { color: var(--accent-ink); }
.ledger-empty { padding: 28px 16px; font-size: 14px; color: var(--ink-3); }
.ledger-foot { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }

.verify { padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.verify-form { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 10px; align-items: end; margin-top: 14px; }
.verify-form label, .lookup { font-size: 12px; color: var(--ink-3); }
input[type="text"] { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font: 12px/1.3 var(--mono); color: var(--ink); transition: border-color .15s; }
input[type="text"]::placeholder { color: var(--ink-3); }
input[type="text"]:focus { outline: none; border-color: var(--ink); }
.verify-note { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }
.verify-note[data-state="error"] { color: var(--accent-ink); }
.verify-note[data-state="running"]::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.band { margin: 18px 0 8px; }
.verdict { margin-top: 14px; padding: 11px 14px; border-radius: 8px; font-size: 14px; background: var(--paper-2); color: var(--ink-2); }
.verdict[data-match="yes"] { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.verdict[data-match="no"] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); font-weight: 600; }
.verdict:empty { display: none; }
.rows-detail { margin-top: 14px; }
.rows-detail summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.rows-table { max-height: 280px; margin-top: 10px; overflow: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font: 12px/1.4 var(--mono); }
th { position: sticky; top: 0; background: var(--card); font: 12px var(--sans); color: var(--ink-3); text-align: left; }
th, td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:not(:first-child), td:not(:first-child) { text-align: right; }
tr.win td { color: var(--accent-ink); }

/* ---------- mine ---------- */
.mine-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mine-form .or { font-size: 13px; color: var(--ink-3); }
.lookup { flex: 1 1 260px; max-width: 460px; }
.lookup input { margin-top: 0; }
.mine-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 56px); margin-top: 22px; padding: clamp(18px, 2.4vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.mine-odds span { font-size: 12px; color: var(--ink-3); }
.mine-odds strong { display: block; margin: 10px 0 14px; font: 66px/1 var(--mono); font-weight: 400; letter-spacing: -.02em; overflow-wrap: anywhere; }
.mine-card[data-state="empty"] strong, .mine-card[data-state="out"] strong { color: var(--ink-3); }
.odds-bar { height: 10px; border-radius: 5px; background: var(--paper-2); overflow: hidden; }
.odds-bar i { display: block; width: 0; height: 100%; min-width: 0; border-radius: 5px; background: var(--accent); transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.mine-odds p { margin-top: 12px; font-size: 14px; color: var(--ink-2); }

/* ---------- rules and status ---------- */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 44px); }
.rules li { padding: 20px 0 24px; border-top: 1px solid var(--line); }
.rules b { font-size: 15px; font-weight: 600; }
.rules p { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.status-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(20px, 2.5vw, 32px); margin-top: clamp(28px, 3vw, 44px); align-items: start; }
.panel { padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { margin-right: auto; }
.badge { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; line-height: 1; color: var(--ink-2); white-space: nowrap; }
.badge[data-status="ready"] { border-color: transparent; background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.badge[data-status="unavailable"], .badge[data-status="recipient-mismatch"], .badge[data-status="asset-mismatch"], .badge[data-status="pool-missing"] { border-color: transparent; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent-ink); }
.panel-note { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.pending { color: var(--accent-ink); }
.limits li { padding: 13px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.limits b { color: var(--ink); font-weight: 600; }

/* ---------- footer, toast ---------- */
.foot { padding-block: 32px 48px; border-top: 1px solid var(--line); }
.foot > p { margin-top: 18px; font-size: 13px; color: var(--ink-3); }
.copy { font: 12px/1.6 var(--mono); text-align: right; overflow-wrap: anywhere; border-bottom: 1px dotted var(--ink-3); }
.copy:hover { border-bottom-style: solid; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; line-height: 1.4; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- first paint ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .hero-machine { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .07s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .hero-copy > :nth-child(4) { animation-delay: .21s; }
  .hero-copy > :nth-child(5) { animation-delay: .28s; }
  .hero-machine { animation-delay: .12s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- narrower screens ---------- */
@media (max-width: 1360px) {
  .brand-tag { display: none; }
}
@media (max-width: 1240px) {
  .nav { display: none; }
  .top { grid-template-columns: auto auto; justify-content: space-between; }
}
@media (max-width: 1040px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .film, .rounds, .status-grid { grid-template-columns: minmax(0, 1fr); }
  .film-chapters li:first-child button { padding-top: 16px; }
}
@media (max-width: 900px) {
  .chain-meta { display: none; }
}
@media (max-width: 760px) {
  .lab, .mine-card { grid-template-columns: minmax(0, 1fr); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-head, .row { grid-template-columns: 52px minmax(0, 1.5fr) minmax(0, 1fr) 76px; gap: 10px; padding-inline: 12px; }
  .c-time, .c-block, .ledger-head span:nth-child(2), .ledger-head span:nth-child(3) { display: none; }
  .verify-form { grid-template-columns: minmax(0, 1fr); }
  .m-foot { flex-direction: column; }
  .hero { gap: 28px; padding-top: 20px; }
}
@media (max-width: 520px) {
  .rules, .kv-row { grid-template-columns: minmax(0, 1fr); }
  .lab-prob strong, .mine-odds strong { font-size: 44px; }
  .machine { padding: 18px 16px 6px; border-radius: 18px; }
  .m-timer b { font-size: 33px; }
  .m-k-drop { flex-direction: column; align-items: flex-start; }
  .m-result b, .m-result a { font-size: 13px; }
  .top { gap: 12px; }
  .top-side { gap: 8px; }
  .chain { padding: 7px; }
  .chain #cName { display: none; }
  .film-time { display: none; }
}
@media (max-width: 350px) {
  .chain { display: none; }
  .top .btn-small { padding-inline: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
