/* =========================================================
   九州讯脉 · China News Pulse
   Editorial dark dashboard / static front-end
   ========================================================= */

:root {
  --bg: #06101b;
  --bg-deep: #030b14;
  --panel: #0a1826;
  --panel-soft: rgba(11, 27, 43, 0.76);
  --panel-strong: rgba(8, 22, 36, 0.94);
  --line: rgba(133, 169, 194, 0.14);
  --line-strong: rgba(139, 181, 206, 0.26);
  --text: #eaf2f7;
  --text-soft: #c4d3de;
  --muted: #8198aa;
  --muted-2: #5d778b;
  --accent: #5ddbd1;
  --accent-soft: rgba(93, 219, 209, 0.12);
  --red: #ff625f;
  --amber: #e8b05a;
  --blue: #7aa2f7;
  --green: #76d39c;
  --violet: #b695f6;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "SF Mono", "Roboto Mono", "Menlo", "Consolas", monospace;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 10% -8%, rgba(31, 103, 106, 0.28), transparent 62%),
    radial-gradient(900px 620px at 98% 4%, rgba(129, 52, 43, 0.15), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  opacity: 0.045;
  pointer-events: none;
  content: "";
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(1, 6, 11, 0.5) 100%);
  pointer-events: none;
  content: "";
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(93, 219, 209, 0.8);
  outline-offset: 2px;
}

::selection {
  background: rgba(93, 219, 209, 0.22);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(132, 165, 187, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(132, 165, 187, 0.34);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  animation: shell-in 0.9s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

@keyframes shell-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ------------------------------------------------------------------
   Top bar
------------------------------------------------------------------ */

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  flex: 0 0 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 21, 34, 0.92), rgba(6, 16, 27, 0.74));
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 270px;
}

.brand-seal {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 40%),
    linear-gradient(145deg, #e26151, #ac312f 72%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.17),
    0 9px 26px rgba(177, 50, 44, 0.28);
  color: #fff6ed;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1;
}

.brand-seal::before {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 244, 229, 0.34);
  border-radius: 7px;
  content: "";
}

.brand-seal span {
  transform: translateY(-1px);
}

.brand-copy {
  min-width: 0;
}

.brand-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-line h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.1;
}

.brand-badge {
  padding: 3px 6px;
  border: 1px solid rgba(232, 176, 90, 0.3);
  border-radius: 4px;
  background: rgba(232, 176, 90, 0.08);
  color: rgba(239, 195, 128, 0.85);
  font-size: 8px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.brand-copy p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.brand-copy p span {
  margin: 0 5px;
  color: rgba(93, 219, 209, 0.55);
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.date-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.date-main {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.date-sub {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.date-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.window-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(93, 219, 209, 0.08), 0 0 14px rgba(93, 219, 209, 0.5);
}

.window-block div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.window-block strong {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.window-block span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.coverage-chip {
  display: flex;
  align-items: baseline;
  gap: 4px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.coverage-chip .coverage-label {
  align-self: center;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.coverage-chip strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
}

.coverage-unit {
  align-self: center;
  color: var(--muted-2);
  font-size: 9px;
}

.ghost-btn {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 180ms ease;
}

.ghost-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.ghost-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
}

.live-status {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(232, 176, 90, 0.18);
  border-radius: 8px;
  background: rgba(232, 176, 90, 0.05);
  color: rgba(232, 176, 90, 0.72);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.live-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(232, 176, 90, 0.7);
}

/* ------------------------------------------------------------------
   Ticker
------------------------------------------------------------------ */

.ticker {
  position: relative;
  z-index: 19;
  display: flex;
  flex: 0 0 35px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 19, 31, 0.8);
}

.ticker-label {
  display: flex;
  height: 100%;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 18px 0 24px;
  border-right: 1px solid var(--line);
  color: #ffb0aa;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.ticker-pulse {
  position: relative;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.ticker-pulse::after {
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(255, 98, 95, 0.5);
  border-radius: 50%;
  content: "";
  animation: ticker-pulse 2.2s ease-out infinite;
}

@keyframes ticker-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.5);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

.ticker-viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 2%, #000 94%, transparent 100%);
}

.ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: ticker-scroll 62s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  color: var(--text-soft);
  font-size: 10.5px;
  white-space: nowrap;
}

.ticker-item::after {
  width: 3px;
  height: 3px;
  margin-left: 10px;
  border-radius: 50%;
  background: rgba(128, 155, 175, 0.35);
  content: "";
}

.ticker-item .tk-time {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.ticker-item .tk-place {
  color: var(--muted);
  font-size: 9px;
}

.ticker-time {
  flex: 0 0 auto;
  padding: 0 24px 0 16px;
  border-left: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------
   Workspace
------------------------------------------------------------------ */

.workspace {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 438px;
  gap: 14px;
  padding: 14px 18px 18px;
}

/* ------------------------------------------------------------------
   Map panel
------------------------------------------------------------------ */

.map-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(900px 620px at 50% 44%, rgba(25, 67, 81, 0.32), transparent 66%),
    linear-gradient(180deg, #0a1725, #07121e);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.map-panel::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 52%, #000 20%, transparent 76%);
  content: "";
  pointer-events: none;
}

.map-panel::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.28);
  content: "";
  pointer-events: none;
}

.map-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 35% at 52% 48%, rgba(64, 147, 148, 0.12), transparent 72%),
    radial-gradient(ellipse 36% 28% at 25% 23%, rgba(88, 114, 154, 0.08), transparent 75%);
  pointer-events: none;
}

.map-watermark {
  position: absolute;
  right: 28px;
  bottom: 26px;
  z-index: 0;
  color: rgba(184, 211, 224, 0.025);
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 78px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.map-watermark span {
  margin: 0 6px;
  color: rgba(255, 98, 95, 0.06);
  font-family: var(--mono);
  font-size: 0.5em;
}

.map-header {
  position: absolute;
  top: 22px;
  right: 24px;
  left: 24px;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}

.map-heading {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(122, 154, 173, 0.78);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.19em;
  line-height: 1;
}

.eyebrow-line {
  display: inline-block;
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.map-heading h2 {
  margin: 11px 0 0;
  font-family: var(--serif);
  font-size: clamp(24px, 2.15vw, 31px);
  font-weight: 600;
  letter-spacing: 0.045em;
  line-height: 1.15;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.32);
}

.map-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.map-summary strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.dot-sep {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(129, 152, 170, 0.55);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 13px;
  margin-top: 13px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(181, 200, 212, 0.7);
  font-size: 9px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.legend-item i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 8px color-mix(in srgb, var(--tone) 55%, transparent);
}

.map-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.control-cluster {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(9, 24, 38, 0.72);
  backdrop-filter: blur(14px);
}

.icon-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 160ms ease;
}

