/* Release readability: use space and scrolling instead of shrinking labels. */
body{user-select:none;-webkit-user-select:none}input,textarea{user-select:text;-webkit-user-select:text}
button,select{touch-action:manipulation}button{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.modal :is(p,small,button,label,.eyebrow,.rarity,.online-note,.portal-note,.store-message,.card-action,.stat-chip,.journey-counter){font-size:12px;line-height:1.5;letter-spacing:.2px}
.modal h2{padding-inline-end:35px;overflow-wrap:anywhere}.modal h3{font-size:17px;line-height:1.35;overflow-wrap:anywhere}
.modal :is(.panel-grid,.shop-products,.hero-roster,.forge-offers,.journey-layout,.help-grid)>*{min-width:0}
.modal :is(.panel-card,.forge-offer,.store-card,.trial-card,.codex-card,.quest-row,.synergy-row,.journey-goal){min-width:0;overflow-wrap:anywhere}
.modal :is(.card-action,.primary-btn,.secondary-btn,.slot-tab,.text-btn){min-height:44px;height:auto}
.modal :is(.settings-line,.result-actions,.slot-tabs,.shop-actions,.forge-footer,.portal-note,.journey-summary){flex-wrap:wrap;gap:10px}
.modal-close{width:44px;height:44px;min-width:44px;position:sticky;float:right;top:0;margin:0 -12px 0 8px;right:auto}
.modal{scrollbar-gutter:stable;overscroll-behavior:contain;padding-top:20px;padding-bottom:28px}
.modal-content{min-width:0}.modal .upgrade-pick p{min-height:0}.modal .upgrade-pick{height:auto;min-height:0}
.rail-btn small{font-size:10px;line-height:1.2;letter-spacing:0;overflow-wrap:anywhere}.rail-btn{padding:8px 4px;height:auto}
.language-select{font-size:12px;min-height:44px}.currency,.top-actions .icon-btn{min-height:44px}
.lobby :is(.eyebrow,.tiny-tag,.chapter-label,.region-card small,.region-meta,.hero-badges,.daily-btn small,.quick-panel small,.mode-card small,.lobby-footer,.loadout-link,.rank-tag,.difficulty,.card-top){font-size:11px;line-height:1.45;letter-spacing:.4px}
.lobby :is(.region-card h3,.mode-card b,.quick-panel b,.daily-btn b){font-size:14px;line-height:1.4}
.region-card{min-height:135px;height:auto}.region-card p{font-size:12px}.region-symbol{pointer-events:none}
.lobby .quick-panel,.lobby .mode-card{min-width:0}.quick-panel>div,.mode-card>div{min-width:0}
.top-actions{flex-wrap:wrap}.lobby-footer{gap:12px;flex-wrap:wrap}.lobby-footer button{font-size:11px;min-height:36px}
.skill>b,.attack-skill small{font-size:10px;line-height:1.3}.skill{height:auto;min-height:72px;padding-bottom:8px}.skill>kbd{font-size:10px}
.game .vital-label b{font-size:12px;line-height:1.2}.game .vital-label span{font-size:11px;line-height:1.2}.game .xp-label{font-size:10px;letter-spacing:0}
.game .combo-pill,.game #spell-stage,.game .overdrive-meter>b,.game #hud-wave{font-size:10px;letter-spacing:0}
.game .run-goal b{font-size:12px}.game .run-goal small{font-size:11px!important}.boss-hud>span{font-size:12px}
.game .run-actions .icon-btn{width:44px;height:44px}.game .wave-banner small{font-size:10px;letter-spacing:1px}
.game .build-icons{max-width:40vw;max-height:92px;overflow:auto;flex-wrap:wrap;pointer-events:auto}
.game .run-hud{min-width:168px}.game .vitals{min-width:0}.vital-label b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.toast{line-height:1.5;font-size:13px;overflow-wrap:anywhere;max-width:calc(100vw - 32px)}
@media(max-width:900px){
 .rail{width:76px}.rail-btn{width:100%;min-height:68px}.rail-btn small{font-size:10px}
 .modal{max-height:calc(100dvh - 24px);width:calc(100vw - 24px);max-width:calc(100vw - 24px);padding:18px 24px 24px}
 .panel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.modal .panel-card{padding:22px 18px}
}
@media(max-width:600px){
 .topbar{height:auto;min-height:76px;flex-wrap:wrap;gap:10px;padding:12px}.brand{font-size:19px}.brand small{font-size:8px;letter-spacing:.8px}
 .top-actions{margin-inline-start:auto;gap:6px}.brand-mark{display:none}.language-select{max-width:88px}
 .rail{height:78px;width:100%;padding:5px 3px calc(5px + env(safe-area-inset-bottom));gap:2px}
 .rail-btn{width:auto;flex:1;min-width:0;min-height:62px;padding:6px 3px}.rail-btn small{font-size:10px}.rail-btn .ico{width:26px;height:26px}
 .lobby-main{padding:18px 12px calc(100px + env(safe-area-inset-bottom))}.lobby .rank-tag{font-size:11px;white-space:normal}
 .welcome{gap:10px;flex-wrap:wrap}.welcome h1{font-size:23px;line-height:1.3}.lobby .eyebrow{font-size:10px}
 .expedition-heading{flex-wrap:wrap;gap:10px}.region-card h3{font-size:14px}.regions{grid-template-columns:1fr}
 .region-card{min-height:110px;padding:20px}.region-symbol{right:15px}.mode-grid,.quick-panels{grid-template-columns:1fr 1fr}
 .mode-card,.quick-panel{padding:16px 12px;gap:8px;flex-wrap:wrap}.mode-card .painted-icon,.quick-panel .painted-icon{width:36px;height:36px}
 .lobby .mode-card small,.lobby .quick-panel small{font-size:11px}.mode-card>span{margin-inline-start:auto}
 .modal{border-image-width:22px;padding:16px 18px 24px}.modal h2{font-size:22px}.modal .panel-grid{grid-template-columns:1fr}
 .modal .upgrade-pick{grid-template-columns:68px minmax(0,1fr);gap:6px 12px;padding:20px 16px}.modal .upgrade-pick>.big-icon{width:66px;height:66px}.modal .upgrade-pick .big-icon .ico{width:64px;height:64px}
 .modal .upgrade-pick h3{font-size:16px}.modal .upgrade-pick p{font-size:12px}.modal .upgrade-pick .rarity{font-size:11px}.modal .upgrade-pick .card-action{font-size:12px;min-height:44px}
 .modal .slot-tabs{display:flex;flex-wrap:wrap}.modal .slot-tab{flex:1;min-width:75px;padding:10px}.modal .gear-card .big-icon{width:72px;height:72px}
 .modal .settings-line{display:flex;align-items:stretch}.quality-control{flex-wrap:wrap}.modal select{font-size:14px;min-height:44px;max-width:100%}
 .game .game-hud{display:grid;grid-template-columns:minmax(0,1fr) 66px;gap:6px;top:max(8px,env(safe-area-inset-top));left:8px;right:8px;align-items:start}
 .game .player-hud{width:100%;min-width:0;min-height:100px;padding:14px 12px;gap:7px;border-image-width:18px}
 .game .portrait{width:40px;height:40px;min-width:40px}.game .vitals{width:auto;flex:1;min-width:0}
 .game .vital-label{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:0 0 5px}.game .vital-label b{font-size:11px;max-width:100%}.game .vital-label span{font-size:11px}
 .game .xp-label{font-size:10px;display:flex;gap:3px}.game .hp-track{height:14px}.game .xp-track{height:9px}
 .game .run-actions{flex-direction:column;gap:4px;padding:10px 5px;width:66px;border-image-width:14px}.game .run-actions .kill-pill{font-size:12px;gap:4px}.game .kill-pill b{font-size:12px}
 .game .run-actions .icon-btn{width:44px;height:44px}.game .run-actions .sound-toggle{display:none}
 .game .run-hud{position:absolute;top:110px;left:0;right:auto;transform:none;min-width:128px;width:128px;padding:10px 16px;border-image-width:15px 22px}.game .run-hud>b{font-size:23px}.game #hud-wave{font-size:10px}
 .game .combat-strip{top:120px;left:146px;right:8px;max-width:none;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:5px}
 .game .combo-pill{font-size:10px;padding:5px 8px}.game .overdrive-meter{width:100px!important;height:24px!important}.game .overdrive-meter>b{font-size:9px}.game #spell-stage{display:none}
 .game #fusion-icons{display:none}.game .essence-pill{font-size:11px}.game .essence-pill .ico{width:18px;height:18px}
 .game .run-goal{top:196px;left:10px;right:10px;max-width:270px;padding:12px 15px}.game .run-goal b{font-size:11px}.game .run-goal small{font-size:10px!important}
 .game .boss-hud{top:194px;width:calc(100vw - 28px);padding:14px 20px}.game .boss-hud>span{font-size:11px}
 .game .wave-banner{top:195px}.game:has(.boss-hud:not([hidden])) .wave-banner{top:253px}
 .game-bottom{left:8px;right:8px;bottom:max(18px,calc(env(safe-area-inset-bottom) + 12px))}
 .game .skillbar{right:0;left:auto;padding:10px 10px;gap:5px;border-image-width:17px;transform:none}.game .skill{width:60px;min-height:70px}.game .skill .ico{width:38px;height:38px}.game .skill>b{font-size:10px}.game .attack-skill{width:34px}.game .attack-skill .ico{width:28px;height:28px}.game .attack-skill small{font-size:9px}
 .game .joystick{width:88px;height:88px;left:14px;bottom:max(20px,calc(env(safe-area-inset-bottom) + 12px))}.game .joystick i{left:21px;top:21px}
 .game .build-icons{bottom:110px;right:0;max-width:calc(100vw - 20px);max-height:65px;padding:7px 10px}.game .build-icons .ico{width:23px;height:23px}.game .build-icons b{font-size:10px}
 .game:not([hidden])~.toast{top:270px;font-size:12px}
}
@media(min-width:481px) and (max-height:620px){
 .game .game-hud{top:8px;left:10px;right:10px;gap:8px}
 .game .player-hud{min-width:250px;width:250px;padding:12px 14px;gap:8px;min-height:80px;border-image-width:20px}.game .portrait{width:42px;height:42px;min-width:42px}.game .vitals{width:166px}
 .game .vital-label{flex-wrap:wrap;gap:3px}.game .vital-label b{font-size:11px}.game .vital-label span{font-size:10px}.game .xp-label{font-size:10px}.game .hp-track{height:14px}.game .xp-track{height:8px;margin-top:4px}
 .game .run-hud{min-width:146px;width:146px;padding:9px 15px}.game .run-hud>b{font-size:23px}.game .run-label{display:none}
 .game .run-actions{padding:10px;gap:5px}.game .run-actions .sound-toggle{display:none}.game .kill-pill{padding:4px}.game .kill-pill b{font-size:13px}
 .game .combat-strip{left:12px;top:103px;gap:6px;flex-wrap:wrap;max-width:300px}.game #spell-stage,.game #fusion-icons{display:none}
 .game .run-goal{display:none}.game .boss-hud{top:100px;left:auto;right:14px;transform:none;width:min(330px,48vw);padding:12px 18px}.game .boss-hud>span{font-size:11px}
 .game .wave-banner{top:145px;padding:12px 22px}.game:has(.boss-hud:not([hidden])) .wave-banner{top:155px}
 .game .skillbar{left:auto;right:0;transform:none;padding:8px 14px;gap:8px;border-image-width:18px}.game .skill{width:60px;min-height:68px}.game .skill .ico{width:38px;height:38px}.game .skill kbd{display:none}.game .attack-skill{width:40px;height:50px}.game .attack-skill .ico{width:30px;height:30px}
 .game .game-bottom{bottom:max(10px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}.game .control-hint{display:none}.game .build-icons{bottom:95px;max-width:55vw;max-height:45px;padding:5px 10px}.game .build-icons .ico{width:22px;height:22px}
 .game .joystick{bottom:15px;width:88px;height:88px}.game .joystick i{left:21px;top:21px}
 .game:not([hidden])~.toast{top:180px;bottom:auto;max-width:55vw;font-size:12px;padding:12px 20px}
}
@media(min-width:601px) and (max-width:760px){.game .run-actions .sound-toggle{display:none}.game .player-hud{min-width:245px;width:245px}.game .run-hud{min-width:140px;width:140px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* Keep shimmer pixels inside their controls, including right-to-left layouts. */
.primary-btn:after,.card-action:after,.mode-card:after,.gear-card:after,.store-card:after,.roster-card:after{inset:0;transform:none;background-size:250% 100%;animation:ns-contained-sheen 9s ease-in-out infinite}
@keyframes ns-contained-sheen{0%,65%{background-position:180% 0;opacity:0}72%{opacity:.7}90%,100%{background-position:-80% 0;opacity:0}}
.mode-card{overflow:hidden}.region-card{overflow:hidden}.region-card .region-symbol{right:22px}
.lobby .keyart-copy{width:100%;max-width:440px}.lobby .keyart h2{font-size:clamp(38px,5vw,64px)}
.lobby .brand small{font-size:10px}.lobby .element-btn,.lobby .hero-switch{font-size:11px}.lobby #element-desc{font-size:12px}.modal .quest-row button,.modal .journey-chapters small{font-size:11px}
.modal .hero-unlock-copy{overflow-wrap:anywhere}.hero-trade-stats,.hero-trade-stats li,.hero-unlock-copy{font-size:12px!important;line-height:1.5}
.game .skill{flex-direction:column;gap:3px;height:auto;padding:9px 5px;min-height:85px}.game .skill>b{position:static;top:auto;bottom:auto;white-space:normal;letter-spacing:0;max-width:100%;font-size:10px;line-height:1.2}.game .skill>kbd{position:static;margin:0}.attack-skill small{display:none}
.game .run-hud{top:0}.game .combat-strip{top:152px}.game .vital-label{margin-bottom:0}
@media(max-width:600px){
 .modal .hero-roster{grid-template-columns:1fr}.modal .roster-top{font-size:12px}.modal .roster-top>b{font-size:11px}.modal .roster-copy>.eyebrow{font-size:11px}
 .game .run-hud{top:125px}.game .combat-strip{top:139px}.game .skill{min-height:82px}
 .game .run-goal{top:211px}.game .boss-hud{top:211px}.game .wave-banner{top:211px}.game:has(.boss-hud:not([hidden])) .wave-banner{top:270px}
 .lobby .brand small{display:none}.lobby .keyart-copy{padding:25px 23px}.lobby .keyart h2{font-size:48px;max-width:100%}.lobby .hero-badges{flex-wrap:wrap;gap:8px}
}
@media(min-width:601px) and (max-width:900px){.game .run-hud{width:160px;min-width:160px}.game .player-hud{width:260px;min-width:260px}.game .vital-label{flex-wrap:wrap;gap:3px}}
@media(min-width:481px) and (max-height:620px){
 .game .game-hud{display:flex;align-items:start;justify-content:space-between}.game .player-hud{width:clamp(200px,38vw,250px);min-width:0;min-height:0;padding:12px;gap:6px}.game .portrait{width:32px;height:32px;min-width:32px}.game .vitals{width:auto}
 .game .vital-label{flex-direction:row;flex-wrap:wrap;align-items:center;gap:3px}.game .run-hud{top:0;left:50%;right:auto;transform:translateX(-50%);width:128px;min-width:128px}.game .run-actions{flex-direction:row;width:auto;min-height:0;gap:4px;padding:10px}
 .game .combat-strip{top:114px;left:12px;right:auto;max-width:300px}.game .run-goal{display:none}.game .boss-hud{top:106px}.game .wave-banner{top:154px}.game:has(.boss-hud:not([hidden])) .wave-banner{top:166px}
 .game .skill{min-height:76px}.game .game-bottom{bottom:10px}.game .run-actions .sound-toggle{display:none}.game .game-hud .kill-pill{display:flex}.game:not([hidden])~.toast{top:175px;bottom:auto}
}
.region-card:before{right:0;top:0}
.shop-head{flex-wrap:wrap;gap:12px}.shop-head>div{min-width:0}.shop-head .premium-balance{margin-inline-start:auto;flex-shrink:0}
.quest-row button small{font-size:11px!important}
@media(max-width:600px){.game .skill{width:68px}.game .skillbar{gap:3px;padding-inline:8px}.game .attack-skill{width:30px}.shop-head>div:not(.premium-balance){flex:1 1 130px}}
@media(min-width:481px) and (max-width:600px) and (max-height:620px){.game .player-hud{width:200px}.game .skill{width:68px}}
.game:has(.wave-banner:not([hidden]))~.toast{visibility:hidden}
@media(min-width:481px) and (max-height:620px){.game .wave-banner,.game:has(.boss-hud:not([hidden])) .wave-banner{left:12px;right:auto;transform:none;top:152px;width:min(300px,52vw);padding:10px 16px}.game .wave-banner b{font-size:16px}.game .wave-banner small{font-size:10px}}
.modal .journey-goal>.card-action>small{font-size:11px}
.mage-card .elements{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.mage-card .element-btn{min-width:0;padding:8px 3px;flex-direction:column;font-size:10px;letter-spacing:0}.mage-card .element-btn .ico{width:23px;height:23px}
.welcome{flex-wrap:wrap;gap:12px}.welcome>div:first-child{flex:1 1 260px}.welcome #quick-start{padding:14px 24px;min-height:50px;font-size:12px;display:flex;gap:10px;align-items:center;justify-content:center}.welcome .rank-tag{flex-shrink:0}
@media(max-width:600px){.welcome #quick-start{order:3;width:100%;min-height:52px}.welcome>div:first-child{flex-basis:100%}.welcome .rank-tag{margin-inline-start:auto}.mage-card .element-btn{font-size:12px}}
.game .run-goal{top:196px}.game .boss-hud{top:196px}.game .wave-banner{top:205px}.game:has(.boss-hud:not([hidden])) .wave-banner{top:276px}
@media(max-width:600px){.game .run-goal,.game .boss-hud{top:211px}.game .wave-banner{top:211px}.game:has(.boss-hud:not([hidden])) .wave-banner{top:278px}}
@media(min-width:481px) and (max-height:620px){.game .boss-hud{top:106px}.game .wave-banner,.game:has(.boss-hud:not([hidden])) .wave-banner{top:164px;width:min(260px,45vw);left:12px;transform:none}}
.game .wave-banner{transform:translateX(-50%)}
@media(max-width:600px){.game:has(.boss-hud:not([hidden])) .wave-banner{top:310px}}
@media(min-width:481px) and (max-height:620px){.game .wave-banner,.game:has(.boss-hud:not([hidden])) .wave-banner{transform:none;top:164px}}
#game:has(#boss-hud:not([hidden])) #wave-banner{top:300px}
@media(max-width:600px){#game:has(#boss-hud:not([hidden])) #wave-banner{top:310px}}
@media(min-width:481px) and (max-height:620px){#game:has(#boss-hud:not([hidden])) #wave-banner{top:164px}}
@media(min-width:481px) and (max-width:700px) and (max-height:620px){#game #wave-banner,#game:has(#boss-hud:not([hidden])) #wave-banner{left:110px;top:180px;width:calc(100vw - 350px);padding:10px 14px}}
@media(max-width:600px) and (orientation:portrait){.game .run-goal{display:none}.game .joystick:after{content:attr(data-hint);position:absolute;bottom:5px;left:4px;right:4px;font-size:10px;line-height:1.2;text-align:center;color:#d9fff4;text-shadow:0 1px 3px #102333;pointer-events:none}}

/* v1.4: painted accents around clean surfaces, never stretched behind text. */
#lobby button,#modal button{border-image:none;border-color:#546983}
#lobby button.primary-btn,#modal button.primary-btn,#modal button.card-action{border-color:#a7ceba}
#lobby button:is(.selected,.active),#modal button:is(.selected,.is-active){border-color:#a5f8d9}
.veil{backdrop-filter:none;-webkit-backdrop-filter:none;background:#050a17b8;padding:12px;display:flex;align-items:center;justify-content:center}
.modal{position:relative;margin:0;transform:none;animation:ns-panel-fade .16s ease-out;background:linear-gradient(155deg,#1d2b44,#121b30);border-image:var(--frame-menu) 135 / 20px stretch;padding:32px;max-width:min(940px,calc(100vw - 24px));max-height:calc(100dvh - 24px);scrollbar-gutter:stable both-edges;text-shadow:none}
@keyframes ns-panel-fade{from{opacity:0}to{opacity:1}}
.modal-close{position:absolute;float:none;margin:0;inset:12px 12px auto auto;width:44px;height:44px}
[dir=rtl] .modal-close{inset:12px 12px auto auto}
.modal h2{padding-inline:38px;font-weight:800;letter-spacing:0;text-shadow:none}
.modal :is(p,button,label,select){font-size:14px;line-height:1.5;text-shadow:none}
.modal :is(small,.eyebrow,.rarity){font-size:12px;line-height:1.5;text-shadow:none}
.modal .eyebrow{padding-inline-end:44px}.modal .modal-intro{color:#c9d8eb}
.panel-card,.forge-offer,.store-card,.trial-card,.roster-card,.codex-card,.power-upgrade,.ad-offer,.help-grid>div,.quest-row,.synergy-row,.journey-goal,.journey-main,.journey-chapters button{border-image:none;border:1px solid #526580;background:linear-gradient(145deg,#24334d,#18243a);box-shadow:0 4px 14px #0003;border-radius:12px}
.panel-card.epic,.forge-offer,.store-card.featured,.trial-card,.roster-card.is-selected{border-color:#a487ce}
.primary-btn,.secondary-btn,.card-action,.pause-buttons button,.forge-footer button,.leaderboard-form button{border-image:none;border:1px solid #b8a16d;border-radius:9px;background:linear-gradient(#296769,#17464d);padding:12px 22px;min-height:48px;color:#fff2cc;font-weight:800;font-size:14px;letter-spacing:.2px;text-shadow:none;box-shadow:inset 0 1px #ffffff20,0 3px 0 #060f20}
.secondary-btn,.pause-buttons .secondary-btn{background:linear-gradient(#2c3d58,#1c2c45);border-color:#7489a3;color:#e7efff}
.rail-btn,.icon-btn,.gear-mini,.slot-tab,.element-btn,.currency,.rank-tag,.quality-control select,.language-select,.settings-line button{border-image:none;border:1px solid #546983;border-radius:8px;background:#1b2c44;text-shadow:none;box-shadow:none}
.rail-btn.active,.slot-tab.selected,.element-btn.selected{border-image:none;border-color:#9ce9d1;background:#244e57;box-shadow:inset 0 0 0 1px #9ce9d122;color:#eafff5}
.rail-btn small{font-size:12px;max-width:100%;font-weight:700;letter-spacing:0}.rail{width:104px;padding-inline:7px}.rail-btn{padding:10px 4px}
.slot-tab,.settings-line button,.quality-control select,.language-select{font-size:14px;min-height:44px;padding:10px 14px;font-weight:700;line-height:1.4}
.hero-card,.mode-card,.quick-panel,.region-card,.hero-switch,.loadout-preset{border-image:none;border:1px solid #586881;background:linear-gradient(140deg,#26374d,#1a273e);border-radius:12px}
.region-card.selected{border-image:none;border-color:#a4ebd2;background:linear-gradient(140deg,#2b514d,#203344);box-shadow:inset 0 0 0 1px #a4ebd244}
.keyart{border-image:none;border:1px solid #9c9476}.region-symbol{opacity:.24}.region-card h3,.region-card p{position:relative;z-index:1}
.primary-btn:after,.card-action:after,.mode-card:after,.gear-card:after,.store-card:after,.roster-card:after{opacity:.3;background:linear-gradient(110deg,transparent 43%,#fff5d11a 50%,transparent 57%)}
button:not(:disabled):hover{filter:none}.modal button:not(:disabled):hover,.rail-btn:hover{border-color:#d3f0df}
.art-icon{filter:none;image-rendering:auto;flex-shrink:0}
#modal[data-kind="pause"] .modal{width:560px;padding:34px 28px 28px}
.pause-panel{text-align:center;width:100%;margin:0}.pause-panel .eyebrow{padding:0!important}.pause-panel h2{margin:8px 0;font-size:30px}
.pause-panel .pause-buttons{width:min(100%,340px);margin:24px auto;display:grid;gap:12px}.pause-buttons button{width:100%;min-height:50px}
.pause-panel .settings-line{display:flex;justify-content:center;align-items:center;gap:12px;margin:0;flex-wrap:wrap}.pause-panel .settings-line button{min-height:44px;padding:10px 14px;white-space:normal}.quality-control{justify-content:center}
.game .player-hud,.game .run-hud,.game .run-actions,.game .skillbar,.game .build-icons,.game .run-goal,.game .control-hint{background:linear-gradient(150deg,#172e46ed,#111b30ed);border-image:var(--frame-hud) 125 / 12px stretch;box-shadow:0 3px 12px #0005}
.game .run-hud{padding:10px 16px}.game .run-actions{padding:8px}.game .run-actions .icon-btn{border-image:none}
.game .skill,.game .attack-skill{border-image:none;border:1px solid #9582b8;background:#201f38;border-radius:9px;box-shadow:inset 0 1px #ffffff25}
.game .skillbar{padding:8px 12px}.game .combo-pill,.game .essence-pill{border-image:none;border:1px solid #756688;background:#1c2338dd;border-radius:6px;padding:5px 8px}
.game .build-icons:empty{display:none}.game .build-icons{max-width:calc(50vw - 180px);max-height:78px;bottom:0}
#game #boss-hud{top:max(112px,calc(env(safe-area-inset-top) + 112px));left:50%;right:auto;transform:translateX(-50%);width:min(280px,32vw);padding:5px 12px;height:40px;border-image:none;border:1px solid #ab75b4;background:#241a35ed;border-radius:8px;box-shadow:0 2px 10px #0005;pointer-events:none;z-index:3}
#game #boss-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:16px;margin:0 0 3px;color:#ffe4ea;text-shadow:none}
#game #boss-hud>div{height:7px;padding:0;border:0;border-radius:3px;overflow:hidden;background:#100f20}
#game #boss-hud>div:before{display:none}#game #boss-fill{height:100%;border-radius:3px;background:linear-gradient(90deg,#be477f,#fb91be)}
#game:has(#boss-hud:not([hidden])) #wave-banner{top:180px}
.campaign-path{margin:18px 0 24px;border:1px solid #5e718b;border-radius:12px;background:linear-gradient(140deg,#21344c,#19263b);padding:20px;color:#d9e7f6}
.campaign-path header{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.campaign-path h3{margin:6px 0;font-size:20px;color:#fff0c7}.campaign-path p{font-size:14px;line-height:1.55;margin:14px 0 8px}.campaign-path small{font-size:12px}.campaign-rule{display:flex;align-items:center;gap:8px;color:#b4ffe3;font-size:14px}
.campaign-stages{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:16px}.stage-node{border:1px solid #576a85;border-radius:9px;background:#152237;padding:12px 5px;display:flex;align-items:center;flex-direction:column;gap:7px;min-width:0}.stage-node>span{font-size:15px;font-weight:800}.stage-node .ico{width:30px;height:30px}.stage-node.selected{border-color:#a5f8d9;box-shadow:inset 0 0 0 1px #a5f8d9;background:#244e50}.stage-node.cleared{color:#ffdfa2}.stage-node small{overflow-wrap:anywhere;font-size:12px}
@media(max-width:900px){.rail{width:88px}.rail-btn small{font-size:11px}.game .build-icons{max-width:calc(50vw - 120px)}}
@media(min-width:601px) and (max-width:900px) and (min-height:621px){#game #boss-hud{left:auto;right:12px;transform:none;width:210px;top:112px}}
@media(max-width:600px){
 .rail{width:100%;height:80px;padding:4px 3px}.rail-btn{min-width:0;padding:6px 2px}.rail-btn small{font-size:10px}.rail-btn .ico{width:26px;height:26px}
 .modal{padding:28px 18px 22px;border-image-width:14px}.modal h2{padding-inline:28px;font-size:22px}.modal :is(p,button,label,select){font-size:13px}.modal :is(small,.eyebrow,.rarity){font-size:11px}
 .modal-close{inset:8px 8px auto auto}.modal .panel-card{padding:18px 14px}.modal .upgrade-pick{padding:16px 12px}.modal .upgrade-pick h3{font-size:16px}.modal .upgrade-pick p{font-size:13px}
 #modal[data-kind="pause"] .modal{padding:30px 20px 24px}.pause-panel .settings-line{flex-direction:column;align-items:stretch}.pause-panel .quality-control{justify-content:space-between}.pause-panel h2{font-size:26px}
 .campaign-path{padding:15px}.campaign-stages{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.campaign-path h3{font-size:18px}
 .game .build-icons{bottom:106px;max-width:calc(100vw - 20px);max-height:60px}.game .skillbar{padding:8px}
 #game #boss-hud{top:139px;left:146px;right:8px;transform:none;width:auto;height:46px;padding:7px 9px}
 #game:has(#boss-hud:not([hidden])) .combat-strip{display:none}#game:has(#boss-hud:not([hidden])) #wave-banner{top:214px}
}
@media(min-width:481px) and (max-height:620px){
 #game #boss-hud{top:83px;left:auto;right:12px;transform:none;width:min(236px,calc(100vw - 326px));height:43px;padding:6px 10px}
 #game #boss-name{font-size:11px;line-height:15px}#game:has(#boss-hud:not([hidden])) .combat-strip{display:flex}
 #game:has(#boss-hud:not([hidden])) #wave-banner{top:164px}
 .game .build-icons{bottom:92px;max-width:55vw;max-height:45px}.pause-panel .pause-buttons{margin:12px auto;gap:8px}.pause-panel .settings-line{flex-direction:row;align-items:center}#modal[data-kind="pause"] .modal{padding:22px 24px}.pause-panel h2{font-size:23px}
}
/* Whole icon pages: neither wrapped rows nor half-visible cells at the edges. */
#game .build-icons{flex-wrap:nowrap;overflow:visible;max-height:none;padding:8px 10px 18px;gap:5px;align-items:center}
#game .build-items{display:flex;flex:0 0 auto;align-items:center;gap:4px;min-width:0}
#game .build-entry{display:grid;place-items:center;position:relative;flex:0 0 36px;width:36px;height:40px;border:1px solid #7e91a8;background:#1b2940;border-radius:6px}
#game .build-entry b{bottom:1px;right:1px;font-size:10px;line-height:1.2;padding:1px 3px}
#game .build-page{flex:0 0 30px;width:30px;height:40px;min-height:40px;border-image:none;border:1px solid #607590;background:#1a2d44;border-radius:6px;font-size:25px;line-height:1;padding:0;color:#ddffef}
#game .build-page-count{position:absolute;bottom:2px;left:0;right:0;text-align:center;font-size:10px;line-height:12px;color:#c7d9e8}
@media(max-width:999px){#game .build-entry{flex-basis:28px;width:28px;height:32px}#game .build-entry .ico{width:24px;height:24px}}
@media(max-width:600px){#game .build-page{flex-basis:36px;width:36px;height:44px}#game .build-icons{padding:6px 9px 17px;gap:4px}}
@media(max-width:600px){.language-select{font-size:12px;padding:8px 6px;max-width:100px}}

/* The roster follows the available panel width, never the monitor width. */
#modal[data-kind="heroes"] .modal{width:1100px;max-width:min(1100px,calc(100vw - 24px))}
#modal[data-kind="heroes"] .modal{scrollbar-gutter:stable}
.modal .hero-roster{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:18px;align-items:stretch}
.modal .roster-card{display:flex;flex-direction:column;min-width:0}
.modal .roster-top{position:relative;inset:auto;padding:12px 14px;font-size:13px;line-height:1.4;flex-wrap:wrap;min-height:58px;background:#12223970}
.modal .roster-top>.painted-icon{width:34px;height:34px}
.modal .roster-top>b{font-size:12px;line-height:1.4;color:#e8d7ff}
.modal .roster-card .roster-art{height:205px;flex:none}
.modal .roster-card .roster-art canvas{height:224px;width:210px;max-width:100%;filter:none}
.modal .roster-copy{padding:14px 18px 18px;display:flex;flex-direction:column;flex:1}
.modal .roster-copy>.eyebrow{padding:0;font-size:13px;letter-spacing:0;line-height:1.45;min-height:19px}
.modal .roster-copy h3{font-size:25px;letter-spacing:0;line-height:1.3;margin:5px 0}
.modal .roster-copy>small{font-size:13px;line-height:1.5;color:#c7d5e9;min-height:20px}
.modal .hero-starting{padding-block:14px;border-block:1px solid #8299b533;margin:16px 0;min-height:0;gap:7px}
.modal .hero-starting>b{font-size:11px;letter-spacing:.6px;color:#aebfd8}
.modal .hero-starting>span{font-size:14px;line-height:1.5;gap:10px;align-items:center}
.modal .hero-starting .ico{width:32px;height:32px;flex:0 0 32px}
.modal .hero-signature{background:#101c31;border:1px solid #68849980;border-radius:9px;padding:12px;margin:0 0 16px}
.modal .hero-signature>div{display:flex;gap:10px;align-items:center;font-size:14px;color:#c2ffe6;line-height:1.5}
.modal .hero-signature .ico{width:32px;height:32px;flex:0 0 32px}
.modal .hero-signature p{font-size:13px;line-height:1.6;color:#d2deed;margin:9px 0 0}
.modal .roster-card .hero-trade-stats{display:grid;grid-template-columns:1fr;min-height:0;gap:6px;margin-bottom:16px}
.modal .hero-trade-stats>span{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;line-height:1.5;padding:7px 10px;color:#e3eaf6;border:0;background:#101a2d80}
.modal .hero-trade-stats b{font-size:14px}
.modal .hero-mastery{margin-top:auto;font-size:12px;line-height:1.5;gap:8px;color:#c3d2e5}
.modal .hero-mastery>div{height:6px}
.modal .hero-unlock-copy{font-size:13px!important;line-height:1.6;margin:12px 0;min-height:42px;color:#c7d5e9;overflow-wrap:normal}
.modal .roster-copy>.card-action{font-size:15px;min-height:48px;padding:11px 12px;gap:10px;word-break:normal;overflow-wrap:normal;white-space:normal}
.modal .roster-copy>.card-action .ico{width:24px;height:24px}
.modal .roster-card.is-selected .card-action{opacity:1;color:#e3d6ff;background:#44365e;filter:none}
.modal .hero-cosmetics small{font-size:11px}
.modal .progression-heading h2{padding:0}
@media(max-width:650px){.modal .hero-roster{grid-template-columns:1fr}.modal .roster-copy{padding:14px 16px 18px}}

/* Native-resolution frame contours: thin bevels and clean gem corners. */
.modal{border-image:none;border:2px solid #d3b575;outline:1px solid #57452c;outline-offset:2px;box-shadow:inset 0 0 0 2px #152336,inset 0 0 0 3px #4a777c,0 18px 60px #0009;border-radius:16px}
.modal:before{content:'';position:absolute;top:7px;left:50%;width:12px;height:12px;transform:translateX(-50%) rotate(45deg);background:linear-gradient(135deg,#d7fff5,#4cddcb 45%,#176a7a 50%,#71e9de);border:1px solid #ffde8e;box-shadow:0 0 0 2px #162b3b;pointer-events:none}
.game .player-hud,.game .run-hud,.game .run-actions,.game .skillbar,.game .build-icons,.game .run-goal,.game .control-hint{border-image:none;border:1px solid #cfb176;border-radius:10px;box-shadow:inset 0 0 0 2px #132236,inset 0 0 0 3px #477479,0 3px 12px #0005}
.sound-toggle{position:relative}
.sound-toggle[aria-pressed="false"]:after{content:'';position:absolute;top:50%;left:20%;width:60%;height:3px;background:#ffd8d8;transform:rotate(-45deg);box-shadow:0 0 0 2px #17273f;border-radius:2px;pointer-events:none}
.talent-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px;margin-top:22px}
.modal .talent-card{padding:20px;display:flex;flex-direction:column;min-width:0}
.talent-card header{display:flex;align-items:center;gap:12px;min-height:94px}
.talent-card header .big-icon{margin:0;flex:0 0 62px}.talent-card header .big-icon .ico{width:62px;height:62px}
.talent-card header h3{font-size:19px;line-height:1.4;margin:6px 0}.talent-card header .eyebrow{padding:0}.talent-card header b{font-size:13px;color:#cad9ec}
.talent-current{padding:14px 0;margin-top:10px;border-block:1px solid #8299b533;font-size:14px;color:#b3f9df;font-weight:700}
.talent-tiers{list-style:none;padding:0;margin:18px 0;display:grid;gap:14px}.talent-tiers li>div:first-child{display:flex;justify-content:space-between;gap:12px;font-size:12px;line-height:1.5}.talent-tiers li span{white-space:nowrap;color:#bdcce0}.talent-tiers .pips{margin:7px 0 0}.talent-tiers .pips i{flex:1;min-width:0}.talent-tiers li.locked{color:#a7b6ca}.talent-tiers li.complete{color:#b8f5df}
.talent-next{font-size:14px;line-height:1.5;margin-bottom:18px}.talent-next p{font-size:12px;margin:8px 0 0}.talent-next .met{color:#adf0d6}.talent-next .needed{color:#e1ccac}
.talent-card>.card-action{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;margin-top:auto;padding:12px 10px;overflow-wrap:normal;word-break:normal}.talent-card>.card-action small{display:flex;align-items:center;gap:6px;font-size:12px}
/* Give desktop navigation labels the full rail width instead of the old 68px button. */
@media(min-width:601px){.rail .rail-btn{width:100%;box-sizing:border-box}.rail .rail-btn small{width:100%;max-width:none;word-break:normal;overflow-wrap:normal;hyphens:auto}}
.pause-panel .settings-line .sound-toggle{padding:0;min-width:44px;width:44px;height:44px;flex:0 0 44px;display:inline-flex;align-items:center;justify-content:center;align-self:center}
