/* A continuous playmat. Card sizes follow the available table area. */
.match-shell{height:100dvh;min-height:0;background:#09151f}
.match-shell .site-header{height:46px;padding:0 18px;border-bottom-color:#344d59;background:#0a1822}
.match-shell .brand-mark{height:27px;width:25px}.match-shell .wordmark{font-size:15px}
.match-shell .match-menu-button{min-height:34px;padding:6px 14px;font-size:13px}
.match-shell .workspace{height:calc(100dvh - 46px);min-height:0;overflow:auto}
.match-shell .game-page{height:100%;max-width:1440px;padding:8px 18px;margin:auto;box-sizing:border-box}
.match-shell .table-wrap{height:100%;display:flex;flex-direction:column;gap:6px;min-width:0}
.match-shell .turn-banner{flex:none;min-height:38px;margin:0;padding:5px 10px;background:#112432;border-color:#2f536c;border-left:3px solid #82c9ff}
.match-shell .turn-banner.bot-turn{border-color:#5b5141;border-left-color:#f4ca7b;background:#28251f}
.match-shell #turn-activity{min-height:26px}
.match-shell .turn-banner strong{font-size:13px}.match-shell .turn-banner small{font-size:12px;margin:0;line-height:1.3;max-width:none}
.match-shell #turn-activity .opponent-play{min-height:28px;padding:0;gap:8px}
.match-shell #turn-activity .play-cards{max-width:64px;gap:3px}
.match-shell #turn-activity .play-card,.match-shell #turn-activity .play-hidden{width:20px;height:28px}
.match-shell #turn-activity .play-controls{flex-direction:row;gap:4px}
.match-shell #turn-activity .play-controls .btn{min-height:28px;padding:3px 8px;font-size:11px}
.match-shell #turn-activity .play-copy h2{font-size:12px}
.match-shell .table{flex:1 0 370px;min-height:370px;display:grid;grid-template-rows:1fr 1fr;position:relative;overflow:visible;padding:0;gap:0;border:2px solid #47717c;border-radius:22px;background:radial-gradient(ellipse at center,#24545b 0,#163c49 50%,#102633 100%);box-shadow:inset 0 0 0 5px #0c1b26,0 5px 20px #0007}
.match-shell .table:before{content:'';position:absolute;inset:8% 14%;z-index:-1;border:1px solid #bddcc438;border-radius:38px;background:repeating-linear-gradient(60deg,transparent 0 46px,#bbebdf04 47px 48px),repeating-linear-gradient(-60deg,transparent 0 46px,#bbebdf04 47px 48px);box-shadow:inset 0 0 60px #071a2833}
.match-shell .table:after{content:'';position:absolute;left:14%;right:14%;top:50%;height:1px;background:linear-gradient(90deg,transparent,#acd4c855,transparent);pointer-events:none}
.match-shell .table-half{position:relative;display:block;padding:0;min-height:0;gap:0;background:none;border:0;box-shadow:none}
.match-shell .table.turn-you,.match-shell .table.turn-bot{box-shadow:inset 0 0 0 5px #0c1b26,0 5px 20px #0007}
.match-shell .table.turn-you{border-color:#76bde6}.match-shell .table.turn-bot{border-color:#d5b06c}
.match-shell .table.turn-you .your-half{background:linear-gradient(0deg,#65b6e316,transparent 65%);box-shadow:inset 0 -3px #80c8ed;border-radius:0 0 20px 20px}
.match-shell .table.turn-bot .opponent-half{background:linear-gradient(180deg,#f0c87814,transparent 65%);box-shadow:inset 0 3px #e9c27e;border-radius:20px 20px 0 0}
.match-shell .player-line{position:absolute;left:12px;right:12px;top:8px;pointer-events:none;display:block;z-index:2}
.match-shell .your-half .player-line{top:auto;bottom:8px}
.match-shell .player-identity{font-size:11px;color:#d7e7eb;opacity:.85}
.match-shell .bench-row{position:absolute;left:0;right:0;top:33px;display:flex;justify-content:center;align-items:flex-start;gap:8px;min-height:0;padding:0;margin:0;border:0;background:none}
.match-shell .your-half .bench-row{top:auto;bottom:30px}
.match-shell .pokemon,.match-shell .slot{width:var(--bench-card,50px);min-width:0;flex:none;border-radius:5px;padding:0}
.match-shell .pokemon img{width:100%;max-width:none;height:auto;max-height:none;aspect-ratio:245/342;display:block}
.match-shell .slot{height:calc(var(--bench-card,50px)*1.4);min-height:0;border:1px solid #a1d7dd22;background:#061b2526}
.match-shell .active-area{position:absolute;left:50%;bottom:5px;transform:translateX(-50%);display:block;width:var(--active-card,75px);min-height:0;padding:0}
.match-shell .your-half .active-area{bottom:auto;top:5px}
.match-shell .active-area .pokemon,.match-shell .active-area .slot{width:var(--active-card,75px)}
.match-shell .active-area .slot{height:calc(var(--active-card,75px)*1.4)}
.match-shell .active-area .pokemon img{width:100%;max-width:none;max-height:none}
.match-shell .pokemon .attachments{gap:2px;margin-top:3px;min-height:12px;justify-content:center;flex-wrap:wrap}
.match-shell .attachments .energy{width:13px;height:13px;font-size:8px}
.match-shell .attachments .tool-tag{font-size:7px;padding:1px 3px}
.match-shell .hp-track{height:3px;margin-top:3px}
.match-shell .pokemon .hp{font-size:10px;padding:2px 4px;right:-3px;top:-6px;z-index:3}
.match-shell .pokemon .hp small{display:none}
.match-shell .active-area .hp{font-size:12px}
.match-shell .pokemon .damage-counter{height:23px;min-width:23px;font-size:11px;top:17px;right:-5px}
.match-shell .active-area .damage-counter{height:28px;min-width:28px;font-size:13px;top:21px}
.match-shell .used-tag{font-size:6px;padding:2px;bottom:18px}
.match-shell .board-turn-control{right:8px;top:50%;z-index:5;background:none;border:0;padding:0;box-shadow:none}
.match-shell .board-turn-control .btn{min-height:40px;padding:8px 12px;font-size:12px;border-radius:9px;box-shadow:0 3px 7px #0006}
.match-shell .prize-zone{position:absolute;left:13px;top:67%;transform:translateY(-50%);margin:0}
.match-shell .prizes,.match-shell .prizes:has(.prize-select-card){grid-template-columns:repeat(3,calc(var(--pile-card,32px)*.65));gap:4px}
.match-shell .prizes .card-back,.match-shell .prizes .prize-empty,.match-shell .prize-zone .prize-select-card{width:calc(var(--pile-card,32px)*.65);min-height:0;aspect-ratio:5/7}
.match-shell .prize-zone:has(.prize-select-card){z-index:6}
.match-shell .prize-zone .prize-select-card{min-width:30px;min-height:42px}
.match-shell .prizes:has(.prize-select-card){grid-template-columns:repeat(3,30px)}
.side-piles{position:absolute;right:13px;top:67%;transform:translateY(-50%);display:flex;gap:8px;align-items:start}
.match-shell .your-half .prize-zone,.match-shell .your-half .side-piles{top:33%}
.match-shell .selection-mode-active .side-piles{opacity:.4;transition:opacity .2s ease}
.pile{position:relative;width:var(--pile-card,32px);padding:0;border:0;background:none;flex:none;aspect-ratio:5/7;color:#eff7fa}
.pile .card-back,.pile img,.pile-empty{display:block;width:100%;height:100%;border-radius:4px;object-fit:contain;pointer-events:none}
.pile .card-back{box-shadow:2px -2px #7194a1,4px -4px #263c4e,0 4px 8px #0009}
.pile-empty{border:1px dashed #9cc9d155;background:#081b2722}
.pile-count{position:absolute;right:-5px;bottom:-7px;display:grid;place-items:center;min-width:21px;height:20px;padding:0 4px;border-radius:5px;border:1px solid #7faab8;background:#0d2636;color:#f0f7fb;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
.pile-discard:hover{filter:brightness(1.16)}.pile-discard:focus-visible{outline:2px solid #f6d38e;outline-offset:4px}
.match-shell .stadium{position:absolute;left:13px;top:50%;transform:translateY(-50%);z-index:4;width:var(--pile-card,36px);min-height:0;padding:0;pointer-events:auto}
.match-shell .stadium button{width:100%;display:block;padding:0}.match-shell .stadium img{width:100%;max-height:none;max-width:none;display:block}
.match-shell .stadium .placeholder{width:100%;height:auto;aspect-ratio:5/7;border-color:#80b8c33d;font-size:22px}
.opponent-hand{position:absolute;top:5px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:7px;height:23px;z-index:3}
.hand-backs{display:flex;padding-right:8px;max-width:200px}.hand-backs .card-back{width:15px;height:21px;margin-right:-6px;border-radius:2px;box-shadow:0 1px 3px #0006}
.hand-count{font-size:10px;color:#dceaf1;font-weight:800}
.match-shell .hand-panel{flex:none;position:relative;height:120px;margin:0;padding:7px 10px 5px;background:linear-gradient(#0d202b,#09141d);border:1px solid #395964;border-radius:11px;min-width:0}
.match-shell .hand-heading{position:absolute;top:5px;left:8px;z-index:3}.match-shell .hand-heading .btn{font-size:11px;min-height:24px;padding:3px 6px;background:#102632e8;border:1px solid #48626d;border-radius:5px}
.match-shell .hand{height:100%;min-height:0;margin:0;padding:16px 5px 1px;gap:8px;align-items:flex-start;justify-content:flex-start;overflow-x:auto;overflow-y:hidden}
.match-shell .hand-card:first-child{margin-left:auto}.match-shell .hand-card:last-child{margin-right:auto}
.match-shell .hand.wide-hand .hand-card{margin-inline:0}
.match-shell .hand.wide-hand{justify-content:flex-start}
.match-shell .hand-card{width:66px;min-width:66px;flex:none;transition:transform .18s ease,box-shadow .18s ease}
.match-shell .hand-card img{display:block;width:100%;height:auto;aspect-ratio:245/342}
.match-shell .hand-card.playable{box-shadow:0 0 0 1px #95e2d082,0 0 10px #7ce0c322}
.match-shell .hand-card.playable:after{display:none}
@media(hover:hover) and (pointer:fine){.match-shell .hand-card:hover{transform:translateY(-10px) scale(1.08);z-index:4}}
.match-shell .inline-selection{flex:none;min-height:0;max-height:230px;overflow:auto;margin:0;padding:9px 12px;border-radius:10px;background:#102634}
.match-shell .selection-heading h2{font-size:14px}.match-shell .selection-heading p{display:none}
.match-shell .selection-heading{display:flex;gap:10px}.match-shell .selection-controls{margin-top:6px}
.match-shell .selection-controls .btn{min-height:36px;font-size:12px;padding:7px 11px}
.match-shell .inline-selection .choice-tabs{margin:6px 0 0;padding-bottom:3px}
.match-shell .inline-selection .choice-tabs .btn{min-height:32px;font-size:11px;padding:6px 9px}
.match-shell .selection-tray{gap:10px;padding-bottom:8px}.match-shell .selection-option{flex-basis:66px}
.match-shell .selection-option .choice-card{padding:3px;width:66px}.match-shell .selection-option img{width:58px;height:82px;aspect-ratio:auto}
.match-shell .selection-read{font-size:10px;min-height:27px}
.match-shell .inline-inspector{flex:none;max-height:220px;overflow:auto;margin:0;padding:10px 12px}
.match-shell .inline-inspector header{margin-bottom:7px}.match-shell .inline-inspector h2{font-size:15px}
.match-shell .inline-inspector .detail-grid{grid-template-columns:76px 1fr;gap:12px}
.match-shell .inline-inspector .detail-text p{font-size:12px;line-height:1.5}.match-shell .inline-inspector .detail-text h3{font-size:13px}
.match-shell .inline-inspector .detail-sub{font-size:10px;line-height:1.4}.match-shell .inline-inspector .btn{min-height:36px;padding:7px 10px;font-size:12px}
.table-wrap:has(.selection-tray) .hand-panel,.table-wrap:has(.inline-selection[data-surface="board"]:not(:empty)) .hand-panel,.table-wrap:has(.inline-selection[data-surface="prizes"]:not(:empty)) .hand-panel{display:none}
.match-shell .table-wrap:has(.inline-inspector:not(:empty)) .hand-panel{height:90px}
.match-shell .table-wrap:has(.inline-inspector:not(:empty)) .hand-card{width:48px;min-width:48px}
.table-flying-card{backface-visibility:hidden;transform-style:preserve-3d}
@media(max-width:600px){
 .match-shell .site-header{height:40px;padding:0 10px}.match-shell .workspace{height:calc(100dvh - 40px)}
 .match-shell .game-page{padding:5px 5px max(5px,env(safe-area-inset-bottom))}.match-shell .table-wrap{gap:5px}
 .match-shell .table{border-radius:15px}.match-shell .table:before{inset:12% 10%;border-radius:22px}
 .match-shell .player-line{left:8px;right:8px}.match-shell .player-identity{font-size:10px}
 .match-shell .prize-zone{left:8px}.side-piles{right:8px;gap:6px}
 .match-shell .board-turn-control{right:7px}.match-shell .board-turn-control .btn{font-size:11px;min-height:36px;padding:7px 9px}
 .match-shell .stadium{left:8px}.match-shell .pokemon .hp{font-size:9px}.match-shell .active-area .hp{font-size:11px}
 .match-shell .hand-panel{height:112px;padding:5px 7px}.match-shell .hand{justify-content:flex-start;gap:7px;padding-top:17px}
 .match-shell .hand-card{width:61px;min-width:61px}.match-shell .turn-banner{min-height:36px;padding:5px 8px}
 .match-shell .hand .hand-card{margin-inline:0}
 .match-shell .turn-banner small{font-size:11px}.match-shell .turn-banner strong{font-size:12px}
 .match-shell .inline-selection{padding:8px;max-height:220px}.match-shell .selection-heading h2{font-size:13px}
 .match-shell .inline-inspector{max-height:200px}
}
@media(prefers-reduced-motion:reduce){.match-shell .hand-card,.match-shell .selection-mode-active .side-piles{transition:none}.match-shell .hand-card:hover{transform:none}}
