:root {
  --ink: #f6f2e9;
  --ink-soft: #b8b5ae;
  --ink-faint: #777a7b;
  --paper: #090d12;
  --panel: #10151b;
  --panel-2: #151b22;
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .18);
  --amber: #ffae57;
  --amber-soft: #ffd5a2;
  --blue: #8cbfe9;
  --success: #79d5a2;
  --danger: #ff876f;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --font: "Helvetica Neue", "Avenir Next", Avenir, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-width: 320px;
  color-scheme: dark;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 8%, rgba(56, 88, 118, .13), transparent 30rem),
    linear-gradient(180deg, #080c11 0%, #0b1016 50%, #080b0f 100%);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { display: block; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #0c1014;
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

.topbar {
  position: sticky;
  z-index: 1000;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 12px clamp(18px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 17, .83);
  backdrop-filter: blur(24px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 186, 112, .38);
  border-radius: 50%;
  background: radial-gradient(circle at 67% 28%, #fff 0 2px, transparent 2.5px), #17110d;
  box-shadow: inset 0 0 18px rgba(255, 165, 77, .2), 0 0 24px rgba(255, 165, 77, .08);
}

.brand-mark::before {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 174, 87, .7);
  content: "";
}

.brand-mark span {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #0b0f13;
  transform: translate(-2px, 1px);
}

.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-size: 13px; letter-spacing: .22em; }
.brand-copy span { margin-top: 6px; color: var(--ink-faint); font-size: 9px; letter-spacing: .22em; }

.topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(121, 213, 162, .08), 0 0 12px rgba(121, 213, 162, .35);
}

.topbar-divider { width: 1px; height: 12px; background: var(--line-strong); }
.topbar-actions { display: flex; justify-content: flex-end; gap: 8px; }

.language-picker {
  position: relative;
  display: grid;
  min-width: 58px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
}
.language-picker::after { position: absolute; right: 11px; color: var(--ink-faint); content: "⌄"; font-size: 9px; pointer-events: none; }
.language-picker select {
  width: 100%;
  height: 100%;
  padding: 0 23px 0 12px;
  appearance: none;
  border: 0;
  outline: 0;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font: 700 9px/1 var(--font);
  letter-spacing: .12em;
}
.language-picker:focus-within { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(255, 174, 87, .12); }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .02em;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.button:hover { transform: translateY(-1px); }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button-ghost { border-color: var(--line); background: rgba(255, 255, 255, .025); }
.button-ghost:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .06); }
.button-light { color: #11151a; background: var(--ink); }
.button-light:hover { background: #fff; }
.button-compact { min-height: 40px; padding: 0 13px; }
.button-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; }

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 370px);
  max-width: 1760px;
  margin: 0 auto;
  gap: clamp(18px, 2vw, 30px);
  padding: clamp(18px, 2.5vw, 40px) clamp(18px, 3vw, 48px) 34px;
}

.app-shell::before {
  position: fixed;
  z-index: -1;
  top: 76px;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    linear-gradient(180deg, rgba(6, 10, 15, .78), rgba(6, 10, 15, .97)),
    url("../images/eclipse-spain-hero.webp") center 55% / cover no-repeat;
  opacity: .32;
  content: "";
}

.workspace { min-width: 0; }

.scene-card {
  position: relative;
  isolation: isolate;
  height: clamp(480px, 62vh, 800px);
  min-height: 480px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-xl);
  background: #142434;
  box-shadow: var(--shadow);
  user-select: none;
  touch-action: none;
}

#skyCanvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; cursor: grab; }
#skyCanvas:active { cursor: grabbing; }

.scene-vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 5, 8, .3), transparent 26%, transparent 60%, rgba(3, 5, 8, .75)),
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .28) 100%);
}

