/* ── Shared tokens + base styles ────────────────────────────────────
   All color + typography vars are set by themes/apply.js from the
   active theme (embed.js or tv.js). Per-layout grids live in
   css/layouts/<name>.css and are loaded by their respective HTML page. */

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  color: var(--text-strong);
}

.panel {
  position: relative;
  overflow: hidden;
  background: var(--bg);    /* fallback; per-panel rules below override */
  min-height: 0;
}

#panel-hud      { background: var(--bg-hud); overflow: auto; }
#panel-timeline { background: var(--bg-timeline); }
#panel-map      { background: var(--bg-map); }

.embed-headline {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 11;
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-strong);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.embed-legend {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  user-select: none;
}
.embed-legend button {
  background: none;
  border: 0;
  padding: 2px 0;
  margin: 0;
  font: inherit;
  letter-spacing: var(--letter-spacing-base);
  cursor: pointer;
  text-align: left;
  opacity: 0.85;
  transition: opacity 120ms ease;
}
.embed-legend button:hover,
.embed-legend button.is-active { opacity: 1; }
.embed-legend button:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }

/* Map zoom buttons — square +/- pair, style mirrors the timeline's
   minimap zoom buttons (.timeline-mini-zoom in ui/timeline/index.js). */
.map-zoom-buttons {
  display: flex;
  gap: 0;
  font-family: var(--font-family);
  user-select: none;
}
.map-zoom-buttons button {
  border: 0;
  padding: 0;
  background: var(--control-bg);
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border-hair);
  transition: background 0.15s, color 0.15s;
}
.map-zoom-buttons button:first-child { border-left: 0; }
.map-zoom-buttons button:hover {
  background: var(--control-hover);
  color: var(--text-primary);
}
.map-zoom-buttons button:active {
  background: var(--control-active);
  color: var(--text-strong);
}
