@font-face {
  font-family: "DM Sans";
  src: url(assets/DMSans.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url(assets/InstrumentSerif.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f8f2e9;
  --white: #fffcf6;
  --ink: #2b1b1a;
  --muted: #6e5650;
  --line: #e5d7ca;
  --wine: #662439;
  --wine-dark: #411821;
  --wine-surface: #f2e2de;
  --gold: #a76534;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  --area: var(--wine);
  --area-light: var(--wine-surface);
  --area-accent: #faf0e9;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
a { color: inherit; }
p, h1, h2, h3, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; }
svg { display: block; width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 3px solid #825d37; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }
::selection { color: #fff; background: var(--wine); }
.shell { width: min(1320px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: absolute; left: 14px; top: 12px; z-index: 9; padding: 10px 16px; background: var(--white); border-radius: 5px; transform: translateY(-200%); }
.skip:focus { transform: translateY(0); }

.masthead { display: flex; align-items: center; justify-content: space-between; min-height: 82px; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--wine-dark); font: 25px/.92 var(--serif); }
.wordmark svg { width: 37px; height: 37px; border: 1px solid #d9c3b3; border-radius: 50%; padding: 3px; }
.wordmark-sub { display: block; margin-top: 5px; color: var(--muted); font: 600 9px/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.mast-progress { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #e3d0bf; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--wine); white-space: nowrap; }
.progress-dot { width: 7px; height: 7px; border-radius: 50%; background: #af7653; }
.mast-progress.is-done .progress-dot { background: #356e56; }

.hero { display: grid; grid-template-columns: minmax(370px, .85fr) minmax(0, 1.4fr); min-height: 448px; border-radius: 14px; overflow: hidden; background: var(--wine-dark); color: #fff4e5; box-shadow: 0 18px 50px #4a1a2419; }
.hero-copy { position: relative; container-type: inline-size; padding: clamp(32px, 4.2vw, 64px); z-index: 1; align-self: stretch; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; background: radial-gradient(ellipse at 6% 3%, #742c3c 0%, #521d29 48%, #3c141d 100%); }
.hero-copy::before { content: ""; pointer-events: none; position: absolute; inset: 11px; border: 1px solid #e5b37729; border-right: 0; border-radius: 8px 0 0 8px; }
.eyebrow { font: 700 11px/1.3 var(--sans); letter-spacing: .145em; text-transform: uppercase; color: var(--wine); }
.hero-eyebrow { color: #f3c998; display: flex; align-items: center; gap: 9px; }
.hero-eyebrow span, .hero-photo figcaption span { width: 5px; height: 5px; background: #e2aa72; transform: rotate(45deg); display: inline-block; flex: none; }
.hero h1 { font: 400 clamp(60px, 26cqw, 112px)/.84 var(--serif); letter-spacing: -.022em; margin: 17px 0 24px; }
.hero h1 span { color: #edbc86; }
.hero-intro { color: #f5e1d4; max-width: 31ch; font-size: 16px; line-height: 1.55; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; border-radius: 7px; border: 1px solid transparent; padding: 10px 17px; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .16s, color .16s, border-color .16s, transform .16s var(--ease); text-align: center; }
.button svg { width: 17px; height: 17px; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.primary { background: var(--wine); color: #fff5e9; }
.primary:hover { background: #4d1727; }
.secondary { background: #fffaf2; border-color: #ded0c1; color: var(--wine); }
.secondary:hover { background: var(--wine-surface); border-color: #c9a8a2; }
.hero-start.primary { background: #f3ddbd; color: #3e1823; margin-top: 23px; padding-inline: 16px; }
.hero-start.primary:hover { background: #fff1da; }
.hero-start span { font-size: 17px; font-weight: 400; line-height: 1; }
.hero-photo { min-height: 100%; position: relative; isolation: isolate; background: radial-gradient(ellipse at center, #8a4431 0%, #2e1116 75%); }
.hero-photo picture, .hero-photo img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; object-position: 50% 54%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, #1d0909c4, transparent 27%), linear-gradient(90deg,#35111c50,transparent 22%); }
.hero-photo figcaption { position: absolute; z-index: 1; bottom: 18px; right: 22px; left: 22px; display: flex; align-items: center; gap: 8px; justify-content: flex-end; color: #f6e4ce; font-size: 11px; text-shadow: 0 1px 3px #21090a; }

.learning { margin-top: 36px; scroll-margin-top: 14px; }
.mode-nav { display: flex; gap: 8px; padding: 6px; border: 1px solid var(--line); background: #efe6db; border-radius: 11px; width: max-content; max-width: 100%; }
.mode { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 8px 17px; min-height: 44px; background: transparent; border: 1px solid transparent; border-radius: 7px; color: #624a44; font-weight: 700; font-size: 14px; white-space: nowrap; transition: background .15s, color .15s; }
.mode:hover { background: #f8f1e8; color: var(--wine); }
.mode[aria-pressed="true"] { color: #fff5eb; background: var(--wine); border-color: #5d2535; box-shadow: 0 2px 4px #44251b1c; }
.mode-icon svg { width: 19px; height: 19px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 33px 0 15px; }
.section-heading h2, .memory h2 { font: 400 clamp(43px, 5.1vw, 66px)/.94 var(--serif); letter-spacing: -.015em; margin-top: 5px; color: var(--wine-dark); }
.section-heading > p { color: var(--muted); font-size: 15px; padding-bottom: 3px; }
.explore-grid { display: grid; grid-template-columns: minmax(0, 2.62fr) minmax(277px, 1fr); gap: 16px; align-items: stretch; }
.plan-card, .room-panel, .directory, .study-card { min-width: 0; background: var(--white); border: 1px solid var(--line); box-shadow: 0 8px 24px #5f332408; border-radius: 12px; }
.plan-card { overflow: hidden; align-self: start; }
.filterbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.filter { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; min-height: 37px; border: 1px solid transparent; background: #fff9f0; border-radius: 99px; color: #5b433f; font-size: 12px; font-weight: 700; }
.filter > span { width: 7px; height: 7px; border-radius: 50%; background: var(--area); }
.filter[aria-pressed="true"], .filter:hover { background: var(--area-accent); color: var(--area); border-color: var(--area-light); }
.filter[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--area-light); }
.map-scroll { overflow: auto; scrollbar-width: thin; scrollbar-color: #b98d7e #f5ebdf; background: #f9f0e3; }
.map-canvas { position: relative; width: 100%; min-width: 650px; }
.plan-drawing { display: block; width: 100%; height: auto; }
.map-room { transition: opacity .2s; }
.map-room.muted { opacity: .29; }
.room-glow { opacity: 0; transition: opacity .24s var(--ease); }
.map-room.selected .room-glow { opacity: .58; }
.map-pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 38px; height: 38px; padding: 0; border: 0; background: transparent; border-radius: 50%; display: grid; place-items: center; z-index: 1; font-size: 11px; line-height: 1; font-variant-numeric: tabular-nums; font-weight: 700; }
.map-pin > span { width: 27px; height: 27px; border-radius: 50%; background: #fffaf0; color: var(--pin); border: 1px solid var(--pin); display: grid; place-items: center; box-shadow: 0 1px 4px #50332326; transition: background .18s, color .18s, transform .2s var(--ease); }
.map-pin.seen > span { box-shadow: 0 0 0 3px #fffaf0ad; }
.map-pin:hover > span, .map-pin[aria-pressed="true"] > span { color: #fff; background: var(--pin); transform: scale(1.13); }
.map-pin[aria-pressed="true"] > span { box-shadow: 0 0 0 3px #fff9ea, 0 0 0 4px var(--pin); }
.map-pin.muted { opacity: .22; }
.map-pin.muted:hover { opacity: 1; }
.plan-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 13px; font-size: 11px; color: var(--muted); }
.mobile-hint { display: none; }
.room-panel { display: flex; flex-direction: column; justify-content: space-between; padding: 23px; }
.room-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.room-meta .eyebrow { color: var(--area); }
.room-emblem { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--area-light); border-radius: 9px; color: var(--area); background: var(--area-accent); flex: none; }
.room-panel h3 { font: 400 clamp(31px, 3vw, 46px)/.96 var(--serif); color: var(--wine-dark); overflow-wrap: anywhere; }
.where { display: flex; align-items: start; gap: 5px; font-size: 13px; font-weight: 600; color: var(--area); margin-top: 10px; }
.where svg { width: 15px; height: 15px; margin-top: 2px; }
.what { margin: 12px 0 14px; font-size: 14px; }
.mnemonic { padding: 12px 13px; background: var(--area-accent); border: 1px solid var(--area-light); border-radius: 8px; font-size: 13px; }
.mnemonic strong { color: var(--area); display: flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: .055em; text-transform: uppercase; margin-bottom: 3px; }
.mnemonic svg { width: 15px; height: 15px; }
.room-controls { margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.icon-button { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid var(--line); border-radius: 50%; background: #fffaf4; color: var(--wine); transition: background .15s, color .15s; }
.icon-button:hover:not(:disabled) { background: var(--wine); color: #fff; border-color: var(--wine); }
.icon-button:disabled { opacity: .38; }
.icon-button svg { width: 18px; height: 18px; }
.directory { margin-top: 14px; }
.directory summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 13px 18px; color: var(--wine); font-weight: 700; font-size: 14px; }
.directory summary::-webkit-details-marker { display: none; }
.directory summary span { font-size: 19px; line-height: 1; }
.directory[open] summary span { transform: rotate(45deg); }
.directory-content { padding: 0 17px 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.directory-content h3 { color: var(--area); font: 700 13px/1.3 var(--sans); }
.directory-content h3 span { display: inline-block; width: 7px; height: 7px; background: var(--area); border-radius: 50%; margin-right: 5px; }
.directory ul { list-style: none; padding: 0; margin: 5px 0 0; }
.directory li + li { border-top: 1px solid var(--line); }
.directory button { display: flex; align-items: center; gap: 7px; justify-content: space-between; text-align: start; width: 100%; min-height: 41px; padding: 5px 2px; border: 0; background: transparent; font-size: 13px; }
.directory button:hover { color: var(--wine); text-decoration: underline; }

.memory { margin-top: 55px; padding: 29px; background: #eadace; border: 1px solid #e4d0c1; border-radius: 12px; }
.memory-intro > p:last-child { color: var(--muted); margin-top: 11px; font-size: 14px; }
.memory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 23px; }
.memory-grid article { padding: 18px; background: #fbf3e9; border: 1px solid #d9bdab; border-radius: 8px; }
.memory-grid article > span { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #e0cabc; border-radius: 50%; color: var(--wine); }
.memory-grid article svg { width: 18px; height: 18px; }
.memory-grid h3 { font: 400 31px/1 var(--serif); margin: 9px 0; color: var(--wine-dark); }
.memory-grid p { font-size: 14px; }
.memory-grid strong { color: var(--wine); }

.session { max-width: 925px; margin: 0 auto; }
.session-meter { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 13px; font-weight: 700; margin: 0 0 10px; }
.session-meter progress { appearance: none; border: 0; height: 6px; flex: 1; background: #e9d8cc; color: var(--wine); border-radius: 10px; overflow: hidden; }
progress::-webkit-progress-bar { background: #e9d8cc; }
progress::-webkit-progress-value { background: var(--wine); }
progress::-moz-progress-bar { background: var(--wine); }
.study-card { padding: clamp(23px, 4vw, 46px); background: linear-gradient(135deg,#fffdf8,#fcf3e8); }
.study-card > p { max-width: 62ch; }
.study-card .eyebrow { margin-bottom: 10px; }
.study-card .room-meta .eyebrow { margin-bottom: 0; }
.study-card .session-title { font: 400 clamp(41px, 5.5vw, 65px)/.98 var(--serif); color: var(--wine-dark); margin-bottom: 13px; overflow-wrap: anywhere; }
.prompt { max-width: 34ch; font: 400 clamp(32px, 4.2vw, 54px)/1.02 var(--serif); color: var(--wine-dark); overflow-wrap: anywhere; }
.prompt span { display: block; color: var(--wine); }
.study-card .mnemonic { max-width: 62ch; margin-top: 17px; font-size: 14px; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 21px; }
.choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 19px; }
.answer-choice { display: flex; align-items: center; gap: 9px; min-height: 53px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); text-align: start; padding: 8px 10px; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.answer-choice span { display: grid; place-items: center; flex: none; width: 27px; height: 27px; border-radius: 5px; background: #efe3d8; color: var(--wine); font-size: 12px; }
.answer-choice:hover:not(:disabled) { background: var(--wine-surface); border-color: #bd958f; }
.answer-choice.correct, .answer-feedback.correct { background: #edf5e8; border-color: #a8c7aa; color: #214f35; }
.answer-choice.wrong, .answer-feedback.wrong { background: #f8e8de; border-color: #ddb9a6; color: #782b2d; }
.answer-feedback { padding: 13px 15px; margin: 17px 0 13px; border: 1px solid; border-radius: 8px; }
.answer-feedback p { margin-top: 4px; font-size: 14px; }
#write-answer { margin-top: 19px; }
#write-answer label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.write-row { display: flex; flex-wrap: wrap; gap: 7px; }
.write-row input { min-width: 0; flex: 1 0 190px; max-width: 460px; min-height: 46px; background: var(--white); border: 1px solid #ac8e81; color: var(--ink); border-radius: 7px; padding: 9px 12px; }
.text-button { color: var(--wine); font-size: 13px; min-height: 42px; border: 0; padding-inline: 3px; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.quiz-map { border: 1px solid var(--line); border-radius: 7px; overflow: hidden; margin-top: 17px; }
.correct-pin > span { background: #336748; color: #fff; transform: scale(1.2); box-shadow: 0 0 0 3px #fff8ea; }
.wrong-pin > span { background: #9e3b43; color: #fff; }
.quiz-map button:disabled:not(.correct-pin,.wrong-pin) { opacity: .42; }
.missed-list { padding-left: 22px; columns: 2; font-size: 14px; }
.footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 53px; padding: 17px 0 25px; font-size: 12px; color: var(--muted); }
.footer-sep { color: var(--gold); }
.notice { margin-top: 12px; padding: 14px; background: var(--wine-surface); }
.enter { animation: appear .23s var(--ease) both; }
@keyframes appear { from { opacity: .38; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1140px) {
  .shell { width: min(1320px, calc(100% - 52px)); }
  .hero { min-height: 404px; }
  .explore-grid { grid-template-columns: minmax(0,2fr) minmax(263px,1fr); }
  .mobile-hint { display: inline; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(300px,1fr) minmax(0,1.09fr); }
  .hero-copy { padding: 32px; }
  .explore-grid { gap: 10px; }
  .room-panel { padding: 17px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 34px); }
  .explore-grid { grid-template-columns: minmax(0,1fr); }
  .room-panel { padding: 20px; }
  .section-heading { align-items: start; flex-direction: column; gap: 6px; margin-top: 23px; }
  .memory-grid { grid-template-columns: minmax(0,1fr); }
  .memory { margin-top: 34px; padding: 19px; }
  .directory-content { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .test-map-card { padding-inline: 14px; }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 24px); }
  .masthead { min-height: 65px; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 25px 23px; }
  .hero-copy::before { inset: 7px 7px 0; border-right: 1px solid #e5b37729; border-bottom: 0; border-radius: 8px 8px 0 0; }
  .hero h1 { font-size: clamp(63px,16vw,85px); margin: 11px 0 13px; line-height: .87; }
  .hero h1 br { display: none; }
  .hero-intro { font-size: 14px; }
  .hero-start.primary { margin-top: 15px; }
  .hero-photo { aspect-ratio: 2.05; }
  .hero-photo img { object-position: center 60%; }
  .hero-photo figcaption { bottom: 8px; right: 12px; font-size: 10px; }
  .learning { margin-top: 17px; }
  .mode-nav { width: 100%; gap: 3px; padding: 4px; }
  .mode { flex: 1 1 0; padding-inline: 5px; font-size: 12px; gap: 4px; }
  .mode-icon svg { width: 15px; height: 15px; }
  .filterbar { padding: 8px; gap: 3px; }
  .filter { padding-inline: 7px; font-size: 11px; }
  .plan-footer { align-items: flex-start; flex-direction: column; gap: 2px; padding-block: 6px; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .missed-list { columns: 1; }
  .footer { flex-direction: column; gap: 3px; margin-top: 35px; }
}
@media (max-width: 385px) {
  .mode { font-size: 11px; }
  .mode-icon svg { width: 14px; height: 14px; }
  .hero h1 { font-size: 16vw; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.guide-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px 16px;
  margin: 0 0 12px;
  padding: 11px 15px;
  background: #f5e7d7;
  border: 1px solid #e0c9b2;
  border-radius: 10px;
}
.guide-bar strong { display: block; color: var(--wine-dark); font-size: 15px; }
.guide-bar strong + span { display: block; color: var(--muted); font-size: 13px; }
.guide-bar .button { min-height: 41px; padding: 6px 11px; gap: 6px; font-size: 13px; }
.guide-console { background: var(--white); border-color: var(--line); }
.guide-picker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.guide-picker label, .guide-status { font-size: 12px; font-weight: 700; color: var(--muted); }
.guide-picker select { display: block; max-width: 100%; min-width: 0; min-height: 42px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff9ef; font: 700 14px var(--sans); color: var(--wine-dark); }
.guide-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-actions button:disabled { opacity: .45; transform: none; }
.guide-status { width: 100%; display: flex; align-items: center; gap: 11px; }
#guide-progress { flex: 1; height: 4px; border-radius: 8px; overflow: hidden; background: #e8d8cb; }
#guide-progress::before { content: ""; display: block; width: var(--completed, 0%); height: 100%; border-radius: inherit; background: var(--wine); transition: width .45s var(--ease); }
#guide-progress.playing::before { background: linear-gradient(90deg, #6e293d 40%, #c08b51 50%, #6e293d 60%); background-size: 230% 100%; animation: playback 3s linear infinite; }
@keyframes playback { to { background-position: -230% 0; } }
.guided .map-canvas { min-width: 0; }
.guided .map-scroll { overflow: hidden; }
.guided .mobile-hint { display: none; }
.guided .map-room.muted { opacity: .43; }
.guided .map-pin.muted { opacity: .22; }
.guided .map-pin { pointer-events: none; }
.guided .map-pin[aria-pressed="true"] > span { background: var(--wine); border-color: var(--wine); box-shadow: 0 0 0 3px #fff6df; }
.guide-spotlight { display: none; }
.guided .guide-spotlight {
  display: block;
  position: absolute;
  pointer-events: none;
  left: var(--spot-x, 90%);
  top: var(--spot-y, 69%);
  width: min(30%, calc(var(--spot-w, 12%) * 1.8));
  height: min(49%, calc(var(--spot-h, 24%) * 1.75));
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, #fff9de95, #f8c65c47 38%, #ffcb6600 72%);
  box-shadow: 0 0 0 0 #ffd38220;
  mix-blend-mode: multiply;
  transition: left .78s var(--ease), top .78s var(--ease), width .6s var(--ease), height .6s var(--ease);
  animation: spotlight-in .75s var(--ease) both;
}
@keyframes spotlight-in { from { opacity: 0; } to { opacity: 1; } }
.guided-story { margin-top: 10px; padding-left: 10px; border-left: 2px solid var(--area); color: var(--muted); font-size: 14px; }
.checkpoint h3 { font-size: clamp(26px, 2.65vw, 39px); line-height: .99; }
.checkpoint .choices { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
.checkpoint .answer-choice { min-height: 44px; padding: 7px; font-size: 13px; }
@media (max-width: 760px) {
  .guide-bar { padding: 9px 10px; }
  .guided .map-pin > span { width: clamp(15px, 5vw, 25px); height: clamp(15px, 5vw, 25px); font-size: clamp(8px, 2.5vw, 11px); }
  .guide-picker { width: 100%; }
  .guide-picker select { flex: 1; }
}

/* The wide view leads the guided visit. The plan tracks the same station. */
.explore-grid.guided {
  grid-template-columns: minmax(0,2.45fr) minmax(275px,1fr);
  grid-template-areas: "scene detail" "scene map";
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 11px 15px;
}
.guided .plan-card { grid-area: map; }
.guided .room-panel { grid-area: detail; padding: clamp(15px,2vw,23px); }
.guided .room-panel h3 { font-size: clamp(30px,3.15vw,45px); }
.guided .checkpoint h3 { font-size: clamp(27px,2.65vw,39px); }
.guided .room-panel h3:focus-visible { outline: none; }
.guided .room-meta { margin-bottom: 9px; }
.guided .room-meta .room-emblem { width: 35px; height: 35px; }
.guided .room-meta svg { width: 18px; height: 18px; }
.guided .map-pin > span { width: clamp(12px,1.5vw,19px); height: clamp(12px,1.5vw,19px); font-size: clamp(7px,.86vw,9px); }
.guided .plan-footer { padding-block: 6px; }
.guided:has(#scene-image[data-scene="street"]) .guide-spotlight { display: none; }
.welcome-room { padding-block: 6px; }
.welcome-room h3 { margin-top: 15px; }
.scene-note { color: var(--muted); font-size: 12px; }

.journey-scene {
  grid-area: scene;
  scroll-margin-block-start: 16px;
  position: relative;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  color: #fdf2e3;
  background: #321a1c;
  border: 1px solid #57302d;
  box-shadow: 0 15px 36px #371b2022;
}
.scene-view {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.53;
  background: radial-gradient(ellipse at 75% 32%, #5c3532, #261418 67%);
}
.scene-image, .scene-deck { position: absolute; inset: 0; overflow: hidden; }
.scene-deck { container-type: size; }
.scene-tile {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: max(100cqw, calc(100cqh * var(--tile-ratio)));
  aspect-ratio: var(--tile-ratio);
  background-image: var(--atlas);
  background-size: var(--columns) 200%;
  background-position: var(--tile-x) var(--tile-y);
  background-repeat: no-repeat;
}
.scene-image[data-scene="street"] .scene-tile[data-shot="audience-5"] { top: min(50%, 44cqh); }
.scene-view::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  inset: 28% 0 0;
  background: linear-gradient(0deg, #1e1010ef 0%, #211011a8 22%, #1c10123d 47%, transparent 90%);
}
.scene-heading {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  padding: 12px clamp(16px,3.5vw,36px) clamp(17px,3vw,30px);
  pointer-events: none;
}
.scene-kind { display: block; margin: 0 0 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .17em; font-weight: 700; color: #f5ca94; }
#scene-caption { font: 400 clamp(33px,4.7vw,69px)/.91 var(--serif); max-width: 23ch; text-wrap: balance; text-shadow: 0 1px 10px #1b0b0c; }
.scene-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 12px clamp(13px,2.4vw,30px);
  min-height: 68px;
  background: linear-gradient(110deg,#34191d,#421e24);
  border-top: 1px solid #e7b98630;
}
#scene-detail { font-size: 13px; line-height: 1.4; color: #f5e5d5; max-width: 47ch; }
.scene-buttons { display: flex; align-items: center; gap: 7px; flex: none; }
.scene-buttons .button { gap: 8px; border-radius: 7px; white-space: nowrap; }
.scene-buttons .button span > svg { width: 16px; height: 16px; }
.scene-forward { color: #411a24; background: #f5ddbd; }
.scene-forward:hover { background: #fff0d9; }
.scene-back { width: 46px; padding-inline: 0; border-color: #ffddbc42; background: #522832; color: #ffe6c9; }
.scene-back:hover { background: #70434a; }
.scene-back:disabled { opacity: .36; transform: none; }
.at-question .scene-buttons { display: none; }
.scene-fallback { display: none; }
.image-missing .scene-fallback {
  display: block;
  position: absolute;
  inset: 30% 0 auto;
  text-align: center;
  padding-inline: 10px;
  color: #f5e5d5;
  font-size: 14px;
}
@media (max-width: 900px) {
  .explore-grid.guided {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: auto;
    grid-template-areas: "scene" "detail" "map";
  }
  .scene-view { aspect-ratio: 1.4; }
  .guided .plan-card { max-width: 550px; }
}
@media (max-width: 560px) {
  .scene-view { aspect-ratio: 1.11; }
  .scene-toolbar { flex-wrap: wrap; padding-block: 10px; }
  #scene-detail { flex: 1 1 100%; min-height: 34px; font-size: 12px; }
  .scene-buttons { margin-left: auto; }
  .scene-buttons .button { min-height: 42px; }
  .scene-back { width: 43px; }
  .scene-heading { padding-bottom: 12px; }
  #scene-caption { font-size: clamp(33px,9vw,49px); }
}
