/* Preparation screens: scoped styling, no combat or world layout changes. */
.city-panel,.city-layer,.army-panel,.hero-panel{--prep-gold:#d8b56f;--prep-line:#a9894b66;--prep-muted:#c4b99e;--prep-ink:#f5ead1}
.army-panel,.hero-panel,.city-layer{background:radial-gradient(ellipse at 80% 0,#3a3044 0,transparent 55%),#181720;color:var(--prep-ink);padding:18px}
.army-panel .muted,.hero-panel .muted,.city-layer .muted{color:var(--prep-muted);line-height:1.6}
.army-panel h2,.hero-panel h2,.city-layer h3{color:var(--prep-ink)}
.army-panel .section-head{margin:-18px -18px 18px;padding:20px;background:linear-gradient(110deg,#30253a,#171821);border-bottom:1px solid var(--prep-line)}
.army-panel .section-head h2{font-size:23px;font-family:Georgia,serif}.army-panel .section-head>b{font-size:12px;padding:7px 11px;border:1px solid var(--prep-line);border-radius:20px;background:#d8b56f0c}
.army-panel .status,.city-layer .status,.hero-panel .status{background:#ffffff06;border:1px solid var(--prep-line);color:#d8cbb0;padding:14px;border-radius:10px;font-size:12px;line-height:1.6}
.army-panel .status.warn{background:#713c252e;border-color:#ce875c}
.army-panel .army-grid{grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:14px;margin:18px 0;align-items:stretch}
.army-panel .army-slot{min-height:240px;display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:16px 12px;border:1px solid var(--prep-line);border-radius:12px;background:radial-gradient(ellipse at 50% 20%,#65775544,transparent 60%),linear-gradient(155deg,#302e31,#201e26);box-shadow:inset 0 1px #fff1,0 7px 18px #0003}
.army-panel .army-slot .pixel-sprite{width:84px;height:84px;margin:2px auto 5px;filter:drop-shadow(0 8px 5px #0007)}
.army-panel .army-slot b{font-size:14px;line-height:1.4;color:#f5ead1}.army-panel .army-slot>span:not(.pixel-sprite){font-size:14px;color:var(--prep-gold);font-variant-numeric:tabular-nums}
.army-panel button,.city-layer button,.hero-panel .inventory-card button,.hero-panel .set-actions button{min-height:44px;padding:10px 13px;border:1px solid #b8995c88;border-radius:7px;color:#f8e9c5;background:linear-gradient(#514432,#382f28);font:600 12px/1.3 Verdana,sans-serif;cursor:pointer}
.army-panel .army-slot [data-split]{margin-top:auto}.army-panel .army-slot [data-remove]{background:transparent;border-color:#ba777842;color:#d4a6a2;font-size:11px}
.army-panel button:disabled,.city-layer button:disabled{opacity:.45;cursor:default}
.army-panel button:focus-visible,.city-layer button:focus-visible,.hero-panel button:focus-visible,.city-building-card:focus-visible{outline:2px solid #f4d68a;outline-offset:3px}
@media(hover:hover){.army-panel button:not(:disabled):hover,.city-layer button:not(:disabled):hover,.hero-panel button:hover{filter:brightness(1.13)}}
/* City service cards sit in front of the existing racial skyline. */
.city-panel.city-r41{padding:20px;background:radial-gradient(ellipse at 50% 10%,#3e5545,transparent 60%),linear-gradient(#1d302b,#171e22);color:#f3e8d0;border:1px solid #a78b5055;border-radius:12px}
.city-panel .city-horizon{opacity:.3}.city-panel .city-plaza{opacity:.15}
.city-panel.city-humans{background:radial-gradient(ellipse at 50% 10%,#425769,transparent 60%),#1b242d}.city-panel.city-orcs{background:radial-gradient(ellipse at 50% 10%,#684237,transparent 60%),#281d20}.city-panel.city-dwarves{background:radial-gradient(ellipse at 50% 10%,#555853,transparent 60%),#242428}.city-panel.city-undead{background:radial-gradient(ellipse at 50% 10%,#4f3c5e,transparent 60%),#211b2b}
.city-panel .city-hero{padding:20px 10px 26px;gap:18px;min-height:150px;text-shadow:0 2px 4px #000b}
.city-panel .city-hero h2{font:700 30px/1.15 Georgia,serif;color:#fff1c9;margin:7px 0}.city-panel .city-hero small{font-size:10px;letter-spacing:2px;color:#dfc587}.city-panel .city-hero .muted{font-size:11px;line-height:1.6;color:#e2dac8}
.city-panel .city-emblem{display:grid;place-items:center;width:96px;height:96px;flex-shrink:0;border:1px solid #d8b56f55;border-radius:50%;background:radial-gradient(#84966b44,#111c2288);box-shadow:0 8px 25px #0004}.city-panel .city-emblem .city-race-sprite{width:84px;height:84px}
.city-panel .city-hub-summary{position:relative;z-index:5;display:flex;flex-wrap:wrap;gap:8px;padding:12px;background:#101c20d9;border:1px solid #b8a36b44;border-radius:10px;color:#dccca7;font-size:11px}.city-panel .city-hub-summary span{flex:1;min-width:105px;padding:5px}.city-panel .city-hub-summary b{color:#ffdf94}
.city-panel .city-services-title{position:relative;z-index:5;color:#f2dfb3;font:700 17px Georgia,serif;margin:24px 0 13px}
.city-panel.city-r41 .city-scene{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:0;background:none;border:0}
.city-panel .city-building-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:172px;padding:18px 12px;background:linear-gradient(155deg,#344139ee,#1c2929f5);border:1px solid #a28b535e;border-radius:10px;box-shadow:inset 0 1px #ffffff0e,0 6px 14px #0003;text-align:center;color:#f5e7c5}
.city-panel .city-building-icon{width:64px;height:64px;flex-shrink:0;background-size:contain}.city-panel .city-building-card b{font-size:13px;line-height:1.4;color:#f8e7bd}.city-panel .city-building-card small{display:block;font-size:10px;line-height:1.5;margin-top:5px;color:#c1c4b1}
.city-panel .portal-exit{grid-column:1/-1;flex-direction:row;min-height:85px;text-align:left;background:linear-gradient(110deg,#3c3549,#252837)}
.city-panel .city-future{position:relative;z-index:5;margin-top:18px;color:#b8bca8;border-color:#b8a36b33;background:#15201c77}.city-panel .city-future summary{padding:12px;font-size:11px}
.city-layer .layer-head,.hero-panel .layer-head{background:#25202e;color:#f4e3bd;border-bottom:1px solid var(--prep-line);padding:12px;gap:12px}.city-layer .layer-head h3{font:700 20px Georgia,serif}
.city-layer .economy-strip{background:#ffffff06;border:1px solid var(--prep-line);border-radius:8px;padding:12px;color:#dfd1b1;gap:12px;flex-wrap:wrap}
.city-layer .market-section-title{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-top:24px;padding:10px 0;border-bottom:1px solid var(--prep-line);color:#f1ddb0;font-size:17px;font-family:Georgia,serif}.city-layer .market-section-title small{font:10px/1.5 Verdana,sans-serif;color:var(--prep-muted)}
.city-layer .inventory-list,.city-layer .shop-list,.hero-panel .inventory-list{gap:10px;padding:12px 0}
.city-layer .inventory-card,.city-layer .shop-item,.hero-panel .inventory-card{padding:14px;gap:14px;border:1px solid var(--prep-line);border-radius:10px;background:linear-gradient(120deg,#302c36,#24222c);color:var(--prep-ink);box-shadow:inset 0 1px #fff08;grid-template-columns:64px minmax(0,1fr) auto}
.city-layer .item-icon,.hero-panel .inventory-card .item-icon{width:60px;height:60px;background-color:#0b0e1366;border:1px solid #d8b56f33;border-radius:9px;padding:4px;background-size:85%;}
.city-layer .inventory-card-main b,.city-layer .shop-item b,.hero-panel .inventory-card-main b{font-size:14px;line-height:1.4}.city-layer .inventory-card-main small,.city-layer .shop-item small,.hero-panel .inventory-card-main small{display:block;font-size:11px;line-height:1.6;color:#bdb4a4;margin-top:5px}
.city-layer .inventory-card-main strong,.hero-panel .inventory-card-main strong{color:#b6d696;font-size:10px;margin-top:4px}.city-layer .shop-item strong{color:#f3cf82;font-size:12px;white-space:nowrap}
.city-layer .inventory-card.is-equipped,.hero-panel .inventory-card.is-equipped,.city-layer .shop-item.equipped{border-color:#9cab6f;box-shadow:inset 3px 0 #9cab6f;background:linear-gradient(120deg,#303a30,#242a2a)}
.city-layer .inventory-card-actions{gap:6px}.city-layer [data-sell]{color:#d3b2a5;background:#271f25}.city-layer [data-vault]{background:#252c36;color:#c4cfdf}
.hero-panel .hero-banner{border:1px solid var(--prep-line);border-radius:12px;padding:18px;background:linear-gradient(110deg,#3c3046,#25222e);color:#efdab0}
.hero-panel .hero-vertical-layout{padding:18px 0;gap:20px}.hero-panel .equipment-slot{border-radius:10px;min-height:86px;padding:12px;background:linear-gradient(120deg,#302936,#24202a);border-color:var(--prep-line)}
.hero-panel .equipment-slot small{font-size:10px}.hero-panel .equipment-slot em{font-size:11px;line-height:1.5}.hero-panel .equipment-slot.filled{border-color:#bf9e5c88;background:linear-gradient(120deg,#473849,#2a2530)}
.hero-panel .hero-grid div,.hero-panel .effective-stats span{background:#ffffff06;border:1px solid #b89b5b3d;border-radius:7px;padding:12px;color:#c9bea8;font-size:12px}.hero-panel .effective-stats b,.hero-panel .hero-grid b{color:#ffe0a0}
.hero-panel .hero-sheet{background:#1e1b26;color:#f1e5cd}.hero-panel .set-actions{gap:8px}.hero-panel .set-actions button{font-size:11px}
.city-layer .garrison-row{gap:12px;background:#ffffff05;border:1px solid var(--prep-line);border-radius:8px;padding:12px;margin:8px 0}.city-layer .army-quantity{color:#f4e4c4}
@media(min-width:760px){.hero-panel .hero-vertical-layout{display:grid;grid-template-columns:1.1fr 1fr;align-items:start}.city-layer .shop-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.city-layer .shop-item{grid-template-columns:56px minmax(0,1fr)}.city-layer .shop-item strong{grid-column:2}.army-panel .army-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:540px){.city-panel.city-r41,.army-panel,.hero-panel,.city-layer{padding:12px}.city-panel.city-r41 .city-scene{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.city-panel .city-building-card{min-height:154px;padding:14px 9px}.city-panel .city-hero{padding:12px 0 20px;gap:12px}.city-panel .city-hero h2{font-size:25px}.city-panel .city-emblem{width:74px;height:74px}.city-panel .city-emblem .city-race-sprite{width:64px;height:64px}.army-panel .section-head{margin:-12px -12px 14px}.army-panel .army-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.army-panel .army-slot{padding:14px 9px}.city-layer .inventory-card,.hero-panel .inventory-card{grid-template-columns:52px minmax(0,1fr);gap:10px;padding:12px}.city-layer .inventory-card-actions{grid-column:1/-1;flex-direction:row;flex-wrap:wrap}.city-layer .inventory-card-actions button{flex:1;min-width:68px}.city-layer .shop-item{grid-template-columns:52px minmax(0,1fr);padding:12px}.city-layer .shop-item strong{grid-column:2}.city-layer .item-icon,.hero-panel .inventory-card .item-icon{width:50px;height:50px}.city-layer .market-section-title{flex-direction:column;gap:4px}.city-layer .garrison-row .army-quantity{width:5rem}}
@media(prefers-reduced-motion:reduce){.city-panel .city-building-card{transition:none}}