.control-cluster .icon-btn:last-child {
  border-right: 0;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.hotspot-btn {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(255, 98, 95, 0.24);
  border-radius: 9px;
  background: rgba(255, 98, 95, 0.07);
  color: #ffaaa5;
  font-size: 10px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: 180ms ease;
}

.hotspot-btn:hover,
.hotspot-btn[aria-pressed="true"] {
  border-color: rgba(255, 98, 95, 0.52);
  background: rgba(255, 98, 95, 0.14);
  color: #ffd0cc;
}

.hotspot-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 9px rgba(255, 98, 95, 0.8);
}

.hotspot-count {
  display: grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 4px;
  background: rgba(255, 98, 95, 0.16);
  color: #ffb6b2;
  font-family: var(--mono);
  font-size: 8px;
}

.map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: rgba(7, 18, 30, 0.82);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  transition: opacity 0.5s ease, visibility 0.5s;
  backdrop-filter: blur(4px);
}

.is-ready .map-loading {
  opacity: 0;
  visibility: hidden;
}

.map-loading.is-error {
  color: #ffb7b3;
}

.map-loading.is-error .loader-mark {
  display: none;
}

.loader-mark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 22px;
}

.loader-mark span {
  display: block;
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  animation: loader 1s ease-in-out infinite;
}

.loader-mark span:nth-child(2) {
  height: 20px;
  animation-delay: 0.14s;
  background: var(--amber);
}

.loader-mark span:nth-child(3) {
  height: 14px;
  animation-delay: 0.28s;
  background: var(--red);
}

@keyframes loader {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.55);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.map-hint {
  position: absolute;
  top: 72px;
  right: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(126, 153, 171, 0.48);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.map-hint i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
}

/* Map tooltip ------------------------------------------------------ */

.news-map-tooltip {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}

.map-tooltip {
  min-width: 210px;
  max-width: 280px;
  overflow: hidden;
  border: 1px solid rgba(127, 189, 194, 0.25);
  border-radius: 10px;
  background: rgba(7, 20, 32, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

.map-tooltip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
}

.map-tooltip-city {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.map-tooltip-city span {
  color: var(--muted-2);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.map-tooltip-count {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
}

.map-tooltip-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 12px 11px;
}

.map-tooltip-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #b9ccd7;
  font-size: 10px;
  line-height: 1.5;
}

.map-tooltip-item i {
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--tone, var(--accent));
}

.map-tooltip-foot {
  padding: 6px 12px 8px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.06em;
}

/* Focus card ------------------------------------------------------- */

.focus-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 5;
  display: block;
  width: 366px;
  max-width: calc(100% - 286px);
  padding: 15px 17px 14px;
  border: 1px solid rgba(255, 118, 104, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 98, 95, 0.08), transparent 42%),
    rgba(8, 23, 37, 0.82);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.focus-card::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -1px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red), rgba(255, 98, 95, 0));
  content: "";
}

.focus-card:hover {
  border-color: rgba(255, 118, 104, 0.45);
  background:
    linear-gradient(135deg, rgba(255, 98, 95, 0.13), transparent 46%),
    rgba(9, 26, 41, 0.9);
  transform: translateY(-3px);
}

.focus-topline,
.focus-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.focus-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffaca7;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.focus-flag i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 98, 95, 0.8);
}

.focus-time {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.focus-title {
  display: block;
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.45;
}

.focus-desc {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.focus-bottom {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.focus-place {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.focus-place svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.focus-link {
  color: #ffc0b9;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.focus-link span {
  display: inline-block;
  margin-left: 3px;
  transition: transform 180ms ease;
}

.focus-card:hover .focus-link span {
  transform: translateX(3px);
}

/* Hot regions ------------------------------------------------------ */

.hot-regions {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  width: 220px;
  padding: 13px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 22, 36, 0.76);
  backdrop-filter: blur(16px);
}

.hot-regions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.hot-regions-head .top-label {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.hot-regions ol {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.hot-regions li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 26px;
  align-items: start;
  gap: 8px;
}

.hot-cell {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.hot-rank {
  color: rgba(129, 152, 170, 0.52);
  font-family: var(--mono);
  font-size: 8px;
}

.hot-name {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.hot-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(93, 219, 209, 0.35), rgba(93, 219, 209, 0.9));
}

.hot-count {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  text-align: right;
}

.hot-empty {
  display: block !important;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.7;
}

.hot-regions-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8px;
}

.legend-scale {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 8px;
}

.legend-scale i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: rgba(93, 219, 209, 0.55);
}

.legend-scale i:nth-child(1) {
  height: 3px;
}

.legend-scale i:nth-child(2) {
  height: 5px;
}

.legend-scale i:nth-child(3) {
  height: 6px;
}

.legend-scale i:nth-child(4) {
  height: 8px;
}

/* ------------------------------------------------------------------
   Side panel / feed
------------------------------------------------------------------ */

.side-panel {
  position: relative;
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(13, 30, 47, 0.98), rgba(7, 19, 32, 0.99));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.side-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(93, 219, 209, 0.36), transparent);
  content: "";
}

.feed-view {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
}

.panel-top {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}

.panel-top h2 {
  margin: 9px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.panel-top-right {
  display: flex;
  align-items: center;
  padding-top: 2px;
}

.update-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.update-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(93, 219, 209, 0.6);
}

