Optimize the layout for phones in portrait.

Lock the app to the viewport on screens <=600px wide so the page itself
never scrolls: the topbar becomes a slim rail and the play area fills the
rest. Cards, trays, and type shrink so a shop round or a battle fits on
one screen; the shop and deck rows scroll sideways when a full six-pet
deck outgrows the width, keeping each tray's height fixed. Arrange is the
one screen allowed to scroll past the viewport, since a battle line can
run long.
This commit is contained in:
Greyson Parrelli
2026-07-26 15:04:54 -04:00
parent 4ed04c967b
commit de9bb480c2
2 changed files with 319 additions and 49 deletions
+11 -18
View File
@@ -592,24 +592,17 @@ export function BattlePhase({ view, send, step, setStep }: Props) {
>
Skip
</button>
<div className="battle-speed" role="group" aria-label="Playback speed">
<span className="battle-speed-label" aria-hidden>
</span>
{SPEED_OPTIONS.map((s) => (
<button
key={s}
className={`btn btn-ghost btn-sm battle-speed-btn ${
speed === s ? 'is-active' : ''
}`}
onClick={() => setSpeed(s)}
aria-pressed={speed === s}
title={`Play at ${s}× speed`}
>
{s}×
</button>
))}
</div>
<button
className="btn btn-ghost btn-sm battle-speed-toggle"
onClick={() => {
const i = SPEED_OPTIONS.indexOf(speed as (typeof SPEED_OPTIONS)[number])
setSpeed(SPEED_OPTIONS[(i + 1) % SPEED_OPTIONS.length])
}}
title="Playback speed — tap to cycle"
aria-label={`Playback speed ${speed}×, tap to change`}
>
{speed}×
</button>
</div>
</div>