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

:root {
    --bg: #eff3f8;
    --bg-card: rgba(245, 248, 252, 0.84);
    --bg-card-soft: rgba(236, 242, 249, 0.74);
    --bg-card-strong: rgba(230, 237, 246, 0.92);
    --text: #162436;
    --text-dim: #5f6e83;
    --accent: #1d6fd8;
    --accent-soft: rgba(29, 111, 216, 0.12);
    --green: #22c55e;
    --yellow: #eab308;
    --orange: #f97316;
    --red: #ef4444;
    --border: rgba(103, 124, 151, 0.24);
    --radius: 16px;
    --radius-inner: 12px;
    --shadow-soft: 0 16px 34px rgba(30, 55, 90, 0.10);
    --forecast: #6d5efc;
}

body.theme-dark {
    --bg: #09111d;
    --bg-card: rgba(17, 25, 38, 0.82);
    --bg-card-soft: rgba(19, 29, 44, 0.74);
    --bg-card-strong: rgba(24, 35, 52, 0.9);
    --text: #e8f0fb;
    --text-dim: #99a7bb;
    --accent: #7cc4ff;
    --accent-soft: rgba(124, 196, 255, 0.14);
    --border: rgba(124, 146, 173, 0.2);
    --shadow-soft: 0 16px 34px rgba(0, 0, 0, 0.28);
    --forecast: #8a7cff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(29, 111, 216, 0.14), transparent 32%),
        radial-gradient(circle at top right, rgba(17, 181, 161, 0.12), transparent 28%),
        linear-gradient(180deg, #f9fbfe 0%, #eef3f9 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

body.theme-dark {
    background:
        radial-gradient(circle at top left, rgba(44, 112, 197, 0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(25, 145, 131, 0.12), transparent 28%),
        linear-gradient(180deg, #0d1623 0%, #08101a 100%);
}

.container {
    width: 100%;
    max-width: 480px;
    padding: 26px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

header {
    text-align: center;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

h1 {
    font-size: 2.05rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.title-mark {
    color: var(--accent);
    display: inline-block;
    margin-left: 2px;
    transform: translateY(-1px) rotate(-10deg);
    transform-origin: 50% 70%;
}

.section-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.location-form {
    width: min(100%, 360px);
}

.zip-row {
    display: flex;
    gap: 10px;
}

.location-form {
    position: relative;
}

#location-input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border-radius: var(--radius-inner);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font: inherit;
    text-align: left;
}

#location-input::placeholder {
    color: var(--text-dim);
    letter-spacing: 0;
}

#location-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29, 111, 216, 0.12);
}

#location-submit {
    border: 1px solid transparent;
    border-radius: var(--radius-inner);
    padding: 11px 18px;
    background: linear-gradient(135deg, var(--accent), #1457ab);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#location-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(20, 87, 171, 0.22);
}

#location-submit:focus-visible {
    outline: 2px solid rgba(29, 111, 216, 0.35);
    outline-offset: 2px;
}

.detected-location {
    width: 100%;
    min-height: 0;
    margin-top: 9px;
    display: grid;
    gap: 2px;
    justify-items: start;
    text-align: left;
}

.detected-location-name {
    display: block;
}

.detected-location-coords {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.location-suggestions {
    position: absolute;
    top: calc(100% - 6px);
    left: 0;
    right: 54px;
    z-index: 12;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card-strong);
    box-shadow: 0 18px 36px rgba(30, 55, 90, 0.16);
    backdrop-filter: blur(12px);
}

.location-suggestions[hidden],
.zip-status[hidden] {
    display: none !important;
}

.location-suggestion {
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.location-suggestion:hover,
.location-suggestion.active {
    background: rgba(29, 111, 216, 0.1);
}

.location-suggestion-main {
    display: block;
    font-size: 0.88rem;
}

.location-suggestion-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.74rem;
    color: var(--text-dim);
}

.zip-status {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.zip-status.error {
    color: var(--red);
}

.zip-status.success {
    color: var(--accent);
}

.loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(122, 145, 174, 0.28);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

.time-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.time-chip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 11px 13px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid rgba(122, 145, 174, 0.18);
    box-shadow: 0 8px 18px rgba(30, 55, 90, 0.08);
}

.time-chip-label {
    color: var(--text-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.time-chip-value {
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text);
}

.time-chip-subvalue {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 400;
}

.forecast-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 22px 20px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-soft));
    border-radius: var(--radius);
    border: 1px solid rgba(122, 145, 174, 0.22);
    min-height: 144px;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.forecast-card.rain {
    border-color: rgba(34, 197, 94, 0.2);
    box-shadow:
        var(--shadow-soft),
        0 0 0 1px rgba(34, 197, 94, 0.06) inset;
}

.forecast-card.dry {
    border-color: rgba(29, 111, 216, 0.16);
    box-shadow:
        var(--shadow-soft),
        0 0 0 1px rgba(29, 111, 216, 0.05) inset;
}

.forecast-headline {
    font-size: 2.05rem;
    line-height: 0.98;
    letter-spacing: -0.04em;
    font-weight: 700;
    min-height: 2.05em;
    max-width: 11ch;
}

.forecast-detail {
    min-height: 1.3em;
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 32ch;
}

.forecast-radar-link {
    align-self: flex-start;
    margin-top: 6px;
    border: 1px solid rgba(29, 111, 216, 0.18);
    border-radius: var(--radius-inner);
    padding: 9px 14px;
    background: linear-gradient(135deg, rgba(29, 111, 216, 0.1), rgba(29, 111, 216, 0.18));
    color: var(--accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.forecast-radar-link:hover {
    background: linear-gradient(135deg, rgba(29, 111, 216, 0.16), rgba(29, 111, 216, 0.24));
    border-color: rgba(29, 111, 216, 0.3);
    transform: translateY(-1px);
}

.forecast-card.loading .forecast-headline,
.forecast-card.loading .forecast-detail {
    color: var(--text-dim);
}

.forecast-card.loading .forecast-headline {
    display: inline-flex;
    align-items: center;
}

.forecast-card.rain .forecast-headline,
.forecast-card.dry .forecast-headline {
    color: #122033;
}

body.theme-dark .forecast-card.dry .forecast-headline {
    color: #eef6ff;
}

.weather-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-soft));
    border-radius: var(--radius);
    border: 1px solid rgba(122, 145, 174, 0.22);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.weather-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.weather-panel-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.theme-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-controls-header {
    justify-content: center;
}

.weather-title {
    font-size: 1.06rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-top: 6px;
}

.weather-source {
    color: var(--text-dim);
    font-size: 0.74rem;
    max-width: 18ch;
    line-height: 1.4;
    text-align: right;
}

.unit-toggle {
    display: inline-flex;
    padding: 4px;
    border-radius: var(--radius-inner);
    background: var(--bg-card);
    border: 1px solid rgba(122, 145, 174, 0.18);
}

.unit-toggle-button {
    border: 0;
    background: transparent;
    color: var(--text-dim);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.theme-symbol-button {
    min-width: 36px;
    padding: 7px 10px;
    font-size: 0.95rem;
    line-height: 1;
}

.unit-toggle-button.active {
    background: linear-gradient(135deg, rgba(29, 111, 216, 0.14), rgba(29, 111, 216, 0.22));
    color: var(--accent);
}

.theme-auto-button {
    border: 1px solid rgba(122, 145, 174, 0.18);
    background: var(--bg-card);
    color: var(--text-dim);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-inner);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.theme-auto-button.active {
    background: linear-gradient(135deg, rgba(29, 111, 216, 0.14), rgba(29, 111, 216, 0.22));
    border-color: rgba(29, 111, 216, 0.18);
    color: var(--accent);
}

body.theme-dark .time-chip,
body.theme-dark .forecast-card,
body.theme-dark .weather-panel,
body.theme-dark .radar-shell,
body.theme-dark .hourly-card,
body.theme-dark .daily-row,
body.theme-dark .theme-auto-button,
body.theme-dark .unit-toggle,
body.theme-dark #location-input,
body.theme-dark .location-suggestions,
body.theme-dark .weather-icon,
body.theme-dark .tl-btn,
body.theme-dark .timeline-panel,
body.theme-dark .map-section,
body.theme-dark .leaflet-control-attribution {
    background-color: var(--bg-card);
}

body.theme-dark .forecast-card,
body.theme-dark .weather-panel,
body.theme-dark .radar-shell {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-soft));
}

body.theme-dark .weather-current {
    background: linear-gradient(135deg, rgba(44, 112, 197, 0.12), rgba(25, 145, 131, 0.1));
    border-color: rgba(124, 196, 255, 0.14);
}

body.theme-dark .timeline-panel {
    background: linear-gradient(180deg, rgba(13, 20, 32, 0.92), rgba(10, 17, 28, 0.98));
}

body.theme-dark .map-section {
    background: linear-gradient(180deg, rgba(12, 19, 31, 0.96), rgba(9, 15, 24, 0.98));
}

body.theme-dark #map {
    background: linear-gradient(180deg, rgba(17, 24, 36, 0.98), rgba(10, 15, 24, 0.98));
}

