/* =========================================================
   The Stockholm Mystery — Atmospheric Theme
   18th-century tavern: candlelit, dark, parchment, ember
   ========================================================= */

:root {
  /* Palette */
  --ink: #1a0f08;            /* deepest black-brown */
  --night: #251710;          /* tavern shadow */
  --oak: #3a2418;            /* timber */
  --parchment: #e8d9b8;      /* aged paper */
  --parchment-dim: #b8a684;  /* faded text */
  --candle: #ffb547;         /* flame */
  --ember: #c9461d;          /* glow / accent */
  --blood: #6e1c12;          /* dark red */
  --gold: #c9a64a;           /* tarnished brass */

  /* Type */
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'IM Fell English', Georgia, 'Times New Roman', serif;

  /* Layout */
  --content-max: 32rem;
  --radius: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background: var(--ink);
}

body {
  font-family: var(--font-body);
  color: var(--parchment);
  font-size: 18px;
  line-height: 1.6;
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 181, 71, 0.10), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(110, 28, 18, 0.18), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.05  0 0 0 0 0.03  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  background-attachment: fixed;
  background-size: auto, auto, 160px 160px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Soft vignette darkens edges (mobile-feel) */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 35%,
    rgba(0, 0, 0, 0.55) 85%,
    rgba(0, 0, 0, 0.85) 100%
  );
  z-index: 1;
}

/* Subtle candle flicker — animated overlay */
.flicker {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 30%,
    rgba(255, 181, 71, 0.06),
    transparent 60%
  );
  animation: flicker 4.5s infinite ease-in-out;
  z-index: 2;
  mix-blend-mode: screen;
}

@keyframes flicker {
  0%, 100% { opacity: 0.85; }
  20%      { opacity: 1.00; }
  40%      { opacity: 0.70; }
  55%      { opacity: 0.95; }
  70%      { opacity: 0.65; }
  85%      { opacity: 0.90; }
}

@media (prefers-reduced-motion: reduce) {
  .flicker { animation: none; opacity: 0.85; }
}

/* =========================================================
   App layout
   ========================================================= */

.app {
  position: relative;
  z-index: 3;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 720px) {
  .app { padding: 3.5rem 1.5rem 6rem; }
}

/* =========================================================
   Typography
   ========================================================= */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--candle);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-shadow: 0 0 18px rgba(255, 181, 71, 0.25);
}

h1 {
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  text-align: center;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: clamp(1.3rem, 5vw, 1.6rem);
  margin: 1.5rem 0 0.5rem;
  color: var(--gold);
}

h3 {
  font-size: 1.1rem;
  color: var(--gold);
  margin: 1.25rem 0 0.5rem;
}

p { margin-bottom: 1rem; }

p.lead {
  font-style: italic;
  color: var(--parchment-dim);
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Decorative ornament between sections */
.ornament {
  text-align: center;
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 0.5em;
  margin: 2rem 0;
  opacity: 0.6;
  user-select: none;
}
.ornament::before { content: "✦ ⚜ ✦"; }

/* =========================================================
   Cards (parchment panels)
   ========================================================= */

.parchment {
  background:
    linear-gradient(180deg, rgba(58, 36, 24, 0.85), rgba(37, 23, 16, 0.85));
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.5),
    0 4px 24px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.25rem;
}

.song-box audio {
  width: 100%;
  margin-top: 0.5rem;
  filter: sepia(0.35) hue-rotate(-15deg);
}

.story {
  font-size: 1.05rem;
  line-height: 1.7;
}

.story p::first-letter {
  font-family: var(--font-display);
  font-size: 2.4em;
  float: left;
  line-height: 0.85;
  padding: 0.2rem 0.5rem 0 0;
  color: var(--ember);
}

/* =========================================================
   Stop list (landing page)
   ========================================================= */

.stop-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.stop-card {
  display: block;
  padding: 1rem 1.1rem;
  background: linear-gradient(
    180deg,
    rgba(58, 36, 24, 0.7),
    rgba(26, 15, 8, 0.7)
  );
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  color: var(--parchment);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.stop-card:hover,
.stop-card:focus-visible {
  border-color: var(--candle);
  box-shadow: 0 0 24px rgba(255, 181, 71, 0.15);
  transform: translateY(-1px);
  outline: none;
}

.stop-card.locked {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.5);
}

