/* Halloway shell stylesheet — everything the app needs that, in City
 * Seekers, came from app.css: 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 (canonical, synced verbatim with City Seekers) — this
 * file is Halloway-only and must never be required by a hunt engine.
 */

:root {
  color-scheme: dark;
  --bg: #0b1020;
  --fg: #f2f5ff;
  --fg-secondary: #c8d0e7;
  --muted: #9aa3c7;
  --accent: #e94f37;
  --accent-2: #4fc3f7;
  --card: rgba(15, 22, 48, 0.88);
  --border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

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

: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(15, 22, 48, 0.95);
  color: var(--fg);
  border: 1px solid rgba(79, 195, 247, 0.35);
  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(233, 79, 55, 0.55);
  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(34, 30, 54, 0.9), transparent 70%),
    #07060c;
  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);
}

/* Terra before the Veil finale: present, sealed, unexplained. */
.hall-door--sealed {
  pointer-events: none;
  opacity: 0.55;
}
.hall-door--sealed h2::after {
  content: " 🔒";
  font-size: 0.8em;
}

.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 {
  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(10, 15, 28, 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;
}
.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 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);
}
.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(233, 79, 55, 0.08);
}
.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);
}

/* 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);
}
/* Terra is shelved from the hall but its retained page still raises the
   paywall (catalog HIDDEN), so its unlock accent stays defined. */
.paywall.unlock--terra {
  --pw-accent: #63b6b2;
  --pw-glow: rgba(99, 182, 178, 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;
}
.paywall-earned {
  margin: 0 0 1.1rem;
  color: var(--pw-accent);
  font-size: 0.86rem;
  font-style: italic;
}
.paywall-lure {
  margin: 0 0 1.3rem;
  padding: 0;
  list-style: none;
  text-align: left;
}
.paywall-lure li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.55rem;
  color: var(--fg-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
}
.paywall-lure li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.5rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--pw-accent);
}
.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);
}
.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-meta {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}
.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;
}
/* ── Accounts / auth (shell-only; absent in City Seekers) ───────────────── */
.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(79, 195, 247, 0.08);
}
.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 {
  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-verified {
  color: #8fe39b;
  font-size: 0.82rem;
}
.account-panel .account-delete {
  margin-top: 0.9rem;
  padding: 0.45rem 0.8rem;
  background: transparent;
  border: 1px solid rgba(233, 79, 55, 0.55);
  border-radius: 9px;
  color: #ffb3a6;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.account-panel .account-delete[disabled] {
  opacity: 0.6;
  cursor: default;
}
.account-delete-note {
  margin-top: 0.5rem;
  font-size: 0.76rem;
}

/* ── 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-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.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);
}

/* ── 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(10, 15, 28, 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 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, adapted from the eyes-only ghost-keyhole brand pass. */
.coatroom-keyhole {
  --coat-eye-x: 0px;
  --coat-eye-y: 0px;
  --coat-light-x: 50%;
  --coat-light-y: 38%;
  --coat-scene-x: 0px;
  --coat-scene-y: 0px;
  display: grid;
  place-items: center;
  min-height: clamp(12rem, 54vw, 19rem);
  padding: clamp(0.9rem, 4vw, 1.4rem) 1rem 0.3rem;
  background:
    radial-gradient(circle at var(--coat-light-x) var(--coat-light-y), rgba(197, 146, 255, 0.22), transparent 34%),
    radial-gradient(80% 65% at 50% 8%, rgba(88, 55, 126, 0.28), transparent 62%),
    #08070d;
  touch-action: pan-y;
}
.coatroom-keyhole-svg {
  display: block;
  width: min(100%, 18.5rem);
  height: auto;
  transform: translate3d(var(--coat-scene-x), var(--coat-scene-y), 0);
  filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.48));
  transition: transform 180ms ease-out;
}
.coatroom-keyhole-stone {
  filter: drop-shadow(0 0 18px rgba(151, 95, 202, 0.2));
}
.coatroom-keyhole-ring {
  stroke: rgba(198, 160, 255, 0.18);
  stroke-width: 3;
}
.coatroom-crack {
  fill: none;
  stroke: rgba(236, 224, 255, 0.13);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.coatroom-keyhole-aura {
  fill: none;
  stroke: rgba(208, 144, 255, 0.62);
  stroke-width: 9;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 14px rgba(202, 126, 255, 0.72));
}
.coatroom-keyhole-cut {
  fill: #02030a;
  stroke: rgba(244, 219, 255, 0.7);
  stroke-width: 2;
  stroke-linejoin: round;
}
.coatroom-shadow {
  fill: #05040b;
}
.coatroom-eyes {
  fill: #fff2d2;
  transform-box: fill-box;
  transform-origin: center;
  transform: translate3d(var(--coat-eye-x), var(--coat-eye-y), 0);
  transition: transform 180ms ease-out;
}
.coatroom-eyes ellipse {
  animation: coatroom-blink 9s ease-in-out infinite;
  transform-origin: center;
}
@keyframes coatroom-blink {
  0%, 91%, 95%, 100% { transform: scaleY(1); }
  93% { transform: scaleY(0.18); }
}
.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);
}

@media (prefers-reduced-motion: reduce) {
  .coatroom-keyhole-svg,
  .coatroom-eyes {
    transform: none;
    transition: none;
  }
  .coatroom-eyes ellipse {
    animation: none;
  }
}
