.hand-scroller {justify-content:flex-start}
.hand-card:first-child {margin-left:auto}
.hand-card:last-child {margin-right:auto}
@media (min-width:1101px) and (min-height:650px) {
 body:has(.battle) #app {height:100dvh;display:grid;grid-template-rows:64px minmax(0,1fr)}
 body:has(.battle) .toolbar {min-height:64px;padding-top:8px;padding-bottom:8px}
 body:has(.battle) #app>main {min-height:0;min-width:0;width:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
 .battle {width:100%;height:100%;max-height:100%;min-height:0;padding-top:10px;gap:20px;margin:0 auto;grid-template-rows:minmax(0,1fr)}
 .arena {min-height:0;height:100%;max-height:100%;display:flex;flex-direction:column}
 .arena-head {flex:none;margin-bottom:7px}
 .timer {font-size:3rem}
 .progress {flex:none;margin-bottom:10px}
 .encounter-zone {flex:1;min-height:0;grid-template-rows:minmax(0,1fr)}
 .threat-wrap {height:100%;min-height:0;display:flex;align-items:center;justify-content:center}
 .threat {height:100%;max-height:100%;max-width:100%;width:auto;min-height:0;object-fit:contain}
 .threat.boss {width:auto;max-width:100%;height:auto;max-height:100%}
 .threat-info {max-height:100%;overflow:auto;padding:3px 0}
 .threat-name {font-size:1.3rem;margin-bottom:12px}
 .paid-strip {min-height:45px;margin-top:9px}
 .deck-stack {width:110px}
 .deck-stack img {max-height:180px;object-fit:contain}
 .stack-count {margin-top:12px}
 .hand-zone {min-width:0;margin-top:12px;padding-top:10px;padding-bottom:10px}
 .hand-top {min-height:42px}
 .hand-scroller {min-width:0;justify-content:flex-start;min-height:0;height:clamp(145px,25dvh,205px);padding-top:17px;padding-bottom:12px}
 .hand-card:first-child {margin-left:auto}
 .hand-card:last-child {margin-right:auto}
 .hand-card {width:auto;min-width:0;height:100%;aspect-ratio:220/341}
 .hand-card img {height:100%;width:auto}
 .selection-bar {min-height:48px}
 .footer-hint {padding-bottom:0;font-size:.7rem}
 .party-rail {min-height:0;overflow:auto;padding-top:3px}
 .party-rail .seat {padding:7px 0}
 .party-rail .portrait {width:46px;height:46px}
 .party-rail .seat-name {font-size:.85rem}
 .party-rail .deck-count {flex-wrap:wrap;gap:3px 8px;font-size:.69rem}
 .party-rail .small {font-size:.73rem}
 .history-feed {margin-top:12px;font-size:.72rem}
 .history-feed p {margin-bottom:7px}
 .event-panel {flex:none;max-height:180px;overflow:auto;margin:8px 0 0;padding:10px}
 .event-panel p {font-size:.85rem;margin-bottom:5px}
 .event-panel h3 {font-size:1.1rem}
 .ambush-panel {flex:none;padding:7px 0}
 .ambush-choice img {max-height:43px}
}
@media (min-width:721px) and (max-width:1100px) and (min-height:760px) {
 .encounter-zone {min-height:240px}
 .threat {max-height:280px}
 .hand-card {width:115px}
 .hand-scroller {min-height:180px}
}
@media (max-width:720px) {
 .battle {display:block;width:100%;max-width:100%;margin:0}
 .party-rail,.arena {width:100%;max-width:100%;min-width:0}
 .arena {margin-top:4px}
 .toolbar {padding:9px 10px;min-height:64px;gap:8px}
 .brand {font-size:.95rem;max-width:92px}
 .tools {flex-wrap:nowrap;gap:4px}
 .tools button,.tools .flag {width:44px;min-width:44px;min-height:44px;padding:7px!important}
 .tools [data-action=help],.tools [data-action=settings] {font-size:0}
 .tools [data-action=help]::before {content:'?';font:bold 1.4rem Georgia,serif}
 .tools [data-action=settings]::before {content:'\2699\fe0e';font:1.5rem Georgia,serif}
 .tools [data-action=fullscreen] {font-size:1.2rem}
 .home-art {overflow:visible}
 .home-copy h1 {font-size:clamp(2.7rem,15vw,4rem)}
 .hand-top {scroll-margin-top:10px}
 .event-panel button {max-width:100%}
 .event-panel .target-chip {min-height:44px}
 .result-actions {align-items:stretch}
 body:has(.event-panel) .encounter-zone {display:none}
 .event-panel {margin-top:4px;min-height:140px}
 .event-panel .event-thumb {display:block;width:69px;height:108px;object-fit:contain;float:right;margin:0 0 8px 10px;cursor:zoom-in;border-radius:4px}
 .event-panel::after {content:'';display:block;clear:both}
}
.event-thumb {display:none}
@media (max-width:380px) {
 .brand {max-width:82px;font-size:.85rem}
 .toolbar {padding:7px 8px;gap:5px}
 .tools {gap:3px}
}
