
/* REVAO EDU visual adventure upgrade: world map + interactive exploration + rituals */
.world-map{position:relative;min-height:670px;overflow:hidden;border:1px solid #9271bf;border-radius:28px;background:radial-gradient(ellipse at 50% 38%,#38546b75,transparent 52%),radial-gradient(ellipse at 20% 74%,#4830659a,transparent 50%),linear-gradient(180deg,#121a36 0%,#15152d 58%,#0c1021 100%);box-shadow:inset 0 0 100px #0507117a,0 25px 70px #0008;isolation:isolate}
.world-map::before{content:"";position:absolute;inset:0;background-image:radial-gradient(#e6fcffcf 1px,transparent 1px),radial-gradient(#c5a4ffb2 1px,transparent 1px);background-size:88px 88px,147px 147px;background-position:8px 23px,34px 61px;opacity:.5;pointer-events:none;animation:sky-drift 24s linear infinite}
.world-map::after{content:"";pointer-events:none;position:absolute;inset:0;background:linear-gradient(0deg,#0a101fbe 0%,transparent 25%,transparent 75%,#0c1029a6 100%);z-index:1}
@keyframes sky-drift{to{background-position:96px 111px,181px 208px}}
.tree-svg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(85%,690px);height:94%;filter:drop-shadow(0 0 29px #a28ef35e);opacity:.98;z-index:1}
.map-overlay-top{position:relative;z-index:5;display:flex;justify-content:space-between;gap:14px;padding:24px;align-items:flex-start}
.map-overlay-top h1{font-size:clamp(30px,4.3vw,52px);margin:6px 0 10px}.map-overlay-top p{max-width:350px;color:#e0d9f0;font-size:13px}
.map-flair{border:1px solid #9b89be;border-radius:12px;background:#1d1737cf;padding:9px 12px;color:#d9eeff;font:800 11px ui-monospace,monospace;white-space:nowrap}
.map-stops{position:absolute;z-index:4;inset:125px 28px 55px;pointer-events:none}
.map-node{pointer-events:auto;position:absolute;width:clamp(145px,23%,228px);min-height:105px;border:2px solid #bea0dc;border-radius:17px;background:linear-gradient(115deg,#241b3de8,#111b31ed);padding:7px;display:flex;align-items:center;gap:10px;box-shadow:0 15px 35px #0009;backdrop-filter:blur(9px);color:#fff;text-align:left;transform:translate(-50%,-50%);transition:transform .16s,border-color .16s}
.map-node img{flex:none;width:66px;height:84px;border-radius:11px;object-fit:cover;box-shadow:0 0 10px #070c18}
.map-node b{font-size:13px;display:block;line-height:1.15}.map-node small{display:block;font-size:10px;color:#cbbbdc;margin-top:5px;line-height:1.25}
.map-node .map-state{font-size:9px;letter-spacing:.05em;display:block;margin-top:8px;color:#a6f3e3;font-weight:900}
.map-node.available{border-color:#e4bbff;animation:node-glow 2.4s ease-in-out infinite alternate}
.map-node.available:hover{transform:translate(-50%,-50%) scale(1.055);border-color:#92eff2}
.map-node.complete{border-color:#72e7c2;background:linear-gradient(105deg,#193b3add,#161c33e8)}
.map-node.locked{filter:grayscale(1);opacity:.72;border-color:#716584}
.map-node:disabled{cursor:not-allowed}
.map-node[data-n="0"]{left:18%;top:69%}.map-node[data-n="1"]{left:83%;top:66%}.map-node[data-n="2"]{left:23%;top:39%}.map-node[data-n="3"]{left:80%;top:29%}.map-node[data-n="4"]{left:52%;top:8%}
@keyframes node-glow{from{box-shadow:0 11px 30px #0009,0 0 6px #a67bfa4f}to{box-shadow:0 11px 30px #0009,0 0 28px #d6a4fc9e}}
.map-footer{position:absolute;z-index:5;bottom:15px;left:18px;right:18px;display:flex;gap:12px;align-items:center;justify-content:space-between;font:850 12px system-ui;color:#e1e5ff}
.map-footer span{border-radius:12px;padding:9px 12px;background:#141b33cc;border:1px solid #625c95}
.map-view-title{display:flex;align-items:baseline;justify-content:space-between;gap:20px;margin:0 0 20px;flex-wrap:wrap}
.map-view-title h2{font-size:27px;margin:0}
@keyframes floatRune{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-10px) rotate(3deg)}}
.explore-wrap{position:relative;height:360px;border:1px solid #9f80c6;border-radius:24px;overflow:hidden;isolation:isolate;background:#1a1834;box-shadow:0 20px 50px #0007}
.explore-wrap img{display:block;width:100%;height:100%;object-fit:cover;filter:saturate(1.08) brightness(.87)}
.explore-wrap::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#110e2496 0%,transparent 35%,#0c102aae 100%)}
.explore-hotspots{position:absolute;inset:0;z-index:2}
.explore-hotspot{position:absolute;transform:translate(-50%,-50%);width:clamp(58px,8vw,76px);height:clamp(58px,8vw,76px);border-radius:50%;display:grid;place-items:center;border:2px solid #e7d1ff;box-shadow:0 0 0 9px #ac7df63d,0 0 45px #a17af8b7;background:#282048ed;color:#fff;font-size:32px;animation:floatRune 3s ease-in-out infinite}
.explore-hotspot:nth-child(1){left:20%;top:35%}.explore-hotspot:nth-child(2){left:72%;top:26%;animation-delay:.65s}.explore-hotspot:nth-child(3){left:48%;top:74%;animation-delay:1.1s}
.explore-hotspot.found{background:#1f4b45;border-color:#b1ffe2;box-shadow:0 0 0 7px #71e0a831,0 0 20px #82dfc88c}
.explore-hotspot.found::after{content:"✓";position:absolute;right:-6px;top:-8px;background:#a6ffe2;border-radius:50%;color:#173a30;font:bold 12px system-ui;padding:3px 6px}
.explore-panel{display:flex;align-items:flex-start;gap:20px;justify-content:space-between;margin:18px 0 7px;padding:18px 22px;border:1px solid #866da4;border-radius:17px;background:linear-gradient(90deg,#261d42,#161f36)}
.explore-panel strong{display:block;font-size:18px;color:#f2d4ff}.explore-panel p{margin:6px 0 0;font-size:14px;color:#e0d4ee;line-height:1.6}
.explore-count{border:1px solid #8c79b3;border-radius:40px;white-space:nowrap;padding:7px 12px;color:#b6f5ef;font:bold 13px system-ui}
.explore-hint{font-size:13px;color:#c9badc}
.fact-card{transition:border-color .2s,box-shadow .2s,transform .2s}
.fact-card.discovered{border-color:#b9a3e7;box-shadow:0 0 23px #af85eb26}
.fact-card.active{border-color:#8ff0da;transform:translateY(-4px);box-shadow:0 14px 28px #0004}
.fact-card.highlight-fact{cursor:pointer}
.lesson-footer .btn:disabled{opacity:.5;background:#453956;color:#e0ccea}
.quiz-card{position:relative;overflow:hidden;isolation:isolate}
.quiz-card::before{content:"";position:absolute;inset:0 0 auto;height:180px;background:linear-gradient(180deg,#14122740,transparent);pointer-events:none}
.quiz-art{height:205px;position:relative;margin:-15px -15px 23px;overflow:hidden;border-radius:17px;border:1px solid #8268b3;background:#17152e}
.quiz-art img{width:100%;height:100%;object-fit:cover;object-position:center 29%;filter:saturate(.94) brightness(.82)}
.quiz-art:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#1c153014,transparent 48%,#17152bc0)}
.quiz-art .quiz-art-caption{position:absolute;z-index:2;bottom:15px;left:18px;border:1px solid #b6a2d5;background:#1e1733dc;border-radius:12px;padding:8px 14px;font:bold 12px system-ui;color:#efddff}
.view.memory-scene .quiz-card{border-color:#efbde5;box-shadow:0 0 45px #d469bf2b}
.answer{position:relative;box-shadow:inset 0 1px 0 #bba1d219;transition:transform .14s,border-color .14s,background .14s}
.answer:hover:not(:disabled){transform:translateX(5px)}
.answer.right{animation:correct-pulse .35s ease}
@keyframes correct-pulse{50%{box-shadow:0 0 0 9px #85f5bb40}}
.ritual-scene{position:relative;min-height:530px;overflow:hidden;border:1px solid #b193da;border-radius:25px;background:linear-gradient(135deg,#222246,#201633);isolation:isolate;box-shadow:0 23px 65px #0008}
.ritual-scene>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.58) saturate(1.08)}
.ritual-scene::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 50%,transparent 15%,#0b0b20a1 90%),linear-gradient(180deg,#15112c9c 0%,transparent 32%,#10102491 100%)}
.ritual-content{position:relative;z-index:2;min-height:530px;display:flex;flex-direction:column;padding:clamp(19px,3vw,38px)}
.ritual-content h2{font-size:clamp(28px,4.5vw,48px);margin:13px 0}.ritual-prompt{color:#fff;font-size:clamp(16px,2.3vw,24px);font-weight:800;max-width:600px}
.ritual-progress{display:flex;align-items:center;gap:9px;margin:5px 0 18px}
.ritual-progress span{width:36px;height:8px;border-radius:30px;background:#7d688f}
.ritual-progress span.done{background:#8af1d5;box-shadow:0 0 14px #78f7d96b}
.rune-field{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(8px,2vw,22px);align-items:center;justify-items:center;flex:1;max-width:690px;width:100%;margin:auto}
.rune-stone{width:clamp(60px,10vw,100px);height:clamp(75px,12vw,126px);border-radius:50% 50% 35% 35%;display:grid;place-items:center;color:white;font-size:clamp(34px,5.6vw,58px);background:linear-gradient(150deg,#49407da9,#211d45d9);border:2px solid #caa4f1;box-shadow:0 0 22px #c3a0f155,inset 0 0 20px #c5affd29;transform:rotate(var(--tilt,0deg));transition:transform .2s,background .2s;animation:rune-breathe 2.8s ease-in-out infinite alternate}
@keyframes rune-breathe{to{box-shadow:0 0 35px #e4b5ff98,inset 0 0 20px #d7b5fc45}}
.rune-stone:nth-child(2){--tilt:8deg;animation-delay:.5s}.rune-stone:nth-child(3){--tilt:-7deg;animation-delay:.9s}.rune-stone:nth-child(4){--tilt:5deg;animation-delay:1.2s}
.rune-stone:hover:not(:disabled){transform:translateY(-10px) scale(1.07)}
.rune-stone.found,.rune-stone:disabled{border-color:#9dffe0;background:linear-gradient(140deg,#30765e,#194534);animation:none;opacity:1}
.rune-stone.error{border-color:#ffadca;background:#653148}
.ritual-status{min-height:50px;margin-top:20px;padding:12px 16px;background:#1d1938d1;border:1px solid #836ea2;border-radius:14px;font-weight:750;color:#e9ddff}
.ritual-status.good{color:#bbffed;border-color:#7ce3c7}
.ritual-actions{display:flex;justify-content:flex-end;margin-top:17px}
@media(max-width:770px){.world-map{min-height:690px}.map-stops{inset:145px 9px 48px}.map-node{width:45%;min-height:90px;padding:6px}.map-node img{width:54px;height:74px}.map-node[data-n="0"]{left:25%;top:76%}.map-node[data-n="1"]{left:75%;top:76%}.map-node[data-n="2"]{left:23%;top:48%}.map-node[data-n="3"]{left:78%;top:40%}.map-node[data-n="4"]{left:51%;top:15%}.map-flair{display:none}.tree-svg{width:100%;height:94%}.map-overlay-top{padding:18px}.rune-field{grid-template-columns:repeat(3,minmax(0,1fr));max-width:500px}.rune-stone{width:clamp(70px,17vw,103px);height:clamp(86px,21vw,120px)}}
@media(max-width:470px){.world-map{min-height:720px}.map-node{width:46%;min-height:84px;gap:6px;border-radius:12px}.map-node img{width:45px;height:61px}.map-node b{font-size:11px}.map-node small{font-size:9px}.map-node .map-state{font-size:8px}.map-overlay-top h1{font-size:34px}.map-footer span{font-size:10px}.explore-wrap{height:300px}.explore-panel{padding:13px;gap:8px}.explore-panel strong{font-size:15px}.explore-panel p{font-size:12px}.explore-hotspot{font-size:24px}.quiz-art{height:165px}.ritual-content{padding:16px}.ritual-scene,.ritual-content{min-height:580px}.rune-field{gap:12px}.rune-stone{font-size:35px}.ritual-status{font-size:12px}}
@media(prefers-reduced-motion:reduce){.world-map::before,.map-node.available,.explore-hotspot,.rune-stone{animation:none!important}.answer,.map-node,.rune-stone{transition:none!important}}


/* REVAO EDU v2.2: a legible, progressive journey rather than a wall of text. */
.journey-steps{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0 24px}
.journey-steps span{display:inline-flex;align-items:center;gap:8px;background:#211a3b;border:1px solid #8971ac;border-radius:13px;padding:9px 12px;font-weight:750;font-size:13px;color:#f5e8ff}
.journey-steps b{display:grid;place-items:center;width:24px;height:24px;flex:none;border-radius:50%;background:#b08ef0;color:#170e2b}
.fact-card{min-height:148px}
.fact-card.undiscovered{background:linear-gradient(145deg,#211b38,#16182d);border-style:dashed;border-color:#726189}
.fact-card.undiscovered h3{color:#e0d5f4}
.fact-card.undiscovered p{color:#c1b7d4}
.fact-card.discovered{background:linear-gradient(145deg,#242140,#182c37)}
.explore-panel{align-items:center}
.explore-panel p{max-width:65ch}
.explore-count{flex:none}
.map-overlay-top p{font-size:clamp(13px,1.5vw,15px);line-height:1.5;max-width:370px}
.map-node:focus-visible,.explore-hotspot:focus-visible,.rune-stone:focus-visible{outline:3px solid #9cf5ff;outline-offset:4px}
.rune-stone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px 5px;border-radius:26px;min-width:0;line-height:1.1}
.rune-symbol{display:block;font-size:clamp(28px,4.3vw,48px)}
.rune-label{display:block;font:bold clamp(10px,1.2vw,13px)/1.15 system-ui;text-align:center;overflow-wrap:anywhere;max-width:100%}
@media(max-width:470px){
 .journey-steps{gap:7px}
 .journey-steps span{width:100%;padding:8px 10px}
 .rune-field{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .rune-stone{width:100%;max-width:112px;height:110px;transform:none!important;gap:8px;padding:7px 4px}
 .rune-symbol{font-size:32px}
 .rune-label{font-size:11px}
 .ritual-content{padding:15px}
 .ritual-content h2{font-size:clamp(25px,7vw,36px);line-height:1.13}
 .explore-panel{gap:10px;padding:13px;align-items:flex-start}
 .explore-count{padding:5px 8px;font-size:12px}
 .map-overlay-top h1{font-size:30px;margin:4px 0 7px}
 .map-overlay-top p{font-size:12px;max-width:210px}
 .map-node{padding:5px;gap:5px}
 .map-node img{width:39px;height:55px}
 .map-node b{font-size:11px}
 .map-node small{font-size:9px}
 .fact-grid{grid-template-columns:1fr}
 .fact-card{min-height:unset}
}


/* v3: Single-viewport game UI. Only the current scene scrolls when necessary. */
html{height:100%;overscroll-behavior:none}
body{
  height:100vh;height:100dvh;min-height:0;overflow:hidden;overscroll-behavior:none;
  display:flex;flex-direction:column;
}
body>header{flex:0 0 auto;position:relative;z-index:30}
body>header .topbar{
  min-height:56px;flex-wrap:nowrap;gap:10px;padding:6px 0;
}
body>header .brand{min-width:0;flex:0 1 auto}
body>header .brand-name{white-space:normal;font-size:clamp(11px,1.4vw,14px);line-height:1.2}
body>header .brand-name small{font-size:9px}
body>header .hud{flex:0 0 auto;gap:7px;margin-left:auto}
body>header .hud .chip{white-space:nowrap}
body>header .hud-progress{height:3px}
.game-menu-trigger{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-width:48px;min-height:44px;padding:6px 13px;border-radius:12px;
  border:1px solid #9280b8;color:#f7ebff;background:#292044;
  font-size:15px;font-weight:850;
}
.game-menu-trigger:hover,.game-menu-trigger:focus-visible{border-color:#a7eafb;background:#3a305b}
body>main.wrap{
  width:min(1350px,100%);max-width:100%;flex:1 1 0;min-height:0;
  margin:0 auto;padding:10px 14px 12px;overflow:hidden;
}
body>main .view:not([hidden]){
  height:100%;min-height:0;min-width:0;display:flex;flex-direction:column;
  overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:#77628f transparent;
}
body>.rv-hub,body>footer.footer{display:none!important}
body>main .view[hidden]{display:none!important}
#screen-home{overflow:hidden!important;justify-content:center}
#screen-home .home-grid{width:100%;height:100%;min-height:0;margin:0 auto;display:grid;grid-template-columns:1fr .9fr;gap:clamp(12px,3vw,40px);align-items:center}
#screen-home .home-grid>div:first-child{position:relative;z-index:1;min-width:0}
#screen-home .home-grid h1{font-size:clamp(36px,4.8vw,66px);line-height:1.02;margin:13px 0 18px}
#screen-home .hero-desc{font-size:clamp(14px,1.3vw,17px);line-height:1.5;margin-bottom:12px}
#screen-home .journey-steps{margin:12px 0 16px}
#screen-home .hero-visual{min-height:0;height:100%;max-height:700px}
#screen-home .hero-visual img{width:100%;height:100%;object-fit:cover}
#homeHint{margin:8px 0 12px}
#homeStart.game-play{min-width:210px;font-size:18px;min-height:56px}
#screen-map{gap:8px}
#screen-map .map-view-title{flex:none;margin:0;align-items:center}
#screen-map .map-view-title h2{font-size:clamp(17px,2.6vw,24px);margin:0}
#screen-map .map-view-title .eyebrow{display:none}
#screen-map .map-view-title #mapHome{display:none}
#screen-map .world-map{flex:1 0 auto;height:calc(100% - 44px);min-height:510px}
#screen-map .map-overlay-top h1{font-size:clamp(26px,4vw,42px)}
#screen-lesson{gap:8px}
#screen-lesson .scene-banner{flex:1 1 auto;min-height:0;margin:0;display:grid;grid-template-columns:minmax(0,.74fr) minmax(0,1fr);gap:clamp(9px,2vw,22px);align-items:stretch}
#screen-lesson .scene-banner>div:first-child{align-self:center;min-width:0}
#screen-lesson .scene-banner h1{font-size:clamp(26px,4vw,48px);margin:7px 0 10px}
#screen-lesson .scene-banner .explore-wrap{height:auto;min-height:310px;max-height:none;align-self:stretch}
#screen-lesson .story-details{border:1px solid #705d91;border-radius:12px;background:#17142ed9;padding:9px 12px;margin-top:10px}
#screen-lesson .story-details summary{font-weight:800;color:#eecaff;cursor:pointer;font-size:13px}
#screen-lesson .story-details .story{font-size:13px;line-height:1.5;margin:8px 0 0;max-height:125px;overflow:auto}
#screen-lesson .explore-panel{flex:0 0 auto;margin:3px 0;padding:11px 15px;min-height:80px;max-height:28vh;overflow:auto}
#screen-lesson .explore-panel strong{font-size:15px}
#screen-lesson .explore-panel p{font-size:13px;line-height:1.35;margin:3px 0 0}
#screen-lesson .explore-hint,#screen-lesson .section-title,#screen-lesson .section-title+.muted,#screen-lesson #factCards{display:none}
#screen-lesson .lesson-footer{flex:0 0 auto;display:flex;justify-content:flex-end;align-items:center;margin:1px 0 0;padding:4px 0 0}
#screen-lesson .lesson-footer #lessonMap,#screen-lesson .lesson-footer .muted{display:none}
#screen-lesson #lessonBegin{width:100%;min-height:50px}
#screen-quiz{justify-content:center}
#screen-quiz .quiz-shell{width:min(850px,100%);margin:0 auto}
#screen-quiz .quiz-card{padding:clamp(12px,2vw,23px);border-radius:19px}
#screen-quiz .quiz-art{height:clamp(100px,18vh,185px);margin:2px 0 12px}
#screen-quiz .quiz-avatar{display:none}
#screen-quiz .quiz-track{margin:8px 0 13px}
#screen-quiz .quiz-title{font-size:clamp(21px,3.4vw,31px);line-height:1.18;margin:0 0 14px}
#screen-quiz .answers{gap:8px}
#screen-quiz .answer{min-height:52px;padding:9px 11px;gap:10px;font-size:clamp(13px,1.5vw,16px);line-height:1.3}
#screen-quiz .quiz-help{font-size:12px;margin:8px 0 0}
#screen-quiz .quiz-actions{margin-top:10px}
#screen-quiz .quiz-actions .btn{min-height:48px}
#screen-quiz .explain{margin-top:9px;padding:9px 12px}
#screen-quiz .explain p{font-size:12px;line-height:1.4}
#screen-ritual{justify-content:center}
#screen-ritual .ritual-scene{flex:1 1 auto;min-height:0;max-height:100%;height:100%}
#screen-ritual .ritual-content{min-height:0;height:100%;padding:clamp(12px,2vw,22px)}
#screen-ritual .ritual-content h2{font-size:clamp(24px,3.4vw,39px);margin:7px 0}
#screen-ritual .ritual-prompt{font-size:clamp(14px,1.8vw,20px);line-height:1.3;margin:5px 0}
#screen-ritual .ritual-progress{margin:7px 0}
#screen-ritual .rune-field{max-width:640px}
#screen-ritual .rune-stone{height:clamp(85px,16vh,124px)}
#screen-ritual .ritual-status{min-height:0;margin:8px 0;padding:8px 12px;font-size:13px}
#screen-ritual .ritual-actions{margin-top:7px}
#screen-reward{min-height:0;justify-content:center}
#screen-reward .reward-card{max-width:570px;padding:clamp(18px,3vw,35px)}
#screen-reward .reward-title{font-size:clamp(30px,4vw,48px);margin:10px 0}
#screen-reward .reward-icon{font-size:50px}
#screen-reward .reward-stars{margin:8px 0;font-size:33px}
#screen-reward .reward-card p{font-size:14px;line-height:1.4}
#screen-victory{justify-content:flex-start}
#screen-library{padding:8px 0 25px}
/* Explicit pause; game screens never expose external site or product links. */
.game-menu[hidden]{display:none!important}
.game-menu{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:16px}
.menu-backdrop{position:absolute;inset:0;border:0;background:#050412d9;backdrop-filter:blur(10px)}
.menu-panel{
  position:relative;z-index:1;width:min(420px,100%);max-height:min(90dvh,750px);overflow:auto;
  padding:clamp(20px,4vw,30px);border:1px solid #b899e8;border-radius:24px;
  background:linear-gradient(160deg,#292044,#121b30);
  box-shadow:0 30px 100px #000b;display:flex;flex-direction:column;gap:10px;
}
.menu-panel h2{font-size:clamp(27px,5vw,37px);margin:0}
.menu-panel p{font-size:13px;margin:0 0 6px}
.menu-panel .btn{width:100%;min-height:47px}
.menu-panel .menu-exit{font-size:13px;margin-top:9px;padding:10px;text-align:center;color:#dacbe9;text-decoration:underline;text-underline-offset:3px}
@media(max-width:700px){
 body>header .topbar{min-height:51px}
 body>header .crest{width:34px;height:34px}
 body>header .crest svg{width:29px;height:29px}
 body>header .brand-name small{font-size:8px}
 body>header .hud .chip{padding:5px 7px;font-size:11px}
 .game-menu-trigger{padding:4px 11px;font-size:19px}
 .game-menu-trigger span{display:none}
 body>main.wrap{padding:6px 9px 9px}
 #screen-home .home-grid{display:flex;flex-direction:column;position:relative;justify-content:flex-end;overflow:hidden;border:1px solid #6f5a9e;border-radius:19px}
 #screen-home .hero-visual{position:absolute;inset:0;z-index:0;height:100%;max-height:none;border:0;border-radius:0}
 #screen-home .hero-visual img{height:100%;filter:brightness(.62) saturate(1.1)}
 #screen-home .hero-visual:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#06081714 0%,#08081725 30%,#080817eb 70%,#080817 100%);pointer-events:none}
 #screen-home .hero-label{display:none}
 #screen-home .home-grid>div:first-child{width:100%;padding:clamp(13px,4vw,24px);margin:auto 0 0}
 #screen-home .home-grid h1{font-size:clamp(33px,9vw,50px);margin:8px 0 10px;line-height:1.03}
 #screen-home .hero-desc{font-size:13px;line-height:1.4;max-width:490px;margin:6px 0}
 #screen-home .journey-steps{gap:6px;margin:11px 0}
 #screen-home .journey-steps span{width:auto;font-size:11px;padding:5px 8px}
 #screen-home .journey-steps b{width:18px;height:18px}
 #homeHint{font-size:12px;margin:8px 0}
 #homeStart.game-play{width:100%;min-height:52px}
 #screen-map .map-view-title{margin:0}
 #screen-map .map-view-title h2{font-size:19px}
 #screen-map .world-map{height:calc(100% - 35px);min-height:500px}
 #screen-map .map-stops{inset:105px 8px 43px}
 #screen-map .map-node{min-height:68px}
 #screen-map .map-overlay-top h1{font-size:25px;margin:3px 0}
 #screen-map .map-overlay-top p{font-size:12px;line-height:1.2;max-width:200px}
 #screen-lesson .scene-banner{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:6px}
 #screen-lesson .scene-banner>div:first-child{flex:none;width:100%;align-self:stretch}
 #screen-lesson .scene-banner h1{font-size:clamp(25px,6vw,35px);margin:3px 0}
 #screen-lesson .scene-banner .eyebrow{font-size:10px}
 #screen-lesson .scene-banner .story-details{margin-top:5px;padding:5px 9px}
 #screen-lesson .scene-banner .explore-wrap{flex:1 1 auto;min-height:180px;max-height:none;height:auto;border-radius:16px}
 #screen-lesson .explore-panel{padding:9px 11px;max-height:22dvh}
 #screen-lesson .explore-panel strong{font-size:13px}
 #screen-lesson .explore-panel p{font-size:12px}
 #screen-lesson .explore-hotspot{width:clamp(52px,14vw,64px);height:clamp(52px,14vw,64px)}
 #screen-lesson .explore-count{font-size:12px;padding:4px 7px}
 #screen-quiz .quiz-shell{width:100%}
 #screen-quiz .quiz-card{padding:11px}
 #screen-quiz .quiz-art{height:clamp(80px,14dvh,125px);margin:3px 0 9px}
 #screen-quiz .quiz-art-caption{font-size:10px;padding:5px 8px;bottom:6px;left:9px}
 #screen-quiz .quiz-top .eyebrow{font-size:10px}
 #screen-quiz .quiz-title{font-size:clamp(20px,5vw,26px);margin:0 0 12px}
 #screen-quiz .answer{font-size:14px;min-height:51px}
 #screen-ritual .ritual-scene{min-height:440px}
 #screen-ritual .ritual-content{min-height:0;padding:13px}
 #screen-ritual .ritual-content h2{font-size:clamp(23px,6vw,32px);line-height:1.15}
 #screen-ritual .rune-field{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 #screen-ritual .rune-stone{width:min(100%,108px);height:clamp(82px,13dvh,105px);padding:6px 3px}
 #screen-ritual .rune-symbol{font-size:29px}
 #screen-ritual .rune-label{font-size:10px}
}
@media(max-width:365px){
 body>header .brand-name small{display:none}
 body>header .brand-name{font-size:10px}
 body>header .hud .chip{font-size:10px;padding:5px}
 #screen-home .hero-desc{display:none}
 #screen-home .home-grid h1{font-size:34px}
 #screen-map .map-node img{width:30px;height:46px}
 #screen-map .map-node small{display:none}
 #screen-map .map-node b{font-size:10px}
}
@media(max-height:680px){
 body>header .topbar{min-height:44px;padding:3px 0}
 #screen-lesson .scene-banner .story-details{padding:3px 8px}
 #screen-lesson .scene-banner h1{font-size:24px;margin:2px 0}
 #screen-lesson .explore-panel{min-height:0;max-height:100px}
 #screen-quiz .quiz-art{height:80px}
 #screen-quiz .quiz-title{font-size:21px}
 #screen-quiz .answers{gap:5px}
 #screen-quiz .answer{min-height:46px;padding:7px 10px}
 #screen-map .world-map{min-height:465px}
 #screen-ritual .ritual-scene{min-height:425px}
 #screen-home .hero-desc{display:none}
}
@media print{
 html,body{height:auto!important;overflow:visible!important;display:block!important}
 body>main.wrap{overflow:visible!important;height:auto!important}
 body>main .view:not([hidden]){height:auto!important;overflow:visible!important}
 .game-menu-trigger,.game-menu{display:none!important}
}

/* Focused menu + safe areas: keep native browser pinch-to-zoom accessible. */
body>header .brand{appearance:none;border:0;background:none;color:inherit;padding:0;text-align:left;cursor:pointer}
body>header .topbar{padding-left:max(0px,env(safe-area-inset-left));padding-right:max(0px,env(safe-area-inset-right))}
body>main.wrap{padding-bottom:max(8px,env(safe-area-inset-bottom))}
.menu-extra{margin-top:3px;border:1px solid #685984;border-radius:12px;background:#17152cc7;padding:0 11px}
.menu-extra summary{cursor:pointer;font-weight:750;font-size:13px;padding:12px 2px;color:#ddd4ee}
.menu-extra[open]{padding-bottom:11px}
.menu-extra .btn{margin-top:7px;font-size:13px;min-height:44px}
@media(orientation:landscape) and (max-height:530px){
 body>header .topbar{min-height:40px;padding-top:2px;padding-bottom:2px}
 body>header .crest{width:31px;height:31px}
 body>header .brand-name small{display:none}
 body>main.wrap{padding-top:4px;padding-bottom:4px}
 #screen-home .home-grid h1{font-size:34px}
 #screen-home .home-grid .hero-desc{display:none}
 #screen-map .world-map{min-height:400px}
 #screen-map .map-stops{inset:80px 10px 35px}
 #screen-lesson .scene-banner{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1fr)}
 #screen-lesson .scene-banner .explore-wrap{min-height:240px}
 #screen-lesson .explore-panel{max-height:85px}
 #screen-quiz .quiz-art{display:none}
 #screen-quiz .quiz-title{margin:3px 0 7px;font-size:20px}
 #screen-quiz .quiz-track{margin:5px 0 8px}
 #screen-quiz .answer{min-height:39px;padding:5px 9px}
 #screen-ritual .ritual-scene{min-height:355px}
 #screen-ritual .ritual-content{padding:7px 12px}
 #screen-ritual .ritual-content h2{font-size:22px;margin:4px 0}
 #screen-ritual .rune-field{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
 #screen-ritual .rune-stone{height:72px}
 #screen-ritual .rune-symbol{font-size:25px}
 #screen-ritual .rune-label{font-size:9px}
 .menu-panel{max-height:95dvh}
}

/* Safe-area completion for notched devices and installed home-screen mode. */
body>header{padding-top:env(safe-area-inset-top,0px)}
body>main.wrap{
 padding-left:max(14px,env(safe-area-inset-left,0px));
 padding-right:max(14px,env(safe-area-inset-right,0px));
}
.game-menu{
 padding-top:max(16px,env(safe-area-inset-top,0px));
 padding-bottom:max(16px,env(safe-area-inset-bottom,0px));
 padding-left:max(16px,env(safe-area-inset-left,0px));
 padding-right:max(16px,env(safe-area-inset-right,0px));
}
@media(max-width:700px){
 body>main.wrap{padding-left:max(9px,env(safe-area-inset-left,0px));padding-right:max(9px,env(safe-area-inset-right,0px))}
}