body.theme-dark .leaflet-tile-pane {
    filter: brightness(0.72) contrast(1.08) saturate(0.45);
}

.weather-current {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(228px, 0.88fr);
    align-items: stretch;
    gap: 18px;
    padding: 18px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(29, 111, 216, 0.08), rgba(17, 181, 161, 0.08));
    border: 1px solid rgba(29, 111, 216, 0.12);
}

.weather-current-main {
    display: flex;
    align-items: center;
    justify-self: start;
    gap: 12px;
    min-width: 0;
}

.weather-current-copy {
    min-width: 0;
}

.weather-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    background: var(--bg-card-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.weather-current-temp {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.weather-current-summary {
    color: var(--text-dim);
    font-size: 0.84rem;
    margin-top: 4px;
}

.weather-current-details {
    display: grid;
    align-content: center;
    gap: 10px;
    min-width: 0;
}

.weather-detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(122, 145, 174, 0.16);
}

.weather-detail-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.weather-detail-label {
    color: var(--text-dim);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.weather-detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
}

.weather-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weather-block-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.weather-block-head h3 {
    font-size: 0.88rem;
    letter-spacing: -0.01em;
}

.weather-block-head span {
    color: var(--text-dim);
    font-size: 0.74rem;
}

.hourly-forecast {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(86px, 1fr);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.hourly-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 13px 10px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid rgba(122, 145, 174, 0.16);
    min-height: 136px;
}

.hourly-time,
.daily-day {
    font-size: 0.74rem;
    font-weight: 600;
}

.hourly-icon,
.daily-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.hourly-temp,
.daily-high-low {
    font-size: 0.86rem;
    font-weight: 600;
}

.hourly-pop,
.daily-pop {
    font-size: 0.74rem;
    color: var(--text-dim);
}

.hourly-wind,
.daily-wind {
    font-size: 0.74rem;
    color: var(--text-dim);
}

.hourly-wind {
    width: 100%;
    text-align: center;
}

.daily-forecast {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.daily-row {
    display: grid;
    grid-template-columns: minmax(58px, 72px) 28px minmax(92px, 110px) minmax(96px, 1fr) minmax(44px, 56px);
    align-items: center;
    gap: clamp(10px, 2vw, 18px);
    padding: 11px 13px;
    border-radius: var(--radius-inner);
    background: var(--bg-card);
    border: 1px solid rgba(122, 145, 174, 0.16);
}

.daily-high-low {
    white-space: nowrap;
}

.daily-wind {
    justify-self: center;
    text-align: center;
}

.daily-pop {
    justify-self: center;
    text-align: center;
    white-space: nowrap;
}

.weather-empty {
    color: var(--text-dim);
    font-size: 0.82rem;
    padding: 8px 2px;
}

.weather-panel.loading .weather-current-temp,
.weather-panel.loading .weather-current-summary,
.weather-panel.loading .weather-detail-value,
.weather-panel.loading .weather-source {
    color: var(--text-dim);
}

.radar-shell {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 20px 20px 17px;
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-soft));
    border-radius: var(--radius);
    border: 1px solid rgba(122, 145, 174, 0.22);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.radar-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radar-title {
    font-size: 1.06rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.radar-intro-copy {
    color: var(--text-dim);
    font-size: 0.84rem;
    line-height: 1.55;
    max-width: 38ch;
}

.radar-gate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0 4px;
    border-top: 1px solid rgba(122, 145, 174, 0.18);
}

.radar-gate-copy {
    color: var(--text-dim);
    font-size: 0.82rem;
    line-height: 1.45;
    max-width: 28ch;
}

.radar-gate-button,
.tl-load-btn {
    align-self: flex-start;
    border: 1px solid rgba(29, 111, 216, 0.18);
    border-radius: var(--radius-inner);
    padding: 9px 14px;
    background: linear-gradient(135deg, rgba(29, 111, 216, 0.1), rgba(29, 111, 216, 0.18));
    color: var(--accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.radar-gate-button:hover,
.tl-load-btn:hover {
    background: linear-gradient(135deg, rgba(29, 111, 216, 0.16), rgba(29, 111, 216, 0.24));
    border-color: rgba(29, 111, 216, 0.3);
    transform: translateY(-1px);
}

.radar-gate-button:disabled,
.tl-load-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

.map-section {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(122, 145, 174, 0.22);
    position: relative;
    background: linear-gradient(180deg, rgba(238, 244, 252, 0.96), rgba(227, 236, 247, 0.98));
}

#map {
    height: 350px;
    width: 100%;
    background: linear-gradient(180deg, rgba(227, 236, 247, 0.98), rgba(214, 226, 240, 0.98));
}

.leaflet-tile-pane {
    filter: brightness(0.92) contrast(1.02) saturate(0.75);
}

.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.78) !important;
    color: var(--text-dim) !important;
    font-size: 10px !important;
}

