:root {
    /* Shared accents */
    --accent-blue: #4dabf7;
    --sunrise-color: #ffc857;
    --sunset-color: #ff7849;
}

/* ============================================================
   THEME TOKENS
    - appController applies body.theme-<id> from preferences theme options
   - We also provide a safe system fallback if no class is present.
============================================================ */

/* Default (if no class is present) = dark */
body {
    --bg-color: #121212;
    --text-main: #e0e0e0;
    --text-dim: #b0b0b0;
    --border-color: #333333;
    --alt-column: #1e1e1e;
    --header-bg: #121212;
    --panel-bg: #1a1a1a;
    --month-bg: #252525;
    --control-bg: #222;
    --control-bg-hover: #2a2a2a;
    --control-border: #444;
    --control-text: #fff;
    --action-btn-bg: #4dabf7;
    --action-btn-bg-hover: #69b9fb;
    --action-btn-border: transparent;
    --action-btn-text: #000;
    --chart-text: #e0e0e0;
    --chart-ticks: #888888;
    --chart-grid: #333333;
    --chart-tooltip-bg: rgba(0, 0, 0, 0.95);
    --chart-tooltip-text: #e0e0e0;
    --chart-tooltip-border: #4dabf7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
}

html.startup-wizard-active,
html.startup-wizard-active body {
    overflow: hidden;
}

html.startup-wizard-active .header-controls,
html.startup-wizard-active #main-layout {
    opacity: 0;
    pointer-events: none;
    user-select: none;
}

    body.theme-dark {
        --bg-color: #121212;
        --text-main: #e0e0e0;
        --text-dim: #b0b0b0;
        --border-color: #333333;
        --alt-column: #1e1e1e;
        --header-bg: #121212;
        --panel-bg: #1a1a1a;
        --month-bg: #252525;
        --control-bg: #222;
        --control-bg-hover: #2a2a2a;
        --control-border: #444;
        --control-text: #fff;
        --action-btn-bg: #4dabf7;
        --action-btn-bg-hover: #69b9fb;
        --action-btn-border: transparent;
        --action-btn-text: #000;
        --chart-text: #e0e0e0;
        --chart-ticks: #888888;
        --chart-grid: #333333;
        --chart-tooltip-bg: rgba(0, 0, 0, 0.95);
        --chart-tooltip-text: #e0e0e0;
        --chart-tooltip-border: #4dabf7;
    }

    body.theme-light {
        --bg-color: #ffffff;
        --text-main: #141414;
        --text-dim: #555555;
        --border-color: #dddddd;
        --alt-column: #f4f4f4;
        --header-bg: #ffffff;
        --panel-bg: #f7f7f7;
        --month-bg: #ededed;
        --control-bg: #f2f2f2;
        --control-bg-hover: #e9e9e9;
        --control-border: #cfcfcf;
        --control-text: #111;
        --action-btn-bg: #2b7fc3;
        --action-btn-bg-hover: #3f8dd0;
        --action-btn-border: transparent;
        --action-btn-text: #fff;
        --chart-text: #1f1f1f;
        --chart-ticks: #555555;
        --chart-grid: rgba(20,20,20,0.14);
        --chart-tooltip-bg: rgba(255, 255, 255, 0.97);
        --chart-tooltip-text: #111111;
        --chart-tooltip-border: rgba(77, 171, 247, 0.75);
    }

    body.theme-dark-green {
        --bg-color: #0d1511;
        --text-main: #d7e6dc;
        --text-dim: #9fb5a8;
        --border-color: #2f4338;
        --alt-column: #14211a;
        --header-bg: #0d1511;
        --panel-bg: #122019;
        --month-bg: #1a2b22;
        --control-bg: #16261e;
        --control-bg-hover: #1c2f25;
        --control-border: #355042;
        --control-text: #e2f0e7;
        --action-btn-bg: #4aa36f;
        --action-btn-bg-hover: #61b986;
        --action-btn-border: transparent;
        --action-btn-text: #07120d;
        --chart-text: #d7e6dc;
        --chart-ticks: #9fb5a8;
        --chart-grid: #2f4338;
        --chart-tooltip-bg: rgba(8, 18, 13, 0.95);
        --chart-tooltip-text: #d7e6dc;
        --chart-tooltip-border: #4aa36f;
    }

/* System preference fallback (only matters if no theme class is applied) */
@media (prefers-color-scheme: light) {
    body:not(.theme-dark):not(.theme-light):not(.theme-dark-green) {
        --bg-color: #ffffff;
        --text-main: #141414;
        --text-dim: #555555;
        --border-color: #dddddd;
        --alt-column: #f4f4f4;
        --header-bg: #ffffff;
        --panel-bg: #f7f7f7;
        --month-bg: #ededed;
        --control-bg: #f2f2f2;
        --control-bg-hover: #e9e9e9;
        --control-border: #cfcfcf;
        --control-text: #111;
        --action-btn-bg: #2b7fc3;
        --action-btn-bg-hover: #3f8dd0;
        --action-btn-border: transparent;
        --action-btn-text: #fff;
        --chart-text: #1f1f1f;
        --chart-ticks: #555555;
        --chart-grid: rgba(20,20,20,0.14);
        --chart-tooltip-bg: rgba(255, 255, 255, 0.97);
        --chart-tooltip-text: #111111;
        --chart-tooltip-border: rgba(77, 171, 247, 0.75);
    }
}

