/* Doorbell: near-black and porch-light amber. Gambarino sets headline words only; Switzer sets the UI and every figure. */
:root {
  --bg: #09090b;
  --bg-2: #0d0d10;
  --panel: #111114;
  --panel-2: #16161a;
  --panel-3: #1d1d22;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f3f1ec;
  --muted: #a3a099;
  --faint: #6f6c66;
  --amber: #ffb020;
  --amber-2: #ffc95c;
  --amber-ink: #140d02;
  --up: #45d48c;
  --down: #ff6a5c;
  --side: 236px;
  --bar: 68px;
  --r-xl: 28px;
  --r-l: 22px;
  --r-m: 14px;
  --serif: 'Gambarino', 'Iowan Old Style', Georgia, serif;
  --sans: 'Switzer', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 20px); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
code { font: inherit; }
::selection { background: var(--amber); color: var(--amber-ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--amber); color: var(--amber-ink); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }

.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 40;
  background: linear-gradient(90deg, #ff8a00, var(--amber), var(--amber-2));
  transform: scaleX(0); transform-origin: 0 50%;
  box-shadow: 0 0 12px rgba(255, 176, 32, 0.6);
}

/* ---------- buttons, pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: -0.005em; cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.2s, box-shadow 0.25s, border-color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn-amber { background: var(--amber); color: var(--amber-ink); box-shadow: 0 8px 26px -10px rgba(255, 176, 32, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-amber:hover { background: #ffbe45; box-shadow: 0 10px 34px -8px rgba(255, 176, 32, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-ghost { border-color: var(--line-2); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.22); }
.btn-s { height: 38px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(9, 9, 11, 0.6);
  font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.18); }
.pill[data-state="loading"] i { animation: blink 1.1s ease-in-out infinite; }
.pill[data-state="ok"] { color: var(--text); }
.pill[data-state="ok"] i { background: var(--up); box-shadow: 0 0 0 3px rgba(69, 212, 140, 0.18); animation: breathe 2.4s ease-in-out infinite; }
.pill[data-state="stale"] i { background: var(--amber); }
.pill[data-state="error"] { color: var(--down); }
.pill[data-state="error"] i { background: var(--down); box-shadow: 0 0 0 3px rgba(255, 106, 92, 0.18); }
@keyframes blink { 50% { opacity: 0.3; } }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px rgba(69, 212, 140, 0.06); } }

/* ---------- app shell ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 650; font-size: 19px; letter-spacing: -0.02em; }
.brand img { border-radius: 10px; }

.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 30;
  display: flex; flex-direction: column; padding: 20px 16px 18px;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, #0c0c0f, #09090b);
}
.side > .brand { padding: 4px 8px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px;
  border-radius: 12px; color: var(--muted); font-weight: 500; transition: color 0.2s, background-color 0.2s;
}
.side-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.side-nav a[aria-current] { color: var(--text); background: rgba(255, 176, 32, 0.09); }
.side-nav a[aria-current]::before { content: ''; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.side-nav svg, .tabbar svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a[aria-current] svg { color: var(--amber); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.netcard { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.netcard-k { color: var(--faint); font-size: 12px; }
.netcard b { color: var(--text); font-size: 15px; font-weight: 600; }

.socials { display: flex; gap: 8px; }
.social {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line-2); color: var(--text); background: rgba(255, 255, 255, 0.02);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.social svg { width: 17px; height: 17px; }
a.social:hover { background: rgba(255, 176, 32, 0.1); border-color: rgba(255, 176, 32, 0.4); color: var(--amber-2); }
.social.inert { opacity: 0.35; cursor: not-allowed; }

.bar {
  position: sticky; top: 0; z-index: 20; margin-left: var(--side); height: var(--bar);
  display: flex; align-items: center; gap: 16px; padding: 0 40px;
  background: rgba(9, 9, 11, 0.78); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand-m { display: none; }
.ca { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.ca-k { color: var(--amber); font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; }
.ca-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.ca[data-state="absent"] .ca-v { color: var(--muted); font-weight: 400; }
.ca.copied .ca-v { color: var(--amber-2); }
.ca [data-ca-icon] { display: inline-flex; }
.ca [data-ca-icon] svg { width: 16px; height: 16px; }
.bar-socials { margin-left: auto; }

main { margin-left: var(--side); padding: 28px 40px 56px; }
main > * { max-width: 1140px; margin-left: auto; margin-right: auto; }

/* ---------- hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); align-items: end;
  min-height: 580px; border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(70% 90% at 88% 22%, rgba(255, 160, 32, 0.12), transparent 60%),
    linear-gradient(180deg, #0f0f12, #0a0a0c);
  border: 1px solid var(--line);
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.hero-copy { position: relative; z-index: 2; align-self: center; padding: 56px 8px 56px 54px; display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 {
  margin-top: 22px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(46px, 5.2vw, 78px); line-height: 0.98; letter-spacing: -0.018em; text-wrap: balance;
}
.lede { margin-top: 22px; max-width: 450px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hint { margin-top: 28px; display: inline-flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13.5px; }
.hint-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink 1.6s ease-in-out infinite; }

.scene { position: relative; z-index: 1; width: 100%; aspect-ratio: 560 / 520; align-self: end; }
.layer { position: absolute; inset: 0; will-change: transform; }
.layer > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hero > .layer.wall { inset: -4%; z-index: 0; -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.45) 36%, #000 62%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.45) 36%, #000 62%); }
.house-no { font-family: var(--serif); font-size: 21px; fill: #2a1a04; opacity: 0.78; }
.mat-word { font-family: var(--sans); font-weight: 700; font-size: 9.5px; letter-spacing: 0.32em; fill: #6e5126; }

.door { position: absolute; left: 30%; top: 30%; width: 34.643%; height: 60.385%; perspective: 1200px; perspective-origin: 30% 50%; pointer-events: none; }
.leaf {
  width: 100%; height: 100%; transform-origin: 0 50%;
  transition: transform 1.05s var(--ease), filter 1.05s var(--ease);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.leaf svg { display: block; width: 100%; height: 100%; }
.scene.open .leaf { transform: rotateY(66deg); filter: brightness(0.62); }
.room { transition: filter 0.6s; }
.scene.open .room { filter: brightness(1.12) saturate(1.1); }
.spill { transition: opacity 0.9s var(--ease); }
.scene.open .spill { opacity: 0.2; }
.pool { transition: opacity 0.9s; opacity: 0.55; }
.scene.open .pool { opacity: 1; }
.fan { animation: hum 5s ease-in-out infinite; }
@keyframes hum { 50% { opacity: 0.88; } }

.bell { cursor: pointer; outline: none; }
.bell * { transform-box: fill-box; transform-origin: center; }
.bell-halo { transition: opacity 0.3s, transform 0.4s var(--ease); animation: halo 2.6s ease-in-out infinite; }
.bell:hover .bell-halo, .bell:focus-visible .bell-halo { opacity: 0.55; transform: scale(1.25); }
.bell:focus-visible .bell-ring { stroke: #fff; }
.bell-btn { transition: transform 0.12s; }
.bell.press .bell-btn { transform: scale(0.8); }
.bell.press .bell-ring { stroke: #fff2cf; }
@keyframes halo { 50% { opacity: 0.4; } }
.ripple {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  border: 2px solid var(--amber); pointer-events: none; z-index: 4;
  animation: ripple 1.1s var(--ease) forwards;
}
@keyframes ripple { from { transform: scale(1); opacity: 0.9; } to { transform: scale(14); opacity: 0; } }

.lamp-halo { animation: flicker 7s steps(1) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes flicker { 0%, 100% { opacity: 1; } 41% { opacity: 0.86; } 42% { opacity: 1; } 77% { opacity: 0.93; } 78% { opacity: 1; } }
.moth {
  position: absolute; left: 78.57%; top: 30.38%; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%;
  background: #fff0c8; box-shadow: 0 0 6px 1px rgba(255, 176, 32, 0.8);
  animation: orbit var(--d, 6s) linear infinite, flutter 0.35s ease-in-out infinite alternate;
}
.m1 { --r: 26px; --d: 5.2s; }
.m2 { --r: 40px; --d: 8.4s; animation-direction: reverse, alternate; }
.m3 { --r: 18px; --d: 3.9s; width: 2px; height: 2px; }
.m4 { --r: 54px; --d: 11s; animation-delay: -4s, 0s; }
@keyframes orbit { from { transform: rotate(0deg) translateX(var(--r)) translateY(2px); } 50% { transform: rotate(180deg) translateX(calc(var(--r) * 0.7)) translateY(-3px); } to { transform: rotate(360deg) translateX(var(--r)) translateY(2px); } }
@keyframes flutter { to { opacity: 0.35; } }

/* ---------- spotlight, shafts ---------- */
.spot { position: relative; isolation: isolate; }
.spot::after {
  content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 176, 32, 0.075), transparent 62%);
  opacity: 0; transition: opacity 0.35s;
}
.spot:hover::after { opacity: 1; }
.shaft::before {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  top: -30%; left: 34%; width: 34%; height: 95%;
  background: linear-gradient(180deg, rgba(255, 190, 80, 0.34), rgba(255, 176, 32, 0.08) 55%, transparent);
  transform: rotate(22deg); filter: blur(22px); opacity: 0.8;
}

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 30px; min-height: 318px; display: flex; flex-direction: column; justify-content: flex-end; }
.card > * { position: relative; z-index: 1; }
.card-amber {
  background: radial-gradient(120% 90% at 100% 0%, #ffd06a, transparent 55%), linear-gradient(160deg, #ffbb33, #ff9f0f);
  color: var(--amber-ink); justify-content: space-between;
}
.card-amber h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 3.4vw, 48px); line-height: 1; letter-spacing: -0.015em; }
.card-amber p { margin-top: 16px; font-size: 15.5px; line-height: 1.55; color: rgba(20, 13, 2, 0.8); max-width: 440px; }
.card-amber .card-link { color: var(--amber-ink); }
.card-dark { background: linear-gradient(180deg, #141418, #0f0f12); border: 1px solid var(--line); }
.card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.card-dark p { margin-top: 8px; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.card-link { margin-top: 16px; display: inline-flex; gap: 6px; font-weight: 600; font-size: 14.5px; color: var(--amber-2); }
.card-link span { transition: transform 0.25s var(--ease); }
.card-link:hover span { transform: translateX(4px); }

.queue { position: relative; height: 128px; margin-bottom: auto; }
.queue::after { content: ''; position: absolute; left: 0; right: 64px; bottom: 30px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.queue-door {
  position: absolute; right: 18px; bottom: 30px; width: 46px; height: 74px; border-radius: 4px 4px 0 0;
  border: 2px solid var(--amber); border-bottom: 0;
  background: linear-gradient(180deg, rgba(255, 176, 32, 0.32), rgba(255, 176, 32, 0.06));
  box-shadow: 0 0 30px -6px rgba(255, 176, 32, 0.7);
  animation: doorpulse 1.6s ease-in-out infinite;
}
.queue-door i { position: absolute; right: 7px; top: 38px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
@keyframes doorpulse { 0%, 100% { box-shadow: 0 0 30px -6px rgba(255, 176, 32, 0.6); } 88% { box-shadow: 0 0 42px 0 rgba(255, 176, 32, 0.95); } }
.queue span {
  position: absolute; bottom: 36px; left: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--text); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
  animation: walk 11.2s linear infinite;
}
.queue span:nth-child(2) { animation-delay: 0s; }
.queue span:nth-child(3) { animation-delay: -1.6s; }
.queue span:nth-child(4) { animation-delay: -3.2s; background: var(--amber-2); }
.queue span:nth-child(5) { animation-delay: -4.8s; }
.queue span:nth-child(6) { animation-delay: -6.4s; }
.queue span:nth-child(7) { animation-delay: -8s; background: var(--amber-2); }
.queue span:nth-child(8) { animation-delay: -9.6s; }
@keyframes walk {
  0% { transform: translateX(0); opacity: 0; }
  8% { opacity: 1; }
  86% { opacity: 1; transform: translateX(var(--qx, 220px)) scale(1); }
  100% { transform: translateX(calc(var(--qx, 220px) + 26px)) scale(0.4); opacity: 0; }
}

.street { display: flex; align-items: flex-end; gap: 12px; height: 128px; margin-bottom: auto; padding-bottom: 22px; }
.street span {
  position: relative; flex: 1; max-width: 40px; height: 62px; border-radius: 3px 3px 0 0;
  background: #1b1b20; border: 1px solid var(--line-2); border-bottom: 0;
  animation: window 6s steps(1) infinite;
}
.street span::before { content: ''; position: absolute; left: 4px; right: 4px; top: -12px; height: 8px; border-radius: 2px; background: #26262c; }
.street span::after { content: ''; position: absolute; right: 6px; top: 30px; width: 4px; height: 4px; border-radius: 50%; background: #3a3a42; }
.street span:nth-child(1) { animation-delay: -1s; height: 56px; }
.street span:nth-child(2) { animation-delay: -3.4s; }
.street span:nth-child(4) { animation-delay: -2.2s; height: 58px; }
.street span:nth-child(5) { animation-delay: -4.6s; }
.street span:nth-child(6) { animation-delay: -0.4s; height: 54px; }
.street .ours {
  height: 82px; max-width: 50px; animation: none;
  background: linear-gradient(180deg, rgba(255, 176, 32, 0.5), rgba(255, 176, 32, 0.12)); border-color: var(--amber);
  box-shadow: 0 0 34px -4px rgba(255, 176, 32, 0.7);
}
.street .ours::before { background: #ffcf73; box-shadow: 0 0 14px rgba(255, 176, 32, 0.9); }
.street .ours::after { background: var(--amber); }
@keyframes window { 0%, 100% { box-shadow: none; } 50% { box-shadow: inset 0 0 0 100px rgba(255, 176, 32, 0.12); } }

/* ---------- section heads ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3vw, 40px); line-height: 1.04; letter-spacing: -0.012em; }
.sec-sub { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.arrows { display: flex; gap: 8px; flex: none; }
.arrow {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); transition: background-color 0.2s, opacity 0.2s, border-color 0.2s;
}
.arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arrow:hover:not(:disabled) { background: rgba(255, 176, 32, 0.1); border-color: rgba(255, 176, 32, 0.4); }
.arrow:disabled { opacity: 0.3; cursor: default; }

/* ---------- rules ---------- */
.rules { margin-top: 64px; }
.rules-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 42px) / 4); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.rules-row::-webkit-scrollbar { display: none; }
.rule {
  scroll-snap-align: start; min-height: 238px; padding: 24px; border-radius: var(--r-l);
  background: linear-gradient(180deg, #131317, #0f0f12); border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: border-color 0.25s, transform 0.35s var(--ease);
}
.rule:hover { border-color: rgba(255, 176, 32, 0.28); transform: translateY(-3px); }
.rule > * { position: relative; z-index: 1; }
.glyph { width: 120px; height: 56px; overflow: visible; }
.rule h3 { margin-top: 28px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.rule p { margin-top: 7px; color: var(--muted); font-size: 14.2px; line-height: 1.55; }
.g-line { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.g-dim { fill: none; stroke: var(--faint); stroke-width: 3; stroke-linecap: round; }
.g-slash { fill: none; stroke: var(--amber); stroke-width: 3.5; stroke-linecap: round; }
.g-amber { fill: var(--amber); filter: drop-shadow(0 0 8px rgba(255, 176, 32, 0.5)); }
.g-amberfill { fill: var(--amber); }
.g-base { fill: #26262c; }
.g-hole { fill: var(--amber-ink); }
.g-holeline { stroke: var(--amber-ink); stroke-width: 3; stroke-linecap: round; }
.g-dot { fill: var(--amber); }

/* ---------- tape ---------- */
.tape {
  margin-top: 30px; display: flex; align-items: center; gap: 18px; height: 54px; padding: 0 6px 0 18px;
  border-radius: 16px; background: var(--panel); border: 1px solid var(--line); overflow: hidden;
}
.tape-k { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--amber-2); font-size: 13.5px; font-weight: 600; }
.tape-k i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.tape-view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tape-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-track.static { animation: none; }
.tape-half { display: flex; }
.tape-item { display: inline-flex; align-items: baseline; gap: 9px; padding: 0 22px; white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.tape-item b { font-weight: 650; }
.tape-item span { color: var(--muted); }
.tape-item .up { color: var(--up); }
.tape-item .down { color: var(--down); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- most rung ---------- */
.hot { margin-top: 64px; }
.trend-view { position: relative; overflow: hidden; margin: -6px; padding: 6px; }
.trend-view[data-end="false"] { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.trend-view[data-start="false"][data-end="false"] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 88%, transparent); }
.trend-view[data-start="false"][data-end="true"] { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%); mask-image: linear-gradient(90deg, transparent, #000 10%); }
.trend-track { display: flex; gap: 18px; transition: transform 0.7s var(--ease); }
.tcard { flex: none; width: 212px; display: flex; flex-direction: column; border-radius: 22px; }
.tcard .logo { width: 212px; height: 212px; border-radius: 22px; transition: transform 0.45s var(--ease), box-shadow 0.45s; }
.tcard:hover .logo { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(255, 176, 32, 0.5); }
.tcard .name { margin-top: 14px; display: flex; gap: 8px; align-items: baseline; font-weight: 600; font-size: 15.5px; min-width: 0; }
.tcard .name .faint { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.tcard .nmw { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .cap { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-variant-numeric: tabular-nums; }
.tcard .cap b { font-size: 21px; font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; }
.chg { font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); color: var(--muted); white-space: nowrap; }
.chg.up { color: var(--up); background: rgba(69, 212, 140, 0.12); }
.chg.down { color: var(--down); background: rgba(255, 106, 92, 0.12); }
.skelcard .logo { background: var(--panel-2); }

/* ---------- logos, skeletons ---------- */
.logo { position: relative; display: block; flex: none; overflow: hidden; background: var(--panel-2); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo .blank { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, rgba(255, 176, 32, 0.25), transparent 46%), var(--panel-3); }
.sk, .sk-logo {
  background: linear-gradient(90deg, #16161a 0%, #212127 50%, #16161a 100%) 0 0 / 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
span.sk, i.sk, b.sk { display: inline-block; height: 0.95em; width: 70px; border-radius: 6px; vertical-align: middle; color: transparent; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- board ---------- */
.board { margin-top: 64px; }
.board-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; }
.tabs button {
  position: relative; height: 46px; padding: 0 14px; border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 550; font-size: 15px; transition: color 0.2s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.search {
  display: flex; align-items: center; gap: 10px; width: 340px; height: 42px; margin-bottom: 8px; padding: 0 8px 0 14px;
  border-radius: 12px; background: var(--panel); border: 1px solid var(--line); transition: border-color 0.2s, box-shadow 0.2s;
}
.search:focus-within { border-color: rgba(255, 176, 32, 0.5); box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.08); }
.search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; width: 0; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 14.5px; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line-2); color: var(--faint); font: 500 12px var(--sans); }
.gate-note, .board-note { margin-top: 12px; padding: 11px 14px; border-radius: 12px; font-size: 14px; }
.gate-note[data-tone="warn"], .board-note { background: rgba(255, 176, 32, 0.08); border: 1px solid rgba(255, 176, 32, 0.25); color: var(--amber-2); }
.gate-note[data-tone="ok"] { background: rgba(69, 212, 140, 0.08); border: 1px solid rgba(69, 212, 140, 0.25); color: var(--up); }

.table { margin-top: 6px; }
.thead, .trow { display: grid; grid-template-columns: 52px minmax(0, 2.3fr) repeat(5, minmax(0, 1fr)); align-items: center; column-gap: 14px; }
.thead { height: 42px; padding: 0 14px; color: var(--faint); font-size: 13px; font-weight: 500; }
.thead span { text-align: right; }
.thead .th-coin { grid-column: 1 / 3; text-align: left; }
.trow { position: relative; min-height: 76px; padding: 12px 14px; border-radius: 16px; transition: background-color 0.2s; }
#rows .trow { background-image: linear-gradient(var(--line), var(--line)); background-size: calc(100% - 28px) 1px; background-position: 50% 0; background-repeat: no-repeat; }
#rows .trow:first-child { background-image: none; }
a.trow:hover { background: rgba(255, 255, 255, 0.025); }
.trow > * { position: relative; z-index: 1; }
.trow .logo { width: 46px; height: 46px; border-radius: 13px; }
.col.id { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.col.id .line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sym { font-weight: 650; font-size: 16px; white-space: nowrap; }
.nm { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.cell { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; font-size: 15px; white-space: nowrap; }
.cell .lbl { display: none; }
.cell .n { display: inline-block; padding: 2px 6px; margin-right: -6px; border-radius: 8px; }
.c-change .n.up { color: var(--up); }
.c-change .n.down { color: var(--down); }
.n.flash-up { animation: fup 0.9s ease-out; }
.n.flash-down { animation: fdown 0.9s ease-out; }
@keyframes fup { from { background: rgba(69, 212, 140, 0.28); } to { background: transparent; } }
@keyframes fdown { from { background: rgba(255, 106, 92, 0.28); } to { background: transparent; } }
.trow.enter { animation: rowin 0.55s var(--ease) both; }
@keyframes rowin { from { opacity: 0; transform: translateY(8px); } }
.trow.own {
  margin: 4px 0 8px; border: 1px solid rgba(255, 176, 32, 0.3);
  background: linear-gradient(90deg, rgba(255, 176, 32, 0.12), rgba(255, 176, 32, 0.02) 55%), var(--panel);
  box-shadow: 0 10px 40px -24px rgba(255, 176, 32, 0.6);
}
.trow.own .sym::after { content: 'Pinned'; margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: var(--amber); color: var(--amber-ink); font-size: 11px; font-weight: 700; vertical-align: 2px; }
.trow.own[data-state="absent"] .n { color: var(--faint); letter-spacing: 0.2em; }
.brand-logo { background: none; }
.empty { padding: 34px 14px; color: var(--muted); text-align: center; }
#rows.err .n { color: var(--faint); }

/* ---------- footer ---------- */
.foot { margin-top: 80px; padding-top: 34px; border-top: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand p { margin: 14px 0 18px; color: var(--muted); max-width: 320px; }
.foot-nav { display: flex; flex-direction: column; gap: 12px; min-width: 160px; }
.foot-nav span { color: var(--faint); font-size: 13px; }
.foot-nav a { color: var(--text); font-weight: 500; }
.foot-nav a:hover { color: var(--amber-2); }
.foot-base { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; color: var(--faint); font-size: 12px; }

.tabbar { display: none; }

/* ---------- reveals ---------- */
.js [data-reveal] { opacity: 0; }

/* ---------- widths ---------- */
@media (max-width: 1240px) {
  .rules-row { grid-auto-columns: calc((100% - 28px) / 3); }
  .thead, .trow { grid-template-columns: 48px minmax(0, 2fr) repeat(5, minmax(0, 1fr)); column-gap: 10px; }
}
@media (max-width: 1100px) {
  main { padding: 24px 28px 48px; }
  .bar { padding: 0 28px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); min-height: 540px; }
  .hero-copy { padding-left: 40px; }
  .bento { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .card-amber { grid-column: 1 / -1; min-height: 260px; }
  .thead span:nth-child(5), .trow .c-volume { display: none; }
  .thead, .trow { grid-template-columns: 48px minmax(0, 2fr) repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 999px) {
  :root { --bar: auto; }
  .side { display: none; }
  .bar { margin-left: 0; flex-wrap: wrap; row-gap: 10px; padding: 12px 18px; }
  .brand-m { display: inline-flex; font-size: 17px; }
  .bar-socials { order: 2; }
  .bar-socials .social { width: 36px; height: 36px; }
  .ca { order: 3; flex: 1 1 100%; gap: 10px; flex-wrap: wrap; padding: 9px 12px; row-gap: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
  .ca-v { flex: 1 1 200px; white-space: normal; word-break: break-all; font-size: 14px; }
  main { margin-left: 0; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: 150px; }
  .tabbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 64px; padding: 6px; border-radius: 20px;
    background: rgba(17, 17, 20, 0.86); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
    border: 1px solid var(--line-2); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.8);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 14px; color: var(--faint); font-size: 11.5px; font-weight: 550; transition: color 0.2s, background-color 0.2s; }
  .tabbar a[aria-current] { color: var(--text); background: rgba(255, 176, 32, 0.1); }
  .tabbar a[aria-current] svg { color: var(--amber); }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-copy { padding: 34px 24px 6px; }
  .scene { max-width: 520px; justify-self: center; margin-top: -8px; }
  .hero > .layer.wall { -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.5) 40%, #000 70%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.5) 40%, #000 70%); }
  .hint { display: none; }
  .rules-row { grid-auto-columns: calc((100% - 14px) / 2); }
  .board-tools { flex-direction: column-reverse; align-items: stretch; border-bottom: 0; gap: 10px; }
  .tabs { border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .search { width: 100%; margin-bottom: 0; }
}
@media (max-width: 760px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; padding: 24px; }
  .card-amber { min-height: 0; }
  .card-amber p { margin-bottom: 4px; }
  .queue, .street { height: 112px; }
  .rules { margin-top: 48px; }
  .rules-row { grid-auto-columns: 78%; }
  .hot, .board { margin-top: 48px; }
  .tcard { width: 168px; }
  .tcard .logo { width: 168px; height: 168px; }
  .tcard .cap b { font-size: 18px; }
  .sec-head { margin-bottom: 16px; }
  .thead { display: none; }
  .trow {
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-rows: auto auto auto;
    column-gap: 12px; row-gap: 2px; padding: 14px 10px;
  }
  .trow .logo { grid-column: 1; grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px; align-self: center; }
  .trow .col.id { grid-column: 2 / 4; grid-row: 1 / 3; align-self: center; }
  .trow .c-price { grid-column: 4; grid-row: 1; }
  .trow .c-change { grid-column: 4; grid-row: 2; font-size: 13.5px; }
  .trow .c-mc, .trow .c-volume, .trow .c-liquidity { display: flex; flex-direction: column; grid-row: 3; text-align: left; margin-top: 10px; font-size: 13.5px; }
  .trow .c-mc { grid-column: 2; }
  .trow .c-volume { grid-column: 3; }
  .trow .c-liquidity { grid-column: 4; text-align: right; align-items: flex-end; }
  .trow .c-mc .lbl, .trow .c-volume .lbl, .trow .c-liquidity .lbl { display: block; font-style: normal; color: var(--faint); font-size: 11.5px; font-weight: 500; }
  .trow .c-mc .n, .trow .c-volume .n, .trow .c-liquidity .n { padding-left: 0; padding-right: 0; margin-right: 0; }
  .trow .sym { font-size: 15px; }
  .trow.own .sym::after { margin-left: 6px; }
  .nm { font-size: 13px; }
  .foot { margin-top: 56px; }
}
@media (max-width: 400px) {
  .hero h1 { font-size: 40px; }
  .lede { font-size: 16px; }
  .cta .btn { flex: 1 1 100%; }
  .trow .col.id .nm { display: none; }
  main { padding-left: 12px; padding-right: 12px; }
  .tabs button { padding: 0 9px; font-size: 14px; }
  .trow .c-price { font-size: 14px; }
  .trow { column-gap: 10px; padding: 14px 6px; }
  .tcard { width: 150px; }
  .tcard .logo { width: 150px; height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .tape-track { animation: none !important; }
  .tape-view { overflow-x: auto; scrollbar-width: none; }
  .moth { display: none; }
  .js [data-reveal] { opacity: 1; }
}

/* ---------- 404 ---------- */
.lost { display: grid; min-height: 100vh; place-items: center; background: radial-gradient(60% 50% at 50% 30%, rgba(255, 176, 32, 0.1), transparent 70%), var(--bg); }
.lost-main { margin: 0; padding: 40px 24px; max-width: 480px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.lost-main img { border-radius: 28px; filter: drop-shadow(0 18px 40px rgba(255, 176, 32, 0.25)); }
.lost h1 { font-family: var(--serif); font-weight: 400; font-size: 58px; line-height: 1; letter-spacing: -0.015em; }
.lost p { color: var(--muted); font-size: 16.5px; }
