.journey {
  --journey-header-height: 68px;
  --forest-scale: 1;
  --tree-offset: 0%;
  --tree-opacity: 1;
  --intro-alpha: 1;
  --host-alpha: 1;
  --host-y: 0px;
  --middle-alpha: 0;
  --arrival-opacity: 0;
  --trail-fill: 0;
  --wind-x: 0px;
  --wind-y: 0px;
  --wind-turn: -30deg;
  position: relative;
  color: #fff5dd;
  background: #293226;
}
.journey-stage {
  position: relative;
  height: calc(100svh - var(--journey-header-height));
  min-height: 420px;
  overflow: hidden;
  isolation: isolate;
}
.journey.is-enhanced { height: 255svh; }
.journey.is-enhanced .journey-stage { position: sticky; top: var(--journey-header-height); min-height: 0; }
.journey-landscape, .journey-shade, .journey-foreground, .trail-leaves { position: absolute; inset: 0; pointer-events: none; }
.journey-landscape { z-index: -3; }
.journey-background {
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
  transform: scale(var(--forest-scale));
  transform-origin: 53% 49%;
}
.journey-foreground { opacity: var(--tree-opacity); }
.journey-foreground img { height: 100%; object-fit: cover; }
.journey-foreground.left { clip-path: inset(0 50% 0 0); transform: translateX(calc(-1 * var(--tree-offset))); }
.journey-foreground.right { clip-path: inset(0 0 0 50%); transform: translateX(var(--tree-offset)); }
.journey-shade {
  z-index: -2;
  background: linear-gradient(90deg,#151e17c7 0%,#1b241b9a 23%,#1a211840 48%,transparent 70%),
              linear-gradient(0deg,#101e17db,transparent 23%,transparent 84%,#171f193b);
}
.journey-intro {
  position: absolute;
  z-index: 2;
  left: max(calc((100% - 1240px) / 2), 7vw);
  top: 48%;
  width: 47%;
  transform: translateY(calc(-50% + var(--intro-shift,0px)));
  opacity: var(--intro-alpha);
  text-shadow: 0 2px 14px #151c17a6;
}
.forest-greeting { display: flex; align-items: center; gap: .7em; font: 650 clamp(.9rem,1.3vw,1.08rem)/1.7 var(--serif); letter-spacing: .1em; }
.forest-greeting::before { content: ""; width: 2.2rem; height: 1px; background: #e8ba74; }
.journey-intro h1 { margin: .13em 0 .16em -.055em; font: 750 clamp(4.25rem,7.8vw,7.35rem)/1.14 var(--serif); letter-spacing: .035em; }
.journey-intro h1 span { letter-spacing: .09em; }
.forest-invite { font-size: clamp(.96rem,1.35vw,1.13rem); font-weight: 540; line-height: 1.8; }
.forest-invite span { display:inline-block; }
.trail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin-top: clamp(14px,2vw,26px); }
.trail-actions a { display: inline-flex; align-items: center; min-height: 46px; font-size: .96rem; font-weight: 720; }
.forest-film-link { gap: .65em; padding: 6px 21px; color: #302822; background: #f5d59a; border: 1px solid #ffdfaa; border-radius: 6px; box-shadow: 0 3px 0 #695035; text-shadow: none; transition: background .2s, transform .18s; }
.forest-film-link:hover { background: #ffdfa7; transform: translateY(-2px); }
.forest-film-link:active { transform: translateY(2px); }
.play-symbol { display: inline-block; width: .65em; height: .78em; background: currentColor; clip-path: polygon(0 0,100% 50%,0 100%); }
.journey-skip { text-decoration: underline; text-decoration-color: #e3c69a; text-underline-offset: .36em; }
.journey :focus-visible { outline: 3px solid #ffe4a3; outline-offset: 4px; }
.forest-host {
  position: absolute;
  z-index: 1;
  bottom: max(90px,12%);
  left: 71%;
  width: min(27vw,40svh,385px);
  transform: translate(-50%,var(--host-y));
  opacity: var(--host-alpha);
  text-align: center;
}
.host-voice { display: block; position: relative; width: 100%; padding: 0; border: 0; background: none; color: #fff5dd; }
.host-voice::before { content: ""; position: absolute; left: 13%; right: 11%; bottom: -1%; height: 9%; border-radius: 50%; background: #211b10ae; filter: blur(6px); transform: rotate(-4deg); }
.host-voice img { position: relative; height: auto; transform-origin: 50% 94%; filter: drop-shadow(3px 4px 3px #201b133a); }
.host-voice.is-speaking img { animation: host-nod .8s ease-out both; }
@keyframes host-nod { 0%,100% { transform: none; } 25% { transform: translateY(-3.5%) rotate(-2.3deg); } 62% { transform: translateY(-.5%) rotate(1.5deg); } }
.voice-label { display: inline-flex; align-items: center; justify-content: center; gap: 7px; position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); border-radius: 20px; padding: 5px 13px; font-size: .85rem; font-weight: 700; line-height: 1.5; background: #23372ded; color: #fff6e3; border: 1px solid #ecd5a3bb; white-space: nowrap; }
.voice-wave { height: 1em; width: 3px; margin: 0 5px; border-radius: 9px; background: #edc98c; position: relative; }
.voice-wave::before,.voice-wave::after { content: ""; position: absolute; width: 3px; height: 55%; border-radius: 9px; background: currentColor; top: 22%; }
.voice-wave::before { left: -5px; }.voice-wave::after { right: -5px; }
.host-speech { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(16rem,42vw); padding: 9px 14px; background: #fff2d9; color: #3a342b; border-radius: 15px 17px 14px 6px; font: 700 clamp(.88rem,1.25vw,1.06rem)/1.55 var(--serif); box-shadow: 0 4px 15px #241a172d; text-wrap: balance; }
.host-speech:empty { visibility: hidden; }
.host-speech::after { content: ""; position: absolute; bottom: -7px; left: 47%; border: 8px solid transparent; border-bottom: 0; border-top-color: #fff2d9; }
.path-whisper { position: absolute; left: 8%; top: 58%; color: #fff4d8; opacity: var(--middle-alpha); font: 680 clamp(1.6rem,3.5vw,3.1rem)/1.55 var(--serif); text-shadow: 0 2px 15px #191c14; pointer-events: none; }
.trail-leaves { z-index: -1; overflow: hidden; }
.trail-leaves i { position: absolute; top: var(--leaf-top); left: var(--leaf-left); width: var(--leaf-width,16px); aspect-ratio: .55; background: linear-gradient(82deg,#a85221 44%,#f3bd5d 48%,#c88030 57%); border-radius: 85% 5% 80% 10%; transform: translate(var(--wind-x),var(--wind-y)) rotate(calc(var(--wind-turn) + var(--leaf-angle,0deg))); opacity: var(--leaf-alpha,.8); }
.trail-leaves i:nth-child(1) { --leaf-top: 8%; --leaf-left: 58%; --leaf-angle: -53deg; }
.trail-leaves i:nth-child(2) { --leaf-top: 38%; --leaf-left: 87%; --leaf-width: 11px; --leaf-angle: 22deg; }
.trail-leaves i:nth-child(3) { --leaf-top: 12%; --leaf-left: 36%; --leaf-width: 10px; --leaf-angle: 112deg; }
.trail-leaves i:nth-child(4) { --leaf-top: 52%; --leaf-left: 60%; --leaf-width: 8px; --leaf-angle: 70deg; }
.trail-leaves i:nth-child(5) { --leaf-top: 28%; --leaf-left: 97%; --leaf-width: 22px; }
.trail-bottom { position: absolute; z-index: 3; inset: auto max(calc((100% - 1240px)/2),5vw) max(12px,env(safe-area-inset-bottom)); display: flex; align-items: end; justify-content: space-between; gap: 16px; pointer-events: none; }
.journey-hint { display: inline-flex; align-items: center; gap: .7em; align-self: center; font-size: .87rem; font-weight: 600; letter-spacing: .08em; text-shadow: 0 1px 8px #182017; }
.journey-hint i { width: .8em; height: 1.35em; border: 1px solid #fff0ce; border-radius: .5em; position: relative; }
.journey-hint i::after { content:""; position:absolute; width:2px; height:4px; top:3px; left:calc(50% - 1px); border-radius:2px; background:#fff0ce; }
.trail-route { display: flex; position: relative; justify-content: space-between; gap: 7px; pointer-events: auto; }
.trail-route::before { content:""; position:absolute; top:11px; height:1px; left:2.1rem; right:2.1rem; background: #d3bc9277; }
.trail-route::after { content:""; position:absolute; top:11px; height:1px; left:2.1rem; right:2.1rem; transform:scaleX(var(--trail-fill)); transform-origin:left; background:#f5d190; pointer-events:none; }
.trail-route button { display: grid; position: relative; z-index:1; grid-template-rows: 19px auto; justify-items:center; align-items:start; min-height:44px; padding:3px 5px; border:0; min-width:4.2rem; background:none; color:#f5ebd6; font-size:.79rem; font-weight:650; text-shadow:0 1px 4px #1c211b; }
.trail-route button::before { content:""; width:8px; height:8px; border-radius:50%; background:#354937; border:1px solid #ddc491; margin-top:4px; }
.trail-route button[aria-current="step"]::before { background:#f7d696; outline:1px solid #edce95; outline-offset:3px; }
.trail-route button[aria-current="step"] { color:#ffe1a8; }
.trail-route button { white-space:nowrap; }
.has-arrived .journey-hint { visibility: hidden; }
.has-arrived .trail-bottom { justify-content: flex-end; }
@media (max-width:760px) {
  .journey { --journey-header-height: 59px; }
  .journey.is-enhanced { height: 235svh; }
  .journey-shade { background: linear-gradient(125deg,#122010b8,transparent 67%),linear-gradient(0deg,#142219e8,transparent 26%,transparent 72%,#222c214a); }
  .journey-intro { left: 6.5%; top: 8%; width: 87%; transform: translateY(var(--intro-shift,0px)); }
  .forest-greeting { font-size: .87rem; }
  .journey-intro h1 { font-size: clamp(3.3rem,13vw,5.4rem); line-height:1.07; margin-block:.16em .18em; }
  .forest-invite { font-size: .94rem; max-width: 20em; }
  .trail-actions { margin-top: 12px; gap: 6px 18px; }
  .trail-actions a { min-height:44px; font-size:.89rem; }
  .forest-film-link { padding-inline:15px; }
  .forest-host { left:69%; bottom:15%; width:min(42vw,26svh); }
  .host-speech { left:38%; max-width:min(48vw,13rem); }
  .path-whisper { top:53%; }
  .trail-bottom { inset-inline:5%; gap:5px; }
  .trail-route { gap:0; }.trail-route button { min-width:3.55rem; padding-inline:3px; }
  .trail-route::after,.trail-route::before { left:1.8rem; right:1.8rem; }
  .journey-hint { letter-spacing:0; font-size:.76rem; gap:.42em; }
}
@media (max-width:480px) and (max-height:690px) {
  .journey-intro { top:5%; }
  .forest-host { width:min(32vw,22svh); left:73%; bottom:16%; }
  .host-speech { left:0; bottom:18%; transform:translateX(-97%); max-width:44vw; }
  .host-speech::after { left:auto; right:-12px; bottom:30%; transform:rotate(-90deg); }
  .journey-intro h1 { font-size:clamp(2.8rem,12vw,3.7rem); }
}
@media (max-width:430px) {
  .trail-bottom { display:grid; justify-items:center; justify-content:stretch; bottom:max(7px,env(safe-area-inset-bottom)); }
  .trail-route { width:min(100%,300px); }
  .trail-route button { flex:1; min-width:0; }
  .trail-route::before,.trail-route::after { left:16.66%; right:16.66%; }
  .journey-hint { position:absolute; left:0; bottom:calc(100% + 10px); }
  .has-arrived .trail-bottom { justify-content:stretch; }
}
@media (max-height:520px) and (orientation:landscape) {
  .journey-stage { min-height:235px; }
  .journey-intro { top:42%; left:5%; width:55%; transform:translateY(calc(-50% + var(--intro-shift,0px))); }
  .journey-intro h1 { margin:4px 0; font-size:clamp(2.2rem,9svh,3.5rem); }
  .journey-intro h1 br { display:none; }
  .forest-greeting,.forest-invite { font-size:.84rem; }
  .trail-actions { margin-top:6px; }.trail-actions a { min-height:44px; }
  .forest-host { width:min(22vw,33svh); bottom:23%; left:76%; }
  .trail-bottom { bottom:3px; }.path-whisper { top:40%; }
}
@media (prefers-reduced-motion:reduce) {
  .journey-background,.journey-foreground,.trail-leaves { transform:none; }
  .trail-leaves,.journey-hint { display:none; }
  .host-voice.is-speaking img { animation:none; }
  .trail-bottom { justify-content:flex-end; }
}
