
#forge-show-moves{display:none}
.fantasy-starter{flex-wrap:wrap}.forge-launch{background:#142641;color:#fff;border:1px solid #ac91de}
#forge-dialog{width:min(1340px,96vw);max-width:96vw;max-height:94dvh;padding:0;border:1px solid #b9aed1;border-radius:18px;background:#f6f4ee;color:#29312f;overflow:auto}#forge-dialog::backdrop{background:#061329c9;backdrop-filter:blur(5px)}
#forge-dialog *{box-sizing:border-box}#forge-dialog [hidden]{display:none!important}#forge-dialog button,#forge-dialog select,#forge-dialog input{font:inherit}#forge-dialog button{cursor:pointer;min-height:42px;border:1px solid #d5cede;border-radius:9px;padding:9px 13px;background:#fff;color:#30374a}#forge-dialog button:disabled{opacity:.45;cursor:default}#forge-dialog button:focus-visible,#forge-dialog canvas:focus-visible{outline:3px solid #8c63c6;outline-offset:3px}#forge-dialog .forge-primary{background:#213651;color:#fff;border-color:#786499;font-weight:700}.forge-header{display:flex;justify-content:space-between;align-items:center;background:#0c1c37;color:#fff;padding:22px 28px}.forge-header h2{font-size:25px;margin:5px 0 0}.forge-eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;opacity:.72}.forge-header #forge-close{background:#ffffff12;color:white;border-color:#ffffff30;font-size:24px}.forge-toolbar{display:flex;align-items:center;gap:16px;padding:12px 28px;border-bottom:1px solid #ded9e3;font-size:12px;font-weight:700}.forge-pill{color:#625275;background:#ebe4f1;padding:7px 12px;border-radius:20px}.forge-toolbar #forge-back{margin-left:auto}.forge-layout{display:grid;grid-template-columns:340px minmax(0,1fr);gap:24px;padding:24px}.forge-panel{max-height:72vh;overflow:auto;padding-right:10px}.forge-player-tabs{display:flex;gap:8px}.forge-player-tabs button{flex:1}.forge-player-tabs b{margin-right:7px}.forge-player-tabs button[aria-pressed=true]{background:#eee7f6!important;border-color:#9474b6!important}.forge-identity{display:flex;align-items:center;gap:14px;margin:18px 0}.forge-portrait{width:80px;height:80px;image-rendering:pixelated;background:#e6e9df;border-radius:10px}.forge-identity p{font-size:13px;margin:5px 0}.forge-stats{display:flex;flex-wrap:wrap;gap:6px;font-size:10px;color:#675879}#forge-dialog label{display:block;font-size:12px;font-weight:600;margin-bottom:12px}#forge-dialog input:not([type=checkbox]),#forge-dialog select,#forge-dialog textarea{display:block;width:100%;min-height:40px;padding:9px;margin-top:6px;border:1px solid #d6cede;border-radius:7px;background:#fff;color:#30343c;font:inherit;font-size:13px}#forge-dialog textarea{min-height:65px;resize:vertical}.forge-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.forge-story,.forge-rules,.forge-log{font-size:12px;padding:12px 0}.forge-story summary,.forge-rules summary,.forge-log summary{cursor:pointer;font-weight:600}.forge-story label{margin-top:12px}.forge-section-title{display:flex;justify-content:space-between;align-items:center;margin-top:16px}.forge-section-title h3{font-size:16px;margin:0}.forge-section-title span,.forge-hint{font-size:11px;color:#78717e}.forge-hint{line-height:1.6}.forge-power{border:1px solid #dbd3e4;border-radius:10px;padding:10px;margin:12px 0;background:#fffdf9;min-width:0}.forge-power legend{font-size:11px;color:#756087;font-weight:700}.forge-power-row{display:grid;grid-template-columns:1fr 70px;gap:8px}.forge-power p,.forge-power summary{font-size:11px;line-height:1.6;color:#6b6870}.forge-power label{margin-top:8px}.forge-file-actions{display:flex;gap:8px}.forge-file-actions button{flex:1;font-size:12px!important}.forge-world{min-width:0}.forge-world-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 14px}.forge-world-heading h3{margin:4px 0;font-size:23px}.forge-grid-label{display:flex!important;align-items:center;gap:7px;margin:0!important}.forge-stage{position:relative;background:#142c38;border:5px solid #e3dfd4;border-radius:15px;overflow:hidden;box-shadow:0 12px 24px #182a3820}#forge-canvas{display:block;width:100%;height:auto;image-rendering:pixelated}.forge-handoff{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#08182ca8;color:#fff;text-align:center;padding:20px;backdrop-filter:blur(2px)}.forge-handoff h3{font-size:28px;margin:10px 0}.forge-handoff button{margin:7px}.forge-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:10px;color:#6d6776;padding:12px 4px}.forge-message{background:#eee9f3;padding:13px;border-radius:9px;font-size:13px;line-height:1.6;min-height:48px}.forge-start{display:flex;gap:16px;align-items:center;justify-content:space-between;margin:18px 0}.forge-start b{font-size:14px}.forge-start p,.forge-save-note{font-size:11px;line-height:1.7;color:#746f79}.forge-start button{flex-shrink:0}.forge-selection{display:flex;align-items:end;gap:9px;margin-top:15px;flex-wrap:wrap}.forge-selection label{flex:1;min-width:150px;margin:0!important}.forge-selection button{margin-bottom:0}.forge-rules{line-height:1.7;border-bottom:1px solid #ddd6e3}.forge-turn-label{font-size:10px;letter-spacing:2px;color:#806c93}.forge-turn-title{font-size:23px;margin:6px 0 16px}.forge-combatant{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #ddd8df;border-radius:10px;margin-bottom:9px}.forge-combatant.is-active{background:#eee7f5;border-color:#9c80bc}.forge-combatant .forge-portrait{width:62px;height:62px}.forge-combatant strong,.forge-combatant small,.forge-combatant span{display:block}.forge-combatant strong{font-size:13px}.forge-combatant small,.forge-combatant span{font-size:10px;color:#77707c}.forge-combatant meter{width:150px;max-width:100%;height:14px}.forge-turn-steps{display:flex;gap:9px;font-size:11px;margin:17px 0}.forge-turn-steps span{padding:8px;border-radius:6px;background:#e8e5e8}.forge-turn-steps .current{background:#ddd0ee;color:#563c72}.forge-battle-powers{display:grid;gap:8px}.forge-battle-powers button{display:flex;align-items:center;gap:12px;text-align:left}.forge-battle-powers button[aria-pressed=true]{border-color:#8d65b5!important;background:#eee6f6!important}.forge-die{background:#e9e0f3;color:#60467d;border-radius:9px;padding:12px 6px;min-width:42px;font-weight:bold;font-size:16px}.forge-battle-powers strong,.forge-battle-powers small,.forge-battle-powers em{display:block}.forge-battle-powers strong{font-size:13px}.forge-battle-powers small{font-size:10px;line-height:1.5;margin:4px 0}.forge-battle-powers em{font-size:10px;font-style:normal;color:#6b5680}.forge-turn-actions{display:flex;gap:8px;margin:14px 0}.forge-turn-actions button{flex:1;font-size:12px!important}.forge-last-roll{display:flex;gap:12px;align-items:center;font-size:11px}.forge-last-roll p{line-height:1.6}.forge-roll-number{font-size:30px;padding:10px;color:#775393}.forge-log li{margin:8px 0;line-height:1.5}
@media(max-width:900px){.forge-layout{grid-template-columns:280px minmax(0,1fr);gap:14px;padding:16px}.forge-start{flex-direction:column;align-items:stretch}.forge-legend{gap:9px}.forge-header{padding:18px}.forge-world-heading h3{font-size:19px}}
@media(max-width:650px){#forge-dialog{max-height:96dvh;width:96vw}.forge-layout{display:flex;flex-direction:column}.forge-panel{max-height:none;overflow:visible;padding:0}.forge-world{order:-1}.forge-header h2{font-size:20px}.forge-toolbar{padding:10px 16px;flex-wrap:wrap;gap:8px}.forge-handoff h3{font-size:22px}.forge-legend{font-size:9px}.forge-world-heading{margin-bottom:8px}.forge-start{gap:8px;margin:12px 0}.forge-save-note{margin-bottom:0}}
/* The character sheet is a complete first step; the arena appears only after Enter. */
#forge-dialog.is-sheet .forge-layout{display:block;padding:24px 28px 12px}
#forge-dialog.is-sheet .forge-panel{max-height:none;overflow:visible;padding:0}
#forge-dialog.is-sheet .forge-world{display:none}
#forge-dialog>#forge-message{margin:16px 28px 0}
#forge-dialog>#forge-board-actions{padding:0 28px 18px}
.sheet-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.sheet-intro h3{font-size:28px;margin:7px 0;color:#24364f}.sheet-intro p{font-size:13px;color:#726a7b;margin:8px 0}
.sheet-intro .forge-player-tabs{flex-shrink:0}.sheet-intro .forge-player-tabs button{min-width:110px}
.hero-sheet{display:grid;grid-template-columns:270px minmax(0,1fr);gap:26px;align-items:start}
.sheet-identity{padding:22px;background:#eee8f2;border:1px solid #d9cee4;border-radius:16px}
.sheet-identity #forge-portrait{display:grid;place-items:center;margin:15px 0 22px;background:radial-gradient(ellipse at 50% 75%,#bad9cc,#e6e4ef 65%);border-radius:12px}
.sheet-identity .forge-portrait{width:144px;height:144px;background:transparent}
.sheet-identity>button{width:100%}.sheet-identity .forge-stats{font-size:12px;line-height:1.6;gap:10px}
.sheet-skills .forge-section-title{margin:0}.sheet-skills .forge-section-title h3{font-size:20px;color:#283953}
.sheet-power-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.sheet-power.forge-power{margin:10px 0 0;padding:14px;background:#fffdf9;border-color:#cbb9dd;box-shadow:0 4px 12px #39245108}
.sheet-power legend{font-size:12px;padding-right:8px}.sheet-die{display:inline-grid;place-items:center;min-width:46px;height:44px;border:2px solid #ad91ca;background:#e9def3;border-radius:11px;color:#493264;font-size:18px;margin-right:7px}
.sheet-die[data-sides="8"]{border-radius:4px 16px}.sheet-die[data-sides="12"]{border-radius:18px}.sheet-die[data-sides="20"]{border-radius:6px;background:#273953;color:#e5c7ff}
.sheet-power canvas{width:100%;height:auto;image-rendering:pixelated;border-radius:10px;display:block}
.sheet-move-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:10px}
.sheet-move-heading>span{font-size:9px;font-weight:800;letter-spacing:.7px;color:#6b5281}
#forge-dialog .sheet-move-heading button{font-size:11px;min-height:34px;padding:5px 9px}
.sheet-power .sheet-rule{font-size:12px;line-height:1.6;min-height:58px;background:#f0edf4;border-radius:7px;padding:10px;color:#4c4258}
.power-customize{border-top:1px solid #e2d8e8;padding-top:10px}.power-customize summary{cursor:pointer;font-weight:700;color:#654a80}
.power-swatches{display:flex;height:18px;border-radius:5px;overflow:hidden}.power-swatches span{flex:1}
#forge-dialog .sheet-power input[type=color]{padding:4px;height:42px}
.sheet-footer{display:flex;gap:20px;align-items:center;justify-content:space-between;margin-top:24px;padding:18px;border:1px solid #d7d0df;border-radius:12px;background:#eeedf1}
.sheet-footer p{font-size:12px;color:#726a7b;margin:5px 0}.sheet-footer .forge-file-actions{flex-shrink:0}
@media(max-width:1000px){.hero-sheet{grid-template-columns:220px minmax(0,1fr);gap:16px}.sheet-identity{padding:15px}.sheet-power-grid{gap:12px}.sheet-intro h3{font-size:23px}.sheet-intro{align-items:start}.sheet-footer{flex-direction:column;align-items:stretch}}
@media(max-width:760px){.hero-sheet{display:block}.sheet-identity{margin-bottom:24px}.sheet-identity #forge-portrait{float:left;margin:0 16px 15px 0}.sheet-identity>label{clear:both}.sheet-intro{flex-direction:column;gap:12px}.sheet-intro .forge-player-tabs{width:100%}#forge-dialog.is-sheet .forge-layout{padding:18px 16px}#forge-dialog>#forge-message{margin:12px 16px 0}#forge-dialog>#forge-board-actions{padding:0 16px 18px}.sheet-skills .forge-section-title{align-items:start;gap:10px}.sheet-skills .forge-section-title h3{font-size:18px}}
@media(max-width:480px){.sheet-power-grid{grid-template-columns:1fr}.sheet-footer .forge-file-actions{flex-wrap:wrap}.sheet-footer .forge-file-actions button{min-width:130px}.sheet-intro h3{font-size:23px}.sheet-skills .forge-section-title span{display:none}}

/* Keep turn controls outside the independently scrolling move list. */
#forge-dialog:not(.is-sheet) #forge-board-actions{position:sticky;bottom:0;z-index:5;background:#f6f4ee;border-top:1px solid #d5cede;padding:10px 24px;box-shadow:0 -5px 16px #17243b12}
#forge-dialog:not(.is-sheet) .forge-selection{margin-top:0}
#forge-dialog:not(.is-sheet) .forge-turn-actions{margin:8px 0 0;justify-content:flex-end}
#forge-dialog:not(.is-sheet) .forge-turn-actions button{flex:0 1 170px}
.forge-turn-help{font-size:11px;color:#625873;text-align:right;margin:6px 0 0}

.move-chips{display:flex;flex-wrap:wrap;gap:5px;margin:7px 0;font-size:11px;font-weight:700;line-height:1.5}.move-chips>span{padding:3px 7px;background:#ebe7f2;color:#4c3e66;border-radius:6px}.move-chips>span:first-child{background:#dbeee9;color:#23564f}.move-tip{font-size:12px!important;line-height:1.6;color:#4b5058!important}.forge-battle-powers .move-chips{font-size:10px}.forge-battle-powers em{line-height:1.55}.forge-battle-powers .move-unavailable{color:#805a30}.forge-battle-powers .move-ready{color:#35685a}.forge-action-feedback{margin:0 0 8px;padding:8px 12px;border-radius:7px;background:#e9e2f1;color:#4e3d63;font-size:12px;line-height:1.5}.forge-selection #forge-confirm{max-width:320px;white-space:normal}.sheet-move-heading>span{text-transform:none;font-size:12px}.forge-battle-powers small{font-size:12px}.forge-battle-powers button>span:last-child{min-width:0}.forge-battle-powers strong{overflow-wrap:anywhere}
@media(max-width:650px){#forge-dialog:not(.is-sheet) #forge-board-actions{padding:8px 12px}.forge-action-feedback{font-size:11px;padding:6px 8px}.forge-selection{gap:6px}.forge-selection #forge-confirm{max-width:none;flex:1}.forge-turn-help{font-size:10px}.forge-battle-powers .move-chips{font-size:11px}}

.forge-attack-preview{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin:0 0 12px;background:#eee6f5;border:1px solid #bda8d0;border-left:4px solid #9271b4;border-radius:12px;color:#47365b}.forge-attack-preview strong,.forge-attack-preview span,.forge-attack-preview small{display:block}.forge-attack-preview strong{font-size:16px;margin:5px 0;overflow-wrap:anywhere}.forge-attack-preview span{font-size:12px;line-height:1.6}.forge-attack-preview small{font-size:11px;line-height:1.5;margin-top:5px}.forge-attack-preview .forge-eyebrow{font-size:9px;letter-spacing:1px}.preview-badge{flex-shrink:0;background:#fff4d4;color:#695426;padding:10px;border:1px solid #d9bc73;border-radius:8px;font-size:10px;line-height:1.5;text-align:center}.forge-attack-preview.is-blocked{border-left-color:#a58458;background:#f2ece2;color:#685136}.forge-attack-preview.is-blocked .preview-badge{background:#e8ddcd}.forge-legend .reach-key{color:#795695;font-weight:700}.forge-legend .target-key{color:#8b6724;font-weight:700}
@media(max-width:650px){.forge-attack-preview{padding:10px;gap:8px}.forge-attack-preview strong{font-size:14px}.forge-attack-preview .preview-badge{padding:7px;font-size:9px}}

/* Keep the map and confirmation controls in separate rows, never underneath each other. */
@media(min-width:651px){
 #forge-dialog:not(.is-sheet){height:94dvh;display:flex;flex-direction:column;overflow:hidden}
 #forge-dialog:not([open]){display:none!important}
 #forge-dialog:not(.is-sheet)>.forge-header,#forge-dialog:not(.is-sheet)>#forge-message,#forge-dialog:not(.is-sheet)>.space-session-note{display:none}
 #forge-dialog:not(.is-sheet)>.space-dialog-bar,#forge-dialog:not(.is-sheet)>.forge-toolbar,#forge-dialog:not(.is-sheet)>#forge-board-actions{flex-shrink:0}
 #forge-dialog:not(.is-sheet) .forge-layout{min-height:0;flex:1;padding:16px 24px;overflow:auto;align-items:start}
 #forge-dialog:not(.is-sheet) .forge-panel{max-height:calc(94dvh - 320px)}
 #forge-dialog:not(.is-sheet) .forge-stage{width:min(100%,max(320px,calc((94dvh - 450px)*1.4286)))}

}

#forge-dialog:not(.is-sheet)>.forge-header,#forge-dialog:not(.is-sheet)>#forge-message,#forge-dialog:not(.is-sheet)>.space-session-note{display:none}
@media(max-width:650px){#forge-dialog:not(.is-sheet) .forge-world{scroll-margin-top:110px}.forge-attack-preview .preview-badge{display:none}.forge-attack-preview small{font-size:10px}}

.forge-attack-preview .forecast-detail:empty{display:none}

/* Scrolling the moves must not drag the map and its preview out of view. */
@media(min-width:651px){
 #forge-dialog:not(.is-sheet) .forge-layout{overflow:hidden;grid-template-rows:minmax(0,1fr)}
 #forge-dialog:not(.is-sheet) .forge-panel,#forge-dialog:not(.is-sheet) .forge-world{height:100%;max-height:100%;overflow:auto;overscroll-behavior:contain}
}

/* Arena choice belongs to the hero preparation flow, before a duel starts. */
.arena-chooser{margin-top:24px;padding:22px;border:1px solid #d9d2e5;border-radius:14px;background:#f5f2f8}.arena-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:16px}.arena-cards button{padding:0 0 12px;overflow:hidden;text-align:left;background:#fff;border:2px solid #ded8e8;border-radius:12px;min-width:0}.arena-cards button[aria-pressed="true"]{border-color:#705b8a;box-shadow:0 0 0 2px #c2b2d5;background:#ece6f3}.arena-cards strong,.arena-cards button>span:last-child{display:block;margin:8px 10px 0}.arena-cards strong{font-size:13px}.arena-cards button>span:last-child{font-size:11px;color:#655b70}.arena-thumbnail{display:block;background:#12243b;aspect-ratio:10/7}.arena-thumbnail canvas{display:block;width:100%;height:auto;image-rendering:pixelated}.arena-tip{font-size:13px;line-height:1.6;margin:16px 0 0;color:#524460}@media(max-width:850px){.arena-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:500px){.arena-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.arena-chooser{padding:12px}}

/* Tablet arena: a wide battlefield above a horizontal move tray. */
@media (min-width:651px) and (max-width:1366px), (min-width:651px) and (pointer:coarse){
 #forge-dialog:not(.is-sheet) .forge-layout{display:flex;flex-direction:column;overflow:auto;gap:18px;padding:14px 20px 20px;scroll-behavior:smooth}
 #forge-dialog:not(.is-sheet) .forge-world{order:-1;width:100%;height:auto;max-height:none;overflow:visible;flex-shrink:0}
 #forge-dialog:not(.is-sheet) .forge-panel{width:100%;height:auto;max-height:none;overflow:visible;flex-shrink:0;padding:16px 0 0;border-top:1px solid #d5cede}
 #forge-dialog:not(.is-sheet) .forge-stage,#forge-dialog:not(.is-sheet).has-power-preview .forge-stage{width:min(100%,940px,max(320px,calc((94dvh - 350px)*1.4286)));margin-inline:auto}
 #forge-dialog:not(.is-sheet) .forge-world-heading{margin-bottom:8px}
 #forge-dialog:not(.is-sheet) .forge-world-heading h3{font-size:21px}
 #forge-dialog:not(.is-sheet) .forge-legend{padding:8px 0;gap:12px}
 #forge-dialog:not(.is-sheet) .forge-save-note{display:none}
 #forge-dialog:not(.is-sheet) .forge-combatants{display:grid;grid-template-columns:1fr 1fr;gap:12px}
 #forge-dialog:not(.is-sheet) .forge-combatant{margin:0}
 #forge-dialog:not(.is-sheet) .forge-battle-powers{grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch}
 #forge-dialog:not(.is-sheet) .forge-battle-powers button{align-items:flex-start;gap:8px;padding:12px}
 #forge-dialog:not(.is-sheet) .forge-battle-powers .forge-die{min-width:36px;font-size:14px;padding:10px 4px}
 #forge-dialog:not(.is-sheet) #forge-board-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:8px 20px;position:relative}
 #forge-dialog:not(.is-sheet) .forge-action-feedback{grid-column:1/-1;margin:0;padding:6px 10px}
 #forge-dialog:not(.is-sheet) .forge-turn-actions{margin:0;align-items:end}
 #forge-dialog:not(.is-sheet) .forge-turn-actions button{flex:0 0 auto;min-height:42px}
 #forge-dialog:not(.is-sheet) .forge-turn-help{display:none}
 #forge-dialog:not(.is-sheet) .forge-toolbar{padding:8px 20px}
 #forge-dialog:not(.is-sheet) .forge-attack-preview{padding:10px 14px}
 #forge-dialog:not(.is-sheet) #forge-show-moves{display:block;font-size:12px;margin-left:12px;background:#ebe4f1;border-color:#bba7ce}
 #forge-dialog:not(.is-sheet) .forge-grid-label{margin-left:auto!important}
}
@media(min-width:651px) and (max-width:900px){
 #forge-dialog:not(.is-sheet) .forge-battle-powers{grid-template-columns:repeat(2,minmax(0,1fr))}
 #forge-dialog:not(.is-sheet) #forge-board-actions{grid-template-columns:1fr}
 #forge-dialog:not(.is-sheet) .forge-turn-actions{justify-content:flex-end}
}
@media(prefers-reduced-motion:reduce){#forge-dialog:not(.is-sheet) .forge-layout{scroll-behavior:auto}}

/* Fit tablet battles to the available viewport: map above, all four moves below.
   The side rail uses the space beside the isometric canvas for map information. */
@media (min-width:651px) and (max-width:1366px) and (min-height:620px), (min-width:651px) and (pointer:coarse) and (min-height:620px){
 #forge-dialog:not(.is-sheet){height:98dvh;max-height:98dvh;width:98vw;max-width:98vw}
 #forge-dialog:not(.is-sheet) .space-dialog-bar{padding:6px 10px}
 #forge-dialog:not(.is-sheet) .space-dialog-bar .space-link{min-height:44px;padding:5px 8px}
 #forge-dialog:not(.is-sheet) .space-close{min-height:44px}
 #forge-dialog:not(.is-sheet) .forge-toolbar{padding:4px 12px;gap:10px}
 #forge-dialog:not(.is-sheet) .forge-toolbar button{min-height:36px;padding:5px 10px}
 #forge-dialog:not(.is-sheet) .forge-layout{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(170px,1fr) auto;gap:8px;padding:8px 12px;overflow:hidden}
 #forge-dialog:not(.is-sheet) .forge-world{order:0;grid-row:1;height:100%;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 210px;grid-template-rows:auto auto minmax(0,1fr);gap:6px 12px;overflow:hidden}
 #forge-dialog:not(.is-sheet) .forge-stage,#forge-dialog:not(.is-sheet).has-power-preview .forge-stage{grid-column:1;grid-row:1/-1;align-self:center;justify-self:center;width:100%;max-width:clamp(302px,calc((98dvh - 458px)*1.42857),874px);margin:0;border-width:3px}
 #forge-dialog:not(.is-sheet) .forge-world-heading{grid-column:2;grid-row:1;flex-wrap:wrap;gap:8px;align-content:start;margin:0}
 #forge-dialog:not(.is-sheet) .forge-world-heading h3{font-size:17px;margin:3px 0}
 #forge-dialog:not(.is-sheet) .forge-world-heading .forge-eyebrow{font-size:8px;letter-spacing:1px}
 #forge-dialog:not(.is-sheet) .forge-grid-label{margin:0!important}
 #forge-dialog:not(.is-sheet) #forge-show-moves{display:none}
 #forge-dialog:not(.is-sheet) .forge-legend{grid-column:2;grid-row:2;font-size:9px;gap:4px 10px;padding:0;align-content:start}
 #forge-dialog:not(.is-sheet) .forge-rules{grid-column:2;grid-row:3;align-self:start;margin:0;padding:5px 0;font-size:10px;max-height:100%;overflow:auto}
 #forge-dialog:not(.is-sheet).has-power-preview .forge-rules{display:none}
 #forge-dialog:not(.is-sheet) .forge-attack-preview{grid-column:2;grid-row:3;min-height:0;align-self:start;max-height:100%;overflow:auto;display:block;margin:0;padding:8px}
 #forge-dialog:not(.is-sheet) .forge-attack-preview .preview-badge{display:none}
 #forge-dialog:not(.is-sheet) .forge-attack-preview strong{font-size:13px;margin:3px 0}
 #forge-dialog:not(.is-sheet) .forge-attack-preview span,#forge-dialog:not(.is-sheet) .forge-attack-preview small{font-size:10px;line-height:1.35}
 #forge-dialog:not(.is-sheet) .forge-panel{grid-row:2;display:grid;grid-template-columns:110px minmax(0,1fr) auto;gap:5px 10px;align-items:center;min-height:0;height:auto;padding:7px 0 0;overflow:visible}
 #forge-dialog:not(.is-sheet) .forge-turn-label{grid-column:1;grid-row:1;font-size:8px;letter-spacing:1px;align-self:end}
 #forge-dialog:not(.is-sheet) .forge-turn-title{grid-column:1;grid-row:2;font-size:16px;line-height:1.1;margin:0;align-self:start}
 #forge-dialog:not(.is-sheet) .forge-combatants{grid-column:2;grid-row:1/3;gap:8px}
 #forge-dialog:not(.is-sheet) .forge-combatant{padding:4px 6px;gap:7px;min-width:0}
 #forge-dialog:not(.is-sheet) .forge-combatant .forge-portrait{width:36px;height:36px}
 #forge-dialog:not(.is-sheet) .forge-combatant strong{font-size:11px}
 #forge-dialog:not(.is-sheet) .forge-combatant small{display:none}
 #forge-dialog:not(.is-sheet) .forge-combatant meter{height:10px;width:115px}
 #forge-dialog:not(.is-sheet) .forge-turn-steps{grid-column:3;grid-row:1/3;flex-direction:column;gap:3px;margin:0;font-size:9px}
 #forge-dialog:not(.is-sheet) .forge-turn-steps span{padding:4px 6px}
 #forge-dialog:not(.is-sheet) .forge-battle-powers{grid-column:1/-1;grid-row:3;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
 #forge-dialog:not(.is-sheet) .forge-battle-powers button{padding:7px;gap:6px;min-height:90px}
 #forge-dialog:not(.is-sheet) .forge-battle-powers strong{font-size:12px}
 #forge-dialog:not(.is-sheet) .forge-battle-powers .forge-die{min-width:30px;padding:8px 3px;font-size:13px}
 #forge-dialog:not(.is-sheet) .forge-battle-powers small{display:none}
 #forge-dialog:not(.is-sheet) .forge-battle-powers .move-chips{gap:3px;margin:4px 0;font-size:9px;line-height:1.25}
 #forge-dialog:not(.is-sheet) .forge-battle-powers .move-chips>span{padding:2px 4px}
 #forge-dialog:not(.is-sheet) .forge-battle-powers em{font-size:9px;line-height:1.3}
 #forge-dialog:not(.is-sheet) .forge-last-roll{grid-column:1/3;grid-row:4;gap:7px;font-size:10px}
 #forge-dialog:not(.is-sheet) .forge-last-roll:empty{display:none}
 #forge-dialog:not(.is-sheet) .forge-roll-number{font-size:18px;padding:0}
 #forge-dialog:not(.is-sheet) .forge-last-roll p{margin:0;line-height:1.25}
 #forge-dialog:not(.is-sheet) .forge-log{grid-column:3;grid-row:4;font-size:10px;padding:0;justify-self:end}
 #forge-dialog:not(.is-sheet) .forge-log[open]{position:absolute;bottom:115px;right:16px;z-index:10;max-width:360px;max-height:45%;overflow:auto;background:#fffdf9;padding:14px;border:1px solid #bcaaca;border-radius:10px;box-shadow:0 4px 20px #17243b33}
 #forge-dialog:not(.is-sheet) #forge-board-actions{grid-template-columns:minmax(0,1fr) auto;padding:6px 12px;gap:5px 10px}
 #forge-dialog:not(.is-sheet) .forge-action-feedback{font-size:11px;line-height:1.3;padding:5px 8px}
 #forge-dialog:not(.is-sheet) .forge-selection label{font-size:10px;min-width:120px}
 #forge-dialog:not(.is-sheet) .forge-selection select{margin-top:2px;min-height:38px;padding:6px}
 #forge-dialog:not(.is-sheet) .forge-selection button,#forge-dialog:not(.is-sheet) .forge-turn-actions button{min-height:42px;padding:6px 9px;font-size:11px}
}

.forge-tablet-status{display:none}
@media (min-width:651px) and (max-width:1366px) and (min-height:620px), (min-width:651px) and (pointer:coarse) and (min-height:620px){
 #forge-dialog:not(.is-sheet) .forge-world{grid-template-rows:auto auto auto minmax(0,1fr)}
 #forge-dialog:not(.is-sheet) .forge-tablet-status{display:block;grid-column:2;grid-row:2;font-size:11px}
 .forge-tablet-status>b{display:block;margin-bottom:5px;color:#513c6a}
 .tablet-health{display:grid;grid-template-columns:1fr auto;gap:1px 6px;border:1px solid #ded6e3;border-radius:7px;padding:4px 6px;margin-bottom:4px;background:#fffdf9}
 .tablet-health.is-active{background:#eae3f2;border-color:#a38aba}
 .tablet-health strong{grid-column:1/-1;font-size:10px;overflow-wrap:anywhere}
 .tablet-health meter{width:100%;height:10px}
 .tablet-health span,.forge-tablet-status>small{font-size:9px}
 #forge-dialog:not(.is-sheet) .forge-legend{grid-row:3}
 #forge-dialog:not(.is-sheet) .forge-rules,#forge-dialog:not(.is-sheet) .forge-attack-preview{grid-row:4}
 #forge-dialog:not(.is-sheet) .forge-panel>.forge-turn-label,#forge-dialog:not(.is-sheet) .forge-panel>.forge-turn-title,#forge-dialog:not(.is-sheet) .forge-panel>.forge-combatants,#forge-dialog:not(.is-sheet) .forge-panel>.forge-turn-steps{display:none}
 #forge-dialog:not(.is-sheet) .forge-battle-powers{grid-row:1}
 #forge-dialog:not(.is-sheet) .forge-last-roll,#forge-dialog:not(.is-sheet) .forge-log{grid-row:2}
}
@media (min-width:651px) and (max-width:1366px) and (min-height:620px), (min-width:651px) and (pointer:coarse) and (min-height:620px){
 #forge-dialog:not(.is-sheet).has-power-preview .forge-legend{display:none}
 #forge-dialog:not(.is-sheet).has-power-preview .forge-attack-preview{grid-row:3/5}
}

/* A visual, three-step hero builder. Battle layout stays independent. */
#forge-dialog.is-sheet{height:94dvh;display:flex;flex-direction:column;overflow:hidden}
#forge-dialog.is-sheet>.forge-header,#forge-dialog.is-sheet>.space-session-note{display:none}
#forge-dialog.is-sheet>.space-dialog-bar,#forge-dialog.is-sheet>.forge-toolbar,#forge-dialog.is-sheet>#forge-board-actions{flex-shrink:0}
#forge-dialog.is-sheet>.forge-layout{min-height:0;overflow:auto;flex:1;padding:18px 24px}
#forge-dialog.is-sheet>#forge-message{margin:0;padding:8px 24px;border-radius:0;min-height:0;font-size:12px}
#forge-dialog.is-sheet .hero-sheet{display:block}
#forge-dialog.is-sheet .sheet-intro{margin-bottom:14px}
#forge-dialog.is-sheet .sheet-intro h3{font-size:23px;margin:3px 0}
#forge-dialog.is-sheet .sheet-intro p{margin:4px 0}
.forge-steps{display:flex;gap:10px;margin:0 0 20px;position:sticky;top:-18px;background:#f6f4ee;z-index:3;padding:8px 0}
#forge-dialog .forge-steps button{flex:1;background:#e9e6ee;font-size:15px;font-weight:700}
.forge-steps b{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#ffffff90;margin-right:7px}
#forge-dialog .forge-steps button[aria-current=step]{background:#233e54;color:#fff;border-color:#56c9d0;box-shadow:inset 0 -3px #67dae2}
#forge-dialog .forge-steps button[aria-current=step] b{background:#385c70}
#forge-dialog.is-sheet .sheet-identity{max-width:850px;margin:0 auto;display:grid;grid-template-columns:180px 1fr;gap:10px 22px;padding:18px}
#forge-dialog.is-sheet .sheet-identity>label{grid-column:2;margin:0;clear:none}
#forge-dialog.is-sheet .sheet-identity>#forge-portrait{grid-column:1;grid-row:2/6;float:none;margin:0;align-self:start}
#forge-dialog.is-sheet .sheet-identity>.forge-eyebrow{grid-column:1/-1}
#forge-dialog.is-sheet .sheet-identity>button{grid-column:1;grid-row:6;align-self:start}
#forge-dialog.is-sheet .sheet-identity>.forge-hint{grid-column:1;grid-row:7/9;margin:0}
#forge-dialog.is-sheet .sheet-identity>.forge-stats,.hero-art-gallery{grid-column:1/-1}
.hero-art-gallery summary{font-weight:700;cursor:pointer;padding:12px;background:#fff;border-radius:8px}
.hero-art-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px;margin-top:10px;max-height:300px;overflow:auto}
.hero-art-cards button{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12px!important}
.hero-art-cards canvas{width:64px;height:64px;image-rendering:pixelated}
.path-heading h3{font-size:23px;margin:5px 0}.path-heading p{font-size:13px;color:#605c6b;line-height:1.6;margin:5px 0 15px}
.class-cards{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
#forge-dialog .class-cards button{display:flex;flex-direction:column;align-items:center;padding:8px 4px;background:#efedf4;border:2px solid #d6cde1;min-width:0;gap:4px}
.class-picture canvas{width:72px;height:72px;image-rendering:pixelated}
.class-cards strong{font-size:13px}.class-cards small{font-size:10px;color:#625672}
#forge-dialog .class-cards button[aria-pressed=true]{background:#dcefeb;border-color:#348e8d;box-shadow:0 0 0 2px #a8d4cf}
.path-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}
#forge-dialog .path-cards button{text-align:left;padding:15px;border:2px solid #d6c9e2;background:#fffdf9}
.path-cards strong,.path-cards>button>span,.path-cards em{display:block}.path-cards strong{font-size:17px;color:#3f3557}.path-cards>button>span{font-size:12px;line-height:1.6;margin:6px 0}.path-cards em{font-size:12px;font-style:normal;color:#376b65;font-weight:bold}
.path-dice{display:grid!important;grid-template-columns:1fr 1fr;gap:5px}.path-dice span{background:#eee9f4;padding:5px;border-radius:6px;font-size:11px}.path-dice b{color:#6b438e}
#forge-dialog .path-cards button[aria-pressed=true]{border-color:#52847a;background:#eaf3ea}
.path-status{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:20px;color:#61536d}
#forge-dialog .path-status button{font-size:12px}
#forge-dialog.is-sheet .sheet-power-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#forge-dialog .native-move-picker{display:none}
#forge-dialog .browse-moves{width:100%;margin-top:10px;background:#e8e1f0;font-weight:bold}
.move-library{background:#eee9f3;padding:12px;border-radius:10px;margin-top:8px}.move-filters{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px}
#forge-dialog .move-filters button{font-size:11px;padding:7px;min-height:38px}.move-filters button[aria-pressed=true]{background:#243c58!important;color:white!important}
.move-library-cards{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-height:330px;overflow:auto}
#forge-dialog .move-library-cards button{display:flex;flex-direction:column;text-align:left;gap:5px;padding:10px;border:2px solid #d8cce3}
.move-library-cards button>b{font-size:25px;color:#7c569a}.move-library-cards strong{font-size:12px}.move-library-cards span{font-size:10px;line-height:1.5}.move-library-cards button[aria-pressed=true]{border-color:#44867a!important;background:#e4f0e6!important}
#forge-dialog.is-sheet .sheet-power .sheet-rule{min-height:0;font-size:11px;margin:8px 0;padding:8px}
#forge-dialog.is-sheet .sheet-footer{padding:10px 14px;margin-top:16px;flex-direction:row}.sheet-footer strong{font-size:12px}.sheet-footer p{font-size:11px}
#forge-dialog.is-sheet>#forge-board-actions{border-top:1px solid #d7d0df;padding:10px 24px;background:#f6f4ee}
.sheet-step-actions{display:flex;align-items:center;gap:12px}.sheet-step-actions span{flex:1;text-align:center;font-size:12px;color:#60556a}
#forge-dialog.is-sheet .forge-start{margin:8px 0 0}.forge-start p{margin:4px 0}
#forge-dialog:not(.is-sheet) .sheet-step-actions{display:none}
@media(max-width:850px){.class-cards{grid-template-columns:repeat(4,minmax(0,1fr))}.class-picture canvas{width:56px;height:56px}.class-cards small{display:none}.path-dice{grid-template-columns:1fr}#forge-dialog.is-sheet .sheet-intro{align-items:center;flex-direction:row}.sheet-intro .forge-player-tabs{width:auto}.sheet-intro .forge-player-tabs button{min-width:78px}}
@media(max-width:560px){#forge-dialog.is-sheet .sheet-identity{display:block}#forge-dialog.is-sheet .sheet-identity>label{margin:12px 0}.class-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.path-cards{grid-template-columns:1fr}#forge-dialog.is-sheet .sheet-power-grid{grid-template-columns:1fr}#forge-dialog.is-sheet .sheet-intro{flex-direction:column;align-items:stretch}#forge-dialog.is-sheet .sheet-footer{flex-direction:column;align-items:stretch}.forge-steps{gap:4px}#forge-dialog .forge-steps button{font-size:12px;padding:8px 3px}.forge-steps b{margin-right:2px}#forge-dialog.is-sheet .forge-layout{padding:12px}.path-status{gap:8px}}

.path-picker summary{cursor:pointer;font-size:14px;font-weight:700;padding:12px;margin-bottom:12px;background:#ebe6f1;border:1px solid #d3c7df;border-radius:9px;color:#59446e}.path-picker:not([open]){margin-bottom:8px}

.sheet-power-name{display:block;font-size:18px;color:#413252;margin:4px 0 10px;overflow-wrap:anywhere}
.path-cards>button>canvas{display:block;width:96px;height:96px;image-rendering:pixelated;margin:0 auto 8px}

/* Stable battlefield dimensions depend on the device, never on attack text. */
#forge-dialog:not(.is-sheet) .forge-stage{aspect-ratio:10/7;flex-shrink:0}
#forge-dialog:not(.is-sheet) .forge-attack-preview{margin:12px 0 0;max-height:150px;overflow:auto}
@media(min-width:1367px) and (pointer:fine){
 #forge-dialog:not(.is-sheet) .forge-stage{width:min(100%,960px,max(320px,calc((94dvh - 470px)*1.42857)));margin-inline:auto}
}
@media (min-width:651px) and (max-width:1366px) and (min-height:620px), (min-width:651px) and (pointer:coarse) and (min-height:620px){
 #forge-dialog:not(.is-sheet) .forge-layout{grid-template-rows:clamp(220px,calc(98dvh - 450px),620px) auto;overflow:auto}
 #forge-dialog:not(.is-sheet) .forge-attack-preview{margin:0;max-height:100%}
}
@media(max-width:650px){
 #forge-dialog:not(.is-sheet) .forge-world{display:flex;flex-direction:column}
 #forge-dialog:not(.is-sheet) .forge-stage{width:100%;margin:0}
 #forge-dialog:not(.is-sheet) .forge-attack-preview{max-height:140px}
}

/* Power editing stays compact; browsing moves has its own dismissible panel. */
#forge-dialog.is-sheet .sheet-skills{max-width:1100px;width:100%;margin-inline:auto;min-width:0}
#forge-dialog.is-sheet .sheet-power-grid{align-items:start}
#forge-dialog.is-sheet .sheet-power{min-width:0;align-self:start}
#forge-dialog.is-sheet .sheet-power canvas{width:100%;max-width:384px;aspect-ratio:12/5;height:auto;max-height:160px;object-fit:contain;margin:8px auto;background:#15273e}
#forge-dialog.is-sheet .forge-steps{position:static}
#forge-dialog.is-sheet .sheet-intro,#forge-dialog.is-sheet .sheet-footer{max-width:1100px;margin-inline:auto}
.move-picker-dialog{box-sizing:border-box;width:min(680px,94vw);max-height:90dvh;border:1px solid #b9a8cd;border-radius:16px;padding:0;background:#faf8f3;color:#30374a;overflow:auto}
.move-picker-dialog::backdrop{background:#0c163a80;backdrop-filter:blur(3px)}
.move-picker-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;background:#182e49;color:white;position:sticky;top:0;z-index:1}
.move-picker-dialog h3{margin:4px 0;font-size:20px}.move-picker-dialog small{font-size:10px;letter-spacing:1px}
.move-picker-dialog button,.move-picker-dialog input,.move-picker-dialog select{font:inherit;min-height:44px;border:1px solid #cfc4dc;border-radius:8px;padding:10px;background:white;color:#30374a;max-width:100%;box-sizing:border-box}
.move-picker-dialog>header button{font-size:22px;min-width:44px}.move-picker-dialog .move-library{margin:0;padding:16px;background:transparent}
.move-picker-dialog label{display:block;font-size:12px;margin:12px 0}.move-picker-dialog input,.move-picker-dialog select{display:block;width:100%;margin-top:6px;min-width:0}
.move-picker-dialog .move-library-cards{max-height:none;overflow:visible;align-items:stretch}
.move-picker-dialog .move-library-cards button{display:flex;flex-direction:column;align-items:start;text-align:left;gap:6px;min-width:0;border-width:2px}
.move-picker-dialog button:focus-visible{outline:3px solid #8c63c6;outline-offset:2px}
@media(max-width:700px){#forge-dialog.is-sheet .sheet-power-grid{grid-template-columns:1fr}#forge-dialog.is-sheet .sheet-power{max-width:540px;width:100%;margin-inline:auto}}
@media(max-width:400px){.move-picker-dialog .move-library{padding:12px}.move-picker-dialog .move-library-cards{gap:6px}.move-picker-dialog .move-library-cards button{padding:8px}}

.move-picker-dialog .move-filters button[aria-pressed=true]{background:#243c58;color:white;border-color:#243c58}

.practice-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px;background:#eee9f3;border-radius:12px;margin:14px 0}.practice-settings p{grid-column:1/-1;font-size:12px;line-height:1.5;margin:0}@media(max-width:700px){.practice-settings{grid-template-columns:1fr}}

.strategy-plan{padding:10px 12px;border:1px solid #d7cae8;border-radius:10px;background:#efebf6;color:#514363;font-size:12px;line-height:1.5}.strategy-plan strong{margin-right:8px}
/* Compact targeting diagrams keep move geometry visible without taller text blocks. */
.tile-diagram{display:grid!important;grid-template-columns:repeat(5,5px);grid-template-rows:repeat(5,5px);gap:1px;padding:3px!important;background:#f5f2f8!important;flex:0 0 auto}
.tile-diagram i{display:block;background:#ddd9e4;border-radius:1px}.tile-diagram .origin{background:#337b8b}.tile-diagram .affected{background:#ad7c32}
.forge-battle-powers .move-ready{font-size:.72rem}.forge-turn-steps{flex-wrap:wrap;gap:6px}

.friendly-fire-warning{color:#9e312c!important;font-size:12px!important;line-height:1.4}.forge-attack-preview:has(.friendly-fire-warning){border-color:#ce695d;background:#fff0e9}

.forge-team{padding:8px 0;margin-bottom:8px}.forge-team>strong{font-size:12px}.forge-team>div{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px}.forge-team button{flex:1;min-width:110px;padding:8px;text-align:left;border:1px solid #bdb1d2;border-radius:9px;background:#faf8fd}.forge-team button[aria-pressed=true]{border:2px solid #368c92;background:#e3f2ef}.forge-team small{display:block;font-size:10px;margin-top:3px}.forge-team button:disabled{opacity:.65}

@media(min-width:651px) and (max-width:1366px){#forge-dialog:not(.is-sheet) .forge-team{grid-column:1/-1;grid-row:1}#forge-dialog:not(.is-sheet) .forge-battle-powers{grid-row:2}#forge-dialog:not(.is-sheet) .forge-team>div{flex-wrap:nowrap}#forge-dialog:not(.is-sheet) .forge-team button{padding:5px;min-width:0}#forge-dialog:not(.is-sheet) .forge-battle-powers [data-unit-power] small{display:block}}

@media(min-width:651px) and (max-width:1366px){#forge-dialog:not(.is-sheet) .forge-last-roll,#forge-dialog:not(.is-sheet) .forge-log{grid-row:3}}
/* Eight ready-to-edit hero slots, grouped by team. */
#forge-dialog .team-intro{display:block;width:100%}.team-slot-groups{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}.team-slot-groups section{min-width:0;background:#edf5f2;border:1px solid #9dbbb6;border-radius:12px;padding:10px}.team-slot-groups section+section{background:#f0eaf6;border-color:#bba9ce}.team-slot-groups section>strong{display:block;font-size:12px;margin-bottom:8px}.team-slot-groups .forge-player-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:100%!important}.team-slot-groups .forge-player-tabs button{min-width:0!important;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px!important;font-size:11px!important}.team-slot-groups button>span:last-child{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.team-slot-groups canvas{width:44px;height:44px;image-rendering:pixelated}.team-slot-groups button[aria-pressed=true]{outline:2px solid #537e81;background:#d8eeeb!important}.team-health-grid{display:grid;grid-template-columns:1fr 1fr;gap:3px}.team-health-grid .tablet-health{margin:0;min-width:0}.team-health-grid strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.team-0{border-left:3px solid #499d9c!important}.team-1{border-left:3px solid #a77bc3!important}.is-resting{opacity:.5}.forge-combatants{display:grid;grid-template-columns:1fr 1fr;gap:4px}.forge-combatant{padding:5px;gap:5px;min-width:0;margin:0}.forge-combatant>div{min-width:0}.forge-combatant .forge-portrait{width:30px;height:30px;flex-shrink:0}.forge-combatant strong{font-size:10px}.forge-combatant small{display:none}.forge-combatant span{font-size:9px}.forge-combatant meter{width:100%}
@media(max-width:700px){.team-slot-groups{grid-template-columns:1fr;gap:8px}.team-slot-groups canvas{width:36px;height:36px}}
/* Small teaching cues reuse the existing toolbar and card space. */
#forge-next-hero{display:flex;align-items:center;gap:6px;font-size:10px;line-height:1.25;max-width:180px;margin-left:auto}#forge-next-hero[hidden]{display:none}#forge-next-hero .forge-portrait{width:34px;height:34px;object-fit:contain;image-rendering:pixelated}#forge-learn{font-size:11px;padding:7px 9px}.kid-power-kind{font-weight:750}.kid-power-kind b{font-size:18px;margin-right:4px}.kid-battle-guide{width:min(420px,calc(100vw - 36px));box-sizing:border-box;padding:22px;border:1px solid #afa1cb;border-radius:18px;background:#faf8f3;color:#263650;max-height:85dvh;overflow:auto}.kid-battle-guide::backdrop{background:#0a1737b8}.kid-battle-guide header,.kid-battle-guide footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.kid-battle-guide header{font-size:11px;letter-spacing:.08em}.kid-battle-guide button{min-height:44px;border-radius:9px;padding:8px 14px;border:1px solid #c5b8d8;cursor:pointer}.kid-battle-guide p{font-size:16px;line-height:1.6}.kid-guide-picture{background:#e4ddf1;color:#63517f;font-size:60px;text-align:center;border-radius:14px;margin:15px 0;padding:12px}.kid-battle-guide footer{margin-top:20px}@media(max-width:650px){#forge-next-hero{max-width:120px;font-size:9px}#forge-next-hero .forge-portrait{width:26px;height:26px}#forge-learn{font-size:10px}}
#forge-next-hero{max-width:440px;gap:10px} .turn-queue-slot{display:flex;align-items:center;gap:4px;min-width:0;flex:1}.turn-queue-slot>span:last-child{min-width:0}.turn-queue-slot strong{display:block;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.turn-queue-slot:first-child{border-bottom:2px solid #59c9cf}.turn-queue-slot b{font-size:10px;color:#52646b}#forge-next-hero .forge-portrait{width:28px;height:28px}#forge-use-helper{border:2px solid #77d4cd}.forge-turn-actions{flex-wrap:wrap}@media(max-width:650px){#forge-next-hero{max-width:none;width:100%;order:5;justify-content:space-between}.turn-queue-slot strong{max-width:82px}.forge-toolbar{flex-wrap:wrap}.turn-queue-slot b{font-size:9px}}

/* One vertical scroller per Forge screen; child cards never trap scrolling. */
#forge-dialog .forge-panel,#forge-dialog.is-sheet .forge-world{height:auto!important;max-height:none!important;overflow:visible!important}
#forge-dialog .forge-attack-preview{max-height:none!important;overflow:visible!important}
#forge-dialog.is-sheet .hero-art-cards,#forge-dialog .class-cards,#forge-dialog .path-cards{max-height:none;overflow:visible}
.team-file-bar{margin:12px 0;padding:10px 14px;border:1px solid #b6c6ce;border-radius:10px;background:#f0f4f8}.team-file-bar summary{cursor:pointer;font-size:13px;font-weight:700}.team-file-bar label{margin-top:10px}.team-file-bar p{font-size:11px;line-height:1.5}.team-file-bar input[type=file][hidden]{display:none!important}

.move-choice{position:relative;min-width:0}.move-choice>[data-pick-move]{height:100%;width:100%;padding-right:44px!important}.move-choice>.move-star{position:absolute;right:4px;top:4px;min-height:36px;min-width:36px;padding:4px;font-size:22px;color:#80601e;background:#fff4c8}

@media(max-width:480px){.move-picker-dialog .move-library-cards{grid-template-columns:1fr}}

/* Camera tools stay in the heading rail; they never resize the battlefield. */
.forge-camera-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;width:100%;max-width:320px;margin-left:auto}
#forge-dialog .forge-camera-controls button{min-height:44px;padding:8px 6px;border:1px solid #9aaec1;border-radius:9px;background:#e6edf5;color:#20374f;font-family:inherit;font-size:12px;font-weight:700;cursor:pointer;white-space:normal}
#forge-dialog .forge-camera-controls button:focus-visible{outline:3px solid #1585cf;outline-offset:2px}
#forge-dialog #forge-clear-view{grid-column:1/-1;background:#fffdf7}
#forge-dialog #forge-clear-view[aria-pressed=true]{background:#203e55;color:#fff;border-color:#65cce5}
#forge-view-label{grid-column:1/-1;text-align:center;font-size:10px;color:#546477}
#forge-dialog .walk-key{color:#225ea9;font-weight:700}#forge-dialog .reach-key,#forge-dialog .target-key{color:#a63843;font-weight:700}#forge-dialog .support-key{color:#247555;font-weight:700}#forge-dialog .rune-key{color:#856020;font-weight:700}
@media(min-width:1367px) and (pointer:fine){.forge-camera-controls{grid-template-columns:repeat(2,100px) 160px;max-width:380px}#forge-dialog #forge-clear-view{grid-column:auto}#forge-view-label{grid-column:1/-1}}
@media(max-width:650px){.forge-camera-controls{max-width:none;margin:0;grid-template-columns:1fr 1fr}#forge-view-label{font-size:11px}}

#forge-dialog .forge-world-heading{flex-wrap:wrap;gap:8px}
/* A bounded information rail prevents camera/help text from overflowing into moves. */
#forge-dialog:not(.is-sheet) .forge-world{display:flex;flex-direction:column}
.forge-view-rail{display:contents}
#forge-dialog:not(.is-sheet) .forge-world-heading{order:0}
#forge-dialog:not(.is-sheet) .forge-stage{order:1}
#forge-dialog:not(.is-sheet) .forge-attack-preview,#forge-dialog:not(.is-sheet) .forge-tablet-status,#forge-dialog:not(.is-sheet) .forge-legend,#forge-dialog:not(.is-sheet) .forge-rules,#forge-dialog:not(.is-sheet) .forge-save-note{order:2}
@media (min-width:651px) and (max-width:1366px) and (min-height:620px), (min-width:651px) and (pointer:coarse) and (min-height:620px){
 #forge-dialog:not(.is-sheet) .forge-world{display:grid;grid-template-rows:minmax(0,1fr);height:100%;min-height:0;overflow:hidden}
 #forge-dialog:not(.is-sheet) .forge-view-rail{display:flex;flex-direction:column;gap:10px;grid-column:2;grid-row:1;min-height:0;height:100%;overflow:auto;overscroll-behavior:contain;padding-right:3px}
 #forge-dialog:not(.is-sheet) .forge-view-rail>*{flex-shrink:0}
 #forge-dialog:not(.is-sheet) .forge-stage,#forge-dialog:not(.is-sheet).has-power-preview .forge-stage{grid-row:1;grid-column:1}
 #forge-dialog:not(.is-sheet) .forge-attack-preview{max-height:none;overflow:visible;order:1}
}

@media (min-width:651px) and (max-width:1366px) and (min-height:620px), (min-width:651px) and (pointer:coarse) and (min-height:620px){#forge-dialog:not(.is-sheet) .forge-layout{grid-template-rows:clamp(220px,calc(98dvh - 450px),620px) max-content}}

/* Phone controls follow the board instead of covering half the small screen. */
@media(max-width:650px){
 #forge-dialog:not(.is-sheet) #forge-board-actions{position:static}
 #forge-dialog:not(.is-sheet) .forge-stage{min-height:0;flex:none}
 .tile-diagram .affected{background:#b8414d}
}
.tile-diagram .affected{background:#b8414d}

/* Map rotation is a visible map action, with a curved arrow around a tile. */
.map-rotate-controls{position:absolute;inset:auto 8px 8px;display:flex;justify-content:space-between;pointer-events:none;z-index:3}
#forge-dialog .map-rotate-controls button{pointer-events:auto;display:flex;align-items:center;gap:5px;min-height:48px;padding:5px 10px;border:2px solid #95e7e8;background:#122b46ed;color:#fff;box-shadow:0 3px 8px #09172d66;font-weight:750;font-size:12px}
.map-rotate-controls svg{width:34px;height:34px;flex:none}
.map-rotate-controls button:focus-visible{outline:3px solid #f6d581;outline-offset:2px}
.forge-camera-controls{display:flex;flex-direction:column;gap:4px;max-width:200px}
.forge-practice-tools{display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding:9px 18px;background:#e1f1ed;border-bottom:1px solid #aacfc4;flex-shrink:0;font-size:12px}
#forge-dialog .forge-practice-tools button{padding:6px 9px;min-height:42px;font-size:12px}
#forge-dialog .practice-launch{width:100%;background:#173d4d;color:white;font-weight:700;min-height:50px;margin:8px 0 18px;border:2px solid #75dadd}
.arena-feature-choice small{display:block;font-weight:400;line-height:1.5;margin-top:8px}
#forge-event-note{font-size:12px;padding:10px;background:#fff1cc;border:1px solid #d6b15e;border-radius:9px;line-height:1.5;order:2}
.cpu-explanation{background:#e4f0f5;padding:8px;border-radius:7px;font-size:12px;line-height:1.4}
#forge-dialog .forge-team>div{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:4px 2px 8px;scroll-snap-type:x proximity}
#forge-dialog .forge-team [data-command]{display:flex;flex:0 0 190px;gap:6px;align-items:center;min-height:66px;scroll-snap-align:start;border:1px solid #b9c6cd;background:#f1f4f6;padding:5px;text-align:left}
#forge-dialog .forge-team [data-command].command-active{border:2px solid #318f99;background:#e1f3ef}
#forge-dialog .forge-team [data-command].command-finished{background:#eeebed;color:#68616c}
#forge-dialog .command-portrait .forge-portrait{width:34px;height:34px;flex:none}
#forge-dialog [data-command] b{display:block;font-size:11px;max-width:134px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#forge-dialog [data-command] small{font-size:10px;white-space:normal;line-height:1.4}
@media(max-width:650px){#forge-dialog .map-rotate-controls button{font-size:10px;gap:1px;min-height:44px;padding:3px 6px}.map-rotate-controls svg{width:27px;height:27px}.forge-practice-tools{padding:8px}.forge-camera-controls{max-width:none}}

#forge-dialog.is-practice #forge-wait,#forge-dialog.is-practice .forge-turn-help{display:none}

@media (min-width:651px) and (max-width:1366px), (min-width:651px) and (pointer:coarse){
 #forge-dialog:not(.is-sheet) .forge-panel>.strategy-plan{grid-column:1/-1;grid-row:3;margin:0;padding:5px 8px;font-size:10px}
 #forge-dialog:not(.is-sheet) .forge-log{grid-column:1/-1;grid-row:4}
}

/* Objective choices remain separate from the map and opponent choices. */
.battle-mode-picker{margin:16px 0;padding:16px;border:1px solid #a9bcc9;border-radius:12px;background:#edf3f5}.battle-mode-picker h4{margin:0 0 12px;font-size:18px}.battle-mode-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}#forge-dialog .battle-mode-cards button{display:flex;flex-direction:column;align-items:center;gap:7px;min-height:116px;padding:12px;text-align:center;border:2px solid #c2cbd4;background:#fff}.battle-mode-cards button>span{font-size:25px;color:#4c627e}.battle-mode-cards small{font-size:12px;line-height:1.4}#forge-dialog .battle-mode-cards button[aria-pressed=true]{border-color:#267987;background:#d7f0ee;box-shadow:0 3px 0 #267987}.battle-mode-picker p{margin:14px 0 0;line-height:1.6;font-size:13px}#forge-objective-note{border:1px solid #cbb477;border-radius:8px;background:#fff4d6;padding:9px;font-size:11px;line-height:1.5;order:0}#forge-objective-note strong,#forge-objective-note span,#forge-objective-note small{display:block}#forge-objective-note strong{font-size:13px}#forge-objective-note small{margin-top:4px}@media(max-width:650px){.battle-mode-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.battle-mode-picker{padding:10px}}

#elimination-pace-label{display:block;margin-top:12px}#elimination-pace-label[hidden]{display:none}#elimination-pace-label small{display:block;font-size:12px;line-height:1.6;margin-top:8px}.revival-controls{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;padding:10px;border:1px solid #ac945b;border-radius:9px;background:#fff0cb}.revival-controls strong{width:100%;font-size:12px}#forge-dialog .revival-controls button{min-height:44px;font-size:12px}

/* Board-first battle HUD. Setup retains the full character-sheet layout. */
#forge-dialog.arena-hud-active{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#10283c;display:block}
#forge-dialog.arena-hud-active>.space-dialog-bar,#forge-dialog.arena-hud-active>.space-session-note,#forge-dialog.arena-hud-active>.forge-toolbar,#forge-dialog.arena-hud-active>.forge-header,#forge-dialog.arena-hud-active>.forge-message,#forge-dialog.arena-hud-active>.forge-practice-tools{display:none!important}
#forge-dialog.arena-hud-active .forge-layout{position:absolute;inset:0;display:block;padding:0;margin:0;overflow:hidden;height:100%;grid-template:none}
#forge-dialog.arena-hud-active .forge-world{position:absolute;inset:0;display:block;height:100%;overflow:visible;padding:0}
#forge-dialog.arena-hud-active .forge-stage{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;aspect-ratio:auto;margin:0;border:0;border-radius:0;box-shadow:none;display:flex;align-items:center;justify-content:center;background:#234450}
#forge-dialog.arena-hud-active #forge-canvas{position:absolute;width:auto;height:auto;max-width:none;max-height:none;image-rendering:pixelated;touch-action:manipulation}
#forge-dialog.arena-hud-active .forge-view-rail,#forge-dialog.arena-hud-active #forge-panel{display:none!important;position:absolute;right:12px;top:76px;bottom:200px;width:min(410px,calc(100% - 24px));height:auto!important;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;background:#faf8f5f7;color:#26354a;border:1px solid #b5cddd;border-radius:15px;padding:14px;z-index:12;box-shadow:0 12px 40px #06152c66}
#forge-dialog.arena-hud-active[data-hud-drawer=team] #forge-panel,#forge-dialog.arena-hud-active[data-hud-drawer=details] .forge-view-rail{display:block!important}
#forge-dialog.arena-hud-active #forge-panel>.forge-battle-powers,#forge-dialog.arena-hud-active #forge-panel>.forge-turn-title,#forge-dialog.arena-hud-active #forge-panel>.forge-turn-label,#forge-dialog.arena-hud-active #forge-panel>.forge-combatants,#forge-dialog.arena-hud-active #forge-panel>.strategy-plan{display:none}
#forge-dialog.arena-hud-active .forge-team>div{display:grid;grid-template-columns:1fr 1fr;overflow:visible;flex-wrap:wrap;padding:4px 0;gap:6px}
#forge-dialog.arena-hud-active .forge-team [data-command]{min-width:0;width:100%;min-height:72px;flex:auto}
#forge-dialog.arena-hud-active .forge-team [data-command] b{white-space:normal;max-width:none}
#forge-dialog.arena-hud-active .forge-world-heading{display:block}.hud-drawer-close{position:sticky;top:0;z-index:2;width:100%;margin-bottom:12px!important;background:#203b55!important;color:#fff!important}
#forge-dialog.arena-hud-active[data-hud-drawer=menu]>.space-dialog-bar{display:flex!important;position:absolute;left:12px;right:12px;top:76px;z-index:15;border:1px solid #84b5ce;border-radius:12px;padding:12px;background:#10243af5}
#forge-dialog.arena-hud-active[data-hud-drawer=menu]>.forge-toolbar{display:flex!important;position:absolute;left:12px;right:12px;top:180px;z-index:15;flex-wrap:wrap;background:#faf8f5f7;border-radius:12px;padding:12px}
#forge-dialog.arena-hud-active[data-hud-drawer=menu]>.forge-practice-tools:not([hidden]){display:flex!important;position:absolute;left:12px;right:12px;top:265px;z-index:15;border-radius:12px}
.arena-hud{position:absolute;inset:0;z-index:6;pointer-events:none}.arena-hud button,.arena-hud select,.arena-hud label{pointer-events:auto}
.arena-hud-top{position:absolute;top:max(10px,env(safe-area-inset-top));left:12px;right:12px;display:flex;justify-content:space-between;align-items:start;gap:8px}
#forge-dialog .arena-hud-top button{min-height:48px;background:#142e48ed;color:#f3f8ff;border:1px solid #8ed0db;box-shadow:0 4px 12px #07152f44;font-size:13px;font-weight:700}
.hud-tools{display:flex;gap:7px}.hud-hero{display:flex;align-items:center;gap:8px;max-width:50%;text-align:left}.hud-hero canvas{width:38px;height:38px;image-rendering:pixelated;flex-shrink:0}.hud-hero span{line-height:1.35}
#forge-dialog .arena-hud [aria-expanded=true]{background:#e2f6f3;color:#163b50;border-color:#78e4e8}
.hud-dock{position:absolute;bottom:max(8px,env(safe-area-inset-bottom));left:12px;right:12px;pointer-events:auto;background:#102a43f2;color:#f3f8ff;border:1px solid #87bacf;border-radius:14px;padding:8px 10px;box-shadow:0 6px 25px #06132655}
.hud-caption{display:flex;align-items:center;gap:10px;margin-bottom:6px}.hud-caption .hud-turn{flex:1;font-size:12px;line-height:1.4}
#forge-dialog .hud-caption button{min-height:36px;padding:5px 10px;font-size:12px;background:#244e63;color:#fff;border-color:#8ccbd4}
.hud-powers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
#forge-dialog .hud-powers button{position:relative;display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:7px;align-content:start;min-height:76px;max-height:110px;padding:8px;text-align:left;border:2px solid #87a5bf;background:#f2f4f6;color:#20344e;overflow:auto}
#forge-dialog .hud-powers button[aria-pressed=true]{background:#d7f4f0;border-color:#66ecef;box-shadow:inset 0 -3px #278e9d}
.hud-powers strong{font-size:13px;line-height:1.2;overflow-wrap:anywhere}.hud-powers small{grid-column:2;font-size:10px;line-height:1.35;margin-top:3px}.hud-powers .hud-die{grid-row:1/4;font-size:12px;font-weight:800;align-self:start;padding:6px 2px;background:#dfd5ef;border-radius:7px;text-align:center}.hud-powers .hud-ready{color:#44666a}
.hud-feedback{font-size:12px;line-height:1.4;margin-top:6px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-height:17px}.hud-feedback.is-warning{color:#ffe2a4;font-weight:700}
#forge-dialog.arena-hud-active .hud-dock #forge-board-actions{position:static;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 0 0;margin:0;background:none;border:0;box-shadow:none;color:#fff}
#forge-dialog.arena-hud-active #forge-board-actions>.forge-action-feedback,#forge-dialog.arena-hud-active #forge-board-actions>.forge-turn-help{display:none}
#forge-dialog.arena-hud-active .forge-selection,#forge-dialog.arena-hud-active .forge-turn-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:0}
#forge-dialog.arena-hud-active .forge-selection{flex:1}
#forge-dialog.arena-hud-active #forge-board-actions button{min-height:42px;padding:7px 12px;font-size:12px;flex:0 1 auto}
#forge-dialog.arena-hud-active .forge-selection>label{display:none!important}
#forge-dialog.arena-hud-active .forge-selection.show-tile-picker>label{display:block!important;position:absolute;bottom:100%;left:10px;right:10px;padding:12px;border-radius:10px;background:#17364df7;color:#fff;z-index:7}
#forge-dialog.arena-hud-active .map-rotate-controls{inset:68px 12px auto;z-index:7}
#forge-dialog.arena-hud-active .map-rotate-controls button{min-height:44px;font-size:12px;padding:4px 8px}.map-rotate-controls svg{width:28px;height:28px}
#forge-dialog.arena-hud-active .forge-handoff{z-index:18}#forge-dialog.arena-hud-active.is-rotating #forge-canvas{pointer-events:none}
#forge-dialog.arena-hud-active .forge-tablet-status{display:block}
@media(max-width:650px){
 .arena-hud-top{left:6px;right:6px;gap:4px}.hud-tools{gap:4px}#forge-dialog .arena-hud-top button{padding:6px;min-height:44px;font-size:11px}.hud-hero{max-width:43%}.hud-hero canvas{width:26px;height:26px}.hud-hero span{font-size:11px}
 .hud-dock{left:6px;right:6px;padding:6px;bottom:6px}.hud-powers{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}#forge-dialog .hud-powers button{min-height:60px;max-height:76px;padding:5px;column-gap:4px;grid-template-columns:25px minmax(0,1fr)}.hud-powers strong{font-size:12px}.hud-powers small{font-size:9px}.hud-powers .hud-ready{display:none}.hud-caption{gap:4px}.hud-caption .hud-turn{font-size:10px}.hud-caption [data-hud=details]{font-size:10px!important;padding:4px!important}.hud-feedback{font-size:10px}
 #forge-dialog.arena-hud-active #forge-board-actions button{padding:5px 7px;font-size:11px;min-height:40px}#forge-dialog.arena-hud-active .forge-view-rail,#forge-dialog.arena-hud-active #forge-panel{top:64px;bottom:260px;right:6px;width:calc(100% - 12px)}
 #forge-dialog.arena-hud-active[data-hud-drawer=menu]>.space-dialog-bar{top:64px}.arena-hud-active .space-nav{grid-template-columns:1fr 1fr!important}#forge-dialog.arena-hud-active[data-hud-drawer=menu]>.forge-toolbar{top:245px}
 #forge-dialog.arena-hud-active .map-rotate-controls{inset:62px 6px auto}#forge-dialog.arena-hud-active .map-rotate-controls button span{display:none}
}
@media(max-height:550px) and (min-width:651px){.hud-powers small{display:none}#forge-dialog .hud-powers button{min-height:46px}.hud-caption{margin-bottom:4px}.hud-feedback{font-size:10px}.arena-hud-top{top:5px}#forge-dialog.arena-hud-active .map-rotate-controls{top:60px}}
/* Supersede legacy attack-preview sizing at every breakpoint. */
#forge-dialog.arena-hud-active .forge-stage{width:100%!important;max-width:none!important;min-width:0!important;height:100%!important;margin:0!important;inset:0!important;align-self:stretch!important;justify-self:stretch!important}
#forge-dialog .hud-die .tile-diagram{margin-top:5px;padding:0!important;grid-template-columns:repeat(5,4px);grid-template-rows:repeat(5,4px);gap:1px}
.hud-move-description{padding:10px;background:#e7f1ed;border-radius:8px;font-size:13px;line-height:1.6}
/* Reserve a steady dock footprint so longer status messages cannot zoom the map. */
#forge-dialog .hud-powers button{height:88px;max-height:88px;overflow:hidden}.hud-powers .hud-ready{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:650px){#forge-dialog .hud-powers button{height:70px;max-height:70px}}
@media(max-height:550px) and (min-width:651px){#forge-dialog .hud-powers button{height:46px;max-height:46px}}

/* Keep the controlled unit explicit, without opening the roster drawer. */
.hud-unit-switch{display:flex;gap:6px;overflow-x:auto;margin-bottom:5px}.hud-unit-switch[hidden]{display:none}#forge-dialog .hud-unit-switch button{min-height:44px;min-width:145px;text-align:left;border:1px solid #8eb4c8;background:#17334a;color:#fff;border-radius:9px;padding:5px 10px;font-weight:700}#forge-dialog .hud-unit-switch button small{display:block;font-weight:400;font-size:10px}#forge-dialog .hud-unit-switch button[aria-pressed=true]{background:#215c65;border:2px solid #7ff3ed;box-shadow:inset 0 -3px #7ff3ed}.unit-target-shortcuts{display:flex;gap:6px;overflow-x:auto;align-items:center}.unit-target-shortcuts button{min-height:40px;white-space:nowrap}.unit-target-shortcuts span{font-size:12px;color:inherit}.hud-powers:has(>button:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}

#forge-dialog .map-rotate-controls button[aria-pressed="true"]{background:#235568;border-color:#fff0ad;color:#fff6cf}
@media(max-width:500px){#forge-dialog .map-rotate-controls{gap:4px}#forge-dialog .map-rotate-controls button{font-size:10px;padding:4px;min-width:44px}}

#forge-dialog .target-key{color:#806410;font-weight:700}

.hud-revivals{display:flex;gap:6px;overflow-x:auto;max-height:90px;flex-wrap:wrap}.hud-revivals[hidden]{display:none}.hud-revivals button{min-height:44px;padding:8px 12px;border:2px solid #a8f0dc;border-radius:9px;background:#274660;color:#eefff9;font-weight:700}.hud-revivals button:disabled{opacity:.65}

/* The fifth card stays visible without adding another row on tablets. */
.hud-powers:has(.wild-card-button){grid-template-columns:repeat(5,minmax(0,1fr))}
#forge-dialog .wild-card-button{border-color:#e5bd74;background:#fff5dc;color:#263b50}
#forge-dialog .wild-card-button[aria-pressed=true]{border-color:#ffe2a0;background:#fff0b9;box-shadow:inset 0 -3px #c59b45}
.wild-card-icon svg,.hud-die svg{width:28px;height:35px;display:block;image-rendering:pixelated}
.wildcard-selection{flex-wrap:wrap}.wildcard-selection select{min-width:180px}.wild-loadout{padding:12px;border:2px solid #d3ae64;border-radius:10px;background:#fff5dc}
@media(max-width:650px){.hud-powers:has(.wild-card-button){display:flex;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:4px}.hud-powers:has(.wild-card-button)>button{flex:0 0 150px;scroll-snap-align:start}#forge-dialog .hud-powers .wild-card-button{height:70px}.hud-die svg{width:22px;height:28px}}

.wildcard-selection button{min-height:44px}
@media(max-width:650px){#forge-dialog .hud-powers .wild-card-button{position:sticky;right:0;z-index:2;flex-basis:138px;box-shadow:-5px 0 0 #17334a}.hud-caption .hud-turn:after{content:' · Swipe moves'}}

/* A compact forecast remains visible beside the arena, outside its touch targets. */
.hud-timeline{position:absolute;left:12px;top:120px;width:142px;max-height:calc(100% - 375px);overflow:auto;overscroll-behavior:contain;background:#10283ce8;border:1px solid #739da9;border-radius:10px;padding:8px;color:#e9f5f7;pointer-events:auto;font-size:11px;box-sizing:border-box}
.hud-timeline[hidden]{display:none}.hud-timeline>strong{display:block;margin-bottom:5px}.hud-timeline>small{display:block;font-size:9px;color:#bed0d7;margin-top:5px}.hud-timeline-entry{display:flex;gap:5px;align-items:center;min-height:30px;border-left:3px solid #76ddec;margin:3px 0;padding-left:4px;background:#24495b}.hud-timeline-entry.enemy{border-color:#f09a96;background:#4e3e51}.hud-timeline-entry canvas{width:25px;height:29px;object-fit:contain;image-rendering:pixelated}.hud-timeline-entry span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hud-timeline-entry b{width:12px;flex-shrink:0}
@media(max-width:850px){.hud-timeline{width:80px;left:5px;padding:4px}.hud-timeline-entry span{display:none}.hud-timeline>small{font-size:8px}}

/* Status counters: recipient turns, diamonds indicate effects consumed on use. */
.battle-status{display:inline-flex;flex-direction:column;gap:2px;margin:3px 3px 0 0;padding:4px 6px;border:1px solid var(--status-color);border-radius:5px;background:#182b3d;color:var(--status-color);font:11px/1.2 system-ui;text-align:left}.battle-status b{font-weight:650}.battle-status>span{letter-spacing:1px}.wild-card-button em{font-style:normal;font-weight:650}

.battle-status b{display:flex;align-items:center;gap:4px}.battle-status svg{flex:none}

/* Clear team identity and turn-based Wild charge. Text stays smooth, sprites stay pixel art. */
.team-0{border-left-color:#35c8ff!important}.team-1{border-left-color:#ff923d!important}
.hud-timeline-entry.friend{border-color:#35c8ff;background:#123f5c;color:#eaf9ff}
.hud-timeline-entry.enemy{border-color:#ff923d;background:#5c301d;color:#fff4e9}
.hud-timeline-entry.friend b{color:#79dcff}.hud-timeline-entry.enemy b{color:#ffbd87}
.hud-timeline-entry b,.hud-ready,.hud-hero,.battle-status{font-variant-numeric:tabular-nums}
.hud-hero[data-team="0"]{border-color:#35c8ff!important;box-shadow:inset 4px 0 #35c8ff}
.hud-hero[data-team="1"]{border-color:#ff923d!important;box-shadow:inset 4px 0 #ff923d}
.team-slot-groups section{background:#e6f5ff;border-color:#239bd1}.team-slot-groups section+section{background:#fff0e3;border-color:#df7831}
.team-0 meter::-webkit-meter-optimum-value{background:#159fda}.team-1 meter::-webkit-meter-optimum-value{background:#e97623}
.wild-charge{display:block;min-width:0;margin-top:5px;color:#293e50;text-align:left}
.wild-charge-label{display:block;font:700 10px/1.3 system-ui,sans-serif;letter-spacing:.04em;margin-bottom:3px}
.wild-charge-track{display:block;position:relative;overflow:hidden;height:9px;border:1px solid #566c80;border-radius:3px;background:#172e42;box-shadow:inset 0 1px 2px #0006}
.wild-charge-track>span{display:block;height:100%;background:linear-gradient(90deg,#43aee5,#9de8fa)}
.wild-charge-track:after{content:'';position:absolute;top:0;bottom:0;left:50%;width:2px;background:#172e42}
.is-charged .wild-charge-track>span{background:linear-gradient(90deg,#d6a32f,#ffe592);box-shadow:inset 0 1px #fff4c7}
.is-charged .wild-charge-label{color:#71501a}
#forge-dialog .hud-powers .wild-card-button{height:auto;min-height:96px;max-height:none;grid-template-rows:auto auto auto auto}
.hud-powers .wild-charge{grid-column:1/-1;width:100%;margin-top:3px}
@media(max-width:650px){#forge-dialog .hud-powers .wild-card-button{height:auto;min-height:96px}.wild-charge-label{font-size:9px}}

/* Forge preparation: keep task and hero context together. */
#forge-dialog.is-sheet .forge-steps{position:sticky;top:-18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;z-index:8;padding:10px 0;background:#f6f4ee;border-bottom:1px solid #ccc4d2}
.forge-edit-context{grid-column:1/-1;display:grid;grid-template-columns:minmax(180px,1fr) minmax(140px,1fr) auto;gap:8px 16px;align-items:center;padding:10px 14px;background:#eaf0f4;border:1px solid #a5bbc8;border-radius:10px;color:#24364f}
#forge-dialog .forge-edit-context label{margin:0;font-size:12px}.forge-edit-context select{width:100%;min-height:44px}.forge-edit-context strong,.forge-edit-context span{display:block}.forge-edit-context span{font-size:12px;line-height:1.4}.forge-edit-context small{grid-column:3;font-size:11px}
#forge-dialog .forge-edit-context button{background:#244e60;color:#fff;min-height:44px;font-size:14px}
#forge-dialog .path-cards{margin:14px 0;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.path-heading p{max-width:650px;line-height:1.5}.path-picker summary{min-height:44px;padding:12px;cursor:pointer}
.forge-reference-links,.forge-extra-rules{margin:12px 0}.forge-reference-links summary,.forge-extra-rules summary{cursor:pointer;min-height:44px;padding:10px;border-radius:6px;background:#e9e6ee;color:#293e50}
#forge-dialog .forge-steps button:focus-visible,#forge-dialog .forge-edit-context select:focus-visible,#forge-dialog .path-cards button:focus-visible{outline:3px solid #087d9a;outline-offset:3px}
@media(max-width:700px){#forge-dialog.is-sheet .forge-steps{top:-12px}.forge-edit-context{grid-template-columns:1fr auto;padding:8px}.forge-edit-context>div{display:none}.forge-edit-context small{grid-column:1/-1}.forge-edit-context label{min-width:0}#forge-dialog .forge-steps>button{font-size:12px;padding:8px 4px}#forge-dialog .path-cards{grid-template-columns:1fr}}
/* Keep the party available while editing names and powers; hide it at arena setup. */
#forge-dialog[data-sheet-step="2"] .team-intro{display:none}
.power-overview{margin-bottom:20px}.power-overview h3{margin:0}.power-overview-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.power-overview-cards button{display:flex;flex-direction:column;gap:8px;text-align:left;padding:14px;border:1px solid #9bacb5;border-radius:10px;min-height:126px;background:#edf4f5;color:#24364f}.power-overview-cards button[aria-expanded=true]{outline:3px solid #16758b;background:#d9edf0}.power-overview-cards small,.power-overview-cards span{font-size:12px}.party-role{display:block;font-size:11px;line-height:1.4}.forge-outfit-current{display:flex;gap:16px;align-items:center;margin:16px 0}.outfit-portrait canvas{width:80px;height:80px;image-rendering:pixelated}.forge-outfit-current p{margin:4px 0;max-width:640px}.forge-save-note{flex-basis:100%;padding:12px;background:#f4ebd6;color:#54431e}.sheet-footer{flex-wrap:wrap}.forge-glossary{display:grid;grid-template-columns:110px 1fr;gap:12px}.forge-glossary dd{margin:0}.sheet-power{scroll-margin-top:210px}.practice-lesson{padding:10px 16px;background:#e7f2ef;display:flex;gap:8px;flex-wrap:wrap;align-items:center;color:#253d47}.practice-lesson p{margin:0;width:100%}.practice-lesson button{padding:8px;border-radius:6px}.practice-lesson[hidden],.sheet-power[hidden]{display:none!important}#forge-dialog.is-practice .practice-lesson{position:relative;z-index:12}.team-file-bar{margin:16px 0}
@media(max-width:800px){.power-overview-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.power-overview-cards button:last-child{grid-column:1/-1}.forge-glossary{grid-template-columns:1fr}.forge-glossary dt{font-weight:bold}.sheet-power{scroll-margin-top:220px}}
#forge-dialog.arena-hud-active .practice-lesson{position:absolute;top:120px;left:12px;max-width:440px;border-radius:10px;box-shadow:0 3px 12px #0003}#forge-dialog .sheet-power-grid{grid-template-columns:1fr}.power-overview-cards button:focus-visible{outline:3px solid #087d9a}
@media(max-width:650px){#forge-dialog.arena-hud-active .practice-lesson{top:112px;left:6px;right:6px;max-width:none;padding:6px;font-size:11px}.practice-lesson p{display:none}}
.forge-quick-class{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:6px 16px;background:#f2eef6;padding:10px 14px;border:1px solid #b6a6c5;border-radius:8px}.forge-quick-class label{margin:0!important;font-weight:700}.forge-quick-class select{width:100%;min-height:44px}.forge-quick-class small{grid-column:1/-1;font-size:11px}#forge-dialog[data-sheet-step="2"] .forge-quick-class{display:none}.sheet-power{scroll-margin-top:330px}
.forge-class-slider{grid-column:1/-1;min-width:0;background:#f0edf5;border:1px solid #b6a6c5;border-radius:8px;padding:8px}.class-strip-heading{display:flex;align-items:center;gap:8px;font-size:12px}.class-strip-heading>span{margin-left:auto;font-size:11px}#forge-dialog .class-strip-heading button{flex:none;width:36px;min-height:32px;padding:0;font-size:22px}.forge-class-icons{display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:4px 2px;touch-action:pan-x}#forge-dialog .forge-class-icons button{flex:0 0 90px;display:flex;flex-direction:column;align-items:center;gap:0;min-height:74px;padding:3px;font-size:11px;line-height:1.2;background:#fff;color:#293b4e;border:1px solid #bcb4c9;border-radius:7px}.quick-class-picture canvas{width:44px;height:44px;image-rendering:pixelated}.forge-subclass-icons{display:flex;align-items:center;gap:6px;overflow-x:auto;padding:4px 0;font-size:12px}#forge-dialog .forge-subclass-icons button{flex:0 0 auto;display:flex;align-items:center;gap:4px;min-height:44px;padding:3px 10px;background:#fff;color:#293b4e;border:1px solid #bcb4c9;border-radius:7px;font-size:12px}.quick-path-picture canvas{width:32px;height:32px;image-rendering:pixelated}#forge-dialog .forge-class-slider button[aria-pressed=true]{background:#d3edf0;border:2px solid #24778b;color:#153945}#forge-dialog[data-sheet-step="2"] .forge-class-slider{display:none}#forge-dialog .forge-class-slider button:focus-visible{outline:3px solid #087d9a;outline-offset:1px}.sheet-power{scroll-margin-top:410px}
/* Identity ideas follow their editable fields, beside the portrait. */
#forge-dialog.is-sheet .sheet-identity>#forge-random-name,
#forge-dialog.is-sheet .sheet-identity>#forge-random-story{grid-column:2;grid-row:auto;width:fit-content;min-height:42px}
#forge-dialog.is-sheet .sheet-identity>#forge-random-story+.forge-hint{grid-column:2;grid-row:auto}

#forge-dialog.is-sheet .sheet-identity>.forge-name-generators{grid-column:2;display:flex;flex-wrap:wrap;gap:8px;margin-bottom:4px}.forge-name-generators button{min-height:44px;padding:9px 16px}.forge-name-generators button span{font-size:22px;vertical-align:middle;margin-right:6px}

.forge-name-generators .name-person{width:24px;height:32px;vertical-align:middle;margin-right:8px;fill:currentColor}.name-person-male{color:#2169bd}.name-person-female{color:#ce397c}

.forge-team-tools{display:flex;align-items:start;flex-wrap:wrap;gap:12px;margin:12px 0}.forge-team-presets{display:flex;flex:1;align-items:end;flex-wrap:wrap;gap:10px;padding:12px;background:#edf3f5;border:1px solid #b5c7d0;border-radius:12px}.forge-team-presets label{margin:0;min-width:170px}.forge-team-presets small{flex-basis:100%;line-height:1.5}.forge-team-presets button{min-height:44px}

/* Readable previews and a finish card that leaves the team visible. */
.hud-feedback{white-space:normal;max-height:110px;overflow:auto}.hud-feedback .forge-eyebrow{display:none}.hud-feedback>div{display:flex;flex-wrap:wrap;gap:3px 12px}.hud-feedback>div>strong:first-of-type{width:100%}.hud-feedback .friendly-fire-warning{color:#ffe2a4}.arena-results{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 16px;font-size:12px;max-height:95px;overflow:auto;margin:8px}.forge-handoff.is-victory{inset:auto 8px 8px;display:block;border-radius:15px;padding:14px;background:#10243bea;backdrop-filter:none}.forge-handoff.is-victory h3{font-size:23px;margin:4px}.forge-handoff.is-victory p{margin:5px;font-size:13px}

/* Optional simple power cards; the original layout remains available. */
.hud-power-style{display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-size:11px}.hud-power-style>span{margin-right:4px;opacity:.8}#forge-dialog .hud-power-style button{min-height:32px;font-size:11px;padding:4px 8px}#forge-dialog .hud-power-style button[aria-pressed=true]{background:#dcf4ed;color:#173b44;border-color:#89e6ce}.hud-caption{flex-wrap:wrap}.hud-simple-card{position:relative;min-width:0;--power-tint:#dcece7;--power-ink:#24665f}.hud-simple-card[data-kind=attack]{--power-tint:#f8e5d9;--power-ink:#a65434}.hud-simple-card[data-kind=heal]{--power-tint:#def0df;--power-ink:#38764c}.hud-simple-card[data-kind=move]{--power-tint:#dcebf5;--power-ink:#316c98}.hud-simple-card[data-kind=special]{--power-tint:#ede2f7;--power-ink:#7c5797}.hud-simple-card[data-kind=helper]{--power-tint:#f5edcd;--power-ink:#877031}
#forge-dialog .hud-powers.is-simple .hud-simple-action{width:100%;height:100%;min-height:100px;max-height:none;overflow:visible;grid-template-columns:44px minmax(0,1fr);align-content:center;padding:10px 38px 10px 10px;column-gap:10px;border-radius:12px;background:#fffdf6}#forge-dialog .hud-powers.is-simple .hud-simple-action[aria-pressed=true]{background:#e0f6ed;border-color:#66ecef}.hud-powers.is-simple strong{font-size:15px;line-height:1.25}.hud-powers.is-simple small{font-size:12px}.hud-powers.is-simple .hud-ready{font-size:10px;display:block}.hud-power-picture{grid-row:1/4;align-self:center;display:grid;place-items:center;width:44px;height:48px;border-radius:12px;background:var(--power-tint);color:var(--power-ink)}.hud-power-picture svg{width:32px;height:32px}
#forge-dialog .hud-powers.is-simple .hud-power-info{position:absolute;top:5px;right:4px;display:grid;place-items:center;width:32px;min-height:34px;max-height:34px;padding:0;border:0;background:transparent;color:#526780;font-size:21px;border-radius:8px;overflow:hidden}#forge-dialog .hud-power-info:focus-visible{outline:3px solid #167f94}.hud-power-explanation{padding:12px;background:#fffdf6;color:#24384b;border:1px solid #b6c9d2;border-radius:10px;margin:12px 0}.hud-power-explanation h3{margin:0 0 8px}.hud-power-explanation p{font-size:14px;line-height:1.65;margin:0}
@media(max-width:650px){.hud-power-style{margin-left:auto}.hud-power-style>span{display:none}#forge-dialog .hud-powers.is-simple .hud-simple-action{min-height:92px;grid-template-columns:34px minmax(0,1fr);column-gap:7px;padding:8px 32px 8px 7px}.hud-power-picture{width:34px;height:42px}.hud-power-picture svg{width:27px;height:27px}.hud-powers.is-simple strong{font-size:13px}.hud-powers.is-simple small{font-size:11px}}

@media(min-width:1000px){#forge-dialog .hud-powers.is-simple{grid-template-columns:repeat(5,minmax(0,1fr))}}

/* Keep the affected-square preview beside the simple move description. */
.hud-power-picture.has-footprint{height:auto;min-height:76px;gap:4px;padding:5px 0}.hud-power-picture.has-footprint>svg{width:25px;height:25px}.hud-power-picture .tile-diagram{border-radius:4px;grid-template-columns:repeat(5,5px);grid-template-rows:repeat(5,5px);gap:1px}

/* Keep the existing card/dock size: range and footprint share its small picture. */
#forge-dialog .tile-diagram.range-diagram{position:relative;width:36px;height:36px;padding:2px!important;grid-template-columns:repeat(var(--grid-size),1fr);grid-template-rows:repeat(var(--grid-size),1fr);gap:1px}
#forge-dialog .range-diagram .in-range{background:repeating-linear-gradient(135deg,#dca2a7 0 1px,#f5d9db 1px 3px)}
#forge-dialog .range-diagram .affected{background:#b8414d}
#forge-dialog .range-diagram .origin{background:#197e97;outline:1px solid #fff;z-index:1}
.range-number{position:absolute;right:-3px;bottom:-3px;background:#24384b;color:white;border-radius:3px;font:700 9px/12px system-ui;min-width:12px;text-align:center}

/* One clear entry path; advanced party setup stays available behind disclosure. */
#forge-dialog.is-entry .forge-layout,#forge-dialog.is-entry #forge-board-actions,#forge-dialog.is-entry .forge-rules,#forge-dialog.is-entry .forge-view-rail{display:none!important}
.forge-entry{max-width:960px;width:100%;margin:0 auto;padding:28px;box-sizing:border-box;color:#29394a}
.forge-entry[hidden]{display:none}.forge-entry h2{font-size:30px;margin:7px 0 10px}.forge-entry header p{max-width:650px;color:#596777;line-height:1.6}
.entry-hero-card{display:flex;gap:28px;align-items:center;background:#fffdf7;border:1px solid #d6cfdf;border-radius:20px;padding:28px;margin:24px 0 16px;box-shadow:0 8px 28px #25344b0b}
#entry-portrait{flex:0 0 180px;align-self:flex-start;background:#eae6f0;border-radius:16px;padding:12px}#entry-portrait canvas{width:100%;height:auto;image-rendering:pixelated}
.entry-hero-content{flex:1;min-width:0}.entry-source{font-size:12px;color:#546d5a;font-weight:700}.entry-hero-content h3{font-size:26px;margin:8px 0 4px}.entry-identity{margin:0 0 20px;color:#675677;font-weight:600}
.entry-pickers{display:flex;gap:12px;flex-wrap:wrap}.entry-pickers label{flex:1;min-width:180px;font-weight:600;font-size:13px}.entry-pickers select{display:block;width:100%;margin-top:7px;padding:12px;border:1px solid #bcb5ca;border-radius:9px;background:#fff;font:inherit;color:#28394b;min-height:46px}
.entry-powers{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0}.entry-powers span{background:#eeeaf3;border-radius:7px;padding:7px 10px;font-size:12px}.entry-actions{display:flex;gap:10px;flex-wrap:wrap}.entry-actions button,.entry-resume,.entry-more button{padding:13px 20px;min-height:48px;border:1px solid #bcb5ca;border-radius:10px;font:inherit;cursor:pointer}.entry-actions .forge-primary{background:#50644c;color:white;border-color:#50644c;font-weight:700}.entry-help{font-size:13px;line-height:1.5;color:#5e6c7a}.entry-resume{background:#eef3f7;margin:0 0 12px}.entry-more{padding:16px 0;border-top:1px solid #d8d3df}.entry-more summary{cursor:pointer;font-weight:600}.entry-more p{color:#5e6c7a}
@media(max-width:650px){.forge-entry{padding:18px}.entry-hero-card{padding:18px;gap:16px;flex-direction:column;align-items:stretch}#entry-portrait{flex:none;width:100px;align-self:center}.entry-actions button{flex:1}.forge-entry h2{font-size:25px}}

/* Bounded, swipeable picture shelves: no tall native character menus. */
.entry-pickers{display:block}.forge-picture-picker{min-width:0;max-width:100%;margin:8px 0 12px}.picture-picker-heading{display:flex;align-items:center;gap:6px;margin-bottom:6px;font-size:13px}.picture-picker-heading strong{margin-right:auto}.picture-picker-heading button{width:36px;height:32px;border:1px solid #c4becd;border-radius:8px;background:#f0edf5;font-size:22px;cursor:pointer}.picture-picker-strip{position:relative;display:flex;gap:7px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:3px 2px 8px;max-width:100%;scrollbar-width:thin;scrollbar-color:#9386a4 #eae5ef}.picture-choice{flex:0 0 88px;min-height:104px;max-width:100px;display:flex;flex-direction:column;align-items:center;gap:5px;border:1px solid #c7c0d0;border-radius:10px;background:#fff;padding:6px;scroll-snap-align:nearest;cursor:pointer;color:#29394a;font:600 11px/1.25 system-ui}.picture-choice canvas{width:58px;height:58px;object-fit:contain;border-radius:7px;image-rendering:pixelated}.picture-choice[aria-pressed=true]{background:#d7edf0;border:2px solid #357887;padding:5px;box-shadow:0 0 0 1px #357887}.picture-choice:focus-visible{outline:3px solid #886da4;outline-offset:2px}.entry-identity{margin-bottom:10px}.entry-powers{margin:10px 0}.entry-hero-card{align-items:flex-start}.forge-optional{border:1px solid #d6cfdf;border-radius:10px;padding:12px;margin:10px 0;background:#f1edf5}.forge-optional summary{cursor:pointer;font-weight:600;min-height:24px}.forge-optional[open]>summary{margin-bottom:12px}.forge-optional .sheet-footer{margin:0}.forge-optional label{display:block}.entry-pickers label[hidden]{display:none!important}
@media(max-width:650px){.picture-choice{flex-basis:78px;min-height:94px}.picture-choice canvas{width:50px;height:50px}.entry-hero-card{gap:10px}.forge-entry{padding:14px}.entry-hero-card{margin-top:14px}}
#forge-dialog .picture-choice{flex:0 0 80px;max-width:80px;min-height:96px;padding:5px;font:600 11px/1.2 system-ui;white-space:normal;justify-content:flex-start;gap:4px}#forge-dialog .picture-choice canvas{width:54px;height:54px}#forge-dialog .picture-choice[aria-pressed=true]{padding:4px;background:#d7edf0;border-color:#357887}#forge-dialog .picture-picker-heading button{padding:0;width:32px;min-height:28px;height:28px;font-size:20px}.forge-entry{padding-top:16px;padding-bottom:16px}.forge-entry h2{font-size:26px}.forge-entry header p{margin:6px 0;font-size:13px}.entry-hero-card{padding:20px;margin-top:16px;gap:20px}.entry-hero-content h3{font-size:22px;margin-top:4px}.entry-identity{font-size:13px}.entry-help{margin:7px 0 0}.entry-hero-card #entry-portrait{flex-basis:150px}.forge-picture-picker{margin:4px 0 7px}#forge-dialog [data-picture-select="entry-subclass"] .picture-choice{flex-basis:100px;max-width:110px;min-height:66px}#forge-dialog [data-picture-select="entry-subclass"] .picture-choice canvas{width:32px;height:32px}.entry-source{font-size:11px}.entry-actions button{padding:10px 16px;min-height:44px}

#forge-dialog[data-sheet-step="1"] .hero-file-disclosure,#forge-dialog[data-sheet-step="2"] .hero-file-disclosure,#forge-dialog[data-sheet-step="1"] .team-file-bar,#forge-dialog[data-sheet-step="2"] .team-file-bar{display:none}

/* Battle actions have one predictable home, above the power shelf. */
#forge-dialog.arena-hud-active .hud-dock{display:flex;flex-direction:column;gap:5px}.hud-unit-switch{order:0}.hud-caption{order:1}#forge-dialog.arena-hud-active .hud-dock #forge-board-actions{order:2;padding:5px 0 8px;border-bottom:1px solid #638899}.hud-powers{order:3}.hud-revivals{order:4}.hud-feedback{order:5}
#forge-dialog.arena-hud-active #forge-confirm,#forge-dialog.arena-hud-active #unit-confirm,#forge-dialog.arena-hud-active #wild-confirm{min-height:48px;padding:10px 18px;background:#ffe09b;color:#213347;border:2px solid #fff1c7;font-size:15px;font-weight:800;box-shadow:0 2px 0 #ad792d;max-width:390px}#forge-dialog.arena-hud-active #forge-confirm:disabled,#forge-dialog.arena-hud-active #unit-confirm:disabled,#forge-dialog.arena-hud-active #wild-confirm:disabled{opacity:.6;box-shadow:none}
#forge-dialog.arena-hud-active #forge-cancel-power,#forge-dialog.arena-hud-active #unit-cancel,#forge-dialog.arena-hud-active #wild-cancel{min-height:48px;background:#fbe5e6;color:#713338;border:2px solid #e4a6ad;font-weight:700}#forge-dialog .hud-caption [data-hud-move]{min-height:44px;background:#d9f5f5;color:#174b58;font-size:14px;font-weight:800}#forge-dialog .hud-unit-switch button{min-height:52px;min-width:190px;border-width:2px;font-size:13px}#forge-dialog .hud-unit-switch button[aria-pressed=true]{background:#d8f7f2;color:#163f47;border-color:#81fff0;box-shadow:inset 0 -4px #26877e}#forge-dialog .hud-unit-switch button small{font-size:11px}#forge-dialog.arena-hud-active .forge-selection .hud-tile-toggle{font-size:10px;min-height:32px;padding:5px 8px;background:#29475a;color:#d4e7f0;border-color:#658295;margin-left:auto}.hud-feedback.is-warning{white-space:normal;max-height:72px;overflow:auto}
@media(max-width:650px){#forge-dialog.arena-hud-active #forge-confirm,#forge-dialog.arena-hud-active #unit-confirm,#forge-dialog.arena-hud-active #wild-confirm{font-size:12px;padding:8px;min-height:44px;flex:1}#forge-dialog .hud-unit-switch button{min-width:155px;min-height:48px;font-size:11px}#forge-dialog.arena-hud-active #forge-cancel-power,#forge-dialog.arena-hud-active #unit-cancel,#forge-dialog.arena-hud-active #wild-cancel{min-height:44px;font-size:11px}.hud-dock{max-height:52dvh;overflow-y:auto}}
/* Compact battle HUD: the field owns the screen; secondary tools open on demand. */
#forge-dialog.arena-hud-active .hud-dock{gap:4px;padding:6px 10px;max-height:42dvh;overflow:visible}
#forge-dialog.arena-hud-active .hud-caption{margin:0;gap:8px;flex-wrap:nowrap}
#forge-dialog.arena-hud-active .hud-caption .hud-turn{flex:0 1 180px;font-size:10px}
#forge-dialog.arena-hud-active .hud-caption #forge-board-actions{flex:1;border:0;padding:0;min-width:0;gap:6px}
#forge-dialog.arena-hud-active .forge-turn-actions{margin-left:auto;padding-left:14px;border-left:1px solid #7895a4}
#forge-dialog.arena-hud-active .hud-dock #forge-board-actions button{min-height:44px;padding:6px 10px}
#forge-dialog.arena-hud-active .hud-dock #forge-confirm,#forge-dialog.arena-hud-active .hud-dock #unit-confirm,#forge-dialog.arena-hud-active .hud-dock #wild-confirm{max-width:300px}
#forge-dialog.arena-hud-active .hud-powers{display:flex;overflow-x:auto;overscroll-behavior:contain;gap:6px;padding-bottom:2px;scrollbar-width:thin}
#forge-dialog.arena-hud-active .hud-simple-card{flex:1 0 165px;min-width:165px}
#forge-dialog .hud-powers.is-simple .hud-simple-action{min-height:78px;padding:6px 40px 6px 6px;grid-template-columns:32px minmax(0,1fr);column-gap:6px}
.hud-powers.is-simple strong{font-size:13px}.hud-powers.is-simple small{font-size:10px}.hud-power-picture{width:32px;height:42px}.hud-power-picture svg{width:24px;height:24px}
#forge-dialog .hud-powers .hud-power-info{position:absolute;right:0;top:0;display:grid;place-items:center;width:44px;min-height:44px;max-height:44px;padding:0;border:0;background:transparent;font-size:20px;z-index:2}
#forge-dialog .hud-unit-switch button{min-height:42px;padding:4px 12px;min-width:160px;font-size:11px}.hud-unit-switch small{font-size:10px}
.hud-action-reason{order:4;font-size:11px;color:#ffe3a4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:15px}.hud-feedback{margin:0;min-height:0;font-size:11px;max-height:32px}.hud-feedback:empty{display:none}
.hud-map-key{font-size:10px;white-space:nowrap}.hud-revivals{display:none!important}
#forge-dialog.arena-hud-active .practice-lesson{display:none!important}
#forge-dialog.arena-hud-active.show-practice-help .practice-lesson:not([hidden]){display:flex!important;top:118px;right:12px;left:auto;max-width:310px;padding:12px}
.hud-objective{position:absolute;top:62px;left:50%;transform:translateX(-50%);max-width:44%;padding:5px 10px;border-radius:8px;background:#102a43dd;font-size:11px;line-height:1.3;max-height:38px;overflow:hidden;pointer-events:auto}
.hud-timeline{max-width:150px!important;font-size:11px}.hud-timeline-entry b{min-width:28px;font-size:10px}.hud-timeline-entry span{white-space:normal;line-height:1.2}.hud-timeline-entry canvas{width:24px;height:24px}
.hud-menu{position:absolute;right:12px;top:64px;width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 90px);overflow:auto;pointer-events:auto;padding:14px;background:#102a43fa;border:1px solid #87bacf;border-radius:12px;color:#f3f8ff;z-index:20;box-shadow:0 8px 25px #0005}
.hud-menu[hidden]{display:none!important}.hud-menu section{padding:4px 0 12px;border-bottom:1px solid #55758a}.hud-menu h3{font-size:13px;margin:10px 0}
#forge-dialog.arena-hud-active .hud-menu .space-dialog-bar,#forge-dialog.arena-hud-active .hud-menu .forge-toolbar,#forge-dialog.arena-hud-active .hud-menu .forge-practice-tools:not([hidden]){display:flex!important;position:static!important;flex-wrap:wrap;gap:8px;padding:8px;background:#f4f4ed;border-radius:8px;color:#243b4d}
#forge-dialog.arena-hud-active .hud-menu .space-nav{display:grid;grid-template-columns:1fr 1fr!important}
#forge-dialog .hud-menu #practice-hurt,#forge-dialog .hud-menu #practice-revive,#forge-dialog .hud-menu #forge-next-hero,#forge-dialog .hud-menu #forge-mode,#forge-dialog .hud-menu .forge-pill{display:none!important}
#forge-dialog.arena-hud-active .hud-menu button{min-height:44px}
#forge-dialog.arena-hud-active .hud-dock button:focus-visible{outline:3px solid #fff19b;outline-offset:2px}
@media(max-width:900px){.hud-map-key{display:none}#forge-dialog.arena-hud-active .hud-caption .hud-turn{flex-basis:100px}#forge-dialog.arena-hud-active .hud-dock .hud-tile-toggle{font-size:0;width:40px;padding:0}#forge-dialog.arena-hud-active .hud-dock .hud-tile-toggle:before{content:'▦';font-size:18px}.hud-objective{max-width:40%}}
@media(max-width:650px){#forge-dialog.arena-hud-active .hud-dock{max-height:45dvh;overflow-y:auto;left:4px;right:4px;padding:5px}#forge-dialog.arena-hud-active .hud-caption{flex-wrap:wrap;gap:4px}#forge-dialog.arena-hud-active .hud-caption #forge-board-actions{flex-basis:100%}#forge-dialog.arena-hud-active .hud-caption .hud-turn{flex:1}#forge-dialog.arena-hud-active .hud-simple-card{flex-basis:160px}#forge-dialog.arena-hud-active .hud-dock #forge-board-actions button{font-size:11px;padding:4px 7px}.hud-objective{top:60px;font-size:10px;max-width:60%}.hud-timeline{display:none!important}.hud-action-reason{white-space:normal;max-height:30px}.hud-feedback{max-height:28px}}
.hud-objective{color:#f3f8ff}
#forge-dialog.arena-hud-active .hud-caption .hud-unit-switch{flex:0 1 auto;max-width:350px;margin:0;gap:4px}#forge-dialog .hud-caption .hud-unit-switch button{min-width:138px;padding:4px 7px}.hud-feedback[hidden]{display:none!important}.hud-feedback{white-space:nowrap!important;max-height:17px!important;overflow:hidden!important}.hud-feedback p{display:inline;margin:0}.hud-feedback p+p:before{content:' · '}
@media(min-width:901px){.hud-caption:has(.hud-unit-switch:not([hidden])) .hud-map-key{display:none}}
@media(max-width:650px){#forge-dialog.arena-hud-active .hud-caption .hud-unit-switch{max-width:calc(100% - 130px)}.hud-caption .hud-unit-switch button small{display:none}}
#forge-dialog.arena-hud-active .forge-selection .hud-action-reason{flex:0 1 160px;white-space:normal;line-height:1.2;max-height:40px;font-size:10px;padding:0 4px}
@media(max-width:1100px){#forge-dialog.arena-hud-active .forge-selection .hud-action-reason{flex-basis:105px}.hud-caption .hud-map-key{display:none}}
#forge-dialog.arena-hud-active .forge-selection .hud-action-reason{order:0}
.hud-objective{top:116px;max-height:34px;max-width:48%;font-size:10px}.hud-timeline{width:180px;max-width:180px!important}.hud-timeline-entry span{overflow:visible;text-overflow:clip;overflow-wrap:anywhere}.hud-timeline-entry canvas{flex-shrink:0}
#forge-dialog .hud-powers.is-simple .hud-power-info{top:0;right:0;width:44px;min-height:44px;max-height:44px}
#forge-dialog.arena-hud-active[data-hud-drawer=menu] .map-rotate-controls{visibility:hidden}
@media(max-width:850px){.hud-timeline{width:90px;max-width:90px!important}.hud-objective{max-width:70%;top:112px}}
@media(max-width:650px){#forge-dialog.arena-hud-active .hud-dock{overflow-x:hidden}#forge-dialog.arena-hud-active .hud-dock #forge-board-actions .hud-tile-toggle{font-size:0!important;flex:0 0 44px;min-width:44px;width:44px;height:44px;overflow:hidden}#forge-dialog.arena-hud-active .hud-dock #forge-board-actions .hud-tile-toggle:before{content:'▦';font-size:20px}}

/* Emphasize confirmation within the existing 44px action row. */
#forge-dialog.arena-hud-active .hud-dock #forge-board-actions :is(#forge-confirm,#unit-confirm,#wild-confirm){height:44px;min-height:44px;max-height:44px;width:180px;min-width:180px;max-width:180px;flex:0 0 180px;white-space:nowrap;padding:6px 14px;font-size:17px;font-weight:900;line-height:1.2;background:#ffe09b;color:#172c3f;border:2px solid #fff3ca;box-shadow:0 0 0 2px #a97426,0 3px 0 #79541e}
#forge-dialog.arena-hud-active .hud-dock #forge-board-actions :is(#forge-confirm,#unit-confirm,#wild-confirm):disabled{background:#a7a18b;color:#243646;border-color:#c5c2ad;opacity:1;box-shadow:none}
@media(max-width:650px){#forge-dialog.arena-hud-active .hud-dock #forge-board-actions :is(#forge-confirm,#unit-confirm,#wild-confirm){width:150px;min-width:150px;max-width:150px;flex-basis:150px;padding:6px 10px;font-size:15px}}

.hud-status-key{position:absolute;right:12px;top:120px;width:180px;max-height:calc(100% - 300px);overflow:auto;overscroll-behavior:contain;background:#10283ce8;border:1px solid #739da9;border-radius:10px;padding:8px;color:#e9f5f7;pointer-events:auto;font-size:11px;box-sizing:border-box}.hud-status-key>strong{font-size:11px}.status-key-clock,.status-key-empty{font-size:10px;line-height:1.4;color:#c4d8df;margin:7px 0}.hud-status-row{display:flex;gap:7px;padding:7px 4px;background:#17445b;border-left:3px solid #76cfe1;margin-top:4px}.hud-status-row>span{flex:0 0 18px}.hud-status-row svg{width:18px;height:18px;image-rendering:pixelated}.hud-status-row b,.hud-status-row small{display:block}.hud-status-row small{color:#d5e4e9;font-size:10px;line-height:1.35;margin-top:3px}
@media(max-width:1100px){.hud-status-key{width:140px;right:5px;padding:5px;font-size:10px}}
@media(max-width:850px){.hud-status-key{display:none}#forge-dialog.arena-hud-active[data-hud-drawer=details] .hud-status-key{display:block;z-index:30;top:120px;right:12px;width:180px;max-height:calc(100% - 320px)}}
