/* BuffetPad.
   World: an after-hours Omaha brokerage board — cream enamel figures on black lacquer, ruled like
   a ledger, brass fittings. Every value below is argued from that sentence and from the logo's own
   two inks. Not: centred gradient stacks, eyebrows, equal card grids, glass pills, pulsing dots. */

@font-face { font-family: 'Bodoni Moda'; src: url('/assets/fonts/bodoni-moda-latin.woff2') format('woff2'); font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bodoni Moda'; src: url('/assets/fonts/bodoni-moda-latin-ext.woff2') format('woff2'); font-weight: 400 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Public Sans'; src: url('/assets/fonts/public-sans.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  /* lacquer */
  --ink: #0c0b09;
  --ink-1: #12110e;
  --ink-2: #191712;
  --ink-3: #221f18;
  --rule: #2b271f;
  --rule-2: #3d372b;
  /* enamel */
  --cream: #f4e7cf;
  --cream-2: #d8cbb2;
  --cream-3: #ab9f88;
  --cream-4: #8f8571;
  /* fittings */
  --brass: #d3a64c;
  --brass-hi: #ecc677;
  --brass-lo: rgba(211, 166, 76, .14);
  /* outcomes only */
  --ok: #8fc79c;
  --bad: #ea8c73;
  --warn: #e3b860;

  --f-display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --f-text: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --t-label: 11.5px;
  --t-small: 12.5px;
  --t-body: 14px;
  --t-row: 14.5px;
  --t-h3: 20px;
  --t-h2: 26px;
  --t-h1: clamp(26px, 2.2vw, 34px);

  --side: 76px;
  --top: 64px;
  --foot: 30px;
  --drawer: min(480px, 100vw);

  /* radii, argued per element */
  --r-plate: 3px;      /* enamel plates: buttons, inputs */
  --r-thumb: 4px;      /* token images, printed tickets */
  --r-none: 0;         /* panels and drawers are cut sheet, not cards */

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 var(--t-body)/1.45 var(--f-text);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  caret-color: var(--brass);
}
::selection { background: var(--cream); color: var(--ink); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: var(--r-plate); }
* { scrollbar-width: thin; scrollbar-color: var(--rule-2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule-2); border-radius: 4px; border: 2px solid var(--ink-1); }
::-webkit-scrollbar-thumb:hover { background: var(--cream-4); }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.num, .addr { font-variant-numeric: tabular-nums lining-nums; }
.addr { letter-spacing: .01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.label {
  font: 500 var(--t-label)/1.2 var(--f-text);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream-3);
}

/* ───────────────────────── frame ───────────────────────── */
.app {
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) var(--foot);
  grid-template-areas: "side main" "foot foot";
}

/* sidebar: the board's brass-edged left stile */
.side {
  grid-area: side;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 14px 0 12px;
  border-right: 1px solid var(--rule);
  background: var(--ink-1);
}
.mark-btn { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%; }
.mark { display: block; width: 48px; height: 48px; }
.mark-lg { width: 220px; height: 220px; }
.side-nav { display: contents; }
.nav-btn {
  position: relative;
  width: 60px; min-height: 54px;
  display: grid; justify-items: center; align-content: center; gap: 5px;
  border-radius: var(--r-plate);
  color: var(--cream-3);
  font: 500 var(--t-label)/1 var(--f-text);
  letter-spacing: .04em;
  transition: color var(--dur), background-color var(--dur);
}
.nav-btn svg.i { width: 20px; height: 20px; }
.nav-btn:hover { color: var(--cream); background: var(--ink-2); }
.nav-btn:active { background: var(--ink-3); }
.nav-btn[aria-current="true"] { color: var(--cream); }
.nav-btn[aria-current="true"]::before {
  content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 2px; background: var(--brass);
}
.side-foot { margin-top: auto; }

/* main column */
.main {
  grid-area: main;
  min-width: 0;
  display: grid;
  grid-template-rows: var(--top) auto auto minmax(0, 1fr);
}

