:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #101e2b;
  color: #fff7e7;
  --gold: #ffd888;
  --ink: #172833;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 75% 4%, #264454, transparent 56%), #101e2b; }
main { width: min(1120px, 94%); margin: auto; padding: 1.5rem 0 .5rem; }
header, footer { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
h1, h2 { font-family: Georgia, serif; margin: .2em 0; font-weight: normal; }
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1; }
.eyebrow { color: var(--gold); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0; }
#countdown { color: #d3e6ee; font-size: clamp(1.05rem, 2.5vw, 1.35rem); margin: .55rem 0 .9rem; }
button { font: inherit; font-weight: 650; color: inherit; background: #223b47; border: 1px solid #75929e; border-radius: .65rem; padding: .55rem .85rem; cursor: pointer; }
button:hover { background: #365764; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.forest { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #668795; border-radius: 1.35rem; padding: 1.5rem clamp(.35rem, 4vw, 4rem); background: linear-gradient(155deg, #224858, #315c65 45%, #99b5bd 180%); }
.landscape { position: absolute; inset: 0; pointer-events: none; z-index: -1; display: flex; justify-content: space-around; color: #fff0ae; font-size: 1.5rem; padding-top: .2rem; background: radial-gradient(circle, #e1f6ff90 0 1px, transparent 2px) 7px 4px / 39px 47px, repeating-linear-gradient(130deg, transparent 0 40px, #acdfed12 40px 42px, transparent 42px 90px); }
.landscape span:nth-child(3) { font-size: 2rem; }
#trail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem clamp(.05rem, 1.5vw, 1rem); }
.step { position: relative; justify-self: center; display: grid; place-items: center; align-content: center; min-height: 70px; width: min(100%, 92px); padding: .15rem 0; border-radius: 55% 52% 46% 44%; border: 1px solid #d5e6e2; box-shadow: 0 4px 0 #12263155; color: var(--ink); background: #d5e8e9; line-height: 1.05; }
.step:not(:nth-child(6n))::after { content: ''; pointer-events: none; position: absolute; z-index: -1; left: 80%; width: clamp(10px, 9vw, 100px); border-top: 3px dotted #e8f4ee99; }
.step .number { font-size: clamp(1.2rem, 3.5vw, 2rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.step .mark { font-size: .95rem; min-height: 1.2rem; padding-top: .2rem; }
.step.task { background: #ffe3a3; border-color: #fff2ca; }
.step.locked { background: #e2dcc8; }
.step.today { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 24px #ffd483; }
.step.goal { background: #254d39; color: #fff5d5; border-color: #e7cd84; }
.step:hover { filter: brightness(1.09); }
footer { margin-top: .75rem; color: #d3e6ee; }
#notice { margin: .5rem 0 0; min-height: 1.4em; color: var(--gold); }
dialog { width: min(94vw, 680px); max-height: 92vh; overflow: auto; padding: 0; border: 1px solid #ccaf70; border-radius: 1.4rem; background: #fff6e3; color: #172833; box-shadow: 0 16px 70px #0006; }
dialog::backdrop { background: #061521c9; }
.card { position: relative; text-align: center; padding: 1.4rem clamp(1rem, 5vw, 3rem); }
.card .eyebrow { color: #705127; }
.close { position: absolute; top: .55rem; right: .6rem; padding: .12rem .6rem; font-size: 1.45rem; }
.card button { color: white; }
.card button:focus-visible { outline-color: #1b595f; }
h2 { font-size: clamp(1.75rem, 6vw, 3rem); }
#door-icon { font-size: clamp(2.5rem, 9vw, 4.5rem); line-height: 1.1; margin: .35rem 0; }
#instruction { font-size: clamp(1.3rem, 4vw, 2.1rem); line-height: 1.3; margin: .65rem 0 1rem; text-wrap: pretty; }
#feedback { font-weight: 700; margin: .5rem 0; }
#feedback:empty, #activity:empty { display: none; }
.actions { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; margin: .55rem auto; max-width: 22rem; }
.tiles button, .tiles span { display: grid; place-items: center; padding: .25rem; min-height: 2.6rem; font-size: 1.65rem; background: #dfece7; color: #172833; border-radius: .5rem; }
.timer { display: block; font-size: 2rem; font-variant-numeric: tabular-nums; margin: .3rem; }
@media (max-width: 520px) {
  main { width: 96%; }
  header { align-items: flex-start; }
  .step { min-height: 53px; width: min(92%, 74px); }
  footer { align-items: flex-start; font-size: .9rem; }
}
.forest { padding-top: 2.45rem; padding-bottom: 1.65rem; }
.pines { z-index: -1; position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pines::after { content: ''; position: absolute; background: #d3e8e43d; border-radius: 50%; inset: auto -15% -36% -15%; height: 56%; transform: rotate(-6deg); }
.pines i { position: absolute; bottom: -5%; left: var(--x); width: var(--size); height: calc(var(--size) * 1.5); background: linear-gradient(150deg, #aacdcd9c, #183d456b 55%, #102d3aab); clip-path: polygon(50% 0, 68% 34%, 59% 34%, 80% 56%, 69% 55%, 100% 83%, 56% 80%, 56% 100%, 44% 100%, 44% 80%, 0 83%, 31% 55%, 20% 56%, 41% 34%, 32% 34%); }
.pines i:nth-child(1) { --x: -4%; --size: 25%; }
.pines i:nth-child(2) { --x: 12%; --size: 15%; }
.pines i:nth-child(3) { --x: 29%; --size: 20%; }
.pines i:nth-child(4) { --x: 57%; --size: 13%; }
.pines i:nth-child(5) { --x: 69%; --size: 18%; }
.pines i:nth-child(6) { --x: 84%; --size: 24%; }
.step.reverse:not(:nth-child(6n))::after { left: auto; right: 80%; }
.step.turn::after { content: ''; position: absolute; pointer-events: none; z-index: -1; top: 85%; height: 1.5rem; border-left: 3px dotted #e8f4ee99; }

.sound-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .55rem; }
.sound-controls label { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem .5rem; font-weight: 650; }
.sound-controls input { width: clamp(4.5rem, 11vw, 8rem); margin: 0; accent-color: #e7af52; cursor: pointer; }
.volume-value { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }
.sound-controls.inside { justify-content: center; color-scheme: light; }
#pause-audio:disabled { opacity: .55; cursor: default; }
@media (max-width: 520px) {
  header { flex-wrap: wrap; }
  header .sound-controls { justify-content: flex-start; margin-bottom: .75rem; }
}
