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

html, body {
  height: 100%;
  /* dvh tracks the actual visible viewport as the browser toolbar
     shows/hides — fixes cut-off on Android Chrome (Pixel etc.) */
  height: 100dvh;
  overflow: hidden;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0f0f0f;
  color: #fff;
}

/* Mount node is transparent — app-shell inside owns everything */
#app {
  display: contents;
}

.settings-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.auth-btn {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 9999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255,255,255,0.12);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.auth-btn:hover,
.auth-btn:focus-visible {
  background: rgba(255,255,255,0.24);
}

.auth-btn:disabled { cursor: wait; opacity: 0.65; }
.favorite-current-btn {
  border: 0;
  color: rgba(255,255,255,0.85);
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
}
.favorite-current-btn:disabled { cursor: wait; opacity: 0.45; }
.favorite-list { width: 100%; margin-top: 12px; }
.favorite-location-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 5px;
}
.favorite-location {
  display: block;
  flex: 1;
  border: 0;
  color: rgba(255,255,255,0.82);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
}
.favorite-location:hover,
.favorite-location:focus-visible { color: #fff; }
.favorite-location.preferred { color: #ffd166; }
.favorite-preferred-btn {
  flex: 0 0 auto;
  width: 26px;
  border: 0;
  color: #ffd166;
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.favorite-preferred-btn:hover,
.favorite-preferred-btn:focus-visible { color: #fff; }
.favorite-remove-btn {
  flex: 0 0 auto;
  width: 26px;
  border: 0;
  color: rgba(255,255,255,0.65);
  background: transparent;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.favorite-remove-btn:hover,
.favorite-remove-btn:focus-visible { color: #ffb4a8; }
.auth-user {
  width: 100%;
  overflow: hidden;
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
}

.email-auth-modal {
  position: relative;
  width: min(360px, 100%);
  padding: 28px 24px 22px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  background: rgba(28, 28, 28, 0.98);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.email-auth-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  color: rgba(255,255,255,0.75);
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.email-auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.email-auth-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: rgba(255,255,255,0.8);
  font-size: 0.78rem;
}

.email-auth-form input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 7px;
  padding: 9px 10px;
  color: #fff;
  background: rgba(255,255,255,0.1);
  font: inherit;
}

.email-auth-form input:focus {
  outline: 2px solid rgba(255,255,255,0.55);
  outline-offset: 1px;
}

.email-auth-message,
.email-auth-error {
  font-size: 0.78rem;
  line-height: 1.35;
}

.email-auth-message { color: rgba(255,255,255,0.78); }
.email-auth-error { color: #ffb4a8; }

.email-auth-switch {
  display: block;
  margin: 16px auto 0;
  border: 0;
  color: rgba(255,255,255,0.78);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
}

.email-auth-switch:disabled,
.email-auth-close:disabled { cursor: wait; opacity: 0.5; }

.day-login-prompt {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(340px, calc(100vw - 40px));
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  background: rgba(20,20,20,0.94);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
  text-align: center;
  transform: translate(-50%, -50%);
}

.day-login-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.day-login-text {
  color: rgba(255,255,255,0.72);
  font-size: 0.82rem;
  line-height: 1.4;
}

.day-login-dismiss {
  margin-top: 4px;
  border: 0;
  color: rgba(255,255,255,0.65);
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 560px) {
  .auth-btn { padding: 6px 8px; font-size: 0.7rem; }
}

/* ── Full-screen stage ─────────────────────────────── */

.app-shell {
  position: relative;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  cursor: grab;
  touch-action: none; /* hand all touch gestures to Pointer Events */
}

body.panning,
body.panning .app-shell {
  cursor: grabbing;
}

.offline-notice {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 7px 4px 9px;
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 9999px;
  color: rgba(255,255,255,0.72);
  background: rgba(15,15,15,0.32);
  font-size: 0.68rem;
  line-height: 1;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.offline-notice-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ff8177;
  box-shadow: 0 0 5px rgba(255,129,119,0.55);
}

.offline-notice-dismiss {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  color: rgba(255,255,255,0.52);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.offline-notice-dismiss:hover,
.offline-notice-dismiss:focus-visible {
  color: #fff;
}

/* Background artwork layers — both fill the full viewport and are stacked */
.artwork-stage,
.artwork,
.artwork-placeholder {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.artwork-stage {
  z-index: 0;
  transition: opacity 0.6s ease;
}

.artwork {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.stale-offline-artwork {
  filter: blur(2px);
}

.artwork-placeholder {
  z-index: 0;
}

.artwork-incoming {
  z-index: 2;
  animation: artwork-fade-in 0.8s ease both;
}

.artwork-outgoing {
  z-index: 1;
  animation: artwork-fade-out 0.8s ease both;
}

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

@keyframes artwork-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .artwork-incoming,
  .artwork-outgoing {
    animation-duration: 0.01ms;
  }
}

.artwork-placeholder {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-ui {
  transition: opacity 0.6s ease;
}

.artwork-placeholder-text {
  color: rgba(255,255,255,0.25);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Painting progress indicator ─────────────────────────────────────────── */

.painting-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  width: min(520px, 90vw);
  max-height: min(78vh, 680px);
  overflow-y: auto;
}

.painting-location,
.painting-stage {
  text-align: center;
  line-height: 1.35;
  max-width: 34rem;
}

.painting-label {
  font-family: "Georgia", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-style: italic;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.2;
}

.painting-location {
  font-family: "Georgia", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.1rem, 2.7vw, 1.3rem);
  letter-spacing: 0.03em;
}

.forecast-summary {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  color: rgba(255,255,255,0.9);
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.3;
}

.forecast-summary-date {
  color: rgba(255,255,255,0.72);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}

.forecast-summary-note {
  margin: 0;
  color: rgba(255,255,255,0.65);
  font-size: 0.75rem;
  text-align: center;
}

.forecast-summary-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.forecast-summary-icon {
  flex: 0 0 20px;
  color: rgba(255,255,255,0.8);
  text-align: center;
}

.forecast-summary-row.temperatures {
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.forecast-summary-time {
  color: rgba(255,255,255,0.65);
  font-size: 0.82em;
}

.forecast-summary-empty {
  color: rgba(255,255,255,0.75);
  text-align: center;
}

.forecast-summary-button {
  border-radius: 9999px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.8rem;
}

.forecast-summary-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.68);
}

.forecast-summary-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: min(80vh, 700px);
  overflow-y: auto;
  padding: 28px 24px 24px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  color: #fff;
  background: rgba(28,28,28,0.98);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.forecast-summary-modal h2 {
  margin: 0 32px 4px 0;
  font-size: 1.15rem;
}

.forecast-summary-location {
  margin-bottom: 18px;
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
}

.forecast-summary-modal .forecast-summary {
  gap: 9px;
}

.forecast-summary-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  color: rgba(255,255,255,0.75);
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.painting-stage {
  font-family: "Georgia", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(0.9rem, 2.1vw, 1.05rem);
  letter-spacing: 0.03em;
  min-height: 1.5em;
}

.painting-bar-wrap {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.10);
  border-radius: 9999px;
  overflow: hidden;
}

.painting-bar-fill {
  height: 100%;
  background: rgba(255,255,255,0.35);
  border-radius: 9999px;
  transition: width 0.9s ease;
  will-change: width;
}

/* Stale-art "updating" badge — centered below the main menu */
.art-updating-badge {
  position: absolute;
  top: calc(20px + 44px + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  max-width: calc(100vw - 32px);
  padding: 4px 10px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9999px;
  color: rgba(255,255,255,0.55);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  pointer-events: none;
}

/* Subtle gradient vignette so overlaid UI reads on any image */
.vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.30) 0%,
      transparent 25%,
      transparent 60%,
      rgba(0,0,0,0.70) 100%);
}

.search-form,
.search-form * {
  cursor: auto;
}

.go-btn          { cursor: pointer; }
.go-btn:disabled { cursor: wait; }
.settings-wrap,
.settings-wrap * { cursor: auto; }
.settings-btn    { cursor: pointer; }
.settings-opt    { cursor: pointer; }
.use-location-btn { cursor: pointer; }

/* ── Floating city input ───────────────────────────── */

.search-form {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 92px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 16px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9999px;
  white-space: nowrap;
  transition: background 0.2s;
}

.search-form:focus-within {
  background: rgba(0, 0, 0, 0.45);
}

.city-input,
.country-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  caret-color: rgba(255,255,255,0.8);
}

.city-input::placeholder,
.country-input::placeholder {
  color: rgba(255,255,255,0.45);
}

.city-input {
  width: 140px;
  flex: 1 1 140px;
  min-width: 0;
  padding-left: 2px;
}

/*.city-input:focus,*/
/*.country-input:focus {*/
/*  color: #fff;*/
/*  background: rgba(255,255,255,0.12);*/
/*  box-shadow: inset 0 0 0 1px rgba(251,191,36,0.45);*/
/*  border-radius: 9999px;*/
/*  padding: 4px 8px;*/
/*}*/

.country-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 128px;
  max-width: 32vw;
  flex: 0 1 auto;
  border-left: 1px solid rgba(255,255,255,0.20);
  padding: 4px 4px 4px 8px;
  text-align: left;
  cursor: pointer;
}

.country-picker {
  position: relative;
  flex: 0 1 auto;
}

.country-picker-chevron {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
}

.country-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 21;
  width: min(240px, calc(100vw - 32px));
  max-height: min(320px, 60vh);
  overflow-y: auto;
  padding: 5px;
  background: rgba(20, 19, 18, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.country-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.country-option:hover,
.country-option:focus-visible,
.country-option[aria-selected="true"],
.country-option[data-active="true"] {
  outline: none;
  background: rgba(255,255,255,0.14);
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 50px;
  z-index: 20;
  width: min(320px, calc(100vw - 120px));
  max-height: min(280px, 50vh);
  overflow-y: auto;
  padding: 5px;
  background: rgba(20, 19, 18, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.city-suggestion {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 9px 11px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
}

.city-suggestion:hover,
.city-suggestion:focus-visible,
.city-suggestion[aria-selected="true"] {
  outline: none;
  background: rgba(255,255,255,0.14);
}

.city-suggestions-status {
  padding: 9px 11px;
  color: rgba(255,255,255,0.68);
  font-size: 0.85rem;
}

.separator {
  color: rgba(255,255,255,0.25);
  pointer-events: none;
}

.go-btn {
  border: none;
  border-radius: 9999px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.go-btn:hover {
  background: rgba(255,255,255,0.26);
}

.go-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.use-location-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 9999px;
  padding: 0;
  background: transparent;
  color: rgba(255,255,255,0.8);
  font: inherit;
  /*font-size: 1.5rem;*/
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-right: 2px;
}

.use-location-btn:hover {
  background: rgba(255,255,255,0.26);
  color: #fff;
}

.use-location-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}


/* ── Error toast ───────────────────────────────────── */

.toast {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.85rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}

.toast-dismiss {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.toast.error {
  background: rgba(153, 27, 27, 0.65);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.toast.warning {
  background: rgba(120, 53, 15, 0.65);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

/* ── D3 Timeline — fixed 90%-width centered bar ─ */

/* Keep timeline labels and the selected-time pill free of native selection UI. */
.timeline-bar,
.timeline-bar *,
.active-entry,
.active-entry * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.timeline-bar {
  position: relative;
  width: 100%;
  margin: 0 auto;
  height: calc(150px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  pointer-events: all;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
  flex-shrink: 0;
}

@media (max-width: 540px) {
  .city-input { width: 110px; }
  .country-input { width: 54px; max-width: 18vw; }
  .city-suggestions { left: 44px; width: min(300px, calc(100vw - 108px)); }
  .timeline-bar { height: calc(150px + env(safe-area-inset-bottom, 0px)); }
}

/* Indicator line — positioned at the selected entry */
.timeline-indicator {
  position: absolute;
  top: 0;
  bottom: 28px; /* above date labels */
  width: 2px;
  transform: translateX(-50%);
  background: rgba(251, 191, 36, 0.90);
  pointer-events: none;
  z-index: 2;
  transition: left 0.08s linear;
}

.timeline-svg {
  display: block;
}

/* Axis text & ticks — white on dark gradient */
.timeline-svg .domain { stroke: rgba(255,255,255,0.30); }
.timeline-svg .tick line { stroke: rgba(255,255,255,0.20); }
.timeline-svg .tick text {
  fill: rgba(255,255,255,0.70);
  font-size: 11px;
  font-family: inherit;
}

.temp-line {
  fill: none;
  stroke: #fbbf24;
  stroke-width: 2.5;
}

.temp-dot {
  fill: #fff;
  stroke: #fbbf24;
  stroke-width: 2;
}

.temp-label {
  fill: rgba(255,255,255,0.90);
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
}

/* ── Settings menu ─────────────────────────────────── */

.settings-wrap {
  position: relative;
  z-index: 10;
}

.settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,0.70);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
}

.settings-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 170px;
  padding: 12px 14px;
  background: rgba(10,10,10,0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
}

.settings-connection-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.52);
  font-size: 0.65rem;
  line-height: 1.35;
}

.connection-status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.connection-status-dot.online {
  background: #70d6a0;
  box-shadow: 0 0 6px rgba(112,214,160,0.6);
}

.connection-status-dot.offline {
  background: #ff8177;
  box-shadow: 0 0 6px rgba(255,129,119,0.6);
}

.settings-section-label {
  font-size: 0.70rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.40);
  margin-bottom: 6px;
}

.settings-toggle-row {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.settings-divider {
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 10px 0;
}

.settings-opt {
  flex: 1;
  padding: 5px 0;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9999px;
  background: transparent;
  color: rgba(255,255,255,0.65);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: center;
}

.settings-opt:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
}

.settings-opt.active {
  background: rgba(251,191,36,0.20);
  border-color: rgba(251,191,36,0.55);
  color: #fbbf24;
}

.settings-link-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-link {
  display: block;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.62);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.settings-link:hover {
  color: #fff;
}

.settings-link:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.about-us-modal h2 {
  margin-bottom: 12px;
}

.about-us-copy {
  margin: 0;
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── Bottom UI container — stacks active-entry above timeline ── */

.bottom-ui {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 5;
}

.bottom-ui > * {
  pointer-events: all;
}

/* ── Active forecast entry info pill ───────────────── */

.active-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  margin-bottom: 8px;
  background: rgba(0, 0, 0, 0.45);
  /*backdrop-filter: blur(14px) saturate(180%);*/
  /*-webkit-backdrop-filter: blur(14px) saturate(180%);*/
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9999px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, border-radius 0.2s;

  user-select: none; /* Standard syntax */
}

.active-entry:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255,255,255,0.28);
}

.active-entry.expanded {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border-radius: 16px;
  padding: 10px 18px;
  white-space: normal;
  min-width: 200px;
}

.active-entry.radar-expanded {
  width: min(850px, calc(100vw - 32px));
  max-height: min(72dvh, 650px);
  overflow-y: auto;
}

.radar-panel {
  width: 100%;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.12);
  cursor: default;
}

