/* 爐火 / Camp Fire — late-night radio aesthetic.
   Two themes: night (default) = warm near-black + amber.
              day             = cream paper + terracotta. */

:root,
[data-theme="night"] {
  --bg:        #0c0a08;       /* warm near-black, ~ Tailwind stone-950 */
  --bg-2:      #1f1a13;       /* elevated surfaces (1.4:1 vs bg) */
  --ink:       #ece4d3;
  --ink-dim:   #9a8e75;
  --ink-faint: #7e7158;       /* 4.3:1 vs bg — label/kicker only */
  --rule:      #3d3326;       /* 1.7:1 — decorative dividers only */
  --rule-2:    #5e5142;       /* 2.7:1 — visible button / panel borders */
  --accent:    #e7a04a;
  --accent-2:  #f0b35e;
  --accent-dim:#a06a23;
  --danger:    #e87867;       /* 7.0:1 vs bg, AAA */
  --danger-dim:#82362c;
  --good:      #7faf6c;
  --modal-veil:rgba(12, 10, 8, 0.85);

  --serif: ui-serif, "Iowan Old Style", "Source Serif Pro", "Source Serif 4", "Noto Serif TC", Georgia, serif;
  --sans:  system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
  --mono:  ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Major-third type scale (1.25), base 16px. Apply via var(--t-*). */
  --t-xs:   11px;   /* mono labels, kickers */
  --t-sm:   13px;   /* secondary text, hints */
  --t-base: 16px;   /* body */
  --t-md:   20px;   /* h2, step-title */
  --t-lg:   25px;
  --t-xl:   31px;
  --t-2xl:  39px;   /* h1, hero */
  --t-3xl:  49px;   /* cooldown-timer */
  --t-4xl:  61px;   /* call timer */
}

[data-theme="day"] {
  --bg:        #faf3df;       /* paper cream */
  --bg-2:      #dccba0;       /* elevated surfaces — cards, modals, code (1.4:1 vs bg) */
  --ink:       #2a221a;
  --ink-dim:   #6c5a3e;
  --ink-faint: #8a7950;       /* 3.9:1 vs bg — label/kicker only */
  --rule:      #c2b48a;       /* 1.4:1 — decorative dividers only */
  --rule-2:    #998a60;       /* 2.3:1 — visible button / panel borders */
  --accent:    #b6601a;
  --accent-2:  #c87331;
  --accent-dim:#7c4112;
  --danger:    #a13524;
  --danger-dim:#6e2014;
  --good:      #587f3b;
  --modal-veil:rgba(243, 235, 216, 0.88);
}

/* Theme scopes for nested elements need a paint surface, otherwise the section
   inherits its parent's bg even though its variables changed. Keeping this
   light — only sets background+color on non-:root theme containers. */
:where([data-theme]):not(:root) {
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- floating chrome (no top bar) ---------- */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-dim);
  width: 32px;
  height: 28px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  font-family: var(--mono);
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--rule-2); }
.theme-icon-day  { display: none; }
.theme-icon-night{ display: inline; }
[data-theme="day"] .theme-icon-day  { display: inline; }
[data-theme="day"] .theme-icon-night{ display: none; }

.floating-tr { position: fixed; top: 16px; right: 16px; z-index: 50; }
.floating-br { position: fixed; bottom: 16px; right: 16px; z-index: 50; }

.uid-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 12px;
}
.uid-pill-label {
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.1em;
}
#uid-text { color: var(--ink-dim); }
#btn-copy {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 2px;
}
#btn-copy:hover { color: var(--ink); border-color: var(--rule-2); }

/* ---------- app + stages ---------- */
#app {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 80px;
}
.stage {
  display: none;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  max-width: 520px;
}
.stage.active { display: flex; }

/* ---------- typography ---------- */
h1, h2 {
  font-family: var(--sans);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.015em;
}
h1 {
  font-size: var(--t-2xl);
  line-height: 1.1;
  font-weight: 800;
}
h2 {
  font-size: var(--t-md);
  line-height: 1.2;
}
.dim       { color: var(--ink-dim); }
.mono      { font-family: var(--mono); }
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.danger-text { color: var(--danger); }