/* Header Compact Layout */
.welcome-screen {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: stretch;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

html.welcome-pending .welcome-screen {
    display: flex;
}

.welcome-screen-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(77, 171, 247, 0.22), transparent 42%),
        radial-gradient(circle at bottom right, rgba(255, 120, 73, 0.18), transparent 38%),
        linear-gradient(160deg, rgba(12, 19, 31, 0.96), rgba(18, 18, 18, 0.98));
}

.welcome-screen-panel {
    position: relative;
    z-index: 1;
    width: min(600px, 100%);
    margin: auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--panel-bg);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.welcome-screen-url {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.welcome-screen-brand-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.welcome-screen-brand-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    padding: 6px;
    border-radius: 12px;
    background: rgba(77, 171, 247, 0.06);
    box-sizing: border-box;
}

.welcome-screen-kicker {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-blue);
}

.welcome-screen-brand-text h1 {
    margin: 4px 0 0;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1;
    letter-spacing: -0.02em;
}

.welcome-screen-body {
    max-width: 50ch;
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-main);
}

.welcome-screen-note {
    margin-top: 16px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.96rem;
}

.welcome-screen-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.welcome-screen-primary,
.welcome-screen-secondary {
    min-width: 190px;
    padding: 13px 18px;
    border-radius: 999px;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.welcome-screen-primary {
    border: 1px solid var(--action-btn-border);
    background: var(--action-btn-bg);
    color: var(--action-btn-text);
}

.welcome-screen-primary:hover {
    background: var(--action-btn-bg-hover);
    transform: translateY(-1px);
}

.welcome-screen-secondary {
    border: 1px solid var(--control-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.welcome-screen-secondary:hover {
    border-color: var(--accent-blue);
    background: rgba(77, 171, 247, 0.1);
    transform: translateY(-1px);
}

.welcome-screen-primary:focus-visible,
.welcome-screen-secondary:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
}

body.theme-light .welcome-screen-backdrop {
    background:
        radial-gradient(circle at top left, rgba(43, 127, 195, 0.2), transparent 42%),
        radial-gradient(circle at bottom right, rgba(255, 120, 73, 0.12), transparent 38%),
        linear-gradient(160deg, rgba(246, 249, 252, 0.98), rgba(232, 238, 244, 0.98));
}

body.theme-light .welcome-screen-panel {
    border-color: rgba(20, 20, 20, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.92)),
        var(--panel-bg);
    box-shadow: 0 32px 90px rgba(42, 61, 82, 0.16);
}

body.theme-light .welcome-screen-secondary {
    background: rgba(20, 20, 20, 0.03);
}

body.theme-light .welcome-screen-url {
    border-color: rgba(20, 20, 20, 0.08);
    background: rgba(20, 20, 20, 0.03);
}

body.theme-dark-green .welcome-screen-backdrop {
    background:
        radial-gradient(circle at top left, rgba(74, 163, 111, 0.24), transparent 42%),
        radial-gradient(circle at bottom right, rgba(255, 200, 87, 0.15), transparent 38%),
        linear-gradient(160deg, rgba(5, 15, 11, 0.98), rgba(13, 21, 17, 0.99));
}

body.theme-dark-green .welcome-screen-note {
    color: var(--text-dim);
}

@media (max-width: 640px) {
    .welcome-screen {
        padding: 14px;
    }

    .welcome-screen-panel {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .welcome-screen-brand-row {
        align-items: flex-start;
    }

    .welcome-screen-brand-icon {
        width: 44px;
        height: 44px;
        padding: 5px;
        border-radius: 10px;
    }

    .welcome-screen-actions {
        flex-direction: column;
    }

    .welcome-screen-primary,
    .welcome-screen-secondary {
        width: 100%;
        min-width: 0;
    }
}

#location-name {
    font-size: 1rem;
    font-weight: 600;
}

#current-temp {
    font-size: 1.05rem;
    font-weight: 700;
}

#current-humidity,
#river-stage {
    font-size: 0.85rem;
    white-space: nowrap;
}

.header-controls {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-bg);
}

.search-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.top-row-inline-label {
    display: inline-flex;
    align-items: center;
    height: 24px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dim);
    white-space: nowrap;
}

input {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--control-border);
    background: var(--control-bg);
    color: var(--control-text);
    /* width intentionally omitted; only text/number inputs should be constrained */
}

/* constrain size of typical text/number inputs without affecting
   checkboxes or radio buttons which previously inherited width causing
   large gaps between the control and its label */
input[type="text"],
input[type="number"],
select {
    width: 80px;
}

#zipInput {
    width: 140px;
}

#savedLocationSelect {
    width: 150px;
    max-width: 38vw;
    border: 1px solid var(--control-border);
    background: var(--control-bg);
    color: var(--control-text);
}

