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

html, body { height: 100%; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #3d3d48;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
    font-size: 13px;
}

/* ===== Splash ===== */
.splash-screen {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.splash-hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* ===== App shell ===== */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.app-visible { opacity: 1; }

/* ===== Top bar ===== */
.topbar {
    flex-shrink: 0;
    background: linear-gradient(180deg, #cfd86a 0%, #c0cb52 100%);
    border-bottom: 1px solid #a8b340;
    box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 2px 6px rgba(0,0,0,0.15);
}

.topbar-brand {
    display: none;
}

.navbar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.75rem;
    gap: 0.5rem;
}

.nav-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.05rem 0.15rem;
    flex: 1;
    min-width: 0;
}

.nav-item {
    color: #222;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.28rem 0.42rem;
    white-space: nowrap;
    border-radius: 3px;
    transition: background 0.15s, box-shadow 0.15s;
    letter-spacing: -0.01em;
}

.nav-item:hover {
    background: rgba(255,255,255,0.35);
}

.nav-item.active {
    background: rgba(255,255,255,0.55);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
    font-weight: 600;
}

.nav-right { flex-shrink: 0; display: flex; align-items: center; gap: 0.4rem; }

.menu-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(0,0,0,0.1);
    cursor: pointer;
    padding: 0.22rem 0.45rem;
    font-family: inherit;
    color: #222;
    font-weight: 500;
    font-size: 0.72rem;
    border-radius: 4px;
}
.menu-btn:hover { background: rgba(255,255,255,0.45); }

.menu-circle {
    width: 0.85rem;
    height: 0.85rem;
    background: #fff;
    border-radius: 50%;
    border: 1.5px solid #333;
    flex-shrink: 0;
}

/* ===== Nav widgets (годинник, FPS, Full HD) ===== */
.nav-widgets {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.4rem;
}
.nav-widget {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.3rem;
    background: rgba(255,255,255,0.28);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 0.22rem 0.45rem;
    font-family: inherit;
    color: #222;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    user-select: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.nav-widget .ph { font-size: 0.85rem; }
.nav-widget-text { font-variant-numeric: tabular-nums; }
#fpsWidget { color: #1f2d00; }
#fpsWidget.is-good .ph { color: #2f6b00; }
#fpsWidget.is-warn .ph { color: #9a6b00; }
#fpsWidget.is-bad  .ph { color: #a02000; }
#hdWidget { letter-spacing: 0.02em; }
#hdWidget.is-active { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.25); }
.nav-widget { cursor: pointer; }
.nav-widget:hover { background: rgba(255,255,255,0.45); }
.nav-widget.is-open { background: rgba(255,255,255,0.6); border-color: rgba(0,0,0,0.25); }

@media (max-width: 900px) {
    .nav-widget .ph { font-size: 0.8rem; }
    #hdWidget .nav-widget-text { display: none; }
}

/* ===== Випадаючі панелі віджетів ===== */
.nav-widget { position: relative; }
.nav-pop {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 400;
    width: 264px;
    background: #f7f7f4;
    border: 1px solid #2a2a32;
    border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.35);
    color: #1a1a1a;
    overflow: hidden;
    font-weight: 500;
}
.nav-pop[hidden] { display: none !important; }
.nav-pop-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #d8e070 0%, #c5d055 100%);
    border-bottom: 1px solid #a8b340;
    font-size: 0.78rem;
    font-weight: 700;
}
.nav-pop-head .ph { font-size: 1rem; }
.nav-pop-body { padding: 10px 12px; }
.nav-pop-close {
    margin-left: auto;
    border: none; background: rgba(0,0,0,0.1);
    width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: 12px;
}

