#mob-backdrop,
#mob-layers-btn,
#mob-audio-btn,
#mob-tools-wrap,
#mob-zoom-hint,
#mob-drag-handle,
#mob-swipe-arrow,
#mob-region-tabs,
#mob-types-grid,
#mob-nick-fab,
#mob-nick-popup {
    display: none !important;
}

@media (max-width: 768px) {

* { -webkit-tap-highlight-color: transparent; }

html, body {
    height: 100dvh !important;
    overflow: hidden !important;
}

body {
    background: #050a03 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
}

#tv-cabinet {
    width: 100% !important;
    max-width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #050a03 !important;
    overflow: hidden !important;
}
#tv-cabinet::before,
#tv-cabinet::after { display: none !important; }
#antenna-right     { display: none !important; }
#tv-brand          { display: none !important; }
#tv-bottom         { display: none !important; }
#tv-controls       { display: none !important; }

#tv-body {
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    height: 100dvh !important;
    overflow: hidden !important;
}

#screen-wrap  { flex: 1 !important; min-height: 0 !important; height: 100% !important; }
#screen-bezel {
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #050a03 !important;
    height: 100% !important;
}
#screen-inner {
    border-radius: 0 !important;
    height: 100% !important;
    animation: none !important;
}

#header {
    height: 44px !important;
    padding: 0 52px 0 60px !important;
    gap: 8px !important;
    position: relative;
    z-index: 500;
    justify-content: center !important;
}
#header-left {
    gap: 6px !important;
    justify-content: center !important;
    flex: 1 !important;
}
#header h1           { font-size: 15px !important; letter-spacing: 4px !important; }
#current-map-name    { font-size: 11px !important; letter-spacing: 1px !important; }
#header-tools        { display: none !important; }

#app {
    flex: 1 !important;
    position: relative !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
}

#map-container {
    position: absolute !important;
    inset: 0 !important;
    flex: none !important;
    filter: sepia(0.3) hue-rotate(50deg) saturate(0.7) brightness(0.85) !important;
}
#map { height: 100% !important; width: 100% !important; }

.leaflet-control-zoom { display: none !important; }

#statusbar { display: none !important; }

#toast {
    bottom: 100px !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

#marker-modal-box {
    width: calc(100vw - 24px) !important;
    max-width: 400px !important;
}
.mf-input, .mf-textarea { font-size: 16px !important; }

#sidebar {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 72dvh !important;
    border-right: none !important;
    border-top: 1px solid rgba(168,255,96,0.25) !important;
    border-radius: 20px 20px 0 0 !important;
    background: rgba(4,8,2,0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    z-index: 9000 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    
    transform: translateY(100%) !important;
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1) !important;
    will-change: transform !important;
    padding-top: 28px !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(168,255,96,0.08) !important;
}
#sidebar.mob-open {
    transform: translateY(0) !important;
}
#sidebar::after { display: none !important; }

#sidebar .sidebar-section { display: none !important; }

#mob-drag-handle {
    display: block !important;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 5px;
    background: rgba(168,255,96,0.2);
    border-radius: 3px;
    pointer-events: none;
    flex-shrink: 0;
}

#mob-region-tabs {
    display: flex !important;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 16px 12px;
    scrollbar-width: none;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}
#mob-region-tabs::-webkit-scrollbar { display: none; }

.mob-region-tab {
    flex-shrink: 0;
    padding: 6px 18px;
    border-radius: 24px;
    background: rgba(168,255,96,0.04);
    border: 1px solid rgba(168,255,96,0.15);
    color: rgba(168,255,96,0.4);
    font-family: 'VT323', monospace;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.mob-region-tab.active {
    background: rgba(168,255,96,0.1);
    border-color: rgba(168,255,96,0.6);
    color: #a8ff60;
    text-shadow: 0 0 8px rgba(168,255,96,0.5);
    box-shadow: 0 0 12px rgba(168,255,96,0.1);
}

#mob-types-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 16px 8px;
    flex-shrink: 0;
}

.mob-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 4px 12px;
    background: rgba(168,255,96,0.03);
    border: 1px solid rgba(168,255,96,0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    overflow: hidden;
}
.mob-type-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(168,255,96,0.06), transparent 70%);
    opacity: 0;
    transition: opacity 0.2s;
}
.mob-type-btn:active { transform: scale(0.93); }
.mob-type-btn.active {
    background: rgba(168,255,96,0.08);
    border-color: rgba(168,255,96,0.5);
    box-shadow: 0 0 16px rgba(168,255,96,0.1), inset 0 0 8px rgba(168,255,96,0.04);
}
.mob-type-btn.active::before { opacity: 1; }

.mob-type-icon {
    font-size: 26px;
    line-height: 1;
}
.mob-type-tag {
    font-family: 'VT323', monospace;
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(168,255,96,0.35);
}
.mob-type-btn.active .mob-type-tag {
    color: #a8ff60;
    text-shadow: 0 0 6px rgba(168,255,96,0.4);
}


#mob-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 8999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
#mob-backdrop.show {
    opacity: 1;
    pointer-events: all;
}

#mob-layers-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 10px;
    top: 50px;
    z-index: 8000;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(4,8,2,0.92);
    border: 1.5px solid rgba(168,255,96,0.25);
    box-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 0 1px rgba(168,255,96,0.04);
    cursor: pointer;
    color: rgba(168,255,96,0.55);
    transition: all 0.2s;
}
#mob-layers-btn svg { width: 20px; height: 20px; }
#mob-layers-btn:active { transform: scale(0.91); }
#mob-layers-btn.open {
    border-color: rgba(168,255,96,0.7);
    color: #a8ff60;
    background: rgba(10,20,5,0.95);
    box-shadow: 0 0 20px rgba(168,255,96,0.2), 0 2px 12px rgba(0,0,0,0.7);
}