.top {
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px 0 24px;
  border-bottom: 1px solid var(--rule);
  min-width: 0;
}
.top-mark { display: none; }
.wordmark {
  font: 600 var(--t-h1)/1 var(--f-display);
  letter-spacing: -.02em;
  margin: 0;
  white-space: nowrap;
}
.wordmark span { font-weight: 400; font-style: italic; color: var(--cream-2); }
.ca {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--rule-2); border-radius: var(--r-plate);
  color: var(--cream-2); font-size: var(--t-small);
}
.ca:hover { border-color: var(--cream-4); color: var(--cream); }
.search {
  flex: 1 1 260px; max-width: 420px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  background: var(--ink-1); border: 1px solid var(--rule); border-radius: var(--r-plate);
  color: var(--cream-3);
  transition: border-color var(--dur);
}
.search:focus-within { border-color: var(--brass); color: var(--cream); }
.search { min-width: 0; }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--cream); font-size: var(--t-body); }
.search input::placeholder { color: var(--cream-4); }
.search kbd { font: 500 var(--t-label)/1 var(--f-text); color: var(--cream-4); border: 1px solid var(--rule-2); border-radius: 3px; padding: 3px 5px; }

/* buttons — enamel plates */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: var(--r-plate);
  font: 500 var(--t-body)/1 var(--f-text);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--dur), color var(--dur), border-color var(--dur), opacity var(--dur);
}
.btn-primary { background: var(--cream); color: var(--ink); }
.btn-primary:hover { background: #fff6e4; }
.btn-primary:active { background: var(--cream-2); }
.btn-primary:disabled { background: var(--ink-3); color: var(--cream-4); }
.btn-line { border: 1px solid var(--rule-2); color: var(--cream); }
.btn-line:hover { border-color: var(--cream-3); background: var(--ink-2); }
.btn-line:active { background: var(--ink-3); }
.btn-line:disabled { color: var(--cream-4); border-color: var(--rule); background: none; }
.btn-ghost { color: var(--cream-2); padding: 0 10px; }
.btn-ghost:hover { color: var(--cream); background: var(--ink-2); }
.btn-sm { height: 30px; padding: 0 10px; font-size: var(--t-small); }
.btn-block { width: 100%; height: 46px; font-size: 15px; }
.btn[aria-busy="true"] { cursor: progress; }
.wallet-icon { width: 18px; height: 18px; border-radius: 4px; }

/* ticker strip: latest launches, still — it only changes when a real launch arrives */
.strip {
  display: flex; align-items: center; gap: 18px;
  min-height: 46px; padding: 8px 24px;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  white-space: nowrap;
}
.strip-stat { display: flex; align-items: baseline; gap: 8px; }
.strip-stat b { font: 600 18px/1 var(--f-display); letter-spacing: -.01em; }
.strip-sep { width: 1px; height: 20px; background: var(--rule); flex: none; }
.strip-list { display: flex; gap: 6px; overflow: hidden; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 10px 0 4px;
  border: 1px solid var(--rule); border-radius: var(--r-thumb);
  font-size: var(--t-small); color: var(--cream-2);
  flex: none;
}
.chip:hover { border-color: var(--rule-2); color: var(--cream); background: var(--ink-1); }
.chip img, .chip .thumb { width: 20px; height: 20px; border-radius: 2px; }
.chip .age { color: var(--cream-4); }
.strip-empty { color: var(--cream-4); font-size: var(--t-small); }

/* featured: BuffetPad's own coin, labelled as such, numbers from DexScreener */
.feat {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 28px);
  min-height: 70px; padding: 12px 24px;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(var(--brass-lo), var(--brass-lo)), var(--ink-1);
  box-shadow: inset 2px 0 0 var(--brass);
  min-width: 0;
}
.feat-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 auto; }
.feat-id img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--ink); flex: none; }
.feat-id > span { display: grid; min-width: 0; }
.feat-tag { font: 500 var(--t-label)/1.2 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: var(--brass); white-space: nowrap; }
.feat-id b { font: 600 20px/1.15 var(--f-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat-id .sym { color: var(--cream-3); font-size: var(--t-small); }
.feat-stats { display: flex; gap: clamp(14px, 1.8vw, 28px); margin: 0; }
.feat-stats div { display: grid; gap: 4px; }
.feat-stats dd { margin: 0; font: 600 17px/1 var(--f-text); }
.feat-stats .up { color: var(--ok); }
.feat-stats .down { color: var(--bad); }
.feat-note { color: var(--cream-2); font-size: var(--t-small); flex: 1 1 auto; min-width: 0; }
.feat-ca {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; margin-left: auto;
  border: 1px solid var(--rule-2); border-radius: var(--r-plate); color: var(--cream); font-size: var(--t-small); flex: none;
}
.feat-ca:hover { border-color: var(--brass); background: var(--ink-2); }
.feat-ca:active { background: var(--ink-3); }
.feat-ca svg.i { width: 15px; height: 15px; color: var(--cream-3); }
.feat-act { display: flex; gap: 8px; flex: none; }

/* the board: three ruled columns */
.board {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.col { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border-right: 1px solid var(--rule); }
.col:last-child { border-right: 0; }
.col-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--rule);
}
.col-head h2 { margin: 0; font: 600 var(--t-h3)/1.1 var(--f-display); letter-spacing: -.01em; }
.col-head .count { color: var(--cream-3); font-size: var(--t-small); }
.col-head .src { margin-left: auto; }
.col-body { overflow-y: auto; overscroll-behavior: contain; }
.tabs-m { display: none; }

.row {
  width: 100%;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  position: relative;
  transition: background-color var(--dur);
}
.row:hover { background: var(--ink-1); }
.row:active { background: var(--ink-2); }
.row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brass); opacity: 0; }
.row.arrived::before { animation: arrive 1600ms var(--ease-out) both; }
@keyframes arrive { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.row.arrived { animation: arrive-bg 1600ms var(--ease-out) both; }
@keyframes arrive-bg { from { background: var(--brass-lo); } to { background: transparent; } }
.thumb {
  width: 44px; height: 44px; border-radius: var(--r-thumb);
  object-fit: cover; background: var(--ink-3);
  display: grid; place-items: center;
  font: 600 15px/1 var(--f-display); color: var(--cream-3);
}
.row-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.row-name b { font-weight: 500; font-size: var(--t-row); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-name .sym { color: var(--cream-3); font-size: var(--t-small); flex: none; }
.row-meta { display: flex; gap: 10px; margin-top: 3px; color: var(--cream-4); font-size: var(--t-small); white-space: nowrap; overflow: hidden; }
.row-meta .addr { color: var(--cream-3); }
.row-side { display: grid; justify-items: end; gap: 4px; font-size: var(--t-small); color: var(--cream-2); }
.row-side .big { font-size: var(--t-row); color: var(--cream); font-weight: 500; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font: 500 var(--t-label)/1 var(--f-text); letter-spacing: .04em;
  color: var(--cream-3);
  padding: 3px 6px; border: 1px solid var(--rule-2); border-radius: 2px;
}
.tag svg.i { width: 12px; height: 12px; }
.tag-ok { color: var(--ok); border-color: rgba(143, 199, 156, .3); }
.tag-warn { color: var(--warn); border-color: rgba(227, 184, 96, .3); }

/* states: empty, locked, error, loading — set in the column's own voice */
.state { padding: 28px 24px; max-width: 360px; }
.state h3 { margin: 0 0 6px; font: 600 18px/1.2 var(--f-display); }
.state p { margin: 0 0 14px; color: var(--cream-3); font-size: var(--t-small); line-height: 1.55; }
.state .i-big { width: 28px; height: 28px; color: var(--cream-4); margin-bottom: 12px; }
.state-bad h3 { color: var(--bad); }
.ghost-row { height: 67px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 0 20px; }
.ghost-row i { display: block; height: 44px; border-radius: var(--r-thumb); background: var(--ink-2); }
.ghost-row span { display: block; height: 10px; width: 60%; background: var(--ink-2); border-radius: 2px; }

/* footer: the non-affiliation line never leaves the surface */
.foot {
  grid-area: foot;
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px;
  border-top: 1px solid var(--rule);
  background: var(--ink-1);
  font-size: var(--t-label); color: var(--cream-3);
  white-space: nowrap; overflow: hidden;
}
.foot .disclaim { overflow: hidden; text-overflow: ellipsis; }
.foot .disclaim b { color: var(--cream-2); font-weight: 500; }
.foot .shortx { display: none; }
.feed { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.feed svg.i { width: 13px; height: 13px; }
.feed[data-s="live"] { color: var(--ok); }
.feed[data-s="retry"] { color: var(--warn); }
.feed[data-s="down"] { color: var(--bad); }
.foot a { color: var(--cream-2); text-decoration: none; }
.foot a:hover { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }

/* ───────────────────────── drawer ───────────────────────── */
.scrim { position: fixed; inset: 0; background: rgba(6, 5, 4, .62); z-index: 20; opacity: 0; transition: opacity 240ms var(--ease-out); }
.scrim.on { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: var(--drawer);
  z-index: 21;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--ink-1);
  border-left: 1px solid var(--rule-2);
  transform: translateX(100%);
  transition: transform 320ms var(--ease-out);
}
.drawer.on { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 24px; border-bottom: 1px solid var(--rule); }
.drawer-head h2 { margin: 0; font: 600 var(--t-h2)/1.05 var(--f-display); letter-spacing: -.02em; }
.drawer-head .x { margin-left: auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-plate); color: var(--cream-3); }
.drawer-head .x:hover { color: var(--cream); background: var(--ink-2); }
.drawer-body { overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 22px; }
.drawer-foot { padding: 14px 24px 18px; border-top: 1px solid var(--rule); }

/* ledger rows inside drawers */
.ledger { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); }
.ledger dt, .ledger dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-small); }
.ledger dt { color: var(--cream-3); padding-right: 18px; }
.ledger dd { text-align: right; color: var(--cream); display: flex; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.ledger dd .addr { overflow: hidden; text-overflow: ellipsis; }
.ledger dd a { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ledger dd a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ledger .total dt, .ledger .total dd { border-bottom: 0; border-top: 1px solid var(--rule-2); font-weight: 500; color: var(--cream); font-size: var(--t-body); }
.icon-btn { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: var(--r-plate); color: var(--cream-3); flex: none; }
.icon-btn:hover { color: var(--cream); background: var(--ink-3); }
.icon-btn svg.i { width: 15px; height: 15px; }

/* token detail */
.tk-head { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 14px; }
.tk-head .thumb { width: 88px; height: 88px; font-size: 26px; }
.tk-head h3 { margin: 0; font: 600 28px/1.05 var(--f-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.tk-head .sym { color: var(--cream-3); margin-top: 4px; }
.tk-desc { color: var(--cream-2); font-size: var(--t-small); margin: 0 0 12px; overflow-wrap: anywhere; }
.sect { margin: 18px 0 8px; display: flex; align-items: baseline; gap: 8px; }
.sect h4 { margin: 0; font: 600 16px/1.2 var(--f-display); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-small); text-decoration: none; }
.pair:hover b { text-decoration: underline; text-underline-offset: 3px; }
.pair .r { text-align: right; }
.pair .dim { color: var(--cream-3); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* create form */
.form { display: grid; gap: 12px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f-row-3 { grid-template-columns: 96px 1fr 1fr; align-items: end; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { display: flex; justify-content: space-between; }
.field .hint { color: var(--cream-4); font-size: var(--t-label); }
.input {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--ink); border: 1px solid var(--rule-2); border-radius: var(--r-plate);
  color: var(--cream); font-size: var(--t-body);
  transition: border-color var(--dur), background-color var(--dur);
}
textarea.input { height: 52px; padding: 9px 12px; resize: none; line-height: 1.4; }
.input::placeholder { color: var(--cream-4); }
.input:hover { border-color: var(--cream-4); }
.input:focus-visible { outline: none; border-color: var(--brass); background: var(--ink-2); }
.input:disabled { color: var(--cream-4); border-color: var(--rule); }
.input[aria-invalid="true"] { border-color: var(--bad); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ab9f88' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 18px; padding-right: 30px; }
.drop {
  width: 96px; height: 96px;
  display: grid; place-items: center; text-align: center;
  border: 1px dashed var(--rule-2); border-radius: var(--r-thumb);
  color: var(--cream-3); font-size: var(--t-label);
  overflow: hidden; position: relative;
  transition: border-color var(--dur), color var(--dur), background-color var(--dur);
}
.drop:hover, .drop.over { border-color: var(--brass); color: var(--cream); background: var(--ink-2); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop[aria-invalid="true"] { border-color: var(--bad); }
.checks { display: grid; gap: 2px; }
.check { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; padding: 5px 0; cursor: pointer; font-size: var(--t-small); }
.check input { appearance: none; width: 18px; height: 18px; margin: 1px 0 0; border: 1px solid var(--rule-2); border-radius: 2px; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--cream); border-color: var(--cream); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 1.5px solid var(--ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.check b { font-weight: 500; display: block; }
.check small { color: var(--cream-3); font-size: var(--t-small); }
details.more summary { cursor: pointer; color: var(--cream-2); font-size: var(--t-small); padding: 4px 0; list-style: none; display: flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary svg.i { width: 14px; height: 14px; transition: transform var(--dur); }
details.more[open] summary svg.i { transform: rotate(90deg); }
details.more .form { margin-top: 8px; }
.err { color: var(--bad); font-size: var(--t-small); margin: 0; }
.note { color: var(--cream-3); font-size: var(--t-small); margin: 8px 0 0; line-height: 1.5; }
.locked { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: var(--r-plate); color: var(--cream-2); font-size: var(--t-small); line-height: 1.5; }
.locked svg.i { margin-top: 1px; color: var(--cream-3); }

/* launch progress — a ledger that fills, not a spinner */
.steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; }
.steps li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: var(--t-small); color: var(--cream-4); }
.steps li svg.i { width: 16px; height: 16px; }
.steps li[data-s="now"] { color: var(--cream); }
.steps li[data-s="done"] { color: var(--cream-2); }
.steps li[data-s="done"] svg.i { color: var(--ok); }
.steps li[data-s="fail"] { color: var(--bad); }
.steps li .dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; margin: 0 auto; }
.steps li[data-s="now"] .dot { background: var(--brass); border-color: var(--brass); }

/* docs */
.dtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin: -18px -24px 16px; padding: 0 16px; overflow-x: auto; }
.dtab { height: 42px; padding: 0 10px; color: var(--cream-3); font-size: var(--t-small); font-weight: 500; position: relative; white-space: nowrap; }
.dtab:hover { color: var(--cream); }
.dtab[aria-selected="true"] { color: var(--cream); }
.dtab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brass); }
.doc h3 { margin: 0 0 8px; font: 600 20px/1.2 var(--f-display); letter-spacing: -.01em; }
.doc p { margin: 0 0 10px; color: var(--cream-2); font-size: var(--t-small); line-height: 1.6; }
.doc p b { color: var(--cream); font-weight: 500; }
.doc code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12px; color: var(--cream); background: var(--ink-2); padding: 1px 4px; border-radius: 2px; }
.doc ol, .doc ul { margin: 0 0 10px; padding-left: 18px; color: var(--cream-2); font-size: var(--t-small); line-height: 1.6; }
.diagram { width: 100%; height: auto; margin: 4px 0 10px; }
.diagram text { font-family: var(--f-text); }

/* legacy */
.legacy-head { display: grid; justify-items: center; text-align: center; gap: 6px; margin-bottom: 10px; }
.legacy-head h3 { margin: 8px 0 0; font: 600 30px/1.05 var(--f-display); letter-spacing: -.02em; }
.legacy-head .dates { color: var(--cream-3); letter-spacing: .08em; }
blockquote.q { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--rule); }
blockquote.q p { margin: 0 0 4px; font: italic 400 17px/1.35 var(--f-display); color: var(--cream); }
blockquote.q cite { font-style: normal; font-size: var(--t-label); color: var(--cream-3); letter-spacing: .02em; }
blockquote.q cite a { color: inherit; }
.give { display: grid; gap: 0; margin-top: 6px; }
.give a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: var(--t-small); }
.give a:hover { color: var(--brass-hi); }
.give a small { color: var(--cream-3); display: block; }

