/* Portrait collector's table. Cards and their combinations carry the hierarchy. */
.screen-battle{background:linear-gradient(#164638ed,#103a30e8),url('assets/materials/jade-cloth.webp') center/cover;color:#eee5cc}
.screen-battle:after{box-shadow:inset 0 0 0 1px #bacda52a,inset 0 0 55px #041d163b}
.screen-battle .battle-scene{display:none}
.screen-battle .battle-top{height:44px;padding:0 15px;background:#102b25e8;border-bottom:1px solid #b9c7a036;box-shadow:none}
.screen-battle .battle-top strong{font:18px var(--kai);letter-spacing:1px;color:#eee0b9}
.screen-battle .battle-top>div>span{font:10px var(--serif);writing-mode:horizontal-tb;letter-spacing:1px;border:0;background:none;color:#a7bca9;padding:0}
.screen-battle .battle-top .icon-button{color:#b3c2ad;width:44px;height:44px}
.screen-battle .enemy-zone{margin:5px 16px 0;padding:0 0 5px;min-height:48px;grid-template-columns:36px minmax(0,1fr) 36px;gap:10px;background:none;border:0;border-bottom:1px solid #abc09630;box-shadow:none}
.screen-battle .opponent-portrait{margin:0;min-height:44px;height:44px;width:36px;border:1px solid #c5bc9766;border-radius:2px;box-shadow:none}
.screen-battle .opponent-portrait .opponent-seal{height:12px;font-size:8px;line-height:12px;letter-spacing:1px;background:#16352ee8;color:#e0d8bc}
.screen-battle .opponent-status{padding:0}
.screen-battle .enemy-tactics{display:none}
.screen-battle .health-label{margin-bottom:5px}
.screen-battle .health-label strong{font:13px var(--serif);color:#e6dec2}
.screen-battle .health-label>span{font:16px Georgia,serif;color:#ece4ce}
.screen-battle .health-label small{font:10px Georgia,serif;color:#adbfaa}
.screen-battle .health-track{height:4px;background:#09241ccc;box-shadow:none}
.screen-battle .health.enemy .health-track>span{background:#c98669}
.screen-battle .health.player .health-track>span{background:#afc293}
.screen-battle .enemy-count{font-size:9px;color:#9bb9a2}
.screen-battle .enemy-count b{font:20px Georgia,serif;color:#e5d8b4}
.screen-battle .support-rail{margin:10px 16px 0;padding:0 0 8px;background:none;border:0;border-bottom:1px solid #c2c19d26;box-shadow:none}
.screen-battle .support-rail-heading{margin-bottom:7px;font:10px var(--serif);color:#aabda6}
.screen-battle .support-rail-heading small{font-size:10px;color:#aabda6}
.screen-battle .support-slots{gap:14px;align-items:start}
.screen-battle .support-slot{height:146px;display:flex;flex-direction:column;align-items:center;gap:5px;border:0;background:none;cursor:pointer;border-radius:3px;padding:3px 2px;transition:background .15s}
.screen-battle .support-slot:focus-visible{outline:2px solid #dfc17b;outline-offset:2px}
.screen-battle .support-slot .support-portrait{width:65px;height:96px;border:1px solid #e2d0a4;border-radius:3px;box-shadow:0 3px 4px #061d1466;flex:none}
.screen-battle .support-slot.will-trigger{background:#b4bd8620}
.screen-battle .support-slot.will-trigger .support-portrait{outline:1px solid #e7c471;outline-offset:2px}
.screen-battle .support-copy{padding:0;gap:3px;text-align:center;align-items:center;width:100%}
.screen-battle .support-copy>strong{font:13px/1.1 var(--kai);color:#f0deaf}
.screen-battle .support-copy>span{display:none}
.screen-battle .support-copy>small{font:10px/1.4 var(--serif);color:#c1ceb3;max-height:29px;white-space:normal;overflow:visible}
.screen-battle .support-vacant{height:146px;justify-content:center;border:1px dashed #a6b59035;color:#9ab497}
.screen-battle .support-vacant small{font:10px var(--serif);color:#8ca18b}
.screen-battle .support-rail.no-supports{height:45px;min-height:45px;padding:4px 0;margin-top:7px}
.screen-battle .companion-seal{font-size:22px;color:#c2bc94;border-color:#aaa97340}
.screen-battle .no-supports strong{color:#d9d6b1;font-size:13px}.screen-battle .no-supports>div>span{font-size:10px;color:#a7bda5}
.screen-battle .battle-field{padding:6px 16px 83px;min-height:155px;justify-content:center;overflow:visible}
.screen-battle .played-cards{height:85px;min-height:32px;flex-basis:85px}
.screen-battle .played-cards.has-cards{grid-template-columns:repeat(var(--played-count),minmax(0,55px));gap:5px;max-width:320px}
.screen-battle .played-cards .poker-card{max-height:83px;min-width:0;margin:0;width:100%;aspect-ratio:2/3}
.screen-battle .table-seal{font-size:32px;color:#bfc29723;height:70px}
.screen-battle .table-seal small{font-size:11px}
.screen-battle .hand-announcement{min-height:23px;margin:5px 0 0;gap:8px}
.screen-battle .hand-announcement strong{font:20px var(--kai);color:#e8d7ae}
.screen-battle .hand-announcement>span:first-child{color:#afc0a6;font:11px var(--serif)}
.screen-battle .strike-score{font-size:15px}.screen-battle .strike-score b{font-size:21px}
.screen-battle .battle-feedback{left:16px;right:16px;bottom:2px;min-height:66px;padding:4px 0;border-color:#c3bc8338;color:#c8d2b9}
.screen-battle .battle-feedback.has-chain{display:block;min-height:78px;text-align:left}
.combat-readout{display:flex;justify-content:space-between;gap:8px;align-items:center;width:100%;min-height:58px;padding:4px 9px;background:#0e3028b0;border:1px solid #bfc09235;border-radius:3px;text-align:left;color:#ddd9ba}
.combat-readout:disabled{opacity:1}.combat-readout:focus-visible{outline:2px solid #dac68d}
.combat-formula{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.combat-formula>span{font:10px var(--serif);color:#a8bfa9}
.combat-formula>b{font:20px/1.15 Georgia,var(--serif);color:#b5d6c4;min-height:23px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.combat-formula>b i{font-style:normal;font-size:13px;color:#9fb5a3;padding:0 4px}
.combat-formula>small{font:10px/1.2 var(--serif);color:#c4cca9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.combat-result{display:grid;grid-template-columns:auto auto;align-items:baseline;gap:1px 7px;flex:none;color:#f2c46f}
.combat-result>small{font:10px var(--serif);grid-column:1/-1;color:#d0c393}
.combat-result>b{font:34px/1 Georgia,serif;min-width:38px;font-variant-numeric:tabular-nums}
.combat-more{font:10px var(--serif);color:#aabda6}
.combat-odds{display:block;font:9px/1.4 var(--serif);color:#aab69d;margin:2px 1px 0}
.screen-battle[data-chain-phase] .combat-formula>b{font:14px/1.6 var(--serif)}
.chain-tick{animation:chain-tick .18s ease-out}@keyframes chain-tick{from{transform:scale(1.13);color:#fff0bf}to{transform:scale(1)}}
.screen-battle .player-zone{margin:0 16px;min-height:42px;padding:4px 0;gap:24px;border-top:1px solid #b5bf9540}
.screen-battle .player-zone .health-label strong{font-size:11px}.screen-battle .player-zone .health-label>span{font-size:14px}
.screen-battle .deck-stack{min-width:78px;min-height:36px;padding:0;gap:7px;color:#d0d6b4}
.screen-battle .deck-back{width:22px;height:31px;background:#25483c;border-color:#c2b57c;box-shadow:2px 2px 0 #86936a,4px 4px 0 #133427}
.screen-battle .hand-area{padding:0 16px 0;--fan-card-width:clamp(84px,24.5vw,102px);background:none}
.screen-battle .hand-tools{height:42px}.screen-battle .hand-tool{font-size:12px;color:#d7d8b8}
.screen-battle .selection-label{font-size:10px;color:#b1c3a9}.screen-battle .selection-label b{font-size:16px;color:#eed495}
.screen-battle .hand-grid.hand-fan{padding-top:25px;padding-bottom:10px}
.screen-battle .battle-actions{background:#0e2b24cc;padding:8px 16px calc(10px + env(safe-area-inset-bottom,0px));gap:10px;border-color:#b0ba9430;grid-template-columns:1fr 1.85fr}
.screen-battle .battle-actions button{height:46px;min-height:44px;font-size:19px;letter-spacing:1px;border-radius:4px}
.screen-battle .battle-actions .primary{background:#a84934;border:1px solid #d9956b;color:#ffedcd;box-shadow:inset 0 1px #eab28855,0 3px 0 #623427;text-shadow:none}
.screen-battle .battle-actions .primary:before{display:none}
.screen-battle .battle-actions .secondary{background:#1b3c31;border-color:#87987577;color:#d4cfac;box-shadow:none}
.pack-card-label em{display:block;font:10px/1.4 var(--serif);color:#c9b797;font-style:normal;margin-top:5px}
.pack-actions{display:flex;flex-direction:column;gap:3px;align-items:stretch}.pack-formation{min-height:32px;font-size:12px;padding:4px}
.pack-inspect-content .pack-skill-brief{font:13px/1.55 var(--serif);max-width:280px;text-align:left;letter-spacing:0;color:#dcc8a1;margin:12px auto 7px}
@media(max-height:740px){
 .screen-battle .support-slot,.screen-battle .support-vacant{height:117px}.screen-battle .support-slot .support-portrait{width:50px;height:74px}
 .screen-battle .support-copy>strong{font-size:12px}.screen-battle .support-copy>small{font-size:10px}
 .screen-battle .battle-field{min-height:139px}.screen-battle .played-cards{height:65px;flex-basis:65px}.screen-battle .played-cards .poker-card{max-height:63px}
 .screen-battle .hand-area{--fan-card-width:82px}.screen-battle .hand-tools{height:38px}
}
@media(max-height:620px){
 .screen-battle .battle-top{height:36px}.screen-battle .battle-top strong{font-size:16px}
 .screen-battle .enemy-zone{min-height:41px;margin-top:2px;padding-bottom:2px;grid-template-columns:32px minmax(0,1fr) 32px;gap:8px}
 .screen-battle .opponent-portrait{min-height:38px;height:38px;width:32px}.screen-battle .health-label strong{font-size:11px}.screen-battle .health-label{margin-bottom:3px}
 .screen-battle .support-rail,.screen-battle .support-rail:not(.no-supports){margin-top:5px;padding:0 0 4px}.screen-battle .support-rail-heading{display:none}
 .screen-battle .support-slots{gap:10px}.screen-battle .support-slot,.screen-battle .support-vacant{height:98px;gap:3px;padding:2px 0}
 .screen-battle .support-slot .support-portrait{width:42px;height:61px}.screen-battle .support-copy{gap:2px}.screen-battle .support-copy>strong{font-size:11px}.screen-battle .support-copy>small{font-size:9px;line-height:1.2;max-height:22px}
 .screen-battle .support-rail.no-supports{height:34px;min-height:34px}
 .screen-battle .battle-field{padding:2px 16px 70px;min-height:99px}.screen-battle .played-cards{height:29px;flex-basis:29px;min-height:24px}.screen-battle .played-cards .poker-card{max-height:29px}.screen-battle .played-cards.has-cards{grid-template-columns:repeat(var(--played-count),minmax(0,20px));gap:3px}.screen-battle .played-cards .card-caption{display:none}.screen-battle .played-cards .card-index b,.screen-battle .played-cards .card-index i{font-size:10px}.screen-battle .played-cards .card-copies{display:none}
 .screen-battle .table-seal{display:none}.screen-battle .hand-announcement{min-height:18px;margin-top:2px}.screen-battle .hand-announcement strong{font-size:17px}
 .screen-battle .battle-feedback.has-chain{min-height:66px}.combat-readout{min-height:49px;padding:3px 7px}.combat-formula>b{font-size:17px;min-height:20px}.combat-formula>small{font-size:9px}.combat-result>b{font-size:28px}.combat-more{display:none}
 .screen-battle .player-zone{min-height:34px;padding:2px 0}.screen-battle .deck-back{width:18px;height:25px}.screen-battle .deck-stack{min-height:29px}
 .screen-battle .hand-area{--fan-card-width:70px;--fan-lift:18px}.screen-battle .hand-tools{height:32px}.screen-battle .selection-label b{font-size:13px}.screen-battle .hand-grid.hand-fan{padding-top:22px;padding-bottom:7px}
 .screen-battle .battle-actions{padding:5px 16px calc(7px + env(safe-area-inset-bottom,0px))}.screen-battle .battle-actions button{height:44px;font-size:18px}
}
@media(prefers-reduced-motion:reduce){.chain-tick{animation:none}}
.reduced-motion .chain-tick{animation:none}

@media(max-height:620px){
 .screen-battle .support-slot,.screen-battle .support-vacant{height:86px}.screen-battle .support-slot .support-portrait{width:36px;height:52px}
 .screen-battle .player-zone{height:37px;min-height:37px}.screen-battle .player-zone .health-label{margin-bottom:2px}.screen-battle .deck-stack{height:33px;min-height:33px}.screen-battle .deck-stack>span:last-child{font-size:10px;line-height:1.15}.screen-battle .deck-stack small{font-size:9px;line-height:1.1}
 .screen-battle .battle-field{padding-bottom:69px;min-height:130px}.screen-battle .played-cards{height:46px;flex-basis:46px;min-height:30px}.screen-battle .played-cards .poker-card{max-height:45px}.screen-battle .played-cards.has-cards{grid-template-columns:repeat(var(--played-count),minmax(0,30px))}
 .screen-battle .played-cards .card-index b,.screen-battle .played-cards .card-index i{font-size:13px}
 .screen-battle .battle-feedback.has-chain{min-height:63px;padding-top:1px}.combat-readout{min-height:47px;padding-block:2px}.combat-formula>span{font-size:9px}.combat-formula>b{font-size:17px;line-height:1;min-height:18px}.combat-result>b{font-size:27px}
}

.screen-battle .hand-announcement .hand-rank{display:inline;font:inherit;color:#fff0cb;margin-left:4px}
.screen-battle .hand-announcement .strike-score{display:none}

.screen-battle .opponent-portrait{position:relative;overflow:visible}
.screen-battle .opponent-portrait:before{content:'';position:absolute;inset:-3px -5px;min-width:44px;min-height:44px}
.screen-battle .selection-label.cannot-beat>span{font-size:12px;color:#ecce95}
.pack-actions .pack-formation{min-height:44px;font-size:16px;padding:8px 14px}
.pack-actions .pack-collect-only{min-height:44px;font-size:13px;padding:8px}
.deck-composition{margin:0 0 17px;padding:13px 10px 10px;border-block:1px solid #ae947338;background:#080f0c33}
.deck-composition>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.deck-composition strong{font:14px var(--serif);color:#ddc69d}.deck-composition small{font:11px var(--serif);color:#b7a78c}
.deck-composition ol{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:3px;padding:0;margin:11px 0 7px;list-style:none}
.deck-composition li{display:flex;align-items:center;flex-direction:column;gap:3px;color:#e5d1a9;font:11px Georgia,var(--serif)}
.deck-composition li b{font-size:10px;font-weight:400;color:#bfb38c}
.deck-composition li i{display:block;height:31px;width:100%;max-width:12px;background:linear-gradient(to top,#bdaa76 var(--rank-fill),#c5bd9516 var(--rank-fill));border-radius:1px}
.deck-composition li.empty{opacity:.38}.deck-composition li span{font-size:11px;white-space:nowrap}.deck-composition li:nth-last-child(-n+2) span{font:8px var(--serif)}
.deck-composition p{font:10px/1.6 var(--serif);color:#aaa087;margin:0}
@media(max-height:620px){.screen-battle .support-copy>small{font-size:10px;line-height:1.15;max-height:24px}}
.screen-battle .enemy-zone{grid-template-columns:44px minmax(0,1fr) 36px}
.screen-battle .opponent-portrait{width:44px;height:44px;min-height:44px;overflow:hidden}
.screen-battle .opponent-portrait:before{display:none}
.screen-battle .opponent-portrait>.opponent-image{inset:0;width:100%;height:100%;transform:none;object-fit:cover;object-position:50% 20%}
@media(max-height:620px){.screen-battle .enemy-zone{grid-template-columns:44px minmax(0,1fr) 32px;min-height:46px}}

.hero-contribution{margin:0 0 20px;padding:14px 12px;background:#101f1766;border:1px solid #b1a27738}
.hero-contribution h3{display:flex;justify-content:space-between;align-items:baseline;font:15px var(--serif);color:#dec897;margin:0 0 12px}.hero-contribution h3 small{font-size:10px;color:#aa9e84}
.hero-contribution dl{display:grid;grid-template-columns:repeat(4,1fr);margin:0;gap:6px;text-align:center}.hero-contribution dt{font:11px var(--serif);color:#b9ae91}.hero-contribution dd{font:19px/1.5 Georgia,serif;color:#d6d7b7;margin:0}.hero-contribution p{font:10px/1.6 var(--serif);color:#ad9e80;margin:9px 0 0}
.support-portrait img[src*="zhuwu-"]{transform:scale(1.4);transform-origin:44% 18%}
.support-portrait img[src*="zhuwu-prismatic"]{transform:scale(1.9);transform-origin:38% 18%}
.support-portrait .foil-highlights{opacity:.22}
/* The collection is paper, so its captions need ink, not the table's pale text. */
.screen-collection{--muted:#69573e;--line:#9b815447}
.screen-collection .collection-hint,.screen-collection .support-manage-row p,.screen-collection .support-candidate p,.screen-collection .archive-note{color:#69563b}
.screen-collection .support-manage-row strong small,.screen-collection .support-candidate strong small,.screen-collection .support-manage-row>div>span,.screen-collection .copy-state,.screen-collection .collection-card-info{color:#70583a}
.screen-collection .collection-card-info b,.screen-collection .collection-filter .active{color:#8c3422}
.screen-collection .collection-filter button{color:#69573e}.screen-collection .collection-filter .active:after{background:#8c3422}
.screen-collection .deck-summary{color:#665438}.screen-collection .deck-summary b{color:#714b28}
.screen-collection .deck-composition{background:#f3e3c044;border-color:#92714755}.screen-collection .deck-composition strong{color:#4d3923}.screen-collection .deck-composition small,.screen-collection .deck-composition p{color:#6c593d}
.screen-collection .deck-composition li,.screen-collection .deck-composition li b{color:#51462c}.screen-collection .deck-composition li i{background:linear-gradient(to top,#8d7848 var(--rank-fill),#80643c22 var(--rank-fill))}
.screen-collection .support-management{gap:10px}
.screen-collection .support-manage-row{grid-template-columns:52px minmax(0,1fr) 44px;align-items:center;gap:10px;padding-bottom:12px}
.screen-collection .support-manage-card{width:52px;height:78px;grid-row:auto}
.screen-collection .support-manage-row>div>strong{font-size:16px}.screen-collection .support-manage-row p{font-size:11px;margin:4px 0}
.screen-collection .support-order-menu{grid-column:3;position:relative;align-self:center}
.screen-collection .support-order-menu>summary{color:#674629;min-width:44px;list-style:none;text-align:center;border:1px solid #95744e55;border-radius:2px;line-height:42px}
.screen-collection .support-order-menu[open]{z-index:4}
.screen-collection .support-order-menu .support-order-actions{position:absolute;right:0;top:48px;width:230px;padding:8px;background:#3c2f20;box-shadow:0 4px 12px #33200c44;border:1px solid #a58a5b;border-radius:3px;z-index:4}
.screen-collection .drag-candidate-rail{margin-inline:0;padding-inline:8px;background:#d9c5a0;border-color:#92714755;box-shadow:0 3px 7px #604a2510}
.screen-collection .drag-candidate>span{color:#665035}

/* A cloth table lit from above, with a calm centre and a clear thumb zone. */
.screen-battle{background:radial-gradient(ellipse at 52% 29%,#2e5b432b,transparent 62%),linear-gradient(#163f31ed,#092a23ed),url('assets/materials/jade-cloth.webp') center/cover}
.screen-battle:after{box-shadow:inset 0 0 0 1px #c9c39625,inset 0 0 56px #01160f55}
.screen-battle .battle-top{background:linear-gradient(180deg,#0e2a22f2,#102e25e8);border-bottom-color:#c8ba8738}
.screen-battle .enemy-zone{border-bottom-color:#c4be8b30}
.screen-battle .health-label>span{font-variant-numeric:tabular-nums}
.screen-battle .health-track{height:5px;border-radius:1px;background:#031b13a6;box-shadow:inset 0 1px 2px #0005}
.screen-battle .health.enemy .health-track>span{background:linear-gradient(90deg,#a05e47,#dbad80);box-shadow:0 0 4px #ce866428}
.screen-battle .health.player .health-track>span{background:linear-gradient(90deg,#728e60,#c3ca99)}
.screen-battle .support-rail{border-bottom-color:#c8be8733}
.screen-battle .support-slot{border-radius:2px;transition:background .16s,transform .16s}
.screen-battle .support-slot.will-trigger{background:linear-gradient(180deg,#b5be8520,#b5be8507)}
.screen-battle .support-slot .support-portrait{border-color:#d2c39c;box-shadow:1px 1px 0 #efe0b07d,0 4px 5px #02150d6e}
.screen-battle .support-slot.will-trigger .support-portrait{outline-color:#debf7c;outline-offset:3px}
.screen-battle .support-copy>strong{color:#f0dfb4;letter-spacing:.4px}
.screen-battle .support-copy>small{color:#c6cdb1}
.screen-battle .battle-field{background:radial-gradient(ellipse at 50% 43%,#d4c18409 0,transparent 61%)}
.screen-battle .table-seal{font-size:38px;letter-spacing:4px;color:#d0c29820;text-shadow:0 1px #001c1370}
.screen-battle .table-seal small{letter-spacing:5px}
.screen-battle .played-cards .poker-card{box-shadow:0 2px 0 #d4c49c40,0 7px 7px #031e156e;border-color:#cdbd92}
.screen-battle .hand-announcement strong{color:#f2dfb1;letter-spacing:1px;text-shadow:0 2px #041c14}
.screen-battle .battle-feedback.has-chain{border-top-color:#c5b88940}
.screen-battle .combat-readout{background:linear-gradient(90deg,#0523199e,#152f2066);border-color:#b6a77645;border-radius:2px;padding-inline:11px;box-shadow:inset 0 1px #c3b27a10,0 2px 5px #031a1124}
.screen-battle .combat-formula{padding-right:8px}
.screen-battle .combat-formula>span{color:#b9c5aa;letter-spacing:.4px}
.screen-battle .combat-formula>b{color:#c1dfcd;font-variant-numeric:tabular-nums;font-size:23px}
.screen-battle .combat-formula>small{color:#d1ccac}
.screen-battle .combat-result{border-left:1px solid #d2bc8042;padding-left:13px;min-width:80px;justify-items:end}
.screen-battle .combat-result>small{justify-self:start;color:#dbcda5}
.screen-battle .combat-result>b{font-size:39px;line-height:1;color:#f1cc80;text-shadow:0 2px #573d1a55;transform-origin:75% 65%}
.screen-battle .combat-more{color:#b7baa0}
.screen-battle .combat-odds{margin-top:4px;color:#b5bea5}
.screen-battle .battle-feedback.is-preview .combat-result>b{color:#dec18a}
.screen-battle .battle-feedback.is-result .combat-result>b{color:#f9d492}
.screen-battle .player-zone{border-top-color:#a7b28a45}
.screen-battle .hand-tools{gap:5px}
.screen-battle .hand-tool{min-height:44px;padding-inline:7px;color:#dfe0bd;position:relative}
.screen-battle .hand-tool:before{content:'';position:absolute;inset:4px 0;border:1px solid #c8b78335;border-radius:2px;background:#c6b67805;pointer-events:none}
.screen-battle .hand-tool:active{color:#ffebbb;background:#d6c29418}
.screen-battle .selection-label{color:#bcc6ac;padding-inline:0;font-size:11px}
.screen-battle .selection-label b{color:#f0dba6;font-family:var(--kai);font-weight:400}
.screen-battle .hand-fan .hand-card{box-shadow:-2px 1px 3px #021a116e,0 8px 9px #00190e66;border-color:#d9cdb1;transition:transform .18s cubic-bezier(.18,.9,.3,1),border-color .14s,box-shadow .18s}
.screen-battle .hand-fan .hand-card.selected,.screen-battle .hand-fan .hand-card.gesture-selected{border-color:#e7c170;box-shadow:0 0 0 1px #e2bc70,-2px 2px 3px #0623197d,0 13px 10px #021b1170}
.screen-battle .hand-fan .selected-tick{background:#a0462b;color:#fff1d0;border-radius:1px;width:14px;height:17px;font:11px/17px var(--serif);box-shadow:0 1px #4b2c194d}
.screen-battle .hand-fan .card-index:not(.card-index-bottom){background:#fbf1dcee;color:#272f27}
.screen-battle .hand-fan .red-suit .card-index:not(.card-index-bottom){color:#a73628}
.screen-battle .battle-actions{background:linear-gradient(#0b2921b5,#0c261ff2);border-top-color:#bbb58339}
.screen-battle .battle-actions .primary{background:linear-gradient(#b65035,#8c392b);border-color:#c8875c;box-shadow:inset 0 1px #e7b68966,0 3px 0 #4d271d;letter-spacing:2px}
.screen-battle .battle-actions .primary:disabled{background:#3c4d38;color:#adb09c;border-color:#78826859;box-shadow:inset 0 1px #bcc09616,0 2px 0 #153024;opacity:1}
.screen-battle .battle-actions .primary:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 2px 4px #59271a88,0 1px 0 #4d271d}
.screen-battle .battle-actions .secondary{background:#0c2c2373;border-color:#85916a5c;color:#ccd1b1}
.screen-battle .battle-actions .secondary:disabled{opacity:.42}
.screen-battle .battle-actions button:focus-visible,.screen-battle .hand-tool:focus-visible{outline:2px solid #f1d896;outline-offset:3px}
/* Impact stays on the table; no full-screen flash or shaking navigation. */
.impact-word-heavy{font-size:clamp(36px,10vw,48px);letter-spacing:5px;padding:9px 15px 7px;color:#f9e5b8;background:#793c2def;border:2px solid #dec191c9;outline:1px solid #663527;outline-offset:3px;box-shadow:0 4px 14px #04160c7d;text-shadow:0 2px #623c26;border-radius:1px}
.impact-ink-ring{width:154px;height:104px;border:5px double #d0b47688;box-shadow:0 0 0 3px #071c1266,inset 0 0 0 7px #16392444;border-radius:49% 45% 47% 51%;z-index:79}
.damage-number.effect-damage{font-size:clamp(38px,11vw,49px);font-weight:700;color:#f9d495;text-shadow:0 2px 0 #634020,1px 0 #613e2366,0 5px 9px #04160c8c;line-height:1}
.damage-number.combat-badge{padding:3px 6px;background:#183a2ac9;border:1px solid #d5bd814d;text-shadow:0 1px #041e13;border-radius:1px}
.card-flight-ghost{filter:drop-shadow(0 9px 5px #00140c66)}
@media(max-height:740px){.screen-battle .combat-formula>b{font-size:21px}.screen-battle .combat-result>b{font-size:34px}}
@media(max-height:620px){
 .screen-battle .combat-readout{padding:2px 8px;min-height:48px}.screen-battle .combat-formula{padding-right:3px}.screen-battle .combat-formula>b{font-size:18px}.screen-battle .combat-result{padding-left:9px;min-width:63px}.screen-battle .combat-result>b{font-size:29px}
 .screen-battle .hand-tool{min-height:32px;padding-inline:6px}.screen-battle .hand-tool:before{inset:-5px 0}.screen-battle .hand-tool:after{content:'';position:absolute;inset:-6px 0;pointer-events:auto}
 .screen-battle .combat-odds{margin-top:2px;font-size:9px}.screen-battle .selection-label{font-size:10px}.screen-battle .selection-label b{font-size:14px}
}
@media(prefers-reduced-motion:reduce){.screen-battle .hand-fan .hand-card{transition:none}.chain-tick{animation:none}}
body.reduce-motion .screen-battle .hand-fan .hand-card{transition:none}

/* Played cards overlap like papers on a table; their physical shape never changes. */
.screen-battle .battle-field{--table-card-width:84px}
.screen-battle .played-cards.has-cards{display:grid;grid-template-columns:repeat(var(--played-gaps),minmax(0,1fr)) var(--table-card-width);grid-template-rows:1fr;gap:0;justify-content:center;align-items:center;width:min(calc(100% - 16px),calc(var(--table-card-width) + var(--played-gaps)*48px));max-width:none;min-width:0;height:calc(var(--table-card-width)*1.5 + 18px);min-height:0;flex-basis:calc(var(--table-card-width)*1.5 + 18px);flex-shrink:0;isolation:isolate;overflow:visible}
.screen-battle .played-cards.has-cards .poker-card{--nickname-size:12px;--name-size:9px;width:var(--table-card-width);min-width:var(--table-card-width);max-width:var(--table-card-width);height:auto;min-height:0;max-height:none;aspect-ratio:2/3;box-sizing:border-box;margin:0;align-self:center;transform:translateY(var(--table-offset,0px)) rotate(var(--table-angle,0deg));transform-origin:50% 50%;z-index:var(--table-order,1);box-shadow:-2px 1px 2px #03170c44,0 7px 9px #021a135e}
.screen-battle .played-cards.has-cards .card-caption{display:flex;top:4px;right:3px;gap:2px;padding:3px 2px;max-height:calc(100% - 8px)}
.screen-battle .played-cards.has-cards .card-index b,.screen-battle .played-cards.has-cards .card-index i{font-size:21px}
.screen-battle .played-cards.has-cards .card-copies{display:block;font-size:10px}
.screen-battle .played-cards.has-cards .basic-pips{display:block}.screen-battle .played-cards.has-cards .basic-pips i{font-size:17px}
.screen-battle .played-cards.has-cards .basic-face{font-size:39px}.screen-battle .played-cards.has-cards .basic-face small{font-size:21px}
.screen-battle .hand-announcement{margin-top:6px;flex-shrink:0}
@media(max-height:740px){
 .screen-battle .battle-field{--table-card-width:76px}
 .screen-battle .support-slot{height:58px;display:grid;grid-template-columns:32px minmax(0,1fr);gap:4px;align-items:center;padding:2px 0}
 .screen-battle .support-slot .support-portrait{width:32px;height:48px}
 .screen-battle .support-copy{align-items:flex-start;text-align:left;gap:3px}
 .screen-battle .support-copy>strong{font-size:11px}.screen-battle .support-copy>small{font-size:9px;line-height:1.25;max-height:28px}
 .screen-battle .support-vacant{height:58px;display:flex;flex-direction:column;justify-content:center}
 .screen-battle .support-slots{gap:8px}
}
@media(max-height:620px){
 .screen-battle .battle-field{--table-card-width:64px}
 .screen-battle .played-cards.has-cards{height:104px;flex-basis:104px}
 .screen-battle .played-cards.has-cards .poker-card{--nickname-size:10px;--name-size:8px}
 .screen-battle .played-cards.has-cards .card-index b,.screen-battle .played-cards.has-cards .card-index i{font-size:18px}
 .screen-battle .played-cards.has-cards .basic-pips i{font-size:13px}.screen-battle .played-cards.has-cards .basic-face{font-size:31px}
 .screen-battle .support-slot,.screen-battle .support-vacant{height:54px}
 .screen-battle .hand-area{--fan-card-width:66px}
 .screen-battle .hand-grid.hand-fan{padding-top:18px;padding-bottom:5px}
}
/* Keep the full-size spread above the readout, even on short portrait screens. */
.screen-battle .battle-field{min-height:257px;padding-top:6px}
.screen-battle .played-cards.has-cards{height:138px;flex-basis:138px}
.screen-battle .support-rail{margin-top:7px}
.screen-battle .support-slot,.screen-battle .support-vacant{height:128px}
.screen-battle .support-slot .support-portrait{width:56px;height:84px}
.screen-battle .hand-grid.hand-fan{padding-top:17px;padding-bottom:5px}
@media(max-height:740px){
 .screen-battle .battle-top{height:36px}
 .screen-battle .enemy-zone{margin-top:3px;padding-bottom:3px}
 .screen-battle .support-rail,.screen-battle .support-rail:not(.no-supports){margin-top:5px;padding-bottom:4px}
 .screen-battle .support-rail-heading{display:none}
 .screen-battle .support-slot,.screen-battle .support-vacant{height:54px}
 .screen-battle .support-slot .support-portrait{width:32px;height:48px}
 .screen-battle .battle-field{--table-card-width:72px;min-height:220px;padding-top:10px;padding-bottom:66px}
 .screen-battle .played-cards.has-cards{height:114px;flex-basis:114px}
 .screen-battle .battle-feedback,.screen-battle .battle-feedback.has-chain{min-height:58px;padding-block:3px}
 .screen-battle .combat-readout{min-height:48px;padding-block:3px}
 .screen-battle .combat-formula>b{font-size:20px;min-height:23px}
 .screen-battle .combat-result>b{font-size:32px}
 .screen-battle .combat-odds{display:none}
 .screen-battle .hand-area{--fan-card-width:76px}
 .screen-battle .hand-grid.hand-fan{padding-top:18px;padding-bottom:6px}
}
@media(max-height:620px){
 .screen-battle .battle-field{--table-card-width:64px;min-height:180px;padding-top:6px;padding-bottom:48px}
 .screen-battle .played-cards.has-cards{height:104px;flex-basis:104px}
 .screen-battle .hand-announcement{margin-top:4px;min-height:18px}
 .screen-battle .battle-feedback,.screen-battle .battle-feedback.has-chain{min-height:44px;padding-block:0}
 .screen-battle .combat-readout{min-height:44px;padding-block:3px}
 .screen-battle .combat-formula>small{display:none}
 .screen-battle .combat-result>b{font-size:28px}
 .screen-battle .hand-area{--fan-card-width:58px}
 .screen-battle .hand-grid.hand-fan{padding-top:14px;padding-bottom:4px}
}

.platform-collection-link{min-height:44px;display:block;margin:8px auto;font:14px var(--serif);color:#846940}
