/* css/style.css */
:root{--bg:#0a111c;--surface:#121e2b;--card:#162432;--border:#2b4052;--text:#edf6f7;--muted:#91a7b5;--mint:#60e5b0;--gold:#ffd37a;--blue:#6cbad8;--red:#ff8c94;--radius:15px}*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}body{margin:0;color:var(--text);font-family:'Pretendard','Noto Sans KR','Apple SD Gothic Neo',system-ui,-apple-system,sans-serif;font-size:14px;line-height:1.45;overflow-x:hidden}button{font:inherit;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible{outline:2px solid var(--mint);outline-offset:3px}button:hover:not(:disabled){filter:brightness(1.14)}[hidden]{display:none!important}.app-shell{max-width:1550px;margin:auto;padding:0 24px 24px}.topbar{display:flex;justify-content:space-between;align-items:center;min-height:93px;gap:22px;border-bottom:1px solid #243445;margin-bottom:22px}.brand{display:flex;align-items:center;gap:14px;white-space:nowrap}.poke-mark{position:relative;display:inline-block;width:44px;height:44px;background:linear-gradient(#fa6b75 0 46%,#112737 46% 56%,#f4f5ed 56% 100%);border:3px solid #d2ecf1;border-radius:50%;box-shadow:0 0 24px #60e5b01f;flex:none}.poke-mark:before{content:'';position:absolute;background:#172b35;height:5px;left:0;right:0;top:47%}.poke-mark span{position:absolute;left:13px;top:13px;width:12px;height:12px;border-radius:50%;background:#f5f7eb;border:3px solid #152736;z-index:1}.brand-top{font-size:14px;letter-spacing:.14em;font-weight:900}.brand-top span{color:#49caa0}.brand-sub{color:#94acbb;font-size:12px;font-weight:550;letter-spacing:.08em;margin-top:2px}.version{margin-left:9px;border:1px solid #377b68;color:#7df6be;padding:2px 7px;border-radius:5px;font-size:10px}.top-stats{display:flex;gap:8px;margin-left:auto}.stat-chip{min-width:108px;min-height:48px;background:#152432;border:1px solid #2b4051;border-radius:10px;display:grid;grid-template-columns:18px 1fr;grid-template-rows:16px 20px;column-gap:7px;padding:7px 12px}.stat-icon{grid-row:1/3;align-self:center;color:#91ebce;font-size:19px}.stat-label{font-size:9px;letter-spacing:.17em;font-weight:800;color:#8da9b9}.stat-chip strong{font-size:18px;line-height:1.1;letter-spacing:.02em;font-variant-numeric:tabular-nums}.stat-chip strong small{font-size:12px;color:#698395}.gold-chip .stat-icon,.gold-chip strong{color:var(--gold)}.heart-chip .stat-icon,.heart-chip strong{color:var(--red)}.header-actions{display:flex;gap:7px}.icon-btn{background:#172734;color:#d0e9ee;border:1px solid #2b4554;border-radius:9px;font-weight:800;font-size:19px;width:37px;height:40px}.main-layout{display:grid;grid-template-columns:minmax(0,1fr) 348px;align-items:start;gap:20px}.battlefield-card{min-width:0;background:#101d29;border:1px solid #2b4051;border-radius:var(--radius);overflow:hidden;box-shadow:0 20px 60px #0003}.section-heading{height:80px;display:flex;align-items:center;justify-content:space-between;padding:14px 21px;gap:12px}.heading-kicker,.eyebrow{font-size:10px;color:#7ba599;font-weight:800;letter-spacing:.16em}.section-heading h1{margin:4px 0 0;font-size:20px;font-weight:800;line-height:1.1}.section-heading h1 span{font-size:12px;font-weight:500;color:#758e9d;margin-left:8px}.stage-right{display:flex;align-items:center;gap:7px;color:#d0dfec;font-size:12px;white-space:nowrap}.phase-dot{background:#71e7af;width:7px;height:7px;border-radius:50%;box-shadow:0 0 10px #71e7af}.phase-dot.active{background:#ffbc67;box-shadow:0 0 10px #ffbc67}.vertical-rule{height:12px;border-left:1px solid #476072;margin:0 4px}.canvas-wrap{position:relative;width:100%;background:#182e2c;overflow:hidden}canvas{display:block;width:100%;height:auto;aspect-ratio:3/2;image-rendering:auto;touch-action:manipulation}.map-badge{position:absolute;top:14px;left:14px;pointer-events:none;border-radius:6px;border:1px solid #bce9c240;background:#09171ace;color:#dbf9d8;padding:7px 10px;font-size:10px;letter-spacing:.14em;font-weight:800}.tiny-dot,.glow-dot{display:inline-block;height:7px;width:7px;background:#74e2b3;border-radius:50%;box-shadow:0 0 10px #5fe2a2;margin-right:5px}.map-bottom{position:absolute;left:13px;bottom:10px;right:13px;display:flex;justify-content:space-between;gap:10px;color:#cde7d2;background:#092124a8;padding:6px 10px;border-radius:6px;pointer-events:none;font-size:10px;font-weight:700}.wave-popup{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%) scale(.91);min-width:300px;background:#0b1d29e8;border:1px solid #75d5b2a9;box-shadow:0 0 0 7px #1b3e3c55,0 12px 60px #0008;border-radius:14px;padding:18px 25px;text-align:center;opacity:0;pointer-events:none;transition:.3s}.wave-popup.visible{opacity:1;transform:translate(-50%,-50%) scale(1)}.wave-popup span{display:block;font-size:13px;letter-spacing:.2em;color:#80e8c4;font-weight:800}.wave-popup strong{display:block;font-size:40px;letter-spacing:.13em;font-weight:950;margin-top:2px}.toast-stack{position:absolute;top:58px;right:12px;display:flex;flex-direction:column;gap:6px;align-items:flex-end;pointer-events:none}.toast{background:#0b1c26ef;border:1px solid #70d2ad6b;padding:9px 13px;border-radius:8px;font-size:12px;max-width:275px;color:#e0fbf2;animation:toastIn .2s ease}.toast.warn{border-color:#ffbc7480;color:#ffdcac}@keyframes toastIn{from{transform:translateY(-8px);opacity:0}to{transform:translateY(0);opacity:1}}.battle-controls{display:flex;gap:9px;align-items:center;padding:14px 16px}.button{border:1px solid #365263;border-radius:9px;padding:10px 14px;font-weight:800;color:#d9ecf0;background:#1d3443;transition:filter .15s,background .15s}.button-wave{background:linear-gradient(135deg,#66e2ad,#38be91);color:#102932;min-width:205px;border:0;height:44px;display:flex;align-items:center;justify-content:center;gap:9px;box-shadow:0 5px 23px #46dfa22a}.button-wave:disabled{background:#2c544d;color:#abc5bf}.button-outline{height:44px;background:#182a38;white-space:nowrap;font-size:12px}.btn-symbol{font-size:13px}.keycap{border:1px solid #235e4e;background:#2c916e45;padding:3px 5px;border-radius:4px;font-size:9px;letter-spacing:.07em}.wave-progress{flex:1;min-width:75px;margin-left:6px}.wave-progress-caption{display:flex;justify-content:space-between;color:#99b3bf;font-weight:650;font-size:10px;margin-bottom:7px}.progress-rail{height:6px;border-radius:10px;background:#30404f;overflow:hidden}.progress-fill{height:100%;width:0%;background:linear-gradient(90deg,#62caa2,#b9ef9f);transition:width .25s}.battle-tip{border-top:1px solid #253c4b;background:#132330;padding:10px 18px;display:flex;align-items:center;gap:9px;color:#a7beca;font-size:11px}.tip-diamond{color:var(--gold)}.side-panel{display:flex;flex-direction:column;gap:14px;min-width:0}.panel{border:1px solid #294052;background:#13222f;border-radius:12px;padding:17px 17px 16px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.panel-tag{border-radius:4px;border:1px solid #3c735f;color:#77c5a5;padding:2px 6px;font-size:9px;letter-spacing:.09em;font-weight:800}.panel h2{font-size:17px;line-height:1.3;margin:5px 0 4px}.panel-caption{color:#839ba9;font-size:11px;margin:0 0 12px}.summon-button{display:flex;align-items:center;width:100%;gap:10px;background:linear-gradient(135deg,#61e3af,#43bf95);border:0;border-radius:9px;padding:12px;color:#0b302b;box-shadow:0 5px 26px #35c99323}.summon-ball{display:flex;width:37px;height:37px;border-radius:50%;background:#0c5142;color:#d9fff1;align-items:center;justify-content:center;font-size:29px;flex:none}.summon-copy{flex:1;text-align:left}.summon-copy strong{display:block;font-size:16px}.summon-copy small{display:block;font-size:10px;font-weight:650;color:#28624f}.summon-cost{font-size:13px;white-space:nowrap;color:#255144}.summon-cost b{font-size:18px}.rarity-strip{display:flex;flex-wrap:wrap;gap:4px;margin-top:12px}.rarity{border:1px solid #49515c;border-radius:4px;font-size:9px;padding:3px 7px;font-weight:700;background:#263440;color:#beced5}.rarity-rare{border-color:#376d65;color:#74e9af;background:#1b3b38}.rarity-epic{border-color:#655d95;background:#342e50;color:#c7a8ff}.rarity-special{border-color:#9d7e44;background:#3b3425;color:#f7d288}.selected-panel{min-height:246px}.selected-location{font-size:10px;color:#8ea6b4}.empty-unit{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:190px;color:#7d97a7}.empty-symbol{width:56px;height:56px;border-radius:50%;border:1px dashed #426172;display:flex;align-items:center;justify-content:center;font-size:29px;color:#609b92;margin:9px 0 14px}.empty-unit strong{color:#aec3ce;font-size:13px}.empty-unit p{font-size:11px;line-height:1.65}.unit-top{display:flex;gap:12px;align-items:center}.unit-iconbox{height:74px;width:74px;background:radial-gradient(circle at center,#45624f,#243b40);border:1px solid #457163;border-radius:11px;display:grid;place-items:center;flex:none}.unit-iconbox img{width:64px;height:64px;image-rendering:pixelated;object-fit:contain}.unit-identity{min-width:0}.unit-rarity{border-radius:3px;padding:2px 7px;background:#395044;color:#a8e2c2;font-size:10px;font-weight:800}.unit-stage{color:#ffda77;font-size:11px;margin-left:5px}.unit-identity h3{font-size:20px;margin:4px 0 3px}.type-tags{display:flex;gap:4px;flex-wrap:wrap}.type-tags span{border-radius:3px;background:#263c50;padding:1px 5px;font-size:9px;font-weight:700;color:#d3e5ec}.unit-lvl{display:flex;justify-content:space-between;font-size:11px;margin-top:13px;color:#b7ced4;font-weight:800}.exp-rail{height:5px;margin-top:6px;background:#2a3c4a;border-radius:5px;overflow:hidden}.exp-rail div{height:100%;width:0;background:#62d9ab;transition:width .2s}.unit-stats{display:grid;grid-template-columns:repeat(3,1fr);margin-top:11px;gap:6px}.unit-stats div{border-radius:6px;background:#1d3241;padding:7px;text-align:center}.unit-stats small{display:block;color:#7f9cac;font-size:10px}.unit-stats b{font-size:14px}.unit-skill{display:flex;align-items:center;gap:10px;padding:9px 4px;color:#c8dce1;font-size:12px}.unit-skill span{color:#74d8af;font-size:9px;font-weight:800;letter-spacing:.1em}.unit-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.unit-buttons .mini{padding:9px 7px;font-size:11px;display:flex;justify-content:space-between;gap:5px;white-space:nowrap}.unit-buttons b{color:#f6d08a;font-weight:650;font-size:10px}.unit-buttons .primary-mini{background:#234c42;border-color:#3a916c}.unit-buttons .sell-mini{background:#3b2730;border-color:#684750}.unit-buttons .sell-mini b{color:#ffbaae}.research-list{display:flex;flex-direction:column;gap:7px;margin-top:12px}.research-item{border:1px solid #2b4453;background:#1c303e;border-radius:9px;padding:9px;display:flex;align-items:center;gap:10px;text-align:left;color:inherit;width:100%}.research-symbol{width:34px;height:34px;border-radius:8px;background:#294e49;color:#92ebc5;display:grid;place-items:center;font-size:19px;flex:none}.research-detail{flex:1;min-width:0}.research-detail strong{display:block;font-size:11px;white-space:nowrap}.research-detail em{font-style:normal;color:#6bd6ad;font-size:9px}.research-detail small{display:block;font-size:10px;color:#8da8b4;margin-top:2px}.research-price{font-size:11px;color:#ffd68e;white-space:nowrap;font-weight:800}.record-label{font-size:10px;color:#f3ce82}.log-list{min-height:80px;max-height:116px;overflow-y:auto;display:flex;flex-direction:column;gap:5px;margin-top:6px}.log-entry{padding:4px 0;font-size:11px;color:#a0bac5;border-bottom:1px dashed #2a3c49}.log-entry strong{color:#e9d39b}.footer{display:flex;justify-content:space-between;gap:15px;padding:16px 4px;color:#637f8f;font-size:10px;flex-wrap:wrap}kbd{font:inherit;border:1px solid #375262;background:#192e3c;color:#b1cbd5;border-radius:4px;padding:2px 4px;margin:0 2px;font-size:9px}.modal-backdrop{position:fixed;z-index:20;inset:0;background:#050b12dc;display:grid;place-items:center;padding:20px;backdrop-filter:blur(8px)}.modal{position:relative;border:1px solid #488472;background:radial-gradient(ellipse at 50% 0,#234d45 0,#102431 45%,#0e1a27 95%);box-shadow:0 40px 120px #000b,0 0 60px #57d7a31a;border-radius:18px;color:#f0f9f6;text-align:center;padding:38px 34px;max-width:540px;width:100%;max-height:calc(100vh - 30px);overflow-y:auto}.modal-kicker,.result-kicker{font-size:11px;letter-spacing:.2em;color:#80e5b5;font-weight:900}.hero-pokeball{display:block;font-size:52px;color:#91f4ce;margin:18px 0 1px;filter:drop-shadow(0 0 25px #9affcc5c)}.intro-modal h1{font-family:system-ui,sans-serif;line-height:1.12;letter-spacing:.09em;font-size:34px;margin:10px 0 17px;font-weight:950}.intro-modal h1 em{font-style:normal;color:#71e5b1;letter-spacing:.04em;font-size:32px}.intro-modal p{font-size:13px;color:#b8d6dc;line-height:1.8;margin:0 0 24px}.intro-features{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #37655e;border-bottom:1px solid #37655e;margin-bottom:25px}.intro-features div{padding:12px}.intro-features div+div{border-left:1px solid #37655e}.intro-features b{font-size:27px;display:block;color:#fbda95}.intro-features span{font-size:10px;color:#8cb8aa}.intro-primary{display:flex;justify-content:center;align-items:center;gap:15px;border:0;background:linear-gradient(135deg,#7deec0,#40c798);color:#0c2e27;font-size:15px;padding:14px;width:100%;margin:0 auto;font-weight:900}.intro-secondary{display:block;width:100%;margin-top:8px;background:#214439;border-color:#488c75}.intro-note{color:#668f92;font-size:10px;margin-top:15px}.modal-close{position:absolute;top:15px;right:15px;background:none;border:0;color:#9fcecc;font-size:25px}.help-modal{text-align:left;max-width:620px}.help-modal h2{font-size:23px;margin:12px 0}.help-modal ol{padding-left:20px;color:#bcd1d9;line-height:1.8}.help-modal li{margin-bottom:8px}.help-modal li b{color:#8ee4c1}.help-keys{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}.result-modal h1{font-size:44px;margin:18px 0 0}.result-modal p{color:#afcbd2}.result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:27px 0}.result-stats>div{padding:12px 5px;background:#183544;border-radius:8px}.result-stats span{display:block;color:#95b7ba;font-size:11px}.result-stats strong{display:block;margin-top:8px;font-size:25px;color:#91efc1}@media(max-width:1220px){.main-layout{grid-template-columns:minmax(0,1fr) 322px}.app-shell{padding:0 14px 16px}.stat-chip{min-width:93px;padding:7px}.brand-top{font-size:12px}.battle-controls{flex-wrap:wrap}.wave-progress{flex-basis:100%;order:3}}@media(max-width:1040px){.main-layout{grid-template-columns:minmax(0,1fr)}.side-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.topbar{flex-wrap:wrap;padding:13px 0;gap:10px}.top-stats{margin-left:auto}}@media(max-width:640px){.app-shell{padding:0 9px 14px}.topbar{min-height:auto}.top-stats{width:100%;order:3;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.stat-chip{min-width:0;padding:6px 5px;grid-template-columns:12px 1fr;column-gap:4px}.stat-chip strong{font-size:13px}.stat-label{font-size:8px}.stat-icon{font-size:13px}.brand{gap:8px}.poke-mark{width:33px;height:33px}.poke-mark span{left:9px;top:9px;width:9px;height:9px}.brand-top{font-size:11px;letter-spacing:.07em}.brand-sub{font-size:9px}.section-heading{height:65px;padding:12px}.section-heading h1{font-size:17px}.section-heading h1 span{display:none}.stage-right{font-size:10px}.battle-controls{padding:9px;gap:5px}.button-wave{flex:1;min-width:145px;font-size:12px}.button-outline{font-size:11px;padding:9px}.keycap{display:none}.battle-tip{font-size:10px;padding:9px}.side-panel{grid-template-columns:minmax(0,1fr)}.footer{font-size:9px}.wave-popup{min-width:180px;padding:12px}.wave-popup strong{font-size:24px}.map-badge,.map-bottom{font-size:8px}.intro-modal h1{font-size:24px}.intro-modal h1 em{font-size:23px}.modal{padding:28px 20px}}

/* css/v02.css */
:root{--bg:#07121a;--surface:#112630;--card:#142a32;--border:#305760;--text:#ecfaf2;--muted:#9bb8b7;--mint:#87edbc;--gold:#fbd283;--radius:13px}
html,body{width:100%;height:100%;overflow:hidden}
body{background:radial-gradient(ellipse at 50% -30%,#1a3d3d 0,#08151d 55%,#07121a 100%);letter-spacing:.005em}
h1,h2,h3,.brand,.panel-head,.section-heading,.panel-tab,.side-title,.selected-location,.summon-button,.unit-top,.unit-skill,.research-item,.panel-tag,.rarity-strip,.unit-lvl,.wave-progress-caption,.map-badge,.map-bottom,.footer,.button,.stat-chip,.log-panel,.record-label,.fusion-summary,.fusion-card,.mini-recipe,.recipe-card,.recipe-top,.recipe-filters,.recipe-modal-bottom{ text-align:center }
.app-shell{max-width:none;width:100%;height:100dvh;padding:10px 15px 7px;display:flex;flex-direction:column;overflow:hidden;gap:8px}
.topbar{height:63px;min-height:63px;flex:none;margin:0;border:1px solid #2a4b51;border-radius:13px;background:#10222bd9;padding:7px 13px;position:relative;justify-content:space-between;gap:8px}
.brand{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;white-space:nowrap;pointer-events:none}
.brand h1{margin:0;font-size:17px;font-weight:950;letter-spacing:.07em;line-height:1.1}.brand h1 span{color:var(--mint)}
.brand-sub{font-size:10px;letter-spacing:.12em;margin-top:4px}.version{font-size:9px;margin-left:5px}
.brand-symbol img{width:42px;height:42px;display:block}
.top-stats{display:flex;gap:6px;margin:0;z-index:1}.stat-chip{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:46px;min-width:73px;padding:5px 8px;border-color:#2c5156;background:#172e37;gap:2px}.stat-chip strong{font-size:17px;line-height:1}.stat-chip strong small{font-size:10px}.stat-label{font-size:9px;letter-spacing:.12em}.header-actions{z-index:1;align-items:center;margin-left:auto}
.header-text-button{border:1px solid #427c69;background:#20413d;color:#b9f3d5;height:40px;border-radius:9px;padding:0 12px;font-weight:850;font-size:12px}.header-text-button kbd{margin-left:5px}
.icon-btn{height:40px;width:40px;background:#1b343e;border-color:#365663}
.main-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 345px;gap:10px;align-items:stretch}
.battlefield-card{height:100%;display:flex;flex-direction:column;min-width:0;border-radius:13px;background:#13282f;border-color:#31545a;box-shadow:none}
.section-heading{height:49px;min-height:49px;padding:6px 15px;justify-content:space-between;gap:6px;border-bottom:1px solid #2f5157}.heading-left{display:flex;align-items:center;gap:12px}.section-heading h2{font-size:16px;margin:0;white-space:nowrap}.section-heading h2 span{font-size:10px;color:#9fbbb9;font-weight:550}.heading-kicker{font-size:9px;color:#85c9af}.stage-right{font-size:11px}.phase-dot{margin-right:4px}
.canvas-wrap{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 40%,#1b3f40,#10292e);position:relative}
canvas{width:auto;height:100%;max-width:100%;aspect-ratio:3/2;object-fit:contain;image-rendering:auto;flex:none}
.map-badge{top:9px;left:10px;padding:4px 7px;font-size:9px}.map-bottom{width:auto;padding:4px 8px;left:9px;right:9px;bottom:7px;font-size:9px;justify-content:space-between}.map-bottom kbd{font-size:8px;padding:1px 3px}
.toast-stack{top:39px;right:10px}
.battle-controls{height:55px;min-height:55px;flex:none;gap:7px;padding:7px 10px;flex-wrap:nowrap;align-items:center}.button-wave{height:40px;min-width:186px;font-size:12px}.button-outline{height:40px;font-size:11px}.wave-progress{flex:1;min-width:70px;order:initial;flex-basis:auto;margin-left:4px}.wave-progress-caption{margin-bottom:5px}.battle-tip{height:27px;min-height:27px;padding:5px 13px;font-size:10px;justify-content:center}
.side-panel{height:100%;min-height:0;display:flex;flex-direction:column;gap:0;overflow:hidden;background:#10252f;border:1px solid #31535b;border-radius:13px;padding:9px}
.sidebar-nav{flex:none;height:43px;border-radius:9px;background:#081c26;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:4px;margin-bottom:10px}.panel-tab{border:0;background:transparent;color:#8eafaf;border-radius:6px;font-size:12px;font-weight:850}.panel-tab.active{color:#0b2a23;background:linear-gradient(135deg,#9af0bc,#5ed3a1)}
.side-panel>.panel{display:none!important;min-height:0;overflow:hidden;flex:none;padding:12px;border-color:#30555d;background:#142c35;box-shadow:none;margin:0;border-radius:10px}.side-panel[data-view=summon]>.panel[data-tab=summon],.side-panel[data-view=fusion]>.panel[data-tab=fusion],.side-panel[data-view=unit]>.panel[data-tab=unit],.side-panel[data-view=research]>.panel[data-tab=research]{display:block!important}
.side-panel[data-view=summon]>.panel[data-tab=summon],.side-panel[data-view=fusion]>.panel[data-tab=fusion],.side-panel[data-view=unit]>.panel[data-tab=unit]{flex:1;overflow-y:auto}
.side-panel[data-view=research]>.research-panel{flex:none;overflow:visible}.side-panel[data-view=research]>.log-panel{flex:1;overflow-y:auto;margin-top:9px}
.panel-head{justify-content:center;gap:8px;margin-bottom:7px}.panel h2{margin:2px 0 5px;font-size:17px}.panel-caption{font-size:11px;line-height:1.55;margin:0 0 12px;text-align:center}.panel-tag{letter-spacing:.02em}
.summon-button{height:69px;justify-content:space-evenly;padding:9px 10px;gap:7px}.summon-logo{height:39px;width:39px}.summon-copy{flex:none;text-align:center}.summon-copy strong{font-size:16px;text-align:center}.summon-copy small{text-align:center;color:#2b654c}.summon-cost b{font-size:19px}.summon-hint{margin:12px 0 0;border-radius:8px;background:#1a343c;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:9px;font-size:10px;text-align:center}.summon-hint span{color:#a5c0bf}.summon-hint b{color:#b8f1c9}.summon-sep{height:1px;background:#31535c;margin:13px 0}.side-title{font-size:12px;font-weight:850;color:#d7f6df;margin:4px 0 9px}
.mini-recipe-list{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.mini-recipe{border:1px solid #30535a;background:#203740;color:#ecf7f2;border-radius:8px;display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;padding:6px}.mini-recipe img{width:32px;height:32px;image-rendering:pixelated}.mini-recipe span{flex:1;font-size:11px;font-weight:800}.mini-recipe small{font-size:9px;display:block;color:#95b4af;font-weight:600}.mini-recipe.ready{border-color:#6cba89;background:#24493d}.mini-recipe:disabled{opacity:.7}.button-full{display:flex;justify-content:center;align-items:center;width:100%;min-height:39px;gap:6px;font-size:12px}.subtle-green{background:#22443c;color:#b5f4d0;border-color:#3e7763}
.fusion-summary{display:grid;grid-template-columns:1fr 1fr;gap:2px 6px;margin-bottom:12px;border-radius:8px;border:1px solid #345761;padding:9px}.fusion-summary span{font-size:10px;color:#a0bcbc}.fusion-summary strong{font-size:17px;color:#e4f5e7}.quick-fusion-list{display:flex;flex-direction:column;gap:7px;max-height:calc(100% - 155px);overflow-y:auto;padding-right:2px;margin-bottom:12px}.fusion-card{display:grid;grid-template-columns:37px 1fr auto;align-items:center;gap:9px;padding:8px;background:#203843;border:1px solid #355760;border-radius:9px}.fusion-card img{width:38px;height:38px;image-rendering:pixelated}.fusion-card-title{font-size:12px;font-weight:900}.fusion-card-sub{font-size:10px;color:#adc4c1;margin-top:4px}.fusion-card button{border:1px solid #5d9d7a;background:#386c51;color:#e7ffeb;border-radius:7px;padding:7px 9px;font-size:10px;font-weight:800}.fusion-card button:disabled{color:#8aabb1;background:#18343e;opacity:.7}
.unit-top{justify-content:center}.unit-identity{text-align:center}.unit-identity h3{font-size:20px}.type-tags{justify-content:center}.unit-rarity{font-size:11px}.unit-stage{font-size:10px}.unit-lvl{justify-content:space-between}.unit-skill{justify-content:center}.unit-buttons .mini{justify-content:center;flex-wrap:wrap;text-align:center}.unit-help{font-size:10px;color:#83b2a5;margin:13px 0 4px;text-align:center}.selected-panel{min-height:0}.empty-unit{min-height:230px}.log-list{max-height:none;min-height:0;overflow-y:auto}.research-detail strong,.research-detail small{text-align:center}.research-price{font-size:10px}.research-item{justify-content:center}.research-symbol{flex:none}
.footer{height:18px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 7px;font-size:9px;white-space:nowrap;overflow:hidden;line-height:1}.footer kbd{font-size:8px}
.modal-backdrop{z-index:50}.modal{background:radial-gradient(ellipse at 50% -20%,#1c5247 0,#102c35 60%,#0c202b 100%);border:1px solid #548e7b}.intro-modal{padding:24px 30px;max-width:480px}.intro-hero-image{display:block;width:68px;height:68px;object-fit:contain;margin:10px auto}.intro-modal h1{font-size:30px;margin:8px 0 12px}.intro-modal h1 em{font-size:28px}.intro-features{margin-bottom:16px}.intro-features b{font-size:24px}.intro-modal p{margin-bottom:13px;line-height:1.6}.modal-close{z-index:1}.help-modal{text-align:left}.help-modal h2{text-align:center}.help-modal li{text-align:left}.recipe-modal{max-width:980px;width:min(980px,96vw);height:min(790px,94dvh);padding:18px;display:flex;flex-direction:column;gap:9px;overflow:hidden}.recipe-top{display:flex;align-items:center;justify-content:center;position:relative;flex:none;min-height:69px}.recipe-top h2{margin:4px 0;font-size:22px}.recipe-top p{color:#a9c7c1;font-size:11px;margin:0}.recipe-filters{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;flex:none}.recipe-filter{border:1px solid #3a6365;border-radius:18px;background:#1c3b43;color:#bdd7cd;padding:7px 17px;font-size:11px;font-weight:800}.recipe-filter.active{background:#7de1ad;border-color:#8cf8bd;color:#14352e}.recipe-grid{min-height:0;flex:1;overflow-y:auto;padding:5px 4px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:8px}.recipe-card{border:1px solid #355e62;border-radius:11px;padding:10px;background:#19353e;min-height:144px;display:flex;flex-direction:column;gap:6px}.recipe-card.ready{border-color:#75c18b;background:#22453e}.recipe-result{display:flex;justify-content:center;align-items:center;gap:9px}.recipe-result img{width:41px;height:41px;image-rendering:pixelated}.recipe-result-title{font-size:13px;font-weight:900}.recipe-tier{font-size:10px;font-weight:800}.recipe-parts{display:flex;justify-content:center;align-items:center;gap:7px}.recipe-material{display:flex;align-items:center;gap:5px;padding:3px 8px;border-radius:6px;background:#102a33;font-size:10px}.recipe-material img{width:24px;height:24px;image-rendering:pixelated}.recipe-material b{font-weight:850}.recipe-material small{font-size:10px;color:#9fb6b7}.recipe-material.found{outline:1px solid #62ad81;color:#9bf4b3}.recipe-material.missing{outline:1px solid #704947;color:#e2b9ae}.recipe-card button{border:1px solid #579b79;background:#326a51;color:#e9ffec;border-radius:6px;padding:6px;font-size:11px;font-weight:850}.recipe-card button:disabled{border-color:#395962;background:#243d45;color:#91aeb0}.recipe-modal-bottom{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:#a3c6bc}.recipe-modal-bottom .button{height:34px;padding:6px 10px}.recipe-modal-bottom kbd{margin-left:4px}
@media(max-width:1400px){.app-shell{padding:7px 9px 5px;gap:6px}.topbar{height:57px;min-height:57px}.brand h1{font-size:14px}.brand-sub{font-size:9px}.brand-symbol img{width:32px;height:32px}.top-stats{gap:4px}.stat-chip{min-width:65px;padding:4px}.stat-chip strong{font-size:14px}.main-layout{grid-template-columns:minmax(0,1fr) 308px;gap:7px}.side-panel{padding:7px}.section-heading{height:41px;min-height:41px}.battle-controls{height:49px;min-height:49px}.battle-tip{height:24px;min-height:24px}.panel h2{font-size:15px}.sidebar-nav{height:38px;margin-bottom:6px}.footer{height:16px}.summon-button{height:61px}.panel-caption{margin-bottom:9px}}
@media(max-width:1060px){.main-layout{grid-template-columns:minmax(0,1fr) 285px}.brand{left:auto;right:152px;transform:none}.brand h1{font-size:12px}.brand-symbol{display:none}.brand-sub{display:none}.header-text-button{font-size:10px;padding:0 6px}.header-text-button kbd{display:none}.stat-chip{min-width:55px}.section-heading h2 span,.heading-kicker{display:none}.wave-progress{min-width:40px}}
@media(max-width:760px){html,body{height:auto;min-height:100%;overflow-y:auto}.app-shell{height:auto;min-height:100dvh;overflow:visible}.topbar{height:auto;min-height:0;flex-wrap:wrap;justify-content:center;gap:8px;padding:9px}.brand{position:static;transform:none;order:0;pointer-events:auto;width:100%;justify-content:center}.brand-symbol{display:block}.brand h1{font-size:15px}.brand-sub{display:block}.top-stats{order:1;justify-content:center;width:100%}.header-actions{order:2;margin:auto}.main-layout{grid-template-columns:1fr;gap:9px}.battlefield-card{height:auto}.canvas-wrap{height:auto}.canvas{width:100%;height:auto}.battle-controls{flex-wrap:wrap;height:auto;min-height:50px}.wave-progress{flex-basis:100%;order:3}.side-panel{height:380px}.footer{height:auto;padding:5px 0;flex-wrap:wrap;justify-content:center}.recipe-grid{grid-template-columns:1fr}.recipe-modal{height:min(700px,94dvh)} }
/* Center the battlefield title independently of the right-side stage indicator. */
.section-heading{position:relative;justify-content:flex-end}
.section-heading .heading-left{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;white-space:nowrap}
.section-heading .stage-right{margin-left:auto}
@media(max-width:1100px){.section-heading .heading-kicker{display:none}}

/* css/v03.css */
/* v0.3 refined desktop game HUD, full viewport */
:root{--bg:#091018;--surface:#111f2a;--card:#162734;--border:#314957;--text:#eef4f5;--muted:#a0b1bb;--mint:#83dec4;--gold:#f3d08f;--radius:12px}
*,*:before,*:after{box-sizing:border-box}
html,body{height:100%;width:100%;margin:0;overflow:hidden!important}
body{background:radial-gradient(ellipse at 44% -20%,#183944 0%,#09151f 57%,#08121c 100%);font-family:system-ui,'Noto Sans KR',-apple-system,sans-serif;color:var(--text)}
button{cursor:pointer;transition:filter .12s,background .12s,border-color .12s,transform .1s}
button:hover:not(:disabled){filter:brightness(1.13)}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible,input:focus-visible{outline:2px solid #a8f5d4;outline-offset:2px}
.app-shell{padding:10px 12px 80px;gap:9px;height:100dvh;max-width:2000px;margin:auto;overflow:hidden}
.topbar{height:62px;min-height:62px;border-color:#354958;background:#101e2bcf;box-shadow:0 8px 25px #040e1340;padding:7px 12px}
.brand h1{font-size:17px;letter-spacing:.085em}.brand h1 span{color:#8ee4c5}.brand-sub{color:#b8d0ce;font-size:10px}.version{background:#22463f;padding:3px 6px;border-radius:5px;color:#a6e9d4}
.brand-symbol img{width:39px;height:39px;image-rendering:pixelated;filter:drop-shadow(0 4px 10px #eadc9a55)}
.top-stats{gap:7px}.stat-chip{min-height:46px;border:1px solid #354955;border-radius:9px;background:#192d39;min-width:76px;padding:4px 9px}.stat-label{color:#94b3b7;font-weight:750}.stat-chip strong{font-size:17px}.gold-chip strong{color:#f7db9c}.heart-chip strong{color:#fca9a6}
.header-actions{gap:7px}.header-text-button{height:37px;background:#172f3a;border:1px solid #365b66;color:#d3efe8;border-radius:8px}.menu-trigger{background:#274239;border-color:#528771;color:#e5fff0}.icon-btn{height:37px;width:38px;background:#1b3540;border-color:#39545e}
.main-layout{grid-template-columns:minmax(0,1fr) clamp(300px,26.5vw,380px);gap:10px;min-height:0}
.battlefield-card,.side-panel{border:1px solid #354d59;background:#0e202c;border-radius:13px;box-shadow:0 10px 32px #02090b47;overflow:hidden}
.battlefield-card{min-height:0;height:100%;display:flex;flex-direction:column}
.section-heading{height:52px;min-height:52px;border-bottom:1px solid #314957;background:#132936;padding:7px 14px}
.section-heading h2{font-size:16px;letter-spacing:-.025em}.section-heading h2 span{font-size:10px;letter-spacing:.07em;color:#9bb9c1}.heading-kicker{font-size:9px;color:#8bccb1}.stage-right{font-weight:800;color:#c4d9d7;font-size:11px}.phase-dot{background:#7394a5}.phase-dot.active{background:#78e4ac}
.canvas-wrap{min-height:0;flex:1;position:relative;background:#102a34}
canvas{width:auto;height:100%;max-width:100%;object-fit:contain;touch-action:none;cursor:grab!important}
canvas.dragging{cursor:grabbing!important}
.map-badge{background:#072b33db;border-color:#639e91a3;color:#c7f1e1;padding:6px 10px;font-weight:800;top:12px;left:12px}
.map-bottom{background:#0a2532d6;border-color:#507d7a80;color:#acd1cf;border-radius:7px;padding:7px 10px;left:12px;right:12px;bottom:10px}
.toast-stack{top:45px;right:12px}
.battle-tip{flex:none;border-top:1px solid #294550;background:#132b35;height:30px;min-height:30px;text-align:center;justify-content:center;font-size:11px;color:#b3cecb;padding:6px 12px}
.battle-controls{position:fixed!important;left:max(12px,calc((100vw - 2000px)/2 + 12px));right:max(12px,calc((100vw - 2000px)/2 + 12px));bottom:11px;height:60px;min-height:60px;z-index:22;display:grid;grid-template-columns:minmax(220px,1.1fr) 145px 145px minmax(210px,1.1fr);gap:10px;padding:9px 12px;background:#122733f5;border:1px solid #42606b;border-radius:13px;box-shadow:0 12px 28px #0008;align-items:center}
.battle-controls .button{height:42px;width:100%;margin:0;border-radius:8px;display:flex;align-items:center;justify-content:center;gap:9px;font-size:13px;font-weight:900}
.battle-controls .button-wave{min-width:0;background:linear-gradient(115deg,#85e7b8,#57cda2);border:1px solid #a0ecc4;color:#0e362d;box-shadow:0 3px 12px #306f5450}
.battle-controls .button-outline{background:#213642;color:#e4f2f1;border:1px solid #42616a}
.battle-controls .wave-progress{order:initial;margin:0;min-width:0;padding:4px 10px}
.wave-progress-caption{color:#a6c6c6;font-size:10px}.progress-rail{height:8px;border:1px solid #35555e;border-radius:20px;background:#0e222e;overflow:hidden}.progress-fill{background:#92e4ad}
.side-panel{padding:10px;background:#0f222d}.sidebar-nav{height:43px;background:#091a25;border-radius:10px;padding:4px;margin-bottom:9px;gap:4px}
.panel-tab{font-size:12px;color:#99b0bc;border-radius:7px;letter-spacing:.01em}.panel-tab.active{background:#83e0bd;color:#0e302c;box-shadow:0 4px 12px #438a6552}
.side-panel>.panel{border:1px solid #324d5c;background:#172d38;padding:12px;border-radius:10px}
.panel-head{margin-bottom:7px}.eyebrow{font-size:9px;letter-spacing:.16em;color:#8dcbb8}.panel-tag{background:#26433f;color:#9aeac3;border-radius:20px;font-size:9px;padding:4px 8px}
.panel h2{font-size:18px;margin:4px 0 7px}.panel-caption{font-size:11px;color:#a7bdc2;margin:0 0 12px}.summon-button{border-radius:11px;height:74px;border:1px solid #9fe6b9;background:linear-gradient(120deg,#a5e8bd,#6dd6b2);box-shadow:0 6px 24px #46a78835;justify-content:center}.summon-logo{width:46px;height:46px;image-rendering:pixelated}.summon-copy strong{font-size:18px}.summon-cost{border-radius:7px;background:#d4f9da;font-size:12px}
.summon-hint{margin:10px 0 0;background:#1c3a46;border:1px solid #385460}.summon-hint b{color:#bff7d5}.summon-sep{margin:12px 0}.side-title{margin:7px 0 10px;color:#e0f8ea}.mini-recipe{background:#203742;border-color:#37515a;padding:7px}.mini-recipe.ready{border-color:#75cda0;background:#244b40}.mini-recipe img{width:33px;height:33px}.mini-recipe b{font-size:10px}
.fusion-summary{background:#1d3743;border-color:#3d5a66}.quick-fusion-list{max-height:none;overflow-y:auto;flex:1}.fusion-card{background:#233a44;border-color:#3b5860;min-height:62px}.fusion-card img{width:38px;height:38px}.fusion-card-sub{font-size:10px}
.unit-top{gap:12px}.unit-iconbox{border-radius:11px;background:#264c54;border-color:#54897a}.unit-stats{gap:7px}.unit-stats div{background:#203e48;border:1px solid #365660}.unit-buttons .mini{min-height:37px}.unit-help{color:#a9c8c3}.research-item{min-height:69px;background:#1e3945;border-color:#3c5960;border-radius:9px}.research-price{font-weight:900;color:#d6f7d2}.log-panel{background:#142936}
.footer{display:none!important}
.modal-backdrop{backdrop-filter:blur(7px);background:#050d15c9;z-index:61}.modal{background:linear-gradient(150deg,#1b3845,#112531 70%,#0e1e2d);border-color:#4e7881;box-shadow:0 24px 90px #0008}.intro-hero-image{width:75px;height:75px;image-rendering:pixelated}.intro-features b{font-size:23px}
.recipe-modal{max-width:1030px;width:min(1030px,96vw);height:min(850px,94dvh);padding:15px;gap:9px}.recipe-top{min-height:63px}.recipe-filters{gap:5px}.recipe-filter{padding:7px 13px;border-radius:7px}.recipe-search{height:40px;flex:none;border:1px solid #416771;background:#0b2531;border-radius:8px;display:flex;align-items:center;padding:0 12px;gap:8px}.recipe-search span{font-size:20px;color:#94d6bc}.recipe-search input{width:100%;border:0;outline:0;background:transparent;color:#eafcf3;font-size:13px}.recipe-search input::placeholder{color:#9abac2}.recipe-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:0;align-content:start}.recipe-card{min-height:146px;background:#18323e}.recipe-card.ready{border-color:#83d5ad;background:#25493e}.recipe-material{padding:4px 5px;min-width:0;max-width:45%}.recipe-material b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:94px}.recipe-card button{padding:8px}.recipe-modal-bottom{gap:12px}.recipe-pagination{display:flex;align-items:center;justify-content:center;gap:11px;margin:auto}.recipe-pagination button{height:32px;width:36px;border:1px solid #49717b;border-radius:7px;background:#1d3e49;color:#e4faf0;font-size:20px}.recipe-pagination button:disabled{opacity:.3}.recipe-pagination strong{font-variant-numeric:tabular-nums;font-size:11px}
.drag-ghost{position:fixed;transform:translate(-50%,-5px);min-height:54px;min-width:165px;max-width:230px;display:flex;align-items:center;gap:9px;padding:8px 11px;background:#192e3eeb;border:1px solid #7798a9;border-radius:11px;box-shadow:0 8px 24px #0008;pointer-events:none;z-index:90;opacity:0;visibility:hidden;transition:opacity .08s;white-space:nowrap}.drag-ghost.visible{opacity:1;visibility:visible}.drag-ghost.can-fuse{background:#234c40f5;border:2px solid #b2ecc0;box-shadow:0 0 28px #68cfa977}.drag-ghost img{height:42px;width:42px;object-fit:contain;image-rendering:pixelated}.drag-ghost>div{display:flex;flex-direction:column;gap:4px;text-align:center}.drag-name{font-size:13px}.drag-desc{font-size:10px;color:#b9d9cf}.can-fuse .drag-name{color:#a8f5cb}.can-fuse .drag-desc{color:#d2f4c7}
.center-toast{position:fixed;top:48%;left:50%;transform:translate(-50%,-50%) scale(.92);opacity:0;visibility:hidden;pointer-events:none;z-index:110;max-width:min(90vw,500px);padding:17px 23px;border:1px solid #e8ab9a;border-radius:13px;background:#362731f2;box-shadow:0 16px 65px #000a;color:#ffddd4;font-size:16px;font-weight:850;text-align:center;transition:transform .13s,opacity .13s}.center-toast.active{opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}
.escape-modal{position:relative;width:min(430px,94vw);max-width:430px;padding:27px 25px 21px;text-align:center;border:1px solid #609e91;border-radius:19px}.escape-modal h2{margin:6px 0;font-size:29px;letter-spacing:-.05em}.escape-subtitle{color:#aac3c7;font-size:12px;line-height:1.5;margin:8px auto 14px}.escape-progress{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #395c64;background:#122e37;border-radius:10px;padding:10px 13px;margin-bottom:13px}.escape-progress div{display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left}.escape-progress span{font-size:10px;color:#95bfb4}.escape-progress strong{font-size:11px;color:#e4f7ec}.escape-state-dot{height:10px;width:10px;border-radius:50%;background:#71deb4;box-shadow:0 0 13px #6bc59d}
.escape-actions{display:flex;flex-direction:column;gap:8px}.escape-actions .button{height:40px;min-height:40px;width:100%;display:flex;align-items:center;justify-content:center;background:#23404b;color:#e6f7ed;border:1px solid #50717a;border-radius:9px;font-size:13px;font-weight:850}.escape-actions .escape-main{background:#76dbb4;color:#153b34;border-color:#aaf7cf}.escape-actions .escape-save{background:#315b4e;border-color:#8cc5a2;color:#d1f8de}.escape-actions .danger-outline{background:#292d36;color:#efb7b2;border-color:#765259}.escape-twin{display:grid;grid-template-columns:1fr 1fr;gap:8px}.escape-actions .escape-twin .button{font-size:12px}.escape-foot{margin-top:13px;color:#92b2b6;font-size:10px;line-height:1.5}.escape-close{position:absolute;right:14px;top:12px;width:30px;height:30px;color:#bfdae1;background:#233944;border:1px solid #48707b;border-radius:7px;font-size:19px}
@media (max-width:1400px){.app-shell{padding:7px 8px 74px;gap:6px}.topbar{height:55px;min-height:55px;padding:5px 8px}.stat-chip{min-width:65px;min-height:43px;padding:3px 7px}.stat-chip strong{font-size:14px}.brand h1{font-size:14px}.brand-symbol img{width:32px;height:32px}.brand-sub{font-size:9px}.header-text-button{height:35px;font-size:11px;padding:0 8px}.icon-btn{height:35px;width:35px}.main-layout{grid-template-columns:minmax(0,1fr) 315px;gap:7px}.section-heading{height:43px;min-height:43px}.section-heading h2{font-size:14px}.battle-controls{left:8px;right:8px;bottom:7px;height:58px;min-height:58px;grid-template-columns:minmax(185px,1.1fr) 126px 126px minmax(165px,1fr);gap:7px;padding:7px 9px}.battle-controls .button{height:42px;font-size:12px}.battle-tip{height:27px;min-height:27px}.side-panel{padding:7px}.side-panel>.panel{padding:10px}.sidebar-nav{height:39px;margin-bottom:6px}.panel h2{font-size:16px}.summon-button{height:66px}.mini-recipe{padding:5px}.mini-recipe img{width:30px;height:30px}.heading-kicker{display:none}}
@media(max-width:1060px){.brand{position:absolute;left:50%;right:auto;transform:translateX(-50%)}.brand-symbol,.brand-sub{display:none}.brand h1{font-size:12px}.main-layout{grid-template-columns:minmax(0,1fr) 285px}.top-stats{gap:3px}.stat-chip{min-width:52px;padding:3px 5px}.header-text-button{font-size:10px}.header-text-button kbd{display:none}.battle-controls{grid-template-columns:1.35fr .8fr .8fr 1fr}.battle-controls .button{font-size:11px}}
@media(max-height:700px){.app-shell{padding-bottom:68px}.topbar{height:49px;min-height:49px}.section-heading{height:37px;min-height:37px}.battle-controls{height:53px;min-height:53px;bottom:6px}.battle-controls .button{height:37px}.battle-tip{height:22px;min-height:22px;font-size:9px}.sidebar-nav{height:34px}.side-panel>.panel{padding:8px}}
@media(max-width:760px){html,body{overflow:hidden!important;height:100%}.app-shell{height:100dvh;min-height:0;overflow:hidden;padding:5px 5px 68px;gap:4px}.topbar{height:52px;min-height:52px;flex-wrap:nowrap;gap:4px}.brand{display:none}.top-stats{order:0;width:auto;gap:2px;flex:1}.stat-chip{min-width:0;padding:3px;flex:1}.stat-chip strong{font-size:12px}.header-actions{order:1;width:auto;margin:0}.header-text-button{height:32px;padding:0 5px}.header-actions>#quickRecipeBtn,.header-actions>#helpBtn{display:none}.main-layout{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) 210px;min-height:0;gap:5px}.battlefield-card{height:100%;min-height:0}.canvas-wrap{height:auto;min-height:0}.canvas{height:auto;width:100%;max-height:100%}.section-heading{height:33px;min-height:33px}.section-heading h2{font-size:12px}.section-heading h2 span,.section-heading .stage-right{display:none}.battle-tip{display:none}.side-panel{height:210px;min-height:0;display:flex;overflow:hidden;padding:5px}.sidebar-nav{height:34px;min-height:34px;margin-bottom:3px}.side-panel>.panel{padding:8px;min-height:0;overflow-y:auto}.summon-button{height:48px}.summon-logo{width:30px;height:30px}.summon-copy strong{font-size:13px}.summon-hint,.summon-sep,.mini-recipe-list,.side-title,.summon-panel #summonRecipeBtn,.panel-caption{display:none}.battle-controls{height:55px;grid-template-columns:minmax(0,1.3fr) 58px 58px;gap:4px;padding:5px;bottom:5px;left:5px;right:5px}.battle-controls .button{height:42px;min-width:0;font-size:10px;padding:2px}.battle-controls .button-outline span,.battle-controls .keycap,.wave-progress{display:none}.recipe-grid{grid-template-columns:1fr}.recipe-modal{height:94dvh;width:97vw}.recipe-modal-bottom #recipeStatus{display:none}}

/* css/v04.css */
/* v0.4 - GitHub Pages + landscape mobile + refined combat layout */
:root{--rarity-common:#bec7cb;--rarity-rare:#62e5a0;--rarity-epic:#c99bff;--rarity-legendary:#ffdc62;--rarity-mythic:#ff8bc9}
.rarity-common{color:var(--rarity-common)!important}.rarity-rare{color:var(--rarity-rare)!important}.rarity-epic{color:var(--rarity-epic)!important}.rarity-legendary{color:var(--rarity-legendary)!important}.rarity-mythic{color:var(--rarity-mythic)!important}
.app-shell{padding:9px 10px 9px!important;gap:7px;height:100dvh!important;min-height:0!important}
.topbar{height:57px;min-height:57px;flex-shrink:0}
.brand{pointer-events:none}
.main-layout{min-height:0!important;flex:1;grid-template-columns:minmax(0,1fr) clamp(276px,23vw,360px)}
.battlefield-card{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.section-heading{min-height:40px!important;height:40px!important;flex:none}
.section-heading .heading-left{left:50%;text-align:center}
.battle-controls{position:static!important;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,.9fr) minmax(0,.9fr);align-items:center;gap:7px;margin:0;padding:5px 9px;flex:none;height:51px!important;min-height:51px!important;left:auto!important;right:auto!important;bottom:auto!important;border-radius:0;background:#142c39;border:0;border-bottom:1px solid #2f515c;box-shadow:none;z-index:4}
.battle-controls .button{height:39px!important;width:100%;padding:5px;font-size:12px;white-space:nowrap}
.battle-controls .button-wave{background:linear-gradient(110deg,#91efb8,#66d7be)}
.battle-controls .wave-progress{display:none}
.canvas-wrap{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;overflow:hidden}
.canvas-wrap canvas{display:block!important;width:auto!important;height:auto!important;max-height:100%!important;max-width:100%!important;aspect-ratio:3/2;object-fit:contain;touch-action:none}
.map-bottom{display:none!important}.map-badge{font-size:9px;pointer-events:none}
.map-wave-progress{flex:none;display:flex;flex-direction:column;margin:0!important;padding:6px 11px 8px;background:#132c38;border-top:1px solid #2f515b;gap:3px;height:42px;min-height:42px;width:100%}
.map-wave-progress .wave-progress-caption{display:flex;justify-content:space-between;font-size:10px;text-align:center;line-height:14px}
.map-wave-progress .progress-rail{height:8px;width:100%}
.battle-tip{height:24px!important;min-height:24px!important;font-size:10px;flex:none;overflow:hidden;white-space:nowrap}
.summon-button{display:grid!important;grid-template-columns:45px minmax(0,1fr) auto;gap:7px!important;justify-content:normal!important;align-items:center;padding:9px 11px!important;min-height:74px;width:100%}
.summon-logo{display:block;margin:auto;width:41px!important;height:41px!important}
.summon-copy{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:3px}
.summon-copy strong,.summon-copy small{display:block;white-space:nowrap}
.summon-copy strong{font-size:17px}.summon-copy small{font-size:10px}
.summon-cost{display:flex;flex:none;gap:4px;align-items:center;justify-content:center;min-width:62px;margin:0!important;padding:6px 7px!important;white-space:nowrap;font-size:12px;font-weight:900;color:#184c39;background:#d6f8dd;border-radius:8px}
.summon-cost b{font-size:19px;font-variant-numeric:tabular-nums}
.summon-odds{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px 7px;text-align:center;margin:9px 0!important;padding:9px!important}
.summon-odds span{font-size:11px;color:#d4e8e2;font-weight:800}.summon-odds b{font-size:16px!important}
.top-stats{flex-shrink:0}.header-actions{flex-shrink:0}#fieldInfoBtn{background:#1d3c49;border-color:#4e7983}
.recipe-filters{justify-content:center}.recipe-filter.owned-filter{border-color:#76bca4;color:#baf7d9;background:#1c453e;margin-left:7px}
.recipe-filter.owned-filter.active{color:#0a3429;background:#86eec2}
.recipe-grid{overflow-y:auto!important;overscroll-behavior:contain;touch-action:pan-y;scrollbar-color:#548f87 #122a36;scrollbar-width:thin;user-select:none;cursor:grab;scroll-behavior:auto}
.recipe-grid.panning{cursor:grabbing}.recipe-modal{height:min(840px,95dvh)}
.recipe-modal-bottom{min-height:29px;flex-wrap:wrap;justify-content:space-between}.recipe-scroll-hint{color:#83b5b3;font-size:11px}
.recipe-card{min-height:139px}.recipe-card .recipe-result-title{color:#e8f8ef}.recipe-card button{cursor:pointer}
#toastStack{display:none!important}.center-toast{z-index:140;max-width:min(85vw,520px)}
.fields-modal{position:relative;width:min(530px,95vw);max-width:530px;text-align:center;padding:30px}.fields-modal h2{margin:6px 0;font-size:26px}.fields-modal p{color:#b6d3d1;font-size:13px}
.field-list{display:grid;gap:9px;margin:20px 0}.field-list>div{display:flex;flex-direction:column;gap:6px;background:#1e3d49;border:1px solid #40616b;padding:13px;border-radius:10px}.field-list b{font-size:15px}.field-list span{font-size:11px;color:#a7c4c6}.fields-modal .intro-primary{width:100%;height:44px}
.orientation-overlay{display:none;position:fixed;inset:0;background:radial-gradient(circle at 50% 33%,#214b58,#0b1b2c 62%,#081421);z-index:300;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:26px;color:#e3ffef}
.orientation-overlay h2{font-size:clamp(20px,6vw,29px);margin:5px 0 9px}.orientation-overlay p{color:#b4d6d0;line-height:1.6;margin:0;font-size:13px}
.rotator-scene{position:relative;width:210px;height:200px;display:grid;place-items:center;margin-bottom:15px}
.rotator-orbit{position:absolute;width:168px;height:168px;border:2px dashed #4ba79a;border-radius:50%;animation:orbit 9s linear infinite;box-shadow:0 0 35px #56bbad35}
.rotator-phone{width:80px;height:137px;border:5px solid #dbfdf2;border-radius:18px;background:#071721;box-shadow:0 8px 30px #0009,0 0 35px #5adebd4a;position:relative;padding:9px;transform-origin:50% 50%;animation:rotate-phone 3.2s ease-in-out infinite}
.rotator-notch{position:absolute;width:33px;height:5px;border-radius:4px;background:#839eaa;left:50%;top:5px;transform:translateX(-50%)}
.rotator-screen{height:100%;width:100%;background:linear-gradient(135deg,#3c826e,#214d72);border-radius:9px;display:grid;place-items:center}.rotator-screen span{font-size:30px;filter:drop-shadow(0 0 10px #ffe681);animation:glow 1s ease-in-out infinite alternate}
.rotator-arrow{position:absolute;right:4px;top:29px;font-size:53px;font-weight:800;color:#85ebd5;animation:arrow-spin 3.2s ease-in-out infinite;filter:drop-shadow(0 0 8px #77e6ba)}
@keyframes rotate-phone{0%,16%{transform:rotate(0)}42%,72%{transform:rotate(90deg)}90%,100%{transform:rotate(0)}}
@keyframes orbit{to{transform:rotate(360deg)}}@keyframes arrow-spin{0%,15%{transform:rotate(-25deg)}48%,80%{transform:rotate(68deg)}100%{transform:rotate(-25deg)}}
@keyframes glow{to{filter:drop-shadow(0 0 18px #fcef6e);transform:scale(1.12)}}
@media(max-height:780px){.app-shell{padding:5px 7px!important;gap:5px}.topbar{min-height:47px;height:47px}.section-heading{min-height:35px!important;height:35px!important}.battle-controls{min-height:43px!important;height:43px!important;padding:3px 7px}.battle-controls .button{height:35px!important}.map-wave-progress{min-height:34px;height:34px;padding:3px 9px 5px}.battle-tip{height:20px!important;min-height:20px!important}.sidebar-nav{height:34px}.side-panel>.panel{padding:8px}}
/* Dedicated horizontal mobile layout. No stacked desktop columns and no body scroll. */
@media (max-width:1100px) and (orientation:landscape) and (hover:none){
 html,body{width:100%;height:100%;overflow:hidden!important}
 .app-shell{width:100%;height:100dvh!important;padding:3px 4px!important;display:flex;flex-direction:column;gap:3px;min-height:0}
 .topbar{width:100%;height:33px;min-height:33px;padding:2px 5px;gap:5px;flex-wrap:nowrap;justify-content:space-between}
 .brand,.topbar .brand{display:none!important}.top-stats{order:0;width:auto!important;gap:3px;flex:1}
 .stat-chip{min-width:0;min-height:27px;height:27px;padding:2px 4px;flex:1;border-radius:5px}
 .stat-label{font-size:7px}.stat-chip strong{font-size:12px;line-height:11px}.stat-chip small{font-size:8px}
 .header-actions{order:1;width:auto!important;gap:3px;margin:0}.header-text-button{padding:0 5px;height:27px;font-size:9px;border-radius:5px}.header-text-button kbd{display:none}
 .header-actions #quickRecipeBtn,.header-actions #helpBtn{display:none!important}.icon-btn{height:27px;width:27px;font-size:13px}
 .main-layout{display:grid!important;grid-template-columns:minmax(0,1fr) clamp(190px,30vw,265px)!important;grid-template-rows:minmax(0,1fr)!important;gap:4px;flex:1;min-height:0}
 .battlefield-card{height:100%;min-height:0}.side-panel{height:100%;min-height:0;padding:4px}
 .section-heading{height:24px!important;min-height:24px!important;padding:3px}.section-heading .heading-left{position:static;transform:none;margin:0 auto}.section-heading h2{font-size:10px}.section-heading h2 span{display:none}.section-heading .stage-right,.section-heading .heading-kicker{display:none!important}
 .battle-controls{height:33px!important;min-height:33px!important;grid-template-columns:1.35fr .75fr .8fr;padding:3px;gap:3px}
 .battle-controls .button{height:26px!important;font-size:9px;padding:1px;gap:2px}.battle-controls .keycap{display:none}.battle-controls .button-outline span{display:inline!important}
 .canvas-wrap{flex:1;min-height:0;height:0}.canvas-wrap canvas{max-height:100%!important;width:auto!important;height:auto!important;max-width:100%!important}
 .map-badge{display:none!important}.map-wave-progress{height:26px;min-height:26px;padding:2px 6px}.map-wave-progress .wave-progress-caption{font-size:8px;line-height:11px}.map-wave-progress .progress-rail{height:5px}
 .battle-tip{display:none!important}
 .sidebar-nav{height:29px;min-height:29px;margin-bottom:3px;padding:2px}.panel-tab{font-size:9px}
 .side-panel>.panel{padding:6px;min-height:0;overflow:auto}.panel h2{font-size:12px;margin:2px 0 4px}.panel-head{margin-bottom:2px}.panel-tag{font-size:7px;padding:2px 4px}.eyebrow{font-size:8px}
 .summon-button{height:51px!important;min-height:51px!important;padding:4px!important;grid-template-columns:28px minmax(0,1fr) auto;gap:3px!important}.summon-logo{height:26px!important;width:26px!important}.summon-copy strong{font-size:11px}.summon-copy small{font-size:7px}.summon-cost{min-width:41px;padding:3px!important;font-size:8px}.summon-cost b{font-size:12px}
 .summon-odds{display:grid!important;grid-template-columns:repeat(3,1fr)!important;padding:4px!important;margin:4px 0!important;gap:0}.summon-odds span{font-size:8px}.summon-odds b{font-size:10px!important}
 .summon-sep,.side-title,.mini-recipe-list,.panel-caption{display:none!important}.summon-panel #summonRecipeBtn{display:flex!important;min-height:25px;font-size:9px;margin-top:4px}
 .unit-top{gap:5px}.unit-iconbox{width:48px;height:48px}.unit-iconbox img{max-width:42px;max-height:42px}.unit-identity h3{font-size:13px}.unit-stats{gap:3px}.unit-stats div{padding:3px}.unit-stats small{font-size:8px}.unit-stats b{font-size:11px}.unit-buttons{gap:3px}.unit-buttons .mini{min-height:24px;font-size:9px;padding:3px}.unit-help{display:none}
 .research-list{gap:4px}.research-item{min-height:40px;padding:5px;gap:3px}.research-symbol{font-size:16px}.research-detail strong{font-size:10px}.research-detail small{font-size:8px}.research-price{font-size:8px}.research-panel+.log-panel{display:none!important}
 .recipe-modal{width:97vw;height:95dvh;padding:7px;gap:4px}.recipe-top{min-height:40px}.recipe-top h2{font-size:16px}.recipe-top p{display:none}.recipe-filters{gap:3px}.recipe-filter{padding:5px 7px;font-size:9px}.recipe-search{height:30px}.recipe-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.recipe-card{min-height:120px;padding:5px;gap:3px}.recipe-result img{width:29px;height:29px}.recipe-result-title{font-size:10px}.recipe-tier{font-size:8px}.recipe-material{padding:2px;gap:2px;font-size:8px}.recipe-material img{width:19px;height:19px}.recipe-material b,.recipe-material small{font-size:8px}.recipe-card button{font-size:9px;padding:3px}.recipe-modal-bottom{font-size:9px;min-height:22px}.recipe-scroll-hint{display:none}
 .modal:not(.recipe-modal){max-height:94dvh;overflow:auto}.intro-modal{padding:12px}.intro-modal h1{font-size:20px;margin:5px}.intro-modal h1 em{font-size:19px}.intro-hero-image{width:42px;height:42px;margin:2px auto}.intro-modal p{font-size:10px}.intro-features b{font-size:17px}.intro-features{margin-bottom:6px}.intro-primary,.intro-secondary{min-height:30px!important}
 .field-list{gap:3px;margin:8px 0}.field-list>div{padding:6px}.fields-modal h2{font-size:19px}
}
@media(max-width:1100px) and (orientation:portrait) and (pointer:coarse){.orientation-overlay{display:flex!important}}
@media(max-width:760px) and (orientation:portrait){.orientation-overlay{display:flex!important}}

.summon-odds>div{display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center}.summon-odds>div b{background:transparent!important}

/* css/v05.css */
/* Pokémon Random Defense v0.5: primary battle control and new ability card */
.battle-controls{display:flex!important;justify-content:stretch!important;gap:9px!important;padding:6px 10px!important;grid-template-columns:none!important}
.battle-controls #waveBtn{flex:1 1 auto;width:auto!important;max-width:none;min-width:0;font-size:15px!important;letter-spacing:.2px;font-weight:900;box-shadow:0 3px 12px #5de5b42b}
.battle-controls #waveBtn.active-battle{background:linear-gradient(100deg,#e9b16d,#eec781)!important;color:#242d32}
.battle-controls #waveBtn.paused-state{background:linear-gradient(100deg,#83d9db,#81e4c1)!important;color:#12362b}
.battle-controls #speedBtn{flex:0 0 132px;width:132px!important;min-width:0;font-size:12px!important;border-radius:9px}
.unit-ability{margin:7px 0 8px;padding:10px;border-radius:10px;background:linear-gradient(145deg,#23444a,#17303c);border:1px solid #47726a;display:flex;flex-direction:column;gap:4px}
.unit-ability .ability-title{display:flex;align-items:center;justify-content:space-between;gap:4px}.unit-ability .ability-title span{font-size:10px;font-weight:900;color:#8be9c0}.unit-ability .ability-title b{font-size:11px;color:#edffea;text-align:right}
.unit-ability p{font-size:10px;color:#c7d8d3;line-height:1.45;margin:0;white-space:normal}
.unit-ability small{font-size:9px;color:#92aaa9}.unit-ability strong{color:#c6e6c8}
@media(max-height:780px){.battle-controls #waveBtn{font-size:13px!important}.battle-controls #speedBtn{flex-basis:124px;width:124px!important}.unit-ability{padding:6px;gap:3px;margin:4px 0}.unit-ability p{font-size:9px}}
@media(max-width:1100px) and (orientation:landscape) and (hover:none){.battle-controls{gap:4px!important;padding:3px!important}.battle-controls #waveBtn{font-size:10px!important;min-width:0}.battle-controls #speedBtn{flex:0 0 69px;width:69px!important;font-size:9px!important}.unit-ability{padding:4px;margin:3px 0;gap:1px}.unit-ability .ability-title span{font-size:8px}.unit-ability .ability-title b{font-size:8px}.unit-ability p{font-size:8px}.unit-ability small{display:none}}

/* css/v06.css */
/* v0.6: place wave status exactly in the middle, keeping numeric percent right-aligned. */
.map-wave-progress .wave-progress-caption {
  position:relative!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  width:100%;
  text-align:center!important;
}
.map-wave-progress #progressTitle {
  display:block;
  flex:1 1 100%;
  min-width:0;
  text-align:center!important;
  margin:0;
}
.map-wave-progress #progressValue {
  position:absolute;
  top:50%;
  right:0;
  transform:translateY(-50%);
  flex:none;
  text-align:right;
}

/* css/v07.css */
/* v0.7 — larger, faithful battle-art portraits */
.unit-iconbox img{image-rendering:pixelated;object-fit:contain;max-width:100%;max-height:100%}
.recipe-card img,.mini-recipe img,.fusion-card img{image-rendering:pixelated;object-fit:contain}

/* css/v08.css */
/* v0.8 – playable tactical upgrade, 4 difficulties, 5 biomes */
:root{--biome-accent:#82e7b4}
button{transition:background-color .14s,border-color .14s,transform .12s}
button:active:not(:disabled){transform:scale(.985)}
.brand .version{display:none!important}
.brand-sub{color:#8dbbb4}
.battle-controls #autoDeployBtn{flex:0 0 114px!important;min-width:0!important;height:39px!important;padding:6px 8px!important;border:1px solid #5c9c8b!important;color:#b9f1d6!important;background:#193c40!important;font-size:11px!important;white-space:nowrap}
.battle-controls #speedBtn{flex:0 0 118px!important;width:118px!important}
.battle-controls #waveBtn{min-width:0!important;flex:1 1 auto!important;gap:7px}
.battle-controls .btn-symbol{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;flex:none}
.battle-controls .btn-symbol svg{display:block;width:16px;height:16px}
.sound-control{padding-inline:10px!important;white-space:nowrap}
.biome-chip{display:inline-flex;padding:3px 8px;border:1px solid #416b65;border-radius:8px;background:#123239;color:#aef7d6;font-size:10px;font-weight:900;align-items:center;justify-content:center;min-width:70px}
#fieldTitle{font-weight:900}
/* Preserve normal text selection and Ctrl+C even within recipe views. */
main, aside, .modal, .topbar, footer{user-select:text;-webkit-user-select:text}
.recipe-grid{user-select:text!important;-webkit-user-select:text!important}
.recipe-card{user-select:text!important;-webkit-user-select:text!important}
/* Main screen */
.intro-modal{max-width:540px!important;max-height:94dvh!important;padding:20px 24px!important;overflow:auto!important}
.intro-modal h1{margin:4px 0 9px!important;font-size:26px!important}
.intro-modal h1 em{font-size:26px!important}
.intro-modal p{margin-bottom:10px!important;font-size:11px;line-height:1.5}
.intro-modal .intro-hero-image{height:48px;width:48px;margin:5px auto}
.intro-features{margin-bottom:12px!important;border-radius:10px;overflow:hidden;background:#15323a}
.intro-features>div{padding:7px 5px!important}
.intro-features b{font-size:21px!important}
.difficulty-title{font-weight:900;font-size:13px;color:#dcffed;text-align:left;margin:10px 0 7px}
.difficulty-title span{float:right;font-size:10px;font-weight:550;color:#92bfb6}
.difficulty-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.difficulty-item{border:1px solid #375c66;border-radius:9px;padding:9px 3px;background:#1a3441;color:#d0e8e6;font-weight:900;font-size:12px;min-width:0}
.difficulty-item small{display:block;font-size:9px;color:#a7beba;margin-top:4px;font-weight:650;white-space:nowrap}
.difficulty-item.active{background:#3f8b70;border-color:#b4ffd7;box-shadow:0 0 0 2px #5ddcb540;color:#fff}
.difficulty-item.active small{color:#e0ffee}
.difficulty-detail{text-align:center;color:#c7e2d9;background:#112a35;padding:7px 8px;border:1px solid #2c5b5b;border-radius:8px;font-size:10px;margin-top:7px}
.intro-side-actions{display:flex;gap:6px;margin:9px 0 12px;justify-content:space-between}
.intro-link{background:#1b3944;color:#b8eadb;border:1px solid #37676b;border-radius:7px;font-size:10px;padding:8px 6px;flex:1;min-width:0;font-weight:800}
.intro-modal .intro-primary{min-height:42px!important}
.intro-note{margin-top:9px!important}
/* Quick guide */
.compact-help{max-width:610px!important;max-height:92dvh!important;padding:25px!important}
.guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0}
.guide-grid>div{background:#1a3640;border:1px solid #37605f;border-radius:10px;padding:11px;text-align:left}
.guide-grid b{color:#8ce7bf;font-size:12px}.guide-grid p{color:#c0d6d6;margin:5px 0 0;font-size:11px;line-height:1.45}
.compact-help .help-keys{justify-content:center;gap:6px;margin-top:12px}
.compact-help .help-keys>span{font-size:10px;border:1px solid #335962;padding:3px 7px;border-radius:5px}
.helper-note{font-size:10px;color:#99b9b8;text-align:center;margin-top:12px}
/* Audio mixer */
.sound-modal{max-width:465px!important;text-align:center;padding:30px 27px 24px!important}
.sound-modal h2{margin:7px 0 5px}.sound-modal>p{font-size:11px;color:#b4d1d0}
.volume-row{background:#183640;border:1px solid #3b6468;border-radius:11px;margin:13px 0;padding:13px 15px}
.volume-header{display:flex;align-items:center;justify-content:space-between;gap:7px;white-space:nowrap}
.volume-header b{font-size:12px}.volume-header span{font-size:11px;color:#a9efd5;min-width:43px}
.mute-button{border:1px solid #68988e;border-radius:7px;background:#2b5552;padding:6px 9px;color:#edfffa;font-size:10px;font-weight:800}
.volume-row input[type=range]{display:block;width:100%;margin:14px 0 0;accent-color:#76e7b6;cursor:pointer}
.sound-modal .intro-primary{margin-top:15px;min-height:39px}
/* Right-click menu overlay outside canvas */
.unit-context{z-index:150;position:fixed;width:282px;max-width:calc(100vw - 16px);background:#102832f7;border:1px solid #6da68c;border-radius:12px;padding:11px;box-shadow:0 15px 55px #000b,0 0 0 3px #09272c99;backdrop-filter:blur(12px);color:#e9f9f0;user-select:text}
.context-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;font-size:14px}
.context-top button{border:0;background:#2a4550;color:white;border-radius:6px;font-size:15px;width:26px;height:25px}
.context-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-bottom:9px}
.context-stats span{background:#1a3b43;border-radius:7px;padding:7px 3px;text-align:center;font-size:10px;color:#a9c8c7}
.context-stats b{display:block;color:#eefff1;font-size:12px;margin-top:4px}
.context-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.context-actions button{padding:8px 4px;font-size:11px;font-weight:850;background:#245347;color:#caffde;border:1px solid #41836b;border-radius:7px}
.context-actions button:disabled{opacity:.37}
.context-actions small{font-size:9px;color:#b8ddce;margin-left:3px}
.context-actions .context-sell{background:#503139;color:#ffdddd;border-color:#86565a}
/* Landscape mobile: keep 3 action buttons usable. */
@media(max-width:1100px) and (orientation:landscape) and (hover:none){
 .battle-controls #speedBtn{flex:0 0 52px!important;width:52px!important}
 .battle-controls #autoDeployBtn{flex:0 0 62px!important;min-width:0!important;width:62px!important;font-size:8px!important;padding:2px!important}
 .battle-controls #waveBtn{min-width:0!important;flex:1 1 auto;font-size:9px!important}
 .battle-controls .btn-symbol svg{width:12px;height:12px}
 #soundBtn{font-size:9px!important;white-space:nowrap}
 .intro-modal{max-width:560px!important;max-height:94dvh!important;padding:10px 16px!important}
 .intro-modal .intro-features{margin-bottom:6px!important}
 .intro-modal .intro-hero-image{width:29px;height:29px;margin:0 auto}
 .intro-modal h1{font-size:19px!important;margin:0 0 4px!important}.intro-modal h1 em{font-size:19px!important}
 .difficulty-item{padding:5px 3px;font-size:10px}.difficulty-item small{font-size:8px;margin-top:1px}
 .difficulty-title{font-size:11px;margin:4px 0}.difficulty-title span{font-size:8px}
 .intro-side-actions{margin:5px 0}.intro-link{padding:5px 3px;font-size:9px}
 .intro-modal .intro-primary{min-height:28px!important;padding:5px!important;font-size:11px}
 .intro-modal p{font-size:9px;margin-bottom:4px!important}.intro-features b{font-size:15px!important}
 .difficulty-detail{font-size:9px;padding:4px}.intro-note{display:none}
 .sound-modal{max-height:94dvh!important;padding:14px!important}.sound-modal h2{margin:4px}.volume-row{margin:7px 0;padding:8px}
 .compact-help{max-height:94dvh!important;padding:10px!important}.compact-help h2{font-size:16px}.guide-grid{gap:4px;margin:5px 0}.guide-grid>div{padding:5px}.guide-grid b{font-size:10px}.guide-grid p{font-size:9px;margin:2px}
 .unit-context{width:235px;padding:7px}.context-actions button{padding:5px;font-size:9px}
}
@media(max-height:780px){.battle-controls #autoDeployBtn{height:35px!important}.battle-controls #speedBtn{width:107px!important;flex-basis:107px!important}}
@media(max-width:1100px) and (orientation:landscape) and (hover:none){
 .intro-modal .intro-hero-image,.intro-modal>p,.intro-modal .intro-features{display:none!important}
 .intro-modal{padding:13px 17px!important;max-width:560px!important;max-height:94dvh!important;overflow:auto!important}
 .intro-modal .modal-kicker{font-size:9px!important}
 .intro-modal h1{margin:3px 0 8px!important;line-height:1.1!important;font-size:21px!important}
 .intro-modal h1 em{font-size:21px!important}
 .difficulty-title{margin:7px 0 5px}
 .difficulty-item{padding:7px 3px}
 .difficulty-detail{padding:6px;margin-top:5px}
 .intro-side-actions{margin:7px 0;gap:5px}
 .intro-link{padding:8px 3px}
 .intro-modal #newGameBtn{min-height:33px!important}
 .intro-modal #continueBtn{min-height:29px!important;margin-top:5px;padding:4px!important}
}

/* css/v09.css */
/* v0.9 polish: a deeper neon expedition HUD and clearer recipe navigation. */
:root{--neon-mint:#78f1bd;--neon-blue:#78d9ff;--panel-glass:#102936d9}
body{background:radial-gradient(circle at 20% 0%,#153846 0,#0b1722 38%,#070f18 100%);background-attachment:fixed}
body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.32;background-image:linear-gradient(120deg,#7bf2c008 25%,transparent 25%),linear-gradient(60deg,#70d9ff06 25%,transparent 25%);background-size:84px 84px;mix-blend-mode:screen}
.app-shell{position:relative}.topbar{border-bottom-color:#3b6170;background:linear-gradient(180deg,#10263355,transparent);box-shadow:0 14px 38px #0003}.brand-symbol img{filter:drop-shadow(0 0 13px #79f2c780)}
.stat-chip,.panel,.battlefield-card{background:linear-gradient(145deg,#142c38e8,#0d202ce8);border-color:#315565;box-shadow:0 12px 32px #0003,inset 0 1px #b3f1d00b}
.stat-chip:hover,.panel:hover{border-color:#4e877c}.section-heading{background:linear-gradient(90deg,#17323b60,transparent)}
.canvas-wrap{background:radial-gradient(circle at 50% 45%,#254e4a,#10252e 70%);box-shadow:inset 0 0 90px #02101899}.canvas-wrap:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#bfffe70a,transparent 23%,transparent 73%,#03121c36);mix-blend-mode:screen}
.map-badge{box-shadow:0 0 22px #74e7bd23}.button-wave,.summon-button{position:relative;overflow:hidden}.button-wave:after,.summon-button:after{content:"";position:absolute;inset:-60% -20%;background:linear-gradient(100deg,transparent 35%,#fff7 50%,transparent 65%);transform:translateX(-100%);animation:buttonSheen 5.5s ease-in-out infinite}@keyframes buttonSheen{0%,65%{transform:translateX(-100%)}85%,100%{transform:translateX(100%)}}
.recipe-filter{display:inline-flex;align-items:center;gap:6px}.recipe-filter .filter-count{min-width:19px;padding:1px 4px;border-radius:10px;background:#0d2932;color:#a7cbc5;font-size:9px;font-variant-numeric:tabular-nums}.recipe-filter.active .filter-count{background:#d9ffeb;color:#1d5948}.recipe-material{font:inherit;color:inherit;cursor:pointer;border:0;appearance:none}.recipe-material:hover{transform:translateY(-2px);filter:brightness(1.18);box-shadow:0 0 0 2px #a3f4d255}.recipe-material:focus-visible{outline:2px solid var(--neon-mint);outline-offset:2px}.focused-recipe{animation:recipeFocus 1.35s ease-out}@keyframes recipeFocus{0%{box-shadow:0 0 0 4px #a8f6d5aa,0 0 32px #71e7bb99}100%{box-shadow:none}}
.center-toast{border-color:#8cf0c5;background:linear-gradient(145deg,#183a3bf5,#171e31f5);color:#eafff4;box-shadow:0 0 0 5px #79edb91c,0 18px 80px #000c;line-height:1.55}
.battle-tip{background:linear-gradient(90deg,#102b33,#142535)}
@media(max-width:760px){.recipe-filter{padding-inline:8px}.recipe-filter .filter-count{min-width:15px}.center-toast{font-size:13px}}

/* css/v10.css */
/* v0.10 interaction polish */
#mergeBtn:disabled{opacity:.42!important;filter:saturate(.45);border-style:dashed;color:#9aaeb0!important;background:#172c35!important}
#mergeBtn:disabled b{color:#d7ad72!important;font-size:9px}
.context-actions button:focus-visible{outline:2px solid #8af1c5;outline-offset:2px}

#mergeBtn.summon-only{opacity:.42!important;filter:saturate(.45);border-style:dashed;color:#9aaeb0!important;background:#172c35!important}
#mergeBtn.summon-only b{color:#d7ad72!important;font-size:9px}

/* css/v11.css */
/* v0.11: full catalog visibility and cleaner field gates */
.summon-only-card{cursor:pointer;min-height:144px;background:linear-gradient(145deg,#172b39,#12232e);border-color:#536477;transition:transform .15s,border-color .15s,box-shadow .15s}
.summon-only-card:hover{transform:translateY(-2px);border-color:#92d8c3;box-shadow:0 8px 24px #0005}
.summon-only-copy{font-size:10px;color:#b1c0ca;padding:8px 4px 3px;border-top:1px dashed #49616c}
.summon-only-owned{font-size:10px;color:#86adac}
.summon-only-divider{grid-column:1/-1;display:flex;align-items:baseline;gap:9px;padding:12px 5px 2px;color:#b9f4dc;border-bottom:1px solid #3e6968;font-weight:900;text-align:left}
.summon-only-divider small{font-size:10px;color:#83a8a9;font-weight:600}
.difficulty-title{margin-top:8px!important}
@media(max-width:760px){.summon-only-divider{font-size:11px}.summon-only-divider small{font-size:9px}.summon-only-card{min-height:126px}}

/* css/v12.css */
/* v0.12: n-wave auto progression controls */
.auto-wave-count{height:34px;display:inline-flex;align-items:center;gap:4px;padding:0 7px;border:1px solid #3f6970;border-radius:8px;background:#112b35;color:#a9cdc5;font-size:10px;font-weight:800;white-space:nowrap}
.auto-wave-count input{width:34px;height:23px;border:1px solid #5a8c83;border-radius:5px;background:#0a2029;color:#effff5;text-align:center;font:800 11px system-ui;outline:none}
.auto-wave-count input:focus{border-color:#91ebbf;box-shadow:0 0 0 2px #91ebbf33}
.auto-wave-btn{min-width:112px!important}.auto-wave-btn.active-auto{background:#367658!important;border-color:#8de2af!important;color:#ecfff1!important;box-shadow:0 0 18px #65dc9a55}
@media(max-width:900px){.auto-wave-count{font-size:9px;padding:0 4px}.auto-wave-btn{min-width:94px!important;font-size:10px!important}}
@media(max-width:760px){.auto-wave-count{height:42px;gap:2px;padding:0 3px;font-size:8px}.auto-wave-count input{width:27px;height:20px;font-size:10px}.auto-wave-btn{min-width:0!important;font-size:9px!important;padding:2px 4px!important}}

/* css/v13.css */
/* v0.13: clean main menu and animated brand mascot */
.main-menu-backdrop{padding:0!important;align-items:stretch!important;justify-content:stretch!important;background:#06131ccc!important;backdrop-filter:blur(5px)}
.main-menu-modal{position:relative;width:100%!important;max-width:none!important;height:100dvh!important;max-height:none!important;min-height:560px;border:0!important;border-radius:0!important;overflow:hidden!important;display:flex;align-items:center;justify-content:center;padding:38px 24px 30px!important;background:linear-gradient(180deg,#08263db5 0%,#0b2332dd 60%,#07151fee 100%),url('../assets/biomes/grass.png') center/cover!important;box-shadow:none!important}
.main-menu-modal:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 16% 26%,#8cefc02b 0 5%,transparent 22%),radial-gradient(circle at 85% 22%,#8ad7ff25 0 7%,transparent 24%),linear-gradient(135deg,transparent 35%,#a5f3d20b 50%,transparent 65%);animation:menuLightSweep 10s ease-in-out infinite alternate}
.main-menu-modal:after{content:"";position:absolute;left:50%;bottom:-130px;width:min(760px,90vw);height:230px;transform:translateX(-50%);border-radius:50%;background:#77e4b625;filter:blur(35px);pointer-events:none}
.main-menu-modal>*{position:relative;z-index:1}.main-menu-modal .modal-kicker{letter-spacing:.28em;color:#b7f8dc;text-shadow:0 2px 18px #000b}.main-menu-modal .intro-hero-image{width:104px;height:104px;margin:10px auto 5px;filter:drop-shadow(0 12px 20px #0009);animation:heroBob 3.5s ease-in-out infinite}.main-menu-modal h1{font-size:clamp(30px,5vw,62px)!important;line-height:.94!important;letter-spacing:.03em;text-shadow:0 5px 0 #102b45,0 10px 28px #000b!important;margin:5px 0 15px!important}.main-menu-modal h1 em{font-size:.62em!important;color:#a1eaff;text-shadow:0 4px 0 #174461,0 7px 18px #000b!important}.main-menu-modal>p{max-width:590px;margin:0 auto 20px!important;font-size:13px!important;color:#d7f4ec!important;text-shadow:0 2px 8px #000b}.main-menu-modal .difficulty-title{max-width:650px;width:100%;margin:9px auto 7px!important;text-align:center!important;color:#e9fff5}.main-menu-modal .difficulty-picker{max-width:650px;width:100%;margin:0 auto}.main-menu-modal .difficulty-item{background:#102d3bcc;border-color:#5c8d91;box-shadow:0 7px 18px #0003}.main-menu-modal .difficulty-item.active{background:linear-gradient(145deg,#429e7b,#256d73);border-color:#d1ffe5;box-shadow:0 0 0 2px #83edb955,0 8px 22px #0005}.main-menu-modal .difficulty-detail{max-width:650px;width:100%;margin:8px auto 0;background:#082431b8;border-color:#477a7e}.main-menu-modal .intro-side-actions{max-width:650px;width:100%;margin:15px auto 11px;gap:8px}.main-menu-modal .intro-link{background:#102e3ed9;border-color:#5b8f91;color:#d7fff1;box-shadow:0 5px 15px #0003}.main-menu-modal .intro-primary{width:min(410px,90vw);min-height:52px!important;margin:0 auto;background:linear-gradient(180deg,#ffd977,#da8f3d)!important;border-color:#fff0a6!important;color:#38230e!important;font-size:17px!important;font-weight:950;box-shadow:0 7px 0 #713b2a,0 13px 28px #0007!important;text-shadow:0 1px #fff8}.main-menu-modal .intro-secondary{width:min(410px,90vw);margin:13px auto 0}.main-menu-modal .intro-note{color:#b6d5d0!important;text-shadow:0 2px 8px #0009}
.brand-symbol{animation:brandFloat 3.8s ease-in-out infinite;transform-origin:50% 75%}.brand-symbol img{animation:brandSpin 6s ease-in-out infinite;filter:drop-shadow(0 0 14px #7cf3bd99)}
@keyframes heroBob{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-10px) rotate(3deg)}}@keyframes brandFloat{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-4px) rotate(2deg)}}@keyframes brandSpin{0%,76%,100%{transform:rotate(0)}84%{transform:rotate(-12deg)}92%{transform:rotate(10deg)}}@keyframes menuLightSweep{0%{opacity:.65;transform:translateX(-1%)}100%{opacity:1;transform:translateX(1%)}}
.summon-filter{border-color:#8d6ac2!important;color:#eadcff!important;background:#34265b!important}.summon-filter.active{background:linear-gradient(145deg,#9b6be4,#5d3da3)!important;border-color:#e5caff!important;color:#fff!important;box-shadow:0 0 0 2px #b889ff55}
@media(max-width:760px){.main-menu-modal{padding:24px 13px 18px!important}.main-menu-modal .intro-hero-image{width:62px;height:62px}.main-menu-modal h1{font-size:29px!important;margin-bottom:9px!important}.main-menu-modal>p{font-size:10px!important;margin-bottom:8px!important}.main-menu-modal .difficulty-item{padding:7px 2px;font-size:10px}.main-menu-modal .difficulty-item small{font-size:8px}.main-menu-modal .intro-side-actions{margin:9px auto}.main-menu-modal .intro-link{font-size:9px;padding:7px 3px}.main-menu-modal .intro-primary{min-height:45px!important;font-size:14px!important}}
@media(prefers-reduced-motion:reduce){.main-menu-modal .intro-hero-image,.brand-symbol,.brand-symbol img,.main-menu-modal:before{animation:none}}

/* css/v14.css */
/* v0.14: unified battle controls */
.battle-controls{display:flex!important;align-items:center!important;gap:8px!important;padding:6px 10px!important}
.battle-controls #waveBtn{height:46px!important;min-height:46px!important;flex:1 1 auto!important;min-width:230px!important;border-radius:9px!important;font-size:14px!important;font-weight:950!important}
.battle-controls #speedBtn,.battle-controls #autoDeployBtn,.battle-controls #autoWaveBtn{height:37px!important;min-height:37px!important;flex:0 0 122px!important;width:122px!important;min-width:122px!important;padding:0 8px!important;border-radius:8px!important;font-size:11px!important;white-space:nowrap}
.battle-controls .auto-wave-count{height:37px!important;min-height:37px!important;flex:0 0 122px!important;width:122px!important;justify-content:center;border-radius:8px!important;padding:0 5px!important;font-size:10px!important}
.battle-controls .auto-wave-count input{height:23px!important;width:32px!important}
.battle-controls #waveBtn .keycap{font-size:9px}
@media(max-width:1100px){.battle-controls #waveBtn{min-width:180px!important}.battle-controls #speedBtn,.battle-controls #autoDeployBtn,.battle-controls #autoWaveBtn,.battle-controls .auto-wave-count{flex-basis:105px!important;width:105px!important;min-width:105px!important;font-size:10px!important}}
@media(max-width:760px){.battle-controls{gap:4px!important;padding:4px!important}.battle-controls #waveBtn{height:40px!important;min-height:40px!important;min-width:0!important;font-size:10px!important}.battle-controls #speedBtn,.battle-controls #autoDeployBtn,.battle-controls #autoWaveBtn,.battle-controls .auto-wave-count{height:32px!important;min-height:32px!important;flex:1 1 0!important;width:auto!important;min-width:0!important;font-size:8px!important}.battle-controls .auto-wave-count{padding:0 2px!important}.battle-controls .auto-wave-count input{height:20px!important;width:25px!important;font-size:9px!important}.battle-controls #waveBtn .btn-symbol,.battle-controls #waveBtn .keycap{display:none}}

/* css/v15.css */
/* v0.15 hotfix: restore the intended vertical main-menu composition */
.main-menu-modal{flex-direction:column!important;align-items:center!important;justify-content:center!important;overflow-y:auto!important;overflow-x:hidden!important}
.main-menu-modal .modal-kicker,.main-menu-modal .intro-hero-image,.main-menu-modal h1,.main-menu-modal>p,.main-menu-modal .difficulty-title,.main-menu-modal .difficulty-picker,.main-menu-modal .difficulty-detail,.main-menu-modal .intro-side-actions,.main-menu-modal .intro-primary,.main-menu-modal .intro-secondary,.main-menu-modal .intro-note{flex:0 0 auto}
.main-menu-modal .intro-side-actions{display:flex!important;justify-content:center!important}
@media(max-height:720px){.main-menu-modal{justify-content:flex-start!important;padding-top:20px!important}.main-menu-modal .intro-hero-image{width:58px;height:58px;margin:3px auto}.main-menu-modal h1{margin:2px 0 7px!important}.main-menu-modal>p{margin-bottom:8px!important}.main-menu-modal .intro-side-actions{margin:8px auto}.main-menu-modal .intro-note{margin-top:7px!important}}

/* css/v16-main.css */
#startModal.main-menu-backdrop{
  z-index:65;
  background:#0a1438!important;
  display:grid;
  place-items:stretch;
  padding:0!important;
  overflow:hidden;
}
#startModal .dynamic-home-screen{
  position:relative!important;
  width:100%!important;
  height:100dvh!important;
  max-width:none!important;
  max-height:none!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at 50% 15%, rgba(173,235,255,.75) 0%, rgba(125,185,255,.18) 18%, transparent 40%),
    linear-gradient(180deg, #77c7ff 0%, #4d86ef 34%, #2a4ea5 70%, #102257 100%);
  color:#fff;
  box-shadow:none!important;
  display:block!important;
  isolation:isolate;
}
#startModal .dynamic-home-screen .home-bg,
#startModal .dynamic-home-screen .home-mon,
#startModal .dynamic-home-screen .home-title-wrap,
#startModal .dynamic-home-screen .home-menu-panel,
#startModal .dynamic-home-screen .home-bottom-copy,
#startModal .dynamic-home-screen .difficulty-overlay{position:absolute}
#startModal .home-bg{pointer-events:none}
#startModal .home-sky{inset:0;background:
  radial-gradient(circle at 15% 17%, rgba(255,255,255,.95) 0 3%, transparent 3.8%),
  radial-gradient(circle at 18% 18%, rgba(255,255,255,.9) 0 2.2%, transparent 2.8%),
  radial-gradient(circle at 80% 19%, rgba(255,255,255,.95) 0 2.8%, transparent 3.5%),
  radial-gradient(circle at 83% 20.5%, rgba(255,255,255,.9) 0 2.1%, transparent 2.8%),
  radial-gradient(circle at 68% 30%, rgba(255,255,255,.18) 0 8%, transparent 9%),
  radial-gradient(circle at 31% 28%, rgba(255,255,255,.14) 0 10%, transparent 11%)}
#startModal .home-hills{left:-4%;right:-4%;bottom:-5%;height:42%;background:
  radial-gradient(ellipse at 10% 100%, #78d16d 0%, #4ba855 36%, transparent 38%),
  radial-gradient(ellipse at 28% 100%, #68c95c 0%, #43954b 34%, transparent 36%),
  radial-gradient(ellipse at 52% 100%, #79d96e 0%, #4da657 36%, transparent 38%),
  radial-gradient(ellipse at 72% 100%, #71ce6a 0%, #3f9749 34%, transparent 36%),
  radial-gradient(ellipse at 92% 100%, #86d77d 0%, #4aa24f 34%, transparent 36%),
  radial-gradient(ellipse at 50% 10%, rgba(32,65,120,.16) 0%, transparent 55%)}
#startModal .home-road{left:58%;top:48%;width:34%;height:33%;transform:translateX(-4%) rotate(-12deg);
  border-radius:44% 56% 38% 62% / 14% 15% 85% 86%;
  background:linear-gradient(180deg,#f8dfa4 0%,#efcd7c 55%,#d7aa57 100%);
  box-shadow:0 0 0 12px #cad8e215, 0 0 0 24px #4a6bbb1f, inset 0 0 0 3px rgba(162,115,38,.25)}
#startModal .home-road::before{content:"";position:absolute;inset:6% 3%;border-radius:inherit;
  background:repeating-linear-gradient(180deg, transparent 0 10px, rgba(176,133,69,.25) 10px 12px)}
#startModal .home-castle{right:13%;top:10%;width:15%;height:28%;
  background:
    linear-gradient(180deg, #d7f1ff 0%, #a8d8ff 68%, #7ab2ea 100%);
  clip-path:polygon(10% 100%,10% 58%,18% 58%,18% 34%,26% 34%,26% 52%,34% 52%,34% 26%,43% 26%,43% 46%,52% 46%,52% 18%,61% 18%,61% 46%,69% 46%,69% 30%,78% 30%,78% 54%,86% 54%,86% 100%);
  filter:drop-shadow(0 0 20px rgba(111,219,255,.55));opacity:.95}
#startModal .home-castle::after{content:"";position:absolute;left:50%;top:35%;transform:translateX(-50%);width:44%;height:44%;border-radius:50%;
  box-shadow:0 0 0 6px rgba(74,214,255,.7), 0 0 0 14px rgba(74,214,255,.22), 0 0 22px rgba(74,214,255,.75)}
#startModal .home-portal{right:4.8%;top:34%;width:12%;height:26%;border-radius:44% 44% 40% 40%/48% 48% 34% 34%;
  background:radial-gradient(circle at 50% 50%, rgba(122,45,255,.88) 0 26%, rgba(79,24,164,.95) 46%, rgba(27,17,70,.96) 67%, rgba(16,13,43,.4) 82%, transparent 84%);
  box-shadow:0 0 0 7px rgba(125,138,163,.75),0 0 0 18px rgba(69,85,114,.58),0 0 32px rgba(149,73,255,.36)}
#startModal .home-portal::after{content:"";position:absolute;inset:18% 20%;background:radial-gradient(circle, rgba(255,255,255,.72) 0 4%, transparent 5%),
  radial-gradient(circle at 30% 40%, rgba(255,255,255,.4) 0 3%, transparent 4%),
  radial-gradient(circle at 70% 60%, rgba(255,255,255,.35) 0 3%, transparent 4%)}
#startModal .home-crystals{inset:0;background:
  radial-gradient(circle at 67% 59%, #7af1ff 0 1%, transparent 1.2%),
  radial-gradient(circle at 73% 72%, #7af1ff 0 .8%, transparent 1%),
  radial-gradient(circle at 58% 76%, #7af1ff 0 .8%, transparent 1%),
  radial-gradient(circle at 79% 82%, #7af1ff 0 .9%, transparent 1.1%),
  radial-gradient(circle at 39% 14%, rgba(255,230,120,.8) 0 .5%, transparent .7%),
  radial-gradient(circle at 61% 18%, rgba(255,230,120,.8) 0 .5%, transparent .7%),
  radial-gradient(circle at 22% 22%, rgba(255,230,120,.8) 0 .5%, transparent .7%)}

#startModal .home-title-wrap{
  left:50%;top:4.5%;transform:translateX(-50%);
  width:min(760px,62vw);
  text-align:center;z-index:5;pointer-events:none;
}
#startModal .title-kicker{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:8px 18px;border-radius:999px;border:2px solid rgba(255,255,255,.55);
  background:rgba(24,38,94,.72);backdrop-filter:blur(8px);
  box-shadow:0 10px 30px rgba(8,18,52,.28), inset 0 1px 0 rgba(255,255,255,.22);
  color:#eaf1ff;font-size:14px;font-weight:900;letter-spacing:.18em;text-transform:uppercase
}
#startModal .home-title{margin-top:18px;display:flex;flex-direction:column;align-items:center;gap:0;animation:titleFloat 2.8s ease-in-out infinite}
#startModal .title-line{display:block;font-weight:1000;line-height:.92;letter-spacing:-.05em;
  -webkit-text-stroke:8px #28357e;
  text-shadow:0 5px 0 rgba(40,53,126,.8), 0 12px 24px rgba(8,18,52,.28);
  position:relative}
#startModal .title-line::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg, transparent 0%, transparent 38%, rgba(255,255,255,.75) 48%, transparent 58%, transparent 100%);mix-blend-mode:screen;transform:translateX(-130%);animation:titleShine 3.2s linear infinite}
#startModal .title-line-top{font-size:clamp(76px,8vw,136px);background:linear-gradient(180deg,#ffe782 0%,#ffc935 56%,#e48a15 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
#startModal .title-line-bottom{font-size:clamp(64px,6.8vw,114px);background:linear-gradient(180deg,#6ee7ff 0%,#5a9fff 48%,#ff8cc4 52%,#ff5c7b 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
#startModal .title-sub{margin-top:16px;display:inline-flex;align-items:center;justify-content:center;padding:9px 24px;border-radius:999px;background:linear-gradient(180deg,#5563db 0%,#6d48c9 100%);border:2px solid rgba(213,225,255,.75);color:#eef4ff;font-weight:900;font-size:18px;letter-spacing:.06em;box-shadow:0 12px 22px rgba(31,40,104,.32)}
@keyframes titleFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes titleShine{0%{transform:translateX(-130%)}55%,100%{transform:translateX(140%)}}

#startModal .home-mon{z-index:4;pointer-events:none;filter:drop-shadow(0 18px 26px rgba(8,18,52,.35));}
#startModal .home-mon.left-top{left:3%;top:18%;transform:scale(2.45)}
#startModal .home-mon.left-mid{left:15%;top:47%;transform:scale(2.3)}
#startModal .home-mon.right-mid{right:17%;top:60%;transform:scale(2.25)}
#startModal .home-mon.right-bottom{right:5%;top:49%;transform:scale(2.45)}
#startModal .mon-sprite{width:88px;height:88px;background-repeat:no-repeat;background-size:352px 88px;image-rendering:pixelated;animation:sheet4 .8s steps(4) infinite, monBob 2.2s ease-in-out infinite}
#startModal .left-top .mon-sprite{animation-delay:0s,.1s}
#startModal .left-mid .mon-sprite{animation-delay:.1s,.45s}
#startModal .right-mid .mon-sprite{animation-delay:.2s,.25s}
#startModal .right-bottom .mon-sprite{animation-delay:.05s,.6s}
#startModal .mon-pikachu{background-image:url('../assets/battle-art/pikachu.png')}
#startModal .mon-charmander{background-image:url('../assets/battle-art/charmander.png')}
#startModal .mon-bulbasaur{background-image:url('../assets/battle-art/bulbasaur.png')}
#startModal .mon-squirtle{background-image:url('../assets/battle-art/squirtle.png')}
@keyframes sheet4{from{background-position:0 0}to{background-position:-352px 0}}
@keyframes monBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}

#startModal .home-menu-panel{
  left:50%;top:38%;transform:translateX(-50%);
  width:min(430px,32vw);display:flex;flex-direction:column;gap:12px;z-index:7;
}
#startModal .menu-btn{
  position:relative;display:flex!important;align-items:center;justify-content:center;gap:14px;
  min-height:72px;padding:10px 24px;border-radius:18px;border:3px solid rgba(247,241,221,.98)!important;
  color:#1c2240!important;font-weight:1000!important;font-size:22px!important;letter-spacing:-.02em;
  text-shadow:0 2px 0 rgba(255,255,255,.55);
  box-shadow:0 8px 0 rgba(37,54,108,.48),0 18px 34px rgba(9,20,62,.30);
  transition:transform .12s ease,filter .12s ease,box-shadow .12s ease;white-space:nowrap;z-index:1
}
#startModal .menu-btn:hover{transform:translateY(-2px);filter:brightness(1.03)}
#startModal .menu-btn:active{transform:translateY(2px);box-shadow:0 4px 0 rgba(37,54,108,.48),0 10px 18px rgba(9,20,62,.30)}
#startModal .menu-btn-icon{font-size:30px;line-height:1}
#startModal .menu-btn-text{flex:1;text-align:center}
#startModal .menu-btn-side{font-size:17px;font-weight:1000;color:#fff;background:rgba(35,50,98,.68);padding:8px 12px;border-radius:999px;border:2px solid rgba(255,255,255,.55);min-width:72px;text-align:center;text-shadow:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.3)}
#startModal .menu-btn-start{background:linear-gradient(180deg,#ffe898 0%,#ffd159 47%,#f2a72c 100%)}
#startModal .menu-btn-continue{background:linear-gradient(180deg,#94c9ff 0%,#5ca8f6 52%,#3d73d1 100%);color:#f8fbff!important;text-shadow:0 2px 0 rgba(19,43,98,.45)}
#startModal .menu-btn-difficulty{background:linear-gradient(180deg,#d7b8ff 0%,#9b82ff 52%,#7260e6 100%);color:#fff6ff!important;text-shadow:0 2px 0 rgba(42,31,106,.45)}
#startModal .menu-btn-blue{background:linear-gradient(180deg,#a7d6ff 0%,#6aaeff 52%,#417fe0 100%);color:#f8fbff!important;text-shadow:0 2px 0 rgba(19,43,98,.45)}
#startModal .menu-btn-gray{background:linear-gradient(180deg,#c4d1f3 0%,#8e9cc7 52%,#6a76aa 100%);color:#f8fbff!important;text-shadow:0 2px 0 rgba(19,43,98,.45)}
#startModal .menu-btn-red{background:linear-gradient(180deg,#f7b1b9 0%,#e06e7b 54%,#c8465e 100%);color:#fff8fa!important;text-shadow:0 2px 0 rgba(104,23,45,.45)}

#startModal .home-bottom-copy{left:50%;bottom:12px;transform:translateX(-50%);text-align:center;font-size:13px;font-weight:800;color:#eef4ff;text-shadow:0 2px 12px rgba(8,17,54,.7);z-index:6;width:max-content;max-width:90vw}
#startModal .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

#startModal .difficulty-overlay{inset:0;z-index:18;background:rgba(5,10,28,.56);backdrop-filter:blur(8px);display:grid;place-items:center;padding:20px}
#startModal .difficulty-modal{position:relative;width:min(560px,92vw);padding:28px 26px 24px;border-radius:24px;background:linear-gradient(180deg,rgba(17,34,87,.95) 0%, rgba(10,24,67,.97) 100%);border:2px solid rgba(194,212,255,.55);box-shadow:0 24px 60px rgba(4,12,40,.45), inset 0 1px 0 rgba(255,255,255,.08);text-align:center}
#startModal .difficulty-close{top:12px;right:12px;color:#dce8ff}
#startModal .difficulty-flyout-head{font-size:26px;font-weight:1000;color:#f4f7ff;letter-spacing:-.03em;margin-bottom:18px}
#startModal .difficulty-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#startModal .difficulty-item{border:2px solid rgba(255,255,255,.24);background:rgba(28,48,105,.78);color:#fff;border-radius:14px;padding:14px 8px;font-size:19px;font-weight:1000;cursor:pointer;transition:.12s ease;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
#startModal .difficulty-item small{display:block;margin-top:6px;font-size:13px;color:#d6ddff;font-weight:700}
#startModal .difficulty-item.active,#startModal .difficulty-item:hover{background:linear-gradient(180deg,#fff0aa 0%,#ffc94c 68%,#ed9b22 100%);color:#2d2440;border-color:#fff3cf}
#startModal .difficulty-item.active small,#startModal .difficulty-item:hover small{color:#443b55}
#startModal .difficulty-detail{margin-top:12px;padding:12px;border-radius:14px;background:rgba(255,255,255,.09);color:#eef5ff;text-align:center;font-size:16px;font-weight:800}
#startModal .difficulty-done{margin-top:16px}

/* Make other modals usable on top of the start screen */
#helpModal,#recipeModal,#soundModal,#resultModal,#fieldModal,#escapeModal{z-index:95}

@media (max-width:1200px){
  #startModal .home-mon.left-top{left:2%;top:22%;transform:scale(2.1)}
  #startModal .home-mon.left-mid{left:13%;top:52%;transform:scale(2.05)}
  #startModal .home-mon.right-mid{right:16%;top:63%;transform:scale(2)}
  #startModal .home-mon.right-bottom{right:4%;top:53%;transform:scale(2.15)}
  #startModal .home-menu-panel{top:41%;width:min(380px,34vw)}
  #startModal .menu-btn{min-height:64px;font-size:19px!important;border-radius:16px}
}
@media (max-width:850px) and (orientation:landscape){
  #startModal .home-title-wrap{top:5%;width:min(430px,54vw)}
  #startModal .title-kicker{font-size:8px;padding:5px 10px;border-width:1px}
  #startModal .title-line{-webkit-text-stroke:4px #28357e;text-shadow:0 3px 0 rgba(40,53,126,.8),0 8px 16px rgba(8,18,52,.28)}
  #startModal .title-line-top{font-size:clamp(34px,7vw,56px)}
  #startModal .title-line-bottom{font-size:clamp(30px,5.9vw,50px)}
  #startModal .title-sub{font-size:11px;padding:6px 14px;border-width:1px;margin-top:10px}
  #startModal .home-mon.left-top{left:1%;top:22%;transform:scale(1.35)}
  #startModal .home-mon.left-mid{left:10%;top:51%;transform:scale(1.4)}
  #startModal .home-mon.right-mid{right:13%;top:61%;transform:scale(1.35)}
  #startModal .home-mon.right-bottom{right:3%;top:52%;transform:scale(1.5)}
  #startModal .home-menu-panel{top:39%;width:min(248px,31vw);gap:7px}
  #startModal .menu-btn{min-height:42px;font-size:13px!important;border-width:2px!important;border-radius:11px;padding:5px 10px;gap:8px;box-shadow:0 4px 0 rgba(37,54,108,.52),0 8px 16px rgba(9,20,62,.3)}
  #startModal .menu-btn-icon{font-size:18px}
  #startModal .menu-btn-side{font-size:10px;padding:4px 6px;min-width:48px;border-width:1px}
  #startModal .home-bottom-copy{font-size:8px;bottom:8px}
  #startModal .difficulty-modal{width:min(360px,90vw);padding:20px 16px 16px;border-radius:18px}
  #startModal .difficulty-flyout-head{font-size:18px;margin-bottom:10px}
  #startModal .difficulty-item{font-size:12px;padding:10px 5px;border-radius:10px}
  #startModal .difficulty-item small{font-size:9px;margin-top:4px}
  #startModal .difficulty-detail{font-size:11px;padding:8px;border-radius:10px}
}


/* v0.15.4 — refined main title, subtitle removed, matching green difficulty dialog */
#startModal .home-title-wrap {
  top: 4.4%;
  width: min(710px, 64vw);
  z-index: 6;
}
#startModal .title-kicker {
  background: rgba(13, 58, 65, .85);
  border: 1px solid rgba(195, 244, 229, .8);
  color: #e3fff2;
  box-shadow: 0 5px 18px rgba(11, 36, 46, .27);
  font-size: 12px;
  letter-spacing: .16em;
  padding: 6px 15px;
}
#startModal .home-title {
  gap: 4px;
  margin-top: 12px;
  animation: cleanTitleFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 7px 7px rgba(12, 37, 65, .35));
}
#startModal .title-line {
  width: max-content;
  max-width: 100%;
  font-family: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo', system-ui, sans-serif;
  font-weight: 950;
  letter-spacing: -.065em;
  line-height: 1.04;
  -webkit-text-stroke: 0;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(17, 42, 72, .85), 0 6px 13px rgba(8, 33, 62, .38);
  overflow: visible;
}
#startModal .title-line::after { display: none !important; }
#startModal .title-line-top {
  font-size: clamp(57px, 6.8vw, 100px);
  -webkit-text-stroke: 2.8px #25517b;
  background: linear-gradient(180deg, #fff4b2 2%, #ffe074 30%, #ffbc42 72%, #f1962a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
#startModal .title-line-bottom {
  font-size: clamp(52px, 6vw, 90px);
  -webkit-text-stroke: 2.8px #28527f;
  background: linear-gradient(180deg, #d3faff 2%, #74dfff 35%, #679efb 58%, #f79ad2 59%, #f06cab 97%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes cleanTitleFloat {
  0%, 100% {transform:translateY(0)}
  50% {transform:translateY(-4px)}
}

/* Same dark jade palette as the existing in-game settings dialogs */
#startModal .difficulty-overlay {
  background: rgba(6, 18, 25, .69);
  backdrop-filter: blur(7px);
}
#startModal .difficulty-modal {
  background: radial-gradient(ellipse at 50% 0%, #24574b 0%, #163b37 38%, #102c34 74%, #0c202b 100%) !important;
  border: 1px solid #4a9478 !important;
  box-shadow: 0 25px 65px rgba(0, 10, 15, .64), 0 0 30px rgba(82, 192, 146, .14), inset 0 1px 0 rgba(223,255,240,.13);
}
#startModal .difficulty-flyout-head {
  color: #e3fff0;
  text-shadow: 0 2px 9px rgba(48, 194, 136, .22);
}
#startModal .difficulty-close { color: #bde9d6; }
#startModal .difficulty-item {
  background: linear-gradient(145deg, #22463f, #19373b);
  border: 1px solid #3c7766;
  color: #d7f2e8;
  box-shadow: inset 0 1px 0 rgba(245,255,250,.06);
}
#startModal .difficulty-item small { color: #94c8b5; }
#startModal .difficulty-item.active,
#startModal .difficulty-item:hover {
  background: linear-gradient(155deg, #8de6bc, #45c394);
  color: #0a332b;
  border: 1px solid #b6f5d6;
  box-shadow: 0 0 0 2px rgba(96,229,176,.16), 0 3px 12px rgba(12,63,47,.35);
}
#startModal .difficulty-item.active small,
#startModal .difficulty-item:hover small { color: #205d47; }
#startModal .difficulty-detail {
  background: rgba(9, 32, 36, .67);
  border: 1px solid #356b5f;
  color: #bfe9d7;
}
#startModal .difficulty-done {
  color: #0b332b;
  background: linear-gradient(120deg, #84edbf, #43c893);
  border: 1px solid #8bdfb9;
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(44,182,131,.2);
}
@media(max-width:850px) and (orientation:landscape) {
  #startModal .home-title-wrap {top: 3%; width: 52vw;}
  #startModal .title-kicker {font-size: 8px; padding: 3px 8px;}
  #startModal .home-title {margin-top: 5px; gap: 1px;}
  #startModal .title-line { -webkit-text-stroke: 0; text-shadow: 0 1px 0 #21466d, 0 3px 5px #122b51a8; }
  #startModal .title-line-top {font-size: clamp(31px, 5.1vw, 45px);}
  #startModal .title-line-bottom {font-size: clamp(27px, 4.5vw, 40px);}
}
@media (prefers-reduced-motion:reduce){
  #startModal .home-title { animation:none; }
}

/* Title uses actual glyph fill; background clipping with heavy text strokes produced dark unreadable letters. */
#startModal .title-line-top {
 background: none !important;
 color: #ffdc62 !important;
 -webkit-text-fill-color: #ffdc62 !important;
 -webkit-text-stroke: 2px #24516e !important;
 text-shadow: 0 3px 0 #24516e, 0 5px 10px #102f51ad !important;
}
#startModal .title-line-bottom {
 background: none !important;
 color: #92e7ff !important;
 -webkit-text-fill-color: #92e7ff !important;
 -webkit-text-stroke: 2px #24516e !important;
 text-shadow: 0 3px 0 #24516e, 0 5px 10px #102f51ad !important;
}
#startModal .title-line-bottom .title-word-a {
 color: #86e2ff !important; -webkit-text-fill-color:#86e2ff !important;
}
#startModal .title-line-bottom .title-word-b {
 color: #ff94c0 !important; -webkit-text-fill-color:#ff94c0 !important;
}
#startModal .difficulty-done {
 background: linear-gradient(120deg,#84edbf,#43c893) !important;
 border-color:#8bdfb9 !important;
 color:#0b332b !important;
}
/* Mobile landscape: prevent old 560px modal min-height from clipping the bottom menu. */
#startModal .dynamic-home-screen { min-height: 0 !important; }
@media (max-width:850px) and (orientation:landscape) {
  #startModal .home-menu-panel { top: 36%; gap: 4px; }
  #startModal .menu-btn {
    min-height: 34px;
    padding: 3px 8px;
    font-size: 11px !important;
    border-width: 1.5px !important;
    border-radius: 8px;
    box-shadow:0 3px 0 rgba(37,54,108,.46),0 5px 9px rgba(9,20,62,.26);
  }
  #startModal .menu-btn-icon { font-size: 15px; }
  #startModal .menu-btn-side { font-size: 9px; padding: 2px 5px; min-width: 38px; }
}


/* v0.15.5 — Main menu background replacement ONLY.
   Keep the original title, buttons, interactive dialogs, music and game logic.
   This image is the user-provided pixel-art landscape, not the earlier example screenshot. */
#startModal .dynamic-home-screen {
  background: #75b8e5 !important;
}
#startModal .home-sky {
  inset: 0;
  background: url('../assets/ui/menu-landscape.webp') center center / cover no-repeat !important;
}
/* Hide only the previous placeholder scene layers; preserve the real UI and Pokémon. */
#startModal .home-hills,
#startModal .home-road,
#startModal .home-castle,
#startModal .home-portal,
#startModal .home-crystals {display:none !important;}

/* Pokémon stand on the grassy lower part of the provided landscape. */
#startModal .home-mon.left-top {
  left:5%;right:auto;top:auto;bottom:17%;transform:scale(2.35);
}
#startModal .home-mon.left-mid {
  left:19%;right:auto;top:auto;bottom:9%;transform:scale(2.2);
}
#startModal .home-mon.right-mid {
  right:19%;left:auto;top:auto;bottom:9%;transform:scale(2.2);
}
#startModal .home-mon.right-bottom {
  right:5%;left:auto;top:auto;bottom:17%;transform:scale(2.35);
}
@media (max-width:1200px) {
  #startModal .home-mon.left-top {left:3%;top:auto;bottom:17%;transform:scale(1.95)}
  #startModal .home-mon.left-mid {left:18%;top:auto;bottom:9%;transform:scale(1.85)}
  #startModal .home-mon.right-mid {right:18%;top:auto;bottom:9%;transform:scale(1.85)}
  #startModal .home-mon.right-bottom {right:3%;top:auto;bottom:17%;transform:scale(1.95)}
}
@media (max-width:850px) and (orientation:landscape) {
  #startModal .home-mon.left-top {left:1%;top:auto;bottom:16%;transform:scale(1.25)}
  #startModal .home-mon.left-mid {left:10%;top:auto;bottom:9%;transform:scale(1.20)}
  #startModal .home-mon.right-mid {right:10%;top:auto;bottom:9%;transform:scale(1.20)}
  #startModal .home-mon.right-bottom {right:1%;top:auto;bottom:16%;transform:scale(1.25)}
}

/* v0.15.6 — Only the two requested character locations change.
   Pikachu: left-of-centre foliage (blue circle). Bulbasaur: above right-side rocks (red circle). */
#startModal .home-mon.left-top { left:27%; top:auto; bottom:34%; transform:scale(2.35); }
#startModal .home-mon.right-bottom { right:5%; left:auto; top:auto; bottom:34%; transform:scale(2.35); }
@media (max-width:1200px) and (min-width:851px) {
  #startModal .home-mon.left-top { left:27%; top:auto; bottom:33%; transform:scale(1.95); }
  #startModal .home-mon.right-bottom { right:5%; top:auto; bottom:33%; transform:scale(1.95); }
}
@media (max-width:850px) and (orientation:landscape) {
  /* Keep all four animated sprites visible and clear of the button column on small screens. */
  #startModal .home-mon.left-top { left:13%; top:auto; bottom:31%; transform:scale(1.18); }
  #startModal .home-mon.right-bottom { right:4%; top:auto; bottom:31%; transform:scale(1.18); }
}


/* v0.15.7 — Replace ONLY the animated main-menu title with the supplied PNG logo.
   The existing cleanTitleFloat animation remains on .home-title. */
#startModal .home-title-wrap { top: 2.4%; width: min(840px, 63vw); }
#startModal .home-title {
  width: 100%; margin-top: 0; gap: 0;
  animation: cleanTitleFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 7px 8px rgba(7, 28, 64, .28));
}
#startModal .home-title-logo {
  display:block; width: min(760px, 47vw); max-width: 100%;
  height:auto; margin:0 auto; object-fit:contain; pointer-events:none; user-select:none;
}
@media (max-width: 1200px) {
  #startModal .home-title-logo { width:min(640px, 47vw); }
}
@media (max-width: 850px) and (orientation: landscape) {
  #startModal .home-title-wrap { top:2.5%; width: min(460px, 52vw); }
  #startModal .home-title-logo { width:min(290px, 70%); }
}
@media (prefers-reduced-motion: reduce) {
  #startModal .home-title { animation:none; }
}

/* css/v18.css */
/* v0.15.8 — focused interaction and roster cleanup, no changes to battle map art. */
/* Main menu Pokémon feet land on the markers from the user screenshot. */
#startModal .home-mon.left-top {left:10.7%!important;right:auto!important;top:auto!important;bottom:21%!important;transform:scale(2.35)!important}
#startModal .home-mon.right-bottom {right:4.5%!important;left:auto!important;top:auto!important;bottom:22%!important;transform:scale(2.35)!important}
@media (max-width:1200px) and (min-width:851px) {
 #startModal .home-mon.left-top {left:10.7%!important;bottom:22%!important;transform:scale(1.95)!important}
 #startModal .home-mon.right-bottom {right:4.5%!important;bottom:23%!important;transform:scale(1.95)!important}
}
@media (max-width:850px) and (orientation:landscape) {
 #startModal .home-mon.left-top {left:7%!important;bottom:17%!important;transform:scale(1.18)!important}
 #startModal .home-mon.right-bottom {right:2%!important;bottom:20%!important;transform:scale(1.18)!important}
}
.auto-wave-count #autoWaveCount {text-align:center!important;text-align-last:center!important;padding:0!important;appearance:textfield;-moz-appearance:textfield}
.auto-wave-count #autoWaveCount::-webkit-inner-spin-button,.auto-wave-count #autoWaveCount::-webkit-outer-spin-button {appearance:none;margin:0}
#recommendSellBtn{height:37px;min-height:37px;flex:0 0 106px;font-size:11px;white-space:nowrap;padding:6px 8px}
.goal-indicator{position:absolute;top:12px;right:13px;z-index:3;max-width:250px;border-radius:8px;background:#152a30ec;border:1px solid #fbd46e;color:#ffe391;font-weight:900;font-size:12px;padding:7px 10px;box-shadow:0 0 16px #eccb4560}
.goal-indicator:hover{background:#2c3530}
.recipe-goal-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #5b8a69;background:#15352ccf;color:#ccf4d5;border-radius:9px;padding:10px 12px;margin:9px 0 12px;font-size:12px;font-weight:800;text-align:left}
.recipe-goal-bar button,.recipe-goal-pick{border-radius:8px;border:1px solid #bfa66e;background:#2d3c31;color:#ffe1a4;padding:7px 10px;font-size:11px;font-weight:900;cursor:pointer}
.recipe-goal-bar button:disabled{opacity:.42;cursor:default}
.recipe-card .recipe-goal-pick,.summon-only-card .recipe-goal-pick{width:100%;margin-top:7px;background:#27392d;border:1px solid #a8b977;color:#e5f9c0;min-height:31px}
.recipe-card .recipe-goal-pick:hover{background:#3c573b}
.recommend-sell-backdrop,.reset-confirm-backdrop{z-index:140!important}
.recommend-sell-modal{max-width:720px;width:min(720px,96vw);text-align:left;padding:24px 25px;overflow:hidden;display:flex;flex-direction:column;max-height:min(90dvh,740px)}
.recommend-sell-modal h2,.reset-confirm-modal h2{font-size:24px;margin:7px 0 10px;text-align:center;color:#e6fff2}
.recommend-sell-modal>.modal-kicker{text-align:center}
.recommend-sell-modal>p,.reset-confirm-modal>p{color:#b5d1c9;text-align:center;line-height:1.65;font-size:12px;margin:0 0 12px}
.recommended-sell-list{min-height:130px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:4px 3px;overscroll-behavior:contain}
.sell-suggestion{display:grid;grid-template-columns:22px 43px minmax(0,1fr) auto;align-items:center;gap:10px;background:#1b3535;border:1px solid #416b65;border-radius:10px;padding:10px;cursor:pointer}
.sell-suggestion:has(input:checked){border-color:#f0d080;background:#304338}
.sell-suggestion input{width:17px;height:17px;accent-color:#8edcb7}
.sell-suggestion img{width:42px;height:42px;image-rendering:pixelated;object-fit:contain}
.sell-suggestion span{min-width:0;text-align:left}
.sell-suggestion strong{display:block;font-size:13px;color:#e4f8f1}
.sell-suggestion small{display:block;margin-top:5px;line-height:1.4;color:#a6c9c1;font-size:11px}
.sell-suggestion>b{color:#f6d68d;font-size:12px}
.sell-empty{text-align:center;padding:35px 12px;color:#b5cfc6;line-height:1.8}
.recommend-sell-bottom{display:flex;gap:9px;align-items:center;margin-top:13px;flex-wrap:wrap}
.recommend-sell-bottom>div{flex:1;font-size:12px;color:#ffdc89;min-width:180px;font-weight:900}
.recommend-sell-bottom .button{min-height:36px;font-size:12px}
.sell-confirm-btn{background:#316f55!important;border-color:#6bbd93!important}
.reset-confirm-modal{max-width:480px!important;border-color:#e3b96c!important;background:linear-gradient(180deg,#1c453a,#0a242f)!important}
.reset-confirm-modal p{font-size:16px;color:#f6eee0}
.reset-confirm-actions{display:flex;gap:10px;margin-top:20px}
.reset-confirm-actions button{flex:1;min-height:46px;font-size:15px}
.danger-confirm{background:linear-gradient(120deg,#cf665f,#b94847)!important;border-color:#eca6a4!important;color:white!important}
@media(max-width:1150px){.battle-controls #recommendSellBtn{flex:0 0 95px!important;min-width:95px!important;font-size:10px!important}}
@media(max-width:760px){.battle-controls{flex-wrap:wrap!important;gap:4px!important}.battle-controls #recommendSellBtn{flex:1 1 0!important;height:32px!important;min-height:32px!important;width:auto!important;min-width:55px!important;font-size:8px!important;padding:4px 3px!important}.goal-indicator{top:7px;right:7px;font-size:9px;max-width:135px;padding:5px}.recipe-goal-bar{font-size:10px;padding:8px;gap:6px}.recipe-goal-bar button{font-size:9px;white-space:nowrap}.recommend-sell-modal{padding:16px;max-height:85dvh}.sell-suggestion{gap:5px;padding:7px;grid-template-columns:18px 31px minmax(0,1fr) auto}.sell-suggestion img{width:30px;height:30px}.sell-suggestion small{font-size:9px}.sell-suggestion strong{font-size:10px}.sell-suggestion>b{font-size:10px}}
/* Keep mobile-landscape sprites separated without changing their desktop foot anchors. */
@media(max-width:850px) and (orientation:landscape){
 #startModal .home-mon.left-top{left:0%!important;bottom:18%!important}
 #startModal .home-mon.right-bottom{right:0%!important;bottom:20%!important}
}

/* css/v19.css */
/* v0.16.0 — rarity quotas, recipe card layout, functional menu refinements */
/* All filter buttons, including General, use the same neutral jade color. */
#recipeModal .recipe-filter.summon-filter,
#recipeModal .recipe-filter.summon-filter:not(.active){
  background:#1c3b43!important;color:#bdd7cd!important;border-color:#3a6365!important;
  box-shadow:none!important;
}
#recipeModal .recipe-filter.summon-filter.active{
  background:#7de1ad!important;color:#14352e!important;border-color:#8cf8bd!important;
  box-shadow:0 0 0 1px #77d6ac33!important;
}
/* Every card fits its contents: title, recipe materials, availability and goal setting. */
#recipeModal .recipe-grid{grid-auto-rows:max-content!important;align-items:start!important;align-content:start!important}
#recipeModal .recipe-card{
  box-sizing:border-box!important;
  min-height:0!important;height:auto!important;
  padding:10px!important;
  display:flex!important;flex-direction:column!important;
  gap:8px!important;overflow:hidden!important;
  align-self:start!important;
}
#recipeModal .recipe-card .recipe-goal-pick{
  box-sizing:border-box!important;width:100%!important;max-width:100%!important;
  flex:0 0 auto!important;min-height:34px!important;margin:4px 0 0!important;
  padding:7px 10px!important;line-height:1.25!important;
  text-align:center!important;overflow:hidden!important;
}
#recipeModal .recipe-card .recipe-result,#recipeModal .recipe-card .recipe-parts,
#recipeModal .recipe-card .summon-only-copy{flex:0 0 auto!important;max-width:100%!important}
#recipeModal .recipe-card .recipe-result img{flex:0 0 auto}
#recipeModal .recipe-card .recipe-result-title{overflow-wrap:anywhere}
#recipeModal .summon-only-card{min-height:0!important}
/* New developer link is styled like a real menu button but opens its own tab. */
#startModal .menu-btn-developer{
  background:linear-gradient(180deg,#b9f2d6 0%,#6cca9f 55%,#3c986d 100%)!important;
  color:#123e32!important;text-decoration:none!important;
  display:flex!important;align-items:center;justify-content:center;
}
#startModal .home-menu-panel{top:37%!important;gap:clamp(5px,.8vh,10px)!important}
#startModal .home-menu-panel .menu-btn{min-height:clamp(39px,6.7vh,60px)!important;padding:7px 14px!important;font-size:clamp(12px,1.35vw,19px)!important}
#startModal .home-menu-panel .menu-btn-icon{font-size:clamp(17px,2vw,26px)!important}
#startModal .home-menu-panel .menu-btn-side{font-size:clamp(11px,1.2vw,16px)!important;padding:5px 9px!important}
@media(max-height:540px) and (orientation:landscape){
 #startModal .home-menu-panel{top:34%!important;gap:3px!important;width:min(260px,32vw)!important}
 #startModal .home-menu-panel .menu-btn{height:clamp(24px,7.1vh,31px)!important;min-height:clamp(24px,7.1vh,31px)!important;padding:2px 8px!important;border-width:1.5px!important;border-radius:8px!important;font-size:11px!important}
 #startModal .home-menu-panel .menu-btn-icon{font-size:15px!important}
 #startModal .home-menu-panel .menu-btn-side{font-size:9px!important;min-width:38px!important;padding:2px 5px!important;border-width:1px!important}
}
@media(max-width:760px){
 #recipeModal .recipe-card{padding:8px!important;gap:6px!important}
 #recipeModal .recipe-card .recipe-goal-pick{min-height:29px!important;padding:6px 8px!important}
}
/* Return-to-main dialog replaces browser-native confirm. */
.return-confirm-backdrop{z-index:151!important}
.return-confirm-modal{max-width:475px!important;padding:27px 25px!important;text-align:center!important;
  background:radial-gradient(ellipse at 50% 0%,#25574a,#153d3c 54%,#0b2532)!important;
  border:1px solid #6faf96!important;border-radius:18px!important}
.return-confirm-modal h2{font-size:23px;margin:8px 0 10px;color:#e5ffef}
.return-confirm-modal p{font-size:14px;line-height:1.8;margin:0;color:#b9d8ce}
.return-confirm-actions{display:flex;gap:10px;margin-top:22px}
.return-confirm-actions .button{flex:1;min-height:45px;font-size:13px}
.return-confirm-yes{background:linear-gradient(135deg,#79e0b7,#40af8c)!important;color:#123c32!important;border:1px solid #9bf4d1!important}
@media(max-width:480px){.return-confirm-actions{flex-direction:column}}

/* css/v20.css */
/* v0.16.1 — field HUD, selling, result, catalog-only mode and difficulty UX. */
/* Keep the field name centered, with the phase indicator on its LEFT. */
.battlefield-card .section-heading{position:relative;justify-content:center!important;min-height:43px!important}
.battlefield-card .section-heading .heading-left{text-align:center!important;flex:0 1 auto!important;min-width:0!important}
.battlefield-card .section-heading #fieldKicker,
.battlefield-card .section-heading #mapBadge,
#canvasWrap #mapBadge{display:none!important}
.battlefield-card .section-heading #fieldTitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battlefield-card .section-heading .field-phase-control{display:flex;position:absolute;left:14px;top:50%;transform:translateY(-50%);align-items:center;gap:7px;color:#bbdddb;font-size:11px;font-weight:900;white-space:nowrap}
.battlefield-card .section-heading .field-phase-control .phase-dot{flex:0 0 auto}
.battlefield-card .section-heading .stage-right{position:absolute;right:13px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:7px;white-space:nowrap}
#autoWaveCount{text-align:center!important;text-align-last:center!important}
/* Main-menu difficulty button text stays centered independently of its right-side selection chip. */
#startModal .menu-btn-difficulty{position:relative;justify-content:center!important;display:flex!important}
#startModal .menu-btn-difficulty .menu-btn-text{flex:0 0 auto!important;text-align:center!important;margin:auto!important}
#startModal .menu-btn-difficulty .menu-btn-icon{position:absolute;left:16px;top:50%;transform:translateY(-50%)}
#startModal .menu-btn-difficulty .menu-btn-side{position:absolute;right:13px;top:50%;transform:translateY(-50%)}
@media (max-width:850px) and (orientation:landscape){
 #startModal .menu-btn-difficulty .menu-btn-icon{left:8px}
 #startModal .menu-btn-difficulty .menu-btn-side{right:6px}
}
/* All difficulty option cards show recipe volume and actual HP/speed multipliers. */
#startModal .difficulty-modal .difficulty-item{min-height:92px;padding:12px 8px!important}
#startModal .difficulty-modal .difficulty-item small{display:block!important;line-height:1.55!important;white-space:normal;font-size:12px!important;font-weight:800!important}
#startModal .difficulty-modal .difficulty-item small span{font-size:11px;font-weight:700}
#startModal .difficulty-modal .difficulty-detail{font-size:14px!important}
@media (max-width:850px) and (orientation:landscape){
 #startModal .difficulty-modal .difficulty-item{min-height:58px!important;padding:5px 6px!important}
 #startModal .difficulty-modal .difficulty-item small{font-size:9px!important;line-height:1.3!important}
 #startModal .difficulty-modal .difficulty-item small span{font-size:8px!important}
 #startModal .difficulty-modal .difficulty-detail{font-size:10px!important}
}
/* Recommended sell filter tabs and select-all apply ONLY to the visible rarity. */
#recommendSellModal .recommend-sell-filters{display:flex;flex-wrap:wrap;gap:7px;margin:4px 0 12px}
#recommendSellModal .recommend-sell-filters button{min-height:34px;display:inline-flex;justify-content:center;align-items:center;gap:5px;padding:6px 12px;border-radius:8px;border:1px solid #487b71;background:#1c4140;color:#d6eae5;font-weight:900;font-size:12px}
#recommendSellModal .recommend-sell-filters button.active{background:#79dcac;color:#0d3e33;border-color:#a4ffd0}
#recommendSellModal .recommend-sell-filters button small{display:inline-flex;justify-content:center;align-items:center;min-width:17px;min-height:17px;background:#092e3370;border-radius:6px;padding:0 4px;font-size:10px}
#recommendSellModal .recommend-sell-bottom .sale-all-select{background:#284b50;border-color:#5b8b83;color:#e0f6ed}
#recommendSellModal .recommend-sell-bottom .sale-all-select:disabled{opacity:.4}
#recommendSellModal .recommend-sell-bottom #recommendSellConfirmBtn{white-space:nowrap}
@media(max-width:560px){#recommendSellModal .recommend-sell-filters{gap:4px}#recommendSellModal .recommend-sell-filters button{font-size:11px;padding:5px 8px}}
/* Main menu catalog is a global encyclopedia: no in-game goals from the title screen. */
#recipeModal.catalog-mode .recipe-goal-bar,
#recipeModal.catalog-mode .recipe-card .recipe-goal-pick,
#recipeModal.catalog-mode .summon-only-card .recipe-goal-pick{display:none!important}
#recipeModal:not(.catalog-mode) .recipe-card .recipe-goal-pick,
#recipeModal:not(.catalog-mode) .summon-only-card .recipe-goal-pick{background:linear-gradient(180deg,#ffe99b,#f3c24b)!important;color:#3e3120!important;border:1px solid #fff1b1!important;box-shadow:0 2px 0 #875a2480!important}
#recipeModal:not(.catalog-mode) .recipe-card .recipe-goal-pick:hover{filter:brightness(1.05)}
/* Result display: read full two-line message, then distinct action buttons. */
#resultModal .result-modal{max-width:510px!important;max-height:calc(100dvh - 28px)!important;overflow-y:auto!important;padding:24px!important}
#resultModal .result-kicker{font-size:14px!important;letter-spacing:.06em!important;color:#9aecbb!important}
#resultModal #resultTitle{font-size:clamp(23px,3.4vw,32px)!important;margin:10px 0 7px!important}
#resultModal #resultText{font-size:13px!important;line-height:1.85!important;margin:0!important}
#resultModal .result-stats{margin:16px 0!important}
#resultModal .result-actions{display:flex;flex-direction:column;gap:9px;margin-top:14px}
#resultModal .result-actions .button{width:100%;min-height:42px!important;display:flex;align-items:center;justify-content:center;padding:10px!important;font-weight:900;font-size:14px!important}
#resultModal .result-actions .result-next{background:linear-gradient(130deg,#d5c3ff,#927fdd)!important;color:#242448!important;border:1px solid #f2e3ff!important}
#resultModal .result-actions .result-main{background:#1b3843!important;color:#d0eee4!important;border:1px solid #5b857f!important}
#resultModal .result-actions button:disabled{opacity:.48!important;cursor:default}
@media (max-width:850px) and (orientation:landscape){
 #resultModal .result-modal{max-width:470px!important;padding:13px!important}
 #resultModal .result-kicker{font-size:10px!important}
 #resultModal #resultTitle{font-size:20px!important;margin:5px 0!important}
 #resultModal #resultText{font-size:10px!important;line-height:1.4!important}
 #resultModal .result-stats{margin:6px 0!important;padding:0!important}
 #resultModal .result-stats>div{padding:4px!important}
 #resultModal .result-stats strong{font-size:15px!important;margin-top:2px!important}
 #resultModal .result-actions{gap:5px;margin-top:5px}
 #resultModal .result-actions .button{min-height:28px!important;padding:4px!important;font-size:11px!important}
 .battlefield-card .section-heading .field-phase-control{left:6px;font-size:8px}
 .battlefield-card .section-heading .stage-right{right:6px;font-size:8px}
}

/* css/v21-mobile.css */
/* v0.16.3 — iPhone Safari landscape gameplay optimization.
   This file intentionally loads last to resolve earlier conflicting breakpoints. */
html, body {overscroll-behavior:none; -webkit-text-size-adjust:100%;}
button, a, [role="button"], .app-shell, #startModal {
  touch-action:manipulation;
}
#gameCanvas{touch-action:none; -webkit-user-select:none; user-select:none;}
input, textarea{touch-action:manipulation;}

/* Only touch landscape gets compressed controls; desktop layout is unchanged. */
@media (max-width:1100px) and (orientation:landscape) and (pointer:coarse) {
  html,body{height:100%;width:100%;overflow:hidden!important;}
  .app-shell{
    width:100%;height:100dvh!important;max-height:100dvh!important;
    padding:max(2px,env(safe-area-inset-top)) max(3px,env(safe-area-inset-right))
      max(2px,env(safe-area-inset-bottom)) max(3px,env(safe-area-inset-left))!important;
    gap:2px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;
  }
  .topbar{
    flex:0 0 26px!important;height:26px!important;min-height:26px!important;
    padding:1px 4px!important;gap:4px!important;border-radius:7px!important;
    flex-wrap:nowrap!important;
  }
  .top-stats{flex:1 1 0!important;min-width:0!important;gap:3px!important;}
  .stat-chip{flex:1 1 0!important;min-width:0!important;min-height:22px!important;height:22px!important;padding:1px 3px!important;}
  .stat-label{font-size:7px!important;line-height:9px!important}
  .stat-chip strong{font-size:11px!important;line-height:11px!important}
  .header-actions{flex:0 0 auto!important;gap:3px!important}
  .header-text-button{height:23px!important;min-height:23px!important;padding:0 5px!important;font-size:9px!important;white-space:nowrap!important}
  .header-actions #quickRecipeBtn,.header-actions #helpBtn{display:none!important}
  .main-layout{
    flex:1 1 0!important;min-height:0!important;
    display:grid!important;grid-template-rows:minmax(0,1fr)!important;
    grid-template-columns:minmax(0,1fr) clamp(184px,26vw,236px)!important;
    gap:3px!important;
  }
  .battlefield-card,.side-panel{height:100%!important;min-height:0!important;overflow:hidden!important;}
  .section-heading{
    height:19px!important;min-height:19px!important;max-height:19px!important;
    padding:1px 5px!important;flex:0 0 19px!important;
  }
  .section-heading .heading-left{position:static!important;transform:none!important;margin:0 auto!important}
  .section-heading h2{font-size:10px!important;line-height:15px!important}
  .section-heading .field-phase-control{font-size:9px!important}
  .section-heading .heading-kicker,.section-heading .stage-right{display:none!important}
  .battle-controls{
    position:static!important;display:flex!important;
    flex:0 0 30px!important;height:30px!important;min-height:30px!important;
    flex-wrap:nowrap!important;overflow:hidden!important;
    gap:3px!important;padding:2px 3px!important;
  }
  .battle-controls .button,
  .battle-controls .auto-wave-count{
    min-width:0!important;max-width:none!important;width:auto!important;
    height:26px!important;min-height:26px!important;max-height:26px!important;
    padding:0 3px!important;margin:0!important;
    flex-shrink:1!important;border-radius:5px!important;
    white-space:nowrap!important;overflow:hidden!important;
    font-size:9px!important;line-height:1!important;
  }
  .battle-controls #waveBtn{
    flex:2.25 1 0!important;width:0!important;min-width:0!important;
    font-size:11px!important;gap:4px!important;
  }
  .battle-controls #speedBtn{flex:0.90 1 0!important;width:0!important}
  .battle-controls #autoDeployBtn{flex:1 1 0!important;width:0!important}
  .battle-controls #recommendSellBtn{flex:1 1 0!important;width:0!important}
  .battle-controls .auto-wave-count{
    flex:.58 1 0!important;width:0!important;min-width:0!important;
    padding:0!important;display:flex!important;justify-content:center!important;
    align-items:center!important;gap:1px!important;
  }
  .battle-controls .auto-wave-count span{display:none!important}
  .battle-controls .auto-wave-count::after{content:"회";font-size:9px;color:#cbe5de}
  .battle-controls .auto-wave-count input{
    width:31px!important;min-width:0!important;max-width:31px!important;
    height:23px!important;min-height:23px!important;
    padding:0!important;margin:0!important;font-size:16px!important;text-align:center!important;
  }
  .battle-controls #autoWaveBtn{flex:.98 1 0!important;width:0!important;font-size:9px!important}
  .battle-controls .btn-symbol{display:inline-flex!important;font-size:11px!important}
  .battle-controls .btn-symbol svg{height:11px!important;width:11px!important}
  .battle-controls .keycap{display:none!important}
  .canvas-wrap{position:relative!important;flex:1 1 0!important;min-height:0!important;height:0!important;
    display:flex!important;justify-content:center!important;align-items:center!important;overflow:hidden!important}
  .canvas-wrap #gameCanvas{display:block!important;width:auto!important;height:auto!important;
    max-height:100%!important;max-width:100%!important;aspect-ratio:3/2!important;
    object-fit:contain!important;image-rendering:auto!important}
  .map-wave-progress{height:17px!important;min-height:17px!important;flex:0 0 17px!important;
    padding:1px 5px!important;gap:1px!important}
  .map-wave-progress .wave-progress-caption{height:10px;line-height:10px;font-size:8px!important}
  .map-wave-progress .progress-rail{height:3px!important;min-height:3px!important;}
  .battle-tip{display:none!important}
  .sidebar-nav{height:25px!important;min-height:25px!important;margin-bottom:2px!important;padding:1px!important}
  .panel-tab{font-size:9px!important}
  .side-panel{padding:3px!important}
  .side-panel>.panel{padding:4px!important;overflow:auto!important}
  .side-panel>.panel .panel-caption{display:none!important}
  .side-panel .panel-head{margin-bottom:1px!important}
  .side-panel>.panel h2{font-size:11px!important;line-height:14px!important;margin:0 0 3px!important}
  .summon-button{height:42px!important;min-height:42px!important;padding:2px 4px!important}
  .summon-logo{width:24px!important;height:24px!important}
  .summon-copy strong{font-size:11px!important}
  .summon-copy small{font-size:8px!important}
  .summon-odds{margin:3px 0!important;padding:3px!important}
  .summon-panel #summonRecipeBtn{min-height:24px!important}
  .panel input:not([type="checkbox"]), .modal input[type="text"], .modal input[type="search"]{font-size:16px!important}
  .map-badge{display:none!important}
  .map-bottom{display:none!important}
  .toast-stack{max-width:95%!important}
  .orientation-overlay{display:none!important}

  /* Title is fully visible above the button stack on short Safari viewports. */
  #startModal .home-title-wrap{
    top:2%!important;left:50%!important;
    width:min(350px,55vw)!important;
    transform:translateX(-50%)!important;
  }
  #startModal .home-title-logo{
    width:auto!important;height:auto!important;
    max-height:min(23dvh,92px)!important;
    max-width:min(290px,45vw)!important;
    object-fit:contain!important;
  }
  #startModal .home-title{margin:0!important;animation:cleanTitleFloat 4s ease-in-out infinite!important}
  #startModal .home-menu-panel{
    top:31%!important;left:50%!important;transform:translateX(-50%)!important;
    width:min(245px,33vw)!important;
    gap:3px!important;display:flex!important;flex-direction:column!important;
  }
  #startModal .home-menu-panel .menu-btn{
    width:100%!important;min-height:24px!important;max-height:26px!important;
    height:clamp(23px,6.5dvh,26px)!important;
    padding:1px 6px!important;margin:0!important;
    font-size:11px!important;line-height:1!important;
    border-width:1px!important;border-radius:7px!important;
    box-shadow:0 2px 0 #2934579c,0 4px 9px #07173445!important;
  }
  #startModal .menu-btn-icon{font-size:13px!important;line-height:1!important}
  #startModal .menu-btn-side{
    font-size:9px!important;padding:1px 5px!important;min-width:35px!important;border-width:1px!important;
  }
  #startModal .home-bottom-copy{display:none!important}
}
@media (max-width:1100px) and (orientation:landscape) and (pointer:coarse) and (max-height:350px){
  #startModal .home-title-logo{max-height:20dvh!important}
  #startModal .home-menu-panel{top:28%!important;gap:2px!important}
  #startModal .home-menu-panel .menu-btn{height:clamp(21px,7dvh,24px)!important;min-height:21px!important}
  .topbar{height:24px!important;min-height:24px!important;flex-basis:24px!important}
  .section-heading{height:17px!important;min-height:17px!important;flex-basis:17px!important}
  .battle-controls{height:27px!important;min-height:27px!important;flex-basis:27px!important}
  .map-wave-progress{height:15px!important;min-height:15px!important;flex-basis:15px!important}
}

/* css/v22-browser.css */
/* v0.16.4: browser-first mobile landscape. Safari, Chrome Android, Samsung Internet.
   This stylesheet runs AFTER all earlier mobile breakpoints. No app install required. */
html, body { -webkit-text-size-adjust: 100%; }
#gameCanvas { touch-action: none!important; -webkit-user-select: none!important; user-select: none!important; }
button, a, [role="button"], .panel-tab, .recipe-filter, .home-menu-panel {
  touch-action: manipulation!important; -webkit-tap-highlight-color: transparent;
}
/* Preserve text selection and native keyboard controls for inputs in modals. */
input, textarea, select, [contenteditable="true"] { touch-action: manipulation; }

/* Browsers may reclaim ~30-80px as their address bars expand. The visual viewport
   height is measured in JS and used as the game container height, not full screen. */
@media (max-width: 1280px) and (orientation: landscape) and (pointer: coarse) {
  html,body{ margin:0!important; padding:0!important; width:100%!important; height:var(--mobile-browser-h, 100dvh)!important; overflow:hidden!important; overscroll-behavior:none; }
  body{position:relative!important;}
  .app-shell{
    box-sizing:border-box!important; width:100%!important; max-width:none!important;
    height:var(--mobile-browser-h, 100dvh)!important;
    min-height:0!important; max-height:var(--mobile-browser-h, 100dvh)!important;
    padding: max(2px,env(safe-area-inset-top,0px)) max(3px,env(safe-area-inset-right,0px))
             max(2px,env(safe-area-inset-bottom,0px)) max(3px,env(safe-area-inset-left,0px))!important;
    margin:0!important; overflow:hidden!important; display:flex!important;
    flex-direction:column!important; gap:2px!important;
  }
  .topbar{
    width:100%!important; flex:0 0 26px!important; height:26px!important;
    min-height:26px!important; max-height:26px!important;
    padding:1px 3px!important; gap:3px!important; margin:0!important;
    flex-wrap:nowrap!important; border-radius:7px!important;
  }
  .topbar .brand{display:none!important;}
  .top-stats{flex:1 1 0!important;min-width:0!important; gap:2px!important; overflow:hidden!important;}
  .top-stats>.stat-chip{
    flex:1 1 0!important; min-width:0!important; height:22px!important;
    min-height:22px!important; padding:0 3px!important; border-radius:5px!important;
  }
  .stat-label{font-size:7px!important;line-height:9px!important;white-space:nowrap!important;}
  .stat-chip strong{font-size:11px!important;line-height:12px!important;}
  .stat-chip strong small{font-size:7px!important;}
  .header-actions{gap:2px!important;flex:0 0 auto!important;min-width:0!important;margin:0!important;}
  .header-actions #quickRecipeBtn,.header-actions #helpBtn{display:none!important;}
  .header-text-button,.header-actions .button{
    box-sizing:border-box!important;height:23px!important;min-height:23px!important;
    padding:0 5px!important;font-size:9px!important;border-radius:5px!important;
    white-space:nowrap!important;
  }
  .header-actions kbd{display:none!important;}
  .main-layout{
    flex:1 1 0!important;height:0!important;min-height:0!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) clamp(170px,25vw,224px)!important;
    grid-template-rows:minmax(0,1fr)!important;gap:3px!important;
  }
  .battlefield-card,.side-panel{
    display:flex!important;flex-direction:column!important;
    width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
    overflow:hidden!important; margin:0!important;
  }
  .section-heading{
    flex:0 0 18px!important;height:18px!important;min-height:18px!important;max-height:18px!important;
    padding:0 4px!important;overflow:hidden!important;
  }
  .section-heading h2{font-size:10px!important;line-height:16px!important;white-space:nowrap!important;}
  .section-heading .field-phase-control{font-size:8px!important;left:5px!important;}
  .section-heading .stage-right,.section-heading .heading-kicker{display:none!important;}
  .battle-controls{
    position:relative!important; flex:0 0 28px!important;height:28px!important;
    min-height:28px!important;max-height:28px!important; width:100%!important;
    margin:0!important;padding:1px 2px!important;gap:2px!important;
    display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
    overflow:hidden!important;
  }
  .battle-controls>.button,
  .battle-controls>.auto-wave-count{
    box-sizing:border-box!important; flex-shrink:1!important;
    min-width:0!important; max-width:none!important;
    min-height:26px!important;max-height:26px!important;height:26px!important;
    padding:0 3px!important;margin:0!important;border-radius:5px!important;
    overflow:hidden!important;text-overflow:clip!important;
    font-size:9px!important;line-height:1!important;
    white-space:nowrap!important;
  }
  .battle-controls #waveBtn{flex:2.35 1 0!important;width:0!important;gap:2px!important;font-size:10px!important;}
  .battle-controls #speedBtn{flex:0.91 1 0!important;width:0!important;}
  .battle-controls #autoDeployBtn{flex:1.04 1 0!important;width:0!important;}
  .battle-controls #recommendSellBtn{flex:1.04 1 0!important;width:0!important;}
  .battle-controls .auto-wave-count{
    flex:.55 1 0!important;width:0!important;gap:0!important;padding:0!important;
    align-items:center!important;justify-content:center!important;
  }
  .battle-controls .auto-wave-count span{display:none!important;}
  .battle-controls .auto-wave-count::after{content:'회';font-size:8px;color:#c1e0d8;}
  .battle-controls .auto-wave-count input{
    min-width:0!important;max-width:26px!important;width:26px!important;
    min-height:21px!important;height:21px!important;padding:0!important;
    margin:0!important;text-align:center!important;font-size:16px!important;
  }
  .battle-controls #autoWaveBtn{flex:1.02 1 0!important;width:0!important;}
  .battle-controls .keycap{display:none!important;}
  .battle-controls .btn-symbol,.battle-controls .btn-symbol svg{width:10px!important;height:10px!important;}
  .canvas-wrap{
    flex:1 1 0!important; height:0!important;min-height:0!important;width:100%!important;
    padding:0!important;margin:0!important;overflow:hidden!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
  }
  .canvas-wrap #gameCanvas{
    display:block!important; flex:none!important; width:auto!important;height:auto!important;
    max-width:100%!important;max-height:100%!important;
    aspect-ratio:3/2!important;object-fit:contain!important;image-rendering:auto!important;
  }
  .map-wave-progress{
    flex:0 0 15px!important;height:15px!important;min-height:15px!important;
    max-height:15px!important;padding:1px 4px!important;margin:0!important;
  }
  .map-wave-progress .wave-progress-caption{line-height:9px!important;height:9px!important;font-size:8px!important;}
  .map-wave-progress .progress-rail{height:3px!important;min-height:3px!important;}
  .battle-tip,.map-badge,.map-bottom{display:none!important;}
  .side-panel{padding:2px!important;gap:1px!important;}
  .sidebar-nav{flex:0 0 24px!important;height:24px!important;min-height:24px!important;padding:1px!important;margin-bottom:1px!important;}
  .panel-tab{font-size:9px!important;padding:0 3px!important;}
  .side-panel>.panel{min-height:0!important;flex:1 1 0!important;overflow:auto!important;overscroll-behavior:contain;padding:4px!important;}
  .side-panel>.panel .panel-caption{display:none!important;}
  .side-panel .panel-head{margin-bottom:1px!important;}
  .side-panel>.panel h2{font-size:11px!important;line-height:14px!important;margin:0 0 3px!important;}
  .summon-button{height:40px!important;min-height:40px!important;padding:2px 4px!important;}
  .summon-logo{width:23px!important;height:23px!important;}
  .summon-copy strong{font-size:11px!important;}
  .summon-copy small{font-size:8px!important;}
  .summon-odds{margin:3px 0!important;padding:3px!important;}
  .summon-panel #summonRecipeBtn{min-height:24px!important;}
  .panel input:not([type="checkbox"]), .modal input[type="text"], .modal input[type="search"]{
    font-size:16px!important;
  }
  /* Treat all overlays as visible-area dialogs, including browser chrome changes. */
  .modal-backdrop:not([hidden]){max-height:var(--mobile-browser-h, 100dvh)!important;overflow:hidden!important;}
  .modal:not(.dynamic-home-screen){max-height:calc(var(--mobile-browser-h, 100dvh) - 12px)!important;overflow-y:auto!important;overscroll-behavior:contain;}
  .recipe-modal,.recommend-sell-modal,.sound-modal,.help-modal,.result-modal{
    max-width:calc(100vw - 14px)!important;
  }
  #startModal.main-menu-backdrop{
    height:var(--mobile-browser-h, 100dvh)!important;
    min-height:0!important;max-height:var(--mobile-browser-h, 100dvh)!important;
  }
  #startModal .dynamic-home-screen{
    height:var(--mobile-browser-h, 100dvh)!important;
    min-height:0!important;max-height:var(--mobile-browser-h, 100dvh)!important;
  }
  #startModal .home-title-wrap{top:2%!important;left:50%!important;transform:translateX(-50%)!important;}
  #startModal .home-title-logo{max-height:min(23vh,93px)!important;max-width:min(320px,46vw)!important;}
  #startModal .home-menu-panel{top:31%!important;width:min(244px,33vw)!important;gap:3px!important;}
  #startModal .home-menu-panel .menu-btn{
    height:clamp(22px,6.4vh,27px)!important;min-height:22px!important;max-height:27px!important;
    padding:1px 6px!important;margin:0!important;
    font-size:11px!important;line-height:1!important;
    border-width:1px!important;border-radius:6px!important;
  }
  #startModal .menu-btn-icon{font-size:13px!important;}
  #startModal .menu-btn-side{font-size:9px!important;padding:1px 4px!important;min-width:34px!important;}
  #startModal .home-bottom-copy{display:none!important;}
  .unit-context{max-width:calc(100vw - 12px)!important;max-height:calc(var(--mobile-browser-h, 100dvh) - 12px)!important;overflow-y:auto!important;}
}
@media (max-width:1280px) and (orientation:landscape) and (pointer:coarse) and (max-height:310px){
  .topbar{flex-basis:23px!important;height:23px!important;min-height:23px!important;}
  .section-heading{flex-basis:16px!important;height:16px!important;min-height:16px!important;}
  .battle-controls{flex-basis:25px!important;height:25px!important;min-height:25px!important;}
  .battle-controls>.button,.battle-controls>.auto-wave-count{height:23px!important;min-height:23px!important;max-height:23px!important;}
  .map-wave-progress{flex-basis:13px!important;height:13px!important;min-height:13px!important;}
  .sidebar-nav{flex-basis:22px!important;height:22px!important;min-height:22px!important;}
  #startModal .home-title-logo{max-height:19vh!important;}
  #startModal .home-menu-panel{top:27%!important;gap:2px!important;}
  #startModal .home-menu-panel .menu-btn{height:22px!important;}
}
/* Browsers without fine hover on phones: landscape layout even if a stylus/mouse is paired. */
@media (max-width:1280px) and (orientation:portrait) and (pointer:coarse){
  .orientation-overlay{display:flex!important;height:var(--mobile-browser-h, 100dvh)!important;}
}
/* Fixed-size legacy selectors in v14 have ID specificity. Override them explicitly. */
@media (max-width:1280px) and (orientation:landscape) and (pointer:coarse){
 .battlefield-card .battle-controls > #waveBtn,
 .battlefield-card .battle-controls > #speedBtn,
 .battlefield-card .battle-controls > #autoDeployBtn,
 .battlefield-card .battle-controls > #recommendSellBtn,
 .battlefield-card .battle-controls > #autoWaveBtn,
 .battlefield-card .battle-controls > .auto-wave-count{
    box-sizing:border-box!important;
    width:0!important; min-width:0!important;max-width:none!important;
    flex-basis:0!important;
    height:26px!important;min-height:26px!important;max-height:26px!important;
    padding:0 3px!important; margin:0!important;
    border-radius:5px!important;font-size:9px!important;
    white-space:nowrap!important; overflow:hidden!important;
 }
 .battlefield-card .battle-controls > #waveBtn{flex:2.35 1 0!important;font-size:10px!important;}
 .battlefield-card .battle-controls > #speedBtn{flex:.91 1 0!important;}
 .battlefield-card .battle-controls > #autoDeployBtn{flex:1.04 1 0!important;}
 .battlefield-card .battle-controls > #recommendSellBtn{flex:1.04 1 0!important;}
 .battlefield-card .battle-controls > .auto-wave-count{flex:.55 1 0!important;}
 .battlefield-card .battle-controls > #autoWaveBtn{flex:1.02 1 0!important;}
 .battlefield-card .battle-controls #autoWaveCount{height:21px!important;min-height:21px!important;max-height:21px!important;width:26px!important;min-width:0!important;max-width:26px!important;font-size:16px!important;}
}
@media (max-width:1280px) and (orientation:landscape) and (pointer:coarse) and (max-height:310px){
 .battlefield-card .battle-controls > #waveBtn,
 .battlefield-card .battle-controls > #speedBtn,
 .battlefield-card .battle-controls > #autoDeployBtn,
 .battlefield-card .battle-controls > #recommendSellBtn,
 .battlefield-card .battle-controls > #autoWaveBtn,
 .battlefield-card .battle-controls > .auto-wave-count{
   height:23px!important;min-height:23px!important;max-height:23px!important;
 }
}

/* css/v23-ux.css */
/* v0.16.5: full-screen control, clear 1–4 tabs, spatial keyboard focus,
   larger battlefield and responsive horizontal mobile Pokedex. */
.keyboard-nav-focus{outline:3px solid #ffe88f!important;outline-offset:2px!important;box-shadow:0 0 0 5px #213c48,0 0 18px #ffe88f90!important;position:relative;z-index:3}
.sidebar-nav{gap:5px!important}
.sidebar-nav .panel-tab{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;border:1px solid #476a73!important;background:#152c37!important;color:#e2f3eb!important;font-weight:900!important;letter-spacing:-.02em;transition:background .15s,border-color .15s}
.sidebar-nav .panel-tab .tab-keys{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:21px;height:21px;background:#234b51;border:1px solid #568889;color:#a9eacc;border-radius:6px;font-size:11px;line-height:1;font-variant-numeric:tabular-nums}
.sidebar-nav .panel-tab[data-panel="summon"]{border-bottom:3px solid #7be3b2!important}
.sidebar-nav .panel-tab[data-panel="fusion"]{border-bottom:3px solid #85b9ff!important}
.sidebar-nav .panel-tab[data-panel="unit"]{border-bottom:3px solid #f7ca83!important}
.sidebar-nav .panel-tab[data-panel="research"]{border-bottom:3px solid #c9a6ff!important}
.sidebar-nav .panel-tab.active{background:#77ddb1!important;color:#15352f!important;border-color:#b6ffdd!important;box-shadow:inset 0 1px 0 #e5ffef80!important}
.sidebar-nav .panel-tab.active .tab-keys{background:#255546;color:#fff;border-color:#3c8364}
.sidebar-nav .panel-tab[data-panel="fusion"].active{background:#8cbbef!important;color:#153456!important;border-color:#cbeaff!important}
.sidebar-nav .panel-tab[data-panel="unit"].active{background:#efd29c!important;color:#443211!important;border-color:#ffe8c5!important}
.sidebar-nav .panel-tab[data-panel="research"].active{background:#c6aeed!important;color:#35224e!important;border-color:#e8d5ff!important}
.sidebar-nav .panel-tab.active .tab-keys{border-color:#ffffff99;background:#173b41;color:#fff}

#startModal .fullscreen-menu-btn{position:absolute;right:max(12px,env(safe-area-inset-right,0px));top:max(10px,env(safe-area-inset-top,0px));z-index:13;display:inline-flex;justify-content:center;align-items:center;gap:8px;padding:10px 14px;min-height:38px;border:2px solid #e4f6ffd9;border-radius:14px;background:#132f5fd9;color:#fff;font-size:13px;font-weight:900;box-shadow:0 6px 16px #091a3e77;backdrop-filter:blur(7px)}
#startModal .fullscreen-menu-btn>span:first-child{font-size:19px}
#startModal .fullscreen-menu-btn.is-active{background:#286a61e8;border-color:#94e0ca}
#startModal .fullscreen-note{position:absolute;top:58px;right:10px;z-index:14;width:min(340px,50vw);padding:9px 12px;border-radius:9px;background:#122638ef;color:#eef7f9;box-shadow:0 4px 16px #0006;font-size:11px;line-height:1.5}
#startModal .fullscreen-note[hidden]{display:none!important}

/* Use pixels that were previously empty around the centered 3:2 play field. */
@media (min-width:1061px) and (pointer:fine){
 .app-shell{max-width:none!important;width:100%!important;padding:5px 6px!important;gap:4px!important}
 .topbar{height:49px!important;min-height:49px!important;flex:0 0 49px!important;margin:0!important}
 .main-layout{grid-template-columns:minmax(0,1fr) clamp(262px,19.0vw,316px)!important;grid-template-rows:minmax(0,1fr)!important;gap:5px!important;flex:1 1 0!important;height:0!important}
 .battlefield-card,.side-panel{height:100%!important;min-height:0!important}
 .battlefield-card .section-heading{height:34px!important;min-height:34px!important;max-height:34px!important;flex:0 0 34px!important;padding:3px 10px!important}
 .battlefield-card .battle-controls{height:40px!important;min-height:40px!important;max-height:40px!important;flex:0 0 40px!important;padding:3px 6px!important;gap:5px!important}
 .battlefield-card .battle-controls>.button{height:32px!important;min-height:32px!important;font-size:11px!important}
 .battlefield-card .map-wave-progress{height:23px!important;min-height:23px!important;flex:0 0 23px!important;padding:2px 7px!important}
 .battlefield-card .battle-tip{display:none!important}
 .battlefield-card .canvas-wrap{flex:1 1 0!important;height:0!important;min-height:0!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
 .battlefield-card .canvas-wrap #gameCanvas{height:auto!important;width:auto!important;max-height:100%!important;max-width:100%!important;aspect-ratio:3/2!important;object-fit:contain!important}
 .side-panel{padding:5px!important}
 .sidebar-nav{height:35px!important;min-height:35px!important;margin-bottom:4px!important;padding:2px!important}
 .side-panel>.panel{padding:8px!important}
}

/* Landscape Safari/Android browser mode, not installed PWA. */
@media (orientation:landscape) and (pointer:coarse) and (max-width:1280px){
 #startModal .fullscreen-menu-btn{top:max(3px,env(safe-area-inset-top,0px))!important;right:max(3px,env(safe-area-inset-right,0px))!important;min-height:22px!important;padding:2px 6px!important;border-width:1px!important;border-radius:6px!important;gap:4px!important;font-size:9px!important}
 #startModal .fullscreen-menu-btn>span:first-child{font-size:13px!important}
 #startModal .fullscreen-note{top:31px!important;font-size:9px!important}
 .main-layout{grid-template-columns:minmax(0,1fr) clamp(154px,22vw,208px)!important;gap:2px!important}
 .battlefield-card .section-heading{flex:0 0 14px!important;height:14px!important;min-height:14px!important;max-height:14px!important;padding:0 3px!important}
 .battlefield-card .section-heading h2{font-size:9px!important;line-height:12px!important}
 .battlefield-card .battle-controls{flex:0 0 25px!important;height:25px!important;min-height:25px!important;max-height:25px!important;padding:1px 2px!important;gap:2px!important}
 .battlefield-card .map-wave-progress{flex:0 0 12px!important;height:12px!important;min-height:12px!important;max-height:12px!important;padding:0 3px!important}
 .battlefield-card .map-wave-progress .wave-progress-caption{font-size:7px!important;height:8px!important;line-height:8px!important}
 .battlefield-card .map-wave-progress .progress-rail{height:2px!important;min-height:2px!important}
 .side-panel{padding:2px!important}
 .sidebar-nav{height:26px!important;min-height:26px!important;flex:0 0 26px!important;padding:2px!important;gap:2px!important;margin-bottom:0!important}
 .sidebar-nav .panel-tab{font-size:10px!important;padding:0 2px!important;gap:3px!important;border-width:1px!important;border-bottom-width:2px!important;line-height:1!important}
 .sidebar-nav .panel-tab .tab-keys{width:14px;height:14px;font-size:8px;border-radius:3px}
 .side-panel>.panel{padding:3px!important}
 .side-panel>.panel .panel-head{margin-bottom:1px!important}
 .side-panel>.panel h2{font-size:11px!important}
 .side-panel .research-item{min-height:40px!important;padding:4px 3px!important}
 .side-panel .unit-stats{gap:2px!important}
 .side-panel .unit-buttons{gap:2px!important}
 .side-panel .unit-buttons .mini{font-size:10px!important;min-height:27px!important;padding:4px 2px!important}

 /* Full-width responsive Pokedex with a stable filter/search section, legible cards and touch scrolling. */
 #recipeModal{padding:2px!important;overflow:hidden!important;align-items:stretch!important}
 #recipeModal .recipe-modal{display:flex!important;flex-direction:column!important;box-sizing:border-box!important;width:calc(100vw - 8px)!important;max-width:calc(100vw - 8px)!important;height:calc(var(--mobile-browser-h,100dvh) - 6px)!important;max-height:calc(var(--mobile-browser-h,100dvh) - 6px)!important;padding:6px 8px!important;gap:4px!important;overflow:hidden!important;border-radius:10px!important}
 #recipeModal .recipe-top{height:29px!important;min-height:29px!important;flex:0 0 29px!important;justify-content:flex-start!important;padding:0 36px 0 6px!important}
 #recipeModal .recipe-top .modal-kicker,#recipeModal .recipe-top p{display:none!important}
 #recipeModal .recipe-top h2{font-size:15px!important;margin:0!important;text-align:left!important}
 #recipeModal .recipe-top .modal-close{right:2px!important;top:0!important;width:28px!important;height:27px!important;min-height:27px!important}
 #recipeModal .recipe-filters{display:flex!important;justify-content:flex-start!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin;gap:4px!important;flex:0 0 29px!important;min-height:29px!important;padding:0 2px 1px!important;-webkit-overflow-scrolling:touch}
 #recipeModal .recipe-filter{flex:0 0 auto!important;min-height:24px!important;height:24px!important;border-radius:7px!important;font-size:11px!important;padding:3px 8px!important;white-space:nowrap!important}
 #recipeModal .recipe-search{height:29px!important;min-height:29px!important;flex:0 0 29px!important;padding:0 8px!important;border-radius:7px!important}
 #recipeModal .recipe-search input{font-size:15px!important;line-height:1.1!important}
 #recipeModal .recipe-goal-bar{flex:0 0 22px!important;min-height:22px!important;padding:2px 7px!important;font-size:9px!important;gap:5px!important}
 #recipeModal .recipe-goal-bar button{min-height:19px!important;font-size:9px!important;padding:0 6px!important}
 #recipeModal .recipe-grid{flex:1 1 auto!important;min-height:0!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;padding:2px!important;align-content:start!important}
 #recipeModal .recipe-card{min-width:0!important;min-height:0!important;height:auto!important;gap:4px!important;padding:7px!important;font-size:12px!important}
 #recipeModal .recipe-card .recipe-result-title{font-size:12px!important;line-height:1.3!important}
 #recipeModal .recipe-card .recipe-tier{font-size:10px!important}
 #recipeModal .recipe-card .recipe-result img{width:32px!important;height:32px!important}
 #recipeModal .recipe-card .recipe-parts{gap:4px!important}
 #recipeModal .recipe-card .recipe-material{min-width:0!important;max-width:46%!important;padding:4px 5px!important;gap:3px!important}
 #recipeModal .recipe-card .recipe-material img{width:23px!important;height:23px!important}
 #recipeModal .recipe-card .recipe-material b{font-size:10px!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important}
 #recipeModal .recipe-card button{min-height:26px!important;padding:4px!important;font-size:11px!important}
 #recipeModal .recipe-modal-bottom{flex:0 0 26px!important;height:26px!important;min-height:26px!important;gap:5px!important;padding:0 2px!important}
 #recipeModal .recipe-modal-bottom .recipe-scroll-hint{display:none!important}
 #recipeModal .recipe-modal-bottom #recipeStatus{font-size:9px!important;max-width:50%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 #recipeModal .recipe-modal-bottom #recipeExitBtn{height:24px!important;min-height:24px!important;padding:1px 8px!important;font-size:10px!important}
 #recipeModal.catalog-mode .recipe-goal-bar{display:none!important}
}
@media (orientation:landscape) and (pointer:coarse) and (max-width:740px){
 .main-layout{grid-template-columns:minmax(0,1fr) 148px!important}
 .sidebar-nav .panel-tab{gap:1px!important;font-size:9px!important}
 .sidebar-nav .panel-tab .tab-keys{width:12px!important;height:12px!important;font-size:7px!important}
 #recipeModal .recipe-grid{grid-template-columns:1fr!important}
}
@media (orientation:landscape) and (pointer:coarse) and (max-height:315px){
 #recipeModal .recipe-modal{padding:4px 6px!important;gap:2px!important}
 #recipeModal .recipe-top{flex-basis:23px!important;height:23px!important;min-height:23px!important}
 #recipeModal .recipe-filters{flex-basis:25px!important;min-height:25px!important}
 #recipeModal .recipe-search{flex-basis:25px!important;min-height:25px!important;height:25px!important}
 #recipeModal .recipe-goal-bar{flex-basis:19px!important;min-height:19px!important}
 #recipeModal .recipe-modal-bottom{flex-basis:22px!important;min-height:22px!important;height:22px!important}
}
/* Prevent two-line tab names in compact PC side panels. */
.sidebar-nav .panel-tab{flex:1 1 0!important;white-space:nowrap!important;gap:3px!important;padding:0 2px!important;line-height:1!important;font-size:11px!important}
.sidebar-nav .panel-tab .tab-name{display:inline-block!important;flex:none!important;white-space:nowrap!important;line-height:1!important}
.sidebar-nav .panel-tab .tab-keys{width:17px;height:17px;flex:0 0 17px;font-size:10px}
@media (orientation:landscape) and (pointer:coarse) and (max-width:1280px){
 .sidebar-nav .panel-tab{font-size:9px!important;gap:2px!important;padding:0 1px!important}
 .sidebar-nav .panel-tab .tab-keys{width:13px!important;height:13px!important;flex:0 0 13px!important;font-size:8px!important}
}

/* css/v24-gameplay.css */
/* v0.16.5 gameplay and mobile Pokedex refinements */
.battlefield-card .battle-tip{display:none!important;height:0!important;min-height:0!important;padding:0!important;border:0!important}
#recipeModal #recipeStatus{display:none!important}
#recipeModal .recipe-top{display:flex!important;align-items:center!important;gap:12px!important}
#recipeModal .recipe-top>div{flex:1 1 auto;min-width:0}
#recipeBackBtn{flex:0 0 auto;border-radius:9px;border:1px solid #75b89c;background:#23483f;color:#e4fff0;min-height:37px;padding:7px 13px;font-weight:900;font-size:12px;box-shadow:0 2px 8px #06151066}
#recipeBackBtn:disabled{opacity:.4;cursor:default}
#recipeModal .recipe-goal-bar{min-width:0;gap:9px;display:flex;align-items:center;flex-wrap:wrap}
#recipeModal .recipe-goal-bar>#recipeGoalLabel{flex:1 1 170px;min-width:0}
#recipeModal #goalChips{display:flex;flex-wrap:wrap;flex:2 1 250px;gap:5px;justify-content:flex-end;min-width:0}
#recipeModal .goal-chip{display:inline-flex;align-items:center;gap:5px;min-height:27px;padding:4px 8px;border:1px solid var(--goal-color);border-radius:8px;background:#08242bdf;color:#ecf9f5;font-size:11px;font-weight:900;white-space:nowrap;max-width:140px;box-shadow:inset 0 0 12px color-mix(in srgb,var(--goal-color) 18%,transparent)}
#recipeModal .goal-chip .goal-dot{width:9px;height:9px;border-radius:3px;background:var(--goal-color);box-shadow:0 0 8px var(--goal-color);flex:0 0 auto}
#recipeModal .goal-chip b{color:var(--goal-color)}
#recipeModal .recipe-card .recipe-goal-pick{font-weight:900;max-width:100%;box-sizing:border-box}
#recipeModal .recipe-goal-bar #clearGoalBtn{flex:0 0 auto}
.side-panel .unit-buttons .mini{font-size:11px!important;gap:2px}
.side-panel .unit-buttons .mini kbd{font-size:9px;border:1px solid #a9cbb5aa;border-radius:4px;background:#06293099;color:#d6f4e1;padding:1px 4px;margin:0 2px;font-weight:900}
/* Rich interactive result panel; no decorative bitmap needed. */
#resultModal{z-index:135!important}
#resultModal .result-modal{position:relative;width:min(625px,94vw)!important;max-width:625px!important;background:linear-gradient(155deg,#24536a 0%,#173d43 23%,#11303b 68%,#0e2337 100%)!important;border:2px solid #8be7b8!important;box-shadow:0 0 0 7px #112e3b77,0 25px 100px #000c,inset 0 1px 0 #eefee133!important;border-radius:25px!important;text-align:center;padding:28px 28px 26px!important;overflow:auto!important;max-height:calc(100dvh - 22px)!important;color:#eafff5}
#resultModal .result-sparkles{position:absolute;inset:0;z-index:0;pointer-events:none;background:radial-gradient(circle at 12% 14%,#ffdd8a 0 1.5px,transparent 2px),radial-gradient(circle at 83% 18%,#a2f3d8 0 1.5px,transparent 2px),radial-gradient(circle at 87% 70%,#fff3b1 0 1px,transparent 2px),radial-gradient(circle at 15% 78%,#c0f4ff 0 1.3px,transparent 2px),radial-gradient(ellipse at 50% 0%,#9ce8ce2e,transparent 62%)}
#resultModal .result-modal>*:not(.result-sparkles){position:relative;z-index:1}
#resultModal .result-hero{display:flex;flex-direction:column;align-items:center;gap:7px}
#resultModal .result-emblem{height:74px;width:74px;display:grid;place-items:center;border-radius:23px;background:linear-gradient(145deg,#ffe9a7,#e7a847 65%,#bd7b29);color:#18333f;font-size:41px;border:3px solid #f9e7ae;box-shadow:0 5px 0 #644b32,0 10px 27px #eec56b50;animation:resultEmblem 2.5s ease-in-out infinite}
#resultModal.result-lose .result-emblem{background:linear-gradient(145deg,#acc4d1,#587c93);border-color:#bfd3df;box-shadow:0 5px 0 #27485a,0 10px 27px #c5dced30}
@keyframes resultEmblem{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
#resultModal .result-kicker{font-size:11px!important;letter-spacing:.23em!important;color:#9bf6d3!important;font-weight:1000!important}
#resultModal #resultTitle{margin:5px 0!important;font-size:clamp(23px,3.4vw,34px)!important;font-weight:1000;color:#fff8df;letter-spacing:-.045em;text-shadow:0 3px 14px #041f29c9}
#resultModal #resultText{margin:6px auto 8px!important;color:#cdeae6;font-size:13px!important;line-height:1.6!important;font-weight:650}
#resultModal .result-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important;margin:14px 0 17px!important}
#resultModal .result-stats>div{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:17px 7px!important;border-radius:14px;border:1px solid #6cafa2ab;background:linear-gradient(180deg,#295362c7,#132e3cbb)!important;box-shadow:inset 0 1px 0 #ffffff13,0 4px 16px #0002}
#resultModal .result-stats span{font-size:12px;color:#b7e3d6;font-weight:900}
#resultModal .result-stats strong{color:#fff3bd;font-size:clamp(21px,3vw,30px);font-weight:1000;font-variant-numeric:tabular-nums;text-shadow:0 1px 4px #071a23}
#resultModal .result-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:9px!important;margin:0!important}
#resultModal .result-actions .button{min-width:0!important;min-height:48px!important;padding:9px 12px!important;border-radius:12px!important;font-size:13px!important;font-weight:900;box-shadow:0 4px 12px #0003;white-space:normal!important;line-height:1.3!important}
#resultModal #resultRestartBtn{background:linear-gradient(180deg,#8deac4,#50bc8c)!important;border:1px solid #bcffe2!important;color:#13372e!important}
#resultModal #resultNextDifficultyBtn{background:linear-gradient(180deg,#ffe59f,#f5ba5b)!important;border:1px solid #fff0bb!important;color:#382c1e!important}
#resultModal #retryBtn{grid-column:1/-1;background:#29495a!important;border:1px solid #7caba9!important;color:#e4fcf0!important}
#resultModal #resultNextDifficultyBtn:disabled{opacity:.5!important}
/* Larger, readable desktop field with minimal chrome. */
@media(min-width:1281px) and (pointer:fine){
 .battlefield-card .section-heading{height:30px!important;min-height:30px!important;max-height:30px!important;flex:0 0 30px!important}
 .battlefield-card .battle-controls{height:36px!important;min-height:36px!important;max-height:36px!important;flex:0 0 36px!important}
 .battlefield-card .battle-controls>.button{height:30px!important;min-height:30px!important}
 .main-layout{grid-template-columns:minmax(0,1fr) clamp(246px,18vw,305px)!important}
 .battlefield-card .canvas-wrap{background:#0e2430!important}
}
/* The browser viewport is smaller on Safari/Android because of native toolbars. */
@media(max-width:1280px) and (orientation:landscape) and (pointer:coarse){
 #recipeModal .recipe-top{gap:5px!important}
 #recipeBackBtn{min-height:25px!important;height:25px!important;padding:2px 9px!important;font-size:11px!important;border-radius:7px!important}
 #recipeModal .recipe-goal-bar{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:4px!important;overflow-x:auto!important;scrollbar-width:thin}
 #recipeModal .recipe-goal-bar>#recipeGoalLabel{flex:0 0 auto!important;font-size:9px!important;max-width:140px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 #recipeModal #goalChips{display:flex!important;flex:1 1 auto!important;flex-wrap:nowrap!important;justify-content:flex-start!important;gap:4px!important;min-width:0!important;overflow-x:auto!important}
 #recipeModal .goal-chip{font-size:9px!important;min-height:19px!important;height:19px!important;padding:1px 4px!important}
 #recipeModal .goal-chip .goal-dot{height:6px;width:6px}
 #recipeModal .recipe-goal-bar #clearGoalBtn{height:19px!important;min-height:19px!important;font-size:9px!important}
 #recipeModal .recipe-modal-bottom #recipeStatus{display:none!important}
 #recipeModal .recipe-modal-bottom #recipeExitBtn{margin-left:auto!important}
 .side-panel .unit-buttons .mini kbd{font-size:8px!important;padding:1px 2px!important}
 #resultModal .result-modal{width:min(520px,95vw)!important;padding:10px 14px!important;max-height:calc(var(--mobile-browser-h,100dvh) - 10px)!important}
 #resultModal .result-emblem{width:40px;height:40px;border-radius:12px;font-size:21px;border-width:1px}
 #resultModal .result-hero{gap:2px!important}
 #resultModal #resultTitle{font-size:19px!important;margin:1px!important}
 #resultModal #resultText{font-size:10px!important;line-height:1.3!important;margin:2px!important}
 #resultModal .result-stats{gap:5px!important;margin:8px 0!important}
 #resultModal .result-stats>div{padding:7px 3px!important;gap:2px!important;border-radius:8px!important}
 #resultModal .result-stats span{font-size:9px!important}
 #resultModal .result-stats strong{font-size:16px!important}
 #resultModal .result-actions{gap:5px!important}
 #resultModal .result-actions .button{min-height:29px!important;padding:5px 6px!important;font-size:10px!important;border-radius:7px!important}
 .battlefield-card .section-heading{flex-basis:12px!important;height:12px!important;min-height:12px!important;max-height:12px!important}
 .battlefield-card .section-heading h2{line-height:11px!important;font-size:9px!important}
 .battlefield-card .map-wave-progress{flex-basis:11px!important;height:11px!important;min-height:11px!important;max-height:11px!important}
 .battlefield-card .canvas-wrap #gameCanvas{max-height:100%!important;max-width:100%!important}
}
@media(max-width:760px) and (orientation:landscape) and (pointer:coarse){
 #recipeModal .recipe-grid{grid-template-columns:repeat(1,minmax(0,1fr))!important}
 #recipeModal .recipe-top h2{font-size:13px!important}
 #recipeModal .recipe-card .recipe-result-title{font-size:13px!important}
}

/* Match canvas pixels to the real 3:2 playfield, never stretch hit coordinates.
   ResizeObserver fills available space at desktop sizes above the 960x640 source. */
.battlefield-card .canvas-wrap #gameCanvas{
 width:var(--field-display-width,960px)!important;
 height:var(--field-display-height,640px)!important;
 max-height:100%!important;max-width:100%!important;
 aspect-ratio:3 / 2!important;object-fit:fill!important;
 flex:0 0 auto!important;
}
@media(max-width:1280px) and (orientation:landscape) and (pointer:coarse){
 #recipeModal .recipe-search input{font-size:16px!important;}
}

/* css/v25-fullscreen-hidpi.css */
/* v0.16.6 — screen alignment, keyboard menu, battle controls and retina canvas.
   Loaded last to resolve the earlier competing layout rules. */
#fullscreenGameBtn{
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  flex:0 0 auto;min-width:0;white-space:nowrap;
  color:#e8fef5;background:#17433e;border:1px solid #67b59d;
  font-weight:850;
}
#fullscreenGameBtn.is-active{background:#2b6a5c;border-color:#a6efce}
#fullscreenGameBtn .fullscreen-game-icon{font-size:17px;line-height:1}
#fullscreenGameBtn kbd{font-size:9px;white-space:nowrap}
#fullscreenGameBtn:focus-visible{outline:3px solid #ffe38e;outline-offset:2px}

/* On PC browser fullscreen only, lower the title and menu together without
   disturbing the background, Pokémon illustrations or normal-window layout. */
@media (min-width:901px) and (pointer:fine){
  /* User requested a noticeably lower composition in PC fullscreen.
     Keep the relative spacing but shift both blocks further downward. */
  html.prd-is-fullscreen #startModal .home-title-wrap{
    transform:translate(-50%, 62px)!important;
  }
  html.prd-is-fullscreen #startModal .home-menu-panel{
    transform:translate(-50%, 82px)!important;
  }
}

/* The wave button previously inherited competing height/min-height rules.
   Give each battle control a bounded height inside its parent, with breathing room. */
@media (min-width:1061px) and (pointer:fine){
  .battlefield-card > .battle-controls{
    box-sizing:border-box!important;
    flex:0 0 44px!important;height:44px!important;
    min-height:44px!important;max-height:44px!important;
    padding:5px 7px!important;align-items:center!important;
    overflow:visible!important;gap:6px!important;
  }
  .battlefield-card > .battle-controls > .button,
  .battlefield-card > .battle-controls > #waveBtn,
  .battlefield-card > .battle-controls > .auto-wave-count{
    box-sizing:border-box!important;
    flex-shrink:1!important;
    height:32px!important;min-height:32px!important;max-height:32px!important;
    margin:0!important;align-self:center!important;line-height:1.15!important;
  }
  .battlefield-card > .battle-controls > #waveBtn{
    display:flex!important;align-items:center!important;justify-content:center!important;
    padding:0 10px!important;border-radius:9px!important;
  }
  .battlefield-card > .battle-controls > #waveBtn .btn-symbol,
  .battlefield-card > .battle-controls > #waveBtn #waveBtnText{
    position:static!important;transform:none!important;line-height:1!important;
  }
  .battlefield-card > .battle-controls > #waveBtn .btn-symbol svg{display:block;width:14px;height:14px}
}

/* Important: canvas is rendered internally at adaptive DPI by js/game.js.
   CSS never stretches the drawing independently of the logical 3:2 map. */
.battlefield-card .canvas-wrap #gameCanvas{
  image-rendering:auto!important;
  object-fit:contain!important;
  -webkit-font-smoothing:antialiased;
}

/* Keep the game fullscreen control accessible in ordinary mobile browser tabs.
   Fullscreen API may be unsupported (notably iOS Safari); show icon only to
   avoid shrinking the four stat chips and field. */
@media (max-width:1280px) and (orientation:landscape) and (pointer:coarse){
  .header-actions #fullscreenGameBtn{
    box-sizing:border-box!important;
    display:flex!important;
    height:23px!important;min-height:23px!important;
    padding:0 5px!important;gap:0!important;
    font-size:10px!important;border-radius:5px!important;
  }
  .header-actions #fullscreenGameBtn .fullscreen-game-icon{font-size:15px!important;line-height:1!important;}
  .header-actions #fullscreenGameBtn .fullscreen-game-label,
  .header-actions #fullscreenGameBtn kbd{display:none!important;}
}
@media (max-width:760px) and (orientation:landscape) and (pointer:coarse){
  .header-actions #fullscreenGameBtn{padding:0 3px!important;}
}

/* Compact touch controls also stay completely inside their 25px action rail. */
@media (max-width:1280px) and (orientation:landscape) and (pointer:coarse){
  .battlefield-card > .battle-controls > #waveBtn,
  .battlefield-card > .battle-controls > #speedBtn,
  .battlefield-card > .battle-controls > #autoDeployBtn,
  .battlefield-card > .battle-controls > #recommendSellBtn,
  .battlefield-card > .battle-controls > #autoWaveBtn,
  .battlefield-card > .battle-controls > .auto-wave-count{
    height:22px!important;min-height:22px!important;max-height:22px!important;
    margin:0!important;align-self:center!important;
  }
}

/* css/v26-mobile-browser.css */
/* v0.16.7 - handheld browser landscape UI correction (iPhone Safari/Chrome, Android Chrome/Samsung Internet).
   Loaded after legacy mobile styles. Does not claim to hide native browser chrome. */
@media (orientation: landscape) and (pointer: coarse) and (max-width: 1280px) {
  /* Mobile header: keep all essential actions, including the recipe library. */
  .topbar .header-actions{display:flex!important;flex:0 0 auto!important;align-items:center!important;gap:2px!important;overflow:visible!important;}
  .topbar .header-actions #quickRecipeBtn{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    flex:0 0 auto!important;width:58px!important;min-width:58px!important;max-width:58px!important;
    height:23px!important;min-height:23px!important;
    font-size:9px!important;padding:0 2px!important;border-radius:5px!important;
    white-space:nowrap!important;visibility:visible!important;opacity:1!important;
  }
  .topbar .header-actions #quickRecipeBtn kbd{display:none!important;}
  .topbar .header-actions #fieldInfoBtn{width:54px!important;min-width:54px!important;max-width:54px!important;padding:0 2px!important;}
  .topbar .header-actions #soundBtn{width:54px!important;min-width:54px!important;max-width:54px!important;padding:0 1px!important;}
  .topbar .header-actions #menuBtn{width:47px!important;min-width:47px!important;max-width:47px!important;padding:0 2px!important;}
  .topbar .header-actions #fullscreenGameBtn{width:25px!important;min-width:25px!important;max-width:25px!important;}
  .topbar .top-stats{flex:1 1 0!important;min-width:0!important;}
  .topbar .top-stats>.stat-chip{min-width:0!important;}

  /* Precisely sized single-row action rail: preserve wave start and every control on narrow phones. */
  .battlefield-card > .battle-controls{
    display:grid!important;grid-template-columns:minmax(88px,2.25fr) minmax(45px,.84fr) minmax(61px,1.09fr) minmax(61px,1.10fr) minmax(30px,.53fr) minmax(64px,1.12fr)!important;
    align-items:center!important;justify-content:stretch!important;gap:2px!important;
    overflow:visible!important;width:100%!important;min-width:0!important;
    height:27px!important;min-height:27px!important;max-height:27px!important;flex:0 0 27px!important;
    padding:2px 2px!important;box-sizing:border-box!important;
  }
  .battlefield-card > .battle-controls > .button,
  .battlefield-card > .battle-controls > #waveBtn,
  .battlefield-card > .battle-controls > #speedBtn,
  .battlefield-card > .battle-controls > #autoDeployBtn,
  .battlefield-card > .battle-controls > #recommendSellBtn,
  .battlefield-card > .battle-controls > #autoWaveBtn,
  .battlefield-card > .battle-controls > .auto-wave-count{
    box-sizing:border-box!important;min-width:0!important;max-width:100%!important;width:100%!important;
    min-height:23px!important;height:23px!important;max-height:23px!important;
    flex:none!important;padding:0 2px!important;margin:0!important;align-self:center!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    border-radius:5px!important;font-size:9px!important;line-height:1.05!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;
  }
  .battlefield-card > .battle-controls > #waveBtn{font-size:10px!important;gap:2px!important;}
  .battlefield-card > .battle-controls > .auto-wave-count{gap:0!important;}
  .battlefield-card > .battle-controls > .auto-wave-count input{
    width:100%!important;max-width:28px!important;min-width:0!important;height:20px!important;
    min-height:20px!important;max-height:20px!important;font-size:14px!important;padding:0!important;text-align:center!important;
  }
  .battlefield-card > .battle-controls > .auto-wave-count::after{content:'회'!important;flex:0 0 auto!important;font-size:8px!important;}
  .battlefield-card > .battle-controls .keycap{display:none!important;}
  .battlefield-card > .battle-controls #speedText{white-space:nowrap!important;}

  /* The pause-menu must fit on a landscape phone without vertical scrolling. */
  #escapeModal{padding:3px 6px!important;overflow:hidden!important;align-items:center!important;justify-content:center!important;}
  #escapeModal .escape-modal{
    width:min(380px,calc(100vw - 18px))!important;
    max-width:min(380px,calc(100vw - 18px))!important;
    min-width:0!important;
    height:auto!important;min-height:0!important;
    max-height:calc(var(--mobile-browser-h,100dvh) - 8px)!important;
    box-sizing:border-box!important;
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    padding:9px 12px 9px!important;gap:5px!important;
    border-radius:13px!important;overflow:hidden!important;
  }
  #escapeModal .escape-modal .modal-kicker{display:none!important;}
  #escapeModal .escape-modal h2{font-size:20px!important;line-height:24px!important;margin:0!important;letter-spacing:0!important;}
  #escapeModal .escape-modal .escape-subtitle{display:none!important;}
  #escapeModal .escape-modal .escape-progress{
    flex:0 0 auto!important;min-height:30px!important;max-height:33px!important;
    padding:4px 9px!important;margin:0!important;gap:5px!important;
  }
  #escapeModal .escape-modal .escape-progress div{gap:1px!important;}
  #escapeModal .escape-modal .escape-progress span{font-size:8px!important;line-height:10px!important;}
  #escapeModal .escape-modal .escape-progress strong{font-size:9px!important;line-height:11px!important;}
  #escapeModal .escape-modal .escape-actions{display:flex!important;flex-direction:column!important;gap:5px!important;min-height:0!important;}
  #escapeModal .escape-modal .escape-actions > .button{
    box-sizing:border-box!important;width:100%!important;height:28px!important;min-height:28px!important;
    max-height:28px!important;flex:0 0 28px!important;font-size:11px!important;
    margin:0!important;padding:0 7px!important;white-space:nowrap!important;
  }
  #escapeModal .escape-modal .escape-close{
    top:7px!important;right:8px!important;width:26px!important;height:25px!important;
    min-height:25px!important;font-size:17px!important;
  }
  #escapeModal .escape-modal .escape-foot{display:none!important;}
  .side-panel, .side-panel .panel, .side-panel .unit-content{
    -webkit-tap-highlight-color:transparent;
  }
  .side-panel .unit-buttons > button{touch-action:manipulation;}
}
@media (orientation:landscape) and (pointer:coarse) and (max-width:740px) {
  .topbar .header-actions #fieldInfoBtn{width:37px!important;min-width:37px!important;max-width:37px!important;font-size:0!important;}
  .topbar .header-actions #fieldInfoBtn::before{content:'▦';font-size:13px;}
  .topbar .header-actions #soundBtn{width:37px!important;min-width:37px!important;max-width:37px!important;font-size:0!important;}
  .topbar .header-actions #soundBtn::before{content:'♫';font-size:13px;}
  .topbar .header-actions #quickRecipeBtn{width:52px!important;min-width:52px!important;max-width:52px!important;}
}
@media (orientation:landscape) and (pointer:coarse) and (max-height:310px) {
  #escapeModal .escape-modal{padding:6px 10px!important;gap:3px!important;}
  #escapeModal .escape-modal h2{font-size:18px!important;line-height:21px!important;}
  #escapeModal .escape-modal .escape-progress{min-height:27px!important;max-height:28px!important;padding:3px 8px!important;}
  #escapeModal .escape-modal .escape-actions{gap:3px!important;}
  #escapeModal .escape-modal .escape-actions>.button{height:25px!important;min-height:25px!important;max-height:25px!important;flex-basis:25px!important;font-size:10px!important;}
}
