/* Агрохолд — строгая агро-инженерная тема (плоская, без градиентов и свечений) */
:root {
  --bg: #0e1114;
  --bg2: #12161a;
  --panel: #14191d;
  --card: #191f24;
  --line: #2a323a;
  --line2: #384049;
  --text: #d7dee3;
  --muted: #808c95;
  --accent: #6f9550;      /* приглушённая олива — действие/рост */
  --accent2: #c9a257;     /* латунное золото — заголовки/акценты */
  --good: #6f9550;
  --bad: #c25a4c;
  --warn: #c2953e;
  --info: #4f88b0;
  --rg: #202830;
  --rg-hover: #2c3742;
  --rg-sel: #33513a;
  --gold: #c9a257; --gold2: #e2c478; --golddim: #7e6a38;
  --head: "Oswald", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --metal: linear-gradient(180deg,#232c38,#141a22);
  --panelgrad: linear-gradient(180deg,#19212b,#0f151c);
  --brass: linear-gradient(180deg,#5a4a1f,#3a2f12);
  --dim: #14191e;
  --radius: 2px;
  --font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", "DejaVu Sans Mono", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #app { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
button { font-family: inherit; cursor: pointer; }
#app { display: flex; flex-direction: column; position: relative; }
.screen { display: flex; flex-direction: column; height: 100%; }
.screen[hidden] { display: none !important; }
.screen.center { align-items: center; justify-content: center; }
.pad { padding: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.xsmall { font-size: 11.5px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
b, strong { font-weight: 600; }

/* числа — моноширинные и табличные */
.hud-money, .hud-date b, .kpi b, .chan-p b, .pg b,
.hist-table td, .agro-row b, .gauge span, .ni-w { font-variant-numeric: tabular-nums; }

/* ─── загрузочный экран (сплэш студии) ─── */
.splash { text-align: center; padding: 20px; }
.splash-logo { width: min(72vw, 460px); height: auto; display: block; margin: 0 auto; }
.splash-sub {
  font-size: 16px; letter-spacing: 16px; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-top: 4px; padding-left: 16px;
}
.splash-load { margin-top: 30px; color: var(--muted); font-size: 13px; letter-spacing: .3px; }
.load-err { color: var(--bad); text-align: center; line-height: 1.7; }

/* логотип-бренд в шапках вместо текста */
.brand-logo { height: 30px; width: auto; display: block; }
.hud-logo { height: 22px; }

/* ─── шапка ─── */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line2);
  z-index: 30;
  min-height: 52px;
}
.brand { font-weight: 700; font-size: 16px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text); }
.tagline { color: var(--muted); font-size: 12px; flex: 1; letter-spacing: .2px; }
.search-wrap { position: relative; min-width: 300px; }
.search-results {
  position: absolute; top: calc(100% + 5px); right: 0; width: 380px; max-height: 420px;
  overflow: auto; background: var(--panel); border: 1px solid var(--line2);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.55); z-index: 100;
  padding: 4px;
}
.search-results .sr {
  display: flex; justify-content: space-between; gap: 8px; width: 100%;
  padding: 9px 10px; background: none; border: 0; color: var(--text);
  border-radius: var(--radius); text-align: left; font-size: 13.5px;
}
.search-results .sr:hover { background: var(--rg-hover); }
.search-results .sr span { color: var(--muted); font-size: 12px; }
.search-results .sr.muted { display: block; padding: 12px; }

.input {
  width: 100%; padding: 9px 12px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line2); border-radius: var(--radius); font-size: 14px; outline: none;
}
.input:focus { border-color: var(--accent); }

/* ─── кнопки ─── */
.btn {
  background: var(--card); color: var(--text); border: 1px solid var(--line2);
  padding: 8px 14px; border-radius: var(--radius); font-size: 13px;
  letter-spacing: .2px; transition: border-color .12s, background .12s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); background: var(--rg-hover); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: #2c4a2e; border-color: var(--accent); color: #dbe7d4; }
.btn.primary:hover:not(:disabled) { background: #345838; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: 12.5px; }
.btn.tiny { padding: 4px 9px; font-size: 12px; }
.btn.big { width: 100%; padding: 12px; font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; margin-top: 10px; }
.btns { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* ─── стартовый экран ─── */
.start-main { display: flex; flex: 1; min-height: 0; }
.map-wrap {
  flex: 1; position: relative; min-width: 0;
  background: #0b0e11;
}
.rus-map { width: 100%; height: 100%; display: block; cursor: pointer; }
.rus-map g.terrain { pointer-events: none; }

/* ─── Leaflet-карта усадьбы (реальная OSM-карта) ─── */
#leaflet-map { position: absolute; inset: 0; z-index: 1; background: #0b0e11; }
/* тёмная карта из обычных OSM-тайлов: инверсия затрагивает только слой тайлов,
   поля и маркеры (overlay-слой) остаются в своих цветах */
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9) saturate(0.8); }
.leaflet-mode .map-ctl { display: none; }           /* у Leaflet свой зум */
.leaflet-mode .map-modes { left: 14px; right: auto; } /* уводим от атрибуции (справа снизу) */
.leaflet-container { background: #0b0e11 !important; font: inherit; }
.leaflet-container a { color: #86a86a; }
.leaflet-control-attribution {
  background: rgba(11,14,17,.75) !important; color: #6b747c !important;
  font-size: 10px; border: 0;
}
.leaflet-bar, .leaflet-bar a {
  background: #14191d; color: #d7dee3; border-color: #2a323a;
}
.leaflet-bar a:hover { background: #23302a; }
.leaflet-tooltip {
  background: #0d1115; border: 1px solid #2a323a; color: #d7dee3;
  border-radius: 2px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.leaflet-tooltip-right::before { border-right-color: #2a323a; }
.leaflet-tooltip-left::before { border-left-color: #2a323a; }
.leaflet-tooltip.me-tip { color: #b28a3e; font-weight: 600; }
.rus-map path.rg {
  fill: var(--rg); stroke: #3a444e; stroke-width: 0.7;
  transition: fill .1s;
}
.rus-map path.rg:hover { fill: var(--rg-hover); stroke: var(--accent2); }
.rus-map path.rg.sel { fill: var(--rg-sel); stroke: var(--accent); stroke-width: 1.1; }
.rus-map path.rg.dim { fill: var(--dim); stroke: #232b32; }
.rus-map .dot { fill: #8fb085; stroke: #10151a; stroke-width: 0.4; cursor: pointer; opacity: .85; }
.rus-map .dot.mid { fill: #d6b45f; }
.rus-map .dot.big { fill: #c98a5f; }
.rus-map .dot:hover { stroke: #fff; stroke-width: 1; }
.rus-map circle.me { fill: none; stroke: var(--accent2); stroke-width: 2; }
.rus-map .me-label { fill: var(--accent2); font-size: 12px; font-weight: 600;
  paint-order: stroke; stroke: #0e1114; stroke-width: 3px; pointer-events: none; }
.map-tip {
  position: absolute; display: none; pointer-events: none;
  background: #0b0e11; border: 1px solid var(--line2);
  padding: 7px 10px; border-radius: var(--radius); font-size: 13px; z-index: 20;
  box-shadow: 0 6px 16px rgba(0,0,0,.5);
}
.map-tip span { color: var(--muted); font-size: 12px; }
.map-legend {
  position: absolute; left: 14px; bottom: 12px; display: flex; gap: 14px;
  background: rgba(11,14,17,.9); padding: 7px 12px; border-radius: var(--radius);
  color: var(--muted); font-size: 12px; border: 1px solid var(--line);
  pointer-events: none; z-index: 3;
}
.map-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; background: #8fb085; }
.map-legend .dot.mid { width: 10px; height: 10px; background: #d6b45f; }
.map-legend .dot.big { width: 12px; height: 12px; background: #c98a5f; }
.map-tip-box {
  position: absolute; left: 14px; top: 14px; width: 240px;
  background: rgba(11,14,17,.9); border: 1px solid var(--line2);
  padding: 10px 12px; border-radius: var(--radius); pointer-events: none; z-index: 4;
}
.mtb-title { font-weight: 600; margin-bottom: 5px; text-transform: uppercase;
  letter-spacing: .8px; font-size: 12px; color: var(--accent2); }
.lg { display: inline-block; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; }
.lg-avail { border: 1px dashed var(--accent2); background: rgba(178,138,62,.15); }
.lg-field { border: 1px solid var(--accent); background: rgba(111,149,80,.3); }
.lg-ripe { border: 1px solid var(--accent2); background: rgba(178,138,62,.4); }
.lg-dot { border-radius: 50%; background: #8fb085; width: 8px; height: 8px; }

/* паи на карте */
.rus-map polygon.plot { stroke-width: 1.4; cursor: pointer; transition: filter .1s; }
.rus-map polygon.plot.avail { fill: rgba(178,138,62,.12); stroke: var(--accent2); stroke-dasharray: 5 4; }
.rus-map polygon.plot.rented { fill: rgba(111,149,80,.16); stroke: var(--accent); }
.rus-map polygon.plot.field { fill: rgba(111,149,80,.28); stroke: #86a86a; }
.rus-map polygon.plot.field.grow { fill: rgba(105,140,75,.34); }
.rus-map polygon.plot.field.ripe { fill: rgba(178,138,62,.42); stroke: var(--accent2); }
.rus-map polygon.plot.field.dead { fill: rgba(194,90,76,.3); stroke: var(--bad); }
.rus-map polygon.plot:hover { filter: brightness(1.3); stroke-width: 2; stroke-dasharray: none; }

/* переключатель масштаба */
.map-modes { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 0; z-index: 6;
  border: 1px solid var(--line2); }
.mm { background: rgba(11,14,17,.92); border: 0; border-right: 1px solid var(--line2);
  color: var(--muted); padding: 8px 13px; font-size: 12.5px; }
.mm:last-child { border-right: 0; }
.mm:hover { color: var(--text); }
.mm.sel { color: var(--text); background: #23302a; }

/* зум и стрелка севера */
.map-ctl { position: absolute; right: 14px; top: 14px; z-index: 7;
  display: flex; flex-direction: column; gap: 5px; align-items: center; }
.north { display: flex; flex-direction: column; align-items: center; gap: 1px;
  color: var(--muted); font-weight: 700; font-size: 12px; line-height: 1;
  background: rgba(11,14,17,.92); border: 1px solid var(--line2);
  border-radius: var(--radius); padding: 6px 9px 4px; letter-spacing: 1px; }
.north span { font-size: 10.5px; }
.zc { width: 34px; height: 32px; background: rgba(11,14,17,.92); border: 1px solid var(--line2);
  color: var(--text); border-radius: var(--radius); font-size: 16px; line-height: 1; }
.zc:hover { border-color: var(--accent); color: var(--accent); }

/* поповер пая */
.map-pop {
  position: absolute; display: none; width: 250px; z-index: 20;
  background: #0d1115; border: 1px solid var(--line2);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius); padding: 12px 13px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
}
.map-pop.show { display: block; }
.mp-title { display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.mp-x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; }
.mp-x:hover { color: var(--text); }
.mp-row { font-size: 13px; padding: 3px 0; }
.map-pop .btns { margin-top: 8px; }

/* ─── боковая панель ─── */
.side {
  width: 420px; min-width: 360px; background: var(--panel);
  border-left: 1px solid var(--line2); overflow-y: auto; padding: 16px;
}
.side-head h2 { font-size: 18px; margin: 8px 0 6px; font-weight: 600; }
.side-head p { margin-bottom: 6px; line-height: 1.5; }
.side h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin: 16px 0 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--line); }
.hint-box {
  display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line2);
  border-left: 2px solid var(--accent);
  padding: 11px 12px; border-radius: var(--radius); margin: 12px 0;
  line-height: 1.5; font-size: 13px;
}
.hint-ico { font-size: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.chip {
  background: var(--card); border: 1px solid var(--line2); color: var(--muted);
  padding: 3px 8px; border-radius: var(--radius); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .3px;
}
.chip.good { color: var(--good); border-color: #3a5238; }
.chip.warn { color: var(--warn); border-color: #524632; }
.agro-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.agro-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13.5px;
  border-bottom: 1px solid var(--line); }
.agro-row:last-child { border-bottom: 0; }
.agro-row span { color: var(--muted); }
.fdo-list { margin-top: 12px; }
.fd-group { margin-bottom: 14px; }
.fd-title { font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 7px; }
.fd-rgs { display: flex; flex-wrap: wrap; gap: 5px; }
.rg-btn {
  background: var(--card); color: var(--text); border: 1px solid var(--line2);
  padding: 5px 9px; border-radius: var(--radius); font-size: 12.3px;
}
.rg-btn:hover { border-color: var(--accent); background: var(--rg-hover); }
.dist-list { display: flex; flex-direction: column; gap: 5px; }
.dist-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line2); color: var(--text);
  padding: 10px 12px; border-radius: var(--radius); text-align: left;
}
.dist-btn:hover { border-color: var(--accent); }
.dist-name { font-weight: 600; font-size: 13.5px; }
.dist-meta { color: var(--muted); font-size: 12px; }
.np-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px;
  overflow-y: auto; margin: 8px 0; padding-right: 4px; }
.np-btn {
  display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
  background: transparent; border: 1px solid transparent; color: var(--text);
  padding: 7px 10px; border-radius: var(--radius); text-align: left;
  border-bottom: 1px solid var(--line);
}
.np-btn:hover { background: var(--card); }
.np-btn.sel { background: #23302a; border-color: var(--accent); }
.np-name { font-size: 13.5px; }
.np-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.np-meta i { font-style: normal; color: var(--accent2); }
.prof-card { background: var(--card); border: 1px solid var(--line2);
  border-radius: var(--radius); padding: 14px; margin-top: 8px; }
.prof-title h3 { font-size: 18px; color: var(--text); text-transform: none;
  letter-spacing: 0; margin: 0; border: 0; padding: 0; font-weight: 600; }
.prof-title h3 small { color: var(--muted); font-size: 13px; font-weight: 400; }
.prof-sub { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  margin-bottom: 10px; background: var(--line); border: 1px solid var(--line); }
.pg { background: var(--panel); padding: 8px 10px; }
.pg span { display: block; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .4px; }
.pg b { font-size: 14px; }
.prof-crops { display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  font-size: 13px; margin: 8px 0 6px; }
.crop-chip { background: #232b21; border: 1px solid #3a4a32; color: #9db88c;
  padding: 3px 8px; border-radius: var(--radius); font-size: 12px; }
.pack-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.pack {
  display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line2);
  border-radius: var(--radius); padding: 13px; text-align: left; color: var(--text);
  transition: border-color .12s;
}
.pack:hover { border-color: var(--accent); }
.pack-ico { font-size: 22px; color: var(--muted); }
.pack-name { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.pack-desc { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-bottom: 8px; }
.pack-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.continue-box { margin-top: 10px; }

/* ─── HUD ─── */
.hud { gap: 12px; }
.hud-brand { font-weight: 700; color: var(--text); font-size: 14px;
  letter-spacing: 2px; text-transform: uppercase; }
.hud-place b { display: block; font-size: 14px; font-weight: 600; }
.hud-place span { color: var(--muted); font-size: 11.5px; }
.hud-left { display: flex; gap: 14px; align-items: center; min-width: 260px; }
.hud-mid { display: flex; gap: 12px; align-items: center; flex: 1; flex-wrap: wrap; }
.hud-date b { display: block; font-size: 14.5px; font-family: var(--mono); }
.hud-date span { color: var(--muted); font-size: 11.5px; }
.hud-wx { background: var(--card); padding: 7px 12px; border-radius: var(--radius);
  border: 1px solid var(--line2); font-size: 13px; font-family: var(--mono); }
.hud-wx.cold { color: #8fb6d6; }
.hud-wx.hot { color: #d69a72; }
.hud-ev { background: var(--card); border: 1px solid var(--line2);
  border-left: 2px solid var(--warn); color: var(--warn);
  padding: 7px 12px; border-radius: var(--radius); font-size: 12.5px; white-space: nowrap; }
.hud-money { font-weight: 700; font-size: 17px; color: var(--text);
  text-align: right; font-family: var(--mono); }
.hud-money.bad { color: var(--bad); }
.hud-sub { display: block; font-weight: 400; font-size: 11px; color: var(--muted);
  font-family: var(--font); }
.hud-staff { font-size: 13px; text-align: right; }
.hud-right { display: flex; gap: 8px; align-items: center; }
.hud-branches { display: flex; gap: 6px; align-items: center; }
.branch-pick { max-height: 60vh; overflow: auto; }
.branch-pick .bp-list { display: flex; flex-direction: column; gap: 1px; }
.branch-pick .np-btn { border-bottom: 1px solid var(--line); }
.speed { display: flex; border: 1px solid var(--line2); border-radius: var(--radius); overflow: hidden; }
.spd { background: var(--card); border: 0; color: var(--muted); padding: 8px 12px;
  font-size: 13px; border-right: 1px solid var(--line2); }
.spd:last-child { border-right: 0; }
.spd.sel { background: #2c4a2e; color: var(--text); }

/* ─── игровой экран ─── */
.game-main { display: flex; flex: 1; min-height: 0; }
.game-map-wrap { min-width: 300px; }
.panel { width: 520px; min-width: 420px; display: flex; flex-direction: column; padding: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 0; padding: 0 12px;
  border-bottom: 1px solid var(--line2); background: var(--bg2); }
.tab { background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 11px 12px; border-radius: 0; font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px; }
.tab:hover { color: var(--text); }
.tab.sel { color: var(--text); border-bottom-color: var(--accent); }
.panel-body { flex: 1; overflow-y: auto; padding: 14px 14px 30px; background: var(--panel); }
.panel-body h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--muted); margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin-bottom: 8px; background: var(--line); border: 1px solid var(--line); }
.kpi { background: var(--card); padding: 9px 11px; }
.kpi span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px;
  text-transform: uppercase; letter-spacing: .4px; }
.kpi b { font-size: 15px; font-family: var(--mono); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 13px; margin-bottom: 7px; line-height: 1.45; }
.card.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card.land { border-style: dashed; border-color: var(--line2); }
.field-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.badge { font-size: 10.5px; padding: 2px 7px; border-radius: var(--radius); background: var(--panel);
  color: var(--muted); border: 1px solid var(--line2); text-transform: uppercase; letter-spacing: .4px; }
.badge.growing { color: #9db88c; border-color: #3a4a32; }
.badge.ripe { color: var(--accent2); border-color: #524632; }
.badge.dead { color: var(--bad); border-color: #522e2a; }
.badge.empty { color: var(--muted); }
.crop-name { color: var(--accent2); font-weight: 600; font-size: 13px; }
.bar { height: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 0;
  overflow: hidden; margin: 5px 0; }
.bar i { display: block; height: 100%; background: var(--info); }
.bar i.grow { background: var(--accent); }
.bar i.ripe { background: var(--accent2); }
.field-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 7px; }
.sel-crop { width: auto; min-width: 210px; padding: 5px 8px; font-size: 12.5px; }
.mkt { padding: 10px 12px; }
.mkt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mkt-head .spark { color: var(--accent2); }
.chans { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); }
.chan { background: var(--panel); border: 0; border-top: 2px solid var(--line2);
  border-radius: 0; padding: 8px 9px; display: flex; flex-direction: column; gap: 3px; }
.chan.exp { border-top-color: var(--accent2); }
.chan-t { font-size: 11.5px; color: var(--muted); min-height: 28px; }
.chan-p b { font-size: 14.5px; font-family: var(--mono); }
.chan .btn { align-self: stretch; margin-top: 3px; text-align: center; }
.hist-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hist-table th, .hist-table td { padding: 5px 6px; text-align: left;
  border-bottom: 1px solid var(--line); }
.hist-table td { font-family: var(--mono); }
.hist-table th { color: var(--muted); font-weight: 500; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .5px; }
.row-toggle { display: flex; gap: 8px; align-items: center; padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 8px 0; cursor: pointer; }
.hero-card { background: var(--card);
  border: 1px solid var(--line2); border-left: 2px solid var(--accent);
  border-radius: var(--radius); padding: 15px; margin-bottom: 10px; }
.hero-stage { font-size: 16px; font-weight: 600; margin-bottom: 10px; color: var(--text);
  text-transform: uppercase; letter-spacing: .5px; }
.gauge { position: relative; height: 18px; background: var(--bg);
  border: 1px solid var(--line2); border-radius: 0; overflow: hidden; margin-bottom: 8px; }
.gauge i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.gauge span { position: absolute; right: 8px; top: 1px; font-size: 12px; font-weight: 700;
  font-family: var(--mono); }
.cat-row { display: flex; justify-content: space-between; padding: 5px 0;
  border-bottom: 1px solid var(--line); font-size: 13px; }
.cat-row:last-child { border-bottom: 0; }
.cat-row b { font-family: var(--mono); }
.toast {
  position: fixed; bottom: 130px; left: 50%; transform: translate(-50%, 12px);
  background: var(--panel); border: 1px solid var(--line2); color: var(--text);
  padding: 11px 18px; border-radius: var(--radius); opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s; z-index: 500; max-width: 70%; font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.55);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-left: 2px solid var(--good); }
.toast.err { border-left: 2px solid var(--bad); color: #e0a89f; }

/* ─── лента ─── */
.newsbar {
  display: flex; height: 116px; border-top: 1px solid var(--line2);
  background: var(--bg2); z-index: 20;
}
.news-title {
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 8px 4px; font-size: 10.5px; letter-spacing: 3px; color: var(--muted);
  border-right: 1px solid var(--line); text-align: center;
}
.news-list { flex: 1; overflow-y: auto; padding: 6px 12px; }
.news-it { display: flex; gap: 9px; align-items: baseline; padding: 3px 0;
  font-size: 12.8px; border-bottom: 1px solid var(--line); }
.ni-ico { font-size: 11px; }
.ni-w { color: var(--muted); font-size: 11px; min-width: 54px; font-family: var(--mono); }
.ni-t.good, .news-it.good .ni-t { color: #9db88c; }
.news-it.bad .ni-t { color: #d9958b; }
.news-it.warn .ni-t { color: #d9b57e; }
.news-it.sale .ni-t { color: #d9c07e; }

/* скроллбары */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c343c; border: 2px solid var(--bg2); }
::-webkit-scrollbar-thumb:hover { background: #384049; }
::-webkit-scrollbar-track { background: transparent; }

/* адаптив */
@media (max-width: 1100px) {
  .side { width: 360px; min-width: 320px; }
  .panel { width: 460px; min-width: 380px; }
  .tagline { display: none; }
}


/* ══════════════ ТЕМА «ШТАБ» (в духе стратегий Paradox; оригинальная отрисовка) ══════════════ */
body { background: #0a0d11; }
.btn, .tab, .spd, .mm, .kpi span, .badge, .chip, .news-title, .mtb-title, .hud-place b, .hero-stage,
.panel-body h3, .side h3, .ctr .lab, .pack-name, .dist-name, .crop-name { font-family: var(--head); }

/* верхняя лента */
.topbar {
  background: var(--metal); border-bottom: 2px solid #000; position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -3px 0 rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.6);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--golddim), var(--gold), var(--golddim), transparent); opacity: .7; }
.hud { padding: 0 0 0 0; gap: 0; align-items: stretch; min-height: 62px; }
.hud-left { gap: 0; min-width: 0; align-items: stretch; }
.brand-plate { display: flex; align-items: center; padding: 0 18px; border-right: 1px solid #000;
  box-shadow: 1px 0 0 rgba(255,255,255,.05); background: linear-gradient(180deg,#1d2733,#11161d); }
.hud-place { display: flex; flex-direction: column; justify-content: center; padding: 0 16px;
  border-right: 1px solid #000; box-shadow: 1px 0 0 rgba(255,255,255,.04); }
.hud-place b { font-size: 15px; letter-spacing: .5px; font-weight: 600; }
.hud-place span { font-size: 11px; }
.hud-branches { padding: 0 12px; border-right: 1px solid #000; box-shadow: 1px 0 0 rgba(255,255,255,.04); }
.hud-mid { gap: 0; align-items: stretch; flex-wrap: nowrap; overflow: hidden; }
.ctr { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0 14px; flex: 0 0 auto;
  border-right: 1px solid #000; box-shadow: 1px 0 0 rgba(255,255,255,.04); white-space: nowrap; }
.ctr .lab { font-size: 9.5px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.ctr .val { font: 600 16px var(--head); letter-spacing: .3px; color: var(--gold2); text-shadow: 0 1px 0 #000; }
.ctr .val.sm { font-size: 13px; color: var(--text); }
.ctr .sub { font-size: 10px; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.ctr.cold .val { color: #9fc3e0; } .ctr.hot .val { color: #e0a271; } .ctr.neg .val { color: var(--bad); }
.ctr.event { background: linear-gradient(180deg,#2a2213,#1a1409); border-left: 2px solid var(--warn); }
.ctr.event .val { font-size: 12px; color: var(--warn); }
.hud-right { padding: 0 14px; gap: 10px; border-left: 1px solid #000; box-shadow: -1px 0 0 rgba(255,255,255,.04); }
.speed { border: 1px solid #000; border-radius: 3px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.spd { background: var(--metal); border-right: 1px solid #000; color: var(--muted);
  font: 600 13px var(--head); padding: 7px 12px; box-shadow: inset 1px 0 0 rgba(255,255,255,.04); }
.spd:hover { color: var(--text); }
.spd.sel { background: var(--brass); color: var(--gold2); text-shadow: 0 1px 0 #000; }
.icobtn { width: 34px; height: 32px; background: var(--metal); border: 1px solid #000; border-radius: 3px;
  color: var(--text); font-size: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.icobtn:hover { border-color: var(--golddim); color: var(--gold2); }
/* стартовый экран (та же шапка) */
.topbar:not(.hud) { padding: 10px 16px; }

/* кнопки */
.btn { background: var(--metal); border: 1px solid #000; border-radius: 2px; font-weight: 600; font-size: 12px;
  letter-spacing: .6px; text-transform: uppercase; text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -2px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.4); }
.btn:hover:not(:disabled) { border-color: var(--golddim); color: var(--gold2); background: var(--metal); }
.btn.primary { background: var(--brass); color: var(--gold2); border-color: #000; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg,#6a571f,#443612); }
.btn.ghost { background: var(--metal); }
.btn.tiny { padding: 5px 10px; font-size: 11px; }
.input { background: #0c1116; border-color: var(--line2); }
.input:focus { border-color: var(--gold); }

/* карта: рамка с угловыми скобками */
.game-map-wrap::before, .game-map-wrap::after { content: ""; position: absolute; width: 16px; height: 16px;
  pointer-events: none; z-index: 8; }
.game-map-wrap::before { top: 6px; left: 6px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.game-map-wrap::after { bottom: 6px; right: 6px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }
.map-tip-box { background: var(--panelgrad); border: 1px solid var(--line2); top: 22px; left: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 6px 18px rgba(0,0,0,.55); }
.mtb-title { color: var(--gold2); letter-spacing: 1.5px; border-bottom: 1px solid var(--line);
  padding-bottom: 6px; margin-bottom: 7px; text-shadow: 0 1px 0 #000; }
.map-modes { border: 1px solid #000; box-shadow: 0 3px 10px rgba(0,0,0,.5); }
.mm { background: var(--metal); border-right: 1px solid #000; font-weight: 600; letter-spacing: .5px; }
.mm.sel { background: var(--brass); color: var(--gold2); }
.north, .zc { background: var(--metal); border: 1px solid #000; }
.zc:hover { border-color: var(--golddim); color: var(--gold2); }
.map-pop { background: var(--panelgrad); border: 1px solid var(--line2); border-top: 2px solid var(--gold); }
.leaflet-bar, .leaflet-bar a { background: #171f28 !important; color: var(--text) !important; border-color: #000 !important; }
.leaflet-bar a:hover { background: #2a2213 !important; color: var(--gold2) !important; }
.leaflet-tooltip { background: #0d1115; border-color: var(--golddim); }
.leaflet-tooltip.me-tip { color: var(--gold2); }

/* правая панель */
.panel, .side { background: var(--panelgrad); border-left: 2px solid #000; box-shadow: inset 2px 0 0 rgba(255,255,255,.04); }
.tabs { background: linear-gradient(180deg,#10151c,#0b0f14); border-bottom: 2px solid #000; box-shadow: 0 2px 0 rgba(201,162,87,.15); padding: 0 8px; }
.tab { font-weight: 600; font-size: 11.5px; letter-spacing: 1px; padding: 11px 11px 9px; border-bottom-width: 3px; }
.tab.sel { color: var(--gold2); border-bottom-color: var(--gold); text-shadow: 0 0 8px rgba(201,162,87,.4), 0 1px 0 #000; }
.panel-body { background: transparent; }
.panel-body h3, .side h3 { color: var(--gold2); letter-spacing: 2px; font-weight: 600; font-size: 12px;
  text-shadow: 0 1px 0 #000; display: flex; align-items: center; gap: 7px; }
.panel-body h3::before, .side h3::before { content: ""; width: 0; height: 0; flex: none;
  border: 5px solid transparent; border-left-color: var(--gold); margin-top: 1px; }
.kpis { background: #000; border-color: #000; gap: 8px; background: none; border: 0; }
.kpi { background: var(--metal); border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 -2px 4px rgba(0,0,0,.3); }
.kpi b { font-family: var(--head); font-size: 18px; color: var(--gold2); text-shadow: 0 1px 0 #000; }
.card, .agro-card, .prof-card, .pack, .dist-btn, .hint-box, .mkt, .row-toggle {
  background: linear-gradient(180deg,#1a222c,#141b23); border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 2px 5px rgba(0,0,0,.4); }
.card.land { border-style: dashed; }
.pack:hover, .dist-btn:hover, .rg-btn:hover { border-color: var(--golddim); }
.hint-box { border-left: 3px solid var(--gold); }
.badge { border-radius: 2px; font-weight: 600; letter-spacing: .8px; padding: 3px 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.badge.growing { background: linear-gradient(180deg,#1e2a18,#15200f); color: #a7c47f; border-color: #3f552e; }
.badge.ripe { background: linear-gradient(180deg,#2a2213,#1a1409); color: var(--gold2); border-color: var(--golddim); }
.crop-name { color: var(--gold2); letter-spacing: .4px; }
.bar { height: 9px; background: #0a0d11; border-color: #000; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.bar i { background: linear-gradient(180deg,#6f9bb8,#46718e); }
.bar i.grow { background: linear-gradient(180deg,#7fa050,#5c7a38); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.bar i.ripe { background: linear-gradient(180deg,#d8b45a,#a07f2e); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.chans { background: #000; border-color: #000; box-shadow: 0 2px 5px rgba(0,0,0,.4); }
.chan { background: linear-gradient(180deg,#1a222c,#141b23); border-top: 3px solid var(--line2); }
.chan.exp { border-top-color: var(--gold); }
.chan-p b { font-family: var(--head); color: var(--gold2); text-shadow: 0 1px 0 #000; }
.hero-card { background: linear-gradient(180deg,#1b232d,#12181f); border: 1px solid var(--line2); border-left: 3px solid var(--gold);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 3px 8px rgba(0,0,0,.5); }
.hero-stage { color: var(--gold2); letter-spacing: 1px; text-shadow: 0 1px 0 #000; }
.gauge { height: 20px; background: #0a0d11; border-color: #000; box-shadow: inset 0 1px 3px rgba(0,0,0,.7); }
.gauge i { background: linear-gradient(180deg,#b0593a 0%,#d8b45a 55%,#8fac5e 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.gauge span { color: #fff; text-shadow: 0 1px 2px #000; font-family: var(--head); font-size: 13px; }
.chip { background: var(--metal); font-weight: 600; letter-spacing: .6px; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.chip.good { color: #a7c47f; border-color: #3f552e; }
.chip.warn { color: var(--warn); border-color: #5a4a2a; }
.kpis + .card, .cat-row b { color: inherit; }

/* лента событий */
.newsbar { border-top: 2px solid #000; background: linear-gradient(180deg,#10151c,#0b0f14);
  box-shadow: inset 0 2px 0 rgba(201,162,87,.12); }
.news-title { color: var(--gold); letter-spacing: 4px; font-weight: 600; font-size: 11px; background: #0c1016; }
.ni-w { color: var(--golddim); }
.news-it.good .ni-t { color: #a7c47f; } .news-it.sale .ni-t { color: var(--gold2); }

/* уведомления и скроллбары */
.toast { background: var(--panelgrad); border: 1px solid var(--golddim); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#3a4756,#28323e); border: 2px solid #0b0f14; }
::-webkit-scrollbar-track { background: #0b0f14; }

@media (max-width: 1300px) { .ctr { padding: 0 10px; min-width: 60px; } .ctr .sub { max-width: 110px; } }

/* ─── метки выбранных пунктов на карте (вместо россыпи точек) ─── */
.rus-map g.picks { pointer-events: none; }
.pick .pk-ring { fill: rgba(11,14,17,.55); stroke: var(--gold2); }
.pick .pk-dot { fill: var(--gold2); }
.pick .pk-label { fill: var(--gold2); font-family: var(--head); font-weight: 600; letter-spacing: .4px;
  paint-order: stroke; stroke: #0a0d11; stroke-linejoin: round; }
.pick.prev .pk-ring { fill: none; stroke: #cfd8de; }
.pick.prev .pk-dot { fill: #cfd8de; }
.pick.prev .pk-label { fill: #cfd8de; }
.pick.me .pk-ring { stroke: var(--gold2); }
.pick.branch .pk-ring { stroke: #8fac5e; } .pick.branch .pk-dot { fill: #8fac5e; } .pick.branch .pk-label { fill: #a7c47f; }
.map-legend { display: none; }
.has-pick .map-legend { display: flex; }
.lg-pick { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -2px;
  border: 2px solid var(--gold2); background: rgba(11,14,17,.5); }
.lg-pick.prev { border: 2px dashed #cfd8de; }

/* ─── выравнивание и защита от наложений ─── */
.hud-left, .hud-right { flex: 0 0 auto; }
.hud-mid { flex: 1 1 0; min-width: 0; }
.hud-place { max-width: 250px; }
.hud-place b, .hud-place span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ctr .lab, .ctr .val, .ctr .sub { display: block; overflow: hidden; text-overflow: ellipsis; }
.ctr.event { max-width: 190px; }
.ctr.event .val { white-space: nowrap; }
/* чипы вне .chips — не слипаются и не рвутся посреди слова */
.chip { display: inline-block; white-space: nowrap; margin: 0 4px 5px 0; line-height: 1.3; }
.chips .chip { margin: 0; }
.map-tip-box { line-height: 1.7; }
.map-tip-box .lg { margin-right: 6px; }
@media (max-width: 1500px) {
  .hud-place span { display: none; }
  .hud-place { max-width: 150px; }
  .brand-plate { padding: 0 12px; }
  .ctr { padding: 0 11px; }
  .ctr .sub { max-width: 96px; }
  .hud-right { padding: 0 10px; gap: 6px; }
  .hud-branches { padding: 0 8px; }
}
@media (max-width: 1320px) {
  .ctr.event .lab, .ctr .sub { display: none; }
  .ctr { padding: 0 10px; }
  .hud-logo { height: 18px; }
}
#game-map-wrap:not(.leaflet-mode) .map-tip-box { display: none; } /* легенда паёв — только в режиме усадьбы */

/* ─── техника: миниатюры и лизинг ─── */
.tech-card { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; }
.tech-thumb { width: 76px; height: 76px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 85%, #26313d 0%, #10151b 75%); border: 1px solid var(--line); }
.tech-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.55)); }
.tech-thumb .tt-none { color: var(--line2); font-size: 22px; }
.tech-info { min-width: 0; }
.tech-info .bar { margin: 6px 0 4px; max-width: 280px; }
.tech-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.tech-act .btn { white-space: nowrap; }
.tech-lease { grid-column: 1 / -1; }
.tech-lease .bar { max-width: none; margin: 2px 0 6px; }
.tech-act .chip { align-self: flex-start; margin: 0; }
.nw { white-space: nowrap; }
.tech-note { margin: 10px 2px 0; line-height: 1.5; }

/* v13: классы техники, группы, строки агрегатов */
.tech-grp { margin: 14px 0 6px; font-family: var(--head, inherit); letter-spacing: .06em; text-transform: uppercase; color: var(--gold, #c9a257); font-size: 13px; }
.tech-grp .muted { text-transform: none; letter-spacing: 0; font-family: inherit; margin-left: 6px; }
.chip.cls { display: inline-block; white-space: nowrap; margin-left: 4px; font-size: 11px; }
.rig { display: block; }
.tech-thumb .tt-ico { color: var(--golddim, #8a6f3a); opacity: .9; }

/* v14: галерея достижений и всплывашка */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.ach-tile { text-align: center; min-width: 0; }
.ach-pic { width: 84px; height: 84px; margin: 0 auto 4px; display: flex; align-items: center; justify-content: center;
  color: var(--golddim, #8a6f3a); border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 85%, #26313d 0%, #10151b 75%); }
.ach-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ach-tile:not(.got) .ach-pic { opacity: .38; filter: grayscale(1); }
.ach-tile:not(.got) .ach-name { color: var(--muted, #8b95a1); }
.ach-tile.got .ach-pic { border-color: var(--golddim, #8a6f3a); box-shadow: 0 0 10px rgba(201,162,87,.25); }
.ach-name { font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; }
.ach-pop { position: fixed; top: 76px; left: 50%; transform: translate(-50%, -12px); z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 10px; background: var(--panelgrad, #131a22); border: 1px solid var(--gold, #c9a257); box-shadow: 0 8px 28px rgba(0,0,0,.6);
  opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none; }
.ach-pop.show { opacity: 1; transform: translate(-50%, 0); }
.ach-pop img { width: 72px; height: 72px; object-fit: contain; }
.ach-pop .ap-k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold, #c9a257); }
.ach-pop .ap-t { font-size: 15px; font-weight: 600; }

/* объявление от администрации */
.announce { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 9999;
  max-width: min(560px, calc(100vw - 24px)); display: flex; gap: 12px; align-items: flex-start;
  background: var(--panelgrad); border: 1px solid var(--golddim); border-left: 3px solid var(--gold);
  padding: 10px 12px 10px 14px; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.announce .an-k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.announce .an-t { font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.announce .an-x { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 2px; }
.announce .an-x:hover { color: var(--text); }

/* ───────── вход, регистрация, аккаунт ───────── */
#screen-auth { align-items: center; justify-content: center; }
.auth-card { width: min(400px, calc(100vw - 28px)); background: var(--panelgrad); border: 1px solid var(--golddim);
  padding: 24px 26px 22px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.auth-logo { height: 54px; object-fit: contain; align-self: center; }
.auth-card .splash-sub { text-align: center; margin-top: -6px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line2); margin-top: 4px; }
.auth-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  padding: 9px 0; font: 500 13px var(--head); letter-spacing: .12em; text-transform: uppercase; }
.auth-tabs button.on { color: var(--gold); border-bottom-color: var(--gold); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field .input { width: 100%; }
.auth-err { min-height: 18px; color: #e0a89f; font-size: 13px; }
.auth-note { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.auth-h { font: 500 14px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.linklike { background: none; border: 0; color: var(--muted); font-size: 12.5px; text-decoration: underline; padding: 2px; align-self: center; }
.linklike:hover { color: var(--text); }
.rec-code { font: 600 22px var(--mono); letter-spacing: .08em; text-align: center; padding: 14px 8px; background: #0f1317;
  border: 1px dashed var(--golddim); color: var(--gold); user-select: all; overflow-wrap: anywhere; }
.rc-check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }

.acct-chip { position: relative; margin-left: 12px; }
.acct-btn { display: flex; align-items: baseline; gap: 6px; background: #1b222a; border: 1px solid var(--line2); color: var(--text);
  padding: 6px 12px; font-size: 13px; }
.acct-btn:hover { background: #243039; }
.acct-k { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.acct-n { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; min-width: 190px; background: var(--panel);
  border: 1px solid var(--line2); box-shadow: 0 8px 20px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.acct-menu[hidden] { display: none; }
.acct-menu button { background: none; border: 0; color: var(--text); text-align: left; padding: 10px 14px; font-size: 13px; }
.acct-menu button:hover { background: #202830; }
.acct-menu button:last-child { border-top: 1px solid var(--line); }

.resume-box { position: absolute; left: 14px; top: 14px; z-index: 6; width: min(360px, calc(100% - 28px));
  background: rgba(20,25,29,.96); border: 1px solid var(--golddim); border-left: 3px solid var(--gold); }
.resume-box[hidden] { display: none; }
.rs-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; }
.rs-row + .rs-row { border-top: 1px solid var(--line); }
.rs-k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.rs-t { font-size: 14px; font-weight: 600; margin-top: 1px; }
.rs-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rs-row.trash .rs-k { color: var(--muted); }

.modal-back { position: fixed; inset: 0; background: rgba(5,8,10,.72); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 14px; }
.modal { width: min(420px, 100%); background: var(--panelgrad); border: 1px solid var(--golddim); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.modal h3 { font: 500 15px var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.modal-text { font-size: 13.5px; line-height: 1.5; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.btn.danger { border-color: #6d3a33; color: #e0a89f; }
.btn.danger:hover { background: #3a2421; }

/* иконки культур */
.crop-ico { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; margin-right: 6px; border-radius: 4px; flex: none; }
.crop-ico.lg { width: 44px; height: 44px; margin-right: 0; border-radius: 6px; }
.card.row .grow1 { flex: 1; min-width: 0; }
.mkt-head .crop-ico.lg { margin-right: 4px; }

/* v19: подготовка почвы, рыхление, вымочки */
.field-acts .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; width: 100%; }
.field-acts .rip-row, .field-acts .sow-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; margin-top: 6px; }

/* v19: фото зданий */
.bld-thumb { flex: 0 0 auto; width: 92px; height: 92px; border: 1px solid var(--line, #2c3440); border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #1a1f26; color: var(--golddim, #8a6f3a); }
.bld-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.bld { gap: 12px; align-items: center; }
.card.bld .bar { margin-top: 6px; }
@media (max-width: 700px) { .bld-thumb { width: 72px; height: 72px; } }
.crop-ico.proc { display: inline-flex; align-items: center; justify-content: center; color: var(--gold, #d4a93a); background: #1a1f26; border: 1px solid var(--line, #2c3440); padding: 3px; box-sizing: border-box; }
.crop-ico.proc svg { width: 100%; height: 100%; }

/* v22: окна событий (в духе HoI4, строго) */
.ev-back { position: fixed; inset: 0; z-index: 11000; display: flex; align-items: center; justify-content: center; padding: 14px;
  background: radial-gradient(ellipse at center, rgba(8,11,14,.72), rgba(3,5,7,.9)); opacity: 0; transition: opacity .16s ease; }
.ev-back.show { opacity: 1; }
.ev { width: min(640px, 100%); max-height: 100%; overflow: auto; background: var(--panelgrad); border: 1px solid var(--golddim);
  box-shadow: 0 0 0 3px #0b0e11, 0 0 0 4px var(--line2), 0 18px 60px rgba(0,0,0,.7); transform: translateY(10px); transition: transform .16s ease; }
.ev-back.show .ev { transform: none; }
.ev-pic { position: relative; aspect-ratio: 16 / 9; background: #0b0e11; border-bottom: 1px solid var(--golddim); overflow: hidden; }
.ev-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-pic::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), inset 0 -40px 50px -30px rgba(10,13,16,.75); pointer-events: none; }
.ev-date { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 3px 9px; font: 500 12px var(--head); letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold2); background: rgba(10,13,16,.78); border: 1px solid var(--golddim); }
.ev-body { padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.ev-title { margin: 0; text-align: center; font: 500 22px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.ev-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); text-align: justify; }
.ev-eff { list-style: none; margin: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 5px; background: #10151a; border: 1px solid var(--line); }
.ev-eff li { font-size: 13px; line-height: 1.4; padding-left: 16px; position: relative; color: var(--muted); }
.ev-eff li::before { content: ""; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; background: var(--muted); }
.ev-eff li.bad { color: #e0a89f; } .ev-eff li.bad::before { background: var(--bad); }
.ev-eff li.good { color: #b9d3a3; } .ev-eff li.good::before { background: var(--good); }
.ev-eff li.warn { color: #e2c78d; } .ev-eff li.warn::before { background: var(--warn); }
.ev-eff li.info::before { background: var(--info); }
.ev-btn { align-self: center; min-width: 220px; padding: 9px 22px; cursor: pointer; font: 500 14px var(--head); letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold2); background: var(--brass); border: 1px solid var(--golddim); }
.ev-btn:hover, .ev-btn:focus-visible { background: linear-gradient(180deg,#6b5a27,#46391a); outline: none; }
.ev-more { text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
@media (max-width: 700px) { .ev-body { padding: 12px 14px 16px; } .ev-title { font-size: 18px; } .ev-text { font-size: 13px; } }
