/* style-map.css */
@media (min-width: 601px) {
    #map-wrap { flex: 1; position: relative; }
}


#map { position: absolute; inset: 0; z-index: 1; }

#fallout-canvas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
#damage-canvas { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
#contour-canvas { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
#epicenter-canvas { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
#selection-box { position: absolute; border: 2px solid var(--gold); background: rgba(125,92,40,0.15); z-index: 10; display: none; pointer-events: none; }
#ruler-label { position: absolute; z-index: 11; background: rgba(10,8,6,0.95); color: var(--text-bright); padding: 3px 8px; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--danger) 60%, #000); font-size: 14px; font-weight: 700; display: none; }
#loading-indicator { position: absolute; inset: 0; z-index: 20; display: none; flex-direction: column; align-items: center; justify-content: center; background: rgba(22,19,15,0.7); pointer-events: none; }
#loading-indicator.active { display: flex; }
.loading-dots { font-size: 48px; letter-spacing: 8px; color: var(--gold); font-family: 'Courier New', monospace; line-height: 1; }
.loading-dots span { animation: blink 1.4s infinite; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }
.loading-text { font-size: 12px; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; margin-top: 12px; font-family: 'Courier New', monospace; }

#perf-overlay { position: absolute; bottom: 110px; right: 16px; z-index: 20; background: rgba(22,19,15,0.85); border: 1px solid color-mix(in srgb, var(--danger) 60%, #000); border-radius: 4px; padding: 8px 12px; opacity: 0; transition: opacity 0.8s ease; pointer-events: none; font-family: 'Courier New', monospace; font-size: 12px; width: 170px; }
#perf-overlay.visible { opacity: 1; }
.perf-row { display: flex; gap: 8px; color: var(--text-dim); padding: 1px 0; white-space: nowrap; }
.perf-row-total { font-weight: bold; color: var(--text-bright); }
.perf-label { width: 46px; flex-shrink: 0; }
.perf-value { text-align: left; flex: 1; }
.perf-row-status { margin-top: 4px; border-top: 1px solid rgba(139,122,106,0.3); padding-top: 4px; }
#perf-status-text { text-align: left; color: var(--text-bright); display: block; }

#time-controls { background: var(--bg-panel); border-top: 3px solid color-mix(in srgb, var(--danger) 60%, #000); display: flex; flex-direction: column; align-items: stretch; padding: 0 12px; z-index: 10; box-shadow: 0 -2px 12px rgba(0,0,0,0.4); flex-shrink: 0; position: relative; }

#time-spans {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height 0.15s ease, opacity 0.15s ease;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: var(--text-bright);
    white-space: nowrap;
    padding: 0 8px;
    transform: translateY(-100%);
    background: var(--bg-panel);
    pointer-events: none;
}
#time-spans.visible {
    height: 24px;
    opacity: 1;
    padding-top: 4px;
    pointer-events: auto;
}
.time-span-sep {
    color: var(--text-dim);
    opacity: 0.6;
}
#time-span-start {
    color: #fd6151;
}
#time-span-current {
    color: #d4a017;
}

#timeline-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}

#play-pause-btn {
    width: 30px;
    margin: 10px 10px 12px 0px;
    padding: 0;
    background: #593c21;
    color: var(--text-dim);
    border: 1px solid color-mix(in srgb, var(--text-dark) 50%, #000);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

#play-pause-btn .btn-icon {
    margin-right: 0;
    width: 20px;
    height: 20px;
}

#play-pause-btn:hover {
    background: color-mix(in srgb, #593c21 85%, #fff);
    border-color: var(--gold);
    color: var(--text-bright);
}

#timeline-wrapper { position: relative; flex: 1; height: 86px; padding-top: 8px; box-sizing: border-box; min-width: 0; }

#entry-scale {  position: absolute; top: 12px; left: 0; right: 0; height: 20px; z-index: 3;}

