/* Sector: a restrained tactical console with artwork as the focal point. */
:root{--bg:#090f18;--panel:#111c2a;--line:#2b4056;--muted:#8c9fb5;--text:#e1e9f2;--gold:#e9be79;--mint:#71c8ed;--red:#ed8c83;--shadow:0 18px 48px #0008;font-family:"Segoe UI",Arial,sans-serif}
body{background:#090f18;color:var(--text);min-width:320px}
body:before{background:radial-gradient(ellipse at 15% 0,#24425d40,transparent 52%),radial-gradient(ellipse at 90% 58%,#34295720,transparent 55%),repeating-linear-gradient(0deg,transparent 0 79px,#99c8ed03 80px)}
.ambient{display:none}
button{border-radius:4px}
button:focus-visible,summary:focus-visible{outline:2px solid #8bd8ff;outline-offset:4px}
h1,h2,h3,.serif{font-family:"Segoe UI",Arial,sans-serif}
.menu-links .lab-menu-link{display:flex;align-items:center;justify-content:space-between;width:100%;padding:11px 0;min-height:43px;border-bottom:1px solid #324a613b;color:#adc7dc;text-decoration:none;font-size:13px}.menu-links .lab-menu-link:hover{color:#a6dcff;background:#1b3446}.menu-links .lab-menu-link span{color:#759bb7}.menu-links .lab-menu-link:focus-visible{outline:2px solid #a6dcff;outline-offset:3px}
.game-table{max-width:1180px;padding:0 38px max(150px,env(safe-area-inset-bottom));min-height:0}
.table-hud{min-height:76px;margin:0;gap:24px;border-bottom:0}
.round-hearts{gap:22px}.round-tag{font-size:12px;letter-spacing:1.1px;color:#8fa7bf;text-transform:uppercase}
.round-hearts .hearts{gap:5px;align-items:center}.hull-pip{width:15px;height:6px;background:#8ebfbf;box-shadow:0 0 8px #7ec6d530;border-radius:1px}.hull-pip.heart-off{background:#263946;box-shadow:none}
.table-gold{font-size:26px;color:#d6ecfc;font-weight:600;letter-spacing:.5px}.table-gold .mineral{color:#64c2f2;font-size:27px;vertical-align:-1px;margin-right:9px}
.table-actions .menu-button{width:42px;height:42px;padding:0;border:1px solid #3a5269;background:#162230;color:#a9bfd2;border-radius:5px}.table-actions .menu-button span{display:none}.table-actions .menu-button svg{width:20px;height:20px}
.round-actions{top:8px;grid-template-columns:136px 166px 1fr;gap:12px;padding:7px 0 12px;margin:0 0 21px;background:linear-gradient(180deg,#0b1521f5 0%,#0b1521ed 86%,#0b152100);border:0;border-radius:0;box-shadow:none;backdrop-filter:blur(10px)}
.round-actions button{height:54px;border-radius:5px}
.round-actions .round-action{padding:7px 12px;gap:10px;background:linear-gradient(150deg,#1d3043,#142231);border:1px solid #476078;box-shadow:inset 0 1px #c3e5ff0a;color:#d8e8f5}
.round-action>svg{width:22px;height:22px;color:#81a8c5}.round-action>span:last-child{gap:4px}.round-action b{font-size:13px;font-weight:600;letter-spacing:.1px}.round-action small{font-size:11px;color:#81bce0;line-height:1.2}
.round-actions .upgrade-btn{width:100%;background:linear-gradient(150deg,#242b39,#182030);border-color:#596374;color:#e2e4ed}.upgrade-arrow{color:#bac6e3;font-size:26px}
.round-actions .fight-btn{justify-self:end;width:165px;min-width:0;gap:12px;padding:0 22px;font-size:18px;letter-spacing:.5px;background:linear-gradient(130deg,#80c9ef,#4f94be);color:#0a1a2a;border:1px solid #a7ddfa;box-shadow:0 0 20px #51b4ec16,inset 0 1px #ffffff30}
.round-actions .fight-btn>svg:first-child{width:23px;height:23px;transform:none;stroke-width:2}
.round-actions button:not(:disabled):hover{border-color:#a6d9fb;background:#25435b;box-shadow:0 0 0 1px #4c9cc633}.round-actions .fight-btn:not(:disabled):hover{background:linear-gradient(130deg,#b4e5ff,#6bb4de);box-shadow:0 0 24px #51b4ec40}
.round-actions button:disabled{opacity:1;background:#111d29;border-color:#2e4052;color:#73869a;box-shadow:none}.round-actions button:disabled small,.round-actions button:disabled .upgrade-arrow{color:#6d8194}
.row-heading{margin-bottom:15px;padding:0 2px}.row-heading h2{font:600 13px "Segoe UI",sans-serif;text-transform:uppercase;letter-spacing:1.7px;color:#91a8bc}.row-heading h2 span{font:600 11px "Segoe UI",sans-serif;margin-left:8px;color:#76bee7;border:1px solid #3f6078;background:#132839;padding:3px 7px;border-radius:2px}
.game-table .shop-area{padding:0 58px 25px;background:radial-gradient(ellipse at 50% 40%,#19324c35,transparent 70%)}
.game-table .shop-grid{max-width:840px;gap:23px}
.card,.game-table .card{--tribe:#77b5de;border:1px solid #40576d;background:#132131;border-radius:5px;box-shadow:0 10px 20px #0005;overflow:hidden}
.card[data-tribe="Терраны"],.game-table .card[data-tribe="Терраны"]{--tribe:#74bde6;border-color:#3e667e;background:#122332}
.card[data-tribe="Протоссы"],.game-table .card[data-tribe="Протоссы"]{--tribe:#e3c486;border-color:#766347;background:#25251f}
.card[data-tribe="Зерги"],.game-table .card[data-tribe="Зерги"]{--tribe:#c5cbbb;border-color:#717b6b;background:#3d403a}
/* Quiet neutral foliage; faction names remain a second cue alongside color. */
.card[data-tribe="Зерги"]:not(.golden-card) .card-text{color:#dce3db}
.card[data-tribe="Зерги"]:not(.golden-card) .card-name,.card[data-tribe="Зерги"]:not(.golden-card) .card-keyword,.card[data-tribe="Зерги"]:not(.golden-card) .ability-icons{color:#edf1e9}
.card[data-tribe="Зерги"]:not(.golden-card) .attack-stat{color:#ead2a2}
.card[data-tribe="Зерги"]:not(.golden-card) .health-stat{color:#b8d7c4}
.card[data-tribe="Зерги"]:not(.golden-card) .combat-status > span{color:#dce3db;background:#272e28;border-color:#717b6b}
.game-table .card[data-tribe="Зерги"]:not(.golden-card).merge-ready .card-name{color:#edf1e9}
.game-table .shop-card{overflow:visible;display:flex;flex-direction:column}.game-table .shop-card>div:first-child{display:flex;flex-direction:column;flex:1;border-radius:4px 4px 0 0;overflow:hidden}
.game-table .card-art{height:156px;flex-shrink:0;background:#101924;border-bottom:1px solid #8fa7bb2a;overflow:hidden}
.card-art img{object-fit:cover;object-position:50% 43%;filter:saturate(.9) contrast(1.04)}.card:hover .card-art img{transform:scale(1.045)}
.card-art:after{background:linear-gradient(180deg,#0006,transparent 35%,#07101c15 65%,#07101c80)}
.card-tier{top:8px;left:8px;padding:3px 6px;background:#080e19d9;border-color:#a5c4d94a;color:#d5e7f2;font:600 10px "Segoe UI",sans-serif;border-radius:2px}
.card-tribe{display:block;top:9px;right:7px;background:#080e19bd;color:var(--tribe);font-size:8px;letter-spacing:.4px;padding:3px 5px;border-radius:2px;text-transform:uppercase}
.game-table .card-copy{padding:11px 11px 6px;min-height:105px;border-top:0;flex:1;background:linear-gradient(180deg,#ffffff02,transparent)}
.card-name,.game-table .card-name{font-family:"Segoe UI",sans-serif;font-size:14px;line-height:1.23;min-height:18px;font-weight:600;letter-spacing:.1px;color:#e8edf6;margin-bottom:8px;white-space:normal}
.card-text,.game-table .card-text{font-size:11px;line-height:1.5;color:#a8b8c9;min-height:50px}
.game-table .card-stats{padding:0 10px 9px;font-size:20px;line-height:1;min-height:29px}.attack-stat{color:#e7c085}.health-stat{color:#97cbbd}.ability-icons{color:#92cee8}

.game-table .empty-shop{min-height:306px;background:#101d2822;border-color:#364e6333;border-radius:5px;color:#526e8266}
.copy-counter{background:#18364b;border-color:#5b8da5;color:#bce5ff;border-radius:3px;font-size:10px}.copy-counter.ready{background:#4c3b1d;border-color:#d6b667;color:#ffe2a3}
.table-divider{margin-bottom:19px;color:#90a9bc;font-size:11px;letter-spacing:1.5px;text-transform:uppercase;gap:17px}.table-divider:before,.table-divider:after{background:linear-gradient(90deg,transparent,#4e6c854f)}
.game-table .team-board{gap:13px;min-height:245px;align-items:stretch}
.game-table .team-card{display:flex;flex-direction:column;overflow:visible;border-radius:5px}.game-table .team-card .card-art{width:100%;height:125px;border-radius:4px 4px 0 0}.game-table .team-card .card-copy{width:100%;min-height:112px;padding:9px 8px 5px}.game-table .team-card .card-name{font-size:12px;min-height:17px;line-height:1.25}.game-table .team-card .card-text{font-size:10px;line-height:1.45;min-height:55px}.game-table .team-card .card-stats{width:100%;font-size:18px;padding:0 8px 9px}.game-table .team-card .card-tribe{display:none}
.game-table .team-card.selected{border-color:#93d6fb;box-shadow:0 0 0 2px #6abce644,0 10px 24px #0006}.game-table .empty-slot{min-height:245px;border:1px dashed #3d5e774d;background:#1931480c;border-radius:5px;color:#385367}
.game-table .team-controls{min-height:45px}.game-table .selected-title{color:#a9c6db}.game-table .sell-btn{border-color:#8c654a;background:#4b33202e;color:#dfb18b;font-size:12px}.game-table .team-controls .move-btn{background:#172a3b;border-color:#435d73;color:#b8cee0}
.golden-card,.game-table .golden-card{background:linear-gradient(150deg,#3a3527,#202b33)!important;border-color:#d3b56b!important;box-shadow:0 0 0 1px #cfa85c33,0 8px 25px #0005!important}.golden-label{font-size:8px;background:#3a3020e6;border-color:#a68b53;color:#f3dda8;border-radius:2px}.golden-card .card-name{color:#f3dba3}.golden-card .attack-stat,.golden-card .health-stat{color:#f2d59b}
.sell-zone{background:linear-gradient(145deg,#263d50f5,#142a3ef5);border-color:#85bbd7;color:#c2eaff;border-radius:6px;box-shadow:0 0 0 1px #619ec24d,0 10px 30px #0008}.sell-zone small{color:#8eb6cf}.sell-zone.is-over{background:linear-gradient(145deg,#385d6bf5,#234253f5);border-color:#b5e8f3;color:#e1f8ff}.sell-zone.is-over small{color:#cdeaf7}
.modal-backdrop{background:#020812dc;backdrop-filter:blur(8px)}
.modal{background:radial-gradient(ellipse at 50% 0,#25425966,transparent 65%),#101c29;border-color:#4a647a;border-radius:8px;box-shadow:0 25px 90px #000b;color:#d6e7f1}.modal h2{font-family:"Segoe UI",sans-serif;font-weight:600;color:#e2edf4;font-size:27px}.modal p,.modal ul{color:#a3b8cb}.modal .eyebrow{color:#7ebce2}.modal-close{color:#9cb9d0}.modal .primary{background:linear-gradient(125deg,#8dcdec,#5a9ac0);color:#112232;border-color:#a4daf6;border-radius:4px;font-size:15px}.secondary-wide{background:#142838;border-color:#39566e;color:#a8c5d9}
.game-menu{width:390px}.menu-progress{border-color:#3a5268}.menu-progress strong{color:#d5e7f4}.menu-progress span,.menu-progress strong small{color:#7f9cb5}.menu-links button{color:#adc7dc;border-color:#324a613b;font-size:13px;min-height:43px}.menu-links button:hover{color:#a6dcff;background:#1b3446}.menu-links button span,.menu-links button svg{color:#759bb7}.menu-foot{color:#628199}.menu-resume{min-height:50px}
.collection-modal{width:1060px}.collection-filters button{background:#162c3e;color:#a9c8de;border-color:#34556f;border-radius:3px;font-size:12px}.collection-filters button.active{background:#28516d;border-color:#8cc7eb;color:#d3efff}.collection-grid .card-art{height:153px}.collection-grid .card-copy{min-height:115px}.collection-grid .card-text{min-height:55px}.collection-price{background:#101d2a;border-color:#3a5267;color:#92b9d3;font-size:12px}
/* Effect filters combine with the existing race and tier choices. */
.collection-filters:has(+.collection-effect-filters){margin-bottom:12px}
.collection-effect-filters{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:0 0 12px;padding:10px;border:1px solid #33536c;border-radius:5px;background:#10233466}
.collection-effect-filters button{min-height:32px;padding:6px 10px;border:1px solid #3b5d77;border-radius:4px;background:#162c3e;color:#a9c8de;font-size:11px;line-height:1.2;white-space:nowrap}
.collection-effect-filters button:hover:not([aria-pressed="true"]){background:#213e54;border-color:#6c9ab8;color:#d1eafa}
.collection-effect-filters button.active,.collection-effect-filters button[aria-pressed="true"]{background:#28516d;border-color:#8cc7eb;color:#e3f4ff;box-shadow:inset 0 0 0 1px #8cc7eb33}
.collection-count{margin:0 0 12px;color:#8fadc3;font-size:11px;line-height:1.4;font-variant-numeric:tabular-nums}
.collection-empty{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:130px;padding:25px 20px;border:1px dashed #46657b;border-radius:6px;background:#12253666;color:#a3bbce;font-size:13px;line-height:1.6;text-align:center}
@media(max-width:600px){.collection-effect-filters{gap:6px;padding:8px;margin-bottom:10px}.collection-effect-filters button{min-height:32px;padding:6px 8px;font-size:10px}.collection-count{font-size:10px;margin-bottom:10px}.collection-empty{min-height:120px;padding:22px 14px;font-size:12px}}
.battle-layer{background:radial-gradient(ellipse at 50% 45%,#223d5666,transparent 65%),#080f19f8}.battle-view{max-width:1180px}.battle-top h2{font-family:"Segoe UI",sans-serif;font-weight:600;color:#d8e7f2}.battle-top .eyebrow{color:#759ebc}.speed-controls button{border-color:#425f78;background:#142b3f;color:#a7cae2}.speed-controls button.active{background:#335c78;color:#d5efff;border-color:#8fbedb}.battle-side-label{color:#9cb5ca;letter-spacing:.6px}.battle-team .card{border-radius:4px}.battle-team .card-art{height:120px}.battle-team .card-name{font-size:12px}.battle-team .card-copy{min-height:45px;padding:8px 7px}.battle-team .card-text{display:none}.battle-team .card-stats{font-size:21px;padding:3px 9px 10px}.battle-event{color:#c5d9e7}.battle-divider{color:#7db9da}.battle-progress{background:#263f53}.battle-progress span{background:#7abddd}.battle-team-empty{color:#7195af}
.result-modal.victory{border-color:#82b9cb;background:radial-gradient(ellipse at 50% 8%,#315d6e66,transparent 65%),linear-gradient(160deg,#162d3d,#0e1c2b)}.result-modal.victory h2{color:#ccecff;text-shadow:0 0 30px #71c0e32a;font-size:44px;letter-spacing:.2px}.result-modal.champion h2{font-size:35px}.result-modal.victory .result-seal{background:radial-gradient(circle,#9ee2ff,#3c87a7);border-color:#c3efff;box-shadow:0 0 45px #68b6d42a,0 0 0 8px #81b7ce12}.result-seal{border-color:#4e7b98;background:#22465b33}.result-seal svg,.result-modal.victory .result-seal svg{color:#17384a}.result-modal.loss .result-seal svg{color:#da9c97}
.result-next{background:#142a3a;border-color:#4c7c99;border-radius:6px}.result-next .primary{background:linear-gradient(130deg,#9edcff,#5da6cf);border-color:#bdeaff;color:#112b3c;font-size:20px}.result-next small{color:#94bdd5}.victory-reward{color:#c2dfed;border-color:#5f94ac66;background:#62a2c017}.victory-reward span{color:#98daf9}.result-progress .win-gem{border-color:#62869a;background:#253f51}.result-progress .win-gem.earned{background:#8acbe9;border-color:#c8efff;box-shadow:0 0 12px #8bd5f32a}.result-stats{border-color:#3e6075}.result-stats strong{color:#c5e0ef}.result-stats small{color:#7296b0}.log-panel{color:#98b7cd}.history-item{background:#112535;border-color:#33546b}.history-item b{color:#c2ddeb}
.reward-modal{border-color:#8c815c;background:radial-gradient(ellipse at 50% 0,#77613b42,transparent 60%),#111e2c}.fusion-intro strong{color:#ead19b}.reward-choose{color:#142a3a;background:#8cc5e5;font-size:12px}.reward-note{color:#829eb3!important}.reward-heading span{color:#cab782}
#toast{bottom:155px;background:#1a3549;border-color:#618eac;color:#d0e9f9;border-radius:5px;box-shadow:0 12px 32px #0009}
@media(min-width:901px) and (max-height:780px){
  .game-table{max-width:1100px}.table-hud{min-height:62px}.round-actions{margin-bottom:15px;padding-top:4px;padding-bottom:10px}.round-actions button{height:50px}
  .game-table .card-art{height:126px}.game-table .card-copy{min-height:96px}.game-table .card-text{font-size:11px;min-height:49px}.game-table .shop-area{padding-bottom:22px}.game-table .team-card .card-art{height:105px}.game-table .team-card .card-copy{min-height:107px}.game-table .team-board,.game-table .empty-slot{min-height:238px}.game-table .empty-shop{min-height:285px}
}
@media(max-width:900px){
  .game-table{padding-left:22px;padding-right:22px}.table-hud{min-height:70px}.round-actions{grid-template-columns:130px 154px 1fr}.round-actions .fight-btn{width:150px}.game-table .shop-area{padding-left:25px;padding-right:25px}.game-table .shop-grid{gap:16px}.game-table .card-art{height:145px}.game-table .team-board{gap:9px}.game-table .team-card .card-art{height:100px}.game-table .team-card .card-copy{min-height:130px}.game-table .team-card .card-name{font-size:12px}.game-table .team-card .card-text{font-size:10px}
}
@media(max-width:600px){
  .game-table{padding-left:12px;padding-right:12px;overflow:clip}.table-hud{min-height:66px;grid-template-columns:1fr auto auto;gap:13px;padding:10px 0;margin:0}.round-hearts{flex-direction:column;gap:8px}.round-tag{font-size:11px;letter-spacing:.6px}.hull-pip{width:13px;height:5px}.table-gold{font-size:22px}.table-gold .mineral{font-size:22px;margin-right:5px}.table-actions .menu-button{width:38px;height:38px}
  .round-actions{top:6px;grid-template-columns:1fr 1.2fr 1fr;gap:8px;padding:6px 0 10px;margin-bottom:15px;background:linear-gradient(180deg,#0b1521fa,#0b1521ec 88%,#0b152100)}
  .round-actions .round-action{height:50px;padding:6px;gap:6px;text-align:center}.round-action b{font-size:12px}.round-action small{font-size:10px}.round-action>svg,.upgrade-arrow{display:none}.round-action>span:last-child{align-items:center;gap:4px}
  .round-actions .fight-btn{grid-column:auto;width:100%;height:50px;padding:0 8px;gap:7px;font-size:16px}.round-actions .fight-btn>svg:first-child{width:18px;height:18px}
  .row-heading{margin-bottom:13px}.row-heading h2{font-size:11px;letter-spacing:1.4px}.row-heading h2 span{font-size:10px}
  .game-table .shop-area{padding:0 0 22px}.game-table .shop-grid{padding:0 7px;gap:13px 12px}.game-table .card-art{height:142px}.game-table .card-copy{padding:10px 9px 5px;min-height:112px}.game-table .card-name{font-size:13px}.game-table .card-text{font-size:11px;line-height:1.45;min-height:57px}.game-table .card-stats{font-size:19px;padding:0 8px 8px}.game-table .empty-shop{min-height:300px}
  .card-tribe{font-size:7px;top:9px;right:5px}.card-tier{top:7px;left:6px;padding:3px 5px;font-size:9px}
  .table-divider{font-size:10px;margin-bottom:17px;gap:12px}.game-table .team-board{gap:13px 8px;min-height:0}.game-table .team-card .card-art{height:99px}.game-table .team-card .card-copy{padding:8px 6px 5px;min-height:137px}.game-table .team-card .card-name{font-size:11px;line-height:1.25;min-height:28px;margin-bottom:7px}.game-table .team-card .card-text{font-size:10px;line-height:1.4;min-height:58px}.game-table .team-card .card-stats{font-size:17px;padding:0 6px 8px}.game-table .empty-slot{min-height:265px}
  .game-menu{padding:25px}.game-menu h2{font-size:26px}.collection-grid .card-art{height:139px}.collection-grid .card-name{font-size:13px}.collection-grid .card-copy{min-height:132px}.collection-modal{padding:24px 16px}.collection-modal h2{font-size:23px}.collection-filters button{font-size:10px;padding:7px 8px}
  .battle-team .card-art{height:85px}.battle-team .card-copy{min-height:38px;padding:6px}.battle-team .card-name{font-size:10px;line-height:1.2;white-space:normal;margin:0}.battle-team .card-stats{font-size:17px;padding:2px 6px 7px}.battle-top h2{font-size:20px}.speed-controls button{padding:7px;font-size:11px}
  .result-modal.victory h2{font-size:36px}.result-modal.champion h2{font-size:29px}.result-next .primary{font-size:18px}.reward-choose{font-size:10px}.reward-card .card-art{height:106px}.reward-card .card-name{font-size:11px}.reward-card .card-copy{min-height:134px}.reward-card .card-text{font-size:10px}
}
@media(prefers-reduced-motion:reduce){.card-art img{transition:none}.round-actions button{transition:none}}

/* Evolution stays visible while its free reward is being chosen. */


.modal-backdrop:has(.reward-modal){align-items:flex-start;padding-top:20px;padding-bottom:150px}
.reward-modal{width:min(820px,100%);max-height:calc(100svh - 170px);padding:24px 30px;overflow:auto}
.fusion-intro h2{font-size:25px;margin:6px 0 14px}.fusion-intro .eyebrow{font-size:10px;letter-spacing:2px}
.fusion-upgrade{display:flex;align-items:center;justify-content:center;gap:24px;padding:8px 0 16px;border-bottom:1px solid #a38a5138}
.fusion-originals{display:flex;padding-left:18px;flex-shrink:0}
.fusion-copy{position:relative;width:69px;height:99px;margin-left:-18px;border:1px solid #67798e;border-radius:4px;background:#152334;box-shadow:0 4px 15px #0006;transform:rotate(calc((var(--copy) - 1)*7deg));animation:fusionGather .65s ease both;animation-delay:calc(var(--copy)*.06s);overflow:hidden}
.fusion-copy img{width:100%;height:100%;object-fit:cover;object-position:center}.fusion-copy span{position:absolute;bottom:0;left:0;right:0;background:#07111be8;color:#d2dfeb;padding:5px 0;text-align:center;font-size:11px;font-weight:600}
.fusion-arrow{color:#c8a96f;flex-shrink:0}.fusion-arrow svg{width:27px;height:27px}
.fusion-elite{width:132px;flex-shrink:0;animation:fusionElite .65s ease both;animation-delay:.15s;text-align:center}
.fusion-elite .card-art{height:84px}.fusion-elite .card-tribe,.fusion-elite .golden-label,.fusion-elite .card-text{display:none}.fusion-elite .card-copy{min-height:0;padding:8px 5px 5px}.fusion-elite .card-name{font-size:12px;min-height:0;margin:0}.fusion-elite .card-stats{font-size:22px;padding:2px 9px 9px}.fusion-elite .stat svg{width:15px;height:15px}
.fusion-gain{display:flex;flex-direction:column;gap:5px;color:#d8bf86;font-size:12px}.fusion-gain strong{font-size:32px;font-weight:500;line-height:1}.fusion-gain small{color:#93a7b9;font-size:11px}
.reward-heading{margin:18px 0 12px}.reward-heading h3{font:600 19px "Segoe UI",sans-serif}.reward-heading span{font-size:11px}
.reward-card .card-art{height:112px}.reward-card .card-copy{min-height:105px}.reward-card .card-text{line-height:1.45}
@keyframes fusionGather{from{opacity:0;translate:-16px 0}to{opacity:1;translate:0 0}}
@keyframes fusionElite{from{opacity:0;transform:scale(.88);filter:brightness(1.7)}to{opacity:1;transform:scale(1);filter:brightness(1)}}
@media(max-width:600px){
  .modal-backdrop:has(.reward-modal){padding:12px 10px 145px}.reward-modal{max-height:calc(100svh - 157px);padding:18px 12px}.fusion-intro h2{font-size:20px;margin-bottom:10px}.fusion-intro .eyebrow{font-size:9px}
  .fusion-upgrade{gap:15px;padding-bottom:12px}.fusion-copy{width:48px;height:72px;margin-left:-15px}.fusion-originals{padding-left:15px}.fusion-copy span{font-size:10px;padding:3px 0}.fusion-arrow svg{width:22px;height:22px}.fusion-elite{width:104px}.fusion-elite .card-art{height:63px}.fusion-elite .card-name{font-size:11px}.fusion-elite .card-stats{font-size:19px;padding:3px 7px 7px}.fusion-gain{display:none}.reward-heading{margin:13px 0 10px}.reward-heading h3{font-size:17px}.reward-heading span{font-size:10px}
  .reward-card .card-art{height:85px}.reward-card .card-copy{min-height:140px;padding:8px 5px}.reward-card .card-text{font-size:10px}.reward-card .card-name{font-size:11px}.reward-note{margin-bottom:0}
}
@media(prefers-reduced-motion:reduce){.fusion-copy,.fusion-elite{animation:none}}
.reward-modal{padding:18px 24px}.fusion-summary{display:flex;align-items:center;gap:20px;padding-bottom:12px;border-bottom:1px solid #a38a5138}.fusion-intro{flex:0 0 190px;text-align:left}.fusion-intro h2{font-size:22px;margin:6px 0}.fusion-intro p{font-size:12px;margin:7px 0 0;color:#c8b58c}.fusion-upgrade{flex:1;border:0;padding:0;gap:20px}.fusion-gain{display:none}.fusion-copy{width:61px;height:88px}.fusion-elite{width:113px}.fusion-elite .card-art{height:60px}.fusion-elite .card-copy{padding:6px 4px}.fusion-elite .card-stats{font-size:20px;padding:0 8px 7px}.reward-card .card-copy{min-height:78px}.reward-choose{padding:10px}.reward-note{margin:12px 0 0!important}
@media(max-width:600px){.reward-modal{padding:15px 12px}.fusion-summary{display:block;padding-bottom:10px}.fusion-intro{text-align:center}.fusion-intro h2{font-size:19px;margin:4px 0 8px}.fusion-intro p{display:none}.fusion-upgrade{gap:16px}.fusion-copy{width:48px;height:72px}.fusion-elite{width:98px}.fusion-elite .card-art{height:47px}.fusion-elite .card-name{font-size:10px}.fusion-elite .card-stats{font-size:18px}.reward-card .card-copy{min-height:140px}.reward-choose{padding:9px 2px}}
.speed-controls{flex-wrap:wrap;justify-content:flex-end}.speed-controls button{min-width:38px}
@media(max-width:600px){.battle-top{gap:12px}.speed-controls{gap:5px}.speed-controls button{padding:8px 7px;min-width:34px}.speed-controls [data-action="skip-battle"]{min-width:86px}}

/* The base is a second owned zone; opening it replaces the market, never the field. */
.row-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:24px}
.stash-close{padding:6px 10px;background:#192f41;border:1px solid #45677f;color:#bad9ed;font-size:11px}
.stash-panel{padding:12px;border:1px solid #496d87;border-radius:8px;background:linear-gradient(145deg,#182e40,#101d2d);box-shadow:inset 0 1px #bde7ff15}
.stash-caption{font-size:10px;color:#8aa9c0;padding:0 2px 10px;letter-spacing:.3px}
.stash-scroll{max-height:323px;overflow:auto;overscroll-behavior:contain;scrollbar-color:#547b97 #142333;padding:4px 5px 12px}
.stash-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:15px 12px;align-items:stretch;min-height:255px}
.game-table .stash-card{display:flex;flex-direction:column;text-align:left;overflow:visible;min-width:0}
.game-table .stash-card .card-art{height:100px;width:100%;border-radius:4px 4px 0 0}
.game-table .stash-card .card-copy{min-height:110px;width:100%;padding:9px 8px 4px}
.game-table .stash-card .card-name{font-size:12px;min-height:28px}
.game-table .stash-card .card-text{font-size:10px;min-height:55px}
.game-table .stash-card .card-stats{font-size:18px;width:100%;padding:3px 8px 9px}
.game-table .stash-card .card-tribe{display:none}
.game-table .stash-card.selected{outline:2px solid #97d9ff;outline-offset:2px}
.empty-stash-slot{display:grid;place-items:center;min-height:255px;border:1px dashed #42617975;border-radius:5px;background:#0b1a2844;color:#45647c;font-size:24px}
.store-btn{height:30px;background:#23475c;border:1px solid #75a8c5;color:#d9f0ff;padding:0 12px;font-size:12px}
.game-table .stash-controls{justify-content:flex-start;flex-wrap:wrap;gap:7px;min-height:36px;margin:0 2px 9px;padding:0}.stash-controls .selected-title{font-size:11px;margin-right:auto}
.base-dock{position:sticky;bottom:max(18px,env(safe-area-inset-bottom));z-index:8;display:flex;align-items:center;justify-content:center;gap:15px;width:216px;min-height:64px;margin:26px auto 0;padding:10px 19px;color:#cdeaff;background:linear-gradient(160deg,#254a62,#142c40);border:1px solid #6e9bb9;border-radius:9px;box-shadow:0 8px 28px #0008,inset 0 1px #ccedff22}
.base-dock:hover,.base-dock[aria-expanded="true"]{border-color:#c2e9ff;background:linear-gradient(160deg,#315d79,#203e57)}
.base-dock>span:not(.base-peek){position:relative;z-index:2}.base-dock>span:nth-last-child(2){display:flex;align-items:center;gap:14px}.base-dock b{font-size:15px;font-weight:600;letter-spacing:.7px}.base-dock small{font-size:11px;color:#9fc3de}.base-symbol{font-size:25px;line-height:1;color:#7dbce6}.base-chevron{font-size:20px;color:#9bbdd5}
.base-peek{position:absolute;left:26px;right:26px;top:-23px;height:28px;overflow:hidden;pointer-events:none;z-index:-1}
.base-peek img{position:absolute;left:calc(12px + var(--peek)*27px);top:5px;width:44px;height:62px;object-fit:cover;object-position:center 25%;border:1px solid #7598b1;border-radius:4px;transform:rotate(calc((var(--peek) - 1.5)*7deg));background:#172635}

.stash-open .shop-area{padding:0 18px 25px}.stash-open .sell-zone{position:absolute;inset:auto 18px auto;top:-39px;height:32px;min-height:32px;border-radius:4px;padding:4px 12px;z-index:10;flex-direction:row;gap:15px;font-size:12px}.stash-open .sell-zone strong{font-size:12px}.stash-open .sell-zone small{font-size:10px}
.card-dragging-team .stash-open .row-heading{visibility:hidden}
.reward-free-space{margin-top:15px;padding:12px;border:1px solid #7b6842;border-radius:5px;text-align:left;color:#dac99e;font-size:12px}.reward-free-space summary{cursor:pointer}.reward-free-space>div{display:flex;flex-wrap:wrap;gap:7px}.reward-free-space button{padding:8px;background:#273846;border:1px solid #5a7185;font-size:11px;color:#d0deeb}.reward-free-space button b{color:#eed29a;margin-left:4px}

/* Shared-copy highlights have two clear levels, even when the base is closed. */
.game-table .shop-card.copy-match{border-color:#91ccea;box-shadow:0 0 0 1px #86d0f15c,0 0 22px #59bdfc38,0 10px 20px #0005}
.game-table .shop-card.copy-match .card-name{color:#d4f1ff}
.game-table .shop-card.merge-ready{border-color:#ffe3a0!important;box-shadow:0 0 0 2px #eebd5b88,0 0 18px #ffce6b6b,0 0 42px #e5a33b3d,0 10px 22px #0006!important;animation:mergeBeacon 1.8s ease-in-out infinite}
.game-table .shop-card.merge-ready .card-name{color:#ffe3a5}
.copy-counter.ready,.copy-counter{z-index:5}
@keyframes mergeBeacon{0%,100%{filter:brightness(1)}50%{filter:brightness(1.16)}}
.fusion-originals{position:relative;isolation:isolate}.fusion-copy{animation:fusionConverge 1.05s cubic-bezier(.22,.7,.3,1) both;animation-delay:calc(var(--copy)*.07s)}
.fusion-elite{animation:fusionIgnite 1.25s ease-out both;animation-delay:.28s}
.fusion-arrow{animation:fusionArrow 1.2s ease both}
@keyframes fusionConverge{0%{opacity:0;translate:calc((var(--copy) - 1)*-30px) 15px;filter:brightness(1)}22%{opacity:1;translate:0 0}65%{opacity:.12;translate:calc(95px - var(--copy)*20px) -3px;scale:.48;filter:brightness(2.4)}100%{opacity:.5;translate:0 0;scale:1;filter:brightness(1)}}
@keyframes fusionIgnite{0%,24%{opacity:.25;scale:.76;filter:brightness(1)}42%{opacity:1;scale:1.14;filter:brightness(2.1)}64%{scale:.98;filter:brightness(1.15)}100%{opacity:1;scale:1;filter:brightness(1)}}
@keyframes fusionArrow{0%,25%{opacity:0;transform:translateX(-15px)}60%{opacity:1;transform:translateX(0);filter:brightness(2)}100%{opacity:1;filter:brightness(1)}}

/* Paused combat remains inspectable; card descriptions never change into shorthand. */
.battle-layer{padding:20px 24px 150px}.battle-view{margin:auto}.battle-top{position:sticky;top:-20px;z-index:12;background:linear-gradient(180deg,#0c1928 85%,#0c1928ed);padding:14px 0 16px;margin-bottom:14px}
.battle-team{align-items:stretch}.battle-team .card{display:flex;flex-direction:column;max-width:15.7%;width:162px;overflow:visible}.battle-team .card-art{height:99px;border-radius:3px 3px 0 0;overflow:hidden;flex-shrink:0}.battle-team .card-copy{padding:8px;flex:1;min-height:115px}.battle-team .card-name{margin-bottom:7px;font-size:12px;line-height:1.25;white-space:normal}.battle-team .card-text{display:block;min-height:0;font-size:10px;line-height:1.45;color:#b3c8d8;overflow:visible}.battle-team .card-stats{padding:3px 8px 9px;font-size:20px}.battle-team .card-tribe{font-size:7px}.battle-divider{height:52px}
.combat-status{display:flex;flex-wrap:wrap;gap:4px;margin-top:7px;min-height:15px;line-height:1.3}.combat-status span{font-size:8px;color:#a6bacb;background:#34536a3b;border:1px solid #49637c66;padding:2px 4px;border-radius:3px}.combat-status .status-shield{color:#b5e6ff;border-color:#6babd477;background:#3c80aa30}.combat-status .status-buffed{color:#b6e3bc;border-color:#729d7677}.combat-status .status-spent{color:#8297a9}
/* A separate shield rim preserves selection, elite quality, and combat highlights. */
.card.shielded::before{content:"";position:absolute;inset:1px;z-index:4;border:2px solid #a5eaff;border-radius:inherit;box-shadow:0 0 8px #65ccffc7,0 0 20px #4dbbff66,inset 0 0 12px #68ceff80;pointer-events:none}
.speed-controls .battle-pause-btn{min-width:104px;padding:10px 13px;font-size:12px;color:#e3f4ff;background:#315773;border-color:#7fbedf}
.speed-controls .battle-pause-btn:hover,.speed-controls .battle-pause-btn:focus-visible{color:#f1faff;background:#3d6989;border-color:#b2dfff}
.speed-controls .battle-pause-btn[aria-pressed="true"],.speed-controls .battle-pause-btn[aria-pressed="true"]:hover,.speed-controls .battle-pause-btn[aria-pressed="true"]:focus-visible{color:#102b3e;background:#b3ddf4;border-color:#e1f4ff}
.battle-inspection{display:none;font-size:12px;text-align:center;color:#b8dbef;padding:9px 12px;background:#29476066;border:1px solid #739cb84d;border-radius:4px;margin:0 0 12px}
.battle-paused .battle-inspection{display:block}.battle-paused *{animation-play-state:paused!important}.battle-paused .battle-team .card{transition:none;transform:none!important;opacity:1!important;filter:none!important}.battle-paused .battle-fx-overlay{visibility:hidden}.battle-team .card:focus-visible{outline:2px solid #b8e8ff;outline-offset:3px}.battle-team .card:hover{border-color:#a4c8e1}
@media(max-width:900px){.stash-board{grid-template-columns:repeat(4,minmax(0,1fr))}.stash-scroll{max-height:315px}.battle-team{gap:8px}.battle-team .card-copy{padding:7px 5px}.battle-team .card-name{font-size:11px}.battle-team .card-text{font-size:10px}.battle-team .card-art{height:80px}}
@media(max-width:600px){
  .base-dock{width:192px;min-height:58px;margin-top:24px;bottom:16px}.base-dock b{font-size:14px}.base-dock small{font-size:10px}
  .stash-open .shop-area{padding:0 0 20px}.stash-panel{padding:8px 6px}.stash-caption{font-size:9px;padding-bottom:9px}.stash-scroll{max-height:324px;padding:4px 4px 11px}.stash-board{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px 8px}.game-table .stash-card .card-art{height:86px}.game-table .stash-card .card-copy{padding:8px 5px 4px;min-height:142px}.game-table .stash-card .card-name{font-size:11px}.game-table .stash-card .card-text{font-size:10px;line-height:1.4}.game-table .stash-card .card-stats{font-size:17px;padding:2px 5px 8px}.empty-stash-slot{min-height:265px}.store-btn{font-size:11px;padding:0 8px}.stash-open .sell-zone{left:0;right:0;top:-38px}.stash-open .sell-zone small{display:none}
  .battle-layer{padding:10px 10px 150px}.battle-top{top:-10px;align-items:flex-start;padding:10px 0 12px}.battle-top>div:first-child{min-width:69px}.speed-controls{max-width:232px}.speed-controls .battle-pause-btn{min-width:112px;padding:9px 10px;font-size:12px}.battle-team{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 8px}.battle-team .card{width:100%;max-width:100%}.battle-team .card-art{height:83px}.battle-team .card-copy{padding:7px 5px;min-height:124px}.battle-team .card-name{font-size:11px;line-height:1.25;white-space:normal;min-height:27px;margin:0 0 6px}.battle-team .card-text{display:block;font-size:10px;line-height:1.45;min-height:0}.battle-team .card-stats{font-size:18px;padding:2px 6px 8px}.combat-status{gap:3px}.combat-status span{font-size:8px}.battle-inspection{font-size:11px}.battle-event{height:auto;min-height:58px}.battle-divider{height:43px}
}
@media(prefers-reduced-motion:reduce){.game-table .shop-card.merge-ready,.fusion-copy,.fusion-elite,.fusion-arrow{animation:none}.game-table .shop-card.merge-ready{filter:none}}

/* Five offers, a single price, and clearly separated round actions. */
html{scroll-padding-bottom:136px}
.game-table{padding-bottom:144px}
.game-table .round-actions{position:relative;top:auto;display:grid;grid-template-columns:repeat(3,minmax(0,220px));justify-content:space-between;align-items:stretch;gap:18px;padding:4px 0;margin:0 0 23px;background:none;border:0;box-shadow:none;backdrop-filter:none}
.round-actions .round-action{width:100%;min-height:68px;height:auto;padding:11px 18px;justify-content:center;border-radius:7px;gap:13px;box-shadow:0 5px 15px #0003,inset 0 1px #d5edff12}
.round-actions .round-action b{font-size:15px}.round-actions .round-action small{font-size:12px}.round-actions .round-action>svg{height:25px;width:25px;flex-shrink:0}.round-actions .upgrade-btn{width:100%}
.round-actions .lock-btn.is-locked{border-color:#a4d7ee;background:linear-gradient(150deg,#234b60,#163548);box-shadow:0 0 0 1px #8fd3f02b,0 5px 15px #0003;color:#dbf4ff}.round-actions .lock-btn.is-locked>svg{color:#bdeaff}
/* Shop locks cover only the artwork, leaving descriptions and stats readable. */
.shop-lock-indicator{display:none;position:absolute;left:50%;top:50%;z-index:2;transform:translate(-50%,-50%);width:52px;height:52px;place-items:center;border:2px solid #9cddf3;border-radius:12px;background:radial-gradient(circle at 50% 25%,#245d75f2,#112635f5);color:#e4f7ff;box-shadow:0 0 0 4px #07131c66,0 0 22px #72c9ed66,0 5px 16px #0009;pointer-events:none}
.shop-card.is-locked .shop-lock-indicator{display:grid}
.shop-lock-indicator svg{width:30px;height:30px;stroke-width:2.2;filter:drop-shadow(0 0 4px #9adfff77);pointer-events:none}
.shop-price{font-size:11px;color:#7591a7;letter-spacing:.2px;white-space:nowrap}
.game-table .shop-area{padding:0 14px 25px}.game-table .shop-grid{max-width:1060px;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;padding:0}
.game-table .shop-card>div:first-child{border-radius:4px}.game-table .shop-card .card-copy{min-height:112px}.game-table .shop-card .card-stats{padding-bottom:12px}.game-table .empty-shop{min-height:300px}
.game-table .shop-card{outline:none;transition:border-color .15s,box-shadow .15s}.game-table .shop-card:focus-visible{outline:2px solid #b9e8ff;outline-offset:4px}
.game-table .shop-card.keyboard-picked{opacity:.62;outline:2px dashed #b1deff;outline-offset:5px}.keyboard-drop-target{outline:1px dashed #88bce033;outline-offset:5px}.keyboard-drop-target:focus-visible{outline:2px solid #b1e4ff;outline-offset:5px}
.command-dock{position:fixed;inset:auto 0 0;z-index:10;display:grid;grid-template-columns:minmax(0,1fr) 276px minmax(0,1fr);align-items:center;column-gap:30px;width:100%;max-width:none;min-height:104px;margin:0;padding:16px 24px;background:#0d1c2a;border-top:1px solid #375570;box-shadow:0 -9px 28px #050b1466}
.command-dock .base-dock{position:relative;bottom:auto;grid-column:1;justify-self:end;min-height:64px;width:216px;margin:0;pointer-events:auto}
.command-dock .fight-btn{grid-column:2;display:flex;align-items:center;justify-content:center;width:276px;max-width:100%;min-height:72px;height:72px;gap:15px;padding:0 28px;font-size:24px;font-weight:650;letter-spacing:.5px;border-radius:9px;color:#0b2437;background:linear-gradient(130deg,#b9e8ff,#6eb5df);border:1px solid #d8f3ff;box-shadow:0 8px 28px #0008,0 0 24px #71c6f32b,inset 0 1px #fff8;pointer-events:auto}
.command-dock .fight-btn>svg{width:29px;height:29px;stroke-width:2;transform:none}.command-dock .fight-btn:hover,.command-dock .fight-btn:focus-visible{color:#061b2d;background:linear-gradient(130deg,#dcf4ff,#91cff0);border-color:#effbff;box-shadow:0 8px 28px #0008,0 0 30px #71c6f34d}
.stash-open .row-heading{min-height:74px;margin-bottom:15px}.stash-open .sell-zone{top:-89px;height:64px;min-height:64px;padding:12px 18px;gap:18px}.stash-open .sell-zone strong{font-size:17px}.stash-open .sell-zone small{font-size:11px}
@media(min-width:601px) and (max-width:900px){.game-table .shop-grid{gap:12px}.game-table .shop-area{padding-left:0;padding-right:0}.game-table .shop-card .card-art{height:125px}.game-table .shop-card .card-copy{padding:9px 7px;min-height:139px}.game-table .shop-card .card-name{font-size:12px}.game-table .shop-card .card-text{font-size:10px}.command-dock{grid-template-columns:minmax(0,1fr) 250px minmax(0,1fr);gap:18px;padding-left:14px;padding-right:14px}.command-dock .base-dock{width:100%;max-width:170px;gap:8px;padding:10px}.command-dock .base-symbol{display:none}.command-dock .fight-btn{width:250px}}
@media(max-width:600px){
  .game-table{padding-bottom:134px}.game-table .round-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:20px}.round-actions .round-action,.round-actions .upgrade-btn{width:100%;min-height:90px;padding:9px 4px;gap:6px;flex-direction:column;justify-content:center}.round-actions .round-action b{font-size:clamp(10px,2.9vw,13px);white-space:nowrap}.round-actions .round-action small{font-size:10px}.round-action>span:last-child{align-items:center}.round-action>svg,.upgrade-arrow{display:block}.round-actions .round-action>svg{width:22px;height:22px}.upgrade-arrow{font-size:26px;line-height:22px}
  .shop-lock-indicator{width:44px;height:44px;border-radius:10px}.shop-lock-indicator svg{width:26px;height:26px}
  .row-heading{gap:8px}.shop-price{font-size:10px}.row-heading h2{font-size:10px;letter-spacing:1px}.row-heading h2 span{margin-left:5px;font-size:9px}
  .game-table .shop-area{padding:0 0 22px}.game-table .shop-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px;padding:0 3px}.game-table .shop-card .card-art{height:112px}.game-table .shop-card .card-copy{padding:8px 6px 4px;min-height:135px}.game-table .shop-card .card-name{font-size:11px;line-height:1.25;min-height:27px}.game-table .shop-card .card-text{font-size:10px;line-height:1.45;min-height:0}.game-table .shop-card .card-stats{font-size:18px;padding:4px 6px 10px}.game-table .shop-card .card-tribe{display:none}.game-table .empty-shop{min-height:277px}.copy-counter{font-size:8px;padding:4px;white-space:nowrap}
  .command-dock{grid-template-columns:minmax(124px,.8fr) minmax(156px,1.2fr);gap:12px;min-height:98px;padding:16px 12px calc(16px + env(safe-area-inset-bottom));margin:0}.command-dock .base-dock{width:100%;min-height:62px;padding:10px 12px;gap:10px}.command-dock .base-dock>span:nth-last-child(2){gap:9px}.command-dock .base-symbol{display:none}.command-dock .fight-btn{min-height:66px;height:66px;width:100%;font-size:22px;padding:0 16px}.command-dock .fight-btn>svg{width:26px;height:26px}.command-dock .base-peek{left:4px;right:4px}.stash-open .sell-zone{top:-89px;height:64px;min-height:64px}.stash-open .sell-zone strong{font-size:16px}
}

body:has(.modal-backdrop){overflow:hidden}
.modal-backdrop:has(.collection-modal){overflow:hidden}

/* The hand is a compact row of artwork seated in fixed bottom slots. */
html{scroll-padding-bottom:140px}
.game-table,.game-table.has-hand{height:auto;max-height:none;padding-bottom:140px;overflow:visible}
.recruitment-area{height:auto;max-height:none;overflow:visible;padding:0;overscroll-behavior:auto}
.command-dock.hand-dock{--hand-card-width:80px;--hand-slot-height:100px;position:fixed;inset:auto 0 0;z-index:10;display:grid;grid-template-columns:minmax(0,1fr) 212px;align-items:end;gap:20px;min-height:128px;height:128px;width:100%;margin:0;padding:12px max(18px,calc((100vw - 1180px)/2)) 0;background:linear-gradient(180deg,#142b3b,#0b1827 55%);border-top:1px solid #54768e;box-shadow:0 -5px 22px #02081280}
.hand-panel{position:relative;min-width:0;height:108px;padding:0 5px;border:1px solid #3b607c;border-bottom:0;border-radius:8px 8px 0 0;background:linear-gradient(180deg,#1b354a,#0b1622);box-shadow:inset 0 3px 10px #07121cb3;overflow:hidden}
.hand-heading{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.hand-controls{display:none!important}
.hand-scroll{height:100%;min-width:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-color:#547d99 #102131;scrollbar-width:thin;scroll-padding-inline:10px;touch-action:pan-x}
.hand-board.stash-board{display:flex;grid-template-columns:none;align-items:flex-end;justify-content:center;gap:8px;width:max-content;min-width:100%;height:100%;min-height:0;padding:7px 5px 0;position:relative;outline-offset:-3px}
.hand-slot{position:relative;z-index:1;flex:0 0 var(--hand-card-width);width:var(--hand-card-width);height:var(--hand-slot-height);margin:0;border:1px solid #4b6a81;border-bottom:0;border-radius:6px 6px 0 0;background:#07121c;box-shadow:0 0 0 2px #081522,0 -2px 7px #0007;overflow:hidden}
.hand-slot+.hand-slot{margin-left:0}
.hand-slot:has(.selected),.hand-slot:focus-within{border-color:#b5e7ff;box-shadow:0 0 0 1px #a3dcff80,0 0 12px #66b9e633}
.card.hand-card{display:block;position:relative;width:100%;max-width:none;height:calc(var(--hand-slot-height,100px) + 12px);min-width:0;margin:0;padding:0;border:0;border-radius:5px 5px 0 0;overflow:hidden;text-align:left;transform:none;transition:none;box-shadow:none;touch-action:pan-x;background:#101f2c}
.card.hand-card:hover,.card.hand-card:active,.card.hand-card.selected,.card.hand-card:focus-visible{transform:none;box-shadow:none;outline:none}
.card.hand-card .card-art{width:100%;height:100%;min-height:0;border:0;border-radius:5px 5px 0 0;overflow:hidden;background:#101f2c}
.card.hand-card .card-art img,.card.hand-card:hover .card-art img{width:100%;height:100%;object-fit:cover;object-position:50% 35%;transform:none;transition:none}
.card.hand-card .card-art:after{background:linear-gradient(180deg,transparent 68%,#07111bd9);pointer-events:none}
.card.hand-card .card-copy,.card.hand-card .card-stats,.card.hand-card .card-tier,.card.hand-card .card-tribe,.card.hand-card .golden-label{display:none}
.hand-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;align-self:stretch;min-width:min(360px,calc(100vw - 190px));padding:8px 16px;color:#688aa4;font-size:11px;text-align:center;line-height:1.4;gap:4px}
.hand-empty small{font-size:10px;color:#57778f}
.command-dock.hand-dock .fight-btn{position:relative;inset:auto;grid-column:2;align-self:center;width:212px;min-width:0;max-width:100%;min-height:88px;height:88px;margin:0 0 12px;padding:0 18px;gap:15px;font-size:29px;letter-spacing:.4px;border-radius:9px}
.command-dock.hand-dock .fight-btn>svg{width:30px;height:30px;transform:none}
.command-dock.hand-dock .fight-btn>span{white-space:nowrap}
.hand-panel.is-drag-ready{outline:1px dashed #91cbec;outline-offset:-4px}
.hand-panel.is-drag-over{outline:2px solid #bbecff;outline-offset:-3px;box-shadow:inset 0 0 24px #67c9ff55}
.round-command-bar{position:sticky;top:0;z-index:30;background:#090f18}
.game-table .round-command-bar .round-actions{position:static;top:auto}
.round-command-bar>.sell-zone{position:absolute;inset:0;z-index:25;min-height:0;height:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:7px 16px;border:2px dashed #e0b76f;border-radius:8px;background:linear-gradient(120deg,#483923,#273c4c);color:#ffe2a8;box-shadow:0 0 0 3px #091624,0 8px 24px #0007;transform:translateY(-5px)}
.round-command-bar>.sell-zone strong{font-size:23px;line-height:1.15;white-space:nowrap}.round-command-bar>.sell-zone small{font-size:12px;line-height:1.25;color:#d1c8ae}
.card-dragging-team .round-command-bar>.sell-zone{transform:none}
.round-command-bar>.sell-zone.is-over{border-style:solid;border-color:#ffedbd;background:linear-gradient(120deg,#76552a,#355463);box-shadow:0 0 0 3px #ffe1a54d,0 0 30px #efc67855}
@media(min-width:601px) and (max-width:900px){
  .command-dock.hand-dock{--hand-card-width:70px;grid-template-columns:minmax(0,1fr) 166px;gap:14px;padding-right:14px;padding-left:14px}
  .command-dock.hand-dock .fight-btn{width:166px;font-size:25px;gap:10px}.command-dock.hand-dock .fight-btn>svg{width:27px;height:27px}
}
@media(max-width:600px){
  html{scroll-padding-bottom:120px}.game-table,.game-table.has-hand{padding-bottom:calc(120px + env(safe-area-inset-bottom))}
  .command-dock.hand-dock{--hand-card-width:58px;--hand-slot-height:82px;grid-template-columns:minmax(0,1fr) 110px;gap:10px;height:calc(108px + env(safe-area-inset-bottom));min-height:108px;padding:9px 9px env(safe-area-inset-bottom)}
  .hand-panel{height:90px;padding:0 3px;border-radius:7px 7px 0 0}.hand-board.stash-board{gap:6px;padding:7px 3px 0}
  .command-dock.hand-dock .fight-btn{width:110px;height:76px;min-height:76px;margin-bottom:8px;padding:0 6px;font-size:20px;gap:6px}.command-dock.hand-dock .fight-btn>svg{width:23px;height:23px}
  .hand-empty{min-width:calc(100vw - 166px);font-size:10px;padding:7px;gap:2px}.hand-empty small{font-size:8px}
  .round-command-bar>.sell-zone{gap:6px;padding:10px}.round-command-bar>.sell-zone strong{font-size:22px}.round-command-bar>.sell-zone small{font-size:11px}
}
/* Keep both rows and the artwork hand in view on standard laptop screens. */
@media(min-width:901px) and (max-height:1050px){
  .game-table,.game-table.has-hand{padding-bottom:138px}
  .table-hud{min-height:48px;height:48px;margin-bottom:0}.table-gold{font-size:23px}.table-actions .menu-button{width:34px;height:34px}
  .game-table .round-actions{padding:0;margin:0 0 12px;gap:16px}.game-table .round-actions .round-action{min-height:54px;height:54px;padding:7px 13px;gap:10px}.round-actions .round-action b{font-size:13px}.round-actions .round-action small{font-size:11px}.round-actions .round-action>svg{width:21px;height:21px}
  .row-heading{min-height:18px;margin-bottom:7px}.row-heading h2{font-size:11px;line-height:18px}.row-heading h2 span{font-size:10px;padding:2px 5px}
  .game-table .shop-area{padding:0 10px 12px}.game-table .shop-grid{gap:14px}
  .game-table .shop-card .card-art{height:62px}.game-table .shop-card .card-copy{min-height:80px;padding:6px 8px 3px}.game-table .shop-card .card-name{font-size:12px;line-height:1.15;min-height:14px;margin-bottom:4px}.game-table .shop-card .card-text{font-size:10px;line-height:1.3;min-height:0}.game-table .shop-card .card-stats{font-size:17px;min-height:26px;padding:2px 8px 7px}.game-table .empty-shop{min-height:170px}
  .table-divider{font-size:10px;line-height:12px;margin-bottom:10px;gap:13px}.game-table .team-board{min-height:0;gap:12px;padding-bottom:4px}
  .game-table .team-card .card-art{height:50px}.game-table .team-card .card-copy{min-height:82px;padding:6px 7px 3px}.game-table .team-card .card-name{font-size:11px;line-height:1.2;min-height:0;margin-bottom:4px}.game-table .team-card .card-text{font-size:10px;line-height:1.3;min-height:0}.game-table .team-card .card-stats{font-size:16px;min-height:25px;padding:2px 7px 6px}.game-table .empty-slot{min-height:159px}
  .game-table .team-controls{min-height:30px;padding:0;gap:6px}.game-table .team-controls .move-btn{width:29px;height:28px;font-size:14px}.game-table .team-controls .sell-btn,.game-table .team-controls .store-btn{height:28px;font-size:11px;padding:0 8px}
}
@media(min-width:901px) and (min-height:801px) and (max-height:1050px){
  .game-table .shop-card .card-art{height:100px}.game-table .empty-shop{min-height:208px}
  .game-table .team-card .card-art{height:80px}.game-table .empty-slot{min-height:189px}
}
@media(min-width:901px) and (max-height:700px){
  html{scroll-padding-bottom:118px}.game-table,.game-table.has-hand{padding-bottom:118px}
  .command-dock.hand-dock{--hand-slot-height:80px;height:108px;min-height:108px;padding-top:9px}.hand-panel{height:88px}.command-dock.hand-dock .fight-btn{height:76px;min-height:76px;font-size:27px;margin-bottom:9px}
  .table-hud{min-height:44px;height:44px}.game-table .round-actions .round-action{min-height:48px;height:48px}.game-table .round-actions{margin-bottom:9px}.game-table .shop-card .card-art{height:50px}.game-table .team-card .card-art{height:42px}.game-table .empty-shop{min-height:158px}.game-table .empty-slot{min-height:151px}
}
@media(prefers-reduced-motion:reduce){.card.hand-card{transition:none}}

/* Tier probabilities share the engine's random-slot distribution. */
.shop-heading{display:flex;align-items:center;gap:24px;margin-bottom:7px}
.shop-heading-title{display:flex;flex-direction:column;gap:5px;flex:0 0 auto}.shop-heading-title .shop-price{font-size:10px}
.shop-odds{flex:1;max-width:660px;min-width:0;padding:5px 10px;background:#122231;border:1px solid #345065;border-radius:5px;font-variant-numeric:tabular-nums}
.shop-odds-heading{display:flex;align-items:center;gap:12px;min-height:14px;font-size:10px;line-height:1.2;color:#99b5c9}
.odds-help,.odds-toggle{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:transparent;color:#b3d3e7;font-size:10px;line-height:1.2;white-space:nowrap}.odds-help svg{width:12px;height:12px}.odds-help:hover,.odds-toggle:hover{color:#ecf7ff}.odds-comparison{margin-left:auto;white-space:nowrap}.odds-toggle{color:#e6c38b}
.shop-odds-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:3px 0}.shop-odds-tier{display:flex;align-items:baseline;justify-content:space-between;gap:5px;border-right:1px solid #3e596e66;padding-right:10px;min-width:0}.shop-odds-tier:last-child{border:0;padding-right:0}.shop-odds-value{display:inline-flex;gap:7px;align-items:baseline;white-space:nowrap}.shop-odds-value i{font-size:10px;font-weight:600;font-style:normal;color:#9fb8cd;min-width:13px}.shop-odds-value b{font-size:13px;color:#e4f2fc;line-height:1.2}.shop-odds-tier small{font-size:9px;white-space:nowrap;color:#8198ac}.shop-odds-tier.up small{color:#a4ddbd}.shop-odds-tier.down small{color:#e9a398}.shop-odds-note{font-size:9px;line-height:1.2;color:#90adbf}
.preparation-strip{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:25px;margin:0 0 7px}.scout-button{display:flex;align-items:center;gap:6px;min-width:0;padding:3px 0;border:0;background:transparent;color:#95b8d0;font-size:10px;text-align:left;line-height:1.25}.scout-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scout-button b{color:#c2dbea;font-weight:600}.scout-button svg{width:13px;height:13px;flex-shrink:0}.scout-button:hover{color:#d7edff}.trade-in-control{display:flex;align-items:center;gap:8px;flex-shrink:0}.trade-in-control button{padding:4px 7px;border:1px solid #587388;border-radius:4px;background:#1b3040;font-size:10px;line-height:1.2;color:#c6ddea;white-space:nowrap}.trade-in-control button[aria-pressed="true"]{border-color:#b7d6a3;color:#d3f0c6;background:#294137}.trade-in-control button:disabled{opacity:.55}.trade-in-control small{font-size:9px;color:#a0b4c2}.scout-note{color:#c9ddb7!important}.scout-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.scout-grid .card-art{height:125px}.scout-grid .card-copy{min-height:105px}.scout-grid .card-text{font-size:10px;line-height:1.4}
@media(min-width:901px) and (max-height:800px){
  .game-table .round-actions{margin-bottom:7px}.shop-heading{margin-bottom:3px}.shop-heading-title{gap:3px}.shop-odds{padding:3px 8px}.shop-odds-heading{min-height:12px}.shop-odds-values{margin:2px 0}.preparation-strip{min-height:22px;margin-bottom:5px}.game-table .shop-area{padding-bottom:7px}.table-divider{margin-bottom:6px}.game-table .team-controls{min-height:24px}.game-table .shop-card .card-art{height:49px}.game-table .team-card .card-art{height:43px}
}
@media(max-width:900px){
  .shop-heading{align-items:flex-start;gap:12px}.shop-heading-title{padding-top:6px}.shop-odds{max-width:none}.shop-odds-heading{gap:6px;flex-wrap:wrap}.odds-comparison{margin-left:0}.shop-odds-values{gap:6px}.shop-odds-tier{flex-direction:column;gap:1px;padding-right:5px}.shop-odds-value{gap:4px}.shop-odds-tier small{font-size:9px}.trade-in-control{gap:5px}.trade-in-control small{max-width:120px}.scout-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:600px){
  .shop-heading{display:block;margin-bottom:6px}.shop-heading-title{flex-direction:row;align-items:center;justify-content:space-between;gap:8px;padding:0 0 6px}.shop-odds{padding:6px 8px}.shop-odds-heading{font-size:9px;gap:5px 8px}.odds-help,.odds-toggle{font-size:9px}.odds-comparison{margin-left:auto}.odds-toggle{margin-left:auto}.shop-odds-values{margin:5px 0}.shop-odds-tier{flex-direction:row;flex-wrap:wrap;column-gap:2px}.shop-odds-value b{font-size:12px}.shop-odds-tier small{font-size:8px}.shop-odds-note{font-size:9px;line-height:1.35}.preparation-strip{align-items:stretch;gap:6px;margin-bottom:9px}.scout-button{flex:1;align-items:center;font-size:10px}.scout-button span{white-space:normal;overflow:visible}.trade-in-control{flex-direction:column;justify-content:center;align-items:flex-end;gap:3px;max-width:132px}.trade-in-control button{padding:5px 7px}.trade-in-control small{font-size:8px;text-align:right}.scout-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}

/* Supporting numbers remain readable without taking space from the cards. */
.shop-odds{max-width:700px}.shop-odds-heading,.odds-help,.odds-toggle{font-size:11px;line-height:1.3}.shop-odds-tier small,.shop-odds-note,.trade-in-control small{font-size:10px;line-height:1.3}.shop-odds-value b{font-size:14px}.shop-odds-value i,.trade-in-control button,.scout-button{font-size:11px}.shop-odds-tier{column-gap:4px;padding-right:8px}.shop-odds-values{column-gap:8px}.trade-in-control small{max-width:156px}.combat-status .status-suppressed{color:#efb6ab}.combat-status .status-revived{color:#b5e4c3}
.battle-highlights{margin:14px 0 6px;padding:10px 12px;border:1px solid #42647a;border-radius:5px;background:#162c3c;text-align:left}.battle-highlights strong{display:flex;align-items:baseline;justify-content:space-between;gap:10px;color:#c8e1ef;font-size:12px;font-weight:600}.battle-highlights strong small{font-size:10px;color:#8babbf;font-weight:400}.battle-highlights ul{padding:0;margin:6px 0 0;list-style:none}.battle-highlights li{display:flex;justify-content:space-between;gap:10px;padding:2px 0;color:#accadd;font-size:11px;line-height:1.3}.battle-highlights li b{color:#e0d0aa}
@media(max-width:600px){.shop-odds-heading,.odds-help,.odds-toggle{font-size:10px}.shop-odds-value b{font-size:13px}.shop-odds-values{gap:5px}.shop-odds-tier{flex-direction:column;flex-wrap:nowrap;gap:1px;padding-right:4px}.shop-odds-value i{font-size:10px}.shop-odds-tier small{font-size:10px}.shop-odds-note,.trade-in-control small{font-size:10px}.trade-in-control{max-width:145px}.scout-button{font-size:11px}.trade-in-control button{font-size:11px}.trade-in-control small{max-width:145px}}
@media(max-width:350px){body{min-width:0}.table-hud{gap:6px;grid-template-columns:minmax(0,1fr) auto auto}.table-gold{font-size:19px}.table-actions{gap:5px}.preparation-strip{display:grid;grid-template-columns:minmax(0,1fr)}.trade-in-control{flex-direction:row;align-items:center;justify-content:space-between;max-width:none}.trade-in-control small{max-width:150px}.shop-odds-heading{column-gap:5px}.shop-odds-values{gap:3px}.shop-odds-value{gap:3px}.shop-odds-tier small{font-size:9px}.shop-odds-value b{font-size:12px}}

/* The fight control belongs beside preparation; the hand stays still below it. */
.preparation-main{min-width:0}
.fight-rail{display:flex;align-items:center;justify-content:center}
.fight-rail .fight-btn{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-width:0;max-width:100%;height:100px;min-height:100px;padding:0 12px;border-radius:9px;border:1px solid #d8f3ff;background:linear-gradient(130deg,#b9e8ff,#6eb5df);box-shadow:0 8px 28px #0008,0 0 24px #71c6f32b,inset 0 1px #fff8;color:#0b2437;font-size:28px;font-weight:650;letter-spacing:.5px;white-space:nowrap;pointer-events:auto}
.fight-rail .fight-btn>svg{width:30px;height:30px;stroke-width:2;transform:none}
.fight-rail .fight-btn:hover,.fight-rail .fight-btn:focus-visible{background:linear-gradient(130deg,#dcf4ff,#91cff0);border-color:#effbff;box-shadow:0 8px 28px #0008,0 0 30px #71c6f34d;color:#061b2d}
.command-dock.hand-dock{grid-template-columns:minmax(0,1fr)}
.hand-inspector{display:none;position:fixed;z-index:18;left:50%;bottom:140px;transform:translateX(-50%);width:390px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 170px);padding:14px;gap:13px;align-items:start;border:1px solid #648ca7;border-radius:8px;background:linear-gradient(135deg,#203d52,#102232);box-shadow:0 12px 38px #000b,0 0 20px #519cc51f;pointer-events:none;text-align:left;overflow:auto}
.hand-inspector.is-visible{display:grid;grid-template-columns:67px minmax(0,1fr)}
.hand-inspector.is-pinned{pointer-events:auto}
.hand-inspector-art{width:67px;height:94px;object-fit:cover;object-position:50% 30%;border-radius:5px;border:1px solid #52738b}
.hand-inspector-copy{min-width:0}.hand-inspector-copy>strong{display:block;margin:5px 20px 7px 0;font-size:16px;line-height:1.2;color:#edf7ff}.hand-inspector-copy>p{margin:0;font-size:13px;line-height:1.5;color:#d4e4ef}
.hand-inspector-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;padding-right:18px;font-size:10px;line-height:1.3;color:#a9c5d8}.hand-inspector-meta>span{font-size:12px;font-weight:600;color:#f0d6a2;white-space:nowrap}
.hand-inspector-close{position:absolute;top:5px;right:5px;width:30px;height:30px;padding:0;border:0;background:transparent;color:#b7cedd;font-size:24px;line-height:30px}.hand-inspector-close:hover{background:#42647b;color:#fff}
.card-dragging .hand-inspector{display:none}
.collection-rarity{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 14px}.collection-rarity button{padding:7px 13px;border:1px solid #416077;background:#152535;color:#adc4d5;font-size:12px}.collection-rarity button.active{border-color:#d0b079;background:#3b3324;color:#f0d3a0}.collection-rarity>span{margin-left:5px;color:#94acbd;font-size:11px}
.fusion-summary .fusion-intro{flex:1;min-width:0}.fusion-summary .fusion-upgrade{flex:0 0 auto}
.fusion-intro .fusion-ability{display:block;margin:9px 0 0;color:#cbdce8;font-size:12px;line-height:1.4}.fusion-ability>b{display:block;margin-bottom:3px;color:#dec38b;font-size:10px;letter-spacing:.4px;font-weight:600}
@media(min-width:901px){
  .game-table,.game-table.has-hand{max-width:1360px;padding-left:26px;padding-right:26px;padding-bottom:128px}
  .preparation-layout{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:24px}
  .preparation-main .team-controls{min-height:0}
  .preparation-main .team-controls.has-selection{position:absolute;right:0;top:calc(50% + 62px);width:180px;display:flex;flex-wrap:wrap;gap:7px;padding:9px 0 0}
  .preparation-main .team-controls.has-selection .selected-title{flex-basis:100%;margin:0 0 3px;text-align:center}
  .command-dock.hand-dock{padding-left:max(18px,calc((100vw - 1280px)/2));padding-right:max(18px,calc((100vw - 1280px)/2))}
  .preparation-main .shop-heading{gap:18px}.preparation-main .shop-heading-title h2{font-size:18px}
}
@media(min-width:901px) and (max-width:1100px){
  .game-table,.game-table.has-hand{padding-left:18px;padding-right:18px}
  .preparation-layout{grid-template-columns:minmax(0,1fr) 140px;gap:16px}
  .fight-rail .fight-btn{height:88px;min-height:88px;padding:0 8px;gap:8px;font-size:23px}
  .fight-rail .fight-btn>svg{width:26px;height:26px}
  .preparation-main .team-controls.has-selection{width:140px;top:calc(50% + 56px)}
  .preparation-main .shop-heading{gap:12px}.preparation-main .shop-heading-title h2{font-size:13px}
}
@media(max-width:900px){
  .fight-rail{position:fixed;z-index:11;right:14px;bottom:24px;width:166px}
  .fight-rail .fight-btn{height:88px;min-height:88px;font-size:25px}
  .command-dock.hand-dock{padding-right:194px}
}
@media(min-width:601px) and (max-height:700px){.hand-inspector{bottom:120px}}
@media(min-width:901px) and (max-height:700px){.game-table,.game-table.has-hand{padding-bottom:108px}}
@media(max-width:600px){
  .fight-rail{right:9px;bottom:calc(16px + env(safe-area-inset-bottom));width:110px}
  .fight-rail .fight-btn{height:76px;min-height:76px;padding:0 6px;font-size:20px;gap:6px}.fight-rail .fight-btn>svg{width:23px;height:23px}
  .command-dock.hand-dock{padding-right:129px}
  .hand-inspector{bottom:calc(120px + env(safe-area-inset-bottom));width:380px;padding:12px;gap:11px;max-height:calc(100dvh - 150px - env(safe-area-inset-bottom))}
  .hand-inspector.is-visible{grid-template-columns:56px minmax(0,1fr)}.hand-inspector-art{width:56px;height:82px}
  .hand-inspector-copy>strong{font-size:15px}.hand-inspector-copy>p{font-size:13px}
  .collection-rarity>span{flex-basis:100%;margin-left:0}
}
/* Keep the faction name visible on playable cards, including narrow screens. */
.game-table .shop-card .card-tribe,.game-table .team-card .card-tribe{display:block}