.radar-mode-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(0,0,0,0.16);
}

.radar-mode-button {
  min-height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255,255,255,0.68);
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.radar-mode-button.selected {
  background: rgba(255,255,255,0.13);
  color: #fff;
}

.radar-mode-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.radar-mode-button:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.radar-status {
  min-height: 1.2em;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.68);
  font-size: 0.75rem;
}

.radar-map {
  width: 100%;
  height: clamp(200px, 32dvh, 360px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  background: #16213e;
}

.radar-map .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

.radar-map .leaflet-control-zoom a {
  width: 30px;
  height: 30px;
  border: 0 !important;
  background: rgba(22,33,62,0.88);
  color: rgba(255,255,255,0.88);
  line-height: 30px;
}

.radar-map .leaflet-control-zoom a:hover,
.radar-map .leaflet-control-zoom a:focus-visible {
  background: #26375f;
  color: #fff;
}

.radar-map .leaflet-control-zoom-in {
  border-bottom: 1px solid rgba(255,255,255,0.12) !important;
}

.radar-attribution {
  margin-top: 5px;
  color: rgba(255,255,255,0.55);
  font-size: 0.68rem;
  text-align: right;
}

.radar-attribution a {
  color: rgba(255,255,255,0.75);
}

.active-entry-location {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 2px;
}

.active-entry-city {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.90);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-entry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.forecast-summary-button,
.forecast-info-button,
.radar-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  flex-shrink: 0;
}

