/* Halloway shell stylesheet — the root palette, base reset, button base
 * classes referenced by easter-shared.css, toast styles, and the entry-hall
 * home screen. Hunt-world styling stays in the per-hunt CSS files and
 * easter-shared.css (the shared hunt stylesheet) — this file is part of the
 * shell layer and must never be required by a hunt engine.
 */

:root {
  color-scheme: dark;
  /* The house palette — mirrored from the Veil/Foyer (the canonical look):
     a near-black stage, maroon for every "red," a quiet dusty-rose ink where
     a brighter accent once shouted, and borders pulled almost all the way
     back so the chrome reads as backlit hairlines, not boxes. No bright
     blues, no orange-reds — everything muted, centred, underlit. */
  --bg: #07060c; /* near-black (was navy #0b1020) */
  --fg: #f2f5ff;
  --fg-secondary: #c8d0e7;
  --muted: #9aa3c7;
  --accent: #8d2337; /* maroon (was bright red-orange #e94f37) */
  --accent-2: #b27e84; /* dusty-rose ink for links/focus (was bright blue #4fc3f7) */
  --moss: #7fae84; /* muted sage for "good"/verified states */
  --card: rgba(13, 11, 20, 0.82); /* near-black warm card (was navy) */
  --border: rgba(255, 255, 255, 0.08); /* barely-there, underlit hairline */
}

* {
  box-sizing: border-box;
}

a,
button,
[role="button"] {
  touch-action: manipulation;
}

/* Phone/iPad-first touch hardening. Halloway is a handheld, tap-driven app —
 * not a scrollable web page — so the generic browser gestures that can strand a
 * player are turned off here: the text-selection caret + blue handles, the iOS
 * long-press callout, the grey tap flash, image drag-out, and the rubber-band /
 * pull-to-refresh overscroll. Pinch-zoom is gated per page by the viewport meta
 * (only the Veil keeps it, for Door XIV) and double-tap-zoom by `manipulation`
 * below — which still preserves pinch where the viewport allows it. Anything
 * that genuinely needs selection (a form field, or the Veil's courier verse for
 * Door XII) opts back in with the more specific rule that follows, so this
 * baseline never blocks a solve. The puzzle engines' own drag targets set their
 * own (more specific) touch-action, so they keep winning too. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}

body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
}

img,
svg,
picture {
  -webkit-user-drag: none;
}

/* The exceptions: real text entry stays editable/selectable, and the Veil's
 * courier verse (Door XII) stays selectable so it can be copied out. */
input,
textarea,
[contenteditable="true"],
[contenteditable="true"] *,
.veil-l12-verse {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Button base classes — referenced by easter-shared.css (auth modal,
   unused in Halloway) and available to shell surfaces. */
.btn-primary,
.btn-secondary {
  display: inline-block;
  border-radius: 10px;
  padding: 0.62rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  border: 1px solid transparent;
  color: #fff;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  filter: brightness(1.08);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--fg-secondary);
}

/* Toasts — same class contract as the shim's showToast(). */
.toast-container {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
}
.toast {
  background: rgba(13, 11, 20, 0.95);
  color: var(--fg);
  border: 1px solid rgba(178, 126, 132, 0.32);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  line-height: 1.35;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast--visible {
  opacity: 1;
  transform: translateY(0);
}
.toast--error {
  border-color: rgba(141, 35, 55, 0.65);
  color: #ffd4cb;
}

/* ── The entry hall (index.html) ──────────────────────────────────────── */

.hall-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(28, 20, 38, 0.5), transparent 68%),
    var(--bg);
  padding: calc(2.5rem + env(safe-area-inset-top, 0)) 1.25rem
    calc(2.5rem + env(safe-area-inset-bottom, 0));
  text-align: center;
}

.hall-head {
  width: min(100%, 30rem);
}

.hall-title {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  font-weight: 600;
  color: #efe9ff;
}

.hall-eyebrow {
  margin: 0.7rem 0 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-transform: uppercase;
  color: var(--fg-secondary);
}
.hall-tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.hall-main {
  width: min(100%, 30rem);
  margin-top: 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  text-align: left;
}

