/* Rift adventures fill the available website viewport, including small phones. */
html,body{height:100%;height:100dvh;min-height:0}body{display:flex;flex-direction:column;overflow:hidden}body>header{flex-shrink:0}body>main{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.town-discovery-banner{flex-shrink:0}.town-page.active{flex:1;height:auto!important;min-height:0}.town-stage{min-height:0}.panel-page.active{overflow:auto;flex:1;min-height:0}.town-status,.town-story-bar{min-height:32px}.town-discovery-banner+section.town-page{height:auto}.rift-entry-buttons{position:absolute;right:12px;top:85px;z-index:13;display:grid;gap:6px;width:70px}.rift-entry-buttons button{min-height:37px;border:1px solid #bca4ec;background:linear-gradient(130deg,#53396fef,#1e2449f0);box-shadow:0 2px 12px #09062577;border-radius:12px;color:#f1e4ff;font-size:11px;font-weight:750;line-height:1.2;padding:8px 4px}.rift-entry-buttons button:last-child{font-size:9px;background:#182d47eb;color:#b6f4ec;border-color:#5fcabd}.rift-entry-buttons button:focus-visible{outline:3px solid #ffe19b}.raid-alert,.patrol-status{max-width:calc(100% - 108px)}
.rpg-overlay{position:fixed;inset:0;z-index:140;background:#080e23;color:#e8edff;display:flex;flex-direction:column;overflow:hidden;font:14px/1.4 system-ui,sans-serif}.rpg-top{display:flex;align-items:center;gap:10px;min-height:58px;flex-shrink:0;padding:9px 18px;background:#111a36;border-bottom:1px solid #75729b55}.rpg-top .rift-mark{display:grid;place-items:center;border:1px solid #c5a5ff;border-radius:50%;width:32px;height:32px;color:#dbc6ff;box-shadow:0 0 15px #a16fff44}.rpg-top>div{flex:1;min-width:0}.rpg-top small{display:block;font-size:8px;letter-spacing:2px;color:#a6a6d1}.rpg-top strong{font:21px Georgia;color:#f3e9ff}.rpg-overlay button{color:#e9e5ff;border:1px solid #6d719f;background:#222c50;border-radius:9px;min-height:40px;padding:8px 12px;font-size:12px}.rpg-overlay button:hover{border-color:#d6b4ff;background:#323361}.rpg-overlay button:disabled{opacity:.4}.rpg-top button{font-size:10px;min-height:34px;padding:6px 10px}.rpg-body{flex:1;min-height:0;position:relative;overflow:hidden;display:flex;flex-direction:column}.rpg-world{position:relative;flex:1;min-height:120px;background:#1e3b42;overflow:hidden}.rpg-world>canvas{width:100%;height:100%;display:block;touch-action:none}.rpg-area-label{position:absolute;top:12px;left:14px;padding:8px 12px;background:#0c1939e8;border:1px solid #a49fd877;border-radius:10px;pointer-events:none}.rpg-area-label small{display:block;color:#b6b6d6;font-size:8px;letter-spacing:1.6px}.rpg-area-label strong{font:18px Georgia}.rpg-mini{position:absolute;top:12px;right:12px;font:10px monospace;background:#0c1939e8;padding:8px;border-radius:9px;max-width:125px;text-align:right;pointer-events:none}.rpg-objective{background:#172343;color:#dcdeff;border-block:1px solid #8a7cab66;padding:9px 16px;font-size:11px;display:flex;gap:9px;align-items:center;flex-shrink:0}.rpg-objective>span{flex:1}.rpg-objective b{color:#ffc998;font-size:10px;white-space:nowrap}.rpg-bottom{display:flex;gap:18px;padding:10px 18px;background:#10192f;align-items:center;flex-shrink:0;min-height:124px}.rpg-dialogue{flex:1;min-width:0;align-self:stretch;padding:12px 15px;background:#182746;border:1px solid #6c739a;border-radius:12px;font-size:12px;color:#d6e5f3;white-space:pre-line;display:flex;flex-direction:column;justify-content:center;line-height:1.65}.rpg-dialogue small{color:#9eabca;font-size:10px;display:block;margin-top:4px}.rpg-pad{display:grid;grid-template-columns:repeat(3,34px);grid-template-rows:repeat(3,30px);gap:3px;touch-action:none;flex-shrink:0}.rpg-pad button{padding:0;min-height:0;font-size:18px;border-radius:8px;touch-action:none;background:#283255}.rpg-pad button:nth-child(1){grid-area:1/2}.rpg-pad button:nth-child(2){grid-area:2/1}.rpg-pad button:nth-child(3){grid-area:2/3}.rpg-pad button:nth-child(4){grid-area:3/2}.rpg-action{border-radius:50%!important;width:58px;height:58px;flex-shrink:0;color:#171a3b!important;background:linear-gradient(135deg,#e7c3ff,#9f91f2)!important;font-weight:800;font-size:20px!important}.rpg-pause-note{position:absolute;inset:0;z-index:18;background:#080d22dd;display:grid;place-items:center;text-align:center;padding:30px;color:#f4eaff;font-size:19px;backdrop-filter:blur(5px)}
.rpg-battle{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;background:radial-gradient(ellipse at 60% 45%,#405f78,#152640 75%)}.rpg-battle-stage{flex:1;position:relative;min-height:145px;overflow:hidden;background:linear-gradient(180deg,#94b6bc33,transparent 65%),repeating-linear-gradient(0deg,#7aa6b608 0 1px,transparent 1px 5px)}.rpg-battle-stage:after{content:'';position:absolute;inset:0;box-shadow:inset 0 0 100px #08102666;pointer-events:none}.rpg-combatant{position:absolute;width:42%;height:64%;display:flex;align-items:flex-end;justify-content:center}.rpg-combatant:before{content:'';position:absolute;bottom:4%;width:80%;height:13%;background:#07152566;border:2px solid #a2ccd344;border-radius:50%}.rpg-combatant canvas{width:100%;height:100%;position:relative;object-fit:contain;filter:drop-shadow(0 8px 5px #08192a55)}.rpg-foe{top:0;right:3%;}.rpg-hero{bottom:0;left:2%}.rpg-health{position:absolute;z-index:3;width:43%;background:#e6f0e4;color:#1b3340;border:3px solid #394d63;box-shadow:3px 3px #111e35;border-radius:7px;padding:10px 13px;font-size:12px}.rpg-health>div:first-child{display:flex;gap:5px;justify-content:space-between}.rpg-health b{font-weight:800}.rpg-health small{font-size:9px}.rpg-enemy-health{left:4%;top:7%}.rpg-player-health{right:4%;bottom:8%}.rpg-hp-line{height:7px;border-radius:7px;background:#233947;margin-top:7px;overflow:hidden}.rpg-hp-line>i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#64b588,#b0e4a0);transition:width .4s}.rpg-health .low{background:#e3927d}.rpg-health>small{display:block;text-align:right;margin-top:4px}.rpg-boss-warning{position:absolute;top:8px;left:50%;transform:translateX(-50%);font-size:9px;letter-spacing:1px;color:#ffe3ac;white-space:nowrap;background:#3e2447c9;padding:4px 9px;border-radius:12px;z-index:4}.rpg-moves{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px 14px;background:#101a32;border-top:1px solid #99a3bd77;flex-shrink:0}.rpg-moves button{text-align:left;background:#1d2c4a;min-height:48px;display:flex;justify-content:space-between;align-items:center;gap:8px}.rpg-moves button small{color:#c8b7ed;font-size:9px}.rpg-moves .muted-move{background:#131e36}.rpg-turn-log{white-space:pre-line;min-height:76px;max-height:120px;overflow:auto;padding:12px 18px;color:#e3e7f4;background:#1b2646;border:3px double #8997b1;font-size:12px;line-height:1.65;margin:0 14px 10px;border-radius:9px;flex-shrink:0}.rpg-battle-footer{display:flex;gap:5px;padding:0 14px 10px;background:#101a32;overflow-x:auto;flex-shrink:0}.rpg-battle-footer button{font-size:10px;min-height:35px;white-space:nowrap}.rpg-hit .rpg-foe{animation:rift-hit .45s}.rpg-hurt .rpg-hero{animation:rift-hit .45s}.rpg-attack-fx{position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 72% 38%,#ffd695bb,transparent 20%);opacity:0;z-index:4}.rpg-hit .rpg-attack-fx{animation:rift-fx .65s}.rpg-battle-stage[data-element=moon] .rpg-attack-fx{background:radial-gradient(circle at 72% 38%,#b1e9ffcc,transparent 25%)}.rpg-battle-stage[data-element=leaf] .rpg-attack-fx{background:radial-gradient(circle at 72% 38%,#b3f4b5cc,transparent 25%)}
.rift-transition{position:fixed;inset:0;z-index:190;display:grid;place-items:center;background:#090d25ed;overflow:hidden;pointer-events:none}.rift-transition i{width:min(60vw,400px);aspect-ratio:1;border:10px double #cbacff;border-radius:50%;background:repeating-conic-gradient(#372e5b,#0d1838 20deg,#7753a1 40deg);box-shadow:0 0 60px #af6aff,inset 0 0 50px #d4a5ff;animation:rift-enter 1.35s ease-in forwards}.rift-transition span{position:absolute;font:24px Georgia;color:#f0deff;text-shadow:0 2px 8px #000;bottom:20%}.evolution-veil{position:fixed;inset:0;z-index:200;background:radial-gradient(ellipse,#302153,#060b20 68%);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;overflow:hidden;color:#eee6ff}.evolution-veil .evo-kicker{font-size:10px;letter-spacing:4px;color:#c9b0f7;z-index:2}.evolution-veil h2{font:clamp(27px,5vw,45px) Georgia;margin:10px 15px;z-index:2}.evo-scene{height:min(49vh,390px);width:min(75vw,500px);position:relative;display:grid;place-items:center;--evo:#d2b0ff}.evo-scene canvas{width:100%;height:100%;position:relative;z-index:3;filter:drop-shadow(0 0 20px var(--evo));transform:scale(var(--evo-scale, .75))}.evo-scene:before{content:'';position:absolute;inset:15%;border:2px solid var(--evo);border-radius:50%;box-shadow:0 0 35px var(--evo),inset 0 0 35px #c89eff77;animation:evo-ring 5s linear infinite}.evo-scene:after{content:'';position:absolute;inset:-30%;background:repeating-conic-gradient(from 0deg,transparent 0deg 16deg,#b183ed33 18deg,transparent 22deg 40deg);border-radius:50%;animation:evo-ring 18s linear infinite reverse}.evo-particles{position:absolute;inset:0;pointer-events:none}.evo-particles i{position:absolute;left:var(--x);top:110%;width:4px;height:12px;background:var(--c,#e2b9ff);border-radius:50%;box-shadow:0 0 12px currentColor;animation:evo-rise var(--d) linear infinite;animation-delay:var(--delay)}.evo-progress{width:min(60%,340px);height:3px;background:#413356;margin:18px;border-radius:5px;overflow:hidden;z-index:2}.evo-progress i{display:block;height:100%;background:#e7c6ff;width:0}.evo-caption{color:#d1c2eb;font-size:12px;max-width:400px;margin:5px 20px;z-index:2}.evolution-veil button{z-index:4;color:#eee1ff;background:#382d52;border:1px solid #a88bc6;border-radius:20px;padding:9px 18px;min-height:40px;margin:10px}.evo-settings{position:absolute;top:10px;right:10px;display:flex;z-index:5}.evo-settings button{font-size:10px;margin:3px;padding:7px 10px}.evolution-veil[data-phase=reveal]{background:radial-gradient(ellipse,#5e3d81,#0b1531 70%)}.evolution-veil[data-phase=reveal] .evo-scene:before{border-width:5px}.evo-calm .evo-scene:before,.evo-calm .evo-scene:after,.evo-calm .evo-particles i{animation:none}.evo-calm .evo-particles{display:none}
.lap-select{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;justify-content:center;padding:25px;background:radial-gradient(ellipse at top,#30235dcc,#0a1433f5 75%);overflow:auto}.lap-select>div{max-width:660px;margin:auto;width:100%}.lap-select h2{font:clamp(30px,6vw,46px) Georgia;margin:10px 0}.lap-select p{color:#bacce4;font-size:12px;max-width:550px;line-height:1.8}.lap-courses{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:22px 0}.lap-courses button{text-align:left;padding:18px 12px;min-height:125px;border-color:#b398df;background:#24214dd9}.lap-courses b{display:block;font:20px Georgia;color:#e8d7ff}.lap-courses small{color:#c4c6e5;display:block;margin-top:10px;font-size:11px}.lap-gauge{position:absolute;left:50%;transform:translateX(-50%);bottom:20px;width:min(75%,500px);height:24px;background:#142342;border:2px solid #bfa5e4;border-radius:20px;overflow:hidden;pointer-events:none}.lap-gauge span{position:absolute;left:55%;width:22%;height:100%;background:#82e2ba88}.lap-gauge i{position:absolute;left:var(--beat,0%);top:0;height:100%;width:5px;background:#fff6c5;box-shadow:0 0 8px #fff}.rpg-audio-panel{position:absolute;inset:8% 8%;z-index:30;padding:24px;background:#121d3bf5;border:1px solid #b6a4d4;border-radius:20px;overflow:auto;box-shadow:0 15px 90px #000a}.rpg-audio-panel h2{font:27px Georgia}.rpg-audio-panel>button{display:block;width:100%;margin:8px 0;text-align:left}.rpg-audio-panel>p{font-size:11px;color:#bec9e2}
@keyframes rift-enter{0%{transform:scale(.05) rotate(0);opacity:0}30%{opacity:1}75%{transform:scale(1.1) rotate(180deg);opacity:1}100%{transform:scale(7) rotate(270deg);opacity:0}}@keyframes rift-hit{25%{transform:translateX(10px);filter:brightness(1.5)}60%{transform:translateX(-8px)}}@keyframes rift-fx{20%,55%{opacity:.85}100%{opacity:0}}@keyframes evo-ring{to{transform:rotate(360deg)}}@keyframes evo-rise{to{transform:translateY(-130vh) rotate(180deg);opacity:0}}@media(max-width:600px){.rift-entry-buttons{top:85px;width:65px}.rpg-top{padding:8px 10px;gap:7px;min-height:52px}.rpg-top strong{font-size:17px}.rpg-top small{font-size:7px;letter-spacing:1px}.rpg-top button{font-size:9px;padding:5px 7px}.rpg-bottom{padding:8px;gap:8px;min-height:118px}.rpg-dialogue{padding:9px;font-size:10px}.rpg-pad{grid-template-columns:repeat(3,30px);grid-template-rows:repeat(3,29px)}.rpg-action{width:43px;height:43px}.rpg-objective{font-size:10px;padding:8px 10px}.rpg-area-label{top:8px;left:8px;padding:7px 9px}.rpg-area-label strong{font-size:16px}.rpg-mini{font-size:9px;max-width:95px;right:8px;top:8px}.rpg-health{padding:7px 9px;font-size:10px;width:48%;border-width:2px}.rpg-enemy-health{left:2%;top:9%}.rpg-player-health{right:2%;bottom:7%}.rpg-moves{gap:5px;padding:8px}.rpg-moves button{min-height:44px;font-size:11px;padding:7px 9px}.rpg-turn-log{font-size:11px;margin:0 8px 8px;padding:9px 12px;max-height:114px;min-height:70px}.rpg-battle-footer{padding:0 8px 8px;gap:5px}.rpg-battle-footer button{font-size:9px;padding:6px 9px}.lap-select{padding:20px}.lap-courses{grid-template-columns:1fr}.lap-courses button{min-height:70px;padding:12px;display:flex;align-items:center;gap:15px}.lap-courses small{margin:0;flex:1}.rpg-audio-panel{inset:4%}.evo-scene{height:39vh;width:90vw}.rpg-combatant{width:48%}.rpg-boss-warning{top:0;font-size:8px}.rpg-health small{font-size:8px}}
@media(max-height:540px){.rpg-top{min-height:40px;padding:5px 10px}.rpg-bottom{min-height:95px;padding:5px 10px}.rpg-dialogue{font-size:10px}.rpg-pad{grid-template-rows:repeat(3,25px)}.rpg-moves{grid-template-columns:repeat(4,1fr);padding:5px}.rpg-moves button{min-height:35px;font-size:10px;padding:5px}.rpg-turn-log{min-height:47px;max-height:64px;padding:6px 10px;font-size:10px}.rpg-battle-stage{min-height:110px}.evo-scene{height:42vh;width:40vw}.evolution-veil h2{font-size:25px;margin:5px}.evo-progress{margin:8px}.evo-caption{font-size:10px}.rpg-objective{padding:5px 10px}}
@media(prefers-reduced-motion:reduce){.rift-transition i,.evo-scene:after,.evo-scene:before,.evo-particles i{animation:none}.rpg-hit .rpg-foe,.rpg-hurt .rpg-hero,.rpg-hit .rpg-attack-fx{animation:none}}
/* Painted high-resolution environments; sprites and HUD remain live layers. */
.rpg-battle-stage{background-size:cover;background-position:center 55%;background-repeat:no-repeat}.rpg-battle-stage[data-region="0"]{background-image:linear-gradient(#061b2910,#07132635),url('/summon/rpg-art/forest-battle.webp')}.rpg-battle-stage[data-region="1"]{background-image:linear-gradient(#10233d10,#06122c35),url('/summon/rpg-art/cavern-battle.webp')}.rpg-battle-stage[data-region="2"]{background-image:linear-gradient(#24133510,#100b2f35),url('/summon/rpg-art/spire-battle.webp')}.rpg-health{background:#e9f3e9f5;backdrop-filter:blur(4px)}.rpg-mini{white-space:pre-line}.rpg-area-label{box-shadow:0 4px 14px #020a2244}.rpg-world{background:#243e3d}.rpg-combatant:before{box-shadow:0 0 18px #829a8c40}.rpg-top button{white-space:nowrap}.rpg-health{border-color:#3a4e6577;box-shadow:0 3px 12px #09162c77}.rpg-objective{background:linear-gradient(90deg,#172b48,#292444)}
@media(max-width:420px){.rpg-top{gap:5px}.rpg-top .rift-mark{display:none}.rpg-top strong{font-size:15px}.rpg-top button{padding:5px;font-size:9px}.rpg-top small{letter-spacing:.5px;font-size:6px}}

/* V24 combat layout: world first, large touch targets and readable action timing. */
#rpg-scene{position:absolute;inset:0;width:100%;height:100%;display:block}.rpg-combatant,.rpg-attack-fx{display:none!important}.rpg-battle-stage{min-height:180px;background:#10192f}.rpg-battle-stage:after{box-shadow:inset 0 0 55px #08102666}.rpg-battle .rpg-moves{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px;gap:6px}.rpg-moves button{min-height:48px;font-size:12px}.rpg-battle-footer button{min-height:44px;font-size:11px}.rpg-turn-log{font-size:12px;min-height:48px;max-height:76px;margin-bottom:6px}.rpg-health{width:43%;padding:7px 10px;pointer-events:none}.rpg-player-health{bottom:5%;right:3%}.rpg-enemy-health{top:5%;left:3%}.rpg-health small{font-size:10px}.rpg-health b{font-size:12px}.battle-discovery{position:absolute;left:5%;right:5%;top:39%;padding:12px;text-align:center;color:#fff0ca;background:#101a36bb;border-block:1px solid #d1bbf177;font-size:clamp(15px,3vw,23px);letter-spacing:2px;pointer-events:none}#rpg-intro-skip{position:absolute;right:10px;top:10px;z-index:8;min-height:44px}.rpg-moves[inert]{opacity:.55}.rpg-world canvas{touch-action:none}.rpg-pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,34px)}.rpg-pad button{min-height:34px}.rpg-bottom{min-height:115px}.rpg-area-label,.rpg-mini{max-width:44%;pointer-events:none}.rpg-area-label strong{font-size:15px}.lap-courses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.lap-courses button{min-height:80px;display:block}.lap-courses button b,.lap-courses button small{display:block}.lap-courses button small{font-size:11px;margin-top:5px}.evo-caption{max-width:90%;line-height:1.6}.evolution-veil .evo-scene{height:min(52dvh,430px)}.evolution-veil button{min-height:44px}.evo-calm .evo-scene:before,.evo-calm .evo-scene:after,.evo-calm .evo-particles{animation:none!important}
@media(max-width:600px){.rpg-top{gap:5px}.rpg-top strong{font-size:16px}.rpg-top button{min-height:40px}.rpg-top .rift-mark{display:none}.rpg-objective{font-size:11px}.rpg-dialogue{font-size:11px;padding:7px}.rpg-bottom{gap:6px;padding:6px}.rpg-action{width:46px;height:46px}.rpg-pad{grid-template-columns:repeat(3,36px);grid-template-rows:repeat(3,32px)}.lap-select{overflow:auto}.lap-courses{grid-template-columns:1fr}.rpg-health{width:45%}.rpg-boss-warning{top:2px;left:50%;max-width:88%;white-space:normal;text-align:center;z-index:6}.rpg-battle-stage{min-height:165px}}
@media(max-height:540px){.rpg-turn-log{min-height:38px;max-height:48px;font-size:11px}.rpg-battle .rpg-moves{grid-template-columns:repeat(4,minmax(0,1fr));padding:4px}.rpg-moves button{min-height:40px;padding:5px;font-size:10px}.rpg-battle-footer{padding-bottom:4px}.rpg-battle-footer button{min-height:36px}.rpg-battle-stage{min-height:120px}.rpg-health b{font-size:10px}}

/* Evolution action completes in 8.5s; short spark burst accompanies the reveal. */
.evolution-veil[data-phase=reveal] .evo-particles i{animation-duration:.8s;box-shadow:0 0 18px currentColor;width:5px;height:16px}.evolution-veil[data-phase=reveal] .evo-scene:before{animation:evo-reveal-burst .65s ease-out both}.evolution-veil .evo-scene canvas{position:relative;z-index:2}.evo-calm[data-phase=reveal] .evo-scene:before{animation:none}@keyframes evo-reveal-burst{0%{box-shadow:0 0 90px #fff,inset 0 0 80px #fff;transform:scale(.85)}100%{box-shadow:0 0 35px var(--evo),inset 0 0 35px #c89eff77;transform:scale(1)}}
@media(max-width:600px){.rpg-pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px)}.rpg-pad button{min-height:44px}.rpg-top{flex-wrap:wrap}.rpg-top button{font-size:11px;min-height:44px}.rpg-top small{display:none}.rpg-top strong{font-size:17px}.rpg-dialogue{font-size:12px}.rpg-battle-footer button{font-size:12px}}
/* Controls float directly over the world; story text no longer reserves a bottom panel. */
.rpg-body .rpg-world{min-height:0}.rpg-body>.rpg-objective{position:absolute;z-index:3;top:68px;left:10px;right:10px;border-radius:12px;background:#152542aa;border:1px solid #bec9dc44;padding:6px 10px;pointer-events:none;font-size:10px}.rpg-body>.rpg-bottom{position:absolute;bottom:max(7px,env(safe-area-inset-bottom));left:10px;right:10px;z-index:4;min-height:0;padding:0;background:transparent;pointer-events:none}.rpg-bottom .rpg-dialogue{display:block;max-height:54px;overflow:auto;min-height:0;align-self:auto;margin:auto;max-width:720px;width:100%;padding:7px 10px;font-size:10px;background:#101b3288;border-color:#d1d9ea33;backdrop-filter:blur(2px);pointer-events:auto}.rpg-bottom:empty{display:none}.rpg-world .floating-controls .touch-action{font-size:22px!important}.rpg-top button{flex-shrink:0}.rpg-top>div{overflow:hidden}.rpg-top strong{white-space:nowrap}@media(max-width:600px){.rpg-top{gap:4px;padding:6px}.rpg-top .rift-mark,.rpg-top small{display:none}.rpg-top strong{font-size:14px}.rpg-top button{font-size:9px;padding:5px;min-height:34px}.rpg-body>.rpg-objective{top:62px;font-size:9px}.rpg-objective b{font-size:8px}.rpg-bottom .rpg-dialogue{font-size:10px;max-height:45px}}@media(max-height:540px){.rpg-body>.rpg-objective{top:57px;max-width:55%;font-size:8px;padding:4px 7px}.rpg-objective b{display:none}.rpg-bottom .rpg-dialogue{max-height:32px;padding:4px 9px;font-size:9px}}

/* One compact header; optional panels float over the world. */
.rpg-top{height:54px;min-height:54px;flex-wrap:nowrap!important;position:relative;overflow:visible!important;padding:6px 10px!important;gap:8px!important}.rpg-top>div{flex:1}.rpg-top strong{font-size:14px!important}.rpg-top .rift-mark,.rpg-top small{display:none!important}.rpg-options{position:relative;flex-shrink:0}.rpg-options>summary{list-style:none;min-height:40px;display:flex;align-items:center;padding:0 12px;border:1px solid #b09cce66;border-radius:12px;background:#24334a;color:#f2e6ff;font:12px system-ui;cursor:pointer}.rpg-options>summary::-webkit-details-marker{display:none}.rpg-options[open]{isolation:isolate}.rpg-options[open]:after{content:'';position:fixed;inset:54px 0 0;background:#07112655;z-index:-1;pointer-events:none}.rpg-options>button{display:block!important;width:200px!important;min-height:44px!important;text-align:left;font-size:13px!important;background:#172642!important;border-radius:0!important;border:1px solid #8f83b744!important;margin:0!important}.rpg-options[open]>button{position:relative;right:112px;z-index:30}.rpg-options[open]{align-self:flex-start}.rpg-options[open]>summary{height:40px;margin-bottom:7px}.rpg-top>button{min-height:40px!important;font-size:11px!important}.rpg-body>.rpg-objective{top:57px!important;max-height:40px;overflow:hidden}.rpg-area-label{top:8px!important}.rpg-world #rpg-camera-switch{top:66px}.is-battling #rpg-camera-switch,.is-battling>.rpg-body>.rpg-objective,.is-battling .rpg-bottom{display:none!important}.rpg-battle .rpg-player-health{top:5%;bottom:auto;right:3%}.rpg-battle .rpg-team-status{bottom:5px}.rpg-battle-stage{min-height:230px!important}.rpg-battle-footer{flex-wrap:wrap}.rpg-battle-footer button{white-space:normal}.rpg-battle{overflow:auto}.rpg-options[open]~button{align-self:flex-start}
@media(max-height:540px){.rpg-battle-stage{min-height:160px!important}.rpg-health{padding:4px 7px}.rpg-team-status{display:none}}
.rpg-options{width:80px;align-self:center!important}.rpg-options-list{position:absolute;right:0;top:47px;width:220px;max-height:calc(100dvh - 90px);overflow:auto;z-index:40;background:#172642;border:1px solid #a898c666;border-radius:14px;padding:7px;box-shadow:0 15px 40px #030b20aa}.rpg-options-list>button{display:block;width:100%;min-height:44px!important;text-align:left;font-size:13px!important;margin:2px 0!important}.rpg-options[open]>summary{margin-bottom:0}.rpg-options[open]~button{align-self:center}

/* Individual party turns and a compact, selectable enemy roster. */
.rpg-enemy-roster{position:absolute;top:12px;left:10px;z-index:5;width:42%;display:grid;gap:5px}.rpg-target{display:block;width:100%;padding:0!important;border:1px solid #b6ad9270!important;border-radius:8px;background:#19293ce8!important;min-height:44px;text-align:left}.rpg-target[aria-pressed=true]{border-color:#ffe09d!important;box-shadow:0 0 0 1px #ffe09d66}.rpg-target:disabled{opacity:.42}.rpg-target .rpg-health{position:static!important;width:auto!important;border:0;box-shadow:none;padding:5px 7px;background:transparent;color:#f5ead3;pointer-events:none}.rpg-target .rpg-health b{font-size:10px}.rpg-target .rpg-health small{font-size:8px}.rpg-target .rpg-hp-line{height:4px;margin-top:3px}.rpg-target .rpg-health>small{margin-top:2px}.rpg-round-label{position:absolute;right:10px;top:90px;z-index:4;width:44%;text-align:center;color:#ffe0a1;font:11px/1.4 system-ui}.rpg-battle-stage[data-enemies="3"]{min-height:300px!important}.rpg-boss-warning{top:4px!important}.rpg-team-status span{font-size:9px;padding:4px 5px}.rpg-battle-footer button:disabled{opacity:.4}.rpg-battle-footer button{flex:1}.rpg-moves button:disabled{opacity:.4}@media(max-height:540px){.rpg-enemy-roster{width:35%;gap:3px;top:8px}.rpg-target{min-height:36px}.rpg-target .rpg-health>small{display:none}.rpg-round-label{top:72px;font-size:10px}.rpg-battle-stage[data-enemies="3"]{min-height:230px!important}}

/* v54: viewport fitting and non-overlapping exploration HUD. */
html:has(body.game-screen),body.game-screen{overscroll-behavior:none}.rpg-overlay,.buddy-eye{height:var(--game-height,100dvh);max-height:100dvh;box-sizing:border-box;padding-bottom:env(safe-area-inset-bottom)}.rpg-overlay .rpg-top{height:calc(54px + env(safe-area-inset-top));min-height:calc(54px + env(safe-area-inset-top));padding-top:calc(6px + env(safe-area-inset-top))!important}
.rpg-world-hud{position:absolute;inset:8px 8px auto;z-index:4;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;pointer-events:none}.rpg-world-hud>.rpg-area-label,.rpg-world-hud>.rpg-mini{position:static!important;max-width:none!important;margin:0;box-sizing:border-box}.rpg-world-hud>.rpg-area-label{min-width:0;padding:6px 10px}.rpg-world-hud>.rpg-area-label strong{display:block;font-size:clamp(14px,2.5vw,20px);line-height:1.2}.rpg-world-hud>.rpg-area-label small{font-size:7px;letter-spacing:.10em}.rpg-world-hud>.rpg-mini{max-width:110px!important;font-size:8px;align-self:start;padding:6px}.rpg-world-hud>#rpg-camera-switch{position:static!important;inset:auto;transform:none;grid-column:1/-1;justify-self:center;max-width:100%;margin:0;pointer-events:auto;gap:6px;font-size:11px}.rpg-world-hud>#rpg-camera-switch button{height:38px;min-height:38px;width:40px}.rpg-world-hud>.rpg-objective{position:static!important;grid-column:1/-1;padding:5px 9px;background:#102036c9;border:1px solid #93a8c833;border-radius:9px;font-size:10px;line-height:1.35;max-height:40px;overflow:hidden;display:block}.rpg-world-hud>.rpg-objective b{display:none}.is-battling .rpg-world-hud{display:none!important}
@media(max-width:600px){.rpg-world-hud{grid-template-columns:minmax(0,1fr);gap:4px}.rpg-world-hud>.rpg-mini{display:none}.rpg-world-hud>.rpg-area-label{justify-self:start;max-width:100%!important;padding:5px 9px}.rpg-world-hud>.rpg-area-label small{display:none}.rpg-world-hud>.rpg-area-label strong{font-size:16px}.rpg-world-hud>#rpg-camera-switch{justify-self:end;margin-top:-2px}.rpg-world-hud>.rpg-objective{max-width:min(100%,520px);font-size:10px}.rpg-battle .rpg-moves button{min-height:44px;font-size:12px}.rpg-battle .rpg-turn-log{font-size:11px;line-height:1.45;min-height:44px;max-height:72px;padding:8px 10px}.rpg-battle .rpg-battle-footer button{min-height:44px;font-size:11px}}
@media(max-height:540px) and (min-width:600px){.rpg-battle{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;gap:0}.rpg-battle>.rpg-battle-stage{grid-column:1;grid-row:1/4;min-height:0!important;height:100%}.rpg-battle>.rpg-moves{grid-column:2;grid-row:1;grid-template-columns:1fr 1fr;padding:6px;gap:5px}.rpg-battle>.rpg-moves button{min-height:40px;padding:6px;font-size:11px}.rpg-battle>.rpg-turn-log{grid-column:2;grid-row:2;min-height:0;max-height:none;margin:0 6px 5px;overflow:auto;font-size:10px;line-height:1.35;padding:6px 8px}.rpg-battle>.rpg-battle-footer{grid-column:2;grid-row:3;padding:0 6px 5px;gap:4px}.rpg-battle>.rpg-battle-footer button{min-height:40px;padding:5px;font-size:10px}.rpg-world-hud{grid-template-columns:minmax(0,1fr) auto;max-width:70%;inset:5px 5px auto;gap:3px}.rpg-world-hud>.rpg-area-label{grid-column:1}.rpg-world-hud>.rpg-mini{display:none}.rpg-world-hud>#rpg-camera-switch{grid-column:2;grid-row:1}.rpg-world-hud>.rpg-objective{grid-column:1/3;font-size:9px}.rpg-world-hud>.rpg-area-label small{display:none}}

.rpg-boss-plan{display:flex;flex-direction:column;gap:4px;margin:8px 12px 0;padding:11px 14px;border:1px solid var(--boss-color,#d9b183);border-radius:10px;background:#302a3c;color:#fff0d1;font:12px/1.45 system-ui}.rpg-boss-plan strong{font-size:14px;color:var(--boss-color,#efce94)}.rpg-boss-plan[data-intent=danger]{background:#4b202d;border-color:#ffc087;box-shadow:inset 3px 0 #ffbe74}.rpg-boss-plan[data-intent=charge]{background:#382c45}.rpg-battle-stage[data-boss=true]{min-height:250px}.rpg-battle-stage[data-boss=true] .rpg-boss-warning{background:#291b32ed;border:1px solid #dfbf78;color:#ffe2a0;padding:5px 12px;border-radius:20px;font-weight:800;letter-spacing:.05em}.rpg-battle-stage[data-boss=true] .rpg-enemy-roster{top:37px}.rpg-battle-stage[data-boss=true] .rpg-target{border-color:#e4c47e!important;box-shadow:0 0 12px #f4c58233}.rpg-battle-stage[data-boss=true] .rpg-target .rpg-hp-line{height:7px}@media(max-height:540px){.rpg-boss-plan{font-size:10px;margin:4px 8px 0;padding:6px 9px}.rpg-boss-plan strong{font-size:12px}.rpg-battle-stage[data-boss=true]{min-height:180px}}
