/* ═══════════════════════════════════════════════════════════════════════════
   SummitAgent — Design System
   Aurora crystal UI (light, layered, high-contrast readability)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Aurora crystal palette */
    --bg-primary: #edf6ff;
    --bg-secondary: rgba(255, 255, 255, 0.56);
    --bg-surface: rgba(255, 255, 255, 0.70);
    --bg-surface-hover: rgba(235, 248, 255, 0.90);
    --bg-elevated: rgba(223, 240, 255, 0.80);
    --bg-input: rgba(255, 255, 255, 0.89);

    /* Text contrast */
    --text-primary: #0f2a45;
    --text-secondary: #1d446d;
    --text-tertiary: #3e6288;
    --text-dim: #6786a8;
    --text-on-light: #0e3155;

    /* Borders */
    --border: rgba(82, 160, 224, 0.26);
    --border-subtle: rgba(105, 176, 235, 0.16);
    --border-hover: rgba(69, 145, 212, 0.40);

    /* Accent */
    --accent: #1a91ff;
    --accent-dim: rgba(26, 145, 255, 0.14);
    --accent-hover: #42a5ff;
    --accent-glow: rgba(26, 145, 255, 0.22);

    /* Semantic colors — desaturated, professional */
    --warning: #c86e4c;
    --warning-dim: rgba(200, 110, 76, 0.12);
    --caution: #c89f38;
    --caution-dim: rgba(200, 159, 56, 0.12);
    --positive: #2f9f7a;
    --positive-dim: rgba(47, 159, 122, 0.12);
    --info: #2f8dd8;
    --info-dim: rgba(47, 141, 216, 0.12);
    --red: #c34b4b;

    /* Typography — system-quality rendering */
    --font: 'SF Pro Text', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-serif: 'New York', ui-serif, Georgia, 'Times New Roman', serif;
    --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Consolas', monospace;

    /* Radii — consistent, modern */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows — subtle, layered */
    --shadow-sm: 0 2px 10px rgba(20, 82, 138, 0.08);
    --shadow-md: 0 12px 30px rgba(18, 78, 128, 0.13);
    --shadow-lg: 0 26px 58px rgba(13, 63, 108, 0.18);
    --shadow-input: 0 6px 16px rgba(24, 95, 152, 0.12), 0 0 0 1px rgba(86, 153, 215, 0.12);

    /* Layout */
    --sidebar-width: 264px;
    --chat-max-width: 840px;
    --dynamic-bg-image: none;
    --dynamic-bg-opacity: 0;
    --dynamic-bg-overlay: linear-gradient(165deg, rgba(246, 252, 255, 0.70), rgba(220, 237, 250, 0.44) 45%, rgba(165, 198, 225, 0.34));
    --mood-accent: #6dc4ff;
    --bg-glow-1: rgba(134, 211, 255, 0.56);
    --bg-glow-2: rgba(196, 232, 255, 0.54);
    --bg-top: #f8fcff;
    --bg-bottom: #d9ecff;
    --form-color-scheme: light;
    --field-bg: rgba(255, 255, 255, 0.84);
    --field-bg-hover: rgba(255, 255, 255, 0.92);
    --field-text: var(--text-primary);

    /* Modal overlays */
    --modal-backdrop: rgba(8, 21, 36, 0.34);
    --modal-dialog-bg: linear-gradient(180deg, rgba(250, 255, 255, 0.88), rgba(236, 247, 255, 0.82));
    --modal-dialog-border: rgba(118, 186, 237, 0.30);
    --modal-dialog-shadow: 0 26px 58px rgba(12, 58, 104, 0.24);
}

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    font-family: var(--font);
    background:
      radial-gradient(1180px 700px at 8% -14%, var(--bg-glow-1), transparent 60%),
      radial-gradient(940px 620px at 92% 0%, var(--bg-glow-2), transparent 52%),
      linear-gradient(170deg, var(--bg-top) 0%, var(--bg-primary) 58%, var(--bg-bottom) 100%);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image: var(--dynamic-bg-image);
    background-size: cover;
    background-position: center center;
    filter: saturate(104%) contrast(103%) brightness(1.02);
    opacity: var(--dynamic-bg-opacity);
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.1s ease;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background: var(--dynamic-bg-overlay);
    pointer-events: none;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
kbd {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
}

/* ─── Display Modes ──────────────────────────────────────────────────────── */
body[data-display-mode="dark"] {
    --bg-primary: #1b1713;
    --bg-secondary: rgba(30, 27, 24, 0.72);
    --bg-surface: rgba(43, 39, 35, 0.72);
    --bg-surface-hover: rgba(52, 47, 42, 0.88);
    --bg-elevated: rgba(38, 34, 30, 0.84);
    --bg-input: rgba(51, 45, 40, 0.90);
    --text-primary: #f3ece3;
    --text-secondary: #dccfbe;
    --text-tertiary: #b8a999;
    --text-dim: #968675;
    --text-on-light: #f5eee5;
    --border: rgba(195, 150, 103, 0.26);
    --border-subtle: rgba(191, 145, 93, 0.14);
    --border-hover: rgba(217, 166, 111, 0.46);
    --accent: #d49252;
    --accent-dim: rgba(212, 146, 82, 0.18);
    --accent-hover: #e2a56f;
    --accent-glow: rgba(212, 146, 82, 0.32);
    --warning: #df825f;
    --warning-dim: rgba(223, 130, 95, 0.16);
    --caution: #d4ac5f;
    --caution-dim: rgba(212, 172, 95, 0.16);
    --positive: #4db08b;
    --positive-dim: rgba(77, 176, 139, 0.16);
    --info: #8cb9e5;
    --info-dim: rgba(140, 185, 229, 0.16);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.52);
    --shadow-input: 0 8px 20px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(214, 160, 106, 0.24);
    --dynamic-bg-overlay: linear-gradient(165deg, rgba(20, 16, 13, 0.72), rgba(34, 27, 21, 0.56) 45%, rgba(45, 35, 28, 0.52));
    --mood-accent: #c48b56;
    --bg-glow-1: rgba(66, 48, 33, 0.46);
    --bg-glow-2: rgba(92, 67, 45, 0.40);
    --bg-top: #18130f;
    --bg-bottom: #2a211a;
    --form-color-scheme: dark;
    --field-bg: rgba(37, 32, 28, 0.94);
    --field-bg-hover: rgba(47, 40, 35, 0.96);
    --field-text: #f3ece3;
    --modal-backdrop: rgba(10, 8, 6, 0.55);
    --modal-dialog-bg: linear-gradient(180deg, rgba(43, 39, 35, 0.94), rgba(30, 27, 24, 0.90));
    --modal-dialog-border: rgba(195, 150, 103, 0.30);
    --modal-dialog-shadow: 0 26px 58px rgba(0, 0, 0, 0.52);
}

body[data-display-mode="dark"] .planner-shell {
    border-color: rgba(195, 150, 103, 0.34);
    background: rgba(30, 26, 23, 0.94);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.46);
}

body[data-display-mode="dark"] .input-wrapper {
    background: rgba(30, 26, 23, 0.94);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(214, 160, 106, 0.26);
}

body[data-display-mode="dark"] .input-wrapper:focus-within {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(227, 173, 118, 0.4);
}

body[data-display-mode="dark"] .selector-input {
    background: rgba(30, 26, 23, 0.94);
}