.scene-grid { position: absolute; z-index: 3; inset: 0; pointer-events: none; opacity: .16; }
.scene-grid i { position: absolute; background: #fff; }
.scene-grid i:nth-child(1), .scene-grid i:nth-child(2) { top: 0; bottom: 0; width: 1px; }
.scene-grid i:nth-child(1) { left: 33.333%; }
.scene-grid i:nth-child(2) { left: 66.666%; }
.scene-grid i:nth-child(3), .scene-grid i:nth-child(4) { right: 0; left: 0; height: 1px; }
.scene-grid i:nth-child(3) { top: 33.333%; }
.scene-grid i:nth-child(4) { top: 66.666%; }

.scene-topline {
  position: absolute;
  z-index: 5;
  top: 24px;
  right: 24px;
  left: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.location-chip {
  display: flex;
  max-width: min(390px, 65%);
  min-height: 54px;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(7, 10, 14, .48);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .12);
  backdrop-filter: blur(16px);
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
  transition: background .2s ease, border-color .2s ease;
}

.location-chip:hover { border-color: rgba(255, 255, 255, .26); background: rgba(7, 10, 14, .65); }
.location-chip > svg:first-child { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--amber-soft); stroke-width: 1.7; }
.location-chip span { display: grid; min-width: 0; flex: 1; }
.location-chip strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.location-chip small { margin-top: 2px; color: rgba(255, 255, 255, .56); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.location-chip .chevron { width: 14px; height: 14px; fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 1.8; }

.scene-badges { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.data-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  color: rgba(255, 255, 255, .67);
  background: rgba(7, 10, 14, .45);
  backdrop-filter: blur(15px);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.data-badge i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px rgba(255, 174, 87, .6); }
.data-badge.is-ready i { background: var(--success); box-shadow: 0 0 10px rgba(121, 213, 162, .6); }
.data-badge.is-fallback i { background: var(--danger); }

.icon-glass {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  place-items: center;
  color: var(--ink);
  background: rgba(7, 10, 14, .45);
  backdrop-filter: blur(15px);
  cursor: pointer;
}
.icon-glass svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.scene-readout {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: clamp(24px, 4vw, 62px);
  max-width: 330px;
  pointer-events: none;
  transform: translateY(-42%);
}

.phase-tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 198, 137, .33);
  border-radius: 999px;
  color: #ffd29c;
  background: rgba(12, 16, 21, .7);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .16);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.phase-tag.is-total { color: #e9e0ff; border-color: rgba(214, 190, 255, .44); background: rgba(30, 22, 45, .54); }
.time-lockup { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
.time-lockup strong { font-size: clamp(42px, 6vw, 78px); font-weight: 300; line-height: .95; letter-spacing: -.055em; text-shadow: 0 4px 26px rgba(0, 0, 0, .3); }
.time-lockup span { color: rgba(255, 255, 255, .57); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.scene-readout p { max-width: 270px; margin: 12px 0 0; color: rgba(255, 255, 255, .68); font-size: 11px; line-height: 1.55; text-shadow: 0 2px 8px rgba(0, 0, 0, .4); }

.reticle { position: absolute; z-index: 4; top: 50%; left: 50%; width: 46px; height: 46px; pointer-events: none; transform: translate(-50%, -50%); opacity: .45; }
.reticle::before, .reticle::after { position: absolute; border: 1px solid rgba(255, 255, 255, .8); border-radius: 50%; content: ""; }
.reticle::before { inset: 6px; border-style: dashed; }
.reticle::after { inset: 20px; background: rgba(255, 255, 255, .8); }
.reticle span::before, .reticle span::after { position: absolute; background: rgba(255, 255, 255, .7); content: ""; }
.reticle span::before { top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%); }
.reticle span::after { top: 50%; right: 0; left: 0; height: 1px; transform: translateY(-50%); }

.scene-metrics {
  position: absolute;
  z-index: 5;
  right: 24px;
  bottom: 22px;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(5, 8, 11, .48);
  backdrop-filter: blur(18px);
}
.scene-metrics div { display: grid; min-width: 82px; gap: 2px; padding: 10px 13px; border-left: 1px solid rgba(255, 255, 255, .1); }
.scene-metrics div:first-child { border-left: 0; }
.scene-metrics small { color: rgba(255, 255, 255, .48); font-size: 8px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.scene-metrics strong { font-size: 13px; font-weight: 560; }

.eclipse-inset {
  position: absolute;
  z-index: 6;
  bottom: 22px;
  left: 24px;
  display: grid;
  width: 116px;
  min-height: 134px;
  justify-items: center;
  padding: 9px 9px 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  color: #f7f2e9;
  background: rgba(4,7,10,.62);
  box-shadow: 0 14px 36px rgba(0,0,0,.2);
  backdrop-filter: blur(16px);
  pointer-events: none;
}
.eclipse-inset span { color: rgba(255,255,255,.55); font-size: 7px; font-weight: 750; letter-spacing: .16em; }
.eclipse-inset canvas { width: 88px; height: 88px; margin: 2px 0; }
.eclipse-inset strong { font-size: 11px; font-weight: 620; font-variant-numeric: tabular-nums; }

.drag-hint {
  position: absolute;
  z-index: 6;
  bottom: 170px;
  left: 24px;
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255, 255, 255, .55);
  background: rgba(5, 8, 11, .35);
  backdrop-filter: blur(12px);
  font-size: 9px;
  letter-spacing: .06em;
  transition: opacity .6s ease, transform .6s ease;
}
.drag-hint svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.drag-hint.is-hidden { opacity: 0; transform: translateY(8px); }

.timeline-card {
  margin-top: 18px;
  padding: 18px 24px 17px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: var(--radius-lg);
  background: rgba(15, 20, 26, .88);
  box-shadow: 0 14px 45px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px);
}

.timeline-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.eyebrow { color: var(--ink-faint); font-size: 8px; font-weight: 760; letter-spacing: .2em; }
.timeline-heading h1 { margin: 5px 0 0; font-size: 17px; font-weight: 540; letter-spacing: -.02em; }
.timeline-now { display: grid; justify-items: end; }
.timeline-now strong { font-size: 16px; font-weight: 550; font-variant-numeric: tabular-nums; }
.timeline-now span { color: var(--ink-faint); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }

.time-control { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.play-button {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  place-items: center;
  color: #11151a;
  background: var(--ink);
  cursor: pointer;
}
.play-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.play-button .play-icon { fill: currentColor; stroke: none; transform: translateX(1px); }
.play-button .pause-icon { display: none; }
.play-button.is-playing .play-icon { display: none; }
.play-button.is-playing .pause-icon { display: block; }
.nudge-button {
  min-width: 42px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}
.nudge-button:hover { color: var(--ink); border-color: var(--line-strong); }
.range-wrap { position: relative; min-width: 0; flex: 1; padding: 5px 0 19px; }

input[type="range"] {
  --progress: 50%;
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber) 0 var(--progress), rgba(255, 255, 255, .16) var(--progress) 100%);
}
input[type="range"]::-moz-range-track { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--amber); }
input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -7px;
  appearance: none;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 0 18px rgba(255, 174, 87, .35);
}
input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 4px solid var(--ink); border-radius: 50%; background: var(--amber); }

