﻿/* ─────────────────────────────────────────────────────────────────────────
   HUD  —  Futuristic holographic frosted-glass overlay
   ───────────────────────────────────────────────────────────────────────── */

/* ── Shared token colours ── */
:root {
  --h-blue:       rgba(0, 210, 255, 0.90);
  --h-blue-dim:   rgba(0, 180, 255, 0.35);
  --h-blue-faint: rgba(0, 180, 255, 0.14);
  --h-green:      rgba(0, 255, 160, 0.90);
  --h-gold:       rgba(255, 210, 80, 0.95);
  --h-bg:         rgba(6, 16, 32, 0.60);
  --h-border:     rgba(0, 190, 255, 0.18);
  --h-glow:       rgba(0, 180, 255, 0.10);
  --h-font:       'Courier New', Courier, monospace;
}

/* ═══════════════════════════════════════════════════════════════
   HUD 1  —  Top bar
   ═══════════════════════════════════════════════════════════════ */
#hud1 {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 92px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  pointer-events: none;
  font-family: var(--h-font);

  background: var(--h-bg);
  backdrop-filter: blur(18px) saturate(1.8) brightness(0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(0.9);
  border-bottom: 1px solid var(--h-border);
  box-shadow:
    0 6px 40px rgba(0,0,0,0.55),
    0 0 30px var(--h-glow),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* scanline overlay */
#hud1::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px, transparent 3px,
    rgba(0, 180, 255, 0.016) 3px, rgba(0, 180, 255, 0.016) 4px
  );
  pointer-events: none;
}

/* topbar / resbar dividing accent */
#hud1::before {
  content: '';
  position: absolute;
  top: 31px; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,200,255,0.45) 30%,
    rgba(0,220,255,0.70) 50%,
    rgba(0,200,255,0.45) 70%,
    transparent 100%
  );
}

/* ── Top bar ── */
.h1-topbar {
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0, 190, 255, 0.10);
}
.h1-tb-left   { display: flex; align-items: center; gap: 12px; }
.h1-tb-center { display: flex; align-items: center; gap: 8px; }
.h1-tb-right  { display: flex; align-items: center; }

/* ── Topbar stat (Bodies / Date) ── */
.h1-tbstat {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}
.h1-tbkey {
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 180, 255, 0.38);
}
.h1-tbval {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--h-blue);
  text-shadow: 0 0 6px rgba(0, 210, 255, 0.50);
  font-variant-numeric: tabular-nums;
}

/* ── Resource bar ── */
.h1-resbar {
  flex: 1;
  display: flex;
  align-items: stretch;
}
.h1-res-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 10px;
  border-right: 1px solid rgba(0, 190, 255, 0.10);
  overflow: hidden;
}
.h1-res-cell:last-child { border-right: none; }
.h1-res-cell:hover      { background: rgba(0, 180, 255, 0.04); }

/* ── Resource label ── */
.h1-reskey {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 200, 255, 0.60);
}
/* ── Resource value ── */
.h1-resval {
  font-size: 20px;
  letter-spacing: 0.04em;
  color: #ffffff;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
/* ── Rate + cap subrow ── */
.h1-res-subrow {
  display: flex;
  align-items: center;
  gap: 4px;
}
.h1-res-sub {
  font-size: 18px;
  letter-spacing: 0.04em;
  color: rgba(0, 220, 240, 0.88);
}

/* logo */
.h1-logo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--h-blue);
  text-shadow: 0 0 10px rgba(0,210,255,0.55);
}
.h1-bracket { color: rgba(0,180,255,0.40); font-weight: 300; }

/* vertical divider */
.h1-sep {
  width: 1px;
  height: 18px;
  background: var(--h-blue-faint);
}

/* label + value pair */
.h1-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.h1-key {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.40);
}
.h1-val {
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--h-blue);
  text-shadow: 0 0 8px rgba(0,210,255,0.55);
}
.h1-credits {
  color: #ffd97a;
  font-size: 20px;
  font-weight: 700;
}
.h1-goods {
  color: #ffaa33;
}
.h1-goods-rate {
  font-size: 18px;
  letter-spacing: 0.06em;
  color: #ffaa33;
}
.h1-alloys {
  color: #88ccff;
}
.h1-alloys-rate {
  font-size: 18px;
  letter-spacing: 0.06em;
  color: #88ccff;
}
/* ── Storage cap label (shown under rate sub-labels) ── */
.h1-res-cap {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(160, 185, 215, 0.60);
  font-family: var(--h-font);
  margin-top: 0;
}

