#raidDialog{width:min(900px,96vw);max-height:94dvh;box-sizing:border-box;overflow:auto;border:1px solid #b19a60;border-radius:20px;padding:24px;color:#f3ead3;background:linear-gradient(145deg,#141927,#29203a);box-shadow:0 20px 90px #000b}
#raidDialog::backdrop{background:#030510db}#raidDialog [hidden]{display:none!important}
#raidDialog h2,#raidDialog h3,#raidDialog p{margin:12px 0}#raidDialog button{min-height:44px}#raidDialog progress{width:100%;height:15px;accent-color:#e9b764}
.raid-head,.raid-event-head,.raid-stats{display:flex;justify-content:space-between;gap:14px;align-items:center;flex-wrap:wrap}.raid-head small{letter-spacing:.12em;font-size:11px;color:#d3b87e}
.raid-seals{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin:18px 0}.raid-seals span{border:1px solid #625a75;border-radius:9px;padding:10px;text-align:center;font-size:12px;color:#b6adc4}.raid-seals .current{color:#ffe2a0;border-color:#edbb6a}.raid-seals .sealed{color:#91e0cb;border-color:#63bda4}
.raid-stats{padding:12px;border-radius:10px;background:#ffffff09}.raid-fields{display:flex;gap:15px;margin:18px 0}.raid-fields label{display:flex;flex:1;flex-direction:column;gap:8px}.raid-fields select{padding:12px;border:1px solid #83708b;border-radius:9px;background:#211b30;color:#fff;font-size:16px}
#raidQuestion{white-space:pre-wrap;line-height:1.7}#raidAnswers{display:grid;gap:10px;grid-template-columns:1fr 1fr}#raidAnswers button{padding:14px;text-align:left;white-space:normal;background:#27253d;color:#fff;border:1px solid #776983;border-radius:12px}#raidAnswers button span{margin-right:12px;color:#ffcf7d}#raidDialog button:disabled{opacity:.5}#raidReview,#raidSummary{line-height:1.7;white-space:pre-wrap}#raidNotice{color:#ffd897}#raidMedia{background:#faf8f2;border-radius:10px;color:#161b26}#raidMedia img{max-width:100%}.raid-empty{padding:36px 12px;line-height:1.9}#raidRefresh{margin-top:20px}
@media(max-width:600px){#raidDialog{padding:16px;max-height:96dvh;width:98vw}.raid-seals{grid-template-columns:repeat(3,1fr)}#raidAnswers{grid-template-columns:1fr}.raid-event-head span{font-size:12px}.raid-head h2{font-size:23px}}

/* Layered battlefield: all sprites retain their native proportions. */
.raid-stage{position:relative;height:clamp(280px,45dvh,460px);margin:14px 0;overflow:hidden;border-radius:14px;background:#101827;border:1px solid #726044;isolation:isolate}
.raid-scenery{position:absolute;inset:0;z-index:-2;background:linear-gradient(0deg,#050c1899,transparent 40%,#050c1833),url('assets/raids/starcore/arena-background.png') center 57%/cover no-repeat}
.raid-boss-wrap{position:absolute;inset:1% 0 5%;display:flex;justify-content:center;align-items:center;z-index:-1}
.raid-boss{height:100%;width:100%;object-fit:contain;object-position:50% 50%;filter:drop-shadow(0 0 12px #d4b26e35)}
.raid-stage[data-phase="2"] .raid-boss{transform:scale(1.02)}
.raid-stage[data-phase="3"] .raid-boss{transform:scale(1.03)}
.raid-phase{position:absolute;top:12px;left:12px;max-width:calc(100% - 48px);border:1px solid #d5bd7d70;border-radius:20px;padding:7px 12px;background:#08111de8;color:#f4dfaa;font-size:13px;z-index:3}
.raid-party{position:absolute;inset:0;pointer-events:none}
.raid-hero{position:absolute;bottom:3%;height:42%;width:36%;object-fit:contain;object-position:50% 100%;filter:drop-shadow(0 8px 7px #000b)}
.raid-player{left:32%;height:45%;z-index:2}
.raid-ally-left{left:8%;height:36%;opacity:.86}
.raid-ally-right{right:8%;height:36%;opacity:.86}
.raid-stage-caption{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;gap:8px;align-items:center;padding:8px 12px;background:linear-gradient(transparent,#030916e8);font-size:12px;z-index:3;color:#fff}
.raid-stage-caption small{font-size:10px;color:#d3cbb8}
.raid-impact{position:absolute;left:calc(50% - 60px);top:calc(45% - 60px);width:120px;height:120px;border-radius:50%;background:radial-gradient(circle,#fff 0 4%,#ffe39a 5%,#68dfff88 20%,transparent 65%);opacity:0;pointer-events:none;z-index:4}
.raid-float{position:absolute;top:35%;left:0;right:0;text-align:center;font-size:clamp(19px,3vw,26px);font-weight:900;color:#fff0aa;text-shadow:0 2px 4px #000,0 0 12px #000;pointer-events:none;z-index:5}
.raid-float[data-kind="wrong"]{color:#ffb5b5}
.raid-art-fallback{font-size:140px;color:#efc365;text-shadow:0 0 25px #aa914c}
.raid-victory{display:none;position:absolute;top:42%;left:0;right:0;text-align:center;color:#fff1b6;font-size:32px;font-weight:bold;text-shadow:0 0 18px #547c66,0 2px 5px #000;z-index:3}
.raid-stage[data-phase="0"] .raid-victory{display:block}
.raid-stage[data-phase="0"] .raid-boss{opacity:.25;filter:grayscale(1)}
#raidDialog button:focus-visible,#raidDialog select:focus-visible{outline:3px solid #9eeaff;outline-offset:3px}
#raidDialog{scrollbar-gutter:stable;overflow-x:hidden}#raidDialog *{box-sizing:border-box}
#raidQuestion,#raidAnswers button,#raidScope{overflow-wrap:anywhere}
#raidMedia{max-width:100%;overflow-x:auto}#raidMedia table{max-width:100%}
#raidDialog progress{transition:none}
@media(max-width:600px){.raid-stage{height:clamp(260px,38dvh,340px)}.raid-head{gap:8px}.raid-head small{font-size:9px}.raid-fields{gap:8px}.raid-fields label{min-width:0}.raid-stats{gap:8px;font-size:13px}.raid-phase{font-size:12px}#raidAnswers button{min-height:52px}.raid-seals{margin:12px 0}.raid-seals span{padding:7px}}
@media(prefers-reduced-motion:reduce){#raidDialog *,#raidDialog *::before,#raidDialog *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

#raidDialog{container-type:inline-size}
@container(max-width:600px){.raid-stage{height:280px}.raid-head{gap:8px}.raid-head h2{font-size:23px}.raid-head small{font-size:9px}.raid-fields{gap:8px}.raid-fields label{min-width:0}.raid-stats{gap:8px;font-size:13px}.raid-phase{font-size:12px}.raid-event-head span{font-size:12px}.raid-seals{grid-template-columns:repeat(3,1fr);margin:12px 0}.raid-seals span{padding:7px}#raidAnswers{grid-template-columns:1fr}#raidAnswers button{min-height:52px}}

/* Multi-layer bursts stay inside the battlefield and never intercept answers. */
.raid-fx-layer{position:absolute;inset:0;pointer-events:none;z-index:4;overflow:hidden}
.raid-fx{position:absolute;display:block;pointer-events:none;opacity:0}
.raid-rune{width:130px;height:130px;line-height:126px;border:2px solid currentColor;border-radius:50%;text-align:center;font-size:100px;font-style:normal;text-shadow:0 0 14px currentColor;box-shadow:0 0 16px currentColor,inset 0 0 18px currentColor}
.raid-rune::after{content:'';position:absolute;inset:12px;border:1px dashed currentColor;border-radius:50%}
.raid-slash{width:68%;height:9px;translate:-50% -50%;background:linear-gradient(90deg,transparent,#ffcb70 15%,#fffbe1 50%,#ffcb70 85%,transparent);box-shadow:0 0 18px #ffd06f;border-radius:50%}
.raid-spark{width:6px;height:13px;border-radius:50%;box-shadow:0 0 8px currentColor}
.raid-bolt{width:23px;height:70px;translate:-50% -50%;border-radius:50%;background:linear-gradient(0deg,transparent,currentColor,#fff);box-shadow:0 0 22px currentColor;rotate:5deg}
.raid-holy-beam{width:18px;height:90%;translate:-50% -50%;background:linear-gradient(90deg,transparent,currentColor,#fff,currentColor,transparent);box-shadow:0 0 30px currentColor;border-radius:50%}
.raid-enemy-beam{width:32px;height:55%;translate:-50% -50%;background:linear-gradient(90deg,transparent,#bb356a,#ffd8e4,#bb356a,transparent);border-radius:50%;box-shadow:0 0 35px #bd3264;transform-origin:50% 0}
.raid-stage[data-boss="ember"] .raid-scenery{filter:sepia(.25) saturate(1.2)}
.raid-stage[data-boss="tide"] .raid-scenery{filter:hue-rotate(12deg) saturate(.8)}
.raid-stage[data-boss="verdant"] .raid-scenery{filter:hue-rotate(55deg)}
.raid-stage[data-boss="volt"] .raid-scenery{filter:hue-rotate(300deg)}
.raid-stage[data-boss="eclipse"] .raid-scenery{filter:grayscale(.65) brightness(.75)}
#raidCurriculum select{max-width:100%;width:100%}
@container(max-width:600px){#raidCurriculum{flex-direction:column}.raid-rune{width:95px;height:95px;line-height:90px;font-size:72px}}
/* Cinema modal stays inside the mobile viewport; films keep their own ratio. */
#raidCinemaDialog{width:min(94vw,780px);max-height:94dvh;box-sizing:border-box;overflow:auto;background:#11182d;color:#f4e7cd;border:1px solid #d3ac67;border-radius:18px;padding:20px;box-shadow:0 22px 100px #000b}
#raidCinemaDialog::backdrop{background:#050812d9}
.raid-cinema-header small{color:#b9c6ec;letter-spacing:.12em}
.raid-cinema-header h2{margin:8px 0;font-size:clamp(20px,4vw,28px)}
#raidCinemaMessage{line-height:1.7;white-space:pre-line}
#raidCinemaVideo{display:block;width:100%;max-height:64dvh;object-fit:contain;background:#000;border-radius:10px}
#raidCinemaVideo[hidden]{display:none}
.raid-cinema-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:14px}
.raid-cinema-actions button{min-height:44px;white-space:normal}
@media(max-width:480px){#raidCinemaDialog{padding:14px;width:96vw}.raid-cinema-actions button{flex:1 1 130px}#raidCinemaVideo{max-height:58dvh}}
