/* Viewport-filling battlefield; controls have no shared backing panel. */
body.battle-screen,body.battle-screen.has-voice{margin:0;padding:0!important;overflow:hidden;background:#244549}
body.battle-screen .ambient,body.battle-screen .decor,.is-battle>.topbar,.is-battle>.footer-note{display:none!important}
#app.is-battle{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;margin:0;padding:0}
#app.is-battle .round-battle{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;max-height:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:transparent}
.round-battle .forest-arena{position:absolute!important;inset:0;display:grid;grid-template-columns:1fr 1fr;gap:clamp(12px,5vw,70px);width:100%;height:100%;min-height:0!important;padding:0 5%!important;margin:0;border:0;overflow:hidden!important;background-size:cover}
.round-battle .forest-arena .round-team{height:100%;position:relative}
.round-battle .forest-arena .round-team h3{position:absolute;top:max(65px,8%);left:0;right:0;margin:0;font-size:clamp(12px,2vw,18px)}
.round-battle .forest-arena .angel-zone{position:absolute;top:14%;left:0;right:0;height:11%;margin:0}
.round-battle .forest-arena .sky-label{display:none}.round-battle .forest-arena .sky-fighters{height:100%;padding:0}
.round-battle .forest-arena .ground-fighters{position:absolute;top:28%;left:0;right:0;height:43%;display:block}
.round-battle .forest-arena .ground-fighters .round-fighter{width:clamp(59px,17vw,108px);min-width:0;padding:0}
.round-battle .forest-arena .figure-wrap{width:clamp(59px,17vw,100px);height:clamp(83px,12dvh,135px)}
.round-battle .forest-arena .sky-fighters .figure-wrap{width:62px;max-width:100%;height:clamp(50px,8dvh,80px)}
.round-battle .forest-arena .ground-fighters .round-fighter:nth-child(odd){left:0%}
.round-battle .forest-arena .ground-fighters .round-fighter:nth-child(even){left:53%}
.round-battle .forest-arena .round-team:last-child .ground-fighters .round-fighter:nth-child(odd){left:53%}
.round-battle .forest-arena .round-team:last-child .ground-fighters .round-fighter:nth-child(even){left:0%}
.round-battle .arena-top{position:absolute!important;inset:env(safe-area-inset-top,0px) 58px auto 8px;z-index:21;display:flex;gap:7px;justify-content:space-between;align-items:center;padding:6px 0;min-height:48px;background:none!important;border:0;border-radius:0;box-shadow:none!important;color:#fff6d7;text-shadow:0 2px 4px #102c36}
.round-battle .arena-tag{font-size:11px}.round-battle .arena-tag small{font-size:9px;color:#e2ede4}.round-battle .round-clock{font-size:11px;color:#fff7dc}.round-battle .round-clock strong{display:inline;margin-left:7px;font-size:20px;color:#ffe49c}.round-battle .arena-top .icon-btn{min-width:36px;min-height:44px;padding:3px;font-size:12px;color:#fff}
.round-battle .arena-bottom{position:absolute!important;left:8px;right:8px;bottom:calc(38px + env(safe-area-inset-bottom,0px));width:auto;max-width:800px;max-height:32%;min-height:0!important;margin:0 auto;padding:8px 3px!important;background:none!important;border:0;box-shadow:none;overflow-y:auto;overscroll-behavior:contain;z-index:22;text-align:center;color:#fff6dc;text-shadow:0 2px 4px #12313e,0 0 6px #12313e;scrollbar-width:thin;pointer-events:none}
.round-battle .arena-bottom button,.round-battle .arena-bottom input,.round-battle .arena-bottom .report-list{pointer-events:auto}
.round-battle .phase-title,.round-battle .question-title{color:#fff6dc;font-size:clamp(15px,2.7vw,23px);margin:3px 0 8px;text-shadow:0 2px 5px #15303d,0 0 7px #15303d}
.round-battle .phase-sub,.round-battle .question-type,.round-battle .power-line,.round-battle .reward-prompt,.round-battle .target-summary{color:#f2eed5;font-size:11px;line-height:1.4;margin:4px 0}
.round-battle .spell-grid,.round-battle .upgrade-grid{display:flex;justify-content:center;align-items:flex-start;gap:clamp(15px,6vw,50px);margin:6px auto;max-width:700px}
/* 75% transparent at rest. Selecting or focusing a control highlights it. */
.round-battle .arena-bottom button,.round-battle .arena-top button,.round-battle .bottom-controls button{border:0!important;background:none!important;box-shadow:none!important;border-radius:50%;opacity:.25;color:#fff8dc;text-shadow:0 2px 3px #15323d,0 0 6px #15323d;filter:drop-shadow(0 2px 3px #15323d);transition:opacity .15s,transform .15s;cursor:pointer}
.round-battle .arena-bottom button:hover:not(:disabled),.round-battle .arena-bottom button:focus-visible,.round-battle .arena-bottom button:active,.round-battle .arena-bottom button.selected,.round-battle .arena-top button:hover,.round-battle .bottom-controls button:hover{opacity:1;outline:0;transform:scale(1.06)}
.round-battle .arena-bottom button:focus-visible{outline:2px dotted #fff2a3;outline-offset:2px}
.round-battle .arena-bottom button:disabled{opacity:.13;cursor:default}
/* Question content stays legible; do not compound opacity on its parent. */
.round-battle .question-box .question-title,.round-battle .question-box .question-type,.round-battle .question-box .phase-sub,.round-battle .question-box .revealed-han,.round-battle .question-box .compose-line{opacity:.8}
.round-battle .arena-bottom .question-box button{opacity:.8}
.round-battle .arena-bottom .question-box button:hover:not(:disabled),.round-battle .arena-bottom .question-box button:focus-visible,.round-battle .arena-bottom .question-box button.selected{opacity:1}
.round-battle .arena-bottom .question-box button:disabled{opacity:.8;cursor:default;filter:grayscale(1)}
.round-battle .spell-option,.round-battle .target-action,.round-battle .upgrade-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:64px;max-width:115px;min-height:80px;padding:4px!important;font:inherit}
.round-battle .glyph{font-size:clamp(34px,7vw,48px);line-height:1.2;display:block}.round-battle .spell-option strong,.round-battle .target-action strong,.round-battle .upgrade-option strong{font-size:13px;display:block}.round-battle .spell-option small,.round-battle .target-action small,.round-battle .upgrade-option small,.round-battle .upgrade-option b{color:inherit;font-size:9px;line-height:1.2}.round-battle .spell-option>span:last-child:not(.glyph){font-size:10px}
.round-battle .question-options{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin:9px auto}.round-battle .answer-button{min-width:62px;min-height:52px;padding:9px;font-size:24px;font-weight:900}.round-battle .question-tools{gap:8px;margin:4px}.round-battle .mini-btn{padding:6px;font-size:11px;min-height:40px}
.round-battle .assemble-rows{gap:3px;margin:3px auto}.round-battle .syllable-row{gap:14px}.round-battle .chip{min-width:50px;min-height:42px;padding:5px;font-size:22px}.round-battle .compose-line{margin:3px;gap:6px}.round-battle .drop-slot{min-height:28px;padding:3px;width:80px;border:0;background:none;color:#fff3be;font-size:20px}.round-battle .btn.primary{min-height:44px;padding:8px}
.round-battle .feedback,.round-battle .upgrade-earned{background:none;box-shadow:none;padding:5px;margin:4px auto;color:#fff4cd;animation:none}.round-battle .upgrade-earned>.gear-symbol{width:50px;height:50px;margin:auto}.round-battle .upgrade-announcements{color:#fff5d7;font-size:10px}.round-battle .upgrade-icon{width:52px;height:52px}
.round-battle .bottom-controls{position:absolute;bottom:env(safe-area-inset-bottom,0px);left:10px;right:10px;min-height:28px;padding:4px 0;z-index:23;background:none;border:0;color:#fff3dc}.round-battle .metric,.round-battle .metric strong{font-size:10px;color:#fff3dc;text-shadow:0 1px 3px #15323d}.round-battle .bottom-controls button{font-size:11px;padding:5px;min-height:30px}
.round-battle .past-report{position:absolute;left:10px;bottom:32px;z-index:24;padding:3px;border:0;max-width:85vw;max-height:50dvh;overflow:auto;color:#fff6dc;text-shadow:0 1px 3px #102c36}.round-battle .past-report summary{color:#fff6dc;font-size:10px}.round-battle .past-report[open]{background:#183941ed;padding:10px;border-radius:12px}.round-battle .five-report{padding:2px}.round-battle .report-list{display:grid;grid-template-columns:1fr 1fr;gap:4px}.round-battle .report-player{background:none!important;border:0;padding:5px;font-size:10px;line-height:1.4}.round-battle .report-player strong,.round-battle .report-player b,.round-battle .report-player small{color:#fff4d7;font-size:inherit}
.round-battle.phase-report .arena-bottom{pointer-events:auto;max-height:43%;bottom:40px}.round-battle.phase-target .arena-bottom{bottom:48px;max-height:28%}
body.has-voice{padding-bottom:0!important}
#voice-panel{top:calc(7px + env(safe-area-inset-top,0px));right:8px;bottom:auto;left:auto;transform:none;width:auto;max-width:280px;padding:0;background:none;border:0;border-radius:0;box-shadow:none;z-index:60;color:#fff;text-shadow:0 1px 3px #17313b}
#voice-panel .voice-toggle{display:block;margin-left:auto;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:none;color:#fff;font-size:27px;opacity:.25;filter:drop-shadow(0 2px 3px #17313b);cursor:pointer}
#voice-panel .voice-toggle:hover,#voice-panel .voice-toggle:focus-visible,#voice-panel .voice-toggle[aria-expanded=true],#voice-panel .voice-toggle.voice-on{opacity:1}
#voice-panel .voice-options{margin-top:4px;padding:10px;max-width:270px;background:#16363fe8;border-radius:16px;box-shadow:0 3px 18px #09252a50}
#voice-panel .voice-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}#voice-panel .voice-actions button{background:none;border:1px solid #ffffff55;color:#fff;font-size:12px;min-height:44px}#voice-panel .voice-status,#voice-panel .voice-note{font-size:10px;color:#f4eed8;margin:5px 0}
#voice-panel .voice-talk[aria-pressed=true]{background:#b12d58}.battle-screen #toast{top:70px;z-index:70;font-size:12px;max-width:80vw}
@media(max-width:360px){.round-battle .forest-arena{padding:0 3%!important;gap:9px}.round-battle .forest-arena .ground-fighters .round-fighter{width:57px}.round-battle .forest-arena .figure-wrap{width:57px;height:83px}.round-battle .arena-tag{font-size:9px}.round-battle .round-clock{font-size:10px}.round-battle .arena-top{right:52px}.round-battle .arena-bottom{max-height:34%}.round-battle .spell-grid,.round-battle .upgrade-grid{gap:12px}.round-battle .spell-option,.round-battle .target-action,.round-battle .upgrade-option{min-width:62px}.round-battle .question-title{font-size:15px}}
@media(orientation:landscape) and (max-height:540px){.round-battle .forest-arena{padding:0 5%!important;gap:32%}.round-battle .forest-arena .round-team h3{top:16%;font-size:11px}.round-battle .forest-arena .angel-zone{top:25%;height:20%}.round-battle .forest-arena .ground-fighters{top:40%;height:46%}.round-battle .forest-arena .ground-fighters .round-fighter{width:45px}.round-battle .forest-arena .figure-wrap{width:45px;height:55px}.round-battle .forest-arena .hp-meter{width:44px;height:11px}.round-battle .forest-arena .hp-meter b{font-size:7px;line-height:9px}.round-battle .forest-arena .overhead-name{font-size:7px;line-height:9px}.round-battle .forest-arena .fighter-badge{display:none}.round-battle .arena-bottom{left:33%;right:33%;bottom:35px;max-height:74%;padding:3px!important}.round-battle .spell-grid,.round-battle .upgrade-grid{gap:3px;flex-wrap:wrap}.round-battle .spell-option,.round-battle .target-action,.round-battle .upgrade-option{min-width:60px;min-height:60px}.round-battle .glyph{font-size:28px}.round-battle .question-options{gap:4px}.round-battle .answer-button{min-width:45px;min-height:42px;font-size:20px}.round-battle .phase-sub{font-size:9px}.round-battle .question-title{font-size:15px}.round-battle .report-list{grid-template-columns:1fr}.round-battle.phase-report .arena-bottom{max-height:70%}.round-battle.phase-target .arena-bottom{bottom:35px;max-height:70%}}
.round-battle.phase-answer .arena-bottom,.round-battle.phase-reward .arena-bottom{pointer-events:auto}
.round-battle .arena-top .arena-tag{color:#fff6dc}
.round-battle .arena-top .arena-tag{flex:0 0 76px;line-height:1.4}.round-battle .arena-top .round-clock{flex:1;min-width:0}.round-battle .arena-top .round-clock strong{display:block;line-height:23px;margin:0}
@media(max-width:600px) and (max-height:700px){
 .round-battle .arena-top .arena-tag{flex-basis:66px;font-size:9px}.round-battle .arena-top .round-clock{font-size:10px}.round-battle .arena-top .round-clock strong{font-size:18px;line-height:20px}
 .round-battle .forest-arena .ground-fighters{top:26%;height:47%}.round-battle .forest-arena .ground-fighters .round-fighter{width:54px}.round-battle .forest-arena .figure-wrap{width:50px;height:67px}.round-battle .forest-arena .hp-meter{height:11px;width:51px}.round-battle .forest-arena .hp-meter b{font-size:8px;line-height:9px}.round-battle .forest-arena .overhead-name{font-size:8px;line-height:10px}.round-battle .forest-arena .fighter-badge{display:none}
 .round-battle.phase-answer .arena-bottom{max-height:35%;bottom:33px}.round-battle .question-title{font-size:14px;margin:2px 0}.round-battle .assemble-rows>.phase-sub,.round-battle .compose-line{display:none}.round-battle .assemble-rows{gap:2px}.round-battle .chip{min-height:34px;padding:3px;font-size:20px}.round-battle .assemble-rows .btn.primary{min-height:34px;padding:4px}.round-battle .question-box>.phase-sub{font-size:9px;margin:2px}.round-battle .question-type{font-size:10px;margin:2px}
}
/* v0.9: clear boundary; normalized positions stay within each team's field. */
.round-battle .field-divider{position:absolute;left:50%;top:12%;bottom:7%;width:4px;transform:translateX(-50%);background:repeating-linear-gradient(to bottom,#fff4bb 0 18px,#a8e9de 18px 25px,transparent 25px 34px);filter:drop-shadow(0 0 5px #fff3a4);z-index:0;pointer-events:none;opacity:.8}
.round-battle .field-divider::before,.round-battle .field-divider::after{content:'✦';position:absolute;left:50%;transform:translateX(-50%);color:#fff1a8;font-size:20px;text-shadow:0 0 10px #ffeaa1}.round-battle .field-divider::before{top:-22px}.round-battle .field-divider::after{bottom:-22px}
.round-battle .forest-arena{gap:20px;padding:0 3%!important}.round-battle .forest-arena .ground-fighters{top:26%;height:47%}
.round-battle .forest-arena .round-team:last-child .sprite-fighter{transform:scaleX(-1)}
.round-fighter[data-own=true]{touch-action:none;cursor:grab}.round-fighter.dragging{z-index:19!important;cursor:grabbing;filter:drop-shadow(0 0 8px #fff3b2)}
.round-fighter[data-own=true]:focus-visible{outline:2px dashed #fff3b2!important;outline-offset:4px}
.round-battle .forest-arena .round-fighter[data-own=true] .fighter-badge{font-size:8px}
/* sqrt(2) times each dimension gives twice the original photo area. */
.portrait-face.sprite-photo{left:30%;top:13.7%;width:41.01%;height:28.99%;border-radius:46%;z-index:3}
.cry-face{display:none;position:absolute;left:30%;top:13.7%;width:41.01%;height:28.99%;z-index:6;pointer-events:none}
.crying .cry-face{display:block}.cry-eye{position:absolute;top:38%;width:22%;height:12%;border-top:3px solid #473040;border-radius:50%}.eye-left{left:12%;transform:rotate(-17deg)}.eye-right{right:12%;transform:rotate(17deg)}.cry-mouth{position:absolute;left:37%;top:63%;width:26%;height:18%;background:#713847;border:1px solid #ffcfb8;border-radius:60% 60% 30% 30%}.tear{position:absolute;top:44%;width:12%;height:29%;border-radius:60% 40% 60% 60%;background:linear-gradient(#dbfbff,#60bded);animation:tear-drop .5s ease-in infinite}.tear-left{left:13%}.tear-right{right:13%;animation-delay:.2s}
.crying .figure-wrap{animation:cry-shake .16s ease-in-out 7}.crying .sprite-body{animation:cry-cower .35s ease-in-out 4;transform-origin:80px 180px}.crying .portrait-face{animation:cry-photo .35s ease-in-out 4}
.reward-recap{position:absolute;top:16%;left:8%;right:8%;z-index:25;text-align:center;font-size:12px;line-height:1.5;color:#fff3ad;text-shadow:0 2px 5px #14323c;pointer-events:none}.round-battle .upgrade-announcements{font-size:12px;font-weight:bold}.round-battle .upgrade-announcements p{margin:4px}.round-battle.phase-reward .arena-bottom{max-height:44%}
.round-battle .bottom-controls{gap:8px;display:flex;align-items:center}.round-battle .bottom-controls .metric{margin-right:auto}.round-battle .bottom-controls button{white-space:nowrap;min-height:36px}
@keyframes tear-drop{to{transform:translateY(45%);opacity:.15}}@keyframes cry-shake{0%,100%{translate:0}50%{translate:3px}}@keyframes cry-cower{50%{transform:translateY(6px) rotate(-5deg)}}@keyframes cry-photo{50%{translate:0 3px;rotate:-5deg}}
@media(orientation:landscape) and (max-height:540px){.round-battle .forest-arena{gap:32%;padding:0 5%!important}.round-battle .forest-arena .ground-fighters{top:35%;height:55%}.round-battle.phase-reward .arena-bottom{max-height:76%}.reward-recap{top:22%;left:25%;right:25%;font-size:10px}}
@media(prefers-reduced-motion:reduce){.crying .figure-wrap,.crying .sprite-body,.crying .portrait-face,.tear{animation:none}}
/* Your character remains draggable even after being placed over a teammate. */
.round-battle .ground-fighters .round-fighter[data-own=true]{z-index:18}
/* Confirmation-led rounds: large readable questions, central action selection. */
.battle-screen .phase-answer .arena-bottom{top:12%;bottom:7%;left:3%;right:3%;width:94%;max-width:none;max-height:none;transform:none;display:flex;align-items:center;justify-content:center;overflow:auto;pointer-events:auto}
.battle-screen .phase-answer .question-box{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:center;gap:12px;padding:20px;box-sizing:border-box}
.battle-screen .phase-answer .question-title{font-size:clamp(26px,4vw,48px);line-height:1.45;margin:10px 0}
.battle-screen .phase-answer .question-options{width:min(100%,900px);margin:12px auto;gap:18px}
.battle-screen .phase-answer .answer-button{min-height:90px;font-size:clamp(25px,3vw,40px);opacity:.8}
.battle-screen .phase-answer .chip{min-height:64px;font-size:25px;opacity:.8}
.battle-screen .phase-answer .question-title,.battle-screen .phase-answer .question-type,.battle-screen .phase-answer .phase-sub,.battle-screen .phase-answer .question-tools,.listening-note{opacity:.8}
.battle-screen .phase-action .arena-bottom{top:50%;bottom:auto;left:50%;right:auto;transform:translate(-50%,-50%);width:min(92vw,740px);max-width:none;max-height:78dvh;overflow:auto;pointer-events:auto}
.action-panel{padding:20px 8px}.action-panel .phase-title{font-size:clamp(24px,3vw,36px);line-height:1.4}
.battle-screen .action-panel .spell-grid{gap:18px;margin:22px auto}.battle-screen .action-panel .spell-option{min-height:190px;padding:22px 12px;opacity:.8}.action-panel .glyph{font-size:56px}.action-panel .spell-option strong{font-size:22px}.action-panel .spell-option small{font-size:15px}
.battle-screen .phase-target .arena-bottom,.battle-screen .phase-feedback .arena-bottom,.battle-screen .phase-waiting .arena-bottom{max-height:32%;pointer-events:auto}
.battle-screen .arena-bottom .btn{opacity:.8}.confirm-controls{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.listening-note{margin:0;color:#fff;font-weight:700;text-shadow:0 2px 5px #071a17}
.ground-tint{position:absolute;top:36%;bottom:0;width:50%;pointer-events:none;z-index:1;clip-path:polygon(0 12%,100% 0,100% 100%,0 100%)}
.ground-red{left:0;background:rgba(255,35,45,.2)}.ground-blue{right:0;background:rgba(25,100,255,.2);clip-path:polygon(0 0,100% 12%,100% 100%,0 100%)}
.forest-arena>.round-team{position:relative;z-index:2}.field-divider{z-index:2}
@media(max-width:600px){.battle-screen .phase-answer .question-box{padding:12px 4px;gap:8px}.battle-screen .phase-answer .question-options{gap:12px}.battle-screen .phase-answer .answer-button{min-height:84px}.battle-screen .action-panel .spell-grid{gap:8px}.battle-screen .action-panel .spell-option{min-height:180px;padding:16px 6px}.action-panel .spell-option strong{font-size:18px}.action-panel .spell-option small{font-size:12px}.action-panel .glyph{font-size:44px}}
@media(max-height:520px){.battle-screen .phase-answer .arena-bottom{top:15%;bottom:8%;align-items:stretch}.battle-screen .phase-answer .question-box{gap:4px;padding:6px;justify-content:flex-start}.battle-screen .phase-answer .question-title{font-size:25px;margin:2px}.battle-screen .phase-answer .answer-button{min-height:55px;font-size:27px}.battle-screen .phase-answer .question-options{margin:4px auto;gap:8px}.battle-screen .phase-answer .chip{min-height:40px;font-size:21px}.battle-screen .action-panel .spell-option{min-height:125px;padding:12px}.action-panel{padding:4px}.battle-screen .action-panel .spell-grid{margin:10px auto}.action-panel .glyph{font-size:36px}}
/* Live support spells stay above question UI and survive board rerenders. */
.support-wave{color:var(--wave-color);font-size:30px;line-height:1;text-align:center;border-radius:50%;background:radial-gradient(circle,#fff 0%,var(--wave-color) 28%,transparent 72%);filter:drop-shadow(0 0 10px var(--wave-color));z-index:90!important}
.support-trail{filter:drop-shadow(0 0 6px #c9fff0);z-index:88!important}.support-credit{font-size:14px;text-align:center;font-weight:900;text-shadow:0 2px 5px #092d38;z-index:91!important;animation:support-credit-rise 2.2s ease-out both}
@keyframes support-credit-rise{0%{opacity:0;transform:translateY(10px)}15%,70%{opacity:1}100%{opacity:0;transform:translateY(-22px)}}
.team-leaders{position:absolute;top:55px;width:calc(50% - 22px);max-width:390px;z-index:24;color:#fff5df;text-shadow:0 2px 4px #12323f;pointer-events:none;font-size:12px;line-height:1.45;text-align:left}
.team-leaders.left{left:10px}.team-leaders.right{right:10px;text-align:right}.team-leaders h3{margin:0 0 4px;font-size:15px}.leader-row{margin:3px 0;overflow-wrap:anywhere}.leader-row b{color:#ffe3a1}.team-leaders.right .leader-row b{color:#b4eaff}
.battle-screen .personal-stats-toggle{opacity:.85!important;color:#fff;font-weight:800;white-space:nowrap}.stats-dialog{position:absolute;inset:18% 6% auto;max-height:65%;overflow:auto;background:#12323fee;border:1px solid #d7f2ed80;border-radius:22px;padding:22px;color:#fff;z-index:100;text-align:center;box-shadow:0 14px 45px #001b3c88}.stats-dialog h2{margin-top:0}.stats-dialog .stat-lines{display:grid;gap:12px;text-align:left;font-size:18px;line-height:1.5}.stats-dialog .stat-lines b{float:right;color:#ffe4a4}.stats-dialog .btn{margin-top:20px;opacity:1}.personal-support-notice{position:absolute;top:34%;left:10%;right:10%;z-index:92;pointer-events:none;text-align:center;font-weight:900;color:#ccffe6;text-shadow:0 2px 5px #12323f;font-size:15px;animation:support-credit-rise 3s both}
@media(max-width:600px){.team-leaders{top:64px;font-size:10px;width:calc(50% - 16px);line-height:1.35}.team-leaders h3{font-size:12px}.leader-row{margin:2px 0}.round-battle .forest-arena .round-team h3{top:21%}.round-battle .forest-arena .angel-zone{top:24%}.round-battle .forest-arena .ground-fighters{top:35%;height:39%}.round-battle .bottom-controls .metric{font-size:9px;gap:2px}.round-battle .bottom-controls{gap:4px}.round-battle .bottom-controls button{font-size:10px}.stats-dialog{inset:19% 4% auto;padding:18px}.stats-dialog .stat-lines{font-size:16px}}
@media(orientation:landscape) and (max-height:540px){.team-leaders{top:48px;font-size:9px;line-height:1.25;width:27%}.team-leaders h3{font-size:11px}.round-battle .forest-arena .round-team h3{top:33%}.round-battle .forest-arena .ground-fighters{top:47%;height:40%}.stats-dialog{inset:12% 20% auto;max-height:70%;padding:12px}.stats-dialog .stat-lines{font-size:14px;gap:4px}}
.spell-upgrade-banner{width:min(470px,86vw);grid-template-columns:48px 1fr;padding:10px 14px}.spell-upgrade-banner svg{width:48px;height:48px}.spell-upgrade-banner strong{font-size:16px;line-height:1.45}.result-personal-stats{max-width:560px;margin:24px auto;padding:20px;color:#544467}.result-personal-stats .stat-lines{display:grid;gap:10px}.result-personal-stats b{float:right}
@media(max-width:600px){.spell-upgrade-banner{top:190px!important}.spell-upgrade-banner strong{font-size:13px}.spell-upgrade-banner small{font-size:10px}.battle-screen .phase-upgrade .arena-bottom{pointer-events:none}}
/* Only confirmed room entry and the battlefield require landscape. */
#landscape-prompt{display:none}
@media(orientation:portrait){
 body.needs-landscape{overflow:hidden!important;background:#173944}
 body.needs-landscape :is(#app,#voice-panel,#toast,.ambient,.decor,.magic-fx,.spell-upgrade-banner){visibility:hidden!important;pointer-events:none!important}
 body.needs-landscape #landscape-prompt{position:fixed;inset:0;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:max(28px,env(safe-area-inset-top)) 26px max(28px,env(safe-area-inset-bottom));text-align:center;color:#fff4d4;background:radial-gradient(ellipse at 50% 35%,#325c61,#102b3b 80%);font-family:inherit}
 #landscape-prompt h1{font-size:clamp(23px,5vw,38px);line-height:1.4;margin:0;color:#ffdf93}
 #landscape-prompt p{font-size:18px;line-height:1.8;margin:0;max-width:520px}
 #landscape-prompt .rotate-hint{font-size:13px;color:#c2d9da;margin-top:14px}
 .rotate-device{position:relative;width:118px;height:72px;border:4px solid #ffe1a0;border-radius:16px;font-size:58px;line-height:62px;color:#ffe1a0;box-shadow:0 0 30px #ffe1a025;margin-bottom:22px}
 .rotate-device span{position:absolute;right:-20px;top:-27px;font-size:32px;color:#9cffe1}
}
@media(orientation:landscape) and (max-height:540px){
 .round-battle .arena-top{left:max(8px,env(safe-area-inset-left));right:calc(58px + env(safe-area-inset-right));padding-top:2px;min-height:40px}
 .round-battle .arena-top .round-clock strong{font-size:16px;line-height:19px}
 .team-leaders{top:44px;width:24%;font-size:9px;max-height:24%;overflow:auto;pointer-events:auto}
 .team-leaders.left{left:max(10px,env(safe-area-inset-left))}.team-leaders.right{right:max(10px,env(safe-area-inset-right))}
 .round-battle .forest-arena{gap:44%;padding-left:max(3%,env(safe-area-inset-left))!important;padding-right:max(3%,env(safe-area-inset-right))!important}
 .round-battle .forest-arena .round-team h3{top:30%;font-size:10px}
 .round-battle .forest-arena .angel-zone{top:22%;height:16%}
 .round-battle .forest-arena .ground-fighters{top:38%;height:54%}
 .round-battle .forest-arena .figure-wrap{height:44px;width:44px}
 .round-battle .forest-arena .ground-fighters .round-fighter{width:46px}
 .round-battle .forest-arena .sky-fighters .figure-wrap{height:36px;width:36px}
 .battle-screen .phase-answer .arena-bottom{left:27%;right:27%;top:13%;bottom:11%;width:46%}
 .battle-screen .phase-answer .question-box{padding:4px;gap:3px;min-height:0;justify-content:center}
 .battle-screen .phase-answer .question-title{font-size:clamp(19px,2.7vw,26px);line-height:1.3}
 .battle-screen .phase-answer .answer-button{min-height:44px;min-width:44px;padding:5px;font-size:26px}
 .battle-screen .phase-answer .question-options{gap:6px;margin:4px auto}
 .battle-screen .phase-answer .chip{min-width:36px;min-height:36px;font-size:20px}
 .battle-screen .phase-answer .syllable-row{gap:6px}.battle-screen .phase-answer .compose-line{display:none}
 .battle-screen .phase-answer .question-type,.battle-screen .phase-answer .listening-note{font-size:10px}
 .battle-screen .phase-action .arena-bottom{width:48%;max-height:78dvh}
 .action-panel .phase-title{font-size:21px}.battle-screen .action-panel .spell-grid{gap:5px;flex-wrap:nowrap}
 .battle-screen .action-panel .spell-option{min-width:0;flex:1;min-height:110px;padding:5px!important}
 .action-panel .spell-option strong{font-size:16px}.action-panel .spell-option small{font-size:11px}
 .round-battle.phase-reward .arena-bottom{left:27%;right:27%;max-height:78%;bottom:35px}
 .round-battle.phase-reward .upgrade-grid{gap:4px;flex-wrap:nowrap}.round-battle .upgrade-option{min-width:0;flex:1}.round-battle .upgrade-icon{width:38px;height:38px}
 .round-battle .bottom-controls{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right))}
 .stats-dialog{inset:8% 20% auto;max-height:84%;box-sizing:border-box}.stats-dialog h2{font-size:18px;margin-bottom:8px}.stats-dialog p{font-size:11px;margin:6px 0}.stats-dialog .btn{margin-top:4px;min-height:32px;padding:5px}
 .spell-upgrade-banner{top:45px!important;width:min(420px,48vw);padding:8px;grid-template-columns:36px 1fr}.spell-upgrade-banner svg{width:36px;height:36px}.spell-upgrade-banner strong{font-size:12px}
}
@media(orientation:landscape) and (max-height:540px){
 .battle-screen .phase-target .arena-bottom,.battle-screen .phase-feedback .arena-bottom,.battle-screen .phase-resolve .arena-bottom,.battle-screen .phase-upgrade .arena-bottom{top:34%;bottom:12%;left:28%;right:28%;max-height:none;display:flex;flex-direction:column;justify-content:center;gap:6px}
 .battle-screen .phase-target .phase-title,.battle-screen .phase-feedback .phase-title,.battle-screen .phase-resolve .phase-title{font-size:20px;line-height:1.3;margin:2px 0}
 .battle-screen .phase-target .arena-bottom .btn{min-height:36px;padding:4px;margin:0}
}
@media(orientation:landscape) and (min-height:541px) and (max-width:1366px){
 .round-battle .forest-arena{gap:40%;padding:0 3%!important}
 .round-battle .forest-arena .ground-fighters{top:29%;height:56%}
 .round-battle .forest-arena .round-team h3{top:19%}
 .team-leaders{width:25%;font-size:11px}.team-leaders h3{font-size:13px}
 .battle-screen .phase-answer .arena-bottom{left:26%;right:26%;width:48%;top:15%;bottom:12%}
 .battle-screen .phase-answer .question-title{font-size:32px}.battle-screen .phase-answer .answer-button{min-height:64px;font-size:30px}
 .battle-screen .phase-action .arena-bottom{width:44%}.action-panel .phase-title{font-size:26px}.battle-screen .action-panel .spell-grid{gap:8px}
 .action-panel .spell-option strong{font-size:18px}.action-panel .spell-option small{font-size:12px}
 .round-battle.phase-reward .arena-bottom{left:27%;right:27%;max-height:65%}
}

/* Moderation is enforced by the server; this overlay explains the temporary pause. */
.restriction-overlay{position:fixed;inset:0;z-index:900;background:rgba(18,18,40,.65);display:grid;place-items:center;padding:16px;backdrop-filter:blur(5px)}
.restriction-overlay>div{background:#fff8ed;border:2px solid #d9c2ef;border-radius:24px;text-align:center;max-width:650px;max-height:94dvh;overflow:auto;padding:22px 38px;color:#332947;box-shadow:0 14px 60px #0005}
.restriction-overlay h2{margin:5px;font-size:28px}.restriction-overlay p{line-height:1.6}.restriction-overlay strong{font-size:25px;color:#7345ad}.rest-icon{font-size:30px}
.player-restricted .arena-bottom,.player-restricted .bottom-controls{visibility:hidden}.player-restricted #voice-panel{display:none!important}
@media(max-height:500px){.restriction-overlay>div{padding:12px 24px}.restriction-overlay p{margin:6px}}
/* Eleven full-body figures per side, with a separate compact angel formation. */
.round-battle.large-party .forest-arena{gap:36%;padding:0 2%!important}
.round-battle.large-party .forest-arena .round-team h3{top:24%;font-size:11px}
.round-battle.large-party .forest-arena .ground-fighters{top:35%;height:57%}
.round-battle.large-party .forest-arena .ground-fighters .round-fighter{width:clamp(44px,5.8vw,78px)}
.round-battle.large-party .forest-arena .figure-wrap{width:clamp(32px,4.7vw,65px);height:clamp(32px,6.2dvh,65px)}
.round-battle.large-party .forest-arena .overhead-name{font-size:10px;line-height:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.round-battle.large-party .forest-arena .hp-meter{height:10px;margin:1px auto;width:90%}
.round-battle.large-party .forest-arena .hp-meter b{font-size:9px;line-height:10px}
.round-battle.large-party .forest-arena .fighter-badge,.round-battle.large-party .forest-arena .gear-mini{display:none}
.round-battle.large-party .forest-arena .angel-zone{top:15%;height:19%}
.round-battle.large-party .forest-arena .sky-label{display:none}
.round-battle.large-party .forest-arena .sky-fighters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;align-content:start}
.round-battle.large-party .forest-arena .sky-fighters .round-fighter{width:100%;min-width:0}
.round-battle.large-party .forest-arena .sky-fighters .figure-wrap{width:27px;height:25px}
.round-battle.large-party .forest-arena .sky-fighters .overhead-name{font-size:8px;line-height:9px}
.round-battle.large-party .forest-arena .sky-fighters .hp-meter{display:none}
.round-battle.large-party .team-leaders{width:30%;max-height:15%;overflow:auto;pointer-events:auto;font-size:10px}
.round-battle.large-party .team-leaders h3{font-size:11px}
.battle-screen .large-party.phase-answer .arena-bottom{left:33%;right:33%;width:34%}
.battle-screen .large-party.phase-action .arena-bottom{width:34%}
.battle-screen .large-party.phase-target .arena-bottom,.battle-screen .large-party.phase-feedback .arena-bottom,.battle-screen .large-party.phase-resolve .arena-bottom,.battle-screen .large-party.phase-upgrade .arena-bottom,.battle-screen .large-party.phase-reward .arena-bottom{left:33%;right:33%}
.large-party .action-panel .spell-grid{flex-wrap:wrap;gap:5px}
.large-party .action-panel .spell-option{min-height:60px!important;padding:5px!important}
.large-party .action-panel .spell-option small{display:none}
.large-party .action-panel .glyph{font-size:27px}
.large-party .action-panel .spell-option strong{font-size:14px}
@media(max-height:540px){
 .round-battle.large-party .forest-arena .round-team h3{top:28%;font-size:9px}
 .round-battle.large-party .forest-arena .ground-fighters{top:34%;height:58%}
 .round-battle.large-party .forest-arena .figure-wrap{height:30px;width:34px}
 .round-battle.large-party .forest-arena .angel-zone{top:18%;height:15%}
 .round-battle.large-party .forest-arena .sky-fighters .figure-wrap{height:18px;width:22px}
 .round-battle.large-party .team-leaders{font-size:8px;max-height:14%;top:40px;line-height:1.1}
 .round-battle.large-party .team-leaders h3{font-size:9px;margin-bottom:0}
 .round-battle.large-party .team-leaders .leader-row{margin:1px 0}
 .battle-screen .large-party.phase-answer .question-title{font-size:20px}
 .battle-screen .large-party.phase-answer .answer-button{font-size:22px;min-height:40px}
}
.round-battle.large-party .arena-top .arena-tag{flex-basis:110px;white-space:nowrap;font-size:10px}
.round-battle.large-party .forest-arena .round-team h3{display:none}
.round-battle.large-party .forest-arena .angel-zone{top:21%;height:13%}
@media(max-height:540px){.round-battle.large-party .forest-arena .sky-fighters .figure-wrap{height:15px;width:20px}.round-battle.large-party .forest-arena .sky-fighters .overhead-name{font-size:7px;line-height:8px}}
/* Larger, readable reward artwork: twice the width and height = four times the area. */
.battle-screen .round-battle.phase-reward .arena-bottom{left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);width:min(94vw,900px);max-width:none;max-height:calc(100dvh - 100px);padding:12px!important;box-sizing:border-box}
.battle-screen .phase-reward .upgrade-grid{gap:24px;max-width:none;flex-wrap:nowrap;align-items:stretch}
.battle-screen .phase-reward .upgrade-option{opacity:.8;flex:1;min-width:0;max-width:230px;min-height:200px;gap:8px;border-radius:20px}
.battle-screen .phase-reward .upgrade-option:hover:not(:disabled),.battle-screen .phase-reward .upgrade-option:focus-visible{opacity:1}
.battle-screen .phase-reward .upgrade-option:disabled{opacity:.8;filter:grayscale(1);cursor:default}
.battle-screen .phase-reward .upgrade-icon{width:104px;height:104px;flex-shrink:0}
.battle-screen .phase-reward .upgrade-option strong{font-size:22px}
.battle-screen .phase-reward .upgrade-option small,.battle-screen .phase-reward .upgrade-option b{font-size:15px}
/* sqrt(1.5) linear enlargement keeps question and answer glyphs proportionate. */
.battle-screen .round-battle.phase-answer .question-title{font-size:clamp(32px,4.9vw,59px)}
.battle-screen .round-battle.phase-answer .answer-button{min-height:110px;font-size:clamp(31px,3.67vw,49px)}
.battle-screen .round-battle.phase-answer .chip{min-height:78px;font-size:31px}
.battle-screen .round-battle.large-party.phase-answer .arena-bottom{left:29.18%;right:29.18%;width:41.64%}
@media(orientation:landscape) and (max-height:540px){
 .battle-screen .round-battle.phase-reward .arena-bottom{max-height:calc(100dvh - 70px);width:min(90vw,760px);padding:6px!important}
 .battle-screen .phase-reward .upgrade-grid{gap:12px;margin:6px auto}
 .battle-screen .phase-reward .upgrade-icon{width:76px;height:76px}
 .battle-screen .phase-reward .upgrade-option{max-width:200px;min-height:156px;gap:4px}
 .battle-screen .phase-reward .upgrade-option strong{font-size:19px}
 .battle-screen .phase-reward .upgrade-option small,.battle-screen .phase-reward .upgrade-option b{font-size:13px}
 .battle-screen .round-battle.phase-answer .arena-bottom{left:21.83%;right:21.83%;top:9%;bottom:7%;width:56.34%}
 .battle-screen .round-battle.large-party.phase-answer .arena-bottom{left:29.18%;right:29.18%;width:41.64%}
 .battle-screen .round-battle.phase-answer .question-title{font-size:clamp(24px,3.3vw,32px);line-height:1.3}
 .battle-screen .round-battle.phase-answer .answer-button{min-width:54px;min-height:54px;font-size:32px}
 .battle-screen .round-battle.phase-answer .chip{min-width:44px;min-height:44px;font-size:25px}
}
/* Keep touch scrolling on short displays without a bright scrollbar over the field. */
.battle-screen .round-battle.phase-answer .arena-bottom,.battle-screen .round-battle.phase-reward .arena-bottom{scrollbar-width:none}
.battle-screen .round-battle.phase-answer .arena-bottom::-webkit-scrollbar,.battle-screen .round-battle.phase-reward .arena-bottom::-webkit-scrollbar{display:none}
/* Frosted panels: opacity belongs to the backing, never the text or artwork. */
.battle-screen .round-battle.phase-answer .arena-bottom,.battle-screen .round-battle.phase-reward .arena-bottom{
 background:linear-gradient(135deg,rgba(34,65,72,.90),rgba(27,43,62,.88))!important;
 backdrop-filter:blur(18px) saturate(125%);-webkit-backdrop-filter:blur(18px) saturate(125%);
 border:1px solid #e9f6ff70;border-radius:24px;box-shadow:0 12px 44px #071c4260,inset 0 1px 0 #ffffff30;
 padding:18px!important;isolation:isolate;
}
.battle-screen .question-box .question-title,.battle-screen .question-box .question-type,.battle-screen .question-box .compose-line{opacity:1}
.victory-face,.cheer-spark{display:none}
.victory-cheering .victory-face{display:block}.victory-cheering .resting-eyes,.victory-cheering .resting-mouth{visibility:hidden}
.victory-cheering .figure-wrap{animation:victory-hop .8s ease-in-out infinite;animation-delay:var(--delay)}
.victory-cheering .casting-arm{animation:victory-wave .65s ease-in-out infinite;transform-origin:100px 100px}
.victory-cheering .cheer-spark{display:block;position:absolute;top:-16%;left:-15%;width:130%;font-size:clamp(12px,2vw,22px);white-space:nowrap;text-align:center;filter:drop-shadow(0 0 5px #ffdf81)}
.victory-cheering .cry-face{display:none!important}
.phase-finished .round-fighter{pointer-events:none;opacity:1!important}.phase-finished .round-clock{visibility:hidden}
.victory-opening{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);z-index:30;color:#ffecab;font-weight:900;font-size:clamp(24px,5vw,56px);text-align:center;white-space:nowrap;text-shadow:0 3px 9px #17333d,0 0 25px #d69a35;pointer-events:none}
.victory-board{position:absolute;z-index:45;left:50%;top:50%;transform:translate(-50%,-50%);box-sizing:border-box;width:min(640px,88vw);max-height:calc(100dvh - 76px);overflow:auto;padding:26px 30px;text-align:center;border:1px solid #ffeac48c;border-radius:28px;background:linear-gradient(140deg,#203e4bf5,#27334cec);backdrop-filter:blur(22px) saturate(120%);-webkit-backdrop-filter:blur(22px) saturate(120%);color:#fff4d5;box-shadow:0 18px 70px #07182180,inset 0 1px 0 #fff7cd40;animation:victory-board-in .35s ease-out}
.victory-trophy{font-size:46px}.victory-board h1{font-size:clamp(25px,4vw,38px);color:#ffe29c;margin:6px 0 16px}.victory-board h2{font-size:16px;color:#e9efe5;margin:10px 0}.victory-names{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 16px;list-style:none;padding:0;margin:10px 0}.victory-names li{font-weight:800;font-size:18px;overflow-wrap:anywhere;max-width:100%}.victory-honors{margin-top:20px;padding-top:12px;border-top:1px solid #ffffff2e}.victory-champion{color:#ffe49a;text-shadow:0 0 6px #ffc74b,0 0 18px #f0a83a;animation:champion-glow 1.5s ease-in-out infinite alternate}.victory-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:20px}.victory-actions button{min-height:44px}
.victory-confetti{position:fixed;inset:0;z-index:44;overflow:hidden;pointer-events:none}.victory-confetti i{position:absolute;left:var(--x);top:-40px;width:9px;height:16px;background:var(--color);border-radius:2px;animation:confetti-fall var(--fall) var(--start) cubic-bezier(.18,.45,.6,1) both}.victory-confetti .ribbon{width:6px;height:55px;background:repeating-linear-gradient(145deg,var(--color) 0 12px,#fff8 13px 17px);border-radius:60% 20% 60% 20%}
@keyframes victory-hop{0%,100%{translate:0 0;rotate:-3deg}45%{translate:0 -16px;rotate:4deg}65%{translate:0 -13px}}
@keyframes victory-wave{0%,100%{transform:rotate(-105deg)}50%{transform:rotate(-135deg)}}
@keyframes champion-glow{to{text-shadow:0 0 9px #fff2b5,0 0 25px #ffc551}}
@keyframes confetti-fall{0%{opacity:0;transform:translateY(-20px) rotate(0)}10%,85%{opacity:1}100%{opacity:0;transform:translate(var(--drift),105dvh) rotate(var(--spin))}}
@keyframes victory-board-in{from{opacity:0;margin-top:15px}to{opacity:1;margin-top:0}}
@media(orientation:landscape) and (max-height:540px){
 .battle-screen .round-battle.phase-answer .arena-bottom,.battle-screen .round-battle.phase-reward .arena-bottom{padding:10px!important;border-radius:18px}
 .victory-board{width:min(640px,82vw);max-height:calc(100dvh - 42px);padding:12px 22px;border-radius:20px}.victory-trophy{font-size:27px}.victory-board h1{margin:3px 0 8px;font-size:26px}.victory-board h2{font-size:13px;margin:5px 0}.victory-names{gap:5px 12px;margin:6px 0}.victory-names li{font-size:15px}.victory-honors{margin-top:9px;padding-top:6px}.victory-actions{margin-top:10px}
}
@media(prefers-reduced-motion:reduce){.victory-cheering .figure-wrap,.victory-cheering .casting-arm,.victory-champion,.victory-board{animation:none!important}.victory-cheering .casting-arm{transform:rotate(-110deg)}.victory-confetti i{animation-duration:6s;--drift:0px;--spin:0deg}}
.phase-finished .stats-dialog{z-index:55}
.battle-screen .round-battle.phase-answer .arena-bottom,.battle-screen .round-battle.phase-reward .arena-bottom{z-index:30}
