/* NIGHTCAP — app.css (shell). Tokens from mockup/v1/DESIGN.md. Build width 1920; 1280–2560 scales with --u.
   Routes: use the tokens + .rule-* classes below; route files contain ZERO border/outline declarations,
   never set their own max-width, side padding or page background (the shell frame owns them). */

/* ---------- 1. tokens ---------- */
:root {
  /* scale unit: 1 design px at 1920 (LUAT 50). Below 1280 the phone layout uses 1px. */
  --u: calc(100vw / 1920);

  /* colours (DESIGN.md §3) */
  --paper: #0F1426;
  --ground: #0F1426;
  --nav-ground: #0E1424;
  --surface: #172038;
  --surface-end: #131A2F;
  --surface-2: #1C1F30;
  --text: #F3ECDA;
  --secondary: #A7A3B8;
  --hairline: #2C3656;
  --action: #E4CC2D;
  --action-hi: #F0DA4A;
  --stopped: #FF9D36;
  --stopped-frame: #D1802B;
  --warm: #3A2A1A;
  --stream: linear-gradient(90deg, #E4CC2D, #FF9D36);

  /* fonts (DESIGN.md §2) */
  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --f-mono: "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* type scale @1920 (USER FIX type scale: body 14–16, mono 13–16; only Bodoni larger) */
  --fs-hero: calc(71 * var(--u));
  --fs-title: calc(50 * var(--u));
  --fs-h2: calc(34 * var(--u));
  --fs-h3: max(16px, calc(22 * var(--u)));
  --fs-lede: max(14px, calc(17 * var(--u)));
  --fs-body: max(13px, calc(16 * var(--u)));
  --fs-small: max(12px, calc(14 * var(--u)));
  --fs-label: max(12px, calc(13 * var(--u)));
  --fs-mono: max(12px, calc(15 * var(--u)));
  --fs-mono-lg: max(16px, calc(25 * var(--u)));

  /* spacing + frame (USER FIX FRAME: gutters 33 / 33 @1920) */
  --gutter: calc(33 * var(--u));
  --gap: calc(24 * var(--u));
  --gap-lg: calc(62 * var(--u));
  --section: calc(72 * var(--u));      /* section gap 48–96 */
  --nav-h: calc(76 * var(--u));

  /* radii (DESIGN.md §4) */
  --r-panel: calc(14 * var(--u));
  --r-input: calc(12 * var(--u));
  --r-strip: calc(10 * var(--u));
  --r-row: calc(8 * var(--u));
  --r-pill: 999px;

  /* rules (BORDER_TABLE → DESIGN.md §4b). Hairlines never vanish: max(1px, …) */
  --rule-hair: max(1px, calc(1 * var(--u)));
  --rule-frame: max(1px, calc(2 * var(--u)));
  --rule-c: var(--hairline);
  --rule-c-dim: #242C48;
  --rule-c-nav: #283250;
  --rule-c-action: var(--action);
  --rule-c-stopped: var(--stopped-frame);
  --rule-c-lit: #93877A;
  --rule-c-open: #374A6D; /* DESIGN §4: expanded stream row + progress strip (measured) */

  /* shadow + motion (DESIGN.md §4 / §10) */
  --shadow-panel: 0 calc(18 * var(--u)) calc(48 * var(--u)) rgba(3, 7, 18, .24);
  --ease-pour: cubic-bezier(.22, .61, .36, 1);
  --ease-settle: cubic-bezier(.33, 0, .2, 1);
  --t-pour: 700ms;
  --t-fill: 600ms;
  --t-settle: 450ms;
  --t-open: 220ms;
  --t-pop: 180ms;
  --rt-dur: 240ms;
  --rt-nudge: 12px;
}
html[data-rt-dir=back] { --rt-nudge: -12px; }

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
:where(button, input, select, textarea) { border: 0; font: inherit; color: inherit; background: none; }
html { background: var(--paper); color-scheme: dark; scrollbar-color: #3A4466 var(--paper); overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; position: relative; overflow-x: clip;
  background: var(--paper); color: var(--text);
  font: 400 var(--fs-body)/1.45 var(--f-body); letter-spacing: .011em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: flex; flex-direction: column;
}
::selection { background: rgba(228, 204, 45, .35); color: var(--text); }
img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.008em; }
h1 { font-size: var(--fs-title); line-height: 1.1; }
h2 { font-size: var(--fs-h2); line-height: 1.15; }
p { text-wrap: pretty; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 100; padding: 8px 14px; background: var(--action); color: var(--paper); border-radius: 8px; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 3. page atmosphere (DESIGN.md §3b) — one ground for every route ---------- */
body::before {               /* atm-pool + atm-dusk + atm-vignette + lower-right bounce; scrolls with the page */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse calc(1400 * var(--u)) calc(800 * var(--u)) at var(--pool-x, 60%) var(--pool-y, calc(380 * var(--u))),
      rgba(58, 42, 26, .85) 0%, rgba(38, 29, 37, .5) 42%, rgba(15, 20, 38, 0) 74%),
    radial-gradient(ellipse calc(1100 * var(--u)) calc(520 * var(--u)) at 85% calc(100% - 360 * var(--u)),
      rgba(228, 204, 45, .07), rgba(228, 204, 45, 0) 70%),
    radial-gradient(ellipse 120% 90% at 50% 40%, rgba(7, 12, 31, 0) 55%, rgba(7, 12, 31, .6) 100%),
    linear-gradient(180deg, #0F1426 0%, rgba(28, 30, 51, .6) 50%, #0F1426 100%);
}
body:not([data-route="home"]):not([data-route=""]) { --pool-x: 40%; --pool-y: calc(120 * var(--u)); }
body::after {                /* atm-grain, fixed, 3 % */
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* local amber bloom a route may put behind its mechanism art */
.atm-bounce { background: radial-gradient(closest-side, rgba(228, 204, 45, .08), rgba(228, 204, 45, 0)); }

/* ---------- 4. page frame (USER FIX FRAME) ---------- */
.nc-page { flex: 1 0 auto; width: 100%; padding-inline: var(--gutter); position: relative; }
.nc-page > :first-child { margin-top: 0; }
.bleed { margin-inline: calc(-1 * var(--gutter)); }    /* only where the home mockup runs edge to edge */
.section { margin-top: var(--section); }
.panel { background: linear-gradient(180deg, var(--surface), var(--surface-end)); box-shadow: var(--shadow-panel); }
.eyebrow { font: 600 var(--fs-label)/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); }
.lede { font-size: var(--fs-lede); color: var(--text); }
.muted { color: var(--secondary); }
.source-line { font-size: var(--fs-small); color: var(--secondary); }
.boundary { font-size: var(--fs-body); color: var(--text); }
.demo-tag { font: 500 var(--fs-label)/1 var(--f-mono); color: var(--secondary); }

/* buttons + chips (DESIGN.md §5) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: max(40px, calc(52 * var(--u))); padding: 0 calc(28 * var(--u)); border-radius: var(--r-input); font: 500 max(14px, calc(18 * var(--u)))/1 var(--f-body); text-decoration: none; cursor: pointer; transition: transform var(--t-pop) var(--ease-settle), opacity var(--t-pop); }
.btn--primary { background: var(--action); color: var(--paper); }
.btn--primary:hover { background: var(--action-hi); }
.btn--link { padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 1px; color: var(--text); }
.chip { display: inline-flex; align-items: center; min-height: max(30px, calc(34 * var(--u))); padding: 0 calc(22 * var(--u)); border-radius: var(--r-pill); font: 500 max(12px, calc(15 * var(--u)))/1 var(--f-body); color: var(--text); background: transparent; cursor: pointer; }
.chip[aria-pressed="true"], .chip.is-on { background: var(--action); color: var(--paper); }
.status { display: inline-flex; align-items: center; padding: .25em .8em; border-radius: var(--r-pill); font: 600 var(--fs-label)/1.1 var(--f-body); letter-spacing: .06em; text-transform: uppercase; }
.status--pouring { color: var(--action); }
.status--stopped { color: var(--stopped); }
.status--standby { color: var(--secondary); }

/* ---------- 5. BORDERS — one class per framed component (BORDER_TABLE.md / DESIGN.md §4b) ---------- */
/* nav / footer */
.rule-nav { border-bottom: var(--rule-hair) solid var(--rule-c-nav); }
.rule-footer { border-top: var(--rule-hair) solid var(--rule-c-nav); }
.rule-footer-col { border-right: var(--rule-hair) solid var(--rule-c-dim); }
/* pills: connect wallet (action) · buy / chips / CA cell (hairline) · status */
.rule-pill-action { border: var(--rule-hair) solid var(--rule-c-action); border-radius: var(--r-pill); }
.rule-pill, .rule-chip { border: var(--rule-hair) solid var(--rule-c); border-radius: var(--r-pill); }
.rule-chip[aria-pressed="true"], .rule-chip.is-on { border-color: var(--rule-c-action); }
.rule-status { border: var(--rule-hair) solid currentColor; border-radius: var(--r-pill); }
/* panels + cards: 2 px hairline, radius 14 */
.rule-panel,
.rule-room-card, .rule-corridor-card, .rule-room-drawer,
.rule-calc-panel, .rule-preview-panel, .rule-formula-card, .rule-outcome-table,
.rule-lookup-panel, .rule-level-panel, .rule-fact-panel, .rule-nightcaps-table, .rule-chart-panel, .rule-source-panel,
.rule-stream-table, .rule-explain-panel,
.rule-trace-panel, .rule-debate-panel, .rule-evidence-panel, .rule-refund-ledger, .rule-night-shape-panel, .rule-queue-panel, .rule-close-steps-panel,
.rule-streams-panel, .rule-detail-panel, .rule-activity-strip, .rule-history-panel, .rule-totals-panel, .rule-ledger-panel, .rule-returned-panel, .rule-wallet-panel {
  border: var(--rule-frame) solid var(--rule-c); border-radius: var(--r-panel);
}
.rule-card { border: var(--rule-frame) solid var(--rule-c); border-radius: var(--r-panel); }
/* inner boxes: 2 px, radius 12 */
.rule-metric, .rule-address-input, .rule-recent-card, .rule-expanded-row, .rule-step-card {
  border: var(--rule-frame) solid var(--rule-c); border-radius: var(--r-input);
}
/* light boxes: 1 px, radius 12 / 10 */
.rule-input, .rule-tx-strip, .rule-wallet-bar { border: var(--rule-hair) solid var(--rule-c); border-radius: var(--r-input); }
.rule-progress-strip { border: var(--rule-frame) solid var(--rule-c); border-radius: var(--r-strip); }
.rule-expanded-row, .rule-progress-strip { border-color: var(--rule-c-open); }
.rule-allocation-card { border: var(--rule-hair) solid var(--rule-c); border-radius: var(--r-strip); }
.rule-popover { border: var(--rule-hair) solid var(--rule-c); border-radius: var(--r-panel); }
/* an input frame wraps the whole control: put the class on the wrapper, the <input> inside has no border */
.rule-input > input, .rule-address-input > input { width: 100%; min-width: 0; background: transparent; }
.rule-input:focus-within, .rule-address-input:focus-within { border-color: var(--rule-c-action); }
/* row rules: bottom only, never on the last row (no doubled edge against the panel frame) */
.rule-row, .rule-drawer-row, .rule-formula-rule, .rule-outcome-row, .rule-table-row, .rule-ledger-row, .rule-stream-row {
  border-bottom: var(--rule-hair) solid var(--rule-c);
}
:is(.rule-row, .rule-drawer-row, .rule-formula-rule, .rule-outcome-row, .rule-table-row, .rule-ledger-row, .rule-stream-row):last-child { border-bottom: 0; }
.rule-rule-top { border-top: var(--rule-hair) solid var(--rule-c); }
.rule-divider { border-left: var(--rule-hair) solid var(--rule-c); }
.rule-divider-dashed { border-top: var(--rule-hair) dashed var(--rule-c); }
/* selected / expanded frames */
.rule-selected { border: var(--rule-frame) solid var(--rule-c-action); border-radius: var(--r-input); }
.rule-selected-stopped { border: var(--rule-frame) solid var(--rule-c-stopped); border-radius: var(--r-row); }
.rule-expanded-lit { border: var(--rule-hair) solid var(--rule-c-lit); border-radius: var(--r-input); }
.rule-expanded-action { border: var(--rule-frame) solid var(--rule-c-action); border-radius: var(--r-input); }
/* a row that turns selected keeps its box size: reserve the frame transparently */
.rule-selectable { border: var(--rule-frame) solid transparent; border-radius: var(--r-input); }
.rule-selectable.is-selected, .rule-selectable[aria-selected="true"] { border-color: var(--rule-c-action); }
.rule-selectable.is-stopped-selected { border-color: var(--rule-c-stopped); }

/* ---------- 6. NAV (chrome/nav.html, N4) ---------- */
.nc-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h); padding: 0 calc(48 * var(--u));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: var(--nav-ground); color: var(--text);
  font: 500 max(13px, calc(15 * var(--u)))/1 var(--f-body);
}
.nc-nav nav { display: flex; align-items: center; gap: calc(34 * var(--u)); white-space: nowrap; }
.nc-nav .nc-nav__right { justify-content: flex-end; gap: calc(25 * var(--u)); }
.nc-nav a { color: var(--text); text-decoration: none; }
.nc-nav a:hover { color: var(--action-hi); }
.nc-nav a.is-active, .nc-nav a[aria-current="page"] { color: var(--action); }
.nc-nav .brand { display: flex; align-items: center; gap: calc(13 * var(--u)); font: 700 max(22px, calc(31 * var(--u)))/1 var(--f-display); letter-spacing: .02em; color: var(--action); }
.nc-nav .brand:hover { color: var(--action); }
.nc-nav .brand img { width: max(36px, calc(44 * var(--u))); height: max(36px, calc(44 * var(--u))); object-fit: contain; }
.nc-nav .wallet, .nc-nav .buy { display: inline-flex; align-items: center; padding: calc(10 * var(--u)) calc(17 * var(--u)); font: inherit; line-height: 1; white-space: nowrap; }
.nc-nav .wallet { color: var(--text); background: transparent; }
.nc-nav .wallet:hover { background: rgba(228, 204, 45, .1); }
.nc-nav .wallet.is-connected { font-family: var(--f-mono); font-size: max(12px, calc(14 * var(--u))); }
.buy { color: var(--secondary); background: var(--surface); text-decoration: none; }
.buy.is-disabled, .buy[aria-disabled="true"] { cursor: not-allowed; }
.buy[data-launch-done] { color: var(--paper); background: var(--action); border-color: var(--action); font-weight: 600; cursor: pointer; }
.buy[data-launch-done]:hover { background: var(--action-hi); }
.is-soon[aria-disabled="true"] { opacity: .72; cursor: default; }
.nc-menu-btn { display: none; padding: 8px 16px; color: var(--text); font: 500 14px/1 var(--f-body); }
.nc-drawer { position: absolute; top: 100%; left: 0; right: 0; background: var(--nav-ground); padding: 8px 20px 20px; box-shadow: 0 18px 40px rgba(3, 7, 18, .5); }
.nc-drawer nav { flex-direction: column; align-items: stretch; gap: 0; }
.nc-drawer a { display: block; padding: 14px 4px; font: 500 17px/1.2 var(--f-body); }
.nc-drawer a + a { border-top: 1px solid var(--rule-c); }

