/* Retained board and interaction styling. */
#hand .hand-card{--card-fill:#dceffa;--card-edge:#418fbd;background:var(--card-fill);border:2px solid var(--card-edge);box-shadow:0 3px 8px #12395014}
#hand .hand-card[data-category="pokemon"]{--card-fill:#ffe5a1;--card-edge:#c99931}
#hand .hand-card[data-category="item"]{--card-fill:#c7e8fc;--card-edge:#3389b7}
#hand .hand-card[data-category="supporter"]{--card-fill:#ffd5b1;--card-edge:#d78a49}
#hand .hand-card[data-category="energy"]{--card-fill:#c6eedf;--card-edge:#469b7f}
#hand .hand-card[data-category="tool"]{--card-fill:#e6d6fa;--card-edge:#9971bd}
#hand .hand-card[data-category="stadium"]{--card-fill:#dcecab;--card-edge:#8eaa43}
#hand .hand-card .inspect,#hand .hand-card .inspect:hover{background:transparent;color:#18344b}
#hand .hand-card .kind{color:#3d5263}#hand .hand-card .card-type-badge{background:#ffffff80}
#hand .hand-card.selected-card{outline:3px solid #078db1;outline-offset:2px}
.field-abilities{display:grid;gap:5px;margin-top:5px}.field-ability{font-size:var(--solo-tiny,12px);min-height:32px;padding:4px 6px;border:1px solid #90b3ae;background:#e7f4f0;text-align:left;line-height:1.35;overflow-wrap:anywhere}
.field-ability[data-available="true"]{background:#087969;color:white;border-color:#075f54;box-shadow:0 2px 0 #034c44}.field-ability[data-available="true"]::after{content:' ▶';float:right}
#table{position:relative;isolation:isolate;background:radial-gradient(ellipse at 50% 0%,#315a70b0,transparent 55%),linear-gradient(155deg,#172f48,#164a4b);border:2px solid #81aeb4;box-shadow:inset 0 0 0 7px #ffffff06,0 16px 38px #102e3c22}
#table::before{content:'';position:absolute;z-index:-1;pointer-events:none;width:240px;height:240px;border:8px solid #a0d9d424;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%);background:linear-gradient(transparent 47%,#a0d9d424 47% 53%,transparent 53%)}
#table::after{content:'';position:absolute;z-index:-1;pointer-events:none;width:64px;height:64px;border:8px solid #a0d9d438;border-radius:50%;left:50%;top:50%;transform:translate(-50%,-50%);background:#204d57}
#table .empty-slot{border-color:#a5dfd45c;background:#ffffff07;color:#d3e8e5}
#table .opponent-hand-counter{background:#f0dfbce8;color:#193750}
#audio-preview{background:#087a71;color:#fff;border:0;width:100%;min-height:48px}#audio-state{font-size:var(--solo-small);color:#2b665e;padding:10px 0}
.native-choice-card{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;min-width:0;text-align:center}.native-choice-card .sprite{width:64px;height:58px;object-fit:contain}.choice-option:has(.native-choice-card){display:flex;flex-wrap:wrap;justify-content:center}.choice-option .native-choice-card{width:100%}.choice-confirm-controls{display:flex;justify-content:center;gap:10px;position:sticky;bottom:0;background:#f9fcff;padding:12px 0}.assignment-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 0}.assignment-row>*{min-width:0;max-width:100%}.rule-description{white-space:pre-wrap}.unified-prize{min-height:130px;background:#183e65;color:white;border:3px solid #e2bd72;border-radius:12px}.unified-prize:has(input:checked){background:#087e89;border-color:#68e2cc}.promotion-attachments{width:100%;font-size:.8rem}.promotion-energy{display:flex;align-items:center;gap:5px}.setup-position{display:block}.attached-tools{display:block;font-size:.65rem}.bench{flex-wrap:wrap}#choice .choice-options{max-height:48dvh;overflow:auto}
#choice .mulligan-review{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;padding:8px 2px 16px}
#choice .mulligan-review .native-choice-card{min-height:150px;padding:12px 8px;border:1px solid #c6d8e8;border-top:3px solid #af6e80;border-radius:12px;background:linear-gradient(160deg,#fff,#eff4f9);box-shadow:0 4px 8px #16355012;font-size:12px}
#choice .mulligan-review .native-choice-card b{font-size:12px}.mulligan-review .trainer-symbol{font-size:32px;color:#7484a2}
@media(max-width:600px){#choice .mulligan-review{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}#choice .mulligan-review .native-choice-card{min-height:122px;padding:8px 5px}}
.battle-fx.deal-card{width:72px;min-height:100px;padding:6px;background:#163454;border:3px solid #d1e2ed;box-shadow:0 8px 18px #00172d44}.battle-fx.deal-card[data-owner="1"]{background:#673346}.deal-card .card-back-mark{background:transparent!important;color:#fff!important;font-size:32px}.deal-card small{display:none}
/* Public counts only: three overlapping rows of two face-down prizes. */
.player-area>.prize-pile{background:transparent;border:0;box-shadow:none;padding:3px 0;gap:5px;min-height:105px;overflow:visible;color:#dceefa}
.field-prize-cards{display:block;position:relative;width:48px;height:106px;flex-shrink:0}
.field-prize-back{position:absolute;left:calc(var(--prize-col)*16px);top:calc(var(--prize-row)*31px);width:30px;height:43px;border:2px solid #e6c779;border-radius:4px;box-sizing:border-box;background:radial-gradient(circle at center,#b6dceb 0 10%,#28557c 12% 24%,#789ebd 26% 30%,#163454 32% 60%,#254d73 63%);box-shadow:1px 2px 3px #142a4755;transform:rotate(-5deg)}
.field-prize-back:nth-child(even){transform:rotate(5deg)}
.field-prize-count{font-size:11px;font-weight:800}
@media(max-width:600px){.field-prize-cards{width:34px;height:77px}.field-prize-back{width:23px;height:32px;left:calc(var(--prize-col)*10px);top:calc(var(--prize-row)*22px);border-width:1.5px}.player-area>.prize-pile{min-height:101px}.field-prize-count{font-size:9px}}
/* Consistent modal surfaces and comfortably separated actions. */
#dialog{padding:26px;border:1px solid #d9e5ed;border-radius:22px;background:#fbfdff;color:#172e43;box-shadow:0 28px 90px #03162566;max-width:min(700px,calc(100vw - 24px))}
#dialog::backdrop{background:#071d35a6;backdrop-filter:blur(5px)}
#dialog .dialog-head{display:flex;align-items:flex-start;gap:20px;padding:0 0 18px;border-bottom:1px solid #e0e8ef;margin-bottom:20px;background:#fbfdff;position:static}
#dialog-title{font-size:19px;line-height:1.65;letter-spacing:-.025em;margin:0;flex:1;overflow-wrap:anywhere}
#close-dialog{flex:0 0 40px;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:#edf2f6;color:#496075}
#dialog-content{line-height:1.8}#dialog-content>p{margin:0 0 16px}
#dialog-content .retreat-options{display:grid;grid-template-columns:1fr;gap:10px;margin:20px 0 0}
#dialog-content .retreat-options button{display:block;text-align:left;white-space:normal;line-height:1.6;min-height:52px;border-radius:12px;padding:13px 16px;background:#e9f5f3;color:#106b63;border:1px solid #b9ddd7;box-shadow:none}
#dialog-content>button{margin:6px 8px 6px 0;white-space:normal;line-height:1.65}
#dialog[data-kind=confirm]{max-width:min(490px,calc(100vw - 24px))}
#dialog[data-kind=confirm] .confirm-controls{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:24px}
#dialog[data-kind=confirm] .confirm-controls button{width:100%;height:64px;border-radius:14px;font-size:27px;box-shadow:none;border:1px solid #dbe5ed}
#dialog[data-kind=confirm] .confirm-yes{background:#087d72;color:white}#dialog[data-kind=confirm] .confirm-no{background:#edf2f6;color:#466074}
#choice.is-effect-popup{border:1px solid #d8e5ec;background:#fbfdff;border-radius:22px;padding:26px;box-shadow:0 0 0 100vmax #071d3599,0 28px 90px #03162555}
#choice.is-effect-popup h2{font-size:19px;line-height:1.6;margin:0 0 14px;color:#172e43}
#choice .choice-options{gap:12px;padding:4px}
#choice .choice-option:has(.native-choice-card){border-radius:13px;padding:12px 8px;gap:8px;border:1px solid #d6e2ec;background:white;min-width:0}
#choice .choice-option:has(input:checked){border-color:#138f83;background:#e8f7f2;box-shadow:0 0 0 1px #138f83}
#choice .choice-option input[type=checkbox],#choice .choice-option input[type=radio]{width:20px;height:20px;accent-color:#087d72}
#choice .native-choice-card b{line-height:1.6;overflow-wrap:anywhere}
#choice .choice-confirm-controls{background:#fbfdff;border-top:1px solid #e0e8ef;margin-top:18px;padding:16px 0 0;gap:12px}
#choice .choice-confirm-controls button{min-height:46px;border-radius:11px;padding:10px 24px}
.hand-card.playable,.hand-card.playable .inspect{touch-action:pinch-zoom}
@media(max-width:600px){#dialog{padding:18px}#dialog-title{font-size:16px}#choice.is-effect-popup{padding:18px}#choice.is-effect-popup h2{font-size:16px}#choice .choice-options{gap:8px}#choice .choice-option:has(.native-choice-card){padding:10px 5px}.native-choice-card .sprite{width:54px;height:48px}}
/* Readable ability controls, separate from the rules text. */
#dialog-content button.ability-description{display:inline-flex;max-width:100%;min-height:44px;padding:10px 16px;margin:16px 0 8px;border-radius:12px;background:#e9f5f3;color:#086a61;border:1px solid #b5dad4;font-size:15px;line-height:1.5;font-weight:800}
#dialog-content button.ability-use{display:flex;width:100%;justify-content:space-between;align-items:center;gap:14px;background:#087c70;color:white;border:2px solid #075f59;box-shadow:0 3px 0 #034a44;min-height:54px;text-align:left;cursor:pointer}#dialog-content button.ability-use:disabled{background:#667b79;box-shadow:none;cursor:default}.ability-use-label{white-space:nowrap;border-radius:7px;background:#ffffff26;padding:5px 10px;font-size:13px}.ability-use:focus-visible{outline:3px solid #219bdd;outline-offset:3px}
.card-type-badge{display:inline-flex;align-items:center;justify-content:center;border:1px solid currentColor;border-radius:8px;padding:7px 10px;font-size:11px;font-weight:800;letter-spacing:.03em;white-space:nowrap;background:#e9f4fb;color:#126a9a}.badge-supporter{background:#fff0df;color:#a65216}.badge-stadium{background:#e9f6e8;color:#32733d}.badge-tool{background:#f2eafd;color:#7447a1}.hand-card .card-type-badge{margin:12px auto 8px;display:table}.mulligan-card .card-type-badge{margin:auto}
#display-settings{max-width:min(530px,calc(100vw - 28px));padding:24px}#display-settings h2{margin-top:0}#display-settings p{font-size:13px;line-height:1.7}#display-settings label{display:flex;gap:12px;align-items:center;padding:16px 0;border-bottom:1px solid #dfebf1;font-size:14px}#display-settings label:has(select){display:grid;gap:8px}#display-settings input{width:20px;height:20px;flex-shrink:0}#display-settings select{width:100%;min-height:44px}#display-settings>button{display:block;margin:16px 0 0 auto;min-height:44px}#lobby>.display-settings-open{margin:12px 0}
#dialog-content .ability-name{display:block;margin:16px 0 8px;color:#53677a}
#dialog-content .ability-body{display:block;padding:0 2px 16px;line-height:1.9;font-size:14px;color:#344e61;border-bottom:1px solid #e1e9ef;white-space:pre-wrap}
#choice.board-peeking{display:none!important}
.board-peek-button{display:block;margin:0 0 14px auto;min-height:44px;background:#e8f3f5;color:#20576a;border:1px solid #c1dbe4;border-radius:10px;padding:10px 16px}
#return-to-choice{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:34;padding:15px 24px;min-height:52px;border-radius:14px;background:#087d72;color:#fff;font-weight:800;box-shadow:0 6px 24px #061e3b55;max-width:calc(100vw - 24px)}
.target-state{display:flex;flex-direction:column;gap:7px;font-size:12px;line-height:1.6;margin-top:8px;color:#345466;width:100%}.target-energy-icons{display:flex;flex-wrap:wrap;gap:7px}.target-energy-card{display:flex;flex-direction:column;align-items:center;gap:3px}.target-energy-card small{font-size:10px}.energy-target-overview{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;max-height:26dvh;overflow:auto;margin:12px 0}.energy-target-summary{border:1px solid #d1e2e9;border-radius:12px;padding:12px;background:#f0f7f9;font-size:12px}
.opponent-hand-fan{--hand-card-width:58px;position:relative;display:block;width:auto;height:94px;flex:1 1 0;min-width:0}.opponent-hand-back{position:absolute;left:var(--hand-x);top:var(--hand-y);width:var(--hand-card-width);height:80px;border:2px solid #f4c0a2;border-radius:6px;background:radial-gradient(circle,#ecc4ad 0 12%,#893e4e 14% 27%,#b87272 29% 34%,#512739 36%);transform:rotate(var(--hand-angle));box-shadow:0 2px 4px #0004}.player-label>.opponent-hand-counter{width:100%;flex:1 0 100%;min-width:0;box-sizing:border-box;align-items:center;gap:10px;padding:12px 18px}.opponent-hand-counter .hand-count-label{font-size:11px;white-space:nowrap}
.own-area .field-prize-back{background:radial-gradient(circle,#beddef 0 12%,#28557c 14% 27%,#789ebd 29% 34%,#163454 36%);border-color:#a8d6ed}.opponent-area .field-prize-back{background:radial-gradient(circle,#ecc4ad 0 12%,#893e4e 14% 27%,#b87272 29% 34%,#512739 36%);border-color:#f4c0a2}.opponent-area .deck-pile{background:repeating-linear-gradient(45deg,#512739,#512739 7px,#673346 8px,#673346 10px);border-color:#d59b8e}.own-area .deck-pile{background:repeating-linear-gradient(45deg,#163454,#163454 7px,#244766 8px,#244766 10px);border-color:#a8d6ed}
.motion-card[data-owner="1"] .card-back-mark{background:#673346;color:#f4c0a2}.motion-card[data-owner="0"] .card-back-mark{background:#163454;color:#b8e1f3}.knockout-card{background:transparent!important;border:0!important;box-shadow:none!important}.knockout-card .poke-card{width:125px!important;pointer-events:none}.motion-card{will-change:transform,opacity;filter:drop-shadow(0 12px 12px #001b3a33)}
@media(max-width:600px){.opponent-hand-fan{--hand-card-width:40px;height:68px}.opponent-hand-back{height:55px}.player-label>.opponent-hand-counter{gap:5px;padding:10px 12px}.opponent-hand-counter .hand-count-label{font-size:9px}.energy-target-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.target-energy-card small{font-size:9px}#return-to-choice{font-size:13px;bottom:12px}}
#choice .mulligan-draw-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:12px}#choice .mulligan-draw-options .choice-option{min-height:52px;padding:12px 16px;cursor:pointer;background:white}#choice .mulligan-draw-options .choice-option:has(input:checked){background:#e9f8ff;border-color:#078abe}
.target-state{width:100%;text-align:left;padding-top:8px}.target-hp{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;color:#173d4e}.target-hp small{font-size:10px;color:#537282}.target-hp strong{font-size:25px;line-height:1.1;letter-spacing:-.03em}.target-hp>span{font-size:12px;color:#64808d}.target-hp-meter{height:6px;background:#dae7eb;border-radius:6px;overflow:hidden;margin:8px 0}.target-hp-meter i{display:block;height:100%;background:#169b88;border-radius:6px;transition:width .2s ease}.target-energy-icons{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-height:28px}.target-energy-card{display:inline-flex;align-items:center;border:1px solid #d7e4ec;background:white;border-radius:20px;padding:3px;gap:2px}.target-energy-card .energy-icon{width:22px;height:22px}.target-tools{display:block;line-height:1.6;margin-top:8px;color:#644f88;overflow-wrap:anywhere}.no-attached-energy{color:#7a8d96}.assignment-row>.target-energy-card{flex-shrink:0}.assignment-row>.target-energy-card .energy-icon{width:30px;height:30px}
#choice .pokemon-target-grid,#dialog .pokemon-target-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}#choice .pokemon-target-grid .choice-option,#dialog .pokemon-target-grid>button{position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;width:100%;min-width:0;margin:0;padding:14px;border:1px solid #cddfe7;border-radius:15px;background:white;cursor:pointer}#choice .pokemon-target-grid .choice-option>input{position:absolute;top:12px;right:12px;width:20px;height:20px}#choice .pokemon-target-grid .choice-option:has(input:checked){background:#eaf8f4;border:2px solid #108b77;padding:13px;box-shadow:0 0 0 2px #108b7715}.pokemon-target-grid .native-choice-card{padding:0 20px}.pokemon-target-grid .native-choice-card b{font-size:14px}.pokemon-target-grid .native-choice-card .sprite{width:56px;height:48px}.pokemon-target-grid>label>small{color:#607e8e;font-size:11px}
.energy-target-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.energy-target-summary{background:white;border:1px solid #d4e3e9;border-radius:13px;padding:12px;min-width:0}.energy-target-summary>.native-choice-card{gap:5px}.energy-target-summary>.native-choice-card .sprite{height:42px;width:48px}.energy-target-summary>.native-choice-card b{font-size:12px}.energy-target-summary>small{display:block;color:#60808e;text-align:center;margin-top:4px}
.damage-target .allocation-hp{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:5px;padding:8px 0;color:#173d4e;width:100%}.allocation-hp>small:first-child{flex-basis:100%;font-size:10px}.allocation-hp>strong{font-size:30px;line-height:1.1}.allocation-hp-max{font-size:12px;color:#6a8390}.allocation-hp-change{flex-basis:100%;font-size:12px;color:#517986}.allocation-ko{font-size:11px;padding:3px 7px;background:#b63d4b;color:white;border-radius:6px}.damage-target .target-hp-meter{width:90%;margin:0 auto 12px}.allocation-label{color:#607c8b;font-size:10px}.damage-target.will-knockout{background:#fff0ef;border-color:#cb5c58}.damage-target .counter-stepper{margin:6px 0 10px}.damage-target-grid{gap:12px}.damage-target .quiet{margin-top:6px}
@media(max-width:600px){.energy-target-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.energy-target-summary{padding:10px}#choice .pokemon-target-grid,#dialog .pokemon-target-grid{gap:8px}#choice .pokemon-target-grid .choice-option,#dialog .pokemon-target-grid>button{padding:10px}#choice .pokemon-target-grid .choice-option:has(input:checked){padding:9px}.target-hp strong{font-size:23px}.pokemon-target-grid .native-choice-card{padding:0 12px}.pokemon-target-grid .native-choice-card b{font-size:12px}.damage-target-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.damage-target{padding:10px}.target-energy-card .energy-icon{width:20px;height:20px}}
.opponent-hand-fan{display:flex;align-items:center;justify-content:center;height:86px}
.opponent-hand-stack{position:relative;display:block;width:min(100%,calc(var(--hand-card-width) + (var(--hand-count) - 1)*var(--hand-card-width)*.72));height:80px}
.opponent-hand-stack .opponent-hand-back{top:0;transform:none;box-shadow:-3px 1px 5px #0003;border-radius:7px}
.card-type-badge{display:inline-flex;flex-direction:column;gap:5px;border:0;border-radius:14px;padding:10px 14px;background:linear-gradient(145deg,#e6f5ff,#d1e8f8);color:#12658d;box-shadow:inset 0 1px 0 #fff9}
.card-type-badge svg{width:30px;height:30px;flex-shrink:0}.badge-supporter{background:linear-gradient(145deg,#fff3e5,#ffe1c0);color:#9e4e13}.badge-tool{background:linear-gradient(145deg,#f7efff,#e7d6fa);color:#724599}.badge-stadium{background:linear-gradient(145deg,#ebfaef,#d1eedc);color:#2a7648}
.hand-card .card-type-badge{display:flex;width:fit-content;max-width:100%;margin:10px auto 0;padding:8px 14px;box-sizing:border-box}.hand-card .kind:empty{display:none}
:root{--solo-text:16px;--solo-small:14px;--solo-card:14px;--solo-title:21px;--solo-tiny:12px}
:root[data-font-size=small]{--solo-text:14px;--solo-small:12px;--solo-card:12px;--solo-title:19px;--solo-tiny:11px}
:root[data-font-size=large]{--solo-text:19px;--solo-small:17px;--solo-card:16px;--solo-title:24px;--solo-tiny:14px}
body{font-size:var(--solo-text)}
#dialog,#choice,#lifecycle-dialog,#display-settings{font-size:var(--solo-text)}
#dialog p,#dialog-content .ability-body,#choice p,#choice label,#choice button,#dialog-content button,#lifecycle-dialog button,#display-settings p,#display-settings label,#display-settings button,#display-settings select{font-size:var(--solo-text);line-height:1.7}
#dialog-title,#choice.is-effect-popup h2,#display-settings h2{font-size:var(--solo-title)}
#display-settings{box-sizing:border-box;width:560px;max-width:calc(100vw - 24px);max-height:88dvh;overflow:auto;border:1px solid #d3e0e8;border-radius:22px;box-shadow:0 24px 90px #071e3b55}
#display-settings h3{font-size:var(--solo-text);margin:24px 0 8px;color:#1b536b}#display-settings p{color:#536a7c}
#display-settings::backdrop{background:#102a42a6;backdrop-filter:blur(4px)}
#display-settings .font-size-options{display:flex;gap:8px}#display-settings .font-size-options button{flex:1;min-height:48px;background:#edf3f8;color:#294861;border:2px solid transparent;border-radius:12px}#display-settings .font-size-options [aria-pressed=true]{background:#e2f5f0;border-color:#138979;color:#096b5e}
#display-settings label.sound-volume{display:grid;grid-template-columns:1fr auto;gap:8px}#display-settings .sound-volume input{grid-row:2;grid-column:1;width:100%;height:32px;accent-color:#138979}#display-settings .sound-volume output{grid-row:2;grid-column:2;min-width:45px;text-align:right;font-size:var(--solo-small)}
#display-settings input[type=checkbox]{accent-color:#138979;width:24px;height:24px}
.hand-card .name,.poke-card .name,.poke-card .poke-name,.native-choice-card b,.pokemon-target-grid .native-choice-card b,.energy-target-summary>.native-choice-card b{font-size:var(--solo-card);line-height:1.5;overflow-wrap:anywhere}
.hand-card .kind,.card-type-badge,.hand-count-label,.opponent-hand-counter .hand-count-label,.attached-tools,.pile-label,.pile-unit,.field-prize-count,.ability-use-label{font-size:var(--solo-tiny)}
.hp-line,.target-state,.energy-target-summary,.target-hp>span,.allocation-hp-change,.assignment-row,.player-label h2,#status,.toolbar-controls button,.bottom-actions button{font-size:var(--solo-small)}
.target-hp small,.allocation-hp>small:first-child,.allocation-label,.pokemon-target-grid>label>small{font-size:var(--solo-tiny)}
.toolbar-controls{flex-wrap:wrap}.toolbar-controls button{min-height:40px}.hand-card .inspect{height:auto;min-height:144px}.hand-card{height:auto;min-height:156px}
@media(max-width:600px){.opponent-hand-fan{height:58px}.opponent-hand-stack{height:55px}.player-label>.opponent-hand-counter{padding:10px 8px;gap:6px}.opponent-hand-counter .hand-count-label{white-space:normal;max-width:3em;line-height:1.3}.match-toolbar{flex-wrap:wrap;gap:8px}.toolbar-controls{gap:6px}.toolbar-controls button{padding:6px 8px}.card-type-badge svg{width:26px;height:26px}#display-settings{padding:20px 16px}}
.turn-counter{padding:10px 14px;background:#e3f6ef;border:1px solid #a4d6c5;border-radius:12px;color:#116555;font-size:var(--solo-text);font-weight:850}.turn-counter[data-owner="1"]{background:#f5e7ee;border-color:#dfb7c9;color:#864761}.match-toolbar .match-brand{display:none}
.condition-marks{display:flex;flex-wrap:wrap;gap:4px;margin:5px 0}.condition-mark{display:inline-flex;align-items:center;gap:4px;border-radius:7px;padding:3px 6px;font-size:var(--solo-tiny);font-weight:800;background:#f0e2ff;color:#7035a0;border:1px solid #d4b5ee}.condition-mark b{font-size:1.1em}.condition-burned{background:#ffe6d6;color:#a13c13;border-color:#f1b994}.condition-asleep{background:#e2eaff;color:#3a57a1;border-color:#bacbef}.condition-paralyzed{background:#fff4be;color:#74560a;border-color:#dfca70}.condition-confused{background:#ffe2ee;color:#9a3d6a;border-color:#e6aac8}.status-bubble{position:fixed;z-index:1200;padding:16px 22px;border:2px solid #a678c7;border-radius:18px;box-shadow:0 12px 35px #18133255;transform:translate(-50%,-50%);font-size:var(--solo-title);font-weight:850;max-width:calc(100vw - 32px);box-sizing:border-box;background:#f3e5ff;color:#663291;pointer-events:none}
.hp-meter{position:relative;overflow:hidden}.hp-meter>i{position:relative;z-index:1}.hp-trail{position:absolute;left:0;top:0;bottom:0;background:#edbd68;border-radius:inherit;z-index:0;pointer-events:none}.active-row .hp-meter{height:7px}
.effect-source,.discard-reason{padding:12px 16px;background:#edf6fa;border-left:4px solid #208b9e;border-radius:9px;color:#20596c;font-size:var(--solo-text);line-height:1.7;margin:12px 0}
#choice .pokemon-target-list,#dialog .pokemon-target-list{display:flex;flex-direction:column;gap:10px;width:100%;box-sizing:border-box}
#choice .pokemon-target-list .choice-option,#dialog .pokemon-target-list>button{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) 24px;grid-template-rows:auto auto;gap:5px 14px;width:100%;padding:16px;text-align:left;box-sizing:border-box;align-items:center}
#choice .pokemon-target-list .choice-option:has(input:checked){padding:15px}
#choice .pokemon-target-list .choice-option>input{position:static;grid-column:3;grid-row:1/3;width:22px;height:22px;margin:0}
.pokemon-target-list .native-choice-card{grid-column:1;grid-row:1;display:grid;grid-template-columns:52px minmax(0,1fr);padding:0;gap:10px;text-align:left;width:100%;box-sizing:border-box}.pokemon-target-list .native-choice-card .sprite{width:52px;height:48px}.pokemon-target-list .target-state{grid-column:2;grid-row:1/3;padding:0;margin:0}.pokemon-target-list>label>small,.pokemon-target-list>button>small{grid-column:1;grid-row:2;font-size:var(--solo-small);color:#627e8d}.pokemon-target-list .target-hp-meter{margin:3px 0}.pokemon-target-list .target-hp strong{font-size:26px}.pokemon-target-list .target-tools{margin:2px 0}
.bench.expanded-bench{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;overflow:visible;padding:12px 0;min-width:0}.bench.expanded-bench .poke-card,.bench.expanded-bench .empty-slot{width:100%;min-width:0;box-sizing:border-box;min-height:124px;flex:none}.bench.expanded-bench .name{font-size:var(--solo-card)}.bench.expanded-bench .hp-line{font-size:var(--solo-tiny)}.bench.expanded-bench .empty-slot{font-size:var(--solo-small)}.bench.expanded-bench .sprite{height:38px;width:44px}
@media(max-width:600px){.turn-counter{padding:8px 10px}.match-toolbar{flex-wrap:wrap}.bench.expanded-bench{gap:6px}.bench.expanded-bench .poke-card,.bench.expanded-bench .empty-slot{padding:7px 4px;min-height:124px}.bench.expanded-bench .hp-line{display:block;letter-spacing:-.04em}.bench.expanded-bench .name{font-size:var(--solo-tiny)}#choice .pokemon-target-list .choice-option,#dialog .pokemon-target-list>button{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 20px;padding:12px;gap:6px}#choice .pokemon-target-list .choice-option:has(input:checked){padding:11px}.pokemon-target-list .native-choice-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.pokemon-target-list .native-choice-card .sprite{width:44px;height:40px}.pokemon-target-list .target-hp strong{font-size:23px}.condition-mark{padding:2px 4px}}

/* Bench positions sit below, separate from remaining HP. */
.bench>.poke-card{position:relative;overflow:visible;margin-bottom:25px}.bench-position{position:absolute;left:0;right:0;top:calc(100% + 5px);text-align:center;color:#d5e7ef;font-size:12px;font-weight:700;line-height:18px;white-space:nowrap;pointer-events:none}.hp-line{justify-content:flex-start;white-space:nowrap}
#choice:has(.setup-guide){border:1px solid #badcde;border-radius:18px;padding:18px 22px;background:linear-gradient(120deg,#edf9f7,#f7fbff);display:flex;align-items:center;flex-wrap:wrap;gap:14px}#choice:has(.setup-guide) h2{width:100%;margin:0;font-size:17px}.setup-guide{display:flex;align-items:center;flex-wrap:wrap;gap:9px;flex:1}.setup-step{padding:8px 12px;background:#fff;border:1px solid #cee2e8;border-radius:10px;font-weight:700;font-size:14px}.setup-arrow{color:#008b81;font-weight:900}.setup-guide small{flex-basis:100%;color:#526e7f;font-size:13px}#choice .setup-start{min-height:52px;min-width:180px;border-radius:12px;padding:12px 26px;background:linear-gradient(115deg,#008e80,#056577);font-size:18px;font-weight:800;box-shadow:0 5px 14px #00796b22}#choice .setup-start::after{content:' ▶';font-size:13px}@media(max-width:520px){#choice:has(.setup-guide){padding:14px;gap:12px}#choice .setup-start{width:100%}.setup-step{font-size:12px;padding:7px}.bench-position{font-size:11px}}

/* ACE SPEC overrides the base category without changing gameplay types. */
#hand .hand-card[data-ace-spec="true"]{--card-fill:#ffc5d9;--card-edge:#d82b68}
#hand .hand-card[data-ace-spec="true"] .kind{color:#931343;font-weight:900;letter-spacing:.08em}
#hand .hand-card[data-ace-spec="true"] .card-type-badge{color:#931343;border-color:#c22860;background:#ffe9f1}

/* Board-first card handling: presentation only. */
#hand{padding-top:22px;padding-bottom:14px}
#hand .hand-card.selected-card{transform:translateY(-12px) scale(1.025);z-index:2;box-shadow:0 12px 20px #001b3a35}
#hand .hand-card.playable:not(.moving):hover{transform:translateY(-5px)}
#hand .hand-card.selected-card:hover{transform:translateY(-12px) scale(1.025)}
.drop-legal{position:relative;outline:2px dashed #6be8d0;outline-offset:-3px;box-shadow:inset 0 0 24px #62e6d52b}
.drop-legal::after{content:attr(data-drop-label);position:absolute;z-index:4;bottom:3px;left:50%;transform:translateX(-50%);max-width:96%;padding:3px 7px;border-radius:6px;background:#075f55;color:white;font-size:11px;font-weight:800;white-space:nowrap;pointer-events:none}
.drop-hover{outline:3px solid #5af2ca;box-shadow:inset 0 0 28px #62e6d545,0 0 0 4px #62e6d545}
.drag-card-preview{background:var(--drag-fill,#fff)!important;border-color:var(--drag-edge,#65c8db)!important;border-radius:12px;box-shadow:0 20px 36px #001b3a66!important}
.drag-card-preview .inspect{background:transparent!important}.drag-card-preview[data-ace-spec="true"] .kind{color:#931343;font-weight:900}
.drag-card-preview.can-drop{outline:3px solid #53e3bd;outline-offset:3px}.drag-settling{pointer-events:none!important}
#dialog[data-kind="confirm"]{position:fixed;top:auto;bottom:max(18px,env(safe-area-inset-bottom));margin:0 auto;width:min(560px,calc(100vw - 24px));max-width:560px;max-height:min(42dvh,360px);padding:16px 20px;border-radius:18px;border:1px solid #71bcb4;box-shadow:0 12px 60px #001b3a55}
#dialog[data-kind="confirm"]::backdrop{background:#102b3b18;backdrop-filter:none}
#dialog[data-kind="confirm"] .dialog-head{top:-16px;padding-bottom:6px}
#dialog[data-kind="confirm"] .confirm-controls{margin-top:12px;gap:12px}
#dialog[data-kind="confirm"] .confirm-controls button{height:48px;font-size:24px}
#dialog[data-kind="confirm"] #dialog-content>p:last-child{margin:6px 0 0;font-size:12px;text-align:center}
.motion-card[data-category="pokemon"]{background:#ffe5a1;border-color:#c99931}
.motion-card[data-category="item"]{background:#c7e8fc;border-color:#3389b7}
.motion-card[data-category="tool"]{background:#e6d6fa;border-color:#9971bd}
.motion-card[data-category="supporter"]{background:#ffd5b1;border-color:#d78a49}
.motion-card[data-category="stadium"]{background:#dcecab;border-color:#8eaa43}
.motion-card[data-category="energy"]{background:#c6eedf;border-color:#469b7f}
.motion-card[data-ace-spec="true"]{background:#ffc5d9;border-color:#d82b68}
.motion-card .motion-type{font-size:10px;font-weight:900;letter-spacing:.05em}.motion-type:empty{display:none}
.motion-card .card-type-badge{padding:4px 8px;font-size:11px;gap:4px}.motion-card .card-type-badge svg{width:22px;height:22px}
.motion-hidden-card .card-back-mark{width:56px;height:72px;display:grid;place-items:center;border-radius:6px;border:2px solid #a5bbce}
@media(prefers-reduced-motion:reduce){#hand .hand-card,#hand .hand-card.selected-card,#hand .hand-card.playable:hover{transition:none;transform:none}}
.battle-fx.motion-card{backface-visibility:hidden;transform-origin:50% 50%;contain:layout style;filter:none;box-shadow:0 14px 24px #001b3a33,0 2px 4px #001b3a24}

/* Field actions stay adjacent to their actual destinations. Mobile sizing is retained. */
.table .table-divider{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
#end-turn{min-height:46px;padding:8px 3px;border:1px solid #f3ddaa;border-radius:10px;background:#e4c381;color:#193247;font-weight:800;font-size:var(--solo-tiny);line-height:1.4}
#end-turn:disabled{background:#334a5b;color:#8ca3b3;border-color:#657a89}
.field-ability[data-used="true"],.ability-used{background:#e5e9ed!important;color:#71808c!important;border-color:#c3ccd3!important;box-shadow:none;opacity:1}
.ability-used{display:inline-block;padding:10px 14px;border-radius:10px}
@media(min-width:1000px){
 body:has(#play:not([hidden])) #app{max-width:none;width:100%;padding:14px 24px;box-sizing:border-box}
 #play{max-width:none;width:100%}#table{width:100%;max-width:none;box-sizing:border-box;padding:22px 28px}
 .table .player-area{grid-template-columns:90px minmax(0,1fr) 90px;gap:12px}
 .bench:not(.expanded-bench){display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;padding-left:102px;padding-right:102px;max-width:none;width:auto}
 .bench:not(.expanded-bench)>.poke-card,.bench:not(.expanded-bench)>.empty-slot{width:100%;min-width:0;max-width:none;box-sizing:border-box}
 .active-row .poke-card{width:240px;max-width:100%}.hand-dock{max-width:none;width:100%;box-sizing:border-box}
 .table .table-divider{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(24px,15vw,280px)}
}

/* Manual stadium effects share the field/detail action and native legality. */
.stadium-use{width:100%;min-height:44px;white-space:normal;line-height:1.35;margin-top:6px}.stadium-use-status{display:block;font-size:11px;line-height:1.4;margin-top:4px}.stadium-use:disabled{opacity:.55;cursor:not-allowed}

/* Equal bench slot heights; the ability area is anchored to the card bottom. */
#table .bench{align-items:stretch;padding-bottom:28px}
#table .bench>.poke-card,#table .bench>.empty-slot{min-height:196px;margin-bottom:0;align-self:stretch}
#table .poke-card{display:flex;flex-direction:column}
#table .poke-card>.inspect{flex:none}
#table .poke-card>.field-abilities{margin-top:auto;padding-top:8px}
#table .poke-card>.board-tools{margin-top:5px}
.energy-source-count{padding:12px 16px;border:1px solid #a5d7d2;border-radius:12px;background:#e6f5f2;color:#14675c;font-weight:800;line-height:1.7}
@media(max-width:600px){#table .bench>.poke-card,#table .bench>.empty-slot{min-height:190px}#table .bench.expanded-bench>.poke-card,#table .bench.expanded-bench>.empty-slot{min-height:200px}.energy-source-count{font-size:var(--solo-small);padding:10px}}

/* Card-shaped stadium and trainer landing pad alongside the active Pokemon. */
#table #end-turn{width:100%;box-sizing:border-box;justify-self:stretch}
#table .table-divider{grid-template-columns:1fr;min-height:0;padding:8px 0;margin:4px 0}
#table #stadium-slot{box-sizing:border-box;width:116px;min-height:156px;justify-self:start;margin-left:clamp(0px,8vw,120px);border:2px dashed #96be9d;border-radius:10px;background:linear-gradient(150deg,#dcebb818,#b8d4920a);display:flex;flex-direction:column;gap:6px;justify-content:center;padding:10px}
#table #stadium-slot::before{content:'STADIUM';font-size:10px;font-weight:800;letter-spacing:.1em;color:#c4dfc1}
#table #stadium-slot.has-stadium{border-style:solid;border-color:#b3d877;background:linear-gradient(150deg,#eff6d4,#cedd9d);box-shadow:3px 4px 0 #082d3455}
#table #stadium-slot.has-stadium::before{color:#526932}
#table #stadium-slot button{font-size:12px;line-height:1.4;padding:6px;background:#ffffffb0;color:#263e24;border-color:#99ac71}
#table .own-active-lane{grid-column:2;grid-row:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:14px}
#table .own-active-lane>.active-row{min-width:0;flex:0 1 240px}
#table #trainer-zone{box-sizing:border-box;width:112px;min-height:156px;flex:0 0 112px;display:flex;align-items:center;justify-content:center;padding:8px;text-align:center;font-size:11px;line-height:1.6;border:1px dashed #d9c894;border-radius:10px;background:#e6d59b0b;color:#ddd3b8}
@media(max-width:600px){
 #table #stadium-slot{width:82px;min-height:116px;margin-left:53px;padding:6px}
 #table #stadium-slot button{font-size:10px;padding:4px}
 #table .own-active-lane{gap:5px}
 #table .own-active-lane>.active-row{flex:1;min-width:0}
 #table .own-active-lane .poke-card,#table .own-active-lane .empty-slot{width:100%;min-width:0;box-sizing:border-box}
 #table #trainer-zone{width:58px;flex-basis:58px;min-height:90px;padding:4px;font-size:9px}
}

/* Setup start stays beside the selected active card; confirmations use viewport center. */
#table .own-active-lane>.active-row{flex-direction:column;gap:10px}
#field-battle-start{width:min(240px,100%);min-height:48px;box-sizing:border-box;font-size:var(--solo-text);flex:none}
#dialog[data-kind="confirm"]{top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);margin:0;box-sizing:border-box;max-height:calc(100dvh - 32px);overflow-y:auto}
.setup-motion-notice{top:50%!important;bottom:auto!important;left:50%;transform:translate(-50%,-50%);max-width:calc(100vw - 32px);pointer-events:none}

/* Quiet, consistent board chrome; functional card colors and layout stay intact. */
#table .poke-card{border-color:#a8c8d7;box-shadow:0 3px 0 #061e3433,0 8px 16px #071c3024;background:linear-gradient(165deg,#fff 65%,#eef6f8);border-radius:12px}
#table .poke-card[data-owner="0"]{border-top:3px solid #23aa99}
#table .poke-card[data-owner="1"]{border-top:3px solid #b76b8d}
#table .active-row .poke-card{box-shadow:0 0 0 3px #c2e6ec14,0 5px 0 #071c3033,0 10px 24px #071c302b}
#table .empty-slot{border-color:#9ac4cc55;background:linear-gradient(150deg,#ffffff06,#ffffff01)}
#table .field-pile{box-shadow:2px 3px 0 #93b5c14d,4px 5px 0 #071d303d}
#table .pile-number{font-variant-numeric:tabular-nums;font-weight:850;letter-spacing:-.04em}
#table .hp-meter{height:5px;border-radius:8px;background:#dfe9ee}#table .active-row .hp-meter{height:7px}
#table .field-ability{border-radius:8px}#table .field-ability:focus-visible,#table button:focus-visible,#hand button:focus-visible{outline:3px solid #258fdb;outline-offset:3px}
#table .board-tools button{border-radius:8px}
.hand-dock{border-top:2px solid #aecbd8;box-shadow:0 -8px 26px #09283b1a;background:#f4f9fc}
.turn-counter{font-variant-numeric:tabular-nums;box-shadow:0 2px 7px #0a35450b}
.action-notice{border:1px solid #93becb;border-radius:14px;box-shadow:0 8px 28px #06243638;line-height:1.6}
.damage-bubble.heal{background:#e6fff3;color:#08684a;border:2px solid #54bd8f}
.landing-accent{--accent:#47ccb5;position:fixed;z-index:1201;pointer-events:none;box-sizing:border-box;border:2px solid var(--accent);border-radius:22px;box-shadow:0 0 18px color-mix(in srgb,var(--accent) 45%,transparent);transform:translate(-50%,-50%);will-change:transform,opacity}
.landing-accent span{position:absolute;color:var(--accent);font-size:20px;font-weight:900;line-height:1;left:calc((var(--spark) / 3) * 100%);top:calc((var(--spark) / 3) * 100%);transform:translate(-50%,-50%)}
.landing-accent span:nth-child(2){top:0;left:100%}.landing-accent span:nth-child(3){top:100%;left:0}
.accent-evolve{--accent:#efc363}.accent-energy{--accent:#63c8f0}.accent-tool{--accent:#bc9af0}.accent-heal{--accent:#52c78e}.accent-stadium{--accent:#b4d66c}.accent-draw{--accent:#8dc3e2}
@media(prefers-reduced-motion:reduce){.landing-accent{display:none}#table .hp-meter i,#table button,#hand .hand-card{transition:none!important}}

/* Compact mirrored field: trainer effects stay on their owner's side. */
html.solo-loading #lobby:not(.deck-lobby){min-height:220px;padding:36px 20px}
html.solo-loading #lobby:not(.deck-lobby)>:not(.solo-load-status){display:none!important}
html.solo-loading #lobby:not(.deck-lobby)::before{content:'デッキ選択画面を読み込んでいます…';display:block;padding:32px 16px;border-radius:18px;background:#eef6fa;color:#214d61;text-align:center;font-weight:700}
html.solo-load-failed #lobby::before{content:'まだ読み込みが完了していません'}
#table .active-lane{grid-column:2;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px}
#table .own-active-lane{grid-row:1}#table .opponent-active-lane{grid-row:3}
#table .active-lane>.active-row{flex:none;width:min(240px,100%);min-width:0;display:flex;flex-direction:column;gap:7px}
#table .active-lane .poke-card,#table .active-lane .empty-slot{box-sizing:border-box;width:100%;min-width:0}
#table .active-lane .trainer-pad,#table #trainer-zone{box-sizing:border-box;flex:none;width:min(240px,100%);min-height:36px;padding:5px 8px;display:flex;align-items:center;justify-content:center;border:1px dashed #d8c692;border-radius:8px;background:#dacb960d;color:#e0d4b8;font-size:11px;text-align:center;line-height:1.3}
#table .opponent-active-lane .trainer-pad{border-color:#c99aaf;color:#e4c3d3}
#table .table-divider{display:flex;justify-content:center;padding:5px 0;margin:4px 0;min-height:0}
#table #stadium-slot{width:min(520px,100%);min-height:42px;margin:0;padding:5px 10px;flex-direction:row;flex-wrap:wrap;gap:5px;border:1px dashed #96be9d;border-radius:9px}
#table #stadium-slot::before{content:none}#table #stadium-slot button{width:auto;flex:1;min-height:32px;margin:0}#table .stadium-use-status{width:100%;margin:0}
#table .discard-pile{aspect-ratio:auto;min-height:44px;padding:6px 1px}#table .discard-pile .pile-label{font-size:11px;white-space:nowrap}
#table .bench>.poke-card,#table .bench>.empty-slot{min-height:142px}
.hand-dock{padding:7px 9px max(7px,env(safe-area-inset-bottom))}#hand{min-height:0;padding:12px 2px 4px;gap:7px}
#hand .hand-card{width:102px;flex-basis:102px}#hand .hand-card .inspect{min-height:112px;padding:7px}
#hand .hand-card .sprite{height:38px;width:44px}#hand .hand-card .card-type-badge{min-height:40px;padding:5px}#hand .hand-card .name{font-size:12px;line-height:1.3}
@media(max-width:600px){
 body:has(#play:not([hidden])) #app{padding:4px 5px}
 #table{padding:8px 6px;border-radius:14px}
 #table .player-area{grid-template-columns:46px minmax(0,1fr) 46px;gap:5px}
 #table .active-lane>.active-row,#table .active-lane .trainer-pad,#table #trainer-zone{width:min(182px,100%)}
 #table .active-row{min-height:0}#table .active-row .poke-card{padding:7px;min-height:96px}
 #table .active-row .sprite{width:40px;height:34px}#table .active-row .name{font-size:12px}
 #table .active-lane .trainer-pad,#table #trainer-zone{min-height:30px;font-size:10px;padding:4px}
 #table .bench,#table .bench.expanded-bench{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:4px 0 19px;min-height:0;width:100%;align-items:stretch}
 #table .bench.expanded-bench{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:21px}
 #table .bench>.poke-card,#table .bench>.empty-slot,#table .bench.expanded-bench>.poke-card,#table .bench.expanded-bench>.empty-slot{width:100%;min-width:0;min-height:108px;padding:5px 3px;box-sizing:border-box;border-radius:7px;flex:none}
 #table .bench .sprite{width:32px;height:27px}#table .bench .name{font-size:10px;line-height:1.3}#table .bench .hp-line{font-size:9px;white-space:normal}#table .bench .hp-meter{height:4px;margin:3px 0}
 #table .bench .field-abilities{padding-top:3px;gap:3px}#table .bench .field-ability{font-size:9px;min-height:28px;padding:3px;line-height:1.25}#table .bench .energy-strip{gap:1px;min-height:12px}#table .bench .energy-icon{width:12px;height:12px}
 #table .pile-rail{gap:5px}#table .discard-pile{min-height:38px}#table .discard-pile .pile-label{font-size:9px}#table #end-turn{min-height:36px;padding:5px 1px;font-size:10px}
 #table #stadium-slot{min-height:34px;padding:3px 6px;font-size:10px}#table #stadium-slot button{font-size:10px;min-height:28px}
 #table .opponent-hand-counter{min-height:44px;padding:4px 7px}#table .opponent-hand-fan{--hand-card-width:28px;height:40px;min-height:40px}#table .opponent-hand-back{height:38px}
 #table .player-label{padding:2px 0;margin:0}#table .player-label h2{font-size:10px}
 .hand-dock{padding:5px 6px max(5px,env(safe-area-inset-bottom));border-radius:13px 13px 0 0}#hand{padding-top:9px;padding-bottom:3px;gap:6px}#hand .hand-card{width:91px;flex-basis:91px}#hand .hand-card .inspect{min-height:100px;padding:6px}#hand .hand-card .name{font-size:11px}#hand .hand-card .sprite{width:36px;height:32px}#hand .hand-card .energy-icon{width:32px;height:32px}#hand .hand-card .card-type-badge{min-height:32px;font-size:10px;padding:4px}
 .hand-label{min-height:28px;padding:0 2px}.hand-label button{min-height:28px;padding:3px 7px}
 .match-toolbar{gap:4px;margin-bottom:5px;flex-wrap:wrap}.toolbar-controls{display:flex;flex-wrap:wrap;gap:4px}.toolbar-controls button{min-height:32px;padding:5px 7px;font-size:11px}.turn-counter{padding:6px 9px;font-size:12px}.status-bar{padding:6px 8px;font-size:11px;margin-bottom:6px}
}

/* Keep the hand's media margins from stretching every card in the flex row. */
#hand .hand-card .inspect{display:flex;flex-direction:column;align-items:flex-start;gap:3px;flex:none;height:126px;min-height:126px;box-sizing:border-box}
#hand .hand-card .kind{font-size:10px;line-height:1.2;margin:0}
#hand .hand-card .name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;max-height:3.9em;width:100%}
#hand .hand-card .sprite,#hand .hand-card .hand-energy,#hand .hand-card .card-type-badge{margin:auto auto 0;flex-shrink:0}
#hand .hand-card .hand-energy{width:32px;height:32px}#hand .hand-card .card-type-badge{flex-direction:row;gap:3px;min-height:28px;padding:3px 4px}#hand .hand-card .card-type-badge svg{width:20px;height:20px}
@media(max-width:600px){#hand .hand-card .inspect{height:116px;min-height:116px}#hand .hand-card .card-type-badge{font-size:9px}#table .opponent-hand-stack{height:40px}}

#hand .hand-card{min-height:0;height:auto}

/* Hand labels are centered; keep the information control in its own corner. */
#hand .hand-card .inspect{align-items:center;text-align:center}
#hand .hand-card .name,#hand .hand-card .kind{text-align:center}
#hand .hand-card.pokemon .sprite{margin:auto;align-self:center}

/* One shared stadium card, displayed on its controller's side of a mirrored field. */
#table .player-area{--rail-size:76px;grid-template-columns:var(--rail-size) var(--rail-size) minmax(0,1fr) var(--rail-size) var(--rail-size);gap:8px}
#table .active-lane{grid-column:3}
#table .pile-rail{width:var(--rail-size);min-width:0}
#table .field-pile{min-width:0;max-width:100%}
#table .own-area>.prize-pile,#table .opponent-area>.pile-rail{grid-column:1}
#table .own-area>.pile-rail,#table .opponent-area>.prize-pile{grid-column:5}
#table .stadium-position{box-sizing:border-box;width:var(--rail-size);aspect-ratio:63/88;min-width:0;align-self:center;border:1px dashed #96be9d;border-radius:8px;display:flex;align-items:center;justify-content:center;text-align:center;color:#b6d3ba;font-size:10px;overflow:hidden}
#table #own-stadium-position{grid-column:2;grid-row:1}
#table #opponent-stadium-position{grid-column:4;grid-row:3}
#table .table-divider{display:none}
#table #stadium-slot{box-sizing:border-box;width:100%;height:100%;min-height:0;max-height:100%;margin:0;padding:4px;display:flex;flex-direction:column;flex-wrap:nowrap;justify-content:center;gap:3px;border:0;border-radius:7px;overflow:auto}
#table #stadium-slot button{box-sizing:border-box;flex:none;width:100%;min-height:0;padding:3px 1px;font-size:10px;line-height:1.35;overflow-wrap:anywhere}
#table #stadium-slot .stadium-use-status{font-size:9px;line-height:1.25;color:#426336}
@media(min-width:1100px){#table .player-area{--rail-size:90px;gap:12px}}
@media(max-width:600px){#table .player-area{--rail-size:46px;gap:4px}#table #stadium-slot{padding:2px}#table #stadium-slot button,#table #stadium-slot .stadium-use-status{font-size:9px}#table .stadium-empty{font-size:9px;overflow-wrap:anywhere}}
@media(max-width:600px){#table .discard-pile .pile-label{font-size:8px}}
#table #stadium-slot{overflow:hidden;gap:2px}
#table #stadium-slot>button:first-child{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;max-height:3.9em;line-height:1.2}
#table #stadium-slot .stadium-use{font-size:9px;line-height:1.1;padding:2px 0}
#table #stadium-slot .stadium-use-status{display:none}

/* Match the field split to the emblem, including unequal preparation/bench heights. */
#table::before,#table::after{top:var(--field-center-y,50%)}
#table .table-divider{display:block;position:relative;height:20px;min-height:20px;margin:8px 0;padding:0;border:0}
#table .table-divider::before{content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:linear-gradient(90deg,#aedbd540,transparent 44%,transparent 56%,#aedbd540);pointer-events:none}
/* Reserve the info button above copy, and remove inherited one-sided text padding. */
#hand .hand-card .inspect{padding:18px 6px 6px}
#hand .hand-card .kind,#hand .hand-card .name{padding:0;width:100%;box-sizing:border-box;text-align:center}
#hand .hand-card .card-info{min-width:20px;min-height:20px;width:20px;height:20px;top:0;right:0;font-size:13px}
#table .active-lane .trainer-pad,#table #trainer-zone{width:min(290px,100%);min-height:56px;padding:9px 8px}
@media(max-width:600px){#table .table-divider{height:14px;min-height:14px;margin:5px 0}#table .active-lane .trainer-pad,#table #trainer-zone{width:100%;min-height:46px;padding:7px 3px}}


/* Shared hand palette for public mulligan cards; never expose hidden hands. */
#choice .mulligan-review .hand-card{--card-fill:#dceffa;--card-edge:#418fbd;background:var(--card-fill);border:2px solid var(--card-edge);box-shadow:0 3px 8px #12395014}
#choice .mulligan-review .hand-card[data-category="pokemon"]{--card-fill:#ffe5a1;--card-edge:#c99931}
#choice .mulligan-review .hand-card[data-category="item"]{--card-fill:#c7e8fc;--card-edge:#3389b7}
#choice .mulligan-review .hand-card[data-category="supporter"]{--card-fill:#ffd5b1;--card-edge:#d78a49}
#choice .mulligan-review .hand-card[data-category="energy"]{--card-fill:#c6eedf;--card-edge:#469b7f}
#choice .mulligan-review .hand-card[data-category="tool"]{--card-fill:#e6d6fa;--card-edge:#9971bd}
#choice .mulligan-review .hand-card[data-category="stadium"]{--card-fill:#dcecab;--card-edge:#8eaa43}
#choice .mulligan-review .hand-card .inspect,#choice .mulligan-review .hand-card .inspect:hover{background:transparent;color:#18344b}
#choice .mulligan-review .hand-card .kind{color:#3d5263}#choice .mulligan-review .hand-card .card-type-badge{background:#ffffff80}
#choice .mulligan-review .hand-card{box-sizing:border-box;min-height:0;padding:0;border-radius:11px;overflow:hidden;width:100%}
#choice .mulligan-review .hand-card .inspect{display:flex;flex-direction:column;align-items:center;gap:3px;box-sizing:border-box;width:100%;height:126px;min-height:126px;padding:18px 6px 6px;text-align:center;color:#18344b}
#choice .mulligan-review .kind{font-size:10px;line-height:1.2;margin:0;color:#3d5263}
#choice .mulligan-review .name{font-size:12px;font-weight:700;line-height:1.3;width:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;max-height:3.9em}
#choice .mulligan-review .sprite{width:44px;height:38px;margin:auto;object-fit:contain;flex-shrink:0}
#choice .mulligan-review .energy-row{margin:auto auto 0}#choice .mulligan-review .energy-icon{width:32px;height:32px}
#choice .mulligan-review .card-type-badge{flex-direction:row;gap:3px;min-height:28px;padding:3px 4px;margin:auto auto 0;background:#ffffff80;font-size:12px}#choice .mulligan-review .card-type-badge svg{width:20px;height:20px}
#choice .mulligan-review .hand-card[data-ace-spec="true"]{--card-fill:#ffb8d3;--card-edge:#cb2967;background:var(--card-fill);border-color:var(--card-edge)}
#table #stadium-slot .stadium-empty{font-size:10px;color:inherit}
#table .opponent-hand-back{box-sizing:border-box}
.battle-summary{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;margin:10px 0}
.battle-summary .status-bar{margin:0}.battle-summary #opponent-action{grid-column:1/-1;margin:0}
.hand-label{flex-wrap:wrap}.hand-label>span{font-size:11px;line-height:1.5}#hand .inspect{touch-action:manipulation}
body:has(#play:not([hidden])) #app{width:100%;max-width:1000px;margin-inline:auto;box-sizing:border-box}
#play{max-width:1000px;margin-inline:auto}.hand-dock{max-width:1000px;box-sizing:border-box}
@media(max-width:600px){.battle-summary{grid-template-columns:1fr;gap:5px}.battle-summary .turn-counter{justify-self:start}.hand-label>span{font-size:10px}#choice .mulligan-review .hand-card .inspect{height:116px;min-height:116px}#choice .mulligan-review .name{font-size:11px}#table #stadium-slot .stadium-empty{font-size:9px}}

.paired-stadium-help{padding:10px;border:1px solid #b8cbb5;border-radius:8px;background:#f0f7ed;line-height:1.5}.paired-stadium-badge{display:block;font-size:9px;line-height:1.1;white-space:nowrap;color:#245b2e}.inspection-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:8px}.inspection-cards small{display:block;font-size:11px}.temporary-inspection{padding:8px;border:1px solid #c6d6c0;border-radius:8px;margin-bottom:8px}