.entry-track { position: relative; height: 100%; margin: 0; border: 1px solid #3f3927; cursor: pointer; }
.entry-fill { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; background: rgb(146 18 4); z-index: 1; pointer-events: none; opacity: 0; }
.entry-handle {
    position: absolute;
    top: -1px;
    width: 20px;
    height: 20px;
    background: #921204;
    border: 1px solid #16130f;
    border-radius: 50%;
    cursor: ew-resize;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    margin-left: -2px;
}
.entry-handle::after { content: ''; position: absolute; inset: 0; }
#entry-scale.visible .entry-handle::after { inset: -12px; }

#entry-scale.visible .entry-fill,
#entry-scale.visible .entry-handle { opacity: 1; pointer-events: auto; }

.timeline-scale {
    position: absolute;
    top: 32px;
    left: 0;
    right: 0;
    height: 20px;
    border: 1px solid var(--gold);
    background: linear-gradient(90deg, #f7a859 0%, #593c21 3%, #593c21 5%, #302216 90%, #9a6734 100%);
    box-shadow: inset 0 0 12px rgba(80, 50, 20, 0.3);
    overflow: hidden;
}
.timeline-track { position: relative; height: 100%; margin: 0; }
.timeline-forecast-bg { position: absolute; top: 0; left: 0; bottom: 0; background: transparent; z-index: 0; }
.timeline-extend-bg { position: absolute; top: 0; right: 0; bottom: 0; background: #575554; z-index: 0; }
.timeline-ticks { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.timeline-tick { position: absolute; bottom: 0; width: 1px; background: #785e43; transform: translateX(-50%); }
.timeline-tick.major { height: 100%; background: #a58e75; }
.timeline-tick.minor { height: 50%; }
.timeline-tick-label { position: absolute; top: 0px; font-size: 14px; color: #bda781; transform: translateX(4px); white-space: pre; }
.timeline-tick-label.last { font-size: 16px; font-weight: 700; color: var(--text-bright); }

#bomb-scale {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    height: 20px;
    z-index: 3;
}
.bomb-track { position: relative; height: 100%; margin: 0; border: 1px solid #3f3927; cursor: pointer; }

#timeline-marks { position: absolute; top: 34px; left: 0; right: 0; height: 22px; z-index: 12; pointer-events: auto; }
.timeline-mark-wrapper {
    position: absolute;
    top: 20px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    z-index: 6;
    pointer-events: auto;
    touch-action: none;
}
.timeline-mark-wrapper::after { content: ''; position: absolute; inset: 0; }
.timeline-mark-triangle {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 17px solid currentColor;
    margin: 0 auto;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}
.timeline-mark-wrapper.selected .timeline-mark-triangle { border-bottom-color: currentColor; filter: drop-shadow(0 0 6px rgba(212,160,23,0.5)); }

.timeline-slider {
    position: absolute;
    top: 15px;
    bottom: 20px;
    width: 16px;
    cursor: ew-resize;
    z-index: 10;
    background: transparent;
    pointer-events: auto;
}
.timeline-slider::after { content: ''; position: absolute; inset: 0; }
.timeline-slider-dot {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #d4a017;
    border-radius: 50%;
    z-index: 2;
}
.timeline-slider-stem {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: #bf7500;
    box-shadow: 0 0 24px rgba(125, 92, 40, 0.35), inset 0 0 6px rgba(255, 200, 100, 0.2);
    pointer-events: none;
}

.pipette-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--danger);
    border: 2px solid var(--text-bright);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(125,92,40,0.6);
    z-index: 15;
    pointer-events: auto;
}
.pipette-marker:hover {
    background: var(--red);
    box-shadow: 0 0 12px rgba(198,40,40,0.8);
}

#fallout-modal-overlay { position: fixed; inset: 0; background: #ff970030; z-index: 2000; display: none; align-items: center; justify-content: center; }
.fallout-modal-dialog { background: #fffed4; background-image: linear-gradient(rgba(180,160,130,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(180,160,130,0.08) 1px, transparent 1px); background-size: 8px 8px; border-radius: 18px; max-width: 700px; width: 90%; overflow: hidden; border: 2px solid #8B7A6A; color: #3A2A1A; font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.8; box-shadow: 0 0 40px rgba(0,0,0,0.4); }
.fallout-modal-dialog > div:last-child { max-height: 70vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #8B7A6A #fffed4; }
.fallout-modal-dialog button { width: auto; }

.offline-meteo-age { color: #4caf50; font-weight: bold; }
.offline-meteo-age.stale { color: #f44336; }

#offline-modal .offline-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
#offline-modal .offline-description {
    text-align: left;
    color: #3A2A1A;
    line-height: 1.8;
    font-size: 14px;
}
#offline-modal .offline-buttons-row {
    margin-top: auto;
}
#offline-modal .offline-clear-btn {
    margin-top: 8px;
    background: #1a1a1a;
    color: #8B7A6A;
    border: 1px solid #333;
}
#offline-modal .offline-save-btn {
    flex: 1;
}

@media (max-width: 600px) {
    #time-spans {
        font-size: 14px;
        gap: 6px;
    }
    #play-pause-btn {
        width: 44px;
        min-width: 44px;
        margin: 6px 10px 6px 0;
    }
    .timeline-slider {
        top: 12px;
        width: 44px;
    }
    .timeline-slider-dot {
        width: 20px;
        height: 20px;
    }
    .timeline-slider-stem {
        top: 10px;
    }
    .timeline-mark-wrapper {
        width: 44px;
        height: 44px;
        margin-left: -14px;
    }
    .timeline-mark-triangle {
        margin: 0 auto;
    }
    .entry-handle {
        width: 26px;
        height: 26px;
        margin-left: -5px;
        margin-top: -3px;
    }
    .entry-handle::after { inset: -10px !important; }
}

.ruler-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    margin-top: -12px;
    background: transparent;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: grab;
    z-index: 12;
    pointer-events: auto;
    touch-action: none;
    box-sizing: border-box;
}
.ruler-marker::before,
.ruler-marker::after {
    content: '';
    position: absolute;
    background: #D4A017;
    pointer-events: none;
}
.ruler-marker::before {
    left: 50%;
    top: 4px;
    bottom: 4px;
    width: 2px;
    margin-left: -1px;
}
.ruler-marker::after {
    top: 50%;
    left: 4px;
    right: 4px;
    height: 2px;
    margin-top: -1px;
}
.ruler-marker:hover,
.ruler-marker.dragging {
    border-color: #D4A017;
    cursor: grabbing;
}
.ruler-marker:hover::before,
.ruler-marker:hover::after,
.ruler-marker.dragging::before,
.ruler-marker.dragging::after {
    background: #000;
}

@media (max-width: 600px) {
    .ruler-marker {
        width: 36px;
        height: 36px;
        margin-left: -18px;
        margin-top: -18px;
    }
}
/* style-map.css */