/* ============================================================
   Globe News — deep-space canvas, quiet glass UI, editorial type
   ============================================================ */

:root {
  --bg: #03050d;
  --surface: rgba(10, 15, 32, 0.66);
  --surface-solid: #0a0f20;
  --surface-hi: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f7fd;
  --text-dim: #cbd4ea;
  --text-mute: #a3afcf;
  --accent: #6cb6ff;
  --accent-soft: rgba(108, 182, 255, 0.14);
  --warm: #ffb463;
  --danger: #ff7a7a;
  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --panel-w: 440px;
  --ticker-h: 40px;
  --gap: 16px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============================================================
   Loading screen: skeleton of the real layout
   ============================================================ */
#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(ellipse at 50% 45%, #0a1228 0%, var(--bg) 70%);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
#splash.done { opacity: 0; visibility: hidden; }
.sk {
  display: block;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.13) 50%, rgba(255, 255, 255, 0.05) 70%);
  background-size: 250% 100%;
  animation: shimmer 1.6s linear infinite;
}
.sk-pill { border-radius: 999px; border: 1px solid var(--line); }
.sk-top { position: absolute; top: calc(var(--gap) + var(--safe-t)); left: var(--gap); right: var(--gap); display: flex; gap: 12px; }
.sk-brand { width: 170px; height: 46px; }
.sk-search { width: 320px; height: 46px; max-width: 46vw; }
.sk-btn { width: 46px; height: 46px; margin-left: 0; }
.sk-btn:nth-of-type(3) { margin-left: auto; }
.sk-globe { position: absolute; inset: 0; display: grid; place-items: center; }
.sk-globe i {
  width: min(62vmin, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: 0 0 80px rgba(80, 150, 255, 0.12), inset -24px -24px 60px rgba(0, 0, 0, 0.45);
  animation-duration: 2.2s;
}
.sk-ctl { position: absolute; left: var(--gap); top: 50%; width: 46px; height: 220px; transform: translateY(-50%); border-radius: 23px; }
.sk-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: var(--ticker-h); border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .sk-brand { width: 44px; height: 44px; }
  .sk-search { flex: 1; height: 44px; max-width: none; }
  .sk-btn { width: 42px; height: 44px; margin-left: 0 !important; }
  .sk-btn:nth-of-type(n+4) { display: none; }
  .sk-ctl { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ============================================================
   Globe canvas
   ============================================================ */
#globe-container { position: fixed; inset: 0; z-index: 1; }
#globe-canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline: none; }
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(1, 2, 8, 0.55) 100%);
}

/* ============================================================
   Shared glass surface
   ============================================================ */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   Top bar
   ============================================================ */
#topbar {
  position: fixed;
  top: calc(var(--gap) + var(--safe-t));
  left: var(--gap);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  max-width: calc(100vw - var(--gap) * 2);
}
#topbar > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; }
.brand-mark.brand-logo { object-fit: contain; border-radius: 6px; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: 0.01em; white-space: nowrap; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff9a9a;
  background: rgba(255, 90, 90, 0.12);
}
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #ff5a5a; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* Search */
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 42vw);
  height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s, background 0.2s;
}
.search:focus-within { border-color: rgba(108, 182, 255, 0.55); background: rgba(12, 18, 40, 0.85); color: var(--text); }
.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
}
.search input::placeholder { color: var(--text-mute); }
.search kbd {
  font: 600 12px var(--sans);
  color: var(--text-mute);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 2px 7px;
}
.search:focus-within kbd { display: none; }

#search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(380px, 60vh);
  overflow-y: auto;
  list-style: none;
  padding: 6px;
  border-radius: var(--radius);
  background: rgba(9, 13, 30, 0.94);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
#search-results li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
#search-results li .fl { font-size: 20px; line-height: 1; }
#search-results li.active, #search-results li:hover { background: var(--accent-soft); }
#search-results li mark { background: none; color: var(--accent); font-weight: 600; }
#search-results .none { color: var(--text-mute); cursor: default; }
#search-results .none:hover { background: none; }

.top-btn {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: color 0.2s, border-color 0.2s;
}
.top-btn:hover { color: var(--text); border-color: var(--line-strong); }
#saved-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  color: #07101f;
  background: var(--warm);
}

.tv-btn { width: auto; display: flex; gap: 8px; padding: 0 16px 0 14px; border-radius: 999px; color: var(--text); }
.tv-btn .icon { color: #ff8a8a; }
.tv-btn-label { font-size: 13.5px; font-weight: 600; white-space: nowrap; }

/* ============================================================
   Controls
   ============================================================ */
#controls {
  position: fixed;
  top: 50%;
  left: var(--gap);
  transform: translateY(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.ctl {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-mute);
  transition: color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.ctl:hover { color: var(--text); background: var(--surface-hi); }
.ctl:active { transform: scale(0.92); }
.ctl[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.ctl-sep { width: 18px; height: 1px; background: var(--line); margin: 3px 0; }
.ctl::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translate(-4px, -50%);
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(8, 12, 26, 0.95);
  border: 1px solid var(--line-strong);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.2s var(--ease);
}
@media (hover: hover) {
  .ctl:hover::after { opacity: 1; transform: translate(0, -50%); }
}

/* ============================================================
   Status + hint
   ============================================================ */
#status {
  position: fixed;
  left: var(--gap);
  bottom: calc(var(--gap) + var(--ticker-h) + var(--safe-b));
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 10px var(--warm); }

#hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--gap) + var(--ticker-h) + var(--safe-b));
  transform: translateX(-50%);
  z-index: 15;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
#hint b { color: var(--text-mute); font-weight: 400; margin: 0 4px; }
#hint.gone { opacity: 0; transform: translate(-50%, 8px); }

/* ============================================================
   Tooltip
   ============================================================ */
#tooltip {
  position: fixed;
  z-index: 30;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(8, 12, 26, 0.92);
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
}
#tooltip.visible { opacity: 1; }
#tooltip .fl { font-size: 17px; line-height: 1; }
#tooltip small { color: var(--text-dim); font-weight: 500; font-size: 12px; }

/* ============================================================
   News panel
   ============================================================ */
#panel {
  position: fixed;
  z-index: 40;
  top: calc(var(--gap) + var(--safe-t));
  right: var(--gap);
  bottom: calc(var(--gap) + var(--ticker-h) + var(--safe-b));
  width: var(--panel-w);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(14, 20, 42, 0.92), rgba(7, 10, 22, 0.94));
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  transform: translateX(calc(100% + var(--gap) * 2));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.55s var(--ease), opacity 0.35s, visibility 0.55s;
}
#panel:not(.hidden) { transform: none; opacity: 1; visibility: visible; }

.panel-views {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.5s var(--ease);
}
#panel[data-view="reader"] .panel-views { transform: translateX(-50%); }
.view { width: 50%; height: 100%; display: flex; flex-direction: column; min-width: 0; }

.scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
.scroll::-webkit-scrollbar { width: 8px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 18px 16px 22px;
}
.panel-flag { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45)); }
.panel-heading { flex: 1; min-width: 0; }
.panel-heading h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-heading p { margin-top: 5px; font-size: 12.5px; color: var(--text-mute); }
.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-dim);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.3s var(--ease);
}
.icon-btn:hover { background: var(--surface-hi); color: var(--text); }
#btn-refresh.spinning .icon { animation: spin 0.8s linear infinite; }
.icon-btn[aria-pressed="true"] { color: var(--warm); }
.icon-btn[aria-pressed="true"] .icon { fill: currentColor; }
.reader-actions { display: flex; gap: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.chips {
  display: flex;
  gap: 8px;
  padding: 0 22px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { color: #07101f; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.panel-head + .scroll { border-top: 1px solid var(--line); }
.chips:not([hidden]) + .scroll { border-top: 0; }

/* ----- Story list ----- */
.stories { padding: 8px 12px 24px; }
.story {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  width: 100%;
  text-align: left;
  padding: 14px 10px;
  border-radius: var(--radius);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
  animation: rise 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 45ms);
}
.story:hover { background: var(--surface-hi); }
.story:last-child { border-bottom-color: transparent; }
.story-top { grid-column: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-mute); font-weight: 500; }
.story-top .rank { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.story-top .src { color: var(--text-dim); }
.story-top .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); }
.story-title { grid-column: 1; font-family: var(--serif); font-size: 18px; line-height: 1.28; font-weight: 600; color: var(--text); }
.story-sum {
  grid-column: 1;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-thumb {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 92px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-hi);
  align-self: center;
}
.story.lead { display: block; padding: 0 0 16px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 8px; background: rgba(255, 255, 255, 0.025); }
.story.lead .story-media { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #14214a, #2a1f4a); }
.story.lead .story-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story.lead .story-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(7, 10, 22, 0.85)); }
.story.lead .story-top, .story.lead .story-title, .story.lead .story-sum { padding: 0 16px; display: flex; }
.story.lead .story-top { margin-top: 14px; }
.story.lead .story-title { display: block; font-size: 23px; line-height: 1.2; margin-top: 6px; }
.story.lead .story-sum { display: -webkit-box; margin-top: 8px; -webkit-line-clamp: 3; }
.badge-top { position: absolute; z-index: 1; left: 14px; top: 14px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #07101f; background: var(--warm); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ----- Ad slots ----- */
.promo-slot { position: relative; display: block; margin: 6px 10px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.025); overflow: hidden; text-decoration: none; color: var(--text); animation: rise 0.5s var(--ease) both; transition: border-color 0.2s, background 0.2s; }
.ad-box { margin: 6px 10px 10px; }
.ad-box .promo-slot { margin: 0; }
.ad-report { display: block; margin: 4px 2px 0 auto; padding: 2px 4px; font-size: 12px; color: var(--text-mute); background: none; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; transition: color 0.2s; }
.ad-report:hover, .ad-report:focus-visible { color: var(--text-dim); }
#ticker-pop .ad-box { margin: 0 12px 10px; }
.report-dialog { margin: auto; width: min(380px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-solid); color: var(--text); }
.report-dialog::backdrop { background: rgba(3, 5, 13, 0.6); }
.report-dialog h3 { font-size: 17px; margin-bottom: 4px; }
.report-dialog p { color: var(--text-dim); font-size: 13px; }
.report-reasons { display: grid; gap: 6px; margin: 12px 0; }
.report-reasons label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; cursor: pointer; }
.report-reasons label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.report-dialog textarea { width: 100%; resize: vertical; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-hi); color: var(--text); font: inherit; font-size: 13.5px; }
.report-dialog .report-msg { margin-top: 8px; color: var(--danger); }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.report-actions .ghost { margin-top: 18px; padding: 9px 14px; color: var(--text-dim); background: none; font-size: 13px; }
.report-actions .btn:disabled { opacity: 0.6; }
a.promo-slot:hover { border-color: var(--line-strong); background: var(--surface-hi); }
.promo-tag { position: absolute; z-index: 1; top: 8px; right: 10px; padding: 2px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); background: rgba(3, 5, 13, 0.7); }
.ad-image img { display: block; width: 100%; height: auto; }
.ad-text { display: flex; gap: 14px; align-items: center; padding: 30px 16px 14px; }
.ad-text .promo-tag { left: 16px; right: auto; top: 11px; padding: 0; background: none; }
.ad-text img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.ad-copy { display: grid; gap: 3px; }
.ad-copy strong { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.ad-copy span { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.ad-copy em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--accent); margin-top: 3px; }
.ad-html iframe { display: block; width: 100%; border: 0; background: transparent; }

.badge-local { padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #9be7b0; background: rgba(74, 222, 128, 0.12); }

/* ----- Skeletons & states ----- */
.skeleton { padding: 18px 22px; display: grid; gap: 18px; }
.sk-row { display: grid; gap: 9px; }
.sk-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-hi) 25%, rgba(255, 255, 255, 0.11) 50%, var(--surface-hi) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-line.big { height: 20px; }
.sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; } .sk-line.w40 { width: 40%; }
.sk-hero { aspect-ratio: 16 / 9; border-radius: 16px; background: linear-gradient(90deg, var(--surface-hi) 25%, rgba(255, 255, 255, 0.11) 50%, var(--surface-hi) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 56px 28px; text-align: center; color: var(--text-dim); }
.empty h3 { font-family: var(--serif); font-size: 22px; color: var(--text); margin-bottom: 8px; }
.empty p { font-size: 13.5px; line-height: 1.6; }
.btn { margin-top: 18px; padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #07101f; background: var(--accent); transition: transform 0.2s var(--ease); }
.btn:hover { transform: translateY(-1px); }

/* ----- Reader ----- */
.reader-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 10px; }
.back-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-dim); transition: all 0.2s; }
.back-btn:hover { color: var(--text); background: var(--surface-hi); }
.reader-hero { margin: 0 14px; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #14214a, #2a1f4a 60%, #4a2c5a); }
.reader-hero.empty-img { display: none; }
.reader-hero img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.4s; }
.reader-hero img.loaded { opacity: 1; }
.reader-article { padding: 20px 24px 40px; }
.reader-kicker { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
.reader-kicker i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); }
.reader-kicker span:last-child { color: var(--text-mute); font-weight: 500; text-transform: none; }
#reader-title { margin-top: 10px; font-family: var(--serif); font-size: 29px; font-weight: 700; line-height: 1.18; letter-spacing: -0.012em; }
.reader-body { margin-top: 18px; font-size: 16px; line-height: 1.7; color: #d5ddef; user-select: text; }
.reader-body p { margin-bottom: 16px; }
.reader-body h1, .reader-body h2, .reader-body h3 { font-family: var(--serif); color: var(--text); margin: 24px 0 10px; line-height: 1.25; }
.reader-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 14px 0; display: block; }
.reader-body a { color: var(--accent); text-underline-offset: 3px; }
.reader-body blockquote { border-left: 3px solid var(--accent); padding-left: 16px; margin: 16px 0; color: var(--text-dim); font-style: italic; }
.reader-body ul, .reader-body ol { margin: 0 0 16px 22px; }
.reader-body .note { display: flex; gap: 10px; padding: 12px 14px; margin-top: 4px; border-radius: 12px; font-size: 13px; line-height: 1.5; color: var(--text-mute); background: var(--surface-hi); }
.cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 14px; text-decoration: none; color: #07101f; background: linear-gradient(135deg, #8cc8ff, var(--accent)); box-shadow: 0 8px 28px rgba(108, 182, 255, 0.3); transition: transform 0.25s var(--ease), box-shadow 0.25s; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(108, 182, 255, 0.45); }

/* ============================================================
   Toasts
   ============================================================ */
#toast-host { position: fixed; z-index: 500; left: 50%; bottom: calc(76px + var(--ticker-h)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 999px; font-size: 13px; background: rgba(8, 12, 26, 0.94); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: rise 0.3s var(--ease); }
.toast.error { border-color: rgba(255, 122, 122, 0.5); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all 0.3s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .search { width: min(300px, 46vw); }
  .brand-name { display: none; }
  .brand { padding: 0 12px; }
}

@media (max-width: 720px) {
  :root { --gap: 12px; }
  #hint, #status { display: none; }
  .live-pill { display: none; }
  .brand { height: 44px; width: 44px; padding: 0; justify-content: center; }
  .search { flex: 1; width: auto; min-width: 0; height: 44px; padding: 0 12px; }
  #topbar { gap: 8px; }
  .top-btn { width: 42px; height: 44px; }
  .tv-btn { width: 42px; padding: 0; justify-content: center; }
  #topbar { right: var(--gap); }
  .search kbd { display: none; }

  /* Controls become a compact vertical pill at the right edge, away from the sheet. */
  #controls { top: auto; bottom: calc(var(--gap) + var(--ticker-h) + var(--safe-b)); left: var(--gap); transform: none; flex-direction: row; border-radius: 999px; gap: 0; padding: 4px; }
  .ctl { width: 38px; height: 38px; }
  .ctl-sep { width: 1px; height: 18px; margin: 0 3px; }
  .ctl::after { display: none; }
  #controls .ctl-sep:first-of-type, #btn-clouds, #btn-zoom-in, #btn-zoom-out { display: none; }

  /* News panel becomes a bottom sheet. */
  #panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 64vh;
    height: 64dvh;
    border-radius: 24px 24px 0 0;
    padding-bottom: var(--safe-b);
    transform: translateY(105%);
  }
  .panel-head { padding: 18px 12px 12px 18px; }
  .panel-heading h2 { font-size: 24px; }
  .story-title { font-size: 17px; }
  .story-thumb { width: 78px; height: 78px; }
  .reader-article { padding: 18px 20px 36px; }
  #reader-title { font-size: 24px; }
  #toast-host { bottom: calc(90px + var(--ticker-h)); }
  .tv-btn { width: 44px; padding: 0; }
  .tv-btn-label { display: none; }
  .ticker-label time { display: none; }
  .ticker-label { padding: 0 12px; }
}

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

