/* ══════════════════════════════════════════════════════
   DESIGN TOKENS — Light (padrão) e Dark
══════════════════════════════════════════════════════ */
:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --radius: 16px;
  --max: 1120px;
  --t: 0.18s ease;
}

[data-theme="light"] {
  --bg: #eef4fb;
  --bg2: #f7faff;
  --surface: #ffffff;
  --stroke: rgba(15, 55, 130, 0.10);
  --stroke2: rgba(15, 55, 130, 0.06);
  --text: #0c1829;
  --text2: #354870;
  --muted: #7282a0;
  --accent: #1b72d8;
  --accent-warm: #d47a18;
  --accent-bg: rgba(27, 114, 216, 0.07);
  --accent-warm-bg: rgba(212, 122, 24, 0.08);
  --header-bg: rgba(238, 244, 251, 0.92);
  --header-border: rgba(15, 55, 130, 0.09);
  --shadow-sm: 0 2px 8px rgba(15, 55, 130, 0.08);
  --shadow: 0 6px 24px rgba(15, 55, 130, 0.10);
  --shadow-lg: 0 14px 44px rgba(15, 55, 130, 0.13);
  /* Weather scene */
  --sky-top: #6bbfe0;
  --sky-bottom: #c8e8f8;
  --sun-color: #f9a825;
  --sun-ray: #f59e0b;
  --sun-aura-color: rgba(249,168,37,0.35);
  --cloud-near: #deeef8;
  --cloud-far: rgba(255,255,255,0.65);
  --rain-color: #4f8db5;
  --wind-color: rgba(79, 141, 181, 0.50);
}

[data-theme="dark"] {
  --bg: #060c18;
  --bg2: #0b1526;
  --surface: #0f1e36;
  --stroke: rgba(92, 215, 210, 0.14);
  --stroke2: rgba(92, 215, 210, 0.07);
  --text: #e4f2ff;
  --text2: rgba(228, 242, 255, 0.70);
  --muted: rgba(228, 242, 255, 0.46);
  --accent: #3bc9e0;
  --accent-warm: #f6a93b;
  --accent-bg: rgba(59, 201, 224, 0.08);
  --accent-warm-bg: rgba(246, 169, 59, 0.08);
  --header-bg: rgba(6, 12, 24, 0.90);
  --header-border: rgba(92, 215, 210, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.30);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 18px 52px rgba(0, 0, 0, 0.55);
  /* Weather scene */
  --sky-top: #06111f;
  --sky-bottom: #0c1e38;
  --sun-color: #fbbf24;
  --sun-ray: #f59e0b;
  --sun-aura-color: rgba(251, 191, 36, 0.18);
  --cloud-near: #15304c;
  --cloud-far: rgba(20, 42, 70, 0.75);
  --rain-color: #38b9d4;
  --wind-color: rgba(59, 201, 224, 0.40);
}

/* ══ RESET ══ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  transition: background var(--t), color var(--t);
  min-height: 100vh;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

body.app-boot-is-loading {
  overflow: hidden;
}

/* Ecrã de arranque até a 1.ª resposta da previsão (ou erro / tempo limite) */
.app-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  transition: opacity 0.42s ease, visibility 0.42s ease;
}
.app-boot-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.app-boot-overlay__inner {
  text-align: center;
  max-width: 22rem;
}
.app-boot-overlay__mark {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  animation: app-boot-pulse 1.5s ease-in-out infinite;
}
.app-boot-logo-img {
  width: 3.75rem;
  height: auto;
  max-height: 4rem;
  object-fit: contain;
  display: block;
}
.app-boot-overlay__title-wrap {
  margin: 0 0 0.35rem;
}
.app-boot-nome-img {
  display: block;
  margin: 0 auto;
  max-width: min(90vw, 14.5rem);
  width: auto;
  height: 2.35rem;
  object-fit: contain;
  object-position: center;
}
.app-boot-overlay__spinner {
  width: 2.35rem;
  height: 2.35rem;
  margin: 0 auto 1.15rem;
  border: 3px solid var(--stroke2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: app-boot-spin 0.8s linear infinite;
}
@keyframes app-boot-spin {
  to { transform: rotate(360deg); }
}
@keyframes app-boot-pulse {
  0%, 100% { opacity: 0.62; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .app-boot-overlay {
    transition: opacity 0.15s ease, visibility 0.15s ease;
  }
  .app-boot-overlay__spinner {
    animation: none;
    opacity: 0.9;
  }
  .app-boot-overlay__mark {
    animation: none;
  }
}

/* ── Barra de secções (estilo navegação por âncoras, inspiração portais de previsão) ── */
.forecast-subnav {
  background: var(--surface);
  border-bottom: 1px solid var(--stroke2);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
[data-theme="dark"] .forecast-subnav {
  background: var(--bg2);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.forecast-subnav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  padding-block: 0.5rem;
}
.forecast-subnav__link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text2);
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.forecast-subnav__link:hover {
  color: var(--accent);
  background: var(--accent-bg);
  border-color: var(--stroke2);
}
@media (max-width: 520px) {
  .forecast-subnav__inner {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

img, svg { display: block; }

/* ══ LAYOUT EM TRÊS COLUNAS (laterais verticais) ══ */
.page-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-layout__cols {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(11.5rem, 1fr) minmax(0, var(--max)) minmax(11.5rem, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 100vh;
}

.page-center {
  min-width: 0;
  width: 100%;
  border-left: 1px solid var(--stroke2);
  border-right: 1px solid var(--stroke2);
  background: var(--bg);
}

.side-rail {
  min-height: 100vh;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1rem 2.5rem;
  background: var(--bg2);
  background-image:
    linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.015) 50%, rgba(0, 0, 0, 0.015) 100%),
    linear-gradient(90deg, var(--stroke2) 0 1px, transparent 1px);
  background-size: 100% 12px, 100% 100%;
  border-left: 1px solid var(--stroke2);
  border-right: 1px solid var(--stroke2);
  transition: background var(--t), border-color var(--t);
}

.side-rail--left {
  border-left: none;
}

.side-rail--right {
  border-right: none;
}

[data-theme="dark"] .side-rail {
  background-image:
    linear-gradient(180deg, transparent 0%, transparent 50%, rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0.03) 100%),
    linear-gradient(90deg, var(--stroke2) 0 1px, transparent 1px);
  background-size: 100% 12px, 100% 100%;
}

.side-rail-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  overflow-y: auto;
}

.side-rail-label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.side-rail-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.55rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.side-rail-link svg {
  flex-shrink: 0;
  opacity: 0.75;
  color: var(--accent);
}
.side-rail-link:hover {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--stroke);
}

