/* The Glasshouse Wanderer — Atlas Botánico Iluminado Design System
 * Victorian Botanical Sunroom: Conservatory Emerald, Sunlit Cotton Rag, Antique Brass, Dew Sage.
 */
:root {
  --emerald: #14261E;
  --emerald-deep: #0E1C16;
  --iron-slate: #1F352B;
  --parchment: #FAF5E8;
  --parchment-2: #F2EBD9;
  --blotting: #E9DEC8;
  --brass: #C59B43;
  --brass-bright: #E2BF6B;
  --brass-dark: #8C6A22;
  --sage: #4B7358;
  --sage-soft: #E5EFE7;
  --terracotta: #B85D43;
  --ink: #241F19;
  --ink-muted: #5C554B;
  --line: rgba(140, 106, 34, 0.25);
  --shadow-lg: 0 24px 60px rgba(8, 17, 13, 0.45);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: var(--emerald); color: var(--ink); font-family: 'Outfit', system-ui, sans-serif; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--sage); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.screen[hidden], [hidden] { display: none !important; }

/* Focus accessibility */
:focus-visible { outline: 2.5px solid var(--brass-bright); outline-offset: 2px; }

/* ============ BUTTONS & PILLS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .65rem 1.15rem; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-big { padding: .85rem 1.55rem; font-size: 1rem; }
.btn-sm { padding: .42rem .85rem; font-size: .82rem; }
.btn-gold { background: linear-gradient(135deg, var(--brass-bright), var(--brass)); color: #19130A; border-color: #9A7527; box-shadow: 0 6px 18px rgba(197, 155, 67, 0.28); }
.btn-gold:hover:not(:disabled) { background: linear-gradient(135deg, #ECCB7B, #CF9F3F); }
.btn-brass { background: linear-gradient(135deg, #DDB85E, #B58932); color: #19130A; border-color: #8C6A22; box-shadow: 0 4px 14px rgba(140, 106, 34, 0.25); }
.btn-brass:hover:not(:disabled) { background: linear-gradient(135deg, #EAC872, #C59B43); }
.btn-sage { background: var(--sage); color: #FAF7EE; border-color: #385843; }
.btn-sage:hover:not(:disabled) { background: #3D6249; }
.btn-ghost { background: rgba(255,255,255,0.72); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: #FFFFFF; border-color: var(--brass); }
.btn-danger { background: #FDF0EC; color: #8D2B18; border-color: rgba(184,93,67,0.45); }
.btn-link { background: none; border: 0; color: var(--sage); font-weight: 600; font-size: .84rem; cursor: pointer; padding: .15rem .35rem; text-decoration: underline; }
[data-hold], [data-hold-press], .is-interactive { touch-action: none; -webkit-user-select: none; user-select: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-width: 38px; height: 38px; padding: 0 .65rem; border-radius: 999px;
  border: 1px solid rgba(226, 191, 107, 0.38); background: rgba(20, 38, 30, 0.85);
  color: var(--parchment); cursor: pointer; font-size: .9rem;
  transition: background-color .16s ease, border-color .16s ease;
}
.icon-btn:hover { background: rgba(31, 53, 43, 0.96); border-color: var(--brass-bright); }
.close-x { background: rgba(242, 235, 217, 0.9); color: var(--ink); border-color: var(--line); min-width: 36px; height: 36px; padding: 0; }
.close-x:hover { background: #FFFFFF; }

.pill {
  display: inline-flex; align-items: center; padding: .28rem .7rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; background: rgba(226, 191, 107, 0.16);
  color: var(--brass-bright); border: 1px solid rgba(226, 191, 107, 0.35);
}
.pill-sage { background: rgba(95, 133, 107, 0.3); color: #E4F2E8; border-color: rgba(145, 194, 159, 0.4); }
.pill-quiet { background: rgba(38, 33, 27, 0.08); color: var(--ink-muted); border-color: var(--line); }
.climate-pill { display: inline-block; padding: .22rem .65rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--sage-soft); color: #264A33; border: 1px solid rgba(75,115,88,0.28); }
.box-kicker { display: block; font-family: 'Cinzel', Georgia, serif; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-dark); font-weight: 700; margin-bottom: .3rem; }
.ritual-kicker { font-family: 'Cinzel', Georgia, serif; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); font-weight: 700; margin: 0 0 .25rem; }
.muted-note { color: var(--ink-muted); font-size: .9rem; line-height: 1.5; margin: .25rem 0; }

/* Toast — anchored near topbar so it never collides with bottom atlas banner */
.toast {
  position: fixed; left: 50%; top: 4.15rem; transform: translateX(-50%) translateY(-8px);
  z-index: 10000; background: var(--emerald-deep); color: var(--parchment);
  border: 1px solid var(--brass); padding: .55rem 1.15rem; border-radius: 999px;
  box-shadow: var(--shadow-lg); font-size: .86rem; opacity: 0; transition: opacity .22s ease, transform .22s ease;
  max-width: min(92vw, 520px); text-align: center;
}
.toast.is-shown { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ ACT I: JOYFUL DESIGN ATELIER STUDIO OVERTURE ============ */
.screen-backdrop {
  position: fixed; inset: 0; pointer-events: none; background-size: cover; background-position: center;
  background-color: var(--emerald-deep); z-index: 0;
}

.intro-screen {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 3vw, 2.2rem); position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 20%, #244034 0%, #102019 68%, #09130E 100%);
}
.intro-shell {
  position: relative; z-index: 2; width: min(100%, 980px);
  display: grid; grid-template-columns: auto minmax(280px, 490px); gap: clamp(1.5rem, 4vw, 3.4rem);
  align-items: center; justify-content: center;
  background: rgba(16, 33, 25, 0.78); backdrop-filter: blur(10px);
  border: 1.5px solid rgba(226, 191, 107, 0.45); border-radius: 26px;
  padding: clamp(1.3rem, 3.2vw, 2.6rem);
  box-shadow: var(--shadow-lg), inset 0 0 0 6px rgba(197, 155, 67, 0.10);
}
.intro-video-col { display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.intro-video-cameo {
  position: relative; width: min(74vw, 255px); aspect-ratio: 9 / 16;
  border-radius: 20px; overflow: hidden; border: 2px solid var(--brass);
  background: #F4EFE4; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), 0 0 36px rgba(226, 191, 107, 0.16);
}
.intro-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.intro-video-controls {
  display: flex; gap: .42rem; justify-content: center; flex-wrap: wrap;
}
.pill-btn {
  padding: .3rem .72rem; border-radius: 999px; font-size: .74rem; font-weight: 600;
  background: rgba(16, 33, 25, 0.84); color: var(--parchment);
  border: 1px solid rgba(226, 191, 107, 0.55); cursor: pointer;
  transition: background-color .15s ease;
}
.pill-btn:hover { background: var(--emerald); border-color: var(--brass-bright); }

.intro-copy-col { display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; color: var(--parchment); }
.intro-kicker {
  margin: 0; font-family: 'Cinzel', Georgia, serif; font-size: .76rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--brass-bright);
}
.intro-headline {
  margin: 0; font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  font-size: clamp(1.7rem, 3.6vw, 2.55rem); line-height: 1.15; color: #FCF7EA;
}
.intro-sub {
  margin: 0; font-family: 'Playfair Display', Georgia, serif; font-style: italic;
  font-size: clamp(.98rem, 1.8vw, 1.16rem); color: #D7C286;
}
.intro-prose {
  margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: .98rem;
  line-height: 1.62; color: #DFECE3; max-width: 46ch;
}
.intro-cta-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; margin-top: .35rem; }
.intro-badge-line { font-size: .8rem; color: #C2D4C8; letter-spacing: .04em; }

@media (max-width: 780px) {
  .intro-shell { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: .6rem; padding: .85rem .9rem; }
  .intro-copy-col { align-items: center; gap: .38rem; }
  .intro-headline { font-size: 1.28rem; }
  .intro-sub { font-size: .86rem; }
  .intro-prose { font-size: .82rem; line-height: 1.38; }
  .intro-cta-stack { align-items: center; margin-top: .12rem; }
  .intro-cta { font-size: .88rem; padding: .7rem 1.15rem; white-space: nowrap; }
  .intro-video-cameo { width: min(40vw, 146px); }
  .pin-medallion { width: 38px; height: 38px; font-size: .86rem; }
  .pin-halo { top: 19px; width: 50px; height: 50px; margin: -25px 0 0 -25px; }
  .pin-label { padding: .16rem .46rem; gap: .25rem; }
  .pin-label strong { font-size: .72rem; }
  .pin-label small { font-size: .6rem; }
}

/* ============ ACT II: WELCOME SCREEN ============ */
.welcome-screen {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: clamp(.7rem, 1.8vw, 1.35rem); position: relative;
  background: radial-gradient(circle at 50% 18%, #223E31 0%, #14261E 52%, #0C1712 100%);
}
.welcome-card {
  position: relative; z-index: 2; width: min(100%, 660px); background: rgba(250, 245, 232, 0.96);
  backdrop-filter: blur(8px);
  border: 2px solid var(--brass); border-radius: 22px; padding: clamp(1rem, 2.2vw, 1.55rem);
  box-shadow: var(--shadow-lg), inset 0 0 0 6px rgba(197, 155, 67, 0.14);
}
.welcome-door-arch {
  width: 100%; height: 86px; border-radius: 14px; overflow: hidden; margin-bottom: .55rem;
  border: 1.5px solid var(--brass); box-shadow: inset 0 0 18px rgba(20, 38, 30, 0.25);
}
.welcome-door-arch img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.kicker { font-family: 'Cinzel', Georgia, serif; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sage); margin: 0 0 .2rem; font-weight: 700; text-align: center; }
.title { font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif; font-size: clamp(1.55rem, 3.6vw, 2.2rem); margin: 0; text-align: center; color: var(--emerald); line-height: 1.12; }
.subtitle { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 1rem; color: var(--brass-dark); text-align: center; margin: .15rem 0 .45rem; }
.lede { font-family: 'Playfair Display', Georgia, serif; font-size: .92rem; line-height: 1.46; color: #393229; text-align: center; margin: 0 auto .75rem; max-width: 58ch; }

.start-form { display: flex; flex-direction: column; gap: .62rem; }
.field { display: flex; flex-direction: column; gap: .4rem; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend { font-size: .88rem; font-weight: 600; color: var(--emerald); padding: 0; }
.field input[type="text"], .compact-select {
  width: 100%; padding: .68rem .9rem; border-radius: 10px;
  border: 1.5px solid rgba(140, 106, 34, 0.35); background: #FFFFFF; color: var(--ink);
}
.field input[type="text"]:focus { border-color: var(--brass); outline: none; box-shadow: 0 0 0 3px rgba(197,155,67,0.2); }

.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: .55rem; }
.chip {
  display: flex; align-items: flex-start; gap: .5rem; padding: .65rem .8rem;
  border-radius: 12px; background: var(--parchment-2); border: 1.5px solid var(--line); cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.chip:has(input:checked) { background: #FFFDF7; border-color: var(--brass); box-shadow: 0 3px 12px rgba(197, 155, 67, 0.16); }
.chip input { margin-top: .22rem; accent-color: var(--sage); }
.chip strong { display: block; font-size: .88rem; color: var(--emerald); }
.chip small { display: block; font-size: .76rem; color: var(--ink-muted); line-height: 1.35; margin-top: .12rem; }

.bridge-field summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--sage); padding: .2rem 0; }
.bridge-field[open] { background: var(--parchment-2); padding: .75rem .9rem; border-radius: 12px; border: 1px dashed var(--line); }
.bridge-preview { margin: .5rem 0 0; padding: .6rem .75rem; background: var(--sage-soft); border-radius: 8px; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: .88rem; color: #20422B; }

.welcome-cta-row { display: flex; flex-direction: column; align-items: center; gap: .55rem; margin-top: .4rem; }
.free-pill { font-size: .78rem; color: var(--sage); font-weight: 600; letter-spacing: .04em; }
.continue-box { text-align: center; padding: 1.2rem; background: var(--parchment-2); border-radius: 14px; border: 1px solid var(--line); }
.continue-line { font-family: 'Playfair Display', Georgia, serif; font-size: 1.05rem; margin: 0 0 1rem; }
.continue-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.welcome-fineprint { margin: 1.25rem 0 0; text-align: center; font-size: .75rem; color: var(--ink-muted); }

/* ============ BOTANICAL ATLAS SCREEN ============ */
.atlas-screen { height: 100dvh; display: flex; flex-direction: column; background: var(--emerald-deep); overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .55rem 1rem; background: rgba(14, 28, 22, 0.94);
  border-bottom: 1px solid rgba(226, 191, 107, 0.3); z-index: 20;
}
.topbar-brand { display: flex; align-items: center; gap: .6rem; }
.brand-name { font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif; color: var(--parchment); font-size: 1rem; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: .45rem; }

.atlas-stage {
  position: relative; flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center;
  touch-action: none; cursor: grab; user-select: none;
  background: radial-gradient(circle at 50% 50%, #1F392D 0%, #0D1B15 100%);
}
.atlas-stage:active { cursor: grabbing; }

.atlas-frame {
  position: relative; z-index: 2; transform-origin: center center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); border-radius: 8px;
  --atlas-scale: 1;
}
.atlas-frame.is-gliding { transition: transform .75s cubic-bezier(.22,1,.36,1); }
.atlas-media, .atlas-media img, .atlas-media svg { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; pointer-events: none; }

.vine-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.vine-path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.vine-path.is-dormant { stroke: rgba(140, 106, 34, 0.24); stroke-width: 1.5; stroke-dasharray: 4 6; }
.vine-path.is-growing { stroke: #C59B43; stroke-width: 2.5; stroke-dasharray: 5 5; }
.vine-path.is-bloomed { stroke: #C59B43; stroke-width: 3.2; filter: drop-shadow(0 0 3px rgba(226,191,107,0.55)); }
.vine-path.is-walking { stroke: #E2BF6B; stroke-width: 3.2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s cubic-bezier(.32,.08,.24,1); filter: drop-shadow(0 0 4px rgba(226,191,107,0.75)); }
.vine-path.is-walking.is-animated { stroke-dashoffset: 0; }
.vine-seed { fill: #FFF4C8; stroke: #C59B43; stroke-width: 0.45; filter: drop-shadow(0 0 6px rgba(255, 232, 148, 0.95)); }
.vine-leaf ellipse { fill: #5F856B; stroke: #E2BF6B; stroke-width: 0.22; }

.next-callout {
  position: absolute; transform: translate(-50%, -132%) scale(calc(1 / var(--atlas-scale, 1)));
  z-index: 12; pointer-events: auto; cursor: pointer;
  background: linear-gradient(135deg, #172B22, #102019); color: #FAF5E8;
  border: 2px solid var(--brass-bright); border-radius: 14px;
  padding: .5rem .9rem; text-align: center; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; gap: .12rem; white-space: nowrap;
  animation: calloutGlow 2.4s ease-in-out infinite;
}
.callout-kicker { font-family: 'Cinzel', Georgia, serif; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brass-bright); }
.next-callout strong { font-size: .88rem; }
.next-callout small { font-size: .72rem; color: #CFE3D5; }
@keyframes calloutGlow {
  0%, 100% { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(226, 191, 107, 0.5); }
  50% { box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 0 8px rgba(226, 191, 107, 0); }
}

.pin-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.atlas-pin {
  position: absolute; transform: translate(-50%, -50%) scale(calc(1 / var(--atlas-scale, 1)));
  pointer-events: auto; background: none; border: 0; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: .25rem; z-index: 2;
}
.atlas-pin.is-next { z-index: 5; }
.pin-medallion {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--parchment); color: var(--emerald); font-family: 'Cinzel', Georgia, serif;
  font-weight: 700; font-size: .95rem; border: 2.5px solid var(--brass);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); transition: transform .18s ease;
}
.atlas-pin:hover .pin-medallion { transform: scale(1.1); }
.atlas-pin.is-pressed .pin-medallion { background: var(--sage); color: #FFF; border-color: var(--brass-bright); }
.atlas-pin.is-locked .pin-medallion { background: #DED8C8; color: #7C756A; border-color: #9A9080; opacity: .82; }
.atlas-pin.is-secret .pin-medallion { background: #16253A; color: #E6C472; border-color: #E6C472; }

.pin-halo { position: absolute; top: 22px; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; pointer-events: none; opacity: 0; }
.atlas-pin.is-next .pin-halo {
  opacity: 1; border: 2px solid var(--brass-bright);
  animation: pulseHalo 2.2s ease-out infinite;
}
@keyframes pulseHalo {
  0% { transform: scale(.85); opacity: .9; }
  100% { transform: scale(1.48); opacity: 0; }
}

.pin-label {
  background: rgba(20, 38, 30, 0.92); color: var(--parchment); padding: .22rem .58rem;
  border-radius: 999px; border: 1px solid rgba(226, 191, 107, 0.55); white-space: nowrap;
  display: flex; align-items: center; gap: .35rem; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.pin-label strong { font-size: .78rem; font-weight: 600; }
.pin-label small { font-size: .68rem; color: var(--brass-bright); text-transform: uppercase; letter-spacing: .04em; }

.weather-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 8; }

.atlas-banner-wrap { position: absolute; bottom: .95rem; left: 50%; transform: translateX(-50%); z-index: 12; max-width: calc(100vw - 8.5rem); pointer-events: auto; }
.atlas-banner {
  margin: 0; padding: .45rem 1.05rem; border-radius: 999px; font-size: .84rem;
  background: rgba(20, 38, 30, 0.9); color: var(--parchment); border: 1px solid rgba(226, 191, 107, 0.45);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35); text-align: center;
}
.banner-link { background: none; border: 0; color: var(--brass-bright); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }

.zoom-controls { position: absolute; right: .9rem; bottom: .9rem; z-index: 14; display: flex; flex-direction: column; gap: .38rem; }
.weather-btn { position: absolute; left: .9rem; bottom: 3.7rem; z-index: 14; }
.sound-btn { position: absolute; left: .9rem; bottom: .9rem; z-index: 14; }

/* ============ DIALOG SHEETS ============ */
dialog.sheet {
  border: 0; padding: 0; margin: auto; background: transparent;
  max-width: min(94vw, 860px); width: 100%; max-height: 92dvh; overflow: visible;
}
dialog.sheet::backdrop { background: rgba(9, 18, 14, 0.72); backdrop-filter: blur(4px); }
dialog.small-sheet { max-width: min(94vw, 560px); }
dialog.herbarium-sheet, dialog.finale-sheet, dialog.focus-sheet { max-width: min(95vw, 940px); }

.stop-shell, .modal-shell, .herbarium-shell, .finale-shell, .focus-shell {
  background: var(--parchment); color: var(--ink); border-radius: 20px;
  border: 2px solid var(--brass); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; max-height: 90dvh; overflow: hidden;
}

.stop-header, .modal-head, .focus-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--parchment-2); border-bottom: 1px solid var(--line);
}
.stop-city { font-family: 'Cinzel', Georgia, serif; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sage); display: block; }
.stop-heading, .modal-head h2, .focus-head h2 { margin: .1rem 0 .25rem; font-family: 'Cinzel Decorative', 'Cinzel', Georgia, serif; font-size: clamp(1.15rem, 2.5vw, 1.45rem); }

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; padding: .5rem .9rem; background: #EFE7D4; border-bottom: 1px solid var(--line); }
.step-tab {
  border: 1px solid transparent; background: transparent; padding: .46rem .3rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; color: var(--ink-muted); cursor: pointer;
}
.step-tab.is-done { color: var(--sage); }
.step-tab.is-active { background: var(--emerald); color: var(--parchment); }

.stop-body, .finale-body, .modal-body-stack { padding: 1.2rem 1.35rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.stop-footer, .herb-footer {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .85rem 1.25rem; background: var(--parchment-2); border-top: 1px solid var(--line);
}
.footer-hint { font-size: .82rem; color: var(--ink-muted); text-align: center; }

/* Movement I & II */
.scene-banner, .settle-top { display: grid; grid-template-columns: minmax(190px, 260px) 1fr; gap: 1rem; align-items: center; }
.scene-art, .vignette-art { border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); aspect-ratio: 4 / 3; background: #1B3228; }
.scene-art img, .scene-art svg, .vignette-art img, .vignette-art svg { width: 100%; height: 100%; object-fit: cover; }
.scene-inspiration { font-size: .76rem; color: var(--sage); font-weight: 600; display: block; }
.scene-keeper { margin: .25rem 0 .35rem; font-family: 'Cinzel', Georgia, serif; font-size: 1.05rem; }
.scene-epigraph { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: .92rem; color: var(--ink-muted); }
.encounter-prose p { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 1.02rem; line-height: 1.66; }

.corners-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.corner-btn {
  text-align: left; padding: .85rem; border-radius: 12px; border: 1.5px solid var(--line);
  background: #FFFDF8; cursor: pointer; display: flex; flex-direction: column; gap: .28rem;
  transition: border-color .15s ease, transform .12s ease;
}
.corner-btn:hover { border-color: var(--brass); transform: translateY(-1px); }
.corner-btn.is-chosen { border-color: var(--sage); background: var(--sage-soft); box-shadow: 0 4px 14px rgba(75,115,88,0.16); }
.corner-kind { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brass-dark); }
.corner-btn strong { font-size: .95rem; }
.corner-btn small { font-size: .8rem; color: var(--ink-muted); line-height: 1.38; }
.corner-whisper { padding: .85rem 1rem; border-radius: 12px; background: var(--parchment-2); border-left: 3.5px solid var(--sage); font-family: 'Playfair Display', Georgia, serif; font-style: italic; animation: softFadeIn .28s ease-out; }
.corner-whisper p { margin: 0; }
.corner-prompt-wait { margin: 0; font-size: .88rem; color: var(--ink-muted); font-style: italic; }

/* Tactile Ritual Cards */
.ritual-card {
  padding: 1rem 1.1rem; border-radius: 14px; border: 1.5px dashed var(--brass);
  background: #FFFDF7; display: flex; flex-direction: column; gap: .6rem;
}
.ritual-card.is-done { border-style: solid; border-color: var(--sage); background: var(--sage-soft); animation: softFadeIn .28s ease-out; }
.ritual-done-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.ritual-done-head .ritual-kicker { margin: 0; }
.ritual-title { margin: 0; font-family: 'Cinzel', Georgia, serif; font-size: 1rem; }
.ritual-help, .ritual-done-line { margin: 0; font-size: .92rem; line-height: 1.48; }
.ritual-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .2rem; }
@keyframes softFadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.hold-meter { height: 10px; border-radius: 999px; background: rgba(38, 33, 27, 0.12); overflow: hidden; }
.hold-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--sage), var(--brass-bright)); transition: width .05s linear; }
.tap-pips { display: flex; gap: .5rem; }
.tap-pip { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brass); background: transparent; }
.tap-pip.is-lit { background: var(--brass); box-shadow: 0 0 8px rgba(197, 155, 67, 0.6); }
.brass-slider { width: 100%; accent-color: var(--brass); }

/* Movement III Writing Desk */
.journal-desk { display: flex; flex-direction: column; gap: .85rem; }
.desk-tools-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .85rem; border-radius: 12px; background: var(--parchment-2); border: 1px solid var(--line); }
.desk-tools-title { font-family: 'Cinzel', Georgia, serif; font-size: .82rem; font-weight: 700; }
.desk-tools-btns { display: flex; flex-wrap: wrap; gap: .4rem; }