#savedLocationSelect:disabled {
    opacity: 0.65;
}

#savedLocationSelect option,
#savedLocationSelect optgroup {
    background: var(--panel-bg);
    color: var(--text-main);
}

body.theme-dark #savedLocationSelect {
    color-scheme: dark;
}

body.theme-dark-green #savedLocationSelect {
    color-scheme: dark;
}

body.theme-light #savedLocationSelect {
    color-scheme: light;
}

#searchBtn {
    min-width: 90px;
    gap: 6px;
}

@media (prefers-color-scheme: light) {
    body:not(.theme-dark):not(.theme-light):not(.theme-dark-green) #savedLocationSelect {
        color-scheme: light;
    }
}

/* ----- fish view filter panel ----- */
.filter-panel {
    margin: 10px 15px 0 15px;
    padding: 10px;
}
.filter-panel label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

button {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--control-border);
    background: var(--control-bg);
    color: var(--control-text);
    font-weight: bold;
    cursor: pointer;
}

    button:hover {
        background: var(--control-bg-hover);
    }

/* ============================================================
   SURGICAL ADDITION:
   Ensure TOP ROW buttons (search-row) are styled + theme aware,
   regardless of removed inline styles.
============================================================ */

.search-row button {
    background: var(--control-bg);
    border: 1px solid var(--control-border);
    color: var(--control-text);
    transition: background 150ms ease, border-color 150ms ease, transform 80ms ease;
}

    .search-row button:hover {
        background: var(--control-bg-hover);
    }

    .search-row button:active {
        transform: translateY(1px);
    }

/* Shared style for top-row navigation and inner view action buttons. */
:is(
    .back-btn,
    .view-action-btn,
    .search-row #searchBtn,
    .search-row #geoBtn,
    .search-row #currentBtn,
    .search-row #hourlyBtn,
    .search-row #radarBtn,
    .search-row #riverBtn,
    .search-row #fishBtn,
    .search-row #eventsBtn,
    .search-row #aboutBtn,
    .search-row .top-row-icon-btn
) {
    height: 24px;
    padding: 0 10px;
    font-size: 0.8rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: var(--action-btn-bg);
    color: var(--action-btn-text);
    border: 1px solid var(--action-btn-border);
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
}

.search-row .top-row-icon-btn {
    width: 24px;
    min-width: 24px;
    padding: 0;
    flex: 0 0 24px;
    font-size: 0.95rem;
}

:is(
    .back-btn,
    .view-action-btn,
    .search-row #searchBtn,
    .search-row #geoBtn,
    .search-row #currentBtn,
    .search-row #hourlyBtn,
    .search-row #radarBtn,
    .search-row #riverBtn,
    .search-row #fishBtn,
    .search-row #eventsBtn,
    .search-row #aboutBtn,
    .search-row .top-row-icon-btn
):hover {
    background: var(--action-btn-bg-hover);
}

.fish-mode-popup {
    position: fixed;
    z-index: 5100;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--panel-bg);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.fish-mode-popup-item {
    width: 100%;
    text-align: left;
    font-weight: 800;
}

.location-search-modal[hidden] {
    display: none;
}

.location-search-modal {
    position: fixed;
    inset: 0;
    z-index: 5200;
}

.location-search-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.location-search-modal-panel {
    position: relative;
    width: min(520px, calc(100vw - 24px));
    max-height: min(76vh, 700px);
    overflow: hidden;
    margin: 7vh auto 0;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--panel-bg);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.location-search-modal-header h3 {
    margin: 0;
    font-size: 1rem;
}

.location-search-modal-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.location-search-modal-controls #locationSearchInput {
    flex: 1;
    min-width: 180px;
}