body[data-display-mode="dark"] .selector-input:focus {
    background: rgba(30, 26, 23, 0.94);
}

body[data-display-mode="sunlight"] {
    --bg-primary: #fff4e4;
    --bg-secondary: rgba(255, 250, 240, 0.58);
    --bg-surface: rgba(255, 250, 237, 0.72);
    --bg-surface-hover: rgba(255, 245, 226, 0.90);
    --bg-elevated: rgba(255, 241, 220, 0.80);
    --bg-input: rgba(255, 252, 245, 0.90);
    --text-primary: #51352a;
    --text-secondary: #6c4635;
    --text-tertiary: #875d49;
    --text-dim: #a07966;
    --text-on-light: #5a3b2f;
    --border: rgba(228, 164, 114, 0.28);
    --border-subtle: rgba(232, 173, 120, 0.18);
    --border-hover: rgba(220, 142, 83, 0.44);
    --accent: #ec8743;
    --accent-dim: rgba(236, 135, 67, 0.16);
    --accent-hover: #f09a63;
    --accent-glow: rgba(236, 135, 67, 0.24);
    --warning: #d66949;
    --warning-dim: rgba(214, 105, 73, 0.14);
    --caution: #d8a44c;
    --caution-dim: rgba(216, 164, 76, 0.14);
    --positive: #4c9e6c;
    --positive-dim: rgba(76, 158, 108, 0.14);
    --info: #3f92c8;
    --info-dim: rgba(63, 146, 200, 0.14);
    --shadow-sm: 0 2px 10px rgba(146, 91, 50, 0.10);
    --shadow-md: 0 12px 30px rgba(133, 82, 45, 0.16);
    --shadow-lg: 0 26px 58px rgba(115, 68, 34, 0.22);
    --shadow-input: 0 7px 18px rgba(140, 88, 49, 0.14), 0 0 0 1px rgba(225, 150, 94, 0.18);
    --dynamic-bg-overlay: linear-gradient(165deg, rgba(255, 247, 231, 0.64), rgba(255, 231, 198, 0.46) 45%, rgba(233, 194, 155, 0.36));
    --mood-accent: #f0ad6f;
    --bg-glow-1: rgba(255, 198, 132, 0.50);
    --bg-glow-2: rgba(255, 223, 169, 0.46);
    --bg-top: #fff9ef;
    --bg-bottom: #ffe2c6;
    --form-color-scheme: light;
    --field-bg: rgba(255, 252, 245, 0.88);
    --field-bg-hover: rgba(255, 248, 236, 0.94);
    --field-text: var(--text-primary);
    --modal-backdrop: rgba(60, 35, 20, 0.32);
    --modal-dialog-bg: linear-gradient(180deg, rgba(255, 252, 245, 0.92), rgba(255, 245, 226, 0.88));
    --modal-dialog-border: rgba(228, 164, 114, 0.30);
    --modal-dialog-shadow: 0 26px 58px rgba(80, 50, 30, 0.28);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.app {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.header { grid-column: 1 / -1; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 48px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-home-link {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: inherit; cursor: pointer;
}
.header-home-link:hover { text-decoration: none; }
.logo { font-size: 20px; line-height: 1; }
.header h1 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--accent-dim);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.header-right { display: flex; align-items: center; gap: 2px; }
#btn-auth-open {
    min-width: 80px;
    justify-content: center;
}

.display-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}
.display-mode-btn {
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-tertiary);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.18s ease;
}
.display-mode-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}
.display-mode-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--mood-accent), var(--accent));
    box-shadow: 0 6px 16px var(--accent-glow);
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: none; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s ease, box-shadow 0.2s ease, color 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-ghost {
    background: transparent;
    color: var(--text-tertiary);
}
.btn-ghost:hover {
    background: var(--bg-surface);
    color: var(--text-secondary);
}
.btn-primary {
    background: var(--accent); color: #fff; font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--warning-dim); color: var(--warning); }
.btn-danger:hover { background: rgba(196, 122, 82, 0.18); }
.btn-send {
    background: var(--text-on-light); color: #fff;
    width: 34px; height: 34px;
    border-radius: var(--radius-full);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.12s; flex-shrink: 0;
}
.btn-send:hover { background: var(--accent-hover); }
.btn-send:disabled { opacity: 0.12; cursor: not-allowed; }
.btn-icon {
    background: transparent; color: var(--text-tertiary);
    padding: 6px; border-radius: var(--radius-sm); border: none;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px;
}
.btn-icon:hover { background: var(--bg-surface); color: var(--text-secondary); }
.btn-accent {
    background: linear-gradient(135deg, var(--mood-accent), var(--accent));
    color: #fff;
    padding: 7px 16px; border-radius: var(--radius-sm);
    font-weight: 600; border: none; font-family: var(--font); font-size: 13px;
    cursor: pointer; transition: all 0.12s;
}
.btn-accent:hover { filter: brightness(1.05); }
.btn-accent:disabled { opacity: 0.25; cursor: not-allowed; }
.btn-plan-hike {
    padding: 7px 18px;
    font-size: 13px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.btn-plan-hike:not(:disabled):hover {
    transform: translateY(-1px);
}

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px) saturate(135%);
    -webkit-backdrop-filter: blur(20px) saturate(135%);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.sidebar-section { padding: 10px 10px; }
.sidebar-section:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }
.sidebar-title {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-dim);
    margin-bottom: 8px;
}
.new-chat-btn {
    width: 100%; padding: 9px 12px;
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-tertiary);
    font-family: var(--font); font-size: 13px;
    cursor: pointer; transition: all 0.12s ease;
    display: flex; align-items: center; gap: 8px;
}
.new-chat-btn:hover {
    background: var(--bg-surface); border-color: var(--border-hover);
    color: var(--text-secondary);
}

/* Sidebar tabs */
.sidebar-tabs {
    display: flex; border-bottom: 1px solid var(--border-subtle);
}
.sidebar-tab {
    flex: 1; padding: 8px 6px;
    font-size: 11px; font-weight: 600;
    color: var(--text-dim); text-align: center;
    cursor: pointer; transition: all 0.12s;
    border: none; background: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font);
}

.account-hidden {
    display: none !important;
}
.sidebar-tab:hover { color: var(--text-tertiary); }
.sidebar-tab.active {
    color: var(--text-secondary);
    border-bottom-color: var(--accent);
}

/* Sidebar tab content */
.sidebar-tab-content { display: none; flex: 1; overflow-y: auto; }
.sidebar-tab-content.active { display: flex; flex-direction: column; }

/* Sidebar search */
.sidebar-search { padding: 8px 10px; }
.sidebar-search-input {
    width: 100%; padding: 7px 10px;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: var(--font); font-size: 12px;
    outline: none; transition: border-color 0.15s;
}
.sidebar-search-input:focus { border-color: var(--accent); }
.sidebar-search-input::placeholder { color: var(--text-dim); }
.sidebar-empty {
    padding: 20px 12px; text-align: center;
    font-size: 12px; color: var(--text-dim);
}

