:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, sans-serif;
  background: #111a13;
  color: #f8f4e6;
  --muted: #e0dfd0;
  --accent: #efd398;
  --line: rgba(247, 241, 217, 0.23);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.6; }
:focus-visible { outline: 2px solid #ffe5a9; outline-offset: 5px; }

.landscape, .scrim { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.landscape { transition: filter 2.8s ease; }
.landscape picture { display: block; width: 100%; height: 100%; }
.landscape img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 50%;
}
.landscape canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rainy .landscape { filter: saturate(0.83) brightness(0.9); }
.scrim {
  background:
    linear-gradient(90deg, rgba(9, 18, 13, 0.90), rgba(10, 20, 13, 0.61) 38%, rgba(12, 21, 14, 0.07) 76%),
    linear-gradient(180deg, rgba(8, 16, 12, 0.65), transparent 26%, transparent 62%, rgba(8, 16, 12, 0.78));
  transition: opacity 850ms ease;
}

.shell {
  width: min(100%, 1650px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 clamp(1.4rem, 5vw, 5.5rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: opacity 650ms ease;
}
.scene-only .shell { opacity: 0; pointer-events: none; }
.scene-only .scrim { opacity: 0; }

@media (hover: hover) and (pointer: fine) {
  .scene-only { cursor: none; }
}
.top, .bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.top { border-bottom: 1px solid var(--line); padding: 1.25rem 0; }
.top-actions { display: flex; align-items: center; gap: 0.7rem; }
.wordmark { display: flex; align-items: center; gap: 0.7rem; font: 1.27rem Georgia, serif; }
.wordmark img { display: block; }
.language {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(19, 31, 22, 0.72);
}
.language button {
  min-width: 42px;
  min-height: 36px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
}
.language button[aria-pressed="true"] { background: #344333; color: #ffe2a9; }
.quiet-button, .about-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.58rem 0.95rem;
  background: rgba(19, 31, 22, 0.72);
  color: #f4f0e3;
  font-size: 0.86rem;
  font-weight: 550;
}
.quiet-button:hover, .about-button:hover { background: #28382b; }
.sound-button { display: inline-flex; align-items: center; gap: 0.4rem; }
.sound-button svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }

.content {
  align-self: center;
  width: min(100%, 44rem);
  padding: clamp(2.7rem, 9vh, 7rem) 0;
  position: relative;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow span[aria-hidden] { width: 19px; height: 1px; background: currentColor; flex: 0 0 auto; }
h1, .closing, .time {
  margin: 0;
  font: 400 clamp(4.1rem, 9.6vw, 9rem) / 1.04 Georgia, "Times New Roman", serif;
  letter-spacing: -0.064em;
}
.closing { font-size: clamp(3.15rem, 7vw, 6rem); letter-spacing: -0.045em; }
.intro {
  max-width: 30ch;
  margin: 1.1rem 0 1.9rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.58;
}
.primary {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--accent);
  color: #1b251a;
  font-size: 0.98rem;
  font-weight: 720;
}
.primary:hover { background: #ffdfa0; }
.primary:active { transform: translateY(1px); }
.primary svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.hint { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }
.time { font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.055em; }
.session-progress {
  display: block;
  width: min(100%, 19rem);
  height: 3px;
  margin: 1.05rem 0 0;
  border: 0;
  border-radius: 5px;
  appearance: none;
  overflow: hidden;
  color: var(--accent);
  background: #5a6657;
}
.session-progress::-webkit-progress-bar { background: #5a6657; }
.session-progress::-webkit-progress-value { background: var(--accent); }
.session-progress::-moz-progress-bar { background: var(--accent); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.end-button { border-radius: 8px; min-height: 54px; padding-inline: 1.1rem; }
.notice { margin: 0.7rem 0 0; color: var(--accent); font-size: 0.88rem; line-height: 1.5; }
.notice:empty { margin: 0; }

.bottom { border-top: 1px solid var(--line); padding: 1.12rem 0 1.25rem; }
.bottom-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.35rem; }
.bottom-actions button { white-space: nowrap; }
.location { display: flex; gap: 0.75rem; align-items: center; }
.scene-number { color: var(--accent); font: 1.45rem Georgia, serif; border-right: 1px solid var(--line); padding-right: 0.75rem; }
.location strong, .location small { display: block; }
.location strong { margin-bottom: 0.12rem; font-size: 0.88rem; }
.location small { color: var(--muted); font-size: 0.77rem; }
.about-button { flex: 0 0 auto; border-color: transparent; background: rgba(19, 31, 22, 0.53); }
.about-button span[aria-hidden] { color: var(--accent); margin-left: 0.18rem; }

dialog {
  width: min(calc(100% - 2rem), 30rem);
  max-height: calc(100% - 2rem);
  padding: 2rem;
  border: 1px solid #62705b;
  border-radius: 16px;
  background: #19271e;
  color: #f8f4e6;
}
dialog::backdrop { background: rgba(8, 14, 10, 0.76); }
dialog h2 { margin: 0; font: 2.2rem / 1.13 Georgia, serif; letter-spacing: -0.045em; }
dialog p:not(.eyebrow) { color: var(--muted); line-height: 1.58; }
dialog p:last-child { margin-bottom: 0; }
dialog a { color: var(--accent); text-underline-offset: 3px; }
.dialog-close { float: right; padding: 0; width: 44px; font-size: 1.5rem; line-height: 1; }

.mixer-panel {
  position: fixed;
  inset: clamp(4.8rem, 12vh, 7rem) clamp(1rem, 5vw, 5.5rem) auto auto;
  width: min(calc(100% - 2rem), 29rem);
  max-height: calc(100dvh - 6.5rem);
  margin: 0;
  padding: 1.45rem;
  box-shadow: 0 18px 56px #070e0a80;
}
.mixer-panel::backdrop { background: rgba(8, 14, 10, 0.26); }
.mixer-panel h2 { padding: 0.2rem 3.2rem 0 0; font-size: clamp(1.7rem, 4vw, 2.2rem); }
.mixer-panel .mixer-intro { margin: 0.5rem 0 1.1rem; font-size: 0.9rem; }
.layer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
.layer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 54px;
  gap: 0.47rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #54614e;
  border-radius: 9px;
  color: #eeebdf;
  background: #213125;
  text-align: left;
  font-size: 0.83rem;
  line-height: 1.22;
}
.layer:hover { background: #2c4030; }
.layer svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.layer::after { content: ''; width: 8px; height: 8px; border: 1px solid #a2ad96; border-radius: 100%; }
.layer[aria-pressed="true"] { color: #ffe0a3; border-color: #ae9563; background: #333b29; }
.layer[aria-pressed="true"]::after { background: #ffe0a3; border-color: #ffe0a3; }
.volume-controls { margin-top: 1.15rem; border-top: 1px solid var(--line); padding-top: 0.95rem; }
.volume-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.85rem; }
.volume-label output { font-variant-numeric: tabular-nums; }
.volume-controls input { display: block; width: 100%; height: 28px; margin: 0.2rem 0 0.5rem; accent-color: var(--accent); }
.mute-button[aria-pressed="true"] { border-color: #ae9563; color: #ffe0a3; }
.credits { color: var(--muted); font-size: 0.87rem; line-height: 1.65; }
.credits summary { cursor: pointer; }

@media (max-width: 600px) {
  .landscape picture { position: absolute; inset: -16% 0; height: auto; }
  .landscape img { object-position: 86% 50%; }
  .scrim {
    background:
      linear-gradient(90deg, rgba(8, 16, 11, 0.80), rgba(10, 18, 13, 0.34)),
      linear-gradient(180deg, rgba(8, 16, 11, 0.62), transparent 32%, transparent 55%, rgba(8, 16, 11, 0.85));
  }
  .top { padding: 0.9rem 0; }
  .top-actions { gap: 0.35rem; }
  .wordmark { gap: 0.42rem; font-size: 1.08rem; white-space: nowrap; }
  .wordmark img { width: 29px; height: 29px; }
  .language button { min-width: 32px; }
  .sound-button { padding-inline: 0.7rem; }
  .bottom { padding: 0.85rem 0 calc(0.9rem + env(safe-area-inset-bottom, 0px)); gap: 0.5rem; }
  .bottom-actions button { padding-inline: 0.55rem; font-size: 0.78rem; }
  .scene-number { font-size: 1.2rem; padding-right: 0.53rem; }
  .location { gap: 0.55rem; }
  .location small { font-size: 0.71rem; }
  .mixer-panel { padding: 1rem; }
}

@media (max-width: 360px) {
  .shell { padding-inline: 1.05rem; }
  .bottom-actions .about-button { max-width: 5.8rem; white-space: normal; line-height: 1.15; }
  h1, .time { font-size: 3.65rem; }
  .eyebrow { font-size: 0.69rem; }
}

@media (prefers-reduced-motion: reduce) {
  .landscape, .scrim, .shell { transition: none; }
}