.location-search-add-pref {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.location-search-status {
    min-height: 1.15em;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.location-search-results {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    min-height: 120px;
    max-height: 40vh;
    overflow: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.location-search-result-item {
    width: 100%;
    text-align: left;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--control-border);
    background: var(--control-bg);
    color: var(--control-text);
}

.location-search-result-meta {
    display: block;
    margin-top: 3px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

.location-search-modal-footer {
    display: flex;
    justify-content: flex-end;
}

/* ============================================================
   ORIGINAL FILE CONTINUES BELOW (UNCHANGED)
============================================================ */

.forecast-container {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
}

.forecast-shell {
    min-width: max-content;
}

.forecast-shell-day-column {
    cursor: default;
}

.forecast-shell-weather-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.forecast-shell-placeholder {
    color: var(--text-dim);
}

.forecast-shell .pop-text,
.forecast-shell .temp-low,
.forecast-shell .avg-temps,
.forecast-shell .wind-info,
.forecast-shell .humidity-range,
.forecast-shell .sun-time,
.forecast-shell .moon-phase-section,
.forecast-shell .weather-score-label {
    color: var(--text-dim);
}

.forecast-shell-weather-glyph {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
}

body.theme-light .forecast-shell-weather-glyph {
    background: rgba(0, 0, 0, 0.02);
}

.month-group {
    display: flex;
    flex-direction: column;
}

.month-label {
    font-size: 0.95rem;
    font-weight: 800;
    padding: 4px 8px;
    background: var(--month-bg);
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-blue);
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 8px;
}

.month-name {
    white-space: nowrap;
    margin-right: 4px;
}

.month-precip {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(224, 224, 224, 0.85);
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

/* Make month-precip readable in light theme */
body.theme-light .month-precip {
    color: rgba(20, 20, 20, 0.85);
}

.month-precip-item.rain {
    color: #4dabf7;
}

.month-precip-item.snow {
    color: #a5d8ff;
}

body.theme-light .month-precip-item.snow {
    color: #2a7fbf;
}

.month-precip-normal {
    color: var(--text-dim);
    font-weight: 700;
    font-size: 0.72rem;
}

.month-precip-sep {
    color: rgba(224, 224, 224, 0.35);
    font-weight: 700;
}

body.theme-light .month-precip-sep {
    color: rgba(20, 20, 20, 0.35);
}

.days-row {
    display: flex;
}

.day-column {
    flex: 0 0 84px;
    padding: 10px 1px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-height: 400px;
}

@media (hover: hover) and (pointer: fine) {
    .day-column:hover {
        background: var(--control-bg-hover);
    }
}

.date-header-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.date-day {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0;
}

.date-num {
    min-width: 1.35em;
    height: 1.35em;
    padding: 0 0.18em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dst-clock {
    font-size: 0.72rem;
    line-height: 1;
    color: var(--accent-blue);
    transform: translateY(-1px);
    cursor: pointer;
}

.calendar-event-icon {
    font-size: 0.72rem;
    line-height: 1;
    transform: translateY(-1px);
    cursor: pointer;
    color: var(--accent-blue);
}

.calendar-event-more {
    font-size: 0.62rem;
    line-height: 1;
    color: var(--text-dim);
    cursor: pointer;
    transform: translateY(-1px);
}

.dst-clock.dst-start {
    color: #38d9a9;
}

.dst-clock.dst-end {
    color: #ffa94d;
}

.dst-info-popup {
    position: fixed;
    z-index: 2200;
    max-width: 360px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--panel-bg);
    color: var(--text-main);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    padding: 9px 10px;
}

.dst-info-title {
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--accent-blue);
}

.dst-info-body {
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--text-dim);
}

.day-event-item + .day-event-item {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}

.day-event-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.day-event-image {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.04);
    flex: 0 0 auto;
}

.day-event-title-wrap {
    min-width: 0;
}

.day-event-name {
    color: var(--text-main);
    font-weight: 700;
}

.day-event-desc {
    margin-top: 2px;
}

.today-blue {
    color: var(--accent-blue);
}

.weather-icon {
    width: 70%;
    max-width: 60px;
    height: auto;
    aspect-ratio: 1 / 1;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.2));
}

/* Tone down drop shadow for light mode */
body.theme-light .weather-icon {
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.15));
}

.weather-score-label {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 4px;
}

.detail-weather-score-label {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 6px;
}

.pop-text {
    font-size: 0.95rem;
    color: var(--accent-blue);
    min-height: 1.1em;
    font-weight: bold;
}

/* === Unified Section Dividers (Precip, Air, Celestial) === */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(224, 224, 224, 0.85);
    margin: 6px 0 4px 0;
    letter-spacing: 0.2px;
    width: 100%;
}

body.theme-light .section-divider {
    color: rgba(20, 20, 20, 0.78);
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1 1 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

body.theme-light .section-divider::before,
body.theme-light .section-divider::after {
    border-top: 1px solid rgba(20, 20, 20, 0.14);
}

.precip-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

    .precip-section:hover .section-divider {
        color: var(--accent-blue);
    }

.precip-info {
    margin-bottom: 8px;
    min-height: 3.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.precip-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.95rem;
    font-weight: bold;
    line-height: 1.1;
}

.precip-type-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.precip-line.rain {
    color: #4dabf7;
}

.precip-line.snow {
    color: #a5d8ff;
}

body.theme-light .precip-line.snow {
    color: #2a7fbf;
}

.precip-line.ice {
    color: #ff8787;
}

.precip-amount-text {
    font-size: 0.85rem;
    font-weight: bold;
    color: inherit;
}

.temp-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.temp-high {
    font-size: 1rem;
    font-weight: bold;
}

.temp-low {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 0;
}

.avg-temps {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
    line-height: 1.2;
    width: 100%;
    margin: 4px 0;
}

body.theme-light .avg-temps {
    color: #666;
}

.avg-temps .avg-high,
.avg-temps .avg-low {
    white-space: nowrap;
    color: inherit;
    font-weight: inherit;
}

.avg-temps .avg-sep {
    color: var(--text-dim);
    margin: 0 3px;
    font-weight: 600;
}

.wind-info {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.humidity-range {
    font-size: 0.9rem;
    color: #888;
    margin: 4px 0;
}

body.theme-light .humidity-range {
    color: #666;
}

.avg-section {
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px dotted var(--control-border);
    font-size: 0.85rem;
    width: 100%;
}

.moon-phase-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    font-size: 1.4rem;
    opacity: 0.8;
}

.sun-times {
    font-size: 0.75rem;
    margin: 4px 0;
    line-height: 1.2;
    font-weight: 500;
    width: 100%;
}

    .sun-times .sun-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 2px 0;
    }

    .sun-times .sun-arrow {
        width: 12px;
        display: inline-block;
        text-align: center;
        color: #ffca28;
    }

    .sun-times .sun-row.sunrise .sun-time {
        white-space: nowrap;
        color: var(--sunrise-color);
        font-weight: 700;
    }

    .sun-times .sun-row.sunset .sun-time {
        white-space: nowrap;
        color: var(--sunset-color);
        font-weight: 700;
    }