.stop-card.completed {
  border-color: var(--gold);
}

.stop-card .num {
  font-family: var(--font-display);
  color: var(--candle);
  font-size: 1.5rem;
  display: inline-block;
  width: 2rem;
}

.stop-card .title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.stop-card .meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--parchment-dim);
  font-style: italic;
}

.stop-card .badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  color: var(--gold);
}

/* =========================================================
   Forms / puzzles
   ========================================================= */

.puzzle {
  margin-top: 1rem;
}

.puzzle label {
  display: block;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.puzzle input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  color: var(--parchment);
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.puzzle input[type="text"]:focus {
  border-color: var(--candle);
  box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.15);
}

.feedback {
  margin-top: 0.75rem;
  min-height: 1.5rem;
  font-style: italic;
}
.feedback.correct { color: var(--candle); }
.feedback.wrong   { color: var(--ember); }

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-block;
  font: inherit;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  margin-top: 0.75rem;
  background: linear-gradient(180deg, var(--blood), #4a1209);
  color: var(--parchment);
  border: 1px solid var(--ember);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.2s ease;
  text-align: center;
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(1.15);
  box-shadow: 0 0 18px rgba(201, 70, 29, 0.4);
  outline: none;
}

.btn:active { transform: translateY(1px); }

.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-ghost {
  background: transparent;
  border-color: var(--oak);
  color: var(--parchment-dim);
}

.link-btn {
  background: none;
  border: none;
  color: var(--parchment-dim);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: var(--candle); }

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.actions .btn { margin-top: 0; flex: 1 1 auto; }

/* =========================================================
   Progress bar
   ========================================================= */

.progress {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 1rem 0 2rem;
}

.progress .pip {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: 1px solid var(--oak);
  background: transparent;
}

.progress .pip.done {
  background: var(--candle);
  border-color: var(--candle);
  box-shadow: 0 0 8px rgba(255, 181, 71, 0.6);
}

/* =========================================================
   Stop view header
   ========================================================= */

.stop-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.stop-header .stop-num {
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}

.stop-header .pub-meta {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: 0.95rem;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  text-align: center;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  font-size: 0.8rem;
  color: var(--parchment-dim);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.6) 50%);
  pointer-events: none;
}
.footer * { pointer-events: auto; }
.footer-sep { margin: 0 0.5rem; opacity: 0.5; }
.footer-text { font-style: italic; }

/* Language toggle (EN | SV) */
.lang-toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}
.lang-toggle button {
  background: none;
  border: none;
  color: var(--parchment-dim);
  font: inherit;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  padding: 0.1rem 0.35rem;
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}
.lang-toggle button:hover,
.lang-toggle button:focus-visible {
  color: var(--candle);
  outline: none;
}
.lang-toggle button.active {
  color: var(--candle);
  background: rgba(255, 181, 71, 0.12);
  text-shadow: 0 0 6px rgba(255, 181, 71, 0.4);
}
.lang-sep {
  color: var(--parchment-dim);
  opacity: 0.5;
}

/* =========================================================
   Utility / accessibility
   ========================================================= */

a { color: var(--candle); }
a:hover { color: var(--gold); }

::selection { background: var(--ember); color: var(--ink); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* =========================================================
   Stop card extras
   ========================================================= */

.stop-card .witness-tag {
  display: block;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--gold);
  margin-top: 0.35rem;
  letter-spacing: 0.04em;
}

.utility-row {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  flex-wrap: wrap;
}
.utility-row .btn { margin-top: 0; flex: 1 1 auto; }

/* =========================================================
   Witness card on the stop header
   ========================================================= */

