@font-face {
  font-family: "HYCFM Raleway";
  src: url("../fonts/Raleway-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   HYCFM Museum UI · Build 02
   A soft archival layer that preserves the established Blueberry/Limon system,
   the Explore menu structure, and the panoramic floor-route navigation.
   -------------------------------------------------------------------------- */

:root {
  --museum-blue: #3b5e86;
  --museum-blue-deep: #294866;
  --museum-blue-night: #16293d;
  --museum-limon: #f6e782;
  --museum-orange: #ce572c;
  --museum-cream: #f8f5e5;
  --museum-white: #fffdf5;
  --museum-ink: #271f1f;
  --museum-muted: #6c706d;
  --museum-line: rgb(59 94 134 / 22%);
  --museum-shadow: 0 26px 80px rgb(20 35 50 / 24%);
  --museum-radius: 24px;
  --museum-transition: 320ms cubic-bezier(0.22, 1, 0.36, 1);
  --hycfm-interface-scale: 1;
}

html[data-text-size="small"] {
  --hycfm-interface-scale: 0.9;
  font-size: 16px;
}

html[data-text-size="medium"] {
  --hycfm-interface-scale: 1;
  font-size: 16px;
}

html[data-text-size="large"] {
  --hycfm-interface-scale: 1.12;
  font-size: 16px;
}

.pano-stage {
  filter: var(--hycfm-view-filter, none);
  transition: filter 520ms ease;
}

.tour-header {
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.header-button {
  min-height: 48px;
  padding-inline: 17px;
  border: 1px solid rgb(246 231 130 / 82%);
  border-radius: 999px;
  background: rgb(41 72 102 / 92%);
  box-shadow: 0 10px 34px rgb(19 34 50 / 20%);
  backdrop-filter: blur(16px) saturate(110%);
  transition:
    color var(--museum-transition),
    background var(--museum-transition),
    border-color var(--museum-transition),
    transform var(--museum-transition);
}

.header-button:hover {
  color: var(--museum-blue-deep);
  border-color: var(--museum-limon);
  background: var(--museum-limon);
  transform: translateY(-1px);
}

.settings-toggle {
  justify-self: end;
}

.settings-mark {
  position: relative;
  width: 20px;
  height: 18px;
  display: grid;
  align-content: space-around;
}

.settings-mark i {
  position: relative;
  height: 1.5px;
  display: block;
  background: currentColor;
}

.settings-mark i::after {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  content: "";
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: var(--museum-blue-deep);
  transform: translateY(-50%);
}

.settings-mark i:nth-child(1)::after,
.settings-mark i:nth-child(3)::after {
  left: 3px;
}

.settings-mark i:nth-child(2)::after {
  right: 3px;
}

.settings-toggle:hover .settings-mark i::after {
  background: var(--museum-limon);
}

/* Preserve the proven drawer, while replacing its hard postal edges. */
.tour-menu {
  width: min(370px, calc(100vw - 22px));
  padding: max(26px, env(safe-area-inset-top)) 22px max(96px, env(safe-area-inset-bottom));
  border: 0;
  border-right: 1px solid rgb(246 231 130 / 58%);
  border-radius: 0 28px 28px 0;
  background:
    linear-gradient(145deg, rgb(59 94 134 / 98%), rgb(41 72 102 / 98%));
  box-shadow: 20px 0 70px rgb(17 32 47 / 30%);
}

.tour-menu::backdrop,
.museum-dialog::backdrop,
.story-dialog::backdrop {
  background: rgb(17 28 38 / 58%);
  backdrop-filter: blur(7px) saturate(82%);
}

.menu-heading {
  align-items: center;
}

.icon-button,
.museum-close,
.museum-back {
  border: 1px solid rgb(59 94 134 / 25%);
  border-radius: 50%;
  transition:
    color var(--museum-transition),
    background var(--museum-transition),
    transform var(--museum-transition);
}

.tour-menu .icon-button {
  border-color: rgb(246 231 130 / 60%);
}

.icon-button:hover,
.museum-close:hover,
.museum-back:hover {
  transform: rotate(4deg) scale(1.03);
}

.menu-tabs {
  gap: 5px;
  padding: 4px;
  border: 1px solid rgb(246 231 130 / 24%);
  border-radius: 999px;
  background: rgb(22 41 61 / 22%);
}

.menu-tabs button {
  min-height: 42px;
  border-radius: 999px;
}

.menu-tabs button[aria-selected="true"] {
  border-radius: 999px;
}

.stop-button,
.story-card {
  border-radius: 14px;
  overflow: hidden;
}

/* The established dock becomes a quiet floating museum control. */
.control-dock {
  gap: 4px;
  padding: 6px;
  border: 1px solid rgb(246 231 130 / 74%);
  border-radius: 20px;
  background: rgb(41 72 102 / 92%);
  box-shadow: 0 18px 58px rgb(20 35 50 / 28%);
  backdrop-filter: blur(18px) saturate(108%);
}

.scene-chip {
  border-right-color: rgb(248 245 229 / 24%);
}

.control-button {
  border: 0;
  border-radius: 13px;
  background: rgb(255 253 245 / 94%);
  transition:
    color var(--museum-transition),
    background var(--museum-transition),
    transform var(--museum-transition);
}

.control-button:hover {
  color: var(--museum-ink);
  background: var(--museum-limon);
  transform: translateY(-1px);
}

/* Shared dialog system: settings, production tools, photographs, and audio. */
.museum-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: var(--museum-radius);
  color: var(--museum-ink);
  background: transparent;
}

.museum-dialog:not([open]) {
  display: none;
}

.museum-panel,
.story-dialog-card {
  position: relative;
  padding: clamp(20px, 4vw, 34px);
  overflow: hidden;
  border: 1px solid rgb(59 94 134 / 18%);
  border-radius: var(--museum-radius);
  color: var(--museum-ink);
  background:
    radial-gradient(circle at 7% 4%, rgb(246 231 130 / 28%), transparent 28%),
    linear-gradient(145deg, rgb(255 253 245 / 98%), rgb(248 245 229 / 97%));
  box-shadow: var(--museum-shadow);
}

.museum-panel::before,
.story-dialog-card::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image: var(--noise);
  background-size: 512px 512px;
  mix-blend-mode: multiply;
  opacity: 0.035;
}

.museum-panel > *,
.story-dialog-card > * {
  position: relative;
  z-index: 1;
}

.museum-panel-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.tool-dialog .museum-panel-heading {
  grid-template-columns: auto 1fr auto;
}

.museum-kicker {
  margin: 0 0 5px;
  color: var(--museum-orange);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.museum-panel-heading h2 {
  margin: 0;
  color: var(--museum-blue-deep);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  line-height: 0.98;
}

.museum-close,
.museum-back {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--museum-blue-deep);
  background: rgb(255 253 245 / 76%);
  cursor: pointer;
  font-size: 1.65rem;
  line-height: 1;
}

.museum-back {
  font-size: 1.3rem;
}

.museum-close:hover,
.museum-back:hover {
  color: var(--museum-white);
  background: var(--museum-blue);
}

.museum-section {
  padding: 20px 0;
  border-top: 1px solid var(--museum-line);
}

.museum-section-heading {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}

.museum-section-number {
  color: var(--museum-orange);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.museum-section h3 {
  margin: 0 0 3px;
  color: var(--museum-blue-deep);
  font-size: 1.03rem;
  line-height: 1.2;
}

.museum-section-heading p {
  margin: 0;
  color: var(--museum-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.text-size-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.text-size-options button,
.segmented-control button,
.lighting-presets button {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--museum-line);
  border-radius: 14px;
  color: var(--museum-blue-deep);
  background: rgb(255 255 255 / 48%);
  cursor: pointer;
  transition:
    color var(--museum-transition),
    background var(--museum-transition),
    border-color var(--museum-transition),
    transform var(--museum-transition);
}

.text-size-options button:hover,
.segmented-control button:hover,
.lighting-presets button:hover {
  border-color: var(--museum-blue);
  transform: translateY(-1px);
}

.text-size-options button[aria-pressed="true"],
.segmented-control button[aria-pressed="true"] {
  border-color: var(--museum-blue);
  color: var(--museum-white);
  background: var(--museum-blue);
  box-shadow: 0 8px 22px rgb(59 94 134 / 18%);
}

.text-size-options small {
  font-size: 0.69rem;
}

.text-sample {
  display: inline-grid;
  place-items: end center;
  width: 28px;
  height: 34px;
  font-family: Georgia, serif;
  line-height: 1;
}

.text-sample--small {
  font-size: 1.05rem;
}

.text-sample--medium {
  font-size: 1.45rem;
}

.text-sample--large {
  font-size: 1.9rem;
}

.environment-options {
  display: grid;
  gap: 10px;
}

.museum-control-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgb(59 94 134 / 6%);
}

.museum-control-row > span {
  display: grid;
  gap: 3px;
}

.museum-control-row strong {
  color: var(--museum-blue-deep);
  font-size: 0.88rem;
}

.museum-control-row small {
  color: var(--museum-muted);
  font-size: 0.72rem;
}

.segmented-control {
  display: flex;
  gap: 5px;
}

.segmented-control button {
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.sun-glyph,
.moon-glyph {
  position: relative;
  width: 15px;
  height: 15px;
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.moon-glyph::after {
  position: absolute;
  top: -3px;
  left: 4px;
  width: 12px;
  height: 12px;
  content: "";
  border-radius: 50%;
  background: inherit;
  box-shadow: -3px 2px 0 currentColor;
}

.soft-toggle {
  min-width: 90px;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--museum-line);
  border-radius: 999px;
  color: var(--museum-blue-deep);
  background: rgb(255 255 255 / 60%);
  cursor: pointer;
}

.soft-toggle span {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 50%;
  background: var(--museum-blue);
  transition: transform var(--museum-transition), background var(--museum-transition);
}

.soft-toggle[aria-pressed="true"] span {
  background: var(--museum-orange);
  transform: scale(0.72);
}

.soft-toggle b {
  font-size: 0.72rem;
}

.museum-tool-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.museum-tool-links button {
  min-height: 90px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--museum-line);
  border-radius: 17px;
  color: var(--museum-blue-deep);
  background: rgb(255 255 255 / 46%);
  text-align: left;
  cursor: pointer;
  transition:
    background var(--museum-transition),
    border-color var(--museum-transition),
    transform var(--museum-transition);
}

.museum-tool-links button:hover {
  border-color: var(--museum-blue);
  background: var(--museum-white);
  transform: translateY(-2px);
}

.museum-tool-links button > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.museum-tool-links strong {
  font-size: 0.87rem;
}

.museum-tool-links small {
  color: var(--museum-muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.museum-tool-links i {
  color: var(--museum-orange);
  font-size: 1.15rem;
  font-style: normal;
}

.tool-glyph {
  position: relative;
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 50%;
  background: var(--museum-limon);
}

.tool-glyph--light::before {
  position: absolute;
  inset: 10px;
  content: "";
  border: 2px solid var(--museum-blue-deep);
  border-radius: 50%;
}

.tool-glyph--edit::before {
  position: absolute;
  top: 9px;
  left: 18px;
  width: 5px;
  height: 22px;
  content: "";
  border-radius: 3px;
  background: var(--museum-blue-deep);
  transform: rotate(42deg);
}

.museum-build {
  margin: 14px 0 -8px;
  color: rgb(41 72 102 / 62%);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-align: right;
}

.lighting-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.lighting-presets button {
  min-height: 48px;
  font-weight: 700;
}

.lighting-controls {
  display: grid;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--museum-line);
  border-bottom: 1px solid var(--museum-line);
}

.lighting-controls label {
  display: grid;
  gap: 9px;
}

.lighting-controls label > span {
  display: flex;
  justify-content: space-between;
  color: var(--museum-blue-deep);
  font-size: 0.84rem;
}

.lighting-controls output {
  color: var(--museum-muted);
  font-variant-numeric: tabular-nums;
}

.lighting-controls input[type="range"] {
  width: 100%;
  accent-color: var(--museum-blue);
}

.museum-primary-action,
.museum-secondary-action,
.museum-tertiary-action {
  min-height: 48px;
  padding: 9px 16px;
  border: 1px solid var(--museum-blue);
  border-radius: 999px;
  color: var(--museum-white);
  background: var(--museum-blue);
  cursor: pointer;
  font-weight: 700;
}

.museum-secondary-action {
  color: var(--museum-blue-deep);
  background: transparent;
}

.museum-tertiary-action {
  border-color: transparent;
  color: var(--museum-muted);
  background: transparent;
}

#lighting-reset {
  width: 100%;
  margin-top: 20px;
}

.editor-context {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 14px;
  color: var(--museum-blue-deep);
  background: rgb(246 231 130 / 40%);
}

.editor-context span,
.editor-picker > span {
  color: var(--museum-muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-picker {
  display: grid;
  gap: 7px;
}

.editor-picker select,
.editor-fields input {
  width: 100%;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--museum-line);
  border-radius: 12px;
  color: var(--museum-blue-deep);
  background: rgb(255 255 255 / 70%);
  font: inherit;
}

.editor-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.editor-fields label {
  display: grid;
  gap: 5px;
}

.editor-fields label span {
  padding-left: 2px;
  color: var(--museum-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-fields input {
  min-height: 42px;
  font-variant-numeric: tabular-nums;
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.editor-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.editor-status {
  min-height: 1.4em;
  margin: 14px 2px 0;
  color: var(--museum-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

/* Existing Look Closer and audio dialogs now use the same product language. */
.story-dialog {
  width: min(900px, calc(100% - 28px));
  border-radius: var(--museum-radius);
}

.story-dialog-card {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgb(59 94 134 / 20%);
  background:
    radial-gradient(circle at 5% 5%, rgb(246 231 130 / 26%), transparent 30%),
    linear-gradient(145deg, rgb(255 253 245 / 98%), rgb(248 245 229 / 96%));
}

.story-dialog-heading {
  align-items: center;
}

.story-dialog .icon-button {
  border: 1px solid var(--museum-line);
  border-radius: 50%;
  color: var(--museum-blue-deep);
  background: transparent;
}

.story-dialog img {
  border-radius: 16px;
  background: var(--museum-blue-night);
  box-shadow: 0 12px 38px rgb(20 35 50 / 15%);
}

.story-source-link {
  border: 1px solid var(--museum-blue);
  border-radius: 999px;
}

.story-dialog-nav {
  border-top-color: var(--museum-line);
}

body[data-environment="night"] .museum-panel,
body[data-environment="night"] .story-dialog-card {
  color: var(--museum-cream);
  border-color: rgb(246 231 130 / 20%);
  background:
    radial-gradient(circle at 6% 4%, rgb(246 231 130 / 9%), transparent 28%),
    linear-gradient(145deg, rgb(22 41 61 / 98%), rgb(13 28 42 / 98%));
}

body[data-environment="night"] .museum-panel-heading h2,
body[data-environment="night"] .museum-section h3,
body[data-environment="night"] .museum-control-row strong,
body[data-environment="night"] .museum-tool-links button,
body[data-environment="night"] .story-dialog-heading h2,
body[data-environment="night"] .editor-context,
body[data-environment="night"] .lighting-controls label > span {
  color: var(--museum-cream);
}

body[data-environment="night"] .museum-section,
body[data-environment="night"] .lighting-controls,
body[data-environment="night"] .story-dialog-nav {
  border-color: rgb(246 231 130 / 15%);
}

body[data-environment="night"] .museum-control-row,
body[data-environment="night"] .museum-tool-links button,
body[data-environment="night"] .text-size-options button,
body[data-environment="night"] .segmented-control button,
body[data-environment="night"] .lighting-presets button,
body[data-environment="night"] .editor-picker select,
body[data-environment="night"] .editor-fields input {
  color: var(--museum-cream);
  border-color: rgb(246 231 130 / 18%);
  background: rgb(255 255 255 / 6%);
}

body[data-environment="night"] .museum-control-row small,
body[data-environment="night"] .museum-section-heading p,
body[data-environment="night"] .museum-tool-links small,
body[data-environment="night"] .editor-status,
body[data-environment="night"] .editor-picker > span,
body[data-environment="night"] .editor-fields label span {
  color: rgb(248 245 229 / 68%);
}

body[data-environment="night"] .text-size-options button[aria-pressed="true"],
body[data-environment="night"] .segmented-control button[aria-pressed="true"] {
  color: var(--museum-blue-night);
  border-color: var(--museum-limon);
  background: var(--museum-limon);
}

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  .museum-dialog,
  .tour-menu,
  .story-dialog {
    scroll-behavior: auto;
  }
}

@media (max-width: 720px) {
  .tour-header {
    grid-template-columns: 1fr auto auto;
  }

  .header-button {
    min-width: 48px;
    padding-inline: 13px;
  }

  .settings-toggle > span:last-child,
  .access-link-label {
    display: none;
  }

  .access-postmark {
    width: 42px;
    flex-basis: 42px;
  }

  .museum-tool-links {
    grid-template-columns: 1fr;
  }

  .museum-dialog {
    width: min(560px, calc(100vw - 18px));
    max-height: calc(100dvh - 18px);
  }

  .museum-panel {
    padding: 20px 17px;
  }

  .editor-fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .museum-control-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .text-size-options {
    gap: 5px;
  }

  .text-size-options button {
    min-height: 54px;
    flex-direction: column;
    gap: 2px;
  }

  .scene-chip {
    width: 132px;
    min-width: 132px;
    flex-basis: 132px;
  }
}

@font-face {
  font-family: "HYCFM Raleway";
  src: url("../fonts/Raleway-Heavy.ttf") format("truetype");
  font-display: swap;
  font-weight: 800 900;
}

@font-face {
  font-family: "HYCFM Bernina";
  src: url("../fonts/bernina-sans.otf") format("opentype");
  font-display: swap;
  font-weight: 400 700;
}

:root {
  --limon: #f6e782;
  --blueberry: #3b5e86;
  --paper: #f8f5e5;
  --ink: #271f1f;
  --gold: #e7c878;
  --blueberry-deep: #294866;
  --shadow: 0 12px 38px rgb(39 31 31 / 28%);
  --noise: url("hycfm-paper-noise.png");
  --vintage-paper: url("licensed/vintage-paper.jpg");
  color-scheme: light;
  font-family: "HYCFM Bernina", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--blueberry);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--limon);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--ink);
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 12px 18px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.tour-shell,
.pano-stage {
  position: fixed;
  inset: 0;
}

.pano-stage {
  background: var(--blueberry);
}

.pano-stage::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image: var(--noise);
  background-size: 512px 512px;
  mix-blend-mode: multiply;
  opacity: 0.055;
}

.tour-header {
  position: fixed;
  z-index: 30;
  top: max(10px, env(safe-area-inset-top));
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.tour-header > * {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.header-button,
.icon-button,
.control-button,
.primary-button,
.secondary-button,
.menu-tabs button {
  min-width: 46px;
  min-height: 46px;
  border: 2px solid var(--blueberry);
  color: var(--blueberry);
  background: var(--paper);
  cursor: pointer;
}

.header-button {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-color: var(--limon);
  border-radius: 2px;
  color: var(--paper);
  background: var(--blueberry);
  box-shadow: 0 5px 18px rgb(39 31 31 / 26%);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.header-button:hover {
  color: var(--ink);
  background: var(--limon);
  border-color: var(--ink);
}

.menu-mark {
  width: 19px;
  display: grid;
  gap: 4px;
}

.menu-mark i {
  height: 2px;
  display: block;
  background: currentColor;
}

.menu-mark i:nth-child(2) {
  width: 13px;
}

.access-link {
  justify-self: end;
}

.access-postmark {
  position: relative;
  width: 50px;
  height: 32px;
  display: block;
  flex: 0 0 50px;
  transform: rotate(-3deg);
}

.access-person {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.access-person i {
  position: absolute;
  top: 5px;
  left: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.access-person b {
  position: absolute;
  top: 12px;
  left: 13px;
  width: 3px;
  height: 10px;
  background: currentColor;
}

.access-person b::after {
  position: absolute;
  top: 2px;
  left: -5px;
  width: 13px;
  height: 3px;
  content: "";
  background: currentColor;
}

.access-person em {
  position: absolute;
  top: 20px;
  left: 13px;
  width: 3px;
  height: 8px;
  background: currentColor;
  transform: rotate(27deg);
  transform-origin: top center;
}

.access-person em::after {
  position: absolute;
  inset: 0;
  content: "";
  background: currentColor;
  transform: rotate(-54deg);
  transform-origin: top center;
}

.access-franking {
  position: absolute;
  z-index: 1;
  top: 7px;
  right: 0;
  width: 24px;
  height: 18px;
  opacity: 0.42;
}

.access-franking i {
  position: absolute;
  right: 0;
  width: 22px;
  height: 5px;
  border-top: 2px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: skewX(-18deg);
}

.access-franking i:first-child {
  top: 1px;
}

.access-franking i:last-child {
  bottom: 1px;
}

.tour-menu {
  position: fixed;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(342px, calc(100vw - 28px));
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: max(22px, env(safe-area-inset-top)) 18px max(94px, env(safe-area-inset-bottom));
  overflow: hidden;
  color: var(--paper);
  background: var(--blueberry);
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  border-right: 4px solid var(--limon);
  box-shadow: var(--shadow);
}

.tour-menu:not([open]) {
  display: none;
}

.tour-menu::backdrop {
  background: rgb(0 0 0 / 58%);
  backdrop-filter: blur(1px);
}

.tour-menu > * {
  position: relative;
  z-index: 1;
}

.menu-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--limon);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.menu-heading h2 {
  margin: 0;
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 1.65rem;
  line-height: 1.02;
}

.icon-button {
  flex: 0 0 46px;
  border-color: var(--limon);
  color: var(--paper);
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--limon);
}

.menu-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--limon);
}

.menu-tabs button {
  border: 0;
  color: var(--paper);
  background: transparent;
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.menu-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: var(--limon);
}

.menu-panel {
  height: calc(100% - 130px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--limon) var(--blueberry-deep);
}

.menu-intro,
.story-note {
  margin: 0 0 14px;
  max-width: 29ch;
  color: var(--paper);
  font-size: 0.91rem;
  line-height: 1.4;
}

.stops-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0 1px 20px;
  list-style: none;
}

.stop-button {
  position: relative;
  min-height: 56px;
  width: 100%;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 5px 5px 5px 5px;
  overflow: hidden;
  border: 1px solid rgb(248 245 229 / 46%);
  color: var(--paper);
  background: var(--blueberry-deep);
  cursor: pointer;
  text-align: left;
}

.stop-button:hover,
.stop-button[aria-current="true"] {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--limon);
}

.stop-thumb {
  width: 50px;
  height: 44px;
  display: block;
  overflow: hidden;
  background-color: var(--paper);
  background-repeat: no-repeat;
  background-size: var(--thumb-size, 280%) auto;
  background-position: var(--thumb-x, 50%) var(--thumb-y, 50%);
  box-shadow: inset 0 0 0 1px rgb(248 245 229 / 34%);
}

.stop-thumb-01 {
  --thumb-size: 150%;
  --thumb-x: 52%;
  --thumb-y: 48%;
  background-image: url("../panos/01.tiles/thumb.jpg");
}

.stop-thumb-02 {
  --thumb-size: 235%;
  --thumb-x: 50%;
  --thumb-y: 8%;
  background-image: url("../ifg/screen_A.png");
}

.stop-thumb-03 {
  --thumb-size: 290%;
  --thumb-x: 8%;
  --thumb-y: 56%;
  background-image: url("../508/stops/stop_03.jpg");
}

.stop-thumb-04 {
  --thumb-size: 390%;
  --thumb-x: 58%;
  --thumb-y: 0%;
  background-image: url("../508/stops/stop_04.jpg");
}

.stop-thumb-05 {
  --thumb-size: 300%;
  --thumb-x: 53%;
  --thumb-y: 48%;
  background-image: url("../508/stops/stop_05.jpg");
}

.stop-thumb-06 {
  --thumb-size: 440%;
  --thumb-x: 79%;
  --thumb-y: 82%;
  background-image: url("../508/stops/stop_06.jpg");
}

.stop-thumb-07 {
  --thumb-size: 470%;
  --thumb-x: 12%;
  --thumb-y: 100%;
  background-image: url("../508/stops/stop_07.jpg");
}

.stop-thumb-08 {
  --thumb-size: 350%;
  --thumb-x: 19%;
  --thumb-y: 43%;
  background-image: url("../508/stops/stop_08.jpg");
}

.stop-thumb-09 {
  --thumb-size: 440%;
  --thumb-x: 57%;
  --thumb-y: 100%;
  background-image: url("../508/stops/stop_09.jpg");
}

.stop-thumb-10 {
  --thumb-size: 360%;
  --thumb-x: 34%;
  --thumb-y: 82%;
  background-image: url("../508/stops/stop_10.jpg");
}

.stop-thumb-11 {
  --thumb-size: 350%;
  --thumb-x: 45%;
  --thumb-y: 43%;
  background-image: url("../508/stops/stop_11.jpg");
}

.stop-thumb-12 {
  --thumb-size: 390%;
  --thumb-x: 23%;
  --thumb-y: 77%;
  background-image: url("../508/stops/stop_12.jpg");
}

.stop-thumb-13 {
  --thumb-size: 310%;
  --thumb-x: 45%;
  --thumb-y: 25%;
  background-image: url("../508/stops/stop_13.jpg");
}

.stop-thumb-14 {
  --thumb-size: 300%;
  --thumb-x: 0%;
  --thumb-y: 46%;
  background-image: url("../panos/13.tiles/thumb.jpg");
}

.stop-thumb-15 {
  --thumb-size: 350%;
  --thumb-x: 34%;
  --thumb-y: 28%;
  background-image: url("../508/stops/stop_15.jpg");
}

.stop-thumb-16 {
  --thumb-size: 300%;
  --thumb-x: 0%;
  --thumb-y: 48%;
  background-image: url("../508/stops/stop_16.jpg");
}

.stop-name {
  font-size: 0.92rem;
  line-height: 1.16;
}

.stop-frank,
.story-frank {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: -3px;
  width: 72px;
  height: 22px;
  overflow: hidden;
  color: var(--limon);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) rotate(-7deg) scale(0.9);
  transform-origin: center left;
  transition: opacity 220ms ease, transform 220ms ease;
}

.frank-waves {
  width: 72px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  opacity: 0.72;
  pointer-events: none;
}

.stop-button.is-visited .stop-frank,
.story-card.is-visited .story-frank {
  opacity: 0.74;
  transform: translateY(-50%) rotate(-7deg) scale(1);
}

.story-groups {
  display: grid;
  gap: 18px;
  padding-bottom: 4px;
}

.story-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 7px;
  color: var(--limon);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-group-title small {
  min-width: 25px;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.68rem;
  line-height: 1;
  text-align: center;
}

.story-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-card {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 5px;
  border: 1px solid rgb(248 245 229 / 46%);
  color: var(--paper);
  background: var(--blueberry-deep);
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

.story-card:hover,
.story-card:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--limon);
}

.story-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  color: var(--blueberry);
  background: var(--paper);
}