@media (max-width: 1023px) {
    #detail-view,
    #precip-detail-view,
    #river-detail-view,
    #radar-view,
    #hourly-view,
    #hourly-graph-view,
    #hourly-anim-view,
    #current-view,
    #about-view,
    #fish-view,
    #events-view,
    #fish-forecast-view,
    #fish-detail-view,
    #preferences-view {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--bg-color);
        z-index: 2000;
        display: none;
        overflow-y: auto;
        padding-bottom: 40px;
    }

    #radar-view {
        z-index: 3000;
        display: none;
        overflow: hidden;
        padding-bottom: 0;
    }

    /* utility helpers - start hidden, will enable on mobile */
    .mobile-only { display: none; }

    #fish-view .detail-card {
        padding: 4px;
        margin: 4px;
    }

    #fish-view .fish-rows {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 1px;
    }

    #fish-view .fish-panel {
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--panel-bg);
        padding: 0 4px;
    }

    #fish-view .fish-collapse-btn {
        position: static;
        width: 18px;
        height: 18px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--alt-column);
        color: var(--text-color);
        cursor: pointer;
        line-height: 1;
        padding: 0;
        font-weight: 600;
        flex: 0 0 auto;
    }

    #fish-view .fish-panel-header {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 0;
        padding: 0;
        line-height: 1;
        white-space: nowrap;
        overflow: visible;
    }

    #fish-view .fish-panel-cpi {
        min-width: 50px;
        text-align: center;
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--accent-blue);
    }

    #fish-view .fish-panel-image {
        height: 42px;
        overflow: hidden;
        display: flex;
        align-items: center;
    }

    #fish-view .fish-panel-image img {
        width: 72px !important;
        height: 72px !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain;
        display: block;
        margin-top: -10px;
        margin-bottom: -10px;
    }

    #fish-view .fish-panel-image {
        flex: 0 0 auto;
    }

    #fish-view .fish-panel-name {
        font-size: 1rem;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #fish-view .fish-panel-text {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
        white-space: normal;
    }

    #fish-view .fish-panel-depth-preview {
        min-width: 0;
        font-size: 0.78rem;
        line-height: 1.2;
        color: var(--text-dim);
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    #fish-view .fish-panel-spawning-inline {
        margin-left: auto;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    #fish-view .fish-panel-body {
        margin-top: 4px;
        padding-top: 4px;
        border-top: 1px solid var(--border-color);
    }

    #fish-view .fish-panel-spawning {
        text-align: left;
        margin-bottom: 3px;
    }

    #fish-view .fish-row-lures {
        font-size: 0.9rem;
        width: 100%;
        text-align: left;
    }

    #fish-view .fish-cpi-notes {
        margin: 0;
        padding-left: 1.1rem;
        list-style: disc;
        text-align: left;
        line-height: 1.3;
    }

    #fish-view .fish-cpi-notes li {
        margin: 0 0 2px 0;
        display: list-item;
    }

    #fish-view .fish-cpi-section-title {
        font-size: 0.95rem;
        font-weight: 400;
        text-transform: none;
        letter-spacing: normal;
        color: var(--text-dim);
        text-align: left;
        margin-bottom: 2px;
    }

    /* show/hide helpers (inside mobile query) */
    .desktop-only { display: none; }
    .mobile-only { display: block; }
}

@media (min-width: 1024px) {
    .mobile-only { display: none; }
    .desktop-only { display: block; }
}

#radar-view {
    /* When opened, JS sets display:flex inline. Keep default hidden states intact. */
    flex-direction: column;
}

#river-nwps-upstream-btn,
#river-nwps-restore-btn,
#river-nwps-downstream-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.river-graph-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1em;
    line-height: 1;
    font-weight: 700;
}

@media (max-width: 640px) {
    #river-nwps-upstream-btn,
    #river-nwps-restore-btn,
    #river-nwps-downstream-btn {
        gap: 0;
        min-width: 36px;
        justify-content: center;
    }

    #river-nwps-upstream-btn .river-graph-nav-label,
    #river-nwps-restore-btn .river-graph-nav-label,
    #river-nwps-downstream-btn .river-graph-nav-label {
        display: none;
    }
}

.radar-frame {
    width: 100%;
    flex-grow: 1;
    border: none;
    background: #000;
}

.detail-header {
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    background: var(--panel-bg);
}

.detail-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.view-nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

#current-view .current-view-header-actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
}

#current-view .current-view-header-actions .view-nav-buttons {
    flex: 0 0 auto;
    white-space: nowrap;
}