/* Good Conditions sidebar tab */
.conditions-tab-panel {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.conditions-tab-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.conditions-tab-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Account sidebar tab */
.account-panel {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.account-card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.account-card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.account-session-status {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.45;
}
.account-session-actions {
    display: flex;
    gap: 8px;
}
.account-session-actions .btn {
    flex: 1;
    justify-content: center;
}
.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.account-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.account-field span {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.01em;
}
.account-field-full {
    grid-column: 1 / -1;
}
.account-save-btn {
    width: 100%;
    justify-content: center;
}
.account-trip-history {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}
.account-trip-item {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.account-trip-title {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}
.account-trip-meta {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.account-plan-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: var(--radius-sm);
}
.btn-xs.danger {
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning) 35%, transparent);
}

/* Mountain list */
.mountain-list { display: flex; flex-direction: column; gap: 1px; padding: 0 6px 8px; overflow-y: auto; }
.mountain-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    cursor: pointer; transition: all 0.12s;
}
.mountain-item:hover { background: var(--bg-surface-hover); }
.mountain-item.active { background: var(--accent-dim); }
.mountain-item.active .mountain-item-name { color: var(--accent); }
.mountain-item-icon { font-size: 14px; flex-shrink: 0; }
.mountain-item-info { display: flex; flex-direction: column; min-width: 0; }
.mountain-item-name {
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mountain-item-meta {
    font-size: 10px; color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Past hikes list */
.past-hikes-list { display: flex; flex-direction: column; gap: 1px; padding: 6px; overflow-y: auto; }
.past-hike-item {
    padding: 10px 10px; border-radius: var(--radius-sm);
    cursor: pointer; transition: background 0.12s;
}
.past-hike-item:hover { background: var(--bg-surface-hover); }
.past-hike-date {
    font-size: 10px; font-family: var(--font-mono);
    color: var(--accent); font-weight: 600;
    margin-bottom: 2px;
}
.past-hike-title {
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.past-hike-mountain {
    font-size: 11px; color: var(--text-dim); margin-top: 2px;
}

/* ─── Main Chat Area ─────────────────────────────────────────────────────── */
.main {
    display: flex; flex-direction: column;
    background: transparent;
    overflow: hidden;
    position: relative;
}
.chat-messages {
    flex: 1; overflow-y: auto;
    padding: 20px 28px;
    display: flex; flex-direction: column; gap: 20px;
}

/* ─── Messages ───────────────────────────────────────────────────────────── */
.message {
    display: flex; flex-direction: column;
    max-width: var(--chat-max-width);
    width: 100%;
    margin: 0 auto;
}
.message-user { align-items: flex-end; }
.message-assistant { align-items: flex-start; }
.avatar { display: none; }

.message-body { width: 100%; min-width: 0; }
.message-meta {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 4px;
}
.message-sender {
    font-size: 12px; font-weight: 600;
    font-family: var(--font);
    color: var(--text-tertiary);
    letter-spacing: 0.01em;
}
.message-time {
    font-size: 11px; color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Message content */
.message-content {
    font-family: var(--font);
    font-size: 14px; line-height: 1.65;
    color: var(--text-primary);
}
.message-user .message-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-secondary);
}
.message-assistant .message-content {
    padding: 4px 0 8px;
}
.message-content p { margin-bottom: 8px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content strong { color: var(--text-primary); font-weight: 600; }
.message-content em { color: var(--text-secondary); font-style: italic; }
.message-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(127, 168, 120, 0.35);
}
.message-content a:hover {
    color: var(--accent-hover);
    text-decoration-color: var(--accent);
}
.message-content code {
    background: var(--bg-surface); padding: 2px 6px;
    border-radius: 4px; font-family: var(--font-mono);
    font-size: 12px; color: var(--text-secondary);
}
.message-content ul, .message-content ol {
    padding-left: 20px; margin: 6px 0;
}
.message-content li { margin-bottom: 3px; font-size: 13px; line-height: 1.55; }

/* ─── Tool Calls ─────────────────────────────────────────────────────────── */
.message-tools { margin-bottom: 6px; }
.tool-call {
    margin: 4px 0;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
}
.tool-call-header {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    background: var(--bg-surface);
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font);
}
.tool-call-icon {
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.tool-call-name {
    font-weight: 500; font-family: var(--font-mono);
    font-size: 11px; color: var(--text-tertiary);
}
.tool-call-status {
    margin-left: auto; font-size: 10px;
    padding: 1px 7px; border-radius: var(--radius-full);
    font-family: var(--font); font-weight: 500;
}
.tool-call-status.running {
    background: var(--caution-dim); color: var(--caution);
}
.tool-call-status.complete {
    background: var(--positive-dim); color: var(--positive);
}
.tool-call-status.error {
    background: var(--warning-dim); color: var(--warning);
}
.tool-call-body {
    padding: 8px 10px;
    font-family: var(--font-mono); font-size: 11px;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-subtle);
    max-height: 180px; overflow-y: auto;
    display: none;
    white-space: pre-wrap; word-break: break-word;
}
.tool-call.expanded .tool-call-body { display: block; }

.tool-spinner {
    width: 10px; height: 10px;
    border: 1.5px solid var(--border); border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Data Cards ─────────────────────────────────────────────────────────── */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 12px 0;
    background: var(--bg-surface);
    font-family: var(--font);
}
.card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}
.card-icon { font-size: 16px; }
.card-title {
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.card-badge {
    margin-left: auto; font-size: 10px; font-weight: 600;
    padding: 2px 8px; border-radius: var(--radius-full);
}
.card-body { padding: 12px 14px; }

.card-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.card-stat { display: flex; flex-direction: column; gap: 2px; }
.card-stat-label {
    font-size: 10px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-dim);
}
.card-stat-value {
    font-size: 15px; font-weight: 600;
    font-family: var(--font-mono); color: var(--text-primary);
}
.card-stat-value.positive { color: var(--positive); }
.card-stat-value.caution { color: var(--caution); }
.card-stat-value.warning { color: var(--warning); }

.card-section { padding: 10px 14px; }
.card-section:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }
.card-section-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-tertiary); margin-bottom: 6px;
}

/* Weather rows */
.weather-row {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 0;
}
.weather-row:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }
.weather-icon { font-size: 18px; width: 24px; text-align: center; }
.weather-label { flex: 1; font-size: 13px; color: var(--text-secondary); }
.weather-value {
    font-family: var(--font-mono); font-size: 13px;
    font-weight: 600; color: var(--text-primary);
}

/* Weather comparison table (trailhead vs summit) */
.weather-table {
    width: 100%; border-collapse: collapse;
    font-size: 13px;
}
.weather-table th {
    text-align: left; padding: 8px 10px;
    font-size: 12px; font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}
.weather-table td {
    padding: 7px 10px;
    font-family: var(--font-mono); font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
}
.weather-table tr:last-child td { border-bottom: none; }
.weather-table .weather-row-label {
    font-family: var(--font); font-weight: 500;
    color: var(--text-secondary); white-space: nowrap;
}
.weather-summary {
    margin-top: 12px; padding: 10px 12px;
    background: var(--bg-surface-hover);
    border-radius: var(--radius-sm);
    font-size: 13px; line-height: 1.6;
    color: var(--text-secondary);
}
.weather-summary div + div { margin-top: 4px; }
.weather-summary strong { color: var(--text-primary); }
.weather-source {
    margin-top: 8px; font-size: 11px;
    color: var(--text-dim); font-style: italic;
}