/* ── Population stat — doubles as boost toggle ── */
.h1-pop-boost-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: all;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: border-color 0.15s, background 0.15s;
  font-family: var(--h-font);
}
.h1-pop-boost-btn:hover {
  background: rgba(255, 160, 40, 0.07);
  border-color: rgba(255, 160, 40, 0.28);
}
.h1-pop-boost-btn .h1-reskey {
  color: rgba(255, 160, 40, 0.70);
}
.h1-pop-boost-btn:hover .h1-reskey {
  color: rgba(255, 190, 80, 0.95);
}

/* ── Boost panel (anchored top-right, below HUD 1) ── */
#boost-panel {
  position: fixed;
  top: 98px;
  right: 24px;
  width: 320px;
  background: rgba(6, 16, 32, 0.88);
  backdrop-filter: blur(18px) saturate(1.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  border: 1px solid rgba(255, 160, 40, 0.30);
  border-radius: 4px;
  padding: 16px 20px 18px;
  z-index: 15;
  font-family: var(--h-font);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 20px rgba(255,140,20,0.10);
  pointer-events: all;
}
.boost-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.boost-title {
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(255, 180, 60, 0.95);
  text-shadow: 0 0 10px rgba(255, 140, 20, 0.55);
}
.boost-close {
  background: none;
  border: none;
  color: rgba(255, 160, 40, 0.55);
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  pointer-events: all;
}
.boost-close:hover { color: rgba(255, 180, 60, 0.95); }
.boost-desc {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(200, 200, 220, 0.60);
  margin: 0 0 14px;
  line-height: 1.5;
}
.boost-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.boost-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 160, 40, 0.70);
  white-space: nowrap;
}
.boost-slider {
  flex: 1;
  accent-color: rgba(255, 160, 40, 0.90);
  cursor: pointer;
}
.boost-pct {
  font-size: 13px;
  color: rgba(255, 190, 80, 0.95);
  min-width: 34px;
  text-align: right;
}
.boost-stats {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(200, 200, 220, 0.60);
  line-height: 1.8;
}
.boost-stat-val {
  color: rgba(255, 160, 40, 0.95);
}
.boost-stat-births {
  color: rgba(0, 255, 160, 0.90);
  text-shadow: 0 0 8px rgba(0, 255, 160, 0.50);
}
.h1-food {
  color: var(--h-green);
}
.h1-food-years {
  font-size: 18px;
  letter-spacing: 0.06em;
  color: rgba(0, 255, 160, 0.95);
  margin-top: 0;
}
.h1-food-years.food-warn {
  animation: food-warn-flash 1.2s ease-in-out infinite;
}
@keyframes food-warn-flash {
  0%, 100% { color: rgba(255, 210, 60, 0.95); }
  50%       { color: rgba(255, 160, 20, 0.50); }
}
.h1-food-years.food-danger {
  animation: none;
}
.h1-pop-rate {
  font-size: 18px;
  letter-spacing: 0.06em;
  color: rgba(0, 255, 160, 0.95);
  margin-top: 0;
}
.h1-speed-btn {
  background: rgba(0, 180, 255, 0.06);
  border: 1px solid rgba(0, 180, 255, 0.22);
  color: rgba(0, 180, 255, 0.45);
  font-family: var(--h-font);
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 2px;
  pointer-events: all;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.h1-speed-btn:hover {
  background: rgba(0, 180, 255, 0.16);
  color: var(--h-blue);
  border-color: rgba(0, 180, 255, 0.50);
}
.h1-speed-btn.active {
  background: rgba(0, 180, 255, 0.20);
  border-color: var(--h-blue);
  color: var(--h-blue);
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.65);
  box-shadow: 0 0 12px rgba(0, 180, 255, 0.22);
}

/* ── Pause button ── */
.h1-pause-btn {
  background: rgba(0, 180, 255, 0.06);
  border: 1px solid rgba(0, 180, 255, 0.28);
  color: rgba(0, 210, 255, 0.70);
  font-family: var(--h-font);
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  border-radius: 2px;
  pointer-events: all;
  margin-right: 4px;
  transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
  letter-spacing: 0;
}
.h1-pause-btn:hover {
  background: rgba(0, 200, 255, 0.16);
  color: var(--h-blue);
  border-color: rgba(0, 200, 255, 0.55);
}
.h1-pause-btn.paused {
  background: rgba(255, 200, 60, 0.14);
  border-color: rgba(255, 200, 60, 0.60);
  color: rgba(255, 220, 80, 0.95);
  text-shadow: 0 0 10px rgba(255, 200, 40, 0.70);
  box-shadow: 0 0 14px rgba(255, 190, 30, 0.28);
  animation: pause-pulse 1.6s ease-in-out infinite;
}
@keyframes pause-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(255, 190, 30, 0.28); }
  50%       { box-shadow: 0 0 22px rgba(255, 190, 30, 0.55); }
}

