:root{--ink:#23180f;--panel:#dbc796;--panel2:#eadcaf;--line:#765934;--dark:#312416;--gold:#d8aa42;--green:#617c36;--red:#8f352d;--cream:#f7edca;--ui:#52381f}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;min-height:100%;background:#17120d;color:var(--ink);font-family:Verdana,Arial,sans-serif}.app{max-width:620px;margin:auto;min-height:100vh;background:#b7a477;box-shadow:0 0 30px #0008}.top{position:sticky;top:0;z-index:8;padding:7px 9px;background:linear-gradient(#715333,#3b2b1c);color:#f5e4b7;border-bottom:2px solid #b58a43;display:flex;justify-content:space-between;gap:8px}.top h1{font-size:15px;margin:0;color:#ffe7a1;text-shadow:0 1px #000}.top h1 em{font-size:10px;font-style:normal;color:#c8efad}.top small{font-size:9px;opacity:.78}.resources{display:flex;align-items:center;gap:7px;font-size:10px;white-space:nowrap}.tabs{position:sticky;top:50px;z-index:7;display:grid;grid-template-columns:repeat(4,1fr);background:#292017;border-bottom:1px solid #6d5335}.tabs button,.btn,.cmd{border:1px solid #6e5331;background:linear-gradient(#745432,#49351f);color:#fff0c6;padding:9px 7px;font:700 11px Verdana;border-radius:2px}.tabs button.active{background:linear-gradient(#a47738,#684921);color:#fff6d8}.screen{padding:7px}.footer{font-size:9px;text-align:center;padding:10px;color:#d5c59f;background:#2e241a}.panel,.card{border:2px ridge #8c744d;background:linear-gradient(#eadfb9,#cdb985);padding:7px;margin-bottom:7px;box-shadow:inset 0 0 0 1px #f8efcf}.panel h2,.card h2,.card h3{margin:0 0 6px;font-size:14px;color:#48341f}.muted{font-size:10px;color:#695c46}.status{background:#c3b17e;border:1px solid #806a42;padding:6px;font-size:10px;margin:5px 0}.warn{background:#c98c73}.pixel-sprite{display:inline-block;width:34px;height:34px;background:center/contain no-repeat;image-rendering:pixelated;filter:drop-shadow(1px 1px 0 #0006)}.pixel-sprite.sm{width:24px;height:24px}.pixel-sprite.lg{width:44px;height:44px}.world-stage{position:relative;display:grid;grid-template-columns:repeat(10,1fr);border:3px ridge #846a40;background:#6f8d4d;overflow:hidden}.world-tile{aspect-ratio:1;position:relative;border:0;min-width:0;background:#75964f}.world-tile.forest{background-color:#315c34;background-image:radial-gradient(circle at 30% 35%,#628c4a 0 18%,transparent 19%),radial-gradient(circle at 68% 55%,#4f7b42 0 22%,transparent 23%),linear-gradient(135deg,#284d30,#3f693b)}.world-tile.road{background:repeating-linear-gradient(135deg,#a67f4f 0 5px,#b28b58 5px 10px)}.world-tile.water{background:repeating-linear-gradient(0deg,#4c9fba 0 4px,#6fc2d4 4px 7px,#3d8fac 7px 10px)}.world-tile.mountain{background:linear-gradient(135deg,#807660 0 45%,#5d5748 46% 60%,#928671 61%)}.world-tile.cloud{background:linear-gradient(90deg,#8eb8c199,#eef8f5ee,#b9dce0dd);box-shadow:inset 0 0 8px #fff}.mist-gate{display:flex!important;gap:1px;align-items:center;justify-content:center}.mist-gate i{display:block;width:30%;height:65%;border-radius:50%;background:#f5ffffcc;box-shadow:0 0 5px #d9ffff}.mist-gate i:nth-child(2){height:88%}.world-object{position:absolute;inset:3px;display:grid;place-items:center}.world-object label{position:absolute;bottom:-1px;max-width:95%;font-size:6px;background:#211b14cc;color:#fff2c7;padding:1px 2px;white-space:nowrap;overflow:hidden}.hero-marker{outline:2px solid #f7d265;outline-offset:-3px}.bot-dot:after{content:"";position:absolute;width:7px;height:7px;border-radius:50%;background:#a82222;right:3px;top:3px;box-shadow:0 0 0 1px #500}.world-hud{display:grid;grid-template-columns:82px 1fr 82px;gap:6px;margin-top:6px}.dpad{display:grid;grid-template-columns:repeat(3,25px);grid-template-rows:repeat(3,25px);gap:1px;justify-content:center}.dpad button{padding:0;border:1px solid #684d31;background:#59412a;color:#fff3c7;font-weight:bold}.dpad .up{grid-column:2}.dpad .left{grid-column:1;grid-row:2}.dpad .right{grid-column:3;grid-row:2}.dpad .down{grid-column:2;grid-row:3}.world-actions,.context-actions{display:flex;flex-direction:column;gap:4px}.world-actions .cmd,.context-actions .cmd{padding:7px 4px}.world-info{font-size:10px;background:#b8a574;border:1px solid #79623e;padding:5px;min-height:77px}.city-menu{display:flex;flex-direction:column;border:2px ridge #8a6e48}.city-menu button{padding:9px;text-align:left;background:linear-gradient(#e1d1a2,#bca873);border:0;border-bottom:1px solid #88734b;color:#312619;font-weight:700}.city-menu button:last-child{border-bottom:0}.city-title{display:flex;align-items:center;gap:7px}.city-content{margin-top:7px}.barracks,.army-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.unit-card{position:relative;background:#b8a372;border:2px ridge #806a45;padding:4px;min-height:91px;text-align:center;color:#2a2017}.unit-card b{display:block;font-size:9px;line-height:1.1}.unit-card span,.unit-card small{display:block;font-size:7px;line-height:1.25}.unit-card .pixel-sprite{margin:0 auto 2px}.unit-card button{font-size:9px;padding:4px}.army-slot{background:#4a3825;border:2px inset #9d875f;color:#f2dfb7}.hero-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px}.hero-grid div{background:#baa678;border:1px solid #7f6a45;padding:7px;font-size:11px}.pill{display:inline-block;border:1px solid #7d6742;background:#b6a172;padding:3px 5px;margin:2px;font-size:9px}.battle-shell{border:3px ridge #86693e;background:#6d714d;position:relative}.battle-hud{display:flex;justify-content:space-between;align-items:center;background:#2f281d;color:#f2dfb7;padding:5px;font-size:9px}.battle-stage{display:grid;grid-template-columns:repeat(8,1fr);background:#7f9260;min-height:390px}.battle-cell{aspect-ratio:1;border:1px solid transparent;background:transparent;position:relative;display:grid;place-items:center;padding:0}.battle-cell:nth-child(7n+2),.battle-cell:nth-child(11n+1){background:#71875955}.battle-cell.terrain-rock{background:linear-gradient(135deg,#77715f 0 50%,#5f5b4e 51%)}.battle-cell.selected{box-shadow:inset 0 0 0 2px #e8d259}.battle-cell.enemy{box-shadow:inset 0 0 0 1px #a64d42}.stack-count{position:absolute;bottom:1px;right:1px;background:#241c15dd;color:white;font:700 7px Verdana;padding:1px 2px}.shot-count{position:absolute;top:1px;right:1px;background:#435c73dd;color:#fff;font-size:6px;padding:1px 2px}.battle-commandbar{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:5px;background:#382a1d}.battle-commandbar .cmd{font-size:11px}.popup-menu{position:absolute;right:7px;bottom:53px;width:165px;background:#d8c592;border:2px ridge #7d643e;z-index:5;padding:3px}.popup-menu button{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #8c764f;background:#cbb681;padding:7px;color:#302518;font:bold 10px Verdana}.popup-menu button:last-child{border:0}.battle-log{max-height:85px;overflow:auto;background:#2b231a;color:#e9dab6;padding:5px;font-size:8px;border-top:1px solid #68573d}.catalog-section{margin:7px 0}.catalog-section h3{font-size:11px;margin:4px 0}.evidence{font-size:7px;color:#675a45}.hidden{display:none!important}
@media(max-width:420px){.top small{display:none}.top{min-height:43px}.tabs{top:43px}.battle-stage{min-height:350px}.pixel-sprite{width:30px;height:30px}.barracks,.army-grid{gap:2px}.unit-card{padding:2px}}
/* R0.9 terrain depth: layered tiles inspired by the connected-land references, using original CSS art. */
.world-tile.forest{background-color:#315b31;background-image:radial-gradient(circle at 25% 28%,#65864a 0 12%,transparent 13%),radial-gradient(circle at 70% 62%,#496f3d 0 15%,transparent 16%),linear-gradient(135deg,rgba(0,0,0,.10) 25%,transparent 25% 50%,rgba(255,255,255,.04) 50% 75%,transparent 75%)}
.world-tile.road{background-color:#a98454;background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.05) 0 5px,rgba(0,0,0,.04) 5px 10px)}
.world-tile.water{background-color:#58a9c9;background-image:repeating-linear-gradient(0deg,rgba(255,255,255,.16) 0 2px,transparent 2px 8px)}
.world-tile.mountain{background:linear-gradient(135deg,#6d5135 0 48%,#9b754b 49% 67%,#d8d0b8 68% 74%,#57422f 75%)}
.world-object.bot-dot .pixel-sprite{transform:scale(1.18);filter:drop-shadow(1px 2px 0 rgba(0,0,0,.35))}
.world-object.hero-marker .pixel-sprite,.world-object .pixel-sprite.lg{filter:drop-shadow(1px 2px 0 rgba(0,0,0,.4))}
.mist-gate{background:linear-gradient(90deg,rgba(255,255,255,.12),rgba(238,248,255,.88),rgba(205,230,247,.7),rgba(255,255,255,.15));box-shadow:0 0 8px rgba(225,245,255,.8)}

/* R1.0 dual-land visual reference: elf forest + undead wastes */
.world-tile.waste{background-color:#c5aa68;background-image:radial-gradient(circle at 25% 30%,#8d7145 0 4%,transparent 5%),radial-gradient(circle at 70% 65%,#dfc983 0 3%,transparent 4%),repeating-linear-gradient(25deg,rgba(90,65,35,.07) 0 2px,transparent 2px 9px)}
.portal-gate{outline:2px solid #d8b85e;outline-offset:-2px;background:radial-gradient(circle,#7653a088,transparent 65%)}

/* R1.1 map density pass: denser organic texture while preserving lightweight tile rendering. */
.world-stage{box-shadow:inset 0 0 18px rgba(0,0,0,.28)}
.world-tile.forest:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 18% 75%,rgba(28,68,31,.65) 0 10%,transparent 11%),radial-gradient(circle at 80% 22%,rgba(92,126,64,.55) 0 9%,transparent 10%);pointer-events:none}
.world-tile.waste:after{content:"";position:absolute;inset:0;background:linear-gradient(22deg,transparent 42%,rgba(91,65,36,.10) 43% 47%,transparent 48%),radial-gradient(circle at 72% 24%,rgba(84,67,43,.18) 0 5%,transparent 6%);pointer-events:none}
.world-tile.water{box-shadow:inset 0 0 6px rgba(12,66,91,.35)}
.world-tile.mountain{box-shadow:inset -3px -3px 0 rgba(42,29,18,.25),inset 2px 2px 0 rgba(238,221,181,.16)}

/* R1.2 two-land depth II: denser edge silhouettes and less board-like terrain. */
.world-tile.forest{box-shadow:inset 0 0 0 1px rgba(21,49,25,.18)}
.world-tile.forest:before{content:"";position:absolute;left:8%;right:8%;bottom:5%;height:28%;background:radial-gradient(ellipse at 25% 80%,rgba(18,52,25,.52) 0 24%,transparent 25%),radial-gradient(ellipse at 70% 75%,rgba(27,65,31,.48) 0 26%,transparent 27%);pointer-events:none}
.world-tile.waste{box-shadow:inset 0 0 0 1px rgba(91,66,36,.10)}
.world-tile.road{box-shadow:inset 0 2px 0 rgba(226,190,129,.12),inset 0 -2px 0 rgba(86,57,31,.12)}
.world-tile.cloud{animation:lmMist 2.8s ease-in-out infinite alternate}
@keyframes lmMist{from{filter:brightness(.94);opacity:.88}to{filter:brightness(1.08);opacity:1}}


/* R1.3 terrain silhouette pass: lightweight original pixel-like micro-details. */
.tile-detail{position:absolute;inset:0;pointer-events:none;z-index:0;image-rendering:pixelated}
.world-object{z-index:2}
.trees:before,.trees:after{content:"";position:absolute;border-radius:48% 52% 42% 58%;background:#244b2c;box-shadow:6px 2px 0 #315f35,3px -4px 0 #4f7842,-4px 4px 0 #1d4027}
.trees:before{width:9px;height:9px;left:18%;top:17%}.trees:after{width:8px;height:8px;right:15%;bottom:18%;transform:scale(.82)}
.trees.d1:before,.trees.d4:before{left:48%;top:8%}.trees.d2:after,.trees.d5:after{right:44%;bottom:8%}
.wastes:before{content:"";position:absolute;width:13px;height:2px;left:20%;top:55%;background:#8e7046;transform:rotate(24deg);box-shadow:7px 5px 0 #a18451,-3px 8px 0 #6f593c}
.wastes:after{content:"";position:absolute;width:4px;height:4px;border:1px solid #82653e;border-radius:50%;right:18%;top:20%;opacity:.75}
.wastes.d2:before,.wastes.d5:before{transform:rotate(-28deg);left:42%}.wastes.d3:after{right:55%;top:70%}
.ripples:before,.ripples:after{content:"";position:absolute;height:1px;background:#b8edf3;opacity:.58;box-shadow:5px 5px 0 #277c9b}
.ripples:before{width:13px;left:10%;top:30%}.ripples:after{width:10px;right:12%;bottom:25%}.ripples.d1:before,.ripples.d6:before{top:62%;left:35%}
.peaks:before{content:"";position:absolute;left:17%;bottom:12%;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:18px solid #694b32;filter:drop-shadow(5px 2px 0 #463426)}
.peaks:after{content:"";position:absolute;left:23%;bottom:24%;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:7px solid #d7cfb7}
.peaks.d3:before,.peaks.d6:before{left:42%;transform:scale(.8)}
.roadbits:before{content:"";position:absolute;width:4px;height:2px;background:#775633;left:22%;top:25%;box-shadow:15px 11px 0 #8b663d,7px 24px 0 #684b30;opacity:.45}
.world-tile:hover{filter:brightness(1.05)}
/* R1.4 classic gameplay loop: city-first, persistent bot armies and always-visible land minimap. */
.world-layout{display:grid;grid-template-columns:minmax(0,1fr) 82px;gap:5px;align-items:start}.mini-wrap{background:#3a2d1e;color:#f0dfb5;border:2px ridge #80633d;padding:4px;font-size:8px;text-align:center}.mini-map{display:grid;gap:2px;margin:4px 0}.mini-sector{min-height:28px;padding:1px;border:1px solid #6c5638;background:#8e8058;color:#2c241a;font-size:6px}.mini-sector.here{background:#d7b856;box-shadow:inset 0 0 0 2px #fff0a3;font-weight:bold}.market-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-top:7px}.market-grid>div{background:#b9a474;border:2px ridge #806a45;padding:10px 5px;text-align:center;font-weight:bold}.market-grid small{font-weight:normal}.world-stage{min-width:0}.world-object .pixel-sprite{width:38px;height:38px}.world-object label{font-size:7px}.bot-dot .pixel-sprite{width:42px;height:42px}.city-title .pixel-sprite.lg{width:46px;height:46px}@media(max-width:420px){.world-layout{grid-template-columns:minmax(0,1fr) 68px}.mini-sector{min-height:23px}.world-object .pixel-sprite,.bot-dot .pixel-sprite{width:34px;height:34px}}
/* R1.5 classic preparation pass: geographic minimap + functional equipment market. */
.mini-geo{display:grid;gap:0;width:100%;aspect-ratio:2/1;background:#17140f;border:1px solid #77613c;overflow:hidden}.mini-pixel{min-width:0;min-height:0}.mini-pixel.forest{background:#284d2c}.mini-pixel.road{background:#a47b4a}.mini-pixel.water{background:#4f9fbd}.mini-pixel.mountain{background:#6a513b}.mini-pixel.waste{background:#b79a5c}.mini-pixel.plain{background:#778f55}.mini-pixel.void{background:#18140f}.mini-pixel.bot{background:#d42828;box-shadow:0 0 0 1px #6b1010}.mini-pixel.city{background:#ffe07b;box-shadow:0 0 0 1px #6e4f18}.mini-pixel.portal{background:#a86de0}.mini-pixel.hero{background:#245cff;box-shadow:0 0 0 1px white;z-index:2}.mini-legend{display:flex;flex-wrap:wrap;gap:3px;justify-content:center;font-size:6px;margin-top:3px}.market-item{display:flex;flex-direction:column;gap:3px;background:#b9a474;border:2px ridge #806a45;padding:8px 4px;color:#2a2017;text-align:center}.market-item small{font-size:7px;font-weight:normal}.market-item strong{font-size:8px}.market-item.equipped{background:#d3bc78;box-shadow:inset 0 0 0 2px #f4df8d}.equipment-line{margin-top:7px;padding:6px;border:1px solid #7f6a45;background:#aa9567;font-size:8px}

/* R1.6 evidence & map pass: separate recruitment gold from leadership, surface secondary Oasis refs, full-land map overlay. */
.reference-only{opacity:.9;background:#a99872}.reference-only .evidence{display:block;margin-top:3px;line-height:1.15}.map-overlay{position:fixed;inset:0;background:rgba(20,15,10,.82);z-index:50;display:grid;place-items:center;padding:16px}.map-card{width:min(92vw,620px);background:#d8c592;border:3px ridge #7c623d;padding:10px;color:#2d2419}.map-card .mini-geo{aspect-ratio:2/1;min-height:240px}.map-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.map-card-head button{background:#553a22;color:#f4e5bd;border:2px ridge #9a7445;padding:6px 10px}.map-card p{font-size:10px;margin:7px 0 0}.map-card .mini-legend{font-size:9px}

/* R1.9 fullscreen + layered Oasis-style information architecture */
html,body,.app{min-height:100%;height:100%;margin:0}.app{display:flex;flex-direction:column}.screen{flex:1;overflow:auto;padding-bottom:8px}.footer{display:none!important}.city-layer .city-menu{display:none}.layer-head{display:flex;align-items:center;gap:10px}.layer-head h3{margin:0}.layer-head button,.inventory-market button{background:#553a22;color:#f4e5bd;border:2px ridge #9a7445;padding:6px 9px}.economy-strip{display:flex;justify-content:space-between;gap:8px;background:#3b2b1d;color:#f1ddb0;padding:7px;margin:7px 0;font-size:9px}.inventory-market .market-item{gap:5px}.world-layout{grid-template-columns:1fr}.mini-wrap{display:none}.world-stage{width:100%;max-width:none}.world-hud{position:sticky;bottom:0;z-index:8}.top small{display:none}.top{min-height:42px}.tabs{top:42px}

.qa-only{display:none!important}.qa-mode .qa-only{display:inline-flex!important}.qa-report{max-height:52vh;overflow:auto;white-space:pre-wrap;font-size:11px;background:#120d08;color:#ead9aa;padding:10px;border-radius:8px}.status.good{border-color:#518b56;color:#cceecf}

/* R2.1 simulated player world presence */
.sim-player-marker{outline:2px solid #6bd6ff;outline-offset:-3px;z-index:4}.sim-player-marker .pixel-sprite{filter:hue-rotate(155deg) drop-shadow(1px 2px 0 rgba(0,0,0,.55))}.sim-player-marker label{background:#173c4dcc;color:#dff8ff}.mini-pixel.simplayer{background:#56d8ff;box-shadow:0 0 0 1px #083c55;z-index:3}

/* R2.6 — reconhecimento visual de ameaça */
.threat-badge{position:absolute;top:1px;left:1px;z-index:5;min-width:15px;height:15px;padding:1px 3px;border-radius:8px;background:#241b14e8;color:#fff;font:bold 10px/13px Verdana;text-align:center;box-shadow:0 0 0 1px #f1dfad,0 1px 3px #0008}.recognized{outline:1px solid #f0dc9c88;outline-offset:-2px}.threat-line{display:inline-block;padding:2px 4px;border-radius:3px;background:#2d241ccc;color:#fff}.threat-very_weak .threat-badge,.threat-line.threat-very_weak{color:#b7f3a1}.threat-weak .threat-badge,.threat-line.threat-weak{color:#d8f2a6}.threat-even .threat-badge,.threat-line.threat-even{color:#ffe394}.threat-strong .threat-badge,.threat-line.threat-strong{color:#ffc27d}.threat-very_strong .threat-badge,.threat-line.threat-very_strong{color:#ff8d74}.threat-invincible .threat-badge,.threat-line.threat-invincible{color:#ff6b6b;font-weight:900}

/* R2.7 — immersive fullscreen visual pass. Mechanics intentionally unchanged. */
:root{--lm-purple:#1a0828;--lm-purple2:#30094a;--lm-violet:#68157f;--lm-gold:#d4a33b;--lm-cream:#ead7ac;--lm-paper:#d8bd83;--lm-ink:#21140c;--lm-glow:#e9c85f}
html,body{height:100%;background:#07050a;overscroll-behavior:none}
body{padding:0;overflow-x:hidden}
.app{width:100%;max-width:none;min-height:100dvh;margin:0;background:#0f0915;box-shadow:none;display:flex;flex-direction:column;padding-bottom:68px}
.top{position:sticky;top:0;z-index:30;min-height:54px;padding:7px 12px;background:linear-gradient(180deg,#26102f 0%,#16081f 100%);border-bottom:1px solid #7f5f22;box-shadow:0 2px 12px #0009;align-items:center}
.brand h1{font-size:16px;letter-spacing:.2px}.brand h1 em{color:#d7bf68}.brand small{display:block;color:#bca8c6;font-size:8px;letter-spacing:1.1px;text-transform:uppercase}
.resources{gap:5px}.resources span{border:1px solid #6e5424;background:#1c1025;border-radius:12px;padding:5px 7px;color:#ead7ad;box-shadow:inset 0 0 7px #0008}.resources .gold-chip{color:#f4ce60}.resources .race-chip{max-width:68px;overflow:hidden;text-overflow:ellipsis}
.tabs{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:40;height:64px;display:grid;grid-template-columns:repeat(4,1fr);padding-bottom:env(safe-area-inset-bottom);background:linear-gradient(#1d0b2a,#100716);border-top:1px solid #7d5b23;border-bottom:0;box-shadow:0 -4px 14px #0008}
.tabs button{border:0;border-right:1px solid #4f3b24;background:transparent;border-radius:0;padding:5px 2px 4px;color:#c7b4c7;font-size:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.tabs button:last-child{border-right:0}.tabs button i{font-style:normal;font-size:18px;line-height:18px}.tabs button.active{background:radial-gradient(circle at 50% 120%,#7b176d99,transparent 62%);color:#ffe49a;box-shadow:inset 0 2px 0 #c49331}.tabs button.active i{filter:drop-shadow(0 0 5px #d69b3b)}
.screen{padding:0;flex:1;min-height:0;background:radial-gradient(circle at 50% -20%,#2e143a,#0f0915 55%,#09060d)}
.panel,.card{margin:0;border:0;border-radius:0;background:linear-gradient(#dfc894,#c5a96f);box-shadow:none;padding:10px;color:var(--lm-ink)}
.world-panel{padding:0;background:#0b0810;min-height:calc(100dvh - 118px)}
.world-titlebar{position:absolute;z-index:8;left:10px;top:62px;pointer-events:none;color:#fff0c6;text-shadow:0 2px 3px #000;filter:drop-shadow(0 1px 0 #000);display:flex;gap:8px;align-items:center}.world-titlebar small{font-size:7px;letter-spacing:.8px;color:#dfc87b}.world-titlebar h2{font-size:14px;margin:1px 0}.world-titlebar>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;border:1px solid #d2aa43;background:#2a1036;color:#ffe39a;font-weight:bold;font-size:10px}
.world-layout{display:block;position:relative}.world-stage{width:100%;height:min(74dvh,760px);grid-template-columns:repeat(10,1fr);border:0;box-shadow:inset 0 0 28px #0009;background:#1a151c}.world-tile{border-radius:0}.world-object label{font-size:7px;border:1px solid #8b6e35;border-radius:2px;background:#1a101ad9;color:#ffecc0;text-shadow:0 1px #000}.pixel-sprite{width:38px;height:38px}.world-object.bot-dot .pixel-sprite{transform:scale(1.32)}.world-object.hero-marker .pixel-sprite{transform:scale(1.15)}
.mini-wrap{position:absolute!important;right:8px;top:8px;width:92px!important;z-index:9;background:#180d22dc!important;color:#f6de9b!important;border:1px solid #8a672a!important;border-radius:4px;padding:4px!important;box-shadow:0 3px 12px #000a}.mini-wrap b{font-size:8px}.mini-wrap small{font-size:6px!important;color:#d5c2b0!important}
.world-hud{position:relative;margin:0;padding:7px 8px 9px;grid-template-columns:82px 1fr 76px;gap:6px;background:linear-gradient(#23142e,#120b18);border-top:1px solid #7b5b28;color:#ead8ae}.world-info{min-height:72px;background:#160f1dcc;color:#dfcfaf;border:1px solid #72552d;border-radius:4px;font-size:9px}.world-info .muted{color:#a99391}.dpad button,.world-actions .cmd{background:linear-gradient(#4a2452,#25132e);border:1px solid #8d6a2c;color:#f3dda6;border-radius:4px}.world-actions .cmd{font-size:9px;padding:7px 3px}.world-actions .cmd:first-child{background:linear-gradient(#7d224f,#451431);color:#ffe8a6}
.city-panel{min-height:calc(100dvh - 118px);padding:0;background:linear-gradient(#d7bd84,#b89759)}.city-hero{display:flex;align-items:center;gap:10px;padding:14px;background:linear-gradient(120deg,#2c1235,#4c1d42 55%,#6b3d25);color:#f7e2ad;border-bottom:2px solid #b78c35}.city-emblem{width:56px;height:56px;display:grid;place-items:center;border-radius:50%;background:#160d1d;border:1px solid #c89f42}.city-hero small{font-size:7px;letter-spacing:1.2px;color:#d6bd7b}.city-hero h2{margin:1px 0;font-size:18px;color:#fff0c1}.city-hero .muted{color:#cdbca9}
.city-menu{border:0;background:transparent;padding:7px}.city-menu button{position:relative;padding:13px 14px 13px 46px;margin-bottom:4px;border:1px solid #846635;border-radius:4px;background:linear-gradient(#ead8a6,#c8aa6e);box-shadow:0 2px 4px #4d361d33;font-size:12px}.city-menu button:before{content:'◆';position:absolute;left:16px;color:#6a2454}.city-menu button:last-child{background:linear-gradient(#4a2452,#28142f);color:#ffe4aa;border-color:#9d7732}
.city-layer{min-height:calc(100dvh - 118px);background:linear-gradient(#d8c18c,#bea064);padding:8px}.layer-head{position:sticky;top:54px;z-index:12;background:#24112e;color:#f7dfa0;margin:-8px -8px 8px;padding:8px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #8c692b}.layer-head button{background:#4c2452;color:#ffe4a3;border:1px solid #8b682c;border-radius:4px;padding:7px 9px}.layer-head h3{margin:0;color:#fff0c2}.economy-strip{background:#1b1022;color:#f3d990;border:1px solid #7c5c27;border-radius:4px;padding:7px;display:flex;gap:9px;justify-content:space-between;font-size:9px}
.market-section-title{display:flex;justify-content:space-between;align-items:end;margin:9px 0 4px;border-bottom:1px solid #8c6b3a;padding-bottom:4px}.market-section-title span{font-weight:bold}.market-section-title small{font-size:7px;color:#6c593d}.market-grid{display:grid;grid-template-columns:repeat(4,minmax(92px,1fr));gap:5px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:5px}.inventory-market{display:flex;overflow-x:auto;gap:5px}.inventory-market .market-item{flex:0 0 108px}.shop-market{grid-template-columns:repeat(4,minmax(108px,1fr))}.market-item{min-height:112px;background:linear-gradient(#d2b87e,#ac8d56);border:2px ridge #72572f;border-radius:3px;padding:5px;color:#2b1a10;scroll-snap-align:start;text-align:center}.market-item b{display:block;font-size:9px}.market-item small{display:block;font-size:7px;margin:3px 0}.market-item strong{font-size:8px;color:#5d2b43}.market-item button{font-size:7px;padding:4px;margin:1px;background:#442048;color:#ffe3a3;border:1px solid #80612a;border-radius:2px}.market-item.equipped{outline:2px solid #f0cc58;box-shadow:0 0 8px #f4d86b77}
.army-panel,.hero-panel{min-height:calc(100dvh - 118px);background:linear-gradient(#d8c18d,#b99b61)}.section-head{display:flex;justify-content:space-between;align-items:center;margin:-10px -10px 10px;padding:12px;background:#281230;color:#f5dfaa;border-bottom:1px solid #8f6d2f}.section-head small,.hero-banner small{font-size:7px;letter-spacing:1px;color:#c8a85e}.section-head h2{color:#fff0be;margin:1px 0}.section-head>b{font-size:9px;color:#d8bd75}.army-grid{gap:5px}.army-slot{min-height:142px;background:linear-gradient(#553a27,#332216);border:1px solid #937137;color:#f1dbab;border-radius:4px;box-shadow:inset 0 0 14px #0004}.army-slot .pixel-sprite{width:46px;height:46px}.army-slot b{font-size:10px}.army-slot span{font-size:8px}.army-slot .btn{background:#6d254d;border-color:#b28639}
.hero-banner{display:grid;grid-template-columns:62px 1fr auto;align-items:center;gap:9px;margin:-10px -10px 10px;padding:14px;background:linear-gradient(115deg,#2d1238,#5b234c 65%,#713f27);color:#f7e1aa}.hero-portrait{width:58px;height:58px;display:grid;place-items:center;border-radius:50%;border:1px solid #c69a3d;background:#140b19}.hero-portrait .pixel-sprite{width:50px;height:50px}.hero-banner h2{color:#fff0bc;margin:1px 0;font-size:18px}.hero-banner strong{font-size:8px;color:#ddc480}.hero-grid div{background:#c4a96e;border:1px solid #7e6237;border-radius:3px}.pill{border-radius:10px;background:#5b3b25;color:#ffe4ad;border-color:#8c6a31}.equipment-line{margin-top:8px;padding:8px;background:#3b2430;color:#ead7af;border:1px solid #8a6630;border-radius:4px;font-size:8px}.set-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin-top:6px}.set-actions button{font-size:8px;padding:7px 2px;background:#4a224f;color:#ffe2a2;border:1px solid #86652d;border-radius:3px}
.battle-shell{min-height:calc(100dvh - 118px);border:0;background:#101015}.battle-hud{position:sticky;top:54px;z-index:10;background:linear-gradient(#29112e,#140918);border-bottom:1px solid #8e6b2c;color:#f2dca8;padding:7px 9px}.battle-stage{min-height:calc(100dvh - 222px);background:#68794d}.battle-commandbar{position:sticky;bottom:64px;z-index:10;background:linear-gradient(#221229,#100914);border-top:1px solid #80602a;padding:5px}.battle-commandbar .cmd{background:linear-gradient(#60204f,#321331);border-color:#9e7632;border-radius:4px}.battle-log{background:#120c15;color:#d8c7a5;border-top-color:#6f5428}
.catalog-section .barracks{grid-template-columns:repeat(5,minmax(0,1fr))}.catalog-section .unit-card{border-radius:3px}
.map-overlay{position:fixed;inset:54px 0 64px;z-index:50;background:#08050cdd;display:grid;place-items:center;padding:14px}.map-card{width:min(95vw,520px);background:#1c1025;color:#ead9b1;border:2px solid #8e6a2b;border-radius:6px;padding:8px}.map-card-head{display:flex;justify-content:space-between;align-items:center}.map-card button{background:#4b214d;color:#ffe1a0;border:1px solid #8b672b;padding:6px;border-radius:3px}
.threat-badge{transform:scale(1.05);box-shadow:0 0 7px #000}.sim-player-marker label{border-color:#4782a8!important;color:#d9f4ff!important}
@media(max-width:420px){.top{min-height:54px}.brand small{display:block}.tabs{height:62px}.world-stage{height:68dvh}.mini-wrap{width:82px!important}.world-hud{grid-template-columns:76px 1fr 72px}.market-grid{grid-template-columns:repeat(4,108px)}.catalog-section .barracks{grid-template-columns:repeat(5,minmax(0,1fr))}.unit-card{min-height:98px}.army-slot{min-height:132px}}

/* R2.8 — interaction/flow closure */
.world-hud{grid-template-columns:minmax(0,1fr) 84px}
.world-stage{gap:0!important;row-gap:0!important;column-gap:0!important}
.world-tile{margin:0!important;outline:0!important}
.recruit-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin-top:5px}
.recruit-actions button{padding:6px 2px;background:linear-gradient(#65204f,#34142f);color:#ffe7ae;border:1px solid #9b7432;font-weight:700;font-size:8px}
body.battle-active .tabs{display:none!important}
body.battle-active .screen{padding-bottom:0}
body.battle-active .battle-shell{min-height:calc(100dvh - 54px)}
body.battle-active .battle-stage{min-height:58dvh;max-height:66dvh}
body.battle-active .battle-commandbar{bottom:0}
@media(max-width:420px){.world-hud{grid-template-columns:minmax(0,1fr) 78px}.battle-stage{min-height:56dvh!important}}

/* R3.0 — Battle Overhaul */
/* R3.1 — Tactical Commander: magic, backline protection, counter-risk, commander styles */
body.battle-active .top{background:linear-gradient(#19091f,#0a050d);border-bottom-color:#a4772d}
.battle-r30{display:flex;flex-direction:column;height:calc(100dvh - 54px);overflow:hidden;background:radial-gradient(circle at 50% 45%,#55633e,#1a2018 68%,#0c0b0d)}
.battle-r30 .battle-hud{position:relative;top:auto;display:grid;grid-template-columns:90px 1fr;align-items:center;gap:7px;min-height:44px;padding:4px 7px;background:linear-gradient(90deg,#25102c,#110812 55%,#25102c);box-shadow:0 3px 10px #0008}
.battle-hud>div:first-child{display:flex;flex-direction:column}.battle-hud b{font-size:10px;color:#ffe7a0}.battle-hud small{font-size:7px;color:#c8bba0}
.turn-order{display:flex;gap:3px;overflow:hidden;justify-content:flex-end}.turn-chip{position:relative;width:31px;height:31px;border:1px solid #94703a;background:#251a28;border-radius:3px;display:grid;place-items:center}.turn-chip.enemy{border-color:#a34c45}.turn-chip.player{border-color:#4e8a77}.turn-chip.done{opacity:.36}.turn-chip .pixel-sprite{width:25px;height:25px}.turn-chip b{position:absolute;right:-2px;bottom:-2px;width:13px;height:13px;display:grid;place-items:center;border-radius:50%;background:#0d0910;color:#ffe7a0;font-size:7px;border:1px solid #8d6932}
.active-unit-card{display:grid;grid-template-columns:48px 1fr;gap:6px;align-items:center;padding:4px 8px;background:linear-gradient(#3d2930,#25171e);border-bottom:1px solid #87642f;color:#f3dfb2;min-height:54px}.active-unit-card .pixel-sprite.large{width:44px;height:44px}.active-unit-card b{display:block;font-size:11px}.active-unit-card small{display:block;color:#c7ad78;font-size:7px;text-transform:uppercase;letter-spacing:.5px}.active-unit-card span{display:block;font-size:8px;color:#e8d6b2;margin-top:2px}
.battle-r30 .battle-stage{flex:1;min-height:0!important;max-height:none!important;display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);gap:0;padding:5px;background:radial-gradient(circle at 52% 42%,#788753,#57643e 62%,#414b31);box-shadow:inset 0 0 22px #10140caa}
.battle-cell{position:relative;min-width:0;min-height:0;border:1px solid #26301d55;background:linear-gradient(145deg,#71804e,#647245);padding:0;border-radius:2px;overflow:visible}.battle-cell:nth-child(3n){background:linear-gradient(145deg,#758450,#617044)}.battle-cell:nth-child(5n){box-shadow:inset 0 0 9px #9bad6b22}.battle-cell.reachable{box-shadow:inset 0 0 0 2px #e6bf4c,0 0 5px #e6bf4c88;background:#7e8750}.battle-cell.attackable{box-shadow:inset 0 0 0 3px #b33d38,0 0 8px #ef514c99;background:#72503e}.battle-cell.selected{box-shadow:inset 0 0 0 3px #fff0a0,0 0 10px #ffe061!important;z-index:3}.battle-cell.enemy .pixel-sprite{filter:drop-shadow(0 0 4px #ef4f45)}.battle-cell .pixel-sprite{width:min(10vw,52px);height:min(10vw,52px);filter:drop-shadow(0 4px 3px #0008)}.battle-cell .stack-count{position:absolute;left:2px;bottom:1px;background:#100a12e8;border:1px solid #d0a84b;color:#fff0b6;padding:1px 3px;border-radius:7px;font-size:8px;font-weight:bold;z-index:4}.battle-cell .shot-count{position:absolute;right:1px;top:1px;background:#283d54e8;border:1px solid #91b8d6;color:#e3f4ff;padding:1px 3px;border-radius:7px;font-size:7px;z-index:4}.battle-cell.terrain-rock{background:#514b3b}.battle-cell.terrain-rock .pixel-sprite{opacity:.92}
.battle-hint{min-height:18px;padding:3px 8px;background:#171019;color:#c9b58d;font-size:7px;text-align:center;border-top:1px solid #514124}
.battle-r30 .battle-commandbar{position:relative;bottom:auto;display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:5px 7px;background:linear-gradient(#27132c,#100811);border-top:1px solid #8d692d}.battle-commandbar .cmd{min-height:38px;font-size:11px;font-weight:800;letter-spacing:.4px}.battle-commandbar .cmd.primary{background:linear-gradient(#8a285c,#4b183c);color:#fff1b1}
.battle-popup{position:absolute!important;right:8px;bottom:56px;z-index:40;width:min(56vw,230px);display:flex!important;flex-direction:column!important;gap:3px;padding:5px;background:#160c1cf4;border:1px solid #a17a34;box-shadow:0 8px 25px #000c;border-radius:4px}.battle-popup button{display:block;width:100%;text-align:left;background:linear-gradient(#56304f,#321d38);color:#ffe5a8;border:1px solid #80612d;padding:9px 10px;border-radius:3px;font-size:9px}
.battle-r30 .battle-log{max-height:22px;overflow:hidden;padding:0 7px;background:#0e090f;color:#cdbd9e;border-top:1px solid #4b3a22;font-size:7px}.battle-r30 .battle-log[open]{position:absolute;left:5px;right:5px;bottom:52px;z-index:35;max-height:35dvh;overflow:auto;padding:6px;background:#100a11f5;border:1px solid #8c692e}.battle-log summary{cursor:pointer;color:#d6bc77;padding:4px 0}.battle-log div{padding:2px 0;border-top:1px solid #392b24}
@media(max-width:420px){.battle-r30 .battle-hud{grid-template-columns:72px 1fr}.turn-chip{width:27px;height:27px}.turn-chip .pixel-sprite{width:22px;height:22px}.active-unit-card{grid-template-columns:42px 1fr;min-height:48px}.active-unit-card .pixel-sprite.large{width:39px;height:39px}.battle-cell .pixel-sprite{width:min(11vw,48px);height:min(11vw,48px)}}

/* R3.2 Formation Intelligence */
.battle-cell .combat-preview{position:absolute;left:50%;transform:translateX(-50%);bottom:-11px;z-index:9;white-space:nowrap;background:#170b12ee;color:#ffe6a7;border:1px solid #b98737;border-radius:3px;padding:1px 3px;font:700 6px Verdana;box-shadow:0 2px 5px #0008;pointer-events:none}.battle-cell .guard-badge{position:absolute;left:1px;top:1px;z-index:7;background:#193a54e8;color:#b9e8ff;border:1px solid #75a9c4;border-radius:50%;width:12px;height:12px;line-height:10px;font-size:7px;text-align:center}.battle-cell.protected-stack{box-shadow:inset 0 0 0 1px #7bc6e077}.battle-cell.attackable .combat-preview{animation:previewPulse 1.4s ease-in-out infinite}@keyframes previewPulse{0%,100%{opacity:.82}50%{opacity:1}}

/* R3.4 — HD battlefield & mobile clarity pass. Original CSS/SVG art only. */
:root{--hd-gold:#f0cf68;--hd-shadow:#07050a;--hd-purple:#18091f;--hd-paper:#ddc58b}
.top{backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.resources span,.tabs button,.cmd,.market-item,.unit-card{touch-action:manipulation}
.world-panel{overflow:hidden}.world-stage{height:calc(100dvh - 205px);min-height:510px;grid-auto-rows:1fr;background:#102015;box-shadow:inset 0 0 42px #000c}
.world-tile{aspect-ratio:auto;min-height:0;box-shadow:none!important;border:0!important;background-size:cover!important}
.world-tile.forest{background-image:radial-gradient(circle at 18% 24%,#789858 0 8%,transparent 9%),radial-gradient(circle at 67% 65%,#557d46 0 12%,transparent 13%),radial-gradient(circle at 80% 18%,#436f3e 0 11%,transparent 12%),linear-gradient(145deg,#315f37,#21452c)!important}
.world-tile.road{background-image:linear-gradient(90deg,#a37b49,#c29a62 48%,#9a7041),repeating-linear-gradient(25deg,#0000 0 8px,#ffffff10 9px 10px)!important}
.world-tile.water{background-image:repeating-linear-gradient(0deg,#438fae 0 5px,#62b7d1 6px 8px,#377e9d 9px 13px)!important}
.world-tile.waste{background-image:radial-gradient(circle at 30% 30%,#6d583e 0 4%,transparent 5%),linear-gradient(145deg,#b59a63,#816d4e)!important}
.world-object .pixel-sprite{image-rendering:pixelated;filter:drop-shadow(0 3px 2px #000a) drop-shadow(0 0 2px #fff2)}
.world-object label{font-size:8px;padding:2px 3px}.world-titlebar{top:61px}.world-hud{padding:5px 7px;grid-template-columns:minmax(0,1fr) 86px}.world-info{min-height:58px;max-height:74px;overflow:auto}.world-actions .cmd{min-height:31px}
.hero-panel{padding-bottom:84px}.hero-banner{grid-template-columns:68px 1fr auto}.hero-portrait{width:64px;height:64px}.hero-portrait .pixel-sprite{width:56px;height:56px}
.hero-grid{grid-template-columns:1fr 1fr}.equipment-line{line-height:1.55}.set-actions button{min-height:38px}
.recruit-card{min-height:154px}.recruit-actions button{min-height:31px}.army-slot{min-height:150px}
body.battle-active{overflow:hidden}.battle-r30{height:calc(100dvh - 54px);background:#08070b}.battle-r30 .battle-hud{min-height:40px}.active-unit-card{min-height:48px}
.battle-r30 .battle-stage{padding:3px;gap:2px;background:radial-gradient(circle at 50% 44%,#82925d,#4b5b38 70%,#273020);box-shadow:inset 0 0 36px #000b}
.battle-cell{border:1px solid #9eb37818!important;border-radius:3px;background:linear-gradient(145deg,#778954,#647744);box-shadow:inset 0 0 8px #0002}
.battle-cell:nth-child(3n){background:linear-gradient(145deg,#82925a,#68794a)}.battle-cell:nth-child(5n){background:linear-gradient(145deg,#71834f,#5c7043)}
.battle-cell .pixel-sprite{width:min(11.5vw,58px);height:min(11.5vw,58px);image-rendering:pixelated;filter:drop-shadow(0 4px 2px #000a) drop-shadow(0 0 2px #ffffff35)}
.battle-cell.enemy .pixel-sprite{filter:drop-shadow(0 4px 2px #000b) drop-shadow(0 0 5px #d8403e)}
.battle-cell.reachable{box-shadow:inset 0 0 0 2px #e6c34e,0 0 7px #e6c34e99!important}.battle-cell.attackable{box-shadow:inset 0 0 0 3px #dc5048,0 0 9px #ef514caa!important}.battle-cell.selected{box-shadow:inset 0 0 0 3px #ffe77b,0 0 12px #ffe061!important}
.battle-cell .stack-count{font-size:9px;padding:2px 4px}.battle-cell .shot-count{font-size:8px}.battle-hint{min-height:17px}.battle-r30 .battle-commandbar{padding:4px 6px}.battle-commandbar .cmd{min-height:36px}.battle-popup{bottom:50px}.battle-r30 .battle-log{max-height:19px}
body.battle-active .app{padding-bottom:0}
@media(max-width:420px){.world-stage{height:calc(100dvh - 198px);min-height:480px}.world-hud{grid-template-columns:minmax(0,1fr) 80px}.battle-r30 .battle-hud{grid-template-columns:68px 1fr}.turn-chip{width:25px;height:25px}.turn-chip .pixel-sprite{width:21px;height:21px}.active-unit-card{grid-template-columns:39px 1fr;min-height:44px;padding:3px 6px}.active-unit-card .pixel-sprite.large{width:36px;height:36px}.battle-cell .pixel-sprite{width:min(11vw,46px);height:min(11vw,46px)}.battle-commandbar .cmd{min-height:34px}.recruit-card{min-height:146px}}
/* R3.5 world exploration: camera viewport + larger continuous-feeling sector */
.world-layout{overflow:hidden!important}
.world-panel{padding:0!important}
.world-stage{width:920px!important;height:920px!important;grid-template-columns:repeat(10,92px)!important;grid-template-rows:repeat(10,92px)!important;flex:none}
.world-layout{height:calc(100dvh - 205px);overflow:auto!important;overscroll-behavior:contain;scrollbar-width:none;touch-action:pan-x pan-y;background:#102015}
.world-layout::-webkit-scrollbar{display:none}
.world-tile{width:92px!important;height:92px!important;min-width:92px!important;min-height:92px!important}
.hero-marker{z-index:4;box-shadow:0 0 0 3px #f7d26588,0 0 18px #f7d26566}
.bot-dot{z-index:3}
@media(max-width:420px){.world-layout{height:calc(100dvh - 198px)}.world-stage{width:820px!important;height:820px!important;grid-template-columns:repeat(10,82px)!important;grid-template-rows:repeat(10,82px)!important}.world-tile{width:82px!important;height:82px!important;min-width:82px!important;min-height:82px!important}}

/* R3.6 — Structural vertical overhaul */
.vertical-city,.hero-r36{padding-bottom:92px}.layer-head{position:sticky;top:0;z-index:12;display:flex;align-items:center;gap:10px;padding:9px 10px;background:linear-gradient(#2d1034,#1c0a25);color:#f7e5b5;border-bottom:1px solid #9d7634}.layer-head h3{margin:0;font-size:20px}.layer-head button{min-width:84px;padding:9px 11px;border:1px solid #a47a39;background:#542447;color:#ffe9ae;border-radius:5px}
.city-menu-vertical{display:flex!important;flex-direction:column;gap:0}.city-menu-vertical button{min-height:56px;text-align:left;padding:0 18px;font-size:16px;border-radius:0}
.barracks-vertical{display:flex!important;flex-direction:column;gap:8px;padding:8px}.vertical-recruit{display:grid!important;grid-template-columns:72px 1fr;gap:8px;min-height:0!important;padding:9px!important}.vertical-recruit>.pixel-sprite{width:66px!important;height:66px!important}.recruit-main{display:flex;flex-direction:column;gap:3px}.recruit-main b{font-size:16px}.recruit-main span{font-size:11px}.recruit-picker{grid-column:1/-1;display:grid;grid-template-columns:repeat(6,1fr);gap:4px;align-items:center}.recruit-picker button{min-height:36px}.recruit-picker b{text-align:center;font-size:17px;color:#4a203d}.recruit-summary{grid-column:1/-1;padding:7px;background:#bca46d;border:1px solid #6e5832;font-size:10px}.recruit-confirm{grid-column:1/-1;min-height:42px;background:#4b1f43!important;color:#f9e4ab!important;font-weight:800}.recruit-confirm:disabled{opacity:.45}
.inventory-list,.shop-list{display:flex;flex-direction:column;gap:7px;padding:7px 0}.inventory-card,.shop-item{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:8px;align-items:center;width:100%;padding:8px;border:1px solid #6c5732;background:linear-gradient(#d9c88f,#c4ae74);color:#2b2017;text-align:left}.inventory-card.is-equipped,.shop-item.equipped{box-shadow:inset 0 0 0 2px #dfc55d}.inventory-card-main{min-width:0;display:flex;flex-direction:column;gap:3px}.inventory-card-main b,.shop-item b{font-size:12px}.inventory-card-main small,.shop-item small{font-size:9px;color:#554936}.inventory-card-main strong{font-size:9px;color:#5b2249}.inventory-card-actions{display:flex;flex-direction:column;gap:3px}.inventory-card-actions button,.inventory-card>button{min-width:66px;padding:6px;background:#512048;color:#f7e4ad;border:1px solid #7d6031}.shop-item strong{font-size:10px;color:#5b2249}.item-icon{display:block;width:48px;height:48px;background-size:contain;background-position:center;background-repeat:no-repeat;filter:drop-shadow(0 2px 2px #0006)}.item-icon.large{width:58px;height:58px}.rarity-rare,.rarity-epic,.rarity-set{filter:drop-shadow(0 0 5px #f0cf68aa)}
.hero-r36{min-height:calc(100dvh - 120px)}.hero-r36 .hero-banner{position:sticky;top:0;z-index:9;background:linear-gradient(115deg,#4a174d,#70284d 68%,#6b472d);padding:10px}.skill-alert{align-self:center;background:#f0cf68!important;color:#2a1323!important;border:1px solid #fff0a0!important;border-radius:18px;padding:8px 12px;font-weight:900;animation:skillPulse 1.5s infinite}@keyframes skillPulse{50%{box-shadow:0 0 14px #ffe66d}}
.hero-vertical-layout{display:flex;flex-direction:column;gap:12px;padding:10px}.equipment-column,.hero-stats-column{display:flex;flex-direction:column;gap:7px}.equipment-column h3,.hero-stats-column h3{margin:4px 0}.equipment-slot{display:grid;grid-template-columns:64px 1fr;gap:9px;align-items:center;text-align:left;min-height:70px;padding:7px;background:linear-gradient(#3d2637,#261724);color:#f4dfad;border:1px solid #80622f;border-radius:5px}.equipment-slot.filled{background:linear-gradient(#56384d,#342131);box-shadow:inset 0 0 0 1px #d1a94d66}.equipment-slot span:last-child{display:flex;flex-direction:column;gap:2px}.equipment-slot small{text-transform:uppercase;letter-spacing:.8px;color:#c6a76a}.equipment-slot b{font-size:13px}.equipment-slot em{font-size:9px;color:#e4cf9b;font-style:normal}.empty-slot{width:52px;height:52px;display:grid;place-items:center;border:1px dashed #a98442;border-radius:6px;font-size:26px;color:#b99655}.effective-stats{display:grid;grid-template-columns:1fr 1fr;gap:5px}.effective-stats span{padding:8px;background:#b49b67;border:1px solid #68542f;font-size:10px}.hero-bag-button{min-height:46px;background:#4d2045!important;color:#f6dfaa!important;font-weight:800}.hero-sheet,.skill-sheet{position:fixed;inset:70px 0 62px 0;z-index:55;background:#d3bd84;overflow:auto;padding:0 10px 20px;box-shadow:0 -8px 30px #000a}.skill-sheet p{padding:8px 4px}.skill-row{display:grid;grid-template-columns:1fr 1fr auto;align-items:center;gap:6px;padding:10px 6px;border-bottom:1px solid #8c7444}.skill-row>div{display:flex;align-items:center;gap:7px}.skill-row button{width:38px;height:38px;background:#4e2146;color:#ffeab3;border:1px solid #7e6233}.skill-confirm{width:100%;min-height:48px;margin-top:12px;background:#4d2045;color:#f9e4ac;border:1px solid #8f6d34;font-weight:900}.skill-confirm:disabled{opacity:.45}
.lm-modal{position:fixed;inset:0;z-index:90;background:#09060cc2;display:grid;place-items:center;padding:22px}.lm-modal-card{width:min(92vw,430px);background:linear-gradient(#ead8a2,#ccb477);border:2px solid #7c5c2c;border-radius:7px;box-shadow:0 18px 50px #000c;color:#271c16;overflow:hidden}.lm-modal-card h3{margin:0;padding:14px;background:#32132f;color:#ffe9b0}.lm-modal-body{padding:18px;line-height:1.5}.lm-modal-actions{padding:0 14px 14px;display:flex;justify-content:flex-end;gap:8px}.lm-modal-actions button{min-width:90px;padding:10px;background:#542248;color:#ffe9ae;border:1px solid #80632e}
@media(min-width:600px){.hero-vertical-layout{max-width:620px;margin:auto}.vertical-recruit{max-width:620px;margin:auto}.inventory-list,.shop-list{max-width:620px;margin:auto}}
/* R3.7 CONTINUOUS LAND CAMERA */
.world-r37 .world-layout{height:calc(100dvh - 198px);overflow:auto!important;touch-action:pan-x pan-y;scroll-behavior:smooth;background:#102015}
.world-r37 .world-stage{display:grid!important;width:max-content!important;height:max-content!important;grid-template-columns:repeat(var(--land-cols),82px)!important;grid-template-rows:repeat(var(--land-rows),82px)!important;background:#102015!important}
.world-r37 .world-tile{width:82px!important;height:82px!important;min-width:82px!important;min-height:82px!important}
.world-r37 .world-tile.void{background:#0b1510!important}
.world-r37 .world-titlebar small{letter-spacing:.08em}
@media(min-width:700px){.world-r37 .world-stage{grid-template-columns:repeat(var(--land-cols),92px)!important;grid-template-rows:repeat(var(--land-rows),92px)!important}.world-r37 .world-tile{width:92px!important;height:92px!important;min-width:92px!important;min-height:92px!important}}

/* R3.8 — Visual integration: minimap dock, item identity, mobile polish */
.world-r37{position:relative}.mini-map-dock{position:absolute;right:10px;top:58px;z-index:18;width:118px;height:88px;padding:4px;border:1px solid #d0ad58;background:#130d18dd;box-shadow:0 5px 18px #0009;border-radius:7px;overflow:hidden}.mini-map-dock>span{display:block;width:100%;height:100%;overflow:hidden}.mini-map-dock .mini-geo{width:100%;height:66px}.mini-map-dock .mini-legend{display:none}.mini-map-dock .mini-pixel{min-width:1px;min-height:1px}.item-icon{border-radius:6px;background-color:#241a28;border:1px solid #7c6334;box-shadow:inset 0 0 10px #0008}.rarity-uncommon{box-shadow:inset 0 0 10px #0008,0 0 5px #76b77977}.rarity-rare{box-shadow:inset 0 0 10px #0008,0 0 7px #6e9fe0aa}.rarity-epic{box-shadow:inset 0 0 10px #0008,0 0 8px #b276dfbb}.rarity-set{box-shadow:inset 0 0 10px #0008,0 0 10px #e4bd54cc}.hero-marker .pixel-sprite{animation:heroBreath 1.8s ease-in-out infinite}@keyframes heroBreath{50%{transform:translateY(-2px);filter:drop-shadow(0 5px 3px #0008) brightness(1.08)}}
@media(max-width:420px){.mini-map-dock{width:100px;height:76px;right:7px;top:54px}.mini-map-dock .mini-geo{height:56px}.inventory-card,.shop-item{grid-template-columns:52px minmax(0,1fr) auto}.item-icon{width:46px;height:46px}}

/* R3.9 — Living City + battle motion language */
.city-r39{position:relative;overflow:hidden;min-height:calc(100dvh - 118px);background:linear-gradient(#2c1732 0 26%,#563a42 26% 38%,#7d6945 38% 100%)}
.city-r39.city-elves{background:linear-gradient(#15352b 0 25%,#31533c 25% 40%,#786d45 40% 100%)}
.city-r39.city-undead{background:linear-gradient(#21152b 0 24%,#3a3143 24% 39%,#5e5145 39% 100%)}
.city-sky{position:absolute;inset:0 0 auto 0;height:180px;pointer-events:none;background:radial-gradient(circle at 18% 20%,#f5dc9277,transparent 17%),radial-gradient(circle at 78% 16%,#c9d1ff33,transparent 20%);opacity:.9}
.city-r39 .city-hero{position:relative;z-index:2;margin:8px;border:1px solid #b78d43;background:#1f1320d9;box-shadow:0 8px 20px #0007;color:#f7e4b2}
.city-scene{position:relative;z-index:2;display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:8px 8px 100px}
.city-building-card{min-height:142px;border:1px solid #aa8648;background:linear-gradient(160deg,#39233cdd,#231526ee);color:#f3deb1;border-radius:9px;padding:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;box-shadow:0 10px 18px #0007,inset 0 0 0 1px #ffffff0d}
.city-building-card:active{transform:translateY(2px);filter:brightness(1.12)}
.city-building-card span:last-child{display:flex;flex-direction:column;gap:2px;text-align:center}.city-building-card b{font-size:13px}.city-building-card small{font-size:9px;color:#c9b98d}
.city-building-icon{width:78px;height:78px;background-size:contain;background-repeat:no-repeat;background-position:center;filter:drop-shadow(0 6px 3px #0008)}
.city-building-card.portal-exit{grid-column:1/-1;min-height:118px;background:linear-gradient(160deg,#17323a,#181525)}
.city-building-card.portal-exit .city-building-icon{width:68px;height:68px}
@media(max-width:360px){.city-scene{grid-template-columns:1fr}.city-building-card.portal-exit{grid-column:auto}.city-building-card{min-height:126px}.city-building-icon{width:68px;height:68px}}

.battle-cell .pixel-sprite{transition:transform .18s ease,filter .18s ease}.battle-cell.selected .pixel-sprite{animation:battleIdle .9s ease-in-out infinite}.battle-cell.enemy .pixel-sprite{filter:drop-shadow(0 5px 3px #0008)}
@keyframes battleIdle{50%{transform:translateY(-3px) scale(1.04)}}
.battle-cell.fx-hit{animation:cellHit .34s ease}.battle-cell.fx-hit .pixel-sprite{animation:unitHit .34s ease}.battle-cell.fx-shot:after{content:"➶";position:absolute;left:-20px;top:38%;font-size:28px;color:#ffe59a;text-shadow:0 0 8px #fff;animation:shotFly .34s ease-out forwards;z-index:20}.battle-cell.fx-magic:after{content:"✦";position:absolute;inset:0;display:grid;place-items:center;font-size:42px;color:#d7b6ff;text-shadow:0 0 10px #9e60ff,0 0 20px #fff;animation:magicBurst .36s ease-out}.battle-cell.fx-move .pixel-sprite{animation:moveLand .34s ease-out}
@keyframes cellHit{50%{box-shadow:inset 0 0 0 4px #ff6b52,0 0 18px #ff5b45}}@keyframes unitHit{35%{transform:translateX(-7px) rotate(-4deg);filter:brightness(1.8)}70%{transform:translateX(5px) rotate(3deg)}}@keyframes shotFly{from{transform:translateX(-42px) scale(.7);opacity:0}to{transform:translateX(38px) scale(1.15);opacity:1}}@keyframes magicBurst{from{transform:scale(.3) rotate(-20deg);opacity:0}60%{transform:scale(1.25);opacity:1}to{transform:scale(.9);opacity:.2}}@keyframes moveLand{from{transform:translateY(-9px) scale(.92);opacity:.6}to{transform:none;opacity:1}}
.battle-stage{background-image:radial-gradient(circle at 30% 20%,#fff2 0 1px,transparent 2px),linear-gradient(#7a6b45,#665a3d);background-size:23px 23px,auto}

/* R3.10 — troop-specific battle motion language */
.battle-cell .unit-dragon{transform-origin:50% 75%}.battle-cell.selected .unit-dragon{animation:dragonHover 1.15s ease-in-out infinite}.battle-cell.fx-hit.unit-dragon .unit-dragon{animation:dragonStrike .5s cubic-bezier(.2,.8,.2,1)}
.battle-cell .unit-fairy,.battle-cell .unit-spectral{transform-origin:center}.battle-cell.selected .unit-fairy{animation:fairyFlutter .55s ease-in-out infinite alternate}.battle-cell.selected .unit-spectral{animation:spectralFloat 1.35s ease-in-out infinite}
.battle-cell .unit-ent,.battle-cell .unit-heavy,.battle-cell .unit-bulwark{transform-origin:50% 100%}.battle-cell.selected .unit-ent{animation:entSway 1.6s ease-in-out infinite}.battle-cell.fx-hit.unit-ent .unit-ent,.battle-cell.fx-hit.unit-heavy .unit-heavy{animation:heavySmash .52s ease-out}
.battle-cell.selected .unit-archer,.battle-cell.selected .unit-ranged{animation:rangedReady 1.1s ease-in-out infinite}.battle-cell.fx-shot.unit-archer:after,.battle-cell.fx-shot.unit-ranged:after{content:"➹";font-size:32px;color:#f7e6a5;animation:arrowSnap .48s ease-out forwards}
.battle-cell.selected .unit-vampire{animation:vampirePulse 1.05s ease-in-out infinite}.battle-cell.fx-hit.unit-vampire .unit-vampire{animation:vampireLunge .48s ease-out}
.battle-cell.selected .unit-necromancer{animation:necroChannel 1.25s ease-in-out infinite}.battle-cell.fx-magic.unit-necromancer:after{content:"✹";color:#a9ef9e;text-shadow:0 0 10px #54cf69,0 0 22px #6d4cbd;animation:necroBurst .52s ease-out}
.battle-cell.fx-magic.unit-fairy:after{content:"✧";color:#eaffc4;text-shadow:0 0 8px #d9ff89,0 0 18px #fff}.battle-cell.fx-move.unit-charger .unit-charger{animation:chargeLand .45s ease-out}
@keyframes dragonHover{50%{transform:translateY(-5px) scale(1.07)}}@keyframes dragonStrike{35%{transform:translate(-5px,-6px) scale(1.18) rotate(-4deg)}70%{transform:translate(5px,1px) scale(1.1)}}
@keyframes fairyFlutter{from{transform:translate(-2px,-3px) rotate(-3deg) scale(1.02)}to{transform:translate(2px,2px) rotate(4deg) scale(1.09)}}@keyframes spectralFloat{50%{transform:translateY(-6px);opacity:.72;filter:drop-shadow(0 0 8px #b9d8ff)}}
@keyframes entSway{25%{transform:rotate(-1.8deg)}75%{transform:rotate(1.8deg)}}@keyframes heavySmash{30%{transform:translateY(-4px) scale(1.08)}60%{transform:translateY(4px) scale(1.12)}}
@keyframes rangedReady{50%{transform:translateX(-2px) scale(1.035)}}@keyframes arrowSnap{from{transform:translateX(-46px) rotate(-10deg);opacity:.15}to{transform:translateX(42px) rotate(4deg);opacity:1}}
@keyframes vampirePulse{50%{transform:scale(1.08);filter:drop-shadow(0 0 7px #d74c69)}}@keyframes vampireLunge{35%{transform:translateX(8px) scale(1.14)}70%{transform:translateX(-3px) scale(1.05)}}
@keyframes necroChannel{50%{transform:translateY(-3px);filter:drop-shadow(0 0 8px #77d983)}}@keyframes necroBurst{from{transform:scale(.2) rotate(-80deg);opacity:0}65%{transform:scale(1.35) rotate(25deg);opacity:1}to{transform:scale(.8) rotate(55deg);opacity:.1}}@keyframes chargeLand{from{transform:translateX(-15px) scale(.92);opacity:.45}70%{transform:translateX(3px) scale(1.08)}to{transform:none;opacity:1}}

/* R3.11 — Cinematic combat feedback. Visual-only layer; combat math unchanged. */
.battle-cell.fx-hit{animation:cellImpact .38s ease-out}.battle-cell.fx-shot{animation:rangedImpact .42s ease-out}.battle-cell.fx-magic{animation:magicImpact .58s ease-out}.battle-cell.fx-hit .pixel-sprite,.battle-cell.fx-shot .pixel-sprite{animation:unitDamage .42s ease-out}
.damage-float{position:absolute;z-index:22;left:50%;top:8%;transform:translateX(-50%);font:900 12px/1 Verdana;color:#fff2bd;text-shadow:0 1px 0 #300,0 0 5px #e33,0 0 10px #000;pointer-events:none;animation:damageRise 1.45s linear forwards}.death-mark{position:absolute;z-index:23;inset:10%;display:grid;place-items:center;font-size:27px;color:#fff1bb;text-shadow:0 0 8px #fff,0 0 18px #b34a3c;pointer-events:none;animation:deathBurst .68s ease-out forwards}
.battle-cell.fx-hit.unit-dragon:after{content:"🔥";font-size:20px;filter:drop-shadow(0 0 7px #ff8a28)}.battle-cell.fx-shot.unit-archer:after{content:"➶";font-size:22px;color:#f4df9b}.battle-cell.fx-shot.unit-ranged:after{content:"✦";font-size:18px;color:#e6f4ff}.battle-cell.fx-hit.unit-ent:after,.battle-cell.fx-hit.unit-heavy:after{content:"✹";font-size:24px;color:#e6d0a0}.battle-cell.fx-hit.unit-vampire:after{content:"◆";font-size:20px;color:#e24967}.battle-cell.fx-magic.unit-necromancer:after{font-size:25px}.battle-cell.fx-magic:before{content:"";position:absolute;z-index:15;inset:10%;border:2px solid #e7d08b;border-radius:50%;box-shadow:0 0 10px #dfcc83,0 0 22px #8d63c8;animation:spellRing .62s ease-out forwards;pointer-events:none}
@keyframes damageRise{0%{opacity:0;transform:translate(-50%,10px) scale(.65)}12%{opacity:1;transform:translate(-50%,5px) scale(1.08)}78%{opacity:1;transform:translate(-50%,-15px) scale(1.02)}100%{opacity:0;transform:translate(-50%,-24px) scale(1)}}@keyframes unitDamage{25%{transform:translateX(-5px) rotate(-3deg);filter:brightness(1.65) drop-shadow(0 0 8px #f55)}55%{transform:translateX(4px) rotate(2deg)}100%{transform:none}}@keyframes cellImpact{30%{box-shadow:inset 0 0 0 3px #ffdb7b,0 0 16px #ef5c3e!important}100%{}}@keyframes rangedImpact{35%{box-shadow:inset 0 0 0 2px #e8e1bc,0 0 14px #dceeff!important}100%{}}@keyframes magicImpact{40%{filter:brightness(1.35)}100%{filter:none}}@keyframes deathBurst{0%{opacity:0;transform:scale(.2) rotate(-35deg)}45%{opacity:1;transform:scale(1.45) rotate(10deg)}100%{opacity:0;transform:scale(2) rotate(38deg)}}@keyframes spellRing{0%{opacity:0;transform:scale(.25)}45%{opacity:1}100%{opacity:0;transform:scale(1.65)}}

/* R3.12 — Signature attacks: source pose + species-specific target language. */
.battle-cell.fx-source .pixel-sprite{position:relative;z-index:18}.battle-cell.source-arrow .pixel-sprite,.battle-cell.source-soul-bolt .pixel-sprite{animation:sourceRanged .48s ease-out}.battle-cell.source-breath .pixel-sprite{animation:dragonBreathSource .7s ease-out}.battle-cell.source-fairy-dive .pixel-sprite{animation:fairyDiveSource .6s ease-out}.battle-cell.source-vampire-dash .pixel-sprite{animation:vampireDashSource .58s ease-out}.battle-cell.source-ent-smash .pixel-sprite{animation:entSmashSource .62s ease-out}.battle-cell.fx-breath:after{content:"🔥🔥";font-size:30px;letter-spacing:-8px;color:#ffb246;filter:drop-shadow(0 0 8px #ff5b22);animation:breathBurst .72s ease-out}.battle-cell.fx-arrow:after{content:"➶";font-size:32px;color:#fff0a9;text-shadow:0 0 8px #fff;animation:arrowImpact .5s ease-out}.battle-cell.fx-fairy-dive:after{content:"✧";font-size:34px;color:#efffc9;text-shadow:0 0 10px #b8ff70,0 0 20px #fff;animation:fairyBurst .62s ease-out}.battle-cell.fx-vampire-dash:after{content:"◆";font-size:28px;color:#ff5f7d;text-shadow:0 0 10px #72142a;animation:vampireBurst .58s ease-out}.battle-cell.fx-ent-smash:after{content:"✹";font-size:34px;color:#e8c98d;text-shadow:0 0 10px #6f4d25;animation:entImpact .62s ease-out}.battle-cell.fx-soul-bolt:after{content:"☄";font-size:32px;color:#9bffb1;text-shadow:0 0 10px #50df74,0 0 20px #805ac7;animation:soulBolt .66s ease-out}.battle-cell.fx-claw:after,.battle-cell.fx-necro-strike:after{content:"✦";font-size:28px;color:#f3d5ff;animation:clawFlash .45s ease-out}
@keyframes sourceRanged{35%{transform:translateX(-5px) scale(1.08)}70%{transform:translateX(2px) scale(1.02)}}@keyframes dragonBreathSource{25%{transform:translateY(-4px) scale(1.12) rotate(-3deg)}55%{filter:brightness(1.35) drop-shadow(0 0 10px #ff7a30)}100%{transform:none}}@keyframes fairyDiveSource{30%{transform:translate(-6px,-8px) scale(1.18)}65%{transform:translate(5px,2px) scale(.96)}}@keyframes vampireDashSource{35%{transform:translateX(10px) scale(1.14);opacity:.75}65%{transform:translateX(-2px) scale(1.05)}}@keyframes entSmashSource{30%{transform:translateY(-6px) rotate(-2deg) scale(1.08)}60%{transform:translateY(5px) scale(1.14)}}@keyframes breathBurst{0%{opacity:0;transform:translateX(-18px) scale(.5)}55%{opacity:1;transform:translateX(2px) scale(1.3)}100%{opacity:0;transform:translateX(12px) scale(1.55)}}@keyframes arrowImpact{0%{opacity:0;transform:translateX(-34px) rotate(-8deg)}60%{opacity:1;transform:translateX(0) rotate(3deg)}100%{opacity:0;transform:translateX(8px) scale(1.2)}}@keyframes fairyBurst{0%{opacity:0;transform:scale(.2) rotate(-45deg)}55%{opacity:1;transform:scale(1.45) rotate(25deg)}100%{opacity:0;transform:scale(.8) rotate(65deg)}}@keyframes vampireBurst{0%{opacity:0;transform:scale(.4)}45%{opacity:1;transform:scale(1.55) rotate(18deg)}100%{opacity:0;transform:scale(.9)}}@keyframes entImpact{0%{opacity:0;transform:translateY(-20px) scale(.7)}45%{opacity:1;transform:translateY(2px) scale(1.45)}100%{opacity:0;transform:translateY(10px) scale(1.1)}}@keyframes soulBolt{0%{opacity:0;transform:translate(-24px,-18px) scale(.45) rotate(-25deg)}55%{opacity:1;transform:translate(0,0) scale(1.4) rotate(15deg)}100%{opacity:0;transform:scale(.8) rotate(45deg)}}@keyframes clawFlash{0%{opacity:0;transform:scale(.3)}55%{opacity:1;transform:scale(1.5) rotate(20deg)}100%{opacity:0;transform:scale(.8)}}
/* R3.13 battle reports + real projectile trajectories */
.report-button{margin-top:5px}
.report-sheet{z-index:55}.report-row{width:100%;display:grid;grid-template-columns:1fr auto;gap:2px 8px;text-align:left;padding:9px 10px;margin:0 0 5px;border:1px solid #84652d;background:linear-gradient(#5a284f,#32192f);color:#f8e6b2;border-radius:5px}.report-row b{font-size:10px}.report-row small{grid-column:1/3;font-size:7px;color:#cebfa3}.report-row span{grid-column:1/3;font-size:8px;color:#f2d887}.report-summary{display:flex;flex-direction:column;gap:7px;min-width:240px}.report-result{display:flex;justify-content:space-between;gap:8px;align-items:center;border-radius:5px;padding:8px 9px;background:#2b1d25;border:1px solid #8a6932}.report-result.victory{box-shadow:inset 3px 0 #c6a349}.report-result.defeat{box-shadow:inset 3px 0 #a84444}.report-result b{font-size:13px;color:#ffe69a}.report-result small{font-size:8px;color:#d7c9aa;text-align:right}.report-rewards{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.report-rewards span{display:flex;flex-direction:column;background:#2c2130;border:1px solid #73562b;padding:6px;border-radius:4px;font-size:7px;color:#bda989}.report-rewards b{font-size:9px;color:#fff0b7;margin-top:2px}.report-section{display:flex;flex-direction:column;gap:2px;background:#261d27;border:1px solid #5e4829;padding:6px;border-radius:4px}.report-section b{font-size:9px;color:#e3ca88}.report-section small{font-size:8px;color:#ded2ba;line-height:1.35}
.battle-r30 .battle-stage{position:relative;overflow:hidden}
.battle-projectile{position:absolute;left:var(--px);top:var(--py);width:18px;height:18px;z-index:50;pointer-events:none;transform:translate(-50%,-50%);animation:projTravel .62s cubic-bezier(.2,.75,.2,1) forwards;filter:drop-shadow(0 0 5px #fff8)}
.battle-projectile:before{position:absolute;inset:0;display:grid;place-items:center;font-size:18px;line-height:1}
.battle-projectile.proj-arrow:before{content:"➶";color:#fff0a9;text-shadow:0 0 7px #fff}.battle-projectile.proj-shot:before{content:"•";font-size:26px;color:#dff5ff;text-shadow:0 0 8px #8bc9ff}.battle-projectile.proj-soul-bolt:before{content:"☄";color:#9bffb1;text-shadow:0 0 8px #50df74,0 0 15px #805ac7}.battle-projectile.proj-fairy-dive:before{content:"✧";font-size:24px;color:#efffc9;text-shadow:0 0 8px #b8ff70}.battle-projectile.proj-vampire-dash:before{content:"◆";color:#ff5f7d;text-shadow:0 0 8px #72142a}.battle-projectile.proj-breath{width:28px;height:22px}.battle-projectile.proj-breath:before{content:"🔥";font-size:23px;filter:drop-shadow(0 0 8px #ff5b22)}
@keyframes projTravel{0%{transform:translate(-50%,-50%) scale(.7);opacity:.15}12%{opacity:1}100%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(1.08);opacity:.95}}
@media(max-width:420px){.report-summary{min-width:0}.report-rewards{grid-template-columns:1fr}.battle-projectile{width:16px;height:16px}}
/* R3.14 progression + combat career */
.combat-stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px 0}.combat-stats-grid span{display:flex;flex-direction:column;gap:3px;padding:10px;background:#392436;border:1px solid #80612f;color:#cdbb96;border-radius:5px;font-size:9px}.combat-stats-grid b{font-size:14px;color:#ffe6a1}
/* R3.15 — Territorial cities: conquest, garrison, vision and 30-minute shield */
.world-object.city-node small{display:block;margin-top:2px;font-size:6px;line-height:1.1;color:#f4dda2;background:#27172aee;padding:2px 3px;border-radius:3px}.world-object.city-node.hostile{filter:drop-shadow(0 0 5px #b93645)}.world-object.city-node.friendly{filter:drop-shadow(0 0 5px #d5b75b)}
.city-vision{display:flex;flex-direction:column;gap:5px;min-width:235px}.city-vision>span{font-size:9px}.city-vision small{font-size:8px;color:#cdbf9e;line-height:1.35}.city-vision hr{border:0;border-top:1px solid #73572f;width:100%}.territory-card{display:flex;flex-direction:column;gap:5px;padding:12px;border:1px solid #765926;background:linear-gradient(#4d2847,#2d1b2b);color:#f2dfac;border-radius:6px}.territory-card h3{margin:0;color:#ffe49b}.territory-vision{width:100%;margin:9px 0;padding:11px;background:#54234b;border:1px solid #a07b38;color:#ffe9ae;border-radius:5px}.garrison-list{display:flex;flex-direction:column;gap:7px}.garrison-row{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:8px;padding:7px;border:1px solid #765d30;background:#d1ba7e;color:#291c17}.garrison-row .pixel-sprite{width:38px;height:38px}.garrison-row span{display:flex;flex-direction:column}.garrison-row small{font-size:8px;color:#66543c}.garrison-row button{padding:8px 7px;background:#52234b;color:#ffe9b5;border:1px solid #8d6a31;border-radius:4px}

/* R3.16 — Territory metagame: city treasury, defense queue, Gang -> Order */
.territory-log{display:flex;flex-direction:column;gap:6px;margin-top:8px}.territory-log>div{padding:8px;border:1px solid #74582d;background:#352234;color:#ead8aa;border-radius:5px;font-size:9px;line-height:1.35}.territory-log small{color:#bfae8b;margin-right:5px}.territory-card span{display:flex;justify-content:space-between;gap:8px}.territory-vision:disabled{opacity:.45}.city-vision>span:nth-of-type(n+3){color:#e6cf91}.city-node.hostile small{color:#ffd0d0}.city-node.friendly small{color:#fff0ae}

/* R3.17 territorial dominion visualization */
.world-object.city-node.dominion-player{outline:2px solid #e9c95c;box-shadow:0 0 13px #e9c95c88}.world-object.city-node.dominion-sim{outline:2px solid #7c6dff;box-shadow:0 0 13px #7c6dff88}.world-object.city-node.dominion-elves{outline:1px solid #74c46d}.world-object.city-node.dominion-undead{outline:1px solid #a66bb4}.mini-pixel.city.dominion-player{box-shadow:inset 0 0 0 2px #ffe36e}.mini-pixel.city.dominion-sim{box-shadow:inset 0 0 0 2px #9388ff}.mini-pixel.city.dominion-elves{box-shadow:inset 0 0 0 1px #83d477}.mini-pixel.city.dominion-undead{box-shadow:inset 0 0 0 1px #c184d0}

/* R3.18 Orc volcanic terrain */
.tile.lava,.mini-pixel.lava{background:linear-gradient(135deg,#4a1710,#9b2d16 55%,#e56a22);box-shadow:inset 0 0 10px rgba(255,160,40,.28)}
.dominion-orcs{outline:2px solid rgba(190,72,28,.9)}
/* R3.25 — Orc historical spell integration: 12-spell mobile-safe menu */
.orc-magic-menu{max-height:min(68vh,430px);overflow-y:auto;overscroll-behavior:contain}
.orc-magic-menu button{display:flex;justify-content:space-between;align-items:center;gap:8px}
.orc-magic-menu button small{font-size:7px;color:#d6bb7d;white-space:nowrap}
/* R26.6.67 — Undead post-battle resurrection reserve */
.resurrection-reserve{display:flex;flex-direction:column;gap:5px}.resurrection-reserve span{display:flex;align-items:center;justify-content:space-between;gap:6px}.resurrection-reserve button{min-height:32px;padding:5px 8px;border:1px solid #6e5331;background:#59412a;color:#fff0c6;font-weight:700}


/* R3.40 — Racial visual identity pass I: unique basic troops, five city identities, six-Land art direction */
.pixel-sprite{transform-origin:50% 82%}.unit-human{filter:drop-shadow(0 3px 2px #0008)}.unit-elf{filter:drop-shadow(0 3px 2px #153a2477)}.unit-orc{filter:drop-shadow(0 3px 2px #3b120d99)}.unit-dwarf{filter:drop-shadow(0 3px 2px #302a2399)}.unit-undead{filter:drop-shadow(0 3px 2px #311d4099)}
.city-race-sprite{width:46px;height:46px;filter:drop-shadow(0 3px 2px #0009)}

/* Five truly distinct racial cities. */
.city-r39.city-humans{background:linear-gradient(#6a91b4 0 24%,#8fb26d 24% 39%,#a38c61 39% 100%)}
.city-r39.city-elves{background:linear-gradient(#123b2a 0 23%,#2d6244 23% 39%,#6f7045 39% 100%)}
.city-r39.city-orcs{background:linear-gradient(#281313 0 22%,#5b261b 22% 38%,#6e442f 38% 100%)}
.city-r39.city-dwarves{background:linear-gradient(#4f5960 0 22%,#64675e 22% 38%,#77644c 38% 100%)}
.city-r39.city-undead{background:linear-gradient(#21152b 0 22%,#403347 22% 38%,#5e5145 38% 100%)}
.city-r39.city-neutral{background:linear-gradient(#536b76 0 22%,#718060 22% 38%,#897451 38% 100%)}
.city-humans .city-sky{background:radial-gradient(circle at 18% 18%,#fff4b999,transparent 15%),linear-gradient(#8ab4d5aa,transparent 75%)}
.city-elves .city-sky{background:radial-gradient(circle at 18% 18%,#d7ff9a55,transparent 17%),radial-gradient(circle at 82% 20%,#65c49b44,transparent 22%)}
.city-orcs .city-sky{background:radial-gradient(circle at 72% 18%,#e65b2877,transparent 17%),linear-gradient(#3d1718aa,transparent 75%)}
.city-dwarves .city-sky{background:radial-gradient(circle at 20% 18%,#e7dccb55,transparent 14%),linear-gradient(#7c8589aa,transparent 70%)}
.city-undead .city-sky{background:radial-gradient(circle at 78% 16%,#c9d1ff44,transparent 16%),linear-gradient(#2c1c38aa,transparent 72%)}
.city-humans .city-building-card{background:linear-gradient(160deg,#334f66ee,#233844f4);border-color:#d4b86a}.city-elves .city-building-card{background:linear-gradient(160deg,#244d38ee,#183228f4);border-color:#9ab968}.city-orcs .city-building-card{background:linear-gradient(160deg,#55271fee,#2f1816f4);border-color:#b75e38}.city-dwarves .city-building-card{background:linear-gradient(160deg,#4d4b49ee,#2f302ff4);border-color:#b99b61}.city-undead .city-building-card{background:linear-gradient(160deg,#46334eee,#291e31f4);border-color:#9f7aad}
.city-humans .city-hero{background:#20364ad9}.city-elves .city-hero{background:#142b20dd}.city-orcs .city-hero{background:#291615e0}.city-dwarves .city-hero{background:#333331e0}.city-undead .city-hero{background:#25192de0}

/* Six Lands keep the same collision map but gain unmistakable art direction. */
.world-r37.land-human-plains .world-layout,.world-r37.land-human-plains .world-stage{background:#264a39!important}.land-human-plains .world-tile:not(.water):not(.mountain):not(.forest):not(.road){background:linear-gradient(135deg,#79a95e,#6c9a55)}.land-human-plains .world-tile.forest{background:radial-gradient(circle at 25% 32%,#315f35 0 16%,transparent 17%),radial-gradient(circle at 72% 58%,#3a6b39 0 19%,transparent 20%),linear-gradient(135deg,#417848,#56884d)}.land-human-plains .world-tile.road{background:repeating-linear-gradient(135deg,#a97542 0 7px,#c18f55 7px 13px)}.land-human-plains .world-tile.water{background:repeating-linear-gradient(0deg,#237fb7 0 5px,#38a3d1 5px 9px,#1e73a8 9px 13px)}.land-human-plains .world-tile.mountain{background:linear-gradient(135deg,#9a6c48 0 42%,#c18d5f 43% 58%,#75543d 59%)}
.world-r37.land-elf-forest .world-layout,.world-r37.land-elf-forest .world-stage{background:#0f2b1d!important}.land-elf-forest .world-tile:not(.water):not(.mountain):not(.forest):not(.road){background:linear-gradient(135deg,#4e7f46,#3f6e3d)}.land-elf-forest .world-tile.forest{background:radial-gradient(circle at 28% 30%,#173f2a 0 20%,transparent 21%),radial-gradient(circle at 70% 60%,#225137 0 23%,transparent 24%),linear-gradient(135deg,#28593b,#356b45)}.land-elf-forest .world-tile.road{background:repeating-linear-gradient(135deg,#84653f 0 6px,#9b7b4d 6px 12px)}.land-elf-forest .world-tile.water{background:repeating-linear-gradient(0deg,#2d7996 0 4px,#49a9bd 4px 8px,#276c88 8px 12px)}
.world-r37.land-orc-lava .world-layout,.world-r37.land-orc-lava .world-stage{background:#24110e!important}.land-orc-lava .world-tile:not(.water):not(.mountain):not(.forest):not(.road){background:linear-gradient(135deg,#7b3a2b,#5b2b22)}.land-orc-lava .world-tile.road{background:repeating-linear-gradient(135deg,#7e2f1f 0 6px,#a54725 6px 12px)}.land-orc-lava .world-tile.forest{background:radial-gradient(circle at 30% 35%,#342a23 0 18%,transparent 19%),radial-gradient(circle at 68% 55%,#463124 0 20%,transparent 21%),linear-gradient(135deg,#4a2b21,#5d3624)}.land-orc-lava .world-tile.mountain{background:linear-gradient(135deg,#4a3130 0 45%,#6e3730 46% 60%,#2d2525 61%)}.land-orc-lava .world-tile.water{background:repeating-linear-gradient(0deg,#3b5664 0 4px,#52737f 4px 8px,#304752 8px 12px)}.land-orc-lava .world-tile:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 72% 22%,#d9531e33 0 4%,transparent 5%),radial-gradient(circle at 24% 72%,#ff8a2b22 0 3%,transparent 4%)}
.world-r37.land-dwarf-mountains .world-layout,.world-r37.land-dwarf-mountains .world-stage{background:#293336!important}.land-dwarf-mountains .world-tile:not(.water):not(.mountain):not(.forest):not(.road){background:linear-gradient(135deg,#6f765b,#5e684f)}.land-dwarf-mountains .world-tile.mountain{background:linear-gradient(135deg,#5e6463 0 36%,#89908b 37% 52%,#454b4c 53% 68%,#727873 69%)}.land-dwarf-mountains .world-tile.road{background:repeating-linear-gradient(135deg,#75654c 0 6px,#927c5b 6px 12px)}.land-dwarf-mountains .world-tile.water{background:repeating-linear-gradient(0deg,#3a788a 0 4px,#59a0ae 4px 8px,#326b7b 8px 12px)}.land-dwarf-mountains .world-tile.forest{background:radial-gradient(circle at 30% 35%,#31513b 0 18%,transparent 19%),radial-gradient(circle at 68% 55%,#3e6345 0 20%,transparent 21%),linear-gradient(135deg,#455e46,#52694c)}
.world-r37.land-undead-wastes .world-layout,.world-r37.land-undead-wastes .world-stage{background:#322b25!important}.land-undead-wastes .world-tile.waste,.land-undead-wastes .world-tile:not(.water):not(.mountain):not(.forest):not(.road){background:radial-gradient(circle at 24% 65%,#8d6d4933 0 4%,transparent 5%),linear-gradient(135deg,#c9a966,#b78e56)}.land-undead-wastes .world-tile.road{background:repeating-linear-gradient(135deg,#7c5838 0 6px,#956945 6px 12px)}.land-undead-wastes .world-tile.forest{background:radial-gradient(circle at 30% 35%,#334735 0 16%,transparent 17%),radial-gradient(circle at 68% 55%,#3f543e 0 19%,transparent 20%),linear-gradient(135deg,#5b6548,#6c704d)}.land-undead-wastes .world-tile.water{background:repeating-linear-gradient(0deg,#2b6f91 0 4px,#438faf 4px 8px,#245d7a 8px 12px)}.land-undead-wastes .world-tile.mountain{background:linear-gradient(135deg,#7a6651 0 44%,#9a7654 45% 60%,#594b40 61%)}
.world-r37.land-five-kingdoms .world-layout,.world-r37.land-five-kingdoms .world-stage{background:#243b2d!important}.land-five-kingdoms .world-tile:not(.water):not(.mountain):not(.forest):not(.road):not(.waste){background:linear-gradient(135deg,#6d9557,#5f884d)}.land-five-kingdoms .world-tile.forest{background:radial-gradient(circle at 30% 35%,#234b32 0 18%,transparent 19%),radial-gradient(circle at 68% 55%,#315d3a 0 22%,transparent 23%),linear-gradient(135deg,#3e6a43,#4b7949)}.land-five-kingdoms .world-tile.waste{background:linear-gradient(135deg,#c39f61,#ad824c)}.land-five-kingdoms .world-tile.road{background:repeating-linear-gradient(135deg,#9b6f43 0 6px,#b48652 6px 12px)}.land-five-kingdoms .world-tile.water{background:repeating-linear-gradient(0deg,#2581b2 0 4px,#3da6ca 4px 8px,#226f9c 8px 12px)}.land-five-kingdoms .world-tile.mountain{background:linear-gradient(135deg,#80644e 0 43%,#aa805c 44% 58%,#5e4b3d 59%)}

/* Small race accents on city/world cards without changing mechanics. */
.city-humans .city-building-icon{filter:drop-shadow(0 2px 3px #0008) saturate(.9) brightness(1.1)}.city-elves .city-building-icon{filter:drop-shadow(0 2px 3px #0008) hue-rotate(35deg)}.city-orcs .city-building-icon{filter:drop-shadow(0 2px 3px #0008) sepia(.4) saturate(1.3)}.city-dwarves .city-building-icon{filter:drop-shadow(0 2px 3px #0008) grayscale(.25)}.city-undead .city-building-icon{filter:drop-shadow(0 2px 3px #0008) hue-rotate(245deg) saturate(.8)}

/* Keep visual targets clear on 360–420px screens. */
@media(max-width:420px){.city-race-sprite{width:42px;height:42px}.city-building-card{min-height:126px}.battle-cell .pixel-sprite{width:min(11vw,48px);height:min(11vw,48px)}}

/* R3.40 battlefields inherit the Land palette without changing tactical cells. */
.battle-land-human-plains .battle-stage{background:linear-gradient(145deg,#768f59,#657b4f)}
.battle-land-elf-forest .battle-stage{background:linear-gradient(145deg,#4f7448,#3e6340)}
.battle-land-orc-lava .battle-stage{background:linear-gradient(145deg,#6f4939,#553429)}
.battle-land-dwarf-mountains .battle-stage{background:linear-gradient(145deg,#697068,#555d58)}
.battle-land-undead-wastes .battle-stage{background:linear-gradient(145deg,#a18459,#806b4e)}
.battle-land-five-kingdoms .battle-stage{background:linear-gradient(145deg,#6f8154,#657348)}
.battle-land-orc-lava .battle-cell{border-color:#4d2a2455}.battle-land-undead-wastes .battle-cell{border-color:#5a483755}.battle-land-dwarf-mountains .battle-cell{border-color:#37403d66}


/* R3.41 — Motion language + deep racial city scenes. Transform/opacity only for mobile safety. */
.city-r41{position:relative;overflow:hidden;isolation:isolate}.city-r41>.city-sky{position:absolute;inset:0 0 auto 0;height:37%;z-index:0;pointer-events:none;overflow:hidden}.city-r41>.city-hero,.city-r41>.city-scene{position:relative;z-index:5}.city-r41>.city-scene{padding-top:6px}
.city-atmosphere,.city-horizon,.city-plaza{position:absolute;left:0;right:0;pointer-events:none}.city-atmosphere{inset:0;z-index:1;overflow:hidden}.city-horizon{top:13%;height:28%;z-index:2;display:flex;align-items:flex-end;justify-content:space-around;padding:0 5%;opacity:.92}.city-plaza{top:33%;height:25%;z-index:3;opacity:.5;background:linear-gradient(180deg,transparent,#0002 60%,#0004)}
.city-plaza span{position:absolute;left:50%;bottom:-4%;width:8%;height:120%;background:#d8c39b25;transform-origin:50% 100%;clip-path:polygon(42% 0,58% 0,100% 100%,0 100%)}.city-plaza span:nth-child(1){transform:translateX(-50%) rotate(-25deg)}.city-plaza span:nth-child(2){transform:translateX(-50%)}.city-plaza span:nth-child(3){transform:translateX(-50%) rotate(25deg)}
.landmark{display:block;position:relative;width:13%;min-width:34px;max-width:72px;background:#152119b8;border:1px solid #ffffff10;filter:drop-shadow(0 6px 4px #0008);transform-origin:50% 100%}.lm1{height:48%}.lm2{height:73%}.lm3{height:96%}.lm4{height:67%}.lm5{height:43%}
/* Human towers and banners */
.horizon-humans .landmark{background:linear-gradient(90deg,#3f5663,#71828a 50%,#344955);clip-path:polygon(12% 18%,32% 18%,32% 4%,44% 4%,44% 18%,58% 18%,58% 0,70% 0,70% 18%,89% 18%,89% 100%,12% 100%)}.horizon-humans .lm3{background:linear-gradient(90deg,#516976,#9c8e68 50%,#425c6a)}
/* Elf living trees/spires */
.horizon-elves .landmark{background:radial-gradient(ellipse at 50% 22%,#356a43 0 36%,transparent 37%),radial-gradient(ellipse at 28% 48%,#2d5c3b 0 31%,transparent 32%),radial-gradient(ellipse at 72% 50%,#3d7348 0 29%,transparent 30%),linear-gradient(90deg,transparent 43%,#5b4931 44% 58%,transparent 59%);border:0}.horizon-elves .lm3{filter:drop-shadow(0 4px 5px #071b10aa) brightness(1.12)}
/* Orc palisades, spikes and furnaces */
.horizon-orcs .landmark{background:linear-gradient(90deg,#291712,#653223 50%,#23130f);clip-path:polygon(0 28%,18% 28%,26% 0,34% 28%,48% 28%,57% 8%,66% 28%,80% 28%,90% 3%,100% 28%,100% 100%,0 100%)}.horizon-orcs .lm3:after{content:"";position:absolute;left:36%;top:30%;width:28%;height:24%;border-radius:50%;background:#ff6b2788;box-shadow:0 0 12px #ff6b27aa}
/* Dwarf mountain halls */
.horizon-dwarves .landmark{background:linear-gradient(145deg,#343b3d,#707472 48%,#353a3a 50%,#252b2d);clip-path:polygon(50% 0,100% 46%,86% 100%,14% 100%,0 46%)}.horizon-dwarves .lm3:after{content:"";position:absolute;left:34%;bottom:0;width:32%;height:42%;border-radius:50% 50% 0 0;background:#0f1314;border:2px solid #a07f4d66}
/* Undead towers and broken necropolis */
.horizon-undead .landmark{background:linear-gradient(90deg,#201728,#5a4661 52%,#1d1525);clip-path:polygon(10% 25%,28% 25%,35% 8%,43% 25%,60% 25%,68% 0,76% 25%,92% 25%,85% 100%,18% 100%)}.horizon-undead .lm2,.horizon-undead .lm5{transform:rotate(-4deg);opacity:.75}.horizon-undead .lm4{transform:rotate(3deg)}
/* Neutral/five kingdoms uses mixed stone skyline. */
.horizon-neutral .landmark{background:linear-gradient(90deg,#475357,#89765e 52%,#3a474a);clip-path:polygon(8% 20%,32% 20%,32% 5%,46% 5%,46% 20%,63% 20%,70% 0,78% 20%,92% 20%,92% 100%,8% 100%)}
.ambient-particle{position:absolute;display:block;width:5px;height:5px;border-radius:50%;left:var(--x,12%);top:var(--y,72%);opacity:.55;animation:lmParticle 6.5s linear infinite}.p1{--x:10%;--y:68%;animation-delay:-.8s}.p2{--x:24%;--y:79%;animation-delay:-2.4s}.p3{--x:41%;--y:63%;animation-delay:-4.1s}.p4{--x:59%;--y:82%;animation-delay:-1.7s}.p5{--x:76%;--y:66%;animation-delay:-5.2s}.p6{--x:90%;--y:75%;animation-delay:-3.3s}
.atmosphere-humans .ambient-particle{width:9px;height:2px;border-radius:50%;background:#eef7ff88;box-shadow:7px 2px 0 -1px #eef7ff66;animation-name:lmBird}.atmosphere-elves .ambient-particle{background:#d9ff7e;box-shadow:0 0 7px #d9ff7e;animation-name:lmFirefly}.atmosphere-orcs .ambient-particle{background:#ff7b2d;box-shadow:0 0 7px #ff4d1f;animation-name:lmEmber}.atmosphere-dwarves .ambient-particle{background:#ffc56e;box-shadow:0 0 5px #ff9b42;animation-name:lmSpark}.atmosphere-undead .ambient-particle{width:7px;height:12px;background:#b595d7aa;box-shadow:0 0 9px #9a75c9aa;animation-name:lmWisp;border-radius:50% 50% 45% 45%}
.city-time-morning>.city-sky{filter:brightness(1.13) saturate(.9)}.city-time-day>.city-sky{filter:brightness(1.05)}.city-time-evening>.city-sky{filter:sepia(.18) saturate(1.14) brightness(.84)}.city-time-night>.city-sky{filter:brightness(.48) saturate(.78)}.city-time-night .city-horizon{filter:brightness(.62) drop-shadow(0 6px 4px #000a)}
.city-building-card{position:relative;overflow:hidden;transition:transform .16s ease,filter .16s ease,box-shadow .16s ease}.city-building-card:active{transform:scale(.975);filter:brightness(1.15)}.city-building-card:before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(120deg,transparent 0 40%,#fff0 42%,#fff2 49%,#fff0 56%);transform:translateX(-130%);transition:transform .35s ease}.city-building-card:active:before{transform:translateX(130%)}
.city-humans .building-townhall,.city-humans .building-market{box-shadow:inset 0 0 22px #e8c66c12}.city-elves .building-temple,.city-elves .building-university{box-shadow:inset 0 0 22px #a9e88912}.city-orcs .building-barracks,.city-orcs .building-guild{box-shadow:inset 0 0 22px #ff6c3518}.city-dwarves .building-bank,.city-dwarves .building-barracks{box-shadow:inset 0 0 22px #e8b66616}.city-undead .building-temple,.city-undead .building-teleport{box-shadow:inset 0 0 22px #ba8ee01a}
/* Battlefield units now have role-specific idle/ready/action poses without changing hitboxes. */
.battle-cell .battle-unit{--face:1;will-change:transform;animation:lmUnitIdle 2.6s ease-in-out infinite}.battle-cell .battle-unit.side-enemy{--face:-1}.battle-cell .battle-unit.unit-fairy,.battle-cell .battle-unit.unit-spectral,.battle-cell .battle-unit.unit-dragon{animation-name:lmUnitFly;animation-duration:2.2s}.battle-cell .battle-unit.unit-heavy,.battle-cell .battle-unit.unit-bulwark,.battle-cell .battle-unit.unit-ent{animation-name:lmUnitHeavy;animation-duration:3.1s}.battle-cell .battle-unit.unit-archer,.battle-cell .battle-unit.unit-ranged,.battle-cell .battle-unit.unit-necromancer{animation-name:lmUnitRanged;animation-duration:2.8s}.battle-cell .battle-unit.pose-ready{animation:lmUnitReady .82s ease-in-out infinite}.battle-cell .battle-unit.pose-action{animation:lmUnitAction .34s ease-out 1}.battle-cell.enemy .battle-unit{filter:drop-shadow(0 3px 2px #0009) brightness(.93)}
.world-object.bot-dot .pixel-sprite{--world-scale:1.32}.world-object.hero-marker .pixel-sprite{--world-scale:1.15}.world-object .pixel-sprite:not(.city-race-sprite),.hero-marker .pixel-sprite{animation:lmWorldIdle 2.8s ease-in-out infinite}.world-object .unit-fairy,.world-object .unit-spectral,.world-object .unit-dragon{animation-name:lmWorldFloat;animation-duration:2.2s}
.battle-stage{overflow:hidden}.battle-ambient{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden}.battle-ambient i{position:absolute;width:3px;height:3px;border-radius:50%;background:#fff7;left:14%;top:72%;animation:lmBattleDust 5.4s linear infinite}.battle-ambient i:nth-child(2){left:53%;top:82%;animation-delay:-2s}.battle-ambient i:nth-child(3){left:84%;top:67%;animation-delay:-3.6s}.battle-cell{position:relative;z-index:2}
.battle-land-orc-lava .battle-ambient i{background:#ff6a32aa;box-shadow:0 0 5px #ff6a32}.battle-land-undead-wastes .battle-ambient i{background:#b69ad3aa;box-shadow:0 0 5px #b69ad3}.battle-land-dwarf-mountains .battle-ambient i{background:#e2c18c99}.battle-land-elf-forest .battle-ambient i{background:#d5f89daa;box-shadow:0 0 4px #b9ed80}.battle-land-human-plains .battle-ambient i,.battle-land-five-kingdoms .battle-ambient i{background:#e7d6a188}
@keyframes lmUnitIdle{0%,100%{transform:translateY(0) scaleX(var(--face))}50%{transform:translateY(-1.5px) scaleX(var(--face))}}
@keyframes lmUnitFly{0%,100%{transform:translateY(0) scaleX(var(--face)) rotate(-1deg)}50%{transform:translateY(-5px) scaleX(var(--face)) rotate(1deg)}}
@keyframes lmUnitHeavy{0%,100%{transform:translateY(0) scaleX(var(--face)) scaleY(1)}50%{transform:translateY(-.5px) scaleX(var(--face)) scaleY(.985)}}
@keyframes lmUnitRanged{0%,100%{transform:translateY(0) scaleX(var(--face)) rotate(0)}55%{transform:translateY(-1px) scaleX(var(--face)) rotate(-1deg)}}
@keyframes lmUnitReady{0%,100%{transform:translateY(-1px) scaleX(var(--face)) scale(1.03)}50%{transform:translateY(-3px) scaleX(var(--face)) scale(1.07)}}
@keyframes lmUnitAction{0%{transform:translateX(0) scaleX(var(--face))}45%{transform:translateX(calc(var(--face) * 8px)) scaleX(var(--face)) scale(1.08)}100%{transform:translateX(0) scaleX(var(--face))}}
@keyframes lmWorldIdle{0%,100%{transform:translateY(0) scale(var(--world-scale,1))}50%{transform:translateY(-2px) scale(var(--world-scale,1))}}@keyframes lmWorldFloat{0%,100%{transform:translateY(-1px) scale(var(--world-scale,1))}50%{transform:translateY(-5px) scale(var(--world-scale,1))}}
@keyframes lmParticle{0%{transform:translateY(18px) scale(.6);opacity:0}20%{opacity:.55}80%{opacity:.35}100%{transform:translateY(-120px) scale(1.2);opacity:0}}
@keyframes lmBird{0%{transform:translate(-25px,10px);opacity:0}18%{opacity:.45}100%{transform:translate(150px,-48px);opacity:0}}@keyframes lmFirefly{0%,100%{transform:translate(0,0);opacity:.15}30%{transform:translate(12px,-22px);opacity:.8}65%{transform:translate(-8px,-54px);opacity:.3}}@keyframes lmEmber{0%{transform:translateY(25px) scale(.6);opacity:0}20%{opacity:.8}100%{transform:translate(12px,-115px) scale(.25);opacity:0}}@keyframes lmSpark{0%{transform:translateY(12px);opacity:0}20%{opacity:.9}55%{transform:translate(14px,-34px);opacity:.55}100%{transform:translate(24px,-72px);opacity:0}}@keyframes lmWisp{0%{transform:translate(0,10px) scale(.6);opacity:0}30%{opacity:.55}70%{transform:translate(-12px,-62px) scale(1);opacity:.3}100%{transform:translate(8px,-112px) scale(.8);opacity:0}}
@keyframes lmBattleDust{0%{transform:translate(0,18px) scale(.5);opacity:0}20%{opacity:.45}100%{transform:translate(22px,-95px) scale(1.2);opacity:0}}
@media(max-width:420px){.city-horizon{top:14%;height:25%}.landmark{min-width:28px}.city-atmosphere .ambient-particle:nth-child(n+5){display:none}}
@media(prefers-reduced-motion:reduce){.battle-unit,.world-object .pixel-sprite,.hero-marker .pixel-sprite,.ambient-particle,.battle-ambient i{animation:none!important}.city-building-card{transition:none!important}}

/* R26.6.72 runtime placeholder cleanup */
.hero-race-sprite{filter:drop-shadow(0 3px 3px #0008)}
.origin-races{grid-template-columns:1fr!important;gap:8px}.origin-race-card{display:grid!important;grid-template-columns:64px 1fr!important;align-items:center!important;min-height:78px!important;text-align:left!important}.origin-race-card .pixel-sprite{width:58px!important;height:58px!important}.origin-race-card span:last-child{display:flex;flex-direction:column;gap:4px}.origin-race-card small{font-size:9px;line-height:1.25;color:#d9c9a4}.origin-race-card.race-humans{box-shadow:inset 4px 0 #7aa0cb}.origin-race-card.race-elves{box-shadow:inset 4px 0 #75a765}.origin-race-card.race-orcs{box-shadow:inset 4px 0 #a55241}.origin-race-card.race-dwarves{box-shadow:inset 4px 0 #b5814e}.origin-race-card.race-undead{box-shadow:inset 4px 0 #7d6697}
.hero-creation-card{padding-bottom:28px}.hero-name-field{display:grid;gap:6px;margin:12px 0;padding:12px;background:#2b1834;color:#f3dfaa;border:1px solid #8e6b35;border-radius:6px}.hero-name-field span{font-size:10px;font-weight:800}.hero-name-field input{width:100%;box-sizing:border-box;padding:12px;border:1px solid #b78b42;border-radius:5px;background:#f6e8c4;color:#28172b;font-size:14px;font-weight:700;outline:none}.hero-name-field input:focus{box-shadow:0 0 0 2px #d8ae55}.reset-account-btn{margin-top:10px;background:#6c2530!important;color:#ffe6d5!important;border:1px solid #bd6c65!important}
/* Respect the battle grid rows on wide screens instead of overflowing square cells. */
.battle-stage>.battle-cell{aspect-ratio:auto;width:100%;height:100%;min-height:0;min-width:0}

/* Army preparation: exact quantities on desktop and touch. */
.army-quantity{width:7rem;max-width:100%;min-height:44px;padding:8px;color:inherit;background:#20162a;border:1px solid #9e8051;border-radius:6px}.garrison-row{flex-wrap:wrap}.army-slot button{min-height:44px}

.sector-passage{display:block;font-size:34px;line-height:40px;color:#fff2bb;text-shadow:0 2px 3px #112820}.island-passage{border:2px solid #e4d291!important;border-radius:50%;background:#284c43c9!important}

.battle-cell[data-spell-target]{outline:2px dashed #ffcc67;outline-offset:-3px;cursor:crosshair}