/* ============================================================
   Natural-disaster markers
   ============================================================ */
#dz-layer { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.dz {
  position: absolute;
  left: 0;
  top: 0;
  margin: -15px 0 0 -15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 30px;
  pointer-events: auto;
  visibility: hidden;
  will-change: transform;
}
.dz-pin {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--dz);
  box-shadow: 0 0 0 2px rgba(3, 5, 13, 0.85), 0 4px 14px rgba(0, 0, 0, 0.55);
  transition: transform 0.2s var(--ease);
}
.dz-svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dz-time {
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  color: #e8eefb;
  background: rgba(3, 5, 13, 0.8);
  font-variant-numeric: tabular-nums;
}
.dz.no-label .dz-time { display: none; }
.dz:hover .dz-pin, .dz:focus-visible .dz-pin, .dz.active .dz-pin { transform: scale(1.2); }
.dz.active .dz-pin { box-shadow: 0 0 0 2px rgba(3, 5, 13, 0.85), 0 0 0 5px #fff, 0 4px 14px rgba(0, 0, 0, 0.55); }
.dz.alert-orange .dz-pin { box-shadow: 0 0 0 2px rgba(3, 5, 13, 0.85), 0 0 0 4px #fb923c, 0 4px 14px rgba(0, 0, 0, 0.55); }
.dz.alert-red .dz-pin { box-shadow: 0 0 0 2px rgba(3, 5, 13, 0.85), 0 0 0 4px #ef4444, 0 4px 14px rgba(0, 0, 0, 0.55); }
.dz.alert-red .dz-pin::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #ef4444; animation: dzpulse 1.8s ease-out infinite; }
@keyframes dzpulse { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.1); opacity: 0; } }
.dz-earthquake { --dz: #e39a12; }
.dz-tsunami { --dz: #2f7ff0; }
.dz-volcano { --dz: #e5482c; }
.dz-cyclone { --dz: #9a5cf0; }
.dz-flood { --dz: #0fa6c4; }
.dz-wildfire { --dz: #f26b1d; }
.dz-drought { --dz: #b7860b; }
.dz-storm { --dz: #5b63e6; }
.dz-landslide { --dz: #92612a; }
.dz-heat { --dz: #d42f2f; }
.tt-dz { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--dz); }
.tt-dz .dz-svg { width: 14px; height: 14px; }

/* Disaster detail (news panel) */
.dz-badge { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: var(--dz); flex-shrink: 0; }
.dz-badge .dz-svg { width: 16px; height: 16px; }
.dz-badge.big { width: 46px; height: 46px; }
.dz-badge.big .dz-svg { width: 26px; height: 26px; }
.dz-detail { padding: 6px 22px 4px; }
.dz-kind { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.dz-alert { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.dz-alert.alert-red { color: #fca5a5; background: rgba(239, 68, 68, 0.18); }
.dz-alert.alert-orange { color: #fdba74; background: rgba(251, 146, 60, 0.18); }
.dz-alert.alert-green { color: #86efac; background: rgba(74, 222, 128, 0.14); }
.dz-heading { margin-top: 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.dz-summary { margin-top: 6px; font-size: 15px; line-height: 1.65; color: #d5ddef; }
.dz-facts { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.dz-facts dt { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); }
.dz-facts dd { margin-top: 2px; font-size: 13px; line-height: 1.45; }
.dz-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dz-links a { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--accent); border: 1px solid rgba(108, 182, 255, 0.3); }
.dz-links a:hover { background: var(--accent-soft); }
.dz-news-h { margin-top: 20px; padding: 18px 22px 4px; font-family: var(--serif); font-size: 21px; font-weight: 600; border-top: 1px solid var(--line); }
#dz-news { padding: 4px 12px 24px; }
.dz-none { padding: 12px 10px; font-size: 13.5px; line-height: 1.6; color: var(--text-mute); }
.badge-cov { padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #ffcf96; background: rgba(255, 180, 99, 0.14); }

/* ============================================================
   Trending ticker
   ============================================================ */
#ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 16;
  display: flex;
  height: calc(var(--ticker-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(4, 7, 18, 0.86);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.ticker-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffd9a8;
  background: rgba(255, 180, 99, 0.1);
  border-right: 1px solid var(--line);
}
.ticker-label:hover { background: rgba(255, 180, 99, 0.18); }
.ticker-label time { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.ticker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warm); animation: blink 1.6s ease-in-out infinite; }
.ticker-viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
.ticker-track { display: flex; width: max-content; height: 100%; animation: tick var(--dur, 120s) linear infinite; }
#ticker:hover .ticker-track, .ticker-track:focus-within { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
.tick-run { display: flex; align-items: center; padding-right: 32px; }
.tick { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 4px; font-size: 13px; white-space: nowrap; color: var(--text); }
.tick:hover .tick-title, .tick:focus-visible .tick-title { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tick-src { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); }
.tick-cov { display: grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 12px; color: #ffcf96; background: rgba(255, 180, 99, 0.18); }
.tick-sep { width: 4px; height: 4px; margin: 0 18px; border-radius: 50%; background: var(--text-mute); flex-shrink: 0; }
.tick-empty { display: flex; align-items: center; padding: 0 16px; font-size: 13px; color: var(--text-mute); white-space: nowrap; }
#ticker-pop {
  position: fixed;
  z-index: 60;
  width: 340px;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  border-radius: 16px;
  background: rgba(9, 13, 30, 0.97);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  animation: rise 0.2s var(--ease);
}
#ticker-pop img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-hi); }
.pop-body { padding: 14px 16px 16px; }
.pop-kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--accent); }
.pop-kicker i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); }
.pop-kicker span:not(:first-child) { font-weight: 500; color: var(--text-mute); }
#ticker-pop h4 { margin-top: 6px; font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.25; }
#ticker-pop p { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--text-dim); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pop-hint { display: block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
/* Sponsored slot under the story preview; the pop-up takes clicks only when it carries one. */
#ticker-pop:has(.promo-slot) { pointer-events: auto; }
#ticker-pop .promo-slot { margin: 0 12px 12px; animation: none; }
#ticker-pop .ad-image img { aspect-ratio: auto; object-fit: contain; }
#ticker-pop .ad-text { padding: 28px 14px 12px; }
#ticker-pop .ad-text img { width: 56px; height: 56px; aspect-ratio: 1; }

/* ============================================================
   Live TV
   ============================================================ */
.tv { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; }
.tv-backdrop { position: absolute; inset: 0; background: rgba(2, 4, 10, 0.74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tv-window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  height: min(740px, calc(100vh - 40px));
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 20, 42, 0.98), rgba(7, 10, 22, 0.99));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  animation: rise 0.35s var(--ease);
}
.tv-head { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 22px; border-bottom: 1px solid var(--line); }
.tv-head h2 { display: flex; align-items: center; gap: 10px; margin-right: auto; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.tv-head h2 .icon { width: 22px; height: 22px; color: #ff8a8a; }
.tv-head select { width: min(330px, 50vw); height: 38px; padding: 0 12px; border-radius: 10px; font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface-solid); border: 1px solid var(--line-strong); }
.tv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px 1fr; }
.tv-list { overflow-y: auto; padding: 6px 8px 16px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.tv-group { padding: 14px 10px 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.tv-ch { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 12px; text-align: left; transition: background 0.15s; }
.tv-ch:hover { background: var(--surface-hi); }
.tv-ch[aria-selected="true"] { background: var(--accent-soft); }
.tv-ch-avatar { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 12.5px; font-weight: 800; color: #cfe0ff; background: linear-gradient(135deg, #1b2a55, #2c1f52); }
.tv-ch.is-live .tv-ch-avatar { color: #ffd0d0; background: linear-gradient(135deg, #5a1424, #2c1f52); }
.tv-ch-text { display: grid; flex: 1; min-width: 0; }
.tv-ch-name { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tv-ch-status { font-size: 12.5px; color: var(--text-mute); }
.tv-ch.is-live .tv-ch-status { color: #ff9a9a; }
.tv-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 4px rgba(255, 77, 77, 0.18); animation: blink 1.6s ease-in-out infinite; }
.tv-stage { overflow-y: auto; padding: 18px 20px 24px; scrollbar-width: thin; }
.tv-player { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: #000; }
.tv-player iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Full-size ad laid over the player (see initTV in world.js); images and videos stretch to the player's size. */
.tv-screen { position: relative; }
.tv-ad { position: absolute; inset: 0; z-index: 3; overflow: hidden; border-radius: 14px; background: #000; animation: tv-ad-in 0.4s ease; }
.tv-ad[hidden] { display: none; }
.tv-ad-media, .tv-ad-media > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-ad-media img, .tv-ad-media video { display: block; object-fit: fill; }
.tv-ad-media iframe { border: 0; }
.tv-ad-link { position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 14px 18px; text-decoration: none; }
.tv-ad-link span, .tv-ad-tag, .tv-ad-sound { color: #fff; background: rgba(8, 12, 26, 0.55); border: 1px solid rgba(255, 255, 255, 0.28); backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6); }
.tv-ad-link span { padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: background 0.2s; }
.tv-ad-link:hover span { background: rgba(8, 12, 26, 0.8); }
.tv-ad-tag { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.tv-ad-sound { position: absolute; z-index: 2; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 16px; line-height: 1; cursor: pointer; }
.tv-ad-bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.22); }
.tv-ad-bar i { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--accent); animation: tv-ad-bar linear forwards; }
@keyframes tv-ad-in { from { opacity: 0; } }
@keyframes tv-ad-bar { from { transform: scaleX(0); } }
.tv-note { display: grid; justify-items: center; gap: 8px; max-width: 420px; padding: 24px; text-align: center; font-size: 14px; color: var(--text-dim); }
.tv-note span { font-size: 13px; color: var(--text-mute); }
.tv-note-btn { margin-top: 6px; padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; color: #fff; background: #e63b3b; }
.tv-now { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.tv-now-text { flex: 1; min-width: 0; }
.tv-now h3 { font-size: 17px; font-weight: 650; }
.tv-now p { overflow: hidden; font-size: 13px; color: var(--text-mute); text-overflow: ellipsis; white-space: nowrap; }
.tv-yt { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; color: var(--text-dim); border: 1px solid var(--line-strong); }
.tv-yt:hover { color: var(--text); }
.tv-yt .icon { width: 15px; height: 15px; }
.tv-videos { margin-top: 18px; }
.tv-videos .tv-group { padding-left: 0; }
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.tv-vid { display: grid; gap: 6px; text-align: left; }
.tv-vid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--surface-hi); }
.tv-vid span { font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tv-vid small { font-size: 12px; color: var(--text-mute); }
.tv-vid:hover span { color: #fff; }
.tv-loading { display: grid; gap: 12px; padding: 12px; }
.tv-empty { padding: 20px 12px; font-size: 13px; color: var(--text-mute); }

@media (max-width: 720px) {
  .tv { padding: 0; }
  .tv-window { height: 100%; border-radius: 0; }
  .tv-head { flex-wrap: wrap; padding: 10px 10px 10px 16px; padding-top: calc(10px + var(--safe-t)); }
  .tv-head h2 { font-size: 19px; }
  .tv-head select { order: 3; width: 100%; }
  .tv-body { display: flex; flex-direction: column; overflow-y: auto; }
  .tv-stage { overflow: visible; padding: 12px; }
  .tv-list { order: 2; overflow: visible; border-right: 0; border-top: 1px solid var(--line); }
  .dz-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-viewport { overflow-x: auto; }
  .ticker-track { animation: none !important; }
  .dz.alert-red .dz-pin::after { display: none; }
}

/* ============================================================
   Selected-country radar
   ============================================================ */
#radar { position: fixed; left: 0; top: 0; z-index: 6; width: 0; height: 0; pointer-events: none; transition: opacity 0.25s; }
#radar i {
  position: absolute;
  left: -46px;
  top: -46px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 196, 122, 0.85);
  background: radial-gradient(circle, rgba(255, 180, 99, 0.18) 0%, rgba(255, 180, 99, 0) 70%);
  animation: radar 2.6s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
  opacity: 0;
}
#radar i:nth-child(2) { animation-delay: 0.87s; }
#radar i:nth-child(3) { animation-delay: 1.74s; }
#radar b {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff3df;
  box-shadow: 0 0 0 3px rgba(255, 180, 99, 0.9), 0 0 18px 4px rgba(255, 180, 99, 0.6);
}
@keyframes radar { 0% { transform: scale(0.12); opacity: 0.95; } 80% { opacity: 0.12; } 100% { transform: scale(1); opacity: 0; } }

/* ============================================================
   Country overview card
   ============================================================ */
.ov-card {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 14;
  width: 340px;
  overflow-y: auto;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 20, 42, 0.92), rgba(7, 10, 22, 0.94));
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  scrollbar-width: thin;
  transition: opacity 0.25s;
  will-change: transform;
}
.ov-card.collapsed .ov-body { display: none; }
.ov-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; background: rgba(12, 17, 36, 0.96); border-bottom: 1px solid var(--line); }
.ov-card.collapsed .ov-head { border-bottom: 0; }
.ov-flag { font-size: 28px; line-height: 1; }
.ov-titles { flex: 1; min-width: 0; }
.ov-titles h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.15; }
.ov-titles p { margin-top: 2px; font-size: 12px; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-toggle { width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--text-dim); background: var(--surface-hi); }
.ov-toggle:hover { color: var(--text); }
.ov-body { padding: 12px 16px 14px; }
.ov-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ov-stat { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); display: grid; gap: 3px; }
.ov-stat span { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); }
.ov-stat b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-stat small { font-size: 12px; color: var(--text-mute); }
.ov-grid { display: grid; gap: 9px; margin-top: 14px; }
.ov-grid div { display: grid; grid-template-columns: 118px 1fr; gap: 10px; }
.ov-grid dt { font-size: 12px; color: var(--text-mute); }
.ov-grid dd { font-size: 12.5px; line-height: 1.45; color: var(--text); }
.ov-grid dd small { display: block; font-size: 12px; color: var(--text-mute); }
.ov-rel { margin-top: 14px; }
.ov-rel h4 { font-size: 12px; font-weight: 600; color: var(--text-mute); margin-bottom: 7px; }
.ov-rel h4 small { font-weight: 400; }
.ov-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-hi); }
.ov-bar span { display: block; height: 100%; }
.ov-rel ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin-top: 9px; }
.ov-rel li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); min-width: 0; }
.ov-rel li i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.ov-rel li b { margin-left: auto; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.ov-src { margin-top: 12px; font-size: 12px; color: var(--text-mute); }
.ov-more { width: 100%; margin-top: 12px; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
.ov-more:hover { background: rgba(108, 182, 255, 0.22); }
.ov-inline { position: static; width: auto; max-height: none; margin: 10px 12px 4px; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ov-inline summary { padding: 12px 16px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--accent); }
.ov-inline .ov-head { position: static; background: none; }
.ov-inline[open] summary { border-bottom: 1px solid var(--line); }

/* ============================================================
   Temperature legend + readout
   ============================================================ */
#temp-legend {
  position: fixed;
  right: var(--gap);
  bottom: calc(var(--gap) + var(--ticker-h) + var(--safe-b));
  z-index: 15;
  width: 280px;
  padding: 12px 14px 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
body:has(#panel:not(.hidden)) #temp-legend { right: calc(var(--panel-w) + var(--gap) * 2); }
.temp-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.temp-head button { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
/* Same stops as the globe shader (RAMP in globe.js): -40 -25 -10 0 8 15 22 30 38 45 °C on a -40…45 scale */
.temp-bar {
  height: 10px;
  margin-top: 9px;
  border-radius: 5px;
  background: linear-gradient(90deg, #2d1160 0%, #3f4fd0 17.6%, #2f9bf2 35.3%, #19d3c5 47.1%, #5fdc7a 56.5%, #c4e63e 64.7%, #fcc633 72.9%, #f78a1f 82.4%, #e0381f 91.8%, #8c1033 100%);
}
.temp-ticks { position: relative; height: 16px; margin-top: 4px; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.temp-ticks span { position: absolute; transform: translateX(-50%); }
.temp-ticks span:nth-child(1) { left: 0%; transform: none; }
.temp-ticks span:nth-child(2) { left: 23.5%; }
.temp-ticks span:nth-child(3) { left: 47%; }
.temp-ticks span:nth-child(4) { left: 70.6%; }
.temp-ticks span:nth-child(5) { left: 94.1%; }
#temp-updated { margin-top: 4px; font-size: 12px; color: var(--text-mute); }
#temp-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 31;
  padding: 4px 9px;
  margin-left: -24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 14, 30, 0.9);
  border: 1px solid var(--line-strong);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.contact-btn { text-decoration: none; }
.contact-btn .icon { color: #9be7b0; }
.adv-btn .icon { color: #ffc58a; }

@media (max-width: 720px) {
  #temp-legend { left: var(--gap); right: var(--gap); width: auto; bottom: calc(var(--gap) + var(--ticker-h) + var(--safe-b) + 54px); }
}
@media (prefers-reduced-motion: reduce) {
  #radar i { display: none; }
}

/* ---------- Sponsored brand logos on the globe ---------- */
#brand-layer { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.bp { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 40px; margin: -46px 0 0 -20px; pointer-events: auto; visibility: hidden; will-change: transform; }
.bp::after { content: ""; order: -1; position: absolute; top: 36px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top: 8px solid #fff; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }
.bp-logo { display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35), 0 6px 16px rgba(0, 0, 0, 0.55); transition: transform 0.2s var(--ease); }
.bp-logo img { width: 82%; height: 82%; object-fit: contain; }
.bp-logo.office { background: var(--accent, #3b82f6); color: #fff; }
.bp-logo.office svg { width: 58%; height: 58%; }
.bp-logo.big { width: 48px; height: 48px; flex-shrink: 0; }
.bp-name { margin-top: 10px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; color: #fff; background: rgba(3, 5, 13, 0.82); max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.bp-event { width: 44px; margin: -69px 0 0 -22px; }
.bp-event::after { top: 60px; }
.bp-poster { position: relative; display: block; width: 44px; height: 64px; overflow: hidden; border-radius: 4px; border: 2px solid #fff; background: #0c1226; transform: rotate(-3deg); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6); transition: transform 0.2s var(--ease); }
.bp-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bp-date { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; text-transform: uppercase; color: #06101f; background: var(--accent); }
.bp-poster.big { width: 56px; height: 84px; flex-shrink: 0; transform: rotate(-2deg); }
.bp:hover .bp-poster, .bp:focus-visible .bp-poster, .bp.active .bp-poster { transform: rotate(-3deg) scale(1.15); }
.bp.active .bp-poster { border-color: var(--accent); }
.bc-when { margin-top: 2px; font-size: 12.5px; color: var(--text-dim); }
.bp:hover .bp-logo, .bp:focus-visible .bp-logo, .bp.active .bp-logo { transform: scale(1.15); }
.bp.active .bp-logo { box-shadow: 0 0 0 3px var(--accent), 0 6px 16px rgba(0, 0, 0, 0.55); }
.brand-card { position: fixed; left: 0; top: 0; z-index: 30; width: 280px; padding: 16px; border-radius: 16px; background: rgba(12, 18, 38, 0.96); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: rise 0.25s var(--ease) both; }
.bc-head { display: flex; align-items: center; gap: 12px; padding-right: 22px; }
.bc-head div { display: grid; min-width: 0; }
.bc-head small { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.bc-head b { font-size: 15px; overflow-wrap: anywhere; }
.brand-card p { margin-top: 10px; font-size: 13px; color: var(--text-dim); }
.brand-card .bc-details { white-space: pre-line; overflow-wrap: anywhere; max-height: 190px; overflow-y: auto; font-size: 12.5px; line-height: 1.55; }
.bc-details a { color: var(--accent); }
.bc-social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; list-style: none; }
.bc-social a { display: inline-block; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; color: var(--accent); text-decoration: none; }
.bc-social a:hover { background: var(--accent-soft); }
.brand-card { width: min(330px, calc(100vw - 24px)); }
.brand-card .bc-tag { margin-top: 8px; font-size: 13.5px; color: var(--text); }
.bc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bc-actions .bc-go { margin-top: 0; }
.bc-act { display: inline-flex; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--accent); border: 1px solid rgba(108, 182, 255, 0.4); }
.bc-act:hover { background: var(--accent-soft); }
.bc-rows { display: grid; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.bc-rows > div { display: grid; gap: 3px; }
.bc-rows dt { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.bc-rows dd { font-size: 13px; color: var(--text-dim); overflow-wrap: anywhere; }
.bc-rows dd a { color: var(--accent); }
.bc-rows .bc-details { margin-top: 0; max-height: 150px; overflow-y: auto; white-space: pre-line; font-size: 13px; line-height: 1.55; }
.bc-go { display: inline-flex; margin-top: 12px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; color: #06101f; background: var(--accent); }
.bc-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; font-size: 18px; color: var(--text-dim); }
.bc-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* ---------- Language menu ---------- */
.lang-btn { width: auto; display: flex; gap: 6px; padding: 0 13px; border-radius: 999px; color: var(--text); }
.lang-code { font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em; }
.lang-menu { position: fixed; top: calc(var(--gap, 16px) + 58px); right: var(--gap, 16px); z-index: 40; width: 320px; max-height: calc(100vh - 140px); overflow-y: auto; padding: 16px; border-radius: 18px; background: rgba(12, 18, 38, 0.97); border: 1px solid var(--line-strong); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: rise 0.2s var(--ease) both; }
.lang-menu h3 { margin: 2px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 16px; }
.lang-opt { padding: 8px 10px; border-radius: 10px; font-size: 13.5px; text-align: start; color: var(--text-dim); }
.lang-opt:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.lang-opt[aria-checked="true"] { color: #06101f; background: var(--accent); font-weight: 600; }
.lang-hint { margin-bottom: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-mute); }
#content-lang { width: 100%; margin-bottom: 8px; padding: 9px 10px; border-radius: 10px; font: inherit; font-size: 13.5px; color: var(--text); background: rgba(3, 5, 13, 0.6); border: 1px solid var(--line-strong); color-scheme: dark; }
.lang-links { display: none; gap: 2px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.lang-links a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; text-decoration: none; color: var(--text); }
.lang-links a:hover { background: rgba(255, 255, 255, 0.06); }
@media (max-width: 1100px) {
  #topbar .contact-btn .tv-btn-label { display: none; }
  #topbar .contact-btn { width: 46px; padding: 0; justify-content: center; }
}
@media (max-width: 720px) {
  .lang-btn { width: 42px; padding: 0; justify-content: center; }
  .lang-btn .icon { display: none; }
  #topbar .contact-btn { width: 42px; }
}
/* Menu buttons sit in their own row: they scroll sideways on small screens while the logo and search stay in place. */
.top-menus { display: flex; align-items: center; gap: 12px; min-width: 0; }
@media (max-width: 720px) {
  .brand { flex-shrink: 0; }
  .search { flex: 0 1 120px; min-width: 96px; }
  .top-menus {
    flex: 1 1 0;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 6px 4px;
    margin: -6px -4px;
    scroll-padding: 0 4px;
  }
  .top-menus::-webkit-scrollbar { display: none; }
  .top-menus > * { flex-shrink: 0; }
  #controls { max-width: calc(100vw - var(--gap) * 2); overflow-x: auto; scrollbar-width: none; }
  #controls::-webkit-scrollbar { display: none; }
}

/* Small phones: Advertise and Contact move into the language menu to leave room for search. */
@media (max-width: 480px) {
  #topbar .contact-btn { display: none; }
  .lang-links { display: grid; }
  .lang-menu { left: 12px; right: 12px; width: auto; top: 66px; }
}

/* Right-to-left menus (Arabic). Content keeps its own direction through dir="auto". */
:root:lang(ar) #panel,
:root:lang(ar) .ov-card,
:root:lang(ar) .lang-menu,
:root:lang(ar) .tv-window,
:root:lang(ar) #ticker-pop,
:root:lang(ar) .brand-card,
:root:lang(ar) #temp-legend { direction: rtl; }

/* ============================================================
   Liquid Glass
   Tokens live in /css/glass.css. Everything floats as translucent glass over the globe:
   a bright specular edge, a thin rim light, and a blur that saturates what is behind it.
   ============================================================ */
:root { --ticker-h: 62px; --radius: 18px; --radius-lg: 32px; --accent: #7cc0ff; }

/* Surfaces */
.brand, .search, .top-btn, #controls, #status, #hint, #temp-legend, .ctl::after { background: var(--lg-fill); }
#panel, .ov-card, .brand-card, #ticker-pop, .tv-window, .report-dialog, .lang-menu, #search-results, .toast, #tooltip, #temp-tip { background: var(--lg-fill-strong); }
#ticker { background: var(--lg-fill); }
.brand, .search, .top-btn, #controls, #status, #hint, #temp-legend, #panel, .ov-card, .brand-card, #ticker, #ticker-pop, .tv-window, .report-dialog, .lang-menu, #search-results, .toast, #tooltip, #temp-tip, .ctl::after {
  border-color: transparent;
  box-shadow: var(--lg-shadow);
  backdrop-filter: var(--lg-filter);
  -webkit-backdrop-filter: var(--lg-filter);
}
.search:focus-within { background: var(--lg-fill-strong); box-shadow: var(--lg-shadow), 0 0 0 3px rgba(124, 192, 255, 0.35); }
.ctl::after { border: 0; }

/* Rim light: a gradient hairline around the edge. Skipped on scrolling surfaces, where it would scroll away. */
.brand::before, .search::before, .top-btn::before, #controls::before, #status::before, #hint::before, #temp-legend::before, #panel::before,
.brand-card::before, #ticker::before, #ticker-pop::before, .tv-window::before, .report-dialog::before, .toast::before, #tooltip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1.2px;
  background: var(--lg-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.brand, .toast { position: relative; }

/* Top bar */
.brand { height: 50px; }
.brand-name { font-weight: 700; letter-spacing: -0.02em; }
.brand-mark { stroke: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35)); }
.live-pill { color: #ffd9d6; background: rgba(255, 69, 58, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.live-pill i { background: #ff453a; box-shadow: 0 0 8px #ff453a; }
.search, .top-btn { height: 50px; color: rgba(255, 255, 255, 0.8); }
.top-btn { min-width: 50px; }
.top-btn:hover { color: #fff; border-color: transparent; background: var(--lg-fill-strong); transform: translateY(-1px); }
.top-btn { transition: color 0.2s, transform 0.25s var(--lg-ease); }
.search input::placeholder { color: rgba(255, 255, 255, 0.78); }
.search kbd { color: #fff; border: 0; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.tv-btn .icon { color: #ffb463; }
#saved-count { box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 2px 6px rgba(0, 0, 0, 0.35); }
#search-results { border-radius: 24px; padding: 8px; }
#search-results li { border-radius: 14px; }
#search-results li.active, #search-results li:hover { background: rgba(255, 255, 255, 0.14); box-shadow: var(--lg-inset-edge); }

/* Controls */
#controls { padding: 8px; gap: 5px; }
.ctl { width: 42px; height: 42px; color: rgba(255, 255, 255, 0.78); }
.ctl:hover { color: #fff; background: rgba(255, 255, 255, 0.16); box-shadow: var(--lg-inset-edge); }
.ctl[aria-pressed="true"] { color: #fff; background: linear-gradient(180deg, rgba(120, 190, 255, 0.55), rgba(40, 130, 255, 0.35)); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7), 0 0 18px rgba(60, 150, 255, 0.5); }
.ctl-sep { background: rgba(255, 255, 255, 0.28); }
.ctl::after { border-radius: 999px; padding: 6px 12px; }
#status, #hint { color: rgba(255, 255, 255, 0.85); }
#hint { padding: 11px 20px; }
#status { padding: 10px 16px; }

/* News panel */
#panel { box-shadow: var(--lg-shadow), 0 30px 90px rgba(0, 0, 0, 0.4); }
.panel-heading h2 { font-weight: 700; letter-spacing: -0.025em; }
.panel-heading p { color: rgba(255, 255, 255, 0.7); }
.icon-btn { color: #fff; background: rgba(255, 255, 255, 0.12); box-shadow: var(--lg-inset-edge); }
.icon-btn:hover { background: rgba(255, 255, 255, 0.22); }
.chips { border-bottom-color: rgba(255, 255, 255, 0.12); }
.chip { color: rgba(255, 255, 255, 0.82); border-color: transparent; background: rgba(255, 255, 255, 0.1); box-shadow: var(--lg-inset-edge); }
.chip:hover { color: #fff; background: rgba(255, 255, 255, 0.18); border-color: transparent; }
.chip[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--lg-tint); box-shadow: var(--lg-tint-edge); }
.panel-head + .scroll, .story { border-color: rgba(255, 255, 255, 0.1); }
.story { border-radius: 20px; }
.story:hover { background: rgba(255, 255, 255, 0.09); box-shadow: var(--lg-inset-edge); }
.story-title { font-weight: 650; letter-spacing: -0.015em; }
.story-thumb { border-radius: 16px; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3); }
.story.lead { border-color: transparent; border-radius: 28px; background: rgba(255, 255, 255, 0.07); box-shadow: var(--lg-inset-edge), 0 8px 24px rgba(0, 0, 0, 0.25); }
.story.lead .story-title { letter-spacing: -0.02em; }
.badge-top { background: rgba(255, 180, 99, 0.9); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7); }
.badge-local { color: #b8ffd0; background: rgba(74, 222, 128, 0.22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.back-btn { color: #fff; background: rgba(255, 255, 255, 0.1); box-shadow: var(--lg-inset-edge); }
.back-btn:hover { background: rgba(255, 255, 255, 0.2); }
.reader-hero { border-radius: 26px; }
#reader-title { letter-spacing: -0.025em; }
.btn, .cta, .bc-go, .tv-note-btn { color: #fff; border: 0; background: var(--lg-tint); box-shadow: var(--lg-tint-edge); text-shadow: 0 1px 2px rgba(0, 40, 120, 0.4); }
.cta:hover, .btn:hover { box-shadow: var(--lg-tint-edge), 0 12px 30px rgba(10, 110, 255, 0.5); }
.tv-note-btn { background: linear-gradient(180deg, rgba(255, 120, 110, 0.95), rgba(230, 50, 50, 0.85)); box-shadow: inset 0 1.5px 1px rgba(255, 255, 255, 0.65), 0 8px 22px rgba(230, 59, 59, 0.4); }

/* Ads and disaster detail */
.promo-slot { border-color: transparent; border-radius: 26px; background: rgba(255, 255, 255, 0.07); box-shadow: var(--lg-inset-edge); }
a.promo-slot:hover { border-color: transparent; background: rgba(255, 255, 255, 0.13); }
.promo-tag { color: rgba(255, 255, 255, 0.8); background: rgba(10, 16, 36, 0.55); }
.ad-copy em { color: #9cd0ff; }
.dz-facts { border-color: transparent; border-radius: 22px; background: rgba(255, 255, 255, 0.07); box-shadow: var(--lg-inset-edge); }
.dz-links a, .bc-act, .tv-yt { color: #fff; border-color: transparent; background: rgba(255, 255, 255, 0.14); box-shadow: var(--lg-inset-edge); }
.dz-links a:hover, .bc-act:hover, .tv-yt:hover { background: rgba(255, 255, 255, 0.24); }
.dz-news-h { border-top-color: rgba(255, 255, 255, 0.12); }
.report-dialog { border-radius: 32px; }
.report-dialog::backdrop { background: rgba(2, 4, 12, 0.5); backdrop-filter: blur(6px); }
.report-reasons label { border-color: transparent; background: rgba(255, 255, 255, 0.08); box-shadow: var(--lg-inset-edge); }
.report-reasons label:has(input:checked) { border-color: rgba(150, 210, 255, 0.6); background: var(--lg-tint-soft); }
.report-dialog textarea { border-color: var(--lg-line); background: var(--lg-field); box-shadow: var(--lg-field-edge); }

/* Pins on the globe */
.dz-pin {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 55%), color-mix(in srgb, var(--dz) 74%, transparent);
  backdrop-filter: blur(8px) saturate(1.6);
  -webkit-backdrop-filter: blur(8px) saturate(1.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65), 0 0 0 1.5px rgba(255, 255, 255, 0.5), 0 6px 14px rgba(0, 0, 0, 0.45);
}
.dz-time, .bp-name { color: #fff; background: rgba(8, 13, 30, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.bp-logo, .bp-poster { box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.75), 0 8px 20px rgba(0, 0, 0, 0.5); }
.bp-poster { border-color: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 255, 255, 0.22); }
.bp-poster.big { border-radius: 8px; }
.bp-date { background: rgba(124, 192, 255, 0.95); }
.bp.active .bp-logo { box-shadow: 0 0 0 3px #7cc0ff, 0 6px 16px rgba(0, 0, 0, 0.55); }

/* Cards that open from the globe */
.brand-card { border-radius: 32px; padding: 20px; }
.bc-x { color: #fff; background: rgba(255, 255, 255, 0.14); box-shadow: var(--lg-inset-edge); }
.bc-x:hover { background: rgba(255, 255, 255, 0.26); }
.bc-rows { border-top-color: rgba(255, 255, 255, 0.2); }
.bc-social a { color: #fff; border-color: transparent; background: rgba(255, 255, 255, 0.14); box-shadow: var(--lg-inset-edge); }
.bc-head b { letter-spacing: -0.02em; }
.bc-actions .bc-go, .bc-actions .bc-act { padding: 10px 16px; }
.ov-card { border-radius: 30px; box-shadow: var(--lg-shadow), 0 24px 70px rgba(0, 0, 0, 0.4); }
.ov-head { background: rgba(10, 16, 36, 0.5); border-bottom-color: rgba(255, 255, 255, 0.14); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.ov-titles h3 { font-weight: 700; letter-spacing: -0.02em; }
.ov-toggle { color: #fff; background: rgba(255, 255, 255, 0.14); box-shadow: var(--lg-inset-edge); }
.ov-stat { border-color: transparent; border-radius: 18px; background: rgba(255, 255, 255, 0.08); box-shadow: var(--lg-inset-edge); }
.ov-more { color: #fff; background: var(--lg-tint-soft); box-shadow: var(--lg-inset-edge); }
.ov-more:hover { background: linear-gradient(135deg, rgba(100, 180, 255, 0.5), rgba(100, 180, 255, 0.22)); }
.ov-inline { border-radius: 24px; box-shadow: var(--lg-inset-edge); backdrop-filter: none; }
.ov-inline .ov-head { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
#temp-legend { border-radius: 26px; padding: 14px 16px 12px; }
.temp-bar { height: 12px; border-radius: 6px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.2); }
.temp-head button { color: #fff; background: rgba(255, 255, 255, 0.16); box-shadow: var(--lg-inset-edge); }
#tooltip, #temp-tip { border-radius: 999px; }
#tooltip { padding: 8px 14px; }

/* Ticker: a floating capsule */
#ticker { left: var(--gap); right: var(--gap); bottom: calc(var(--gap) + var(--safe-b)); height: 46px; padding-bottom: 0; border: 0; border-radius: 999px; overflow: hidden; }
.ticker-label { margin: 5px; border-right: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, rgba(255, 180, 99, 0.55), rgba(255, 140, 40, 0.28)); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55); }
.ticker-label:hover { background: linear-gradient(135deg, rgba(255, 190, 120, 0.7), rgba(255, 150, 50, 0.4)); }
.ticker-label time { color: rgba(255, 255, 255, 0.75); }
.tick { color: #fff; }
.tick-src { color: #9cd0ff; }
.tick-cov { color: #fff; background: rgba(255, 180, 99, 0.35); }
#ticker-pop { border-radius: 28px; }
.pop-kicker { color: #9cd0ff; }

/* Live TV */
.tv-backdrop { background: rgba(2, 4, 12, 0.5); backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2); }
.tv-window { border-radius: 36px; border: 0; background: var(--lg-fill-strong); box-shadow: var(--lg-shadow), 0 40px 120px rgba(0, 0, 0, 0.5); }
.tv-head, .tv-list { border-color: rgba(255, 255, 255, 0.12); }
.tv-head h2 { font-weight: 700; letter-spacing: -0.02em; }
.tv-head select, #content-lang { color: #fff; border-color: var(--lg-line); background: var(--lg-field); box-shadow: var(--lg-field-edge); }
.tv-ch { border-radius: 18px; }
.tv-ch:hover { background: rgba(255, 255, 255, 0.1); }
.tv-ch[aria-selected="true"] { background: var(--lg-tint-soft); box-shadow: var(--lg-inset-edge); }
.tv-ch-avatar { border-radius: 14px; box-shadow: var(--lg-inset-edge); }
.tv-player, .tv-ad { border-radius: 24px; }
.tv-player { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.tv-vid img { border-radius: 16px; }

/* Language menu */
.lang-menu { border-radius: 30px; }
.lang-opt { border-radius: 14px; color: rgba(255, 255, 255, 0.82); }
.lang-opt:hover { color: #fff; background: rgba(255, 255, 255, 0.14); }
.lang-opt[aria-checked="true"] { color: #fff; background: var(--lg-tint); box-shadow: var(--lg-tint-edge); }
.lang-links { border-top-color: rgba(255, 255, 255, 0.14); }
.lang-links a:hover { background: rgba(255, 255, 255, 0.12); }
.toast { padding: 12px 20px; }
.toast.error { box-shadow: var(--lg-shadow), 0 0 0 1.5px rgba(255, 122, 122, 0.55); }

/* The panel sits under the top bar instead of overlapping its buttons. */
@media (min-width: 721px) {
  #panel { top: calc(var(--gap) * 2 + 50px + var(--safe-t)); }
}
@media (max-width: 720px) {
  #panel { border-radius: 32px 32px 0 0; }
  .top-btn { min-width: 44px; height: 46px; }
  .brand { height: 46px; width: 46px; }
  .search { height: 46px; }
  #ticker { height: 44px; }
}
@media (prefers-reduced-transparency: reduce) {
  .dz-pin, .dz-time, .bp-name, .ov-head, .tv-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ============================================================
   Live Radio — shares the Live TV window; these are the search box, the player deck and the on-air dot
   ============================================================ */
.radio-btn { position: relative; }
.radio-btn .icon { color: #8fe3b4; }
.radio-btn.is-playing::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #4fd68a; box-shadow: 0 0 0 3px rgba(79, 214, 138, 0.25); animation: blink 1.6s ease-in-out infinite; }
.radio-side { padding-top: 0; }
.radio-search { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; height: 42px; margin: 0 2px 6px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-solid); }
.radio-search .icon { flex-shrink: 0; width: 16px; height: 16px; color: var(--text-mute); }
.radio-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; }
.radio-search:focus-within { border-color: var(--accent); }
.radio .tv-ch-avatar { position: relative; overflow: hidden; }
.radio .tv-ch-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 4px; object-fit: contain; background: #fff; }
.radio-deck { display: grid; justify-items: center; gap: 6px; padding: 40px 20px 30px; text-align: center; border-radius: 24px; background: radial-gradient(120% 90% at 50% 0%, rgba(79, 214, 138, 0.14), transparent 70%), rgba(255, 255, 255, 0.04); }
.radio-art { position: relative; display: grid; place-items: center; width: 148px; height: 148px; margin-bottom: 8px; overflow: hidden; border-radius: 32px; color: #8fe3b4; background: linear-gradient(135deg, #143a3c, #1d2a55); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); }
.radio-art .icon { width: 56px; height: 56px; }
.radio-art img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 16px; object-fit: contain; background: #fff; }
.radio-eq { display: flex; align-items: flex-end; gap: 4px; height: 28px; opacity: 0.3; }
.radio-eq i { width: 5px; height: 100%; border-radius: 3px; background: #4fd68a; transform-origin: bottom; transform: scaleY(0.2); }
.radio-deck.is-playing .radio-eq { opacity: 1; }
.radio-deck.is-playing .radio-eq i { animation: radio-eq 0.9s ease-in-out infinite alternate; }
.radio-eq i:nth-child(2) { animation-delay: -0.3s; } .radio-eq i:nth-child(3) { animation-delay: -0.6s; } .radio-eq i:nth-child(4) { animation-delay: -0.15s; } .radio-eq i:nth-child(5) { animation-delay: -0.45s; }
@keyframes radio-eq { from { transform: scaleY(0.2); } to { transform: scaleY(1); } }
.radio-deck h3 { max-width: 100%; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.radio-deck p { max-width: 100%; font-size: 13px; color: var(--text-mute); }
.radio-status { min-height: 18px; font-weight: 600; color: #6fe0a0 !important; }
.radio-status.is-error { color: #ff9a9a !important; }
.radio-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; }
.radio-play { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: #fff; background: var(--accent); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); transition: transform 0.15s; }
.radio-play:hover:not(:disabled) { transform: scale(1.06); }
.radio-play:disabled { opacity: 0.4; cursor: default; }
.radio-play .icon { width: 28px; height: 28px; }
.radio-vol { display: flex; align-items: center; gap: 8px; color: var(--text-mute); }
.radio-vol .icon { width: 18px; height: 18px; }
.radio-vol input { width: 130px; accent-color: var(--accent); }
.radio-credit { margin-top: 14px; text-align: center; font-size: 12px; color: var(--text-mute); }
@media (prefers-reduced-motion: reduce) { .radio-deck.is-playing .radio-eq i { animation: none; transform: scaleY(0.7); } }
.radio .tv-head h2 .icon { color: #8fe3b4; }

/* Live Radio ad break: the station is dropped and this card plays in its place (see initRadio in world.js) */
.radio-ad { position: relative; display: grid; justify-items: center; gap: 10px; width: min(420px, 100%); margin-top: 6px; padding: 16px 18px 20px; overflow: hidden; border-radius: 20px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.07); animation: tv-ad-in 0.4s ease; }
.radio-ad[hidden] { display: none; }
.radio-ad strong { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.radio-ad-tag { padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; color: #fff; background: rgba(255, 255, 255, 0.14); }
.radio-ad a { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; color: #fff; background: var(--accent); }
.radio-ad-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.18); }
.radio-ad-bar i { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--accent); animation: tv-ad-bar linear forwards; }
.radio-deck.is-ad .radio-art { color: #ffb463; }
.radio-deck.is-ad .radio-eq { opacity: 0.3; }
.radio-deck.is-ad .radio-eq i { animation: none; }

/* ---- Live TV miniplayer ---- */
/* Minimize shrinks the TV window to a corner player (like YouTube's miniplayer); the globe stays usable and the stream keeps playing. */
.tv-mini-bar { display: none; }
.tv.is-mini {
  inset: auto var(--gap) calc(var(--gap) + var(--ticker-h) + var(--safe-b) + 14px) auto;
  display: block;
  width: min(360px, calc(100vw - 2 * var(--gap)));
  padding: 0;
  pointer-events: none;
}
.tv.is-mini .tv-backdrop, .tv.is-mini .tv-head, .tv.is-mini .tv-list, .tv.is-mini .tv-now, .tv.is-mini .tv-videos { display: none; }
.tv.is-mini .tv-window { width: 100%; height: auto; border-radius: 22px; pointer-events: auto; animation: rise 0.3s var(--ease); }
.tv.is-mini .tv-body { display: block; overflow: hidden; }
.tv.is-mini .tv-stage { padding: 0; overflow: hidden; }
.tv.is-mini .tv-player, .tv.is-mini .tv-ad { border-radius: 0; }
.tv.is-mini .tv-mini-bar { display: flex; align-items: center; gap: 2px; padding: 5px 6px 5px 16px; }
.tv-mini-title { flex: 1; min-width: 0; overflow: hidden; font-size: 13.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tv-mini-bar .icon-btn { width: 34px; height: 34px; }
.tv-mini-bar .icon-btn .icon { width: 17px; height: 17px; }
.tv.is-mini .tv-ad-tag { top: 8px; left: 8px; padding: 3px 9px; font-size: 12px; }
.tv.is-mini .tv-ad-sound { top: 6px; right: 6px; width: 32px; height: 32px; font-size: 14px; }
.tv.is-mini .tv-ad-link span { padding: 6px 12px; font-size: 12.5px; }

@media (max-width: 720px) {
  .tv.is-mini { bottom: calc(var(--gap) + var(--ticker-h) + var(--safe-b) + 72px); width: min(300px, calc(100vw - 2 * var(--gap))); } /* clear the map controls */
}

/* Account button: a green dot while a visitor is signed in. */
#btn-account { position: relative; }
#btn-account.signed-in::after { content: ""; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 2px rgba(8, 13, 30, 0.9); }

/* ============================================================
   Latest-disaster notification (macOS style banner + edge tab)
   ============================================================ */
#dz-note { position: fixed; z-index: 19; left: 0; top: calc(var(--gap) + var(--safe-t) + 46px + 10px); pointer-events: none; }
#dz-note > * { pointer-events: auto; }
.dzn-card {
  position: absolute;
  left: var(--gap);
  top: 0;
  width: min(340px, calc(100vw - var(--gap) * 2));
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 4px 11px;
  align-items: center;
  padding: 11px 14px 11px 11px;
  text-align: left;
  color: var(--text);
  border-radius: 18px;
  background: rgba(34, 38, 52, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.55s var(--ease), opacity 0.4s;
}
#dz-note:not(.min) .dzn-card { animation: dzn-in 0.6s var(--ease); }
@keyframes dzn-in { from { transform: translateX(calc(-100% - var(--gap) - 12px)); opacity: 0; } }
#dz-note.min .dzn-card { transform: translateX(calc(-100% - var(--gap) - 12px)); opacity: 0; pointer-events: none; }
.dzn-card:hover { background: rgba(44, 49, 66, 0.7); }
.dzn-ico { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #ff8a5c, #e0381f); box-shadow: 0 2px 8px rgba(224, 56, 31, 0.45); }
.dzn-ico .dz-svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dzn-app { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-mute); align-self: end; }
.dzn-when { font-size: 11.5px; color: var(--text-mute); align-self: end; font-variant-numeric: tabular-nums; }
.dzn-title { grid-column: 2 / 4; font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dzn-sub { grid-column: 2 / 4; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dzn-tab {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 0 14px 14px 0;
  background: linear-gradient(160deg, #ff8a5c, #e0381f);
  box-shadow: 0 6px 20px rgba(224, 56, 31, 0.4);
  transform: translateX(-100%);
  opacity: 0;
  transition: transform 0.45s var(--ease) 0.15s, opacity 0.2s 0.15s;
}
.dzn-tab .icon { width: 19px; height: 19px; }
.dzn-tab:hover { width: 40px; }
#dz-note.min .dzn-tab { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .dzn-card, .dzn-tab { transition: none; } }
