/* hud2.css — v204: игровой экран на ПК. Карта на весь экран, поверх неё — плавающие панели:
   шапка из трёх блоков (хозяйство · показатели с раскрывающимися карточками · время и меню),
   справа столбец иконок вкладок и выезжающая панель, внизу слева — лента одной строкой.
   Всё под html:not(.mob): телефонный интерфейс (mobile.css) не меняется. */

.ctr-ico, .ctr-pop, .sheet-title { display: none; }

html:not(.mob) #screen-game {
  --hud-bg: rgba(22, 25, 29, .9);
  --hud-solid: #1a1d21;
  --hud-line: rgba(255, 255, 255, .08);
  --hud-shadow: 0 10px 30px rgba(0, 0, 0, .42), 0 1px 0 rgba(255, 255, 255, .03) inset;
  --rail: 56px;
  --drawer: 440px;
  --gap: 12px;
  --top: 76px;                                                     /* где начинаются панели под шапкой */
  --side-w: calc(var(--gap) * 3 + var(--rail) + var(--drawer));   /* сколько справа занято панелью */
  position: relative;
}
html:not(.mob) #screen-game.side-closed { --side-w: calc(var(--gap) * 2 + var(--rail)); }
@media (min-width: 1700px) { html:not(.mob) #screen-game { --drawer: 480px; } }
@media (max-width: 1280px) { html:not(.mob) #screen-game { --drawer: 400px; } }

/* общий вид плавающих блоков */
html:not(.mob) #hud .hud-left, html:not(.mob) #hud .hud-mid, html:not(.mob) #hud .hud-right,
html:not(.mob) #tabs, html:not(.mob) .side .sheet-head, html:not(.mob) .side .panel-body,
html:not(.mob) #newsbar, html:not(.mob) .map-modes, html:not(.mob) .map-tip-box {
  background: var(--hud-bg); border: 1px solid var(--hud-line); border-radius: 14px;
  box-shadow: var(--hud-shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* ─────────── шапка ─────────── */
html:not(.mob) #hud.topbar {
  position: absolute; z-index: 30; top: var(--gap); left: var(--gap); right: var(--gap);
  height: 52px; min-height: 0; padding: 0; gap: 10px; display: flex; align-items: stretch;
  background: none; border: 0; box-shadow: none; pointer-events: none;
}
html:not(.mob) #hud.topbar::after { display: none; }
html:not(.mob) #hud > * { pointer-events: auto; }

html:not(.mob) #hud .hud-left { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; gap: 0; padding: 0 16px 0 14px; }
html:not(.mob) #hud .brand-plate { padding: 0 14px 0 0; border: 0; border-right: 1px solid var(--hud-line); background: none; box-shadow: none; height: 26px; }
html:not(.mob) #hud .hud-logo { height: 17px; }
html:not(.mob) #hud .hud-place { padding: 0 0 0 14px; border: 0; box-shadow: none; max-width: 260px; gap: 1px; }
html:not(.mob) #hud .hud-place b { font-size: 15px; line-height: 1.15; }
html:not(.mob) #hud .hud-place span { font-size: 11px; color: #8a949c; }

html:not(.mob) #hud .hud-mid { flex: 0 0 auto; margin: 0 auto; display: flex; align-items: stretch; gap: 0; padding: 0 4px; overflow: visible; }
html:not(.mob) #hud .ctr {
  position: relative; flex-direction: row; align-items: center; gap: 8px; padding: 0 13px; margin: 6px 0;
  border: 0; border-radius: 10px; box-shadow: none; background: none; cursor: default; transition: background .12s;
}
html:not(.mob) #hud .ctr + .ctr::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--hud-line);
}
html:not(.mob) #hud .ctr.open { background: rgba(255, 255, 255, .06); }
html:not(.mob) #hud .ctr.open + .ctr::before, html:not(.mob) #hud .ctr.open::before { opacity: 0; }
html:not(.mob) #hud .ctr .lab, html:not(.mob) #hud .ctr .sub { display: none; }
html:not(.mob) #hud .ctr-ico {
  display: block; width: 18px; height: 18px; flex: none; fill: none; stroke: #7f8a93; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; transition: stroke .12s;
}
html:not(.mob) #hud .ctr.open .ctr-ico { stroke: var(--accent2); }
html:not(.mob) #hud .ctr .val { font: 700 15px/1 var(--head); color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .2px; }
html:not(.mob) #hud .ctr .val.sm { font-size: 15px; color: #fff; }
html:not(.mob) #hud .ctr.cold .val { color: #8fd0ff; }
html:not(.mob) #hud .ctr.hot .val { color: #ffb36b; }
html:not(.mob) #hud .ctr.neg .val { color: var(--bad); }
html:not(.mob) #hud .ctr.rain .ctr-ico { stroke: #6fb6ea; }
html:not(.mob) #hud .ctr.event { background: rgba(242, 167, 59, .12); border: 0; }
html:not(.mob) #hud .ctr.event .ctr-ico { stroke: var(--warn); }
html:not(.mob) #hud .ctr.event .val { color: var(--warn); font-size: 14px; }

