/* CIVARION V207 "Field Command" interface.
   Replaces the 11 legacy UI stylesheets on the Base page. Terrain/scene rules
   live unchanged in fieldcommand-scene.css. Every rule is scoped to
   body.civ-field so the legacy UI is untouched when the mode is off. */

@font-face{font-family:"Stardos Stencil";src:url(/fonts/stardos-stencil-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Stardos Stencil";src:url(/fonts/stardos-stencil-latin-700-normal.woff2) format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:"Barlow Semi Condensed";src:url(/fonts/barlow-semi-condensed-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Barlow Semi Condensed";src:url(/fonts/barlow-semi-condensed-latin-500-normal.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Barlow Semi Condensed";src:url(/fonts/barlow-semi-condensed-latin-600-normal.woff2) format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"Barlow Semi Condensed";src:url(/fonts/barlow-semi-condensed-latin-700-normal.woff2) format("woff2");font-weight:700;font-display:swap}

body.civ-field{
 --fc-gunmetal:#1d2124; --fc-gunmetal-2:#262b2c; --fc-steel:#343a38;
 --fc-olive:#3d4428; --fc-olive-hi:#5b6538; --fc-olive-line:#6c7647;
 --fc-khaki:#d6caa0; --fc-khaki-dim:#a69d7c; --fc-sand:#ece3c3;
 --fc-amber:#e3a72f; --fc-amber-deep:#b9801a; --fc-red:#b5452e; --fc-green:#7fa35a;
 --fc-ink:#121614;
 --fc-stencil:"Stardos Stencil",Impact,"Arial Narrow",sans-serif;
 --fc-text:"Barlow Semi Condensed","Arial Narrow",Arial,sans-serif;
 --fc-top:58px;
 --fc-rivet:radial-gradient(circle at 50% 50%,#8d8f7b 0 1.4px,#2b2f27 1.6px 2.2px,transparent 2.4px);
 --fc-rivet-size:8px 8px;
 --fc-plate:linear-gradient(180deg,#2a2f2b 0%,#1f2422 60%,#1a1e1c 100%);
 --fc-olive-plate:linear-gradient(180deg,#4a5231 0%,#3d4428 55%,#343a22 100%);
 margin:0;height:100%;overflow:hidden;background:var(--fc-ink);
 color:var(--fc-khaki);font:500 15px/1.4 var(--fc-text);
 font-variant-numeric:tabular-nums;-webkit-font-smoothing:antialiased;
}
html:has(body.civ-field){height:100%}
body.civ-field *{box-sizing:border-box}
body.civ-field .hidden{display:none!important}
body.civ-field button,body.civ-field input,body.civ-field select{font:inherit;color:inherit}
body.civ-field button{cursor:pointer}
body.civ-field button:disabled{cursor:not-allowed}
body.civ-field :focus-visible{outline:2px solid var(--fc-amber);outline-offset:2px}
body.civ-field a{color:var(--fc-amber)}
body.civ-field .civ-sigil{display:none!important} /* crest noise from legacy decorator */

/* ---------- shared atoms ---------- */
body.civ-field .civ-tactic-icon,body.civ-field .civ-command-icon{display:inline-flex;width:1.15em;height:1.15em;flex:0 0 auto;vertical-align:-.18em}
body.civ-field .civ-tactic-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.civ-field .civ-art-icon{display:block;width:100%;height:100%;object-fit:contain}
body.civ-field .fc-btn,
body.civ-field .panel-actions button,body.civ-field .drawer button,body.civ-field .modal-window button,
body.civ-field #placement button,body.civ-field #civAudioPanel button{
 display:inline-flex;align-items:center;justify-content:center;gap:.45em;min-height:38px;padding:7px 14px;
 border:1px solid #57604a;border-radius:3px;background:var(--fc-plate);color:var(--fc-khaki);
 font:600 13px/1.1 var(--fc-text);letter-spacing:.06em;text-transform:uppercase;text-align:center;
 box-shadow:inset 0 1px 0 #ffffff12,0 1px 0 #0008}
body.civ-field .panel-actions button:hover:not(:disabled),body.civ-field .drawer button:hover:not(:disabled),
body.civ-field .modal-window button:hover:not(:disabled),body.civ-field #placement button:hover,
body.civ-field #civAudioPanel button:hover{border-color:var(--fc-olive-line);background:#30362f}
body.civ-field .panel-actions button.primary,body.civ-field .modal-window .primary,
body.civ-field .drawer .primary{background:linear-gradient(180deg,#e9b440,#c88c1d);border-color:#f2c862;color:#1a1408}
body.civ-field .panel-actions button.primary:hover:not(:disabled),body.civ-field .modal-window .primary:hover{background:linear-gradient(180deg,#f2c052,#d39624)}
body.civ-field .danger,body.civ-field button.danger{border-color:#8d3b29!important;color:#f0b3a3!important;background:#2a1814!important}
body.civ-field button:disabled{opacity:.45;filter:saturate(.4)}
body.civ-field input,body.civ-field select{width:100%;min-height:38px;padding:7px 10px;border:1px solid #4e5644;border-radius:3px;background:#121614;color:var(--fc-sand)}
body.civ-field input::placeholder{color:#7d7862}
body.civ-field label{display:grid;gap:5px;font:600 12px/1.2 var(--fc-text);letter-spacing:.08em;color:var(--fc-khaki-dim);text-transform:uppercase}
body.civ-field h2,body.civ-field h3,body.civ-field h4{margin:0;font-family:var(--fc-stencil);font-weight:700;letter-spacing:.04em;color:var(--fc-sand);text-transform:uppercase}
body.civ-field .eyebrow{display:block;font:600 11px/1.2 var(--fc-text);letter-spacing:.14em;color:var(--fc-amber);text-transform:uppercase}

/* ---------- frame ---------- */
body.civ-field #baseApp{position:relative;height:100%}
body.civ-field .game{position:absolute;inset:0;overflow:hidden;isolation:isolate;background:#20262a}
body.civ-field .vignette{position:absolute;inset:0;z-index:1;pointer-events:none;
 background:radial-gradient(ellipse at 50% 52%,transparent 52%,#0c0f0d99 100%),linear-gradient(180deg,#0d100ecc 0,transparent 120px)}

/* ---------- top bar: stamped steel strip ---------- */
body.civ-field #top{position:absolute;z-index:30;top:0;left:0;right:0;height:var(--fc-top);display:flex;align-items:center;gap:22px;padding:0 18px;
 background:var(--fc-rivet) 6px 6px/var(--fc-rivet-size) no-repeat,var(--fc-rivet) calc(100% - 6px) 6px/var(--fc-rivet-size) no-repeat,
  var(--fc-rivet) 6px calc(100% - 6px)/var(--fc-rivet-size) no-repeat,var(--fc-rivet) calc(100% - 6px) calc(100% - 6px)/var(--fc-rivet-size) no-repeat,var(--fc-plate);
 border-bottom:2px solid #0b0d0c;box-shadow:0 1px 0 #ffffff10 inset,0 6px 18px #0007}
body.civ-field #top::after{content:"";position:absolute;left:0;right:0;bottom:-6px;height:4px;pointer-events:none;
 background:repeating-linear-gradient(-45deg,var(--fc-amber) 0 10px,#1a1a12 10px 20px);opacity:.85}
body.civ-field .identity{display:flex;align-items:center;gap:10px;min-width:0}
body.civ-field .identity-mark{width:36px;height:36px;display:grid;place-items:center;overflow:hidden;border:1px solid #5a6342;border-radius:3px;background:#272c22}
body.civ-field .identity-mark img{width:30px;height:30px;object-fit:contain;filter:sepia(.6) saturate(.7) hue-rotate(20deg)}
body.civ-field .identity strong{display:block;font:700 22px/1 var(--fc-stencil);letter-spacing:.12em;color:var(--fc-sand)}
body.civ-field .identity small{display:block;margin-top:3px;font:600 10px/1 var(--fc-text);letter-spacing:.16em;color:var(--fc-khaki-dim)}
body.civ-field #player{display:grid;gap:2px;padding-left:20px;border-left:1px solid #3a4033;min-width:0}
body.civ-field #player span{font:600 10px/1 var(--fc-text);letter-spacing:.16em;color:var(--fc-khaki-dim)}
body.civ-field #player strong{font:700 15px/1.1 var(--fc-text);letter-spacing:.06em;color:var(--fc-sand);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.civ-field .stats{display:flex;gap:6px;margin-left:auto}
body.civ-field .stat{display:flex;align-items:center;gap:9px;min-width:118px;height:40px;padding:0 12px 0 8px;border:1px solid #444b3b;border-radius:3px;background:#141816;box-shadow:inset 0 2px 6px #000a}
body.civ-field .stat .symbol{width:22px;height:22px;display:grid;place-items:center;border-radius:2px;font-size:13px;color:#111;background:var(--fc-amber)}
body.civ-field .stat .symbol.steel{background:#a9b2ad}
body.civ-field .stat .symbol.fuel{background:#c46b3b}
body.civ-field .stat small{display:block;font:600 9.5px/1 var(--fc-text);letter-spacing:.16em;color:var(--fc-khaki-dim)}
body.civ-field .stat b{display:block;margin-top:2px;font:700 18px/1 var(--fc-text);color:var(--fc-sand)}
body.civ-field #account{min-height:38px;padding:0 14px;border:1px solid #6b5420;border-radius:3px;background:linear-gradient(180deg,#e9b440,#c88c1d);color:#1a1408;font:700 13px/1 var(--fc-text);letter-spacing:.08em}

/* ---------- status strip (re-instated, compact) ---------- */
body.civ-field .hud-title,body.civ-field .corner-meta{display:none!important;opacity:0!important}
body.civ-field .base-status{position:absolute;z-index:12;top:calc(var(--fc-top) + 14px);left:14px;display:flex;flex-wrap:wrap;gap:1px;max-width:calc(100% - 420px);
 border:1px solid #3c4234;border-radius:3px;background:#3c4234;overflow:hidden;box-shadow:0 4px 14px #0008}
body.civ-field .base-status>span{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;background:#151917e6;font:600 12px/1 var(--fc-text);letter-spacing:.06em;color:var(--fc-khaki-dim)}
body.civ-field .base-status b{color:var(--fc-sand);font-weight:700}
body.civ-field .base-status .live{width:7px;height:7px;border-radius:50%;background:var(--fc-green);box-shadow:0 0 0 2px #7fa35a33}

/* ---------- field tools (top right) ---------- */
body.civ-field .camera-tools{position:absolute;z-index:14;top:calc(var(--fc-top) + 14px);right:14px;display:flex;gap:4px;align-items:flex-start}
body.civ-field .camera-tools>button,body.civ-field #civAudioTools>button{
 display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:1px solid #3e4537;border-radius:3px;background:#151917e6;
 color:var(--fc-khaki);font:600 11.5px/1 var(--fc-text);letter-spacing:.08em;text-transform:uppercase;box-shadow:0 4px 12px #0007}
body.civ-field .camera-tools>button:hover,body.civ-field #civAudioTools>button:hover{border-color:var(--fc-olive-line);color:var(--fc-sand)}
body.civ-field #civAudioTools{position:relative}
body.civ-field #civAudioPanel{position:absolute;right:0;top:38px;width:300px;display:grid;gap:9px;padding:14px;border:1px solid #4a5240;border-radius:3px;background:var(--fc-plate);box-shadow:0 14px 30px #000b}
body.civ-field #civAudioPanel strong{font:700 15px/1 var(--fc-stencil);letter-spacing:.06em;color:var(--fc-sand)}
body.civ-field #civAudioPanel small{color:var(--fc-khaki-dim);font-size:12.5px}
body.civ-field #civAudioPanel label{grid-template-columns:70px 1fr;align-items:center}
body.civ-field #civAudioPanel input[type=range]{min-height:0;padding:0;border:0;background:none;accent-color:var(--fc-amber)}

/* ---------- command dock: riveted equipment rail (the signature element) ---------- */
body.civ-field .dock{position:absolute;z-index:20;left:50%;bottom:12px;transform:translateX(-50%);
 width:min(980px,calc(100vw - 24px));display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:3px;padding:7px 18px 8px;
 border:1px solid #0b0d0c;border-radius:4px;
 background:var(--fc-rivet) 5px 5px/var(--fc-rivet-size) no-repeat,var(--fc-rivet) calc(100% - 5px) 5px/var(--fc-rivet-size) no-repeat,
  var(--fc-rivet) 5px calc(100% - 5px)/var(--fc-rivet-size) no-repeat,var(--fc-rivet) calc(100% - 5px) calc(100% - 5px)/var(--fc-rivet-size) no-repeat,var(--fc-olive-plate);
 box-shadow:inset 0 1px 0 #ffffff1c,inset 0 -2px 0 #0006,0 12px 28px #000c}
body.civ-field .dock-power{display:none}
body.civ-field .dock-item{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;height:62px;padding:6px 2px 8px;
 border:1px solid #2a2f1b;border-radius:3px;background:linear-gradient(180deg,#30361f,#262b19);color:var(--fc-khaki);
 box-shadow:inset 0 1px 0 #ffffff12,inset 0 -1px 0 #0007}
body.civ-field .dock-item:hover{background:linear-gradient(180deg,#3a4126,#2d331d);color:var(--fc-sand)}
body.civ-field .dock-item .dock-icon{width:24px;height:24px;display:grid;place-items:center;color:inherit}
body.civ-field .dock-item .dock-icon svg{width:22px;height:22px}
body.civ-field .dock-item b{font:700 12.5px/1 var(--fc-stencil);letter-spacing:.1em}
body.civ-field .dock-item .dock-key{position:absolute;top:3px;left:4px;font:600 9px/1 var(--fc-text);color:#8d8a6c;letter-spacing:0}
body.civ-field .dock-item .dock-led,body.civ-field .dock-item .dock-readout,body.civ-field .dock-item .dock-meter{display:none}
body.civ-field .dock-item.active{background:linear-gradient(180deg,#232716,#1b1f12);color:var(--fc-amber);border-color:#7b6224}
body.civ-field .dock-item.active::after{content:"";position:absolute;left:18%;right:18%;bottom:3px;height:3px;border-radius:1px;background:var(--fc-amber);box-shadow:0 0 8px #e3a72f99}
body.civ-field .dock-badge:empty{display:none}
body.civ-field .dock-badge{position:absolute;top:4px;right:6px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--fc-red);color:#fff;font:700 10px/16px var(--fc-text)}

/* ---------- panels: shared field-case look ---------- */
body.civ-field .fc-case,body.civ-field #shop,body.civ-field #inspector,body.civ-field .drawer-inner,body.civ-field .modal-window{
 border:1px solid #0b0d0c;border-radius:4px;background:var(--fc-plate);color:var(--fc-khaki);
 box-shadow:inset 0 1px 0 #ffffff14,0 0 0 1px #4a5240,0 18px 40px #000c}
body.civ-field #closeShop,body.civ-field #closeInspector,body.civ-field .drawer-head>button,body.civ-field .modal-close{
 width:34px;height:34px;min-height:34px!important;padding:0!important;display:grid;place-items:center;flex:0 0 auto;font-size:20px!important;line-height:1;
 border:1px solid #4a5240;border-radius:3px;background:#151917;color:var(--fc-khaki)}

/* Build: bottom tray above the dock, base stays visible */
body.civ-field #shop{position:absolute;z-index:22;left:50%;transform:translateX(-50%);bottom:96px;width:min(1180px,calc(100vw - 24px));
 max-height:min(470px,calc(100% - var(--fc-top) - 120px));display:flex;flex-direction:column;overflow:hidden}
body.civ-field .shop-head{display:flex;align-items:center;gap:14px;padding:12px 14px 10px;border-bottom:1px solid #353b31}
body.civ-field .shop-hammer{display:none}
body.civ-field .shop-heading{flex:1;min-width:0}
body.civ-field .shop-heading .eyebrow,body.civ-field .shop-text,body.civ-field .shop-head-secondary,body.civ-field .shop-results-hint{display:none}
body.civ-field #shopTitle{font-size:22px}
body.civ-field .shop-filters{display:flex;gap:4px;padding:10px 14px 0;overflow-x:auto}
body.civ-field .shop-filters button{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 13px;border:1px solid #3e4537;border-radius:3px;background:#151917;color:var(--fc-khaki-dim);font:600 12px/1 var(--fc-text);letter-spacing:.08em;text-transform:uppercase}
body.civ-field .shop-filters button.selected{background:var(--fc-olive);border-color:var(--fc-olive-line);color:var(--fc-sand)}
body.civ-field .shop-results{padding:8px 14px 0;font:600 11.5px/1 var(--fc-text);letter-spacing:.1em;color:var(--fc-khaki-dim);text-transform:uppercase}
body.civ-field .shop-grid{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(210px,224px);gap:8px;padding:10px 14px 14px;overflow-x:auto;overflow-y:hidden;scrollbar-color:#5b6538 #151917}
body.civ-field .shop-card{position:relative;display:grid;grid-template-rows:auto 92px auto 1fr auto auto auto;gap:6px;padding:9px;border:1px solid #3c4234;border-radius:3px;background:#181c1a}
body.civ-field .shop-card.locked{opacity:.62}
body.civ-field .shop-card-top{display:flex;justify-content:space-between;align-items:center}
body.civ-field .shop-category{font:600 10.5px/1 var(--fc-text);letter-spacing:.1em;color:var(--fc-khaki-dim);text-transform:uppercase}
body.civ-field .shop-card-info{width:18px;height:18px;display:grid;place-items:center;border:1px solid #4a5240;border-radius:50%;font:700 11px/1 var(--fc-text);color:var(--fc-khaki-dim);cursor:help}
body.civ-field .shop-card-art{display:grid;place-items:center;height:92px;border-radius:2px;background:radial-gradient(ellipse at 50% 70%,#3a4128 0,#1c201a 70%);overflow:hidden;font-size:36px;color:var(--fc-khaki-dim)}
body.civ-field .shop-card-art img{width:100%;height:100%;object-fit:contain;transform:scale(1.35)}
body.civ-field .shop-card h3{font-size:16px}
body.civ-field .shop-card p{margin:0;font-size:13px;line-height:1.3;color:var(--fc-khaki-dim)}
body.civ-field .shop-price-row{display:flex;flex-wrap:wrap;gap:4px 10px}
body.civ-field .shop-price{display:inline-flex;align-items:baseline;gap:3px;font-size:13px;color:var(--fc-sand)}
body.civ-field .shop-price small{font-size:11px;color:var(--fc-khaki-dim)}
body.civ-field .shop-card-stats{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12px;color:var(--fc-khaki-dim)}
body.civ-field .shop-card-stats b{color:var(--fc-khaki)}
body.civ-field .shop-build-action{min-height:34px;border:1px solid #f2c862;border-radius:3px;background:linear-gradient(180deg,#e9b440,#c88c1d);color:#1a1408;font:700 12.5px/1 var(--fc-text);letter-spacing:.1em;text-transform:uppercase}
body.civ-field .shop-build-action:disabled{background:#232722;border-color:#3c4234;color:var(--fc-khaki-dim)}

/* Selected structure: compact side card */
body.civ-field #inspector{position:absolute;z-index:21;top:calc(var(--fc-top) + 58px);right:14px;width:344px;max-height:calc(100% - var(--fc-top) - 170px);overflow:auto;padding:0 0 12px}
body.civ-field #inspector .panel-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;background:#1b1f1d;border-bottom:1px solid #353b31}
body.civ-field #selectionType{font:600 11px/1.2 var(--fc-text);letter-spacing:.12em;color:var(--fc-amber);text-transform:uppercase}
body.civ-field .panel-portrait{width:96px;height:96px;margin:12px 12px 0;display:grid;place-items:center;border:1px solid #3c4234;border-radius:3px;background:radial-gradient(ellipse at 50% 70%,#3a4128 0,#1c201a 72%);font-size:40px;color:var(--fc-khaki-dim);float:left}
body.civ-field #structureName{padding:14px 12px 0;font-size:20px;line-height:1.1}
body.civ-field #structureInfo{margin:6px 12px 0;font-size:13.5px;line-height:1.35;color:var(--fc-khaki-dim);min-height:52px}
body.civ-field #structureStats{clear:both;display:grid;gap:1px;margin:12px 12px 0;border:1px solid #2e332a;border-radius:3px;background:#2e332a;overflow:hidden}
body.civ-field #structureStats .detail{display:flex;justify-content:space-between;gap:10px;padding:6px 9px;background:#161a18;font-size:13px}
body.civ-field #structureStats .detail span{color:var(--fc-khaki-dim);letter-spacing:.04em}
body.civ-field #structureStats .detail b{color:var(--fc-sand);text-align:right}
body.civ-field .panel-actions{display:grid;gap:6px;margin:12px 12px 0}

/* Army / Research / Clan: right-hand field case, base visible on the left */
body.civ-field .drawer{position:fixed;z-index:40;top:calc(var(--fc-top) + 8px);right:10px;bottom:92px;width:min(600px,calc(100vw - 20px));background:none;display:block}
body.civ-field .drawer-inner{height:100%;overflow:auto;padding:0 16px 18px;scrollbar-color:#5b6538 #151917}
body.civ-field .drawer-head{position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 -16px 12px;padding:14px 16px 12px;background:#1d2220;border-bottom:1px solid #353b31}
body.civ-field .drawer-head h2{font-size:24px;margin-top:3px}
body.civ-field .drawer-inner>p,body.civ-field #drawerSubtitle,body.civ-field #clanDesc{margin:0 0 12px;color:var(--fc-khaki-dim);font-size:14px}
body.civ-field .drawer h3{margin:18px 0 6px;font-size:16px;color:var(--fc-amber)}
body.civ-field .drawer h4{margin:12px 0 6px;font-size:14px}
body.civ-field .drawer p{color:var(--fc-khaki-dim);font-size:13.5px}
/* army */
body.civ-field .army-overview{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:4px;margin-bottom:6px}
body.civ-field .troop-count{display:flex;align-items:center;gap:7px;padding:6px 8px;border:1px solid #353b31;border-radius:3px;background:#151917;font-size:13px}
body.civ-field .troop-count img{width:26px;height:26px}
body.civ-field .troop-count b{margin-left:auto;font-size:16px;color:var(--fc-sand)}
body.civ-field .civ-army-section{grid-column:1/-1;margin:14px 0 6px;font:700 13px/1.2 var(--fc-stencil);letter-spacing:.08em;color:var(--fc-amber)}
body.civ-field .army-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:6px}
body.civ-field .army-card{display:grid!important;grid-template-rows:64px auto auto auto auto;gap:4px;justify-items:start;text-align:left!important;min-height:0!important;padding:9px!important;text-transform:none!important;letter-spacing:0!important;background:#181c1a!important}
body.civ-field .army-card .big{width:100%;height:64px;display:grid;place-items:center;border-radius:2px;background:radial-gradient(ellipse at 50% 70%,#3a4128 0,#1c201a 72%);font-size:30px}
body.civ-field .army-card .big img{width:auto;height:60px}
body.civ-field .army-card strong{font:700 14px/1.15 var(--fc-stencil);letter-spacing:.04em;color:var(--fc-sand)}
body.civ-field .army-card span,body.civ-field .army-card small{font-size:12.5px;color:var(--fc-khaki-dim)}
body.civ-field .army-card .price{color:var(--fc-amber);font-weight:700}
body.civ-field .civ-parking-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:6px}
body.civ-field .civ-parking-card{display:grid;gap:3px;padding:9px;border:1px solid #353b31;border-radius:3px;background:#151917}
body.civ-field .civ-parking-card strong{font:700 13px/1 var(--fc-stencil);letter-spacing:.06em}
body.civ-field .civ-parking-card b{color:var(--fc-sand)}
body.civ-field .civ-parking-card small{color:var(--fc-khaki-dim);font-size:12px}
body.civ-field .civ-unit-selector,body.civ-field .civ-vehicle-view-toolbar{display:grid;gap:6px;margin-top:8px}
body.civ-field .civ-unit-selector small{color:var(--fc-khaki-dim)}
body.civ-field .training-queue{display:grid;gap:4px;margin-top:10px}
body.civ-field .queued{display:flex;align-items:center;gap:8px;padding:6px 9px;border:1px solid #353b31;border-radius:3px;background:#151917;font-size:13px}
body.civ-field .queued img{width:24px;height:24px}
body.civ-field .queued button{margin-left:auto;min-height:28px!important;padding:3px 9px!important}
/* research */
body.civ-field .r7-overview{display:flex;flex-wrap:wrap;gap:4px}
body.civ-field .r7-overview>*{padding:6px 10px;border:1px solid #353b31;border-radius:3px;background:#151917;font-size:13px}
body.civ-field .r7-progress{padding:8px 10px;border-left:3px solid var(--fc-amber);background:#221e12;color:var(--fc-sand)!important}
body.civ-field .r7-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:6px}
body.civ-field .r7-card{display:grid!important;justify-items:start;gap:3px;text-align:left!important;text-transform:none!important;letter-spacing:0!important;padding:10px!important;background:#181c1a!important}
body.civ-field .r7-card strong{display:flex;align-items:center;gap:6px;font:700 14px/1.15 var(--fc-stencil);letter-spacing:.04em;color:var(--fc-sand)}
body.civ-field .r7-card small{color:var(--fc-khaki-dim);font-size:12.5px}
body.civ-field .r7-card em{font-style:normal;font-weight:700;font-size:12px;letter-spacing:.1em;color:var(--fc-amber)}
body.civ-field .r7-stats{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:14px;padding:10px;border:1px solid #353b31;border-radius:3px;background:#151917;font-size:13px}
body.civ-field .r7-stats b{width:100%;font:700 13px/1 var(--fc-stencil);color:var(--fc-amber)}
body.civ-field .r7-unavailable{padding:12px;border:1px dashed #4a5240;border-radius:3px}
/* clan & war */
body.civ-field .clan-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px}
body.civ-field .clan-box{display:grid;align-content:start;gap:8px;margin-top:8px;padding:12px;border:1px solid #353b31;border-radius:3px;background:#161a18}
body.civ-field .clan-box h3{margin:0}
body.civ-field .clan-box form{display:grid;gap:8px}
body.civ-field .clan-list-item,body.civ-field .clan-member,body.civ-field .clan-reserve,body.civ-field .war-item,body.civ-field .r6b-rank,body.civ-field .r6b-reward,body.civ-field .r6c-dispute{
 display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:7px 9px;border:1px solid #2e332a;border-radius:3px;background:#121614;font-size:13px}
body.civ-field .clan-list-item span,body.civ-field .clan-member span,body.civ-field .clan-reserve span,body.civ-field .war-item small,body.civ-field .r6b-rank span{color:var(--fc-khaki-dim)}
body.civ-field .clan-invite{padding:9px;border:1px dashed var(--fc-amber-deep);border-radius:3px;font:700 18px/1.2 var(--fc-text);letter-spacing:.2em;color:var(--fc-amber)}
body.civ-field .clan-invite small{display:block;font-size:10.5px;letter-spacing:.12em;color:var(--fc-khaki-dim)}
body.civ-field .clan-fields{display:grid;grid-template-columns:1fr 1fr;gap:6px}
body.civ-field .war-overview{display:grid;gap:6px}
body.civ-field .war-item{display:grid}
body.civ-field .war-state{justify-self:start;padding:2px 7px;border-radius:2px;background:var(--fc-olive);font:700 11px/1.4 var(--fc-text);letter-spacing:.1em;color:var(--fc-sand)}
body.civ-field .war-target{display:inline-block;padding:6px 10px;border:1px solid #8d3b29;border-radius:3px;background:#2a1814;color:#f0b3a3;text-decoration:none;font-weight:700}
body.civ-field .war-challenge{display:grid;gap:6px}
body.civ-field .r6-war-map{display:grid;grid-template-columns:1fr 1fr;gap:6px}
body.civ-field .r6-side,body.civ-field .r6-prep{display:grid;gap:3px;padding:8px;border:1px solid #2e332a;border-radius:3px;background:#121614}
body.civ-field .r6-roster-options{display:grid;gap:4px}
body.civ-field .r6-roster-options label{display:flex;align-items:center;gap:6px;text-transform:none}
body.civ-field .r6-roster-options input{width:auto;min-height:0}
body.civ-field .clan-chat-shortcut{font-weight:700}

/* modal dialogs (sign in, help) */
body.civ-field .modal{position:fixed;z-index:60;inset:0;display:grid;place-items:center;padding:16px;background:#080a09c4}
body.civ-field .modal-window{position:relative;width:min(470px,100%);max-height:calc(100% - 32px);overflow:auto;padding:22px}
body.civ-field .modal-close{position:absolute;top:12px;right:12px}
body.civ-field .modal-window h2{margin:6px 0 8px;font-size:26px}
body.civ-field .modal-window p{color:var(--fc-khaki-dim)}
body.civ-field .modal-window .tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:12px 0}
body.civ-field .modal-window .tabs button.selected{background:var(--fc-olive);border-color:var(--fc-olive-line);color:var(--fc-sand)}
body.civ-field .modal-window form{display:grid;gap:10px}
body.civ-field .modal-window small{display:block;margin-top:10px;color:#8d876c}

/* placement bar, move hint, toast, loader */
body.civ-field #placement{position:absolute;z-index:35;left:50%;bottom:96px;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:8px 10px 8px 14px;max-width:calc(100vw - 24px);border:1px solid #7b6224;border-radius:4px;background:#1b1a12f0;box-shadow:0 10px 24px #000b}
body.civ-field #placeName{font:700 15px/1 var(--fc-stencil);letter-spacing:.06em;color:var(--fc-amber);white-space:nowrap}
body.civ-field #placeHint{font-size:13px;color:var(--fc-khaki-dim)}
body.civ-field .civ-unit-move-hint{position:absolute;z-index:26;left:50%;top:calc(var(--fc-top) + 60px);transform:translateX(-50%);max-width:calc(100vw - 24px);padding:9px 16px;border:1px solid #4a5240;border-radius:3px;background:#151917f0;font:600 13px/1.25 var(--fc-text);letter-spacing:.06em;color:var(--fc-sand);text-align:center;box-shadow:0 8px 20px #000a}
body.civ-field .civ-unit-move-hint[data-phase=accepted]{border-color:#5f7d3f;color:#cfe3b0}
body.civ-field .civ-unit-move-hint[data-phase=rejected]{border-color:#8d3b29;color:#f0b3a3}
body.civ-field #notifier{position:absolute;z-index:50;left:50%;top:calc(var(--fc-top) + 14px);transform:translate(-50%,-8px);max-width:min(560px,calc(100vw - 24px));padding:9px 16px;border:1px solid #7b6224;border-left:4px solid var(--fc-amber);border-radius:3px;background:#1b1a12f2;color:var(--fc-sand);font:600 14px/1.3 var(--fc-text);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;box-shadow:0 10px 24px #000b}
body.civ-field #notifier.show{opacity:1;transform:translate(-50%,0)}
body.civ-field .real-model-loading{position:absolute;z-index:15;right:14px;bottom:96px;display:flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid #3e4537;border-radius:3px;background:#151917e6;font-size:11.5px;letter-spacing:.06em}
body.civ-field .real-model-loading strong{display:block;font:700 12px/1.2 var(--fc-text);letter-spacing:.1em;color:var(--fc-sand)}
body.civ-field .real-model-loading small{display:block;color:var(--fc-khaki-dim)}
body.civ-field .real-model-progress{display:block;height:3px;margin-top:5px;background:#2e332a}
body.civ-field .real-model-progress i{display:block;height:100%;background:var(--fc-amber)}
body.civ-field .real-model-loading-indicator{width:14px;height:14px;border:2px solid #3e4537;border-top-color:var(--fc-amber);border-radius:50%;animation:fc-spin 1s linear infinite}
@keyframes fc-spin{to{transform:rotate(360deg)}}

/* ---------- small screens ---------- */
@media (max-width:900px){
 body.civ-field #player,body.civ-field .identity small{display:none}
 body.civ-field .stat{min-width:0;padding:0 8px 0 6px}
 body.civ-field .camera-tools>button span:not(.civ-tactic-icon){display:none}
 body.civ-field .base-status{max-width:calc(100% - 28px);top:calc(var(--fc-top) + 56px)}
}
@media (max-width:720px){
 body.civ-field{--fc-top:52px;font-size:14px}
 body.civ-field #top{gap:8px;padding:0 8px}
 body.civ-field .identity strong{font-size:16px;letter-spacing:.08em}
 body.civ-field .identity-mark{width:30px;height:30px}
 body.civ-field .stats{gap:3px}
 body.civ-field .stat{height:36px;gap:5px}
 body.civ-field .stat .symbol{width:16px;height:16px;font-size:10px}
 body.civ-field .stat small{display:none}
 body.civ-field .stat b{font-size:14px}
 body.civ-field #account{display:none}
 body.civ-field .camera-tools{top:calc(var(--fc-top) + 8px);right:8px;flex-wrap:wrap;justify-content:flex-end;max-width:60%}
 body.civ-field .camera-tools>button,body.civ-field #civAudioTools>button{height:32px;padding:0 8px;font-size:0;gap:0}
 body.civ-field .camera-tools>button .civ-tactic-icon,body.civ-field #civAudioTools>button .civ-tactic-icon{font-size:16px}
 body.civ-field .base-status{top:calc(var(--fc-top) + 8px);left:8px;max-width:38%;flex-direction:column}
 body.civ-field .base-status>span{padding:4px 7px;font-size:11px}
 body.civ-field .base-status>span:nth-child(n+3){display:none}
 body.civ-field .dock{bottom:6px;width:calc(100vw - 12px);padding:5px 8px 6px;gap:2px;grid-template-columns:repeat(5,minmax(0,1fr))}
 body.civ-field .dock-item{height:50px;gap:3px}
 body.civ-field .dock-item b{font-size:9.5px;letter-spacing:.04em}
 body.civ-field .dock-item .dock-key{display:none}
 body.civ-field .dock-item .dock-icon svg{width:18px;height:18px}
 body.civ-field #shop{bottom:122px;max-height:calc(100% - var(--fc-top) - 140px)}
 body.civ-field .shop-grid{grid-auto-columns:minmax(178px,186px)}
 body.civ-field #inspector{top:auto;bottom:122px;left:6px;right:6px;width:auto;max-height:52%}
 body.civ-field .drawer{top:var(--fc-top);left:0;right:0;bottom:0;width:auto}
 body.civ-field .drawer-inner{border-radius:0}
 body.civ-field #placement,body.civ-field .real-model-loading{bottom:122px}
 body.civ-field #placement{flex-wrap:wrap;justify-content:center}
}
@media (prefers-reduced-motion:reduce){
 body.civ-field *{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