.side-rail-block {
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.side-rail-block--accent {
  border-color: rgba(212, 122, 24, 0.25);
  background: var(--accent-warm-bg);
}
[data-theme="dark"] .side-rail-block--accent {
  border-color: rgba(246, 169, 59, 0.28);
}

.side-rail-block-title {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.side-rail-block-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text2);
}

.side-rail-block--cities {
  margin-top: 0.65rem;
}

.side-cities-intro {
  margin: 0 0 0.55rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--muted);
}

.side-rail-block--snapshot {
  margin-top: 0.65rem;
}

.side-snapshot-name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.side-snapshot-condition {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text2);
}

.side-snapshot-meta {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.side-snapshot-hint {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  font-style: italic;
}

.side-snapshot-nav {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.side-rail-link--snap {
  padding: 0.36rem 0.48rem;
  font-size: 0.8rem;
}

.side-cities-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: min(52vh, 28rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.side-city-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  text-align: left;
  padding: 0.38rem 0.48rem;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface-elevated, var(--surface));
  border: 1px solid var(--stroke2);
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.side-city-btn:hover {
  background: var(--accent-bg);
  border-color: var(--stroke);
  color: var(--accent);
}

.side-city-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-city-uf {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.side-catalog-btn {
  margin-top: 0.65rem;
  width: 100%;
  justify-content: center;
}

.side-rain-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.side-rain-row {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--stroke2);
}
.side-rain-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.side-rain-key {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.side-rain-val {
  font-size: 0.98rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.2;
}

.side-rail-inline-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.side-rail-inline-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.side-rail-legend {
  position: relative;
  padding-left: 0.85rem;
}

.side-rail-legend-line {
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-warm));
  opacity: 0.65;
}

.side-rail-tips {
  margin: 0;
  padding: 0 0 0 0.15rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.side-rail-tips li {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}
.side-rail-tips li strong {
  color: var(--text2);
  font-weight: 600;
}

@media (max-width: 1180px) {
  .page-layout__cols {
    grid-template-columns: 1fr;
  }
  .side-rail {
    display: none;
  }
  .page-center {
    border-left: none;
    border-right: none;
  }
}

/* ══ LAYOUT ══ */
.wrap {
  width: min(100% - 2.4rem, var(--max));
  margin-inline: auto;
}

.page-center .wrap {
  width: min(100% - 2rem, 100%);
  max-width: var(--max);
  margin-inline: auto;
}

/* ══ HEADER ══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--header-border);
  transition: background var(--t), border-color var(--t);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-logo-img {
  flex-shrink: 0;
  width: 3.25rem;
  height: auto;
  max-height: 3.35rem;
  object-fit: contain;
  display: block;
}

.brand-nome-img {
  height: 1.85rem;
  width: auto;
  max-width: 11.5rem;
  object-fit: contain;
  object-position: left center;
  display: block;
}

@media (max-width: 480px) {
  .brand-nome-img {
    max-width: 8.25rem;
    height: 1.55rem;
  }
  .brand-logo-img {
    width: 2.85rem;
    max-height: 2.95rem;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* ══ BUTTONS ══ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 999px;
  padding: 0.62rem 1.15rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t);
  line-height: 1;
}
.btn:active { transform: scale(0.97); }

.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.88rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 22px rgba(27, 114, 216, 0.32);
}
[data-theme="dark"] .btn-primary {
  box-shadow: 0 6px 22px rgba(59, 201, 224, 0.25);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(27, 114, 216, 0.42); filter: brightness(1.06); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--stroke);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}

.btn-ghost { background: transparent; color: var(--text2); border-color: var(--stroke); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

.btn.full { width: 100%; justify-content: center; margin-top: 0.75rem; }

/* ══ THEME TOGGLE ══ */
.theme-toggle {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1.5px solid var(--stroke);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text2);
  flex-shrink: 0;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ══ HERO ══ */
.hero {
  padding: 2rem 0 0;
}
.hero-inner {
  display: grid;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
}

/* ── Weather scene ── */
.scene-wrap {
  --scene-wind-duration: 3.2s;
  --scene-wind-opacity: 0.45;
  --rain-fall-duration: 1.25s;
  --cloud-dur-near: 9s;
  --cloud-dur-far: 14s;
  --sun-glow-scale: 1.05;
  --sun-glow-opacity: 0.38;
  max-width: min(100%, 360px);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.35rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.weather-scene {
  width: 100%;
  height: auto;
  display: block;
}

/* Scene SVG stop colors via CSS */
.sky-stop-1 { stop-color: var(--sky-top); }
.sky-stop-2 { stop-color: var(--sky-bottom); }

/* Scene elements — cores fixas (independentes do tema) */
.sun-glow {
  fill: var(--sun-color);
  transform-origin: 376px 62px;
  transform: scale(var(--sun-glow-scale, 1));
  opacity: var(--sun-glow-opacity, 0.35);
  pointer-events: none;
}
.sun-body {
  fill: var(--sun-color);
  opacity: 1;
}
.sun-rays line {
  stroke: var(--sun-ray);
  opacity: 1;
}
.cloud-near ellipse,
.cloud-near circle { fill: #deeef8; }
.cloud-far ellipse,
.cloud-far circle { fill: #eef5fb; }
.drop { stroke: var(--rain-color); }
.wline { stroke: var(--wind-color); fill: none; stroke-linecap: round; }

/* Scene animations */
@keyframes ray-spin   { to { transform: rotate(360deg); } }
@keyframes sun-pulse  { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes cloud-drift { 0%,100% { transform: translateX(0); } 50% { transform: translateX(13px); } }
@keyframes rain-fall  { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(52px); opacity: 0; } }
@keyframes wind-sweep { 0% { stroke-dashoffset: 280; } 100% { stroke-dashoffset: -280; } }

.sun-rays {
  transform-origin: 376px 62px;
  animation: ray-spin 14s linear infinite;
}
.sun-body {
  transform-box: fill-box;
  transform-origin: center;
  animation: sun-pulse 3.5s ease-in-out infinite;
}
.cloud-near { animation: cloud-drift var(--cloud-dur-near, 9s) ease-in-out infinite; }
.cloud-far  { animation: cloud-drift var(--cloud-dur-far, 14s) ease-in-out infinite 2s; }

.scene-wrap[data-scene="clear"] .cloud-near { opacity: 0.4; }
.scene-wrap[data-scene="clear"] .cloud-far { opacity: 0.46; }
.scene-wrap[data-scene="partly-cloudy"] .cloud-near { opacity: 0.88; }
.scene-wrap[data-scene="partly-cloudy"] .cloud-far { opacity: 0.72; }
.scene-wrap[data-scene="cloudy"] .cloud-near,
.scene-wrap[data-scene="rain"] .cloud-near,
.scene-wrap[data-scene="storm"] .cloud-near { opacity: 1; }
.scene-wrap[data-scene="cloudy"] .cloud-far,
.scene-wrap[data-scene="rain"] .cloud-far,
.scene-wrap[data-scene="storm"] .cloud-far { opacity: 0.92; }
.scene-wrap[data-scene="snow"] .cloud-near { opacity: 0.96; }
.scene-wrap[data-scene="snow"] .cloud-far { opacity: 0.88; }
.scene-wrap[data-scene="fog"] .cloud-near { opacity: 0.55; }
.scene-wrap[data-scene="fog"] .cloud-far { opacity: 0.5; }

.scene-wrap[data-rain="none"] .rain-layer .drop { opacity: 0 !important; animation: none !important; }
.scene-wrap[data-rain="light"] .rain-layer .drop:nth-child(n+8) { opacity: 0 !important; animation: none !important; }
.scene-wrap[data-rain="light"] .rain-layer .drop { opacity: 0.52; }
.scene-wrap[data-rain="moderate"] .rain-layer .drop:nth-child(n+13) { opacity: 0 !important; animation: none !important; }
.scene-wrap[data-rain="moderate"] .rain-layer .drop { opacity: 0.85; }
.scene-wrap[data-rain="heavy"] .rain-layer .drop { opacity: 1; }

.scene-wrap[data-scene="snow"] .rain-layer .drop { opacity: 0 !important; animation: none !important; }

.drop { animation: rain-fall var(--rain-fall-duration, 1.25s) ease-in infinite; }
.d1  { animation-delay: 0s; }
.d2  { animation-delay: 0.10s; }
.d3  { animation-delay: 0.20s; }
.d4  { animation-delay: 0.30s; }
.d5  { animation-delay: 0.40s; }
.d6  { animation-delay: 0.50s; }
.d7  { animation-delay: 0.60s; }
.d8  { animation-delay: 0.70s; }
.d9  { animation-delay: 0.05s; }
.d10 { animation-delay: 0.15s; }
.d11 { animation-delay: 0.25s; }
.d12 { animation-delay: 0.35s; }
.d13 { animation-delay: 0.45s; }
.d14 { animation-delay: 0.55s; }
.d15 { animation-delay: 0.65s; }

.wline {
  stroke-dasharray: 130 70;
  animation: wind-sweep var(--scene-wind-duration, 3.2s) ease-in-out infinite;
  opacity: var(--scene-wind-opacity, 0.45);
}
.w1 { animation-delay: 0s; }
.w2 { animation-delay: 1.1s; }
.w3 { animation-delay: 2.2s; }

@media (prefers-reduced-motion: reduce) {
  .sun-rays, .sun-body, .sun-glow, .cloud-near, .cloud-far,
  .drop, .wline { animation: none !important; }
}

/* ── Hero copy ── */
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  line-height: 1.08;
  color: var(--text);
}
.lede {
  margin: 0 0 1.4rem;
  color: var(--text2);
  font-size: 1.04rem;
  max-width: 34rem;
}
.hero-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

/* Bloco abaixo da animação (hero) */
.hero-scene-below {
  margin-top: 0.35rem;
  max-width: min(100%, 26rem);
  margin-left: auto;
  margin-right: auto;
}
.hero-scene-below .hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 0.45rem;
  color: var(--text);
}
.hero-scene-below .hero-lede {
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
  max-width: none;
}
.hero-live-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--stroke2);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
}
.hero-live-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text2);
  width: 100%;
}
.hero-live-city {
  font-size: 1.05rem;
  font-weight: 700;
}
.hero-live-temp {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
}
.hero-live-cond {
  font-size: 0.88rem;
  color: var(--text2);
  flex: 1 1 100%;
}
.hero-scene-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.forecast-subnav__link--route {
  color: var(--accent);
}

