:root {
  --ink: #20125f;
  --purple: #35139c;
  --blue: #2457c5;
  --orange: #ef7e22;
  --lime: #a5cf38;
  --paper: #fbfaff;
  --white: #fff;
  --muted: #665f7d;
  --line: #dad4ec;
  --shadow: 0 18px 45px rgba(32, 18, 95, .14);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(160deg, #f4f0ff 0%, var(--paper) 55%, #eef7ff 100%);
  font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }
.site-header, main, footer { width: min(100% - 2rem, 900px); margin-inline: auto; }
.site-header { padding: 1rem 0 .8rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.logo-wrap { width: 100px; min-width: 100px; padding: .25rem; background: white; border: 2px solid var(--blue); border-radius: 18px 22px 17px 24px; box-shadow: 4px 5px 0 var(--orange); transform: rotate(-1deg); }
.logo-wrap img { display: block; width: 100%; height: auto; border-radius: 13px; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { color: var(--purple); font-size: clamp(.95rem, 4vw, 1.35rem); letter-spacing: .02em; }
.brand-copy small { color: var(--orange); font-size: .7rem; font-weight: 900; letter-spacing: .15em; }
.brand-copy em { margin-top: .25rem; color: var(--muted); font-size: .72rem; font-style: normal; font-weight: 700; }

main { min-height: 65vh; }
.story-card, .library-card, .not-found, .loading-card {
  overflow: hidden;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(53, 19, 156, .13);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.loading-card, .not-found { padding: 2rem; text-align: center; }
.story-head { padding: 1.4rem 1.35rem 1.2rem; color: white; background: var(--purple); }
.eyebrow { margin: 0 0 .55rem; font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; opacity: .88; }
.story-head h1 { margin: 0; font-size: clamp(1.75rem, 7vw, 2.6rem); line-height: 1.08; }
.verdict {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: -1rem 1.35rem 0;
  padding: .62rem 1rem;
  position: relative;
  color: var(--ink);
  background: var(--lime);
  border: 4px solid var(--white);
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .05em;
  box-shadow: 0 7px 18px rgba(32, 18, 95, .18);
}
.verdict.fiction { background: var(--orange); color: #301309; }
.story-body { padding: 1rem 1.35rem 1.5rem; }
.answer-line { margin: .4rem 0 1.4rem; font-size: 1.12rem; font-weight: 750; }
.story-section { padding-top: 1.15rem; border-top: 1px solid var(--line); }
.story-section + .story-section { margin-top: 1.2rem; }
.story-section h2 { margin: 0 0 .4rem; color: var(--blue); font-size: 1.15rem; }
.story-section p { margin: 0; }
.look-card { background: #f1f6df; border: 0; border-radius: 16px; padding: 1rem; }
.haunted-card { overflow: hidden; color: #eef2ff; background: #0e0b24; border: 1px solid #342c65; border-radius: 26px; box-shadow: 0 22px 60px rgba(10, 5, 35, .35); }
.haunted-head { padding: 1.5rem 1.35rem 1.25rem; background: radial-gradient(circle at 80% 0%, #492777, transparent 42%), linear-gradient(145deg, #171036, #090817); }
.haunted-head .eyebrow { color: #d5b9ff; }
.haunted-head h1 { margin: 0; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.02; }
.haunted-head p:last-child { max-width: 700px; margin: .8rem 0 0; color: #d7d2e7; }
.haunted-body { padding: 1rem 1.1rem 1.5rem; }
.haunted-viewer { aspect-ratio: 1460 / 1077; overflow: hidden; position: relative; background: #070612; border: 2px solid #6e57a1; border-radius: 16px; cursor: zoom-in; touch-action: none; user-select: none; }
.haunted-viewer.is-zoomed { cursor: grab; }
.haunted-viewer img { width: 100%; height: 100%; display: block; object-fit: cover; transform-origin: center; will-change: transform; pointer-events: none; }
.zoom-controls { display: grid; grid-template-columns: 52px 1fr 52px; gap: .55rem; margin-top: .7rem; }
.zoom-controls button, .ghost-choices button { min-height: 46px; color: white; background: #2d2458; border: 1px solid #7562a7; border-radius: 12px; font: inherit; font-weight: 900; cursor: pointer; }
.zoom-controls button:first-child, .zoom-controls button:last-child { font-size: 1.45rem; }
.zoom-hint { margin: .5rem 0 0; color: #aaa2c4; font-size: .82rem; text-align: center; }
.ghost-answer { margin-top: 1.15rem; padding: 1rem; background: #191334; border: 1px solid #3d3268; border-radius: 16px; text-align: center; }
.ghost-answer h2, .ghost-teaser h2 { margin: 0; font-size: 1.25rem; }
.ghost-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .8rem; }
.ghost-choices button.selected { color: #1b0d2b; background: #d1b5ff; border-color: #d1b5ff; }
.ghost-result { min-height: 1.55rem; margin: .75rem 0 0; color: #d9c9f3; font-weight: 750; }
.ghost-teaser { margin-top: 1.15rem; padding: 1.1rem; background: linear-gradient(145deg, #2a1746, #17112e); border-left: 5px solid #a67ad8; border-radius: 16px; }
.ghost-teaser .eyebrow { color: #d5b9ff; }
.ghost-teaser p:not(.eyebrow) { color: #d7d2e7; }
.button.haunted-action { color: #180c27; background: #d1b5ff; border-color: #d1b5ff; }
.haunted-note { margin: 1rem 0 0; color: #aaa2c4; font-size: .82rem; text-align: center; }
.vote-card { margin-top: 1.2rem; padding: 1.15rem; background: #eef5ff; border: 2px solid var(--blue); border-radius: 18px; }
.vote-card .eyebrow { color: var(--blue); }
.vote-card h2 { margin: 0 0 .85rem; color: var(--ink); font-size: 1.3rem; line-height: 1.2; }
.vote-form fieldset { display: grid; gap: .55rem; margin: 0; padding: 0; border: 0; }
.vote-choice { display: grid; grid-template-columns: 1.25rem 1fr; align-items: center; gap: .7rem; padding: .75rem .8rem; background: white; border: 1px solid #b9caef; border-radius: 12px; cursor: pointer; font-weight: 750; }
.vote-choice:has(input:checked) { background: #dfeaff; border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.vote-choice input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--blue); }
.vote-card .button.primary { background: var(--blue); border-color: var(--blue); }
.vote-card button:disabled { cursor: wait; opacity: .65; }
.vote-status { margin: .65rem 0 0; color: var(--muted); font-size: .9rem; }
.vote-results { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid #b9caef; }
.vote-results h3 { margin: 0; font-size: 1.08rem; }
.vote-results > p { margin: .15rem 0 .8rem; color: var(--muted); font-size: .88rem; }
.result-list { display: grid; gap: .7rem; }
.result-item > div:first-child { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; }
.result-track { height: .65rem; overflow: hidden; margin-top: .25rem; background: white; border: 1px solid #b9caef; border-radius: 999px; }
.result-track span { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width .3s ease; }
.my-votes, .collection-review { margin: 1.25rem 0; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.my-votes h2, .collection-review h2 { margin: 0; font-size: 1.3rem; }
.my-votes > p, .collection-review > p { margin: .35rem 0 .8rem; color: var(--muted); }
.my-votes > div, .collection-review > div { display: grid; gap: .55rem; }
.my-votes a, .collection-review a { display: grid; padding: .75rem .85rem; color: var(--ink); background: #eef5ff; border-left: 4px solid var(--blue); border-radius: 10px; text-decoration: none; }
.collection-review a { background: #fff4e8; border-left-color: var(--orange); }
.my-votes a span, .collection-review a span { color: var(--muted); font-size: .9rem; }
.viewfinder-images { display: grid; gap: .8rem; margin: 1.2rem 0; }
.viewfinder-images figure { margin: 0; overflow: hidden; background: #eef5ff; border: 1px solid #b9caef; border-radius: 16px; }
.viewfinder-images img { width: 100%; height: auto; display: block; }
.viewfinder-images figcaption { padding: .7rem .85rem; color: var(--muted); font-size: .9rem; font-weight: 700; }
.image-note {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-style: italic;
  line-height: 1.4;
}
.results-report > p { color: var(--muted); }
.report-dashboard { margin-top: 1.3rem; }
.report-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.report-summary div { min-width: 0; padding: 1rem .6rem; color: white; background: linear-gradient(145deg, var(--purple), var(--blue)); border-radius: 14px; text-align: center; }
.report-summary strong { display: block; font-size: clamp(1.35rem, 5vw, 2rem); line-height: 1; }
.report-summary span { display: block; margin-top: .4rem; font-size: .72rem; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.report-updated { margin: .65rem 0 0; color: var(--muted); font-size: .8rem; text-align: right; }
.report-list { display: grid; gap: 1rem; margin: 1.3rem 0; }
.report-question { padding: 1rem; background: #f8faff; border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 14px; break-inside: avoid; }
.report-question h2 { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.report-question > p:not(.branch-type) { margin: .25rem 0 .8rem; color: var(--muted); font-size: .88rem; }
.report-question .leading-choice { padding: .55rem .7rem; color: var(--ink); background: #e8f4c8; border-radius: 9px; }
.source-link { display: inline-block; margin-top: 1.35rem; color: var(--blue); font-weight: 700; text-underline-offset: 3px; }
.button {
  min-height: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: .72rem .9rem;
  border: 2px solid var(--purple);
  border-radius: 14px;
  color: var(--purple);
  background: white;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}
.button.primary { color: white; background: var(--purple); }
.button.wide { width: 100%; margin-top: 1rem; }
.button.explore-action { color: white; background: var(--purple); border-color: var(--purple); }
.branch-detail .button.branch-action { color: white; background: var(--accent); border-color: var(--accent); }
.collection-facts .button.collection-action { color: white; background: var(--orange); border-color: var(--orange); }
.collection-viewfinders .button.collection-action { color: white; background: var(--blue); border-color: var(--blue); }
.library-card { padding: 1.4rem; }
.library-card h1 { margin: 0; font-size: clamp(1.8rem, 7vw, 2.5rem); line-height: 1.1; }
.library-card > p { color: var(--muted); }
.collection-card { margin: .8rem 0 1.35rem; padding: 1rem; border-radius: 18px; color: white; background: var(--blue); }
.collection-card > div:first-child { display: grid; }
.collection-card span { font-size: .88rem; opacity: .9; }
.collection-card a { display: inline-block; margin-top: .7rem; font-weight: 800; text-underline-offset: 3px; }
.stamp-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 .2rem; }
.stamp { width: 35px; height: 35px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-weight: 900; opacity: .55; }
.stamp.found { color: var(--ink); background: var(--lime); border-color: var(--lime); opacity: 1; }
.symbol-note { margin: 0 1.35rem 1.5rem; padding: .9rem 1rem; border: 2px dashed var(--orange); border-radius: 15px; }
.symbol-note span { display: inline-grid; place-items: center; min-width: 2.1rem; min-height: 2.1rem; margin-left: .25rem; border-radius: 50%; color: white; background: var(--orange); font-weight: 900; }
.progress-card .stamp-row { margin: 1.25rem 0; }
.progress-card .stamp { width: 42px; height: 42px; }
.reward-card { margin: 1.25rem 0; padding: 1.25rem; border: 3px solid var(--lime); border-radius: 20px; text-align: center; background: #f6ffe4; }
.reward-card > span { display: block; color: var(--orange); font-size: 3rem; line-height: 1; }
.reward-card strong { display: block; margin-top: .4rem; color: var(--purple); font-size: 1.35rem; }
.reward-card p { margin-bottom: 0; }
.privacy-note { color: var(--muted); font-size: .9rem; }
.experience-hero {
  display: grid;
  gap: 1.25rem;
  overflow: hidden;
  padding: clamp(1.6rem, 6vw, 3rem);
  color: white;
  background: linear-gradient(135deg, #24106f, var(--purple) 52%, #4f18b8);
  border-radius: 28px;
  box-shadow: var(--shadow);
  position: relative;
}
.hero-watermark { width: min(72%, 500px); height: auto; position: absolute; right: -4%; top: 50%; transform: translateY(-50%); opacity: .12; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; }
.experience-hero h1 { max-width: 720px; margin: 0; font-size: clamp(2rem, 8vw, 3.8rem); line-height: 1.02; }
.hero-copy > p:not(.eyebrow) { max-width: 680px; margin: 1rem 0 0; font-size: 1.08rem; }
.experience-section { margin-top: 2rem; }
.section-heading { margin: 0 0 1rem; }
.section-heading .eyebrow { color: var(--blue); }
.section-heading h2, .map-card h2, .start-card h2 { margin: 0; font-size: clamp(1.55rem, 5vw, 2.2rem); line-height: 1.12; }
.branch-grid { display: grid; gap: .85rem; }
.branch-card { overflow: hidden; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-bottom: 7px solid var(--accent); border-radius: 22px; box-shadow: 0 9px 24px rgba(32,18,95,.09); }
.branch-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eeeaf8; }
.branch-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-placeholder { width: 100%; height: 100%; display: grid; place-content: center; gap: .25rem; padding: 1rem; color: var(--accent); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--accent) 9%, white) 0 12px, color-mix(in srgb, var(--accent) 3%, white) 12px 24px); text-align: center; }
.photo-placeholder::before { content: "▱"; font-size: 2.6rem; line-height: 1; }
.photo-placeholder span { font-size: .72rem; font-weight: 900; letter-spacing: .15em; }
.photo-placeholder strong { font-size: 1rem; }
.branch-number { width: 42px; height: 42px; display: grid; place-items: center; position: absolute; left: .8rem; bottom: .8rem; color: white; background: var(--accent); border: 3px solid white; border-radius: 50%; font-weight: 900; box-shadow: 0 4px 10px rgba(32,18,95,.22); }
.branch-content { padding: 1rem 1.05rem 1.15rem; }
.branch-type { margin: 0 0 .15rem; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.branch-card h3 { margin: 0; font-size: 1.22rem; line-height: 1.15; }
.branch-content > p:last-of-type { margin: .45rem 0 0; color: #4f4868; }
.branch-card a { display: inline-block; margin-top: .7rem; color: var(--blue); font-weight: 800; text-underline-offset: 3px; }
.branch-detail { overflow: hidden; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-bottom: 8px solid var(--accent); border-radius: 26px; box-shadow: var(--shadow); }
.branch-detail-media { aspect-ratio: 16 / 8; overflow: hidden; background: #eeeaf8; }
.branch-detail-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.branch-detail-body { padding: 1.35rem; }
.branch-detail h1 { margin: 0; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.04; }
.branch-lead { margin: .75rem 0; color: var(--ink); font-size: 1.12rem; font-weight: 750; }
.location-pill { margin-top: 1.2rem; padding: .85rem 1rem; color: var(--ink); background: color-mix(in srgb, var(--accent) 16%, white); border-left: 5px solid var(--accent); border-radius: 12px; }
.branch-vote-note { margin: 1rem 0 0; padding: .85rem 1rem; color: var(--ink); background: #eef5ff; border-left: 5px solid var(--blue); border-radius: 12px; }
.how-to { margin-top: 1.35rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.how-to h2 { margin: 0; color: var(--purple); font-size: 1.25rem; }
.how-to ol { margin: .7rem 0 0; padding-left: 1.4rem; }
.how-to li + li { margin-top: .45rem; }
.comic-how { margin-top: 1.35rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.comic-how h2 { margin: 0; color: var(--purple); font-size: 1.25rem; }
.comic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .8rem; }
.comic-panel { min-width: 0; margin: 0; overflow: hidden; background: #f5f2ff; border: 1px solid var(--line); border-radius: 16px; }
.comic-panel-visual { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: white; border-bottom: 1px solid var(--line); }
.comic-panel-visual img { width: 200%; max-width: none; height: 200%; position: absolute; display: block; }
.panel-1 img { left: 0; top: 0; }
.panel-2 img { left: -100%; top: 0; }
.panel-3 img { left: 0; top: -100%; }
.panel-4 img { left: -100%; top: -100%; }
.comic-panel figcaption { min-height: 5.3rem; display: grid; grid-template-columns: 2rem 1fr; align-items: start; gap: .55rem; padding: .75rem; color: var(--ink); font-size: .9rem; font-weight: 750; line-height: 1.35; }
.comic-panel figcaption span { width: 2rem; height: 2rem; display: grid; place-items: center; color: white; background: var(--purple); border-radius: 50%; font-weight: 900; }
.visually-hidden { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.map-card { margin-top: 1.1rem; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 9px 24px rgba(32,18,95,.09); }
.map-card-copy { padding: 1.25rem 1.4rem 1rem; }
.map-card .eyebrow { color: var(--blue); }
.map-card-copy p:last-child { margin: .55rem 0 0; color: var(--muted); }
.map-card img { width: 100%; height: auto; display: block; border-top: 1px solid var(--line); }
.start-card { margin-top: 1.1rem; padding: 1.4rem; color: var(--ink); background: #eff8d8; border: 2px dashed var(--lime); border-radius: 22px; }
.start-card .eyebrow { color: #486100; }
.start-card p:last-child { margin-bottom: 0; }
footer { padding: 1.5rem 0 2.5rem; color: var(--purple); text-align: center; font-size: .85rem; }
footer strong { letter-spacing: .04em; }
.footer-link { text-underline-offset: 3px; }
.footer-link:hover, .footer-link:focus-visible { color: var(--blue); }
footer p { margin: .25rem 0 0; color: var(--muted); font-weight: 700; }

.online-stops-card {
  margin: 24px 0;
  padding: clamp(22px, 4vw, 36px);
  background: #fff;
  color: #16133a;
  border: 1px solid #ded8ef;
  border-top: 5px solid #f26a21;
  border-radius: 22px;
}

.online-stops-card h2 {
  margin: 0 0 14px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

.online-stops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.online-stop {
  display: block;
  padding: 16px;
  border: 1px solid #ded8ef;
  border-radius: 14px;
  background: #f4f0ff;
  color: #3213a7;
  text-decoration: none;
}

.online-stop span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  color: #625e79;
}

.online-stop:hover,
.online-stop:focus-visible {
  background: #3213a7;
  color: #fff;
}

.online-stop:hover span,
.online-stop:focus-visible span {
  color: #fff;
}

.online-collection-link {
  color: #3213a7;
  font-weight: bold;
}

@media (max-width: 480px) {
  .online-stops-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 650px) {
  .site-header { padding-top: 1.5rem; }
  .story-head { padding: 2rem 2.2rem 1.7rem; }
  .verdict { margin-left: 2.2rem; }
  .story-body { padding: 1.2rem 2.2rem 1.8rem; }
  .symbol-note { margin: 0 2.2rem 2rem; }
  .library-card { padding: 2.2rem; }
  .branch-grid { grid-template-columns: 1fr 1fr; }
  .branch-card.branch-connection-hub { grid-column: 1 / -1; }
  .start-card { padding: 2rem; }
  .branch-detail-body { padding: 2rem 2.2rem; }
  .haunted-head { padding: 2.1rem 2.2rem 1.7rem; }
  .haunted-body { padding: 1.4rem 2.2rem 2rem; }
}
@media (max-width: 420px) {
  .comic-grid { grid-template-columns: 1fr; }
  .comic-panel figcaption { min-height: 0; font-size: 1rem; }
  .report-summary { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .story-card, .library-card { animation: rise .35s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}
@media print {
  body { background: white; }
  .site-header, footer, .print-results, .results-report > .explore-action { display: none; }
  main { width: 100%; }
  .library-card { box-shadow: none; border: 0; }
  .report-list { grid-template-columns: 1fr 1fr; }
}
