/* SHARDWAKE ALPHA 06 — mobile battle command UX + readable hand and collection */
:root{--sw-gold:#e7c68d;--sw-surface:#0c1927}
.turn-steps{display:flex;align-items:center;gap:5px;margin:0 0 8px;padding:0 2px;min-width:0}
.turn-steps span{flex:1;min-width:0;display:grid;place-items:center;border:1px solid #40566b;background:#101e2d;color:#8c9eac;border-radius:5px;min-height:26px;font-size:.62rem;font-weight:800;letter-spacing:.055em;white-space:nowrap}
.turn-steps span.current{background:linear-gradient(95deg,#a87d49,#e5c28a);color:#15212d;border-color:#eccb94;box-shadow:0 0 13px #cf9d4b35}
.turn-steps span.done{background:#1b4038;color:#a7d5bb;border-color:#699d84}
.hand-view-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;color:#ffe4b0;background:#4f412a80;border:1px solid #bc965e90;border-radius:6px;min-height:27px;padding:4px 8px;font-size:.66rem;font-weight:800;letter-spacing:.065em;cursor:pointer}
.hand-view-button .ico{width:13px;height:13px}.hand-view-button:focus-visible,.unit-information:focus-visible,.gallery-close:focus-visible{outline:2px solid #f7d28b;outline-offset:3px}
.board-unit{position:relative}.unit-information{position:absolute;z-index:6;right:0;top:-2px;min-width:21px;height:21px;border:1px solid #e0c18b99;border-radius:50%;background:#112134ee;color:#f7d9a0;display:grid;place-items:center;font:700 12px Georgia,serif;box-shadow:0 3px 10px #0009;cursor:pointer}.unit-information:active{transform:scale(.92)}
.arena-lane .tcg-card.selected,.arena-lane .board-unit.queued .tcg-card{filter:brightness(1.18);outline:2px solid #eed098;outline-offset:1px}
.combat-dock{display:none}
.hand-gallery-backdrop{align-items:center}.hand-gallery-modal{width:min(900px,96vw);padding:23px;max-height:min(90dvh,950px);overflow:auto;border:1px solid #d9b87999;background:linear-gradient(158deg,#1a2b3b,#0a1421 66%);box-shadow:0 25px 100px #000e}
.gallery-head{display:flex;align-items:start;justify-content:space-between;gap:12px}.gallery-head h2{font-size:clamp(1.5rem,4vw,2rem);margin:8px 0}.gallery-head h2 span{color:#bba47c;font-size:.57em;white-space:nowrap}.gallery-close{width:38px;height:38px;flex:0 0 38px;border-radius:8px;color:#f1dbb0;border:1px solid #a48c64;background:#152638;font-size:29px;line-height:1;cursor:pointer}.gallery-intro{font-size:.83rem;line-height:1.4;margin:0 0 14px}
.hand-gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:12px}.hand-gallery-item{display:flex;flex-direction:column;align-items:stretch;gap:8px;text-align:left;min-width:0;padding:9px;background:linear-gradient(145deg,#243449,#101b2a);border:1px solid #b39b716c;border-radius:10px;color:#efe4d2;cursor:pointer}.hand-gallery-item .tcg-card{width:100%;max-width:210px;align-self:center}.hand-gallery-item:focus-visible{outline:2px solid #efcb91}.hand-gallery-item.unaffordable{border-color:#596979}.hand-gallery-item.unaffordable .tcg-card{filter:saturate(.7)}.gallery-description{font-size:.75rem;color:#d1dde5;line-height:1.4;min-height:3em}.gallery-status{display:block;background:#173b37;border:1px solid #659f8f;color:#bde6d4;text-align:center;border-radius:5px;padding:7px 5px;font-size:.62rem;letter-spacing:.09em;font-weight:800}.unaffordable .gallery-status{background:#1a2532;border-color:#54697b;color:#9caebd}
.collection-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:11px 12px;margin:15px 0 11px;border:1px solid #52687b70;background:linear-gradient(110deg,#192a3b,#0d1927);border-radius:10px}.search-label{width:100%;color:#dcc398;font-size:.65rem;letter-spacing:.15em;font-weight:800}.collection-search{flex:1;min-width:135px;min-height:43px;border-radius:7px;border:1px solid #879db077;background:#091522;color:#f4e6ce;padding:10px 12px;font:inherit;font-size:.86rem}.collection-search::placeholder{color:#9eaebd}.collection-search:focus{outline:2px solid #edc58c;outline-offset:2px}.collection-matches{white-space:nowrap;color:#ccdbdf;font-size:.69rem;font-weight:800}.card-grid .card-wrap[hidden]{display:none!important}.no-cards{color:#d3c9b1;font-size:.85rem;margin:9px}.collection-search::-webkit-search-cancel-button{filter:invert(1)}
/* Make the art and stats distinguishable at card scale. */
.card-grid .card-wrap .tcg-card{min-width:0}.card-grid .card-wrap{isolation:isolate}.card-grid .card-wrap:focus-within{z-index:1}.card-grid .tcg-card .card-art{object-position:center}
@media(max-width:760px){
 .battle-page .content{padding-bottom:calc(190px + var(--safe-bottom))}
 .battle-top{display:none}
 .battle-guide{min-height:37px;font-size:.7rem}
 .turn-steps{margin:0 0 7px}
 .turn-steps span{font-size:.56rem;min-height:23px;letter-spacing:.02em}
 .combat-dock{display:flex;position:fixed;z-index:50;bottom:calc(var(--nav) + var(--safe-bottom) - 1px);left:0;right:0;flex-direction:column;gap:7px;background:linear-gradient(180deg,#233b4cee,#08141dfc);backdrop-filter:blur(20px);border-top:1px solid #dfbb7c83;box-shadow:0 -12px 37px #000b;padding:8px 10px 8px;max-width:100vw}
 .dock-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.62rem;color:#e8d3ad;font-weight:800;letter-spacing:.06em}
 .dock-meta span:last-child{color:#a8c8d9;font-size:.6rem}
 .dock-actions{display:flex;align-items:stretch;gap:6px;min-width:0}.dock-actions .btn{flex:1;min-width:0;min-height:45px;padding:6px 7px;font-size:.66rem;letter-spacing:.02em;white-space:nowrap}.dock-actions .btn .ico{width:15px;height:15px;flex:none}.dock-actions .btn.dock-mini{flex:0 0 45px;width:45px;font-size:0;padding:5px}.dock-mini .ico{width:20px!important;height:20px!important}
 .battle-side .battle-action{display:none}.battle-side .battle-hint{display:none}.battle-side .battle-resource-row{display:none}.battle-side>.panel.panel-padding:not(.side-detail){display:none}.battle-side .side-detail{display:none}.mobile-log{margin:0}.mobile-card-inspector{margin-top:7px}.mobile-card-inspector.has-card{min-height:76px}
 .battle-columns{gap:7px}.arena-lane{position:relative;gap:3px}.unit-information{right:0;top:-3px;min-width:18px;width:18px;height:18px;font-size:10px}.hand-caption{font-size:.64rem}.hand-view-button{font-size:.62rem;min-height:27px}.hand-caption span:last-child{font-size:inherit;color:#f0d6a8}
 .hand-gallery-backdrop{align-items:flex-end}.hand-gallery-modal{width:100%;max-height:88dvh;border-radius:19px 19px 0 0;margin:0;padding:16px 12px calc(17px + var(--safe-bottom));border-bottom:0}.hand-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hand-gallery-item{padding:7px}.hand-gallery-item .tcg-card{width:min(100%,155px)}.gallery-description{font-size:.69rem;min-height:2.4em}.gallery-intro{font-size:.75rem}.gallery-head h2{font-size:1.45rem}
 .collection-tools{padding:9px;margin:11px 0}.collection-search{min-height:42px;font-size:.82rem}.collection-matches{font-size:.66rem}
}
@media(max-width:360px){.dock-meta{font-size:.55rem}.dock-meta span:last-child{font-size:.52rem}.dock-actions .btn{font-size:.6rem}.dock-actions .btn.dock-mini{flex-basis:40px;width:40px}.turn-steps span{font-size:.5rem}.hero-box h4{max-width:104px}}
@media(min-width:761px){.combat-dock{display:none}.hand-view-button{min-height:31px}.board-unit .unit-information{right:2px;top:1px}}
@media(prefers-reduced-motion:no-preference){.hand-gallery-modal{animation:swRise .23s ease both}.hand-gallery-item:active{transform:scale(.985)}.board-unit.queued .tcg-card{animation:swPulse 1.7s ease-in-out infinite}}@keyframes swRise{from{transform:translateY(14px);opacity:.6}to{transform:none;opacity:1}}@keyframes swPulse{50%{filter:brightness(1.24)}}
@media(prefers-reduced-motion:reduce){.hand-gallery-modal,.board-unit.queued .tcg-card{animation:none!important}}
