:root {
    --app-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --title-font: "Arial Black", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #f7f5ee;
    --surface: #ffffff;
    --surface-2: #fbfaf4;
    --text: #202219;
    --heading: #3d412d;
    --muted: #6f705f;
    --muted-2: #868672;
    --line: #ddd9c9;
    --soft-line: #e8e5d8;
    --shadow: 0 8px 24px rgba(31, 35, 32, 0.06);
    --shadow-soft: 0 3px 10px rgba(31, 35, 32, 0.04);
    --button: #787858;
    --button-hover: #5f6045;
    --button-text: #faf8f3;
    --logo-olive: #787858;
    --logo-olive-dark: #3d412d;
    --logo-sage: #c8c8b0;
    --logo-sage-soft: #eeeee4;
    --yellow: #facc15;
    --orange: #f97316;
    --red: #dc2626;
    --green: #16a34a;
    --neutral: #787858;
    --critical: #374151;
    --danger: #dc2626;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--app-font);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
    font: inherit;
}

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.42; }

.app-shell {
    display: grid;
    grid-template-columns: 370px minmax(0, 1fr);
    min-height: 100vh;
}

/* =========================
   SETTINGS
   ========================= */
.sidebar {
    background: rgba(250, 248, 243, 0.88);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--line);
    padding: 18px 14px;
    overflow-y: auto;
}

.settings-accordion {
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0;
}

.settings-summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 2px 0 14px;
    color: var(--heading);
    font-family: var(--title-font);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.005em;
}
.settings-summary::-webkit-details-marker { display: none; }
.settings-summary::before {
    content: "▾";
    width: 14px;
    color: var(--logo-olive);
    font-size: 12px;
    transform: translateY(1px);
}
.settings-accordion:not([open]) .settings-summary::before { content: "▸"; }

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-size: 12px;
}
.settings-field-row {
    display: block;
}
.settings-field-label {
    display: block;
    margin: 0 0 6px;
    color: var(--heading);
    font-family: var(--title-font);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.005em;
    line-height: 1;
}
.settings-content button,
.settings-content input,
.settings-content select,
.settings-content .param-name,
.settings-content .param-value,
.settings-content .block-title,
.settings-content .airport-chip,
.settings-content .airport-option,
.settings-content .phenomena-chip,
.settings-content .phenomena-option {
    font-size: 12px;
}

.primary-btn, .small-btn, .icon-btn, .danger-btn {
    min-height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    line-height: 1;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.primary-btn {
    background: var(--button);
    color: var(--button-text);
    border-color: var(--button);
    padding: 8px 12px;
    font-weight: 650;
}
.primary-btn:not(:disabled):hover {
    background: var(--button-hover);
    border-color: var(--button-hover);
}
.primary-btn:not(:disabled):active,
.small-btn:not(:disabled):active,
.icon-btn:not(:disabled):active,
.danger-btn:not(:disabled):active { transform: translateY(1px); }
.small-btn { padding: 8px 10px; white-space: nowrap; }
.summary-checkbox {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.summary-checkbox input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--button);
}
.icon-btn, .danger-btn {
    min-height: 28px;
    width: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-color: transparent;
}
.danger-btn { color: var(--red); font-weight: 800; font-size: 17px !important; }

/* Airport multiselect */
.airport-multiselect {
    position: relative;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    min-width: 0;
}
.airport-field {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 7px 8px 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.airport-field:focus-within,
.airport-field:focus {
    outline: 2px solid rgba(120, 120, 88, 0.24);
    outline-offset: 2px;
}
.airport-chips, .phenomena-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}
.airport-chip, .phenomena-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 25px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--logo-sage-soft);
    color: var(--text);
    padding: 3px 7px;
    font-weight: 650;
    white-space: nowrap;
}
.airport-chip button, .phenomena-chip button {
    border: 0;
    background: transparent;
    color: #3f4246;
    padding: 0;
    line-height: 1;
    font-size: 15px;
}
.airport-search, .phenomena-search {
    flex: 1 1 96px;
    min-width: 70px;
    border: 0;
    outline: none;
    padding: 5px 2px;
    background: transparent;
    color: var(--text);
}
.airport-search::placeholder, .phenomena-search::placeholder { color: var(--muted-2); }
.airport-dropdown, .phenomena-dropdown, .color-menu {
    position: absolute;
    z-index: 80;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}