/* wallet popover (EIP-6963) */
.nc-wallet-pop {
  position: absolute; top: calc(100% + 8px); right: calc(48 * var(--u)); z-index: 70;
  width: max(300px, calc(380 * var(--u))); padding: 18px; display: grid; gap: 12px;
  background: linear-gradient(180deg, var(--surface), var(--surface-end)); box-shadow: var(--shadow-panel);
  font: 400 14px/1.4 var(--f-body); color: var(--text);
  transition: opacity var(--t-pop) var(--ease-settle), translate var(--t-pop) var(--ease-settle);
}
@starting-style { .nc-wallet-pop:not([hidden]) { opacity: 0; translate: 0 -6px; } }
.nc-wallet-pop h4 { font: 600 13px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); margin: 0; }
.nc-wallet-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nc-wallet-pop li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); }
.nc-wallet-pop li img { width: 22px; height: 22px; border-radius: 5px; }
.nc-wallet-pop .w-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nc-wallet-pop .w-act { font-weight: 500; color: var(--action); text-decoration: none; white-space: nowrap; }
.nc-wallet-pop .w-addr { font: 500 15px/1.2 var(--f-mono); word-break: break-all; }
.nc-wallet-pop .w-row { display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-mono); font-size: 13px; }
.nc-wallet-pop .w-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.nc-wallet-pop .w-btns button { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.nc-wallet-pop .w-btns button.is-primary { background: var(--action); color: var(--paper); }
.nc-wallet-pop .w-note { font-size: 12px; color: var(--secondary); }

/* ---------- 7. FOOTER (chrome/footer.html, F2) ---------- */
.nc-foot {
  margin-top: var(--section);
  min-height: calc(230 * var(--u)); padding: calc(30 * var(--u)) calc(48 * var(--u)) calc(44 * var(--u));
  display: grid; grid-template-columns: calc(120 * var(--u)) 1fr 1fr 1fr 2fr; gap: calc(34 * var(--u));
  background: var(--nav-ground); color: var(--text);
  font: 400 max(13px, calc(15 * var(--u)))/1.55 var(--f-body);
}
.nc-foot > img { width: max(36px, calc(40 * var(--u))); height: max(36px, calc(40 * var(--u))); object-fit: contain; }
.nc-foot section { padding-right: calc(28 * var(--u)); min-width: 0; }
.nc-foot h3 { margin: 0 0 calc(10 * var(--u)); font: 600 max(16px, calc(19 * var(--u)))/1.2 var(--f-display); }
.nc-foot a, .nc-foot p { display: block; margin: 0; color: var(--text); text-decoration: none; }
.nc-foot a:hover { color: var(--action); }
.nc-ca { display: flex; flex-wrap: wrap; align-items: center; gap: calc(10 * var(--u)); margin-top: calc(16 * var(--u)); }
.nc-foot .nc-ca .buy, .nc-ca__cell, .nc-ca__copy { display: inline-flex; align-items: center; padding: calc(8 * var(--u)) calc(16 * var(--u)); font: 500 max(12px, calc(14 * var(--u)))/1.1 var(--f-mono); white-space: nowrap; }
.nc-foot .nc-ca .buy { font-family: var(--f-body); color: var(--secondary); }
.nc-foot .nc-ca .buy[data-launch-done] { color: var(--paper); }
.nc-ca__copy { color: var(--secondary); }
.nc-ca__copy[data-launch-done] { color: var(--text); cursor: pointer; }
.nc-ca__label { margin-top: calc(10 * var(--u)) !important; font: 500 max(12px, calc(14 * var(--u)))/1.3 var(--f-mono); }
.nc-foot .nc-ca__explorer { margin-top: 6px; color: var(--action); font-size: var(--fs-small); }
.nc-foot .nc-foot__sources { margin-top: calc(12 * var(--u)); font-size: var(--fs-small); color: var(--secondary); }

/* ---------- 8. MOTION (DESIGN.md §10) — "the pour": light flows in, settles; nothing bounces ---------- */
/* pour: an SVG stream draws from its source with a bright head (stroke-dashoffset is paint-only) */
.nc-pour { stroke-dasharray: var(--len, 1200); stroke-dashoffset: 0; }
.nc-pour.is-pouring { animation: nc-pour var(--t-pour) var(--ease-pour) both; }
@keyframes nc-pour { from { stroke-dashoffset: var(--len, 1200); } to { stroke-dashoffset: 0; } }
/* shimmer: a stream's light breathes at a rate tied to HYPE/s (--sdk-rate set by app.js) */
.nc-shimmer { animation: nc-shimmer var(--sdk-rate, 3.2s) ease-in-out infinite; }
@keyframes nc-shimmer { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }
/* stir: a stopped stream recoils once (orange), then lies still */
.nc-stir { animation: nc-stir 900ms var(--ease-settle) both; transform-origin: left center; }
@keyframes nc-stir { 0% { transform: scaleX(1); opacity: 1; } 35% { transform: scaleX(.86); opacity: .55; } 100% { transform: scaleX(1); opacity: 1; } }
/* fill: bars and levels fill like liquid from their origin */
.nc-fill { transform-origin: left center; }
.nc-fill.is-filling { animation: nc-fill var(--t-fill) var(--ease-pour) both; }
.nc-fill-y { transform-origin: center bottom; }
.nc-fill-y.is-filling { animation: nc-fill-y var(--t-fill) var(--ease-pour) both; }
@keyframes nc-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes nc-fill-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* lamp: reveal-on-scroll = a warm light passes over the block once; the content is never hidden */
.nc-lamp { position: relative; isolation: isolate; }
.nc-lamp::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1; opacity: 0;
  background: linear-gradient(180deg, rgba(228, 204, 45, 0) 0%, rgba(228, 204, 45, .10) 45%, rgba(255, 157, 54, .05) 60%, rgba(228, 204, 45, 0) 100%);
  background-size: 100% 300%; background-position: 0 100%;
}
.nc-lamp.is-lit::after { animation: nc-lamp 1100ms var(--ease-pour) 1 both; }
@keyframes nc-lamp { 0% { opacity: 0; background-position: 0 100%; } 30% { opacity: 1; } 100% { opacity: 0; background-position: 0 0%; } }
/* hover: the edge of a card warms (glow layer opacity only) */
.nc-warm { position: relative; }
.nc-warm::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; box-shadow: 0 0 calc(18 * var(--u)) rgba(228, 204, 45, .22), inset 0 0 0 1px rgba(228, 204, 45, .35); transition: opacity var(--t-settle) var(--ease-settle); }
.nc-warm:hover::before, .nc-warm.is-selected::before { opacity: 1; }
/* live tick: the digit that changed glints amber for a moment */
.nc-tick { transition: color 0s; }
.nc-tick.is-ticked { animation: nc-glint 900ms ease-out 1; }
@keyframes nc-glint { 0% { opacity: .55; } 100% { opacity: 1; } }
/* expand: rows / drawers open with height from 0 via grid rows (no layout jump on others) */
.nc-expand { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-open) var(--ease-settle), opacity var(--t-open); opacity: 0; }
.nc-expand > * { overflow: hidden; min-height: 0; }
.nc-expand.is-open { grid-template-rows: 1fr; opacity: 1; }
/* art parallax: art only, never content */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  @media (prefers-reduced-motion: no-preference) {
    .nc-drift { animation: nc-drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes nc-drift { from { transform: translateY(calc(24 * var(--u))); } to { transform: translateY(calc(-24 * var(--u))); } }
  }
}
/* loop video art helper (muted, inline): poster stays when reduced motion */
.nc-video { display: block; width: 100%; height: auto; }
/* route change = the kit View Transition, tuned in tokens (--rt-dur 240ms, --rt-nudge 12px) */