/* Alerts */
.card-alert {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    font-size: 13px; line-height: 1.5;
    margin: 8px 0; font-family: var(--font);
}
.card-alert.alert-warning { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(212, 90, 58, 0.2); }
.card-alert.alert-caution { background: var(--caution-dim); color: var(--caution); border: 1px solid rgba(212, 162, 60, 0.2); }
.card-alert.alert-positive { background: var(--positive-dim); color: var(--positive); border: 1px solid rgba(90, 158, 111, 0.2); }
.card-alert.alert-info { background: var(--info-dim); color: var(--info); border: 1px solid rgba(107, 158, 190, 0.2); }
.card-alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* Gear list */
.gear-list { list-style: none; padding: 0; }
.gear-item {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; font-size: 13px;
    color: var(--text-secondary);
}
.gear-item:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }
.gear-check { color: var(--positive); font-size: 14px; }
.gear-essential { color: var(--warning); font-weight: 600; }

/* ─── Scroll-to-bottom indicator ─────────────────────────────────────────── */
.scroll-bottom-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.15s;
}
.scroll-bottom-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

/* ─── Chat Input Area ────────────────────────────────────────────────────── */
.chat-input-area {
    padding: 0 28px 16px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

.planner-shell {
    max-width: var(--chat-max-width);
    width: 100%;
    padding: 10px 10px 8px;
    border: 1px solid rgba(118, 186, 237, 0.30);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(252, 255, 255, 0.72), rgba(237, 248, 255, 0.58));
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
    box-shadow: 0 18px 40px rgba(35, 102, 162, 0.16);
}

/* Selectors row */
.input-selectors {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 136px 108px 108px auto;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 8px;
    overflow: visible;
    padding-bottom: 0;
}
.selector-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    min-width: 0;
}
.selector-group.mountain-group {
    min-width: 0;
}
.selector-group.selector-group-date {
    width: 136px;
}
.selector-group.selector-group-time {
    width: 108px;
}
.selector-group.selector-group-action {
    width: auto;
    align-self: flex-end;
}
.selector-label {
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-dim);
}
.selector-input {
    padding: 7px 10px;
    background: var(--field-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--field-text);
    font-family: var(--font); font-size: 13px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    width: 100%;
}
.selector-input:focus {
    background: var(--field-bg-hover);
    border-color: var(--border-hover);
    box-shadow: 0 0 0 2px rgba(127, 177, 222, 0.22);
}

input[type="date"].selector-input {
    color-scheme: var(--form-color-scheme);
}

/* Searchable dropdown */
.searchable-dropdown { position: relative; }
.dropdown-list {
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 50;
    max-height: 280px; overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    box-shadow: var(--shadow-md);
}
.dropdown-item {
    display: flex; justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer; font-size: 13px;
    color: var(--text-secondary);
    transition: background 0.08s;
}
.dropdown-item:hover,
.dropdown-item.active {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}
.dropdown-item-meta {
    font-family: var(--font-mono);
    font-size: 11px; color: var(--text-dim);
}

/* Main input wrapper */
.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-input);
    border: none;
    border-radius: 18px;
    padding: 7px 9px 7px 14px;
    box-shadow: 0 8px 20px rgba(43, 109, 171, 0.12), 0 0 0 1px rgba(110, 170, 223, 0.16);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    width: 100%;
    transition: box-shadow 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.input-wrapper:focus-within {
    box-shadow: 0 14px 32px rgba(44, 118, 184, 0.18), 0 0 0 1px rgba(52, 139, 212, 0.36);
    transform: translateY(-1px);
}
#chat-input {
    flex: 1; border: none; background: transparent;
    color: var(--text-on-light);
    font-family: var(--font);
    font-size: 14px; line-height: 1.5;
    resize: none; outline: none;
    min-height: 22px; max-height: 160px;
    padding: 5px 0;
}
#chat-input::placeholder { color: #a0a0a0; }
.input-actions {
    display: flex; align-items: flex-end; gap: 4px;
    flex-shrink: 0; padding-bottom: 2px;
}
.input-hint {
    text-align: center; margin-top: 6px;
    font-size: 10px; color: var(--text-dim);
    letter-spacing: 0.01em;
}

/* ─── Thinking Indicator ─────────────────────────────────────────────────── */
.thinking-indicator {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    color: var(--text-tertiary); font-size: 13px;
    font-family: var(--font);
}
.thinking-dots { display: flex; gap: 4px; }
.thinking-dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}
.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

/* ─── Welcome Screen ─────────────────────────────────────────────────────── */
.welcome {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 40px 40px 24px;
    color: var(--text-tertiary);
}
/* Before chat starts: center welcome + planner as one vertical block */
.main.welcome-mode {
    justify-content: center;
}
.main.welcome-mode .chat-messages {
    flex: 0 0 auto;
    overflow: visible;
}
.main.welcome-mode .chat-input-area {
    padding-bottom: 60px;
}
.welcome-icon {
    font-size: 40px; margin-bottom: 20px;
    opacity: 0.8;
}
.welcome h2 {
    font-size: 22px; font-weight: 600;
    font-family: var(--font);
    color: var(--text-primary); margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.welcome p {
    font-size: 14px; color: var(--text-tertiary);
    max-width: 400px; margin-bottom: 32px;
    font-family: var(--font);
    line-height: 1.6;
}
.welcome-suggestions {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; max-width: 480px; width: 100%;
}
.suggestion-chip {
    padding: 12px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-tertiary);
    cursor: pointer; transition: all 0.12s;
    text-align: left;
    font-family: var(--font);
}
.suggestion-chip:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface);
    color: var(--text-secondary);
}
.suggestion-chip-icon {
    font-size: 16px; display: block; margin-bottom: 4px;
    opacity: 0.7;
}

/* ─── Markdown in messages ───────────────────────────────────────────────── */
.message-content h1, .message-content h2, .message-content h3 {
    font-family: var(--font);
    color: var(--text-primary);
    margin: 16px 0 6px;
}
.message-content h1 {
    font-size: 16px; font-weight: 600;
    letter-spacing: -0.01em;
}
.message-content h2 {
    font-size: 14px; font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-subtle);
}
.message-content h3 { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.message-content blockquote {
    border-left: 2px solid var(--border-hover);
    padding-left: 14px; margin: 10px 0;
    color: var(--text-secondary);
    font-style: italic;
}
.message-content pre {
    background: var(--bg-surface);
    padding: 12px 16px; border-radius: 6px;
    overflow-x: auto; margin: 10px 0;
    border: 1px solid var(--border-subtle);
}
.message-content pre code {
    background: transparent; padding: 0;
    font-size: 12px; line-height: 1.5;
    color: var(--text-secondary);
}
.message-content table {
    width: 100%; border-collapse: collapse; margin: 10px 0;
    font-size: 13px; font-family: var(--font);
}
.message-content th, .message-content td {
    padding: 7px 12px; text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}
.message-content th {
    font-weight: 600; color: var(--text-tertiary);
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.04em;
}
.message-content hr {
    border: none; border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* ─── Windy / Weather Widget ─────────────────────────────────────────────── */
.weather-widgets { margin-top: 12px; }
.weather-widgets iframe {
    background: var(--bg-elevated);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* Resource links inside cards */
.resource-link {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px; border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-secondary);
    transition: all 0.12s;
}
.resource-link:hover {
    background: var(--bg-surface-hover);
    color: var(--accent); text-decoration: none;
}
.resource-link-icon { font-size: 14px; width: 18px; text-align: center; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed; bottom: 20px; right: 20px;
    display: flex; flex-direction: column; gap: 8px;
    z-index: 1000;
}
.toast {
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 13px; color: var(--text-secondary);
    display: flex; align-items: center; gap: 10px;
    animation: slideUp 0.25s ease;
    transition: opacity 0.3s, transform 0.3s;
}
.toast.toast-success { border-color: var(--positive); }
.toast.toast-error { border-color: var(--warning); }
.toast-icon { font-size: 16px; }

/* ─── Auth Modal ───────────────────────────────────────────────────────── */
/* ─── Confirm Modal ──────────────────────────────────────────────────────── */
.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1400;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 16px;
}
.confirm-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 100%;
    overflow: hidden;
}
.confirm-modal-header {
    padding: 16px 20px 0;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.confirm-modal-body {
    padding: 12px 20px 16px;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}
.confirm-modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}
.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.auth-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1300;
    padding: 16px;
}
.auth-modal.open {
    display: flex;
}
.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 24, 38, 0.44);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.auth-modal-card {
    position: relative;
    width: min(420px, 94vw);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    padding: 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}