.volume-block {
  flex: 0 0 auto;
  margin: 14px 20px 0;
  padding: 11px 12px 8px;
  border: 1px solid rgba(133, 169, 194, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.volume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.volume-head span:last-child {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.pulse-chart {
  height: 50px;
  margin-top: 4px;
}

.pulse-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pulse-labels {
  display: flex;
  justify-content: space-between;
  color: rgba(111, 137, 155, 0.6);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.03em;
}

.view-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
  margin: 14px 20px 0;
  padding: 3px;
  border: 1px solid rgba(133, 169, 194, 0.1);
  border-radius: 9px;
  background: rgba(4, 14, 24, 0.46);
}

.view-tab {
  display: flex;
  height: 32px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: 180ms ease;
}

.view-tab:hover {
  color: var(--text-soft);
}

.view-tab.is-active {
  background: rgba(44, 78, 95, 0.38);
  box-shadow: inset 0 0 0 1px rgba(137, 190, 196, 0.12);
  color: var(--text);
}

.tab-count {
  display: grid;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  place-items: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.view-tab.is-active .tab-count {
  background: rgba(93, 219, 209, 0.13);
  color: var(--accent);
}

.news-controls {
  flex: 0 0 auto;
  padding: 13px 20px 0;
}

.search-box {
  display: flex;
  height: 37px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(133, 169, 194, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
  transition: 180ms ease;
  cursor: text;
}

.search-box:focus-within {
  border-color: rgba(93, 219, 209, 0.42);
  background: rgba(93, 219, 209, 0.035);
  box-shadow: 0 0 0 3px rgba(93, 219, 209, 0.045);
}

.search-box > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: var(--muted-2);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.search-box input::placeholder {
  color: rgba(111, 137, 155, 0.7);
}

.search-box kbd {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid rgba(133, 169, 194, 0.18);
  border-radius: 4px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.search-clear {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
}

.search-clear svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.feed-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.sort-toggle {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
}

.sort-btn {
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted-2);
  font-size: 8px;
  cursor: pointer;
  transition: 150ms ease;
}

.sort-btn.is-active {
  background: rgba(255, 255, 255, 0.075);
  color: var(--text-soft);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
  padding-bottom: 1px;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  height: 25px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: 160ms ease;
}

.filter-chip i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tone, var(--muted-2));
}

.filter-chip span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
}

.filter-chip.is-active {
  border-color: color-mix(in srgb, var(--tone, var(--accent)) 32%, transparent);
  background: color-mix(in srgb, var(--tone, var(--accent)) 10%, transparent);
  color: var(--text);
}

.filter-chip.is-active i {
  box-shadow: 0 0 7px color-mix(in srgb, var(--tone, var(--accent)) 70%, transparent);
}

.filter-chip.is-active span {
  color: color-mix(in srgb, var(--tone, var(--accent)) 80%, #fff 20%);
}

/* Feed list -------------------------------------------------------- */

.feed-list {
  min-height: 0;
  flex: 1;
  margin-top: 12px;
  padding: 0 12px 10px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.news-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 7px;
  padding: 12px 13px 11px;
  border: 1px solid rgba(133, 169, 194, 0.1);
  border-radius: 10px;
  background: rgba(9, 24, 39, 0.48);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 180ms ease;
  animation: card-in 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.news-card:hover {
  border-color: rgba(137, 190, 196, 0.23);
  background: rgba(14, 33, 51, 0.76);
  transform: translateY(-1px);
}

.news-card.is-breaking {
  border-color: rgba(255, 98, 95, 0.2);
  background:
    linear-gradient(120deg, rgba(255, 98, 95, 0.075), transparent 52%),
    rgba(12, 27, 42, 0.62);
}

.news-card.is-active {
  border-color: rgba(93, 219, 209, 0.38);
  background: rgba(18, 44, 59, 0.78);
  box-shadow: inset 2px 0 0 var(--accent);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.card-time {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.card-tag {
  display: inline-flex;
  height: 17px;
  align-items: center;
  padding: 0 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  color: var(--tone);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.card-loc {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: var(--muted-2);
  font-size: 8px;
}

.card-loc svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.card-title {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.018em;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-card.is-breaking .card-title {
  color: #fff2ed;
}

.card-summary {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 8px;
}

.card-source {
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-heat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.card-heat i {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.card-heat i::after {
  display: block;
  width: var(--heat);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(232, 176, 90, 0.45), var(--amber));
  content: "";
}

.feed-footnote {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  border-top: 1px solid rgba(133, 169, 194, 0.1);
  color: rgba(111, 137, 155, 0.62);
  font-size: 8px;
  letter-spacing: 0.025em;
}

.footnote-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(93, 219, 209, 0.55);
}

.empty-state {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 30px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state .empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 6px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted-2);
}

.empty-state svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.empty-state strong {
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
}

.empty-state p {
  margin: 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.7;
}

/* Events ----------------------------------------------------------- */

.events-list {
  min-height: 0;
  flex: 1;
  margin-top: 12px;
  padding: 0 20px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.event-card {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 9px;
  padding: 14px 14px 12px;
  overflow: hidden;
  border: 1px solid rgba(133, 169, 194, 0.1);
  border-radius: 11px;
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--tone) 6%, transparent), transparent 48%),
    rgba(9, 24, 39, 0.54);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 180ms ease;
}

.event-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--tone), transparent 70%);
  opacity: 0.55;
  content: "";
}

.event-card:hover {
  border-color: color-mix(in srgb, var(--tone) 32%, transparent);
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--tone) 11%, transparent), transparent 52%),
    rgba(13, 32, 49, 0.8);
  transform: translateY(-1px);
}