/* раскрывающаяся карточка показателя */
html:not(.mob) #hud .ctr-pop {
  display: block; position: absolute; z-index: 40; top: calc(100% + 12px); left: 50%; min-width: 236px;
  padding: 12px 14px 12px; background: var(--hud-solid); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5); white-space: normal; cursor: auto;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%, -6px);
  transition: opacity .14s, transform .14s, visibility 0s linear .14s;
}
html:not(.mob) #hud .ctr-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }   /* мостик: курсор не теряет карточку */
html:not(.mob) #hud .ctr.open .ctr-pop { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); transition-delay: 0s; }
html:not(.mob) #hud .ctr:first-child .ctr-pop { left: 0; transform: translate(0, -6px); }
html:not(.mob) #hud .ctr:first-child.open .ctr-pop { transform: none; }
.cp-lab { font: 600 10px var(--head); letter-spacing: 1.4px; text-transform: uppercase; color: #8a949c; }
.cp-big { font: 700 20px/1.15 var(--head); color: #fff; margin: 3px 0 9px; font-variant-numeric: tabular-nums; }
.cp-row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 13px; }
.cp-row span { color: #98a2ab; }
.cp-row b { color: #eceff1; font-weight: 600; text-align: right; }
.cp-note { margin-top: 8px; font-size: 12px; line-height: 1.4; color: #98a2ab; }
.cp-note.bad { color: #f08c80; }
.cp-bar { display: block; height: 5px; margin: 2px 0 2px; border-radius: 3px; background: #2b3036; overflow: hidden; }
.cp-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.cp-ev { padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .07); color: var(--warn); font-weight: 600; font-size: 13px; }
.cp-ev:first-of-type { border-top: 0; }
.cp-go {
  display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 10px; padding: 8px 10px 8px 12px;
  background: #262b30; border: 1px solid #353c43; border-radius: 9px; color: #eceff1;
  font: 600 12px var(--head); letter-spacing: .8px; text-transform: uppercase; cursor: pointer;
}
.cp-go:hover { border-color: var(--accent); color: #fff; }
.cp-go svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

html:not(.mob) #hud .hud-right { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 0 7px; border-left: 1px solid var(--hud-line); }
html:not(.mob) #hud .speed { background: rgba(0, 0, 0, .35); border-radius: 10px; padding: 3px; margin-right: 4px; overflow: hidden; }
html:not(.mob) #hud .spd { border-radius: 8px; padding: 6px 11px; font-size: 13px; }
html:not(.mob) #hud .icobtn { width: 36px; height: 36px; background: none; border: 0; border-radius: 10px; color: #b9c1c8; display: grid; place-items: center; }
html:not(.mob) #hud .icobtn:hover { background: rgba(255, 255, 255, .07); color: #fff; }

/* ─────────── карта на весь экран ─────────── */
html:not(.mob) #screen-game .game-main { position: relative; flex: 1 1 auto; min-height: 0; }
html:not(.mob) #screen-game .game-map-wrap { flex: 1 1 auto; min-width: 0; }

/* режимы карты — под шапкой слева; легенда — значок, раскрывается при наведении */
html:not(.mob) #screen-game .map-modes,
html:not(.mob) #screen-game .leaflet-mode .map-modes { top: var(--top); left: var(--gap); right: auto; bottom: auto; padding: 4px; gap: 2px; z-index: 8; }
html:not(.mob) #screen-game .mm { border-radius: 10px; padding: 8px 13px; }
html:not(.mob) #screen-game .map-tip-box {
  top: calc(var(--top) + 54px); left: var(--gap); width: auto; max-width: 270px; padding: 8px 12px;
  pointer-events: auto; cursor: default; z-index: 7;
}
html:not(.mob) #screen-game .map-tip-box .mtb-title { margin: 0; border: 0; padding: 0; font-size: 11px; color: #b9c1c8; display: flex; align-items: center; gap: 7px; }
html:not(.mob) #screen-game .map-tip-box .mtb-title::before {
  content: "i"; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid currentColor; font: 700 10px/1 var(--font); text-transform: none;
}
html:not(.mob) #screen-game .map-tip-box > .muted { display: none; margin-top: 8px; line-height: 1.75; }
html:not(.mob) #screen-game .map-tip-box:hover > .muted { display: block; }
html:not(.mob) #screen-game .map-tip-box:hover .mtb-title { color: #fff; }

/* зум и атрибуция — левее правой панели */
html:not(.mob) #screen-game .map-ctl { top: var(--top); right: var(--side-w); }
html:not(.mob) #screen-game .leaflet-top.leaflet-right { top: calc(var(--top) - 10px); right: calc(var(--side-w) - 10px); transition: right .2s; }
html:not(.mob) #screen-game .leaflet-bottom.leaflet-right { right: var(--side-w); bottom: 4px; transition: right .2s; }
html:not(.mob) #screen-game .leaflet-control-attribution { border-radius: 6px; }

/* ─────────── правая колонка: иконки вкладок + выезжающая панель ─────────── */
html:not(.mob) #screen-game .side.panel {
  position: absolute; z-index: 25; top: var(--top); right: var(--gap); bottom: var(--gap);
  width: calc(var(--rail) + var(--gap) + var(--drawer)); min-width: 0; padding: 0; overflow: visible;
  display: block; background: none; border: 0; box-shadow: none; pointer-events: none;
}
html:not(.mob) #tabs {
  position: absolute; top: 0; right: 0; width: var(--rail); padding: 6px; gap: 4px;
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: center; overflow: visible; pointer-events: auto;
}
html:not(.mob) #tabs .tab {
  position: relative; width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: #9aa4ac; text-shadow: none; transition: background .12s, color .12s;
}
html:not(.mob) #tabs .tab .tab-l { display: none; }
html:not(.mob) #tabs .tab-ico { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
html:not(.mob) #tabs .tab:hover { background: rgba(255, 255, 255, .07); color: #fff; }
html:not(.mob) #tabs .tab.sel { background: var(--accent); color: var(--lime-ink); }
html:not(.mob) #screen-game.side-closed #tabs .tab.sel { background: rgba(150, 193, 31, .16); color: var(--accent2); }
/* подпись вкладки выезжает влево при наведении */
html:not(.mob) #tabs .tab::after {
  content: attr(data-label); position: absolute; right: calc(100% + 14px); top: 50%; z-index: 5;
  padding: 7px 11px; border-radius: 8px; background: var(--hud-solid); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45); color: #fff; white-space: nowrap;
  font: 600 12px var(--head); letter-spacing: .8px; text-transform: uppercase;
  opacity: 0; transform: translate(6px, -50%); pointer-events: none; transition: opacity .12s, transform .12s;
}
html:not(.mob) #tabs .tab:hover::after { opacity: 1; transform: translate(0, -50%); }
html:not(.mob) #screen-game:not(.side-closed) #tabs .tab.sel::after { display: none; }   /* название открытой вкладки и так в заголовке панели */
html:not(.mob) #tabs .tab-n {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; margin: 0; padding: 0 4px; border-radius: 9px;
  background: var(--warn); color: #1a1205; border: 2px solid var(--hud-solid); font: 700 10px/13px var(--font); text-align: center;
}
html:not(.mob) #tabs .tab-lock { position: absolute; right: 5px; bottom: 5px; margin: 0; width: 8px; height: 10px; opacity: .7; }
html:not(.mob) #tabs .tab-fold { height: 32px; margin-top: 2px; border-radius: 8px; color: #6f7a83; }
html:not(.mob) #tabs .tab-fold::before { content: ""; position: absolute; top: -4px; left: 6px; right: 6px; height: 1px; background: var(--hud-line); }
html:not(.mob) #tabs .tab-fold .tab-ico { width: 18px; height: 18px; stroke-width: 2; }