.forecast-info-button {
  width: 32px;
  padding: 0;
  border-radius: 50%;
  font: italic 600 0.9rem Georgia, serif;
}

.radar-toggle-button {
  margin-left: auto;
  padding: 0 10px;
  border-radius: 9999px;
  font: inherit;
  font-size: 0.75rem;
}

.forecast-summary-button:hover,
.forecast-info-button:hover,
.radar-toggle-button:hover {
  background: rgba(255,255,255,0.08);
}

.forecast-summary-button:focus-visible,
.forecast-info-button:focus-visible,
.radar-toggle-button:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

.forecast-info {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 10;
  width: max-content;
  max-width: min(260px, calc(100vw - 64px));
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(20, 24, 30, 0.97);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
  cursor: default;
}

.forecast-info::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 10px;
  border: 6px solid transparent;
  border-top-color: rgba(20, 24, 30, 0.97);
}

.forecast-info a {
  color: #fbbf24;
  text-decoration: underline;
}

.active-entry-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.active-entry-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.active-entry-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  width: 100%;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.detail-item {
  font-size: 0.80rem;
  color: rgba(255,255,255,0.75);
}

.detail-label {
  color: rgba(255,255,255,0.45);
}

.detail-separator {
  display: inline;
}

.active-entry-expand-hint {
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
  margin-left: auto;
  line-height: 1;
}