.witness-card {
  margin-top: 0.75rem;
  font-style: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.witness-card .witness-name {
  font-family: var(--font-display);
  color: var(--candle);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.witness-card .witness-beat {
  font-style: italic;
  color: var(--parchment-dim);
  font-size: 0.85rem;
}

/* Per-character story tints — subtle border highlight */
.story--jean-fredman      { border-left: 3px solid var(--gold); }
.story--corporal-mollberg { border-left: 3px solid var(--ember); }
.story--father-movitz     { border-left: 3px solid #6b8a6b; }
.story--ulla-winblad      { border-left: 3px solid #c98ab8; }
.story--carl-michael-bellman { border-left: 3px solid var(--candle); }

/* =========================================================
   Verse box
   ========================================================= */

.verse-box {
  background: linear-gradient(180deg, rgba(232, 217, 184, 0.08), rgba(232, 217, 184, 0.02));
  border-color: var(--gold);
}
.verse-text {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--parchment);
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 1.05rem;
  margin: 0;
}
/* Strip first-letter drop-cap inside verse boxes — looks wrong on poetry */
.verse-box .verse-text::first-letter,
.songbook .verse-text::first-letter,
.broadside .verse-text::first-letter {
  font-family: inherit;
  font-size: inherit;
  float: none;
  padding: 0;
  color: inherit;
}

/* =========================================================
   Puzzle prompt
   ========================================================= */

.puzzle-prompt {
  font-style: italic;
  color: var(--parchment-dim);
  margin-bottom: 1rem;
}

/* =========================================================
   Multi-step (Stop 1)
   ========================================================= */

.multi-step .step {
  border-top: 1px dashed var(--oak);
  padding-top: 1rem;
  margin-top: 1rem;
}
.multi-step .step:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.step-done { opacity: 0.55; }

/* =========================================================
   Multi-choice buttons
   ========================================================= */

.choice-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin: 0.5rem 0 0.25rem;
}
.choice-btn {
  font: inherit;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  padding: 0.85rem 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  color: var(--parchment);
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
}
.choice-btn:hover:not(:disabled),
.choice-btn:focus-visible:not(:disabled) {
  border-color: var(--candle);
  outline: none;
}
.choice-btn:active:not(:disabled) { transform: translateY(1px); }
.choice-btn.correct {
  border-color: var(--candle);
  background: rgba(255, 181, 71, 0.15);
  color: var(--candle);
}
.choice-btn.wrong {
  border-color: var(--ember);
  background: rgba(201, 70, 29, 0.15);
  animation: shake 0.4s;
}
.choice-btn:disabled { cursor: default; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* =========================================================
   Photo grid (observation)
   ========================================================= */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin: 0.5rem 0;
}
.photo-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  color: var(--parchment);
  transition: border-color 0.2s, transform 0.1s;
}
.photo-tile:hover:not(:disabled),
.photo-tile:focus-visible:not(:disabled) {
  border-color: var(--candle);
  outline: none;
}
.photo-tile.correct {
  border-color: var(--candle);
  background: rgba(255, 181, 71, 0.15);
}
.photo-tile.wrong { animation: shake 0.4s; border-color: var(--ember); }
.photo-glyph { font-size: 2.2rem; }
.photo-label {
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
  color: var(--parchment-dim);
}
.photo-tile.correct .photo-label { color: var(--candle); }

/* =========================================================
   Reorder list (Stop 2)
   ========================================================= */

.reorder-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  padding: 0;
}
.reorder-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--oak);
  border-radius: var(--radius);
}
.reorder-handle {
  color: var(--gold);
  font-size: 1.2rem;
  user-select: none;
}
.reorder-text {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--parchment);
}
.reorder-controls {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.rbtn {
  background: rgba(255, 181, 71, 0.1);
  color: var(--candle);
  border: 1px solid var(--oak);
  border-radius: 3px;
  font-size: 0.8rem;
  padding: 0.1rem 0.5rem;
  cursor: pointer;
  font-family: inherit;
}
.rbtn:hover:not(:disabled) { background: rgba(255, 181, 71, 0.2); }
.rbtn:disabled { opacity: 0.3; cursor: not-allowed; }

.verse-locked {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  font-style: italic;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}
.verse-locked li { margin: 0.3rem 0; }

/* =========================================================
   Shield grid (Stop 3)
   ========================================================= */

.shield-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0.5rem 0;
}
.shield-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  color: var(--parchment);
  transition: border-color 0.2s, transform 0.1s;
}
.shield-tile:hover:not(:disabled),
.shield-tile:focus-visible:not(:disabled) {
  border-color: var(--candle);
  outline: none;
}
.shield-tile.correct {
  border-color: var(--candle);
  background: rgba(255, 181, 71, 0.15);
}
.shield-tile.wrong { animation: shake 0.4s; border-color: var(--ember); }
.shield-svg { width: 80px; height: 95px; display: block; }
.shield-id {
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 0.2em;
  font-size: 0.85rem;
}
.shield-label {
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  color: var(--parchment-dim);
}