.story-icon img {
  width: 48px;
  height: 48px;
  display: block;
}

.article-glyph {
  position: relative;
  width: 24px;
  height: 29px;
  display: block;
  border: 3px solid var(--blueberry);
  border-radius: 1px;
}

.article-glyph::before {
  position: absolute;
  top: 5px;
  left: 4px;
  width: 10px;
  height: 8px;
  content: "";
  border-top: 2px solid var(--blueberry);
  border-bottom: 2px solid var(--blueberry);
}

.article-glyph::after {
  position: absolute;
  top: 17px;
  left: 4px;
  width: 10px;
  content: "";
  border-top: 2px solid var(--blueberry);
}

.story-copy {
  min-width: 0;
}

.story-copy strong,
.story-copy small {
  display: block;
}

.story-copy strong {
  font-size: 0.9rem;
  line-height: 1.15;
}

.story-copy small {
  margin-top: 3px;
  font-size: 0.73rem;
  line-height: 1.2;
  opacity: 0.82;
}

.story-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgb(248 245 229 / 45%);
}

.story-dialog {
  width: min(780px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  color: var(--ink);
  background: transparent;
}

.story-dialog::backdrop {
  background: rgb(20 30 39 / 78%);
  backdrop-filter: blur(3px);
}

.story-dialog-card {
  padding: 16px;
  border: 4px solid var(--limon);
  background-color: var(--paper);
  background-image: linear-gradient(rgb(248 245 229 / 88%), rgb(248 245 229 / 88%)), var(--vintage-paper), var(--noise);
  background-size: auto, cover, 512px;
  background-blend-mode: normal, multiply, multiply;
  box-shadow: var(--shadow);
}

.story-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.story-dialog-heading h2 {
  margin: 0;
  color: var(--blueberry-deep);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: clamp(1.15rem, 4vw, 1.7rem);
  line-height: 1.08;
}

.story-dialog .eyebrow {
  color: var(--blueberry);
}

.story-dialog .icon-button {
  color: var(--blueberry);
  border-color: var(--blueberry);
}

.story-dialog .icon-button:hover {
  color: var(--paper);
  background: var(--blueberry);
}

.story-dialog img {
  width: 100%;
  height: auto;
  max-height: min(62dvh, 620px);
  display: block;
  object-fit: contain;
  background: var(--blueberry-deep);
}

#story-dialog-description {
  max-width: 66ch;
  margin: 14px 0 2px;
  font-size: 0.96rem;
  line-height: 1.45;
}