.leaflet-control-attribution a {
    color: var(--text-dim) !important;
}

.map-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(109, 94, 252, 0.92), rgba(87, 70, 235, 0.92));
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 5px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(87, 70, 235, 0.2);
}

.timeline-panel {
    background: linear-gradient(180deg, var(--bg-card), var(--bg-card-strong));
    backdrop-filter: blur(14px);
    padding: 14px 14px 12px;
    border-top: 1px solid rgba(122, 145, 174, 0.18);
}

.timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.timeline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tl-btn {
    background: linear-gradient(180deg, var(--bg-card-strong), var(--bg-card));
    border: 1px solid rgba(122, 145, 174, 0.24);
    color: var(--text);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tl-btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 240, 250, 0.98));
    border-color: rgba(29, 111, 216, 0.28);
    transform: translateY(-1px);
}

.tl-load-btn {
    padding-inline: 14px;
    white-space: nowrap;
}

.tl-time {
    font-size: 0.84rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 58px;
    color: #122033;
}

.tl-label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 4px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}

.tl-label.observed {
    background: var(--accent);
    color: #fff;
}

.tl-label.forecast {
    background: var(--forecast);
    color: #fff;
}

.tl-label.now {
    background: var(--green);
    color: #0a160c;
}

.timeline-track {
    position: relative;
    height: 30px;
    cursor: pointer;
    touch-action: none;
    display: flex;
    align-items: center;
    padding: 0 2px;
}