@media (prefers-reduced-motion: reduce) {
  .nc-pour.is-pouring, .nc-shimmer, .nc-stir, .nc-fill.is-filling, .nc-fill-y.is-filling, .nc-lamp.is-lit::after, .nc-tick.is-ticked { animation: none !important; }
  .nc-expand, .nc-warm::before, .nc-wallet-pop { transition: none !important; }
}

/* ---------- 9. phone layout 360–1279 (LUAT 71) ---------- */
@media (max-width: 1279.98px) {
  :root {
    --u: 1px;
    --gutter: 20px;
    --gap: 16px;
    --gap-lg: 28px;
    --section: 48px;
    --nav-h: 64px;
    --fs-hero: clamp(36px, 9vw, 56px);
    --fs-title: clamp(30px, 7.4vw, 44px);
    --fs-h2: clamp(24px, 5.6vw, 32px);
    --fs-lede: 16px;
    --fs-body: 15px;
    --fs-small: 13px;
    --fs-mono: 14px;
    --fs-mono-lg: 20px;
    --r-panel: 14px;
  }
  .nc-page { max-width: calc(760px + 2 * var(--gutter)); margin-inline: auto; }
  .bleed { margin-inline: calc(-1 * var(--gutter)); }
  .nc-nav { padding: 0 16px; grid-template-columns: auto 1fr; gap: 12px; position: sticky; }
  .nc-nav .nc-nav__left, .nc-nav .nc-nav__route, .nc-nav .buy { display: none; }
  .nc-nav .brand { grid-column: 1; grid-row: 1; font-size: 22px; gap: 10px; }
  .nc-nav .brand img { width: 36px; height: 36px; }
  .nc-nav .nc-nav__right { grid-column: 2; gap: 14px; font-size: 14px; }
  .nc-nav .wallet { padding: 8px 12px; font-size: 13px; }
  .nc-menu-btn { display: inline-flex; }
  .nc-wallet-pop { right: 12px; left: 12px; width: auto; }
  .nc-foot { grid-template-columns: 1fr; gap: 22px; padding: 28px 20px 36px; min-height: 0; }
  .nc-foot section { padding-right: 0; max-width: 760px; }
  .rule-footer-col { border-right: 0; }
  .nc-foot h3 { margin-bottom: 8px; }
  .nc-ca { gap: 8px; }
  .nc-foot .nc-ca .buy, .nc-ca__cell, .nc-ca__copy { padding: 8px 14px; font-size: 13px; }
}
.nc-drawer__wallet { display: none; }
@media (max-width: 479.98px) {
  .nc-nav .nc-nav__right .wallet { display: none; }
  .nc-drawer .nc-drawer__wallet { display: inline-flex; margin-top: 12px; padding: 10px 18px; color: var(--text); font: 500 15px/1 var(--f-body); }
  .nc-nav .nc-soc { font-size: 13px; }
  .nc-nav .nc-nav__right { gap: 10px; }
  .nc-nav .brand span { font-size: 18px; }
  .nc-nav .wallet span { font-size: 12px; }
}
@media (max-width: 389.98px) {
  .nc-nav { padding: 0 10px; gap: 8px; }
  .nc-nav .brand { gap: 6px; }
  .nc-nav .brand span { font-size: 16px; }
  .nc-nav .brand img { width: 36px; height: 36px; }
  .nc-nav .nc-nav__right { gap: 8px; }
  .nc-nav .wallet { padding: 7px 9px; }
  .nc-menu-btn { padding: 7px 10px; }
}