/* wallet dialog */
dialog.modal {
  width: min(380px, calc(100vw - 24px));
  padding: 0; border: 1px solid var(--rule-2); border-radius: var(--r-plate);
  background: var(--ink-1); color: var(--cream);
}
dialog.modal::backdrop { background: rgba(6, 5, 4, .7); }
.modal-head { display: flex; align-items: center; padding: 16px 12px 12px 20px; border-bottom: 1px solid var(--rule); }
.modal-head h2 { margin: 0; font: 600 22px/1 var(--f-display); }
.modal-head .x { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; color: var(--cream-3); border-radius: var(--r-plate); }
.modal-head .x:hover { color: var(--cream); background: var(--ink-2); }
.modal-body { padding: 8px 20px 18px; }
.wallet-opt {
  width: 100%; display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--rule); text-align: left; text-decoration: none;
}
.wallet-opt img { width: 32px; height: 32px; border-radius: 7px; }
.wallet-opt .ph { width: 32px; height: 32px; border-radius: 7px; border: 1px dashed var(--rule-2); display: grid; place-items: center; color: var(--cream-4); }
.wallet-opt:hover b { color: var(--brass-hi); }
.wallet-opt:disabled { opacity: .55; }
.wallet-opt small { color: var(--cream-3); font-size: var(--t-small); }
.menu { position: fixed; z-index: 30; min-width: 200px; background: var(--ink-1); border: 1px solid var(--rule-2); border-radius: var(--r-plate); padding: 4px; }
.menu button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 2px; font-size: var(--t-small); color: var(--cream-2); text-align: left; }
.menu button:hover { background: var(--ink-3); color: var(--cream); }