/* Página catálogo de cidades (cidades.html) */
.catalog-page {
  padding: 1.25rem 0 3.5rem;
}
.catalog-page > h1.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.catalog-page__intro {
  color: var(--text2);
  font-size: 0.95rem;
  max-width: 52ch;
  margin: 0 0 1rem;
}
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem;
}
.catalog-toolbar--paginated {
  justify-content: space-between;
  align-items: center;
}
.catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.catalog-page-indicator {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  min-width: 9.5rem;
  text-align: center;
}
.catalog-progress-meta {
  font-size: 0.88rem;
  color: var(--text2);
  margin: 0;
  flex: 1 1 12rem;
}
.catalog-progress-track {
  width: 100%;
  max-width: 420px;
  height: 6px;
  background: var(--stroke2);
  border-radius: 99px;
  overflow: hidden;
}
.catalog-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  border-radius: 99px;
  transition: width 0.12s ease-out;
}
.catalog-uf-section {
  margin: 2rem 0 2.25rem;
  scroll-margin-top: 5rem;
}
.catalog-uf-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--stroke2);
  color: var(--text);
}
.catalog-city-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.35rem;
}
.catalog-city-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--stroke2);
  background: var(--surface);
  font-size: 0.9rem;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.catalog-city-row:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: var(--shadow);
}
.catalog-city-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.catalog-city-temp {
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.catalog-stats {
  font-size: 0.88rem;
  color: var(--text2);
  margin: 0;
  flex: 1 1 14rem;
}

.catalog-footer { margin-top: 2rem; }
.catalog-footer-simple {
  padding: 1.5rem 0 2.25rem;
  text-align: center;
}
.catalog-footer-simple__p { margin: 0 0 0.35rem; }
.catalog-footer-simple__copy { margin: 0; font-size: 0.85rem; color: var(--text2); }

.cities-loading-msg {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cities-toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.cities-search-label {
  flex: 1 1 auto;
  width: 100%;
  max-width: 26rem;
}
.cities-search-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1.5px solid var(--stroke);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--t), background var(--t);
}
.cities-search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .cities-toolbar.catalog-toolbar--paginated {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}