.oracle-card, .coin-card, .prompt-card, .vow-recall-box {
  padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: #FFFDF8;
}
.oracle-card { border-left: 4px solid var(--brass); }
.oracle-top { display: flex; justify-content: space-between; font-size: .78rem; color: var(--sage); font-weight: 600; }
.oracle-name { margin: .25rem 0; font-family: 'Cinzel', Georgia, serif; font-size: .98rem; }
.oracle-meaning { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 400; color: var(--brass-dark); }
.oracle-prompt, .coin-prompt, .prompt-text, .echo-line, .vow-quote { margin: .2rem 0 0; font-family: 'Playfair Display', Georgia, serif; font-size: .98rem; line-height: 1.5; }
.prompt-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.echo-card { background: var(--sage-soft); border-color: rgba(75,115,88,0.3); }
.vow-recall-box { border-left: 4px solid var(--brass-bright); background: #FFFBF0; }

.writing-box { display: flex; flex-direction: column; gap: .45rem; }
.writing-toolbar, .writing-meta { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--ink-muted); }
.journal-textarea {
  width: 100%; min-height: 165px; padding: .95rem 1.05rem; border-radius: 12px;
  border: 1.5px solid rgba(140,106,34,0.35); background: #FFFFFF; resize: vertical;
  font-family: 'Caveat', 'Playfair Display', Georgia, serif; font-size: 1.28rem; line-height: 1.48;
}
.journal-textarea:focus { border-color: var(--brass); outline: none; }