.auth-modal-close:hover {
    background: var(--bg-surface-hover);
}
.auth-modal-card h3 {
    font-size: 18px;
    color: var(--text-primary);
}
.auth-modal-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}
.auth-mode-switch {
    display: inline-flex;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 3px;
    background: var(--bg-surface);
    width: fit-content;
}
.auth-mode-btn {
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
}
.auth-mode-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--mood-accent), var(--accent));
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.auth-field span {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 600;
}
.auth-field input {
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--field-bg);
    color: var(--field-text);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
}
.auth-field input:focus {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 2px rgba(127, 177, 222, 0.2);
}
.auth-submit-btn {
    margin-top: 4px;
    justify-content: center;
}
.auth-modal-message {
    min-height: 18px;
    font-size: 12px;
    color: var(--text-tertiary);
}
.auth-modal-message.error {
    color: var(--warning);
}
.auth-modal-message.success {
    color: var(--positive);
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}
.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 480px; max-width: 90vw;
    max-height: 80vh; overflow-y: auto;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
}

/* ─── Tags ───────────────────────────────────────────────────────────────── */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 600;
}
.tag-positive { background: var(--positive-dim); color: var(--positive); }
.tag-caution { background: var(--caution-dim); color: var(--caution); }
.tag-warning { background: var(--warning-dim); color: var(--warning); }
.tag-info { background: var(--info-dim); color: var(--info); }

/* Connection status removed — tracked internally only */

/* ─── Responsive ─────────────────────────────────────────────────────────── */
/* ─── Hamburger Button (visible only on mobile) ──────────────────────── */
.btn-hamburger {
    display: none; /* hidden on desktop */
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    margin-right: 6px;
}
.btn-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
/* Animate to X when sidebar open */
.app.sidebar-open .btn-hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.app.sidebar-open .btn-hamburger span:nth-child(2) { opacity: 0; }
.app.sidebar-open .btn-hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── Sidebar Overlay ────────────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
}
.app.sidebar-open .sidebar-overlay { display: block; }

/* Hide certain header buttons on mobile */
.btn-hide-mobile { /* no-op on desktop */ }

@media (max-width: 768px) {
    .app { grid-template-columns: 1fr; }

    /* Hamburger visible on mobile */
    .btn-hamburger { display: flex; }
    .btn-hide-mobile { display: none !important; }

    /* Sidebar as slide-in drawer */
    .sidebar {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
        background: var(--bg-surface);
        border-right: 1px solid var(--border);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .app.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .display-mode-switch { margin-right: 4px; }
    .display-mode-btn { font-size: 10px; padding: 4px 8px; }

    .chat-messages { padding: 12px; }
    .chat-input-area { padding: 0 12px 12px; }
    .welcome-suggestions { grid-template-columns: 1fr; }
    .planner-shell { padding: 10px 8px 8px; border-radius: 16px; }
    .input-selectors { grid-template-columns: 1fr; gap: 8px; }
    .input-selectors .selector-group { width: 100% !important; min-width: 0; }

    /* Sticky verdict card on mobile */
    .verdict-card {
        position: sticky;
        top: 0;
        z-index: 10;
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
    }

    /* Message styling tighter on mobile */
    .message { padding: 10px 0; }
    .message-body { padding: 10px 12px; }
    .header h1 { font-size: 16px; }
}

@media (max-width: 1280px) {
    .input-selectors {
        grid-template-columns: minmax(220px, 1fr) 124px 96px 96px auto;
    }
}

@media (max-width: 1120px) {
    .input-selectors {
        grid-template-columns: minmax(220px, 1fr) 128px 108px 108px;
    }
    .selector-group.selector-group-action {
        width: 100%;
        grid-column: 1 / -1;
    }
    .btn-plan-hike {
        width: 100%;
        justify-content: center;
    }
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
.fade-in { animation: fadeIn 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.slide-in-right { animation: slideInRight 0.34s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(18px) scale(0.995); }
    to { opacity: 1; transform: translateX(0); }
}

/* ─── Skeleton ───────────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface-hover) 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line:last-child { width: 60%; }

/* ─── Streaming Skeleton (trip report assembly) ─────────────────────────── */
.streaming-skeleton {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 36px 20px;
}
.streaming-skeleton-bar {
    width: 140px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent), var(--accent-dim));
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.streaming-skeleton-text {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ─── Windy Widget ──────────────────────────────────────────────────────── */
.windy-widget-container {
    margin: 12px 0; padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}
.windy-widget-container .widget-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px;
    background: var(--bg-elevated);
    font-size: 12px; font-weight: 600;
    color: var(--text-secondary);
    font-family: var(--font);
}
.windy-widget-container .widget-link {
    font-size: 11px; color: var(--accent);
    text-decoration: none; font-weight: 500;
}
.windy-widget-container .widget-link:hover { text-decoration: underline; }
.windy-widget-container iframe {
    display: block; width: 100%; border: none;
}

/* ─── Doc View (Event Draft Popup) ──────────────────────────────────────── */
.doc-view-trigger {
    display: flex; gap: 8px; align-items: center;
}
.btn-doc-view, .btn-doc-copy {
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 12px; font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer; transition: all 0.15s;
}
.btn-doc-view:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-doc-copy:hover { background: var(--bg-surface-hover); color: var(--text-primary); }

/* Action buttons in widgets */
.widget-group-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 0 10px;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-action:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}
.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-create-event {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-create-event-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.doc-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.doc-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 680px; max-width: 90vw;
    max-height: 85vh;
    display: flex; flex-direction: column;
}
.doc-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.doc-title {
    font-size: 15px; font-weight: 700;
    font-family: var(--font);
}
.doc-actions {
    display: flex; gap: 4px;
}
.doc-body {
    padding: 24px 28px;
    overflow-y: auto;
    font-family: var(--font-serif);
    font-size: 14px; line-height: 1.7;
    color: var(--text-primary);
}
.doc-body h1, .doc-body h2, .doc-body h3 {
    font-family: var(--font);
    color: var(--text-primary);
    margin: 14px 0 6px;
}
.doc-body h1 { font-size: 18px; }
.doc-body h2 { font-size: 15px; color: var(--accent); }
.doc-body h3 { font-size: 13px; }
.doc-body ul, .doc-body ol { padding-left: 20px; margin: 6px 0; }
.doc-body li { margin-bottom: 3px; }
.doc-body a { color: var(--accent); }
.doc-body strong { font-weight: 600; }
.doc-body p { margin-bottom: 8px; }
.doc-body hr { border: none; border-top: 1px solid var(--border-subtle); margin: 16px 0; }