/* selected body label (centre) */
.h1-ping {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--h-green);
  box-shadow: 0 0 10px rgba(0,255,160,0.80);
  animation: h-ping 2.4s ease-in-out infinite;
}
@keyframes h-ping {
  0%,100% { opacity: 1; box-shadow: 0 0 10px rgba(0,255,160,0.80); }
  50%      { opacity: 0.35; box-shadow: 0 0 4px  rgba(0,255,160,0.25); }
}

#hud1-selected {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 8px rgba(0,210,255,0.90),
    0 0 18px rgba(0,210,255,0.30);
}
#hud1-selected.dim {
  color: rgba(0,180,255,0.30);
  text-shadow: none;
  font-weight: 400;
  letter-spacing: 0.16em;
}


/* ═══════════════════════════════════════════════════════════════
   HUD 2  —  Bottom-left panel  (640px wide two-column layout)
   ═══════════════════════════════════════════════════════════════ */
/* ── Hotbar ────────────────────────────────────────────────── */
.h2-hotbar {
  display: none;
  flex-direction: row;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(0,180,255,0.12);
  pointer-events: all;
}

.h2-hotbar-cell {
  flex: 1;
  aspect-ratio: 1 / 1;
  background: rgba(0,180,255,0.04);
  border: 1px solid rgba(0,180,255,0.20);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.35);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  position: relative;
  pointer-events: all;
}

.h2-hotbar-cell * {
  pointer-events: none;
}

.h2-hotbar-cell:hover {
  background: rgba(0,180,255,0.10);
  border-color: rgba(0,180,255,0.55);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.3), 0 0 8px rgba(0,180,255,0.25);
}

.h2-hotbar-cell::after {
  content: attr(data-slot);
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: 10px;
  color: rgba(0,180,255,0.30);
  font-family: var(--h-font);
  line-height: 1;
}

/* Filled hotbar cell */
.h2-hotbar-cell--filled {
  background: rgba(0,180,255,0.08);
  border-color: rgba(0,180,255,0.40);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.h2-hotbar-cell--filled::after {
  display: none;
}

.h2-hb-icon {
  font-size: 20px;
  line-height: 1;
}

.h2-hb-label {
  font-size: 9px;
  letter-spacing: 0.06em;
  color: rgba(0,220,255,0.80);
  font-family: var(--h-font);
  text-align: center;
  line-height: 1;
}

.h2-hb-count {
  font-size: 9px;
  color: rgba(0,180,255,0.55);
  font-family: var(--h-font);
  line-height: 1;
}

#hud2 {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 640px;
  z-index: 10;
  pointer-events: none;
  font-family: var(--h-font);

  background: var(--h-bg);
  backdrop-filter: blur(18px) saturate(1.8) brightness(0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(0.9);
  border: 1px solid var(--h-border);
  box-shadow:
    0 12px 48px rgba(0,0,0,0.55),
    0 0 32px var(--h-glow),
    inset 0 1px 0 rgba(255,255,255,0.04);

  display: flex;
  flex-direction: column;
}

/* scanline */
#hud2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px, transparent 3px,
    rgba(0,180,255,0.013) 3px, rgba(0,180,255,0.013) 4px
  );
  pointer-events: none;
}

/* corner brackets */
#hud2 .hc { position: absolute; width: 12px; height: 12px; }
#hud2 .hc-tl { top: -1px; left: -1px;
  border-top: 2px solid rgba(0,220,255,0.75);
  border-left: 2px solid rgba(0,220,255,0.75); }
#hud2 .hc-tr { top: -1px; right: -1px;
  border-top: 2px solid rgba(0,220,255,0.75);
  border-right: 2px solid rgba(0,220,255,0.75); }
#hud2 .hc-bl { bottom: -1px; left: -1px;
  border-bottom: 2px solid rgba(0,220,255,0.75);
  border-left: 2px solid rgba(0,220,255,0.75); }
#hud2 .hc-br { bottom: -1px; right: -1px;
  border-bottom: 2px solid rgba(0,220,255,0.75);
  border-right: 2px solid rgba(0,220,255,0.75); }

/* ── Top header bar ── */
.h2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(0,180,255,0.13);
  flex-shrink: 0;
}
.h2-title {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.40);
}
.h2-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.h2-type {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,210,255,0.70);
  text-shadow: 0 0 8px rgba(0,180,255,0.40);
}
.h2-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--h-green);
  box-shadow: 0 0 8px rgba(0,255,160,0.70);
}