.stop-head-actions { display: flex; align-items: center; gap: .4rem; }

/* Conservatory Arrival Chapter Curtain */
.stop-intro-curtain { flex: 1; overflow-y: auto; display: flex; }
.curtain-wrap {
  position: relative; width: 100%; min-height: 430px; display: flex; align-items: center; justify-content: center;
  padding: clamp(1.4rem, 4vw, 2.6rem); text-align: center; overflow: hidden; background: #14261E; color: #FAF5E8;
}
.curtain-art, .curtain-art img, .curtain-art svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.curtain-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(12, 24, 19, 0.14) 0%, rgba(9, 18, 14, 0.62) 88%);
}
.curtain-wrap.climate-moonlight .curtain-vignette {
  background: radial-gradient(circle at 50% 42%, rgba(12, 21, 36, 0.16) 0%, rgba(8, 13, 24, 0.68) 88%);
}
.curtain-content {
  position: relative; z-index: 2; max-width: 490px; display: flex; flex-direction: column; align-items: center; gap: .62rem;
  background: rgba(14, 30, 23, 0.68); backdrop-filter: blur(7px);
  border: 1.5px solid rgba(226, 191, 107, 0.65); border-radius: 18px; padding: clamp(1.15rem, 2.8vw, 1.85rem);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}