.airport-dropdown {
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    padding: 6px;
}
.airport-list { max-height: 240px; overflow-y: auto; }
.airport-option {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 8px;
    border-radius: 9px;
    cursor: pointer;
}
.airport-favorite-btn {
    width: 26px;
    min-height: 26px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted-2);
    font-size: 17px !important;
    line-height: 1;
}
.airport-favorite-btn:hover,
.airport-favorite-btn.active {
    background: #fff8df;
    color: #d89a00;
}
.airport-option:hover, .airport-option.selected, .phenomena-option:hover, .phenomena-option.selected, .color-option:hover, .color-option.active {
    background: #f2f3f2;
}
.airport-option-code, .phenomena-option-code { font-weight: 780; color: var(--text); }
.airport-option-name, .phenomena-option-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.config-multiselect {
    position: relative;
    min-width: 0;
}
.config-field {
    min-height: 42px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 7px 8px 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.config-field:focus-within,
.config-field:focus {
    outline: 2px solid rgba(120, 120, 88, 0.24);
    outline-offset: 2px;
}
.config-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}
.config-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 25px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--logo-sage-soft);
    color: var(--text);
    padding: 3px 7px;
    font-weight: 650;
    white-space: nowrap;
}
.config-chip .color-dot {
    width: 8px;
    height: 8px;
}
.config-chip button {
    border: 0;
    background: transparent;
    color: #3f4246;
    padding: 0;
    line-height: 1;
    font-size: 15px;
}
.config-search {
    flex: 1 1 96px;
    min-width: 70px;
    border: 0;
    outline: none;
    padding: 5px 2px;
    background: transparent;
    color: var(--text);
}
.config-search::placeholder {
    color: var(--muted-2);
}
.config-dropdown {
    position: absolute;
    z-index: 80;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}
.config-list {
    max-height: 240px;
    overflow-y: auto;
}
.config-option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 26px 26px;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 8px;
    border-radius: 9px;
    cursor: pointer;
}
.config-option-add {
    grid-template-columns: 18px minmax(0, 1fr);
    font-weight: 720;
    background: var(--logo-sage-soft);
    margin-bottom: 5px;
}
.config-section-title {
    padding: 9px 8px 4px;
    color: var(--logo-olive-dark);
    font-family: var(--title-font);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.005em;
}
.config-empty-option {
    padding: 7px 8px;
    color: var(--muted-2);
    font-size: 12px;
}
.config-option:hover,
.config-option.selected {
    background: var(--logo-sage-soft);
}
.config-option-plus {
    color: var(--logo-olive);
    font-weight: 800;
    text-align: center;
}
.config-option-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.config-favorite-btn,
.config-delete-user-btn {
    width: 26px;
    min-height: 26px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted-2);
    font-size: 17px !important;
    line-height: 1;
}
.config-favorite-btn:hover,
.config-favorite-btn.active {
    background: #fff8df;
    color: #d89a00;
}
.config-delete-user-btn {
    color: var(--danger);
    font-size: 18px !important;
}
.config-delete-user-btn:hover {
    background: #ffecec;
    color: #b00020;
}
.config-delete-spacer {
    width: 26px;
    min-height: 26px;
}

.preset-loader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: stretch;
    padding-top: 2px;
}
.preset-loader select {
    min-width: 0;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    padding: 7px 9px;
}
.preset-loader button { min-height: 36px; white-space: nowrap; }