.tl-past {
    height: 6px;
    background: linear-gradient(90deg, rgba(29, 111, 216, 0.68), rgba(111, 179, 242, 0.78));
    border-radius: 999px 0 0 999px;
    opacity: 0.95;
}

.tl-now-marker {
    width: 3px;
    height: 18px;
    background: var(--green);
    flex-shrink: 0;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.tl-future {
    height: 6px;
    background: linear-gradient(90deg, rgba(109, 94, 252, 0.55), rgba(87, 70, 235, 0.78));
    border-radius: 0 999px 999px 0;
    opacity: 0.9;
}

.tl-thumb {
    position: absolute;
    width: 18px;
    height: 18px;
    background: linear-gradient(180deg, #f8fafc, #cbd5e1);
    border: 3px solid rgba(238, 244, 252, 0.96);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.08),
        0 12px 22px rgba(30, 55, 90, 0.22);
    transition: left 0.15s ease;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.64rem;
    color: var(--text-dim);
    margin-top: 8px;
    padding: 0 4px;
}

footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 0 4px;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: var(--text-dim);
    font-size: 0.875rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

@media (min-width: 640px) {
    .container {
        padding: 40px 16px;
    }

    h1 {
        font-size: 2.5rem;
    }

    #map {
        height: 420px;
    }
}

@media (max-width: 420px) {
    .time-strip {
        grid-template-columns: 1fr;
    }

    .zip-row {
        flex-direction: column;
    }

    .location-suggestions {
        position: static;
        margin-top: 8px;
        right: auto;
    }

    #location-submit {
        width: 100%;
    }

    .weather-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .weather-current {
        grid-template-columns: 1fr;
    }

    .weather-panel-controls {
        width: 100%;
        align-items: flex-start;
    }

    .theme-controls {
        width: 100%;
        justify-content: space-between;
    }

    .weather-source {
        text-align: left;
        max-width: none;
    }

    .weather-current-details {
        width: 100%;
    }

    .daily-row {
        grid-template-columns: auto auto minmax(0, 1fr) auto;
        grid-template-areas:
            "day icon temp pop"
            "wind wind wind wind";
        row-gap: 6px;
        column-gap: 10px;
        align-items: center;
    }

    .daily-day {
        grid-area: day;
    }

    .daily-icon {
        grid-area: icon;
    }

    .daily-high-low {
        grid-area: temp;
    }

    .daily-pop {
        grid-area: pop;
        justify-self: end;
    }

    .daily-wind {
        grid-area: wind;
        justify-self: start;
        text-align: left;
    }

    .radar-gate {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-top {
        flex-wrap: wrap;
    }

    .timeline-actions {
        width: 100%;
        justify-content: space-between;
    }

    .tl-load-btn {
        flex: 1;
        text-align: center;
    }
}