/* ── Two-column body ── */
.h2-body {
  display: flex;
  flex: 1;
}

/* Left: hero name/type block */
.h2-hero {
  width: 190px;
  flex-shrink: 0;
  border-right: 1px solid rgba(0,180,255,0.10);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 22px;
  gap: 8px;
}
.h2-hero-label {
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.35);
}
.h2-hero-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 12px rgba(0,210,255,0.90),
    0 0 30px rgba(0,210,255,0.30);
  line-height: 1.1;
  word-break: break-all;
}
.h2-hero-type {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--h-blue-dim);
  text-shadow: 0 0 6px rgba(0,180,255,0.35);
}
.h2-hero-divider {
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,200,255,0.50), transparent);
  margin: 4px 0;
}

/* Right: stat grid + actions */
.h2-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Stat grid */
.h2-stats {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 0;
  padding: 14px 0;
}
.h2-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.025);
  border-right: 1px solid rgba(255,255,255,0.025);
}
.h2-cell:nth-child(even) { border-right: none; }
.h2-cell-key {
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.38);
}
.h2-cell-val {
  font-size: 14px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 0 6px rgba(0,200,255,0.22);
}
.h2-cell-val.accent {
  color: var(--h-blue);
  text-shadow: 0 0 10px rgba(0,200,255,0.55);
}

/* Action buttons row */
.h2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(0,180,255,0.10);
  pointer-events: all;
}

.h2-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 20px;
  min-width: 130px;
  width: 130px;
  background: rgba(0, 180, 255, 0.06);
  border: 1px solid rgba(0, 200, 255, 0.25);
  cursor: pointer;
  font-family: var(--h-font);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.h2-btn:hover {
  background: rgba(0, 200, 255, 0.12);
  border-color: rgba(0, 220, 255, 0.55);
  box-shadow: 0 0 16px rgba(0,200,255,0.22);
}
.h2-btn:active {
  background: rgba(0, 200, 255, 0.20);
}
.h2-btn-label {
  font-size: 8px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.50);
}
.h2-btn-val {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--h-blue);
  text-shadow: 0 0 12px rgba(0,210,255,0.70);
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h2-btn-sub {
  font-size: 9px;
  letter-spacing: 0.10em;
  color: rgba(0,255,160,0.65);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ── Buildings button redesign ───────────────────────────────────────────── */
#btn-bldg.h2-btn-bldg {
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 14px 8px;
  gap: 7px;
  border-color: rgba(255,175,55,0.32);
  background: rgba(255,145,25,0.05);
}
#btn-bldg.h2-btn-bldg:hover {
  background: rgba(255,160,40,0.12);
  border-color: rgba(255,190,65,0.58);
  box-shadow: 0 0 16px rgba(255,155,35,0.22);
}
#btn-bldg.h2-btn-bldg:active {
  background: rgba(255,160,40,0.20);
}
.h2b-bldg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.h2b-bldg-label {
  font-size: 8px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(255,175,55,0.55);
}
.h2b-bldg-total {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255,195,70,0.95);
  text-shadow: 0 0 12px rgba(255,155,35,0.55);
  font-variant-numeric: tabular-nums;
  min-width: 0 !important;
  text-align: right;
  white-space: nowrap;
}
.h2b-bldg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 22px;
}
.h2b-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 5px;
  border: 1px solid rgba(255,175,55,0.22);
  background: rgba(255,145,25,0.09);
  font-family: var(--h-font);
}
.h2b-chip-icon {
  font-size: 12px;
  line-height: 1;
}
.h2b-chip-count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: rgba(255,220,130,0.92);
}
.h2b-bldg-cta {
  font-size: 8px;
  letter-spacing: 0.14em;
  color: rgba(255,175,55,0.38);
  text-align: right;
  text-transform: uppercase;
  font-family: var(--h-font);
}

.h2-btn-colonize {
  border-color: rgba(80,255,120,0.35) !important;
  background: rgba(0,180,60,0.08) !important;
}
.h2-btn-colonize .h2-btn-label { color: rgba(80,255,120,0.55); }
.h2-btn-colonize .h2-btn-val   { color: rgba(80,255,160,0.90); text-shadow: 0 0 12px rgba(80,255,120,0.55); }
.h2-btn-colonize:hover { background: rgba(0,200,80,0.18) !important; }