.curtain-chapter { font-family: 'Cinzel', Georgia, serif; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-bright); font-weight: 700; }
.curtain-city { margin: 0; font-family: 'Cinzel Decorative', Georgia, serif; font-size: clamp(1.35rem, 3vw, 1.85rem); color: #FCF7EA; }
.curtain-insp { margin: 0; font-size: .84rem; color: #D4E4D8; }
.curtain-epigraph { margin: .45rem 0 .6rem; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 1.02rem; line-height: 1.55; color: #F5EBD6; }

/* Keeper Conversations */
.talk-box { padding: .95rem 1.05rem; border-radius: 14px; background: var(--parchment-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: .55rem; }
.talk-line { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: .95rem; line-height: 1.52; }
.talk-you { padding: .48rem .75rem; border-radius: 10px; background: #FFFFFF; border-left: 3px solid var(--brass); }
.talk-who { font-family: 'Cinzel', Georgia, serif; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-dark); font-weight: 700; margin-right: .35rem; }
.talk-keeper.is-reply { color: var(--sage); font-style: italic; animation: softFadeIn .28s ease-out; }
.talk-choices { display: flex; flex-direction: column; gap: .4rem; margin-top: .2rem; }
.talk-choice {
  text-align: left; padding: .55rem .8rem; border-radius: 10px; border: 1.5px solid var(--line);
  background: #FFFDF8; cursor: pointer; font-family: 'Playfair Display', Georgia, serif; font-size: .9rem;
  transition: border-color .14s ease, transform .12s ease;
}
.talk-choice:hover { border-color: var(--brass); transform: translateX(2px); }
.talk-reset { align-self: flex-start; }

/* Over-Artwork Interactive Window Scenes */
.window-stage {
  position: relative; width: 100%; height: 185px; border-radius: 12px; overflow: hidden;
  border: 1.5px solid var(--sage); background: #1B3228; user-select: none;
}
.window-stage.is-interactive { cursor: pointer; }
.window-scene-img, .window-scene-svg, .window-scene-svg svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.fog-canvas { position: relative; z-index: 2; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; transition: opacity .55s ease; }
.fog-canvas.is-cleared { opacity: 0; pointer-events: none; }
.window-badge {
  position: absolute; right: .55rem; bottom: .55rem; z-index: 3; pointer-events: none;
  background: rgba(16, 33, 25, 0.82); color: #FAF5E8; font-size: .74rem; padding: .2rem .58rem; border-radius: 999px;
  border: 1px solid rgba(226, 191, 107, 0.45);
}
.frost-overlay {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255,215,145,0.0) calc(var(--melt, 0%) * 0.9), rgba(220, 236, 246, 0.94) calc(var(--melt, 0%) * 1.15 + 10%));
  backdrop-filter: blur(calc((100 - var(--melt-num, 0)) * 0.04px));
}
.louver-slats {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: grid; grid-template-rows: repeat(4, 1fr); gap: 3px; padding: 4px;
}
.louver-slats span {
  background: rgba(215, 236, 230, calc(0.76 - var(--open, 0) * 0.56));
  border: 1px solid rgba(197, 155, 67, 0.65); border-radius: 4px;
  transform: perspective(400px) rotateX(calc(var(--open, 0) * 74deg));
  transition: transform .12s ease-out, background-color .12s ease-out;
}
.lantern-veil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 50% 48%, rgba(255, 224, 150, 0.05) var(--glow, 14%), rgba(8, 13, 22, 0.94) calc(var(--glow, 14%) + 26%));
  transition: background .25s ease;
}