.range-markers { position: absolute; top: 14px; right: 8px; left: 8px; height: 8px; pointer-events: none; }
.range-markers i { position: absolute; top: -2px; width: 1px; height: 8px; background: rgba(255, 255, 255, .33); transform: translateX(-50%); }
.range-markers i.is-total { background: var(--amber-soft); }
.range-labels { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 8px; font-variant-numeric: tabular-nums; }
.event-jumps { display: flex; gap: 7px; margin-top: 12px; padding-left: 106px; overflow-x: auto; scrollbar-width: none; }
.event-jumps::-webkit-scrollbar { display: none; }
.event-jumps button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-faint);
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  font-weight: 680;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.event-jumps button:hover { color: var(--ink); border-color: var(--line-strong); }

.control-column { display: flex; min-width: 0; flex-direction: column; gap: 14px; }
.control-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 20, 26, .86);
  box-shadow: 0 14px 45px rgba(0, 0, 0, .13);
  backdrop-filter: blur(18px);
}
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.text-button { padding: 0; border: 0; color: var(--amber-soft); background: none; cursor: pointer; font-size: 9px; letter-spacing: .04em; }
.location-summary h2 { margin: 14px 0 1px; font-size: 22px; font-weight: 500; letter-spacing: -.035em; }
.location-summary > p { margin: 0; color: var(--ink-faint); font-size: 10px; }
.location-actions { display: flex; gap: 8px; margin-top: 18px; }
.location-actions .button-light { flex: 1; }
.save-button { width: 44px; padding: 0; }
.save-button.is-saved { color: var(--amber-soft); border-color: rgba(255, 174, 87, .36); }
.save-button.is-saved svg { fill: currentColor; }
.maps-link { flex: 0 0 auto; padding: 0 13px; text-decoration: none; }

