/* style.css */
/* ===== ПАЛИТРА ===== */
:root {
    --bg-panel: #16130F;
    --bg-light: #fbe9c8;
        --bg-section: #282c26;
    --btn-bg: #211F1D;
    --green: #33402D;
    --danger: #5A2A10;
    --gold: #7d5c28;
    --red: #C62828;
    --offline-red: #F44336;
    --online-green: #4CAF50;
    --text-bright: #eed8b3;
        --text-dim: #b89e85;
    --text-mud: #5A4A3A;
    --text-dark: #3A2A1A;
}

@font-face {
    font-family: 'My Share Tech Mono';
    src: url('/fonts/ShareTechMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg-panel); height: 100vh; display: flex; flex-direction: column;
    font-family: 'Courier New', monospace; font-size: 14px; color: var(--text-dim);
}
body::before { content: ''; position: fixed; inset: 0; background: #000; opacity: 0.35; pointer-events: none; z-index: -1; }

#main-container { display: flex; flex: 1; overflow: hidden; }

#panel-frame { display: contents; }
#bomb-list { margin-top: 6px; margin-bottom: 0px; }

#panel {
    width: 390px; max-width: 100vw; padding: 16px; background: var(--bg-panel); border-right: 3px solid color-mix(in srgb, var(--danger) 60%, #000);
    overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; position: relative;
    box-shadow: inset 0 0 30px rgba(60,40,20,0.3), 0 4px 20px rgba(0,0,0,0.6); scrollbar-width: none;
    box-sizing: border-box;
}
#panel::-webkit-scrollbar { display: none; }
#panel h2 { font-size: 16px; color: var(--text-bright); font-weight: 700; letter-spacing: 3px; text-transform: uppercase; text-align: center; padding-bottom: 8px; border-bottom: 1px solid color-mix(in srgb, var(--text-dark) 60%, #000); margin: 0 0 4px 0; display: flex; align-items: baseline; justify-content: center; }
#panel h2 .h2-domain { font-size: 12px; letter-spacing: 1px; font-weight: 400; opacity: 0.8; margin-left: 10px; }

#panel-overlay { position: fixed; top: 0; left: 0; width: 390px; max-width: 100vw; bottom: 0; background: rgba(10,8,6,0.7); z-index: 100; display: none; pointer-events: auto; }
#panel-overlay.active { display: block; }

button { width: 100%; min-height: 36px; padding: 8px 14px; margin-top: 6px; background: var(--btn-bg); color: var(--text-dim); border: 1px solid color-mix(in srgb, var(--btn-bg) 70%, #fff); border-radius: 4px; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; outline: none; }
button:disabled { opacity: 0.25; cursor: not-allowed; }
.btn-accent-group { display: flex; gap: 6px; margin-top: 4px; }
.btn-accent-group button { flex: 1; margin-top: 0; min-height: 36px; padding: 8px 14px; letter-spacing: 2px; }
#add-bomb-btn, #run-btn, #pipette-btn { position: relative; justify-content: center; }
#add-bomb-btn .btn-icon, #run-btn .btn-icon, #pipette-btn .btn-icon { position: absolute; left: 12px; margin-right: 0; }
#pipette-btn { width: 240px; height: 28px; background: #5a2a10; color: var(--text-bright); border: 1px solid #69594a !important; }
#pipette-btn.active { background: #433a32; color: var(--text-bright); border-color: transparent; box-shadow: none; }
#pipette-btn:disabled,
#pipette-btn.accent:disabled { border: 1px solid #69594a; }

button.primary-btn { background: var(--green); border-color: color-mix(in srgb, var(--green) 60%, #fff); color: var(--text-bright); box-shadow: 0 0 16px rgba(100,180,100,0.15), inset 0 0 8px rgba(100,180,100,0.04); }
button.primary-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--green) 85%, #fff); border-color: color-mix(in srgb, var(--green) 45%, #fff); box-shadow: 0 0 28px rgba(100,180,100,0.3), inset 0 0 12px rgba(100,180,100,0.08); }
button.accent { background: var(--danger); border-color: color-mix(in srgb, var(--danger) 70%, #fff); color: var(--text-bright); box-shadow: 0 0 16px rgba(125,92,40,0.2), inset 0 0 8px rgba(125,92,40,0.05); }
button.accent:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 85%, #fff); border-color: var(--gold); box-shadow: 0 0 28px rgba(125,92,40,0.4), inset 0 0 12px rgba(125,92,40,0.1); }
.muted-accent { background: color-mix(in srgb, var(--danger) 50%, #000) !important; border-color: color-mix(in srgb, var(--danger) 40%, #000) !important; color: var(--text-dim) !important; box-shadow: none !important; }

.btn-icon { width: 18px; height: 18px; margin-right: 8px; flex-shrink: 0; color: inherit; fill: currentColor; }
.btn-icon-sm { width: 14px; height: 14px; display: block; color: inherit; fill: currentColor; }
.section-icon { width: 18px; height: 18px; margin-right: 6px; flex-shrink: 0; color: inherit; fill: currentColor; }
.inline-icon { width: 16px; height: 16px; margin-right: 6px; color: inherit; fill: currentColor; transition: color 0.2s; }
.arrow-icon { width: 10px; height: 10px; transition: transform 0.2s; color: inherit; fill: currentColor; }
.collapsible-header.open .arrow-icon { transform: rotate(90deg); }
.footer-icon { width: 18px; height: 18px; color: inherit; fill: currentColor; }
.help-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; background: #8b7a6a; color: #fff; font-size: 16px; font-weight: 700; flex-shrink: 0; line-height: 1; user-select: none; transition: all 0.2s; }
.help-icon:hover { background: #7d5c28; }

.comment-wrap {
    position: relative;
    display: none;
}
.comment-wrap.visible {
    display: block;
}
.comment-close-btn {
    position: absolute;
    top: -6px;
    right: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 5;
    touch-action: manipulation;
}
.comment-close-btn:hover { color: var(--red); }

@media (max-width: 600px) {
    .comment-close-btn {
        width: 44px;
        height: 44px;
        top: -10px;
        right: -6px;
        font-size: 20px;
    }
}

.timeline-forecast-label {
    position: absolute;
    top: -18px;
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    transform: translateX(-50%);
}

.panel-footer { margin-top: auto; padding: 20px 0 4px 0; text-align: center; font-size: 12px; color: #8B7A6A; line-height: 1.8; border-top: 1px solid color-mix(in srgb, var(--text-dark) 60%, #000); flex-shrink: 0; }
.footer-contact a { color: #8B7A6A; text-decoration: none; }
.footer-contact a:hover { color: #7d5c28; text-decoration: underline; }
.footer-copy { color: #5A4A3A; }
.footer-disclaimer { font-size: 10px; margin-top: 4px; color: #5A4A3A; }
.premium-footer-btn { width: 100%; padding: 8px 14px; margin: 0 0 12px 0; background: transparent; color: var(--text-bright); border: 1px solid var(--gold); border-radius: 4px; font-size: 14px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Courier New', monospace; }
.premium-footer-btn:hover { background: color-mix(in srgb, var(--gold) 30%, transparent); border-color: var(--text-bright); }
.premium-star { width: 16px; height: 16px; fill: #D4A017; flex-shrink: 0; }

.inline-param select {
    background: #eed8b3;
    color: #1a1a1a;
}

.inline-param label {
    color: #1a1a1a;
}

.radio-housing {
    border-radius: 5px;
    position: relative;
    display: inline-block;
}

.dim-zero {
    opacity: 0.4;
}

#save-meteo-hours {
    background: #eed8b3;
    color: #1a1a1a;
}

#clear-offline-btn {
    margin: 33px;
    width: calc(100% - 66px);
    font-size: 14px;
}

/* ===== РУЧКА РАМКИ ===== */
#panel-curtain-handle {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 14px;
    background: transparent;
    border-top: none;
    cursor: ns-resize;
    z-index: 300;
    pointer-events: auto;
    touch-action: none;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.curtain-arrow {
    display: block;
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 14px solid #d4a017;
}

/* ===== СВОРАЧИВАЕМЫЕ СЕКЦИИ ===== */
.collapsible-header { display: flex; align-items: center; gap: 8px; cursor: pointer; min-height: 36px; padding: 8px 16px; font-size: 14px; color: var(--text-bright); font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; user-select: none; }
.collapsible-body { display: none; }
.collapsible-body.open { display: block; }

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ (max-width: 600px) ===== */
@media (max-width: 600px) {
    #main-container {
        display: block;
        position: relative;
    }

    #map-wrap {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }

        #panel-frame {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 326px;
        overflow: visible;
        z-index: 100;
        border-bottom: 4px solid color-mix(in srgb, var(--danger) 60%, #000);
        box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    }

    #panel {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: 100%;
        padding: 10px 12px;
        gap: 6px;
        overflow-y: auto;
        overflow-x: hidden;
        border-right: none;
        box-shadow: none;
        border-bottom: none;
    }

    #panel h2 { display: none; }

    #panel-curtain-handle {
        display: flex;
        width: 44px;
        height: 44px;
        left: 50%;
        right: auto;
        bottom: -33px;
        margin-left: -22px;
        background: transparent;
        border-top: none;
        align-items: flex-start;
        justify-content: center;
        padding-top: 4px;
    }

    #time-controls {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
    }

    button {
        min-height: 44px;
        padding: 10px 14px;
    }
    .btn-accent-group button {
        min-height: 44px;
        padding: 10px 14px;
    }
    .collapsible-header {
        min-height: 44px;
        padding: 12px 16px;
    }
    .debug-toggle input[type="checkbox"],
    .debug-toggle input[type="radio"] {
        position: relative;
    }
    .debug-toggle input[type="checkbox"]::after,
    .debug-toggle input[type="radio"]::after {
        content: '';
        position: absolute;
        inset: -14px;
    }
}
/* style.css */