/* 5 Bespoke SVG Settle Rituals */
.svg-ritual-stage {
  position: relative; width: 100%; height: 150px; border-radius: 12px;
  background: var(--parchment-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.svg-ritual-stage.is-interactive { cursor: pointer; }
.ritual-svg { width: 220px; height: 140px; }

/* London Fern Lift & Spritz */
.fern-fronds { transform-origin: 120px 96px; transform: scaleY(0.86) rotate(4deg); transition: transform .35s ease; }
.fern-stage[data-level="1"] .fern-fronds { transform: scaleY(0.92) rotate(2deg); }
.fern-stage[data-level="2"] .fern-fronds { transform: scaleY(0.97) rotate(0.5deg); }
.fern-stage[data-level="3"] .fern-fronds { transform: scaleY(1.03) rotate(0deg); }
.fern-stage.is-spritzing .mist-cloud { animation: spritzFade .55s ease-out; }
@keyframes spritzFade { 0% { opacity: 1; transform: translateY(4px); } 100% { opacity: 0; transform: translateY(-10px); } }

/* Kyoto Tea Stream & Steam */
.tea-stream { stroke-dasharray: 120; stroke-dashoffset: 120; opacity: 0; transition: opacity .15s; }
.tea-stage.is-pouring .tea-stream { opacity: 1; stroke-dashoffset: 0; }
.tea-steam { opacity: 0; transition: opacity .4s ease; }
.tea-stage.is-steaming .tea-steam { opacity: .88; animation: steamRise 2.4s ease-in-out infinite; }
@keyframes steamRise { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Vienna Stove Flames, Damper & Snowdrop Bloom */
.stove-glow { opacity: 0; transition: opacity .3s ease; }
.stove-stage[data-heat="1"] .stove-glow { opacity: .12; }
.stove-stage[data-heat="2"] .stove-glow { opacity: .24; }
.stove-stage[data-heat="3"] .stove-glow { opacity: .38; }
.stove-flames { opacity: .18; transform-origin: 110px 100px; transform: scaleY(.5); transition: opacity .25s, transform .25s; }
.stove-stage[data-heat="1"] .stove-flames { opacity: .55; transform: scaleY(.75); }
.stove-stage[data-heat="2"] .stove-flames { opacity: .85; transform: scaleY(.95); }
.stove-stage[data-heat="3"] .stove-flames { opacity: 1; transform: scaleY(1.12); }
.damper-wheel, .damper-bar { transform-origin: 110px 116px; transition: transform .25s ease; }
.stove-stage[data-heat="1"] .damper-bar { transform: rotate(45deg); }
.stove-stage[data-heat="2"] .damper-bar { transform: rotate(90deg); }
.stove-stage[data-heat="3"] .damper-bar { transform: rotate(135deg); }
.snowdrop-bud { transform-origin: 192px 92px; transition: transform .35s ease, fill .35s ease; }
.stove-stage[data-heat="1"] .snowdrop-bud { transform: translateY(-2px) scale(1.1); }
.stove-stage[data-heat="2"] .snowdrop-bud { transform: translateY(-4px) scale(1.22); }
.stove-stage[data-heat="3"] .snowdrop-bud { transform: translateY(-6px) scale(1.38); fill: #FFFFFF; }

/* Madeira Floating Drops + Phial + Winged Seed */
.dew-stage { background: linear-gradient(180deg, #E2EFEA 0%, #F4EFE2 100%); }
.dew-drop {
  position: absolute; font-size: 1.5rem; background: rgba(255,255,255,0.75); border: 1.5px solid var(--sage);
  border-radius: 50%; width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.dew-glyph { display: inline-block; animation: bobDrop 2.4s ease-in-out infinite; }
.dew-drop.d1 { left: 16%; top: 18%; }
.dew-drop.d2 { left: 46%; top: 12%; }
.dew-drop.d3 { left: 74%; top: 22%; }
.dew-drop.d2 .dew-glyph { animation-delay: .5s; }
.dew-drop.d3 .dew-glyph { animation-delay: 1s; }
.dew-drop.is-caught { opacity: 0; transform: translateY(60px) scale(.4); pointer-events: none; transition: all .3s ease; }
@keyframes bobDrop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.glass-phial {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 54px; border-radius: 0 0 18px 18px;
  border: 2px solid #5B7E74; border-top-width: 3px; background: rgba(255,255,255,0.45); overflow: hidden;
  display: flex; align-items: flex-end;
}
.phial-fill { width: 100%; background: linear-gradient(180deg, #9AD0C4, #6AA89D); transition: height .35s ease; }
.winged-seed { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); font-size: 1.55rem; opacity: 0; pointer-events: none; }
.dew-stage.is-flying .winged-seed { opacity: 1; animation: flySeed .75s ease-out forwards; }
@keyframes flySeed { 0% { opacity: 1; transform: translate(-50%, 0) rotate(0deg); } 100% { opacity: 0; transform: translate(35px, -110px) rotate(42deg) scale(1.25); } }
.seed-release-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.seed-word-input { flex: 1; min-width: 190px; padding: .5rem .8rem; border-radius: 10px; border: 1.5px solid var(--line); background: #FFFFFF; }

/* Midnight Bloom Breathing Petals */
.bloom-stage { background: #122032; border-color: rgba(230, 196, 114, 0.45); }
.outer-ring { transform: scale(calc(0.45 + var(--open, 0) * 0.58)) rotate(calc(var(--open, 0) * 24deg)); transition: transform .08s linear; }
.inner-ring { transform: scale(calc(0.28 + var(--open, 0) * 0.72)) rotate(calc(var(--open, 0) * -18deg)); transition: transform .08s linear; }
.breath-cue { position: absolute; bottom: .45rem; font-size: .78rem; color: #E6C472; font-weight: 600; }

/* 3D Coin Flip & Oracle Reveal */
.coin-row { display: flex; align-items: center; gap: .75rem; }
.coin-medallion {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brass-bright), var(--brass)); border: 2px solid var(--brass-dark);
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.is-just-flipped { animation: cardTurnIn .42s ease-out; }
.is-just-flipped .coin-medallion { animation: coinSpin .55s ease-out; }
@keyframes cardTurnIn { 0% { opacity: .25; transform: rotateX(22deg) scale(.97); } 100% { opacity: 1; transform: rotateX(0) scale(1); } }
@keyframes coinSpin { 0% { transform: rotateY(0deg) scale(.85); } 100% { transform: rotateY(540deg) scale(1); } }

/* Threaded Brass Rods in Flower Press */
.brass-rod {
  position: absolute; top: 0; bottom: 8px; width: 6px; z-index: 2;
  background: repeating-linear-gradient(180deg, #E2BF6B 0 3px, #8C6A22 3px 5px);
  border-radius: 99px;
}
.rod-l { left: 22px; }
.rod-r { right: 22px; }

.epilogue-box { padding: 1rem 1.15rem; border-radius: 14px; background: #FFFDF8; border: 1px solid var(--line); }

/* Focus Desk */
.focus-shell { padding: 0; }
.focus-prompt { margin: 0; padding: .9rem 1.3rem .2rem; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 1.05rem; color: var(--sage); }
.focus-textarea {
  flex: 1; min-height: 46dvh; margin: .75rem 1.3rem; padding: 1.1rem; border-radius: 14px;
  border: 1px solid var(--line); background: #FFFDF8; font-family: 'Caveat', Georgia, serif; font-size: 1.38rem; line-height: 1.55; resize: none;
}
.focus-foot { padding: .6rem 1.3rem 1rem; display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-muted); }
.focus-timer-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* Movement IV: Flower Press Workshop & Mounted Plate */
.press-workshop { display: flex; flex-direction: column; gap: .68rem; align-items: center; text-align: center; }
.press-sub { margin: .2rem auto 0; max-width: 52ch; font-size: .88rem; color: var(--ink-muted); }
.press-rig { width: min(100%, 390px); position: relative; padding-top: 6px; --screw-turn: 0deg; }
.press-board-top {
  position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between;
  padding: .55rem .9rem; border-radius: 10px;
  background: linear-gradient(135deg, #8B6843, #6C4D2F); color: #F8ECD2;
  border: 1.5px solid #4E361F; box-shadow: 0 10px 20px rgba(0,0,0,0.22);
  transition: transform .12s ease-out;
}
.press-engraving { font-family: 'Cinzel', Georgia, serif; font-size: .72rem; letter-spacing: .1em; }
.wingnut {
  width: 22px; height: 10px; border-radius: 999px; background: var(--brass-bright);
  border: 1px solid #6E5015; transform: rotate(var(--screw-turn));
}
.press-bed {
  margin-top: .4rem; padding: .7rem; border-radius: 12px;
  background: #6B4D30; border: 2px solid #4E361F;
}
.blotting-sheet {
  padding: .65rem; border-radius: 8px; background: var(--parchment);
  box-shadow: inset 0 0 18px rgba(140, 106, 34, 0.14);
}
.specimen-preview { width: 132px; margin: 0 auto; aspect-ratio: 3 / 4; }
.specimen-preview img, .specimen-preview svg { width: 100%; height: 100%; object-fit: contain; }
.specimen-caption { margin: .35rem 0 0; font-size: .84rem; }
.press-controls { width: min(100%, 420px); display: flex; flex-direction: column; gap: .55rem; align-items: center; }
.press-meter { width: 100%; }
.press-status { margin: 0; font-size: .84rem; color: var(--sage); font-weight: 600; }

/* Mounted Plate (in Press & Digital Herbarium) */
.mounted-result { display: flex; flex-direction: column; align-items: center; gap: .85rem; }
.plate-frame {
  position: relative; width: min(100%, 360px); border-radius: 12px;
  border: 1.5px solid var(--brass); background: var(--parchment); padding: 1.15rem;
  box-shadow: 0 14px 30px rgba(20, 38, 30, 0.14);
}
.plate-front, .plate-back { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; position: relative; }
.plate-frame:not(.is-flipped) .plate-back { display: none; }
.plate-frame.is-flipped .plate-front { display: none; }
.plate-back { padding: 1.2rem .4rem; min-height: 310px; justify-content: center; }

.linen-tape {
  position: absolute; top: -6px; width: 44px; height: 14px;
  background: rgba(232, 220, 192, 0.85); border: 1px solid rgba(176, 156, 114, 0.45);
}
.tape-tl { left: 8px; transform: rotate(-22deg); }
.tape-tr { right: 8px; transform: rotate(22deg); }
.plate-art-wrap { width: 162px; aspect-ratio: 3 / 4; }
.plate-art-wrap img, .plate-art-wrap svg { width: 100%; height: 100%; object-fit: contain; }
.plate-label { width: 100%; border-top: 1px solid var(--line); padding-top: .5rem; }
.plate-meta-row { display: flex; justify-content: space-between; font-size: .74rem; color: var(--sage); font-weight: 600; }
.plate-common { margin: .15rem 0 0; font-family: 'Cinzel', Georgia, serif; font-size: 1.05rem; }
.plate-latin { margin: .1rem 0; font-size: .82rem; color: var(--ink-muted); }
.plate-quote { margin: .35rem 0 0; font-family: 'Caveat', Georgia, serif; font-size: 1.18rem; color: var(--emerald); line-height: 1.35; }
.plate-seal-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-top: .55rem; padding-top: .45rem; border-top: 1px dashed var(--line);
}
.plate-seal-caption {
  font-family: 'Cinzel', Georgia, serif; font-size: .68rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-muted); font-weight: 700; text-align: left;
}
.wax-seal-badge {
  position: static; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: var(--terracotta); color: #FFF; display: flex; align-items: center; justify-content: center;
  font-size: .9rem; box-shadow: 0 3px 10px rgba(0,0,0,0.28); overflow: hidden; border: 1.5px solid var(--brass);
}
.wax-seal-badge img { width: 100%; height: 100%; object-fit: cover; }
.linen-cover-panel.has-cover-art { background-size: cover; background-position: center; }
.plate-lore { font-size: .9rem; line-height: 1.5; margin: 0; }
.plate-secret { margin: .5rem 0; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: 1.04rem; color: var(--sage); }

/* ============ DIGITAL HERBARIUM ============ */
.herb-head-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.herb-pills { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; padding: .6rem 1rem; background: #EFE7D4; border-bottom: 1px solid var(--line); }
.herb-pill {
  padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: #FFFDF8;
  font-size: .8rem; font-weight: 600; cursor: pointer;
}
.herb-pill.is-active { background: var(--emerald); color: var(--parchment); border-color: var(--emerald); }
.herb-pill.is-unpressed { opacity: .62; }

.herb-stage { padding: 1.15rem 1.35rem; overflow-y: auto; flex: 1; }
.herb-spread { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.herb-page { background: #FFFDF8; border: 1px solid var(--line); border-radius: 14px; padding: 1.15rem; min-height: 360px; }
.linen-cover-panel {
  background: linear-gradient(145deg, #172B22, #102019); color: var(--parchment);
  border: 2px solid var(--brass); border-radius: 12px; padding: 2rem 1.4rem; text-align: center;
}
.cover-society { font-family: 'Cinzel', Georgia, serif; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass-bright); margin: 0; }
.cover-title { font-family: 'Cinzel Decorative', Georgia, serif; font-size: 1.65rem; margin: .6rem 0 .25rem; }
.cover-volume { font-family: 'Playfair Display', Georgia, serif; font-style: italic; color: #D7E5DB; margin: 0; }
.cover-rule { width: 90px; height: 2px; background: var(--brass); margin: 1.1rem auto; }
.cover-keeper, .cover-intention, .cover-count { margin: .35rem 0; font-size: .92rem; }
.prose-lead { font-family: 'Playfair Display', Georgia, serif; font-size: 1rem; line-height: 1.62; margin-top: 0; }
.archetype-crest-box { margin-top: .9rem; padding: .85rem; background: var(--sage-soft); border-radius: 10px; border: 1px solid rgba(75,115,88,0.28); }
.archetype-crest-box h4 { margin: 0 0 .3rem; font-family: 'Cinzel', Georgia, serif; }
.archetype-crest-box p { margin: 0; font-size: .88rem; line-height: 1.48; }

.herb-plate-side { display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.herb-journal-side { display: flex; flex-direction: column; gap: .65rem; }
.herb-stop-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem; }
.herb-detail { margin: 0; font-size: .88rem; }
.herb-q-block { padding: .65rem .8rem; background: var(--parchment-2); border-radius: 10px; }
.herb-q-block p { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: .95rem; }
.handwritten-entry { font-family: 'Caveat', Georgia, serif; font-size: 1.3rem; line-height: 1.46; margin: 0; color: var(--emerald); }
.empty-plate { padding: 3rem 1rem; text-align: center; border: 1.5px dashed var(--line); border-radius: 12px; width: 100%; }
.empty-plate-no { font-family: 'Cinzel', Georgia, serif; font-weight: 700; color: var(--brass-dark); }

/* ============ CLOSING LETTER & INDIE AUTHOR NOTE ============ */
.finale-archetype-card {
  padding: 1.1rem 1.25rem; border-radius: 14px; background: linear-gradient(135deg, #172B22, #1D372B);
  color: var(--parchment); border: 1.5px solid var(--brass); text-align: center;
}
.finale-archetype-card .box-kicker { color: var(--brass-bright); }
.finale-archetype-card h3 { margin: .15rem 0; font-family: 'Cinzel Decorative', Georgia, serif; font-size: 1.4rem; }
.arch-seal { font-family: 'Playfair Display', Georgia, serif; font-style: italic; color: #CFE3D5; margin: 0 0 .5rem; }
.finale-archetype-card p { font-size: .94rem; line-height: 1.55; margin: .35rem auto; max-width: 58ch; }
.bridge-code-chip {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem;
  margin-top: .75rem; padding: .45rem .85rem; border-radius: 10px;
  background: rgba(250, 245, 232, 0.12); border: 1px solid rgba(226, 191, 107, 0.4); font-size: .84rem;
}
.bridge-code-chip code { font-weight: 700; color: var(--brass-bright); font-size: .95rem; }

.finale-exports { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

.closing-letter-box { padding: 1.15rem; background: #FFFDF8; border: 1px solid var(--line); border-radius: 14px; }
.letter-salutation { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 1.05rem; margin-top: 0; }
.letter-p { font-family: 'Playfair Display', Georgia, serif; line-height: 1.62; font-size: .96rem; }
.letter-signer { font-family: 'Cinzel', Georgia, serif; font-size: .84rem; font-weight: 700; color: var(--sage); margin-bottom: 0; }

.maker-pocket-note {
  padding: 1.2rem; border-radius: 14px; border: 1.5px dashed var(--brass);
  background: linear-gradient(180deg, #FFFBF1 0%, #F4ECDA 100%);
}
.maker-title { margin: 0 0 .6rem; font-family: 'Cinzel', Georgia, serif; font-size: 1.08rem; color: var(--emerald); }
.maker-p { font-family: 'Playfair Display', Georgia, serif; font-size: .95rem; line-height: 1.58; margin: 0 0 .65rem; }
.maker-sign { font-family: 'Caveat', Georgia, serif; font-size: 1.26rem; color: var(--emerald); margin: .7rem 0 1rem; line-height: 1.35; }
.maker-recommend { padding: .95rem 1rem; border-radius: 12px; background: #FFFFFF; border: 1.5px solid var(--brass); }
.maker-recommend h4, .maker-recommend h5 { margin: .15rem 0 .35rem; font-family: 'Cinzel', Georgia, serif; font-size: 1rem; color: var(--emerald); }
.maker-recommend p { margin: 0 0 .75rem; font-size: .9rem; line-height: 1.5; }
.maker-links { display: flex; flex-wrap: wrap; gap: .5rem; }

.wings-mini-grid, .wings-showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: .9rem; }
.wing-mini-card, .wing-card {
  display: flex; flex-direction: column; gap: .35rem; padding: .85rem; border-radius: 12px;
  background: #FFFDF8; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.wing-mini-card:hover { border-color: var(--brass); }
.wing-card h4 { margin: 0; font-family: 'Cinzel', Georgia, serif; font-size: .96rem; }
.wing-card p { margin: 0 0 .45rem; font-size: .86rem; line-height: 1.48; flex: 1; }
.atelier-footer-bar { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: .5rem; }

/* Library & Settings */
.library-card {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: .85rem 1rem; border-radius: 12px; background: #FFFDF8; border: 1px solid var(--line);
}
.library-card.is-current { border-color: var(--sage); background: var(--sage-soft); }
.library-card strong { display: block; font-size: .95rem; }
.library-card small { color: var(--ink-muted); font-size: .8rem; }
.library-actions, .backup-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.settings-box { border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; background: #FFFDF8; margin: 0; }
.settings-box legend { font-weight: 700; font-size: .86rem; padding: 0 .35rem; color: var(--emerald); }
.radio-line { display: flex; align-items: center; gap: .5rem; padding: .28rem 0; font-size: .9rem; cursor: pointer; }
.mixer-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: .6rem; padding: .25rem 0; font-size: .86rem; }
.mixer-row input[type="range"] { width: 100%; accent-color: var(--sage); }
.inline-field { display: flex; gap: .45rem; }

/* ============ MIDNIGHT CONSERVATORY THEME (Consolidated Cascade-Safe Overrides) ============ */
[data-stop-theme="midnight"] .stop-shell,
[data-stop-theme="midnight"] .focus-shell {
  background: #101B29; color: #EFF3FA; border-color: #E6C472;
}
[data-stop-theme="midnight"] .stop-header,
[data-stop-theme="midnight"] .stop-footer,
[data-stop-theme="midnight"] .focus-head {
  background: #0C1522; border-color: rgba(230, 196, 114, 0.28);
}
[data-stop-theme="midnight"] .stepper { background: #142235; border-color: rgba(230, 196, 114, 0.25); }
[data-stop-theme="midnight"] .step-tab { color: #B9C9DC; }
[data-stop-theme="midnight"] .step-tab.is-done { color: #94D9B0; }
[data-stop-theme="midnight"] .step-tab.is-active { background: #E6C472; color: #101B29; }

[data-stop-theme="midnight"] .stop-city,
[data-stop-theme="midnight"] .scene-inspiration,
[data-stop-theme="midnight"] .btn-link,
[data-stop-theme="midnight"] .oracle-top,
[data-stop-theme="midnight"] .plate-meta-row,
[data-stop-theme="midnight"] .press-status { color: #94D9B0; }
[data-stop-theme="midnight"] .btn-link:hover { color: #C2EED3; }

[data-stop-theme="midnight"] .box-kicker,
[data-stop-theme="midnight"] .ritual-kicker,
[data-stop-theme="midnight"] .corner-kind,
[data-stop-theme="midnight"] .oracle-meaning,
[data-stop-theme="midnight"] .talk-who,
[data-stop-theme="midnight"] .plate-secret,
[data-stop-theme="midnight"] .focus-prompt { color: #E6C472; }

[data-stop-theme="midnight"] .climate-pill {
  background: rgba(142, 212, 170, 0.16); color: #CBEAD7; border-color: rgba(142, 212, 170, 0.42);
}
[data-stop-theme="midnight"] .close-x {
  background: #1C2E45; color: #F6F2E4; border-color: rgba(230, 196, 114, 0.45);
}
[data-stop-theme="midnight"] .close-x:hover { background: #263D5B; color: #FFFFFF; }

[data-stop-theme="midnight"] .btn-ghost {
  background: #1B2C42; color: #F6F2E4; border-color: rgba(230, 196, 114, 0.38);
}
[data-stop-theme="midnight"] .btn-ghost:hover:not(:disabled) {
  background: #263D5B; color: #FFFFFF; border-color: #E6C472;
}

[data-stop-theme="midnight"] .muted-note,
[data-stop-theme="midnight"] .scene-epigraph,
[data-stop-theme="midnight"] .corner-btn small,
[data-stop-theme="midnight"] .corner-prompt-wait,
[data-stop-theme="midnight"] .footer-hint,
[data-stop-theme="midnight"] .writing-toolbar,
[data-stop-theme="midnight"] .writing-meta,
[data-stop-theme="midnight"] .press-sub,
[data-stop-theme="midnight"] .plate-latin,
[data-stop-theme="midnight"] .focus-foot { color: #BFD0E4; }

[data-stop-theme="midnight"] .corner-btn,
[data-stop-theme="midnight"] .corner-whisper,
[data-stop-theme="midnight"] .talk-box,
[data-stop-theme="midnight"] .ritual-card,
[data-stop-theme="midnight"] .desk-tools-bar,
[data-stop-theme="midnight"] .prompt-card,
[data-stop-theme="midnight"] .oracle-card,
[data-stop-theme="midnight"] .coin-card,
[data-stop-theme="midnight"] .vow-recall-box {
  background: #18273B; border-color: rgba(230, 196, 114, 0.34); color: #EFF3FA;
}
[data-stop-theme="midnight"] .desk-tools-title { color: #F6F2E4; }
[data-stop-theme="midnight"] .corner-btn:hover { border-color: #E6C472; }
[data-stop-theme="midnight"] .corner-btn.is-chosen,
[data-stop-theme="midnight"] .ritual-card.is-done,
[data-stop-theme="midnight"] .echo-card {
  background: #1A3138; border-color: #7CD1A5; color: #EFF3FA;
}
[data-stop-theme="midnight"] .ritual-card.is-done .ritual-kicker { color: #94D9B0; }
[data-stop-theme="midnight"] .corner-whisper { border-left-color: #94D9B0; }

[data-stop-theme="midnight"] .talk-choice,
[data-stop-theme="midnight"] .talk-you,
[data-stop-theme="midnight"] .compact-select {
  background: #1C2E45; color: #F6F2E4; border-color: rgba(230, 196, 114, 0.35);
}
[data-stop-theme="midnight"] .talk-choice:hover { background: #233853; border-color: #E6C472; }
[data-stop-theme="midnight"] .talk-keeper.is-reply { color: #E6C472; }

[data-stop-theme="midnight"] .svg-ritual-stage { background: #122032; border-color: rgba(230, 196, 114, 0.34); }
[data-stop-theme="midnight"] .hold-meter { background: rgba(255, 255, 255, 0.16); }

[data-stop-theme="midnight"] .journal-textarea,
[data-stop-theme="midnight"] .focus-textarea {
  background: #121F30; color: #F6F2E4; border-color: rgba(230, 196, 114, 0.38);
}
[data-stop-theme="midnight"] .journal-textarea::placeholder,
[data-stop-theme="midnight"] .focus-textarea::placeholder { color: #90A4BF; }
[data-stop-theme="midnight"] .pill-quiet {
  background: rgba(255, 255, 255, 0.1); color: #DDE8F5; border-color: rgba(230, 196, 114, 0.32);
}

[data-stop-theme="midnight"] .blotting-sheet { color: #241F19; }
[data-stop-theme="midnight"] .plate-frame,
[data-stop-theme="midnight"] .plate-front,
[data-stop-theme="midnight"] .plate-back {
  background: #162436; color: #F6F2E4; border-color: #E6C472;
}
[data-stop-theme="midnight"] .plate-label { border-top-color: rgba(230, 196, 114, 0.32); }
[data-stop-theme="midnight"] .plate-seal-row { border-top-color: rgba(230, 196, 114, 0.28); }
[data-stop-theme="midnight"] .plate-quote { color: #F5E6C0; }
[data-stop-theme="midnight"] .plate-seal-caption { color: #D2BD8A; }

/* ============ PRINT FOLIO (@media print) ============ */
.print-folio { display: none; }
@media print {
  body > *:not(#printFolio) { display: none !important; }
  .print-folio { display: block !important; background: #FFFFFF; color: #1F1B16; font-family: 'Playfair Display', Georgia, serif; }
  .folio-page { page-break-after: always; padding: 18mm 16mm; min-height: 250mm; }
  .folio-cover { text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 2px solid #C59B43; }
  .folio-cover h1 { font-family: 'Cinzel Decorative', Georgia, serif; font-size: 28pt; margin: 8pt 0; }
  .folio-rule { width: 80pt; height: 2pt; background: #C59B43; margin: 14pt auto; }
  .folio-head { display: flex; justify-content: space-between; font-family: 'Cinzel', Georgia, serif; font-size: 9pt; border-bottom: 1pt solid #C59B43; padding-bottom: 6pt; margin-bottom: 14pt; }
  .folio-grid { display: grid; grid-template-columns: 42% 55%; gap: 16pt; }
  .folio-svg { width: 100%; border: 1pt solid #DDD2B8; padding: 6pt; }
  .folio-body { font-family: 'Caveat', Georgia, serif; font-size: 14pt; line-height: 1.45; margin-top: 10pt; }
  .folio-closing p { line-height: 1.55; font-size: 11pt; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 780px) {
  .scene-banner, .settle-top, .herb-spread, .wings-mini-grid, .wings-showcase { grid-template-columns: 1fr; }
  .corners-grid { grid-template-columns: 1fr; }
  .topbar-actions .icon-btn span { display: none; }
  .atlas-banner-wrap { max-width: calc(100vw - 7.5rem); bottom: .65rem; }
  .atlas-banner { border-radius: 16px; font-size: .78rem; padding: .42rem .75rem; line-height: 1.32; }
  .mixer-row { grid-template-columns: 115px 1fr; }
}

@media (max-width: 560px) {
  .stop-footer, .herb-footer { flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .75rem 1rem; }
  .stop-footer .footer-hint { order: 3; width: 100%; font-size: .76rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