.microcopy { color: var(--ink-faint); font-size: 8px; }
.lens-fieldset { display: grid; grid-template-columns: repeat(5, 1fr) auto; margin: 15px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.lens-fieldset button { min-width: 0; height: 40px; padding: 0; border: 0; border-right: 1px solid var(--line); color: var(--ink-faint); background: transparent; cursor: pointer; font-size: 10px; }
.lens-fieldset button:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
.lens-fieldset button.is-active { color: #13171c; background: var(--ink); }
.lens-fieldset > span { display: grid; padding: 0 8px; place-items: center; color: var(--ink-faint); font-size: 8px; }

.slider-field { display: grid; gap: 8px; margin-top: 18px; }
.slider-field > span { display: flex; align-items: center; justify-content: space-between; }
.slider-field b { font-size: 10px; font-weight: 580; }
.slider-field output { color: var(--ink-soft); font-size: 10px; font-variant-numeric: tabular-nums; }
.slider-field input[type="range"] { height: 17px; }
.compass-track { position: relative; display: flex; justify-content: space-between; margin-top: -3px; padding: 0 2px; color: var(--ink-faint); font-size: 7px; }
.compass-track i { position: absolute; top: -25px; left: 0; width: 1px; height: 8px; background: var(--amber); transform: translateX(-50%); }

.eclipse-kind { padding: 4px 8px; border: 1px solid rgba(255, 174, 87, .24); border-radius: 999px; color: var(--amber-soft); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.duration-lockup { display: flex; align-items: baseline; gap: 10px; margin: 15px 0 16px; }
.duration-lockup strong { font-size: 34px; font-weight: 330; line-height: 1; letter-spacing: -.045em; }
.duration-lockup span { max-width: 110px; color: var(--ink-faint); font-size: 9px; line-height: 1.3; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.contact-grid button { display: grid; gap: 3px; padding: 10px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: inherit; background: transparent; cursor: pointer; text-align: left; }
.contact-grid button:hover { background: rgba(255, 255, 255, .035); }
.contact-grid button:disabled { cursor: default; opacity: .35; }
.contact-grid small { color: var(--ink-faint); font-size: 7px; letter-spacing: .06em; text-transform: uppercase; }
.contact-grid strong { font-size: 11px; font-weight: 560; font-variant-numeric: tabular-nums; }

.safety-note { display: flex; align-items: flex-start; gap: 11px; padding: 4px 10px 0; color: var(--ink-faint); }
.safety-note svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.safety-note p { margin: 0; font-size: 9px; line-height: 1.5; }
.safety-note strong { color: var(--ink-soft); font-weight: 600; }


dialog {
  width: auto;
  max-width: none;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
}
dialog::backdrop { background: rgba(0, 0, 0, .74); backdrop-filter: blur(12px); }

.location-dialog { width: min(1180px, calc(100% - 44px)); height: min(760px, calc(100% - 44px)); border-radius: 26px; box-shadow: 0 40px 120px rgba(0, 0, 0, .68); }
.dialog-shell { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; height: 100%; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 26px; background: #0d1218; }
.dialog-sidebar { display: flex; min-width: 0; flex-direction: column; padding: 24px; overflow-y: auto; border-right: 1px solid var(--line); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dialog-header h2 { margin: 6px 0 0; font-size: 24px; font-weight: 450; letter-spacing: -.035em; }
.close-dialog { flex: 0 0 auto; }
.location-search { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding: 5px 5px 5px 13px; border: 1px solid var(--line-strong); border-radius: 13px; background: rgba(255, 255, 255, .035); }
.location-search > svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: var(--ink-faint); stroke-width: 1.7; stroke-linecap: round; }
.location-search input { min-width: 0; height: 36px; flex: 1; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.location-search input::placeholder { color: #666b70; }
.location-search button { height: 34px; padding: 0 11px; border: 0; border-radius: 9px; color: #101419; background: var(--ink); cursor: pointer; font-size: 9px; font-weight: 650; }
.search-results { display: grid; gap: 4px; margin-top: 7px; }
.search-results > p { margin: 8px 2px; color: var(--ink-faint); font-size: 10px; }
.search-result { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: inherit; background: rgba(255, 255, 255, .025); cursor: pointer; text-align: left; }
.search-result:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .055); }
.search-result span { display: grid; min-width: 0; }
.search-result strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { color: var(--ink-faint); font-size: 8px; }
.search-result svg { width: 13px; height: 13px; fill: none; stroke: var(--ink-faint); stroke-width: 1.8; }

.preset-section, .saved-section { margin-top: 20px; }
.section-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.section-label span { color: var(--ink-soft); font-size: 8px; font-weight: 720; letter-spacing: .16em; text-transform: uppercase; }
.section-label small { color: var(--ink-faint); font-size: 7px; }
.preset-list { display: grid; gap: 6px; }
.preset-item { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; color: inherit; background: rgba(255, 255, 255, .018); cursor: pointer; text-align: left; }
.preset-item:hover, .preset-item.is-active { border-color: rgba(255, 174, 87, .3); background: rgba(255, 174, 87, .045); }
.preset-index { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--amber-soft); font-size: 8px; }
.preset-copy { display: grid; min-width: 0; }
.preset-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.preset-copy small { color: var(--ink-faint); font-size: 8px; }
.preset-item > small { color: var(--ink-faint); font-size: 8px; }
.delete-saved { display: grid; width: 28px; height: 28px; padding: 0; border: 0; place-items: center; color: var(--ink-faint); background: transparent; cursor: pointer; }

.dialog-selection { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.dialog-selection > div { display: grid; min-width: 0; }
.dialog-selection small { color: var(--ink-faint); font-size: 7px; letter-spacing: .14em; }
.dialog-selection strong { overflow: hidden; margin-top: 2px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.dialog-selection span { color: var(--ink-faint); font-size: 8px; }
.dialog-selection .button { flex: 0 0 auto; }

.map-wrap { position: relative; min-width: 0; overflow: hidden; background: #dfe8da; }
#map { position: absolute; inset: 0; background: #dfe8da; }
#map .maplibregl-ctrl-attrib { max-width: calc(100% - 24px); color: #445047; background: rgba(250, 252, 247, .9); font-size: 9px; }
#map .maplibregl-ctrl-attrib a { color: #2f5b47; }
#map .maplibregl-canvas { cursor: crosshair; }
.map-layer-control { position: absolute; z-index: 600; top: 18px; left: 18px; display: flex; padding: 4px; border: 1px solid rgba(20,35,29,.18); border-radius: 13px; background: rgba(252,253,249,.92); box-shadow: 0 8px 28px rgba(31,48,39,.13); backdrop-filter: blur(14px); }
.map-layer-control button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 9px; color: #526057; background: transparent; cursor: pointer; font-size: 11px; font-weight: 650; }
.map-layer-control button:hover { color: #18231e; background: rgba(24,35,30,.06); }
.map-layer-control button.is-active { color: #fff; background: #17231e; box-shadow: 0 4px 12px rgba(18,31,25,.18); }
.map-zoom-control { position: absolute; z-index: 600; top: 78px; left: 18px; display: grid; overflow: hidden; border: 1px solid rgba(20,35,29,.18); border-radius: 13px; background: rgba(252,253,249,.94); box-shadow: 0 8px 28px rgba(31,48,39,.13); }
.map-zoom-control button { display: grid; width: 46px; height: 46px; padding: 0; border: 0; place-items: center; color: #17231e; background: transparent; cursor: pointer; font-size: 27px; font-weight: 350; }
.map-zoom-control button + button { border-top: 1px solid rgba(20,35,29,.13); }
.map-zoom-control button:hover { background: rgba(24,35,30,.08); }
.map-zoom-control button:disabled { cursor: default; opacity: .28; }
.map-crosshair { position: absolute; z-index: 500; top: 50%; left: 50%; width: 34px; height: 34px; border: 1px solid rgba(255, 174, 87, .55); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); opacity: 0; }
.map-tip { position: absolute; z-index: 500; bottom: 22px; left: 50%; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-soft); background: rgba(8, 12, 17, .82); backdrop-filter: blur(14px); font-size: 8px; transform: translateX(-50%); white-space: nowrap; }
.map-tip span { color: var(--amber-soft); }
.map-sun-legend { position: absolute; z-index: 500; right: 18px; bottom: 58px; display: flex; gap: 12px; padding: 7px 10px; border-radius: 8px; color: #334139; background: rgba(252,253,249,.9); box-shadow: 0 5px 18px rgba(31,48,39,.1); pointer-events: none; }
.map-sun-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-sun-legend i { width: 16px; height: 2px; background: #ffae57; }
.map-sun-legend span:last-child i { background: #67b8df; }
.map-sun-legend b { font-size: 9px; font-weight: 650; }
.map-action-stack { position: absolute; z-index: 600; top: 18px; right: 18px; display: grid; justify-items: end; gap: 8px; }
.map-action-button { display: flex; min-height: 42px; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid rgba(20,35,29,.18); border-radius: 12px; color: #17231e; background: rgba(252,253,249,.94); box-shadow: 0 8px 28px rgba(31,48,39,.12); backdrop-filter: blur(14px); cursor: pointer; font-size: 11px; font-weight: 650; text-decoration: none; }
.map-action-button:hover { background: #fff; transform: translateY(-1px); }
.map-action-button svg { width: 17px; height: 17px; fill: none; stroke: #ba5b18; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.street-coverage-button svg { stroke: #1869c9; }
.map-layer-control #map3dButton { color: #8d4817; }
.map-layer-control #map3dButton.is-active { color: #fff; background: #a6531c; }
.map-gesture-hint { position: absolute; z-index: 500; bottom: 58px; left: 18px; padding: 7px 10px; border-radius: 8px; color: #334139; background: rgba(252,253,249,.88); box-shadow: 0 5px 18px rgba(31,48,39,.1); font-size: 10px; pointer-events: none; }

.eclipse-marker { position: relative; display: block; width: 46px; height: 46px; border: 0; border-radius: 50%; background: transparent; cursor: grab; }
.eclipse-marker::before { position: absolute; inset: 8px; border: 3px solid #10151b; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 174, 87, .32), 0 8px 24px rgba(0, 0, 0, .32); content: ""; }
.eclipse-marker::after { position: absolute; top: 13px; left: 13px; width: 14px; height: 14px; border-radius: 50%; background: #10151b; content: ""; }

.about-dialog { width: min(620px, calc(100% - 36px)); }
.about-dialog article { position: relative; padding: 34px; border: 1px solid var(--line-strong); border-radius: 24px; background: #10151b; box-shadow: var(--shadow); }
.about-dialog .close-about { position: absolute; top: 18px; right: 18px; }
.about-dialog h2 { max-width: 470px; margin: 12px 0 16px; font-size: clamp(25px, 4vw, 36px); font-weight: 400; line-height: 1.08; letter-spacing: -.045em; }
.about-dialog p { color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.about-grid div { display: grid; gap: 4px; padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid strong { color: var(--amber-soft); font-size: 22px; font-weight: 400; }
.about-grid span { color: var(--ink-faint); font-size: 8px; line-height: 1.35; }
.about-dialog .muted { color: var(--ink-faint); font-size: 10px; }
.source-links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 0 !important; }
.source-links a { color: var(--amber-soft); font-size: 9px; text-underline-offset: 3px; }

.toast {
  position: fixed;
  z-index: 10000;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(17, 22, 28, .94);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .35);
  backdrop-filter: blur(16px);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

.sponsors {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  max-width: 1760px;
  align-items: end;
  gap: clamp(22px, 4vw, 64px);
  margin: 6px auto 30px;
  padding: 34px clamp(18px, 3vw, 48px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sponsors-intro h2 { max-width: 460px; margin: 10px 0 0; font-size: clamp(22px, 2.7vw, 38px); font-weight: 360; line-height: 1.08; letter-spacing: -.04em; }
.sponsor-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sponsor {
  position: relative;
  display: grid;
  min-height: 132px;
  align-content: end;
  gap: 8px;
  padding: 22px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.sponsor::before { position: absolute; top: -52px; right: -42px; width: 140px; height: 140px; border: 1px solid rgba(255, 174, 87, .13); border-radius: 50%; content: ""; transition: transform .35s ease; }
.sponsor:hover { border-color: rgba(255, 174, 87, .3); background: rgba(255, 174, 87, .035); }
.sponsor:hover::before { transform: scale(1.12); }
.sponsor strong { font-size: 20px; font-weight: 700; letter-spacing: .14em; }
.sponsor-framesora strong { font-size: 22px; font-weight: 520; letter-spacing: .06em; }
.sponsor span { color: var(--ink-faint); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.sponsor i { position: absolute; top: 18px; right: 20px; color: var(--amber-soft); font-size: 13px; font-style: normal; }

.site-footer { display: flex; max-width: 1760px; justify-content: space-between; gap: 20px; margin: 0 auto; padding: 10px clamp(18px, 3vw, 48px) 28px; color: #585d62; font-size: 8px; letter-spacing: .03em; }
.site-footer a { color: #747a80; text-underline-offset: 2px; }
noscript { display: block; padding: 30px; text-align: center; }

/* Navigation, countdown and readable type */
.guide-link { text-decoration: none; }
.guide-link svg { fill: none; stroke: currentColor; }
.theme-toggle .theme-moon { display: none; }
[data-theme="light"] .theme-toggle .theme-sun { display: none; }
[data-theme="light"] .theme-toggle .theme-moon { display: block; }

.countdown-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(170px, 1fr);
  max-width: 1760px;
  min-height: 88px;
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  margin: 0 auto;
  padding: 13px clamp(18px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
}
.countdown-copy { display: grid; gap: 5px; }
.countdown-copy strong { font-size: 14px; font-weight: 560; letter-spacing: -.01em; }
.countdown-clock { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.countdown-clock > span { display: grid; min-width: 48px; justify-items: center; }
.countdown-clock b { font-size: 24px; font-weight: 430; line-height: 1; }
.countdown-clock small { margin-top: 5px; color: var(--ink-faint); font-size: 10px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.countdown-clock i { color: var(--amber); font-size: 18px; font-style: normal; transform: translateY(-7px); }
.countdown-action { display: inline-flex; align-items: center; justify-self: end; gap: 12px; color: var(--amber-soft); font-size: 12px; font-weight: 650; text-decoration: none; }
.countdown-action b { font-size: 18px; font-weight: 400; transition: transform .2s ease; }
.countdown-action:hover b { transform: translateX(4px); }

.eyebrow { font-size: 10px; }
.topbar-center { font-size: 11px; }
.brand-copy strong { font-size: 14px; }
.brand-copy span, .language-picker select { font-size: 10px; }
.location-chip strong { font-size: 13px; }
.location-chip small, .data-badge, .phase-tag { font-size: 10px; }
.scene-readout p { font-size: 13px; }
.scene-metrics small, .range-labels, .timeline-now span { font-size: 10px; }
.scene-metrics strong { font-size: 14px; }
.drag-hint, .event-jumps button, .nudge-button { font-size: 10px; }
.timeline-heading h1 { font-size: 19px; }
.timeline-now strong { font-size: 18px; }
.text-button, .location-summary > p, .microcopy, .lens-fieldset button, .slider-field b, .slider-field output, .duration-lockup span, .contact-grid small, .safety-note p { font-size: 11px; }
.lens-fieldset > span, .location-search button, .search-result small, .section-label span, .section-label small, .preset-index, .preset-copy small, .preset-item > small, .dialog-selection small, .dialog-selection span, .map-tip, .geolocate-button { font-size: 10px; }
#map .leaflet-control-attribution { font-size: 9px; }
.compass-track { font-size: 9px; }
.eclipse-kind { font-size: 10px; }
.contact-grid strong { font-size: 13px; }
.about-dialog p { font-size: 14px; }
.about-grid span, .about-dialog .muted, .source-links a { font-size: 11px; }

.location-actions { display: flex; }

/* A compact editorial layer for Portuguese travellers. */
.portugal-guide {
  max-width: 1760px;
  margin: 8px auto 34px;
  padding: 42px clamp(18px, 3vw, 48px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.guide-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 560px); align-items: end; gap: 42px; }
.guide-heading h2 { max-width: 720px; margin: 10px 0 0; font-size: clamp(32px, 4.5vw, 62px); font-weight: 340; line-height: .98; letter-spacing: -.055em; }
.guide-heading > p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 32px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.guide-card { display: grid; grid-template-columns: 32px 1fr; min-height: 190px; gap: 14px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s ease, transform .2s ease; }
.guide-card:hover { background: rgba(255, 174, 87, .055); transform: translateY(-2px); }
.guide-number { color: var(--amber); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.guide-card div { display: flex; flex-direction: column; }
.guide-card strong { font-size: 17px; font-weight: 580; letter-spacing: -.02em; }
.guide-card p { margin: 10px 0 18px; color: var(--ink-faint); font-size: 13px; line-height: 1.55; }
.guide-card b { margin-top: auto; color: var(--amber-soft); font-size: 11px; font-weight: 650; }
.guide-community { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 24px; padding: 24px; border: 1px solid rgba(255, 174, 87, .24); border-radius: var(--radius-lg); background: linear-gradient(120deg, rgba(255, 174, 87, .07), transparent 60%); }
.guide-community > div { display: grid; gap: 5px; }
.guide-community strong { font-size: 18px; font-weight: 560; }
.guide-community p { margin: 0; color: var(--ink-faint); font-size: 13px; }
.guide-community .button { flex: 0 0 auto; text-decoration: none; }

.site-footer { display: grid; max-width: 1760px; gap: 20px; padding-top: 0; color: var(--ink-faint); font-size: 11px; }
.footer-sponsors { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.footer-sponsors-label { margin-right: 4px; color: var(--ink-faint); font-size: 10px; font-weight: 750; letter-spacing: .16em; }
.footer-sponsors a { display: inline-flex; min-height: 42px; align-items: center; gap: 9px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); text-decoration: none; transition: border-color .2s ease, background .2s ease; }
.footer-sponsors a:hover { border-color: rgba(255,174,87,.35); background: rgba(255,174,87,.045); }
.footer-sponsors img { width: 26px; height: 26px; object-fit: contain; border-radius: 4px; }
.footer-sponsors strong { font-size: 11px; letter-spacing: .08em; }
.footer-sponsor-framesora img { width: 104px; height: 25px; border-radius: 0; }
.footer-meta { display: flex; justify-content: space-between; gap: 20px; }
.site-footer a { color: var(--ink-soft); }

/* Light mode keeps the simulated sky dark and makes the planning UI airy. */
:root[data-theme="light"] {
  --ink: #17212a;
  --ink-soft: #46515b;
  --ink-faint: #6b747b;
  --paper: #f2eee6;
  --panel: #fbfaf7;
  --panel-2: #f3f0e9;
  --line: rgba(22, 31, 39, .12);
  --line-strong: rgba(22, 31, 39, .22);
  --amber: #c86b24;
  --amber-soft: #9d4e16;
  --shadow: 0 22px 70px rgba(58, 45, 30, .14);
}
[data-theme="light"] body { background: radial-gradient(circle at 75% 4%, rgba(220, 164, 102, .18), transparent 32rem), linear-gradient(180deg, #f5f2eb 0%, #ebe7de 100%); }
[data-theme="light"] .topbar { background: rgba(247, 244, 237, .88); }
[data-theme="light"] .app-shell::before { opacity: .12; filter: saturate(.75); }
[data-theme="light"] .timeline-card,
[data-theme="light"] .control-card { background: rgba(252, 250, 246, .9); }
[data-theme="light"] .button-ghost,
[data-theme="light"] .language-picker { background: rgba(255,255,255,.38); }
[data-theme="light"] .button-ghost:hover { background: rgba(255,255,255,.75); }
[data-theme="light"] .button-light { color: #fff; background: #17212a; }
[data-theme="light"] .button-light:hover { background: #2a3741; }
[data-theme="light"] .play-button { color: #fff; background: #17212a; }
[data-theme="light"] .play-button:hover { background: #293743; }
[data-theme="light"] .location-search button { color: #fff; background: #17212a; }
[data-theme="light"] .lens-fieldset button:hover,
[data-theme="light"] .contact-grid button:hover { background: rgba(23,33,42,.05); }
[data-theme="light"] .lens-fieldset button.is-active { color: #fff; background: #17212a; }
[data-theme="light"] input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--amber) 0 var(--progress), rgba(23,33,42,.18) var(--progress) 100%); }
[data-theme="light"] input[type="range"]::-webkit-slider-thumb { border-color: #fff; }
[data-theme="light"] .dialog-shell,
[data-theme="light"] .about-dialog article { background: #fbfaf7; }
[data-theme="light"] .dialog-selection { background: #fbfaf7; }
[data-theme="light"] .toast { background: rgba(251,250,247,.97); }
[data-theme="light"] .footer-sponsor-framesora img { filter: none; }
:root:not([data-theme="light"]) .footer-sponsor-framesora img { filter: invert(1) grayscale(1) brightness(1.8); }

/* The sky overlays always need photographic contrast, regardless of theme. */
[data-theme="light"] .scene-card,
[data-theme="light"] .scene-card button { color: #f6f2e9; }
[data-theme="light"] .scene-card .location-chip strong { color: #f6f2e9; }
[data-theme="light"] .scene-card .location-chip small,
[data-theme="light"] .scene-card .scene-readout p { color: rgba(255,255,255,.7); }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: minmax(0, 1fr) 310px; }
  .scene-metrics div { min-width: 72px; }
  .scene-readout { left: 34px; }
  .guide-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar-center { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .control-column { display: grid; grid-template-columns: 1fr 1fr; }
  .eclipse-card { grid-row: span 2; }
  .safety-note { grid-column: 1 / -1; }
  .countdown-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .countdown-action { display: none; }
  .guide-heading { grid-template-columns: 1fr; align-items: start; gap: 18px; }
}

@media (max-width: 700px) {
  .topbar { min-height: 64px; padding: 10px 14px; }
  .button-compact span { display: none; }
  .button-compact { width: 40px; padding: 0; }
  .language-picker { min-width: 52px; }
  .topbar-actions { gap: 6px; }
  .guide-link { width: 40px; padding: 0; }
  .guide-link span { display: none; }
  .countdown-bar { min-height: 0; grid-template-columns: 1fr; gap: 12px; padding-top: 14px; padding-bottom: 15px; }
  .countdown-copy { grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; }
  .countdown-clock { width: 100%; justify-content: space-between; gap: 5px; }
  .countdown-clock > span { min-width: 42px; }
  .countdown-clock b { font-size: 21px; }
  .app-shell { gap: 14px; padding: 14px 12px 26px; }
  .app-shell::before { top: 64px; }
  .scene-card { height: 56vh; min-height: 460px; border-radius: 20px; }
  .scene-topline { top: 14px; right: 14px; left: 14px; }
  .location-chip { min-height: 48px; padding: 7px 9px; }
  .location-chip small { font-size: 7px; }
  .data-badge { display: none; }
  .scene-readout { top: 42%; left: 20px; }
  .scene-card.is-telephoto .scene-readout { top: 34%; }
  .scene-card.is-telephoto .scene-readout p { display: none; }
  .time-lockup strong { font-size: 44px; }
  .scene-metrics { right: 12px; bottom: 12px; left: 12px; justify-content: stretch; }
  .scene-metrics div { min-width: 0; flex: 1; padding: 9px; }
  .scene-metrics div:nth-child(3) { display: none; }
  .eclipse-inset { bottom: 76px; left: 14px; width: 92px; min-height: 106px; padding: 7px; border-radius: 13px; }
  .eclipse-inset canvas { width: 66px; height: 66px; }
  .drag-hint { display: none; }
  .timeline-card { padding: 17px 14px 16px; border-radius: 17px; }
  .timeline-heading { align-items: start; }
  .timeline-now span { display: none; }
  .time-control { gap: 6px; }
  .nudge-button { display: none; }
  .event-jumps { padding-left: 0; }
  .control-column { display: flex; }
  .control-card { padding: 17px; border-radius: 17px; }
  .safety-note { padding: 2px 8px 0; }
  .location-dialog { width: 100%; height: 100%; border-radius: 0; }
  .dialog-shell { grid-template-columns: 1fr; grid-template-rows: minmax(300px, 46vh) minmax(0, 1fr); border: 0; border-radius: 0; }
  .dialog-sidebar { grid-row: 2; padding: 17px; border-top: 1px solid var(--line); border-right: 0; }
  .dialog-header h2 { font-size: 20px; }
  .map-wrap { grid-row: 1; }
  .map-tip { bottom: 12px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
  .map-layer-control { top: 10px; left: 10px; }
  .map-layer-control button { min-height: 34px; padding: 0 10px; font-size: 10px; }
  .map-zoom-control { top: 58px; left: 10px; }
  .map-zoom-control button { width: 42px; height: 42px; }
  .map-action-stack { top: 58px; right: 10px; }
  .map-action-button { width: 42px; min-height: 42px; justify-content: center; padding: 0; }
  .map-action-button span { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0 0 0 0); white-space: nowrap; }
  .map-gesture-hint { display: none; }
  .map-sun-legend { right: 10px; bottom: 58px; }
  .dialog-selection { position: sticky; z-index: 2; bottom: -17px; margin-right: -17px; margin-left: -17px; padding: 13px 17px; background: #0d1218; }
  .location-chip small { font-size: 10px; }
  .about-dialog article { padding: 26px 22px; }
  .about-grid { grid-template-columns: 1fr; }
  .sponsors { grid-template-columns: 1fr; margin-bottom: 18px; padding-top: 26px; padding-bottom: 26px; }
  .portugal-guide { margin-bottom: 22px; padding-top: 30px; padding-bottom: 30px; }
  .guide-heading h2 { font-size: 38px; }
  .guide-grid { margin-top: 24px; }
  .guide-card { min-height: 168px; padding: 18px; }
  .guide-community { align-items: stretch; flex-direction: column; }
  .guide-community .button { width: 100%; }
  .site-footer { padding-bottom: 22px; }
  .footer-meta { flex-direction: column; }
}

@media (max-width: 420px) {
  .brand-copy strong { font-size: 11px; }
  .brand-copy span { font-size: 8px; }
  .scene-card { min-height: 430px; }
  .location-chip { max-width: calc(100% - 44px); }
  .scene-readout p { max-width: 230px; }
  .timeline-now { display: none; }
  .duration-lockup strong { font-size: 30px; }
  .lens-fieldset button { height: 38px; }
  .sponsor-list { grid-template-columns: 1fr; }
  .sponsor { min-height: 112px; }
  .topbar #aboutButton { display: none; }
  .countdown-copy { display: grid; grid-template-columns: 1fr; gap: 3px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 150px; }
  .footer-sponsors-label { width: 100%; }
  .brand-copy span { font-size: 10px; }
}

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