/* Defended — colonize locked */
.h2-btn-defended {
  border-color: rgba(255, 80, 60, 0.45) !important;
  background: rgba(180, 30, 20, 0.12) !important;
  cursor: not-allowed !important;
  opacity: 0.90;
}
.h2-btn-defended .h2-btn-label { color: rgba(255, 110, 80, 0.85); }
.h2-btn-defended .h2-btn-val   { color: rgba(255, 80, 60, 0.75); font-size: 9px; }

/* Colonize progress status */
.h2-colonize-status {
  padding: 10px 18px 12px;
  border-top: 1px solid rgba(80,255,120,0.15);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.h2-col-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(80,255,160,0.80);
  text-shadow: 0 0 8px rgba(80,255,120,0.50);
  animation: h-ping 1.6s ease-in-out infinite;
}
.h2-col-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(80,255,120,0.10);
  border: 1px solid rgba(80,255,120,0.20);
  border-radius: 3px;
  overflow: hidden;
}
.h2-col-bar {
  height: 100%;
  background: linear-gradient(90deg, rgba(0,220,100,0.70), rgba(80,255,160,0.90));
  box-shadow: 0 0 8px rgba(80,255,120,0.55);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.h2-col-detail {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.h2-col-pct  { color: rgba(80,255,160,0.90); font-weight: 700; }
.h2-col-days { color: rgba(255,210,80,0.80); }

/* Build Queue */
.h2-build-queue {
  border-top: 1px solid rgba(0,180,255,0.10);
  padding: 10px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.h2-bq-header {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(0,180,255,0.55);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.h2-bq-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.06em;
}
.h2-bq-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}
.h2-bq-name {
  color: rgba(0,210,255,0.85);
  white-space: nowrap;
  flex-shrink: 0;
}
.h2-bq-count {
  color: rgba(0,230,255,0.95);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.h2-bq-dashes {
  flex: 1;
  border-bottom: 1px dashed rgba(0,180,255,0.22);
  margin-bottom: 2px;
  min-width: 8px;
}
.h2-bq-days {
  color: rgba(255,210,80,0.90);
  text-shadow: 0 0 8px rgba(255,210,80,0.50);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Population button redesign ───────────────────────────────────── */
#btn-pop.h2-btn-pop {
  flex-direction: column;
  align-items: stretch;
  padding: 10px 14px 8px;
  gap: 6px;
  min-width: 0;
  width: 130px;
  border-color: rgba(0,220,180,0.30);
  background: rgba(0,180,140,0.06);
}
#btn-pop.h2-btn-pop:hover {
  background: rgba(0,220,180,0.12);
  border-color: rgba(0,230,190,0.55);
  box-shadow: 0 0 16px rgba(0,200,160,0.22);
}
#btn-pop.h2-btn-pop:active { background: rgba(0,220,180,0.20); }
.h2pop-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.h2pop-label {
  font-size: 8px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(0,210,170,0.50);
}
.h2pop-val {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(0,235,190,0.95);
  text-shadow: 0 0 12px rgba(0,200,160,0.55);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.h2pop-bar-wrap {
  height: 4px;
  background: rgba(0,200,160,0.12);
  border-radius: 2px;
  overflow: hidden;
}
.h2pop-bar-fill {
  height: 100%;
  background: rgba(0,220,170,0.75);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.h2pop-bar-fill.warn     { background: rgba(255,200,60,0.80); }
.h2pop-bar-fill.critical { background: rgba(255,80,60,0.85); }
.h2pop-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.h2pop-cap {
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(0,200,160,0.40);
  white-space: nowrap;
}
.h2pop-unemp {
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(0,210,170,0.65);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.h2pop-unemp.idle { color: rgba(255,190,55,0.80); }

/* ═══════════════════════════════════════════════════════════════
   Population popup panel
   ═══════════════════════════════════════════════════════════════ */
#hud-pop {
  position: fixed;
  bottom: 28px;
  left: calc(28px + 640px + 16px);
  width: 320px;
  z-index: 11;
  pointer-events: none;
  font-family: var(--h-font);

  background: var(--h-bg);
  backdrop-filter: blur(20px) saturate(2) brightness(0.9);
  -webkit-backdrop-filter: blur(20px) saturate(2) brightness(0.9);
  border: 1px solid var(--h-border);
  box-shadow:
    0 12px 48px rgba(0,0,0,0.60),
    0 0 32px var(--h-glow),
    inset 0 1px 0 rgba(255,255,255,0.04);

  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.20s ease, transform 0.20s ease;
}
#hud-pop.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* scanline */
#hud-pop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px, transparent 3px,
    rgba(0,180,255,0.013) 3px, rgba(0,180,255,0.013) 4px
  );
  pointer-events: none;
}

/* reuse corner brackets from #hud2 */
#hud-pop .hc { position: absolute; width: 12px; height: 12px; }
#hud-pop .hc-tl { top:-1px; left:-1px;
  border-top:2px solid rgba(0,220,255,0.75); border-left:2px solid rgba(0,220,255,0.75); }
#hud-pop .hc-tr { top:-1px; right:-1px;
  border-top:2px solid rgba(0,220,255,0.75); border-right:2px solid rgba(0,220,255,0.75); }
