/* Shared visual foundation. Battle geometry and card proportions belong to battle.css. */
:root{--v-bg:#0a121c;--v-panel:#101e2a;--v-panel-raised:#192a36;--v-text:#e9e7df;--v-muted:#b4c1cb;--v-gold:#dfc38d;--v-border:#b8a07155;--v-focus:#a5dce9;--v-radius:8px;--v-space:clamp(16px,2.5vw,32px);color-scheme:dark}
button,input,select,textarea{font-family:Nunito,'Segoe UI',system-ui,sans-serif}
button,a,input,select,textarea,summary{touch-action:manipulation}
:where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--v-focus)!important;outline-offset:3px}
:where(button):disabled{cursor:not-allowed}
:where(input,select,textarea){accent-color:var(--v-gold)}
:where(.launcher-shell,.menu-box,.wiki-modal,.experience-panel,dialog,.public-section){scrollbar-width:thin;scrollbar-color:#8c7957 #101b26;overflow-wrap:break-word}
:where(.launcher-shell,.menu-box,.wiki-modal,.experience-panel,dialog) :where(h1,h2,h3){text-wrap:balance}
:where(.launcher-shell,.menu-box,.wiki-modal,.experience-panel,dialog) :where(p,li){line-height:1.65}
:where(.launcher-shell,.menu-box,.wiki-modal,.experience-panel,dialog) :where(input:not([type=checkbox]):not([type=range]),select,textarea){box-sizing:border-box;min-width:0;min-height:44px;border:1px solid #8395a16b;border-radius:5px;background:#09141f;color:var(--v-text);font-size:15px;padding:10px 12px}
:where(.launcher-shell,.menu-box,.wiki-modal,.experience-panel,dialog) :where(button,.action-btn){transition:background-color .15s,border-color .15s,box-shadow .15s}
#main-menu .launcher-shell{grid-template-rows:auto minmax(0,1fr) auto}
.launcher-top{padding-inline:var(--v-space)}
.launcher-account{max-width:65%;min-height:48px;border-radius:var(--v-radius)}
#launcher-account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.hero-gallery-card strong{font-size:clamp(18px,1.7vw,27px);white-space:nowrap}
.launcher-brand{font-size:clamp(20px,2.5vw,30px)}
.launcher-nav{padding-inline:var(--v-space);gap:clamp(18px,2.5vw,36px);scrollbar-width:thin}
.launcher-nav button{font-size:14px;min-height:48px}
#launcher-content{padding:var(--v-space);scroll-padding:24px}
#launcher-content>.launcher-page-heading{margin-top:18px;margin-bottom:24px}
.launcher-page-heading h1{font-size:clamp(28px,3.1vw,44px);line-height:1.25;margin:8px 0 12px}
.launcher-page-heading p{color:var(--v-muted);max-width:70ch;font-size:16px}
.launcher-kicker{font-size:12px;letter-spacing:.12em}
#launcher-content :is(.launcher-deck,.journey-card,.training-grid>article,.reward-deck,.hero-story,.cosmetic-grid>article,.frame-choice,.duel-record,.release-entry){border-radius:var(--v-radius);border-color:var(--v-border);background-color:var(--v-panel)}
.training-grid>article{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:24px}
.training-grid>article h2,.training-grid>article p{margin:0}
.training-grid>article .action-btn{margin-top:auto}
.arsenal-tabs,.collection-tabs,.cosmetic-tabs,.profile-tabs{gap:8px;flex-wrap:wrap}
:is(.arsenal-tabs,.collection-tabs,.cosmetic-tabs,.profile-tabs) button{min-height:44px;font-size:14px;border-radius:5px;padding:10px 14px}
.arsenal-tabs{position:sticky;top:calc(-1 * var(--v-space));z-index:5;background:#101b27f5;backdrop-filter:blur(12px);border-color:var(--v-border);margin-bottom:24px}
.launcher-footer{min-height:52px;box-sizing:border-box;padding:8px var(--v-space);gap:8px 20px;flex-wrap:wrap}
.launcher-footer-links{flex-wrap:wrap;gap:8px 18px!important}
.launcher-footer button{min-height:36px;font-size:13px;padding:6px 0}
.launcher-footer #launcher-version,.launcher-footer #launcher-connection{font-size:12px}
#lobby-social-panel>summary{min-height:48px;box-sizing:border-box}
#lobby-social-content{font-size:14px}
.lobby-empty{color:var(--v-muted);font-size:14px}
.menu-box:not(.deck-builder-menu-box),.wiki-modal,.experience-panel,.statistics-dialog,.sacrifice-dialog{border:1px solid var(--v-border);border-radius:12px;background:radial-gradient(ellipse at top left,#28404b55,transparent 65%),var(--v-bg);color:var(--v-text);box-shadow:0 24px 90px #0008}
.menu-box:not(.deck-builder-menu-box){padding:clamp(20px,3vw,36px)}
.menu-box:not(.deck-builder-menu-box) h2,.wiki-modal h2,.experience-panel h2{font-size:clamp(23px,2.5vw,30px);line-height:1.35}
.menu-box .action-btn,.wiki-modal .action-btn,.experience-panel .action-btn,dialog .action-btn{min-height:44px;font-size:14px;line-height:1.4;border-radius:5px}
.settings-modal{width:min(560px,calc(100vw - 24px));text-align:left;padding:var(--v-space)}
.settings-title{display:flex;align-items:center;gap:12px;margin:0 0 24px}
.settings-title .game-icon{width:28px;height:28px;flex-shrink:0}
.settings-group{padding:18px 0;margin:0;border-top:1px solid #a3b6c12e}
.settings-label{color:var(--v-text);font-size:16px;font-weight:800}
.settings-label,.settings-toggle,.settings-toggle small{font-family:Nunito,'Segoe UI',system-ui,sans-serif}
#deck-builder-screen .filter-select,.menu-box input:not([type=checkbox]):not([type=range]),.menu-box select,.wiki-modal input:not([type=checkbox]):not([type=range]),.wiki-modal select{background:#09141f;color:var(--v-text);border:1px solid #8395a16b;border-radius:5px;font-family:Nunito,'Segoe UI',system-ui,sans-serif;font-size:15px;min-height:44px;box-sizing:border-box;max-width:100%}
.settings-range{width:100%;min-height:36px;cursor:pointer}
.settings-toggle{padding:16px 0;gap:14px;font-size:15px}
.settings-toggle small,.audio-settings-note{font-size:14px;line-height:1.6;color:var(--v-muted)}
.profile-heading{gap:16px;align-items:center;flex-wrap:wrap}
.profile-panel .profile-identity{border-color:var(--v-border);border-radius:var(--v-radius)}
.profile-panel .competitive-table{max-width:100%;overflow:auto}
.profile-panel .profile-fields{gap:18px}
#online-menu .menu-box{width:min(640px,calc(100vw - 24px));text-align:left}
#online-actions{display:grid!important;gap:12px;margin:20px 0}
#online-actions[style*="none"]{display:none!important}
#online-actions .action-btn{width:100%;margin:0!important;box-sizing:border-box;text-align:left;padding:14px 18px}
#online-actions .menu-btn small{display:block;margin-top:5px;line-height:1.5;font-size:13px;color:var(--v-muted)}
#online-actions .primary-menu-btn small{color:inherit;opacity:.85}
.online-collection-note{color:var(--v-muted);font-size:14px;line-height:1.6}
.join-section{gap:12px;flex-wrap:wrap}
.room-code-input{max-width:100%}
#deck-builder-screen .forge-heading{align-items:center;gap:12px;flex-wrap:wrap}
#deck-builder-screen .forge-heading .action-btn{margin:0;min-height:44px}
#deck-builder-screen .deck-builder-title{font-size:clamp(22px,2.4vw,30px);line-height:1.3}
#deck-builder-screen .deck-builder-instructions{font-size:14px;color:var(--v-muted)}
#deck-builder-screen .forge-identity{align-items:center}
#deck-builder-screen .deck-summary{border-color:var(--v-border);border-radius:var(--v-radius)}
#deck-builder-screen .deck-builder-actions .action-btn{min-height:46px;font-size:14px}
.service-status-button{display:inline-flex;align-items:center;gap:7px;background:none;border:0;color:var(--v-muted);font:700 13px Nunito,system-ui,sans-serif;padding:8px 0;cursor:pointer;min-height:36px}
.service-status-button:before{content:'';width:8px;height:8px;border-radius:50%;background:#97a3b1;flex-shrink:0}
.service-status-button[data-state=operational]:before{background:#93c9a5}
.service-status-button[data-state=maintenance]:before{background:#e5bf76}
.service-status-button[data-state=unavailable]:before{background:#e79c95}
.service-dialog{width:min(520px,calc(100vw - 28px));padding:28px;color:var(--v-text);font:16px/1.65 Nunito,system-ui,sans-serif;max-height:90dvh;overflow:auto}
.service-dialog::backdrop{background:#030910d9}
.service-dialog h2{font:700 26px Cinzel,Georgia,serif;margin-top:0}
.service-dialog [data-service-time]{color:var(--v-muted);font-size:14px}
.service-dialog button{min-height:44px;padding:10px 18px;border-radius:5px;background:var(--v-panel-raised);border:1px solid var(--v-border);color:var(--v-gold);cursor:pointer}
@media(max-width:1000px){#lobby-social-panel{max-height:36dvh}#lobby-social-panel>summary:after{content:'+'}#lobby-social-panel[open]>summary:after{content:'−'}#lobby-social-content{max-height:26dvh}.launcher-page-heading{align-items:flex-start;flex-wrap:wrap}.hero-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.launcher-top{gap:10px;padding-inline:16px}.launcher-account{font-size:12px;padding:8px 10px;gap:6px;max-width:62%}.launcher-account .rank-emblem{width:30px;height:30px}.launcher-brand{font-size:20px;letter-spacing:2px}.launcher-nav button{font-size:13px}.launcher-nav{padding-inline:16px;gap:22px}.launcher-footer{padding:6px 16px;gap:0 14px}.launcher-footer-links{gap:0 14px!important}.launcher-footer button{font-size:12px}.launcher-footer #launcher-connection{font-size:11px}.launcher-page-heading h1{font-size:30px}.hero-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hero-story{grid-template-columns:1fr;padding:20px}.collection-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.reward-deck>img{width:80px}.reward-deck>div{padding:16px}.arsenal-tabs button{font-size:13px;padding:9px 11px}.settings-modal{padding:22px}.settings-toggle small{font-size:13px}.experience-panel>header{flex-wrap:wrap;gap:12px}.public-header nav{gap:12px}.public-header .outline-button{min-height:44px}}
@media(max-height:600px) and (min-width:601px){.launcher-footer{min-height:44px}.launcher-feature{min-height:280px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* Match controls and inspection use the same palette as the launcher. */
.card>.match-inspect{pointer-events:auto;position:absolute;right:5px;top:5px;z-index:8;display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:6px;border:1px solid var(--v-border);border-radius:6px;background:#08131feb;color:var(--v-gold);cursor:pointer;opacity:0;transition:opacity .12s}
.match-inspect .game-icon{width:18px;height:18px;pointer-events:none}
.card:hover>.match-inspect,.card:focus-within>.match-inspect{opacity:1}
.card-details{background:var(--v-panel);border-color:var(--v-border);border-radius:12px;color:var(--v-text);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8c7957 #101b26}
.card-details h2{font:700 clamp(23px,3vw,30px)/1.3 Cinzel,Georgia,serif;color:var(--v-gold)}
.card-details p{font:16px/1.65 Nunito,system-ui,sans-serif;overflow-wrap:break-word}
.card-details .detail-stats span{background:#223442;font:700 15px/1.4 Nunito,system-ui,sans-serif}
.card-details .inspection-navigation{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:16px}
.card-details .inspection-navigation button{width:44px;min-width:44px;min-height:44px}
#selection-panel{box-sizing:border-box;border:1px solid var(--v-border);border-radius:10px;background:#101e2af5;color:var(--v-text);box-shadow:0 10px 35px #0008;max-height:40dvh;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#selection-copy strong{font:800 15px/1.5 Nunito,system-ui,sans-serif;color:var(--v-gold)}
#selection-copy p{font:14px/1.55 Nunito,system-ui,sans-serif;margin:8px 0}
#selection-target-hint{display:none}
.selection-actions{display:flex;flex-wrap:wrap;gap:8px}
.selection-actions button{flex:1;min-height:44px;min-width:72px;padding:9px 12px;border-radius:5px;border:1px solid var(--v-border);background:#213540;color:var(--v-text);font:800 14px Nunito,system-ui,sans-serif;cursor:pointer}
.selection-actions #selection-play{background:linear-gradient(#dfc38d,#b18b4b);color:#10191e}
.selection-actions button:disabled{opacity:.5}
.legal-target{outline:3px solid #a6dcc8!important;outline-offset:3px;box-shadow:0 0 0 5px #081d1b,0 0 22px #93d7b955!important}
#connection-status{max-width:min(360px,calc(100vw - 24px));white-space:normal;font:700 13px/1.5 Nunito,system-ui,sans-serif;border-radius:6px;padding:8px 12px;pointer-events:none}
#duel-reconnect{position:fixed;left:50%;top:calc(50% + 30px);transform:translateX(-50%);z-index:120;max-width:calc(100vw - 28px);min-height:44px;padding:10px 18px;border:1px solid #dfc38d;border-radius:6px;background:#142431;color:#f2ddba;font:800 14px Nunito,system-ui,sans-serif;cursor:pointer}
#duel-reconnect[hidden]{display:none}
@media(pointer:coarse){.card>.match-inspect{opacity:1;width:36px;height:36px}.hand.active-hand .card{touch-action:pan-x!important}.board .card{touch-action:pan-x!important}}
@media(max-width:700px),(max-width:980px) and (orientation:portrait){#selection-panel{bottom:calc(180px + env(safe-area-inset-bottom,0px));max-height:min(280px,40dvh);width:auto;left:12px;right:12px;padding:16px}#zoom-card-container{width:calc(100vw - 24px)}.card-details{padding:18px;max-height:calc(100dvh - 28px)}.card-details img{height:150px}.card-details .ability-guide li{font-size:14px;line-height:1.55}#connection-status{top:50%;left:50%;transform:translate(-50%,-50%);font-size:12px}.match-inspect{width:30px;height:30px;padding:5px}}

.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important}
@media(max-height:500px) and (min-width:701px){
 .floating-ui.left{width:160px;padding:0 8px;gap:4px}.floating-ui.left.top{top:6px}.floating-ui.left.bottom{bottom:6px}
 .floating-ui.left .deck-display img{width:20px;height:26px}.floating-ui.left .deck-display .deck-count{font-size:13px}.floating-ui.left .player-stats-header{gap:8px;min-height:40px}
 .floating-ui.left .arena-slot{width:28px;height:34px}.floating-ui.left .hero-stats-container{padding:4px;gap:2px}.floating-ui.left .hero-name{font-size:11px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .floating-ui.left .hero-resource{font-size:10px;line-height:1.3;min-height:0;margin:1px 0}.floating-ui.left .stat-row{min-height:22px;gap:4px}.floating-ui.left .bar-wrapper{height:12px;min-width:0;flex:1}.floating-ui.left .stat-val-out{font-size:14px;height:20px;min-width:22px}.floating-ui.left .hero-portrait{width:16px;height:16px}
 .side-menu-buttons{right:16px;top:50%;transform:translateY(-50%);gap:6px}
 .side-menu-buttons .side-btn-float{width:44px;height:44px;min-height:44px;border-radius:50%}
 .floating-ui.right{width:164px;padding:6px}.floating-ui.right .hero-power-btn{min-height:44px;font-size:11px!important}
 #selection-panel{max-height:76dvh;width:min(300px,calc(100vw - 350px));right:170px;left:auto;top:50%;bottom:auto;transform:translateY(-50%)}
}
@media(max-width:700px),(max-width:980px) and (orientation:portrait){
 .side-menu-buttons{top:calc(50dvh - 26px);right:10px;left:auto;transform:none;gap:6px}
 #connection-status[data-status=connected]{visibility:hidden}
 #selection-panel[data-targeting=true]{display:flex;align-items:center;gap:6px;top:calc(50dvh - 26px);bottom:auto;left:10px;right:auto;width:calc(100vw - 218px);min-width:130px;height:44px;max-height:none;padding:4px 6px;transform:none;overflow:visible}
 #selection-panel[data-targeting=true] #selection-target-hint{display:block!important;flex:1;margin:0;font:800 12px/1.2 Nunito,system-ui,sans-serif;color:var(--v-text)}
 #selection-panel[data-targeting=true] #selection-copy,#selection-panel[data-targeting=true] .selection-actions button:not(:last-child){display:none}
 #selection-panel[data-targeting=true] .selection-actions{display:block;flex:0 0 auto}
 #selection-panel[data-targeting=true] .selection-actions button:last-child{min-width:0;min-height:36px;padding:6px;font-size:12px}
}

/* Card information: cost above the art, modifiers on the scores, named abilities. */
.card>.card-cost{position:absolute;top:5px;right:5px;left:auto;bottom:auto;z-index:10;display:grid;place-items:center;width:32px;height:34px;min-width:32px;font:900 22px/1 Nunito,system-ui,sans-serif;background:linear-gradient(145deg,#87c8ff,#234e9b 65%,#122440);border:2px solid #bbddff;border-radius:8px 4px 8px 4px;box-shadow:0 3px 8px #000b,inset 0 0 0 2px #162944;color:#fff;transform:none}
.card>.match-inspect{left:5px;right:auto}
.card .card-stats{justify-content:flex-end}.card .stats-right{margin-left:auto}
.card .stat{position:relative}.card .stat.stat-buffed{color:#bdffd0;border-color:#80dba0;background:linear-gradient(145deg,#285d3f,#102e21)}
.card .stat.stat-nerfed{color:#ffc0c0;border-color:#ee8c8c;background:linear-gradient(145deg,#692d36,#381620)}
.stat-change{position:absolute;right:-5px;top:-6px;display:grid;place-items:center;width:13px;height:13px;border:1px solid currentColor;border-radius:50%;background:#0d1720;font:900 11px/1 Nunito,system-ui,sans-serif;box-shadow:0 1px 3px #0009}
.stat-wounded{text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.card-keywords{display:flex;flex-direction:column;gap:3px;padding:4px 5px}
.keyword-chip{display:flex;align-items:center;gap:4px;min-width:0;padding:3px 4px;background:#172b36;border:1px solid #779aab70;border-radius:4px;color:#d3e5ed;font:800 11px/1.2 Nunito,system-ui,sans-serif;white-space:normal;overflow-wrap:normal}
.keyword-chip>.game-icon{width:14px;height:14px;flex:0 0 14px;color:inherit}
.keyword-divine_shield,.keyword-taunt{background:#332d1d;border-color:#d1b46e77;color:#f0dba3}.keyword-lifesteal{background:#193b31;border-color:#8dc7a877;color:#bfe8d2}.keyword-poisonous{background:#30223c;border-color:#b497c777;color:#dbc2ef}.keyword-windfury{background:#1c3044;color:#badfff}.keyword-deathrattle{background:#302630;color:#dfc4d4}.keyword-used{opacity:.65;border-style:dashed}
.card-details>.card-keywords{flex-direction:row;flex-wrap:wrap;padding:12px 0}.card-details .keyword-chip{font-size:14px;padding:6px 9px;gap:7px}.card-details .keyword-chip>.game-icon{width:18px;height:18px;flex-basis:18px}
.sacrifice-creature{display:flex;align-items:center;gap:24px;margin:24px 0}.sacrifice-creature>img{width:110px;height:150px;object-fit:cover;border:1px solid var(--v-border);border-radius:7px}.sacrifice-creature p{margin:8px 0}
#player-mana-slots,#enemy-mana-slots{display:flex;flex-direction:column;align-items:stretch;height:auto;min-height:34px;gap:4px;width:100%;padding:0;margin:0 0 6px}
.mana-meter-label{display:flex;align-items:baseline;justify-content:space-between;gap:6px;font:700 11px/1.1 Nunito,system-ui,sans-serif;color:#b6c8d6;white-space:nowrap}.mana-meter-label strong{font-size:20px;color:#d1ebff}.mana-meter-label small{font-size:15px;color:#a9c4db}.mana-word{font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.mana-crystals{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:3px;min-height:10px;align-items:center}
#player-mana-slots .mana-slot,#enemy-mana-slots .mana-slot{display:block;position:static;visibility:visible;opacity:1;width:auto;height:10px;margin:0;min-width:0;border:1px solid #5f7b92;border-radius:3px;background:#172635;transform:none;box-shadow:none}
#player-mana-slots .mana-slot.filled,#enemy-mana-slots .mana-slot.filled{background:linear-gradient(#d9f0ff,#5ab6f5);border-color:#c0e4ff;box-shadow:0 0 5px #83c8ff55}
#player-mana-slots .mana-slot.spent,#enemy-mana-slots .mana-slot.spent{background:repeating-linear-gradient(135deg,#283949 0 3px,#132331 3px 6px);border-color:#7793a7}
#player-mana-slots .mana-slot.locked,#enemy-mana-slots .mana-slot.locked{height:5px;background:#101820;border-color:#37404b;opacity:.5}
.floating-ui.right .attack-all-btn{min-height:36px;padding:6px 8px;margin:0 0 6px;background:linear-gradient(#343841,#202734);color:#e5cf9e;border:1px solid #aa8f5866;border-radius:6px;font:800 12px/1.3 Nunito,system-ui,sans-serif}
.attack-all-btn:disabled{opacity:.4;cursor:not-allowed}


@media(max-width:700px),(max-width:980px) and (orientation:portrait){.card>.card-cost{width:27px;min-width:27px;height:29px;font-size:19px}.keyword-chip{font-size:10px;padding:2px 3px}.floating-ui.right .attack-all-btn{min-height:36px;font-size:11px}.mana-meter-label strong{font-size:18px}.mana-meter-label small{font-size:13px}.mana-meter-label>span{font-size:10px}.sacrifice-creature{gap:16px}.sacrifice-creature>img{width:80px;height:110px}}
@media(max-height:500px) and (min-width:701px){#player-mana-slots,#enemy-mana-slots{min-height:28px;margin-bottom:3px;gap:2px}.mana-meter-label strong{font-size:16px}.mana-meter-label small{font-size:12px}.floating-ui.right .attack-all-btn{min-height:32px;font-size:11px;margin-bottom:4px}.floating-ui.right .action-btn{padding:6px}.mana-crystals{min-height:7px}#player-mana-slots .mana-slot,#enemy-mana-slots .mana-slot{height:7px}}

/* Identity belongs to the surface; powers belong to the separate perimeter. */
.card:has(>.card-skin){--type-top:#604733;--type-base:#221b17;--type-accent:#c7a57b;border-color:transparent!important;isolation:isolate;background:var(--type-base)!important;opacity:1;filter:none}
.card:has(>.card-skin[data-card-type=spell]){--type-top:#383568;--type-base:#151e38;--type-accent:#9baff0}
.card:has(>.card-skin[data-card-type=arena]){--type-top:#285847;--type-base:#102a24;--type-accent:#92c9a9}
.card>.card-skin{position:absolute;inset:-1px;z-index:0;border:2px solid transparent;border-radius:inherit;background:linear-gradient(145deg,var(--type-top),var(--type-base) 65%) padding-box,var(--ability-border) border-box;pointer-events:none}
.card:has(>.card-skin)::before{display:none}
.card:has(>.card-skin)>.card-img,.card:has(>.card-skin)>.card-name,.card:has(>.card-skin)>.card-desc-container,.card:has(>.card-skin)>.card-stats{position:relative;z-index:1}
.card:has(>.card-skin) .card-name{color:#f0e6d3;background:#19130d66;border-bottom:1px solid color-mix(in srgb,var(--type-accent) 35%,transparent)}
.card:has(>.card-skin[data-card-type=spell]) .card-name{color:#d9e5ff;background:#101d3966}
.card:has(>.card-skin[data-card-type=arena]) .card-name{color:#d2f0dd;background:#0a241d77}
.board .card:has(>.card-skin),.hand .card:has(>.card-skin){box-shadow:0 5px 12px #000a}
.board .card:has(>.card-skin).effect-divine-shield{box-shadow:0 0 13px #e9ce6a38,0 5px 12px #000a!important}
.card[data-visual-state=mana]>.card-img img{filter:saturate(.35) brightness(.66)}
.card[data-visual-state=mana]>.card-cost,.card[data-mana-shortage=true]>.card-cost{color:#ff9292;text-shadow:0 1px 2px #150b2a,0 0 3px #150b2a}
.card[data-visual-state=blocked]>.card-img img,.card[data-visual-state=spent]>.card-img img{filter:saturate(.55) brightness(.76)}
.card[data-visual-state=waiting]>.card-img img,.card[data-visual-state=paused]>.card-img img{filter:saturate(.7) brightness(.85)}
.hand .card[data-visual-state=playable]:has(>.card-skin){box-shadow:0 0 0 1px #a0d2bf77,0 0 15px #93dbbd33,0 6px 16px #000a}
.board .card[data-visual-state=ready]{transform:translateY(-6px);animation:creatureLevitate 2.8s ease-in-out infinite;box-shadow:0 13px 17px #000b,0 0 15px #a4dfc225}
.board .card[data-visual-state=ready]::after{content:'';position:absolute;left:15%;right:15%;top:calc(100% + 9px);height:8px;background:radial-gradient(ellipse,#000a,transparent 70%);border-radius:50%;pointer-events:none;z-index:-1}
.card.card:has(>.card-skin).legal-target{outline:3px solid #a6dcc8!important;outline-offset:3px;box-shadow:0 0 0 5px #081d1b,0 0 22px #93d7b955!important}
.card>.card-sacrifice-icon{position:absolute;left:5px;bottom:4px;z-index:8;display:grid;place-items:center;pointer-events:auto;width:30px;height:30px;min-height:30px;padding:5px;border:1px solid #c28c94;border-radius:5px;background:#30212bea;color:#ecc0c7;cursor:pointer}
.card-sacrifice-icon>.game-icon{width:19px;height:19px;pointer-events:none;color:inherit}
.card-sacrifice-icon:disabled{opacity:.35;cursor:not-allowed;border-color:#6c646c;background:#171b22}
@keyframes creatureLevitate{0%,100%{box-shadow:0 11px 15px #000b,0 0 10px #a4dfc215}50%{box-shadow:0 15px 20px #000b,0 0 20px #a4dfc244}}
body.lightweight .board .card[data-visual-state=ready]{animation:none;transform:translateY(-5px);box-shadow:0 9px 10px #0009}
@media(pointer:coarse){.card>.card-sacrifice-icon{width:32px;height:32px}}
@media(prefers-reduced-motion:reduce){.board .card[data-visual-state=ready]{animation:none;transform:translateY(-5px)}}

.card:has(>.card-skin)>.card-desc-container,.card:has(>.card-skin)>.card-stats{background:linear-gradient(color-mix(in srgb,var(--type-base) 90%,#000),var(--type-base))}
.card:has(>.card-skin)>.card-img{border-color:var(--type-accent)}
.collection-card[data-card-type],.card-details[data-card-type]{--type-top:#604733;--type-base:#221b17;--type-accent:#c7a57b;border:2px solid transparent;background:linear-gradient(145deg,var(--type-top),var(--type-base) 65%) padding-box,var(--ability-border) border-box!important}
.collection-card[data-card-type=spell],.card-details[data-card-type=spell]{--type-top:#383568;--type-base:#151e38;--type-accent:#9baff0}
.collection-card[data-card-type=arena],.card-details[data-card-type=arena]{--type-top:#285847;--type-base:#102a24;--type-accent:#92c9a9}
.card:has(>.card-skin)>.card-stats{box-sizing:border-box;flex:0 0 32px;height:32px;min-height:32px;padding:4px 5px}
.card>.card-sacrifice-icon{width:26px;height:26px;min-height:26px;bottom:3px;padding:4px}
@media(pointer:coarse){.card>.card-sacrifice-icon{width:28px;height:28px;min-height:28px}}

/* Hero identity and every payment stay together, directly above the life/armor bars. */
.hero-ability-panel{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;width:100%;min-width:0}
.hero-ability-panel .hero-power-btn{display:grid;grid-template-columns:32px minmax(0,1fr);gap:6px;align-items:center;max-width:none!important;min-width:0;width:100%;margin:0;padding:6px;text-align:left;border:1px solid #a99261;border-radius:8px;background:linear-gradient(145deg,#263944,#101e2a);color:#e8ddc7;font:700 13px/1.25 Nunito,system-ui,sans-serif!important;box-shadow:0 3px 10px #0006;white-space:normal}
.hero-ability-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.hero-ability-copy>strong{font-size:13px;line-height:1.25;overflow-wrap:break-word}
.hero-ability-portrait{width:32px;height:38px;object-fit:cover;object-position:50% 15%;border:1px solid #bfab7a;border-radius:5px;background:#101a22}
.hero-ability-costs{display:flex;flex-wrap:nowrap;gap:4px;align-items:center;min-width:0}
.hero-ability-cost{display:inline-flex;align-items:center;gap:3px;min-width:0;padding:3px 4px;border:1px solid #71899666;border-radius:4px;background:#112432;color:#ccdeea;font:700 11px/1.15 Nunito,system-ui,sans-serif;white-space:nowrap}
.hero-ability-cost>.game-icon{width:12px;height:12px;flex:0 0 12px;color:inherit}.hero-ability-cost b{font-size:12px;color:#e3f1fc}.hero-ability-cost[data-resource=mana]{background:#152e53;border-color:#72a5d277;color:#c2e4ff}.hero-ability-cost[data-resource=armor]{background:#243449;color:#d5e3f7}.hero-ability-cost[data-resource=souls]{background:#163b39;color:#b6e4db}.hero-ability-cost[data-resource=reagents]{background:#293a27;color:#d0e8ba}.hero-ability-cost[data-missing=true] b{color:#ff9292}
.hero-ability-panel .hero-power-btn:disabled{opacity:1;filter:none;cursor:not-allowed;border-color:#65727b;box-shadow:none}.hero-ability-panel .hero-power-btn:disabled .hero-ability-portrait{filter:saturate(.6)}.hero-ability-panel .hero-power-btn:disabled .hero-ability-copy>strong{color:#bdc8ce}.hero-ability-panel .hero-power-btn[data-used=true]{border-style:dashed}

@media(max-width:700px),(max-width:980px) and (orientation:portrait){
 .floating-ui.left.hero-hud{display:grid;grid-template-columns:28px minmax(0,1fr);gap:5px;padding:8px;align-items:start}
 .hero-hud>.player-stats-header{grid-column:1;grid-row:1/3;display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:space-between;align-self:stretch;min-width:0;margin:0}
 .hero-hud>.hero-ability-panel{grid-column:2;grid-row:1;grid-template-columns:minmax(0,1fr)}
 .hero-hud>.hero-stats-container{grid-column:2;grid-row:2;min-width:0;width:100%;box-sizing:border-box;padding:5px;gap:3px}
 .hero-hud .hero-ability-panel .hero-power-btn{grid-template-columns:28px minmax(0,1fr);gap:4px 5px;padding:5px;font-size:11px!important;min-height:0}
 .hero-hud .hero-ability-portrait{width:28px;height:32px}.hero-hud .hero-ability-copy>strong{font-size:11px;line-height:1.2}
 .hero-hud .hero-ability-costs{gap:3px}.hero-hud .hero-ability-cost{font-size:9px;padding:2px 3px;gap:2px}.hero-hud .hero-ability-cost b{font-size:10px}.hero-hud .hero-ability-cost>.game-icon{width:10px;height:10px;flex-basis:10px}

 .hero-hud .hero-name{font-size:11px;line-height:1.25;overflow-wrap:anywhere}.hero-hud .hero-resource{font-size:10px;line-height:1.25;margin:3px 0}
 .hero-hud .hero-portrait{display:none}.hero-hud .stat-row{gap:4px;min-height:23px}.hero-hud .bar-wrapper{height:12px;min-width:0;flex:1}.hero-hud .stat-val-out{font-size:14px;height:20px;min-width:22px}.hero-hud .stat-icon .game-icon{width:14px;height:14px}
 .hero-hud .deck-display img{width:22px;height:30px}.hero-hud .deck-display .deck-count{font-size:12px}.hero-hud .arena-slot{width:28px;height:38px}
 .hero-hud .hero-ability-cost{font-size:10px}.hero-hud .hero-ability-cost b{font-size:11px}.hero-hud .hero-ability-cost>.game-icon{display:none}
}
@media(max-height:500px) and (min-width:701px){
 .floating-ui.left.hero-hud{width:190px;display:grid;grid-template-columns:28px minmax(0,1fr);gap:4px;padding:0 6px;align-items:start}
 .hero-hud>.player-stats-header{grid-column:1;grid-row:1/3;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:space-between;align-self:stretch;margin:0}
 .hero-hud>.hero-ability-panel{grid-column:2;grid-row:1;grid-template-columns:minmax(0,1fr)}
 .hero-hud>.hero-stats-container{grid-column:2;grid-row:2;min-width:0;width:100%;box-sizing:border-box}
 .hero-hud .hero-ability-panel .hero-power-btn{grid-template-columns:22px minmax(0,1fr);gap:3px;padding:4px;min-height:0;font-size:10px!important}
 .hero-hud .hero-ability-portrait{width:22px;height:28px}.hero-hud .hero-ability-copy>strong{font-size:10px;line-height:1.15}.hero-hud .hero-ability-costs{gap:2px}.hero-hud .hero-ability-cost{font-size:9px;padding:1px 2px;gap:2px}.hero-hud .hero-ability-cost b{font-size:9px}.hero-hud .hero-ability-cost>.game-icon{display:none}
.hero-hud .hero-name{font-size:10px}.hero-hud .hero-portrait{display:none}
 .side-menu-buttons{display:flex;flex-direction:row;gap:4px;right:8px;top:50%;transform:translateY(-50%)}
}

/* Forged bronze, midnight enamel and restrained ornament, without extra hit targets. */
:root{--v-gold:#e3c68e;--v-border:#c8a66d66}
.launcher-top,.launcher-footer{background:linear-gradient(100deg,#10222be8,#0a1420f2 55%,#182533e8);box-shadow:inset 0 1px #e8d4a21a,inset 0 -1px #b28d4933}
.launcher-brand{color:#f0dbad;text-shadow:0 2px 5px #000,0 0 24px #dfb97522}
.launcher-nav button.active{background:radial-gradient(ellipse at bottom,#d4ad5925,transparent 75%);text-shadow:0 0 18px #dec68d44}
.launcher-page-heading h1,.menu-box h2,.experience-panel h2{color:#f0dfba;text-shadow:0 2px 4px #0008}
:is(.launcher-deck,.journey-card,.training-grid>article,.reward-deck,.hero-story,.cosmetic-grid>article,.release-entry){box-shadow:inset 0 1px #ebd6a61c,0 6px 20px #0003}
:is(.menu-box,.experience-panel,.wiki-modal,dialog){border-top-color:#dac08c99;box-shadow:inset 0 1px #f4dfaf18,0 24px 70px #0009}
:is(.arsenal-tabs,.collection-tabs,.cosmetic-tabs,.profile-tabs) button.active{border-color:#d6b574;background:linear-gradient(#3b3a31,#18252e);color:#f5e1b8}
.hero-ability-panel{border-radius:7px}.hero-ability-panel:focus-visible{outline:2px solid var(--v-focus);outline-offset:3px}
.hero-ability-panel .hero-power-btn{box-sizing:border-box;border-radius:6px;background:linear-gradient(120deg,#34434a,#15232f 75%);box-shadow:inset 0 1px #f7dfad28,0 3px 8px #0006}
.hero-ability-panel .hero-power-btn:not(:disabled):hover{border-color:#f1d79e;box-shadow:inset 0 1px #f7dfad38,0 0 12px #c8a06122}
.hero-ability-portrait{box-shadow:0 0 0 1px #121b22,0 0 0 2px #ad905233;cursor:help}
.hero-ability-cost{padding:2px 3px;font-size:10px}.hero-ability-cost>.game-icon{width:10px;height:10px;flex-basis:10px}
.hero-stats-container{border-color:#b99a6166;box-shadow:inset 0 1px #f4dfaf18,0 4px 14px #0005}
.bar-wrapper{box-shadow:inset 0 1px 4px #000b,0 1px #e8d3a41c}.bar-fill{box-shadow:inset 0 1px #ffffff33,inset 0 -1px #0005}
.floating-ui.right .attack-all-btn{border-color:#b99a6180;background:linear-gradient(#33404a,#17232f);letter-spacing:.025em;box-shadow:inset 0 1px #f2deac17}
.floating-ui.right #surrender-btn{align-self:stretch;width:100%;min-height:44px;padding:4px 12px;margin:0;color:#d9a5ab;background:#271d28cc;border:1px solid #a86d7755;font-size:13px;box-shadow:none}
@media(max-height:500px) and (min-width:701px){.hero-hud .hero-ability-cost{font-size:9px}.hero-hud .hero-ability-copy{gap:2px}}
.hero-ability-panel{grid-template-columns:32px minmax(0,1fr);gap:6px;box-sizing:border-box;padding:5px;border:1px solid #a99261;background:linear-gradient(120deg,#34434a,#15232f 75%);box-shadow:inset 0 1px #f7dfad28,0 3px 8px #0006}
.hero-ability-panel .hero-power-btn{display:block;min-height:44px;padding:0;border:0;background:transparent;box-shadow:none}
.hero-ability-panel .hero-power-btn:not(:disabled):hover{background:#dfc38d0d;box-shadow:none}
.hero-portrait-info{display:grid;place-items:center;width:32px;min-width:0;min-height:44px;padding:0;background:none;border:0;border-radius:4px;cursor:help}
.hero-ability-panel:has(.hero-power-btn:disabled){border-color:#65727b}.hero-ability-panel:has(.hero-power-btn:disabled) .hero-ability-portrait{filter:saturate(.6)}
.hero-portrait-info:focus-visible{outline:2px solid var(--v-focus)!important;outline-offset:2px}
@media(max-width:700px),(max-width:980px) and (orientation:portrait){.hero-hud>.hero-ability-panel{grid-template-columns:28px minmax(0,1fr);padding:4px;gap:5px}.hero-hud .hero-ability-panel .hero-power-btn{padding:0;min-height:40px}.hero-portrait-info{width:28px;min-height:40px}}
@media(max-height:500px) and (min-width:701px){.hero-hud>.hero-ability-panel{grid-template-columns:22px minmax(0,1fr);padding:3px;gap:3px}.hero-hud .hero-ability-panel .hero-power-btn{padding:0;min-height:36px}.hero-portrait-info{width:22px;min-height:36px}}

.lobby-friend>.portrait-medallion{width:52px;height:52px;flex:0 0 52px}.lobby-friend .medallion-portrait{border:0;object-position:50% 20%}.lobby-friend .medallion-frame{border:0}
/* Table layout: identity and resources left, equal-size piles and turn controls right. */
.floating-ui.left.hero-hud{display:flex;flex-direction:column;align-items:stretch;gap:7px}
.hero-hud>.hero-ability-panel,.hero-hud>.hero-stats-container{width:100%;box-sizing:border-box}
.floating-ui.left .attack-all-btn{width:100%;min-height:40px;padding:7px;margin:0;border:1px solid #b99a6180;border-radius:6px;background:linear-gradient(#33404a,#17232f);color:#e5cf9e;font:800 12px/1.3 Nunito,system-ui,sans-serif}
.floating-ui.right>.player-stats-header{--pile-w:var(--match-card-width);--pile-h:var(--match-card-height);display:flex;align-items:flex-end;justify-content:space-between;gap:6px;width:100%;margin:0 0 8px;padding-top:20px;min-height:0}
.player-stats-header .arena-slot,.player-stats-header .deck-display img{width:var(--pile-w);height:var(--pile-h);min-width:var(--pile-w);box-sizing:border-box;object-fit:cover}
.player-stats-header .deck-display{position:relative;width:var(--pile-w);min-width:var(--pile-w);min-height:var(--pile-h);padding:0;gap:0}
.player-stats-header .deck-display .deck-count{position:absolute;bottom:auto;top:-24px;left:0;right:0;text-align:center;font:800 16px/20px Nunito,sans-serif;color:#f3ddb0;text-shadow:0 1px 3px #000;z-index:3}
.hero-name{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.hero-name .portrait-medallion{width:36px;height:36px;flex:0 0 36px}.hero-name .rank-emblem{width:26px;height:26px}.battle-player-label{min-width:0;overflow-wrap:anywhere}
.hero-ability-name{display:block;color:#dfc38d;font:700 10px/1.1 Nunito,sans-serif;letter-spacing:.03em}.hero-ability-copy{gap:3px}
.hero-resource-meters:empty{display:none}.hero-resource-meters{display:flex;flex-direction:column;gap:5px;width:100%}
.hero-resource-meter{--resource:#9bd8cb;font:700 10px/1.2 Nunito,sans-serif;color:#c3d9de;width:100%}.hero-resource-meter>span{display:flex;justify-content:space-between;gap:6px;margin-bottom:3px}.hero-resource-meter strong{color:#ecf5f5}.hero-resource-meter>div{display:flex;gap:3px}.hero-resource-meter i{flex:1;height:7px;background:#12222d;border:1px solid #69879666;border-radius:2px}.hero-resource-meter i.filled{background:linear-gradient(#d7eee4,var(--resource));border-color:var(--resource);box-shadow:0 0 5px #9bd8cb22}.hero-resource-meter[data-resource=reagents]{--resource:#a6ce78}.hero-resource-meter[data-resource=pack]{--resource:#dcb676}.hero-resource-meter[data-resource=spells]{--resource:#a8a2e8}
.board>.board-slot{position:relative;box-sizing:border-box;flex:0 0 var(--match-card-width);width:var(--match-card-width);height:var(--match-card-height);border:1px dashed #dcc18b55;border-radius:9px;background:linear-gradient(135deg,#e0c78e08,#10212a14);box-shadow:inset 0 0 18px #0003;pointer-events:none;align-self:center}
.board-slot::before{content:'';position:absolute;inset:8px;border:1px solid #c2a36714;border-radius:5px}

.dialog-modal{width:min(440px,calc(100vw - 24px))!important;min-width:0}.dialog-actions{display:flex;flex-wrap:wrap;gap:12px}.dialog-actions>.action-btn{flex:1 1 120px;width:auto;min-width:120px;min-height:44px;padding:10px 14px;white-space:nowrap;word-break:normal!important;overflow-wrap:normal!important;hyphens:none}
.forge-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;padding:14px 0}.forge-filter-field{display:flex;flex-direction:column;gap:5px;font:700 12px Nunito,sans-serif;color:#d3c19a}.forge-filter-field select{width:100%}.forge-extra-filters{border:1px solid #b8a07144;padding:10px 14px;border-radius:6px;margin-bottom:12px;background:#101e2a}.forge-extra-filters>summary{min-height:30px;cursor:pointer;color:#e5cf9e;font-weight:800}
@media(max-width:700px),(max-width:980px) and (orientation:portrait){
 .floating-ui.left.hero-hud{gap:4px;padding:8px}.floating-ui.right>.player-stats-header{--pile-w:var(--match-card-width);--pile-h:var(--match-card-height);gap:4px;margin-bottom:6px;padding-top:18px}.player-stats-header .deck-display .deck-count{font-size:13px;top:-21px}
 .hero-hud .hero-name{gap:4px;font-size:11px}.hero-name .portrait-medallion{width:26px;height:26px;flex-basis:26px}.hero-name .rank-emblem{width:21px;height:21px}.hero-hud>.hero-stats-container{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:3px;padding:5px}.hero-hud .hero-name,.hero-hud .hero-resource-meters{grid-column:1/-1}.hero-hud .stat-row{gap:3px;min-height:22px}.hero-hud .stat-val-out{font-size:13px;min-width:20px}.hero-hud .hero-ability-copy>strong{font-size:11px}.hero-ability-name{font-size:9px}.hero-resource-meter i{height:5px}.hero-resource-meter>span{margin-bottom:2px}
 .floating-ui.left .attack-all-btn{min-height:36px;padding:5px;font-size:11px}.hero-hud #player-mana-slots,.hero-hud #enemy-mana-slots{margin-bottom:0;min-height:28px}.hero-hud .mana-meter-label strong{font-size:16px}.hero-hud .mana-meter-label small{font-size:12px}.hero-hud .mana-meter-label>span{font-size:9px}
 #enemy-board{padding-top:195px;padding-bottom:0}#player-board{padding-top:0;padding-bottom:195px;align-items:center}.board>.board-slot{align-self:center}
}
@media(max-width:700px) and (max-height:720px){:root{--match-card-height:108px;--match-art-height:42px}#enemy-board{padding-top:200px}#player-board{padding-bottom:200px}.hero-hud .hero-resource-meter{font-size:9px}.floating-ui.left.hero-hud{gap:3px}}
@media(max-height:500px) and (min-width:701px){.floating-ui.left.hero-hud{width:190px;padding:5px 7px;gap:3px}.floating-ui.right>.player-stats-header{--pile-w:var(--match-card-width);--pile-h:var(--match-card-height);padding-top:18px;margin-bottom:4px}.hero-hud .hero-name .portrait-medallion{width:22px;height:22px;flex-basis:22px}.hero-hud .hero-name .rank-emblem{width:18px;height:18px}.hero-hud .hero-stats-container{display:grid;grid-template-columns:1fr 1fr;gap:2px;padding:4px}.hero-hud .hero-name,.hero-hud .hero-resource-meters{grid-column:1/-1}.hero-hud .hero-ability-name{font-size:8px}.hero-hud .hero-resource-meter{font-size:9px}.floating-ui.left .attack-all-btn{min-height:30px;padding:4px;font-size:10px}}

.hero-hud .hero-stats-container>*{min-width:0;box-sizing:border-box}.hero-hud .stat-row{min-width:0;width:100%}.hero-hud .bar-wrapper{width:0;min-width:8px;flex:1}.hero-resource-meter i{min-width:0;width:0}.hero-resource-meters{min-width:0}.hero-hud .stat-val-out{flex-shrink:0}
.player-stats-header .arena-slot{position:relative;flex:0 0 var(--pile-w)}
#player-board,#enemy-board{align-items:center}.board>.board-slot{align-self:auto}
@media(max-width:700px),(max-width:980px) and (orientation:portrait){.hero-hud .stat-icon{width:12px;flex:0 0 12px}.hero-hud .stat-icon .game-icon{width:12px;height:12px}.hero-hud .stat-val-out{width:20px;min-width:0;flex:0 0 20px}.hero-hud .hero-stats-container{gap:3px}}
@media(max-height:500px) and (min-width:701px){.hero-hud .stat-icon{width:12px;flex:0 0 12px}.hero-hud .stat-icon .game-icon{width:12px;height:12px}.hero-hud .stat-val-out{width:20px;min-width:0;flex:0 0 20px}.hero-hud .bar-wrapper{min-width:6px}}

.floating-ui.right .player-stats-header .arena-slot,.floating-ui.right .player-stats-header .deck-display img{width:var(--pile-w);height:var(--pile-h);min-width:var(--pile-w);box-sizing:border-box}
.forge-empty{grid-column:1/-1;padding:24px;text-align:center;color:#c1ccd1;border:1px dashed var(--v-border);border-radius:8px}
@media(max-width:700px),(max-width:980px) and (orientation:portrait){.side-menu-buttons{left:auto;right:8px;top:92px;transform:none;flex-direction:row;gap:4px}body[data-mode=pvp] .side-menu-buttons{top:152px}}
@media(max-height:500px) and (min-width:701px){.side-menu-buttons{left:auto;right:12px;top:88px;transform:none;flex-direction:row;gap:4px}body[data-mode=pvp] .side-menu-buttons{top:148px}}
/* Empty HUD padding must never cover a card's hit area. */
.floating-ui{pointer-events:none}.floating-ui>*{pointer-events:auto}


/* Three fixed piles in one row; discard cards share the hand's dimensions. */
.floating-ui.right>.player-stats-header{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-items:end;padding:24px 0 0;margin:0 0 8px;width:100%;min-height:0;overflow:visible;box-sizing:border-box}
.floating-ui.right .player-stats-header>.arena-slot,.floating-ui.right .player-stats-header>.deck-display{position:relative;display:block;width:100%;min-width:0;max-width:none;height:auto;min-height:0;aspect-ratio:5 / 7;margin:0;padding:0;box-sizing:border-box}
.floating-ui.right .player-stats-header .deck-display>img{position:absolute;inset:0;display:block;width:100%;min-width:0;max-width:100%;height:100%;aspect-ratio:auto;box-sizing:border-box;object-fit:cover;border:2px solid #b29257;border-radius:6px}
.player-stats-header .arena-slot{overflow:hidden;border-radius:6px}.player-stats-header .arena-slot:has(>.card){border:0;background:none;box-shadow:none}
.player-stats-header .arena-slot>.card{position:absolute;inset:0;width:100%!important;min-width:0!important;max-width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;transform:none!important;margin:0!important;overflow:hidden;box-sizing:border-box;display:flex;flex-direction:column;touch-action:manipulation!important}
.player-stats-header .arena-slot .card-img{flex:1 1 0;height:auto;min-height:0;margin:2px;overflow:hidden;border-radius:4px}
.player-stats-header .arena-slot .card-name{flex:0 0 16px;height:16px;min-height:0;max-height:16px;padding:2px;font-size:8px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
.player-stats-header .arena-slot .card-desc-container,.player-stats-header .arena-slot .card-stats,.player-stats-header .arena-slot .match-inspect{display:none!important}
.player-stats-header .arena-slot .card-cost{width:18px;min-width:18px;height:20px;top:3px;right:3px;font-size:12px}
.player-stats-header .arena-slot-text{font-size:9px;text-align:center;padding:3px;box-sizing:border-box}
.discard-menu-box{width:calc(100vw - 24px)!important;max-width:1800px!important}
#discard-grid{display:flex;flex-flow:row nowrap;align-items:stretch;justify-content:safe center;gap:12px;overflow-x:auto;overflow-y:hidden;padding:8px;box-sizing:border-box;max-width:100%;scrollbar-width:thin;scrollbar-color:#b39767 #18212b}
#discard-grid>button.card{display:flex;flex-direction:column;position:relative;flex:0 0 var(--match-card-width);width:var(--match-card-width);min-width:var(--match-card-width);max-width:var(--match-card-width);height:var(--match-card-height);min-height:var(--match-card-height);max-height:var(--match-card-height);box-sizing:border-box;overflow:hidden;padding:0;touch-action:pan-x pan-y;isolation:isolate}
#discard-grid .card-img{flex:0 0 var(--match-art-height);height:var(--match-art-height);min-height:0;overflow:hidden;margin:4px 4px 0}
#discard-grid .card-name{flex:0 0 clamp(20px,calc(var(--match-card-height)*.12),34px);height:clamp(20px,calc(var(--match-card-height)*.12),34px);min-height:0;max-height:34px;padding:3px;font-size:11px;line-height:1.2;white-space:normal;overflow:auto;box-sizing:border-box}
#discard-grid .card-desc-container{position:relative;display:block;flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#b39767 #18212b}
#discard-grid .card-desc-text{position:static;transform:none;display:block;width:100%;padding:4px;font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:break-word;box-sizing:border-box;opacity:1!important}
#discard-grid .card-lore-text{display:none}#discard-grid .card-stats{flex:0 0 clamp(24px,calc(var(--match-card-height)*.14),32px);height:clamp(24px,calc(var(--match-card-height)*.14),32px);min-height:0;max-height:32px;box-sizing:border-box}
#discard-grid .stat{width:clamp(16px,calc(var(--match-card-height)*.1),28px);height:clamp(18px,calc(var(--match-card-height)*.1),28px);font-size:clamp(12px,calc(var(--match-card-height)*.07),20px)}
#discard-grid .keyword-chip{white-space:normal;max-width:100%;box-sizing:border-box;font-size:10px}
@media(max-width:700px),(max-width:980px) and (orientation:portrait){.side-menu-buttons{top:120px}body[data-mode=pvp] .side-menu-buttons{top:170px}}
@media(max-height:500px) and (min-width:701px){.side-menu-buttons{top:112px}body[data-mode=pvp] .side-menu-buttons{top:162px}}
@media(min-width:981px) and (min-height:501px),
      (min-width:701px) and (orientation:landscape) and (min-height:501px){
 #crossroads-hud{left:16px;right:auto}
 #crossroads-hud[data-seal-notice]::after{left:0;right:auto}
}

@media(max-width:700px) and (max-height:720px){
 .floating-ui.left.hero-hud{padding:6px;gap:3px}.hero-hud .hero-ability-copy{display:block}.hero-hud .hero-ability-name,.hero-hud .hero-ability-copy>strong{display:inline;font-size:10px;line-height:1.2}.hero-hud .hero-ability-name::after{content:' · '}.hero-hud .hero-ability-costs{margin-top:3px}.hero-hud .hero-ability-panel .hero-power-btn{min-height:32px}.hero-hud .hero-ability-panel{padding:3px}.hero-hud .hero-ability-portrait{height:28px}.hero-hud .hero-portrait-info{min-height:32px}
 .hero-hud .hero-stats-container{padding:4px;gap:2px}.hero-hud .hero-name{margin:0}.hero-hud .hero-name .portrait-medallion{width:20px;height:20px;flex-basis:20px}.hero-hud .hero-name .rank-emblem{width:18px;height:18px}.hero-hud .stat-row{min-height:18px}.hero-hud .stat-val-out{height:18px;font-size:12px}.hero-hud .bar-wrapper{height:10px}
 .hero-hud #player-mana-slots,.hero-hud #enemy-mana-slots{min-height:22px;gap:2px}.hero-hud .mana-meter-label strong{font-size:14px}.hero-hud .mana-meter-label small{font-size:11px}.hero-hud .mana-crystals{min-height:6px}.hero-hud .mana-slots .mana-slot{height:6px!important}.floating-ui.left .attack-all-btn{min-height:30px;padding:4px}
}

@media(max-width:700px) and (max-height:720px){#player-hand{bottom:100px}}
#discard-grid .card-stats{padding:2px 4px}.player-stats-header .arena-slot-text{display:grid;place-items:center;width:100%;height:100%;}

.player-stats-header .deck-display.interactive:hover{transform:none}

/* Identity and contacts use fixed rows; actions and galleries live in native pop-ups. */
.launcher-account{min-width:0;gap:10px}.launcher-account #launcher-account-portrait{display:flex;flex:0 0 auto}.launcher-account .portrait-medallion{width:42px;height:42px;flex:0 0 42px}.launcher-account-divider{height:30px;width:1px;flex:0 0 1px;background:#d2b67755}.launcher-account #launcher-account-name{min-width:0;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.launcher-account #launcher-account-rank{display:flex;align-items:center;gap:7px;flex:0 0 auto;white-space:nowrap}.launcher-account #launcher-account-elo{font-variant-numeric:tabular-nums}.launcher-account.signed-out .launcher-account-divider{display:none}
#lobby-social-panel>summary{list-style:none;display:flex;align-items:center;justify-content:flex-end;padding:4px 12px;min-height:40px}.lobby-add-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.lobby-add-heading label{margin:0;white-space:nowrap;font-size:12px}.lobby-online-count{font:800 11px/1.3 Nunito,sans-serif;color:#add6c1;white-space:nowrap}
.lobby-friend>.friend-portrait-button{display:block;flex:0 0 52px;width:52px;height:52px;border:0;padding:0;background:none;cursor:pointer}.friend-portrait-button .portrait-medallion{width:52px;height:52px}.friend-name-button{display:block;border:0;padding:0;background:none;color:#e6d8b8;font:800 13px/1.4 Nunito,sans-serif;text-align:left;overflow-wrap:anywhere;cursor:pointer}.friend-name-button:hover{color:#fff0cb}.friend-actions-trigger{flex:0 0 36px;width:36px;height:44px;padding:0;border:0;background:none;color:#e4c991;font-size:17px;cursor:pointer}
.profile-panel .profile-identity{border:0!important;border-radius:0!important;background:none!important;padding:0!important;height:auto!important;min-height:0;align-items:center}.profile-panel #profile-overview{height:auto;min-height:0;max-height:none;overflow:visible}.profile-portrait-button{width:clamp(96px,12vw,132px)!important;height:auto!important;aspect-ratio:1;flex:0 0 auto;border:0;padding:0;border-radius:50%;background:none;cursor:pointer}.profile-portrait-button:hover{filter:brightness(1.1)}.profile-session-exit{position:static;clear:both}.profile-panel #profile-overview>.profile-session-exit{margin-top:24px}
.profile-popup{box-sizing:border-box;width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:24px;overflow:auto;border:1px solid #c5a87588;border-radius:12px;background:radial-gradient(ellipse at top left,#213b4655,transparent 65%),#101b26;color:#e8e5dc;box-shadow:0 24px 80px #000b;scrollbar-width:thin;scrollbar-color:#a58d60 #101b26}.profile-popup::backdrop{background:#030912b3}.profile-popup>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.profile-popup h2{font:700 23px/1.3 Cinzel,serif;color:#eedab0;margin:0}.profile-popup [data-close]{min-height:44px;padding:8px}.profile-popup-body{min-width:0}.profile-popup button{cursor:pointer}.profile-popup button:disabled{cursor:not-allowed;opacity:.5}
.friend-profile-identity{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin-bottom:24px}.friend-profile-identity>.portrait-medallion{width:100px;height:100px;flex:0 0 100px}.friend-profile-identity>div{min-width:0}.friend-profile-identity h3{margin:0 0 8px;font-size:24px;overflow-wrap:anywhere}.friend-ranking{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.friend-ranking .rank-emblem{width:32px;height:32px}.friend-match-list{display:grid;max-height:45dvh;overflow:auto;scrollbar-width:thin}.friend-match-list article{display:grid;grid-template-columns:80px minmax(0,1fr) auto;gap:12px;padding:14px 0;border-top:1px solid #a48c5b33;font-size:13px}.friend-match-list article>div{display:grid;gap:4px;overflow-wrap:anywhere}.friend-match-list time{font-size:11px;color:#b5c2cd}.friend-match-list .won{color:#9cdbc0}.friend-match-list .lost{color:#e3a2ab}
.appearance-preview{text-align:center}.appearance-preview>.portrait-medallion{width:110px;height:110px}.appearance-tabs{display:flex;gap:8px;margin:16px 0}.appearance-tabs button{flex:1;min-height:44px;border:1px solid #a88e6044;border-radius:5px;background:#152532;color:#c8d3db;font-weight:800}.appearance-tabs button[aria-pressed=true]{border-color:#ddc08b;color:#f0dcad;background:#343a35}.appearance-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.appearance-gallery>button{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:9px;min-width:0;padding:14px 8px;border:1px solid #a9926144;border-radius:8px;background:#15222e;color:#dedacf;font:700 13px/1.4 Nunito,sans-serif}.appearance-gallery>button[aria-pressed=true]{border:2px solid #e0c38b;background:#263933}.appearance-gallery>button>img{width:80px;height:90px;border-radius:6px;object-fit:cover}.appearance-gallery .portrait-medallion{width:90px;height:90px}.appearance-gallery small{font-size:11px;color:#b5c5d0}
@media(min-width:1001px){#lobby-social-panel>summary{display:none}}
@media(max-width:700px){.launcher-top{gap:10px}.launcher-account{gap:6px;padding:6px 8px;max-width:68%;font-size:12px}.launcher-account .portrait-medallion{width:30px;height:30px;flex-basis:30px}.launcher-account #launcher-account-name{max-width:90px;flex:1}.launcher-account #launcher-rank-emblem{width:22px;height:22px}.launcher-account #launcher-account-rank{gap:4px}.launcher-account-divider{height:24px}.launcher-account #launcher-account-elo{font-size:11px}.profile-popup{padding:18px}.profile-popup h2{font-size:20px}.appearance-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.friend-match-list article{grid-template-columns:70px minmax(0,1fr)}.friend-match-list time{grid-column:2}.friend-profile-identity>.portrait-medallion{width:80px;height:80px;flex-basis:80px}.friend-profile-identity{gap:12px}.friend-profile-identity h3{font-size:21px}}

.profile-popup>header h2{min-width:0;overflow-wrap:anywhere}

.launcher-top {
  position:relative;
  z-index:1;
  flex-direction:row;
  min-height:64px;
}
.launcher-top .launcher-nav {
  min-width:0;
  align-self:stretch;
  padding:0 3px;
  border:0;
  background:none;
  gap:clamp(12px,2vw,30px);
}
.launcher-header-controls {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:0;
  gap:8px;
}
.launcher-header-controls .launcher-account {
  max-width:100%;
  padding-inline:4px;
  border:0;
  background:none;
}
.launcher-header-controls .launcher-account:hover #launcher-account-name {color:#fff0cc}
.launcher-account-name-wrap {position:relative;min-width:0}
.launcher-account-name-wrap #launcher-account-name {display:block}
#launcher-profile-hint {
  position:absolute;
  top:calc(100% + 14px);
  right:0;
  width:max-content;
  padding:6px 10px;
  border:1px solid #a58d60;
  border-radius:6px;
  background:#111d29;
  color:#f2dfb7;
  font:700 12px Nunito,sans-serif;
  visibility:hidden;
  pointer-events:none;
}
.launcher-account:not(.signed-out) .launcher-account-name-wrap:hover #launcher-profile-hint,
.launcher-account:not(.signed-out):focus-visible #launcher-profile-hint {visibility:visible}
.launcher-settings {
  display:grid;
  place-items:center;
  flex:0 0 44px;
  height:44px;
  border:1px solid #b69a5d55;
  border-radius:8px;
  background:#121e29;
  color:#e3c78e;
  cursor:pointer;
}
.launcher-settings:hover {background:#24323e;color:#fff0cc}
.launcher-settings .game-icon {width:22px;height:22px}
.launcher-footer {
  position:relative;
  flex-direction:column;
  justify-content:center;
  gap:2px;
  padding:8px var(--v-space) 3px;
}
.launcher-footer .launcher-brand {margin:0;text-align:center;font-size:20px;letter-spacing:4px}
.launcher-footer .launcher-brand span {margin-top:2px;font-size:8px}
.launcher-footer .launcher-footer-links {justify-content:center}
.profile-statistics-link {min-height:44px;margin-top:12px}

#friend-actions-popover {
  position:fixed;
  inset:0 auto auto 0;
  margin:0;
  box-sizing:border-box;
  width:min(190px,calc(100vw - 16px));
  padding:5px;
  border:1px solid #ac925e;
  border-radius:10px;
  background:#13212e;
  color:#f0dfbd;
  box-shadow:0 10px 26px #0009;
  overflow:visible;
}
#friend-actions-popover:popover-open {display:grid}
#friend-actions-popover::before {
  content:'';
  position:absolute;
  left:var(--bubble-tip);
  top:-5px;
  width:8px;
  height:8px;
  background:inherit;
  border:solid #ac925e;
  border-width:1px 0 0 1px;
  transform:translateX(-50%) rotate(45deg);
}
#friend-actions-popover[data-above=true]::before {top:auto;bottom:-5px;transform:translateX(-50%) rotate(225deg)}
#friend-actions-popover button {
  position:relative;
  min-height:44px;
  padding:7px 10px;
  border:0;
  border-radius:5px;
  background:none;
  color:inherit;
  text-align:left;
  font:700 14px Nunito,sans-serif;
  cursor:pointer;
}
#friend-actions-popover button:enabled:hover,
#friend-actions-popover button:focus-visible {background:#c4a66625}
#friend-actions-popover button:disabled {opacity:.5;cursor:not-allowed}
#friend-actions-popover .danger-action {color:#efaab2}

@media (max-width:900px) {
  .launcher-top {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:0;
    padding-block:4px 0;
  }
  .launcher-header-controls {grid-row:1}
  .launcher-top .launcher-nav {grid-row:2}
  .launcher-top .launcher-nav button {min-height:44px}
}
@media (max-width:600px) {
  .launcher-top .launcher-nav {
    flex-wrap:wrap;
    gap:0 14px;
    overflow:visible;
  }
  .launcher-top .launcher-nav button {padding-block:6px;letter-spacing:.25px}
}

/* Shared panel chrome. Only the content scrolls between header and actions. */
.modal-panel {
  --modal-padding:clamp(16px,2.4vw,24px);
  --modal-width: min(720px,calc(100vw - 24px));
  box-sizing:border-box;
  width:var(--modal-width);
  max-width:100%;
  max-height:calc(100dvh - 24px);
  gap:0;
  padding:0;
  overflow:hidden;
  border:1px solid var(--v-border);
  border-radius:12px;
  background:radial-gradient(ellipse at top left,#28404b55,transparent 65%),var(--v-bg);
  color:var(--v-text);
  text-align:left;
}
.modal-panel:not(dialog),dialog.modal-panel[open] {
  display:flex;
  flex-direction:column;
}
dialog.modal-panel::backdrop {background:#030910d9}
.modal-panel>.modal-header,
.modal-panel>.modal-footer {
  position:relative;
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:12px;
  margin:0;
  padding:10px var(--modal-padding);
  min-width:0;
}
.modal-panel>.modal-header {
  justify-content:space-between;
  flex-wrap:nowrap;
  min-height:64px;
  box-sizing:border-box;
  border-bottom:1px solid var(--v-border);
}
.modal-header>div {min-width:0}
.modal-panel>.modal-header :is(h1,h2) {
  margin:0;
  padding:0;
  border:0;
  color:var(--v-gold);
  font:700 clamp(18px,2.4vw,24px)/1.3 Cinzel,Georgia,serif;
  letter-spacing:normal;
  text-align:left;
  overflow-wrap:anywhere;
}
.modal-panel>.modal-body {
  position:relative;
  min-width:0;
  min-height:0;
  max-height:none;
  padding:var(--modal-padding);
  overflow:auto;
  overscroll-behavior:contain;
}
.modal-body>:first-child {margin-top:0}
.modal-body>:last-child {margin-bottom:0}
#deck-code-input {display:block;width:100%;margin-top:8px;resize:vertical;font-family:monospace}
.modal-panel>.modal-footer {
  justify-content:flex-end;
  flex-wrap:wrap;
  border-top:1px solid var(--v-border);
}
.modal-footer:empty {display:none}
.modal-footer>.action-btn {
  flex:0 1 auto;
  width:auto;
  max-width:100%;
  min-width:0;
  min-height:44px;
  margin:0;
  white-space:normal;
}
.modal-footer>#dialog-btn-cancel {white-space:nowrap}
.modal-header .modal-x {
  position:relative;
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  min-height:44px;
  margin:0 0 0 auto;
  padding:0;
  border:1px solid transparent;
  border-radius:6px;
  background:none;
  color:var(--v-gold);
  box-shadow:none;
  cursor:pointer;
}
.modal-x::before,.modal-x::after {
  content:'';
  grid-area:1/1;
  width:17px;
  height:2px;
  border-radius:2px;
  background:currentColor;
  transform:rotate(45deg);
}
.modal-x::after {transform:rotate(-45deg)}
.modal-header .modal-x:hover {background:#a8926026;border-color:var(--v-border)}
.modal-header .modal-x:focus-visible {outline:2px solid var(--v-gold);outline-offset:2px}

/* Retire legacy outer spacing without changing feature-specific content. */
.menu-box.modal-panel:not(.deck-builder-menu-box),
.profile-panel.modal-panel,
.wiki-modal.modal-panel,
#reward-preview .reward-preview-panel.modal-panel,
#deck-builder-screen .deck-builder-menu-box.modal-panel {
  padding:0!important;
  gap:0;
  overflow:hidden!important;
}
.profile-panel.modal-panel,
.discard-menu-box.modal-panel {
  width:var(--modal-width)!important;
  max-width:100%!important;
  max-height:calc(100dvh - 24px)!important;
}
.wiki-modal.modal-panel,
#online-menu .menu-box.modal-panel,
#endgame-screen .endgame-menu-box.modal-panel,
#reward-preview .reward-preview-panel.modal-panel,
#deck-builder-screen .deck-builder-menu-box.modal-panel,
.duel-introduction>.modal-panel {
  width:var(--modal-width);
  max-width:100%;
  max-height:calc(100dvh - 24px);
}
.modal-panel.modal-wide {--modal-width:min(1440px,calc(100vw - 24px))}
#zoom-card-container {width:min(720px,calc(100vw - 24px))}
.modal-panel.card-details {max-width:100%}
.arena-art-dialog .modal-body img {display:block;width:100%;max-height:55dvh;object-fit:contain}
#deck-builder-screen .modal-body {
  display:flex;
  flex:1;
  flex-direction:column;
  gap:10px;
}
#deck-builder-screen .modal-body>.deck-workspace {min-height:220px;flex:1 0 220px}
#deck-builder-screen .modal-header {
  padding:10px var(--modal-padding);
  flex-wrap:nowrap;
}
#deck-builder-screen .modal-footer {
  position:relative;
  inset:auto;
  padding:10px var(--modal-padding);
  justify-content:flex-end;
}
#deck-builder-screen .modal-footer .action-btn {flex:0 1 auto}
@media(max-width:800px) {
  #deck-builder-screen .deck-builder-menu-box.modal-panel {height:calc(100dvh - 24px);border:1px solid var(--v-border);border-radius:12px}
  #deck-builder-screen .forge-heading span {display:none}
  #deck-builder-screen .modal-body>.deck-workspace {flex:none;overflow:visible}
  #deck-builder-screen .modal-body :is(.deck-collection,.deck-summary) {height:auto;overflow:visible}
  #deck-builder-screen .modal-body .deck-builder-grid {flex:none;max-height:none;overflow:visible}
}