/* панель вкладки */
html:not(.mob) .side .sheet-head {
  display: flex; position: absolute; top: 0; right: calc(var(--rail) + var(--gap)); width: var(--drawer); height: 50px;
  align-items: center; gap: 10px; padding: 0 8px 0 18px; pointer-events: auto;
  background: var(--hud-solid); border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: none;
}
html:not(.mob) .side .sheet-grip { display: none; }
html:not(.mob) .side .sheet-title { display: block; flex: 1; min-width: 0; font: 700 15px var(--head); letter-spacing: 1.2px; text-transform: uppercase; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:not(.mob) .side .sheet-x {
  position: static; width: 34px; height: 34px; border-radius: 9px; background: none; border: 0; color: #8a949c;
  font-size: 0; display: grid; place-items: center; cursor: pointer;
}
html:not(.mob) .side .sheet-x::before {   /* «свернуть»: шеврон вправо вместо крестика — панель уезжает к иконкам */
  content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: translateX(-2px) rotate(45deg);
}
html:not(.mob) .side .sheet-x:hover { background: rgba(255, 255, 255, .07); color: #fff; }
html:not(.mob) .side .panel-body {
  position: absolute; top: 50px; bottom: 0; right: calc(var(--rail) + var(--gap)); width: var(--drawer);
  padding: 4px 16px 24px; overflow-y: auto; overscroll-behavior: contain; pointer-events: auto;
  background: var(--hud-solid); border-top: 0; border-radius: 0 0 14px 14px;
}
html:not(.mob) .side .panel-body::before {   /* тонкая линия под заголовком */
  content: ""; display: block; height: 1px; margin: 0 -16px 10px; background: var(--hud-line);
}
html:not(.mob) .side .sheet-head, html:not(.mob) .side .panel-body {
  transition: opacity .18s ease, transform .2s ease, visibility 0s linear 0s;
}
html:not(.mob) #screen-game.side-closed .side .sheet-head,
html:not(.mob) #screen-game.side-closed .side .panel-body {
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(24px);
  transition: opacity .16s ease, transform .2s ease, visibility 0s linear .2s;
}
html:not(.mob) .side .panel-body::-webkit-scrollbar-thumb { border-color: var(--hud-solid); border-radius: 6px; }

/* ─────────── лента: одна строка, раскрывается по клику ─────────── */
html:not(.mob) #newsbar {
  position: absolute; z-index: 20; left: var(--gap); bottom: var(--gap);
  width: min(680px, calc(100% - var(--side-w) - var(--gap) - 60px)); height: auto; display: flex; align-items: stretch;
  border-top: 1px solid var(--hud-line); cursor: pointer; transition: width .2s;
}
html:not(.mob) #newsbar .news-title {
  writing-mode: horizontal-tb; transform: none; display: flex; align-items: center; gap: 7px; flex: none;
  height: 40px; margin: 0; padding: 0 12px 0 14px; align-self: flex-end;
  border: 0; border-right: 1px solid var(--hud-line); background: none; color: var(--accent2);
  font-size: 11px; line-height: 1; letter-spacing: 2px; cursor: pointer;
}
html:not(.mob) #newsbar .news-title::after {
  content: ""; width: 6px; height: 6px; border-left: 1.8px solid currentColor; border-top: 1.8px solid currentColor;
  transform: translateY(2px) rotate(45deg); transition: transform .15s;
}
html:not(.mob) #newsbar.open .news-title::after { transform: translateY(-2px) rotate(225deg); }
html:not(.mob) #newsbar .news-list { flex: 1; min-width: 0; padding: 0 14px; max-height: 40px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
html:not(.mob) #newsbar .news-it { border: 0; padding: 0; min-height: 40px; align-items: center; font-size: 13px; }
html:not(.mob) #newsbar .news-it .ni-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
html:not(.mob) #newsbar:not(.open) .news-it:not(:first-child) { display: none; }
html:not(.mob) #newsbar.open { cursor: default; flex-direction: column-reverse; }
html:not(.mob) #newsbar.open .news-title { align-self: stretch; height: 36px; border-right: 0; border-top: 1px solid var(--hud-line); }
html:not(.mob) #newsbar.open .news-list { max-height: min(46vh, 380px); overflow-y: auto; justify-content: flex-start; padding: 6px 14px; }
html:not(.mob) #newsbar.open .news-it { min-height: 0; padding: 6px 0; align-items: baseline; border-top: 1px solid rgba(255, 255, 255, .05); }
html:not(.mob) #newsbar.open .news-it:first-child { border-top: 0; }
html:not(.mob) #newsbar.open .news-it .ni-t { white-space: normal; }

@media (prefers-reduced-motion: reduce) {
  html:not(.mob) #hud .ctr-pop, html:not(.mob) #tabs .tab::after,
  html:not(.mob) .side .sheet-head, html:not(.mob) .side .panel-body { transition: none; }
}
html.mob .tab-fold { display: none; }
