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

body {
  background: #e9eef2;
  color: var(--map-ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.app,
.screen {
  min-height: 100svh;
}

.screen.is-active {
  animation: screen-in 700ms var(--ease-out) both;
}

@keyframes screen-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: calc(64px + var(--safe-top));
  padding: calc(14px + var(--safe-top)) max(20px, var(--safe-right)) 10px max(20px, var(--safe-left));
  position: relative;
  z-index: 20;
}

.wordmark {
  color: inherit;
  font-size: clamp(1.04rem, 3.5vw, 1.32rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.language-switch {
  align-items: center;
  display: flex;
  font-size: 0.72rem;
  gap: 2px;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.language-button {
  background: transparent;
  border-radius: 999px;
  min-height: 36px;
  min-width: 34px;
  opacity: 0.48;
  padding: 6px;
}

.language-button.is-active {
  font-weight: 700;
  opacity: 1;
}

/* Location screen */
.map-screen {
  background:
    radial-gradient(circle at 82% 4%, rgba(181, 215, 225, 0.33), transparent 33%),
    linear-gradient(155deg, #fbfcfc 0%, #f3f7f8 56%, #e8eff1 100%);
  color: var(--map-ink);
}

.map-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 14px 18px calc(26px + var(--safe-bottom));
}

.map-intro {
  margin: 12px 4px 22px;
}

.kicker {
  color: var(--map-muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  margin-bottom: 5px;
}

.map-intro h1 {
  font-size: clamp(1.55rem, 7vw, 2.55rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.map-shell {
  display: grid;
  gap: 14px;
}

.location-controls {
  display: grid;
  gap: 12px;
}

.search-form {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(63, 84, 106, 0.08);
  border-radius: var(--radius-small);
  box-shadow: 0 12px 32px rgba(36, 59, 76, 0.08);
  display: grid;
  grid-template-columns: 1fr 48px;
  min-height: 50px;
  overflow: hidden;
}

.search-form input {
  background: transparent;
  border: 0;
  min-width: 0;
  padding: 0 0 0 16px;
}

.search-form input::-webkit-search-cancel-button {
  opacity: 0.55;
}

.icon-button {
  align-items: center;
  background: transparent;
  display: inline-flex;
  justify-content: center;
}

.search-button span {
  border: 1.6px solid var(--map-muted);
  border-radius: 50%;
  height: 15px;
  position: relative;
  width: 15px;
}

.search-button span::after {
  background: var(--map-muted);
  content: "";
  height: 1.6px;
  position: absolute;
  right: -5px;
  top: 11px;
  transform: rotate(45deg);
  width: 7px;
}

.quick-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1.25fr;
}

.soft-button,
.date-control {
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(56, 76, 94, 0.1);
  border-radius: 999px;
  display: flex;
  min-height: 46px;
}

.soft-button {
  gap: 9px;
  justify-content: center;
  padding: 0 14px;
}

.target-icon {
  border: 1.5px solid currentColor;
  border-radius: 50%;
  height: 13px;
  position: relative;
  width: 13px;
}

.target-icon::after {
  background: currentColor;
  border-radius: 50%;
  content: "";
  inset: 3px;
  position: absolute;
}

.date-control {
  gap: 8px;
  justify-content: space-between;
  padding: 0 10px 0 15px;
}

.date-control > span {
  color: var(--map-muted);
  font-size: 0.72rem;
}

.date-control input {
  background: transparent;
  border: 0;
  min-width: 116px;
  width: 100%;
}

.inline-status {
  color: var(--map-muted);
  font-size: 0.72rem;
  min-height: 1.5em;
  padding: 0 3px;
}

.map-canvas {
  background:
    radial-gradient(ellipse at 52% 48%, rgba(169, 206, 227, 0.64) 0 12%, transparent 13%),
    repeating-linear-gradient(26deg, transparent 0 46px, rgba(141, 162, 154, 0.13) 47px 48px),
    repeating-linear-gradient(111deg, transparent 0 66px, rgba(155, 169, 163, 0.12) 67px 68px),
    linear-gradient(145deg, #f8f7ed, #e7f0e8 48%, #eef4f4);
  border: 1px solid rgba(60, 83, 89, 0.1);
  border-radius: var(--radius-medium);
  box-shadow: inset 0 0 80px rgba(91, 119, 120, 0.08), 0 24px 50px rgba(38, 66, 75, 0.08);
  min-height: clamp(300px, 46svh, 520px);
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.map-canvas::after {
  background: linear-gradient(90deg, rgba(255,255,255,.25), transparent 30%, transparent 70%, rgba(255,255,255,.18));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.map-rings {
  border: 1px solid rgba(82, 123, 145, 0.12);
  border-radius: 50%;
  height: 260px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
}

.map-rings::before,
.map-rings::after {
  border: 1px solid rgba(82, 123, 145, 0.1);
  border-radius: inherit;
  content: "";
  inset: 32px;
  position: absolute;
}

.map-rings::after { inset: 76px; }

.lake-shape {
  background: linear-gradient(145deg, #b9d8e9, #91bed8);
  clip-path: polygon(47% 0, 57% 10%, 62% 25%, 57% 40%, 63% 55%, 56% 76%, 48% 100%, 40% 89%, 43% 67%, 36% 48%, 41% 25%);
  filter: drop-shadow(0 8px 13px rgba(66, 121, 147, 0.18));
  height: 72%;
  left: 33%;
  opacity: 0.9;
  position: absolute;
  top: 12%;
  transform: rotate(-7deg);
  width: 36%;
}

.map-road {
  border: solid rgba(202, 180, 140, 0.48);
  border-width: 2px 0 0;
  border-radius: 50%;
  height: 45%;
  position: absolute;
  width: 78%;
}

.map-road--one { left: -8%; top: 26%; transform: rotate(12deg); }
.map-road--two { right: -17%; top: 56%; transform: rotate(-17deg); }

.map-marker {
  height: 38px;
  left: var(--marker-x);
  position: absolute;
  top: var(--marker-y);
  transform: translate(-50%, -100%);
  width: 28px;
  z-index: 3;
}

.map-marker::before {
  animation: marker-ripple 1s var(--ease-out) both;
  background: rgba(236, 99, 88, 0.2);
  border-radius: 50%;
  bottom: -5px;
  content: "";
  height: 28px;
  left: 0;
  position: absolute;
  width: 28px;
}

.map-marker span {
  background: var(--accent);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 8px 18px rgba(90, 49, 45, 0.26);
  height: 24px;
  left: 2px;
  position: absolute;
  top: 1px;
  transform: rotate(-45deg);
  width: 24px;
}

@keyframes marker-ripple {
  from { opacity: 0.8; transform: scale(0.3); }
  to { opacity: 0; transform: scale(1.8); }
}

.map-place-label {
  color: rgba(33, 60, 71, 0.45);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  position: absolute;
}

.map-place-label--otsu { left: 58%; top: 66%; }
.map-place-label--biwa { left: 41%; top: 35%; transform: rotate(-70deg); }

.map-attribution {
  bottom: 9px;
  color: rgba(38, 58, 65, 0.45);
  font-size: 0.57rem;
  position: absolute;
  right: 12px;
}

.selected-location-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(56, 76, 94, 0.08);
  border-radius: var(--radius-small);
  display: flex;
  gap: 13px;
  min-height: 72px;
  padding: 12px 14px;
}

.selected-location-card > div {
  display: grid;
  gap: 2px;
}

.pin-dot {
  background: var(--accent);
  border: 4px solid rgba(239, 100, 91, 0.15);
  background-clip: padding-box;
  border-radius: 50%;
  height: 17px;
  width: 17px;
}

.card-label,
.coordinates {
  color: var(--map-muted);
  font-size: 0.68rem;
}

.selected-location-card strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.primary-button {
  align-items: center;
  background: #162a40;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(18, 36, 56, 0.17);
  color: #fff;
  display: flex;
  font-size: 0.97rem;
  font-weight: 600;
  justify-content: space-between;
  justify-self: center;
  min-height: 50px;
  padding: 0 18px 0 20px;
  width: min(260px, calc(100% - 32px));
}

.primary-button:hover { background: #203a55; }

/* Experience screen */
.scene-screen {
  background: var(--sky-top);
  color: var(--scene-text);
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  position: relative;
  transition: color 180ms linear;
}

.scene-visual {
  background: linear-gradient(to bottom, var(--sky-top) 0%, var(--sky-middle) 48%, var(--sky-horizon) 72%, var(--surface-color) 73%, var(--surface-color) 100%);
  inset: 0;
  overflow: hidden;
  position: absolute;
  transition: background 120ms linear;
  z-index: -2;
}

.scene-images {
  inset: 0;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  transition: opacity 220ms linear;
}

.scene-image {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  position: absolute;
  width: 100%;
  will-change: opacity;
}

.scene-image--day.is-loaded { opacity: var(--day-opacity); }
.scene-image--sunset.is-loaded { opacity: var(--sunset-opacity); }
.scene-image--night.is-loaded { opacity: var(--night-opacity); }

.scene-visual[data-scene-type="water"].is-water-ready .scene-images { opacity: 1; }

.scene-visual[data-scene-type="water"].is-water-ready > .sky-glow,
.scene-visual[data-scene-type="water"].is-water-ready > .stars,
.scene-visual[data-scene-type="water"].is-water-ready > .celestial-orb,
.scene-visual[data-scene-type="water"].is-water-ready > .haze-line,
.scene-visual[data-scene-type="water"].is-water-ready > .mountain,
.scene-visual[data-scene-type="water"].is-water-ready > .scene-surface,
.scene-visual[data-scene-type="water"].is-water-ready > .reflection,
.scene-visual[data-scene-type="water"].is-water-ready > .shore {
  opacity: 0;
}

.sky-glow {
  background: radial-gradient(ellipse at 50% 67%, color-mix(in srgb, var(--sky-horizon) 90%, white) 0%, transparent 42%);
  inset: 0;
  opacity: var(--sky-glow-opacity);
  position: absolute;
}

.stars {
  inset: 0;
  opacity: var(--star-opacity);
  position: absolute;
  transition: opacity 180ms linear;
}

.stars::before,
.stars::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 8vw 8vh rgba(255,255,255,.8), 20vw 16vh rgba(255,255,255,.55), 34vw 7vh rgba(255,255,255,.82), 49vw 22vh rgba(255,255,255,.7), 61vw 11vh rgba(255,255,255,.58), 75vw 20vh rgba(255,255,255,.8), 88vw 9vh rgba(255,255,255,.62), 94vw 29vh rgba(255,255,255,.7), 13vw 34vh rgba(255,255,255,.52), 42vw 36vh rgba(255,255,255,.74), 72vw 39vh rgba(255,255,255,.6);
  content: "";
  height: 2px;
  left: 4vw;
  position: absolute;
  top: 5vh;
  width: 2px;
}

.stars::after {
  box-shadow: 6vw 24vh rgba(255,255,255,.5), 25vw 29vh rgba(255,255,255,.74), 38vw 18vh rgba(255,255,255,.48), 56vw 5vh rgba(255,255,255,.8), 67vw 31vh rgba(255,255,255,.68), 82vw 33vh rgba(255,255,255,.55), 91vw 17vh rgba(255,255,255,.76);
  height: 1px;
  left: 1vw;
  top: 1vh;
  width: 1px;
}

.stars--two { transform: translate(3vw, 5vh) scale(0.8); }

.celestial-orb {
  background: rgba(255, 225, 170, 0.92);
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(255, 190, 120, 0.55);
  height: 28px;
  left: 50%;
  opacity: var(--orb-opacity);
  position: absolute;
  top: var(--orb-y);
  transform: translateX(-50%);
  width: 28px;
}

.haze-line {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.24), transparent);
  height: 1px;
  left: 8%;
  position: absolute;
  top: 69%;
  width: 84%;
}

.mountain {
  bottom: 26%;
  clip-path: polygon(0 100%, 0 68%, 8% 63%, 15% 48%, 23% 70%, 34% 55%, 44% 70%, 57% 36%, 66% 61%, 75% 43%, 84% 64%, 92% 50%, 100% 67%, 100% 100%);
  height: 22%;
  left: -6%;
  position: absolute;
  width: 112%;
}

.mountain--far {
  background: var(--silhouette-far);
  filter: blur(0.4px);
  opacity: 0.82;
  transform: scaleY(0.76);
  transform-origin: bottom;
}

.mountain--near {
  background: var(--silhouette-near);
  clip-path: polygon(0 100%, 0 75%, 9% 62%, 16% 74%, 26% 61%, 35% 75%, 49% 65%, 62% 77%, 74% 55%, 84% 73%, 93% 59%, 100% 70%, 100% 100%);
  opacity: 0.88;
}

.scene-surface {
  background:
    repeating-linear-gradient(174deg, transparent 0 14px, rgba(255,255,255,.05) 15px 16px),
    linear-gradient(to bottom, color-mix(in srgb, var(--surface-color) 82%, var(--sky-horizon)), var(--surface-color));
  bottom: 0;
  height: 27%;
  left: 0;
  position: absolute;
  width: 100%;
}

.reflection {
  background: linear-gradient(90deg, transparent, rgba(255, 215, 174, 0.4), transparent);
  bottom: 2%;
  clip-path: polygon(43% 0, 57% 0, 70% 100%, 28% 100%);
  height: 25%;
  left: 34%;
  opacity: var(--reflection-opacity);
  position: absolute;
  width: 32%;
}

.shore {
  background: var(--shore-color);
  bottom: -2%;
  position: absolute;
}

.shore--left {
  clip-path: polygon(0 22%, 55% 40%, 82% 62%, 100% 100%, 0 100%);
  height: 24%;
  left: 0;
  width: 38%;
}

.shore--right {
  clip-path: polygon(35% 37%, 67% 26%, 100% 12%, 100% 100%, 0 100%);
  height: 31%;
  right: 0;
  width: 45%;
}

.shore--right::before {
  background: color-mix(in srgb, var(--shore-color), white 12%);
  border-radius: 50% 0 0;
  content: "";
  height: 90%;
  position: absolute;
  right: 4%;
  top: -35%;
  transform: rotate(-12deg);
  width: 23%;
}

.field-lines,
.city-silhouette { display: none; }

.scene-visual[data-scene-type="mountain"] .mountain--far {
  clip-path: polygon(0 100%, 0 80%, 10% 56%, 18% 67%, 28% 38%, 38% 64%, 50% 12%, 62% 57%, 72% 32%, 84% 67%, 94% 44%, 100% 60%, 100% 100%);
  height: 38%;
  transform: none;
}

.scene-visual[data-scene-type="mountain"] .mountain--near { height: 27%; }
.scene-visual[data-scene-type="mountain"] .scene-surface { height: 20%; }
.scene-visual[data-scene-type="mountain"] .shore,
.scene-visual[data-scene-type="mountain"] .reflection { display: none; }

.scene-visual[data-scene-type="plain"] .mountain {
  clip-path: polygon(0 100%, 0 79%, 13% 72%, 29% 78%, 44% 70%, 61% 79%, 78% 71%, 100% 76%, 100% 100%);
  height: 17%;
}

.scene-visual[data-scene-type="plain"] .scene-surface {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--surface-color), #74854a 42%), color-mix(in srgb, var(--surface-color), #263f25 46%));
  height: 32%;
}

.scene-visual[data-scene-type="plain"] .field-lines {
  background: repeating-linear-gradient(102deg, transparent 0 8%, rgba(230, 226, 160, .18) 8.4% 9%);
  bottom: 0;
  display: block;
  height: 27%;
  left: 0;
  perspective: 500px;
  position: absolute;
  width: 100%;
}

.scene-visual[data-scene-type="plain"] .shore,
.scene-visual[data-scene-type="plain"] .reflection { display: none; }

.scene-visual[data-scene-type="city"] .mountain { opacity: 0.35; }
.scene-visual[data-scene-type="city"] .scene-surface { height: 24%; }
.scene-visual[data-scene-type="city"] .shore,
.scene-visual[data-scene-type="city"] .reflection { display: none; }
.scene-visual[data-scene-type="city"] .city-silhouette {
  background:
    linear-gradient(90deg,
      transparent 0 3%, var(--shore-color) 3% 9%, transparent 9% 11%, var(--shore-color) 11% 19%, transparent 19% 21%,
      var(--shore-color) 21% 26%, transparent 26% 28%, var(--shore-color) 28% 42%, transparent 42% 45%,
      var(--shore-color) 45% 50%, transparent 50% 52%, var(--shore-color) 52% 67%, transparent 67% 70%,
      var(--shore-color) 70% 77%, transparent 77% 80%, var(--shore-color) 80% 94%, transparent 94%);
  bottom: 19%;
  display: block;
  filter: drop-shadow(0 -8px 12px rgba(255, 190, 92, var(--city-glow-alpha)));
  height: 13%;
  left: 0;
  position: absolute;
  width: 100%;
}

.scene-vignette {
  background:
    linear-gradient(to bottom, rgba(5, 12, 24, 0.16), transparent 25%, transparent 55%, rgba(3, 8, 17, 0.38)),
    linear-gradient(90deg, rgba(3, 8, 17, 0.14), transparent 18%, transparent 82%, rgba(3, 8, 17, 0.18));
  inset: 0;
  position: absolute;
}

.scene-visual[data-scene-type="water"].is-water-ready .scene-vignette {
  background:
    linear-gradient(to bottom, rgba(3, 8, 18, 0.2), transparent 28%, transparent 52%, rgba(3, 8, 18, 0.44)),
    linear-gradient(90deg, rgba(3, 8, 18, 0.16), transparent 20%, transparent 80%, rgba(3, 8, 18, 0.2));
}

.scene-interface {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  position: relative;
  z-index: 1;
}

.topbar--scene {
  color: var(--scene-text);
  text-shadow: 0 1px 14px rgba(0,0,0,.14);
}

.scene-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  padding: clamp(28px, 7vh, 72px) max(18px, var(--safe-right)) calc(18px + var(--safe-bottom)) max(18px, var(--safe-left));
}

.scene-place {
  margin: 0 auto;
  max-width: 680px;
  text-align: center;
  text-shadow: 0 2px 18px rgba(8, 14, 24, 0.2);
}

.phase-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  margin-bottom: 9px;
  opacity: 0.82;
}

.scene-place h1 {
  font-size: clamp(1.72rem, 7.6vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.scene-date {
  font-size: 0.76rem;
  margin-top: 8px;
  opacity: 0.72;
}

.time-focus {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin: auto;
  text-shadow: 0 2px 18px rgba(5, 10, 19, .22);
}

.time-focus span {
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  opacity: 0.76;
}

.time-focus strong {
  font-size: clamp(2.35rem, 13vw, 5.6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.experience-controls {
  margin: 0 auto;
  max-width: 780px;
  width: 100%;
}

.secondary-actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ghost-button {
  align-items: center;
  background: color-mix(in srgb, var(--panel-bg), transparent 32%);
  border: 1px solid color-mix(in srgb, var(--panel-border), transparent 12%);
  border-radius: 999px;
  box-shadow: 0 8px 24px var(--panel-shadow);
  color: var(--scene-text);
  display: inline-flex;
  font-size: 0.7rem;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.ghost-button strong { font-weight: 600; }

.timeline-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-medium);
  box-shadow: 0 18px 48px var(--panel-shadow);
  color: var(--scene-text);
  padding: 15px 15px 12px;
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
  transition: background 160ms linear, color 160ms linear;
}

.timeline-summary {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.timeline-summary > div { display: grid; gap: 1px; }

.timeline-summary span {
  font-size: 0.67rem;
  opacity: 0.72;
}

.timeline-summary strong {
  font-size: 1.18rem;
  font-weight: 500;
}

.details-button {
  align-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid color-mix(in srgb, var(--scene-text), transparent 82%);
  border-radius: 999px;
  display: flex;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
}

.timeline-control {
  height: 61px;
  margin-top: 5px;
  position: relative;
}

#timeline-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 44px;
  left: 0;
  margin: 0;
  position: absolute;
  top: 0;
  touch-action: none;
  width: 100%;
  z-index: 2;
}

#timeline-range::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #ffd76c 0%, #ff8a67 18%, #cd5a97 42%, #6845ba 65%, #2352a7 82%, #0f2973 100%);
  border-radius: 999px;
  height: 14px;
}

#timeline-range::-moz-range-track {
  background: linear-gradient(90deg, #ffd76c 0%, #ff8a67 18%, #cd5a97 42%, #6845ba 65%, #2352a7 82%, #0f2973 100%);
  border: 0;
  border-radius: 999px;
  height: 14px;
}

#timeline-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: color-mix(in srgb, var(--scene-text), white 20%);
  border: 3px solid var(--panel-strong);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  height: 26px;
  margin-top: -6px;
  width: 26px;
}

#timeline-range::-moz-range-thumb {
  background: color-mix(in srgb, var(--scene-text), white 20%);
  border: 3px solid var(--panel-strong);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
  height: 20px;
  width: 20px;
}

.timeline-marks {
  pointer-events: none;
}

.timeline-marks span {
  left: var(--mark-position);
  position: absolute;
  top: 16px;
  transform: translateX(-50%);
  z-index: 3;
}

.timeline-marks i {
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: block;
  height: 4px;
  margin: 4px auto 13px;
  width: 4px;
}

.timeline-marks b {
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}

.timeline-hint {
  font-size: 0.61rem;
  opacity: 0.66;
  text-align: center;
}

.overlay-backdrop {
  background: rgba(4, 9, 18, 0.32);
  inset: 0;
  position: fixed;
  z-index: 29;
}

.scene-selector,
.details-panel {
  background: color-mix(in srgb, var(--panel-strong), transparent 6%);
  border: 1px solid var(--panel-border);
  border-radius: 26px 26px 0 0;
  bottom: 0;
  box-shadow: 0 -24px 70px rgba(3, 8, 18, .28);
  color: var(--scene-text);
  left: 0;
  max-height: min(78svh, 680px);
  overflow-y: auto;
  padding: 8px 20px calc(24px + var(--safe-bottom));
  position: fixed;
  right: 0;
  z-index: 30;
  -webkit-backdrop-filter: blur(28px) saturate(130%);
  backdrop-filter: blur(28px) saturate(130%);
}

.scene-selector:not([hidden]),
.details-panel:not([hidden]) {
  animation: sheet-in 330ms var(--ease-out) both;
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-handle {
  background: color-mix(in srgb, var(--scene-text), transparent 74%);
  border-radius: 999px;
  height: 4px;
  margin: 2px auto 14px;
  width: 40px;
}

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

.panel-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  opacity: 0.64;
}

.panel-heading-row h2 {
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.panel-close {
  background: transparent;
  border-radius: 50%;
  font-size: 1.45rem;
  font-weight: 200;
  height: 44px;
  line-height: 1;
  width: 44px;
}

.scene-options {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, 1fr);
}

.scene-option {
  align-items: center;
  background: color-mix(in srgb, var(--panel-bg), transparent 10%);
  border: 1px solid color-mix(in srgb, var(--scene-text), transparent 88%);
  border-radius: var(--radius-small);
  display: flex;
  gap: 11px;
  min-height: 58px;
  padding: 0 14px;
  text-align: left;
}

.scene-option.is-selected {
  background: color-mix(in srgb, var(--scene-text), transparent 88%);
  border-color: color-mix(in srgb, var(--scene-text), transparent 52%);
}

.scene-option span { font-size: 1.25rem; }
.scene-option b { font-weight: 500; }

.scene-note,
.prototype-note {
  font-size: 0.68rem;
  line-height: 1.6;
  margin-top: 16px;
  opacity: 0.68;
}

.current-phase-card {
  align-items: center;
  background: color-mix(in srgb, var(--scene-text), transparent 90%);
  border-radius: var(--radius-small);
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr auto;
  margin-bottom: 16px;
  padding: 14px;
}

.current-phase-card span { font-size: 0.74rem; }
.current-phase-card strong {
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  grid-row: span 2;
}
.current-phase-card small { opacity: 0.7; }

.details-list {
  display: grid;
}

.details-list > div {
  align-items: baseline;
  border-bottom: 1px solid color-mix(in srgb, var(--scene-text), transparent 90%);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr auto;
  padding: 9px 2px;
}

.details-list dt { font-size: 0.76rem; opacity: 0.76; }
.details-list dd { font-size: 0.8rem; font-variant-numeric: tabular-nums; }

.toast {
  background: rgba(17, 31, 47, .92);
  border-radius: 999px;
  bottom: calc(24px + var(--safe-bottom));
  box-shadow: 0 12px 40px rgba(0,0,0,.2);
  color: #fff;
  font-size: 0.75rem;
  left: 50%;
  max-width: calc(100vw - 36px);
  padding: 10px 16px;
  position: fixed;
  text-align: center;
  transform: translateX(-50%);
  z-index: 60;
}

noscript {
  background: #fff;
  inset: 0;
  padding: 3rem;
  position: fixed;
  z-index: 100;
}