/* ─── Dynamic Weather Backgrounds (very subtle) ─────────────────────────── */
body[data-display-mode="dark"] .main.weather-snow  { background: linear-gradient(180deg, #101110 0%, #141614 100%); }
body[data-display-mode="dark"] .main.weather-rain  { background: linear-gradient(180deg, #101110 0%, #121412 100%); }
body[data-display-mode="dark"] .main.weather-sunny { background: linear-gradient(180deg, #101110 0%, #141513 100%); }
body[data-display-mode="dark"] .main.weather-cloudy{ background: linear-gradient(180deg, #101110 0%, #131413 100%); }
body[data-display-mode="dark"] .main.weather-storm { background: linear-gradient(180deg, #0f100f 0%, #111211 100%); }

/* ─── Saved Chat Active State ───────────────────────────────────────────── */
.past-hike-item.active {
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
}
.past-hike-item.active .past-hike-title {
    color: var(--accent);
}

/* ─── Compact Card Variant ──────────────────────────────────────────────── */
.card-compact {
    margin: 6px 0;
}
.card-compact .card-header {
    padding: 6px 10px;
}
.card-compact .card-body {
    padding: 8px 10px;
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Verdict Card
   ═══════════════════════════════════════════════════════════════════════════ */
.verdict-card {
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 16px;
    border-left: 5px solid var(--border);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}
.verdict-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.verdict-icon { font-size: 1.4em; line-height: 1; }
.verdict-level {
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.verdict-mountain {
    font-weight: 500;
    color: var(--text-secondary);
}
.verdict-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 0.92em;
    color: var(--text-secondary);
    line-height: 1.5;
}
.verdict-risk {
    font-weight: 600;
    white-space: nowrap;
}
.verdict-summary { flex: 1; min-width: 200px; }

/* Verdict color variants */
.verdict-card--go {
    border-left-color: var(--positive);
    background: var(--positive-dim);
}
.verdict-card--go .verdict-level { color: var(--positive); }

.verdict-card--caution {
    border-left-color: var(--caution);
    background: var(--caution-dim);
}
.verdict-card--caution .verdict-level { color: var(--caution); }

.verdict-card--avoid {
    border-left-color: var(--red);
    background: rgba(195, 75, 75, 0.10);
}
.verdict-card--avoid .verdict-level { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════════════
   Metrics Row
   ═══════════════════════════════════════════════════════════════════════════ */
.metrics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.metric-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    font-size: 0.82em;
    white-space: nowrap;
}
.metric-icon { font-size: 1.1em; }
.metric-value { font-weight: 600; color: var(--text-primary); }
.metric-label { color: var(--text-dim); font-size: 0.9em; }

.metric-pill--positive { border-color: var(--positive); background: var(--positive-dim); }
.metric-pill--caution { border-color: var(--caution); background: var(--caution-dim); }
.metric-pill--warning { border-color: var(--warning); background: var(--warning-dim); }

/* ═══════════════════════════════════════════════════════════════════════════
   Collapsible Evidence Cards
   ═══════════════════════════════════════════════════════════════════════════ */
.evidence-card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    background: var(--bg-surface);
    overflow: hidden;
}
.evidence-card[open] {
    border-color: var(--border);
}
.evidence-card-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    color: var(--text-primary);
    list-style: none;
    user-select: none;
}
.evidence-card-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 220px;
}
.evidence-card-meta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
}
.evidence-card-summary::-webkit-details-marker { display: none; }
.evidence-card-summary::before {
    content: '▸';
    font-size: 0.85em;
    color: var(--text-dim);
    transition: transform 0.15s ease;
}
.evidence-card[open] > .evidence-card-summary::before {
    transform: rotate(90deg);
}
.evidence-card-summary:hover {
    background: var(--bg-surface-hover);
}
.evidence-card-body {
    padding: 4px 16px 16px;
}
.evidence-card-body > :first-child { margin-top: 0; }
.evidence-card-body h3 { font-size: 0.92em; margin-top: 12px; }
.evidence-card-body p { margin: 6px 0; }
.evidence-card-body ul, .evidence-card-body ol { margin: 6px 0 6px 20px; }
.evidence-card-body .table-wrapper { margin: 8px 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   Source/Freshness Chips (Phase 1 lightweight)
   ═══════════════════════════════════════════════════════════════════════════ */
.source-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72em;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.source-chip--live { background: var(--positive-dim); color: var(--positive); border: 1px solid var(--positive); }
.source-chip--stale { background: var(--caution-dim); color: var(--caution); border: 1px solid var(--caution); }
.source-chip--inferred { background: var(--bg-elevated); color: var(--text-dim); border: 1px solid var(--border-subtle); }
.source-chip--confidence { background: transparent; color: var(--text-dim); border: 1px solid var(--border-subtle); }
.source-chip:hover { text-decoration: none; }

/* Compact widget box for easy_hike link-only mode */
.widget-box-compact {
    padding: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Workspace Mode — Trip Cockpit Layout
   ═══════════════════════════════════════════════════════════════════════════ */

/* Collapse earlier messages when workspace is active */
.workspace-collapsed { display: none !important; }

/* The trip message becomes full-width, no bubble chrome */
.workspace-message .message-body {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100%;
}
.workspace-message .message-meta { display: none; }
.workspace-message .message-content { max-width: 100%; }

/* Workspace grid: map left, evidence right on desktop */
.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

/* Map pane fills left column; hide if empty (no map loaded yet) */
.workspace-map-pane { min-height: 0; }
.workspace-map-pane:empty { display: none; }
.workspace-map-pane:empty + .workspace-evidence-pane { grid-column: 1 / -1; }
.workspace-map-pane .route-map-container {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.workspace-map-pane .route-map {
    flex: 1;
    min-height: 380px;
}

/* Evidence pane — scrollable column of collapsible sections */
.workspace-evidence-pane {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 600px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.workspace-tools-drawer {
    margin: 12px 0 4px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    overflow: hidden;
}
.workspace-tools-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
}
.workspace-tools-summary::-webkit-details-marker { display: none; }
.workspace-tools-summary::before {
    content: '▸';
    font-size: 0.85em;
    color: var(--text-dim);
    transition: transform 0.15s ease;
    margin-right: 8px;
}
.workspace-tools-drawer[open] > .workspace-tools-summary::before {
    transform: rotate(90deg);
}
.workspace-tools-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}
.workspace-tools-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    margin-left: auto;
}
.workspace-tools-body {
    padding: 0 16px 16px;
}
.workspace-tools-sections {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.workspace-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
    margin-bottom: 12px;
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
    .workspace-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .workspace-map-pane .route-map { min-height: 220px; }
    .workspace-evidence-pane { max-height: none; }
    .workspace-tools-summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .workspace-tools-subtitle { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Observations Panel (SNOTEL / Webcams)
   ═══════════════════════════════════════════════════════════════════════════ */
.obs-panel { padding: 8px 4px; }
.obs-section { margin-bottom: 16px; }
.obs-heading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0 0 8px;
}
.obs-stations { display: flex; flex-direction: column; gap: 8px; }
.obs-station-card {
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}
.obs-station-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.obs-station-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}
.obs-station-name:hover { text-decoration: underline; }
.obs-station-meta { font-size: 11px; color: var(--text-dim); }
.obs-station-readings {
    display: flex;
    gap: 16px;
}
.obs-reading { text-align: center; }
.obs-reading-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.obs-reading-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.obs-station-date {
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-dim);
}
.obs-webcams {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.obs-webcam-link {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--accent);
    text-decoration: none;
    background: var(--bg-card);
}
.obs-webcam-link:hover { background: var(--accent-dim); }
.obs-provenance { margin-top: 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Route Map
   ═══════════════════════════════════════════════════════════════════════════ */
.route-map-container {
    margin: 12px 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.map-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    padding: 8px 10px 4px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}
.route-map {
    width: 100%;
    height: 340px;
}
.map-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 10px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    gap: 8px;
}
.map-trust-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.map-export-group {
    display: flex;
    gap: 6px;
}
.map-export-btn {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.map-export-btn:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}
@media (max-width: 768px) {
    .route-map { height: 240px; }
}
/* Override MapLibre attribution for dark mode */
.route-map .maplibregl-ctrl-attrib { font-size: 10px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Inline Widgets
   ═══════════════════════════════════════════════════════════════════════════ */
.widget-group-inline {
    margin: 14px 0 18px;
}

.widget-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-surface);
}
.widget-box .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-surface);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-subtle);
}
.widget-box .widget-header span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
}
.widget-box .widget-link {
    font-size: 11px;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.12s;
}
.widget-box .widget-link:hover {
    color: var(--accent);
    background: var(--accent-dim);
    text-decoration: none;
}
.widget-box .widget-link-disabled {
    color: var(--text-muted);
    background: transparent;
    cursor: default;
    pointer-events: none;
}
.widget-box iframe {
    display: block;
    width: 100%;
    border: none;
    background: var(--bg-elevated);
}
.widget-content-state {
    padding: 12px 14px;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.5;
    font-family: var(--font);
}
.widget-note {
    margin: 10px 12px 0;
    padding: 8px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: rgba(241, 248, 255, 0.9);
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.4;
}
.widget-note-warn {
    background: rgba(255, 243, 224, 0.95);
    border-color: rgba(230, 160, 60, 0.4);
    color: var(--text-primary);
    font-weight: 600;
}
.widget-empty {
    padding: 12px 14px;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.5;
}
.widget-empty a {
    color: var(--accent);
}

/* Widget link grid */
.widget-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px;
}
.widget-link-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font);
    text-decoration: none;
    transition: all 0.12s;
    cursor: pointer;
}
.widget-link-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    color: var(--text-secondary);
    text-decoration: none;
}
.widget-link-icon {
    font-size: 15px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

/* ─── Trailhead Details ─────────────────────────────────────────────────── */
.trailhead-details {
    padding: 10px 12px 4px;
    display: flex;
    gap: 10px;
    align-items: baseline;
    flex-wrap: wrap;
}
.trailhead-coords {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.trailhead-address {
    font-size: 11px;
    color: var(--text-dim);
}

/* ─── Table Wrapper ──────────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    margin: 8px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-surface);
}
.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 13px;
    font-family: var(--font);
}
.table-wrapper thead {
    background: var(--bg-elevated);
}
.table-wrapper th {
    padding: 7px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table-wrapper td {
    padding: 6px 12px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
    line-height: 1.4;
}
.table-wrapper tbody tr:last-child td {
    border-bottom: none;
}
.table-wrapper tbody tr:hover {
    background: var(--bg-surface-hover);
}
.table-wrapper td:first-child {
    font-weight: 500;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.trip-report-list-wrap {
    padding: 12px 14px;
}
.trip-report-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.trip-report-list li {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.45;
    font-size: 13px;
}
.trip-report-list a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.trip-report-footnote {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-tertiary);
}
.trip-report-footnote a {
    color: var(--text-secondary);
    text-decoration: none;
}
.trip-report-footnote a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Trail source links (WTA, AllTrails, Peakbagger) */
.trail-source-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
}
.trail-source-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}
.trail-source-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* Links inside tables should be visible */
.table-wrapper a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.table-wrapper a:hover {
    color: var(--accent-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Widget Groups — Weather & Conditions / Trail & Trip Reports
   ═══════════════════════════════════════════════════════════════════════════ */
.widget-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.widget-group-title {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0 2px;
}

/* ─── NWAC Avalanche Info Card ─────────────────────────────────────────── */
.nwac-info-card {
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
}
.nwac-info-card p { margin-bottom: 0; }
.nwac-note {
    font-size: 12px;
    color: var(--text-tertiary);
}
.nwac-note strong {
    color: var(--text-secondary);
    font-weight: 600;
}
.nwac-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
}
.nwac-links .widget-link-card {
    font-size: 11px;
    padding: 8px 10px;
}

/* ─── Mountain Forecast Info Card ──────────────────────────────────────── */
.mf-info-card {
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.6;
}
.mf-info-card p { margin-bottom: 6px; }
.mf-elevations {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.mf-elev-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: var(--info-dim);
    color: var(--info);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-mono);
    border-radius: var(--radius-full);
}

