/* Each route location is tied to a landmark in the local artwork. */
.training-feature .adventure-home:has(.adventure-landscape) { background:#0b191e; }
.training-feature .adventure-home:has(.adventure-landscape) .adventure-landscape {
  isolation:isolate; overflow:hidden; background:linear-gradient(#06141c66,transparent 30%,#0b191e88),var(--route-art) center/100% 100%;
}
.training-feature .adventure-home:has(.adventure-landscape) .adventure-map-nodes:not(:has(>button:nth-of-type(4))) { display:block; inset:0; }
.training-feature .adventure-map-nodes::before { display:none; }
.training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node {
  position:absolute; display:flex; flex-direction:column; gap:3px; width:46%; max-width:190px; min-height:70px; padding:5px; border:0; border-radius:12px;
  background:transparent; box-shadow:none; text-align:center; transform:translate(-50%,-50%); z-index:2;
}
.training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node:nth-of-type(1) { left:26%; top:72%; }
.training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node:nth-of-type(2) { left:75%; top:48%; }
.training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node:nth-of-type(3) { left:34%; top:24%; }
.training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node > span { background:#14282ce6; box-shadow:0 2px 15px #0007; }
.training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node.selected > span { background:#c9996f; color:#102128; box-shadow:0 0 20px #f4c59688; }
.training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node b { font:14px Georgia,serif; background:#102127e6; padding:4px 7px; border-radius:5px; color:#ffeedb; text-shadow:0 1px 3px #000; }
.route-place-name { color:#ead4b8; background:#102127cf; padding:3px 6px; border-radius:4px; font:10px system-ui; }
.training-feature .adventure-level,.training-feature .adventure-xp { z-index:3; position:relative; pointer-events:none; }
.world-effects { position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:0; border-radius:inherit; }
.hut-heading,.hut-scene,.hut-kit { position:relative; z-index:1; }
.world-fx { position:absolute; display:block; pointer-events:none; animation-play-state:paused!important; }
[data-world-scene][data-in-view=true] .world-fx { animation-play-state:running!important; }
:root[data-motion-paused=true] .world-fx { animation-play-state:paused!important; }
.mountain-clouds { top:12%; left:-20%; width:130%; height:20%; background:radial-gradient(ellipse at 30% 50%,#e5ebdf99,transparent 48%),radial-gradient(ellipse at 75% 30%,#cee0de80,transparent 42%); animation:cloud-drift 9s linear -6s infinite alternate; }
.valley-mist { top:35%; left:-12%; width:120%; height:18%; background:radial-gradient(ellipse at 30% 65%,#c8d9d5bb,transparent 45%),radial-gradient(ellipse at 74% 55%,#c8d9d599,transparent 42%); animation:mist-drift 7s linear -3s infinite alternate; }
.summit-pennant { top:11%; left:31%; width:24px; height:16px; background:#d5a479; clip-path:polygon(0 0,100% 15%,80% 100%,0 85%); transform-origin:left center; animation:pennant-sway 1.8s ease-in-out infinite alternate; }
.hearth-glow { left:64%; top:32%; width:58%; height:48%; background:radial-gradient(ellipse,#ffaa34bb,transparent 68%); animation:fire-breathe 2.8s ease-in-out infinite alternate; }
.lantern-glow { left:-7%; top:17%; width:30%; height:22%; background:radial-gradient(ellipse,#ffbd4677,transparent 65%); animation:fire-breathe 5.3s ease-in-out infinite alternate-reverse; }
.kettle-steam { left:83%; top:35%; width:17%; height:26%; border-radius:50%; background:radial-gradient(ellipse at 45% 70%,#f5efeaaa,transparent 57%),radial-gradient(ellipse at 65% 30%,#e4ded877,transparent 55%); opacity:.25; animation:steam-rise 3.2s ease-out infinite; }
.steam-one { animation-delay:-1.6s; }
.steam-two { left:87%; animation-delay:-3.9s; }
@keyframes cloud-drift { from { transform:translateX(-14%);opacity:.62; } to { transform:translateX(18%);opacity:.95; } }
@keyframes mist-drift { from { transform:translate(-24%,10%);opacity:.45; } to { transform:translate(26%,-12%);opacity:.85; } }
@keyframes pennant-sway { from { transform:skewY(-18deg) scaleX(.72); } to { transform:skewY(20deg) scaleX(1.12); } }
@keyframes fire-breathe { 0% { opacity:.5;transform:scale(.86); } 28% { opacity:.78; } 50% { opacity:.56;transform:scale(1.2); } 76% { opacity:.9; } 100% { opacity:.62;transform:scale(1.08); } }
@keyframes steam-rise { 0% { opacity:0;transform:translate(0,25%) scale(.65); } 22% { opacity:.7; } 65% { opacity:.4; } 100% { opacity:0;transform:translate(-55%,-110%) scale(1.65); } }
@media(prefers-reduced-motion:reduce) { .world-fx { animation:none!important; } .kettle-steam { opacity:0; } }
@media(max-height:680px) {
 .training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node { min-height:52px; gap:1px; }
 .training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node > span { width:24px;height:24px; }
 .route-place-name { display:none; }
 .training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node b { font-size:12px; }
}
@media(max-height:680px) {
 .training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node { width:42%; }
 .training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node:nth-of-type(2) { left:77%; }
 .training-feature .adventure-map-nodes:not(:has(>button:nth-of-type(4))) .adventure-node:nth-of-type(3) { left:29%; }
}
.training-feature .adventure-map-nodes:has(>button:nth-of-type(4)) .adventure-node {
 display:grid; grid-template-columns:26px minmax(0,1fr); width:100%; min-width:0; max-width:100%; transform:none; gap:4px;
}
.training-feature .adventure-map-nodes:has(>button:nth-of-type(4)) .adventure-node > span { width:26px; height:26px; }
.training-feature .adventure-map-nodes:has(>button:nth-of-type(4)) .adventure-node b { min-width:0; overflow-wrap:anywhere; }
.training-feature .adventure-map-nodes:has(>button:nth-of-type(4)) .route-place-name { grid-column:1/-1; font-size:9px; }

/* No positional interpolation when the number of stages changes. */
.training-feature .adventure-map-nodes .adventure-node { transition:background-color .18s,border-color .18s; }
/* Shared chapter atmosphere: one palette across outlook, trail and hut. */
:root { --world-light:190,205,197; --world-light-strength:.14; --world-fire-strength:.7; --world-cloud-opacity:.55; }
:root[data-chapter=cut] { --world-light:240,174,100; --world-light-strength:.24; --world-fire-strength:1; --world-cloud-opacity:.45; }
:root[data-chapter=bulk] { --world-light:142,190,223; --world-light-strength:.13; --world-fire-strength:.8; --world-cloud-opacity:.3; }
#hutHome.hut-world::before { content:""; position:absolute; inset:0; pointer-events:none; z-index:0; background:linear-gradient(125deg,rgba(var(--world-light),.08),transparent 70%); }
body[data-screen=home] #home { overflow:hidden; isolation:isolate; background:linear-gradient(#08171b22,#0b191e77),var(--chapter-art) center/cover; }
.home-effects { z-index:0; }
.home-depth { inset:-5px; background:linear-gradient(#06141c08,#0b191e44),var(--chapter-art) center/cover; animation:world-depth 12s linear -8s infinite alternate; }
.home-foreground { left:-8px; right:-8px; bottom:-4px; height:32%; background:linear-gradient(transparent,#07161ccb 95%); clip-path:polygon(0 10%,12% 37%,22% 28%,38% 67%,57% 84%,76% 61%,91% 32%,100% 8%,100% 100%,0 100%); animation:foreground-drift 12s ease-in-out infinite alternate; }
.chapter-light { inset:0; background:radial-gradient(ellipse at 74% 25%,rgba(var(--world-light),var(--world-light-strength)),transparent 65%); animation:world-light 7s ease-in-out infinite alternate; }
.summit-snow { display:none; inset:-35% -20%; background-image:radial-gradient(circle,#f0f7facc 0 2px,transparent 2.8px),radial-gradient(circle,#f0f7fa99 0 1.3px,transparent 2px),radial-gradient(circle,#ffffffaa 0 2.4px,transparent 3px); background-size:73px 109px,113px 157px,167px 131px; background-position:0 0,31px 47px,71px 19px; animation:snow-drift 5s linear infinite; }
:root[data-chapter=bulk] .summit-snow { display:block; }
.hut-effects { opacity:var(--world-fire-strength); }
body[data-screen=home] .landscape { background:none; z-index:1; }
body[data-screen=home] .contour { display:flex; flex-direction:column; gap:8px; color:#c7b99f; }
.start-wordmark { font:30px Georgia,serif; letter-spacing:.22em; color:#eee7d9; text-shadow:0 2px 20px #0008; }
body[data-screen=home] .hero-copy > p:first-child { display:block; margin:0 0 10px; font-size:10px; color:#eed0ab; }
body[data-screen=home] .hero-copy > p:last-child { display:none; }
body[data-screen=home] .hero-copy h1 { font-size:clamp(28px,4.2svh,40px); }
body[data-screen=home] .route-card { background:linear-gradient(100deg,#102127ed,#10212799),var(--route-art) center 48%/cover; border-color:#be9f7277; box-shadow:0 5px 18px #0004,inset 0 1px #fff1; transition:transform .14s, border-color .14s; }
body[data-screen=home] .route-card[data-open=nutrition-continue] { background-image:linear-gradient(100deg,#102127ed,#10212799),var(--hut-art); background-position:center 46%; }
body[data-screen=home] .route-card:active { transform:scale(.99); border-color:#eac093; }
body[data-screen=home] .home-content { z-index:1; }
.training-feature .adventure-landscape .adventure-xp,
.training-feature .adventure-landscape .adventure-level > span:last-child { display:none; }
.training-feature .adventure-landscape .adventure-level { color:#e7ddd0; text-shadow:0 1px 8px #000; }
/* Fast scene arrival, no timer and no blocked controls. */
#home:not([hidden]), #hutHome:not([hidden]), #training-feature:not([hidden]) .adventure-landscape { animation:world-arrive .22s ease-out both; }
@keyframes world-depth { from { transform:translate(-12px,-5px) scale(1.08); } to { transform:translate(12px,7px) scale(1.14); } }
@keyframes foreground-drift { from { transform:translateX(-8px); } to { transform:translateX(8px); } }
@keyframes world-light { from { opacity:.45; } to { opacity:.8; } }
@keyframes snow-drift { from { transform:translate(-24px,-80px);opacity:0; } 15% { opacity:.8; } 85% { opacity:.8; } to { transform:translate(40px,100px);opacity:0; } }
@keyframes world-arrive { from { opacity:.65; } to { opacity:1; } }
@media(max-height:680px) { body[data-screen=home] .contour { padding:8px 20px; gap:4px; } .start-wordmark { font-size:23px; } body[data-screen=home] .contour > span:last-child { display:none; } body[data-screen=home] .hero-copy > p:first-child { font-size:9px; margin-bottom:5px; } }
@media(prefers-reduced-motion:reduce) {
 .world-fx, #home:not([hidden]), #hutHome:not([hidden]), #training-feature:not([hidden]) .adventure-landscape { animation:none!important; }
 body[data-screen=home] .route-card { transition:none; }
 body[data-screen=home] .route-card:active { transform:none; }
 .summit-snow { display:none!important; }
}

/* Visible localized flames and vapor; controls remain above decorative layers. */
.hearth-flame { left:86%; top:48%; width:24px; height:46px; border-radius:70% 30% 60% 35%; background:radial-gradient(ellipse at 50% 85%,#fff1ba 3%,#ffcb72 26%,#e9812888 57%,transparent 72%); transform-origin:50% 100%; animation:flame-sway 1.8s ease-in-out infinite alternate; }
.flame-two { left:90%; top:48.5%; height:36px; animation-delay:-.9s; }
@keyframes flame-sway { 0% { transform:scale(.7,.72) rotate(-12deg);opacity:.7; } 45% { transform:scale(1.15,1.3) rotate(9deg);opacity:1; } 100% { transform:scale(1,.9) rotate(-3deg);opacity:.8; } }
:root[data-chapter=cut] .mountain-clouds { top:24%; }
:root[data-chapter=recomp] .valley-mist { opacity:.5; }
@media(prefers-reduced-motion:reduce) { .hearth-flame { animation:none!important;opacity:.6; } }

.route-effects .valley-mist { top:44%; height:23%; background:radial-gradient(ellipse at 28% 48%,#dce5e6dd,transparent 43%),radial-gradient(ellipse at 76% 72%,#dce5e6bb,transparent 37%); }

/* Static presentation requested: remove atmospheric overlays entirely. */
.world-effects { display:none!important; }
*, *::before, *::after {
 animation:none!important;
 transition:none!important;
 scroll-behavior:auto!important;
}
body[data-screen=home] .route-card:active { transform:none; }

/* The landscape is the training picker; no assumed next workout. */
.training-feature .adventure-home:has(.route-world) { display:flex; flex-direction:column; min-height:520px; }
.training-feature .adventure-home:has(.route-world) .adventure-topbar { display:none; }
.training-feature .adventure-home:has(.route-world) .route-world {
 position:relative; display:grid; grid-template-rows:auto minmax(320px,1fr) auto; flex:1; min-height:520px; width:100%; border-radius:0;
 background:linear-gradient(#07151cdc,transparent 32%,#07151c22 66%,#07151cf2),var(--route-art) center/100% 100%;
}
.training-feature .route-world-heading { padding:16px 20px 6px; color:#efe7d9; text-shadow:0 2px 8px #000; }
.training-feature .route-world-heading small { color:#ecd0a8; font-size:11px; text-transform:uppercase; letter-spacing:.12em; }
.training-feature .route-world-heading h1 { display:block; margin:5px 0; font:28px Georgia,serif; }
.training-feature .route-world-heading p { display:block; max-width:370px; margin:4px 0; color:#e1e4dc; font-size:12px; }
.training-feature .route-world-nodes { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:repeat(4,minmax(68px,1fr)); gap:8px 12px; align-items:center; padding:8px 14px; }
.training-feature .route-world-node { position:relative; display:flex; align-items:center; gap:6px; width:100%; min-width:0; padding:7px; border:1px solid #dfbc8588; border-radius:12px; background:#102126ed; color:#f1e8d9; text-align:left; box-shadow:0 4px 12px #0006; }
.training-feature .route-world-node:nth-child(1) { grid-area:4/1; }
.training-feature .route-world-node:nth-child(2) { grid-area:3/2; }
.training-feature .route-world-node:nth-child(3) { grid-area:2/1; }
.training-feature .route-world-node:nth-child(4) { grid-area:1/2; }
.training-feature .route-world-node:nth-child(5) { grid-area:3/1; }
.training-feature .route-world-node:nth-child(6) { grid-area:2/2; }
.training-feature .route-world-node:nth-child(7) { grid-area:1/1; }
.training-feature .route-number { display:grid; place-items:center; width:26px; height:26px; flex-shrink:0; border:1px solid #d2aa77; border-radius:50%; color:#efd0a3; font-size:11px; }
.training-feature .route-label { display:flex; flex-direction:column; min-width:0; gap:3px; }
.training-feature .route-label strong { font-size:13px; line-height:1.2; overflow-wrap:anywhere; }
.training-feature .route-label small { font-size:10px; color:#ddc6a9; line-height:1.2; }
.training-feature .route-label .route-count { color:#bfcaca; }
.training-feature .route-world-node:focus-visible { outline:3px solid #efd0a3; outline-offset:3px; }
.training-feature .route-world-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; padding:10px 16px 14px; }
.training-feature .route-world-footer .adventure-primary { flex-basis:100%; }
.training-feature .route-menu-button { min-height:44px; padding:8px 10px; background:#102126; border:1px solid #587078; border-radius:8px; font-size:12px; color:#e7dfd0; }
.training-feature .route-settings label { display:grid; gap:6px; margin:14px 0; font-size:13px; }
.training-feature .route-settings input,.training-feature .route-settings select { width:100%; padding:12px; border:1px solid #516369; border-radius:8px; background:#14272d; color:#eee6d9; font-size:16px; }
.training-feature .route-settings p { font-size:13px; color:#bbc8cc; }
.training-feature .adventure-selection .adventure-preview { display:block; }
@media(min-width:500px) { .training-feature .route-world-nodes { padding-left:30px;padding-right:30px;gap:12px 50px; } .training-feature .route-label strong { font-size:16px; } .training-feature .route-label small { font-size:12px; } }
.training-feature .adventure-home.adventure-choosing { background:linear-gradient(#07151c66,#07151cbb),var(--route-art) center/cover; padding:16px; }
.training-feature .adventure-home.adventure-choosing .adventure-selection { background:#102126f2; border:1px solid #bda47c77; border-radius:16px; padding:18px; }
.training-feature .adventure-home.adventure-choosing .adventure-signoff { display:none; }
.training-feature .route-settings-unit { padding-bottom:6px; border-bottom:1px solid #405158; }

/* Two permanent places, independent of the user's number of workouts. */
.training-feature .adventure-home:has(.route-world) { min-height:430px; }
.training-feature .adventure-home:has(.route-world) .route-world { min-height:430px; grid-template-rows:auto minmax(270px,1fr) auto; }
.training-feature .route-hub-places { position:relative; min-height:270px; }
.training-feature .route-hub-place { position:absolute; display:flex; flex-direction:column; align-items:center; gap:6px; width:48%; min-height:108px; padding:10px 2px; background:none; border:0; color:#f4ebda; text-align:center; }
.training-feature .route-hub-training { left:1%; top:55%; }
.training-feature .route-hub-log { right:1%; top:24%; }
.training-feature .route-hub-seal { display:grid; place-items:center; width:44px; height:44px; border-radius:50%; border:1px solid #dfb984; background:#142a30; color:#dfb984; box-shadow:0 4px 14px #0007; }
.training-feature .route-hub-seal svg { width:24px; height:24px; }
.training-feature .route-hub-place strong { padding:6px 10px; border-radius:7px; background:#10252b; font:20px Georgia,serif; box-shadow:0 4px 14px #0005; }
.training-feature .route-hub-place small { background:#10252b; color:#ddc6a8; padding:3px 6px; border-radius:4px; font-size:11px; }
.training-feature .route-world-footer { justify-content:center; }
.training-feature .route-training-list { display:grid; gap:8px; margin:18px 0; }
.training-feature .route-training-option { display:flex; flex-direction:column; gap:4px; width:100%; padding:13px 14px; background:#1a3037; border:1px solid #51676a; border-radius:10px; color:#eee5d6; text-align:left; min-height:60px; }
.training-feature .route-training-option span { font-size:12px; color:#bac8ca; }
@media(max-width:350px) { .training-feature .route-hub-place strong { font-size:18px; padding:6px 8px; } }

/* Keep the hall as a full scene when opening the workout selection. */
#workspace:has(.training-feature:not([hidden]) .route-training-picker),
.training-feature:has(.route-training-picker),
.training-feature:has(.route-training-picker) #root,
.training-feature .app-shell:has(.route-training-picker),
.training-feature .app-content:has(.route-training-picker) {
 height:100%; min-height:0; padding:0;
}
.training-feature .adventure-home.adventure-choosing:has(.route-training-picker) {
 min-height:100%; padding:0;
 background:linear-gradient(180deg,#08191c55 0%,#08191c44 20%,#0b1c22dc 55%,#0b1c22 100%),var(--route-art) center top/cover;
}
.training-feature .adventure-home.adventure-choosing .route-training-picker {
 width:100%; max-width:600px; min-height:100%; margin:0 auto; padding:16px 22px 24px;
 border:0; border-radius:0; background:none; box-shadow:none;
}
.training-feature .route-training-picker .adventure-back { margin:0 0 26px; color:#e1e8e3; text-shadow:0 2px 8px #000; }
.training-feature .route-training-picker .adventure-kicker { margin:0 0 10px; color:#efd0a3; font-size:11px; letter-spacing:.2em; text-shadow:0 2px 8px #000; }
.training-feature .route-training-picker h1 { font-size:clamp(30px,8vw,42px); line-height:1.1; margin:0 0 14px; color:#fff2df; text-shadow:0 2px 16px #000; }
.training-feature .route-training-picker > p:not(.adventure-kicker) { max-width:290px; margin:0 0 26px; font-size:14px; line-height:1.5; color:#e0e6e1; text-shadow:0 2px 8px #000; }
.training-feature .route-training-list { counter-reset:training; gap:12px; margin:0 0 20px; }
.training-feature .route-training-option {
 position:relative; counter-increment:training; justify-content:center; min-height:88px; padding:18px 36px 18px 66px;
 background:linear-gradient(115deg,#243a3eef,#10262bef); border:1px solid #bfa07880; border-radius:14px;
 box-shadow:0 6px 18px #0003,inset 0 1px #ffe9c512;
}
.training-feature .route-training-option::before { content:counter(training,decimal-leading-zero); position:absolute; left:16px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:34px; height:40px; border:1px solid #c5a57b88; border-radius:17px 17px 10px 10px; color:#e8c397; font:16px Georgia,serif; }
.training-feature .route-training-option::after { content:'›'; position:absolute; right:16px; top:50%; transform:translateY(-50%); color:#d5af80; font:26px Georgia,serif; }
.training-feature .route-training-option strong { font-size:17px; line-height:1.3; overflow-wrap:anywhere; }
.training-feature .route-training-option span { font-size:12px; line-height:1.4; color:#bdccca; }
.training-feature .route-training-option:focus-visible { outline:2px solid #f1cea0; outline-offset:3px; }
.training-feature .route-training-option:active { background:#30484b; border-color:#f1cea0; }
.training-feature .route-training-picker > .adventure-secondary { margin:0; min-height:48px; background:#10262bb3; border-color:#81918b55; font-size:13px; }
@media(max-width:350px) {
 .training-feature .adventure-home.adventure-choosing .route-training-picker { padding:12px 16px 20px; }
 .training-feature .route-training-option { padding-left:60px; }
}