/* =========================================================
   Acrostic (Stop 4)
   ========================================================= */

.acrostic {
  margin: 0.5rem 0 1rem;
  padding: 1rem;
  background: rgba(232, 217, 184, 0.05);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
}
.acrostic-line {
  font-style: italic;
  margin: 0.3rem 0;
  font-size: 1.05rem;
  line-height: 1.7;
}
.gilt {
  display: inline-block;
  color: var(--candle);
  font-family: var(--font-display);
  font-size: 1.25em;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 181, 71, 0.6);
  border-bottom: 1px solid var(--candle);
  padding: 0 1px;
}

/* =========================================================
   Fill-in-the-blank verse (Stop 5)
   ========================================================= */

.fill-verse {
  font-family: var(--font-body);
  font-style: italic;
  white-space: pre-wrap;
  line-height: 2.1;
  background: linear-gradient(180deg, rgba(232, 217, 184, 0.08), rgba(232, 217, 184, 0.02));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.fill-text { white-space: pre-wrap; }
.fill-slot {
  display: inline-block;
  min-width: 7ch;
  padding: 0.15rem 0.6rem;
  margin: 0 0.15rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px dashed var(--gold);
  border-radius: 3px;
  color: var(--candle);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  font-size: 0.95rem;
  cursor: pointer;
  vertical-align: baseline;
}
.fill-slot:hover { background: rgba(255, 181, 71, 0.1); }
.fill-slot.filled {
  border-style: solid;
  background: rgba(255, 181, 71, 0.15);
}
.fill-slot.correct {
  border-color: var(--candle);
  color: var(--candle);
}
.slot-tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-style: italic;
  color: var(--parchment-dim);
  letter-spacing: 0;
  text-transform: none;
}

/* Keepsake tray */
.tray-wrap { margin-top: 1rem; }
.tray-hint {
  font-size: 0.8rem;
  color: var(--parchment-dim);
  font-style: italic;
  margin-bottom: 0.5rem;
}
.keepsake-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  min-height: 3rem;
}
.keepsake-chip {
  font: inherit;
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  padding: 0.35rem 0.85rem;
  background: linear-gradient(180deg, rgba(201, 166, 74, 0.2), rgba(201, 166, 74, 0.05));
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.1s, box-shadow 0.2s;
}
.keepsake-chip:hover:not(:disabled) {
  box-shadow: 0 0 12px rgba(201, 166, 74, 0.3);
}
.keepsake-chip.selected {
  background: rgba(255, 181, 71, 0.25);
  color: var(--candle);
  border-color: var(--candle);
  box-shadow: 0 0 12px rgba(255, 181, 71, 0.4);
}
.keepsake-chip.static {
  cursor: default;
}
.tray-empty {
  font-style: italic;
  color: var(--parchment-dim);
  margin: 0;
}