.active-entry-time {
  color: rgba(255,255,255,0.60);
  font-size: 0.82rem;
}

.active-entry-temp {
  color: #fbbf24;
  font-size: 1.05rem;
  font-weight: 700;
}

.active-entry-desc {
  color: rgba(255,255,255,0.80);
  font-size: 0.82rem;
  text-transform: capitalize;
}

/* ── Responsive tweaks ─────────────────────────────── */

@media (max-width: 540px) {
  .active-entry {
    bottom: calc(110px + max(70px, calc(env(safe-area-inset-bottom, 0px) + 26px)));
  }

  .active-entry-details {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: minmax(32px, auto);
    gap: 4px;
    min-width: 0;
  }

  .active-entry-details .detail-item {
    text-align: center;
    min-width: 0;
    font-size: 0.8rem;
    line-height: 16px;
    white-space: normal;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
  }

  .active-entry-details .detail-label {
    display: block;
  }

  .active-entry-details .detail-separator {
    display: block;
    height: 0;
    font-size: 0;
    line-height: 0;
  }
}

/* ── Hourly "now" marker ───────────────────────────── */

.now-line {
  stroke: rgba(251, 191, 36, 0.70);
  stroke-width: 1.5;
  stroke-dasharray: 4,3;
}

.now-label {
  fill: rgba(251, 191, 36, 0.80);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Day boundary markers ──────────────────────────── */

.day-boundary-line {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.5;
  stroke-dasharray: 4, 4;
}

/* ── Past (historic) data points — muted ──────────────── */

.past {
  opacity: 0.45;
}

/* ── Precipitation bars ────────────────────────────── */

.precip-bar {
  fill: rgba(96, 165, 250, 0.50);
  stroke: rgba(96, 165, 250, 0.80);
  stroke-width: 0.5;
}

/* ── Weather icon labels on the temperature line ───── */

.temp-icon {
  font-size: 12px;
  dominant-baseline: auto;
}