.config-footer-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    padding-top: 2px;
}
.config-blocks {
    margin-bottom: -7px;
}
.config-blocks .config-block:last-child {
    margin-bottom: 0;
}
/* Config blocks */
.config-block {
    position: relative;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    margin-bottom: 10px;
    box-shadow: var(--shadow-soft);
}
.config-block.dragging {
    opacity: 0.55;
}
.config-block.drag-over-before::before,
.config-block.drag-over-after::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    border-radius: 999px;
    background: var(--button);
    z-index: 4;
}
.config-block.drag-over-before::before { top: -6px; }
.config-block.drag-over-after::after { bottom: -6px; }
.config-head {
    display: grid;
    grid-template-columns: 22px 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 8px 9px;
    border-bottom: 1px solid var(--soft-line);
    background: linear-gradient(180deg, #ffffff 0%, #fbfaf4 100%);
}
.drag-handle {
    min-height: 26px;
    width: 22px;
    border: 0;
    background: transparent;
    color: var(--muted-2);
    padding: 0;
    cursor: grab;
    font-size: 14px !important;
    line-height: 1;
}
.drag-handle:active {
    cursor: grabbing;
}
.block-title {
    min-width: 0;
    color: var(--heading);
    font-family: var(--title-font);
    font-size: 12px !important;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.015em;
}
.head-spacer {
    display: inline-flex;
    width: 24px;
    min-height: 24px;
}
.config-block .icon-btn[title="Duplicate configuration"] { font-size: 16px; font-weight: 700; }
.config-block .icon-btn[title="Save configuration"] { display: none; }
.title-input {
    width: 100%;
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 7px;
    background: var(--surface);
}
.config-body { padding: 6px 9px 10px; }
.param-list { display: flex; flex-direction: column; gap: 3px; }
.param-row {
    display: grid;
    grid-template-columns: 82px minmax(74px, 1fr) auto 24px;
    align-items: center;
    gap: 6px;
    min-height: 30px;
}
.param-row.phenomena { grid-template-columns: 82px minmax(0, 1fr) 24px; }
.param-name {
    color: var(--text);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.param-value { color: var(--text); white-space: nowrap; text-align: right; }
.param-row input[type="range"] {
    width: 100%;
    min-width: 0;
    accent-color: var(--neutral);
}
.param-row input[type="range"]:disabled,
.param-row select:disabled,
.readonly-field {
    opacity: 0.76;
    cursor: default;
}
.ceiling-control {
    display: grid;
    grid-template-columns: 62px minmax(64px, 1fr);
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.ceiling-control select[data-action="cloud-type"], .add-param select {
    width: 100%;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 6px 7px;
}
.ceiling-control select[data-action="cloud-type"] {
    width: 62px;
    min-width: 62px;
    padding: 6px 4px;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    background-image: none;
}
.add-param-wrap {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
}
.add-param {
    display: block;
}
.add-param select { height: 36px; min-height: 36px; }

/* Color chooser */
.color-select { position: relative; z-index: 50; }
.color-select-button {
    width: 38px;
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.color-menu {
    left: 0;
    top: calc(100% + 5px);
    min-width: 44px;
    padding: 4px;
}
.color-option {
    width: 100%;
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.color-dot, .status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--dot-color, var(--green));
    box-shadow: none;
    background-image: none;
}
.color-dot-empty {
    background: transparent;
    border: 1.5px solid var(--muted-2);
}
.color-option.active .color-dot { outline: 2px solid #111; outline-offset: 2px; }

/* Phenomena multiselect */
.phenomena-multiselect { position: relative; min-width: 0; }
.phenomena-field {
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 6px;
}
.phenomena-search { flex-basis: 48px; min-width: 42px; padding: 3px 0; }
.phenomena-dropdown {
    left: 0;
    right: 0;
    top: calc(100% + 5px);
    padding: 5px;
    max-height: 220px;
    overflow-y: auto;
}
.phenomena-option {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
}
.phenomena-option-preset {
    grid-template-columns: minmax(0, 1fr) 16px;
}
.phenomena-option.disabled {
    opacity: 0.42;
    cursor: not-allowed;
}
.phenomena-option.critical-match {
    background: var(--logo-sage-soft);
}
.phenomena-critical-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 999px;
    background: #6B7280;
    color: #FFFFFF;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.01em;
    vertical-align: middle;
}
.phenomena-category-title {
    padding: 8px 7px 3px;
    color: var(--logo-olive-dark);
    font-family: var(--title-font);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.selected-mark { color: var(--neutral); text-align: right; }

/* =========================
   MAIN / BRIEFING
   ========================= */
.main {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px 32px;
}
.top-spacer { height: 30px; }
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -1px;
}
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}
.mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 12.5px;
    line-height: 1;
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.05px;
}
.mode-label { white-space: nowrap; }
.switch { display: inline-flex; align-items: center; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
    width: 44px;
    height: 25px;
    border-radius: 999px;
    background: #d9d9d5;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    padding: 2px;
    transition: background 0.15s ease;
}
.switch-thumb {
    width: 19px;
    height: 19px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: 0 1px 4px rgba(0,0,0,0.22);
    transition: transform 0.15s ease;
}
.switch input:checked + .switch-track { background: var(--button); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(19px); }
.refresh-btn { min-height: 36px; padding: 8px 11px; font-size: 12px; }
.brand-logo {
    display: block;
    width: clamp(120px, 18vw, 178px);
    height: auto;
}
.brand-logo-short {
    display: none;
    width: 42px;
}
.refresh-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
}
.refresh-icon-btn:hover { opacity: 0.62; }
.refresh-icon-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.export-btn { white-space: nowrap; }
.status-bar {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 14px;
}
.briefing { display: flex; flex-direction: column; gap: 14px; }
.empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    color: var(--muted);
}
.airport-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 14px 15px;
    box-shadow: var(--shadow-soft);
}
.airport-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    margin-bottom: 11px;
    font-size: 22px;
    line-height: 1.12;
    color: var(--heading);
    font-family: var(--title-font);
    font-weight: 900;
    letter-spacing: 0.005em;
}
.airport-name, .metar-age {
    font-size: 13px;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
.twilight {
    font-family: var(--app-font);
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}
.section-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 11px 0 5px;
    font-size: 12px;
    font-family: var(--title-font);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--heading);
    letter-spacing: 0.035em;
}
.section-title .metar-age {
    margin-left: 3px;
    font-size: 13px;
    font-family: var(--app-font);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}
