:root {
  --bg-deep: #0a0e14;
  --bg-panel: #111820;
  --bg-card: #161f2b;
  --border: #1e2d3d;
  --border-glow: #00d4aa33;
  --text: #e8edf2;
  --text-muted: #7a8fa3;
  --accent: #00d4aa;
  --accent-dim: #00a884;
  --warning: #ff6b4a;
  --pulse: #00d4aa;
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.scanline {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 100;
}

.header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
}

.btn-export {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.55rem 1rem;
  white-space: nowrap;
}

.btn-export:hover:not(:disabled) {
  background: rgba(0, 212, 170, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.65rem 1.15rem;
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pulse);
  box-shadow: 0 0 12px var(--pulse), 0 0 24px var(--pulse);
  animation: pulse-glow 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.logo h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-glow 2s ease-in-out infinite;
}

.status-bar.active .status-dot { background: var(--accent); }
.status-bar.error .status-dot { background: var(--warning); animation: none; }

.main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.search-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.search-form { margin-bottom: 0; }

.input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group:focus-within {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.input-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  min-width: 0;
}

.input-group input::placeholder { color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
  padding: 0.65rem 1.25rem;
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-dim); }

.btn-geo {
  width: 100%;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.85rem 1.25rem;
}

.btn-geo svg { width: 18px; height: 18px; }
.btn-geo:hover:not(:disabled) {
  background: rgba(0, 212, 170, 0.08);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.error-banner {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 107, 74, 0.12);
  border: 1px solid rgba(255, 107, 74, 0.35);
  border-radius: 8px;
  color: var(--warning);
  font-size: 0.9rem;
}

.alert-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 1.25rem;
  padding: 0.9rem 1.15rem;
  background: linear-gradient(90deg, #8b1a1a, #c62828);
  border: 1px solid #ff5252;
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(198, 40, 40, 0.35);
  animation: alert-pulse 2.5s ease-in-out infinite;
  transition: transform 0.15s, box-shadow 0.2s;
}

.alert-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(198, 40, 40, 0.45);
}

@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(198, 40, 40, 0.35); }
  50% { box-shadow: 0 0 28px rgba(255, 82, 82, 0.55); }
}

.alert-bar-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.alert-bar-text {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.alert-bar-action {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.9;
}

.alert-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.alert-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.alert-modal-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: min(85vh, 720px);
  background: var(--bg-panel);
  border: 1px solid #c62828;
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 82, 82, 0.2);
  display: flex;
  flex-direction: column;
  animation: fade-in 0.25s ease;
}

.alert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(90deg, #8b1a1a, #c62828);
  border-radius: var(--radius) var(--radius) 0 0;
}

.alert-modal-header h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.alert-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.alert-modal-close:hover { background: rgba(255, 255, 255, 0.25); }

.alert-modal-body {
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.alert-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid #ff5252;
  border-radius: 8px;
  padding: 1rem 1.15rem;
}

.alert-item-header {
  margin-bottom: 0.65rem;
}

.alert-item-event {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ff8a80;
  margin-bottom: 0.25rem;
}

.alert-item-headline {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
}