#hud-pop .hc-bl { bottom:-1px; left:-1px;
  border-bottom:2px solid rgba(0,220,255,0.75); border-left:2px solid rgba(0,220,255,0.75); }
#hud-pop .hc-br { bottom:-1px; right:-1px;
  border-bottom:2px solid rgba(0,220,255,0.75); border-right:2px solid rgba(0,220,255,0.75); }

.hpop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(0,180,255,0.13);
}
.hpop-title {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.45);
}
.hpop-close {
  background: none;
  border: 1px solid rgba(0,180,255,0.20);
  color: rgba(0,180,255,0.55);
  font-size: 10px;
  width: 22px; height: 22px;
  cursor: pointer;
  font-family: var(--h-font);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.hpop-close:hover {
  border-color: rgba(0,220,255,0.60);
  color: rgba(0,220,255,0.90);
}

.hpop-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(0,180,255,0.10);
}
.hpop-total-label {
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.38);
}
.hpop-total-val {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow:
    0 0 14px rgba(0,210,255,0.90),
    0 0 32px rgba(0,210,255,0.30);
}

.hpop-species-list {
  padding: 8px 0 12px;
}
.hpop-species-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.025);
}
.hpop-species-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hpop-species-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.hpop-species-name {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.88);
}
.hpop-species-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}
.hpop-species-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
  opacity: 0.75;
}
.hpop-species-nums {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}
.hpop-species-count {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.50);
  font-variant-numeric: tabular-nums;
}
.hpop-species-pct {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}

/* Stat chips row */
.hpop-stats-row {
  display: flex;
  border-bottom: 1px solid rgba(0,180,255,0.10);
}
.hpop-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 8px;
  border-right: 1px solid rgba(0,180,255,0.08);
}
.hpop-stat:last-child { border-right: none; }
.hpop-stat-key {
  font-size: 7px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.45);
  text-align: center;
}
.hpop-stat-val {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.92);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hpop-stat-val.teal  { color: rgba(0,245,200,0.95); text-shadow: 0 0 10px rgba(0,220,170,0.55); }
.hpop-stat-val.green { color: rgba(80,255,150,0.95); text-shadow: 0 0 10px rgba(60,220,100,0.55); }

/* Housing density bar */
.hpop-housing-bar-wrap {
  padding: 10px 18px 12px;
  border-bottom: 1px solid rgba(0,180,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hpop-housing-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.35);
}
.hpop-housing-track {
  height: 5px;
  background: rgba(0,200,160,0.10);
  border-radius: 3px;
  overflow: hidden;
}
.hpop-housing-fill {
  height: 100%;
  background: rgba(0,220,170,0.70);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.hpop-housing-fill.warn     { background: rgba(255,200,60,0.75); }
.hpop-housing-fill.critical { background: rgba(255,80,60,0.80); }

/* empty state */
.h2-empty {
  padding: 28px 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.22);
  line-height: 2.2;
  width: 100%;
}


/* ---------------------------------------------------------------
   HUD 3  �  Right-side Orbital Buildings panel
   --------------------------------------------------------------- */
#hud3 {
  position: fixed;
  top: 100px;
  right: 0;
  width: 260px;
  max-height: calc(100vh - 120px);
  display: none;
  flex-direction: column;
  z-index: 11;
  font-family: var(--h-font);
  background: var(--h-bg);
  backdrop-filter: blur(18px) saturate(1.8) brightness(0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(0.9);
  border-left:   1px solid var(--h-border);
  border-bottom: 1px solid var(--h-border);
  border-top:    1px solid var(--h-border);
  border-radius: 4px 0 0 4px;
  box-shadow:
    -6px 0 40px rgba(0,0,0,0.55),
    0 0 30px var(--h-glow);
  overflow-y: auto;
  scrollbar-width: none;   /* Firefox */
}
#hud3::-webkit-scrollbar { display: none; } /* Chrome / Edge */
#hud3.open { display: flex; }

/* scanline overlay */
#hud3::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px, transparent 3px,
    rgba(0,180,255,0.016) 3px, rgba(0,180,255,0.016) 4px
  );
}