.event-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-kicker {
  color: var(--tone);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.event-number {
  color: rgba(129, 152, 170, 0.32);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
}

.event-title {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.4;
}

.event-summary {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(133, 169, 194, 0.08);
  color: var(--muted-2);
  font-size: 8px;
}

.event-dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.event-dots i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.event-dots i:first-child {
  background: var(--tone);
  box-shadow: 0 0 6px color-mix(in srgb, var(--tone) 55%, transparent);
}

.event-open {
  margin-left: auto;
  color: color-mix(in srgb, var(--tone) 75%, #fff 25%);
  letter-spacing: 0.05em;
}

/* ------------------------------------------------------------------
   Detail view
------------------------------------------------------------------ */

.detail-view {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  visibility: hidden;
  flex-direction: column;
  background:
    radial-gradient(600px 380px at 100% 0%, rgba(32, 88, 92, 0.18), transparent 68%),
    linear-gradient(180deg, #0b1b2b, #07131f);
  transform: translateX(103%);
  transition: transform 0.42s cubic-bezier(0.22, 0.8, 0.24, 1), visibility 0.42s;
}

.detail-view.is-open {
  visibility: visible;
  transform: none;
}

.detail-topbar {
  display: flex;
  flex: 0 0 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--line);
}

.back-btn {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 8px 0 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
  transition: 160ms ease;
}

.back-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.detail-kind {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.detail-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 5px;
}

.detail-scroll {
  min-height: 0;
  flex: 1;
  padding: 20px 20px 32px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.detail-hero .card-tag {
  height: 19px;
  padding: 0 6px;
  font-size: 8px;
}

.detail-title {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.42;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 8px;
}

.detail-meta .meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(129, 152, 170, 0.5);
}

.detail-meta .meta-source {
  color: var(--muted);
}

.detail-lead {
  position: relative;
  margin: 17px 0 0;
  padding: 2px 0 2px 13px;
  border-left: 2px solid color-mix(in srgb, var(--tone, var(--accent)) 65%, transparent);
  color: #c6d6e0;
  font-size: 12px;
  line-height: 1.9;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.detail-stat {
  padding: 10px 11px 9px;
  background: rgba(8, 22, 36, 0.92);
}

.detail-stat span {
  display: block;
  color: var(--muted-2);
  font-size: 7px;
  letter-spacing: 0.07em;
}

.detail-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

.detail-tag {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 8px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.section-heading::after {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--line), transparent);
  content: "";
}

.source-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.source-box div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.source-box span {
  color: var(--muted-2);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.source-box strong {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-link {
  display: inline-flex;
  height: 29px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid rgba(93, 219, 209, 0.24);
  border-radius: 5px;
  background: rgba(93, 219, 209, 0.06);
  color: var(--accent);
  font-size: 8px;
  text-decoration: none;
  transition: 160ms ease;
}

.source-link:hover {
  border-color: rgba(93, 219, 209, 0.52);
  background: rgba(93, 219, 209, 0.12);
}

.source-link svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(133, 169, 194, 0.09);
  border-radius: 7px;
  background: rgba(9, 24, 39, 0.4);
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.related-item:hover {
  border-color: rgba(133, 169, 194, 0.22);
  background: rgba(15, 34, 52, 0.7);
}

.related-time {
  flex: 0 0 30px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.6;
}

.related-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-note {
  margin: 18px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.75;
}

/* Event detail ------------------------------------------------------ */

.event-detail-kicker {
  color: var(--tone);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.event-detail-title {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.025em;
  line-height: 1.4;
}

.event-detail-summary {
  margin: 13px 0 0;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.9;
}

.event-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.event-stat {
  padding: 11px;
  background: rgba(8, 22, 36, 0.92);
}

.event-stat span {
  display: block;
  color: var(--muted-2);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.event-stat strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
  padding-left: 18px;
}

.timeline::before {
  position: absolute;
  top: 6px;
  bottom: 8px;
  left: 4px;
  width: 1px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 55%, transparent), var(--line) 85%);
  content: "";
}

.timeline-item {
  position: relative;
  padding: 0 0 17px;
}

.timeline-item::before {
  position: absolute;
  top: 5px;
  left: -17px;
  width: 7px;
  height: 7px;
  border: 2px solid #0b1b2b;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 40%, transparent);
  content: "";
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-time {
  color: var(--tone);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.timeline-text {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.72;
}

.event-stories {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.event-story {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(133, 169, 194, 0.1);
  border-radius: 7px;
  background: rgba(9, 24, 39, 0.45);
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.event-story:hover {
  border-color: color-mix(in srgb, var(--tone) 28%, transparent);
  background: rgba(15, 34, 52, 0.72);
}

.event-story .story-index {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 5px;
  background: color-mix(in srgb, var(--tone) 10%, transparent);
  color: var(--tone);
  font-family: var(--mono);
  font-size: 8px;
}

.event-story .story-copy {
  min-width: 0;
}

.event-story .story-title {
  display: block;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-story .story-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7px;
}

/* ------------------------------------------------------------------
   Dialog
------------------------------------------------------------------ */

.about-dialog {
  width: min(620px, calc(100vw - 30px));
  max-height: min(82vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(137, 190, 196, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(47, 109, 109, 0.18), transparent 70%),
    #0a1928;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.58);
  color: var(--text);
}

.about-dialog::backdrop {
  background: rgba(2, 7, 12, 0.72);
  backdrop-filter: blur(7px);
}

.about-dialog[open] {
  animation: dialog-in 0.28s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}

.dialog-top h2 {
  margin: 9px 0 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.dialog-top .icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.dialog-body {
  max-height: calc(82vh - 90px);
  padding: 20px 22px 24px;
  overflow-y: auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

.dialog-body p {
  margin: 0 0 14px;
}

.dialog-body strong {
  color: var(--text-soft);
  font-weight: 500;
}

.dialog-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.dialog-stats div {
  padding: 12px;
  background: rgba(8, 22, 36, 0.95);
}

.dialog-stats strong {
  display: block;
  color: var(--text);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
}

.dialog-stats span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 8px;
}

.dialog-body h3 {
  margin: 20px 0 7px;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
}

.dialog-body ul {
  margin: 0;
  padding-left: 16px;
}

.dialog-body li {
  margin-bottom: 7px;
}

.dialog-body code {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: #a9d8d3;
  font-family: var(--mono);
  font-size: 9px;
}

.dialog-note {
  margin: 17px 0 0 !important;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9px;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */

@media (max-width: 1380px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 406px;
  }

  .focus-card {
    width: 338px;
  }

  .hot-regions {
    width: 204px;
  }

  .map-heading h2 {
    font-size: 27px;
  }
}

@media (max-width: 1200px) {
  .topbar-center {
    display: none;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) 382px;
  }

  .hot-regions {
    display: none;
  }

  .focus-card {
    max-width: calc(100% - 48px);
  }

  .map-heading h2 {
    font-size: 25px;
  }

  .coverage-chip {
    display: none;
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .topbar {
    flex: 0 0 66px;
    padding: 0 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-seal {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    font-size: 21px;
  }

  .brand-line h1 {
    font-size: 20px;
  }

  .brand-badge,
  .brand-copy p {
    display: none;
  }

  .topbar-actions .ghost-btn span,
  .live-status {
    display: none;
  }

  .ghost-btn {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  .ticker {
    flex-basis: 33px;
  }

  .ticker-label {
    padding: 0 13px 0 16px;
  }

  .ticker-time {
    padding: 0 16px 0 12px;
  }

  .workspace {
    display: flex;
    height: auto;
    flex-direction: column;
    gap: 10px;
    padding: 10px 12px 16px;
  }

  .map-panel {
    height: min(68vh, 620px);
    min-height: 500px;
    flex: 0 0 auto;
    border-radius: 14px;
  }

  .side-panel {
    height: 720px;
    flex: 0 0 auto;
    border-radius: 14px;
  }

  .map-header {
    top: 18px;
    right: 16px;
    left: 16px;
  }

  .map-heading h2 {
    margin-top: 8px;
    font-size: 23px;
  }

  .map-summary {
    margin-top: 8px;
  }

  .map-legend {
    margin-top: 10px;
  }

  .map-hint {
    display: none;
  }

  .map-controls {
    gap: 6px;
  }

  .hotspot-btn {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .hotspot-btn > span:not(.hotspot-dot):not(.hotspot-count) {
    display: none;
  }

  .hotspot-count {
    position: absolute;
    top: 15px;
    right: 14px;
    min-width: 13px;
    height: 13px;
    font-size: 7px;
    transform: translate(40%, -40%);
  }

  .hotspot-btn {
    position: relative;
  }

  .focus-card {
    display: none;
  }

  .map-watermark {
    right: 18px;
    bottom: 18px;
    font-size: 48px;
  }

  .panel-top {
    padding-top: 18px;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 13px;
  }

  .brand {
    gap: 10px;
  }

  .brand-seal {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
    border-radius: 9px;
    font-size: 19px;
  }

  .brand-line h1 {
    font-size: 18px;
    letter-spacing: 0.08em;
  }

  .topbar-actions {
    gap: 6px;
  }

  .ticker-time {
    display: none;
  }

  .ticker-label {
    font-size: 8px;
  }

  .ticker-item {
    padding: 0 14px;
    font-size: 9.5px;
  }

  .workspace {
    padding: 8px 8px 12px;
  }

  .map-panel {
    height: 58vh;
    min-height: 440px;
  }

  .map-header {
    top: 14px;
    right: 12px;
    left: 12px;
    gap: 8px;
  }

  .map-heading h2 {
    font-size: 20px;
    letter-spacing: 0.025em;
  }

  .map-summary {
    gap: 6px;
    font-size: 8px;
  }

  .map-summary strong {
    font-size: 12px;
  }

  .map-legend {
    max-width: 215px;
    gap: 6px 9px;
  }

  .legend-item {
    font-size: 8px;
  }

  .legend-item i {
    width: 4px;
    height: 4px;
  }

  .control-cluster .icon-btn {
    width: 31px;
    height: 31px;
  }

  .control-cluster .icon-btn:nth-child(2) {
    display: none;
  }

  .hotspot-btn {
    width: 31px;
    height: 31px;
  }

  .hotspot-count {
    top: 13px;
    right: 12px;
  }

  .map-watermark {
    font-size: 38px;
  }

  .side-panel {
    height: 700px;
    border-radius: 12px;
  }

  .panel-top {
    padding: 16px 15px 0;
  }

  .panel-top h2 {
    font-size: 20px;
  }

  .volume-block {
    margin: 12px 15px 0;
  }

  .view-tabs {
    margin: 12px 15px 0;
  }

  .news-controls {
    padding: 11px 15px 0;
  }

  .feed-list {
    padding: 0 8px 8px 15px;
  }

  .events-list {
    padding: 0 15px 10px;
  }

  .feed-footnote {
    padding: 0 15px;
    font-size: 7px;
  }

  .detail-scroll {
    padding: 17px 16px 26px;
  }

  .detail-title,
  .event-detail-title {
    font-size: 22px;
  }

  .detail-stats,
  .event-stat-row {
    margin-top: 14px;
  }

  .about-dialog {
    max-height: 88vh;
  }

  .dialog-body {
    max-height: calc(88vh - 90px);
  }
}

@media (max-height: 760px) and (min-width: 981px) {
  .topbar {
    flex-basis: 66px;
  }

  .workspace {
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .map-header {
    top: 17px;
  }

  .map-heading h2 {
    margin-top: 8px;
    font-size: 24px;
  }

  .map-legend {
    margin-top: 9px;
  }

  .focus-card {
    bottom: 18px;
    left: 18px;
    padding-top: 12px;
    padding-bottom: 11px;
  }

  .hot-regions {
    right: 18px;
    bottom: 18px;
  }

  .panel-top {
    padding-top: 16px;
  }

  .volume-block {
    margin-top: 10px;
  }

  .view-tabs {
    margin-top: 10px;
  }

  .news-controls {
    padding-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .ticker-track {
    animation: none;
    transform: none;
  }
}

/* Utility & event-to-story link */
[hidden] {
  display: none !important;
}

.related-event {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--tone) 28%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--tone) 6%, transparent);
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: 170ms ease;
}

.related-event span {
  flex: 0 0 auto;
  color: var(--tone);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.related-event strong {
  min-width: 0;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-event em {
  margin-left: auto;
  color: var(--tone);
  font-style: normal;
  font-size: 11px;
}

.related-event:hover {
  border-color: color-mix(in srgb, var(--tone) 52%, transparent);
  background: color-mix(in srgb, var(--tone) 11%, transparent);
}

/* Search input: hide the native WebKit clear affordance (we render our own) */
.search-box input::-webkit-search-cancel-button,
.search-box input::-webkit-search-decoration,
.search-box input::-webkit-search-results-button,
.search-box input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

.hotspot-label {
  white-space: nowrap;
}

@media (max-width: 980px) {
  body.detail-open {
    overflow: hidden;
  }

  .detail-view {
    position: fixed;
    inset: 0;
    z-index: 90;
    border-radius: 0;
  }

  .detail-topbar {
    height: calc(54px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
  }

  .detail-scroll {
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }
}

/* ------------------------------------------------------------------
   City → district drill-down
------------------------------------------------------------------ */

.map-summary {
  flex-wrap: wrap;
  row-gap: 4px;
}

.layer-badge {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(133, 169, 194, 0.16);
  border-radius: 8px;
  background: rgba(9, 24, 38, 0.68);
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  backdrop-filter: blur(14px);
  transition: 180ms ease;
}

.layer-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(93, 219, 209, 0.7);
  box-shadow: 0 0 8px rgba(93, 219, 209, 0.55);
}

.layer-badge.is-district {
  border-color: rgba(232, 176, 90, 0.26);
  background: rgba(232, 176, 90, 0.07);
  color: rgba(242, 198, 125, 0.88);
}

.layer-badge.is-district i {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(232, 176, 90, 0.6);
}

.hot-name small {
  margin-left: 4px;
  color: var(--muted-2);
  font-family: var(--sans);
  font-size: 7px;
  font-weight: 400;
}

.card-loc {
  max-width: 54%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-address {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.detail-address svg {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.detail-tag-precision {
  border-color: rgba(232, 176, 90, 0.24);
  color: rgba(239, 195, 128, 0.9);
}

.district-link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--tone) 24%, transparent);
  border-radius: 9px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--tone) 7%, transparent), transparent 72%),
    rgba(255, 255, 255, 0.015);
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: 170ms ease;
}

.district-link span {
  color: var(--tone);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.district-link strong {
  margin-left: auto;
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
}

.district-link em {
  color: var(--tone);
  font-style: normal;
  font-size: 11px;
}

.district-link:hover {
  border-color: color-mix(in srgb, var(--tone) 45%, transparent);
  background: color-mix(in srgb, var(--tone) 8%, transparent);
}

.place-summary {
  margin: 13px 0 0;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.9;
}

.place-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.place-cat {
  display: inline-flex;
  height: 22px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--tone) 6%, transparent);
  color: color-mix(in srgb, var(--tone) 82%, #fff 18%);
  font-size: 8px;
}

.place-cat i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tone);
}

.district-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.district-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 1px solid rgba(133, 169, 194, 0.1);
  border-radius: 8px;
  background: rgba(9, 24, 39, 0.42);
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: 170ms ease;
}

.district-row:hover {
  border-color: color-mix(in srgb, var(--tone) 30%, transparent);
  background: rgba(15, 34, 52, 0.72);
}

.district-rank {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 5px;
  background: color-mix(in srgb, var(--tone) 9%, transparent);
  color: var(--tone);
  font-family: var(--mono);
  font-size: 8px;
}

.district-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.district-info strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-info span {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.district-count {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.dialog-stats {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 980px) {
  .layer-badge {
    display: none;
  }
}

@media (max-width: 640px) {
  .detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dialog-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .district-link {
    flex-wrap: wrap;
  }

  .district-link strong {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 980px) {
  body.detail-open .side-panel {
    z-index: 100;
  }
}

@media (max-width: 1200px) {
  .layer-badge {
    display: none;
  }
}

.layer-badge.is-boundary {
  border-color: rgba(93, 219, 209, 0.32);
  background: rgba(93, 219, 209, 0.08);
  color: rgba(158, 235, 226, 0.92);
}

.layer-badge.is-boundary i {
  background: var(--accent);
  box-shadow: 0 0 9px rgba(93, 219, 209, 0.7);
}

/* ------------------------------------------------------------------
   Account entry & registration
------------------------------------------------------------------ */

.auth-entry {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 5px;
  border: 1px solid rgba(232, 176, 90, 0.26);
  border-radius: 9px;
  background:
    linear-gradient(100deg, rgba(232, 176, 90, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.018);
  color: var(--text-soft);
  cursor: pointer;
  transition: 180ms ease;
}

.auth-entry:hover {
  border-color: rgba(232, 176, 90, 0.54);
  background:
    linear-gradient(100deg, rgba(232, 176, 90, 0.14), transparent 72%),
    rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.auth-entry-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(232, 176, 90, 0.26), rgba(232, 176, 90, 0.08));
  color: var(--amber);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.auth-entry-avatar svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.auth-entry-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.1;
}

.auth-entry-copy strong {
  color: #f0d5a4;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.03em;
  max-width: 104px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-entry-copy span {
  color: var(--muted-2);
  font-size: 7px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.auth-entry.is-signed-in {
  border-color: rgba(93, 219, 209, 0.3);
  background:
    linear-gradient(100deg, rgba(93, 219, 209, 0.08), transparent 70%),
    rgba(255, 255, 255, 0.018);
}

.auth-entry.is-signed-in .auth-entry-avatar {
  background: linear-gradient(145deg, rgba(93, 219, 209, 0.32), rgba(93, 219, 209, 0.08));
  color: #d8fbf7;
}

.auth-entry.is-signed-in .auth-entry-copy strong {
  color: #bcece7;
}

/* Dialog ----------------------------------------------------------- */

.auth-dialog {
  width: min(860px, calc(100vw - 30px));
  max-height: min(88vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(137, 190, 196, 0.22);
  border-radius: 18px;
  background: #081723;
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.66);
  color: var(--text);
}

.auth-dialog::backdrop {
  background: rgba(2, 7, 12, 0.78);
  backdrop-filter: blur(8px);
}

.auth-dialog[open] {
  animation: dialog-in 0.3s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.auth-grid {
  display: grid;
  min-height: 550px;
  grid-template-columns: 0.86fr 1.14fr;
}

.auth-visual {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 28px 28px 24px;
  background:
    radial-gradient(500px 320px at 20% 8%, rgba(50, 134, 132, 0.32), transparent 68%),
    radial-gradient(360px 260px at 104% 100%, rgba(191, 73, 59, 0.28), transparent 70%),
    linear-gradient(160deg, #0c2030, #071521 72%);
  border-right: 1px solid var(--line);
}

.auth-visual::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(2, 8, 13, 0.55) 100%);
  content: "";
  pointer-events: none;
}

.auth-visual-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 48% 45%, #000 8%, transparent 76%);
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-seal {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 9px;
  font-size: 20px;
}

.auth-brand > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-brand strong {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.auth-brand span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 70px 0 30px;
}

.auth-visual-copy h2 {
  margin: 15px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.5;
}

.auth-visual-copy p {
  max-width: 290px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.85;
}

.auth-visual-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 24px;
  padding-top: 17px;
  border-top: 1px solid rgba(133, 169, 194, 0.14);
}

.auth-visual-stats div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-visual-stats strong {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 400;
}

.auth-visual-stats span {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.auth-panel {
  position: relative;
  display: flex;
  max-height: min(88vh, 760px);
  min-width: 0;
  flex-direction: column;
  padding: 32px 34px 25px;
  overflow-y: auto;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(40, 101, 104, 0.12), transparent 72%),
    #091926;
  scrollbar-gutter: stable;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  transition: 160ms ease;
}

.auth-close:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.auth-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.auth-heading {
  padding-right: 30px;
}

.auth-kicker {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.auth-heading h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.auth-heading p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 9px;
}

.auth-tabs {
  display: flex;
  gap: 3px;
  margin-top: 20px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 10, 18, 0.46);
}

.auth-tab {
  height: 32px;
  flex: 1;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: 160ms ease;
}

.auth-tab:hover {
  color: var(--text-soft);
}

.auth-tab.is-active {
  background: rgba(44, 78, 95, 0.42);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(137, 190, 196, 0.12);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 17px;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field > span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.auth-field input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(133, 169, 194, 0.18);
  border-radius: 7px;
  outline: 0;
  background: rgba(255, 255, 255, 0.022);
  color: var(--text);
  font-size: 11px;
  transition: 160ms ease;
}

.auth-field input::placeholder {
  color: rgba(111, 137, 155, 0.58);
}

.auth-field input:focus {
  border-color: rgba(93, 219, 209, 0.46);
  background: rgba(93, 219, 209, 0.03);
  box-shadow: 0 0 0 3px rgba(93, 219, 209, 0.045);
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.6;
  cursor: pointer;
}

.auth-consent input {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin: 1px 0 0;
  accent-color: var(--red);
}

.auth-error {
  min-height: 15px;
  margin: 0;
  color: #ff9f99;
  font-size: 8px;
  line-height: 1.5;
}

.auth-submit {
  display: flex;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 144, 131, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(135deg, #d95649, #a93231);
  color: #fff6ed;
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(167, 54, 47, 0.25);
  transition: 170ms ease;
}

.auth-submit span {
  transition: transform 160ms ease;
}

.auth-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.auth-submit:hover span {
  transform: translateX(3px);
}

.auth-submit:disabled {
  cursor: wait;
  filter: saturate(0.5);
  opacity: 0.7;
  transform: none;
}

.auth-fineprint {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 17px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 7.5px;
  line-height: 1.7;
}

.auth-fineprint svg {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

/* Signed in -------------------------------------------------------- */

.auth-signed-in .auth-heading {
  margin-top: 3px;
}

.auth-user-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(120deg, rgba(93, 219, 209, 0.05), transparent 64%),
    rgba(255, 255, 255, 0.02);
}

.auth-user-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #2b5a62, #142e3c);
  color: #d7f5f1;
  font-family: var(--serif);
  font-size: 22px;
}

.auth-user-card > div:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.auth-user-card strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-card small {
  color: var(--muted-2);
  font-size: 7.5px;
}

.auth-logout {
  margin-top: 16px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  box-shadow: none;
}

.auth-logout:hover {
  border-color: rgba(255, 98, 95, 0.35);
  background: rgba(255, 98, 95, 0.08);
  color: #ffb3af;
}

/* Toast ------------------------------------------------------------ */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 200;
  max-width: calc(100vw - 32px);
  padding: 10px 15px;
  border: 1px solid rgba(93, 219, 209, 0.3);
  border-radius: 8px;
  background: rgba(7, 22, 35, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  color: var(--text-soft);
  font-size: 10px;
  letter-spacing: 0.03em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 220ms ease;
  backdrop-filter: blur(12px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .auth-entry-copy {
    display: none;
  }

  .auth-entry {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }

  .auth-entry-avatar {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  .auth-dialog {
    max-height: 92vh;
    border-radius: 14px;
  }

  .auth-grid {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    max-height: 92vh;
    padding: 27px 22px 22px;
  }

  .auth-heading h2 {
    font-size: 23px;
  }
}

@media (max-width: 640px) {
  .auth-row {
    grid-template-columns: 1fr;
  }

  .auth-dialog {
    width: calc(100vw - 18px);
  }

  .auth-panel {
    padding: 24px 17px 18px;
  }

  .auth-field input {
    height: 42px;
    font-size: 12px;
  }

  .toast {
    bottom: 16px;
  }
}

.auth-brand .auth-seal span {
  color: #fff6ed;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0;
}

@media (max-width: 640px) {
  .auth-entry {
    width: auto;
    height: 34px;
    gap: 5px;
    padding: 0 8px 0 4px;
  }

  .auth-entry-copy {
    display: flex;
  }

  .auth-entry-copy span {
    display: none;
  }

  .auth-entry-copy strong {
    max-width: 54px;
    font-size: 8px;
  }
}

/* Live refresh controls -------------------------------------------- */

.live-status {
  border: 1px solid rgba(232, 176, 90, 0.18);
  background: rgba(232, 176, 90, 0.05);
  font: inherit;
  cursor: pointer;
  transition: 170ms ease;
}

.live-status:hover {
  border-color: rgba(232, 176, 90, 0.42);
  background: rgba(232, 176, 90, 0.1);
}

.live-status.is-live {
  border-color: rgba(93, 219, 209, 0.24);
  background: rgba(93, 219, 209, 0.055);
  color: rgba(159, 235, 226, 0.9);
}

.live-status.is-live .live-status-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(93, 219, 209, 0.7);
  animation: live-dot 2.2s ease-out infinite;
}

.live-status.is-updating .live-status-dot {
  background: var(--amber);
  animation: live-dot 0.9s ease-out infinite;
}

@keyframes live-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.update-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  font: inherit;
  cursor: pointer;
  transition: 170ms ease;
}

.update-chip:hover {
  border-color: rgba(93, 219, 209, 0.3);
  background: rgba(93, 219, 209, 0.04);
  color: var(--text-soft);
}

.update-chip.is-updating {
  border-color: rgba(232, 176, 90, 0.28);
  color: rgba(239, 195, 128, 0.85);
}

.update-chip.is-updating i {
  background: var(--amber);
  animation: live-dot 0.9s ease-out infinite;
}

.refresh-btn-spin {
  animation: refresh-spin 0.9s linear infinite;
}

@keyframes refresh-spin {
  to { transform: rotate(360deg); }
}

.card-live {
  display: inline-flex;
  height: 15px;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(93, 219, 209, 0.1);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.card-live::before {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 5px rgba(93, 219, 209, 0.8);
  content: "";
}

.news-card.is-live {
  border-left: 2px solid rgba(93, 219, 209, 0.32);
}

.detail-live-tag {
  border-color: rgba(93, 219, 209, 0.24);
  color: var(--accent);
}

.toast {
  z-index: 200;
}

@media (max-width: 980px) {
  .live-status {
    display: none;
  }
}

.map-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  padding: 3px 6px;
  border: 1px solid rgba(232, 176, 90, 0.18);
  border-radius: 4px;
  background: rgba(232, 176, 90, 0.04);
  color: rgba(232, 176, 90, 0.7);
  font-size: 7.5px;
  letter-spacing: 0.03em;
}

@media (max-width: 640px) {
  .map-note {
    margin-top: 7px;
    font-size: 7px;
  }
}

/* ------------------------------------------------------------------
   Leaflet basemap & news pins
------------------------------------------------------------------ */

.map-canvas.leaflet-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #07121e;
  color: var(--text);
  font-family: var(--sans);
  outline: 0;
}

.leaflet-tile-pane {
  filter: grayscale(1) invert(1) brightness(0.67) contrast(1.16) sepia(0.24) hue-rotate(153deg) saturate(1.22);
}

.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-tooltip-pane {
  filter: none;
}

.leaflet-control-container {
  display: none;
}

.map-attribution {
  position: absolute;
  bottom: 8px;
  left: 50%;
  z-index: 4;
  color: rgba(146, 169, 183, 0.45);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  pointer-events: none;
  transform: translateX(-50%);
  white-space: nowrap;
}

.news-pin-wrap {
  background: transparent;
  border: 0;
}

.news-pin {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(242, 252, 255, 0.82);
  border-radius: 50%;
  background: var(--tone, var(--accent));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--tone, var(--accent)) 14%, transparent),
    0 0 12px color-mix(in srgb, var(--tone, var(--accent)) 55%, transparent);
  transition: transform 160ms ease;
}

.news-pin:hover {
  transform: scale(1.45);
}

.news-pin.is-live::before {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 4px;
  height: 4px;
  border: 1px solid #07121e;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.news-pin.is-breaking::after {
  position: absolute;
  inset: -7px;
  border: 1px solid color-mix(in srgb, var(--tone, var(--red)) 55%, transparent);
  border-radius: 50%;
  content: "";
  animation: pin-pulse 2.1s ease-out infinite;
}

@keyframes pin-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.55);
  }
  75%,
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

.news-cluster {
  display: grid;
  place-items: center;
  border: 1px solid rgba(93, 219, 209, 0.48);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(125, 241, 229, 0.34), transparent 52%),
    rgba(7, 25, 39, 0.93);
  box-shadow:
    0 0 0 5px rgba(93, 219, 209, 0.07),
    0 0 22px rgba(64, 174, 171, 0.28),
    0 8px 20px rgba(0, 0, 0, 0.45);
  color: #e5fbf8;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.news-cluster:hover {
  border-color: rgba(93, 219, 209, 0.9);
  transform: scale(1.07);
}

.news-cluster span {
  transform: translateY(-0.5px);
}

.news-cluster.is-large {
  border-color: rgba(232, 176, 90, 0.56);
  background:
    radial-gradient(circle at 34% 28%, rgba(236, 194, 126, 0.34), transparent 52%),
    rgba(28, 25, 23, 0.93);
  box-shadow:
    0 0 0 5px rgba(232, 176, 90, 0.07),
    0 0 24px rgba(190, 130, 58, 0.24),
    0 8px 20px rgba(0, 0, 0, 0.45);
  color: #fff1d7;
}

.leaflet-tooltip.news-leaflet-tooltip {
  max-width: 270px;
  padding: 9px 11px;
  border: 1px solid rgba(127, 189, 194, 0.28);
  border-radius: 8px;
  background: rgba(7, 20, 32, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.46);
  color: var(--text-soft);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.55;
  white-space: normal;
  backdrop-filter: blur(14px);
}

.leaflet-tooltip.news-leaflet-tooltip::before {
  border-top-color: rgba(127, 189, 194, 0.28);
}

.news-tip-title {
  display: block;
  color: var(--text);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.news-tip-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.news-tip-tag {
  display: inline-flex;
  margin-top: 5px;
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--tone) 8%, transparent);
  color: color-mix(in srgb, var(--tone) 80%, #fff 20%);
  font-size: 7px;
}

@media (max-width: 980px) {
  .map-attribution {
    bottom: 5px;
    font-size: 6px;
  }
}

/* Leaflet panes sit above normal content; keep dashboard overlays above them */
.map-header {
  z-index: 1000;
}

.map-hint {
  z-index: 1000;
}

.focus-card,
.hot-regions {
  z-index: 1100;
}

.map-attribution {
  z-index: 1000;
}

.map-loading {
  z-index: 1200;
}

.leaflet-tile-pane {
  filter: grayscale(1) invert(1) brightness(0.79) contrast(1.08) sepia(0.18) hue-rotate(153deg) saturate(1.08);
}

.map-header,
.map-hint,
.map-attribution,
.hot-regions,
.focus-card {
  transform: translateZ(0);
}

.map-header {
  isolation: isolate;
}

.map-hint {
  isolation: isolate;
}

/* Filter each tile rather than the whole pane to avoid compositing over the dashboard */
.leaflet-tile-pane {
  filter: none !important;
}

.leaflet-tile {
  filter: grayscale(1) invert(1) brightness(0.83) contrast(1.08) sepia(0.18) hue-rotate(153deg) saturate(1.08);
}

/* Readable glass heading above the filtered basemap */
.map-heading {
  max-width: 570px;
  padding: 12px 14px 13px;
  border: 1px solid rgba(133, 169, 194, 0.12);
  border-radius: 13px;
  background:
    linear-gradient(140deg, rgba(6, 18, 30, 0.9), rgba(6, 18, 30, 0.58) 72%, rgba(6, 18, 30, 0.42));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(11px);
  isolation: isolate;
}

.map-heading h2 {
  margin-top: 8px;
}

.map-summary {
  margin-top: 8px;
}

.map-legend {
  margin-top: 10px;
}

.map-hint {
  padding: 5px 8px;
  border: 1px solid rgba(133, 169, 194, 0.1);
  border-radius: 5px;
  background: rgba(5, 16, 27, 0.62);
  backdrop-filter: blur(9px);
}

@media (max-width: 1200px) {
  .map-heading {
    max-width: calc(100% - 224px);
    padding: 10px 12px 11px;
  }
}

@media (max-width: 980px) {
  .map-heading {
    max-width: calc(100% - 132px);
  }
}

@media (max-width: 640px) {
  .map-heading {
    max-width: calc(100% - 108px);
    padding: 9px 10px 10px;
    border-radius: 10px;
  }

  .map-heading h2 {
    margin-top: 6px;
    font-size: 19px;
  }

  .map-summary {
    margin-top: 6px;
  }

  .map-legend {
    margin-top: 7px;
  }
}

/* Visit counter */
.visit-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(118, 165, 181, 0.16);
  border-radius: 5px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.visit-chip strong {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.analytics-panel {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(118, 165, 181, 0.14);
  border-radius: 8px;
  background: rgba(12, 31, 45, 0.44);
}

.analytics-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 10px;
}

.analytics-head span:last-child {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.analytics-grid div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.analytics-grid strong {
  color: var(--text);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.analytics-grid span {
  color: var(--muted-2);
  font-size: 8px;
}

@media (max-width: 1280px) {
  .visit-chip {
    display: none;
  }
}

@media (max-width: 640px) {
  .analytics-grid strong {
    font-size: 17px;
  }
}

/* Followed cities */
.follow-bar {
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(118, 165, 181, 0.14);
  border-radius: 7px;
  background: rgba(10, 28, 42, 0.42);
}

.follow-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.follow-only-btn {
  padding: 2px 5px;
  border: 1px solid rgba(118, 165, 181, 0.2);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.follow-only-btn.is-active {
  border-color: rgba(214, 157, 91, 0.45);
  background: rgba(214, 157, 91, 0.1);
  color: #e8bc81;
}

.followed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.follow-chip {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(118, 165, 181, 0.18);
  border-radius: 4px;
  background: rgba(11, 33, 48, 0.7);
}

.follow-chip-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 5px 4px 7px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.follow-chip-open small {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
}

.follow-chip-remove {
  width: 18px;
  border: 0;
  border-left: 1px solid rgba(118, 165, 181, 0.12);
  background: transparent;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.follow-chip-remove:hover {
  color: var(--red);
}

.place-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 4px;
}

.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(118, 165, 181, 0.24);
  border-radius: 4px;
  background: rgba(11, 33, 48, 0.55);
  color: var(--text-soft);
  font: inherit;
  font-size: 9px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.follow-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.follow-btn:hover {
  border-color: rgba(214, 157, 91, 0.55);
  color: #ead0a9;
}

.follow-btn.is-following {
  border-color: rgba(214, 157, 91, 0.48);
  background: rgba(214, 157, 91, 0.1);
  color: #e8bc81;
}

.follow-btn.is-following svg {
  fill: currentColor;
}

.follow-btn.is-compact {
  padding: 4px 7px;
  font-size: 8px;
}

.hot-regions li[data-city] {
  cursor: pointer;
}

.hot-regions li[data-city]:hover .hot-name {
  color: var(--accent);
}

/* Share poster */
.detail-share {
  margin-left: auto;
  margin-right: 2px;
  color: var(--muted);
}

.detail-share:hover {
  color: var(--accent);
}

.poster-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid rgba(128, 177, 190, 0.22);
  border-radius: 14px;
  background: #071520;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
  color: var(--text);
}

.poster-dialog::backdrop {
  background: rgba(1, 7, 13, 0.78);
  backdrop-filter: blur(10px);
}

.poster-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
}

.poster-dialog-head h2 {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.poster-preview {
  display: flex;
  justify-content: center;
  padding: 0 20px;
  overflow: auto;
}

.poster-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 58vh;
  border: 1px solid rgba(128, 177, 190, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.poster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px 6px;
}

.poster-primary,
.poster-secondary {
  padding: 8px 13px;
  border-radius: 5px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

.poster-primary {
  border: 1px solid rgba(221, 108, 88, 0.7);
  background: rgba(193, 70, 58, 0.78);
  color: #fff8f2;
}

.poster-primary:hover {
  background: rgba(214, 83, 69, 0.92);
}

.poster-secondary {
  border: 1px solid rgba(128, 177, 190, 0.24);
  background: transparent;
  color: var(--text-soft);
}

.poster-secondary:hover {
  border-color: rgba(128, 177, 190, 0.52);
  color: var(--text);
}

.poster-note {
  margin: 0;
  padding: 4px 20px 16px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .poster-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .poster-dialog-head {
    padding: 14px 14px 10px;
  }

  .poster-preview {
    padding: 0 14px;
  }

  .poster-preview img {
    max-height: 52vh;
  }

  .poster-actions {
    padding: 12px 14px 4px;
  }

  .poster-note {
    padding: 4px 14px 12px;
  }
}
