/* Persistent sequence and readable action storytelling, above cinematic effects. */
#sequence-hud{position:fixed;z-index:230;left:50%;top:max(8px,env(safe-area-inset-top));transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:9px 18px;max-width:min(550px,64vw);background:linear-gradient(110deg,#102c29f5,#091411f5);border:1px solid #d0bb7b99;border-radius:9px 24px 9px 24px;box-shadow:0 6px 32px #0008,0 0 22px #d8b87b15;pointer-events:none;color:#f7ecd1;font-family:system-ui,sans-serif}
#sequence-hud .sequence-dial{flex:none;display:grid;place-items:center;width:46px;height:46px;border:1px solid #bd9d64;border-radius:50%;font:30px Georgia;color:#f0d494;background:#d1ad5412}
#sequence-hud small{font-size:9px;letter-spacing:2px;color:#b9c5b6}#sequence-hud strong{display:block;font-size:17px}#sequence-hud p{margin:2px 0 0;font-size:10px;color:#c0c9bd;line-height:1.4}
body:has(#sequence-hud) .battle>.topbar,body:has(#sequence-hud) .battle>.online-header{padding-top:90px}
.action-story{max-width:600px;margin:20px auto 0;padding:18px 24px;border:1px solid #e8d59766;border-left:3px solid var(--fx,#d9be83);background:#031512ed;box-shadow:0 15px 60px #0008;text-align:left;font-family:system-ui,sans-serif;animation:story-enter .35s ease-out both}
.action-story>small{color:#bbbc9b;letter-spacing:3px;font-size:10px}.story-people{display:flex;align-items:center;gap:18px;font-size:clamp(16px,2.2vw,26px);font-weight:700;overflow-wrap:anywhere}.story-people i{color:#d9be83}.action-story h3{margin:10px 0;color:#f6de9d;font-size:20px;letter-spacing:1px}.action-story p{font-size:14px!important;line-height:1.7!important;max-width:none!important;margin:5px 0!important;color:#eee3d0!important}.story-results{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.story-results span{padding:5px 9px;border:1px solid #bd746044;border-radius:5px;font-size:12px}.story-results .hurt b{color:#ff9a7d}.story-results .heal b{color:#a9eac8}
.cinema:has(.action-story) .cinema-copy{top:48%}.cinema:has(.action-story) .cinema-copy>h2{font-size:clamp(26px,4vw,58px)}.cinema:has(.action-story) .cinema-copy>p{display:none}.cinema:has(.action-story) .spell-portrait{opacity:.5}
@keyframes story-enter{from{opacity:0;transform:translateY(15px)}to{opacity:1;transform:none}}
.review-dialog{color:#eadfc7;background:#0d211e;border:1px solid #a68c57;border-radius:14px;max-width:760px;width:calc(100vw - 32px);max-height:82dvh;overflow:auto;padding:30px;z-index:180;font-family:system-ui,sans-serif}.review-dialog::backdrop{background:#010b0ad9;backdrop-filter:blur(7px)}.review-close{float:right;border:1px solid #827352;background:none;color:#edd9af;border-radius:50%;width:36px;height:36px;font-size:24px}.review-card{text-align:left;max-width:780px;margin:20px auto;font-family:system-ui,sans-serif;line-height:1.65}.review-heading small{letter-spacing:2px;color:#c4b984}.review-heading h2{font-size:23px;line-height:1.4;margin:8px 0 20px}.review-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.review-metrics span{font-size:10px;background:#b9a56b0b;border:1px solid #b9a56b33;padding:12px}.review-metrics b{display:block;font:26px Georgia;color:#f0cd8c;margin-top:5px}.damage-breakdown{margin:18px 0}.damage-breakdown>div{display:grid;grid-template-columns:110px 1fr 42px;gap:12px;align-items:center;font-size:12px;margin:8px 0}.damage-breakdown i{height:5px;background:#c9bfab18}.damage-breakdown b{display:block;background:#d39573;height:100%}.review-advice{padding:15px;border-left:2px solid #d4bb76;background:#d4bb760b}.review-exchange{padding:16px;border:1px solid #cdb37333}.review-exchange h3{font-size:12px;letter-spacing:2px}.review-exchange p,.review-exchange strong{font-size:12px}.review-card .muted{font-size:11px}.auto-round{display:inline-flex;align-items:center;gap:8px;color:#ead49e;border:1px solid #b79a5855;padding:10px 18px;border-radius:5px}.auto-round b{font-size:23px}.review-entry{border:1px solid #bdaa7377;border-radius:5px;padding:8px 14px;background:#102923;color:#e9d9b7;font-family:system-ui}
@media(max-width:650px){#sequence-hud{max-width:94vw;width:max-content;gap:8px;padding:6px 12px}#sequence-hud strong{font-size:14px}#sequence-hud p{font-size:9px}#sequence-hud .sequence-dial{width:34px;height:34px;font-size:25px}.action-story{padding:12px;margin-top:12px}.story-people{font-size:18px}.action-story h3{font-size:16px}.review-dialog{padding:18px}.review-metrics{gap:6px}.review-metrics span{padding:8px}.review-heading h2{font-size:20px}}
@media(orientation:landscape) and (max-height:600px){#sequence-hud{left:auto;right:9px;top:3px;transform:none;max-width:46vw;padding:3px 9px;gap:7px;min-height:36px}#sequence-hud p{display:none}#sequence-hud strong{font-size:12px}#sequence-hud small{font-size:8px;letter-spacing:1px}#sequence-hud .sequence-dial{width:28px;height:28px;font-size:21px}body:has(#sequence-hud) .battle>.topbar,body:has(#sequence-hud) .battle>.online-header{padding-top:4px;padding-right:49%}.action-story{margin:6px auto;padding:9px 14px;max-width:550px}.story-people{font-size:18px}.action-story h3{margin:3px 0;font-size:16px}.action-story p{font-size:11px!important}.story-results{margin-top:4px}.cinema:has(.action-story) .cinema-copy>h2{font-size:28px;margin:2px 0}.cinema:has(.action-story) .cinema-copy>span{font-size:9px}.review-dialog{max-height:90dvh}.review-card{margin:5px auto}.review-dialog .review-heading h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){.action-story{animation:none}}

.cinema:has(.action-story) .cinema-copy{animation:none;opacity:1;filter:none;transform:translateY(-50%)}.cinema-copy .story-outcome{display:block!important;color:#ffe4a0!important;font-weight:bold;font-size:16px!important}.review-moments{font-size:12px;border-top:1px solid #b6a16e33;margin-top:15px;padding-top:10px}.review-moments h3{font-size:13px}.review-moments li{margin:8px 0}

.story-environment{border-top:1px solid #b19b5866;margin-top:10px;padding-top:5px}.action-story .story-environment p{font-size:11px!important;color:#dec6a5!important}.review-live-sequence{color:#f6da96;font-weight:700}

/* Give the persistent cue its own viewport row, rather than covering the board. */
body:has(#sequence-hud){--sequence-space:80px}
#sequence-hud{left:0;right:0;top:0;transform:none;width:100%;max-width:none;height:var(--sequence-space);box-sizing:border-box;border-radius:0;border-width:0 0 1px;padding:8px 20px;justify-content:center;background:#0b211ffb;box-shadow:0 3px 16px #0005}
body:has(#sequence-hud) #app{padding-top:var(--sequence-space);box-sizing:border-box}
body:has(#sequence-hud) .world{min-height:calc(100svh - var(--sequence-space))}
body:has(#sequence-hud) .battle>.topbar{padding-top:24px;padding-right:5.4%}
body:has(#sequence-hud) .battle>.online-header{padding-top:18px;padding-right:24px}
body:has(#sequence-hud) #online-root,body:has(#sequence-hud) #fx-root,body:has(#sequence-hud) .modal-backdrop{top:var(--sequence-space)}
body:has(#sequence-hud) #practice-root{top:var(--sequence-space);padding-top:22px}
body:has(#sequence-hud) .cinema{height:100%;min-height:0}
@media(min-height:601px){body:has(#sequence-hud) .direction-guide{top:calc(145px + var(--sequence-space));max-height:calc(100svh - 160px - var(--sequence-space))}}
@media(max-width:650px){body:has(#sequence-hud){--sequence-space:74px}#sequence-hud{padding:6px 12px}#sequence-hud p{max-width:calc(100vw - 82px)}body:has(#sequence-hud) .battle>.topbar{padding-top:12px}}
@media(orientation:landscape) and (max-height:600px){
 body:has(#sequence-hud){--sequence-space:46px}
 #sequence-hud{left:0;right:0;top:0;max-width:none;width:100%;min-height:0;padding:3px 12px;gap:9px}
 #sequence-hud p{display:none}
 body:has(#sequence-hud) #app{height:100dvh!important;padding-top:var(--sequence-space)}
 body:has(#sequence-hud) .battle,body:has(#sequence-hud) .results.world{height:calc(100dvh - var(--sequence-space))!important;min-height:0}
 body:has(#sequence-hud) .battle>.topbar,body:has(#sequence-hud) .battle>.online-header{padding-top:4px;padding-right:20px}
 body:has(#sequence-hud) #practice-root{padding-top:12px}
 body:has(#sequence-hud) .results .result-content{height:calc(100dvh - var(--sequence-space) - 46px)}
 body:has(#sequence-hud) .modal-backdrop>.modal.mobile-page-shell{height:calc(100dvh - var(--sequence-space) - 32px)}
}
body:has(#sequence-hud){overflow:hidden!important}body:has(#sequence-hud) #app{position:fixed;inset:var(--sequence-space) 0 0;height:auto!important;padding-top:0;overflow:auto;overscroll-behavior:contain}