.metar-age.stale {
    color: var(--red);
    font-weight: 600;
}
.report-kind {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid rgba(120, 120, 88, 0.28);
    border-radius: 999px;
    background: var(--logo-sage-soft);
    color: var(--logo-olive-dark);
    font-family: var(--title-font);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.045em;
    line-height: 1;
}
.report-from {
    color: var(--muted);
    font-weight: 400;
    text-transform: none;
}
.report-time {
    color: var(--logo-olive-dark);
    font-weight: 780;
}
.decoded-section {
    border: 1px solid var(--soft-line);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    padding: 10px 11px;
    margin: 0 0 12px;
}
.decoded-section-metar {
    border-left: none;
}
.decoded-section-taf {
    border-left: none;
    background: var(--surface-2);
}
.decoded-section .section-title {
    margin-top: 0;
}
.decoded-block {
    font-size: 12px;
    line-height: 1.42;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--text);
}

.decoded-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
    min-height: 18px;
    padding: 0;
}
.decoded-label {
    font-size: 12px;
    font-family: var(--app-font);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted);
}

.decoded-value { color: var(--text); font-size: 12px; font-weight: 400; letter-spacing: 0; min-width: 0; }
.raw-report {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.42;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--text);
    margin: 0;
    padding: 10px 11px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1px solid var(--soft-line);
}
.summary-empty {
    color: var(--muted);
    font-size: 12px;
    padding: 10px 11px;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}