#current-view .current-view-updated {
    margin-left: auto;
}

#fish-view .detail-header-actions {
    align-items: flex-start;
}

#fish-view .view-nav-buttons {
    flex-wrap: wrap;
}

#fish-view .view-action-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.detail-card {
    background: var(--alt-column);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin: 15px;
}

#preferences-view .detail-card {
    margin: 8px 15px;
}

#current-view .current-no-data {
    padding: 20px;
}

#current-view .detail-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#current-view .current-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        'data'
        'image';
    gap: 12px;
}

#current-view .current-data-card {
    grid-area: data;
}

#current-view .current-summary-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

#current-view .current-temp-main {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent-blue);
    line-height: 1;
}

#current-view .current-city-main {
    font-size: 1.1rem;
    font-weight: 700;
}

#current-view .current-short-forecast {
    color: var(--text-dim);
    margin-bottom: 10px;
}

#current-view .current-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    font-size: 0.95rem;
}

#current-view .current-metric {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

#current-view .current-metric-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex: 0 0 auto;
}

#current-view .current-metric-label {
    font-weight: 700;
}

#current-view .current-metric-empty {
    visibility: hidden;
}

#current-view .current-enviz-wrap {
    grid-area: image;
    padding: 20px;
}

#current-view .current-enviz-frame {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

#current-view .current-enviz-frame svg {
    width: 100%;
    height: auto;
    display: block;
}

#events-view .day-event-image {
    width: 42px;
    height: 42px;
}

#events-view {
    container-type: inline-size;
    container-name: eventsview;
}

#detail-view .detail-flex {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

#detail-view .detail-image {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
}

#detail-view .detail-image svg {
    width: 100%;
    height: auto;
    display: block;
}

#detail-view .detail-content {
    display: grid;
    gap: 10px;
}

#detail-view .detail-period-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--accent-blue);
}

#detail-view .detail-period-temp {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.1;
}

#detail-view .detail-period-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
}

#detail-view .detail-period-text {
    line-height: 1.4;
    color: var(--text-dim);
}

#detail-view .detail-sun-times-inline {
    font-weight: 400;
    color: var(--text-dim);
}

#detail-view .detail-sunrise-inline {
    color: var(--sunrise-color);
    font-weight: 700;
}

#detail-view .detail-sunset-inline {
    color: var(--sunset-color);
    font-weight: 700;
}

/* Tier 1: Mobile */
@media (max-width: 819px) {
    #current-view .detail-card {
        margin: 10px;
        padding: 12px;
    }

    #current-view .current-temp-main {
        font-size: 2rem;
    }

    #current-view .current-metrics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #current-view .current-enviz-wrap {
        padding: 12px;
    }

    #current-view .current-layout {
        grid-template-areas:
            'data'
            'image';
    }

    #detail-view .detail-card {
        margin: 10px;
        padding: 12px;
    }

    #detail-view .detail-sun-times-inline {
        display: block;
        margin-top: 4px;
    }
}

/* Tier 2: Tablet */
@media (min-width: 820px) and (max-width: 1279px) {
    #current-view .current-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
    }

    #current-view .current-temp-main {
        font-size: 2.4rem;
    }

    #current-view .current-layout {
        grid-template-areas:
            'data'
            'image';
    }

    #detail-view .detail-flex {
        grid-template-columns: 190px minmax(0, 1fr);
        align-items: start;
        gap: 16px;
    }

    #detail-view .detail-image {
        max-width: none;
    }

}

/* Tier 3: Desktop */
@media (min-width: 1280px) {
    #current-view .current-layout {
        grid-template-columns: minmax(260px, 42%) minmax(360px, 1fr);
        grid-template-areas: 'image data';
        align-items: start;
        gap: 18px;
        padding: 14px;
    }

    #current-view .current-metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 16px;
    }

    #current-view .current-temp-main {
        font-size: 2.6rem;
    }

    #current-view .current-enviz-wrap {
        padding: 0;
    }

    #current-view .current-enviz-frame {
        max-width: none;
    }

    #current-view .current-data-card {
        margin: 0;
    }

    #detail-view .detail-flex {
        grid-template-columns: 230px minmax(0, 1fr);
        align-items: start;
        gap: 18px;
    }

    #detail-view .detail-period-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #detail-view .detail-period-temp {
        font-size: 1.8rem;
    }
}

@container sidepanel (max-width: 599px) {
    #current-view .detail-card {
        margin: 8px 0 10px;
        padding: 12px;
    }

    #current-view .current-temp-main {
        font-size: 2rem;
    }

    #current-view .current-metrics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #current-view .current-enviz-wrap {
        padding: 0;
    }

    #current-view .current-enviz-frame {
        max-width: none;
        margin: 0;
    }

    #current-view .current-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            'data'
            'image';
        justify-items: stretch;
        gap: 10px;
        padding: 0 10px 10px;
    }

    #detail-view .detail-card {
        margin: 8px 0 10px;
        padding: 12px;
    }

    #detail-view .detail-flex {
        grid-template-columns: minmax(0, 1fr);
        justify-items: stretch;
        gap: 12px;
    }

    #detail-view .detail-image {
        max-width: 260px;
        margin: 0 auto;
    }

    #detail-view .detail-sun-times-inline {
        display: block;
        margin-top: 4px;
    }
}