.hall-section-label {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.hall-section-note {
  margin: -0.4rem 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
.hall-noscript {
  color: var(--fg-secondary);
}

/* ── The Foyer card (free tutorial) ───────────────────────────────────── */
.hall-foyer-card {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  border: 1px solid rgba(232, 179, 76, 0.4);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: var(--fg);
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(232, 179, 76, 0.12), transparent 60%),
    rgba(28, 21, 38, 0.6);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.hall-foyer-card:hover,
.hall-foyer-card:focus-visible {
  border-color: #e8b34c;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 30px rgba(232, 179, 76, 0.1);
  outline: none;
}
.hall-foyer-flame {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.6rem;
}
.hall-foyer-flame svg {
  width: 1.8rem;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(232, 179, 76, 0.5));
}
.hall-foyer-body {
  flex: 1 1 auto;
  min-width: 0;
}
.hall-foyer-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #f4ecda;
}
.hall-foyer-card p {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 0.85rem;
}
.hall-foyer-card .hall-cue {
  color: #e8b34c;
}
.hall-foyer-tag {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(232, 179, 76, 0.16);
  color: #f0d28a;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── The three doors ──────────────────────────────────────────────────── */
.hall-doors {
  display: grid;
  gap: 1.15rem;
}

.hall-door {
  display: grid;
  grid-template-columns: 3.4rem 1fr auto;
  align-items: center;
  column-gap: 1.1rem;
  border: 1px solid var(--door-line, var(--border));
  border-radius: 16px;
  background:
    radial-gradient(120% 130% at 0% 0%, color-mix(in srgb, var(--door-accent, #888) 12%, transparent), transparent 62%),
    var(--door-bg, rgba(255, 255, 255, 0.03));
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: var(--fg);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.hall-door:hover,
.hall-door:focus-visible {
  border-color: var(--door-accent, var(--fg-secondary));
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42),
    0 0 30px color-mix(in srgb, var(--door-accent, #888) 16%, transparent);
  outline: none;
}

.hall-door-figure {
  display: grid;
  place-items: center;
  color: var(--door-accent, var(--fg-secondary));
}
.hall-door-svg {
  width: 3.2rem;
  height: auto;
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--door-accent, #888) 45%, transparent));
}
.hall-door-leaf {
  fill: color-mix(in srgb, var(--door-accent, #888) 14%, transparent);
}
.hall-door:hover .hall-door-leaf,
.hall-door:focus-visible .hall-door-leaf {
  fill: color-mix(in srgb, var(--door-accent, #888) 22%, transparent);
}

.hall-door-plate {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.hall-door-name {
  font-size: 1.18rem;
  letter-spacing: 0.05em;
  color: var(--door-accent, var(--fg));
}
/* The named room behind the door (the Ball Room, the Laboratory, the Parlor).
   A faint engraved plate under the quest name — present, not shouting. */
.hall-door-room {
  margin-top: -0.12rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--door-accent, #888) 60%, var(--muted));
  opacity: 0.85;
}
.hall-door-line {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}
.hall-door-cue {
  align-self: center;
  flex: none;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--door-accent, var(--fg-secondary));
  opacity: 0.85;
}

.hall-door--veil {
  --door-accent: #a78bfa;
  --door-line: rgba(167, 139, 250, 0.35);
  --door-bg: rgba(31, 20, 51, 0.45);
}
.hall-door--athanor {
  --door-accent: #e0a33c;
  --door-line: rgba(224, 163, 60, 0.35);
  --door-bg: rgba(43, 30, 12, 0.45);
}
.hall-door--threshold {
  --door-accent: #c2879b;
  --door-line: rgba(194, 135, 155, 0.35);
  --door-bg: rgba(26, 12, 22, 0.5);
}

/* A finished hunt leaves its door lit — the house keeps a lamp in the window
   for every room you've crossed (Bachelard's "the lamp in the window is the
   house's eye"). Purely atmospheric: no text, no count, no link to anything.
   One door warms when you finish one hunt; all three warm when the house is
   yours end to end — a quiet promise to anyone who notices, never spelled out. */
.hall-door--lit {
  border-color: color-mix(in srgb, var(--door-accent, #888) 55%, var(--border));
  box-shadow:
    inset 0 0 24px color-mix(in srgb, var(--door-accent, #888) 13%, transparent),
    0 0 22px color-mix(in srgb, var(--door-accent, #888) 11%, transparent);
}
.hall-door--lit .hall-door-leaf {
  fill: color-mix(in srgb, var(--door-accent, #888) 30%, transparent);
}
.hall-door--lit .hall-door-svg {
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--door-accent, #888) 60%, transparent));
}
/* The lamp breathes, slowly, the way a watched window does. Stilled for anyone
   who asked the system to hold motion — they keep the steady glow above. */
@media (prefers-reduced-motion: no-preference) {
  .hall-door--lit .hall-door-svg {
    animation: hall-door-vigil 6.5s ease-in-out infinite;
  }
}
@keyframes hall-door-vigil {
  0%,
  100% {
    filter: drop-shadow(0 0 11px color-mix(in srgb, var(--door-accent, #888) 48%, transparent));
  }
  50% {
    filter: drop-shadow(0 0 18px color-mix(in srgb, var(--door-accent, #888) 78%, transparent));
  }
}

/* A free room already crossed but the hunt not yet bought: the house keeps a
   faint ember at the threshold — fainter than the finished lamp above, and on
   the cue rather than the whole frame — so a remembered door reads as "in
   progress, your move" without ever showing a price (that waits at the paywall
   this door now leads straight to). */
.hall-door--ready .hall-door-cue {
  opacity: 1;
  color: color-mix(in srgb, var(--door-accent, var(--fg-secondary)) 88%, var(--fg));
}
.hall-door--ready {
  border-color: color-mix(in srgb, var(--door-accent, #888) 30%, var(--border));
}

.hall-door-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.hall-cue {
  flex: none;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--door-accent, var(--fg-secondary));
  opacity: 0.85;
}
.hall-price {
  flex: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--door-accent, var(--fg-secondary));
}

/* For-sale door: the full marketing pitch. */
.hall-door-tagline {
  margin: 0 0 0.5rem !important;
  color: var(--fg-secondary) !important;
  font-size: 0.9rem !important;
}
.hall-door-epigraph {
  margin: 0 0 0.8rem !important;
  color: var(--door-accent, var(--fg-secondary)) !important;
  font-size: 0.82rem !important;
  font-style: italic;
  opacity: 0.92;
}
.hall-door-lure {
  margin: 0 0 1rem;
  padding-left: 1.05rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.hall-door-lure li {
  margin-bottom: 0.3rem;
}
.hall-door-cta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.hall-door-free {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hall-door-buy {
  flex: 1 1 auto;
  text-align: center;
  padding: 0.6rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--door-accent, #888) 55%, transparent);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--door-accent, #888) 16%, #0a0712);
  color: var(--fg);
  font-size: 0.82rem;
  font-weight: 700;
}
.hall-door--forsale:hover .hall-door-buy,
.hall-door--forsale:focus-visible .hall-door-buy {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--door-accent, #888) 24%, #0a0712);
}

.hall-progress {
  display: block;
  margin-top: 0.7rem;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.hall-progress-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--door-accent, var(--fg-secondary));
  transition: width 200ms ease;
}

.hall-mailing {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
}
.mailing-form {
  display: grid;
  gap: 0.55rem;
}
.mailing-form label {
  color: var(--fg-secondary);
  font-size: 0.88rem;
}
.mailing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}
.mailing-row input {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 0.72rem 0.82rem;
  color: var(--fg);
  background: rgba(10, 8, 17, 0.78);
}
.mailing-row button {
  border: 1px solid rgba(232, 179, 76, 0.58);
  border-radius: 8px;
  padding: 0 0.9rem;
  color: #16110a;
  font-weight: 700;
  background: #e8b34c;
  cursor: pointer;
}
.mailing-row button[disabled] {
  cursor: wait;
  opacity: 0.7;
}
.mailing-status {
  min-height: 1.2rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.hall-nav {
  margin-top: 2.4rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.hall-nav a {
  color: var(--fg-secondary);
  text-decoration: none;
}
.hall-nav a:hover,
.hall-nav a:focus-visible {
  color: var(--fg);
  text-decoration: underline;
}

.hall-footnote {
  margin-top: 1rem;
  color: rgba(154, 163, 199, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

/* ── Shell pages (settings, privacy) ──────────────────────────────────── */

/* These reuse .hall-body's background but read as documents, not a hall:
   a constrained, left-aligned column instead of a centered stack. */
.shell-page {
  justify-content: flex-start;
  text-align: left;
}
.shell-head {
  width: min(100%, 40rem);
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
  min-height: 2.75rem;
}
.shell-back {
  grid-column: 1;
  color: var(--fg-secondary);
  text-decoration: none;
}
.shell-back:hover,
.shell-back:focus-visible {
  color: var(--fg);
}
.shell-door-back {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(16, 13, 22, 0.58);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}
/* A tiny left chevron seated in the door's mouth: subtle, but enough to read
   the door as "back a page," not just decoration. Drawn in currentColor so it
   tracks the door's ink, and it leans a hair further out on hover/focus. */
.shell-door-back::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 0.32rem;
  height: 0.32rem;
  border-left: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}
.shell-door-back:hover,
.shell-door-back:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 11px 24px rgba(0, 0, 0, 0.38);
  outline: none;
}
.shell-door-back:hover::after,
.shell-door-back:focus-visible::after {
  opacity: 0.85;
  transform: translate(-65%, -50%) rotate(45deg);
}
.shell-door-back svg {
  width: 1.35rem;
  height: 1.8rem;
}
.shell-title {
  grid-column: 2;
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
  color: #efe9ff;
}

/* The brand mark that crowns every shell page (auth, legal, settings, the Coat
   Room). A small, quiet Halloway wordmark above the page title that links home
   to the cover — so the keyed lockup appears everywhere, not just the hall. It
   scales with its own font-size (the wordmark is all em); muted ink that lifts
   on hover. */
.shell-brand {
  width: min(100%, 40rem);
  margin: 0 0 1rem;
  display: inline-block;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
}
.shell-brand:hover,
.shell-brand:focus-visible {
  color: var(--fg-secondary);
}
.shell-main {
  width: min(100%, 40rem);
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}
.shell-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  padding: 1.2rem 1.3rem;
}
.shell-section-title {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--fg);
}

/* Center-justified titles — opt-in via body.shell-center-titles (the Coat
   Room, Settings, Terms, Privacy). The page title sits truly centered between
   the back door and a matching empty cell, the way the Library balances its
   header; the section titles center to match. */
body.shell-center-titles .shell-head {
  grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
}
body.shell-center-titles .shell-head::after {
  content: "";
  grid-column: 3;
}
body.shell-center-titles .shell-title {
  grid-column: 2;
  text-align: center;
}
body.shell-center-titles .shell-section-title {
  text-align: center;
}
.shell-note,
.shell-prose p {
  margin: 0 0 0.7rem;
  color: var(--fg-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}
.shell-note:last-child,
.shell-prose p:last-child {
  margin-bottom: 0;
}
.shell-note a,
.shell-prose a {
  color: var(--accent-2);
}
.shell-prose code {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  padding: 0.05rem 0.35rem;
  font-size: 0.85em;
}
.shell-lede {
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.55;
}
.shell-version {
  color: var(--muted);
  font-size: 0.85rem;
}
.shell-footnote {
  width: min(100%, 40rem);
  margin: 1.6rem 0 0;
  color: rgba(154, 163, 199, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

/* Difficulty picker (settings.js → #difficulty-controls). A radiogroup of
   cards: the native radio stays visible (kept for accessibility) and the whole
   card is the click target via the wrapping <label>. */
.difficulty-set {
  display: grid;
  gap: 0.6rem;
}
.difficulty-option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.8rem 0.9rem;
  cursor: pointer;
}
.difficulty-option:hover {
  border-color: var(--accent-2);
}
.difficulty-option.is-selected {
  border-color: var(--accent);
  background: rgba(141, 35, 55, 0.12);
}
.difficulty-option input {
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.difficulty-option:focus-within {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.difficulty-option-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.difficulty-option-label {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--fg);
}
.difficulty-option-blurb {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--fg-secondary);
}

/* Sound channels (settings.js → #audio-controls). Two on/off cards that mirror
   the difficulty cards: the native checkbox stays visible for accessibility and
   the whole card is the click target via the wrapping <label>. */
.audio-set {
  display: grid;
  gap: 0.6rem;
}
.audio-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.8rem 0.9rem;
  cursor: pointer;
}
.audio-toggle:hover {
  border-color: var(--accent-2);
}
.audio-toggle.is-on {
  border-color: var(--accent);
  background: rgba(141, 35, 55, 0.12);
}
.audio-toggle input {
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}
.audio-toggle:focus-within {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.audio-toggle-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.audio-toggle-label {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--fg);
}
.audio-toggle-blurb {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--fg-secondary);
}

/* Per-hunt reset cards. */
.reset-cards {
  display: grid;
  gap: 0.9rem;
}
.reset-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.9rem 1rem;
}
.reset-card h3 {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
}
.reset-status {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 0.85rem;
}
.reset-note {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.reset-btn {
  margin-top: 0.8rem;
}

/* ── The paywall overlay (paywall.js, on the hunt pages) ───────────────── */

/* Per-hunt accents so the curtain matches the world behind it. */
.paywall {
  --pw-accent: #cdd3ea;
  --pw-glow: rgba(205, 211, 234, 0.16);
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem
    max(1.25rem, env(safe-area-inset-bottom));
  background: rgba(4, 4, 9, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
  animation: paywall-fade 220ms ease;
}
@keyframes paywall-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.paywall.unlock--veil {
  --pw-accent: #a78bfa;
  --pw-glow: rgba(167, 139, 250, 0.18);
}
.paywall.unlock--athanor {
  --pw-accent: #e0a33c;
  --pw-glow: rgba(224, 163, 60, 0.18);
}
.paywall.unlock--threshold {
  --pw-accent: #c2879b;
  --pw-glow: rgba(194, 135, 155, 0.18);
}
body.paywall-open {
  overflow: hidden;
}

/* Light leaking from the room you just earned. paywall.js feeds --pw-tilt-x/y
   from device tilt, so the warm seam behind the card drifts as if a door were
   ajar just out of frame; it sits behind the card and stills under reduced
   motion (the subscription reports a flat 0). */
.paywall-keyhole {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    32% 22% at calc(50% + var(--pw-tilt-x, 0) * 16%) calc(40% + var(--pw-tilt-y, 0) * 12%),
    color-mix(in srgb, var(--pw-accent) 32%, transparent),
    transparent 60%
  );
  transition: background 160ms ease;
}

.paywall-card {
  width: min(100%, 27rem);
  border: 1px solid color-mix(in srgb, var(--pw-accent) 38%, transparent);
  border-radius: 16px;
  padding: 1.6rem 1.5rem;
  background:
    radial-gradient(130% 90% at 50% 0%, var(--pw-glow), transparent 62%),
    rgba(12, 10, 20, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.paywall-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--pw-accent);
}
.paywall-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  color: #f4f1ff;
}
.paywall-tagline {
  margin: 0 0 1rem;
  color: var(--fg-secondary);
  font-size: 0.92rem;
  line-height: 1.45;
}
/* A glimpse of the room behind the price — a cropped level shot, or the
   ghost-keyhole mark where a hunt has no poster. */
.paywall-poster {
  position: relative;
  margin: 0 0 1.3rem;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pw-accent) 32%, transparent);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
}
.paywall-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.paywall-poster--locked-preview img {
  opacity: 0.38;
  filter: brightness(0.58) saturate(0.72) blur(2.1px);
  transform: scale(1.035);
}
.paywall-poster--locked-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 34%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 62%),
    rgba(0, 0, 0, 0.24);
}
.paywall-preview-lock {
  position: absolute;
  z-index: 1;
  top: 0.68rem;
  left: 0.68rem;
  width: 2.2rem;
  height: 2.2rem;
  color: #f8e7b7;
  border: 1px solid color-mix(in srgb, var(--pw-accent) 54%, transparent);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.14), transparent 56%),
    rgba(4, 4, 9, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.22), 0 0 20px var(--pw-glow);
}
.paywall-preview-lock::before,
.paywall-preview-lock::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.paywall-preview-lock::before {
  top: 0.42rem;
  width: 0.88rem;
  height: 0.72rem;
  border: 0.16rem solid currentColor;
  border-bottom: 0;
  border-radius: 0.55rem 0.55rem 0 0;
}
.paywall-preview-lock::after {
  bottom: 0.42rem;
  width: 1.12rem;
  height: 0.86rem;
  border-radius: 0.2rem;
  background: currentColor;
  box-shadow: inset 0 -0.26rem 0 rgba(0, 0, 0, 0.16);
}
.paywall-preview-caption {
  position: absolute;
  z-index: 1;
  right: 0.9rem;
  bottom: 0.72rem;
  left: 0.9rem;
  display: grid;
  gap: 0.12rem;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
}
.paywall-preview-kicker,
.paywall-preview-state {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.paywall-preview-kicker {
  color: var(--pw-accent);
}
.paywall-preview-title {
  color: #fffaf0;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.12;
}
.paywall-preview-state {
  color: color-mix(in srgb, var(--pw-accent) 76%, #fff);
}
.paywall-poster--ghost {
  display: grid;
  place-items: center;
  padding: 0.8rem;
  background:
    radial-gradient(70% 70% at 50% 38%, var(--pw-glow), transparent 70%),
    rgba(0, 0, 0, 0.3);
}
/* The ghost sets its own --ghost-accent default, so the per-hunt recolour and
   the frame sizing must land on the element itself, not the figure. */
.paywall-poster--ghost halloway-ghost {
  --ghost-accent: var(--pw-accent);
  --ghost-size: 7rem;
}
.paywall-offers {
  display: grid;
  gap: 0.6rem;
}
.paywall-unlock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--pw-accent) 40%, transparent);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font: inherit;
  text-align: left;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.paywall-unlock-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.98rem;
  font-weight: 700;
}
.paywall-unlock-note {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pw-accent);
}
.paywall-unlock-price {
  flex: none;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}
/* The whole-house bundle is the headline offer. */
.paywall-unlock--all {
  border-color: color-mix(in srgb, var(--pw-accent) 60%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--pw-accent) 22%, #0a0712);
}
/* The pay-the-difference upgrade: the cheapest way to the whole house, so it
   reads a touch warmer than the full bundle to mark it as the standout deal. */
.paywall-unlock--upgrade {
  border-color: color-mix(in srgb, var(--pw-accent) 80%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    color-mix(in srgb, var(--pw-accent) 32%, #0a0712);
}
.paywall-unlock:hover,
.paywall-unlock:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--pw-accent) 70%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 3px var(--pw-glow);
  outline: none;
}
.paywall-unlock:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.paywall-restore {
  margin: 0.8rem auto 0;
  border: 0;
  background: transparent;
  color: var(--fg-secondary);
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
}
.paywall-restore:hover,
.paywall-restore:focus-visible {
  color: #fff;
  outline: none;
}
.paywall-restore:disabled {
  opacity: 0.6;
  cursor: default;
}
.paywall-meta {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}
/* The gated-browser offer: no buy button, just a note that the door unlocks in
   the app. Reads like a framed card so the curtain still feels deliberate. */
.paywall-gate {
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--pw-accent) 35%, transparent);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    rgba(255, 255, 255, 0.03);
  color: var(--fg-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}
.paywall-mobile {
  display: grid;
  justify-items: center;
  gap: 0.48rem;
  margin: 0.82rem 0 0;
  padding: 0.72rem 0.85rem 0.82rem;
  border: 1px solid color-mix(in srgb, var(--pw-accent) 34%, transparent);
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--pw-accent) 10%, transparent), transparent),
    rgba(255, 255, 255, 0.035);
}
.paywall-mobile-title {
  margin: 0;
  color: var(--pw-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.paywall-mobile-copy {
  margin: 0;
  color: var(--fg-secondary);
  font-size: 0.76rem;
  line-height: 1.45;
}
.paywall-mobile-copy a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--pw-accent) 70%, transparent);
  text-underline-offset: 0.16em;
}
.paywall-store-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.64rem;
}
.paywall-store-link {
  display: inline-block;
  border-radius: 0.45rem;
  -webkit-tap-highlight-color: transparent;
}
.paywall-store-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pw-accent) 80%, #fff);
  outline-offset: 4px;
}
.paywall-store-badge {
  display: block;
  width: auto;
  height: clamp(2.28rem, 10.4vw, 2.74rem);
  max-width: 58vw;
}
html.halloway-native .paywall-mobile {
  display: none;
}
.paywall-nav {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.paywall-nav a {
  color: var(--fg-secondary);
  text-decoration: none;
}
.paywall-nav a:hover,
.paywall-nav a:focus-visible {
  color: var(--fg);
  text-decoration: underline;
}
.paywall-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.paywall-legal a {
  color: var(--muted);
  text-decoration: underline;
}
.paywall-legal a:hover,
.paywall-legal a:focus-visible {
  color: var(--fg);
}
/* ── Accounts / auth (shell-only; not part of the hunt-engine layer) ─────── */
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.auth-tab {
  flex: 1;
  padding: 0.55rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.auth-tab.is-active {
  color: var(--fg);
  border-color: var(--accent-2);
  background: rgba(178, 126, 132, 0.1);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--fg-secondary);
}
.auth-field input {
  padding: 0.6rem 0.7rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font: inherit;
}
.auth-field input:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
}
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--fg-secondary);
}
.auth-submit {
  margin-top: 0.3rem;
  padding: 0.7rem 1rem;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.auth-submit[disabled] {
  opacity: 0.6;
  cursor: default;
}
.auth-submit--link {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--fg);
}
.auth-alt {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin: 0.2rem 0 0;
}
.account-panel .account-signout,
.account-panel .account-resend,
.account-panel .account-link-btn {
  margin-top: 0.5rem;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--fg);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.account-panel .account-link-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
/* The "Send confirmation link" affirmative reads a touch warmer than its
   plain Cancel sibling without shouting. */
.account-panel .account-link-btn--go {
  border-color: color-mix(in srgb, var(--moss) 55%, var(--border));
  color: color-mix(in srgb, var(--moss) 78%, var(--fg));
}
.account-verified {
  color: var(--moss);
  font-size: 0.82rem;
}
.account-unverified {
  color: var(--muted);
  font-size: 0.82rem;
}
/* Wrap the inline email controls so a narrow phone stacks them cleanly
   instead of overflowing the panel. */
.account-email-actions,
.account-pending-actions,
.account-email-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.account-pending {
  margin-top: 0.7rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid color-mix(in srgb, var(--moss) 30%, var(--border));
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}
.account-pending .shell-note {
  margin-top: 0;
}
.account-email-form {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.6rem;
}
.account-email-form[hidden] {
  display: none;
}
.account-email-form-note {
  margin: 0;
  color: var(--muted);
}
/* ── Badges: a struck wax seal for each hunt finished (its own Coat Room
   section now, headed in the HTML). Three slots always show — earned ones lit
   in the hunt's colour, the rest a blank slug — so the set reads as a goal and
   the closing line can allude to what holding all three opens. ───────────── */
.coatroom-badges-lead {
  margin: -0.2rem 0 1rem;
}
.account-badges {
  margin: 0;
}
.account-badge-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem 0.55rem;
}
.account-badge {
  min-width: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.45rem;
  color: var(--fg-secondary);
  text-align: center;
}
/* A struck wax-seal medallion in the hunt's own colour: an embossed coin with a
   raised rim, an inner scalloped ring, a top-lit shine, and the keyhole glyph
   pressed into it. Lifts a touch on hover/press so it feels minted, not pasted. */
.account-badge-seal {
  position: relative;
  width: 3.15rem;
  height: 3.15rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: color-mix(in srgb, var(--badge-accent, #888) 72%, #ffffff);
  background:
    radial-gradient(
      circle at 50% 32%,
      color-mix(in srgb, var(--badge-accent, #888) 55%, #1b1622) 0%,
      color-mix(in srgb, var(--badge-accent, #888) 22%, #100c16) 60%,
      #0c0910 100%
    );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--badge-accent, #888) 55%, transparent),
    inset 0 1px 1px color-mix(in srgb, #ffffff 24%, transparent),
    inset 0 -3px 8px rgba(0, 0, 0, 0.55),
    0 4px 11px rgba(0, 0, 0, 0.5),
    0 0 18px color-mix(in srgb, var(--badge-accent, #888) 28%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* inner scalloped ring — the pressed edge of the wax */
.account-badge-seal::before {
  content: "";
  position: absolute;
  inset: 0.3rem;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--badge-accent, #888) 50%, transparent);
  opacity: 0.55;
}
/* a soft top-left shine so the coin catches light */
.account-badge-seal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.2) 0%, transparent 44%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.account-badge-seal svg {
  position: relative;
  width: 1.35rem;
  height: 1.7rem;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.55));
}
.account-badge:hover .account-badge-seal,
.account-badge:focus-within .account-badge-seal,
.account-badge:active .account-badge-seal {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--badge-accent, #888) 70%, transparent),
    inset 0 1px 1px color-mix(in srgb, #ffffff 28%, transparent),
    inset 0 -3px 8px rgba(0, 0, 0, 0.55),
    0 7px 15px rgba(0, 0, 0, 0.5),
    0 0 26px color-mix(in srgb, var(--badge-accent, #888) 42%, transparent);
}
.account-badge-name {
  max-width: 100%;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--fg);
}
.account-badge-state {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.account-badge.is-earned .account-badge-state {
  color: color-mix(in srgb, var(--badge-accent, #888) 72%, #ffffff);
}
/* An unearned slot: a cold, blank wax slug — desaturated, unlit, no glow — so it
   reads as waiting to be struck rather than missing. */
.account-badge.is-locked {
  color: var(--muted);
}
.account-badge.is-locked .account-badge-seal {
  color: color-mix(in srgb, var(--badge-accent, #888) 26%, #6b6676);
  background: radial-gradient(
    circle at 50% 32%,
    #211d29 0%,
    #16121c 60%,
    #0b0910 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -3px 8px rgba(0, 0, 0, 0.55),
    0 3px 9px rgba(0, 0, 0, 0.45);
  opacity: 0.72;
}
.account-badge.is-locked .account-badge-seal::before {
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.4;
}
.account-badge.is-locked .account-badge-seal svg {
  opacity: 0.45;
}
.account-badge.is-locked .account-badge-name {
  color: var(--fg-secondary);
}
@media (prefers-reduced-motion: reduce) {
  .account-badge-seal {
    transition: none;
  }
  .account-badge:hover .account-badge-seal,
  .account-badge:focus-within .account-badge-seal,
  .account-badge:active .account-badge-seal {
    transform: none;
  }
}
/* The allusion to the hidden room — a quiet line below the seals, set off by a
   hairline. Never names what the full set opens; once all three are earned it
   warms toward the accent so the player feels the change without being told. */
.account-badges-secret {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.55;
  text-align: center;
  color: var(--muted);
}
.account-badges-secret.is-unlocked {
  color: color-mix(in srgb, var(--accent-2, #b27e84) 78%, #ffffff);
  font-style: normal;
}
/* The delete-account "danger zone": deliberately quiet, set far below the rest
   of the page and separated by a hairline so it reads as a last resort, never a
   peer of Sign out. */
.coatroom-danger:empty {
  display: none;
}
.coatroom-danger {
  margin-top: 2.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.coatroom-danger .account-delete-note {
  margin: 0 auto 0.4rem;
  max-width: 26rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.account-delete-link {
  background: none;
  border: 0;
  padding: 0.25rem 0.3rem;
  font: inherit;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  opacity: 0.75;
  transition: color 0.18s ease, opacity 0.18s ease;
}
.account-delete-link:hover,
.account-delete-link:focus-visible {
  color: #e6a39b;
  opacity: 1;
}
.account-delete-link[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* ── Internal admin console (admin.html; not in player nav) ──────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg-secondary);
}
.admin-table td:last-child {
  text-align: right;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.admin-block {
  margin-top: 1rem;
}

/* ── The wordmark's key — the "O" of HALLOWAY is a key ────────────────────
   An inline glyph that takes the O's slot; sized to the cap height and turned
   in its bow by device tilt (hall.css). currentColor keeps it the ink of the
   surrounding letters. */
/* The brand wordmark + its key live in shell/wordmark.css (+ wordmark.js) —
   the one source of truth for the "HALLOWAY" lockup, reused app-wide. */

/* ── The Grand Room's side buttons — Coat Room + back to the Foyer ─────────
   Two small pills below the doors, deliberately quieter and smaller than the
   doors so the focus stays on the three. Each carries a glyph, a name, and a
   one-line subtitle of what waits there. Scoped to .hall-nav--pills so the bare
   nav on the 404/500/offline pages keeps its plain single link. */
.hall-nav--pills {
  margin-top: 1.6rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  width: min(100%, 21rem);
}
.hall-nav--pills .hall-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.6rem;
  border: 1px solid rgba(154, 163, 199, 0.14);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  text-align: left;
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}
.hall-nav--pills .hall-pill:hover,
.hall-nav--pills .hall-pill:focus-visible {
  border-color: rgba(154, 163, 199, 0.3);
  background: rgba(255, 255, 255, 0.035);
  color: var(--fg-secondary);
  text-decoration: none;
}
.hall-pill-icon {
  display: inline-flex;
  flex: none;
  color: var(--muted);
  opacity: 0.85;
}
.hall-nav--pills .hall-pill:hover .hall-pill-icon,
.hall-nav--pills .hall-pill:focus-visible .hall-pill-icon {
  color: var(--fg-secondary);
  opacity: 1;
}
.hall-pill-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
}
.hall-pill-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--fg-secondary);
}
.hall-pill-sub {
  font-size: 0.64rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}

/* ── The house's quote, at the foot of the Grand Room ──────────────────────
   The epigraph now hangs at the foot of the room, below both the three doors
   and the side-link pills — the room reads Doors → Links → Quote. As a direct
   child of the centered .hall-body it would otherwise spread to the frame's
   full 34rem; pin it to the door column's width and centre it so it stays
   aligned under the three doors. */
.hall-epigraph-foot {
  width: min(100%, 30rem);
}

/* ── In-quest house navigation (house-nav.js, on the hunt pages) ───────────
   A door in the top-left corner of a quest's Entry Room (its threshold page)
   that leads back out to the Grand Room. It sits in the same corner the
   engine's own home hero uses in a level, but the two never show at once —
   house-nav.js hides this on `easter-in-level`. Mirrors the geometry of
   .easter-home-link so the corner feels consistent between the two. */
.house-nav {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 0.6rem);
  left: calc(env(safe-area-inset-left, 0px) + 0.6rem);
  z-index: 60;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(16, 13, 22, 0.6);
  color: var(--fg-secondary);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, color 120ms ease;
}
.house-nav[hidden] {
  display: none;
}
.house-nav:hover,
.house-nav:focus-visible {
  transform: translateY(-1px);
  outline: none;
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.36);
}
.house-nav-door {
  display: inline-flex;
  width: 1.35rem;
  height: 1.8rem;
  flex: none;
  color: inherit;
}
.house-nav-door svg {
  width: 100%;
  height: 100%;
}
/* The Threshold's entry room leads with its eyebrow + title — it has no tall
   hero art above them the way the Veil and Athanor entry rooms do — so the
   house-nav door (this shell control) would cover the title. The clearance for
   it lives here in the shell layer, never in the hunt/shared engine CSS. Scope
   it to the entry room only (no easter-in-level): in a level the engine renders
   its own home hero in that corner and easter-shared.css reserves that room.
   The reserve mirrors .house-nav's own metrics (inset + size + a second inset
   of breathing room) so the control and its clearance never drift apart. */
body.threshold-body:not(.easter-in-level) .thr-root {
  padding-top: calc(env(safe-area-inset-top, 0px) + 0.6rem + 2.75rem + 0.6rem);
}
/* The seasonal event's entry room (the Night Table) leads the same way — an
   eyebrow and a title with no tall hero above them — so it needs the same
   clearance for exactly the same reason. In a level the shim's home hero owns
   the corner and the event's own stylesheet reserves that room. */
body.wake-body:not(.easter-in-level) .wake-root {
  padding-top: calc(env(safe-area-inset-top, 0px) + 0.6rem + 2.75rem + 0.6rem);
}

/* ── The Coat Room (coatroom.html) — the player's room ────────────────────
   The user/account hub: who you are (the ghost-keyhole + account panel),
   where you stand (the progress glance), and the house directory. Built
   mobile-first — every block is a left-aligned card that reads in a narrow
   column. */

/* Identity card: a ghost-keyhole scene first, account state below it. */
.coatroom-id {
  display: grid;
  gap: 1rem;
  overflow: hidden;
  padding: 0;
}
.coatroom-id-body {
  min-width: 0;
  padding: 0 1.2rem 1.2rem;
}
.coatroom-eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
}

/* Ghost-keyhole hero — the full-bleed lit panel frames the shared
   <halloway-ghost> mark (shell/ghost.css), lit in the Coat Room's violet. */
.coatroom-mirror {
  display: grid;
  place-items: center;
  min-height: clamp(12rem, 54vw, 19rem);
  padding: clamp(0.9rem, 4vw, 1.4rem) 1rem 0.3rem;
  background:
    radial-gradient(80% 65% at 50% 8%, rgba(88, 55, 126, 0.28), transparent 62%),
    #08070d;
  touch-action: pan-y;
}
.coatroom-ghost {
  --ghost-size: min(100%, 18.5rem);
  --ghost-accent: #c592ff;
  --ghost-float: 4px;
  /* A slow drift so the mirror has life when the phone is held flat; the
     tilt-driven eyes/parallax ride on top of it. */
  animation: halloway-ghost-float 8s ease-in-out infinite;
}
.coatroom-account {
  text-align: left;
}

/* Progress glance — one resume-row per room, with a thin accent rail. */
.coatroom-progress {
  display: grid;
  gap: 0.55rem;
}
.coatroom-prog-row {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.coatroom-prog-row:hover,
.coatroom-prog-row:focus-visible {
  border-color: var(--fg-secondary);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
  outline: none;
}
.coatroom-prog-door {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--row-accent, var(--fg-secondary));
  background: color-mix(in srgb, var(--row-accent, #888) 12%, transparent);
}
.coatroom-prog-door svg {
  width: 1.15rem;
  height: 1.55rem;
}
.coatroom-prog-main {
  min-width: 0;
}
.coatroom-prog-head {
  display: grid;
  gap: 0.1rem;
}
.coatroom-prog-name {
  color: var(--fg);
  font-size: 0.95rem;
  letter-spacing: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.coatroom-prog-state {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}
.coatroom-prog-bar {
  display: block;
  margin-top: 0.55rem;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.coatroom-prog-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--row-accent, var(--fg-secondary));
  transition: width 220ms ease;
}

/* House directory — door buttons, one tap each. */
.coatroom-dir {
  display: grid;
  gap: 0.55rem;
}
.coatroom-link {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.82rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}
.coatroom-link:hover,
.coatroom-link:focus-visible {
  border-color: var(--fg-secondary);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
  outline: none;
}
.coatroom-link-door {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--fg-secondary);
  background: rgba(255, 255, 255, 0.045);
}
.coatroom-link-door svg {
  width: 1.15rem;
  height: 1.55rem;
}
.coatroom-link-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.coatroom-link-name {
  color: var(--fg);
  font-size: 0.98rem;
  letter-spacing: 0;
  line-height: 1.25;
}
.coatroom-link-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.coatroom-link-chev {
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
}
.coatroom-link:hover .coatroom-link-chev,
.coatroom-link:focus-visible .coatroom-link-chev {
  color: var(--fg);
}