.audio-dialog audio {
  width: 100%;
  min-height: 54px;
  display: block;
  accent-color: var(--blueberry);
}

#audio-dialog-description {
  max-width: 66ch;
  margin: 16px 0 10px;
  font-size: 0.96rem;
  line-height: 1.45;
}

.story-source-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 2px solid var(--blueberry);
  color: var(--blueberry-deep);
  background: var(--paper);
  font-weight: 700;
  line-height: 1.25;
}

.story-source-link:hover {
  color: var(--paper);
  background: var(--blueberry);
}

.story-dialog-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgb(59 94 134 / 28%);
}

.media-nav-button {
  min-width: 104px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1.5px solid var(--blueberry);
  border-radius: 999px;
  color: var(--blueberry-deep);
  background: transparent;
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.media-nav-button:first-child {
  justify-self: start;
}

.media-nav-button:last-child {
  justify-self: end;
}

.media-nav-button:hover:not(:disabled),
.media-nav-button:focus-visible {
  color: var(--paper);
  background: var(--blueberry);
  transform: translateY(-1px);
}

.media-nav-button:disabled {
  opacity: 0.38;
  cursor: default;
}

.media-nav-position {
  color: var(--blueberry-deep);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 460px) {
  .story-dialog-nav {
    gap: 8px;
  }

  .media-nav-button {
    min-width: 92px;
    padding-inline: 10px;
    font-size: 0.78rem;
  }
}

.control-dock {
  position: fixed;
  z-index: 30;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(10px, env(safe-area-inset-left));
  width: max-content;
  max-width: calc(100% - 20px);
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 0 auto;
  padding: 5px;
  border: 2px solid var(--limon);
  color: var(--paper);
  background: var(--blueberry);
  box-shadow: var(--shadow);
}

.control-dock > * {
  position: relative;
  z-index: 1;
}

.scene-chip {
  width: 180px;
  min-width: 180px;
  flex: 0 0 180px;
  display: grid;
  align-items: center;
  padding: 0 14px;
  overflow: hidden;
  border-right: 1px solid rgb(248 245 229 / 48%);
}

.scene-chip strong,
.scene-preview {
  grid-area: 1 / 1;
  width: 100%;
  max-width: none;
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.94rem;
  line-height: 1.12;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: opacity 180ms ease, transform 180ms ease;
}

.scene-preview {
  color: var(--limon);
  font-weight: 700;
  opacity: 0;
  transform: translateY(7px);
}

.scene-chip.is-previewing strong {
  opacity: 0;
  transform: translateY(-7px);
}

.scene-chip.is-previewing .scene-preview {
  opacity: 1;
  transform: translateY(0);
}

.control-rail {
  display: flex;
  align-items: center;
  gap: 5px;
}

.control-button {
  width: 50px;
  min-width: 50px;
  min-height: 50px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid rgb(39 31 31 / 18%);
  color: var(--blueberry);
  background: var(--paper);
  line-height: 1;
}

.control-icon {
  position: relative;
  width: 30px;
  height: 30px;
  display: block;
  flex: 0 0 30px;
}

.single-chevron i,
.double-chevron i {
  position: absolute;
  width: 13px;
  height: 13px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform-origin: center;
}

.single-chevron i {
  top: 8px;
  left: 8px;
}

.double-chevron i {
  top: 8px;
}

.double-chevron i:first-child {
  left: 2px;
}

.double-chevron i:last-child {
  left: 12px;
}

.chevron-right i {
  transform: rotate(45deg);
}

.chevron-left i {
  transform: rotate(225deg);
}

.chevron-up i {
  transform: rotate(315deg);
}

.chevron-down i {
  transform: rotate(135deg);
}

.math-icon::before,
.math-icon::after {
  position: absolute;
  top: 13px;
  left: 4px;
  width: 22px;
  height: 4px;
  border-radius: 1px;
  content: "";
  background: currentColor;
}

.plus-icon::after {
  transform: rotate(90deg);
}

.minus-icon::after {
  display: none;
}

.fullscreen-icon i {
  position: absolute;
  width: 10px;
  height: 10px;
}

.fullscreen-icon i:nth-child(1) {
  top: 2px;
  left: 2px;
  border-top: 4px solid currentColor;
  border-left: 4px solid currentColor;
}

.fullscreen-icon i:nth-child(2) {
  top: 2px;
  right: 2px;
  border-top: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.fullscreen-icon i:nth-child(3) {
  bottom: 2px;
  right: 2px;
  border-right: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
}

.fullscreen-icon i:nth-child(4) {
  bottom: 2px;
  left: 2px;
  border-bottom: 4px solid currentColor;
  border-left: 4px solid currentColor;
}

.control-button:hover,
.control-button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--limon);
}

.control-button[aria-disabled="true"] {
  opacity: 0.66;
  cursor: default;
}

.control-button[aria-disabled="true"]:hover {
  color: var(--blueberry);
  background: var(--paper);
}

.welcome-dialog {
  width: min(448px, calc(100% - 18px));
  height: auto;
  aspect-ratio: 9 / 16;
  max-height: calc(100dvh - 18px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  color: var(--paper);
  background: var(--limon);
  box-shadow: 0 22px 64px rgb(0 0 0 / 62%);
}

.welcome-dialog[open] {
  display: block;
}

.welcome-dialog::backdrop {
  background: rgb(0 0 0 / 84%);
}

.welcome-close {
  position: absolute;
  z-index: 20;
  top: 14px;
  right: 14px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--blueberry);
  background: transparent;
  box-shadow: none;
  filter: none;
  font-size: 0;
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
  transform-origin: center;
  transition:
    opacity 220ms ease-in-out,
    transform 220ms ease-in-out,
    color 180ms ease-in-out,
    filter 180ms ease-in-out;
}

.welcome-close::before,
.welcome-close::after {
  grid-area: 1 / 1;
  width: 38px;
  height: 5px;
  content: "";
  border-radius: 999px;
  background: currentColor;
}

.welcome-close::before {
  transform: rotate(45deg);
}

.welcome-close::after {
  transform: rotate(-45deg);
}

.welcome-close:hover {
  color: var(--blueberry-deep);
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 2px 2px rgb(39 31 31 / 24%));
  transform: scale(1.12);
}

.welcome-close:focus-visible {
  outline: 0;
  color: var(--blueberry);
  background: transparent;
  box-shadow: none;
  filter:
    drop-shadow(0 0 2px var(--paper))
    drop-shadow(0 0 5px rgb(41 72 102 / 72%));
}

.welcome-close:active {
  opacity: 0.9;
  transform: scale(0.92);
}

.opening-card {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: var(--limon);
}

.opening-panels {
  position: relative;
  min-height: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--limon);
  touch-action: pan-y;
}

.opening-panel {
  position: relative;
  height: 100%;
  padding: 66px 28px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--limon);
  background-image: linear-gradient(rgb(246 231 130 / 88%), rgb(246 231 130 / 88%)), var(--vintage-paper), var(--noise);
  background-size: auto, cover, 512px 512px;
  background-position: center, center, center;
  background-blend-mode: normal, multiply, multiply;
  scrollbar-color: var(--blueberry) var(--paper);
}

.opening-panel[hidden] {
  display: none;
}

.opening-panels[data-direction="forward"] .opening-panel.is-entering {
  animation: opening-in-forward 340ms cubic-bezier(0.22, 0.76, 0.28, 1) both;
}

.opening-panels[data-direction="back"] .opening-panel.is-entering {
  animation: opening-in-back 340ms cubic-bezier(0.22, 0.76, 0.28, 1) both;
}

.opening-welcome {
  padding: 30px 0 0;
  overflow: hidden;
  background-color: var(--limon);
}

.opening-welcome-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: var(--limon);
}

.opening-copy {
  position: relative;
  z-index: 2;
}