@keyframes mob-layers-pulse {
    0%   { box-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 0 0 rgba(168,255,96,0.3); }
    70%  { box-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 0 12px rgba(168,255,96,0); }
    100% { box-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 0 0 rgba(168,255,96,0); }
}
#mob-layers-btn.pulse {
    animation: mob-layers-pulse 0.9s ease-out 3;
}

#mob-audio-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 10px;
    top: 50px;
    z-index: 8000;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(4,8,2,0.92);
    border: 1.5px solid rgba(168,255,96,0.18);
    box-shadow: 0 2px 12px rgba(0,0,0,0.7);
    cursor: pointer;
    color: rgba(168,255,96,0.35);
    transition: all 0.2s;
}
#mob-audio-btn svg { width: 18px; height: 18px; }
#mob-audio-btn:active { transform: scale(0.91); }
#mob-audio-btn.playing {
    border-color: rgba(57,255,20,0.45);
    color: #39ff14;
}
@keyframes mob-audio-pulse {
    0%,100% { box-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 8px rgba(57,255,20,0.15); }
    50%      { box-shadow: 0 2px 12px rgba(0,0,0,0.7), 0 0 20px rgba(57,255,20,0.35); }
}
#mob-audio-btn.playing { animation: mob-audio-pulse 2.2s ease-in-out infinite; }

#mob-tools-wrap {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: fixed;
    left: 10px;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 8000;
}

.mob-tool-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(4,8,2,0.92);
    border: 1.5px solid rgba(168,255,96,0.18);
    box-shadow: 0 2px 12px rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s;
    color: rgba(168,255,96,0.4);
}
.mob-tool-btn svg { width: 18px; height: 18px; }
.mob-tool-btn:active { transform: scale(0.9); }
.mob-tool-btn.active {
    border-color: rgba(168,255,96,0.7) !important;
    color: #a8ff60 !important;
    background: rgba(10,20,5,0.95) !important;
    box-shadow: 0 0 16px rgba(168,255,96,0.2), 0 2px 12px rgba(0,0,0,0.7) !important;
}

#mob-zoom-hint {
    display: block !important;
    position: fixed;
    left: 50%;
    bottom: max(100px, calc(env(safe-area-inset-bottom) + 80px));
    transform: translateX(-50%);
    z-index: 7999;
    font-family: 'VT323', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(168,255,96,0.28);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(168,255,96,0.2);
}
#mob-zoom-hint.show { opacity: 1; }

#mob-nick-fab {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 10px;
    bottom: max(78px, calc(env(safe-area-inset-bottom) + 58px));
    z-index: 8000;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(4,8,2,0.92);
    border: 1.5px solid rgba(168,255,96,0.18);
    box-shadow: 0 2px 12px rgba(0,0,0,0.7);
    cursor: pointer;
    color: rgba(168,255,96,0.4);
    transition: all 0.2s;
}
#mob-nick-fab:active { transform: scale(0.91); }
#mob-nick-fab.has-name {
    border-color: rgba(168,255,96,0.5);
    color: #a8ff60;
    box-shadow: 0 0 12px rgba(168,255,96,0.15), 0 2px 12px rgba(0,0,0,0.7);
}

#mob-nick-popup {
    display: flex !important;
    position: fixed;
    inset: 0;
    z-index: 19500;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding-bottom: max(0px, env(safe-area-inset-bottom));
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
}
#mob-nick-popup.show {
    opacity: 1;
    pointer-events: all;
}
#mob-nick-popup-box {
    width: 100%;
    background: #070c05;
    border-top: 1px solid rgba(168,255,96,0.2);
    border-radius: 20px 20px 0 0;
    padding: 20px 20px max(24px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.8);
}
#mob-nick-popup-label {
    font-family: 'VT323', monospace;
    font-size: 13px;
    letter-spacing: 4px;
    color: rgba(168,255,96,0.4);
}
#mob-nick-input {
    background: rgba(168,255,96,0.05);
    border: 1px solid rgba(168,255,96,0.2);
    border-radius: 10px;
    color: #a8ff60;
    font-family: 'VT323', monospace;
    font-size: 22px;
    letter-spacing: 2px;
    padding: 10px 14px;
    outline: none;
    caret-color: #a8ff60;
    width: 100%;
}
#mob-nick-input:focus {
    border-color: rgba(168,255,96,0.5);
    box-shadow: 0 0 12px rgba(168,255,96,0.1);
}
#mob-nick-close {
    background: rgba(168,255,96,0.07);
    border: 1px solid rgba(168,255,96,0.3);
    border-radius: 10px;
    color: #a8ff60;
    font-family: 'VT323', monospace;
    font-size: 20px;
    letter-spacing: 3px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
#mob-nick-close:active {
    background: rgba(168,255,96,0.15);
}

#side-panel {
    width: 100% !important;
    max-width: 100% !important;
    border-left: none !important;
    border-top: 1px solid rgba(168,255,96,0.15) !important;
}

.marker-popup .leaflet-popup-content-wrapper {
    max-width: calc(100vw - 32px) !important;
}
.leaflet-popup-content { width: auto !important; }

#loading { z-index: 9800 !important; }

}