.cities-city-list .cities-empty-msg {
  grid-column: 1 / -1;
  list-style: none;
  padding: 1.25rem 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.catalog-city-row--linkonly .catalog-city-chevron {
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  opacity: 0.85;
}

/* ══ CARD ══ */
.card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background var(--t), border-color var(--t), box-shadow var(--t);
}

/* ══ NOW CARD ══ */
.hero-right { position: relative; }
.hero-panel { padding: 1.25rem 1.35rem; min-height: 260px; position: relative; overflow: hidden; }
.hero-panel::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -50px;
  top: -60px;
  background: radial-gradient(circle, var(--accent-bg), transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}

.now-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 228px;
  color: var(--muted);
}

.loading-inline-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--stroke);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: app-boot-spin 0.8s linear infinite;
  flex-shrink: 0;
}

.loading-inline-spinner--lg {
  width: 1.5rem;
  height: 1.5rem;
  border-width: 3px;
}

.loading-bar {
  display: inline-block;
  height: 0.9em;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--stroke2), var(--accent-bg), var(--stroke2));
  background-size: 200% 100%;
  animation: loading-shimmer 1.15s linear infinite;
  vertical-align: middle;
}

.loading-bar--sm { width: 3.25rem; }
.loading-bar--md { width: 7.5rem; }
.loading-bar--temp { width: 4.4rem; height: 0.82em; }

.is-loading {
  color: var(--muted);
}

@keyframes loading-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hidden { display: none !important; }

.now-content { position: relative; z-index: 1; }

.now-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.now-minmax-today {
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: var(--accent-bg);
  border: 1px solid var(--stroke2);
}
.now-minmax-k {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.now-minmax-nums {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}
.now-mm-val {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.now-mm-suf {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.06rem;
}
.now-mm-sep {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--stroke);
  line-height: 1;
  padding: 0 0.1rem;
}

.now-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}
.now-city {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  min-height: 1.2em;
}
.now-date { color: var(--muted); font-size: 0.88rem; min-height: 1.2em; }

.now-back-now {
  margin: 0.4rem 0 0.85rem;
  width: 100%;
  justify-content: center;
}

.now-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.2rem;
}
.now-icon svg { color: var(--accent-warm); width: 38px; height: 38px; flex-shrink: 0; }
.now-icon .wx-icon--now { width: 38px; height: 38px; object-fit: contain; display: block; }