.opening-kicker {
  margin: 0 0 5px;
  color: var(--blueberry);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.opening-copy h2 {
  margin: 0;
  color: var(--ink);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: clamp(1.55rem, 6vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.opening-copy > p:last-child {
  max-width: 34ch;
  margin: 14px 0 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.opening-copy > p strong {
  color: var(--blueberry-deep);
}

.opening-guide::after,
.opening-controls::after,
.opening-credits::after {
  position: absolute;
  z-index: 0;
  right: -48px;
  bottom: -24px;
  width: 310px;
  height: 210px;
  content: "";
  pointer-events: none;
  background-image: url("licensed/vintage-postmark.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.035;
  transform: rotate(-6deg);
}

.media-key {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 26px;
}

.media-key-item {
  min-width: 0;
  min-height: 142px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 14px 6px 12px;
  border: 1px solid var(--blueberry);
  color: var(--blueberry-deep);
  background: rgb(248 245 229 / 72%);
  text-align: center;
  box-shadow: 3px 3px 0 var(--gold);
}

.media-key-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
}

.media-key-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  animation: opening-soft-pulse 3.8s ease-in-out infinite;
}

.media-key-item:nth-child(2) .media-key-icon img {
  animation-delay: 500ms;
}

.media-key-item:nth-child(3) .media-key-icon img {
  animation-delay: 1s;
}

.media-key-item strong,
.media-key-item small {
  display: block;
}

.media-key-item strong {
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

.media-key-item small {
  margin-top: 4px;
  color: var(--blueberry-deep);
  font-size: 0.72rem;
  line-height: 1.18;
}

.opening-note {
  position: relative;
  z-index: 2;
  margin: 23px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgb(59 94 134 / 56%);
  color: var(--blueberry-deep);
  font-size: 0.82rem;
  line-height: 1.4;
}

.mini-franking {
  position: relative;
  top: 1px;
  width: 30px;
  height: 13px;
  display: inline-block;
  margin-right: 8px;
  border-top: 2px solid var(--blueberry);
  border-bottom: 2px solid var(--blueberry);
  opacity: 0.8;
}

.mini-franking::before,
.mini-franking::after {
  position: absolute;
  left: 0;
  width: 30px;
  content: "";
  border-top: 1px solid var(--blueberry);
}

.mini-franking::before { top: 3px; }
.mini-franking::after { bottom: 3px; }

.gesture-demo {
  position: relative;
  height: 188px;
  margin-top: 22px;
  overflow: hidden;
  border: 3px solid var(--blueberry);
  background: var(--blueberry-deep);
  box-shadow: 6px 6px 0 var(--gold);
}

.gesture-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gesture-viewport::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgb(39 31 31 / 26%), transparent 34%, transparent 66%, rgb(39 31 31 / 26%));
}

.gesture-viewport img {
  width: 114%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: translateX(-6%) scale(1.03);
  animation: opening-pan-demo 7s ease-in-out infinite alternate;
}

.gesture-track {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 48px;
  width: 150px;
  height: 2px;
  background: rgb(248 245 229 / 78%);
}

.gesture-track::before,
.gesture-track::after {
  position: absolute;
  top: -4px;
  width: 8px;
  height: 8px;
  content: "";
  border-top: 2px solid var(--paper);
  border-left: 2px solid var(--paper);
}

.gesture-track::before {
  left: 0;
  transform: rotate(-45deg);
}

.gesture-track::after {
  right: 0;
  transform: rotate(135deg);
}

.gesture-hand {
  display: block;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.gesture-hand--drag {
  position: absolute;
  z-index: 3;
  left: 14px;
  bottom: 29px;
  width: 46px;
  height: 51px;
  color: var(--limon);
  filter: drop-shadow(0 2px 3px rgb(39 31 31 / 48%));
  -webkit-mask-image: url("licensed/gesture-drag.png");
  mask-image: url("licensed/gesture-drag.png");
  animation: opening-hand-drag 3.2s ease-in-out infinite alternate;
}

.gesture-label {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 10px;
  padding: 4px 7px;
  color: var(--ink);
  background: var(--limon);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gesture-label-mouse {
  display: none;
}

.gesture-zoom-demo {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 5px;
}

.gesture-zoom-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--blueberry);
  color: var(--blueberry);
  background: var(--paper);
  box-shadow: 0 3px 10px rgb(39 31 31 / 30%);
  font-family: "HYCFM Bernina", Arial, sans-serif;
  font-size: 1.55rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.gesture-hand--point {
  position: absolute;
  top: 23px;
  right: -5px;
  width: 35px;
  height: 39px;
  color: var(--limon);
  filter: drop-shadow(0 2px 3px rgb(39 31 31 / 48%));
  -webkit-mask-image: url("licensed/gesture-point.png");
  mask-image: url("licensed/gesture-point.png");
  animation: opening-zoom-tap 2.8s ease-in-out infinite;
}

@media (pointer: fine) {
  .gesture-label-touch {
    display: none;
  }

  .gesture-label-mouse {
    display: inline;
  }
}

.control-guide-list {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.control-guide-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgb(59 94 134 / 38%);
  font-size: 0.84rem;
  line-height: 1.35;
}

.control-guide-list strong {
  color: var(--blueberry-deep);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.opening-credits {
  background-color: var(--paper);
  background-image: linear-gradient(rgb(248 245 229 / 90%), rgb(248 245 229 / 90%)), var(--vintage-paper), var(--noise);
}

.credits-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.credits-lockup,
.credits-production {
  padding: 20px;
  border: 2px solid var(--blueberry-deep);
  background: rgb(248 245 229 / 48%);
}

.credits-lockup span,
.credits-production span {
  display: block;
  margin-bottom: 8px;
  color: var(--blueberry-deep);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.credits-lockup strong,
.credits-production strong {
  display: block;
  color: var(--ink);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-weight: 800;
  line-height: 0.96;
}

.credits-lockup strong {
  font-size: 1.62rem;
  letter-spacing: -0.045em;
}

.credits-lockup small {
  display: block;
  margin-top: 10px;
  font-family: Georgia, serif;
  font-size: 0.8rem;
}

.credits-production strong {
  font-size: 1rem;
  line-height: 1.2;
}

.opening-access-link {
  position: relative;
  z-index: 2;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 2px solid var(--blueberry-deep);
  color: var(--paper);
  background: var(--blueberry-deep);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
}

.opening-access-link:hover {
  color: var(--ink);
  background: var(--paper);
}

.opening-access-link span {
  font-size: 1.2rem;
}

.opening-actions {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 22px 18px;
  border-top: 1px solid rgb(59 94 134 / 24%);
  background: var(--limon);
}

.primary-button,
.secondary-button {
  min-height: 52px;
  padding: 0 22px;
  border-width: 2px;
  border-radius: 999px;
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-transform: none;
}

.primary-button {
  border-color: var(--blueberry-deep);
  color: var(--blueberry-deep);
  background: var(--paper);
}

.secondary-button {
  border-color: var(--blueberry);
  color: var(--blueberry-deep);
  background: rgb(248 245 229 / 42%);
}

.primary-button:hover,
.secondary-button:hover {
  border-color: var(--blueberry-deep);
  color: var(--blueberry-deep);
  background: var(--gold);
}

@keyframes opening-in-forward {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes opening-in-back {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes opening-soft-pulse {
  0%, 72%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgb(246 231 130 / 0%)); }
  82% { transform: scale(1.055); filter: drop-shadow(0 0 8px rgb(246 231 130 / 36%)); }
}

@keyframes opening-pan-demo {
  from { transform: translateX(-2%) scale(1.03); }
  to { transform: translateX(-12%) scale(1.09); }
}

@keyframes opening-hand-drag {
  from { transform: translateX(0) rotate(-3deg); }
  to { transform: translateX(128px) rotate(3deg); }
}

@keyframes opening-zoom-tap {
  0%, 55%, 100% { transform: translate(0, 0) scale(1); opacity: 0.92; }
  67% { transform: translate(-3px, -5px) scale(0.94); opacity: 1; }
  78% { transform: translate(0, 0) scale(1); opacity: 0.92; }
}

.noscript-message {
  max-width: 42rem;
  margin: 7rem auto;
  padding: 2rem;
  color: var(--ink);
  background: var(--paper);
}

@media (min-width: 721px) {
  .welcome-dialog {
    width: auto;
    max-width: calc(100vw - 48px);
    height: min(680px, 66vh);
    height: min(680px, 66dvh);
    max-height: min(680px, calc(100vh - 32px));
    max-height: min(680px, calc(100dvh - 32px));
  }
}

@media (max-width: 920px) {
  .access-link-label,
  .wide-only {
    display: none;
  }

  .access-link {
    padding: 0 10px;
  }

  .scene-chip {
    width: 160px;
    min-width: 160px;
    flex-basis: 160px;
  }
}

@media (max-width: 720px) {
  .tour-header {
    grid-template-columns: 1fr auto;
  }

  .tour-menu {
    top: auto;
    right: 0;
    width: 100%;
    height: min(72vh, 640px);
    height: min(72dvh, 640px);
    max-height: min(72vh, 640px);
    max-height: min(72dvh, 640px);
    padding: 18px 14px max(86px, calc(env(safe-area-inset-bottom) + 74px));
    border-top: 4px solid var(--limon);
    border-right: 0;
  }

  .menu-panel {
    height: min(47dvh, 430px);
  }

  .control-dock {
    width: calc(100% - 20px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .scene-chip {
    width: 100%;
    min-width: 0;
    flex: none;
    min-height: 46px;
    padding: 0 9px;
    border-right: 0;
    border-bottom: 1px solid rgb(248 245 229 / 48%);
  }

  .control-rail {
    display: grid;
    grid-template-columns: repeat(5, minmax(46px, 1fr));
    gap: 6px;
  }

  .control-button {
    width: auto;
    min-width: 46px;
  }

  .opening-panel {
    padding: 64px 24px 24px;
  }

  .opening-welcome {
    padding: 28px 0 0;
  }
}

@media (max-width: 420px) {
  .tour-header {
    gap: 7px;
  }

  .header-button {
    min-height: 46px;
    padding: 0 12px;
  }

  .control-rail {
    grid-template-columns: repeat(5, 1fr);
  }

  .control-button {
    min-width: 42px;
  }

  .opening-panel {
    padding: 62px 18px 21px;
  }

  .opening-welcome {
    padding: 27px 0 0;
  }

  .opening-copy h2 {
    font-size: 1.7rem;
  }

  .opening-copy > p:last-child {
    font-size: 0.86rem;
  }

  .media-key {
    gap: 6px;
    margin-top: 20px;
  }

  .media-key-item {
    min-height: 126px;
    gap: 7px;
    padding-inline: 3px;
    box-shadow: 3px 3px 0 var(--gold);
  }

  .media-key-icon {
    width: 50px;
    height: 50px;
  }

  .media-key-item strong {
    font-size: 0.64rem;
    letter-spacing: 0.035em;
  }

  .media-key-item small {
    font-size: 0.61rem;
  }

  .gesture-demo {
    height: 166px;
  }

  .opening-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opening-actions .primary-button,
  .opening-actions .secondary-button {
    padding-inline: 14px;
    font-size: 1.075rem;
    letter-spacing: 0.01em;
  }
}

@media (min-width: 721px) {
  .museum-palette[data-floating-panel] {
    max-height: 76dvh;
  }
}

@media (max-width: 720px) {
  .museum-palette[data-floating-panel],
  .museum-palette.editor-dialog[data-floating-panel],
  .museum-palette.tool-dialog[data-floating-panel] {
    max-height: 86dvh;
  }
}

@media (max-height: 700px) {
  .opening-panel {
    padding-top: 58px;
    padding-bottom: 18px;
  }

  .opening-welcome {
    padding: 24px 0 0;
  }

  .opening-copy h2 {
    font-size: 1.55rem;
  }

  .opening-copy > p:last-child {
    margin-top: 9px;
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .media-key {
    margin-top: 16px;
  }

  .media-key-item {
    min-height: 108px;
    padding-block: 8px;
  }

  .media-key-icon {
    width: 44px;
    height: 44px;
  }

  .opening-note {
    margin-top: 15px;
    padding-top: 9px;
  }

  .gesture-demo {
    height: 132px;
    margin-top: 14px;
  }

  .control-guide-list {
    margin-top: 12px;
  }

  .control-guide-list li {
    padding-block: 7px;
  }

  .credits-grid {
    gap: 9px;
    margin-top: 22px;
  }

  .credits-lockup,
  .credits-production {
    padding: 14px;
  }

  .credits-lockup strong {
    font-size: 1.35rem;
  }

  .opening-access-link {
    min-height: 46px;
    margin-top: 9px;
    padding-block: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Museum layer cascade guard: these rules intentionally follow the legacy
   interface so its proven behavior remains intact while the finish is softer. */
body .tour-header {
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

body .header-button {
  min-height: 48px;
  padding-inline: 17px;
  border: 1px solid rgb(246 231 130 / 82%);
  border-radius: 999px;
  background: rgb(41 72 102 / 92%);
  box-shadow: 0 10px 34px rgb(19 34 50 / 20%);
  backdrop-filter: blur(16px) saturate(110%);
}

body .header-button:hover {
  color: var(--museum-blue-deep);
  border-color: var(--museum-limon);
  background: var(--museum-limon);
  transform: translateY(-1px);
}

body .settings-toggle {
  justify-self: end;
}

body .tour-menu {
  width: min(370px, calc(100vw - 22px));
  padding: max(26px, env(safe-area-inset-top)) 22px max(96px, env(safe-area-inset-bottom));
  border: 0;
  border-right: 1px solid rgb(246 231 130 / 58%);
  border-radius: 0 28px 28px 0;
  background: linear-gradient(145deg, rgb(59 94 134 / 98%), rgb(41 72 102 / 98%));
  box-shadow: 20px 0 70px rgb(17 32 47 / 30%);
}

body .menu-heading {
  align-items: center;
}

body .menu-tabs {
  gap: 5px;
  padding: 4px;
  border: 1px solid rgb(246 231 130 / 24%);
  border-radius: 999px;
  background: rgb(22 41 61 / 22%);
}

body .menu-tabs button,
body .menu-tabs button[aria-selected="true"] {
  border-radius: 999px;
}

body .stop-button,
body .story-card {
  border-radius: 14px;
  overflow: hidden;
}

body .control-dock {
  gap: 4px;
  padding: 6px;
  border: 1px solid rgb(246 231 130 / 74%);
  border-radius: 20px;
  background: rgb(41 72 102 / 92%);
  box-shadow: 0 18px 58px rgb(20 35 50 / 28%);
  backdrop-filter: blur(18px) saturate(108%);
}

body .control-button {
  border: 0;
  border-radius: 13px;
  background: rgb(255 253 245 / 94%);
}

body .control-button:hover {
  color: var(--museum-ink);
  background: var(--museum-limon);
  transform: translateY(-1px);
}

body .story-dialog {
  width: min(900px, calc(100% - 28px));
  border-radius: var(--museum-radius);
}

body .story-dialog-card {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgb(59 94 134 / 20%);
  border-radius: var(--museum-radius);
  background:
    radial-gradient(circle at 5% 5%, rgb(246 231 130 / 26%), transparent 30%),
    linear-gradient(145deg, rgb(255 253 245 / 98%), rgb(248 245 229 / 96%));
}

body .story-dialog-heading {
  align-items: center;
}

body .story-dialog .icon-button {
  border: 1px solid var(--museum-line);
  border-radius: 50%;
  color: var(--museum-blue-deep);
  background: transparent;
}

body .story-dialog img {
  border-radius: 16px;
  background: var(--museum-blue-night);
  box-shadow: 0 12px 38px rgb(20 35 50 / 15%);
}

body .story-source-link {
  border: 1px solid var(--museum-blue);
  border-radius: 999px;
}

body .story-dialog-nav {
  border-top-color: var(--museum-line);
}

body[data-environment="night"] .story-dialog-card {
  color: var(--museum-cream);
  border-color: rgb(246 231 130 / 20%);
  background:
    radial-gradient(circle at 6% 4%, rgb(246 231 130 / 9%), transparent 28%),
    linear-gradient(145deg, rgb(22 41 61 / 98%), rgb(13 28 42 / 98%));
}

@media (max-width: 720px) {
  body .tour-header {
    grid-template-columns: 1fr auto auto;
  }

  body .header-button {
    min-width: 48px;
    padding-inline: 13px;
  }
}

/* Build 03: floating production panels, embedded film and draft hotspots. */
body .tour-header {
  grid-template-columns: 1fr auto;
}

body .scene-preview {
  display: none !important;
}

.museum-dialog[data-floating-panel] {
  position: fixed;
  inset: 70px 18px auto auto;
  width: min(540px, calc(100vw - 36px));
  max-height: calc(100dvh - 88px);
  margin: 0;
  overflow: auto;
  border: 0;
  border-radius: 30px;
  box-shadow: 0 22px 64px rgb(15 30 44 / 26%);
}

.museum-dialog.editor-dialog[data-floating-panel] {
  width: min(720px, calc(100vw - 36px));
}

.museum-dialog[data-floating-panel]::backdrop {
  background: transparent;
  backdrop-filter: none;
}

.museum-dialog[data-floating-panel] .museum-panel {
  min-height: 0;
}

.museum-dialog[data-floating-panel].is-dragging {
  user-select: none;
}

.museum-drag-bar {
  display: grid;
  min-height: 24px;
  place-items: center;
  cursor: grab;
  touch-action: none;
}

.museum-drag-bar:active,
.museum-panel-heading[data-drag-handle]:active {
  cursor: grabbing;
}

.museum-drag-bar span {
  width: 68px;
  height: 5px;
  border-radius: 999px;
  background: rgb(59 94 134 / 28%);
}

.museum-panel-heading[data-drag-handle] {
  cursor: grab;
  touch-action: none;
}

.museum-panel-heading button,
.museum-panel-heading a {
  cursor: pointer;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: var(--museum-blue-night);
  box-shadow: 0 14px 42px rgb(20 35 50 / 18%);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.museum-access-link {
  color: inherit;
  text-decoration: none;
}

.museum-access-link i {
  color: var(--museum-orange);
  font-size: 1.45rem;
  font-style: normal;
}

.editor-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 18px 0;
  padding: 5px;
  border: 1px solid rgb(59 94 134 / 16%);
  border-radius: 999px;
  background: rgb(59 94 134 / 7%);
}

.editor-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--museum-blue-deep);
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.editor-tabs button[aria-selected="true"] {
  color: var(--museum-cream);
  background: var(--museum-blue);
  box-shadow: 0 8px 24px rgb(41 72 102 / 18%);
}

.editor-mode-panel[hidden] {
  display: none;
}

.editor-add-panel > p {
  margin: 0 0 16px;
  color: var(--museum-muted);
  line-height: 1.45;
}

.editor-hotspot-types {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.editor-hotspot-types button {
  display: grid;
  min-height: 118px;
  padding: 14px 8px;
  place-items: center;
  gap: 8px;
  border: 1px solid rgb(59 94 134 / 20%);
  border-radius: 18px;
  color: var(--museum-blue-deep);
  background: rgb(255 253 245 / 76%);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.editor-hotspot-types button:hover {
  border-color: var(--museum-orange);
  background: rgb(246 231 130 / 34%);
  transform: translateY(-1px);
}

.editor-hotspot-types img,
.draft-ring {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.draft-ring {
  display: block;
  border: 5px solid var(--museum-blue);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 7px var(--museum-limon),
    0 0 0 2px rgb(255 253 245 / 90%);
}

.editor-add-panel .editor-draft-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--museum-orange);
  color: var(--museum-blue-deep);
  background: rgb(212 91 43 / 7%);
  font-size: 0.9rem;
}

.opening-guide,
.opening-credits {
  overflow: hidden;
}

.opening-guide .opening-copy {
  margin-top: -8px;
}

.opening-guide .media-key {
  margin-top: 12px;
}

.opening-guide .opening-note {
  margin-top: 14px;
}

.opening-card .welcome-close {
  top: 14px;
  right: 14px;
  width: 58px;
  height: 58px;
  border: 3px solid var(--museum-blue);
  border-radius: 50%;
  color: var(--museum-blue);
  background: var(--museum-cream);
  font-size: 2rem;
  box-shadow: 0 8px 24px rgb(20 35 50 / 15%);
}

.opening-actions {
  min-height: 112px;
  gap: 24px;
  padding-block: 12px;
}

.opening-actions button {
  min-height: 68px;
}

.opening-credits .opening-copy {
  padding-top: 10px;
}

@media (max-width: 720px) {
  body .tour-header {
    grid-template-columns: 1fr auto;
  }

  .museum-dialog[data-floating-panel],
  .museum-dialog.editor-dialog[data-floating-panel] {
    inset: 8px 8px auto 8px;
    width: auto;
    max-height: calc(100dvh - 16px);
  }

  .museum-dialog[data-floating-panel] .museum-panel {
    padding: 10px 16px 22px;
  }

  .editor-hotspot-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-hotspot-types button {
    min-height: 96px;
  }
}

/* Build 04 — fixed, quiet opening-card system. */
.opening-card {
  grid-template-rows: minmax(0, 1fr) 86px;
}

.opening-card .welcome-close {
  top: 18px;
  right: 18px;
  width: 58px;
  height: 58px;
  border: 3px solid var(--blueberry);
  border-radius: 50%;
  color: var(--blueberry);
  background: var(--paper);
  box-shadow: 0 7px 18px rgb(28 48 69 / 18%);
  font-size: 0;
}

.opening-card .welcome-close::before,
.opening-card .welcome-close::after {
  width: 28px;
  height: 4px;
}

.opening-card .welcome-close:hover {
  color: var(--blueberry-deep);
  background: var(--limon);
  box-shadow: 0 9px 22px rgb(28 48 69 / 22%);
}

.opening-panel {
  padding: 72px 30px 20px;
  overflow: hidden;
}

.opening-panels[data-direction="forward"] .opening-panel.is-entering,
.opening-panels[data-direction="back"] .opening-panel.is-entering {
  animation: opening-card-fade 240ms ease-out both;
}

.opening-welcome {
  padding: 30px 0 0;
}

.opening-copy > p:last-child {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.42;
}

.opening-guide .opening-copy {
  margin-top: 0;
}

.opening-guide .media-key {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
  margin-top: 26px;
}

.opening-guide .media-key-item {
  min-height: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.opening-guide .media-key-icon {
  width: 74px;
  height: 74px;
}

.opening-guide .media-key-icon img {
  animation: none;
}

.opening-guide .media-key-item strong {
  color: var(--blueberry-deep);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.opening-guide .opening-note,
.opening-guide .mini-franking,
.opening-controls .opening-note,
.gesture-demo,
.control-guide-list {
  display: none;
}

.opening-guide::after,
.opening-controls::after,
.opening-credits::after {
  display: none;
}

.opening-controls {
  display: flex;
  flex-direction: column;
}

.opening-control-map {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.opening-control-map li {
  min-height: 98px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgb(59 94 134 / 34%);
}

.opening-control-map li:last-child {
  border-bottom: 0;
}

.opening-control-symbol {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(59 94 134 / 28%);
  border-radius: 50%;
  color: var(--blueberry);
  background: rgb(248 245 229 / 52%);
}

.opening-control-symbol svg {
  width: 46px;
  height: 46px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.opening-control-symbol .opening-control-symbol-muted {
  stroke: var(--museum-orange);
}

.opening-control-map strong,
.opening-control-map small {
  display: block;
}

.opening-control-map strong {
  color: var(--blueberry-deep);
  font-family: "HYCFM Raleway", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.15;
  text-transform: uppercase;
}

.opening-control-map small {
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.34;
}

.opening-actions {
  min-height: 86px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 14px 28px 16px;
}

.opening-actions button,
.opening-actions .primary-button,
.opening-actions .secondary-button {
  width: 100%;
  min-height: 54px;
  height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
}

.opening-credits {
  padding-top: 70px;
}

.opening-credits .opening-copy {
  padding-top: 0;
}

@media (max-width: 420px) {
  .opening-panel {
    padding: 68px 22px 18px;
  }

  .opening-welcome {
    padding: 28px 0 0;
  }

  .opening-guide .media-key {
    gap: 12px;
    margin-top: 22px;
  }

  .opening-guide .media-key-icon {
    width: 64px;
    height: 64px;
  }

  .opening-control-map {
    margin-top: 18px;
  }

  .opening-control-map li {
    min-height: 88px;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
    padding-block: 9px;
  }

  .opening-control-symbol {
    width: 58px;
    height: 58px;
  }

  .opening-control-symbol svg {
    width: 40px;
    height: 40px;
  }

  .opening-actions {
    gap: 18px;
    padding-inline: 22px;
  }
}

@media (max-height: 700px) {
  .opening-panel {
    padding-top: 64px;
  }

  .opening-welcome {
    padding-top: 24px;
  }

  .opening-guide .media-key {
    margin-top: 16px;
  }

  .opening-guide .media-key-icon {
    width: 58px;
    height: 58px;
  }

  .opening-control-map {
    margin-top: 12px;
  }

  .opening-control-map li {
    min-height: 74px;
    padding-block: 6px;
  }

  .opening-control-symbol {
    width: 52px;
    height: 52px;
  }

  .opening-control-symbol svg {
    width: 36px;
    height: 36px;
  }
}

/* Build 05: compact, line-drawn controls inspired by traditional tour guides. */
.opening-control-map--reference {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid rgb(59 94 134 / 30%);
}

.opening-control-map--reference li {
  min-height: 150px;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 12px 10px;
  text-align: center;
}

.opening-control-map--reference li:nth-child(odd) {
  border-right: 1px solid rgb(59 94 134 / 30%);
}

.opening-control-map--reference li:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.opening-control-map--reference .opening-control-symbol {
  width: 62px;
  height: 62px;
  border-color: rgb(59 94 134 / 24%);
  background: rgb(248 245 229 / 66%);
}

.opening-control-map--reference .opening-control-symbol svg {
  width: 43px;
  height: 43px;
  stroke-width: 2.7;
}

.opening-control-map--reference strong {
  font-size: 0.73rem;
}

.opening-control-map--reference small {
  max-width: 150px;
  margin-top: 3px;
  font-size: 0.71rem;
  line-height: 1.28;
}

@media (max-width: 560px) {
  .opening-control-map--reference {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .opening-control-map--reference li {
    min-height: 138px;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 10px 6px;
  }

  .opening-control-map--reference .opening-control-symbol {
    width: 56px;
    height: 56px;
  }

  .opening-control-map--reference .opening-control-symbol svg {
    width: 39px;
    height: 39px;
  }
}

@media (max-height: 700px) {
  .opening-control-map--reference {
    margin-top: 10px;
  }

  .opening-control-map--reference li {
    min-height: 112px;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 7px 6px;
  }

  .opening-control-map--reference .opening-control-symbol {
    width: 48px;
    height: 48px;
  }

  .opening-control-map--reference .opening-control-symbol svg {
    width: 34px;
    height: 34px;
  }

  .opening-control-map--reference small {
    font-size: 0.66rem;
  }
}

@keyframes opening-card-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Build 06 — four archival-paper opening cards. */
.welcome-dialog {
  width: min(480px, calc(100vw - 56px));
  height: auto;
  aspect-ratio: 3 / 5;
  max-height: calc(100dvh - 36px);
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 24px 34px rgb(0 0 0 / 48%));
}

.opening-card {
  --opening-paper: url("hycfm-parchment-welcome.jpg");
  isolation: isolate;
  overflow: visible;
  background: transparent;
}

.opening-card[data-opening-step="0"] {
  --opening-paper: url("hycfm-parchment-welcome.jpg");
}

.opening-card[data-opening-step="1"] {
  --opening-paper: url("hycfm-parchment-guide.jpg");
}

.opening-card[data-opening-step="2"] {
  --opening-paper: url("hycfm-parchment-controls.jpg");
}

.opening-card[data-opening-step="3"] {
  --opening-paper: url("hycfm-parchment-credits.jpg");
}

.opening-card::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background-color: var(--limon);
  background-image:
    linear-gradient(118deg, rgb(246 231 130 / 82%), rgb(246 231 130 / 72%)),
    var(--opening-paper);
  background-position: center;
  background-size: cover;
  background-blend-mode: normal, multiply;
  clip-path: polygon(
    1.2% 0.8%, 8% 0.1%, 17% 0.7%, 29% 0.2%, 43% 0.8%,
    58% 0.15%, 72% 0.7%, 86% 0.15%, 98.8% 1.1%,
    99.6% 10%, 99.1% 23%, 99.7% 38%, 99.15% 53%,
    99.7% 69%, 99.1% 83%, 98.6% 98.8%,
    89% 99.5%, 77% 99.1%, 64% 99.7%, 51% 99.2%,
    38% 99.8%, 24% 99.15%, 11% 99.6%, 1.1% 98.7%,
    0.4% 87%, 0.9% 73%, 0.25% 58%, 0.8% 43%,
    0.25% 28%, 0.8% 14%
  );
  box-shadow: inset 0 0 44px rgb(112 82 36 / 10%);
}

.opening-panels,
.opening-panel,
.opening-actions,
.opening-credits {
  background: transparent;
}

.opening-panel {
  background-image: none;
}

.opening-welcome {
  padding: 26px 0 0;
}

.opening-welcome-art {
  position: relative;
  z-index: 1;
  background: transparent;
  opacity: 0.93;
  mix-blend-mode: multiply;
  clip-path: polygon(
    1.2% 0.8%, 8% 0.1%, 17% 0.7%, 29% 0.2%, 43% 0.8%,
    58% 0.15%, 72% 0.7%, 86% 0.15%, 98.8% 1.1%,
    99.6% 18%, 99.1% 37%, 99.7% 56%, 99.1% 76%, 98.6% 99%,
    80% 99.3%, 61% 99%, 42% 99.5%, 22% 99%, 1% 98.8%,
    0.4% 79%, 0.9% 60%, 0.25% 40%, 0.8% 20%
  );
}

.opening-card .welcome-close {
  top: -13px;
  right: -16px;
  width: 46px;
  height: 46px;
  border: 3px solid var(--blueberry);
  color: var(--blueberry);
  background: var(--paper);
  box-shadow:
    0 5px 0 rgb(39 31 31 / 16%),
    0 10px 22px rgb(39 31 31 / 24%);
}

.opening-card .welcome-close::before,
.opening-card .welcome-close::after {
  width: 23px;
  height: 3px;
}

.opening-card .welcome-close:hover {
  color: var(--paper);
  background: var(--blueberry);
  box-shadow:
    0 5px 0 rgb(39 31 31 / 18%),
    0 12px 25px rgb(39 31 31 / 28%);
}

.opening-actions {
  gap: 30px;
  padding: 14px 34px 18px;
  border-top: 1px solid rgb(41 72 102 / 30%);
}

.opening-actions button,
.opening-actions .primary-button,
.opening-actions .secondary-button {
  min-height: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  border-radius: 17px;
  color: var(--paper);
  background:
    linear-gradient(145deg, #5278a1 0%, var(--blueberry) 45%, var(--blueberry-deep) 100%);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 28%),
    0 4px 0 rgb(39 31 31 / 18%),
    0 8px 18px rgb(39 31 31 / 14%);
}

.opening-actions button:hover,
.opening-actions .primary-button:hover,
.opening-actions .secondary-button:hover {
  border-color: var(--ink);
  color: var(--paper);
  background:
    linear-gradient(145deg, #6388af 0%, #456b95 45%, #294866 100%);
  transform: translateY(-1px);
}

@media (min-width: 721px) {
  .welcome-dialog {
    width: auto;
    height: min(860px, calc(100dvh - 54px));
    max-width: calc(100vw - 76px);
    max-height: min(860px, calc(100dvh - 54px));
    aspect-ratio: 3 / 5;
  }
}

@media (max-width: 420px) {
  .welcome-dialog {
    width: calc(100vw - 46px);
    max-height: calc(100dvh - 26px);
  }

  .opening-card .welcome-close {
    top: -10px;
    right: -12px;
    width: 42px;
    height: 42px;
  }

  .opening-actions {
    gap: 18px;
    padding-inline: 24px;
  }

  .opening-actions button,
  .opening-actions .primary-button,
  .opening-actions .secondary-button {
    min-height: 48px;
    height: 48px;
    border-radius: 15px;
  }
}

/* Build 07 — compact, dockable museum palettes. */
.museum-palette[data-floating-panel] {
  width: min(430px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgb(15 30 44 / 24%);
}

.museum-palette.editor-dialog[data-floating-panel],
.museum-palette.tool-dialog[data-floating-panel] {
  width: min(390px, calc(100vw - 24px));
}

.museum-palette .museum-panel {
  min-height: 0;
  padding: 8px 15px 9px;
  border-radius: 22px;
}

.museum-palette .museum-drag-bar {
  min-height: 13px;
}

.museum-palette .museum-drag-bar span {
  width: 48px;
  height: 4px;
}

.museum-palette .museum-drag-bar--bottom {
  min-height: 16px;
  margin: 7px -5px -5px;
}

.museum-palette .museum-panel-heading {
  gap: 9px;
  margin-bottom: 8px;
}

.museum-palette .museum-panel-heading h2 {
  font-size: 1.62rem;
  line-height: 1;
}

.museum-palette .museum-kicker {
  margin-bottom: 3px;
  font-size: 0.56rem;
}

.museum-panel-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.museum-palette .museum-close,
.museum-palette .museum-back,
.museum-palette .museum-minimize {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--museum-line);
  border-radius: 50%;
  color: var(--museum-blue-deep);
  background: rgb(255 253 245 / 74%);
  font: inherit;
  font-size: 1.16rem;
  line-height: 1;
  cursor: pointer;
}

.museum-palette .museum-minimize {
  font-size: 1.05rem;
}

.museum-palette .museum-close:hover,
.museum-palette .museum-back:hover,
.museum-palette .museum-minimize:hover {
  border-color: var(--museum-blue);
  color: var(--museum-white);
  background: var(--museum-blue);
}

.museum-palette.is-minimized {
  max-height: none;
  overflow: hidden;
}

.museum-palette.is-minimized .museum-panel {
  padding: 7px 10px 8px;
}

.museum-palette.is-minimized .museum-panel > :not(.museum-drag-bar:first-child):not(.museum-panel-heading):not(.museum-panel-footer) {
  display: none;
}

.museum-palette.is-minimized .museum-drag-bar:first-child {
  min-height: 9px;
}

.museum-palette.is-minimized .museum-panel-heading {
  margin: 0;
}

.museum-palette.is-minimized .museum-kicker {
  display: none;
}

.museum-palette.is-minimized .museum-panel-heading h2 {
  font-size: 1.05rem;
}

.settings-dialog.museum-palette .museum-section {
  padding: 10px 0;
}

.settings-dialog.museum-palette .museum-section-heading {
  grid-template-columns: 24px 1fr;
  gap: 7px;
  margin-bottom: 8px;
}

.settings-dialog.museum-palette .museum-section-number {
  font-size: 0.63rem;
}

.settings-dialog.museum-palette .museum-section h3 {
  font-size: 0.91rem;
}

.settings-dialog.museum-palette .museum-section-heading p {
  font-size: 0.7rem;
}

.settings-dialog.museum-palette .text-size-options {
  gap: 6px;
}

.settings-dialog.museum-palette .text-size-options button {
  min-height: 42px;
  padding: 5px 7px;
  border-radius: 12px;
}

.settings-dialog.museum-palette .text-sample {
  height: 28px;
}

.settings-dialog.museum-palette .environment-options {
  gap: 6px;
}

.settings-dialog.museum-palette .museum-control-row {
  min-height: 48px;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 13px;
}

.settings-dialog.museum-palette .museum-control-row strong {
  font-size: 0.78rem;
}

.settings-dialog.museum-palette .museum-control-row small {
  font-size: 0.64rem;
}

.settings-dialog.museum-palette .segmented-control button {
  min-height: 34px;
  padding: 5px 9px;
}

.settings-dialog.museum-palette .soft-toggle {
  min-width: 78px;
  min-height: 34px;
}

.settings-dialog.museum-palette .soft-toggle span {
  width: 22px;
  height: 22px;
}

.settings-dialog.museum-palette .museum-tool-links {
  gap: 7px;
}

.settings-dialog.museum-palette .museum-tool-links button {
  min-height: 64px;
  grid-template-columns: 34px 1fr auto;
  gap: 7px;
  padding: 8px;
  border-radius: 14px;
}

.settings-dialog.museum-palette .tool-glyph {
  width: 32px;
  height: 32px;
}

.settings-dialog.museum-palette .tool-glyph--light::before {
  inset: 8px;
}

.settings-dialog.museum-palette .tool-glyph--edit::before {
  top: 7px;
  left: 14px;
  height: 18px;
}

.settings-dialog.museum-palette .museum-tool-links strong {
  font-size: 0.76rem;
}

.settings-dialog.museum-palette .museum-tool-links small {
  font-size: 0.62rem;
}

.settings-dialog.museum-palette .museum-build {
  margin: 6px 0 -2px;
  font-size: 0.53rem;
}

.editor-dialog.museum-palette .editor-context {
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 7px 9px;
  border-radius: 11px;
  font-size: 0.79rem;
}

.editor-dialog.museum-palette .editor-context span {
  font-size: 0.6rem;
}

.editor-dialog.museum-palette .editor-tabs {
  display: flex;
  gap: 6px;
  margin: 5px 0 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.editor-dialog.museum-palette .editor-tabs button {
  min-height: 31px;
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 1px solid var(--museum-line);
  border-radius: 999px;
  background: rgb(255 255 255 / 38%);
  font-size: 0.7rem;
}

.editor-dialog.museum-palette .editor-tabs button[aria-selected="true"] {
  border-color: var(--museum-blue);
  background: var(--museum-blue);
  box-shadow: 0 5px 14px rgb(41 72 102 / 14%);
}

.editor-dialog.museum-palette .editor-picker {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.editor-dialog.museum-palette .editor-picker > span {
  font-size: 0.6rem;
}

.editor-dialog.museum-palette .editor-picker select {
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 9px;
  font-size: 0.74rem;
}

.editor-readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 7px 0;
}

.editor-readouts > div {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 9px;
  border-radius: 10px;
  color: var(--museum-blue-deep);
  background: rgb(246 231 130 / 28%);
}

.editor-readouts span {
  color: var(--museum-muted);
  font-size: 0.61rem;
  font-weight: 800;
}

.editor-readouts output,
.editor-adjustment output {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.editor-adjustments {
  display: grid;
  gap: 6px;
}

.editor-adjustment {
  padding: 6px 8px;
  border: 1px solid rgb(59 94 134 / 10%);
  border-radius: 11px;
  background: rgb(59 94 134 / 4%);
}

.editor-adjustment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
  color: var(--museum-blue-deep);
  font-size: 0.68rem;
}

.editor-adjustment label {
  display: grid;
  grid-template-columns: 39px 1fr;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}

.editor-adjustment label span {
  color: var(--museum-muted);
  font-size: 0.56rem;
}

.editor-adjustment input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--museum-blue);
}

.editor-dialog.museum-palette .editor-actions {
  gap: 5px;
  margin-top: 7px;
}

.editor-dialog.museum-palette .editor-actions button {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 0.68rem;
}

.editor-dialog.museum-palette .editor-add-panel > p {
  margin-bottom: 8px;
  font-size: 0.71rem;
}

.editor-dialog.museum-palette .editor-hotspot-types {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.editor-dialog.museum-palette .editor-hotspot-types button {
  min-height: 58px;
  grid-template-columns: 34px 1fr;
  padding: 7px 9px;
  border-radius: 12px;
}

.editor-dialog.museum-palette .editor-hotspot-types img,
.editor-dialog.museum-palette .draft-ring {
  width: 32px;
  height: 32px;
}

.editor-dialog.museum-palette .draft-ring {
  border-width: 3px;
  box-shadow:
    inset 0 0 0 4px var(--museum-limon),
    0 0 0 1px rgb(255 253 245 / 90%);
}

.editor-dialog.museum-palette .editor-add-panel .editor-draft-note {
  margin-top: 7px;
  padding: 7px 9px;
  font-size: 0.63rem;
}

.tool-dialog.museum-palette .lighting-presets {
  gap: 6px;
  margin-bottom: 9px;
}

.tool-dialog.museum-palette .lighting-presets button {
  min-height: 34px;
  padding: 5px;
  border-radius: 11px;
  font-size: 0.7rem;
}

.tool-dialog.museum-palette .lighting-controls {
  gap: 9px;
  padding: 9px 0;
}

.tool-dialog.museum-palette .lighting-controls label {
  gap: 3px;
}

.tool-dialog.museum-palette .lighting-controls label > span {
  font-size: 0.69rem;
}

.tool-dialog.museum-palette #lighting-reset {
  min-height: 34px;
  margin-top: 9px;
  padding-block: 5px;
  font-size: 0.7rem;
}

body[data-environment="night"] .editor-readouts > div,
body[data-environment="night"] .editor-adjustment {
  color: var(--museum-cream);
  background: rgb(246 231 130 / 7%);
}

body[data-environment="night"] .editor-adjustment-heading {
  color: var(--museum-cream);
}

@media (max-width: 720px) {
  .museum-palette[data-floating-panel],
  .museum-palette.editor-dialog[data-floating-panel],
  .museum-palette.tool-dialog[data-floating-panel] {
    inset: 8px 8px auto auto;
    width: min(390px, calc(100vw - 16px));
    max-height: calc(100dvh - 16px);
  }

  .museum-palette .museum-panel {
    padding: 7px 12px 8px;
  }
}

/* Build 08 · organized icon environment and dock controls. */
.settings-dialog.museum-palette .museum-section {
  margin: 7px 0;
  padding: 11px 12px;
  border: 1px solid rgb(59 94 134 / 13%);
  border-radius: 16px;
  background: rgb(59 94 134 / 4%);
}

.settings-dialog.museum-palette .museum-section-heading {
  margin-bottom: 9px;
}

.environment-console {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.environment-cluster {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(46px, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid rgb(59 94 134 / 13%);
  border-radius: 14px;
  background: rgb(255 253 245 / 46%);
}

.environment-cluster--visibility {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(46px, 1fr));
}

.museum-icon-control {
  position: relative;
  min-width: 46px;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 5px;
  border: 1px solid var(--museum-line);
  border-radius: 12px;
  color: var(--museum-blue-deep);
  background: rgb(255 253 245 / 76%);
  text-decoration: none;
  cursor: pointer;
  transition:
    color var(--museum-transition),
    border-color var(--museum-transition),
    background var(--museum-transition),
    transform var(--museum-transition);
}

.museum-icon-control:hover,
.museum-icon-control:focus-visible {
  border-color: var(--museum-blue);
  color: var(--museum-blue-night);
  background: var(--museum-limon);
  transform: translateY(-1px);
}

.museum-icon-control[aria-pressed="true"] {
  color: var(--museum-blue-night);
  border-color: var(--museum-blue);
  background: var(--museum-limon);
  box-shadow: inset 0 0 0 1px rgb(255 253 245 / 72%);
}

.environment-icon {
  position: relative;
  width: 29px;
  height: 29px;
  display: block;
}

.environment-icon--sun {
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow:
    0 -10px 0 -8px currentColor,
    0 10px 0 -8px currentColor,
    10px 0 0 -8px currentColor,
    -10px 0 0 -8px currentColor,
    7px 7px 0 -8px currentColor,
    -7px -7px 0 -8px currentColor,
    7px -7px 0 -8px currentColor,
    -7px 7px 0 -8px currentColor;
  transform: scale(0.63);
}

.environment-icon--moon {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.environment-icon--moon::after {
  position: absolute;
  inset: 2px -3px 5px 8px;
  content: "";
  border-radius: 50%;
  background: var(--museum-white);
}

.museum-icon-control[aria-pressed="true"] .environment-icon--moon::after,
.museum-icon-control:hover .environment-icon--moon::after,
.museum-icon-control:focus-visible .environment-icon--moon::after {
  background: var(--museum-limon);
}

.environment-icon--motion {
  width: 27px;
  height: 27px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.environment-icon--motion::before,
.environment-icon--motion::after {
  position: absolute;
  inset: 4px;
  content: "";
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.environment-icon--motion::after {
  inset: -5px;
  opacity: 0;
  animation: settings-ring-pulse 2.2s ease-out infinite;
}

.reduced-motion .environment-icon--motion::after {
  animation: none;
  opacity: 0;
}

.reduced-motion .environment-icon--motion {
  border-width: 3px;
  box-shadow: inset 0 0 0 3px var(--museum-limon);
}

.museum-access-icon svg {
  width: 31px;
  height: 31px;
  overflow: visible;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.museum-access-icon svg circle {
  stroke: none;
}

.environment-icon--toolbar {
  width: 32px;
  height: 25px;
  display: grid;
  grid-template-columns: 7px 1fr 7px;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.environment-icon--toolbar i {
  height: 14px;
  display: block;
  border-right: 1px solid currentColor;
}

.environment-icon--toolbar i:nth-child(2) {
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.environment-icon--hotspot {
  width: 29px;
  height: 29px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgb(255 253 245 / 68%);
}

.environment-icon--hotspot i {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: currentColor;
}

.museum-icon-control[aria-pressed="true"] .environment-icon--hotspot {
  box-shadow: inset 0 0 0 4px var(--museum-limon);
}

.environment-icon--media svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visibility-icon-control[aria-pressed="false"] {
  color: rgb(41 72 102 / 48%);
  background: rgb(255 253 245 / 42%);
}

.visibility-icon-control[aria-pressed="false"]::after {
  position: absolute;
  width: 35px;
  height: 2px;
  content: "";
  border-radius: 2px;
  background: var(--museum-orange);
  transform: rotate(-42deg);
}

.museum-panel-footer {
  position: sticky;
  z-index: 4;
  bottom: -9px;
  min-height: 42px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  border-top: 1px solid rgb(59 94 134 / 10%);
  background: linear-gradient(to bottom, rgb(248 245 229 / 84%), var(--museum-cream) 36%);
}

.museum-panel-footer::after {
  content: "";
}

.museum-panel-footer .museum-drag-bar--bottom {
  margin: 0;
}

.museum-collapse {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--museum-line);
  border-radius: 50%;
  color: var(--museum-blue-deep);
  background: rgb(255 253 245 / 74%);
  cursor: pointer;
}

.collapse-chevron {
  width: 10px;
  height: 10px;
  display: block;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--museum-transition);
}

.museum-collapse:hover,
.museum-collapse:focus-visible {
  color: var(--museum-white);
  border-color: var(--museum-blue);
  background: var(--museum-blue);
}

.museum-palette.is-minimized .museum-panel-footer {
  margin-top: 1px;
}

.museum-palette.is-minimized .collapse-chevron {
  transform: translateY(2px) rotate(225deg);
}

.museum-palette.is-minimized .museum-drag-bar--bottom {
  display: flex;
}

body[data-environment="night"] .settings-dialog.museum-palette .museum-section,
body[data-environment="night"] .environment-cluster {
  border-color: rgb(246 231 130 / 13%);
  background: rgb(255 253 245 / 3%);
}

body[data-environment="night"] .museum-icon-control,
body[data-environment="night"] .museum-collapse {
  color: var(--museum-cream);
  border-color: rgb(246 231 130 / 24%);
  background: rgb(255 253 245 / 5%);
}

body[data-environment="night"] .museum-panel-footer {
  border-top-color: rgb(246 231 130 / 10%);
  background: linear-gradient(to bottom, rgb(22 41 61 / 84%), var(--museum-blue-night) 36%);
}

body[data-environment="night"] .museum-icon-control[aria-pressed="true"] {
  color: var(--museum-blue-night);
  border-color: var(--museum-limon);
  background: var(--museum-limon);
}

body[data-environment="night"] .environment-icon--moon::after {
  background: var(--museum-blue-night);
}

body[data-environment="night"] .museum-icon-control[aria-pressed="true"] .environment-icon--moon::after,
body[data-environment="night"] .museum-icon-control:hover .environment-icon--moon::after,
body[data-environment="night"] .museum-icon-control:focus-visible .environment-icon--moon::after {
  background: var(--museum-limon);
}

@keyframes settings-ring-pulse {
  0% { opacity: 0; transform: scale(0.78); }
  38% { opacity: 0.42; }
  78%, 100% { opacity: 0; transform: scale(1.28); }
}

@media (max-width: 420px) {
  .settings-dialog.museum-palette .museum-section {
    padding-inline: 9px;
  }

  .environment-console {
    gap: 6px;
  }

  .environment-cluster {
    gap: 5px;
    padding: 5px;
  }

  .museum-icon-control {
    min-width: 44px;
    min-height: 46px;
  }
}

@media (max-width: 420px) {
  .settings-dialog.museum-palette .museum-section-heading p,
  .settings-dialog.museum-palette .museum-control-row small,
  .settings-dialog.museum-palette .museum-tool-links small {
    display: none;
  }

  .settings-dialog.museum-palette .museum-tool-links button {
    min-height: 52px;
  }

  .editor-dialog.museum-palette .museum-panel-heading h2 {
    font-size: 1.38rem;
  }
}

/* --------------------------------------------------------------------------
   Build 08 prototype · Story Ribbon + collapsible View Wheel
   The exhibit and its sequence are primary. Mechanical panorama controls
   remain available as a compact, progressively disclosed instrument.
   -------------------------------------------------------------------------- */

.story-ribbon {
  position: fixed;
  z-index: 34;
  right: 0;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 0;
  width: min(460px, calc(100vw - 24px));
  min-height: 60px;
  display: grid;
  grid-template-columns: 52px 1px minmax(0, 1fr) 1px 44px 1px 52px;
  gap: 0;
  margin-inline: auto;
  padding: 5px;
  border: 1px solid rgb(246 231 130 / 78%);
  border-radius: 20px;
  color: var(--museum-cream);
  background: rgb(41 72 102 / 92%);
  box-shadow: 0 16px 48px rgb(15 30 44 / 28%);
  backdrop-filter: blur(18px) saturate(110%);
}

.story-ribbon-step,
.story-ribbon-current,
.view-wheel-toggle,
.pan-direction,
.pan-joystick {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.story-ribbon-step {
  min-width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--museum-cream);
  background: transparent;
  transition:
    color 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.story-ribbon-step:hover,
.story-ribbon-step:focus-visible {
  color: var(--museum-limon);
  background: transparent;
  transform: scale(1.08);
}

.story-ribbon-step[aria-disabled="true"] {
  opacity: 0.42;
}

.story-ribbon-step .single-chevron {
  transform: scale(1.3);
}

.story-ribbon-divider {
  align-self: center;
  width: 1px;
  height: 28px;
  background: rgb(255 253 245 / 28%);
}

.story-ribbon-current {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 3px 7px 3px 4px;
  overflow: hidden;
  border-radius: 14px;
  color: var(--museum-cream);
  background: rgb(22 41 61 / 26%);
  text-align: left;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.story-ribbon-current:hover,
.story-ribbon-current:focus-visible {
  color: var(--museum-white);
  background: rgb(22 41 61 / 48%);
}

.story-ribbon-thumb.stop-thumb {
  width: 54px;
  height: 44px;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 1px rgb(255 253 245 / 48%),
    0 5px 15px rgb(15 30 44 / 20%);
}

.story-ribbon-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid rgb(255 253 245 / 28%);
}

.story-ribbon-copy strong {
  width: 100%;
  display: -webkit-box;
  overflow: hidden;
  color: currentColor;
  font-size: 0.91rem;
  line-height: 1.08;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.story-ribbon-copy span {
  color: var(--museum-cream);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.story-ribbon-current > .story-ribbon-thumb,
.story-ribbon-current > .story-ribbon-copy {
  transition:
    opacity 170ms ease,
    transform 170ms ease;
}

.story-ribbon-preview {
  position: absolute;
  inset: 3px 10px 3px 4px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 170ms ease,
    transform 170ms ease;
}

.story-ribbon-current.is-previewing > .story-ribbon-thumb,
.story-ribbon-current.is-previewing > .story-ribbon-copy {
  opacity: 0;
  transform: translateY(-8px);
}

.story-ribbon-current.is-previewing .story-ribbon-preview {
  opacity: 1;
  transform: translateY(0);
}

.story-ribbon :focus-visible,
.view-wheel-shell :focus-visible {
  outline: 3px solid var(--museum-limon);
  outline-offset: 2px;
}

.view-wheel-shell {
  position: relative;
  z-index: 35;
  width: 44px;
  height: 50px;
  display: grid;
  place-items: center;
}

.view-wheel-toggle {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: var(--museum-cream);
  background: transparent;
  box-shadow: none;
  transition:
    color 190ms ease,
    background 190ms ease,
    border-color 190ms ease,
    transform 190ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view-wheel-toggle:hover,
.view-wheel-toggle:focus-visible,
.view-wheel-shell.is-open .view-wheel-toggle {
  color: var(--museum-limon);
  background: transparent;
  transform: scale(1.08);
}

.pan-symbol {
  position: relative;
  width: 25px;
  height: 25px;
  display: block;
}

.pan-symbol i {
  position: absolute;
  display: block;
  color: currentColor;
}

.pan-symbol-dot {
  top: 10px;
  left: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pan-symbol-up,
.pan-symbol-right,
.pan-symbol-down,
.pan-symbol-left {
  width: 8px;
  height: 8px;
}

.pan-symbol-up {
  top: 0;
  left: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.pan-symbol-right {
  top: 8px;
  right: 0;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.pan-symbol-down {
  bottom: 0;
  left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.pan-symbol-left {
  top: 8px;
  left: 0;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.view-wheel-panel {
  position: absolute;
  right: -55px;
  bottom: 62px;
  display: grid;
  grid-template-columns: 44px 132px;
  align-items: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgb(246 231 130 / 66%);
  border-radius: 23px;
  background: rgb(41 72 102 / 88%);
  box-shadow: 0 18px 54px rgb(15 30 44 / 28%);
  backdrop-filter: blur(18px) saturate(108%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.88);
  transform-origin: 77% bottom;
  transition:
    opacity 190ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view-wheel-shell.is-open .view-wheel-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.view-zoom-control {
  position: relative;
  width: 44px;
  height: 118px;
  display: grid;
  place-items: center;
}

.view-zoom-control::before {
  content: none;
}

#view-zoom-slider {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 108px;
  margin: 0;
  accent-color: var(--museum-limon);
  cursor: ns-resize;
  direction: rtl;
  writing-mode: vertical-lr;
}

#view-zoom-slider::-webkit-slider-runnable-track {
  width: 3px;
  height: 100%;
  border-radius: 999px;
  background: rgb(255 253 245 / 42%);
}

#view-zoom-slider::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-left: -7.5px;
  border: 2px solid var(--museum-blue-deep);
  border-radius: 50%;
  background: var(--museum-cream);
  box-shadow: 0 3px 10px rgb(15 30 44 / 24%);
  -webkit-appearance: none;
}

#view-zoom-slider:focus-visible {
  outline: 3px solid var(--museum-limon);
  outline-offset: 3px;
}

.pan-wheel {
  position: relative;
  width: 132px;
  height: 132px;
  flex: 0 0 132px;
  border: 1px solid rgb(255 253 245 / 46%);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgb(255 253 245 / 20%) 0 31%, transparent 32%),
    rgb(22 41 61 / 26%);
  box-shadow:
    inset 0 0 0 5px rgb(246 231 130 / 8%),
    inset 0 0 26px rgb(15 30 44 / 18%);
}

.pan-direction {
  position: absolute;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--museum-cream);
  background: transparent;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.pan-direction:hover,
.pan-direction:focus-visible {
  color: var(--museum-limon);
  background: rgb(255 253 245 / 8%);
  transform: scale(1.08);
}

.pan-direction .control-icon {
  transform: scale(0.72);
}

.pan-up {
  top: 2px;
  left: 44px;
}

.pan-right {
  top: 44px;
  right: 2px;
}

.pan-down {
  bottom: 2px;
  left: 44px;
}

.pan-left {
  top: 44px;
  left: 2px;
}

.pan-joystick {
  --joystick-x: 0px;
  --joystick-y: 0px;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(41 72 102 / 65%);
  border-radius: 50%;
  color: var(--museum-blue-deep);
  background: rgb(255 253 245 / 92%);
  box-shadow:
    0 7px 18px rgb(15 30 44 / 24%),
    inset 0 0 0 5px rgb(246 231 130 / 34%);
  touch-action: none;
  transform:
    translate(-50%, -50%)
    translate(var(--joystick-x), var(--joystick-y));
  transition:
    background 170ms ease,
    box-shadow 170ms ease,
    transform 110ms ease-out;
}

.pan-joystick span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow:
    0 -10px 0 -3px currentColor,
    10px 0 0 -3px currentColor,
    0 10px 0 -3px currentColor,
    -10px 0 0 -3px currentColor;
}

.pan-joystick:hover,
.pan-joystick:focus-visible,
.pan-joystick.is-dragging {
  background: var(--museum-limon);
  box-shadow:
    0 10px 22px rgb(15 30 44 / 30%),
    inset 0 0 0 5px rgb(255 253 245 / 38%);
}

.pan-joystick.is-dragging {
  transition: background 120ms ease, box-shadow 120ms ease;
}

@media (max-width: 560px) {
  .story-ribbon {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    grid-template-columns: 44px 1px minmax(0, 1fr) 1px 44px 1px 44px;
    min-height: 58px;
    margin: 0;
    padding: 4px;
    border-radius: 18px;
  }

  .story-ribbon-step {
    min-width: 44px;
    min-height: 48px;
  }

  .story-ribbon-current {
    grid-template-columns: 48px minmax(0, 1fr);
    padding-right: 7px;
  }

  .story-ribbon-thumb.stop-thumb,
  .story-ribbon-preview {
    --ribbon-thumb-width: 48px;
  }

  .story-ribbon-thumb.stop-thumb {
    width: 48px;
    height: 40px;
  }

  .story-ribbon-preview {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .story-ribbon-copy strong {
    font-size: 0.82rem;
  }

  .story-ribbon-copy span {
    font-size: 0.57rem;
  }

  .view-wheel-toggle {
    width: 44px;
    height: 48px;
    border-radius: 12px;
  }

  .view-wheel-panel {
    right: -49px;
    bottom: 62px;
  }
}

@media (max-width: 390px) {
  .story-ribbon-current {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .story-ribbon-thumb.stop-thumb {
    width: 42px;
    height: 38px;
  }

  .story-ribbon-preview {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .story-ribbon-copy strong {
    font-size: 0.76rem;
  }

  .view-wheel-panel {
    right: -47px;
    gap: 5px;
    padding: 6px;
  }

  .pan-wheel {
    width: 132px;
    height: 132px;
    flex-basis: 132px;
  }

  .pan-up,
  .pan-down {
    left: 44px;
  }

  .pan-right,
  .pan-left {
    top: 44px;
  }
}

/* --------------------------------------------------------------------------
   Build 08 fine-interface pass
   One environment system now coordinates every visitor-facing control.
   Visited marks are quiet cancellations rather than completion scores.
   -------------------------------------------------------------------------- */

body .settings-toggle {
  width: 52px;
  min-width: 52px;
  justify-content: center;
  padding-inline: 0;
}

body .settings-toggle .settings-mark {
  width: 24px;
  height: 20px;
}

body .menu-toggle,
body .settings-toggle,
body .tour-menu,
body .story-ribbon,
body .museum-dialog[data-floating-panel],
body .story-dialog,
body .welcome-dialog {
  zoom: var(--hycfm-interface-scale, 1);
}

.menu-panel {
  margin-right: -14px;
  padding-right: 14px;
  scrollbar-gutter: stable;
}

.menu-panel::-webkit-scrollbar {
  width: 9px;
}

.menu-panel::-webkit-scrollbar-track {
  background: transparent;
}

.menu-panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
  background-color: rgb(248 245 229 / 52%);
}

.stop-button:hover .stop-frank,
.stop-button[aria-current="true"] .stop-frank,
.story-card:hover .story-frank,
.story-card:focus-visible .story-frank {
  color: var(--museum-blue-deep);
}

body:not([data-environment="night"]) .header-button {
  color: var(--museum-blue-deep);
  border-color: rgb(59 94 134 / 42%);
  background: rgb(255 253 245 / 92%);
  box-shadow: 0 10px 34px rgb(19 34 50 / 14%);
}

body:not([data-environment="night"]) .settings-mark i::after {
  background: var(--museum-cream);
}

body:not([data-environment="night"]) .header-button:hover,
body:not([data-environment="night"]) .header-button:focus-visible {
  color: var(--museum-ink);
  border-color: var(--museum-orange);
  background: var(--museum-limon);
}

body:not([data-environment="night"]) .settings-toggle:hover .settings-mark i::after,
body:not([data-environment="night"]) .settings-toggle:focus-visible .settings-mark i::after {
  background: var(--museum-limon);
}

body:not([data-environment="night"]) .tour-menu {
  color: var(--museum-blue-deep);
  border-right-color: rgb(59 94 134 / 34%);
  background:
    radial-gradient(circle at 8% 5%, rgb(246 231 130 / 28%), transparent 30%),
    linear-gradient(145deg, rgb(255 253 245 / 99%), rgb(248 245 229 / 98%));
  box-shadow: 20px 0 70px rgb(17 32 47 / 20%);
}

body:not([data-environment="night"]) .tour-menu .eyebrow,
body:not([data-environment="night"]) .story-group-title {
  color: var(--museum-orange);
}

body:not([data-environment="night"]) .tour-menu .icon-button {
  color: var(--museum-blue-deep);
  border-color: rgb(59 94 134 / 30%);
}

body:not([data-environment="night"]) .tour-menu .icon-button:hover,
body:not([data-environment="night"]) .tour-menu .icon-button:focus-visible {
  color: var(--museum-cream);
  border-color: var(--museum-blue-deep);
  background: var(--museum-blue-deep);
}

body:not([data-environment="night"]) .menu-tabs {
  border-color: rgb(59 94 134 / 22%);
  background: rgb(59 94 134 / 7%);
}

body:not([data-environment="night"]) .menu-tabs button {
  color: var(--museum-blue-deep);
}

body:not([data-environment="night"]) .menu-tabs button[aria-selected="true"] {
  color: var(--museum-cream);
  background: var(--museum-blue);
}

body:not([data-environment="night"]) .menu-intro,
body:not([data-environment="night"]) .story-note {
  color: var(--museum-blue-deep);
}

body:not([data-environment="night"]) .stop-button,
body:not([data-environment="night"]) .story-card {
  color: var(--museum-blue-deep);
  border-color: rgb(59 94 134 / 28%);
  background: rgb(255 253 245 / 72%);
}

body:not([data-environment="night"]) .stop-button:hover,
body:not([data-environment="night"]) .stop-button[aria-current="true"],
body:not([data-environment="night"]) .story-card:hover,
body:not([data-environment="night"]) .story-card:focus-visible {
  color: var(--museum-ink);
  border-color: var(--museum-orange);
  background: var(--museum-limon);
}

body:not([data-environment="night"]) .stop-frank,
body:not([data-environment="night"]) .story-frank {
  color: var(--museum-orange);
}

body:not([data-environment="night"]) .story-group-title small {
  border-color: rgb(206 87 44 / 58%);
}

body:not([data-environment="night"]) .menu-panel {
  scrollbar-color: var(--museum-blue) transparent;
}

body:not([data-environment="night"]) .menu-panel::-webkit-scrollbar-thumb {
  background-color: rgb(59 94 134 / 58%);
}

body:not([data-environment="night"]) .story-ribbon {
  color: var(--museum-blue-deep);
  border-color: rgb(59 94 134 / 36%);
  background: rgb(255 253 245 / 94%);
  box-shadow: 0 16px 48px rgb(15 30 44 / 18%);
}

body:not([data-environment="night"]) .story-ribbon-step,
body:not([data-environment="night"]) .view-wheel-toggle {
  color: var(--museum-blue-deep);
}

body:not([data-environment="night"]) .story-ribbon-step:hover,
body:not([data-environment="night"]) .story-ribbon-step:focus-visible,
body:not([data-environment="night"]) .view-wheel-toggle:hover,
body:not([data-environment="night"]) .view-wheel-toggle:focus-visible,
body:not([data-environment="night"]) .view-wheel-shell.is-open .view-wheel-toggle {
  color: var(--museum-orange);
}

body:not([data-environment="night"]) .story-ribbon-divider,
body:not([data-environment="night"]) .story-ribbon-copy {
  border-color: rgb(59 94 134 / 24%);
}

body:not([data-environment="night"]) .story-ribbon-divider {
  background: rgb(59 94 134 / 24%);
}

body:not([data-environment="night"]) .story-ribbon-current {
  color: var(--museum-blue-deep);
  background: rgb(59 94 134 / 6%);
}

body:not([data-environment="night"]) .story-ribbon-current:hover,
body:not([data-environment="night"]) .story-ribbon-current:focus-visible {
  color: var(--museum-blue-night);
  background: rgb(59 94 134 / 13%);
}

body:not([data-environment="night"]) .story-ribbon-copy span {
  color: var(--museum-blue-deep);
}

body:not([data-environment="night"]) .view-wheel-panel {
  border-color: rgb(59 94 134 / 34%);
  background: rgb(255 253 245 / 94%);
  box-shadow: 0 18px 54px rgb(15 30 44 / 20%);
}

body:not([data-environment="night"]) .pan-wheel {
  border-color: rgb(59 94 134 / 38%);
  background:
    radial-gradient(circle at center, rgb(59 94 134 / 8%) 0 31%, transparent 32%),
    rgb(59 94 134 / 5%);
}

body:not([data-environment="night"]) .pan-direction {
  color: var(--museum-blue-deep);
}

body:not([data-environment="night"]) .pan-direction:hover,
body:not([data-environment="night"]) .pan-direction:focus-visible {
  color: var(--museum-orange);
  background: rgb(246 231 130 / 34%);
}

body:not([data-environment="night"]) #view-zoom-slider::-webkit-slider-runnable-track {
  background: rgb(59 94 134 / 36%);
}

body:not([data-environment="night"]) .pan-joystick {
  color: var(--museum-blue-deep);
  border-color: rgb(59 94 134 / 44%);
  background: var(--museum-limon);
}

body[data-environment="night"] .header-button,
body[data-environment="night"] .story-ribbon,
body[data-environment="night"] .view-wheel-panel {
  color: var(--museum-cream);
  border-color: rgb(246 231 130 / 72%);
  background: rgb(41 72 102 / 92%);
}

body[data-environment="night"] .settings-mark i::after {
  background: var(--museum-blue-deep);
}

body[data-environment="night"] .story-ribbon-step,
body[data-environment="night"] .view-wheel-toggle,
body[data-environment="night"] .pan-direction {
  color: var(--museum-cream);
}

body[data-environment="night"] .stop-frank,
body[data-environment="night"] .story-frank {
  color: var(--museum-limon);
}

body[data-environment="night"] .menu-panel {
  scrollbar-color: var(--museum-limon) transparent;
}

@media (max-width: 720px) {
  body .settings-toggle {
    width: 48px;
    min-width: 48px;
    padding-inline: 0;
  }

  body .settings-toggle .settings-mark {
    display: grid;
  }

  html[data-text-size="large"] body .museum-dialog[data-floating-panel] {
    width: 86vw;
    max-width: 86vw;
  }
}

/* Keep the dock control visible at every interface size. These caps follow
   the legacy palette rules so Large mode cannot extend beneath the viewport. */
@media (min-width: 721px) {
  body .museum-palette[data-floating-panel] {
    max-height: 76dvh;
  }
}

@media (max-width: 720px) {
  body .museum-palette[data-floating-panel],
  body .museum-palette.editor-dialog[data-floating-panel],
  body .museum-palette.tool-dialog[data-floating-panel] {
    max-height: 86dvh;
  }
}

body .museum-palette[data-floating-panel] {
  overflow: hidden;
}

body .museum-palette[data-floating-panel] .museum-panel {
  max-height: inherit;
  overflow: auto;
}

body .museum-palette[data-floating-panel] .museum-panel-footer {
  bottom: 0;
}

.story-ribbon[hidden] {
  display: none !important;
}

body .museum-palette[data-floating-panel] .museum-panel-heading {
  position: sticky;
  z-index: 5;
  top: 0;
  padding-block: 4px 6px;
  background: linear-gradient(to bottom, var(--museum-cream) 72%, rgb(248 245 229 / 88%));
}

body[data-environment="night"] .museum-palette[data-floating-panel] .museum-panel-heading {
  background: linear-gradient(to bottom, var(--museum-blue-night) 72%, rgb(22 41 61 / 88%));
}

/* Build 08 · compact Hotspot Editor instrument panel. */
.museum-palette.editor-dialog[data-floating-panel] {
  width: min(372px, calc(100vw - 20px));
}

.editor-dialog.museum-palette .museum-panel {
  padding-inline: 12px;
}

.editor-dialog.museum-palette .museum-panel-heading {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 5px;
}

.editor-dialog.museum-palette .museum-panel-heading h2 {
  font-size: 1.42rem;
}

.editor-dialog.museum-palette .museum-kicker {
  font-size: 0.5rem;
}

.editor-dialog.museum-palette .museum-back.editor-return,
.editor-dialog.museum-palette .museum-close {
  width: 38px;
  height: 38px;
}

.editor-dialog.museum-palette .museum-close {
  font-size: 1.52rem;
  font-weight: 600;
}

.editor-return svg {
  width: 24px;
  height: 24px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.editor-command-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.editor-dialog.museum-palette .editor-context {
  min-width: 0;
  min-height: 35px;
  margin: 0;
  padding: 5px 9px;
}

.editor-dialog.museum-palette .editor-context strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-dialog.museum-palette .editor-tabs {
  gap: 4px;
  margin: 0;
}

.editor-dialog.museum-palette .editor-tabs button {
  min-width: 56px;
  min-height: 35px;
  padding-inline: 10px;
}

.editor-selection-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: end;
  gap: 7px;
  margin-bottom: 7px;
  padding: 7px;
  border: 1px solid rgb(59 94 134 / 12%);
  border-radius: 12px;
  background: rgb(59 94 134 / 4%);
}

.editor-dialog.museum-palette .editor-picker {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}

.editor-dialog.museum-palette .editor-picker select {
  width: 100%;
  min-width: 0;
  min-height: 35px;
}

.editor-readouts {
  grid-template-columns: 1fr;
  gap: 3px;
  margin: 0;
}

.editor-readouts > div {
  min-height: 25px;
  padding: 3px 7px;
  border-radius: 8px;
}

.editor-readouts output,
.editor-adjustment output {
  color: var(--museum-blue-deep);
  font-family: "HYCFM Bernina", Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.editor-adjustments {
  gap: 5px;
}

.editor-adjustment {
  min-height: 60px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 45px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 12px;
}

.editor-axis-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(59 94 134 / 22%);
  border-radius: 10px;
  color: var(--museum-blue-deep);
  background:
    linear-gradient(145deg, rgb(246 231 130 / 72%), rgb(255 253 245 / 72%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 56%);
}

.editor-axis-icon svg {
  width: 31px;
  height: 31px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.editor-axis-icon .axis-guide {
  opacity: 0.42;
  stroke-dasharray: 2 3;
}

.editor-slider-pair {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.editor-adjustment .editor-slider {
  min-width: 0;
  min-height: 24px;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
}

.editor-adjustment .editor-slider--fine {
  width: 76%;
  justify-self: center;
}

.editor-adjustment .editor-slider input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  accent-color: var(--museum-blue);
  cursor: pointer;
}

.editor-adjustment .editor-slider input[type="range"]:disabled {
  cursor: default;
  opacity: 0.45;
}

.editor-adjustment .editor-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgb(41 72 102 / 46%);
}

.editor-adjustment .editor-slider input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgb(41 72 102 / 46%);
}

.editor-adjustment .editor-slider--coarse input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid var(--museum-cream);
  border-radius: 50%;
  background: var(--museum-blue);
  box-shadow: 0 1px 4px rgb(15 30 44 / 32%);
}

.editor-adjustment .editor-slider--coarse input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--museum-cream);
  border-radius: 50%;
  background: var(--museum-blue);
  box-shadow: 0 1px 4px rgb(15 30 44 / 32%);
}

.editor-adjustment .editor-slider--fine input[type="range"]::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -3.5px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--museum-cream);
  border-radius: 50%;
  background: var(--museum-blue);
  box-shadow: 0 1px 3px rgb(15 30 44 / 30%);
}

.editor-adjustment .editor-slider--fine input[type="range"]::-moz-range-thumb {
  width: 7px;
  height: 7px;
  border: 2px solid var(--museum-cream);
  border-radius: 50%;
  background: var(--museum-blue);
  box-shadow: 0 1px 3px rgb(15 30 44 / 30%);
}

.editor-adjustment > output {
  justify-self: end;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.editor-dialog.museum-palette .editor-actions {
  justify-content: center;
  margin-top: 6px;
}

.editor-dialog.museum-palette .museum-panel-footer {
  margin-top: 2px;
}

body[data-environment="night"] .editor-selection-card {
  border-color: rgb(246 231 130 / 12%);
  background: rgb(246 231 130 / 5%);
}

body[data-environment="night"] .editor-axis-icon {
  color: var(--museum-limon);
  border-color: rgb(246 231 130 / 24%);
  background: linear-gradient(145deg, rgb(246 231 130 / 14%), rgb(22 41 61 / 92%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
}

body[data-environment="night"] .editor-readouts output,
body[data-environment="night"] .editor-adjustment output {
  color: var(--museum-cream);
}

body[data-environment="night"] .editor-adjustment .editor-slider input[type="range"]::-webkit-slider-runnable-track {
  background: rgb(246 231 130 / 38%);
}

body[data-environment="night"] .editor-adjustment .editor-slider input[type="range"]::-moz-range-track {
  background: rgb(246 231 130 / 38%);
}

body[data-environment="night"] .tool-dialog.museum-palette #lighting-reset {
  border-color: rgb(246 231 130 / 42%);
  color: var(--museum-cream);
  background: rgb(255 253 245 / 5%);
}

body[data-environment="night"] .tool-dialog.museum-palette #lighting-reset:hover {
  border-color: var(--museum-limon);
  color: var(--museum-blue-deep);
  background: var(--museum-limon);
}

@media (max-width: 420px) {
  .museum-palette.editor-dialog[data-floating-panel] {
    width: min(360px, calc(100vw - 16px));
  }

  .editor-command-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .editor-dialog.museum-palette .editor-tabs button {
    min-width: 52px;
    padding-inline: 8px;
  }

  .editor-selection-card {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .editor-adjustment {
    grid-template-columns: 40px minmax(0, 1fr) 42px;
    gap: 6px;
    padding-inline: 6px;
  }

  .editor-axis-icon {
    width: 38px;
    height: 38px;
  }
}