@container sidepanel (min-width: 600px) and (max-width: 899px) {
    #current-view .current-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
    }

    #current-view .current-temp-main {
        font-size: 2.4rem;
    }

    #current-view .current-layout {
        grid-template-columns: minmax(220px, 38%) minmax(260px, 1fr);
        grid-template-areas: 'image data';
        align-items: start;
        gap: 14px;
        padding: 10px;
    }

    #current-view .current-enviz-wrap {
        padding: 0;
    }

    #current-view .current-enviz-frame {
        max-width: none;
    }

    #current-view .current-data-card {
        margin: 0;
    }

    #detail-view .detail-flex {
        grid-template-columns: 190px minmax(0, 1fr);
        align-items: start;
        gap: 16px;
    }

    #detail-view .detail-image {
        max-width: none;
    }
}

@container sidepanel (min-width: 900px) and (max-width: 1279px) {
    #current-view .current-layout {
        grid-template-columns: minmax(240px, 40%) minmax(300px, 1fr);
        grid-template-areas: 'image data';
        align-items: start;
        gap: 16px;
        padding: 12px;
    }

    #current-view .current-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
    }

    #current-view .current-temp-main {
        font-size: 2.4rem;
    }

    #current-view .current-enviz-wrap {
        padding: 0;
    }

    #current-view .current-enviz-frame {
        max-width: none;
    }

    #current-view .current-data-card {
        margin: 0;
    }

    #detail-view .detail-flex {
        grid-template-columns: 190px minmax(0, 1fr);
        align-items: start;
        gap: 16px;
    }

    #detail-view .detail-image {
        max-width: none;
    }
}

@container sidepanel (min-width: 1280px) {
    #current-view .current-layout {
        grid-template-columns: minmax(260px, 42%) minmax(360px, 1fr);
        grid-template-areas: 'image data';
        align-items: start;
        gap: 18px;
        padding: 14px;
    }

    #current-view .current-metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px 16px;
    }

    #current-view .current-temp-main {
        font-size: 2.6rem;
    }

    #current-view .current-enviz-wrap {
        padding: 0;
    }

    #current-view .current-enviz-frame {
        max-width: none;
    }

    #current-view .current-data-card {
        margin: 0;
    }

    #detail-view .detail-flex {
        grid-template-columns: 230px minmax(0, 1fr);
        align-items: start;
        gap: 18px;
    }

    #detail-view .detail-period-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #detail-view .detail-period-temp {
        font-size: 1.8rem;
    }
}

@container eventsview (min-width: 600px) and (max-width: 999px) {
    #events-view .day-event-image {
        width: 88px;
        height: 88px;
        border-radius: 14px;
    }
}

@container eventsview (min-width: 1000px) {
    #events-view .day-event-image {
        width: 150px;
        height: 150px;
        border-radius: 22px;
    }
}

.info-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

.info-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

body.theme-light .info-row {
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: rgba(224,224,224,0.75);
    font-weight: 700;
    font-size: 0.9rem;
}

body.theme-light .info-label {
    color: rgba(20,20,20,0.70);
}

.info-value {
    color: var(--text-main);
    font-size: 0.95rem;
}

.info-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.info-url {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.85rem;
    color: rgba(224,224,224,0.85);
    word-break: break-all;
}

body.theme-light .info-url {
    color: rgba(20,20,20,0.78);
}

.precip-line.dimmed {
    opacity: 0.4;
    color: var(--text-dim) !important;
}

    .precip-line.dimmed .precip-type-icon {
        filter: grayscale(100%);
    }

    .precip-line.dimmed .precip-amount-text {
        color: var(--text-dim);
    }

.hourly-list {
    padding: 10px 0;
}

.hourly-header-bookmark-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.hourly-header-bookmark-btn {
    min-width: 34px;
    height: 30px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: var(--control-bg);
    color: var(--control-text);
    font-weight: 700;
    cursor: pointer;
}

.hourly-header-bookmark-btn:hover,
.hourly-header-bookmark-btn:focus-visible {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.hourly-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 15px;
    height: 90px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

body.theme-light .hourly-row {
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.hourly-row:last-child {
    border-bottom: none;
}

.hourly-icon {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
}

    .hourly-icon svg {
        width: 100%;
        height: 100%;
        display: block;
    }

.hourly-mainline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: baseline;
}

.hourly-time {
    font-weight: 900;
    color: var(--accent-blue);
    min-width: 70px;
}

.hourly-temp {
    font-size: 1.25rem;
    font-weight: 900;
}

.hourly-sub {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.25;
}

.hourly-kv {
    display: inline-flex;
    gap: 6px;
    align-items: baseline;
    white-space: nowrap;
}

    .hourly-kv .k {
        color: rgba(224, 224, 224, 0.70);
        font-weight: 800;
    }

body.theme-light .hourly-kv .k {
    color: rgba(20,20,20,0.60);
}

.hourly-kv .v {
    color: var(--text-main);
    font-weight: 800;
}

.wind-svg {
    display: inline-block;
    vertical-align: -2px;
}

.hourly-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


#main-layout {
    display: block;
}