dialog.film-dlg { width: min(1120px, calc(100vw - 24px)); }
dialog.film-dlg video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--foot) + 16px); z-index: 40;
  transform: translate(-50%, 8px); opacity: 0;
  background: var(--cream); color: var(--ink);
  padding: 9px 14px; border-radius: var(--r-plate);
  font-size: var(--t-small); font-weight: 500;
  transition: opacity var(--dur), transform var(--dur);
  pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }

/* the one authored moment: the board is struck — rules draw, then the wordmark rises */
.strike .top, .strike .strip, .strike .col-head { animation: rise 560ms var(--ease-out) both; }
.strike .strip { animation-delay: 80ms; }
.strike .col:nth-child(1) .col-head { animation-delay: 140ms; }
.strike .col:nth-child(2) .col-head { animation-delay: 190ms; }
.strike .col:nth-child(3) .col-head { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────────────────────── narrow ───────────────────────── */
@media (max-width: 1100px) {
  .search kbd { display: none; }
  .wordmark { font-size: 26px; }
}
@media (max-width: 860px) {
  :root { --side: 0px; --top: 56px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto 58px; grid-template-areas: "main" "foot" "side"; }
  .side { flex-direction: row; justify-content: space-around; padding: 0 4px; border-right: 0; border-top: 1px solid var(--rule); }
  .side .mark-btn { display: none; }
  .side-foot { margin: 0; }
  .nav-btn { width: auto; flex: 1; min-height: 54px; }
  .nav-btn[aria-current="true"]::before { left: 25%; right: 25%; top: -1px; bottom: auto; width: auto; height: 2px; }
  .top { padding: 0 12px; gap: 10px; }
  .top-mark { display: grid; place-items: center; }
  .top-mark .mark { width: 36px; height: 36px; }
  .wordmark { font-size: 22px; }
  .search { flex: 1 1 auto; max-width: none; height: 36px; }
  .top .create-btn { display: none; }
  .strip { padding: 0 12px; min-height: 42px; gap: 12px; }
  .strip .strip-sep, .strip .strip-list { display: none; }
  .top .ca { display: none; }
  .feat { flex-wrap: wrap; gap: 10px 14px; padding: 10px 12px; }
  .feat-stats { order: 3; width: 100%; justify-content: space-between; }
  .feat-stats .hide-s { display: none; }
  .feat-ca { margin-left: auto; }
  .feat-act { order: 4; width: 100%; }
  .feat-act .btn { flex: 1; }
  .feat-note { order: 3; width: 100%; }
  .board { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .tabs-m { display: flex; border-bottom: 1px solid var(--rule); }
  .tabs-m button { flex: 1; height: 42px; color: var(--cream-3); font-size: var(--t-small); font-weight: 500; position: relative; }
  .tabs-m button[aria-selected="true"] { color: var(--cream); }
  .tabs-m button[aria-selected="true"]::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 2px; background: var(--brass); }
  .col { display: none; border-right: 0; }
  .col.show { display: grid; }
  .col-head { display: none; }
  .row { padding: 10px 12px; }
  .foot { padding: 6px 12px; white-space: normal; font-size: var(--t-label); line-height: 1.35; }
  .foot .links { display: none; }
  .foot .long { display: none; }
  .foot .shortx { display: inline; }
  .foot .feed .t { display: none; }
  .drawer { bottom: 0; }
  .drawer-body { padding: 16px 16px 20px; }
  .drawer-head { padding: 12px 10px 12px 16px; }
  .drawer-foot { padding: 12px 16px 16px; }
  .dtabs { margin: -16px -16px 14px; padding: 0 8px; }
  .wallet-btn .t { display: none; }
  .wallet-btn { padding: 0 10px; }
}
@media (max-width: 380px) {
  .wordmark { display: none; }
  .f-row { grid-template-columns: 1fr; }
  .f-row-3 { grid-template-columns: 96px 1fr; }
  .f-row-3 .field:last-child { grid-column: 1 / -1; }
  .ca .t { display: none; }
}
@media (max-height: 560px) and (min-width: 861px) {
  .strip { display: none; }
  .main { grid-template-rows: var(--top) 0 auto minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0ms !important; scroll-behavior: auto !important; }
  .row.arrived { background: var(--brass-lo); }
}
