/* V2C: dedicated Adventure composition; every rule is isolated from approved modes. */
body.game-world.adventure-view{background:#020b19;overflow-x:hidden}
body.game-world.adventure-view:before,body.game-world.adventure-view:after{display:none}
body.game-world.adventure-view>.app{display:none}
body.game-world.adventure-view>.mission-nav{display:none}
body.game-world .adventure-scene{position:relative;isolation:isolate;min-height:100vh;min-height:100dvh;width:100%;overflow:hidden;color:#f0f9ff;font-family:system-ui,Tahoma,sans-serif;background:#030b1e}
.adventure-world,.adventure-world>div{position:absolute;inset:-10px;pointer-events:none}
.adventure-world{z-index:-2;overflow:hidden}
.adventure-cosmos{background:linear-gradient(180deg,#06102190,#030e2080),url('assets/hub-cosmos.webp') 55% center/cover;animation:adventure-cosmos 20s ease-in-out infinite alternate}
.adventure-haze{z-index:3;background:radial-gradient(ellipse at 24% 65%,#68d9ed38,transparent 45%),radial-gradient(ellipse at 90% 18%,#f4be4738,transparent 30%);animation:adventure-haze 9s ease-in-out infinite alternate}
.adventure-particles{z-index:3;background:radial-gradient(circle at 12% 30%,#c6f4ff 0 1px,transparent 2px),radial-gradient(circle at 73% 62%,#fff0b9 0 1px,transparent 2px),radial-gradient(circle at 83% 12%,#cff8ff 0 1px,transparent 2px),radial-gradient(circle at 20% 80%,#ddfdff 0 1px,transparent 2px);animation:adventure-particles 8s ease-in-out infinite alternate}
.adventure-plane{position:absolute;top:0;left:50%;width:calc(100vh * .5625);width:calc(100dvh * .5625);height:100vh;height:100dvh;transform:translateX(-50%);z-index:-1}
.adventure-world-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;animation:adventure-islands 14s ease-in-out infinite alternate}
.adventure-plane:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#020a1880,transparent 18%,transparent 81%,#020a18c7)}
.adventure-route{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:1}
.adventure-route path{stroke:#ffe5a0;stroke-width:4;fill:none;animation:adventure-route-light 5s ease-in-out infinite}
.adventure-route path.route-completed{stroke:#8de5cd}
body.game-world .adventure-head{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 0;padding-top:max(16px,env(safe-area-inset-top));height:auto;min-height:74px;z-index:5;background:none;border:0}
.adventure-brand{display:flex;flex-direction:column;font-style:italic;font-weight:950;line-height:.8;letter-spacing:-1.2px;font-size:27px;text-shadow:0 0 10px #68d8ff65;transform:rotate(-4deg)}
.adventure-brand span{color:#d9f8ff}.adventure-brand b{color:#ffe28c;padding-left:16px;font-size:25px}.adventure-brand small{font-size:12px;font-style:normal;letter-spacing:0;line-height:1.5;text-align:center;color:#b5cbdb;margin-top:5px}
.adventure-state{display:grid;grid-template-columns:1fr;gap:5px;justify-items:center;background:#031529c9;padding:7px 10px;border-radius:2px;box-shadow:inset 0 1px #67bdd459;min-width:116px}
body.game-world.adventure-view #level{font-size:16px;line-height:1.2;color:#e7f7ff;background:#091b31d9;border:0;min-height:36px;width:116px;max-width:116px;padding:4px 3px}
.adventure-hsk-control{position:relative;display:block;width:116px}
body.game-world.adventure-view .adventure-hsk-control #level{color:transparent}
body.game-world.adventure-view .adventure-hsk-control #level option{color:#e7f7ff;background:#06172b}
.adventure-hsk-text{position:absolute;inset:0 18px 0 3px;display:flex;align-items:center;justify-content:center;color:#e7f7ff;font-size:16px;pointer-events:none}
.adventure-hsk-control:after{content:'⌄';position:absolute;right:6px;top:7px;color:#c8eaf5;pointer-events:none}
body.game-world.adventure-view #chapter-progress{font-size:13px;white-space:nowrap;color:#ffe3a3}
.adventure-mission{position:relative;z-index:4;max-width:68%;width:290px;margin:22px 0 0 16px;padding:12px 14px 14px;background:linear-gradient(120deg,#061b36f2,#051328d4);clip-path:polygon(12px 0,100% 0,100% calc(100% - 16px),calc(100% - 16px) 100%,0 100%,0 12px);box-shadow:inset 0 1px #74d5f3,inset 0 -1px #71cbe8}
.adventure-eyebrow{font-size:13px;color:#ffe3a3;font-weight:650;letter-spacing:.3px}
body.game-world .adventure-destination{font-size:clamp(25px,7vw,33px);line-height:1.2;font-weight:800;margin:8px 0;color:#f5fbff;text-shadow:0 0 9px #73caff45;overflow-wrap:anywhere}
.adventure-rule{font-size:14px;line-height:1.5;color:#b9dfef;margin:0}
body.adventure-map .adventure-mission{margin-top:16px;padding:10px 12px;max-width:64%}
body.game-world.adventure-map .adventure-destination{font-size:29px;line-height:1.15;margin:6px 0}
body.game-world.adventure-view #chapters{position:absolute;inset:0;display:block;margin:0;padding:0;background:none;border:0;z-index:2;pointer-events:none}
body.game-world.adventure-view #chapters .chapter{position:absolute;left:var(--route-x);top:var(--route-y);transform:translate(-50%,-50%);pointer-events:auto;width:48px;height:48px;min-width:48px;min-height:48px;max-width:none;padding:0;border-radius:50%;background:#051e36db;border:1px solid #67cdea;box-shadow:inset 0 0 12px #49b9eb69,0 0 8px #2ba6d57a;color:#d3f6ff;overflow:visible;text-align:center;opacity:1;font:inherit}
body.game-world.adventure-view #chapters .chapter:before{content:attr(data-route-step);font-size:20px;line-height:1;display:grid;place-items:center;position:absolute;inset:0}
body.game-world.adventure-view #chapters .chapter-icon,body.game-world.adventure-view #chapters .chapter small{display:none}
body.game-world.adventure-view #chapters .chapter strong{position:absolute;left:50%;top:calc(100% + 6px);transform:translateX(-50%);display:block;font-size:12px;font-weight:650;line-height:1.25;min-width:84px;max-width:120px;padding:4px 6px;border-radius:3px;background:#020e22d9;white-space:normal;text-shadow:0 1px 2px #00101f}
body.game-world.adventure-view #chapters .chapter.selected{width:78px;height:60px;border:2px solid #ffe49a;background:#523808d6;box-shadow:inset 0 0 22px #ffbd4155,0 0 9px #ffbf52c0;color:#ffebb3}
body.game-world.adventure-view #chapters .chapter.selected:before{font-size:29px}
body.game-world.adventure-view #chapters .chapter.completed{border-color:#a5edd3;color:#c7ffe6;background:#06332edb}
body.game-world.adventure-view #chapters .chapter.completed:before{content:'✓'}
body.game-world.adventure-view #chapters .chapter:disabled:not(.selected):not(.completed){color:#a6bdce;background:#041a2ae8;border-color:#5b849a}
body.game-world.adventure-view #chapters .chapter:disabled:not(.selected):not(.completed):before{content:'🔒';font-size:17px}
body.game-world.adventure-view #chapters .chapter.selected:first-child{width:118px;height:72px}
body.game-world.adventure-view #chapters .chapter:focus-visible{outline:3px solid white;outline-offset:5px}
body.game-world.adventure-view #chapters .chapter:nth-child(4) strong,body.game-world.adventure-view #chapters .chapter:nth-child(5) strong{left:-6px;top:50%;transform:translate(-100%,-50%);min-width:74px;max-width:95px}
.adventure-action{position:absolute;z-index:5;left:20px;right:20px;bottom:calc(80px + env(safe-area-inset-bottom));}
body.game-world.adventure-view #start{display:block;width:100%;min-height:56px;margin:0;padding:12px 18px;border:1px solid #ffe4a2;border-radius:0;clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px);background:linear-gradient(180deg,#ffdf78,#f6b844);box-shadow:inset 0 3px #fff1b394,inset 0 -4px #8756124d;color:#241b0b;font-size:21px;font-weight:850;text-align:center}
body.game-world.adventure-view #start:active{background:#ffd974}
.adventure-support{position:absolute;left:0;right:0;bottom:0;z-index:6;min-height:64px;padding:8px 16px calc(8px + env(safe-area-inset-bottom));display:flex;gap:12px;justify-content:space-between;align-items:center;background:linear-gradient(180deg,#020b1c7a,#020b1cee);box-shadow:inset 0 1px #558da540}
body.game-world .adventure-support button,body.game-world .adventure-support select{min-height:44px;padding:8px 12px;font-size:14px;line-height:1.25;background:#061a2ce0;border:0;color:#cde9f5;max-width:100%;border-radius:0}
body.game-world .adventure-support .language-picker{display:block;margin:0;max-width:125px}
body.game-world .adventure-support .language-picker select{width:125px}
.adventure-back{min-width:160px}
.adventure-play{display:none}
/* The campaign's original question and boss controls remain live, staged within the journey. */
body.adventure-playing .adventure-mission{margin-top:12px;max-width:60%;padding:10px 12px}
body.adventure-playing .adventure-destination{font-size:22px;margin:3px 0}
body.adventure-playing .adventure-rule{display:none}
body.adventure-playing .adventure-mission{display:flex;margin:8px 16px 0;padding:3px 0;max-width:none;width:auto;clip-path:none;background:none;box-shadow:none}
body.adventure-playing .adventure-eyebrow{display:none}
body.adventure-playing .adventure-action{display:none}
body.adventure-playing .adventure-play{display:grid;position:relative;margin:10px 16px 86px;grid-template-columns:1fr;gap:8px;z-index:4}
body.game-world.adventure-playing .hud{order:0;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;justify-content:space-between;background:#03172bdf;border:0;padding:8px 12px;border-radius:0;box-shadow:inset 0 1px #9cb9bf4a}
body.game-world.adventure-playing .hud .session-identity{display:none}
body.game-world.adventure-playing .hud small{font-size:12px;line-height:1.2;color:#bdcedc}
body.game-world.adventure-playing .hud strong{font-size:19px;color:#ffe5aa;line-height:1.25}
body.game-world.adventure-playing .hud>div{display:block;min-width:0}
 body.game-world.adventure-playing .hud{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 body.game-world.adventure-playing .hud small{display:block}
body.game-world.adventure-playing .question{min-height:0;order:2;margin:0;padding:14px;border:0;border-radius:0;background:linear-gradient(145deg,#062441f0,#051528db);box-shadow:inset 0 1px #7bd2eb55;color:#f2faff;text-align:center}
body.game-world.adventure-playing .question h1{font-size:clamp(27px,7.5vw,42px);line-height:1.25;margin:5px 0;max-width:100%;overflow-wrap:anywhere}
body.game-world.adventure-playing .prompt-pinyin{margin:3px 0;font-size:16px;line-height:1.3}
 body.game-world.adventure-playing #weapon{display:none}
 body.game-world.adventure-playing #question-label{font-size:14px;color:#c2e7f6}
body.game-world.adventure-playing #field{order:3;min-height:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
body.game-world.adventure-playing #targets{padding:0;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
body.game-world.adventure-playing #targets .target{min-height:106px;padding:19px 10px 12px;border:0;border-radius:0;clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px);background:linear-gradient(150deg,#082744ef,#04152ce8);box-shadow:inset 0 2px #81bfd2,inset 0 -2px #477b91;max-width:100%;color:#f4faff}
body.game-world.adventure-playing #targets .hanzi{font-size:32px;line-height:1.2}
body.game-world.adventure-playing #targets .pinyin{font-size:15px;line-height:1.3;color:#b6dbe7}
body.game-world.adventure-playing #targets .meaning{font-size:19px;line-height:1.4;overflow-wrap:anywhere}
body.game-world.adventure-playing #targets .key{color:#f6d789;font-size:12px}
body.game-world.adventure-playing #targets .correct{background:linear-gradient(140deg,#11553c,#082635);box-shadow:inset 0 2px #b0f6b3}
body.game-world.adventure-playing #targets .wrong{background:linear-gradient(140deg,#5a1b34,#1c193c);box-shadow:inset 0 2px #ffacc5}
body.game-world.adventure-playing .bottom{order:4;padding:6px 8px;border:0;background:#03152bde;min-height:32px;font-size:14px}
body.game-world.adventure-playing #feedback{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
body.game-world.adventure-playing #boss-panel{order:1;margin:0;border:0;background:#031831d9;padding:7px 12px;box-shadow:inset 0 1px #cdb47759;min-height:0}
body.game-world.adventure-playing #boss-avatar{display:none}
body.game-world.adventure-playing #boss-name{font-size:16px}
body.game-world.adventure-playing #boss-stage{font-size:12px;line-height:1.3}
body.game-world.adventure-playing #boss-health{font-size:14px;color:#ffe6af}
body.adventure-playing .adventure-scene[data-campaign-phase="learn"] #boss-panel{display:none}
body.game-world.adventure-playing #overdrive-panel{order:5;padding:8px 10px;border:0;background:#05182ade;font-size:12px}
body.game-world.adventure-playing .arena-foot{order:6;border:0;padding:0;display:flex;gap:8px;flex-wrap:wrap;align-items:center;background:none}
body.game-world.adventure-playing .arena-foot button{min-height:44px;padding:9px 12px;font-size:14px;border:0;border-radius:0;background:#071b2ce8;color:#d6eff9}
body.game-world.adventure-playing #mode-text{display:none}
body.game-world.adventure-playing #combo{font-size:13px;color:#f9d582;margin-left:auto}
body.game-world.adventure-playing #exit:not([hidden]){border:0;min-height:44px;background:#382132;color:#efd6df}
body.adventure-playing #chapters{opacity:.35;pointer-events:none}
body.game-world.adventure-playing #chapters .chapter{pointer-events:none}
body.adventure-playing .adventure-support{justify-content:flex-end;min-height:52px}
body.adventure-results .adventure-action{position:relative;left:auto;right:auto;bottom:auto;margin:28px 16px 92px}
body.game-world.adventure-results #results{display:block;padding:18px;background:#031429e8;border:0;border-radius:0;box-shadow:inset 0 1px #ffe197;max-height:65dvh;overflow:auto}
body.adventure-results #results h2{font-size:24px}
body.adventure-results #results button{min-height:44px}
body.adventure-ambient-paused .adventure-world>div,body.adventure-ambient-paused .adventure-world-art,body.adventure-ambient-paused .adventure-route path{animation-play-state:paused!important}
@keyframes adventure-cosmos{from{transform:translate3d(-4px,3px,0)}to{transform:translate3d(4px,-3px,0)}}
@keyframes adventure-islands{from{transform:translate3d(-2px,2px,0)}to{transform:translate3d(2px,-2px,0)}}
@keyframes adventure-haze{from{opacity:.35;transform:translate3d(-5px,3px,0)}to{opacity:.8;transform:translate3d(5px,-3px,0)}}
@keyframes adventure-particles{from{opacity:.4;transform:translate3d(-5px,6px,0)}to{opacity:.85;transform:translate3d(5px,-6px,0)}}
@keyframes adventure-route-light{50%{opacity:.6}}
@media(min-width:700px) and (min-height:600px){
 .adventure-head{padding:24px 32px 0!important}.adventure-brand{font-size:40px}.adventure-brand b{font-size:36px}
 .adventure-state{grid-template-columns:1fr 1fr;align-items:center;gap:20px;padding:12px 16px}
 .adventure-mission{width:340px;margin-left:32px;margin-top:32px;padding:20px;max-width:48%}.adventure-destination{font-size:38px!important}
 .adventure-action{left:32px;right:32px;bottom:calc(88px + env(safe-area-inset-bottom));max-width:700px;margin:0 auto}
 body.game-world.adventure-view #start{min-height:64px;font-size:25px}
 .adventure-support{padding-left:32px;padding-right:32px}
 body.adventure-playing .adventure-play{max-width:760px;margin:18px auto 86px;padding:0 24px}
 body.game-world.adventure-playing #targets .target{min-height:150px}.adventure-playing .question h1{font-size:42px}
}
@media(min-width:1100px) and (min-height:600px){
 .adventure-plane{left:65%}.adventure-mission{width:390px;max-width:34%;margin-top:70px;padding:24px}
 .adventure-action{left:32px;right:auto;width:370px;bottom:125px;margin:0}
 body.adventure-playing .adventure-play{width:600px;margin:20px 0 86px 32px;padding:0}
 body.adventure-results .adventure-action{width:550px;margin-left:32px}
}
@media(max-height:550px) and (min-width:700px){
 .adventure-plane{left:70%;width:calc(100dvh * 1.05)}.adventure-world-art{object-fit:cover;object-position:center 53%}
 .adventure-head{width:37%;padding:12px 18px 0!important;min-height:56px;gap:6px}.adventure-brand{font-size:22px}.adventure-brand b{font-size:20px}.adventure-brand small{display:none}.adventure-state{min-width:100px;padding:4px 6px}
 .adventure-mission{width:32%;max-width:32%;margin:20px 0 0 18px;padding:10px 12px}.adventure-destination{font-size:25px!important}
 .adventure-action{left:18px;right:auto;width:32%;bottom:82px}.adventure-support{padding:6px 18px;min-height:56px}
 body.game-world.adventure-view #chapters .chapter{top:calc(15% + var(--route-y) * .75);width:44px;height:44px;min-width:44px;min-height:44px}
 body.game-world.adventure-view #chapters .chapter.selected{width:65px;height:48px}
 body.game-world.adventure-view #chapters .chapter strong{font-size:12px;min-width:80px}
 body.game-world.adventure-view #chapters .chapter:not(.selected) strong{display:none}
 .adventure-route{height:75%;top:15%}
 body.adventure-playing .adventure-mission{display:none}
 body.adventure-playing .adventure-play{margin:0 18px 64px;display:grid;grid-template-columns:38% 1fr;gap:6px 18px}
 body.game-world.adventure-playing .hud{grid-column:1;grid-row:1;gap:4px;padding:7px}
 body.game-world.adventure-playing #boss-panel{grid-column:1;grid-row:2}
 body.game-world.adventure-playing .question{grid-column:1;grid-row:3;padding:10px}.adventure-playing .question h1{font-size:25px!important}
 body.game-world.adventure-playing #field{grid-column:2;grid-row:1/4}
 body.game-world.adventure-playing #targets .target{min-height:86px;padding:18px 9px 9px}
 body.game-world.adventure-playing .bottom{grid-column:2;grid-row:4}
 body.game-world.adventure-playing #overdrive-panel{grid-column:1;grid-row:4}
 body.game-world.adventure-playing .arena-foot{grid-column:1/3;grid-row:5}
 body.adventure-playing .adventure-head{width:100%;height:54px;min-height:54px;padding:5px 18px!important}
 body.adventure-playing .adventure-state{display:flex;gap:12px;align-items:center;background:#031529ed}
 body.adventure-playing .adventure-play{margin:0 18px 52px;gap:5px 18px}
 body.game-world.adventure-playing .question{grid-row:2;padding:7px}
 body.game-world.adventure-playing #boss-panel{grid-row:3;padding:5px}
 body.game-world.adventure-playing #targets{gap:8px}
 body.game-world.adventure-playing #targets .target{min-height:76px;padding:12px 9px 8px}
 body.game-world.adventure-playing #targets .hanzi{font-size:26px}
 body.game-world.adventure-playing #targets .pinyin{font-size:13px}
 body.game-world.adventure-playing #overdrive-panel{height:44px;min-height:44px;padding:5px 8px;font-size:11px;line-height:1.2;gap:3px;display:block}
 body.game-world.adventure-playing #overdrive-panel strong{font-size:12px}
 body.game-world.adventure-playing #overdrive-panel>div{display:flex;gap:8px;align-items:center}
 body.game-world.adventure-playing #overdrive-help{font-size:11px;line-height:1.2}
 body.game-world.adventure-playing #overdrive-meter{margin:2px 0 0;height:3px}
 body.game-world.adventure-playing .bottom{padding:5px 8px;min-height:32px}
 body.game-world.adventure-playing #feedback{font-size:12px;line-height:1.3}
 body.game-world.adventure-playing .arena-foot button{min-height:40px;padding:7px 10px}
 body.adventure-playing .adventure-support{min-height:44px;padding:0 18px}
 body.adventure-results .adventure-action{width:70%;margin:12px 18px 74px;}.adventure-results #results{max-height:65dvh}
}
@media(prefers-reduced-motion:reduce){
 body.adventure-view .adventure-world>div,body.adventure-view .adventure-world-art,body.adventure-view .adventure-route path{animation:none!important;will-change:auto}
 body.adventure-view .adventure-scene *{scroll-behavior:auto!important;transition:none!important}
}

/* V4.2D-A: state/feedback/completion accents, with no answer/route geometry
   or new motion. The authoritative controls and result information are reused. */
body.game-world.adventure-playing .adventure-mission{align-items:center;gap:8px}
body.game-world.adventure-playing .adventure-eyebrow{display:block;flex-shrink:0;font-size:12px;line-height:1.3}
body.adventure-playing .adventure-scene[data-campaign-phase="boss"] .adventure-eyebrow{color:#ffe8aa}
body.adventure-playing .adventure-scene[data-campaign-phase="boss"] .question{box-shadow:inset 0 2px #e1bd71,inset 0 -1px #708ca34a}
body.adventure-playing .adventure-scene[data-input-state="feedback"] .bottom{background:#092735;box-shadow:inset 2px 0 #badbe5}
body.adventure-playing .adventure-scene.adventure-answer-correct .bottom{background:#07312f;box-shadow:inset 3px 0 #a4ebc7}
body.adventure-playing .adventure-scene.adventure-answer-wrong .bottom{background:#351b30;box-shadow:inset 3px 0 #f5aac2}
body.adventure-playing .adventure-scene[data-campaign-phase="boss"].adventure-answer-wrong .health{box-shadow:inset 0 -2px #f5aac2}
body.adventure-playing .adventure-scene[data-input-state="feedback"] #next:not([hidden]){background:#d4eab6;color:#142b27;font-weight:700}
body.adventure-results .adventure-scene #results{scroll-padding-block:12px}
body.adventure-results .adventure-scene #results>.eyebrow{display:block;color:#ffe1a0;font-size:14px}
body.adventure-results .adventure-scene #result-title{line-height:1.35;overflow-wrap:anywhere}
body.adventure-results .adventure-scene .result-actions{padding:10px 0;border-block:1px solid #7db5c445}
body.adventure-results .adventure-scene #results-home{background:#0b2b3b;color:#d3e9f1;white-space:normal}
