:root {
  --night: #07090d;
  --night2: #0d1316;
  --night3: #141b1f;
  --moon: #efe6cf;
  --moon-dim: #b9b09a;
  --paper: #e6dcc2;
  --paper-hi: #f0e8d4;
  --ink: #1d1812;
  --sepia: #6b5a43;
  --rule: rgba(29, 24, 18, .22);
  --amber: #f2a33a;
  --feed: #4f7d3c;
  --mob: #b0362a;
  --up: #6f9b55;
  --down: #c4523f;
  --gutter: clamp(16px, 3vw, 44px);
  --serif: 'IM Fell English', Georgia, serif;
  --sc: 'IM Fell English SC', Georgia, serif;
  --mono: 'Courier Prime', ui-monospace, Menlo, monospace;
  --hand: 'Caveat', cursive;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .32 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .11 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--night); color: var(--moon); font-family: var(--serif); font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.wrap { padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }
.wrap.narrow { max-width: 820px; }
.fine { font-family: var(--mono); font-size: 13px; color: var(--sepia); line-height: 1.55; }
.fine.light, .night .fine { color: var(--moon-dim); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 12px var(--gutter); background: linear-gradient(var(--night) 30%, transparent); transition: background .2s; }
.nav.solid { background: var(--night); box-shadow: 0 1px 0 rgba(239, 230, 207, .08); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--sc); font-size: 24px; letter-spacing: .02em; }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(239, 230, 207, .18), 0 0 18px rgba(242, 163, 58, .18); }
.brand-eyes circle { fill: var(--amber); }
.brand-eyes .p { fill: var(--night); transition: transform .2s; }
.links { display: flex; gap: 22px; margin-left: 12px; }
.links a { text-decoration: none; color: var(--moon-dim); font-size: 17px; }
.links a:hover { color: var(--moon); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; position: relative; }
.xlink svg { width: 18px; height: 18px; fill: var(--moon-dim); display: block; }
.xlink:hover svg { fill: var(--moon); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 2px; padding: 11px 18px; font-family: var(--mono); font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .12s, background .15s, border-color .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn-moon { background: var(--moon); color: var(--night); }
.btn-moon:hover { background: #fff8e6; }
.btn-ghost { border-color: rgba(239, 230, 207, .35); color: var(--moon); background: transparent; }
.btn-ghost:hover { border-color: var(--moon); }
.btn-ink { background: var(--ink); color: var(--paper-hi); width: 100%; padding: 14px; font-size: 15px; }
.btn-ink:hover { background: #000; }
.btn-ink:disabled { opacity: .45; cursor: not-allowed; }
.btn-wallet { border-color: rgba(239, 230, 207, .3); background: rgba(7, 9, 13, .6); color: var(--moon); }
.btn-wallet.connected::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* ---------- story (arrival) ---------- */
.story { position: relative; height: 600svh; background: var(--night); }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#fx { pointer-events: none; }
.chapter { position: absolute; z-index: 4; left: var(--gutter); top: 50%; translate: 0 -50%; width: min(600px, 44vw); will-change: opacity, transform; opacity: 0; visibility: hidden; } /* revealed by story.js, never all at once */
.chapter.c0 { top: 104px; translate: none; width: min(720px, 50vw); }
.eyebrow-note { font-family: var(--hand); font-size: 24px; color: var(--amber); margin: 0 0 6px; transform: rotate(-1.5deg); transform-origin: left; }
.eyebrow-note b { font-weight: 700; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 4.6vw, 76px); line-height: 1.02; margin: 0 0 18px; letter-spacing: -.01em; }
h1 em, .chapter h2 em { color: var(--moon-dim); }
.chapter h2 { font-size: clamp(40px, 4.8vw, 80px); line-height: 1; margin: 0 0 18px; }
.chapter h2 em.mob { color: #e0705f; }
.chapter p { color: var(--moon-dim); font-size: clamp(17px, 1.3vw, 20px); margin: 0 0 18px; max-width: 540px; }
.chapter p b { color: var(--moon); font-weight: 400; }
.chapter .kicker { font-family: var(--sc); font-size: 20px; color: var(--amber); margin-bottom: 10px; }
.lede { max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.ears { margin-top: 30px; width: min(380px, 100%); }
.chapter .ears-label { font-family: var(--mono); font-size: 12px; margin: 0 0 6px; color: var(--moon-dim); }
#ears-cv { width: 100%; height: 64px; display: block; border-bottom: 1px solid rgba(239, 230, 207, .25); }
.chapter .ears-legend { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; margin: 4px 0 0; }
.ears-legend .b { color: #a8d08d; } .ears-legend .a { color: #e58a76; }
.roster { list-style: none; margin: 6px 0 0; padding: 0; font-family: var(--mono); font-size: 14px; border-top: 1px solid rgba(239, 230, 207, .16); max-width: 520px; }
.roster li { display: grid; grid-template-columns: 26px 92px 1fr auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(239, 230, 207, .1); cursor: pointer; }
.roster li:hover { background: rgba(239, 230, 207, .04); }
.roster .n { color: rgba(239, 230, 207, .4); } .roster .nm { font-weight: 700; } .roster .sp { color: var(--moon-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter .typed { font-family: var(--mono); font-size: 14px; color: var(--moon); border-left: 2px solid var(--amber); padding-left: 12px; min-height: 3.2em; }
.typed::after { content: '\258C'; color: var(--amber); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.chapter .live-line { font-family: var(--hand); font-size: 24px; color: var(--moon); }
.toc { position: absolute; z-index: 5; right: var(--gutter); top: 34%; translate: 0 -50%; animation: fadein 1s 2.6s both; display: flex; flex-direction: column; gap: 14px; font-family: var(--sc); font-size: 15px; }
.toc a { text-decoration: none; color: rgba(239, 230, 207, .35); display: flex; gap: 10px; justify-content: flex-end; align-items: baseline; transition: color .2s; }
.toc a span { font-family: var(--serif); font-style: italic; font-size: 15px; opacity: 0; transform: translateX(6px); transition: .25s; }
.toc a.on { color: var(--amber); }
.toc a.on span, .toc:hover a span { opacity: 1; transform: none; }
.toc-bar { position: absolute; right: -14px; top: 0; bottom: 0; width: 1px; background: rgba(239, 230, 207, .15); }
.toc-bar::after { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: calc(var(--story-p, 0) * 100%); background: var(--amber); }
.scroll-hint { position: absolute; z-index: 5; left: 50%; bottom: 46px; translate: -50% 0; margin: 0; font-family: var(--hand); font-size: 20px; color: var(--moon-dim); opacity: 0; pointer-events: none; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }
.lead-tag { position: absolute; z-index: 4; opacity: 0; background: var(--paper-hi) var(--grain); color: var(--ink); border: 0; padding: 8px 12px; font-family: var(--mono); font-size: 12px; text-align: left; box-shadow: 3px 4px 0 rgba(0, 0, 0, .4); cursor: pointer; transform: rotate(-2deg); display: grid; gap: 1px; }
.lead-tag b { font-family: var(--sc); font-size: 20px; font-weight: 400; }
.lead-tag i { font-family: var(--serif); color: var(--sepia); font-size: 14px; }
.lead-tag .lt-no { color: var(--sepia); font-size: 11px; }
.lead-tag .up { color: #3f6e2c; } .lead-tag .down { color: #a3321f; }
.tags { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity .3s; opacity: 0; }
.tag { position: absolute; transform: translate(-50%, 0); pointer-events: auto; cursor: pointer; background: var(--paper-hi) var(--grain); color: var(--ink); font-family: var(--mono); font-size: 12px; line-height: 1.25; padding: 5px 8px 5px 14px; border-radius: 1px 3px 3px 1px; box-shadow: 2px 3px 0 rgba(0, 0, 0, .35); text-align: left; transition: transform .15s; border: 0; white-space: nowrap; }
.tag::before { content: ''; position: absolute; left: 5px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--night); }
.tag::after { content: ''; position: absolute; left: calc(50% + var(--sx, 0px)); bottom: 100%; width: 1px; height: var(--string, 18px); background: rgba(239, 230, 207, .45); }
.tag:hover, .tag:focus-visible { transform: translate(-50%, -2px) rotate(-1deg); outline: none; }
.tag b { display: block; font-size: 13px; letter-spacing: .04em; }
.tag .r { font-weight: 700; }
.tag .st { display: block; color: var(--sepia); font-size: 11px; }
.up { color: var(--up); } .down { color: var(--down); }
.tag .up { color: #3f6e2c; } .tag .down { color: #a3321f; }
.ticker { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 28px; padding: 10px var(--gutter); font-family: var(--mono); font-size: 13px; color: var(--moon-dim); background: linear-gradient(transparent, rgba(7, 9, 13, .9)); overflow-x: auto; scrollbar-width: none; }
.ticker span { white-space: nowrap; }
.ticker b { color: var(--moon); font-weight: 400; }

/* ---------- sections ---------- */
section.paper { background: var(--paper) var(--grain); color: var(--ink); padding: 72px 0 80px; }
section.night { background: var(--night2); padding: 72px 0 80px; }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.night .sec-head { border-color: rgba(239, 230, 207, .14); }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4vw, 56px); margin: 0; line-height: 1; }
.margin-note { font-family: var(--hand); font-size: 22px; color: var(--sepia); margin: 0; }
.margin-note.light { color: var(--moon-dim); }

/* ---------- specimen cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card { position: relative; background: var(--paper-hi) var(--grain); border: 1px solid #2b241a; box-shadow: 4px 5px 0 rgba(29, 24, 18, .16); padding: 12px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 6px 8px 0 rgba(29, 24, 18, .18); }
.card.last { border-color: var(--mob); }
.portrait { position: relative; background: radial-gradient(ellipse at 50% 35%, #182024, #0a0d10 70%); aspect-ratio: 5 / 4; overflow: hidden; }
.portrait canvas { width: 100%; height: 100%; display: block; }
.portrait .pos-strip { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-family: var(--mono); font-size: 11.5px; padding: 3px 7px; background: rgba(239, 230, 207, .1); border: 1px solid rgba(239, 230, 207, .22); color: var(--moon); border-radius: 2px; }
.chip.l { border-color: rgba(111, 155, 85, .7); }
.chip.s { border-color: rgba(196, 82, 63, .75); }
.roost-badge { position: absolute; top: 8px; left: 8px; font-family: var(--hand); font-size: 18px; color: var(--moon-dim); }
.stamp { position: absolute; top: -16px; right: 6px; z-index: 2; font-family: var(--sc); font-size: 15px; letter-spacing: .06em; border: 2px solid currentColor; padding: 1px 8px; transform: rotate(-6deg); color: #a9342a; background: var(--paper-hi); box-shadow: 0 0 0 2px var(--paper-hi); }
.stamp.crown { color: #3f6e2c; }
.label-block { position: relative; padding: 12px 4px 2px; }
.lb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lb-name { font-family: var(--sc); font-size: 26px; line-height: 1; }
.lb-rank { font-family: var(--hand); font-size: 26px; color: var(--sepia); }
.lb-latin { font-style: italic; color: var(--sepia); font-size: 16px; margin: 2px 0 8px; }
.lb-latin small { font-style: normal; font-family: var(--mono); font-size: 12px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px dashed var(--rule); border-bottom: 1px dashed var(--rule); margin: 8px 0; }
.kv div { padding: 7px 0; }
.kv div + div { padding-left: 10px; border-left: 1px dashed var(--rule); }
.kv span { display: block; font-family: var(--mono); font-size: 11px; color: var(--sepia); }
.kv b { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.card .up { color: #3f6e2c; } .card .down { color: #a3321f; }
.spark { width: 100%; height: 38px; display: block; }
.genes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.gene span { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--sepia); }
.gene i { display: block; height: 5px; background: rgba(29, 24, 18, .12); position: relative; }
.gene i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--ink); }
.sparrows { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--sepia); }
.sparrows .bar { flex: 1; height: 6px; display: flex; background: rgba(29, 24, 18, .1); }
.sparrows .bar i { display: block; height: 100%; }
.sparrows .f { color: var(--feed); } .sparrows .m { color: var(--mob); }
.last-line { font-family: var(--mono); font-size: 12px; color: var(--ink); margin: 8px 0 0; min-height: 3em; opacity: .85; }

/* ---------- log ---------- */
.log-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.log-filter button { background: transparent; border: 1px solid rgba(239, 230, 207, .2); padding: 5px 10px; font-family: var(--mono); font-size: 12px; cursor: pointer; border-radius: 2px; color: var(--moon-dim); }
.log-filter button[aria-pressed='true'] { border-color: var(--moon); color: var(--moon); }
.log { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 14px; max-height: 620px; overflow-y: auto; border-top: 1px solid rgba(239, 230, 207, .1); }
.log li { display: grid; grid-template-columns: 64px 92px 1fr; gap: 12px; padding: 9px 2px; border-bottom: 1px solid rgba(239, 230, 207, .07); }
.log li.new { animation: ink 1.2s ease-out; }
@keyframes ink { from { background: rgba(242, 163, 58, .14); } to { background: transparent; } }
.log time { color: rgba(239, 230, 207, .4); }
.log .who { font-weight: 700; cursor: pointer; }
.log .txt { color: var(--moon-dim); }
.log li.k-strike .txt { color: var(--moon); }
.log li.k-take .txt { color: #a8d08d; }
.log li.k-stop .txt, .log li.k-liq .txt { color: #e58a76; }
.log li.k-liq .txt { font-weight: 700; }
.log li.k-castout .txt, .log li.k-hatch .txt, .log li.k-crown .txt { color: var(--amber); font-style: italic; }

/* ---------- session ---------- */
.session-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.clock-card, .vote-card { background: var(--paper-hi) var(--grain); border: 1px solid #2b241a; padding: 24px; box-shadow: 4px 5px 0 rgba(29, 24, 18, .14); }
.label { font-family: var(--mono); font-size: 12px; color: var(--sepia); margin: 0 0 6px; }
.clock { font-family: var(--serif); font-size: clamp(44px, 6vw, 80px); line-height: 1; font-variant-numeric: tabular-nums; }
.clock-sub { font-family: var(--hand); font-size: 21px; color: var(--sepia); margin: 4px 0 18px; }
.standings { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13.5px; margin-bottom: 12px; }
.standings th { text-align: right; font-weight: 400; color: var(--sepia); font-size: 11.5px; padding: 6px 4px; border-bottom: 1px solid var(--ink); }
.standings th:nth-child(-n+2), .standings td:nth-child(-n+2) { text-align: left; }
.standings td { text-align: right; padding: 7px 4px; border-bottom: 1px dashed var(--rule); }
.standings tr.cut td { color: var(--mob); }
.standings tr.top td:nth-child(2) { font-weight: 700; }
.standings tr { cursor: pointer; }
.vote-card h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 8px; }
.vote-how { font-size: 16.5px; margin: 0 0 18px; }
.pick-row { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: start; margin-bottom: 12px; }
.pick-label { font-family: var(--sc); font-size: 20px; padding-top: 6px; }
.pick-label.feed { color: var(--feed); } .pick-label.mob { color: var(--mob); }
.pick-owls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pick { border: 1px solid var(--rule); background: transparent; padding: 7px 6px; font-family: var(--mono); font-size: 12.5px; cursor: pointer; text-align: left; border-radius: 2px; line-height: 1.2; }
.pick small { display: block; color: var(--sepia); font-size: 10.5px; }
.pick:hover { border-color: var(--ink); }
.pick[aria-pressed='true'].f { background: var(--feed); border-color: var(--feed); color: var(--paper-hi); }
.pick[aria-pressed='true'].m { background: var(--mob); border-color: var(--mob); color: var(--paper-hi); }
.pick[aria-pressed='true'] small { color: inherit; opacity: .8; }
.pick:disabled { opacity: .35; cursor: not-allowed; }
.vote-status { font-family: var(--hand); font-size: 21px; min-height: 1.4em; margin: 10px 0 4px; }

/* ---------- pellets ---------- */
.pellets { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.pellet { border: 1px solid rgba(239, 230, 207, .14); padding: 16px; display: grid; grid-template-columns: 92px 1fr; gap: 14px; background: var(--night3); }
.pellet canvas { width: 92px; height: 110px; display: block; filter: grayscale(.8) brightness(.8); }
.pellet h4 { font-family: var(--sc); font-weight: 400; font-size: 22px; margin: 0; }
.pellet p { margin: 2px 0; font-family: var(--mono); font-size: 12.5px; color: var(--moon-dim); }
.pellet .born { color: var(--amber); }
.empty { font-family: var(--hand); font-size: 24px; color: var(--moon-dim); }

/* ---------- fable ---------- */
.fable h2 { margin-bottom: 20px; }
.fable-text p { font-size: 21px; line-height: 1.6; margin: 0 0 16px; }
.drop::first-letter { font-family: var(--sc); float: left; font-size: 74px; line-height: .8; padding: 6px 8px 0 0; }
.faq { margin-top: 36px; border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px dashed var(--rule); padding: 14px 0; }
.faq summary { cursor: pointer; font-size: 21px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; font-family: var(--mono); }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 10px 0 0; font-size: 17px; }

/* ---------- footer ---------- */
.foot { background: var(--night); padding: 40px 0 56px; border-top: 1px solid rgba(239, 230, 207, .1); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.foot-brand { font-family: var(--sc); font-size: 28px; margin: 0; }
.ca { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; flex-wrap: wrap; }
.ca code { background: var(--night3); padding: 6px 10px; word-break: break-all; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer-in { position: absolute; top: 0; right: 0; bottom: 0; width: min(600px, 100%); background: var(--night2); overflow-y: auto; transform: translateX(30px); transition: transform .25s; padding: 0 0 40px; }
.drawer.open .drawer-in { transform: none; }
.d-close { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 10px; background: linear-gradient(var(--night2) 60%, transparent); }
.d-close button { background: transparent; border: 1px solid rgba(239, 230, 207, .25); width: 38px; height: 38px; cursor: pointer; font-size: 18px; }
.d-portrait { height: 300px; margin-top: -58px; }
.d-portrait canvas { width: 100%; height: 100%; display: block; }
.d-body { padding: 0 24px; }
.d-body h3 { font-family: var(--sc); font-weight: 400; font-size: 42px; margin: 0; line-height: 1; }
.d-latin { font-style: italic; color: var(--moon-dim); margin: 4px 0 14px; }
.d-kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(239, 230, 207, .12); border: 1px solid rgba(239, 230, 207, .12); margin-bottom: 16px; }
.d-kv div { background: var(--night2); padding: 10px; }
.d-kv span { display: block; font-family: var(--mono); font-size: 11px; color: var(--moon-dim); }
.d-kv b { font-family: var(--mono); font-size: 16px; }
.d-chart { width: 100%; height: 150px; display: block; margin-bottom: 16px; }
.d-h { font-family: var(--mono); font-size: 12px; color: var(--moon-dim); margin: 20px 0 8px; border-bottom: 1px solid rgba(239, 230, 207, .12); padding-bottom: 4px; }
.d-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
.d-table td, .d-table th { padding: 6px 4px; text-align: right; border-bottom: 1px solid rgba(239, 230, 207, .07); }
.d-table th { color: var(--moon-dim); font-weight: 400; }
.d-table td:first-child, .d-table th:first-child { text-align: left; }
.d-log { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 12.5px; }
.d-log li { padding: 7px 0; border-bottom: 1px solid rgba(239, 230, 207, .07); color: var(--moon-dim); }
.d-log time { color: rgba(239, 230, 207, .4); margin-right: 8px; }

/* ---------- wallet ---------- */
.wmodal { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
.wcard { background: var(--paper-hi) var(--grain); color: var(--ink); width: min(420px, 100%); padding: 20px; border: 1px solid var(--ink); box-shadow: 6px 7px 0 rgba(0, 0, 0, .4); }
.whead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-family: var(--sc); font-size: 22px; }
.whead button { background: none; border: 0; font-size: 22px; cursor: pointer; }
.wlist { display: grid; gap: 6px; }
.wopt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--rule); background: transparent; cursor: pointer; text-align: left; text-decoration: none; font-family: var(--mono); font-size: 14px; }
.wopt:hover { border-color: var(--ink); }
.wopt img { width: 28px; height: 28px; }
.wmenu { position: absolute; right: 0; top: 46px; background: var(--paper-hi); color: var(--ink); border: 1px solid var(--ink); min-width: 220px; font-family: var(--mono); font-size: 13px; box-shadow: 4px 5px 0 rgba(0, 0, 0, .4); }
.wmenu div { padding: 10px 12px; border-bottom: 1px dashed var(--rule); word-break: break-all; font-size: 12px; }
.wmenu button { display: block; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; cursor: pointer; }
.wmenu button:hover { background: rgba(29, 24, 18, .07); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); z-index: 70; background: var(--moon); color: var(--night); font-family: var(--mono); font-size: 14px; padding: 10px 16px; opacity: 0; transition: .2s; pointer-events: none; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--mob); color: #fff; }

/* ---------- small screens ---------- */
@media (max-width: 1200px) { .tag .st { display: none; } .toc a span { display: none; } }
@media (max-width: 900px) {
  .links { display: none; }
  .session-grid { grid-template-columns: 1fr; }
  .chapter, .chapter.c0 { top: 84px; translate: none; width: auto; right: var(--gutter); }
  .chapter h2 { font-size: clamp(36px, 9vw, 56px); }
  .chapter p { font-size: 16px; }
  .ears { display: none; }
  .roster li { grid-template-columns: 22px 84px 1fr auto; font-size: 12.5px; padding: 6px 0; }
  .toc { top: auto; bottom: 52px; translate: none; flex-direction: row; gap: 12px; font-size: 13px; }
  .toc-bar { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .lede { font-size: 16px; }
  .chapter.c0 .lede { display: none; }
  .toc { display: none; }
  .scroll-hint { bottom: 40px; font-size: 17px; white-space: nowrap; }
  .lead-tag b { font-size: 16px; }
  .roster .sp { display: none; }
  .roster li { grid-template-columns: 22px 1fr auto; }
  .tag { min-width: 0; padding: 4px 6px 4px 11px; font-size: 10.5px; }
  .tag b { font-size: 11px; }
  .tag .st { display: none; }
  .cards { grid-template-columns: 1fr; }
  .log li { grid-template-columns: 1fr; gap: 2px; }
  .log time { font-size: 12px; }
  .pick-owls { grid-template-columns: repeat(2, 1fr); }
  .d-kv { grid-template-columns: repeat(2, 1fr); }
  .btn-wallet { padding: 9px 12px; font-size: 13px; }
  .brand span { display: none; }
  .standings th:nth-child(n+4):nth-child(-n+7), .standings td:nth-child(n+4):nth-child(-n+7) { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

/* ---------- sound toggle ---------- */
@keyframes fadein { from { opacity: 0; } }
.btn-sound { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid rgba(239, 230, 207, .22); color: var(--moon-dim); padding: 9px 12px; border-radius: 2px; cursor: pointer; font-family: var(--mono); font-size: 13px; position: relative; }
.btn-sound:hover { color: var(--moon); border-color: rgba(239, 230, 207, .5); }
.btn-sound .bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.btn-sound .bars i { width: 2px; height: 3px; background: currentColor; transition: height .2s; }
.btn-sound[aria-pressed='true'] { color: var(--amber); border-color: rgba(242, 163, 58, .5); }
.btn-sound[aria-pressed='true'] .bars i { animation: eq 1s ease-in-out infinite; }
.btn-sound[aria-pressed='true'] .bars i:nth-child(2) { animation-delay: -.3s; } .btn-sound[aria-pressed='true'] .bars i:nth-child(3) { animation-delay: -.6s; } .btn-sound[aria-pressed='true'] .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }
.btn-sound.nudge::after { content: ''; position: absolute; inset: -4px; border: 1px solid var(--amber); border-radius: 3px; animation: nudge 2s ease-out infinite; pointer-events: none; }
@keyframes nudge { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.18); } }
@media (max-width: 600px) { .btn-sound .lbl { display: none; } .btn-sound { padding: 9px 10px; } }