/* corner brackets */
#hud3 .hc { position: absolute; width: 12px; height: 12px; }
#hud3 .hc-tl { top: -1px; left: -1px;
  border-top: 2px solid var(--h-blue); border-left: 2px solid var(--h-blue); }
#hud3 .hc-tr { top: -1px; right: -1px;
  border-top: 2px solid var(--h-blue); border-right: 2px solid var(--h-blue); }
#hud3 .hc-bl { bottom: -1px; left: -1px;
  border-bottom: 2px solid var(--h-blue); border-left: 2px solid var(--h-blue); }
#hud3 .hc-br { bottom: -1px; right: -1px;
  border-bottom: 2px solid var(--h-blue); border-right: 2px solid var(--h-blue); }

.h3-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--h-border);
  flex-shrink: 0;
}
.h3-title {
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: #ffffff;
}
.h3-planet-name {
  font-size: 12px;
  color: rgba(200,240,255,0.90);
  letter-spacing: 0.05em;
  text-align: right;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Section divider label ── */
.h3-sec {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(160,220,255,0.90);
  padding: 10px 14px 5px;
  border-top: 1px solid rgba(0,180,255,0.18);
  margin-top: 2px;
}

/* ── Build / ship row ── */
.h3-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(0,180,255,0.07);
}
.h3-row:hover { background: rgba(0,180,255,0.04); }

.h3-row-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 5px rgba(0,200,255,0.40));
}
.h3-row-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  color: rgba(0,210,255,0.80);
}
.h3-ship-thumb {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 5px rgba(0,200,255,0.50));
}

/* ── Ship selector grid ── */
.h3-ship-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 6px 10px 4px;
}
.h3-sg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  background: rgba(0,180,255,0.06);
  border: 1px solid rgba(0,180,255,0.25);
  border-radius: 4px;
  cursor: pointer;
  color: rgba(220,240,255,0.90);
  font-size: 10px;
  letter-spacing: 0.03em;
  font-family: var(--h-font);
  transition: background 0.12s, border-color 0.12s;
}
.h3-sg-btn img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}
.h3-sg-btn:hover {
  background: rgba(0,180,255,0.14);
  border-color: rgba(0,200,255,0.40);
}
.h3-sg-btn.selected {
  background: rgba(0,200,255,0.20);
  border-color: rgba(0,220,255,0.70);
  color: #ffffff;
}
.h3-sg-btn.cant-afford { opacity: 0.38; }

/* ── Selection bar (name + costs + SPAWN) ── */
.h3-ship-sel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 8px;
  border-top: 1px solid rgba(0,180,255,0.12);
  background: rgba(0,180,255,0.04);
}
.h3-sel-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.h3-sel-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.h3-row-mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.h3-row-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h3-row-costs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  font-size: 11px;
  letter-spacing: 0.03em;
}
.h3-cost-chip { color: rgba(200,230,255,0.95); }
.h3-cost-chip.warn { color: rgba(255,100,80,1); }
.h3-row-reason {
  font-size: 10px;
  color: rgba(255,120,100,0.95);
}

/* ── BUILD / SPAWN button ── */
.h3-btn {
  flex-shrink: 0;
  padding: 7px 11px;
  font-family: var(--h-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  background: rgba(0,180,255,0.12);
  border: 1px solid rgba(0,200,255,0.45);
  color: rgba(0,220,255,0.90);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-transform: uppercase;
  pointer-events: all;
}
.h3-btn:hover:not(.h3-cant-afford) {
  background: rgba(0,200,255,0.22);
  border-color: rgba(0,220,255,0.75);
  box-shadow: 0 0 14px rgba(0,200,255,0.35);
}
.h3-btn.h3-cant-afford {
  opacity: 0.40;
  cursor: not-allowed;
  border-color: rgba(255,80,60,0.30);
  color: rgba(255,120,100,0.60);
  background: rgba(60,0,0,0.10);
}

/* ── Deployed structure rows ── */
.h3-deployed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0,180,255,0.07);
}
.h3-drow-icon {
  font-size: 18px;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}
.h3-drow-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.h3-drow-name {
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 0.03em;
}
.h3-hp-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.h3-hp-bar {
  height: 100%;
  background: linear-gradient(90deg, rgba(0,190,110,0.70), rgba(60,255,150,0.90));
  border-radius: 3px;
  transition: width 0.4s ease;
}
.h3-hp-bar.mid { background: linear-gradient(90deg, rgba(210,150,0,0.70), rgba(255,210,50,0.90)); }
.h3-hp-bar.low { background: linear-gradient(90deg, rgba(200,30,20,0.70), rgba(255,80,60,0.90)); }
.h3-drow-hp {
  font-size: 11px;
  font-weight: 700;
  color: rgba(140,210,255,0.75);
  min-width: 48px;
  text-align: right;
  flex-shrink: 0;
}
.h3-drow-hpmax {
  font-size: 9px;
  color: rgba(100,150,180,0.45);
}