/* ---------- buttons ---------- */
button {
  font-family: var(--sans);
  font-size: 15px;
  cursor: pointer;
}

.btn-primary {
  font: inherit;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 12px 22px;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.12s ease;
}
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:active { background: var(--accent-dim); }
.btn-primary:disabled {
  background: var(--bg-2);
  color: var(--ink-faint);
  cursor: not-allowed;
}
.btn-lg { padding: 14px 28px; font-size: 16px; }

.btn-ghost {
  font: inherit;
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--rule-2);
  padding: 11px 18px;
  border-radius: 2px;
  font-weight: 500;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-dim); }

.btn-danger {
  font: inherit;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger-dim);
  padding: 12px 22px;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.12s ease, color 0.12s ease;
}
.btn-danger:hover { background: var(--danger); color: var(--bg); }

/* ---------- idle / hero ---------- */
.hero { margin-bottom: 4px; }
.hero h1 { margin-bottom: 12px; transition: opacity 0.34s ease; }
.hero h1.fading { opacity: 0; }
.brand-kicker {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}
.hero-lede {
  color: var(--ink-dim);
  margin: 0;
  font-size: 16px;
  max-width: 32ch;
}

.restore { margin-top: 8px; }
.restore summary {
  cursor: pointer;
  color: var(--ink-dim);
  font-size: 13px;
  padding: 6px 0;
  border-top: 1px solid var(--rule);
  list-style: none;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.restore summary::before { content: "+ "; color: var(--ink-faint); }
.restore[open] summary::before { content: "− "; }
.restore-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.restore-form input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  color: var(--ink);
  border-radius: 4px;
  padding: 9px 12px;
  font: inherit;
  font-family: var(--mono);
  font-size: 14px;
}
.restore-form input:focus {
  outline: none;
  border-color: var(--accent-dim);
}
.restore-msg {
  font-size: 12px;
  color: var(--danger);
  min-height: 16px;
  margin: 8px 0 0;
  font-family: var(--mono);
}
.restore-hint {
  font-size: var(--t-xs);
  color: var(--ink-faint);
  margin: 4px 0 0;
  letter-spacing: 0.04em;
}
.restore-hint a {
  color: var(--ink-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.restore-hint a:hover { color: var(--accent); }

/* ---------- mic test ---------- */
.step-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.step-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.step-hint {
  color: var(--ink-dim);
  margin: -10px 0 0;
  font-size: 14px;
}
.mic-meter {
  width: 100%;
  height: 28px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.mic-meter-bar {
  height: 100%;
  width: 0%;
  --fill-frac: 0.001;
  background-image: linear-gradient(
    to right,
    var(--good) 0%,
    var(--good) 65%,
    var(--accent) 65%,
    var(--accent) 85%,
    var(--danger) 85%,
    var(--danger) 100%
  );
  background-size: calc(100% / var(--fill-frac)) 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  transition: width 0.05s linear;
}
.mic-meter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(100% / 24 - 1px),
    var(--bg) calc(100% / 24 - 1px),
    var(--bg) calc(100% / 24)
  );
  pointer-events: none;
}
.mic-hint {
  color: var(--ink-dim);
  font-size: 13px;
  font-family: var(--mono);
  min-height: 18px;
  margin: 0;
}
.row-actions {
  display: flex;
  gap: 10px;
}
.row-actions button { flex: 1; }

/* ---------- queue / connecting / reconnecting ---------- */
.status-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.status-dot-warn { background: var(--danger); animation-duration: 1s; }
.status-lines h2 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}
.status-lines p {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.status-lines .tip {
  min-height: 18px;
  transition: opacity 0.4s ease;
  font-size: 12px;
  letter-spacing: 0.01em;
  max-width: 44ch;
}
.status-lines .tip.fading { opacity: 0; }
.queue-stats {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink-faint);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* ---------- call ---------- */
.call-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
}
.call-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--danger);
  font-weight: 600;
}
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}
.timer {
  font-size: var(--t-4xl);
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
  margin: 8px 0 4px;
}
#call-partner {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.meters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 8px;
}
.meter-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.meter-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  width: 32px;
  text-transform: uppercase;
}
.meter-bar {
  flex: 1;
  height: 10px;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}