/* ─── Weather Sources Attribution ──────────────────────────────────────── */
.weather-sources {
    font-size: 11px;
    font-family: var(--font);
    color: var(--text-dim);
    padding: 8px 4px 0;
    line-height: 1.8;
}
.weather-sources a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.12s;
}
.weather-sources a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ─── Trail Picker Modal ───────────────────────────────────────────────── */
.trail-picker-modal {
    position: fixed;
    inset: 0;
    background: var(--modal-backdrop);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 20px;
}
.trail-picker-modal.open {
    display: flex;
}
.trail-picker-dialog {
    width: min(560px, 96vw);
    max-height: 86vh;
    overflow: hidden;
    border: 1px solid var(--modal-dialog-border);
    border-radius: var(--radius-lg);
    background: var(--modal-dialog-bg);
    backdrop-filter: blur(20px) saturate(142%);
    -webkit-backdrop-filter: blur(20px) saturate(142%);
    box-shadow: var(--modal-dialog-shadow);
}
.trail-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.trail-picker-header h3 {
    font-size: 16px;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}
.trail-picker-close {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
}
.trail-picker-close:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}
.trail-picker-subtitle {
    padding: 10px 16px 4px;
    color: var(--text-secondary);
    font-size: 13px;
}
.trail-picker-options {
    padding: 10px 14px;
    max-height: 56vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.trail-option-btn {
    text-align: left;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.trail-option-btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface-hover);
    transform: translateY(-1px);
}
.trail-option-name {
    font-size: 14px;
    font-weight: 600;
}
.trail-option-meta {
    font-size: 12px;
    color: var(--text-secondary);
}
.trail-picker-footer {
    padding: 10px 14px 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Doc Pane — Right-side editable event draft panel
   ═══════════════════════════════════════════════════════════════════════════ */
.doc-pane {
    display: none;
    flex-direction: column;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    overflow: hidden;
    min-width: 0;
}
.doc-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    flex-shrink: 0;
}
.doc-pane-title {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    color: var(--text-primary);
}
.doc-pane-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}
.doc-pane-actions .btn {
    padding: 5px 10px;
    font-size: 12px;
}
.doc-pane-edit-hint {
    padding: 8px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-dim);
    font-family: var(--font);
    flex-shrink: 0;
}
.doc-pane-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px;
    font-family: var(--font-serif);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    outline: none;
    cursor: text;
}
.doc-pane-body:focus {
    box-shadow: inset 0 0 0 2px var(--accent-dim);
    border-radius: 2px;
}
.doc-pane-body h1, .doc-pane-body h2, .doc-pane-body h3 {
    font-family: var(--font);
    color: var(--text-primary);
    margin: 14px 0 6px;
}
.doc-pane-body h1 { font-size: 18px; }
.doc-pane-body h2 { font-size: 15px; color: var(--accent); }
.doc-pane-body h3 { font-size: 13px; }
.doc-pane-body ul, .doc-pane-body ol { padding-left: 20px; margin: 6px 0; }
.doc-pane-body li { margin-bottom: 3px; }
.doc-pane-body a { color: var(--accent); }
.doc-pane-body strong { font-weight: 600; }
.doc-pane-body p { margin-bottom: 8px; }
.doc-pane-body hr { border: none; border-top: 1px solid var(--border-subtle); margin: 16px 0; }

