:root{color-scheme:dark;--bg:#0a141c;--panel:#111e28;--panel2:#162530;--line:#263743;--muted:#91a4b2;--text:#e9f0f3;--mint:#9cf1ca;--mint2:#64d9ab;--amber:#f5c17b;--danger:#ff9793;--blue:#a2bfff;--purple:#c2b0ef;--radius:18px;font-family:'DM Sans',system-ui,sans-serif;background:var(--bg);color:var(--text);font-size:14px}
*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,textarea,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.38}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--mint);outline-offset:4px}a{color:var(--mint);text-decoration:none}button{color:inherit}h1,h2,h3,h4,p{margin:0}h1,h2,h3,.wordmark{font-family:'Manrope',system-ui,sans-serif}h1{font-size:clamp(28px,3vw,42px);font-weight:750;letter-spacing:-1.6px;line-height:1.2}h2{font-size:22px;letter-spacing:-.6px}h3{font-size:17px;letter-spacing:-.3px}small{font-size:11px}svg{display:block}button svg{pointer-events:none}.muted{color:var(--muted)}.eyebrow{font-size:10px;text-transform:uppercase;font-weight:700;letter-spacing:1.8px;color:var(--mint)}.mono{font-variant-numeric:tabular-nums}.shell{display:grid;grid-template-columns:220px 1fr;min-height:100vh}.sidebar{background:#0d1922;border-right:1px solid var(--line);padding:30px 20px;display:flex;flex-direction:column;gap:42px;position:sticky;top:0;height:100dvh}.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:block;flex:none;width:38px;height:42px;background:url('icon.svg') center/contain no-repeat}.wordmark{font-size:17px;font-weight:800;letter-spacing:-.7px}.wordmark span{color:var(--mint)}.brand small{display:block;font-size:9px;color:var(--muted);letter-spacing:2.3px;margin-top:4px}.nav{display:grid;gap:7px}.nav button{border:0;background:none;color:var(--muted);display:flex;align-items:center;gap:12px;padding:13px 15px;border-radius:10px;text-align:left;font-weight:600}.nav button.active{background:#1d342f;color:var(--mint)}.nav button:hover:not(.active){background:var(--panel2);color:var(--text)}.nav svg{width:19px;height:19px}.sidebar-bottom{margin-top:auto;padding:15px 12px;border-top:1px solid var(--line);color:var(--muted);font-size:11px;line-height:1.7}.status-dot{display:inline-block;width:6px;height:6px;background:var(--mint);border-radius:50%;margin-right:7px}.profile{display:flex;align-items:center;gap:10px;margin-top:20px}.avatar{height:32px;width:32px;display:grid;place-items:center;background:#29423e;color:var(--mint);border-radius:50%;font-weight:700}.workspace{min-width:0}.topbar{height:76px;padding:0 40px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px}.crumb{color:var(--muted);font-size:12px}.crumb strong{color:var(--text);font-weight:500}.badge{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:650;border:1px solid var(--line);border-radius:30px;padding:5px 9px;white-space:nowrap;color:var(--muted)}.badge.mint{background:#1b352e;border-color:#2d5143;color:var(--mint)}.badge.amber{background:#372f24;border-color:#564634;color:var(--amber)}.top-actions{display:flex;gap:12px;align-items:center}.icon-btn{border:1px solid var(--line);background:var(--panel);border-radius:10px;padding:9px}.icon-btn svg{width:18px;height:18px}.page{max-width:1500px;margin:auto;padding:36px 40px 26px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:28px}.page-heading h1{margin-top:9px}.page-heading p{color:var(--muted);margin-top:10px;line-height:1.6}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 17px;border:1px solid var(--line);background:var(--panel2);border-radius:10px;font-weight:650;font-size:12px;line-height:1.35}.btn:hover:not(:disabled){border-color:#557164;background:#20332f}.btn svg{width:16px;height:16px}.btn.primary{background:var(--mint);border-color:var(--mint);color:#132c23}.btn.primary:hover{background:#b7f9dc}.btn.ghost{background:none}.btn.danger{color:var(--danger)}.btn.small{padding:8px 12px;font-size:11px}.practice-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px}.matchup-panel{border:1px solid #30463f;border-radius:var(--radius);overflow:hidden;background:linear-gradient(145deg,#1b302e 0%,#14252b 46%,#1b2433 100%);position:relative}.matchup-top{padding:24px 26px;display:flex;align-items:center;justify-content:space-between;gap:12px}.matchup-top .eyebrow{color:#b5cebf}.matchup-art{min-height:280px;display:grid;grid-template-columns:1fr 42px 1fr;align-items:center;position:relative;overflow:hidden;padding:0 24px}.matchup-art:before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 25% 50%,#7b9c4140,transparent 40%),radial-gradient(ellipse at 75% 50%,#a48bd23d,transparent 40%)}.deck-art{position:relative;display:flex;align-items:center;justify-content:center;height:260px;isolation:isolate}.deck-art img{width:151px;aspect-ratio:0.716;object-fit:contain;border-radius:9px;filter:drop-shadow(0 14px 18px #0007);transform:rotate(-9deg) translateX(-18px);transition:transform .25s}.deck-art img+img{position:absolute;transform:rotate(9deg) translate(45px,-4px);z-index:-1;width:140px;opacity:.9}.deck-art.opponent img{transform:rotate(9deg) translateX(15px)}.deck-art.opponent img+img{transform:rotate(-9deg) translate(-45px,-4px)}.versus{z-index:2;height:38px;width:38px;border:1px solid #ffffff30;border-radius:50%;display:grid;place-items:center;color:#cee0d8;background:#1b2d31;font-size:11px;font-weight:700;letter-spacing:1px}.matchup-decks{display:grid;grid-template-columns:1fr 1fr;gap:36px;padding:0 32px 27px}.deck-caption{min-width:0}.deck-caption .eyebrow{font-size:9px;color:var(--muted);margin-bottom:8px}.deck-caption h2{font-size:20px;line-height:1.4}.deck-caption p{color:var(--muted);font-size:11px;margin-top:6px;line-height:1.6}.types{display:flex;gap:5px;margin-top:12px}.energy-dot{display:inline-grid;place-items:center;width:19px;height:19px;border-radius:50%;color:#101921;background:#c8d1d6;font-size:10px;font-weight:800;border:1px solid #ffffff25}.energy-D{background:#52637e;color:white}.energy-R{background:#ee9c73}.energy-P{background:#c1a5eb}.energy-G{background:#a6cf80}.energy-L{background:#f8d576}.energy-M{background:#c5d4d5}.energy-W{background:#93c2e1}.energy-F{background:#d7ac83}.energy-N{background:#c6bd82}.energy-C{background:#d9e0e1}.matchup-footer{padding:20px 25px;background:#0c192b35;border-top:1px solid #ffffff10;display:flex;align-items:center;gap:14px;justify-content:space-between}.matchup-footer p{font-size:11px;color:#aec3c5;line-height:1.6}.matchup-footer .btn{min-width:160px;padding:14px 18px}.settings-panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:24px;display:flex;flex-direction:column}.settings-panel h3{margin-bottom:25px}.field{display:block;margin-bottom:23px}.field-label{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:1.2px;font-weight:650;margin-bottom:10px}.segmented{display:flex;border:1px solid var(--line);padding:4px;border-radius:10px;gap:4px;background:#0d1820}.segmented button{border:0;background:none;flex:1;color:var(--muted);padding:9px 6px;border-radius:6px;font-size:11px}.segmented button.selected{background:#2b413a;color:var(--mint);font-weight:650}.select{width:100%;padding:12px;background:#0d1820;border:1px solid var(--line);border-radius:9px;color:var(--text);font-size:12px}.setting-note{font-size:11px;color:var(--muted);line-height:1.7;margin-top:10px}.bot-note{margin-top:auto;border-top:1px solid var(--line);padding-top:20px;display:flex;gap:11px}.bot-note svg{width:20px;height:20px;color:var(--mint);flex:none}.bot-note strong{display:block;font-size:12px;margin-bottom:6px}.bot-note p{font-size:11px;color:var(--muted);line-height:1.7}.bottom-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:22px;margin-top:24px}.info-card{padding:23px 25px;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)}.info-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:10px}.info-card h3{font-size:15px}.deck-stats{display:flex;gap:24px;padding-top:16px;border-top:1px solid var(--line)}.deck-stat{display:flex;gap:10px;align-items:center}.deck-stat b{font-size:21px;font-family:'Manrope';font-weight:650}.deck-stat span{font-size:11px;color:var(--muted)}.deck-status{font-size:11px;display:flex;align-items:center;gap:8px;color:var(--mint);padding-bottom:17px}.deck-status svg{width:15px;height:15px}.tip{display:flex;gap:14px}.tip-num{font-size:11px;color:var(--mint);height:26px;width:26px;display:grid;place-items:center;border:1px solid #365545;border-radius:8px;flex:none}.tip p{font-size:12px;color:var(--muted);line-height:1.8}.tip strong{color:var(--text);font-weight:550}.footer{font-size:10px;color:#708692;padding:25px 0 0;display:flex;gap:16px;justify-content:space-between;line-height:1.7}.footer button{background:none;border:0;color:var(--muted);padding:0;font-size:10px;text-decoration:underline}.empty{padding:50px 20px;text-align:center;color:var(--muted);line-height:1.8}.empty h2{color:var(--text);margin-bottom:10px}.boot{height:90vh;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px}.boot h1{font-size:24px}.boot p{color:var(--muted)}
/* Deck library */
.library-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:23px}.deck-section{margin:25px 0}.deck-section h3{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:1.4px;margin-bottom:15px}.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:18px}.library-card{background:transparent;border:0;text-align:left;padding:0;position:relative}.library-card img{width:100%;border-radius:7px;display:block;aspect-ratio:0.716;object-fit:contain;transition:transform .2s}.library-card:hover img{transform:translateY(-4px)}.library-card .qty{position:absolute;top:7px;left:7px;border:1px solid #ffffff40;background:#0a172de8;border-radius:6px;padding:4px 7px;font-weight:700;font-size:12px}.library-card p{font-size:11px;margin-top:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.library-card small{font-size:9px;color:var(--muted)}
/* Practice table */
.game-page{padding:22px 28px;max-width:1600px}.game-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.game-header h1{font-size:23px;letter-spacing:-.6px}.game-header p{font-size:11px;color:var(--muted);margin-top:5px}.game-header-actions{display:flex;align-items:center;gap:8px}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px}.table-wrap{min-width:0}.table{border-radius:18px;border:1px solid #36534a;background:radial-gradient(ellipse at 50% 50%,#23423d 0%,#142b2a 60%,#102322 100%);overflow:hidden;position:relative;padding:15px 20px;min-height:565px;display:flex;flex-direction:column;gap:12px}.table:before{content:'';position:absolute;pointer-events:none;inset:12px;border:1px solid #84cbb119;border-radius:12px}.board-line{position:absolute;top:50%;left:0;width:100%;height:1px;background:linear-gradient(90deg,transparent,#8fb4a143,transparent);pointer-events:none}.board-line:after{content:'P T C G';position:absolute;left:50%;top:0;transform:translate(-50%,-50%);font-family:'Manrope';font-weight:800;font-size:20px;color:#8fb4a12c;background:#1a3430;padding:10px 14px;letter-spacing:4px;border-radius:50%}.player-line{display:flex;align-items:center;justify-content:space-between;position:relative;gap:10px;z-index:1}.player-identity{display:flex;align-items:center;gap:9px;font-size:11px}.player-identity .avatar{height:27px;width:27px;font-size:10px}.player-identity strong{display:block;font-weight:650}.player-identity small{color:var(--muted);font-size:9px}.zone-stats{display:flex;gap:6px}.zone-stat{display:flex;align-items:center;gap:5px;background:#091c2470;border:1px solid #54786b30;padding:5px 8px;border-radius:6px;font-size:10px;color:#bccdc9}.zone-stat button{border:0;background:none;font-size:10px;padding:0;color:inherit}.bench-row{display:flex;justify-content:center;align-items:flex-start;gap:9px;position:relative;z-index:1;min-height:113px}.slot{position:relative;width:68px;min-height:95px;border:1px dashed #668f7b45;border-radius:7px;display:flex;align-items:center;justify-content:center;background:#0b221c18;flex:none}.slot.empty-slot{font-size:8px;color:#8ca99b5e;letter-spacing:.8px;text-transform:uppercase}.pokemon{background:transparent;border:0;display:flex;flex-direction:column;align-items:center;width:70px;padding:0;position:relative;cursor:pointer}.pokemon img{width:65px;aspect-ratio:.716;object-fit:contain;border-radius:5px;box-shadow:0 4px 8px #0004;transition:transform .15s}.pokemon:hover img{transform:translateY(-3px)}.pokemon .hp{display:block;position:absolute;right:-4px;top:-5px;background:#1b3435;border:1px solid #5f8878;border-radius:4px;font-size:8px;padding:3px 4px;color:#e1f4e8;z-index:2}.pokemon.damaged .hp{background:#623d34;border-color:#c58e6c;color:#ffe6cd}.attachments{display:flex;justify-content:center;gap:2px;flex-wrap:wrap;margin-top:4px;max-width:85px}.attachments .energy-dot{width:12px;height:12px;font-size:7px}.tool-tag{font-size:7px;border-radius:3px;padding:2px 3px;background:#b7c0a1;color:#13291d}.used-tag{position:absolute;left:0;bottom:20px;border-radius:4px;background:#103029e8;color:#9df1c8;font-size:7px;padding:2px 4px}.active-area{display:grid;grid-template-columns:1fr 135px 1fr;align-items:center;min-height:131px;position:relative;z-index:1}.active-area .pokemon{width:112px;margin:auto}.active-area .pokemon img{width:92px;max-height:128px;object-fit:contain}.active-area .hp{right:2px;font-size:9px;padding:3px 5px}.active-area .attachments .energy-dot{width:15px;height:15px;font-size:8px}.active-area .slot{width:95px;min-height:130px;margin:auto}.zone-cards{display:flex;gap:5px;justify-content:center;align-items:center;flex-wrap:wrap}.prizes{display:grid;grid-template-columns:repeat(3,22px);gap:4px;justify-content:center}.card-back{aspect-ratio:.716;width:22px;border-radius:3px;border:1px solid #6e8f8a90;background:repeating-linear-gradient(135deg,#244740 0px,#244740 4px,#1a3832 4px,#1a3832 8px);position:relative}.card-back:after{content:'';position:absolute;inset:25% 20%;border:1px solid #abc4a46b;border-radius:50%}.prize-empty{opacity:.15}.zone-label{text-transform:uppercase;font-size:8px;letter-spacing:1.3px;color:#a6bcb2;text-align:center;margin-top:7px}.stadium{text-align:center;display:flex;flex-direction:column;align-items:center}.stadium button{background:none;border:0;padding:0}.stadium img{width:46px;border-radius:3px;opacity:.85}.stadium .placeholder{width:42px;height:58px;border:1px dashed #789f8840;border-radius:5px;color:#88a39370;font-size:19px;display:grid;place-items:center}.hand-panel{padding:15px 0 0}.hand-heading{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-bottom:12px;align-items:center}.hand-heading strong{color:var(--text);font-weight:600}.hand{display:flex;gap:9px;overflow-x:auto;padding:5px 4px 14px;scrollbar-width:thin;scrollbar-color:#3d5d50 transparent;min-height:130px}.hand-card{padding:0;position:relative;background:none;border:0;flex:none;width:82px;transition:transform .15s}.hand-card img{width:100%;border-radius:5px;display:block;aspect-ratio:.716;object-fit:contain}.hand-card:hover{transform:translateY(-5px)}.hand-card.playable:after{content:'';position:absolute;inset:-3px;border:1px solid #a9f7d0;border-radius:7px;pointer-events:none}.hand-card span{display:block;font-size:8px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:var(--muted);margin-top:5px}.turn-banner{border-radius:10px;border:1px solid #37564b;background:#1c332e;padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;font-size:12px}.turn-banner.bot-turn{background:#292d3e;border-color:#484c67}.turn-banner strong{color:var(--mint)}.turn-banner.bot-turn strong{color:var(--purple)}.turn-banner small{display:block;color:var(--muted);margin-top:4px;font-size:10px}.game-side{border:1px solid var(--line);border-radius:15px;background:var(--panel);display:flex;flex-direction:column;min-height:600px;max-height:820px;overflow:hidden}.game-side-head{padding:18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.game-side h3{font-size:13px}.turn-tokens{display:flex;gap:7px;padding:15px 16px;border-bottom:1px solid var(--line)}.turn-token{font-size:9px;padding:5px 7px;border:1px solid #45634c;border-radius:6px;color:var(--mint)}.turn-token.spent{color:#748d85;border-color:var(--line);text-decoration:line-through}.log{padding:5px 17px 17px;overflow-y:auto;flex:1;min-height:180px}.log-entry{font-size:11px;color:#afbfca;line-height:1.7;padding:10px 0;border-bottom:1px solid #26374380}.log-entry.turn{font-size:9px;color:var(--mint);text-transform:uppercase;letter-spacing:1px;font-weight:650;border:0;margin-top:8px}.log-entry.important{color:var(--amber)}.game-controls{padding:14px 16px;border-top:1px solid var(--line);display:grid;gap:8px}.game-controls .btn{width:100%}.seed{font-size:9px;color:#78908b;padding:10px 4px;display:flex;justify-content:space-between}.hint-box{padding:16px;margin:0 16px 14px;background:#20322d;border:1px solid #345247;border-radius:10px;font-size:11px;line-height:1.7;color:#cce1d8}.hint-box strong{display:block;font-size:10px;color:var(--mint);margin-bottom:7px}.thinking{display:inline-flex;gap:3px;margin-left:8px}.thinking i{height:4px;width:4px;background:var(--purple);border-radius:50%;animation:pulse 1.2s infinite}.thinking i:nth-child(2){animation-delay:.2s}.thinking i:nth-child(3){animation-delay:.4s}@keyframes pulse{50%{opacity:.2}}
/* Accessible dialogs */
.dialog-backdrop{position:fixed;inset:0;background:#030a12c9;z-index:20;display:flex;align-items:center;justify-content:center;padding:22px;backdrop-filter:blur(9px)}.dialog{background:#14222d;border:1px solid #3d5361;border-radius:20px;width:min(690px,100%);max-height:90dvh;overflow-y:auto;box-shadow:0 25px 100px #0006}.dialog.large{width:min(920px,100%)}.dialog-header{padding:23px 25px 16px;display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.dialog-header h2{font-size:21px}.dialog-header p{font-size:12px;color:var(--muted);line-height:1.7;margin-top:8px}.dialog-content{padding:6px 25px 24px}.dialog-footer{padding:17px 25px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;align-items:center;gap:10px;position:sticky;bottom:0;background:#14222df5}.deck-text{width:100%;min-height:280px;resize:vertical;padding:15px;border:1px solid var(--line);border-radius:10px;background:#0b1720;color:#dce9e9;font-size:12px;line-height:1.8;font-family:ui-monospace,monospace}.form-error{background:#4a2d2a;padding:12px 15px;border-radius:8px;color:#ffd0c3;font-size:12px;line-height:1.7;margin-top:12px}.form-success{background:#203b2f;padding:12px 15px;border-radius:8px;color:var(--mint);font-size:12px;line-height:1.7;margin-top:12px}.choice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:12px;padding:8px 0}.choice-card{border:2px solid transparent;background:#0e1a24;border-radius:9px;padding:7px;text-align:left;position:relative;min-width:0}.choice-card.selected{border-color:var(--mint);background:#223c31}.choice-card img{width:100%;aspect-ratio:.716;object-fit:contain;border-radius:5px}.choice-card strong{font-size:10px;display:block;margin:7px 0 3px;line-height:1.4}.choice-card small{color:var(--muted);font-size:9px;display:block;line-height:1.5}.choice-card.selected:after{content:'✓';position:absolute;right:3px;top:3px;background:var(--mint);border-radius:50%;width:20px;height:20px;color:#102b1d;display:grid;place-items:center;font-weight:700}.choice-counter{font-size:11px;color:var(--muted);margin-right:auto}.detail-grid{display:grid;grid-template-columns:190px 1fr;gap:24px}.detail-image{width:100%;border-radius:11px}.detail-text p{font-size:12px;color:var(--muted);line-height:1.8;margin-bottom:15px}.detail-text h3{font-size:14px;margin-bottom:6px}.detail-attack{padding:12px 0;border-top:1px solid var(--line)}.detail-attack strong{font-size:12px}.detail-attack p{margin-top:6px;font-size:11px}.detail-actions{display:grid;gap:8px;margin-top:16px}.detail-actions .btn{justify-content:space-between;text-align:left}.detail-actions small{color:#95aa9e}.detail-sub{margin:10px 0;color:var(--muted);font-size:10px}.error-box{border:1px solid #784840;padding:18px;border-radius:10px;background:#382722;color:#ffd4c3;line-height:1.7}.summary-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0}.summary-cards div{padding:16px;background:#0e1c25;border:1px solid var(--line);border-radius:12px;text-align:center}.summary-cards b{font-size:27px;display:block;color:var(--mint)}.summary-cards span{font-size:10px;color:var(--muted)}.history-row{display:flex;justify-content:space-between;gap:15px;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--panel);margin-bottom:12px;align-items:center}.history-row h3{font-size:14px}.history-row p{font-size:11px;color:var(--muted);margin-top:5px}.notice{font-size:11px;color:var(--muted);line-height:1.8;border-left:2px solid #486354;padding-left:13px;margin:16px 0}.rules-list{padding-left:19px;color:var(--muted);font-size:12px;line-height:1.8}.rules-list li{margin-bottom:8px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#29483d;border:1px solid #579477;color:#e3ffef;border-radius:12px;padding:12px 20px;z-index:30;box-shadow:0 8px 25px #0005;max-width:90vw;font-size:12px;display:none}#toast.show{display:block}.mobile-brand{display:none}
@media(min-width:1600px){.page{padding-top:44px}.matchup-art{min-height:320px}.deck-art img{width:174px}.deck-art img+img{width:162px}.matchup-decks{padding-bottom:32px}}
@media(max-width:1200px){.shell{grid-template-columns:185px 1fr}.sidebar{padding:26px 13px}.page{padding:30px 25px}.topbar{padding:0 25px}.practice-grid{grid-template-columns:minmax(0,1fr) 265px}.settings-panel{padding:20px}.matchup-art{padding:0 12px}.deck-art img{width:128px}.deck-art img+img{width:118px;transform:rotate(9deg) translate(30px,0)}.deck-art.opponent img+img{transform:rotate(-9deg) translate(-30px,0)}.matchup-decks{padding:0 22px 24px;gap:24px}.deck-caption h2{font-size:17px}.matchup-top{padding:22px}.matchup-footer{padding:18px}.matchup-footer .btn{min-width:140px}.game-layout{grid-template-columns:minmax(0,1fr) 225px}.game-page{padding:20px}.table{padding:13px 10px}.bench-row{gap:5px}.slot{width:59px;min-height:83px}.pokemon{width:60px}.pokemon img{width:56px}.active-area{grid-template-columns:1fr 112px 1fr}.game-side{max-height:850px}.wordmark{font-size:15px}.brand-mark{width:32px}}
@media(max-width:1000px){.shell{grid-template-columns:76px 1fr}.sidebar{padding:23px 10px;align-items:center}.sidebar .wordmark,.sidebar .brand small,.nav button span,.sidebar-bottom{display:none}.nav button{padding:14px}.brand-mark{width:38px}.practice-grid{grid-template-columns:minmax(0,1fr) 260px}.matchup-art{min-height:235px}.deck-art{height:220px}.game-layout{grid-template-columns:minmax(0,1fr)}.game-side{min-height:0;max-height:360px;display:grid;grid-template-columns:1fr 1fr}.game-side-head{grid-column:1/-1}.log{grid-column:1;grid-row:2/5;min-height:220px;max-height:270px}.turn-tokens{grid-column:2;border-left:1px solid var(--line)}.game-controls{grid-column:2;border-left:1px solid var(--line)}.hint-box{grid-column:2}.table{min-height:580px}.pokemon{width:75px}.pokemon img{width:69px}.slot{width:72px;min-height:101px}.bench-row{gap:12px}.active-area .pokemon img{width:95px}}
@media(max-width:780px){.practice-grid{grid-template-columns:1fr}.settings-panel{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.settings-panel h3{grid-column:1/-1;margin-bottom:18px}.settings-panel .bot-note{grid-column:1/-1}.settings-panel .field{margin-bottom:20px}.bottom-grid{grid-template-columns:1fr 1fr;gap:15px}.info-card{padding:20px}.deck-stats{gap:16px}.deck-stat{display:block}.deck-stat b{display:block;margin-bottom:3px}.matchup-art{min-height:265px}.deck-art{height:250px}.deck-art img{width:150px}.deck-art img+img{width:140px}.matchup-decks{padding:0 30px 26px}.deck-caption h2{font-size:20px}.page-heading{align-items:flex-start}.page-heading .btn{font-size:11px;padding:10px 12px}.page-heading p{font-size:12px}.footer{display:block}.footer span{display:block;margin-bottom:8px}.topbar{height:65px}.page{padding:26px 23px}.game-page{padding:18px}.game-header h1{font-size:20px}}
@media(max-width:580px){.shell{display:block;padding-bottom:66px}.sidebar{position:fixed;top:auto;bottom:0;left:0;right:0;height:64px;z-index:12;display:block;padding:5px 12px 4px;border-right:0;border-top:1px solid var(--line);background:#0d1922f5;backdrop-filter:blur(12px)}.sidebar>.brand{display:none}.nav{display:flex;justify-content:space-around;gap:6px}.nav button{flex-direction:column;gap:4px;padding:8px 12px;min-width:75px}.nav button span{display:block;font-size:9px}.nav svg{width:18px;height:18px}.topbar{height:62px;padding:0 19px}.crumb{display:none}.mobile-brand{display:flex;align-items:center;gap:6px}.mobile-brand .brand-mark{width:28px;height:32px}.mobile-brand .wordmark{font-size:14px}.topbar .badge{font-size:9px;padding:5px 7px}.topbar .icon-btn{display:none}.page{padding:26px 17px 18px}.page-heading{display:block;margin-bottom:23px}.page-heading h1{font-size:31px;letter-spacing:-1.1px}.page-heading p{font-size:12px;line-height:1.8}.page-heading>.btn{margin-top:15px}.page-heading .eyebrow{font-size:9px}.matchup-top{padding:18px 18px 6px}.matchup-top .badge{font-size:8px}.matchup-art{padding:0 8px;min-height:210px;grid-template-columns:1fr 30px 1fr}.deck-art{height:210px}.deck-art img{width:113px;transform:rotate(-8deg) translateX(-7px)}.deck-art img+img{width:102px;transform:rotate(9deg) translate(23px,-2px)}.deck-art.opponent img{transform:rotate(8deg) translateX(7px)}.deck-art.opponent img+img{transform:rotate(-9deg) translate(-23px,-2px)}.versus{width:30px;height:30px;font-size:9px}.matchup-decks{padding:0 19px 22px;gap:26px}.deck-caption h2{font-size:16px}.deck-caption p{font-size:10px}.deck-caption .eyebrow{font-size:8px}.matchup-footer{padding:16px;gap:10px}.matchup-footer p{font-size:10px}.matchup-footer .btn{padding:12px;min-width:140px;font-size:11px}.settings-panel{padding:20px}.bottom-grid{grid-template-columns:1fr}.deck-stats{gap:28px}.deck-stat{display:flex;align-items:center}.deck-stat b{font-size:21px}.deck-stat span{font-size:10px}.footer{font-size:9px}.practice-grid{gap:17px}.card-grid{grid-template-columns:repeat(3,1fr);gap:13px}.game-page{padding:16px 10px}.game-header{padding:0 4px}.game-header h1{font-size:17px}.game-header-actions .btn{font-size:10px;padding:8px}.game-header-actions .badge{display:none}.game-header p{font-size:10px}.table{padding:12px 8px;border-radius:13px;gap:12px;min-height:538px}.player-identity{font-size:10px;gap:6px}.zone-stats{gap:4px}.zone-stat{font-size:9px;padding:4px 5px;gap:3px}.zone-stat button{font-size:9px}.bench-row{gap:5px;min-height:94px}.pokemon{width:56px}.pokemon img{width:52px}.slot{width:52px;min-height:74px}.pokemon .hp{font-size:7px;right:-2px;padding:2px 3px}.attachments .energy-dot{width:10px;height:10px;font-size:6px}.active-area{grid-template-columns:1fr 110px 1fr;min-height:122px}.active-area .pokemon{width:99px}.active-area .pokemon img{width:84px}.active-area .hp{font-size:8px}.active-area .attachments .energy-dot{width:12px;height:12px;font-size:7px}.prizes{grid-template-columns:repeat(3,18px);gap:3px}.card-back{width:18px}.hand-card{width:74px}.hand{gap:8px}.hand-heading{font-size:10px}.game-side{display:flex;max-height:420px}.log{min-height:130px;max-height:220px}.turn-tokens{border-left:0}.game-controls{display:flex;flex-wrap:wrap;border-left:0}.game-controls .btn{width:auto;flex:1}.hint-box{margin-top:12px}.turn-banner{font-size:11px;padding:11px 12px}.turn-banner .btn{font-size:10px}.dialog-backdrop{padding:12px;align-items:center}.dialog{border-radius:15px;max-height:92dvh}.dialog-header{padding:19px 17px 13px}.dialog-header h2{font-size:18px}.dialog-content{padding:5px 17px 20px}.dialog-footer{padding:14px 17px}.dialog-footer .btn{font-size:11px}.choice-grid{grid-template-columns:repeat(3,1fr);gap:8px}.choice-card{padding:5px}.choice-card strong{font-size:9px}.choice-card small{font-size:8px}.detail-grid{grid-template-columns:110px 1fr;gap:14px}.detail-text p{font-size:11px}.detail-text h3{font-size:12px}.detail-attack strong{font-size:11px}.detail-actions{grid-column:1/-1}.detail-actions .btn{padding:11px}.detail-sub{font-size:9px}.detail-image{border-radius:7px}.history-row{padding:15px}.history-row h3{font-size:12px}.history-row p{font-size:10px}#toast{bottom:80px}.summary-cards{gap:8px}.summary-cards div{padding:12px 5px}.summary-cards b{font-size:23px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Choice inspection keeps a pending card selection intact. */
.choice-tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.choice-tabs .btn{font-size:12px;padding:9px 12px;min-height:40px;background:var(--panel2);border:1px solid var(--line)}.choice-tabs .selected{color:var(--mint);border-color:var(--mint)}.inspection-note{color:var(--muted);font-size:12px;margin-bottom:18px;line-height:1.5}.inspection-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:14px}.inspection-board{display:grid;gap:22px}.inspection-board h3{margin-bottom:10px}.inspection-pokemon{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.inspection-poke{display:flex;text-align:left;gap:12px;border:1px solid var(--line);background:var(--panel2);border-radius:12px;padding:10px}.inspection-poke img{width:76px;height:106px;object-fit:contain;align-self:start}.inspection-poke b,.inspection-poke small{display:block;margin-bottom:7px;line-height:1.45}.inspection-poke small{color:var(--muted)}.prize-choice{width:75%;margin:8px auto}.segmented button{white-space:normal}.dialog-footer .btn{flex-shrink:0}@media(max-width:600px){.inspection-pokemon{grid-template-columns:1fr}.choice-tabs{gap:6px}.choice-tabs .btn{padding:8px 9px}.inspection-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.dialog-footer{flex-wrap:wrap;gap:10px}.dialog-footer .choice-counter{font-size:12px}}
/* v0.3: compact, bounded thumbnails; no card stretches to fill an empty row. */
.compact-gallery{display:flex;flex-wrap:wrap;align-content:flex-start;gap:9px;max-width:100%;padding:8px 0}.compact-card{position:relative;flex:0 0 76px;width:76px;min-width:0;max-width:76px;padding:0;border:0;background:transparent;text-align:left}.compact-card img{display:block;width:76px;max-width:100%;height:106px;object-fit:contain;border-radius:5px}.compact-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:var(--muted);margin-top:4px}.compact-count{position:absolute;top:3px;right:3px;border:1px solid #ffffff80;border-radius:4px;background:#08111eee;padding:2px 4px;font-size:10px;font-weight:700;color:white}.compact-card:hover img{outline:2px solid var(--mint)}.dialog{display:flex;flex-direction:column;overflow:hidden;max-height:90dvh}.dialog.large{width:min(1120px,100%)}.dialog-header,.dialog-footer{flex-shrink:0}.dialog-content{overflow-y:auto;min-height:0}.dialog-footer{position:static}.dialog img{max-width:100%}.detail-image{max-width:230px;max-height:330px;object-fit:contain;justify-self:start;align-self:start}.choice-grid{grid-template-columns:repeat(auto-fill,86px);justify-content:start;gap:10px}.choice-card{min-width:0;max-width:86px}.choice-card img{width:76px;max-width:100%;height:106px;object-fit:contain}.choice-card strong{font-size:10px}.choice-card small{font-size:9px}.inspection-note{margin-bottom:10px}.start-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.start-option{display:flex;flex-direction:column;gap:10px;padding:20px 14px;min-height:120px;border:1px solid var(--line);background:var(--panel2);border-radius:12px;text-align:left}.start-option.selected{border-color:var(--mint);box-shadow:0 0 0 1px var(--mint);color:var(--mint)}.start-option small{color:var(--muted);line-height:1.5}.hand-help{font-size:11px;color:var(--muted);margin:8px 0 12px}.hand-card{touch-action:none}.drag-ghost{position:fixed;z-index:1000;width:76px!important;height:106px!important;object-fit:contain;pointer-events:none;filter:drop-shadow(0 8px 12px #0009);transform:rotate(-4deg)}.drop-ready{outline:2px dashed #9cf1ca99;outline-offset:3px}.drop-hover{outline:3px solid var(--mint);box-shadow:0 0 20px #9cf1ca55}.is-dragging{user-select:none;cursor:grabbing}.hand-card{cursor:grab}.hand-card:active{cursor:grabbing}
@media(max-width:600px){.compact-gallery{gap:6px}.compact-card{flex-basis:49px;width:49px;max-width:49px}.compact-card img{width:49px;height:69px}.compact-name{font-size:8px}.compact-count{font-size:9px;padding:1px 3px}.choice-grid{grid-template-columns:repeat(auto-fill,65px);gap:8px}.choice-card{max-width:65px}.choice-card img{width:57px;height:80px}.choice-card strong{font-size:9px}.choice-tabs .btn{font-size:10px;padding:7px 8px}.detail-image{max-width:140px;max-height:196px}.start-options{grid-template-columns:1fr}.start-option{min-height:70px;padding:14px}.start-option small{font-size:12px}.dialog.large{max-height:94dvh}.dialog-header h2{font-size:17px}}
/* Opponent turn playback: one readable public action at a time. */
.opponent-play{position:fixed;z-index:80;left:50%;bottom:24px;transform:translateX(-50%);width:min(760px,calc(100vw - 32px));min-height:180px;display:flex;align-items:center;gap:24px;padding:24px 26px;isolation:isolate;overflow:hidden;border:1px solid #98edce99;border-radius:24px;background:linear-gradient(125deg,#102c2ef5,#101e32fa);box-shadow:0 24px 100px #000b,0 0 45px #65d6bc22;animation:play-enter .3s ease-out;color:#ecf7f5;}
.play-aura{position:absolute;z-index:-1;inset:-60%;background:radial-gradient(ellipse at 30% 60%,#7feac22b,transparent 50%);pointer-events:none;}
.play-cards{display:flex;align-items:center;justify-content:center;flex-shrink:0;gap:8px;max-width:260px;}
.play-card{display:block;width:100px;max-width:100%;height:140px;object-fit:contain;border-radius:7px;filter:drop-shadow(0 8px 12px #0008);animation:card-reveal .4s ease-out;}
.play-cards:has(.play-card:nth-child(3)) .play-card{width:76px;height:108px;}
.play-cards:has(.play-card:nth-child(4)){flex-wrap:wrap;max-width:200px;gap:4px;}.play-cards:has(.play-card:nth-child(4)) .play-card{width:46px;height:65px;}
.play-copy{flex:1;min-width:0;}.play-copy .eyebrow{color:#a1ebd0;font-size:10px;letter-spacing:.14em;}.play-copy h2{font-size:23px;margin:8px 0 10px;line-height:1.15;}.play-copy p{font-size:13px;line-height:1.6;color:#c2d4da;margin:0;max-height:130px;overflow:auto;}
.play-controls{display:flex;flex-direction:column;gap:8px;flex-shrink:0;}.play-controls .btn{min-width:76px;}.play-progress{position:absolute;bottom:0;left:0;width:100%;height:3px;transform-origin:left;background:#a6f1d4;animation:play-progress var(--play-duration) linear forwards;}.is-paused .play-progress{animation-play-state:paused;}
.play-hidden{width:88px;height:126px;border-radius:8px;}.play-symbol svg{width:48px;height:48px;color:#a6f1d4;}.play-attack,.play-knockout{border-color:#f3bd77aa;background:linear-gradient(125deg,#352a24fa,#192638fa);}.play-attack .eyebrow,.play-knockout .eyebrow{color:#ffd18f;}.play-attack .play-progress,.play-knockout .play-progress{background:#ffd18f;}.play-evolve{border-color:#c8a7ff99;background:linear-gradient(125deg,#262138fa,#142c32fa);}.pokemon.play-highlight{outline:3px solid #b8fbe0;outline-offset:5px;box-shadow:0 0 28px #86e6c866;animation:target-glow 1.3s ease-in-out infinite alternate;}
@keyframes play-enter{from{opacity:0;transform:translate(-50%,18px) scale(.97)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
@keyframes card-reveal{from{opacity:0;transform:translateY(12px) rotate(-5deg) scale(.88)}to{opacity:1;transform:translateY(0) rotate(0) scale(1)}}
@keyframes play-progress{to{transform:scaleX(0)}}
@keyframes target-glow{to{box-shadow:0 0 38px #86e6c899}}
@media(max-width:650px){.opponent-play{bottom:12px;padding:16px;gap:12px;min-height:145px;border-radius:18px;flex-wrap:wrap;}.play-card{width:65px;height:91px;}.play-cards{max-width:150px;gap:4px;}.play-cards:has(.play-card:nth-child(3)) .play-card{width:45px;height:63px;}.play-hidden{width:60px;height:84px;}.play-copy h2{font-size:18px;}.play-copy p{font-size:12px;max-height:110px;}.play-controls{width:100%;flex-direction:row;justify-content:flex-end;}.play-controls .btn{padding:8px 14px;}.play-copy{min-width:140px;}}
@media(prefers-reduced-motion:reduce){.opponent-play,.play-card,.pokemon.play-highlight{animation:none;}.play-progress{animation:none;opacity:.4;}}

/* Read-only public turn review. Private diagnostic state never enters the DOM. */
.decision-review { margin:20px 0; max-height:40vh; overflow:auto; }
.decision-review section + section { border-top:1px solid var(--border); padding-top:16px; }
.decision-review h3 { margin:0 0 12px; }
.review-cards { display:flex; flex-wrap:wrap; gap:12px; margin:12px 0; }
.review-cards button { padding:0; border:0; background:none; cursor:pointer; }
.review-cards img,.review-cards .card-back { width:100px; height:140px; object-fit:contain; border-radius:7px; }
.decision-note { min-height:75px; height:75px; }
.review-card-text { font-size:13px; }
body:has(#dialog-root .dialog) #playback-root { display:none; }