/* Ícones de condição — cópia local dos SVG v2 do Climatempo (assets/wx/<código>.svg) */
.wx-icon {
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
[data-theme="dark"] .wx-icon {
  filter: brightness(1.12) saturate(1.05);
}
.wx-icon--daily {
  width: 32px;
  height: 32px;
  margin: 0 0 0.35rem;
}
.daily-card-icon { line-height: 0; }

.wx-icon--hour {
  width: 30px;
  height: 30px;
  margin: 0 auto;
}
.hourly-th-wx { width: 2.75rem; }
.hour-wx { text-align: center; vertical-align: middle; padding-inline: 0.35rem !important; }

.wx-icon--inline {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.ap-name--with-icon {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.ap-name--with-icon strong { font-weight: 600; }
.now-temp-group { display: flex; align-items: flex-start; gap: 0.1rem; }
.now-temp {
  font-size: clamp(3rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  min-width: 4.4rem;
  min-height: 1em;
}
.now-unit { font-size: 1.25rem; color: var(--muted); margin-top: 0.45rem; }

.now-condition {
  margin: 0.1rem 0 1rem;
  color: var(--text2);
  font-size: 0.97rem;
  min-height: 1.55rem;
}

.now-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.now-stats li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.93rem;
  color: var(--text2);
}
.now-stats svg { flex-shrink: 0; color: var(--accent); opacity: 0.80; }
.now-stats strong { color: var(--text); font-weight: 700; }

.now-rainbow-block {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stroke2);
}
.now-rainbow-k {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.now-rainbow-desc {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.4;
  color: var(--text2);
}

.err-banner {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(220, 60, 60, 0.07);
  border: 1px solid rgba(220, 60, 60, 0.25);
  color: #b33;
  font-size: 0.92rem;
}
[data-theme="dark"] .err-banner {
  background: rgba(255, 100, 100, 0.10);
  border-color: rgba(255, 100, 100, 0.28);
  color: #ffc7c7;
}

/* ══ SECTIONS ══ */
.section { margin-top: 2.75rem; }

.section-head { margin-bottom: 1.15rem; }
.section-head h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}
.section-ico { color: var(--accent-warm); flex-shrink: 0; }
.section-sub { margin: 0; color: var(--muted); font-size: 0.95rem; }
.hourly-chart-legend { margin-top: 0.4rem; max-width: 42rem; line-height: 1.45; font-size: 0.88rem; }

.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.section-head__text { flex: 1; min-width: 12rem; }

.hourly-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.hourly-toolbar-hint {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.hourly-view-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--stroke2);
}
.hourly-view-tab {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.95rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: background var(--t), color var(--t), box-shadow var(--t);
}
.hourly-view-tab:hover {
  color: var(--accent);
}
.hourly-view-tab.is-active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .hourly-view-tab.is-active {
  background: var(--surface);
}

.hourly-panel--chart,
.hourly-panel--table {
  min-height: 200px;
}

/* ══ DAILY SCROLL ══ */
.daily-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  min-height: 194px;
}
.daily-scroll::-webkit-scrollbar { height: 5px; }
.daily-scroll::-webkit-scrollbar-track { background: var(--stroke2); border-radius: 4px; }
.daily-scroll::-webkit-scrollbar-thumb { background: var(--stroke); border-radius: 4px; }

.daily-card {
  flex: 0 0 152px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1.5px solid var(--stroke);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), transform 0.15s;
}
.daily-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.daily-card.is-active { border-color: var(--accent-warm); box-shadow: 0 0 0 1px var(--accent-warm); }

.daily-card .d-day { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.daily-card .d-date { font-weight: 700; font-size: 1.05rem; margin: 0.18rem 0 0.45rem; color: var(--text); }
.daily-card .d-range { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; font-size: 1rem; }
.daily-card .d-rain { margin-top: 0.4rem; font-size: 0.79rem; color: var(--muted); }
.daily-card .d-phrase {
  margin-top: 0.5rem; font-size: 0.76rem; color: var(--muted);
  line-height: 1.35; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ══ HOURLY ══ */
.hourly-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100px;
  margin-bottom: 1.1rem;
  padding: 0.5rem 0;
}
.hour-bar {
  flex: 1;
  min-width: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-bg));
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: opacity var(--t), box-shadow var(--t);
  cursor: pointer;
}
.hour-bar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hour-bar.is-selected {
  box-shadow: 0 0 0 2px var(--accent);
  border-radius: 8px;
}
.hour-bar span {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%) rotate(-48deg);
  font-size: 0.58rem;
  color: var(--muted);
  white-space: nowrap;
  transform-origin: center center;
}

.hourly-table-wrap { overflow-x: auto; }
.hourly-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.hourly-table th,
.hourly-table td { text-align: left; padding: 0.52rem 0.65rem; border-bottom: 1px solid var(--stroke2); }
.hourly-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hourly-table td { color: var(--text2); }
.hourly-table tbody tr {
  cursor: pointer;
  transition: background var(--t);
}
.hourly-table tbody tr.is-selected {
  background: var(--accent-bg);
}
.hourly-table tbody tr:hover { background: rgba(27, 114, 216, 0.04); }
[data-theme="dark"] .hourly-table tbody tr:hover { background: rgba(59, 201, 224, 0.06); }
.hourly-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ══ RAIN GRID ══ */
.rain-grid {
  display: grid;
  gap: 0;
  padding: 0.5rem 0.5rem;
  min-height: 154px;
}
@media (min-width: 640px) { .rain-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .rain-grid { grid-template-columns: repeat(4, 1fr); } }

.rain-item {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--stroke2);
}
.rain-item:last-child { border-bottom: none; }
.rain-item span.label { display: block; color: var(--muted); font-size: 0.8rem; margin-bottom: 0.2rem; }
.rain-item strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--text); }

/* ══ HEALTH ══ */
.health-grid { display: grid; gap: 0.75rem; min-height: 264px; }
@media (min-width: 640px)  { .health-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .health-grid { grid-template-columns: repeat(3, 1fr); } }

.health-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  transition: background var(--t), border-color var(--t);
}
.health-card h3 { margin: 0 0 0.25rem; font-family: var(--font-display); font-size: 0.97rem; color: var(--text); }
.health-card .hc-cond { color: var(--accent-warm); font-weight: 600; font-size: 0.86rem; margin-bottom: 0.3rem; }
.health-card p { margin: 0; font-size: 0.85rem; color: var(--text2); }