@media (min-width: 1024px) {
    #main-layout {
        display: flex;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        --desktop-side-width: 40%;
    }

    #weather-container {
        flex: 1 1 auto;
        min-width: 360px;
        max-width: 100%;
    }

    #desktop-splitter {
        display: none;
        flex: 0 0 14px;
        position: relative;
        cursor: col-resize;
        touch-action: none;
        user-select: none;
        background: transparent;
    }

    #desktop-splitter::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 1px;
        transform: translateX(-50%);
        background: var(--border-color);
        opacity: 0.9;
    }

    #desktop-splitter::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 6px;
        height: 48px;
        transform: translate(-50%, -50%);
        border-radius: 999px;
        background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
        box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
    }

    #main-layout.has-side-panel #desktop-splitter {
        display: block;
    }

    #main-layout.is-resizing,
    #main-layout.is-resizing * {
        cursor: col-resize !important;
        user-select: none !important;
    }

    #side-view-container {
        display: none;
        flex: 0 0 var(--desktop-side-width);
        width: var(--desktop-side-width);
        min-width: 320px;
        max-width: calc(100vw - 420px);
        height: calc(100vh - 20px);
        position: sticky;
        top: 10px;
        overflow: hidden;
        background: var(--bg-color);
        container-type: inline-size;
        container-name: sidepanel;
    }

        #side-view-container.active {
            display: block;
        }

    .fish-rows {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .fish-panel {
        border: 1px solid var(--border-color);
        border-radius: 7px;
        background: var(--panel-bg);
        padding: 0 4px;
    }

    .fish-collapse-btn {
        position: static;
        width: 18px;
        height: 18px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--alt-column);
        color: var(--text-color);
        cursor: pointer;
        line-height: 1;
        padding: 0;
        font-weight: 600;
        flex: 0 0 auto;
    }

    .fish-panel-header {
        display: flex;
        align-items: center;
        gap: 7px;
        min-height: 0;
        padding: 0;
        line-height: 1;
        white-space: nowrap;
        overflow: visible;
    }

    .fish-panel-cpi {
        min-width: 60px;
        text-align: center;
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--accent-blue);
    }

    .fish-panel-image {
        height: 50px;
        overflow: hidden;
        display: flex;
        align-items: center;
    }

    .fish-panel-image img {
        width: 88px !important;
        height: 88px !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain;
        display: block;
        margin-top: -12px;
        margin-bottom: -12px;
    }

    .fish-panel-image {
        flex: 0 0 auto;
    }

    .fish-panel-name {
        font-size: 1.05rem;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .fish-panel-text {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
        white-space: normal;
    }

    .fish-panel-depth-preview {
        min-width: 0;
        font-size: 0.8rem;
        color: var(--text-dim);
        line-height: 1.25;
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;

    .fish-forecast-species-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid color-mix(in srgb, var(--border-color) 72%, transparent);
    }

    .fish-forecast-species-row:last-child {
        border-bottom: none;
    }

    .fish-forecast-species-text {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .fish-forecast-species-name {
        font-weight: 600;
        line-height: 1.2;
    }

    .fish-forecast-species-depth-preview {
        font-size: 0.76rem;
        color: var(--text-dim);
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .fish-forecast-species-cpi {
        flex: 0 0 auto;
        min-width: 38px;
        text-align: right;
        font-weight: 700;
        color: var(--accent-blue);
    }
    }

    .fish-panel-spawning-inline {
        margin-left: auto;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .fish-panel-body {
        margin-top: 4px;
        padding-top: 4px;
        border-top: 1px solid var(--border-color);
    }

    .fish-panel-spawning {
        text-align: left;
        margin-bottom: 3px;
        font-size: 0.95rem;
    }

    .fish-row-lures {
        font-size: 0.85rem;
        color: var(--text-dim);
        line-height: 1.4;
        width: 100%;
        text-align: left;
    }

    .fish-cpi-notes {
        margin: 0;
        padding-left: 1.1rem;
        list-style: disc;
        text-align: left;
        line-height: 1.35;
    }

    .fish-cpi-notes li {
        margin: 0 0 3px 0;
        display: list-item;
    }

    .fish-cpi-section-title {
        font-size: 0.95rem;
        font-weight: 400;
        text-transform: none;
        letter-spacing: normal;
        color: var(--text-dim);
        margin-bottom: 2px;
    }

    /* on wide screens the various detail/flyout views live inside
       #side-view-container rather than taking over the whole viewport */
    #detail-view,
    #precip-detail-view,
    #river-detail-view,
    #radar-view,
    #hourly-view,
    #current-view,
    #about-view,
    #fish-view,
    #events-view,
    #fish-forecast-view,
    #fish-detail-view,
    #preferences-view {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: 100%;
        background: none;
        z-index: auto;
        overflow: auto;
        padding-bottom: 0;
    }
}
