/* Tournament table: cards, zones and decisions take precedence over panels. */
:root{--bg:#10151b;--panel:#171e26;--panel2:#202a35;--line:#35404c;--muted:#a0adba;--text:#f2f3f5;--mint:#f0cc7a;--mint2:#e0b85c;--radius:8px;font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
h1,h2,h3,.wordmark,.deck-stat b{font-family:inherit}h1{letter-spacing:-1px}button{transition:background .12s,border-color .12s}.shell{display:block;padding:0}.site-header{height:68px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:36px;padding:0 32px;background:#10151b}.site-header .brand{color:var(--text)}.site-header .brand small{font-size:8px;letter-spacing:2px}.brand-mark{width:32px;height:36px}.wordmark{font-size:17px}.site-header .nav{display:flex;gap:4px;height:100%;align-items:stretch}.nav button{border-radius:0;padding:0 18px;gap:8px;border-bottom:2px solid transparent}.nav button.active{background:none;border-color:var(--mint);color:var(--text)}.nav button:hover:not(.active){background:#ffffff08}.header-build{margin-left:auto;display:flex;align-items:center;gap:14px;color:var(--muted);font-size:11px}.icon-btn,.btn,.select{border-radius:6px}.btn.primary{background:var(--mint);border-color:var(--mint);color:#211a0c}.btn.primary:hover{background:#ffe2a0}.btn:hover:not(:disabled){background:#2a3440;border-color:#718292}.btn.primary:hover:not(:disabled){background:#ffe2a0}.badge.mint,.segmented button.selected{background:#3d3422;border-color:#6b5933;color:#f0cc7a}.page{max-width:1400px;padding:30px 32px}.page-heading{margin-bottom:22px}.page-heading .eyebrow{color:#d7b970}.matchup-panel{background:#1b2530;border-color:#3b4652;border-radius:8px}.matchup-art:before{background:none}.matchup-top{padding:20px 26px}.matchup-top .eyebrow{color:#c8d0da}.matchup-decks{padding-bottom:24px}.matchup-footer{background:#121a23}.settings-panel{border-radius:8px}.bottom-grid{gap:20px;margin-top:20px}.info-card{border-radius:8px}.bot-note svg{color:var(--mint)}.game-page{max-width:1600px;padding:18px 26px}.game-header{margin-bottom:14px}.game-header h1{font-size:20px;letter-spacing:-.4px}.game-header p{font-size:11px}.game-header-actions .badge{display:none}.game-layout{display:block}.game-layout.log-open{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px}.game-side{display:none}.log-open .game-side{display:flex;max-height:820px;border-radius:8px;background:#171e26}.game-side .game-controls{display:none}.game-side .log{max-height:none}.game-side-head{padding:17px}.turn-tokens{padding:12px}.turn-token{color:#c9d5e4;border-color:#56697d;border-radius:4px}.turn-banner{padding:10px 16px;min-height:58px;margin-bottom:10px;border-radius:6px;background:#202d3b;border:1px solid #405873;border-left:4px solid #86b8e6}.turn-banner strong{color:#f0f3f7;font-size:13px}.turn-banner small{font-size:11px;margin-top:3px}.turn-banner.bot-turn{background:#30252a;border-color:#65414b;border-left-color:#df8c8b}.table{min-height:0;gap:0;padding:0;border-radius:10px;border:1px solid #4a5664;box-shadow:0 10px 25px #0003;background:repeating-linear-gradient(0deg,#ffffff02 0px,#ffffff02 1px,transparent 1px,transparent 4px),#1c2631;isolation:isolate}.table:before{inset:9px;border:1px solid #8d9cab26;border-radius:5px;z-index:-1}.table-half{padding:13px 24px;display:flex;flex-direction:column;gap:10px;position:relative}.opponent-half{background:#60373c0e;border-top:3px solid #a46469}.your-half{background:#31649b0e;border-bottom:3px solid #699ac7}.opponent-half:after{content:'';position:absolute;left:20px;right:20px;bottom:0;border-bottom:1px solid #68798a65}.board-line{display:none}.player-identity{font-size:12px}.player-identity small{font-size:10px}.player-identity .avatar{background:#324960;color:#b6d8ff;border-radius:4px}.opponent-half .avatar{background:#583940;color:#f0b0b3}.zone-stat{background:#111b2680;border-color:#72849840;color:#c4cfdb;font-size:11px;padding:6px 9px;border-radius:4px}.zone-stat button{font-size:11px;min-height:20px}.bench-row{gap:14px;min-height:123px}.pokemon{width:78px}.pokemon img{width:74px;border-radius:4px;box-shadow:0 3px 7px #0008}.slot{width:78px;min-height:104px;border:1px solid #7e90a132;background:#0c172233;border-radius:4px}.slot.empty-slot{font-size:9px;color:#9eb1c669;letter-spacing:1px}.pokemon .hp{font-size:9px;background:#152131;border:1px solid #7794b1;color:#f4f7fa;padding:3px 5px;border-radius:3px;right:-7px}.pokemon.damaged .hp{background:#542d2a;border-color:#c6847c;color:#ffdcd5}.active-area{min-height:145px;grid-template-columns:1fr 150px 1fr}.active-area .pokemon{width:106px}.active-area .pokemon img{width:98px;max-height:138px}.active-area .hp{font-size:10px;right:-4px}.active-area .attachments .energy-dot{height:16px;width:16px;font-size:9px}.active-area .slot{width:98px;min-height:138px}.attachments{gap:3px;margin-top:5px}.attachments .energy-dot{width:13px;height:13px;font-size:8px}.prizes{grid-template-columns:repeat(3,27px);gap:5px}.card-back{width:27px;border-color:#8b9db14d;background:repeating-linear-gradient(135deg,#344659 0,#344659 4px,#283849 4px,#283849 8px)}.card-back:after{border-color:#ccd7e66b}.zone-label{font-size:9px;color:#98aabd;letter-spacing:1.5px}.stadium img{border-radius:4px}.stadium .placeholder{background:none;border-color:#8299af4d;border-radius:4px;color:#8aa0b5}.hand-panel{padding:14px 14px 8px;background:#111b26;margin-top:10px;border:1px solid #344453;border-radius:8px}.hand-heading{font-size:12px}.hand-help{font-size:10px;margin:0 0 9px}.hand{padding:6px 2px 8px;gap:10px}.hand-card{width:88px;flex-shrink:0}.hand-card img{border-radius:4px}.hand-card.playable img{outline:1px solid #e4c473;outline-offset:2px;box-shadow:0 0 0 3px #e4c47118}.hand-card span{font-size:9px}.table-controls{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.table-controls .btn{font-size:11px}.seed{font-size:10px}.game-page>.footer{padding-top:10px}.opponent-play{width:min(630px,calc(100vw - 32px));min-height:136px;padding:16px 20px;gap:16px;border-radius:8px;box-shadow:0 10px 35px #0008;background:#202b38fa;border-color:#6888a8}.play-aura{display:none}.play-card{width:76px;height:106px}.play-copy h2{font-size:19px}.play-copy p{font-size:12px}.play-copy .eyebrow{color:#b7cadf}.play-progress{background:#c6a75e;height:2px}.play-attack,.play-knockout{background:#302821fa;border-color:#b49a6a}.pokemon.play-highlight{outline:2px solid #f2d796;outline-offset:4px;box-shadow:0 0 14px #f1d79630;animation:none}.dialog{background:#17222d;border-color:#4c5c6b;border-radius:10px}.dialog-content .notice{border-left-color:#6b8197}.dialog-backdrop{backdrop-filter:blur(3px)}.dialog-footer{background:#141e28}.deck-heading-actions{display:flex;gap:9px;flex-wrap:wrap}.builder-toolbar{position:sticky;top:0;z-index:3;background:#17222df5;padding:14px;display:flex;gap:24px;align-items:center;border:1px solid var(--line);border-radius:6px}.builder-toolbar>strong{font-size:20px;white-space:nowrap;color:var(--mint)}.builder-search,.builder-filter{font-size:10px;color:var(--muted);display:grid;gap:5px}.builder-search{flex:1}.builder-search input{width:100%;border:1px solid var(--line);border-radius:4px;background:#101820;padding:10px 12px;color:var(--text);font-size:13px}.builder-filter .select{padding:10px}.builder-warning,.builder-valid{font-size:12px;padding:14px 0;line-height:1.6}.builder-warning{color:#efb49b}.builder-valid{color:#c7d6bc}.builder-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(115px,1fr));gap:18px 15px}.builder-card{min-width:0;padding:7px;border:1px solid transparent;border-radius:6px;background:#17212d}.builder-card.included{border-color:#7a6841}.builder-face{border:0;background:none;padding:0;width:100%;text-align:left}.builder-face img{width:100%;aspect-ratio:.716;object-fit:contain;display:block;border-radius:5px}.builder-face span{display:block;font-size:10px;margin:8px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quantity-control{display:flex;justify-content:space-between;align-items:center;gap:5px}.quantity-control .btn{padding:4px;width:32px;min-height:34px;font-size:19px;background:#293747}.quantity-control strong{font-size:14px}.card-grid{grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:16px}.library-card img{max-height:195px}.notice{border-left-color:#64778a}.footer{color:#8d9aa7}.footer button{color:#b0bfce}
@media(min-width:1100px) and (max-height:850px){.site-header{height:56px}.game-page{padding-top:12px}.table-half{gap:7px;padding:10px 24px}.bench-row{min-height:103px}.bench-row .pokemon{width:66px}.bench-row .pokemon img{width:61px}.slot{width:66px;min-height:86px}.active-area{min-height:117px}.active-area .pokemon img{width:80px;max-height:112px}.active-area .slot{min-height:112px}.hand-card{width:78px}.game-header{margin-bottom:9px}}
@media(max-width:1000px){.site-header{padding:0 20px;gap:20px}.game-layout.log-open{display:block}.log-open .game-side{display:flex;max-height:400px;margin-top:18px}.game-side .log{max-height:260px;min-height:150px}.header-build>span{display:none}.site-header .wordmark{display:block}.site-header .nav button span{display:inline}.game-page{padding:18px}.table-half{padding:12px 16px}.table-controls{justify-content:flex-start}}
@media(max-width:600px){.site-header{height:60px;gap:10px;padding:0 12px}.site-header .brand small,.site-header .nav svg,.header-build{display:none}.site-header .brand{gap:5px}.brand-mark{width:25px;height:30px}.site-header .wordmark{font-size:13px}.site-header .nav{gap:0;margin-left:auto}.site-header .nav button{padding:0 9px;min-width:0;flex-direction:row}.site-header .nav button span{font-size:11px}.page{padding:22px 14px}.page-heading h1{font-size:29px}.page-heading{display:flex;align-items:center;gap:12px}.page-heading p{font-size:11px}.page-heading>.btn{margin:0;flex:none}.game-page{padding:12px 8px}.game-header h1{font-size:17px}.game-header p{font-size:9px}.game-header-actions{gap:4px}.game-header-actions .btn{padding:8px;font-size:9px}.table-half{padding:10px 9px;gap:9px}.player-identity{font-size:10px;gap:5px}.player-identity small{font-size:8px}.player-identity .avatar{display:none}.zone-stats{gap:3px}.zone-stat{padding:4px;font-size:9px}.zone-stat button{font-size:9px}.bench-row{gap:9px;min-height:98px}.pokemon{width:54px}.pokemon img{width:50px}.slot{width:54px;min-height:72px}.pokemon .hp{font-size:7px;right:-4px;padding:2px 3px}.active-area{min-height:125px;grid-template-columns:1fr 110px 1fr}.active-area .pokemon{width:91px}.active-area .pokemon img{width:83px;max-height:116px}.active-area .hp{font-size:9px}.active-area .slot{width:83px;min-height:116px}.attachments .energy-dot{width:11px;height:11px;font-size:7px}.prizes{grid-template-columns:repeat(3,21px);gap:4px}.card-back{width:21px}.zone-label{font-size:8px}.turn-banner{min-height:54px;padding:8px 10px}.turn-banner strong{font-size:12px}.turn-banner small{font-size:10px;max-width:240px}.turn-banner .btn{padding:9px 11px;font-size:10px}.hand-panel{padding:10px}.hand-card{width:70px}.hand-heading{font-size:11px}.hand-heading .btn{font-size:9px;padding:5px 8px}.hand-help{font-size:9px;margin-bottom:5px}.hand{gap:8px}.table-controls{gap:5px}.table-controls .btn{font-size:9px;padding:8px}.seed{display:block;line-height:1.8}.seed span{display:block}.game-page .footer{font-size:8px}.opponent-play{padding:13px;gap:12px;border-radius:8px;bottom:12px}.play-card{width:58px;height:81px}.play-copy h2{font-size:17px}.play-copy p{font-size:11px}.play-controls{width:100%;flex-direction:row}.deck-heading-actions{gap:6px}.deck-heading-actions .btn{font-size:11px;padding:10px}.deck-editor .page-heading{display:block}.deck-editor .deck-heading-actions{margin-top:14px}.builder-toolbar{flex-wrap:wrap;gap:10px;padding:10px}.builder-toolbar>strong{font-size:18px;width:100%}.builder-search{min-width:120px}.builder-filter{width:145px}.builder-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 7px}.builder-card{padding:5px}.quantity-control .btn{width:28px;min-height:34px}.builder-face span{font-size:9px}.card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.library-head{align-items:flex-start}.library-head>div{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.library-head .btn{font-size:10px}.start-options{grid-template-columns:1fr}.footer{display:block}#toast{bottom:16px}.dialog{max-height:92dvh}}
@media(prefers-reduced-motion:reduce){.pokemon,.play-card,.opponent-play{animation:none;transition:none}}
.compact-tokens{display:flex;padding:0;margin-right:auto;border:0;gap:5px;align-items:center}.compact-tokens .turn-token{font-size:9px;padding:5px 7px}.compact-tokens .spent{color:#73808e;border-color:#39434e}.game-side>.turn-tokens{display:none}@media(max-width:600px){.compact-tokens{width:100%;margin-bottom:3px}}

/* The play announcement stays above the table; it never covers the cards. */
.turn-banner{min-height:106px;padding:8px 14px;box-sizing:border-box}#turn-activity{width:100%;display:flex;align-items:center;justify-content:space-between;min-width:0;min-height:88px}#turn-activity .opponent-play{position:relative;left:auto;bottom:auto;transform:none;z-index:auto;animation:none;background:none;box-shadow:none;border:0;border-radius:0;padding:0;width:100%;min-height:88px;gap:14px;overflow:hidden;box-sizing:border-box}#turn-activity .play-card{width:48px;height:67px;animation:none;box-shadow:0 3px 8px #0005}#turn-activity .play-hidden{width:43px;height:62px}#turn-activity .play-cards{flex-shrink:0;max-width:170px}#turn-activity .play-copy{flex:1;min-width:0}#turn-activity .play-copy h2{font-size:16px;margin:2px 0 4px}#turn-activity .play-copy p{font-size:11px;line-height:1.4;max-height:32px;overflow:auto}#turn-activity .play-copy .eyebrow{font-size:8px;color:#edb8b4}#turn-activity .play-controls{flex-direction:row;flex-shrink:0;width:auto}#turn-activity .play-progress{bottom:0}#turn-activity .play-symbol svg{height:30px;width:30px;color:#edb8b4}.table{overflow:visible}.table.turn-you{border-color:#81bfff;box-shadow:0 0 0 2px #63adff25,0 10px 25px #0003}.table.turn-bot{border-color:#ec9691;box-shadow:0 0 0 2px #e8857d25,0 10px 25px #0003}.table.turn-you .your-half{background:#345b8229;box-shadow:inset 0 -4px #83c0ff}.table.turn-bot .opponent-half{background:#83413e29;box-shadow:inset 0 4px #ee9c96}.turn-chip{font-size:8px;font-weight:750;padding:3px 5px;border-radius:3px;background:#79baff;color:#102439;margin-left:7px;white-space:nowrap}.opponent-half .turn-chip{background:#efaba5;color:#381a1d}.board-turn-control{position:absolute;z-index:5;right:24px;top:50%;transform:translateY(-50%);display:grid;justify-items:center;gap:6px;padding:9px;background:#172330;border:1px solid #739bc0;border-radius:8px;box-shadow:0 3px 14px #0005}.board-turn-control .btn{min-height:43px;font-size:13px;padding:10px 20px}.board-turn-label{font-size:9px;font-weight:750;letter-spacing:1px;color:#abd4ff}.turn-bot .board-turn-control{border-color:#9e6967}.turn-bot .board-turn-label{color:#f2b3ad}.board-turn-control .btn:disabled{opacity:.4;cursor:default}.table-flying-card{position:fixed;z-index:160;pointer-events:none;border-radius:5px;box-shadow:0 8px 22px #0009;will-change:transform}.table-flying-card img{width:100%;height:100%;object-fit:contain;border-radius:5px}.table-flying-card.face-down{border:2px solid #8ba5be;background:repeating-linear-gradient(135deg,#344659 0,#344659 5px,#1e3348 5px,#1e3348 10px)}.table-flying-card.face-down:after{content:'';position:absolute;inset:28% 18%;border:2px solid #92b2d0;border-radius:50%}.table-number{position:fixed;z-index:170;pointer-events:none;font-size:29px;font-weight:900;letter-spacing:-1px;color:#ffe7a9;text-shadow:0 2px 5px #000,0 0 2px #000}.table-number.heal{color:#9eebbc}.table-number.knockout{color:#ffb5a4}.table[aria-busy=true] .pokemon{cursor:progress}
@media(max-width:600px){.game-header{align-items:flex-start;gap:5px}.game-header-actions{flex-wrap:wrap;justify-content:flex-end;max-width:172px}.game-header-actions .btn{padding:7px;font-size:8px}.board-turn-control{right:7px;padding:6px;gap:4px}.board-turn-control .btn{font-size:10px;padding:9px 12px;min-height:40px}.board-turn-label{font-size:7px}.turn-chip{font-size:6px;margin-left:3px;padding:2px 3px}.turn-banner{min-height:130px;padding:7px 9px}#turn-activity{min-height:114px}#turn-activity .opponent-play{min-height:114px;gap:7px;flex-wrap:wrap}#turn-activity .play-card{width:34px;height:48px}#turn-activity .play-cards{max-width:105px;gap:3px}#turn-activity .play-copy{min-width:170px}#turn-activity .play-copy h2{font-size:13px}#turn-activity .play-copy p{font-size:10px;max-height:28px}#turn-activity .play-controls{width:100%;justify-content:flex-end}#turn-activity .play-controls .btn{font-size:10px;padding:5px 12px}#turn-activity .play-hidden{width:30px;height:43px}.table-number{font-size:23px}}

.table-play-zone{position:absolute;left:50%;top:50%;width:62px;height:88px;transform:translate(-50%,-50%);pointer-events:none;visibility:hidden}

/* Deck quantities stay directly under their card, including zero-copy drafts. */
.deck-card{min-width:0;display:flex;flex-direction:column;gap:6px}.deck-card .library-card{width:100%;flex:1}.deck-card .library-card img{height:auto}.deck-card .quantity-control{padding-top:3px}.deck-card.removed .library-card{opacity:.5}.deck-card .catalog-status{margin:0}.deck-overview .quantity-control .btn,.deck-editor .quantity-control .btn{min-width:36px;min-height:44px}.deck-save-bar{position:sticky;top:0;z-index:4;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px;margin-bottom:18px;background:#17222df5;border:1px solid #7a6841;border-radius:6px}.deck-save-bar strong{display:block;color:var(--mint)}.deck-save-bar span{font-size:11px;color:var(--muted)}.deck-browse-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.deck-browse-tabs [aria-pressed="true"]{background:#3d3422;border-color:#9c814b;color:#f0cc7a}
@media(max-width:600px){.deck-overview .page-heading{display:block}.deck-overview .deck-heading-actions{margin-top:12px}.deck-save-bar{align-items:flex-start;flex-direction:column;gap:8px;padding:10px}.deck-save-bar .deck-heading-actions{margin:0;flex-wrap:nowrap;width:100%}.deck-save-bar .btn{padding:10px 7px;flex:1;font-size:10px}.deck-card .quantity-control{gap:2px}.deck-overview .quantity-control .btn,.deck-editor .quantity-control .btn{min-width:32px}.deck-browse-tabs .btn{font-size:12px;padding:10px}}
.deck-overview .quantity-control .btn,.deck-editor .quantity-control .btn{flex:1;max-width:44px}.deck-overview .quantity-control strong,.deck-editor .quantity-control strong{text-align:center;min-width:16px}
/* Standard catalog: bounded pages keep card browsing light on phones. */
.catalog-status{display:block;font-size:10px;line-height:1.35;padding:4px 5px;border-radius:4px;margin:5px 0;border:1px solid #6b5933;color:#efcb7b;background:#332c20;text-align:center}.catalog-status.ready{border-color:#416953;color:#a0dbb7;background:#203229}.catalog-print{display:block;color:var(--muted);font-size:9px;text-align:center;min-height:26px}.catalog-note{margin-top:24px;color:var(--muted);font-size:12px;line-height:1.8}.catalog-note button{color:var(--mint);text-decoration:underline}.catalog-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0;font-size:12px;color:var(--muted)}.catalog-pagination>div{display:flex;align-items:center;gap:12px}.catalog-pagination .btn{font-size:12px;padding:9px 14px}.deck-editor .builder-toolbar{flex-wrap:wrap;align-items:end}.deck-editor .builder-filter{max-width:230px}.deck-editor .builder-filter .select{width:100%}.builder-face img{height:auto;aspect-ratio:245/342;object-fit:contain}.builder-card{display:flex;flex-direction:column}.builder-card .quantity-control{margin-top:auto}.catalog-detail>div>img{max-width:240px;width:100%;height:auto;display:block;margin-bottom:15px}.catalog-detail label{display:block;font-size:12px;line-height:1.6}.catalog-detail select{width:100%;margin:6px 0 12px}.catalog-detail a{font-size:12px;color:var(--mint)}.library-card .catalog-status{font-size:9px}.catalog-detail .catalog-status{display:inline-block;margin-bottom:15px}.builder-warning{overflow-wrap:anywhere}.catalog-note a{color:var(--mint)}
@media(max-width:600px){.deck-editor .builder-search{flex:1 1 100%}.deck-editor .builder-filter{flex:1 1 30%;width:auto;min-width:85px;max-width:none}.deck-editor .builder-filter .select{padding:9px 5px;font-size:10px}.catalog-pagination{font-size:10px;gap:5px}.catalog-pagination>div{gap:7px}.catalog-pagination .btn{padding:9px 8px;font-size:10px}.catalog-status{font-size:8px;min-height:31px;display:flex;align-items:center;justify-content:center}.catalog-print{font-size:8px}.catalog-detail>div>img{max-width:180px;margin-left:auto;margin-right:auto}.catalog-note{font-size:10px}}

/* Public discards fan out briefly, then travel into the correct pile. */
.table-flying-card.discarding{border:1px solid #f0cc7a99;box-shadow:0 14px 38px #000b,0 0 18px #f0cc7a30;background:#1a2634;transform-origin:center;overflow:hidden}
.table-discard-label{position:fixed;z-index:175;transform:translateX(-50%);padding:8px 13px;border:1px solid #bca15f;border-radius:20px;background:#172330f5;color:#f5d98b;box-shadow:0 5px 18px #0008;font-size:12px;font-weight:750;white-space:nowrap;pointer-events:none}
@media(max-width:600px){.table-discard-label{font-size:10px;padding:6px 10px}}
@media(prefers-reduced-motion:reduce){.table-flying-card,.table-discard-label,.table-number{display:none}}
.pokemon .hp{white-space:nowrap;font-variant-numeric:tabular-nums}
.pokemon .hp small{font:inherit;opacity:.75}
.hp-track{display:block;width:calc(100% - 4px);height:4px;margin:4px auto 0;background:#0b131e;border-radius:3px;overflow:hidden;box-shadow:0 0 0 1px #8299af38}
.hp-track>span{display:block;height:100%;background:#8bd5ac;border-radius:inherit}
.hp-track.hurt>span{background:#efc778}.hp-track.low>span{background:#ee8f82}
.table-number{text-align:center;min-width:106px;line-height:1.05;filter:drop-shadow(0 2px 4px #000);white-space:nowrap}
.table-number strong{display:block;font-size:42px;font-weight:900;letter-spacing:-2px}
.table-number small{display:block;width:max-content;margin:5px auto 0;padding:5px 8px;border-radius:4px;background:#101b29eF;border:1px solid #eed39a90;font-size:11px;font-weight:750;letter-spacing:.2px;color:#fff1d2}
.table-number em{display:block;margin-top:5px;font-size:8px;letter-spacing:1px;font-style:normal;color:#f5c0ff}
.table-number.knockout small{background:#542b28;border-color:#f29b86}.table-number.heal small{color:#c7fadd;border-color:#8bd5ac}.table-number.blocked{color:#c5dcf2}
.table-number.blocked strong{font-size:24px;letter-spacing:0}
.table-impact,.table-spark,.table-attack-trail{position:fixed;pointer-events:none;z-index:165}
.table-impact{width:115px;height:115px;border:4px solid #ffe1a2;border-radius:50%;box-shadow:0 0 20px #ffd38488,inset 0 0 18px #ffd38450;background:radial-gradient(circle,#ffdf9825,transparent 65%)}
.table-impact.counters{border-color:#e9b0fc;box-shadow:0 0 20px #d28ef788,inset 0 0 18px #d28ef750}
.table-spark{width:6px;height:6px;border-radius:50%;background:#ffeac0;box-shadow:0 0 8px #ffd89e}
.table-attack-trail{height:4px;transform-origin:left center;background:linear-gradient(90deg,transparent,#ffe8ba);box-shadow:0 0 14px #f6cb7d;border-radius:5px}
@media(max-width:600px){.pokemon .hp{padding:2px;font-size:7px;right:-3px}.active-area .hp{font-size:9px}.table-number strong{font-size:34px}.table-number small{font-size:9px;padding:4px 6px}.table-impact{width:86px;height:86px}}
@media(prefers-reduced-motion:reduce){.table-impact,.table-spark,.table-attack-trail{display:none}}

/* v0.21 — a compact table, with native touch scrolling instead of touch dragging. */
.match-shell .site-header{height:58px;max-width:none;padding:0 24px;gap:12px}
.match-shell .brand small{display:none}
.match-menu-button{margin-left:auto;min-height:42px;min-width:80px;font-size:14px}
.match-shell .game-page{padding:12px 24px 24px}
.match-shell .table-wrap{min-width:0}
.match-shell .turn-banner{min-height:48px;padding:8px 14px;margin-bottom:8px}
.match-shell #turn-activity{min-height:30px;gap:12px}
.match-shell .turn-banner strong{font-size:14px}
.match-shell .turn-banner small{font-size:13px;max-width:600px;line-height:1.4}
.match-shell #turn-activity .opponent-play{min-height:58px;flex-wrap:nowrap;gap:10px}
.match-shell #turn-activity .play-copy h2{font-size:14px;line-height:1.3;margin:0}
.match-shell #turn-activity .play-copy p,.match-shell #turn-activity .eyebrow{display:none}
.match-shell #turn-activity .play-copy{min-width:0}
.match-shell #turn-activity .play-controls{width:auto;flex-direction:column;gap:4px}
.match-shell #turn-activity .play-controls .btn{font-size:12px;min-height:30px;padding:5px 10px}
.match-shell .player-identity{font-size:14px;white-space:nowrap}
.match-shell .zone-stat{font-size:12px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;padding:6px 10px}
.match-shell .player-line{gap:8px}
.match-shell .zone-stats{gap:5px}
.match-shell .board-turn-control{padding:0;right:18px;border:0;box-shadow:0 3px 14px #0005}
.match-shell .board-turn-control .btn{min-height:46px;font-size:14px;padding:12px 18px}
.match-shell .hand-panel{padding:8px 12px 10px;margin-top:8px}
.match-shell .hand-heading .btn{font-size:14px;padding:6px 0;min-height:36px;border:0;background:none}
.hand{touch-action:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scroll-behavior:auto;scroll-snap-type:none;overflow-x:auto;overflow-y:hidden;min-height:0;padding:7px 4px 10px;gap:12px}
.hand-card{touch-action:auto;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;align-self:flex-start;width:94px}
.hand-card img{pointer-events:none;-webkit-user-drag:none}
.hand-card:hover{transform:none}
@media (hover:hover) and (pointer:fine){.hand-card:hover{transform:translateY(-3px)}}
.prizes{grid-template-columns:repeat(3,32px);gap:6px;justify-content:center}
.card-back{width:32px;aspect-ratio:5/7;border:1px solid #b8c8e4;border-radius:4px;background:#143367 url('assets/card-back.svg') center/100% 100% no-repeat;box-shadow:1px 2px 0 #091322,0 3px 5px #0005}
.card-back:after{display:none}
.prizes .prize-empty{width:32px;aspect-ratio:5/7;border:1px solid #8eadd016;border-radius:4px;background:transparent;opacity:1}
.prize-choice{width:76px}
.match-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.match-menu-grid .btn{font-size:15px;min-height:48px}
.menu-tokens{justify-content:center;margin-top:22px}
.menu-tokens .turn-token{font-size:13px;padding:8px 12px}
.match-log-dialog{max-height:58dvh;overflow-y:auto}
.match-log-dialog .log-entry{font-size:14px;line-height:1.5}
.choice-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;gap:6px;padding:0 0 10px;scrollbar-width:thin}
.choice-tabs .btn{flex:0 0 auto;min-height:44px;font-size:13px;padding:9px 12px}
.choice-grid{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}
.choice-card{padding:4px;max-width:96px;width:96px;min-height:0}
.choice-card img{display:block;width:84px;height:118px;max-width:100%;object-fit:contain}
.choice-card small{font-size:12px}
.choice-card strong{font-size:13px}
.compact-card{flex:0 0 84px;width:84px;max-width:84px}
.compact-card img{width:84px;height:118px}
.dialog-header p,.dialog-footer,.notice{font-size:14px}
.dialog-footer .btn{font-size:14px;min-height:44px}
.catalog-note{font-size:13px}
@media(max-width:600px){
 .match-shell .site-header{height:54px;padding:0 12px}
 .match-shell .wordmark{font-size:16px}
 .match-shell .brand-mark{width:28px;height:28px}
 .match-menu-button{min-height:40px;min-width:72px;padding:7px 14px}
 .match-shell .game-page{padding:8px 6px max(16px,env(safe-area-inset-bottom))}
 .match-shell .turn-banner{min-height:44px;padding:6px 10px}
 .match-shell .turn-banner small{font-size:12px;max-width:220px}
 .match-shell .table-half{padding:8px 8px;gap:8px}
 .match-shell .player-identity{font-size:12px}
 .match-shell .zone-stat{font-size:11px;min-height:36px;padding:5px 6px}
 .match-shell .zone-stats{gap:4px}
 .match-shell .bench-row{gap:9px;min-height:94px}
 .match-shell .pokemon,.match-shell .slot{width:clamp(47px,13vw,59px)}
 .match-shell .pokemon img{width:100%;max-width:55px}
 .match-shell .slot{min-height:76px}
 .match-shell .active-area{min-height:139px;grid-template-columns:1fr 100px 1fr}
 .match-shell .active-area .pokemon{width:88px}
 .match-shell .active-area .pokemon img{width:82px;max-width:82px;max-height:115px}
 .match-shell .board-turn-control{right:6px}
 .match-shell .board-turn-control .btn{font-size:12px;padding:10px 13px;min-height:44px}
 .match-shell .prizes{grid-template-columns:repeat(3,24px);gap:5px}
 .match-shell .prizes .card-back,.match-shell .prizes .prize-empty{width:24px}
 .match-shell .hp{font-size:9px;right:-4px;padding:3px 4px}
 .match-shell .active-area .hp{font-size:11px}
 .match-shell .hand-panel{padding:4px 8px 6px}
 .hand{gap:10px;padding:7px 4px 10px}
 .hand-card{width:82px}
 .match-shell #turn-activity .play-card{width:34px;height:48px}
 .match-shell #turn-activity .play-cards{max-width:82px;gap:3px}
 .match-shell #turn-activity .play-copy h2{font-size:13px}
 .dialog{max-width:calc(100vw - 16px);max-height:92dvh}
 .dialog-header{padding:16px;gap:12px}
 .dialog-header h2{font-size:20px}
 .dialog-content{padding:12px 16px 18px}
 .dialog-footer{padding:12px 16px;gap:12px}
 .choice-grid{gap:9px}
 .choice-card{max-width:88px;width:88px}
 .choice-card img{width:76px;height:106px}
 .compact-card{flex-basis:76px;width:76px;max-width:76px}
 .compact-card img{width:76px;height:106px}
}
@media(prefers-reduced-motion:reduce){.hand-card{transition:none}}

.table-flying-card.face-down{background:#143367 url('assets/card-back.svg') center/100% 100% no-repeat;border-color:#b8c8e4}

/* A persistent collection; each entry owns its list and revisions. */
.saved-deck-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:22px}
.saved-deck{border:1px solid #3a4653;background:#18212c;border-radius:12px;overflow:hidden;min-width:0}
.saved-deck.selected{border-color:#f0cb75;box-shadow:0 0 0 1px #f0cb7555}
.saved-deck-open{display:block;width:100%;padding:0 18px 18px;border:0;background:transparent;color:inherit;text-align:left}
.saved-deck-open:hover{background:#ffffff05}
.saved-deck-art{height:208px;position:relative;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 80%,#40526b55,transparent 70%);margin:0 -18px 16px;overflow:hidden}
.saved-deck-art img{position:absolute;width:108px;height:151px;object-fit:contain;border-radius:6px;box-shadow:0 8px 16px #0007;transform:translateX(-56px) rotate(-13deg);top:32px}
.saved-deck-art img:nth-child(2){transform:translateX(56px) rotate(13deg)}
.saved-deck-art img:nth-child(3){transform:translateY(8px);z-index:1}
.saved-deck-art img:only-child{transform:none;width:116px;height:162px;top:24px}
.empty-deck-art{width:112px;height:155px;border:2px dashed #8393a4;border-radius:8px;display:grid;place-items:center;font-size:44px;color:#b9c7d4}
.saved-deck-title{display:flex;align-items:center;gap:10px;justify-content:space-between;min-height:34px}
.saved-deck-title h2{font-size:19px;letter-spacing:-.3px;overflow-wrap:anywhere;line-height:1.25}
.saved-deck-title .badge{color:#f7d58d;flex:none;font-size:10px}
.saved-deck-meta{display:flex;justify-content:space-between;gap:12px;margin-top:12px;font-size:13px;color:#bec8d2}
.saved-deck-meta .ready{color:#9addb4}.saved-deck-meta .draft{color:#efcc83}
.saved-deck-actions{padding:14px 18px 18px;border-top:1px solid #ffffff12;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.saved-deck-actions .btn{min-height:44px;padding:10px;font-size:13px}
.saved-decks-note{color:#b2bdc9;font-size:13px;line-height:1.6;margin:24px 0 16px}
.deck-breadcrumb{margin-bottom:18px}.deck-overview h1{overflow-wrap:anywhere}
.deck-name-field{display:grid;gap:10px;font-size:14px}.deck-name-field input{width:100%;padding:14px;background:#0e1721;border:1px solid #7c8ea0;border-radius:6px;color:#fff;font:inherit}
#deck-name-error{color:#ffbbb3;margin-top:12px;font-size:14px}
.saved-deck button:focus-visible,.deck-breadcrumb button:focus-visible{outline:3px solid #8ec8ff;outline-offset:-3px}
/* Total HP stays above the card; the orange token is accumulated damage. */
.pokemon .hp,.pokemon.damaged .hp{background:#f5f7f8;color:#17212c;border:1px solid #a6bac8;border-radius:7px;padding:3px 5px;font-weight:800;box-shadow:0 2px 3px #0005}
.pokemon .hp small{font-size:.7em;opacity:.75}
.pokemon .damage-counter{position:absolute;right:-5px;top:23px;z-index:3;min-width:29px;height:29px;padding:0 4px;border:2px solid #ffe09b;border-radius:50%;display:grid;place-items:center;background:linear-gradient(#ffc758,#f09a13);color:#37200b;font-size:13px;font-weight:850;font-variant-numeric:tabular-nums;box-shadow:0 2px 4px #0008;pointer-events:none}
.active-area .pokemon .damage-counter{min-width:35px;height:35px;top:27px;font-size:16px}
@media(max-width:600px){
 .saved-deck-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .saved-deck-art{height:151px;margin-bottom:10px}
 .saved-deck-art img{width:73px;height:102px;top:23px;transform:translateX(-26px) rotate(-12deg)}
 .saved-deck-art img:nth-child(2){transform:translateX(26px) rotate(12deg)}
 .saved-deck-art img:only-child{width:80px;height:112px;top:17px}
 .saved-deck-open{padding:0 10px 12px}.saved-deck-title{align-items:flex-start;flex-direction:column;gap:5px}.saved-deck-title h2{font-size:16px}
 .saved-deck-meta{font-size:12px;flex-direction:column;gap:4px;margin-top:8px}
 .saved-deck-actions{padding:10px;gap:6px}.saved-deck-actions .btn{font-size:12px;padding:7px 3px;min-height:44px}
 .empty-deck-art{width:72px;height:102px;font-size:30px}
 .saved-decks-page .page-heading .deck-heading-actions{margin-top:16px;display:flex;gap:8px}
 .pokemon .damage-counter{min-width:24px;height:24px;font-size:11px;top:20px;right:-3px}
 .active-area .pokemon .damage-counter{min-width:32px;height:32px;font-size:14px;top:25px}
}