/* ══ TWO-COL ══ */
.two-col { display: grid; gap: 2rem; }
@media (min-width: 880px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ══ AIRPORT + CITY LISTS ══ */
.air-list, .city-list { list-style: none; margin: 0; padding: 0.3rem 0; min-height: 320px; }
.air-list li, .city-list li {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--stroke2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.3rem;
}
.air-list li:last-child, .city-list li:last-child { border-bottom: none; }

.air-list li.list-row--weather,
.city-list li.list-row--weather {
  cursor: pointer;
  border-radius: 10px;
  margin-inline: 0.15rem;
  transition: background var(--t), box-shadow var(--t);
}
.air-list li.list-row--weather:hover,
.city-list li.list-row--weather:hover {
  background: var(--accent-bg);
  box-shadow: inset 0 0 0 1px var(--stroke2);
}
.air-list li.list-row--weather:focus-visible,
.city-list li.list-row--weather:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
[data-theme="dark"] .air-list li.list-row--weather:hover,
[data-theme="dark"] .city-list li.list-row--weather:hover {
  box-shadow: inset 0 0 0 1px var(--stroke);
}

.ap-name { font-weight: 600; color: var(--text); font-size: 0.92rem; }
.ap-meta { font-size: 0.82rem; color: var(--muted); margin-top: 1px; }
.ap-temp { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; font-size: 1rem; }

/* ══ SEARCH DIALOG ══ */
.search-dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: min(100% - 2rem, 520px);
  width: 100%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.search-dialog::backdrop { background: rgba(5, 10, 22, 0.62); backdrop-filter: blur(4px); }

.search-inner { padding: 1.5rem; }
.search-inner h2 { margin: 0 0 0.3rem; font-family: var(--font-display); font-size: 1.4rem; }
.search-hint { margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; }

.search-input {
  width: 100%; padding: 0.72rem 0.95rem;
  border-radius: 12px; border: 1.5px solid var(--stroke);
  background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1rem;
  transition: border-color var(--t), background var(--t);
}
.search-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.search-status { min-height: 1.25rem; font-size: 0.84rem; color: var(--muted); margin: 0.45rem 0; display: flex; align-items: center; }

.side-cities-intro,
.side-snapshot-meta,
.hero-live-city,
.hero-live-temp {
  min-height: 1.2rem;
}

.side-cities-list {
  min-height: 18rem;
}

.search-results {
  list-style: none; margin: 0; padding: 0;
  max-height: 280px; overflow-y: auto;
  border: 1.5px solid var(--stroke); border-radius: 12px;
}
.search-results li button {
  width: 100%; text-align: left; padding: 0.6rem 0.82rem;
  border: none; border-bottom: 1px solid var(--stroke2);
  background: transparent; color: var(--text);
  font-family: var(--font-body); font-size: 0.93rem; cursor: pointer;
  transition: background var(--t);
}
.search-results li:last-child button { border-bottom: none; }
.search-results li button:hover { background: var(--accent-bg); color: var(--accent); }

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

/* ══════════════════════════════════════════════════════
   FOOTER — fiel ao Dicionário Informal
══════════════════════════════════════════════════════ */
.site-footer {
  background: #1e1e22;
  color: rgba(255,255,255,0.55);
  margin-top: 3.5rem;
  max-width: 100%;
  overflow-x: visible;
}

.footer-main {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1.6fr 1fr auto minmax(12rem, 1.35fr);
  gap: 2rem 2.5rem;
  min-width: 0;
  overflow-x: clip;
}
/* Evita cortar colunas com scroll interno (CONSULTAR) em viewports estreitos */
@media (max-width: 900px) {
  .footer-main {
    overflow-x: visible;
    overflow: visible;
  }
}

.footer-col-spacer { height: 1em; margin-bottom: 0.85rem; }

.footer-copyright-block {
  display: flex; flex-direction: column;
  gap: 0.35rem; text-align: right;
}

.footer-copyright-line {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.45;
}

.footer-col--copyright .footer-by { display: block; text-align: right; }

.footer-col--social { display: flex; flex-direction: column; align-items: center; }

.footer-col-title--contact { width: 100%; text-align: center; margin: 0 0 0.85rem 0; }

.footer-social-nav {
  display: grid;
  grid-template-columns: repeat(3, 2.1rem);
  grid-template-rows: repeat(3, 2.1rem);
  gap: 0.32rem 0.45rem;
  justify-content: center; justify-items: center; align-items: center;
  margin: 0 auto;
}

.footer-social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem;
  color: rgba(255,255,255,0.52);
  border-radius: 6px;
  transition: color var(--t), background var(--t);
}
.footer-social-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.footer-social-link svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

.footer-brand-col { display: flex; flex-direction: column; gap: 1rem; }

.footer-di-brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: rgba(255,255,255,0.55);
}
.footer-brand-logo {
  flex-shrink: 0;
  width: 3.15rem;
  height: auto;
  max-height: 3.25rem;
  object-fit: contain;
  opacity: 0.65;
  filter: grayscale(1);
  transition: opacity var(--t), filter var(--t);
}
.footer-brand-nome {
  height: 1.65rem;
  width: auto;
  max-width: 11.75rem;
  object-fit: contain;
  object-position: left center;
  opacity: 0.65;
  filter: grayscale(1);
  transition: opacity var(--t), filter var(--t);
}
.footer-di-brand:hover .footer-brand-logo,
.footer-di-brand:hover .footer-brand-nome {
  opacity: 0.9;
  filter: grayscale(0.35);
}

