/* v0.20.0 UI refresh: preserve pixel-art game graphics and focus on clarity. */
#startModal .home-mode{display:none!important}
#startModal .home-menu-panel{top:36%!important;gap:clamp(4px,0.8vh,9px)!important;width:min(390px,34vw)!important}
#startModal .home-menu-panel .menu-btn{min-height:clamp(32px,6.2vh,54px)!important;border-width:2px!important;border-radius:12px!important;box-shadow:0 4px 0 rgba(28,47,71,.48),0 9px 21px rgba(6,20,37,.28)!important;font-size:clamp(12px,1.55vw,18px)!important;padding:5px 13px!important;outline-offset:3px}
#startModal .home-menu-panel .menu-btn:hover{filter:brightness(1.1)!important}
#startModal .home-menu-panel .menu-btn:focus-visible{outline:3px solid #fffaad!important}
#startModal .home-menu-panel .menu-btn-side{min-width:0;padding:4px 9px;font-size:clamp(10px,1vw,14px);border-width:1px}
#startModal .home-menu-panel .menu-start-arrow{font-size:22px;color:#233634;background:rgba(255,255,255,.3)}
#modeSelectModal{z-index:180!important;position:fixed!important;inset:0!important;padding:clamp(8px,3vw,24px)!important;background:rgba(3,15,21,.79)!important;backdrop-filter:blur(7px);align-items:center;justify-content:center;overflow-y:auto}
#modeSelectModal[hidden]{display:none!important}
#modeSelectModal:not([hidden]){display:flex!important}
#modeSelectModal .mode-select-modal{position:relative;box-sizing:border-box;width:min(640px,100%);max-width:100%;max-height:calc(100dvh - 20px);overflow:auto;margin:auto;padding:clamp(16px,3vw,28px);border:2px solid #90c9a1;border-radius:18px;background:linear-gradient(160deg,#153c40,#0d2934 62%,#0c2430);color:#eefcf2;box-shadow:0 24px 80px rgba(0,0,0,.6),inset 0 1px rgba(255,255,255,.18);text-align:left}
.mode-select-modal .mode-head{position:relative;padding-right:28px}
.mode-select-modal .mode-kicker{color:#b7dfb5;font-size:10px;font-weight:900;letter-spacing:.18em}
.mode-select-modal h2{margin:6px 0;font-size:clamp(20px,3vw,28px);line-height:1.25;color:#f5fff4}
.mode-select-modal .mode-head p{margin:7px 0 18px;line-height:1.55;font-size:12px;color:#c1d8d7}
.mode-select-modal .mode-close{position:absolute;right:-5px;top:-8px;cursor:pointer;border:1px solid #6b9f92;border-radius:9px;color:#f2fff6;background:#244a51;width:33px;height:33px;font-size:24px}
.mode-card-list{display:grid;grid-template-columns:1fr;gap:9px}
.mode-select-modal .mode-card{width:100%;display:grid;grid-template-columns:46px minmax(0,1fr) 25px;align-items:center;gap:12px;padding:13px 15px;background:#183b46;border:1px solid #426d72;border-radius:12px;color:#e9f5f0;text-align:left;cursor:pointer;transition:background .14s,border-color .14s,transform .14s;min-height:75px}
.mode-select-modal .mode-card:hover{background:#21535a;border-color:#86bca6}
.mode-select-modal .mode-card.active{background:linear-gradient(110deg,#255d54,#1b454e);border:2px solid #b7f0b1;padding:12px 14px}
.mode-select-modal .mode-card:focus-visible,.mode-select-modal button:focus-visible{outline:3px solid #ffd977;outline-offset:2px}
.mode-select-modal .mode-symbol{display:grid;place-items:center;width:44px;height:44px;background:#0c2b32;border:1px solid #4f8575;border-radius:10px;font-size:25px}
.mode-select-modal .mode-card-copy{min-width:0;display:flex;flex-direction:column;gap:5px}
.mode-select-modal .mode-card-copy strong{font-size:15px;color:#fcfff4}
.mode-select-modal .mode-card-copy small{color:#a2c5ba;font-size:9px;letter-spacing:.08em;margin-left:5px}
.mode-select-modal .mode-card-copy>span{font-size:11px;line-height:1.45;color:#c5dbdc;white-space:normal}
.mode-select-modal .mode-check{font-weight:900;font-size:15px;opacity:.25;text-align:center}
.mode-select-modal .mode-card.active .mode-check{opacity:1;color:#d5ffc2}
.mode-select-modal .mode-detail{display:grid;grid-template-columns:1fr auto;gap:6px 8px;background:#0d2c33;border:1px solid #3a6c65;border-radius:10px;padding:13px 15px;margin:14px 0}
.mode-select-modal .mode-detail-label{font-size:10px;font-weight:800;color:#acd6bb;grid-column:1/-1}
.mode-select-modal #selectedModeText{font-size:12px;line-height:1.5;color:#fff3c6}
.mode-select-modal #modeDailyNote{font-size:10px;color:#b3d0cd;grid-column:1/-1}
.mode-select-modal .mode-difficulty{font-size:10px;color:#bdd5d0;white-space:nowrap;align-self:center}
.mode-select-modal .mode-difficulty b{color:#f3fce4;margin-left:3px}
.mode-select-modal .mode-actions{display:flex;justify-content:flex-end;gap:9px}
.mode-select-modal .mode-actions button{min-height:42px;padding:9px 20px;border-radius:9px;font-weight:800;cursor:pointer}
.mode-select-modal #modeSelectStart{background:linear-gradient(#c9efb5,#75bf96);border:1px solid #dfffc9;color:#15392b}
.mode-select-modal #modeSelectCancel{background:#27434c;border:1px solid #547478;color:#e4f5f1}
/* Combat controls: visually group frequent actions and secondary tools without moving functional elements. */
.battle-utility-panel{display:flex!important;align-items:center!important;gap:6px!important;padding:8px 10px!important;background:linear-gradient(180deg,rgba(14,41,50,.93),rgba(11,32,42,.93))!important;border:1px solid rgba(97,157,139,.4)!important;border-radius:12px!important;box-sizing:border-box}
.battle-utility-panel .utility-group-heading{font-size:10px;font-weight:900;letter-spacing:.04em;color:#d5f4da;white-space:nowrap;margin-right:4px}
.battle-utility-panel .utility-group-heading small{display:block;font-size:9px;font-weight:500;color:#91b8b3;margin-top:2px;letter-spacing:0}
.battle-utility-panel .button{min-height:34px!important;border-radius:8px!important;white-space:nowrap;display:inline-flex!important;align-items:center;justify-content:center;gap:5px;padding:6px 9px!important;font-size:11px!important;line-height:1.2!important;transition:filter .15s,border-color .15s}
.battle-utility-panel .button:hover{filter:brightness(1.16)}
.battle-utility-panel kbd{margin-left:4px;flex:none;border-radius:4px;font-size:10px;line-height:1.2;opacity:.92}
.battle-utility-panel .auto-wave-count{min-height:34px;display:flex;align-items:center;gap:3px;padding:3px 7px!important;border-radius:8px;background:rgba(255,255,255,.07)}
.battle-utility-panel #autoWaveCount{width:42px!important;text-align:center}
.section-heading{gap:8px}
.section-heading .stage-right{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.section-heading .mode-chip{font-weight:800;letter-spacing:0;max-width:100%;white-space:normal;text-align:center}
.sidebar-nav button,.unit-buttons .button,.research-item,.button-wave{transition:filter .15s,border-color .15s,box-shadow .15s}
.sidebar-nav button:hover,.unit-buttons .button:hover,.research-item:hover,.button-wave:hover{filter:brightness(1.08)}
.sidebar-nav button:focus-visible,.unit-buttons button:focus-visible,.research-item:focus-visible,.battle-utility-panel button:focus-visible{outline:2px solid #ffdb86!important;outline-offset:2px}
.selected-panel .unit-stats>div{border-radius:8px}
.selected-panel .unit-buttons{gap:6px}
#nextBossPreview{pointer-events:none}
@media(max-width:1000px){.battle-utility-panel .utility-group-heading{display:none}.battle-utility-panel .button{font-size:10px!important;padding:5px 7px!important}.battle-utility-panel{gap:4px!important;padding:6px!important}#startModal .home-menu-panel{width:min(320px,38vw)!important}}
@media(max-width:700px){#modeSelectModal .mode-select-modal{padding:16px;border-radius:12px}.mode-select-modal .mode-card{min-height:60px;grid-template-columns:35px 1fr 18px;gap:8px;padding:9px 10px}.mode-select-modal .mode-card.active{padding:8px 9px}.mode-select-modal .mode-symbol{width:34px;height:34px;font-size:19px}.mode-select-modal .mode-card-copy strong{font-size:12px}.mode-select-modal .mode-card-copy>span{font-size:10px}.mode-select-modal .mode-detail{padding:10px}.mode-select-modal .mode-actions button{min-height:38px;padding:7px 14px}.battle-utility-panel .button{min-height:30px!important}.battle-utility-panel kbd{font-size:9px}}
@media(max-height:560px) and (orientation:landscape){#modeSelectModal .mode-select-modal{padding:12px 16px}.mode-select-modal .mode-head p{margin:3px 0 9px}.mode-card-list{gap:5px}.mode-select-modal .mode-card{min-height:48px;padding:6px 10px;grid-template-columns:32px 1fr 18px}.mode-select-modal .mode-card.active{padding:5px 9px}.mode-select-modal .mode-symbol{height:30px;width:30px;font-size:17px}.mode-select-modal .mode-card-copy{gap:2px}.mode-select-modal .mode-detail{margin:7px 0;padding:7px 10px}.mode-select-modal .mode-actions button{min-height:30px;padding:5px 12px}}
@media(prefers-reduced-motion:reduce){.mode-select-modal .mode-card,.battle-utility-panel .button{transition:none!important}}