/* Fixed-position color zones: green 0-65, amber 65-85, red 85-100. The
   gradient is sized to the BAR (1 / fill-frac), so revealed segments stay
   anchored to bar position regardless of how much fill is showing. */
.meter-fill {
  height: 100%;
  width: 0%;
  --fill-frac: 0.001;
  background-image: linear-gradient(
    to right,
    var(--good) 0%,
    var(--good) 65%,
    var(--accent) 65%,
    var(--accent) 85%,
    var(--danger) 85%,
    var(--danger) 100%
  );
  background-size: calc(100% / var(--fill-frac)) 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  transition: width 0.08s linear;
}
/* LED segment overlay — vertical separator lines drawn on top */
.meter-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(100% / 16 - 1px),
    var(--bg) calc(100% / 16 - 1px),
    var(--bg) calc(100% / 16)
  );
  pointer-events: none;
}

.call-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.call-actions .btn-ghost { flex: 0 0 auto; }
.call-actions .btn-danger { flex: 1; }
#btn-mute.muted {
  color: var(--danger);
  border-color: var(--danger-dim);
}

/* ---------- review ---------- */
.review-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.review-stats {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.review-stats .sep { color: var(--ink-faint); }
.review-stats code { color: var(--ink-dim); font-size: 14px; }

.review-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.block-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.danger-block .block-title { color: var(--danger-dim); }

.rate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rate-btn {
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-2);
  padding: 18px 12px;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.rate-btn:hover:not(:disabled) {
  border-color: var(--ink-dim);
}
.rate-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rate-icon {
  font-family: var(--mono);
  font-size: 22px;
  line-height: 1;
  font-weight: 300;
}
.rate-label { font-size: 15px; }

.rate-btn.rate-up.selected {
  background: color-mix(in srgb, var(--good) 12%, transparent);
  border-color: var(--good);
  color: var(--good);
}
.rate-btn.rate-down.selected {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-color: var(--danger);
  color: var(--danger);
}

.rate-confirm {
  font-family: var(--mono);
  font-size: 12px;
  margin: 0;
  min-height: 16px;
  color: var(--good);
}

.danger-block { padding-top: 4px; }
.block-btn {
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: transparent;
  color: var(--ink-dim);
  border: 1px dashed var(--danger-dim);
  padding: 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.block-btn:hover:not(:disabled) {
  color: var(--danger);
  border-color: var(--danger);
  border-style: solid;
}
.block-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.block-btn.pending {
  color: var(--danger);
  border-color: var(--danger);
  border-style: solid;
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  animation: blockPulse 1.4s ease-in-out infinite;
}
@keyframes blockPulse {
  0%, 100% { background: color-mix(in srgb, var(--danger) 8%, transparent); }
  50%      { background: color-mix(in srgb, var(--danger) 18%, transparent); }
}
.block-btn.selected {
  background: var(--danger-dim);
  color: var(--ink);
  border-color: var(--danger);
  border-style: solid;
  animation: none;
}
.block-icon { font-size: 18px; line-height: 1; }
.block-text { font-weight: 500; }

/* ---------- cooldown ---------- */
.cooldown-timer {
  font-size: var(--t-3xl);
  font-weight: 300;
  color: var(--danger);
  letter-spacing: 0.02em;
  margin: 8px 0;
}

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: var(--modal-veil);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  backdrop-filter: blur(6px);
}
.modal-card {
  background: var(--bg);
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  padding: 28px 28px 22px;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-card h2 { margin: 0; }
.modal-card .kicker { margin-bottom: -4px; }
.modal-card p { margin: 0; color: var(--ink-dim); font-size: 14px; }
.uid-big {
  display: block;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 2px;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 6px 0 8px;
  user-select: all;
  text-align: center;
}
.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.modal-actions button { flex: 1; min-width: 88px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  padding: 10px 18px;
  border-radius: 2px;
  z-index: 200;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  animation: toastIn 0.18s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.hidden { display: none !important; }

/* ---------- inline link variants on main app ---------- */
.hero-lede a {
  color: inherit;
  border-bottom: 1px dashed var(--ink-faint);
  text-decoration: none;
  padding-bottom: 1px;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.hero-lede a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.idle-foot {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin: 16px 0 0;
}
.idle-foot a {
  color: var(--ink-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.idle-foot a:hover { color: var(--accent); }

a.uid-pill-label {
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dotted transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}
a.uid-pill-label:hover { color: var(--accent); border-bottom-color: var(--accent-dim); }

.modal-doc-link {
  font-size: 11px;
  color: var(--ink-dim);
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-top: -4px;
}
.modal-doc-link:hover { color: var(--accent); }

/* ---------- /about pages ---------- */
body.about-page {
  display: block;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
.about-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 28px 100px;
}
.about-back {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  text-decoration: none;
  margin-bottom: 36px;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.about-back:hover { color: var(--ink); border-color: var(--rule-2); }

.about-content { max-width: 60ch; }
.about-content .kicker { display: block; margin-bottom: 6px; }
.about-content h1 {
  margin: 0 0 28px;
  font-size: var(--t-xl);
  line-height: 1.15;
}
.about-content h2 {
  margin: 36px 0 12px;
  font-size: var(--t-md);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}
.about-content p,
.about-content li {
  font-size: var(--t-base);
  line-height: 1.7;
  margin: 0 0 12px;
  color: var(--ink);
}
.about-content p strong,
.about-content li strong {
  color: var(--accent-2);
  font-weight: 700;
}
.about-content ul,
.about-content ol {
  padding-left: 22px;
  margin: 0 0 16px;
}
.about-content code {
  font-family: var(--mono);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 0.92em;
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.about-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.12s ease;
}
.about-content a:hover { color: var(--accent-2); }
.about-content pre.ascii {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 2px;
  padding: 14px 18px;
  margin: 18px 0 22px;
  white-space: pre;
  overflow-x: auto;
}
.about-content .about-foot {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* log entries — change log / announcements page */
.log-entry {
  border-top: 1px solid var(--rule);
  padding-top: 28px;
  margin-top: 36px;
}
.log-entry:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 18px;
}
.log-entry time {
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.log-entry h2 {
  margin: 6px 0 14px;
}
.about-content .about-foot a {
  color: var(--ink-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.about-content .about-foot a:hover { color: var(--accent); }

/* ---------- mobile ---------- */
@media (max-width: 520px) {
  h1 { font-size: var(--t-xl); }     /* 31px down from desktop 39px */
  h2 { font-size: var(--t-md); }     /* 20px (same) */
  .timer { font-size: var(--t-3xl); } /* 49px down from desktop 61px */
  #app { padding: 24px 18px 60px; }
  .hero-lede { font-size: var(--t-sm); }
  .uid-pill #btn-copy { display: none; }
}

/* ---------- age check: iOS-style year wheel ---------- */
.year-wheel {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 28px auto 18px;
  overflow: hidden;
  perspective: 900px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.year-wheel-list {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  padding: 80px 0;     /* lets first/last items reach center */
  transform-style: preserve-3d;
}
.year-wheel-list::-webkit-scrollbar { display: none; }
.year-wheel-item {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--ink-dim);
  scroll-snap-align: center;
  transform-origin: center center;
  backface-visibility: hidden;
  will-change: transform, opacity;
  cursor: pointer;
  transition: color 0.15s ease;
}
.year-wheel-item.center {
  color: var(--accent);
  font-weight: 600;
}
.year-wheel-hl {
  position: absolute;
  top: 50%;
  left: 12px; right: 12px;
  height: 40px;
  transform: translateY(-50%);
  border-top: 1px solid var(--rule-2);
  border-bottom: 1px solid var(--rule-2);
  pointer-events: none;
}
.year-wheel-mask {
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  pointer-events: none;
}
.year-wheel-mask-top {
  top: 0;
  background: linear-gradient(to bottom, var(--bg) 20%, transparent 100%);
}
.year-wheel-mask-bot {
  bottom: 0;
  background: linear-gradient(to top, var(--bg) 20%, transparent 100%);
}
.age-error {
  color: var(--danger);
  font-size: var(--t-sm);
  margin: 4px 0 8px;
  text-align: center;
}
.age-error.hidden { display: none; }