/* ===== FPS-панель ===== */
.fps-big {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.fps-big small { font-size: 0.7rem; font-weight: 600; color: #777; margin-left: 4px; }
.fps-chart {
    width: 100%; height: 70px; display: block;
    margin: 8px 0; background: #fff; border: 1px solid #e0e0d6; border-radius: 6px;
}
.fps-stats { display: flex; justify-content: space-between; gap: 6px; }
.fps-stat {
    flex: 1; text-align: center; background: #fff;
    border: 1px solid #e0e0d6; border-radius: 6px; padding: 6px 4px;
}
.fps-stat-val { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fps-stat-lbl { font-size: 0.6rem; color: #888; text-transform: uppercase; letter-spacing: 0.03em; }
.fps-bar-wrap { margin-top: 8px; height: 6px; background: #e4e4da; border-radius: 4px; overflow: hidden; }
.fps-bar { height: 100%; width: 0%; background: #2f6b00; transition: width .3s ease, background .3s ease; }

/* ===== Календар / нагадування ===== */
.cal-now { text-align: center; margin-bottom: 8px; }
.cal-now-time { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.cal-now-date { font-size: 0.68rem; color: #777; margin-top: 3px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-month { font-size: 0.74rem; font-weight: 700; }
.cal-nav { border: 1px solid #ccc; background: #fff; border-radius: 5px; width: 24px; height: 24px; cursor: pointer; font-size: 12px; line-height: 1; }
.cal-nav:hover { background: #f0f0ea; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { font-size: 0.56rem; color: #999; text-align: center; padding: 2px 0; font-weight: 700; text-transform: uppercase; }
.cal-day {
    aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
    font-size: 0.66rem; border: 1px solid transparent; border-radius: 5px; cursor: pointer;
    background: #fff; font-variant-numeric: tabular-nums; position: relative;
}
.cal-day:hover { background: #eef0d8; }
.cal-day.is-other { color: #c9c9c2; }
.cal-day.is-today { border-color: #a8b340; font-weight: 800; }
.cal-day.is-selected { background: #c5d055; border-color: #7a8c1e; font-weight: 800; }
.cal-day.has-rem::after {
    content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; border-radius: 50%; background: #a02000;
}
.cal-form { margin-top: 10px; border-top: 1px solid #e0e0d6; padding-top: 8px; }
.cal-form-row { display: flex; gap: 6px; margin-top: 6px; }
.cal-input {
    flex: 1; border: 1px solid #ccc; border-radius: 6px; padding: 0.4rem 0.5rem;
    font-family: inherit; font-size: 0.72rem; background: #fff; color: #1a1a1a; min-width: 0;
}
.cal-input:focus { outline: none; border-color: #a8b340; box-shadow: 0 0 0 2px rgba(168,179,64,0.25); }
.cal-add {
    border: 1px solid #2a2a32; background: linear-gradient(180deg,#d8e070,#c5d055);
    border-radius: 6px; padding: 0.4rem 0.6rem; font-family: inherit; font-size: 0.72rem;
    font-weight: 700; cursor: pointer; white-space: nowrap;
}
.cal-add:hover { filter: brightness(1.03); }
.cal-selected-hint { font-size: 0.64rem; color: #888; margin-top: 6px; }
.rem-list { margin-top: 8px; max-height: 96px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.rem-item {
    display: flex; align-items: center; gap: 6px; background: #fff;
    border: 1px solid #e6e6df; border-left: 3px solid #c5d055; border-radius: 6px; padding: 5px 7px;
}
.rem-item.is-done { opacity: 0.55; border-left-color: #b0b0b0; }
.rem-item-text { flex: 1; font-size: 0.7rem; color: #333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rem-item.is-done .rem-item-text { text-decoration: line-through; }
.rem-item-when { font-size: 0.58rem; color: #999; font-variant-numeric: tabular-nums; }
.rem-del { border: none; background: transparent; color: #bbb; cursor: pointer; font-size: 0.8rem; line-height: 1; }
.rem-del:hover { color: #c0392b; }
.rem-empty { font-size: 0.66rem; color: #999; text-align: center; padding: 6px 0; }

/* ===== Сповіщення-нагадування ===== */
.notif-layer {
    position: fixed; top: 64px; right: 16px; z-index: 1200;
    display: flex; flex-direction: column; gap: 10px; max-width: 340px;
}
.notif-card {
    background: #f7f7f4; border: 1px solid #2a2a32; border-radius: 10px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.4); overflow: hidden;
    animation: notifIn .28s cubic-bezier(0.34,1.35,0.64,1);
}
@keyframes notifIn { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }
.notif-card.is-hide { animation: notifOut .25s ease forwards; }
@keyframes notifOut { to { opacity: 0; transform: translateX(24px) scale(.96); } }
.notif-head {
    display: flex; align-items: center; gap: 8px; padding: 9px 12px;
    background: linear-gradient(180deg,#d8e070,#c5d055); border-bottom: 1px solid #a8b340;
}
.notif-head .ph { font-size: 1.05rem; color: #2a2a2a; }
.notif-title { font-size: 0.78rem; font-weight: 700; color: #1a1a1a; }
.notif-body { padding: 10px 12px; }
.notif-msg { font-size: 0.76rem; color: #333; line-height: 1.4; }
.notif-time { font-size: 0.62rem; color: #999; margin-top: 4px; }
.notif-actions { display: flex; gap: 6px; padding: 0 12px 12px; }
.notif-btn {
    flex: 1; border: 1px solid #2a2a32; border-radius: 6px; padding: 0.4rem 0.5rem;
    font-family: inherit; font-size: 0.7rem; font-weight: 700; cursor: pointer;
}
.notif-btn-ok { background: #2a2a32; color: #f7f7f4; }
.notif-btn-ok:hover { background: #3a3a44; }
.notif-btn-later { background: #fff; color: #1a1a1a; }
.notif-btn-later:hover { background: #f0f0ea; }
.notif-snooze { display: flex; gap: 6px; padding: 0 12px 12px; }
.notif-snooze[hidden] { display: none; }
.snooze-opt {
    flex: 1; border: 1px solid #ccc; background: #fff; border-radius: 6px; padding: 0.35rem 0.2rem;
    font-family: inherit; font-size: 0.66rem; font-weight: 600; cursor: pointer;
}
.snooze-opt:hover { background: #eef0d8; border-color: #a8b340; }


/* ===== Workspace ===== */
.workspace {
    flex: 1;
    min-height: 0;
    padding: 8px;
    display: flex;
    background: #3d3d48;
}

.panels {
    flex: 1;
    display: flex;
    gap: 6px;
    background: #2a2a32;
    border-radius: 4px;
    padding: 6px;
    min-height: 0;
    width: 100%;
    border: 1px solid #1e1e24;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
}

/* ===== Panels ===== */
.panel {
    display: flex;
    flex-direction: column;
    background: #f4f4f2;
    border-radius: 3px;
    min-height: 0;
    min-width: 0;
    border: 1px solid #1a1a1a;
    box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
    overflow: hidden;
}

.panel-left   { flex: 2.35; }
.panel-middle { flex: 1.45; }
.panel-right  { flex: 0.9; }

.panel-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0.35rem 0.55rem;
    background: linear-gradient(180deg, #ecece8 0%, #e0e0da 100%);
    border-bottom: 1px solid #c8c8c0;
    min-height: 28px;
}

.panel-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #2a2a2a;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.panel-meta {
    font-size: 0.65rem;
    color: #6a6a6a;
    font-weight: 400;
}

.panel-body {
    flex: 1;
    min-height: 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

/* ===== Status bar ===== */
.statusbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0.75rem;
    background: #2e2e36;
    border-top: 1px solid #1a1a1e;
    color: #a0a0a8;
    font-size: 0.65rem;
    font-weight: 400;
}

.status-sep { opacity: 0.4; }
.status-item { white-space: nowrap; }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .nav-item { font-size: 0.68rem; padding: 0.24rem 0.35rem; }
}

@media (max-width: 768px) {
    body { overflow: auto; }

    .nav-left {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #c8d25a;
        flex-direction: column;
        align-items: stretch;
        padding: 0.35rem;
        gap: 0.1rem;
        box-shadow: 0 8px 20px rgba(0,0,0,0.25);
        z-index: 100;
    }
    .nav-left.show-mobile { display: flex; }

    .nav-item {
        font-size: 0.85rem;
        padding: 0.55rem 0.85rem;
        width: 100%;
        text-align: left;
    }

    .navbar {
        position: relative;
        justify-content: flex-end;
    }

    .topbar { position: relative; }

    .workspace { padding: 6px; }

    .panels {
        flex-direction: column;
        gap: 6px;
        min-height: calc(100vh - 90px);
    }

    .panel-left,
    .panel-middle,
    .panel-right {
        flex: none;
        width: 100%;
        min-height: 150px;
    }
    .panel-left { min-height: 220px; }
}

@media (max-width: 400px) {
    .panel-left { min-height: 180px; }
    .panel-middle, .panel-right { min-height: 120px; }
    .statusbar { font-size: 0.6rem; }
}


/* ===== Leaflet map ===== */
.panel-body {
    position: relative;
    overflow: hidden;
}

.map-canvas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #dce3dc;
    z-index: 1;
}

.leaflet-container {
    width: 100% !important;
    height: 100% !important;
    font: inherit;
    background: #dce3dc;
}

.leaflet-control-zoom a {
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    font-size: 15px !important;
}

.map-canvas, .leaflet-container {
    background: #000 !important;
}

/* Resize handles */
.panels {
    display: flex;
    align-items: stretch;
}

.resize-handle {
    width: 6px;
    flex-shrink: 0;
    cursor: col-resize;
    background: transparent;
    position: relative;
    z-index: 5;
}
.resize-handle::after {
    content: "";
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 2px;
    width: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
}
.resize-handle:hover::after,
body.is-resizing .resize-handle::after {
    background: #c9d45a;
}
body.is-resizing {
    cursor: col-resize !important;
    user-select: none !important;
}
body.is-resizing iframe {
    pointer-events: none;
}

.panel-left, .panel-middle, .panel-right {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
}

/* Dropdown */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-item-add.active {
    background: rgba(255,255,255,0.55);
    font-weight: 600;
}
.dropdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 200px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px 6px;
    background: #3a342f;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    border: 1px solid #2a2520;
    border-top: none;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.dropdown-panel::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 6px solid #3a342f;
}
.nav-dropdown.is-open .dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.dropdown-option {
    display: block;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 500;
    color: #e8e4df;
    background: transparent;
    border: none;
    border-radius: 5px;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
}
.dropdown-option:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Blur — тільки режим «Додати проблему» (пошук не чіпає) */
.workspace { position: relative; }
.blur-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(18, 20, 28, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}
.workspace.is-blurred .blur-overlay {
    display: block !important;
}
.workspace.is-blurred .panel-right,
.workspace.is-blurred #panelCol2 {
    position: relative;
    z-index: 60 !important;
    box-shadow: 0 0 0 2px #c9d45a, 0 8px 28px rgba(0,0,0,0.45);
    filter: none !important;
}
.workspace.is-blurred .panel-left,
.workspace.is-blurred .panel-middle,
.workspace.is-blurred #panelCol0,
.workspace.is-blurred #panelCol1 {
    /* карта і середня панель під блюром через overlay */
    pointer-events: none;
}
.panel-right.is-active-tools .panel-header {
    background: linear-gradient(180deg, #d8e070 0%, #c5d055 100%);
}
.tools-close {
    border: none;
    background: rgba(0,0,0,0.12);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.panel-body-tools {
    overflow-y: auto !important;
    background: #f7f7f4 !important;
    padding: 8px 6px 12px;
}
.tools-placeholder {
    font-size: 0.72rem;
    color: #888;
    padding: 12px 8px;
    text-align: center;
}
.tree-hint {
    font-size: 0.65rem;
    color: #666;
    padding: 4px 8px 8px;
    line-height: 1.35;
}

/* Category cards (root) */
.cat-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 4px;
}
.cat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 10px 10px;
    border: 1px solid #d0d4c0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    color: #222;
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.cat-card i {
    font-size: 1.15rem;
    color: #5a6a20;
    flex-shrink: 0;
}
.cat-card:hover {
    background: #f0f4d8;
    border-color: #c9d45a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Modal */
.cat-modal[hidden] { display: none !important; }
.cat-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.cat-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: none;
}
.cat-modal-box {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    max-height: min(78vh, 560px);
    display: flex;
    flex-direction: column;
    background: #f7f7f4;
    border-radius: 12px;
    border: 1px solid #2a2a32;
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
    overflow: hidden;
}
.cat-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    background: linear-gradient(180deg, #d8e070 0%, #c5d055 100%);
    border-bottom: 1px solid #a8b340;
}
.cat-modal-head-left {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.cat-modal-head-left .ph {
    font-size: 1.4rem;
    color: #2a2a2a;
    margin-top: 2px;
}
.cat-modal-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
}
.cat-modal-sub {
    font-size: 0.68rem;
    color: #444;
    margin-top: 2px;
}
.cat-modal-x {
    border: none;
    background: rgba(0,0,0,0.1);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.cat-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
}
.cat-modal-foot {
    padding: 10px 12px;
    border-top: 1px solid #ddd;
    background: #eee;
}
.cat-modal-back {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
}
.cat-modal-back:hover { background: #f5f5f5; }

/* ===== Notes (Нотатки) ===== */
.notes-box { width: min(520px, 100%); max-height: min(80vh, 640px); }
.notes-body { display: flex; flex-direction: column; gap: 10px; }
.notes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.notes-count {
    font-size: 0.68rem;
    color: #777;
}
.notes-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #2a2a32;
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: #1a1a1a;
    transition: background .15s ease, transform .05s ease;
}
.notes-btn:hover { background: #f0f0ea; }
.notes-btn:active { transform: translateY(1px); }
.notes-btn-primary {
    background: linear-gradient(180deg, #d8e070 0%, #c5d055 100%);
    border-color: #a8b340;
}
.notes-btn-primary:hover { filter: brightness(1.03); }
.notes-btn .ph { font-size: 0.9rem; }
.notes-btn-icon {
    padding: 0.4rem 0.5rem;
    line-height: 1;
}
.notes-btn-icon.is-active { background: #d8e070; }

.notes-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.notes-search-wrap .ph {
    position: absolute;
    left: 9px;
    font-size: 0.85rem;
    color: #999;
    pointer-events: none;
}
.notes-search {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.45rem 0.6rem 0.45rem 1.9rem;
    font-family: inherit;
    font-size: 0.75rem;
    background: #fff;
    color: #1a1a1a;
}
.notes-search:focus {
    outline: none;
    border-color: #a8b340;
    box-shadow: 0 0 0 2px rgba(168,179,64,0.25);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 46vh;
    padding-right: 2px;
}
.notes-empty {
    text-align: center;
    color: #888;
    font-size: 0.74rem;
    padding: 24px 8px;
    border: 1px dashed #cfcfc4;
    border-radius: 8px;
    background: #fbfbf7;
}
.note-card {
    border: 1px solid #ddd;
    border-left: 4px solid #c5d055;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}
.note-card.is-editing { border-left-color: #2a2a32; }
.note-title {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a1a1a;
    padding: 0;
    margin-bottom: 4px;
}
.note-title:focus { outline: none; }
.note-title::placeholder { color: #b3b3ad; font-weight: 600; }
.note-text {
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #333;
    resize: none;
    padding: 0;
    overflow: hidden;
}
.note-text:focus { outline: none; }
.note-text::placeholder { color: #b3b3ad; }
.note-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0ea;
}
.note-date {
    font-size: 0.64rem;
    color: #999;
}
.note-actions { display: flex; gap: 6px; }
.note-save {
    background: #2a2a32;
    border-color: #2a2a32;
    color: #f7f7f4;
}
.note-save:hover { background: #3a3a44; }
.note-del:hover { background: #fdecec; color: #c0392b; border-color: #e6b0aa; }

/* ===== Notes: палітра кольору нотатки ===== */
.note-color-picker { display: inline-flex; gap: 3px; align-items: center; flex-wrap: wrap; max-width: 120px; }
.note-color-swatch {
    width: 16px; height: 16px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2); cursor: pointer; padding: 0;
    transition: transform .1s ease, box-shadow .1s ease;
}
.note-color-swatch:hover { transform: scale(1.15); }
.note-color-swatch.is-active {
    box-shadow: 0 0 0 2px #2a2a32, 0 0 0 3px #fff inset;
    transform: scale(1.1);
}
.notes-btn-icon.is-active { background: #d8e070; border-color: #a8b340; }

/* ===== Notes: інструменти (сортування, експорт/імпорт) ===== */
.notes-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.notes-select {
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    max-width: 170px;
}
.notes-select:focus {
    outline: none;
    border-color: #a8b340;
    box-shadow: 0 0 0 2px rgba(168,179,64,0.25);
}

/* ===== Notes: чекліст ===== */
.note-checklist { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.note-check-row { display: flex; align-items: center; gap: 7px; }
.note-check-row input[type="checkbox"] {
    width: 15px; height: 15px; accent-color: #7a8c1e; cursor: pointer; flex-shrink: 0;
}
.note-check-row input[type="text"] {
    flex: 1; border: none; background: transparent; font-family: inherit;
    font-size: 0.74rem; color: #333; padding: 2px 0;
}
.note-check-row input[type="text"]:focus { outline: none; border-bottom: 1px solid #c5d055; }
.note-check-row.is-done input[type="text"] { text-decoration: line-through; color: #aaa; }
.note-check-del {
    border: none; background: transparent; color: #bbb; cursor: pointer;
    font-size: 0.8rem; padding: 0 2px; line-height: 1;
}
.note-check-del:hover { color: #c0392b; }
.notes-check-progress {
    font-size: 0.64rem; color: #888; margin-top: 2px;
}

/* ===== Notes: вкладення ===== */
.note-files { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.note-file-row {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid #e6e6df; border-radius: 6px; background: #fbfbf7;
    padding: 5px 7px; font-size: 0.7rem;
}
.note-file-thumb {
    width: 34px; height: 34px; object-fit: cover; border-radius: 4px; flex-shrink: 0;
    border: 1px solid #ddd; cursor: pointer;
}
.note-file-ico {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border-radius: 4px; background: #eef0d8; color: #5a6415; font-size: 1rem; flex-shrink: 0;
}
.note-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; font-weight: 600; }
.note-file-size { color: #999; font-size: 0.62rem; flex-shrink: 0; }
.note-file-open, .note-file-del {
    border: none; background: transparent; cursor: pointer; font-size: 0.85rem;
    padding: 2px 4px; border-radius: 4px; line-height: 1; flex-shrink: 0;
}
.note-file-open { color: #5a6415; }
.note-file-open:hover { background: #eef0d8; }
.note-file-del { color: #bbb; }
.note-file-del:hover { color: #c0392b; background: #fdecec; }

/* ===== Notes: переглядач вкладень ===== */
.notes-viewer-box { width: min(680px, 100%); max-height: min(88vh, 760px); }
.notes-viewer-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 200px; max-height: 60vh; overflow: auto; background: #f4f4ef;
    border: 1px solid #e6e6df; border-radius: 8px; padding: 10px;
}
.notes-viewer-body img { max-width: 100%; max-height: 56vh; border-radius: 6px; }
.notes-viewer-body iframe { width: 100%; height: 56vh; border: none; border-radius: 6px; background: #fff; }
.notes-viewer-body pre {
    width: 100%; max-height: 56vh; overflow: auto; background: #1e1e24; color: #e8e8e8;
    border-radius: 6px; padding: 12px; font-size: 0.72rem; line-height: 1.5; margin: 0;
    white-space: pre-wrap; word-break: break-word;
}
.notes-viewer-body audio, .notes-viewer-body video { width: 100%; }
.notes-viewer-msg { color: #888; font-size: 0.76rem; text-align: center; }
.notes-viewer-foot { display: flex; justify-content: flex-end; padding: 10px 14px 14px; }

/* ===== Notes: редактор текстових/doc вкладень ===== */
.notes-editor-area {
    width: 100%; min-height: 46vh; max-height: 56vh; resize: vertical;
    border: 1px solid #d6d6cc; border-radius: 6px; padding: 10px 12px;
    font-family: 'Consolas', 'SFMono-Regular', 'Menlo', monospace;
    font-size: 0.76rem; line-height: 1.5; color: #1e1e24; background: #fff;
    white-space: pre-wrap; word-break: break-word;
}
.notes-editor-area:focus { outline: none; border-color: #a8b340; box-shadow: 0 0 0 2px rgba(168,179,64,0.25); }
.notes-editor-bar { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

@media (max-width: 768px) {
    .notes-toolbar-actions { flex-wrap: wrap; }
    .notes-select { max-width: 140px; }
}

@media (max-width: 768px) {
    .notes-box { max-height: 85vh; }
    .notes-list { max-height: 40vh; }
}

.sub-branch { margin-bottom: 4px; }
.sub-branch-head {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    text-align: left;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: #222;
    cursor: pointer;
}
.sub-branch-head:hover { background: #f0f4d8; border-color: #c9d45a; }
.sub-branch-head.is-open { background: #e8ecd0; border-color: #b0bc40; }
.sub-arrow { width: 14px; font-size: 11px; color: #555; flex-shrink: 0; }
.sub-arrow-sp { width: 14px; flex-shrink: 0; }
.sub-branch-head .ph { font-size: 1rem; color: #5a6a20; }
.sub-branch-kids {
    padding: 4px 0 6px 22px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.sub-leaf {
    text-align: left;
    border: none;
    background: transparent;
    border-radius: 5px;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 0.72rem;
    color: #333;
    cursor: pointer;
}
.sub-leaf:hover {
    background: rgba(139, 94, 60, 0.12);
    color: #5a3a20;
}

.tree-selected {
    margin: 8px 4px;
    padding: 12px;
    background: #fff;
    border: 1.5px solid #8B5E3C;
    border-radius: 8px;
    font-size: 0.72rem;
    line-height: 1.4;
}
.tree-selected-hint {
    display: block;
    margin-top: 6px;
    color: #777;
    font-size: 0.65rem;
}
.tree-recommendation {
    margin-top: 10px;
    padding: 10px;
    background: #f0f8e8;
    border: 1px solid #b8c44a;
    border-radius: 6px;
    font-size: 0.7rem;
    line-height: 1.35;
    color: #2a3a10;
}
.tree-recommendation strong {
    display: block;
    margin-bottom: 4px;
    color: #1a2a00;
}
.tree-form-group {
    margin-top: 12px;
}
.tree-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #333;
}
.tree-form-label .required {
    color: #c62828;
}
.tree-form-input,
.tree-form-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c8ccb8;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.72rem;
    color: #222;
    background: #fff;
    box-sizing: border-box;
    resize: vertical;
}
.tree-form-input:focus,
.tree-form-textarea:focus {
    outline: none;
    border-color: #b8c44a;
    box-shadow: 0 0 0 2px rgba(201, 212, 90, 0.35);
}
.tree-form-textarea {
    min-height: 80px;
}
.tree-done-btn, .tree-again-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 0.45rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}
.tree-done-btn {
    border: none;
    background: #8B5E3C;
    color: #fff;
}
.tree-done-btn:hover { background: #7a5234; }
.tree-again-btn {
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
}
.tree-again-btn:hover { background: #f5f5f5; }

@media (max-width: 768px) {
    .resize-handle { display: none; }
    .cat-modal-box { max-height: 85vh; }
    .tree-form-input,
    .tree-form-textarea {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
    .tree-recommendation {
        font-size: 0.75rem;
    }
}

/* ========== FIX: Інструменти / класифікації (гарантовані стилі) ========== */
#panelRight.panel-body-tools,
.panel-body.panel-body-tools {
    display: block !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #f3f3ef !important;
    padding: 10px 8px 14px !important;
    height: 100%;
    box-sizing: border-box;
}

#panelRight .tools-placeholder,
.panel-body-tools .tools-placeholder {
    display: block;
    margin: 16px 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #777;
    text-align: center;
}

#panelRight .tree-hint,
.panel-body-tools .tree-hint {
    display: block;
    margin: 0 0 10px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 1.4;
    color: #555;
}

#panelRight .cat-grid,
.panel-body-tools .cat-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100%;
    padding: 0;
    margin: 0;
}

#panelRight .cat-card,
.panel-body-tools .cat-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0;
    padding: 11px 12px !important;
    border: 1px solid #c8ccb8 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1e1e1e !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-align: left !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

#panelRight .cat-card:hover,
.panel-body-tools .cat-card:hover {
    background: #eef3d4 !important;
    border-color: #b8c44a !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#panelRight .cat-card .ph,
.panel-body-tools .cat-card .ph {
    display: inline-block !important;
    font-size: 18px !important;
    color: #4a5a18 !important;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

#panelRight .cat-card span,
.panel-body-tools .cat-card span {
    flex: 1;
    color: #1e1e1e !important;
}

#panelRight .tree-selected,
.panel-body-tools .tree-selected {
    display: block;
    margin: 8px 0;
    padding: 12px;
    background: #fff;
    border: 1.5px solid #8B5E3C;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.45;
    color: #222;
}
#panelRight .tree-recommendation,
.panel-body-tools .tree-recommendation {
    margin-top: 10px;
    padding: 10px;
    background: #f0f8e8;
    border: 1px solid #b8c44a;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.35;
    color: #2a3a10;
}
#panelRight .tree-recommendation strong,
.panel-body-tools .tree-recommendation strong {
    display: block;
    margin-bottom: 4px;
    color: #1a2a00;
}
#panelRight .tree-form-group,
.panel-body-tools .tree-form-group {
    margin-top: 12px;
}
#panelRight .tree-form-label,
.panel-body-tools .tree-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
}
#panelRight .tree-form-label .required,
.panel-body-tools .tree-form-label .required {
    color: #c62828;
}
#panelRight .tree-form-input,
#panelRight .tree-form-textarea,
.panel-body-tools .tree-form-input,
.panel-body-tools .tree-form-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c8ccb8;
    border-radius: 6px;
    font-family: inherit;
    font-size: 11px;
    color: #222;
    background: #fff;
    box-sizing: border-box;
    resize: vertical;
}
#panelRight .tree-form-input:focus,
#panelRight .tree-form-textarea:focus,
.panel-body-tools .tree-form-input:focus,
.panel-body-tools .tree-form-textarea:focus {
    outline: none;
    border-color: #b8c44a;
    box-shadow: 0 0 0 2px rgba(201, 212, 90, 0.35);
}
#panelRight .tree-form-textarea,
.panel-body-tools .tree-form-textarea {
    min-height: 80px;
}

#panelRight .tree-done-btn,
#panelRight .tree-again-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

#panelRight .tree-done-btn {
    border: none;
    background: #8B5E3C;
    color: #fff;
}

#panelRight .tree-again-btn {
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
}

/* Модалка — якщо іконки не підвантажились, текст все одно читабельний */
.cat-modal-box .sub-branch-head {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px !important;
    margin-bottom: 4px;
    border: 1px solid #d0d0d0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #222 !important;
    cursor: pointer;
}

.cat-modal-box .sub-leaf {
    display: block !important;
    width: 100%;
    text-align: left;
    padding: 8px 10px !important;
    margin: 2px 0;
    border: none !important;
    border-radius: 6px;
    background: transparent;
    font-size: 12px !important;
    color: #333 !important;
    cursor: pointer;
}

.cat-modal-box .sub-leaf:hover {
    background: #f0e8e0 !important;
}

/* Path line (шлях категорії) */
.cat-modal-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: #eef1dc;
    border-bottom: 1px solid #d0d8a0;
    font-size: 11px;
    line-height: 1.35;
    min-height: 28px;
}
.path-seg {
    color: #555;
    font-weight: 500;
}
.path-seg.is-current {
    color: #1a1a1a;
    font-weight: 700;
    background: #fff;
    border: 1px solid #c9d45a;
    border-radius: 4px;
    padding: 1px 6px;
}
.path-sep {
    color: #999;
    margin: 0 2px;
    font-weight: 400;
}

.tree-path-visual {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 8px 0 6px;
    padding: 8px;
    background: #eef1dc;
    border-radius: 6px;
    border: 1px solid #d0d8a0;
    font-size: 11px;
    line-height: 1.4;
}

/* Draggable modal */
.cat-modal-head {
    cursor: grab;
    user-select: none;
}
.cat-modal-head:active {
    cursor: grabbing;
}
.cat-modal-box.is-dragged {
    position: fixed;
    margin: 0;
    max-height: min(78vh, 560px);
}

/* Backdrop не блокує карту жорстко — кліки по фону закривають */
.cat-modal-backdrop {
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: none !important;
}

/* Пошук у категоріях */
.cat-search-wrap {
    position: relative;
    margin: 0 0 10px;
    padding: 0 2px;
}
.cat-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #777;
    pointer-events: none;
}
.cat-search {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px 9px 32px;
    border: 1px solid #c8ccb8;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    color: #222;
    outline: none;
}
.cat-search:focus {
    border-color: #b8c44a;
    box-shadow: 0 0 0 2px rgba(201, 212, 90, 0.35);
}
.cat-search-wrap-modal {
    margin-bottom: 12px;
}
.cat-card-hit {
    align-items: flex-start !important;
}
.cat-card-hit small.hit-path,
.hit-path {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 400;
    color: #777;
    line-height: 1.3;
}
.cat-card-hit strong {
    font-weight: 600;
}

.mk-route-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mk-route-card {
  text-align: left !important;
  padding-left: 10px !important;
}

/* ===== FIX: Mapbox контейнер (без цього — білий екран) ===== */
.panel-body#panelLeft,
#panelLeft.panel-body {
  position: relative !important;
  overflow: hidden !important;
  min-height: 0 !important;
  background: #1a1a1e !important;
}

#mainMap,
.main-map-canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 200px !important;
  z-index: 1 !important;
  background: #1a1a1e !important;
}

#mainMap .mapboxgl-map,
#mainMap .mapboxgl-canvas-container,
#mainMap .mapboxgl-canvas {
  width: 100% !important;
  height: 100% !important;
}

.mapboxgl-ctrl-attrib {
  font-size: 10px !important;
}
.mapboxgl-ctrl-group {
  border-radius: 6px !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25) !important;
}

/* не застосовуємо filter до WebGL — ламає рендер */
#panelLeft {
  filter: none !important;
}

/* =========================================================
   ІНСТРУМЕНТИ: Ізохрони + Мітки — повний дизайн панелі
   ========================================================= */

#panelRight.panel-body-tools,
.panel-body.panel-body-tools,
.iso-panel,
.mk-panel {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: #f4f5ef !important;
  padding: 10px 10px 16px !important;
  color: #1a1a1a !important;
}

.iso-root,
.mk-root {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
}

.iso-section {
  background: #ffffff;
  border: 1px solid #d5d9c8;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.iso-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a6e5a;
  margin-bottom: 8px;
}

.iso-hint-sm,
.tree-hint {
  font-size: 11px;
  line-height: 1.45;
  color: #555;
  margin: 0 0 4px;
}

.iso-status-line {
  font-size: 11px;
  color: #555;
  margin-top: 6px;
}
.iso-status-line strong {
  color: #1a1a1a;
}

/* Buttons */
.iso-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.iso-actions-tight {
  gap: 6px;
}

.iso-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.iso-btn:hover {
  background: #eef3d4;
  border-color: #b8c44a;
}
.iso-btn:active {
  transform: translateY(1px);
}
.iso-btn-primary {
  background: #c5d055;
  border-color: #a8b83a;
  color: #1a1a1a;
}
.iso-btn-primary:hover {
  background: #d0db66;
  border-color: #9aaa30;
}
.iso-btn-ghost {
  background: transparent;
  border-style: dashed;
}
.iso-btn.is-active-pick {
  background: #e8ecd0;
  border-color: #8B5E3C;
  box-shadow: 0 0 0 1px rgba(139,94,60,0.2);
}

/* Modes */
.iso-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.iso-mode-btn {
  flex: 1;
  min-width: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.iso-mode-btn:hover {
  background: #eef3d4;
}
.iso-mode-btn.is-active {
  background: #c5d055;
  border-color: #a8b83a;
  color: #1a1a1a;
}

/* Chips / checks */
.iso-times {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.iso-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid #c8ccb8;
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.iso-chip:has(input:checked),
.iso-chip input:checked + span {
  background: #e8ecd0;
}
.iso-chip input {
  accent-color: #8B5E3C;
}

.iso-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.iso-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.iso-check input {
  accent-color: #8B5E3C;
}

/* Inputs */
.iso-input,
.iso-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  color: #222;
  background: #fff;
}
.iso-input:focus,
.iso-search-input:focus {
  outline: none;
  border-color: #b8c44a;
  box-shadow: 0 0 0 2px rgba(197,208,85,0.35);
}

.iso-coords-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 6px 0;
}

.iso-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.iso-search-ico {
  position: absolute;
  left: 10px;
  color: #888;
  font-size: 14px;
  pointer-events: none;
}
.iso-search-input {
  padding-left: 30px;
}
.iso-search-results {
  margin-top: 4px;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  background: #fff;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.iso-search-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid #eee;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  color: #222;
  cursor: pointer;
}
.iso-search-item:last-child {
  border-bottom: none;
}
.iso-search-item:hover {
  background: #eef3d4;
}
.iso-search-item strong {
  display: block;
  font-size: 12px;
}
.iso-search-item span {
  display: block;
  font-size: 10px;
  color: #777;
  margin-top: 2px;
}
.iso-search-loading,
.iso-search-empty {
  padding: 10px;
  color: #888;
  font-size: 11px;
  text-align: center;
}

/* Range */
.iso-opacity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.iso-op-lbl {
  font-size: 11px;
  color: #666;
  min-width: 48px;
}
.iso-op-val {
  font-size: 11px;
  font-weight: 600;
  color: #333;
  min-width: 36px;
}
.iso-range {
  flex: 1;
  accent-color: #8B5E3C;
}

/* Stats / legend */
.iso-stats,
.mk-route-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.iso-stat-card {
  background: #f7f8f2;
  border: 1px solid #d5d9c8;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.iso-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}
.iso-stat-lbl {
  font-size: 10px;
  color: #777;
  margin-top: 2px;
}
.mk-route-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mk-route-card {
  text-align: left !important;
  padding-left: 10px !important;
}

.iso-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.iso-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #444;
}
.iso-leg-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.15);
}

.iso-loading {
  font-size: 12px;
  color: #666;
  padding: 8px;
  text-align: center;
}

/* ===== Мітки ===== */
.mk-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 170px;
  overflow-y: auto;
  padding: 2px;
}
.mk-list-empty {
  font-size: 11px;
  color: #888;
  padding: 12px 8px;
  text-align: center;
  background: #f7f8f2;
  border-radius: 8px;
  border: 1px dashed #c8ccb8;
}
.mk-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid #c8ccb8;
  border-radius: 9px;
  background: #fff;
  padding: 9px 11px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.mk-list-item:hover {
  background: #eef3d4;
  border-color: #b8c44a;
}
.mk-list-item.is-selected {
  background: #e8ecd0;
  border-color: #8B5E3C;
  box-shadow: 0 0 0 1px rgba(139,94,60,0.22);
}
.mk-list-dot {
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.18);
  flex-shrink: 0;
}
.mk-list-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mk-list-body strong {
  font-size: 12px;
  color: #1a1a1a;
}
.mk-list-body small {
  font-size: 10px;
  color: #777;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.mk-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.22);
  transition: transform 0.1s, box-shadow 0.1s;
}
.mk-swatch:hover {
  transform: scale(1.12);
}
.mk-swatch.is-active {
  box-shadow: 0 0 0 2px #8B5E3C, 0 1px 4px rgba(0,0,0,0.25);
}

.mk-note {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  color: #222;
  background: #fff;
  resize: vertical;
  min-height: 68px;
  line-height: 1.4;
}
.mk-note:focus {
  outline: none;
  border-color: #b8c44a;
  box-shadow: 0 0 0 2px rgba(197,208,85,0.35);
}

.mk-route-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mk-route-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #333;
}
.mk-select {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  background: #fff;
  color: #222;
}
.mk-select:focus {
  outline: none;
  border-color: #b8c44a;
  box-shadow: 0 0 0 2px rgba(197,208,85,0.3);
}

/* Маркер на карті */
.gc-marker-dot {
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.gc-marker-dot:hover {
  transform: scale(1.12);
  z-index: 10;
}
.gc-mk-popup {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  color: #222;
}
.gc-mk-popup-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 4px;
}
.gc-mk-popup-note {
  margin-bottom: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}
.gc-mk-popup-coords {
  font-size: 10px;
  color: #888;
  font-variant-numeric: tabular-nums;
}

/* Origin marker isochrone */
.iso-origin-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e74c3c;
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.45);
}

/* ===== Калькулятор ===== */
.calc-display {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #c8ccb8;
  border-radius: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 18px;
  font-weight: 600;
  text-align: right;
  color: #1a1a1a;
  background: #f7f8f2;
  letter-spacing: 0.02em;
}
.calc-result {
  min-height: 20px;
  margin-top: 6px;
  font-size: 13px;
  text-align: right;
  color: #555;
  font-weight: 600;
}
.calc-result.is-ok { color: #2d6a2d; }
.calc-result.is-err { color: #a02020; }

.calc-pad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.calc-key {
  padding: 12px 0;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #222;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.calc-key:hover {
  background: #eef3d4;
  border-color: #b8c44a;
}
.calc-key:active {
  transform: translateY(1px);
}
.calc-key-op {
  background: #eef3d4;
  color: #4a4e30;
}

.calc-measure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.calc-muted {
  font-weight: 500;
  color: #888;
  font-size: 11px;
}
.calc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.calc-history {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
}
.calc-hist-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #d5d9c8;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  color: #444;
}
.calc-hist-item:hover {
  background: #eef3d4;
  border-color: #b8c44a;
}
.calc-hist-item strong {
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}
.gc-calc-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, system-ui, sans-serif;
}

/* ===== Дороги ===== */
.rd-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rd-color-input {
  width: 42px;
  height: 32px;
  padding: 0;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.rd-color-input::-webkit-color-swatch-wrapper {
  padding: 2px;
}
.rd-color-input::-webkit-color-swatch {
  border-radius: 5px;
  border: none;
}
.gc-road-vertex {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c5d055;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.tree-form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
}
.iso-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


/* ===== Кнопка повного екрану карти ===== */
.map-fs-btn {
  position: absolute;
  top: auto;
  bottom: 42px;
  right: 10px;
  z-index: 20;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #1a1a1a;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  padding: 0;
}
.map-fs-btn:hover {
  background: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,0.35);
  transform: scale(1.05);
}
.map-fs-btn:active {
  transform: scale(0.96);
}
.map-fs-btn.is-active {
  background: #c5d055;
  color: #1a1a1a;
}

/* Режим: карта на весь інтерфейс */
body.map-panel-expanded .topbar {
  display: none !important;
}
body.map-panel-expanded .statusbar {
  display: none !important;
}
body.map-panel-expanded .workspace {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  height: 100vh !important;
  width: 100vw !important;
}
body.map-panel-expanded .panels {
  height: 100% !important;
}
body.map-panel-expanded #panelCol1,
body.map-panel-expanded #panelCol2,
body.map-panel-expanded .resize-handle {
  display: none !important;
}
body.map-panel-expanded #panelCol0 {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  border-radius: 0 !important;
}
body.map-panel-expanded #panelCol0 .panel-header {
  display: none !important;
}
body.map-panel-expanded #panelLeft {
  height: 100% !important;
  border-radius: 0 !important;
}
body.map-panel-expanded .map-fs-btn {
  top: auto;
  bottom: 42px;
  right: 14px;
  z-index: 9100;
}

/* ===== Trace pins ===== */
.gc-trace-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #111;
  font-family: Inter, system-ui, sans-serif;
}
.gc-trace-pin-ip {
  background: #3498db;
  color: #fff;
  font-size: 14px;
}
.gc-trace-pin-hop {
  background: #c5d055;
}
.trace-result-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* ===== Профіль висот ===== */
.elev-chart {
  width: 100%;
  height: 140px;
  display: block;
  border-radius: 8px;
  border: 1px solid #d5d9c8;
  background: #f7f8f2;
}

/* ===== Конструктор проблем ===== */
.pc-tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pc-tpl {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px;
  border: 1px solid #c8ccb8;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
}
.pc-tpl:hover {
  background: #eef3d4;
  border-color: #b8c44a;
}
.pc-tpl.is-active {
  background: #e8ecd0;
  border-color: #8B5E3C;
  box-shadow: 0 0 0 1px rgba(139,94,60,0.2);
}
.pc-tpl .ph {
  font-size: 14px;
  flex-shrink: 0;
}
.pc-tpl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gc-problem-pin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  cursor: grab;
}
.gc-problem-pin:active {
  cursor: grabbing;
}


/* ===== Search widget icon ===== */
#searchWidget {
  min-width: 28px;
  justify-content: center;
  padding: 0.22rem 0.4rem;
}
#searchWidget .ph {
  font-size: 0.95rem;
}
#searchWidget.is-open,
#searchWidget:hover {
  background: rgba(255,255,255,0.55);
}

/* ===== Spotlight global search (macOS-style) ===== */
.gc-spotlight {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9500 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none;
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  box-shadow: none !important;
}
.gc-spotlight:not([hidden]) {
  pointer-events: none !important;
  display: flex !important;
  background: transparent !important;
}
.gc-spotlight[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.gc-spotlight-backdrop {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  background: transparent !important;
  pointer-events: none !important;
}
.gc-spotlight-panel {
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 32px));
  /* повністю непрозора панель, без «затемненого» фону під нею */
  background: #f8f9f6 !important;
  border: 1px solid rgba(40, 40, 48, 0.28);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  animation: gcSpotIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
@keyframes gcSpotIn {
  from { opacity: 0; transform: scale(0.94) translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.gc-spotlight-panel.is-dragged {
  animation: none;
}
.gc-spotlight-drag {
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  background: linear-gradient(180deg, #e8ecc8 0%, #dce3b0 100%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  user-select: none;
}
.gc-spotlight-drag:active {
  cursor: grabbing;
}
.gc-spotlight-drag-grip {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: rgba(0,0,0,0.18);
}
.gc-spotlight-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}
.gc-spotlight-ico {
  font-size: 1.25rem;
  color: #666;
  flex-shrink: 0;
}
.gc-spotlight-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}
.gc-spotlight-input::placeholder {
  color: #9a9a94;
  font-weight: 400;
}
.gc-spotlight-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(0,0,0,0.06);
  color: #555;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.gc-spotlight-close:hover {
  background: rgba(0,0,0,0.12);
  color: #111;
}
.gc-spotlight-hint {
  padding: 0 16px 8px;
  font-size: 0.68rem;
  color: #888;
  letter-spacing: 0.01em;
}
.gc-spotlight-results {
  max-height: min(380px, 48vh);
  overflow-y: auto;
  padding: 4px 8px 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.gc-spot-section {
  padding: 8px 8px 4px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a8a82;
}
.gc-spot-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  color: #1a1a1a;
  transition: background 0.1s;
}
.gc-spot-item:hover,
.gc-spot-item.is-active {
  background: rgba(197, 208, 85, 0.35);
}
.gc-spot-item-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eef1d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #3a3a30;
  flex-shrink: 0;
}
.gc-spot-item-ico.is-place {
  background: #dce8f8;
  color: #1a4a7a;
}
.gc-spot-item-ico.is-tool {
  background: #e8ecd0;
  color: #4a5520;
}
.gc-spot-item-ico.is-problem {
  background: #f5e0d0;
  color: #6a3a20;
}
.gc-spot-item-body {
  flex: 1;
  min-width: 0;
}
.gc-spot-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gc-spot-item-sub {
  font-size: 0.7rem;
  color: #6a6a66;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gc-spot-item-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7a7a70;
  background: rgba(0,0,0,0.05);
  padding: 3px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}
.gc-spot-empty {
  padding: 28px 16px;
  text-align: center;
  color: #888;
  font-size: 0.85rem;
}
.gc-spot-loading {
  padding: 16px;
  text-align: center;
  color: #888;
  font-size: 0.8rem;
}



/* ===== Гарантія: без CSS-фільтрів на карті ===== */
#panelLeft,
#panelLeft *,
#mainMap,
#mainMap *,
.main-map-canvas,
.mapboxgl-map,
.mapboxgl-canvas-container,
.mapboxgl-canvas,
.panel-body#panelLeft {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
}


/* ===== KILL GRAY MAP OVERLAY ===== */
#panelLeft, #mainMap, #mainMap canvas, .mapboxgl-canvas, .mapboxgl-map {
  filter: none !important;
  -webkit-filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
}
#mainMap::before, #mainMap::after, #panelLeft::before, #panelLeft::after {
  content: none !important;
  display: none !important;
}


/* ===== Повідомити про помилку (Formspree) ===== */
.bug-modal-box {
  width: min(440px, calc(100vw - 28px)) !important;
  max-height: min(90vh, 640px);
}
.bug-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 16px !important;
}
.bug-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #333;
  margin-top: 6px;
}
.bug-opt {
  font-weight: 400;
  color: #999;
}
.bug-input,
.bug-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(40,40,48,0.18);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.82rem;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.15s;
}
.bug-input:focus,
.bug-textarea:focus {
  border-color: #a8b84a;
  box-shadow: 0 0 0 2px rgba(197,208,85,0.25);
}
.bug-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.45;
}
.bug-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}
.bug-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.bug-status {
  font-size: 0.78rem;
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 8px;
}
.bug-status.is-ok {
  background: rgba(80,160,80,0.12);
  color: #2a6b2a;
  border: 1px solid rgba(80,160,80,0.28);
}
.bug-status.is-err {
  background: rgba(180,60,60,0.1);
  color: #8b2020;
  border: 1px solid rgba(180,60,60,0.25);
}
.bug-status.is-wait {
  background: rgba(197,208,85,0.15);
  color: #555;
  border: 1px solid rgba(197,208,85,0.35);
}