.taf-slices {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.taf-base-block {
    padding: 1px 0 4px;
}
.taf-validity-line {
    margin: 0 0 5px;
    color: var(--logo-olive-dark);
    font-size: 12px;
    line-height: 1.42;
    font-weight: 500;
    letter-spacing: 0;
}
.taf-validity-line strong { font-weight: 600; }
.taf-slice-block {
    padding: 7px 0 2px;
    background: transparent;
    border: 0;
    border-radius: 0;
    border-top: 1px solid var(--soft-line);
}
.taf-slice-title {
    margin: 0 0 5px;
    color: var(--logo-olive-dark);
    font-size: 12px;
    line-height: 1.42;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
.taf-slice-title strong {
    font-weight: 600;
}
.taf-title-connector {
    font-weight: 400;
}
.alert-badge {
    display: inline-block;
    border-radius: 7px;
    padding: 1px 7px;
    line-height: 1.36;
    font-weight: 400;
}
.alert-red { background: var(--red); color: #fff; }
.alert-orange { background: var(--orange); color: #fff; }
.alert-yellow { background: var(--yellow); color: #000; }
.api-source {
    text-align: right;
    font-size: 10px;
    color: var(--neutral);
    margin-top: 11px;
    padding-top: 8px;
    border-top: 1px dashed var(--soft-line);
}

/* =========================
   MOBILE
   ========================= */
@media (max-width: 840px) {
    body { background: var(--bg); }
    .app-shell { display: block; }
    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 12px;
    }
    .settings-summary { padding-bottom: 10px; }
    .settings-content { gap: 11px; }
    .config-blocks { margin-bottom: -4px; }
    .preset-loader { grid-template-columns: minmax(0, 1fr); }
    .preset-loader button { width: 100%; }
    .airport-field { min-height: 43px; padding: 6px 7px 7px; }
    .airport-list { max-height: 210px; }
    .config-head {
        grid-template-columns: 20px 22px 38px minmax(0, 1fr) auto;
        gap: 5px;
        padding: 7px 8px;
    }
    .config-body { padding: 5px 8px 9px; }
    .param-list { gap: 2px; }
    .param-row {
        grid-template-columns: 72px minmax(0, 1fr) 52px 22px;
        gap: 4px;
        min-height: 28px;
    }
    .param-row.phenomena { grid-template-columns: 72px minmax(0, 1fr) 22px; }
    .param-name { font-size: 11px; }
    .param-value { font-size: 10.5px; }
    .ceiling-control { grid-template-columns: 58px minmax(0, 1fr); gap: 4px; }
    .ceiling-control select[data-action="cloud-type"] { width: 58px; min-width: 58px; }
    .add-param select { height: 36px; min-height: 36px; }
    .small-btn { padding-left: 9px; padding-right: 9px; }

    .main { padding: 0 12px 24px; }
    .top-spacer { height: 18px; }
    .page-header { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 12px; }
    h1 { font-size: 26px; }
    .header-actions { width: 100%; justify-content: space-between; gap: 8px; }
    .mode-toggle { flex: 1 1 auto; gap: 7px; font-size: 12px; }
    .switch-track { width: 42px; height: 24px; }
    .switch-thumb { width: 18px; height: 18px; }
    .switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
    .refresh-btn { min-height: 34px; padding: 7px 10px; font-size: 11.5px; }
    .briefing { gap: 12px; }
    .airport-card { padding: 13px 12px; border-radius: 14px; }
    .airport-title { font-size: 20px; gap: 7px; margin-bottom: 9px; }
    .airport-name, .metar-age { font-size: 12px; }
    .twilight { font-size: 11.5px; }
    .section-title { font-size: 12.5px; margin-top: 10px; }
    .raw-report { font-size: 12px; padding: 9px; }
    .decoded-section { padding: 9px; margin: 0 0 10px; }
    .decoded-block { font-size: 12px; }
    .decoded-row { grid-template-columns: 84px minmax(0, 1fr); gap: 6px; }
}

@media (max-width: 380px) {
    .mode-toggle { font-size: 11.5px; gap: 5px; }
    .refresh-btn { padding-left: 8px; padding-right: 8px; }
    .param-row { grid-template-columns: 66px minmax(0, 1fr) 48px 21px; }
    .param-row.phenomena { grid-template-columns: 66px minmax(0, 1fr) 21px; }
    .ceiling-control { grid-template-columns: 56px minmax(0, 1fr); }
    .ceiling-control select[data-action="cloud-type"] { width: 56px; min-width: 56px; }
    .decoded-row { grid-template-columns: 78px minmax(0, 1fr); }
    .airport-title { font-size: 19px; }
}

/* Interaction refinements */
.preset-loader {
    grid-template-columns: minmax(0, 1fr) auto auto;
}
.preset-loader .secondary-action {
    background: var(--surface);
    color: var(--muted);
    border-color: var(--line);
}
.config-head {
    grid-template-columns: 22px 42px minmax(0, 1fr) auto;
}
.block-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1px;
    min-width: max-content;
}
.icon-btn,
.duplicate-icon,
.save-icon {
    color: #60656b !important;
    font-weight: 700;
}
.save-icon {
    font-size: 15px !important;
    transform: translateY(-0.5px);
}
.duplicate-icon {
    font-size: 16px !important;
}
.icon-btn:hover,
.duplicate-icon:hover,
.save-icon:hover {
    background: #f1f2f2;
    color: #3f444a !important;
}
.danger-btn:hover {
    background: #fff1f1;
}
.alert-critical {
    background: var(--critical);
    color: #fff;
}
.phenomena-inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

@media (max-width: 840px) {
    .brand-logo-full { display: none; }
    .brand-logo-short { display: block; }

    .preset-loader {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 5px;
    }
    .preset-loader button {
        width: auto !important;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 11px;
    }
    .config-head {
        grid-template-columns: 20px 34px minmax(0, 1fr) auto;
        gap: 4px;
        padding-left: 7px;
        padding-right: 7px;
    }
    .block-actions .icon-btn,
    .block-actions .danger-btn {
        width: 24px;
        min-height: 24px;
    }
}

/* Footer */
.app-footer {
    margin: 18px 0 8px;
    padding: 12px 2px 0;
    border-top: 1px solid var(--line);
    color: #5f6670;
    font-size: 11px;
    line-height: 1.35;
}
.app-footer p {
    margin: 0 0 6px;
}
.footer-ref {
    color: #394150;
    font-weight: 650;
}

@media (max-width: 840px) {
    .app-footer {
        margin-top: 16px;
        font-size: 10.5px;
        padding-left: 1px;
        padding-right: 1px;
    }
}