.footer-contacts { display: flex; flex-direction: column; gap: 0.4rem; }

.footer-contact-link {
  font-size: 0.82rem; color: rgba(255,255,255,0.5);
  text-decoration: none; transition: color var(--t);
}
.footer-contact-link:hover { color: #fff; }

.footer-col-title {
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3); margin: 0 0 0.85rem 0;
}

.footer-col-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.45rem;
}

.footer-col-list a,
.footer-link-btn {
  font-size: 0.84rem; color: rgba(255,255,255,0.55);
  text-decoration: none; background: none; border: none;
  cursor: pointer; padding: 0; text-align: left;
  font-family: inherit; transition: color var(--t);
}
.footer-col-list a:hover,
.footer-link-btn:hover { color: #fff; }
.footer-col-list a[aria-current="page"] {
  color: rgba(255,255,255,0.75);
  text-decoration: underline; text-underline-offset: 3px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.15rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.9rem 0 1.25rem;
}

.footer-by { font-size: 0.73rem; color: rgba(255,255,255,0.25); }

/* CONSULTAR: 2 linhas horizontais, 7 itens por linha */
.footer-letters-grid { display: flex; flex-direction: column; gap: 0.4rem; }

.footer-col-list.footer-letters-row {
  flex-direction: row; flex-wrap: nowrap;
  gap: 0.42rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 2px 3px 4px; box-sizing: border-box;
}
.footer-col-list.footer-letters-row > li { flex-shrink: 0; }

/* Selos: grupo centrado; scroll horizontal se não couber (mantém virtues visível à direita do grupo) */
.footer-bottom-labels {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
.footer-bottom-labels .footer-store-link {
  flex: 0 0 auto;
}
.footer-bottom .footer-virtues-link {
  flex: 0 0 auto;
  align-self: center;
}

.footer-store-link {
  flex: 0 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  line-height: 0; opacity: 0.8; transition: opacity var(--t);
  text-decoration: none;
}
.footer-store-link:hover { opacity: 1; }

.footer-badge {
  height: auto; width: auto;
  max-width: 100%; max-height: 48px;
  display: block; object-fit: contain;
}

.footer-virtues-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.7); text-decoration: none;
  font-size: 0.9rem; font-weight: 700; transition: opacity var(--t);
}
.footer-virtues-link:hover { opacity: 0.85; color: #fff; }
.footer-virtues-logo { height: 30px; width: auto; object-fit: contain; }
.footer-virtues-text { font-family: var(--font-body); letter-spacing: 0.02em; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-tools { flex-direction: column; }
  .hero-tools .btn { justify-content: center; }

  .scene-wrap { margin-bottom: 1.25rem; }

  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 2rem 1rem 1.5rem; gap: 1.5rem 1rem;
  }
  .footer-main > .footer-col,
  .footer-main > .footer-brand-col {
    min-width: 0;
  }
  .footer-brand-col,
  .footer-col--copyright { grid-column: 1 / -1; }
  .footer-col--letters {
    justify-self: stretch;
    text-align: left;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }
  .footer-col--letters .footer-col-title { text-align: left; width: 100%; }
  .footer-col--letters .footer-letters-grid {
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .footer-col--letters .footer-col-list.footer-letters-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;
    scrollbar-width: thin;
    padding: 4px 2px 8px;
  }
  .footer-col--social { justify-self: end; align-items: flex-end; }
  .site-footer .footer-col--social .footer-col-title--contact { text-align: right; }
  .footer-col--social .footer-social-nav { margin-left: auto; margin-right: 0; }
  .footer-copyright-block,
  .footer-col--copyright .footer-by { text-align: center; }

  .footer-bottom {
    gap: 0.65rem 0.85rem;
    padding: 0.85rem 0 1rem;
  }
}

@media (max-width: 540px) {
  .footer-main {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 1.25rem 0.75rem; padding: 1.5rem 1rem 1.75rem; align-items: start;
  }
  .footer-col--dic .footer-link-btn, .footer-col--dic a,
  .footer-col--legal a, .footer-contact-link { overflow-wrap: anywhere; }
  .footer-brand-col { grid-column: 1/-1; max-width: none; }
  .footer-col--copyright { grid-column: 1/-1; }
  .footer-col--copyright .footer-copyright-block,
  .footer-col--copyright .footer-by { text-align: center; }

  .footer-bottom {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 0.75rem 1.15rem;
    gap: 0.85rem;
  }
  .footer-bottom-labels {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    align-items: center;
    max-width: 100%;
    width: 100%;
    overflow-x: visible;
    overflow-y: visible;
    row-gap: 0.55rem;
    column-gap: 0.45rem;
    padding: 0.15rem 0;
  }
  .footer-badge {
    max-height: 44px;
    width: auto;
    margin: 0;
    flex: 0 0 auto;
  }
  .footer-virtues-logo { height: 26px; }
}