/* ── Ship build-queue construction strip ─────────────────────────── */
.h3-build-strip {
  margin: 8px 0 2px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.h3bs-row {
  padding: 6px 9px 7px;
  background: rgba(255,160,30,0.07);
  border: 1px solid rgba(255,160,30,0.28);
  border-radius: 6px;
}
.h3bs-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.h3bs-icon {
  font-size: 13px;
  color: rgba(255,180,40,0.90);
  animation: h3bs-spin 2.5s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes h3bs-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.h3bs-label {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,230,160,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.h3bs-days {
  font-size: 10px;
  color: rgba(200,200,200,0.55);
  flex-shrink: 0;
}
.h3bs-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.h3bs-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255,130,10,0.80), rgba(255,210,60,0.95));
  border-radius: 3px;
  transition: width 0.4s ease;
}
.h3bs-summary {
  font-size: 9px;
  color: rgba(255,160,30,0.60);
  text-align: right;
  padding-right: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   Newspaper button + modal
   ═══════════════════════════════════════════════════════════════ */
.h1-news-btn {
  background: rgba(0,180,255,0.08);
  border: 1px solid rgba(0,190,255,0.28);
  color: rgba(0,220,255,0.90);
  font-size: 16px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 3px;
  cursor: pointer;
  pointer-events: auto;
  margin-right: 8px;
  transition: background 0.15s;
}
.h1-news-btn:hover {
  background: rgba(0,200,255,0.18);
}

/* modal backdrop */
#news-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.60);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
#news-modal.visible {
  display: flex;
}

/* newspaper panel */
.news-panel {
  width: 520px;
  max-height: 80vh;
  background: rgba(6,14,28,0.96);
  border: 1px solid rgba(0,190,255,0.30);
  border-radius: 6px;
  box-shadow: 0 0 60px rgba(0,180,255,0.15), 0 8px 40px rgba(0,0,0,0.70);
  font-family: 'Courier New', Courier, monospace;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 10px;
  border-bottom: 1px solid rgba(0,190,255,0.18);
  background: rgba(0,140,210,0.08);
}
.news-masthead {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(0,220,255,0.95);
  text-shadow: 0 0 10px rgba(0,200,255,0.40);
}
.news-close {
  background: transparent;
  border: none;
  color: rgba(0,190,255,0.60);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.news-close:hover { color: rgba(0,220,255,1); }

.news-body {
  padding: 16px 22px 20px;
  overflow-y: auto;
  color: rgba(180,220,255,0.85);
  font-size: 13px;
  line-height: 1.6;
}
.news-section {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0,190,255,0.50);
  margin: 0 0 12px;
  border-bottom: 1px solid rgba(0,190,255,0.12);
  padding-bottom: 6px;
}
.news-item-title {
  font-size: 14px;
  color: rgba(0,220,255,0.95);
  margin: 14px 0 4px;
  font-weight: 700;
}
.news-item-body {
  margin: 0 0 4px 14px;
  color: rgba(160,210,255,0.80);
}
.news-list {
  margin: 0 0 4px 28px;
  padding: 0;
  list-style: disc;
  color: rgba(140,200,255,0.75);
}
.news-list li { margin-bottom: 2px; }
.news-wip {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255,160,40,0.80);
  font-weight: 400;
  margin-left: 6px;
}

/* changelog entries */
.news-entry {
  border: 1px solid rgba(0,190,255,0.14);
  border-radius: 4px;
  margin-bottom: 10px;
  background: rgba(0,120,200,0.04);
}
.news-entry[open] {
  border-color: rgba(0,190,255,0.26);
  background: rgba(0,120,200,0.08);
}
.news-entry-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.news-entry-summary::-webkit-details-marker { display: none; }
.news-entry-summary::before {
  content: '▶';
  font-size: 9px;
  color: rgba(0,190,255,0.55);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.news-entry[open] > .news-entry-summary::before { transform: rotate(90deg); }
.news-entry-date {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(0,190,255,0.50);
  white-space: nowrap;
  flex-shrink: 0;
}
.news-entry-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,220,255,0.90);
}
.news-entry-body {
  padding: 4px 16px 12px 14px;
  border-top: 1px solid rgba(0,190,255,0.10);
}