.alert-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.alert-item-meta span {
  background: var(--bg-panel);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.alert-item-area {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.alert-item-description,
.alert-item-instruction {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.alert-item-instruction {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: #ffccbc;
}

.hidden { display: none !important; }

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.pulse-ring {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.weather-display {
  margin-top: 2rem;
  animation: fade-in 0.4s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.location-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.location-meta {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.last-updated {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.current-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.current-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.weather-icon-lg {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(0, 212, 170, 0.2));
}

.current-temp {
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.current-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.25rem;
  text-transform: capitalize;
}

.current-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.current-stats dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.current-stats dd {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.65rem;
}

.ops-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 0.95rem;
}

.ops-card.ops-warn {
  border-color: rgba(255, 193, 7, 0.45);
  background: rgba(255, 193, 7, 0.06);
}

.ops-card.ops-critical {
  border-color: rgba(255, 82, 82, 0.55);
  background: rgba(198, 40, 40, 0.1);
}

.ops-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.ops-value {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.ops-sub {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.indices-grid {
  display: grid;
  gap: 1rem;
}

.index-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.index-panel.index-warn { border-color: rgba(255, 193, 7, 0.45); }
.index-panel.index-critical { border-color: rgba(255, 82, 82, 0.55); }
.index-panel.index-ok { border-left: 3px solid var(--accent); }

.index-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.index-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.index-abbr {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

.index-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.index-panel.index-ok .index-badge {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.index-panel.index-warn .index-badge {
  color: #ffc107;
  border-color: rgba(255, 193, 7, 0.45);
  background: rgba(255, 193, 7, 0.08);
}

.index-panel.index-critical .index-badge {
  color: #ff8a80;
  border-color: rgba(255, 82, 82, 0.55);
  background: rgba(198, 40, 40, 0.12);
}

.index-summary {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.index-score-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.index-score-value {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.index-score-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}

.index-score-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.4s ease;
}

.index-panel.index-warn .index-score-fill { background: #ffc107; }
.index-panel.index-critical .index-score-fill { background: #ff5252; }

.index-factors {
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.index-factors li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 0.85rem;
  position: relative;
  line-height: 1.4;
}

.index-factors li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.index-panel.index-warn .index-factors li::before { color: #ffc107; }
.index-panel.index-critical .index-factors li::before { color: #ff5252; }

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.export-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.export-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100dvh - 2rem);
  max-height: calc(100svh - 2rem);
  background: var(--bg-panel);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  animation: fade-in 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
}

.export-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.08), transparent);
  flex-shrink: 0;
}

.export-modal-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.export-modal-sub {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.export-form {
  padding: 1.25rem 1.35rem 1.35rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.export-tz-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.export-mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.export-mode-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.export-forecast-notice {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.75rem;
}

.export-range-grid.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.export-location-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.export-location-heading {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.export-location-value {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.export-location-warn {
  font-size: 0.82rem;
  color: var(--warning);
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.export-field-full {
  margin-bottom: 0.65rem;
}

.btn-sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.72rem;
}

.export-range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.export-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.export-field span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.export-field input,
.export-field select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.65rem 0.75rem;
}

.export-field input:focus,
.export-field select:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.export-field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8fa3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.export-author-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.export-author-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.export-field-other.hidden {
  display: none;
}

.export-error {
  font-size: 0.85rem;
  color: var(--warning);
  margin-bottom: 0.75rem;
}

.export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  position: sticky;
  bottom: 0;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  background: linear-gradient(180deg, transparent, var(--bg-panel) 28%);
  border-top: 1px solid var(--border);
}

.forecast-section { margin-bottom: 2rem; }

.section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.section-marker {
  width: 3px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
}

.hourly-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.hourly-scroll::-webkit-scrollbar { height: 4px; }
.hourly-scroll::-webkit-scrollbar-track { background: var(--bg-card); border-radius: 2px; }
.hourly-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.hour-card {
  flex: 0 0 88px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.65rem;
  text-align: center;
  transition: border-color 0.2s;
}

.hour-card.now {
  border-color: var(--accent-dim);
  box-shadow: 0 0 16px var(--border-glow);
}

.hour-card .hour-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.hour-card .hour-icon { font-size: 1.5rem; margin-bottom: 0.35rem; }

.hour-card .hour-temp {
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.hour-card .hour-precip {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--accent);
  margin-top: 0.3rem;
}

.daily-grid {
  display: grid;
  gap: 0.5rem;
}

.day-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
}

.day-row .day-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.day-row .day-icon { font-size: 1.5rem; text-align: center; }

.day-row .day-temps {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.day-row .temp-high { font-weight: 600; }
.day-row .temp-low {
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .header { padding: 1rem 1.25rem; flex-wrap: wrap; gap: 0.75rem; }
  .logo h1 { font-size: 1.1rem; }
  .current-stats { grid-template-columns: repeat(2, 1fr); }
  .current-temp { font-size: 2.75rem; }
  .weather-icon-lg { font-size: 3rem; }
  .day-row { grid-template-columns: 1fr auto; }
  .day-row .day-temps { grid-column: 1 / -1; text-align: left; padding-top: 0.25rem; }
  .export-modal {
    align-items: flex-start;
    padding: 0.5rem;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  }
  .export-modal-panel {
    max-height: calc(100dvh - 1rem);
    max-height: calc(100svh - 1rem);
    border-radius: 10px;
  }
  .export-modal-header {
    padding: 1rem 1.1rem;
  }
  .export-form {
    padding: 1rem 1.1rem 1.1rem;
  }
  .export-range-grid { grid-template-columns: 1fr; }
  .export-author-grid { grid-template-columns: 1fr; }
  .export-actions {
    flex-direction: column-reverse;
  }
  .export-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .btn-export { width: 100%; justify-content: center; }
}
