/* Five active crew, one bench and two weapon choices. Camera geometry is unchanged. */
.neon-game .party-slots{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.crew-card{min-width:0;position:relative;border:1px solid var(--glass-border);border-radius:12px;overflow:hidden;background:var(--color-night-2);display:flex;flex-direction:column;--role-color:#51edff}
.crew-card.tone-fire{--role-color:#ff85dc}.crew-card.tone-heal{--role-color:#73ffbb}
.crew-card.selected{border-color:var(--color-cyan)}
.skill-trigger{white-space:normal;position:relative;min-width:0;display:grid;grid-template-rows:64px auto auto 20px;align-items:center;justify-items:center;gap:1px;padding:3px 2px 5px;width:100%;border:0;border-radius:0;background:linear-gradient(160deg,var(--glass-high),var(--glass-low));color:var(--color-ink);isolation:isolate}
.skill-trigger .slot-art{position:static;display:block;width:100%;height:64px;object-fit:contain;object-position:center;opacity:1;filter:none;transform:none}
.skill-trigger strong{font-size:12px;line-height:1.25;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.skill-trigger small{font-size:8px;line-height:1.3;text-align:center;min-width:0;overflow-wrap:anywhere;color:var(--role-color)}
.skill-status{white-space:normal;max-width:100%;font-size:9px;line-height:1.1;color:var(--color-muted);text-align:center;overflow-wrap:anywhere;z-index:1}
.skill-trigger:disabled{opacity:1;filter:none;color:var(--color-ink)}
.skill-trigger:disabled .skill-status{color:var(--color-muted)}
.skill-trigger.skill-ready{box-shadow:inset 0 0 16px color-mix(in srgb,var(--role-color) 40%,transparent)}
.skill-trigger.skill-ready .skill-status{color:var(--role-color);font-weight:900}
.skill-trigger .action-meter{position:absolute;bottom:0;left:0;right:0;height:3px;margin:0;background:var(--color-rule)}
.skill-trigger .action-meter i{display:block;height:100%;background:var(--role-color);width:0}
.crew-swap{min-height:44px;width:100%;font-size:10px;border:0;border-top:1px solid var(--glass-border);border-radius:0;background:var(--glass-low);color:var(--color-muted);padding:3px}
.crew-card.selected .crew-swap{background:var(--glass-high);color:var(--color-cyan)}
.crew-card .unit-work{padding:2px;font-size:8px;text-align:center;color:var(--color-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:14px}
.crew-empty{min-height:151px;align-items:center;justify-content:center;gap:5px;color:var(--color-cyan);font-size:11px}
.crew-empty b{font-size:24px}.crew-card.acting .slot-art{animation:crew-act .35s ease-out}.crew-card.swapped{animation:crew-swap .5s ease-out}
@keyframes crew-act{50%{filter:brightness(1.3);transform:scale(1.035)}}@keyframes crew-swap{50%{box-shadow:inset 0 0 25px var(--color-cyan)}}
.neon-game .weapon-quickbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;overflow:visible;padding:2px 0}
.neon-game .weapon-quickbar>.weapon-choice{width:100%;max-width:100%;min-height:63px;display:grid;grid-template-columns:35px minmax(0,1fr);gap:5px;padding:5px 7px;margin:0;border-radius:12px;white-space:normal;color:var(--color-ink)}
.neon-game .weapon-choice img{width:35px;height:43px;object-fit:contain}
.neon-game .weapon-choice strong{font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.neon-game .weapon-choice small{font-size:9px;line-height:1.35}.neon-game .weapon-choice:disabled{opacity:1;filter:none}
.neon-game .weapon-choice.equipped{border-color:var(--color-gold)}.neon-game .weapon-choice.backup{border-color:var(--color-cyan)}
.neon-game .weapon-choice.backup:disabled{border-color:var(--glass-border)}.neon-game .weapon-choice.backup b{font-size:24px;text-align:center;color:var(--color-cyan)}
.neon-game .reserve-rail.has-reserves{grid-template-columns:minmax(0,1fr);min-height:52px}
.neon-game .reserve-rail.has-reserves>.bench-choice{height:55px;display:grid;grid-template-columns:42px minmax(0,1fr) 44px;align-items:center;padding:3px 6px;gap:4px;opacity:1}
.neon-game .reserve-rail.has-reserves img{height:46px;max-height:46px;width:42px;object-fit:contain;position:static}
.neon-game .reserve-rail.has-reserves small{display:block;position:static;text-align:left;padding:0;background:none;font-size:9px;white-space:normal;overflow-wrap:anywhere}
.bench-choice>span{text-align:left;min-width:0}.bench-choice strong{font-size:12px}.bench-choice>b{font-size:10px;color:var(--color-cyan)}
.neon-game .reserve-rail .empty-reserve{flex-direction:row!important;min-height:52px!important;height:52px!important}
.neon-game .reserve-title{flex-wrap:wrap;gap:5px}.neon-game .reserve-title small{font-size:9px;white-space:normal}.reserve-title #reserve-edit{min-width:44px;min-height:44px;padding:3px 6px;border:0;border-radius:8px;background:var(--glass-high);color:var(--color-cyan);font-size:11px}
.weapon-pick{display:grid;grid-template-columns:52px minmax(0,1fr);gap:8px;align-items:center;width:100%;min-height:68px;padding:8px;border:1px solid var(--glass-border);border-radius:12px;color:var(--color-ink);background:var(--color-panel);text-align:left}
.weapon-pick img{width:52px;height:52px;object-fit:contain}.weapon-pick strong,.weapon-pick small{display:block}.weapon-pick strong{font-size:13px}.weapon-pick small{font-size:11px;line-height:1.5;color:var(--color-muted)}
.boss-phase{display:block;font-size:10px;font-weight:800;line-height:1.4;color:var(--color-gold);margin:2px 0}
#boss-hud[data-phase=recovery] .boss-phase{color:var(--color-green)}#boss-hud[data-phase=attack] .boss-phase{color:var(--color-pink)}
@media(max-width:480px){.skill-trigger{grid-template-rows:51px auto 21px 21px;padding:3px 2px 4px}.skill-trigger .slot-art{height:51px}.skill-trigger strong{font-size:10px}.skill-trigger small{font-size:8px}.skill-status{white-space:normal;max-width:100%;font-size:9px}.crew-card .unit-work{display:none}.crew-swap{font-size:9px}.crew-empty{min-height:152px}.neon-game .party-slots{gap:4px}.neon-game .weapon-choice strong{font-size:10px}.neon-game .weapon-choice small{font-size:8px}.neon-game .weapon-quickbar>.weapon-choice{padding:4px 5px;grid-template-columns:30px minmax(0,1fr)}.neon-game .weapon-choice img{width:30px;height:37px}.neon-game .reserve-title small{font-size:9px}.boss-phase{font-size:9px}}
@media(prefers-reduced-motion:reduce){.crew-card.acting .slot-art,.crew-card.swapped{animation:none}}
.motion-off .crew-card.acting .slot-art,.motion-off .crew-card.swapped{animation:none}
/* Combat controls: direct thumb actions and an explicit route back to upgrading. */
:root{--color-crew-fire:#ff85dc;--color-crew-heal:#73ffbb;--color-crew-support:#51edff;--color-scrim:rgba(3,12,30,.90);--color-action-glow:rgba(255,213,56,.38)}
.crew-card{--role-color:var(--color-crew-support)}.crew-card.tone-fire{--role-color:var(--color-crew-fire)}.crew-card.tone-heal{--role-color:var(--color-crew-heal)}
.neon-game .battle-shell>#ultimate-btn{position:absolute;right:14px;bottom:36px;z-index:12;width:76px;height:76px;min-width:64px;min-height:64px;touch-action:manipulation;box-shadow:0 2px 12px var(--color-shadow);pointer-events:auto}
.neon-game .battle-shell>#ultimate-btn.ready{box-shadow:0 0 22px var(--color-action-glow),inset 0 0 15px var(--color-action-glow)}
.neon-game .battle-shell>#ultimate-btn:disabled{opacity:.7;filter:saturate(.4)}
.neon-game .battle-shell>#ultimate-btn>span{font-size:25px;line-height:1.05}.neon-game .battle-shell>#ultimate-btn>strong{font-size:11px}
.neon-game .battle-shell #battle-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.neon-game .battle-controls{left:11px;right:104px;bottom:36px;display:grid;grid-template-columns:44px minmax(0,1fr) minmax(0,1.25fr);gap:5px;width:auto;max-width:270px;min-height:44px}
.neon-game .battle-controls button{min-height:44px;padding:4px 5px;font-size:11px;white-space:nowrap;margin:0}
.neon-game #retreat-btn{color:var(--color-ink);background:var(--color-scrim)}
.neon-game .swap-and-skill{display:block;padding:0}.neon-game .reserve-panel{width:100%}
.neon-game .reserve-title{display:grid;grid-template-columns:auto minmax(0,1fr) 44px;align-items:center;gap:5px;min-height:22px;margin-bottom:3px}
.neon-game .reserve-title>strong{grid-column:1;grid-row:1}.neon-game .reserve-title>small{grid-column:2;grid-row:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.neon-game .reserve-title>#reserve-edit{grid-column:3;grid-row:1}
.crew-instruction{color:var(--color-muted);font-size:10px;line-height:1.4;margin:0 0 5px}
.drawer-return{position:sticky;bottom:-18px;z-index:3;display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:center;padding:12px 0 max(12px,env(safe-area-inset-bottom));background:var(--color-panel);border-top:1px solid var(--glass-border)}
.drawer-return>button{min-height:48px;flex:1 1 180px;padding:10px;font-size:13px;white-space:nowrap}
.battle-report{display:flex;flex-direction:column;gap:6px;margin-top:12px}.battle-report article{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px;border-bottom:1px solid var(--glass-border)}
.battle-report article:first-child{grid-template-columns:minmax(0,1fr) auto}.battle-report img{width:44px;height:48px;object-fit:contain}.battle-report strong{font-size:13px}.battle-report small,.battle-report span{display:block;font-size:11px;line-height:1.5}.battle-report article>div:last-child{text-align:right}.report-overview p{font-size:12px;line-height:1.65;margin-top:5px}
#combat-dock button:focus-visible,.crew-card:focus-within{outline-color:var(--color-focus)}
.skill-trigger[data-state=error],.weapon-choice[data-state=error]{outline:2px solid var(--color-red)}
.skill-trigger[data-state=success],.weapon-choice[data-state=success]{outline:2px solid var(--color-green)}
.skill-trigger[data-state=loading],.weapon-choice[data-state=loading]{opacity:.65;cursor:progress}
@media(hover:hover){.skill-trigger:not(:disabled):hover{background:var(--glass-high)}.crew-swap:hover{color:var(--color-cyan);background:var(--glass-high)}.weapon-choice:not(:disabled):hover{box-shadow:inset 0 0 14px var(--glass-high)}}
@media(max-width:480px){.neon-game .battle-shell>#ultimate-btn{right:9px;width:65px;height:65px;bottom:36px}.neon-game .battle-shell>#ultimate-btn>span{font-size:22px}.neon-game .battle-controls{left:9px;right:81px;max-width:none;grid-template-columns:44px minmax(0,1fr) minmax(0,1.35fr);gap:4px}.neon-game .battle-controls button{font-size:10px;min-width:0;min-height:44px;padding:3px}.neon-game #speed-btn{min-width:44px}.crew-instruction{font-size:9px}.battle-report article{grid-template-columns:36px minmax(0,1fr) auto;gap:5px}.battle-report img{width:36px}.battle-report strong{font-size:11px}.battle-report small,.battle-report span{font-size:10px}}
.map-chapters{display:grid;grid-template-columns:repeat(var(--chapters,3),minmax(0,1fr));gap:6px;margin:12px 0;position:sticky;top:0;z-index:2;padding:4px 0;background:var(--color-panel)}
.map-chapters button{min-width:0;min-height:44px;border-radius:10px;font-size:12px;color:var(--color-ink);background:var(--color-night-2);white-space:nowrap;padding:5px}
.map-chapters button.selected{background:var(--color-cyan);color:var(--color-night);font-weight:900;border-color:var(--color-cyan)}
.stage-challenge{font-size:12px;font-weight:800;color:var(--color-ink)}.stage-roles{font-size:10px;line-height:1.5;color:var(--color-cyan);white-space:normal;overflow-wrap:anywhere}.stage-card{white-space:normal}.neon-game .stage-card img{object-fit:cover}.neon-game .stage-card .stage-reward{line-height:1.5}.neon-game .stage-card strong{line-height:1.4}
@media(max-width:480px){.map-chapters button{font-size:11px}.stage-challenge{font-size:11px}.stage-roles{font-size:9px}}
.neon-game .health[data-condition=poison] #hp-text{color:var(--color-crew-fire)}.neon-game .health[data-condition=poison] #hp-fill{background:var(--color-crew-fire)}
.neon-game .health[data-condition=guard] .meter{outline:1px solid var(--color-cyan);box-shadow:0 0 8px var(--neon-cyan)}.neon-game .health[data-condition=guard] #hp-text{color:var(--color-cyan)}
#battle,.skill-trigger,.crew-swap,.weapon-choice,#ultimate-btn{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.need-chip.carried{border-color:var(--color-gold);color:var(--color-gold);background:var(--glass-low)}#goal-label.urgent{color:var(--color-crew-fire);font-weight:900}
.neon-game .weapon-choice.equipped.cooling{border-color:var(--color-crew-fire)}.weapon-choice.cooling #weapon-tempo{color:var(--color-crew-fire);font-weight:900}
/* Live contribution totals stay with the character, including on the bench. */
.neon-game .skill-trigger .unit-work{display:block;position:static;min-width:0;width:100%;font-size:9px;line-height:1.05;white-space:nowrap;font-variant-numeric:tabular-nums;color:#eef7ff;text-align:center;padding:1px 0 0;overflow:hidden;text-overflow:clip}
.neon-game .hero-work{display:block;font-size:9px;line-height:1.1;margin-top:3px;color:#cdf4ff;font-variant-numeric:tabular-nums;white-space:nowrap}
.neon-game .bench-work{color:#eef7ff!important;font-variant-numeric:tabular-nums;font-size:9px!important;white-space:nowrap}
.neon-game .bench-choice{position:relative}.neon-game .bench-choice .bench-work{grid-column:2;grid-row:2;text-align:left}.neon-game .bench-choice>img{grid-row:1/3}.neon-game .bench-choice>b{grid-column:3;grid-row:1/3}.neon-game .bench-choice>span{grid-column:2;grid-row:1}
