/* Phone playmat: fixed board, independently swipeable rows, safe-area controls. */
button,a,input,select,summary{touch-action:manipulation}
:focus-visible{outline:3px solid #ffe1a0;outline-offset:3px}
@media(min-width:0px){
 .shell:has(.tabletop),.shell.layout-ipad:has(.tabletop),.shell.hand-minimized:has(.tabletop){height:100dvh;padding:max(4px,env(safe-area-inset-top)) max(5px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left));gap:4px}
 .shell:has(.tabletop) .top{min-height:44px;padding:2px 6px}.brand-lockup{min-width:0}.top .eyebrow{display:none}.shell:has(.tabletop) .menu-trigger{min-width:44px;min-height:44px;padding:8px}.menu-trigger span{display:none}
 .shell:has(.tabletop) .rules-version-notice{display:none}.shell:has(.tabletop) .turnbar{min-height:40px;padding:4px 6px}.phase-current{gap:6px}.phase-current .phase-number{width:28px;height:28px;font-size:14px}.phase-current p{display:none}.phase-current .eyebrow{font-size:10px}.shell:has(.tabletop) .phase-current h2{font-size:15px}
 .shell:has(.tabletop) .tabletop{padding:3px;gap:3px;grid-template-rows:minmax(0,1fr) 38px minmax(0,1fr)}
 .tabletop .mat-half{grid-template-columns:64px minmax(0,1fr) 44px;grid-template-rows:17px minmax(0,1fr) 42px 48px;gap:3px;grid-template-areas:"player player player" "command field piles" "camp camp piles" "resources resources resources"}
 .tabletop .mat-half.opponent-half{grid-template-columns:44px minmax(0,1fr) 64px;grid-template-rows:17px 48px 42px minmax(0,1fr);grid-template-areas:"player player player" "resources resources resources" "piles camp camp" "piles field command"}
 .tabletop .mat-player{font-size:11px}.tabletop .mat-player small{display:none}.tabletop .mat-field{padding:2px;min-width:0;min-height:0}.tabletop .mat-field h2{font-size:10px;margin:0 0 3px}.tabletop .battlefield-cards{gap:9px;padding:4px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;touch-action:pan-x pan-y}
 .tabletop .mat-field .card{width:108px;min-width:108px;flex-basis:108px;padding:5px;min-height:70px}.tabletop .mat-field .card-meta strong{font-size:12px;line-height:1.15}.tabletop .mat-field .sample-card-art{height:26px}.tabletop .mat-field .card .stats{font-size:13px}.tabletop .mat-field .card .card-status-badges{display:none}
 .tabletop .mat-camp{height:42px}.tabletop .mat-camp h3{font-size:9px;margin:0}.tabletop .mat-camp .zone{padding:0 2px}.tabletop .mat-camp .zone-structures .slot,.tabletop .mat-camp .slot .card{height:29px;min-height:29px}.tabletop .mat-camp .slot .card{grid-template-columns:18px minmax(0,1fr);padding:2px}.tabletop .mat-camp .card .sample-card-art{height:20px}.tabletop .mat-camp .card-meta strong{font-size:10px}
 .tabletop .mat-piles{gap:5px}.tabletop .mat-piles .pile{min-height:44px;padding:3px}.tabletop .mat-piles .pile svg{width:16px;height:16px}.tabletop .mat-piles .pile strong{font-size:9px}.tabletop .mat-piles .pile b{font-size:15px}
 .tabletop .mat-warden{min-height:64px}.tabletop .mat-warden strong{font-size:10px;line-height:1.1}.tabletop .mat-warden b{font-size:21px}.tabletop .mat-warden .sample-card-art{height:20px}
 .tabletop .mat-resources{display:grid;grid-template-columns:minmax(0,1fr) 58px;grid-template-rows:28px 17px;gap:2px;overflow:visible}.tabletop .mat-resource-line{grid-column:1;min-width:0;gap:5px;overflow-x:auto;white-space:nowrap;scrollbar-width:none;font-size:11px}.tabletop .mat-resource-line>span{flex-shrink:0}.tabletop .supply-ready{font-size:0;padding:1px 5px}.tabletop .supply-ready b{font-size:21px}.tabletop .supply-ready svg{width:24px;height:24px}.tabletop .mat-resources .interception-meter{grid-column:1;grid-row:2;font-size:11px;justify-content:flex-start}.tabletop .mat-resources .interception-meter strong{display:inline;font-size:10px}.tabletop .mat-ability{grid-column:2;grid-row:1/3}.tabletop .mat-ability summary{min-height:44px;font-size:10px;display:flex;align-items:center}.tabletop .mat-ability[open]{display:block;inset:12% 5% auto!important;transform:none!important;width:90%!important;box-sizing:border-box}
 .tabletop .mat-location{max-height:38px;padding:2px 8px;overflow:auto}.tabletop .mat-location small{display:none}.tabletop .mat-location strong{font-size:12px}.tabletop .mat-location>span{font-size:10px}
 .shell:has(.tabletop) .bottom-game-bar{display:grid;grid-template-columns:1fr;gap:3px}.shell:has(.tabletop) .phase-progress{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;min-height:52px;box-sizing:border-box}.shell:has(.tabletop) .progress-button{min-height:46px;font-size:14px;white-space:normal}.shell:has(.tabletop) .phase-progress .dock-phase{font-size:12px}.shell:has(.tabletop) .hand-toggle{min-height:44px;font-size:12px;padding:6px 10px}.shell:has(.tabletop) .dock-head{min-height:44px}.shell:has(.tabletop) .hand-peek-strip{height:24px}.shell:has(.tabletop) .hand-peek{min-width:65px;touch-action:pan-x}.shell:has(.tabletop) .hand-dock{max-height:none}
 .shell:has(.tabletop) .hand-dock:not(.minimized) .dock-cards{position:fixed;z-index:45;left:0;right:0;bottom:calc(102px + env(safe-area-inset-bottom));max-height:225px;height:225px;min-height:0;padding:20px 18px 8px;box-sizing:border-box;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity}
 .shell:has(.tabletop) .hand-card{flex:0 0 145px;width:145px;margin-left:-20px;transform:none;scroll-snap-align:center}.shell:has(.tabletop) .hand-card:first-child{margin-left:0}.shell:has(.tabletop) .hand-card .card{min-height:175px}.shell:has(.tabletop) .hand-card:has(.selected-card){transform:translateY(-10px);z-index:50}.hand-quick-preview{display:none!important}
 .shell:has(.tabletop) .mat-reports{display:none}.nav-drawer{max-width:100%;width:min(340px,100vw);padding-bottom:max(18px,env(safe-area-inset-bottom))}.nav-drawer button{min-height:44px}
 .overlay{padding:8px;box-sizing:border-box;overscroll-behavior:contain}.overlay .modal{width:100%;max-width:100%;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:14px;box-sizing:border-box;overflow:auto}.overlay button,.overlay select,.overlay input{min-height:44px;font-size:16px}.overlay .modal-head{gap:8px}.overlay .modal-head h2{font-size:19px}.overlay .modal-head button{flex-shrink:0}.overlay .combat-matchup{grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);padding:6px;gap:5px}.combat-window-actions{position:sticky;bottom:-14px;background:#101d21;padding:10px 0;z-index:4}.combat-window-actions button{width:100%}.overlay .inspect{display:flex;flex-direction:column}.overlay .inspect>img{max-height:32dvh;width:auto;max-width:100%;object-fit:contain}.overlay .setup-fields{grid-template-columns:1fr}.overlay .difficulty-options{display:grid;grid-template-columns:1fr}.overlay.menu-page,.overlay.setup-page{padding:max(10px,env(safe-area-inset-top)) 10px max(12px,env(safe-area-inset-bottom))}.menu-page .start-menu,.setup-page .new-game-modal{max-height:none}.menu-tip-text{font-size:15px}.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(min-width:0px){
 button,summary{min-height:44px}.card:hover{transform:none}.card .card-interactions{display:none!important}.card.selected-card .card-interactions{display:block!important;position:fixed!important;inset:auto 10px calc(130px + env(safe-area-inset-bottom)) 10px!important;transform:none!important;width:auto!important;max-height:42dvh!important;overflow:auto!important;padding:14px!important;background:#12272bf7!important;border:1px solid #b9a575;border-radius:10px;box-shadow:0 12px 40px #000b;z-index:90!important;box-sizing:border-box}.card.selected-card .card-interactions button{min-height:44px;font-size:15px}.hand-card:has(.selected-card){transform:none!important}.hand-quick-preview{display:none!important}.card-interactions>strong{display:block;margin-bottom:8px}
}
@media(max-height:500px) and (orientation:landscape) and (max-width:1000px){
 .shell:has(.tabletop) .top,.shell:has(.tabletop) .turnbar,.shell:has(.tabletop) .rules-version-notice{display:none}.shell:has(.tabletop) .tabletop{grid-template-columns:1fr 90px 1fr;grid-template-rows:minmax(0,1fr)}.tabletop .mat-half.opponent-half{grid-template-columns:52px minmax(0,1fr) 64px;grid-template-areas:"player player player" "piles field command" "piles camp camp" "resources resources resources";grid-template-rows:17px minmax(0,1fr) 42px 48px}.tabletop .mat-center{min-width:0}.tabletop .mat-location{max-height:none}.shell:has(.tabletop) .bottom-game-bar{display:grid;grid-template-columns:minmax(0,1fr) 180px}.shell:has(.tabletop) .phase-progress{display:flex}.shell:has(.tabletop) .top{position:fixed;display:block;right:4px;top:4px;z-index:30;background:transparent;border:0;padding:0;min-height:0}.top .brand-lockup,.top .table-status{display:none}.top .menu-trigger{min-height:36px;padding:4px}.top .menu-trigger span{display:none}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.card.selected-card .card-interactions{visibility:visible;opacity:1;pointer-events:auto}
.touch-card-actions{position:fixed!important;inset:auto 10px calc(130px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;max-height:42dvh!important;overflow:auto!important;transform:none!important;padding:14px!important;background:#12272bf7!important;border:1px solid #b9a575;border-radius:10px;box-shadow:0 12px 40px #000b;z-index:90!important;box-sizing:border-box;visibility:visible!important;opacity:1!important;pointer-events:auto!important;display:block!important}.touch-card-actions button{min-height:44px;font-size:15px}.touch-card-actions .card-action-options{display:grid;gap:8px}
@media(min-width:0px){.overlay .inspect-grid{grid-template-columns:1fr}.overlay .full-card{max-height:32dvh;width:auto;max-width:100%;object-fit:contain}}
.overlay{z-index:110}.nav-shade{z-index:120}
@media(min-width:0px){.shell:has(.overlay) .touch-card-actions,.shell:has(.nav-shade:not([hidden])) .touch-card-actions{display:none!important}}