/* Witness Notes pane */
.witness-notes-pane {
  margin: 0.75rem 0 1rem;
}
.witness-notes-list {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
}
.witness-note {
  font-style: italic;
  color: var(--parchment-dim);
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

/* =========================================================
   Hint row
   ========================================================= */

.hint-row {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hint-row .btn {
  align-self: flex-end;
  margin-top: 0;
}
.hint-area:empty { display: none; }
.hint {
  font-style: italic;
  margin: 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--gold);
  background: rgba(201, 166, 74, 0.08);
  border-radius: 3px;
  color: var(--parchment-dim);
}
.hint-1 { border-left-color: var(--gold); }
.hint-2 { border-left-color: var(--candle); color: var(--parchment); }
.hint-3 { border-left-color: var(--ember); color: var(--candle); }

/* =========================================================
   Next-step / directions
   ========================================================= */

.next-block {
  margin-top: 1rem;
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201, 166, 74, 0.12), rgba(37, 23, 16, 0.85));
}
.next-block h3 { margin-top: 0; }
.keepsake-earned {
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  color: var(--candle);
  font-size: 0.95rem;
}
.directions { font-style: italic; }
.next-meta {
  margin: 0.75rem 0;
  font-size: 0.95rem;
}
.next-address { color: var(--parchment-dim); font-style: italic; }

/* Walking-directions card — embedded inside .next-block */
.walking-card {
  margin: 1rem 0 0.5rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid rgba(201, 166, 74, 0.45);
  border-radius: var(--radius);
  background: rgba(26, 15, 8, 0.55);
}
.walking-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  align-items: baseline;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.walking-time {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--candle);
  letter-spacing: 0.04em;
}
.walking-dist {
  color: var(--parchment-dim);
  font-style: italic;
}
.walking-cross {
  flex: 1 1 100%;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ember);
  letter-spacing: 0.04em;
}
.walking-steps {
  list-style: none;
  counter-reset: walkstep;
  padding: 0;
  margin: 0.4rem 0 0.7rem;
}
.walking-steps li {
  counter-increment: walkstep;
  position: relative;
  padding: 0.4rem 0 0.4rem 2.1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  border-bottom: 1px dashed rgba(184, 166, 132, 0.25);
}
.walking-steps li:last-child { border-bottom: none; }
.walking-steps li::before {
  content: counter(walkstep);
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(201, 166, 74, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.walking-landmark {
  font-size: 0.92rem;
  margin: 0.4rem 0 0;
  color: var(--parchment-dim);
}
.walking-landmark strong {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-right: 0.4em;
}
.walking-note {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ember);
  padding-left: 0.6rem;
  border-left: 2px solid var(--ember);
}
.walking-maps {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}
.btn-sm {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.82rem !important;
  flex: 1 1 auto;
}
.walking-qr-note {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--parchment-dim);
  text-align: center;
}

/* =========================================================
   Songbook
   ========================================================= */

.songbook .verse-text {
  margin-bottom: 1rem;
}
.songbook h3 {
  border-bottom: 1px dashed var(--oak);
  padding-bottom: 0.25rem;
}
.keepsake-section .keepsake-tray { background: transparent; border: none; padding: 0; }

/* =========================================================
   Broadside (finale)
   ========================================================= */

.broadside {
  background:
    repeating-linear-gradient(0deg, rgba(232, 217, 184, 0.02) 0 4px, transparent 4px 8px),
    linear-gradient(180deg, rgba(58, 36, 24, 0.92), rgba(37, 23, 16, 0.92));
  border-color: var(--gold);
}
.broadside-title {
  text-align: center;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  margin-bottom: 0.25rem;
}
.broadside-subtitle {
  text-align: center;
  font-style: italic;
  color: var(--parchment-dim);
  margin-bottom: 1rem;
}
.broadside-verse {
  margin: 1rem 0;
}
.broadside-verse h3 {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  border: none;
}
.broadside-verse .verse-text {
  text-align: center;
  font-style: italic;
}
.closing-text {
  font-family: var(--font-body);
  font-style: italic;
  text-align: center;
  white-space: pre-wrap;
  color: var(--candle);
  margin: 1rem 0;
}

.choice-box { border-color: var(--candle); }
.choice-box .actions .btn { flex: 1 1 45%; }

.ending h2, .skal h2 { color: var(--candle); }
.ending .closing {
  font-style: italic;
  color: var(--parchment-dim);
  text-align: center;
  margin-top: 1.5rem;
}
.skal { text-align: center; border-color: var(--gold); }