/* When doc pane is open, expand the grid to 3 columns (chat center, doc pane on right) */
.app.doc-open {
    grid-template-columns: var(--sidebar-width) 1fr 400px;
}
.app.doc-open .doc-pane {
    grid-column: 3;
    grid-row: 2;
}
.app.doc-open .main {
    grid-column: 2;
    grid-row: 2;
}
/* Compact the input selectors when the doc pane eats horizontal space */
.app.doc-open .input-selectors {
    grid-template-columns: minmax(180px, 1fr) 120px 96px 96px;
}
.app.doc-open .selector-group.selector-group-action {
    width: 100%;
    grid-column: 1 / -1;
}
.app.doc-open .btn-plan-hike {
    width: 100%;
    justify-content: center;
}

/* ─── Dark Mode Fixes for Time & Select Inputs ────────────────────────── */
input[type="time"].selector-input {
    color-scheme: var(--form-color-scheme);
}
select.selector-input {
    color-scheme: var(--form-color-scheme);
    appearance: none;
    -webkit-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='%23837d74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
select.selector-input:focus {
    border-color: var(--accent);
}

/* ─── Responsive Widgets ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .widget-links-grid {
        grid-template-columns: 1fr;
    }
    .nwac-links {
        grid-template-columns: 1fr;
    }
    .account-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Responsive Doc Pane ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .app.doc-open {
        grid-template-columns: 1fr;
    }
    .app.doc-open .sidebar { display: none; }
    .app.doc-open .doc-pane {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: 400px;
        max-width: 90vw;
        z-index: 100;
        box-shadow: var(--shadow-lg);
        grid-column: auto;
        grid-row: auto;
    }
}
@media (max-width: 768px) {
    .app.doc-open .doc-pane {
        width: 100vw;
    }
}

/* ─── Hike Recommendations ──────────────────────────────────────────────── */
.recommendations-card {
    padding: 16px 0;
}
.recommendations-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.rec-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 14px;
}
.rec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
@media (max-width: 600px) { .rec-grid { grid-template-columns: 1fr; } }
.rec-item {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: all 0.12s;
    cursor: pointer;
}
.rec-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface);
}
.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.rec-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}
.rec-score {
    font-weight: 700;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}
/* Grade-specific colors */
.rec-score.grade-a {
    background: var(--positive-dim);
    color: var(--positive);
}
.rec-score.grade-b {
    background: var(--caution-dim);
    color: var(--caution);
}
.rec-score.grade-c {
    background: var(--warning-dim);
    color: var(--warning);
}
.rec-region {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.rec-stats {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}
.rec-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.rec-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    font-weight: 500;
}
.rec-tag-dry { background: var(--positive-dim); color: var(--positive); }
.rec-tag-calm { background: var(--info-dim); color: var(--info); }
.rec-tag-windy { background: var(--warning-dim); color: var(--warning); }
.rec-tag-wet { background: var(--caution-dim); color: var(--caution); }
.rec-tag-snow-likely { background: var(--info-dim); color: var(--info); }
.rec-tag-above-freezing { background: var(--positive-dim); color: var(--positive); }
.rec-weather-summary {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* ─── Suggest Hikes Button ──────────────────────────────────────────────── */
.btn-suggest-hikes {
    padding: 9px 12px;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.12s;
    font-family: var(--font);
    width: 100%;
    text-align: left;
}
.btn-suggest-hikes:hover:not(:disabled) {
    border-color: var(--border-hover);
    color: var(--text-secondary);
    background: var(--bg-surface);
}
.btn-suggest-hikes:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Packing List Tab
   ═══════════════════════════════════════════════════════════════════════════ */

.packing-panel {
    padding: 12px;
}

.packing-context {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.packing-route-class {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    font-family: var(--font-mono);
    background: var(--bg-elevated);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.packing-verdict {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}
.packing-verdict--go { background: var(--positive-dim); color: var(--positive); }
.packing-verdict--caution { background: var(--caution-dim); color: var(--caution); }
.packing-verdict--avoid { background: var(--warning-dim); color: var(--warning); }

.packing-group {
    margin-bottom: 14px;
}

.packing-group-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin: 0 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-subtle);
}

.packing-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
}
@media (max-width: 600px) {
    .packing-items { grid-template-columns: 1fr; }
}

.packing-item {
    font-size: 13px;
    color: var(--text-primary);
    padding: 3px 0;
}
.packing-item label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.packing-item input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.packing-item input[type="checkbox"]:checked + * {
    text-decoration: line-through;
    opacity: 0.55;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Backup Routes / Alternatives Tab
   ═══════════════════════════════════════════════════════════════════════════ */

.backup-panel {
    padding: 12px;
}

.backup-intro {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0 0 12px 0;
}

.backup-route-card {
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    background: var(--bg-surface);
}
.backup-route-card--go { border-left-color: var(--positive); }
.backup-route-card--caution { border-left-color: var(--caution); }
.backup-route-card--avoid { border-left-color: var(--warning); }

.backup-route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.backup-route-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.backup-route-verdict {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}
.backup-route-verdict--go { background: var(--positive-dim); color: var(--positive); }
.backup-route-verdict--caution { background: var(--caution-dim); color: var(--caution); }
.backup-route-verdict--avoid { background: var(--warning-dim); color: var(--warning); }

.backup-route-class {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    font-family: var(--font-mono);
    margin-bottom: 6px;
}

.backup-route-summary {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.backup-route-conditions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.backup-cond {
    font-size: 12px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Compare Routes Modal
   ═══════════════════════════════════════════════════════════════════════════ */

.compare-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.compare-modal {
    background: var(--bg-primary);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
}

.compare-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.compare-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.compare-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.compare-modal-close:hover { color: var(--text-primary); }

.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
    padding: 20px;
}
@media (max-width: 600px) {
    .compare-grid { grid-template-columns: 1fr; padding: 12px; }
}

.compare-card {
    border: 1px solid var(--border);
    border-top: 3px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--bg-surface);
}
.compare-card--go { border-top-color: var(--positive); }
.compare-card--caution { border-top-color: var(--caution); }
.compare-card--avoid { border-top-color: var(--warning); }

.compare-card-verdict {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.compare-card-verdict--go { background: var(--positive-dim); color: var(--positive); }
.compare-card-verdict--caution { background: var(--caution-dim); color: var(--caution); }
.compare-card-verdict--avoid { background: var(--warning-dim); color: var(--warning); }

.compare-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.compare-card-class {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.compare-card-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.compare-card-conditions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.compare-cond-item {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.compare-cond-label {
    color: var(--text-dim);
    font-weight: 500;
}

.compare-cond-value {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    text-align: right;
}

.compare-card-confidence {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
}

.btn-compare-routes {
    white-space: nowrap;
}