/* ── Modal Sugestão / Fale conosco (mesmo padrão que dicionarioinformal) ── */
.fmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 28, 0.58);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
[data-theme="dark"] .fmodal-overlay {
  background: rgba(0, 0, 0, 0.72);
}
.fmodal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.fmodal {
  background: var(--surface);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--stroke2);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.22s ease;
}
.fmodal-overlay.open .fmodal {
  transform: translateY(0) scale(1);
}
.fmodal-header {
  padding: 1.1rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--stroke2);
}
.fmodal-tabs {
  display: flex;
  gap: 0;
}
.fmodal-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  margin-bottom: -1.5px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.fmodal-tab-icon {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}
.fmodal-tab-icon svg {
  display: block;
}
.fmodal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.fmodal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.25rem;
  transition: color 0.15s;
  font-family: inherit;
}
.fmodal-close:hover {
  color: var(--text);
}
.fmodal-body {
  padding: 1.5rem;
}
.fform-group {
  margin-bottom: 1rem;
}
.fform-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
  line-height: 1.35;
}
.fform-hint strong {
  color: var(--text2);
  font-weight: 700;
}
.fform-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 0.4rem;
}
.fform-input,
.fform-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--stroke);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  background: var(--bg);
}
.fform-input:focus,
.fform-textarea:focus {
  border-color: var(--accent);
}
.fform-textarea {
  resize: vertical;
  min-height: 88px;
}
.fform-submit {
  width: 100%;
  padding: 0.78rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.25rem;
  font-family: inherit;
}
.fform-submit:hover {
  opacity: 0.9;
}
.fform-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.fmodal-msg {
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.83rem;
  margin-bottom: 1rem;
}
.fmodal-msg.success {
  background: rgba(34, 160, 90, 0.12);
  border: 1.5px solid rgba(34, 160, 90, 0.45);
  color: var(--text);
}
.fmodal-msg.error {
  background: rgba(200, 60, 60, 0.1);
  border: 1.5px solid rgba(200, 80, 80, 0.45);
  color: #b00;
}
[data-theme="dark"] .fmodal-msg.error {
  color: #f0a8a8;
}
.fmodal-success-view {
  text-align: center;
  padding: 2rem 1.5rem;
}
.fmodal-success-icon {
  margin-bottom: 0.75rem;
  line-height: 0;
  color: #1a7a3f;
}
[data-theme="dark"] .fmodal-success-icon {
  color: #6dd89a;
}
.fmodal-success-icon svg {
  display: block;
  margin: 0 auto;
}
.fmodal-success-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.fmodal-success-desc {
  font-size: 0.85rem;
  color: var(--muted);
}

.catalog-footer-modal-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 0 0.5rem;
}

@media (max-width: 768px) {
  .fmodal {
    border-radius: 10px;
  }
  .fmodal-body {
    padding: 1rem;
  }
}

/* ══════════════════════════════════════════════════════
   MOBILE / TOQUE — leitura confortável e alvos táteis
══════════════════════════════════════════════════════ */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.site-header {
  padding-top: env(safe-area-inset-top, 0);
}

.site-footer {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0));
}

.forecast-subnav__inner.wrap {
  padding-left: max(0.25rem, env(safe-area-inset-left));
  padding-right: max(0.25rem, env(safe-area-inset-right));
}

@media (max-width: 640px) {
  .hero {
    padding: 1.35rem 0 0;
  }
  .section {
    margin-top: 2.1rem;
  }
  .section-head h2 {
    font-size: clamp(1.15rem, 4.5vw, 1.35rem);
  }
  .hero-panel {
    padding: 1rem 1rem;
    min-height: 0;
  }
  .now-city {
    font-size: clamp(1.2rem, 5vw, 1.45rem);
  }
  .now-temp {
    font-size: clamp(2.35rem, 12vw, 3.25rem);
  }
  .header-inner {
    padding: 0.65rem 0;
    gap: 0.5rem;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }
  .header-inner .brand {
    align-self: center;
    justify-content: center;
  }
  /* Linha 2: Cidades | busca | tema (só na home com busca) */
  .header-actions:has(#btn-open-search) {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: initial;
  }
  .header-actions:has(#btn-open-search) .header-link-cidades {
    justify-self: start;
  }
  .header-actions:has(#btn-open-search) #btn-open-search {
    justify-self: center;
  }
  .header-actions:has(#btn-open-search) .theme-toggle {
    justify-self: end;
  }
  /* Páginas só com atalho + tema (ex.: cidades.html) */
  .header-actions:not(:has(#btn-open-search)) {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.35rem;
  }
  .header-actions .btn-sm {
    padding: 0.48rem 0.65rem;
    font-size: 0.82rem;
  }
  .theme-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .hourly-table-wrap {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
  }
  .hourly-table {
    font-size: 0.8rem;
  }
  .hourly-table th,
  .hourly-table td {
    padding: 0.55rem 0.45rem;
    white-space: nowrap;
  }
  .hourly-view-tab {
    padding: 0.45rem 0.72rem;
    font-size: 0.78rem;
  }
  .daily-scroll {
    scroll-padding-inline: 0.35rem;
  }
  .search-dialog {
    max-width: min(100vw - 0.75rem - env(safe-area-inset-left) - env(safe-area-inset-right), 520px);
    max-height: min(88dvh, 100vh);
    margin: auto;
  }
  .search-inner {
    padding: 1.1rem max(1rem, env(safe-area-inset-right)) 1.25rem max(1rem, env(safe-area-inset-left));
  }
  .search-results {
    max-height: min(42vh, 320px);
  }
  .search-results li button {
    padding: 0.72rem 0.85rem;
    min-height: 44px;
    font-size: 1rem;
  }
  .air-list li,
  .city-list li {
    padding: 0.85rem 0.75rem;
    min-height: 48px;
  }
  .catalog-city-list {
    grid-template-columns: 1fr;
  }
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 420px) {
  /* Esconde só o texto “Buscar cidade” (o botão tem ícone). */
  .header-actions .header-nav-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .header-link-cidades .header-nav-text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    border: 0;
  }
  .header-actions .btn-sm {
    padding: 0.5rem 0.62rem;
  }
  .header-link-cidades {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: 0.75rem;
  }
}

@media (max-width: 380px) {
  .forecast-subnav__link {
    font-size: 0.78rem;
    padding: 0.38rem 0.5rem;
  }
}
