/**
 * Seamou Universal Interactive 2D Game Map Stylesheet v4.0
 * HoYoLAB / Genshin Impact Interactive Map Architecture
 * 100% Pure Cyberpunk Dark Glass - Strict Zero-Emoji UI
 *
 * @package SeamouBuilder
 */

:root {
    --sm-map-cyan: #00f0ff;
    --sm-map-gold: #fbbf24;
    --sm-map-emerald: #10b981;
    --sm-map-rose: #f43f5e;
    --sm-map-purple: #c084fc;
    --sm-map-blue: #38bdf8;
    --sm-map-bg-deep: #040711;
    --sm-map-bg-panel: rgba(9, 14, 26, 0.94);
    --sm-map-border: rgba(255, 255, 255, 0.08);
}

/* 1. APP WRAPPER & STANDALONE PAGE */
.sm-map-app-page-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 64px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: var(--sm-map-bg-deep);
}

.sm-interactive-map-app {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    user-select: none;
    overflow: hidden;
}

.sm-interactive-map-app.is-embedded {
    height: 720px;
    border-radius: 16px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.1);
}

.sm-interactive-map-app.is-standalone {
    height: calc(100vh - 60px);
    min-height: 820px;
}

/* 2. TOP APP BAR */
.sm-map-topbar {
    height: 56px;
    background: rgba(5, 8, 17, 0.96);
    border-bottom: 1px solid var(--sm-map-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    backdrop-filter: blur(16px);
    z-index: 50;
    flex-shrink: 0;
    gap: 16px;
}

.sm-map-brand-cluster {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.sm-map-brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.sm-map-brand-icon {
    color: var(--sm-map-cyan);
    display: flex;
    align-items: center;
}

.sm-map-brand-text strong {
    color: var(--sm-map-cyan);
}

.sm-map-game-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sm-map-game-select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: var(--sm-map-cyan);
    font-weight: 800;
    font-size: 0.86rem;
    padding: 6px 30px 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    appearance: none;
    transition: all 0.2s ease;
}

.sm-map-game-select:hover {
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.sm-map-select-arrow {
    position: absolute;
    right: 10px;
    color: var(--sm-map-cyan);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.sm-map-sea-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(4, 7, 17, 0.7);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--sm-map-border);
}

.sm-map-sea-tab-btn {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sm-map-sea-tab-btn.is-active,
.sm-map-sea-tab-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    color: var(--sm-map-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.sm-map-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sm-map-quick-search {
    position: relative;
    width: 240px;
}

.sm-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.sm-map-search-input {
    width: 100%;
    background: rgba(4, 7, 17, 0.8);
    border: 1px solid var(--sm-map-border);
    color: #ffffff;
    font-size: 0.82rem;
    padding: 6px 28px 6px 32px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.sm-map-search-input:focus {
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.sm-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.sm-map-fullscreen-btn {
    width: 36px;
    height: 36px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--sm-map-border);
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sm-map-fullscreen-btn:hover {
    color: var(--sm-map-cyan);
    border-color: var(--sm-map-cyan);
}

/* 3. WORKSPACE 3-PANE LAYOUT */
.sm-map-workspace {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

/* 3.1 LEFT CATEGORY RAIL (60px) */
.sm-map-rail {
    width: 60px;
    background: rgba(5, 8, 17, 0.96);
    border-right: 1px solid var(--sm-map-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
    z-index: 45;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
}

.sm-rail-btn {
    position: relative;
    width: 48px;
    height: 52px;
    background: transparent;
    border: none;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 4px;
}

.sm-rail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.sm-rail-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.sm-rail-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.sm-rail-btn.is-active {
    color: var(--sm-map-gold);
    background: rgba(251, 191, 36, 0.1);
}

.sm-rail-btn.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--sm-map-gold);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--sm-map-gold);
}

/* 3.2 LEFT SUB-CATEGORY DRAWER (300px) */
.sm-map-drawer {
    width: 300px;
    background: var(--sm-map-bg-panel);
    border-right: 1px solid var(--sm-map-border);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    z-index: 40;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), margin-left 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sm-map-drawer.is-collapsed {
    margin-left: -300px;
}

.sm-drawer-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--sm-map-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.sm-drawer-realm-name {
    font-size: 0.95rem;
    font-weight: 900;
    color: #ffffff;
}

.sm-drawer-realm-desc {
    font-size: 0.75rem;
    color: var(--sm-map-cyan);
    font-weight: 700;
    margin-top: 2px;
}

.sm-drawer-collapse-btn {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--sm-map-border);
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sm-drawer-collapse-btn:hover {
    color: #ffffff;
    border-color: var(--sm-map-cyan);
}

/* 3.2.1 DRAWER QUICK SEARCH BAR */
.sm-drawer-search-wrap {
    position: relative;
    padding: 12px 14px 8px 14px;
}

.sm-drawer-search-wrap .sm-search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.sm-drawer-search-input {
    width: 100%;
    background: rgba(4, 7, 17, 0.85);
    border: 1px solid var(--sm-map-border);
    color: #ffffff;
    font-size: 0.8rem;
    padding: 7px 28px 7px 32px;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

.sm-drawer-search-input:focus {
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
    background: rgba(4, 7, 17, 0.95);
}

.sm-drawer-search-clear {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 6px;
}

.sm-drawer-search-clear:hover {
    color: #ffffff;
}

/* 3.2.2 DRAWER NAV TABS (Categories vs Pins List) */
.sm-drawer-nav-tabs {
    display: flex;
    margin: 0 14px 10px 14px;
    background: rgba(4, 7, 17, 0.7);
    border: 1px solid var(--sm-map-border);
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
}

.sm-drawer-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.sm-drawer-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.sm-drawer-tab-btn.is-active {
    background: rgba(0, 240, 255, 0.16);
    color: var(--sm-map-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.sm-drawer-tab-badge {
    background: rgba(0, 240, 255, 0.25);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 1px 6px;
    border-radius: 10px;
    line-height: 1.2;
}

.sm-drawer-tab-btn.is-active .sm-drawer-tab-badge {
    background: var(--sm-map-cyan);
    color: #040711;
}

/* 3.2.3 DRAWER PINS LIST PANE */
.sm-drawer-tab-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sm-drawer-pins-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 8px 16px;
    border-bottom: 1px solid var(--sm-map-border);
}

.sm-drawer-pins-header-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sm-drawer-pins-header-count {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--sm-map-cyan);
}

.sm-drawer-pins-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sm-drawer-pins-list::-webkit-scrollbar {
    width: 5px;
}

.sm-drawer-pins-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sm-drawer-pins-list::-webkit-scrollbar-thumb:hover {
    background: var(--sm-map-cyan);
}

.sm-drawer-pin-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-drawer-pin-item:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.45);
    transform: translateX(3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 240, 255, 0.15);
}

.sm-drawer-pin-item.is-active {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.sm-drawer-pin-item.is-collected {
    opacity: 0.45;
}

.sm-drawer-pin-item.is-collected .sm-drawer-pin-name {
    text-decoration: line-through;
    color: #64748b;
}

.sm-drawer-pin-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #090e1a;
    border: 1.5px solid var(--sm-map-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.sm-drawer-pin-item:hover .sm-drawer-pin-icon-wrap {
    transform: scale(1.1);
}

.sm-drawer-pin-info {
    flex: 1;
    min-width: 0;
}

.sm-drawer-pin-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sm-drawer-pin-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.sm-drawer-pin-badge {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.sm-drawer-pin-badge.is-level {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.sm-drawer-pin-badge.is-layer {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.sm-drawer-pin-badge.is-type {
    background: rgba(0, 240, 255, 0.15);
    color: var(--sm-map-cyan);
}

.sm-drawer-pin-collect-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sm-drawer-pin-collect-btn:hover {
    border-color: var(--sm-map-emerald);
    color: var(--sm-map-emerald);
    background: rgba(16, 185, 129, 0.12);
}

.sm-drawer-pin-collect-btn.is-collected {
    background: rgba(16, 185, 129, 0.25);
    border-color: var(--sm-map-emerald);
    color: var(--sm-map-emerald);
}

.sm-drawer-pins-empty {
    padding: 30px 16px;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Map Pin Focused Pulse Wave */
.sm-map-pin.is-focused .sm-pin-icon-wrap {
    animation: smPinFocusPulse 0.9s ease 2;
}

@keyframes smPinFocusPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.9); }
    50% { transform: scale(1.4); box-shadow: 0 0 35px 10px rgba(0, 240, 255, 0.7); }
    100% { transform: scale(1.22); box-shadow: 0 0 20px rgba(0, 240, 255, 0.4); }
}

.sm-drawer-section {
    padding: 16px 18px;
    border-bottom: 1px solid var(--sm-map-border);
}

.sm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sm-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sm-section-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(0, 240, 255, 0.15);
    color: var(--sm-map-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.sm-pin-count-summary {
    font-size: 0.72rem;
    color: var(--sm-map-cyan);
    font-weight: 800;
}

/* Recommended Targets Grid */
.sm-rec-targets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sm-rec-target-card {
    background: rgba(4, 7, 17, 0.7);
    border: 1px solid var(--sm-map-border);
    border-radius: 8px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.sm-rec-target-card:hover,
.sm-rec-target-card.is-active {
    border-color: var(--sm-map-gold);
    background: rgba(251, 191, 36, 0.15);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.sm-rec-avatar-wrap {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #334155;
    margin-bottom: 4px;
    background: #090e1a;
}

.sm-rec-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sm-rarity-mythical { border-color: #f43f5e; box-shadow: 0 0 8px rgba(244, 63, 94, 0.5); }
.sm-rarity-secret { border-color: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.5); }
.sm-rarity-legendary { border-color: #a855f7; box-shadow: 0 0 8px rgba(168, 85, 247, 0.5); }

.sm-rec-name {
    font-size: 0.65rem;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Layer Toggle Group */
.sm-layer-toggle-group {
    display: flex;
    gap: 6px;
    background: rgba(4, 7, 17, 0.7);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--sm-map-border);
}

.sm-layer-btn {
    flex: 1;
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 7px 4px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.sm-layer-btn.is-active,
.sm-layer-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    color: var(--sm-map-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* DocTypes Checklist */
.sm-doctypes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
}

.sm-doctype-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    background: rgba(4, 7, 17, 0.5);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sm-doctype-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--sm-map-border);
}

.sm-doctype-checkbox {
    accent-color: var(--sm-map-cyan);
    cursor: pointer;
}

.sm-doctype-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sm-doctype-title {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 700;
    color: #cbd5e1;
}

.sm-doctype-count {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
}

.sm-drawer-footer {
    padding: 16px 18px;
    margin-top: auto;
    border-top: 1px solid var(--sm-map-border);
}

.sm-reset-filters-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(217, 119, 6, 0.15));
    border: 1px solid rgba(251, 191, 36, 0.4);
    color: var(--sm-map-gold);
    font-weight: 900;
    font-size: 0.82rem;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.sm-reset-filters-btn:hover {
    background: var(--sm-map-gold);
    color: #000000;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}

/* 3.3 MAIN VIEWPORT CANVAS */
.sm-map-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #0a1526 0%, #03060d 100%);
    cursor: grab;
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

.sm-map-viewport.is-grabbing {
    cursor: grabbing !important;
}

.sm-map-viewport.is-rotating {
    cursor: crosshair !important;
}

.sm-map-radar-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.35;
}

.sm-map-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    transform-style: preserve-3d;
    will-change: transform;
}

.sm-map-stage.is-animating-camera {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sm-map-stage.is-animating-camera .sm-map-pin {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Map World Terrain Backdrop */
.sm-map-backdrop-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050b14;
}

.sm-map-bg-image {
    width: 100%;
    height: 100%;
    object-fit: fill;
    filter: brightness(0.92) contrast(1.15) saturate(1.12);
    opacity: 0.9;
    transition: opacity 0.4s ease;
    user-select: none;
    pointer-events: none;
    border-radius: 4px;
}

.sm-map-bg-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(3, 7, 18, 0.15) 0%, rgba(3, 7, 18, 0.65) 100%);
    pointer-events: none;
}

.sm-map-routes-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.sm-route-polyline {
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.8));
    animation: smRouteDash 20s linear infinite;
}

@keyframes smRouteDash {
    to { stroke-dashoffset: -1000; }
}

/* Region Labels */
.sm-map-regions-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 8;
}

.sm-map-region-label {
    position: absolute;
    transform: translate(-50%, -50%);
    background: rgba(4, 7, 17, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.35);
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 240, 255, 0.15);
    white-space: nowrap;
}

.sm-region-text {
    font-size: 0.72rem;
    font-weight: 900;
    color: #e2e8f0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* 3.4 PINS STYLING */
.sm-map-pins-layer {
    position: absolute;
    inset: 0;
    z-index: 15;
    transform-style: preserve-3d;
    pointer-events: none;
    transition: transform 0.4s ease;
}

.sm-map-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s;
    z-index: 10;
    transform-style: preserve-3d;
    pointer-events: auto;
    transform-origin: 50% 18px;
    --sm-pin-elev: 2px;
}

.sm-map-pin:hover,
.sm-map-pin.is-hovered {
    z-index: 9999 !important;
    --sm-pin-elev: 60px;
}

.sm-map-pin:hover .sm-pin-icon-wrap,
.sm-map-pin.is-hovered .sm-pin-icon-wrap {
    transform: scale(1.22);
    box-shadow: 0 0 20px var(--sm-map-cyan), 0 0 35px rgba(0, 240, 255, 0.4);
}

.sm-map-pin:hover .sm-pin-label,
.sm-map-pin.is-hovered .sm-pin-label {
    background: rgba(4, 7, 17, 0.98);
    border-color: var(--sm-map-cyan);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.4), 0 0 12px rgba(0, 0, 0, 0.9);
    z-index: 10000;
}

.sm-map-pin.is-collected {
    opacity: 0.35;
    filter: grayscale(0.85);
}

.sm-pin-icon-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090e1a;
    border: 2px solid var(--sm-map-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    transition: all 0.2s ease;
}

.sm-pin-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px dashed var(--sm-map-cyan);
    animation: smPinPulse 2.5s infinite linear;
    pointer-events: none;
}

@keyframes smPinPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 0.15; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.sm-pin-label {
    margin-top: 5px;
    background: rgba(4, 7, 17, 0.92);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    position: relative;
    z-index: 20;
    transform: translateZ(5px);
    transform-style: preserve-3d;
}

/* Route Order Badge */
.sm-route-order-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #00f0ff;
    color: #000000;
    font-size: 0.65rem;
    font-weight: 900;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
    border: 1.5px solid #000;
}

/* 3.5 FLOATING LAYER CARD (Bottom Left) */
.sm-floating-layer-card {
    position: absolute;
    left: 20px;
    bottom: 20px;
    background: rgba(9, 14, 26, 0.94);
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    border-radius: 12px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 240, 255, 0.2);
    backdrop-filter: blur(12px);
    z-index: 25;
    transition: all 0.2s ease;
}

.sm-floating-layer-card:hover {
    border-color: var(--sm-map-cyan);
    transform: translateY(-2px);
}

.sm-floating-layer-icon {
    color: var(--sm-map-cyan);
    display: flex;
    align-items: center;
}

.sm-floating-layer-text {
    display: flex;
    flex-direction: column;
}

.sm-layer-label-sub {
    font-size: 0.62rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
}

.sm-layer-label-main {
    font-size: 0.78rem;
    font-weight: 900;
    color: #ffffff;
}

/* 3.5.1 3D ROTATION HELPER HINT */
.sm-3d-hint-pill {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(4, 7, 17, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 240, 255, 0.15);
    backdrop-filter: blur(12px);
    pointer-events: none;
    z-index: 22;
    letter-spacing: 0.03em;
    user-select: none;
    transition: opacity 0.4s ease;
}

/* 3.6 PIN DETAILS POPOVER CARD */
.sm-map-pin-popover {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 360px;
    max-width: calc(100% - 40px);
    background: rgba(9, 14, 26, 0.97);
    border: 2px solid var(--sm-map-cyan);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 240, 255, 0.25);
    backdrop-filter: blur(16px);
    z-index: 35;
    animation: smFadeInUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes smFadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.sm-popover-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
}

.sm-popover-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sm-popover-doctype-badge {
    color: #000000;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.sm-popover-level-badge,
.sm-popover-layer-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sm-popover-title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
}

.sm-popover-coords {
    font-size: 0.75rem;
    color: var(--sm-map-cyan);
    font-family: monospace;
    margin-bottom: 12px;
}

.sm-popover-desc {
    font-size: 0.84rem;
    color: #cbd5e1;
    line-height: 1.55;
    margin: 0 0 14px;
}

.sm-popover-drops-card {
    background: rgba(4, 7, 17, 0.6);
    border: 1px solid var(--sm-map-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

.sm-drops-heading {
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 800;
    margin-bottom: 4px;
}

.sm-drops-content {
    font-size: 0.84rem;
    color: var(--sm-map-gold);
    font-weight: 800;
}

.sm-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.sm-collected-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #94a3b8;
    cursor: pointer;
}

.sm-collected-toggle-label input {
    accent-color: var(--sm-map-cyan);
}

.sm-popover-wiki-btn {
    background: linear-gradient(135deg, var(--sm-map-cyan), #0284c7);
    color: #000000;
    text-decoration: none;
    font-weight: 900;
    font-size: 0.78rem;
    padding: 8px 14px;
    border-radius: 6px;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
    transition: transform 0.15s ease;
}

.sm-popover-wiki-btn:hover {
    transform: translateY(-1px);
}

/* 3.7 RIGHT FLOATING UTILITY DOCK */
.sm-map-right-dock {
    position: absolute;
    right: 18px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 25;
}

.sm-tool-item {
    background: rgba(9, 14, 26, 0.94);
    border: 1px solid var(--sm-map-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
}

.sm-progress-tool {
    width: 44px;
    height: 44px;
    padding: 4px;
}

.sm-progress-ring-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-progress-pct {
    position: absolute;
    font-size: 0.62rem;
    font-weight: 900;
    color: var(--sm-map-cyan);
}

.sm-tool-btn {
    width: 38px;
    height: 38px;
    background: rgba(9, 14, 26, 0.94);
    border: 1px solid var(--sm-map-border);
    color: #94a3b8;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}

.sm-tool-btn:hover,
.sm-tool-btn.is-active {
    color: var(--sm-map-cyan);
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

.sm-tool-divider {
    width: 24px;
    height: 1px;
    background: var(--sm-map-border);
    margin: 2px 0;
}

/* 3D Tactical Compass & Dimension Toggle */
.sm-compass-btn {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.sm-compass-inner {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.08s ease-out;
}

.sm-dimension-btn {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    font-family: inherit;
    border-radius: 8px;
}

.sm-dimension-btn.is-active {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--sm-map-cyan);
    color: var(--sm-map-cyan);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

/* 3.8 ROUTE PLANNER FLOATING CONTROL BAR */
.sm-route-planner-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(9, 14, 26, 0.96);
    border: 1.5px solid var(--sm-map-cyan);
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.25);
    backdrop-filter: blur(16px);
    z-index: 30;
}

.sm-route-badge {
    background: rgba(0, 240, 255, 0.15);
    color: var(--sm-map-cyan);
    font-size: 0.68rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    margin-right: 8px;
}

.sm-route-points-count {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
}

.sm-route-actions {
    display: flex;
    gap: 8px;
}

.sm-route-btn {
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 14px;
    cursor: pointer;
}

.sm-route-clear {
    background: rgba(244, 63, 94, 0.15);
    color: var(--sm-map-rose);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.sm-route-done {
    background: linear-gradient(135deg, var(--sm-map-cyan), #0284c7);
    color: #000;
}

/* 3.9 EXTENSIONS MODAL OVERLAY */
.sm-extensions-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 17, 0.85);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sm-extensions-modal-card {
    background: linear-gradient(135deg, #090e1a 0%, #050811 100%);
    border: 2px solid var(--sm-map-cyan);
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 24px 26px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 240, 255, 0.25);
    position: relative;
    color: #ffffff;
}

.sm-ext-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
}

.sm-ext-modal-title {
    margin: 0 0 16px;
    font-size: 1.2rem;
    font-weight: 900;
    color: #ffffff;
}

.sm-ext-widget-card {
    background: rgba(4, 7, 17, 0.6);
    border: 1px solid var(--sm-map-border);
    border-radius: 10px;
    padding: 14px 16px;
}

.sm-ext-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sm-ext-tag {
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: var(--sm-map-cyan);
    background: rgba(0, 240, 255, 0.1);
}

.sm-tag-danger {
    color: var(--sm-map-rose);
    border-color: var(--sm-map-rose);
    background: rgba(244, 63, 94, 0.1);
}

.sm-ext-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
}

.sm-ext-card-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 6px 0 12px;
}

.sm-moon-countdown-box {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sm-moon-phase-indicator {
    font-size: 0.75rem;
    color: var(--sm-map-gold);
    font-weight: 800;
    margin-bottom: 4px;
}

.sm-moon-timer-val {
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    font-family: monospace;
    letter-spacing: 2px;
}

.sm-moon-status-badge {
    margin-top: 8px;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 800;
}

.sm-danger-zones-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sm-danger-row {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    color: #cbd5e1;
}

/* Toast Notifications */
.sm-map-toast-notification {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: rgba(9, 14, 26, 0.96);
    border: 1.5px solid var(--sm-map-cyan);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 800;
    padding: 8px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 240, 255, 0.3);
    backdrop-filter: blur(12px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-map-toast-notification.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 4. RESPONSIVE MOBILE QUERIES (< 768px) */
@media (max-width: 768px) {
    .sm-map-topbar {
        height: auto;
        padding: 10px 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .sm-map-brand-cluster {
        justify-content: space-between;
    }
    .sm-map-sea-tabs {
        overflow-x: auto;
        width: 100%;
    }
    .sm-map-quick-search {
        width: 100%;
    }
    .sm-map-drawer {
        position: absolute;
        left: 60px;
        top: 0;
        bottom: 0;
        width: calc(100% - 60px);
        max-width: 320px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
    }
    .sm-map-drawer.is-collapsed {
        margin-left: -320px;
    }
    .sm-map-pin-popover {
        left: 10px !important;
        right: 10px !important;
        top: auto !important;
        bottom: 10px !important;
        width: auto !important;
        max-width: none !important;
    }
    .sm-floating-layer-card {
        bottom: 80px;
        left: 10px;
    }
}

/* ==========================================================================
   5. ADMIN IN-PLACE PIN EDITING & COORDINATES DRAG DOCK STYLES
   ========================================================================== */

/* Popover Edit Button */
.sm-popover-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 240, 255, 0.12);
    color: var(--sm-map-cyan);
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}

.sm-popover-edit-btn:hover {
    background: var(--sm-map-cyan);
    color: #000000;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}

/* Admin Add Pin Tool Button in Right Dock */
.sm-tool-btn.sm-tool-admin-add {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.4);
}

.sm-tool-btn.sm-tool-admin-add:hover,
.sm-tool-btn.sm-tool-admin-add.is-active {
    background: var(--sm-map-cyan);
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.6);
}

.sm-tool-btn.sm-tool-admin-add.is-active svg {
    stroke: #000000 !important;
}

/* Add Pin Mode Viewport Target Cursor */
.sm-map-viewport.is-add-pin-mode {
    cursor: crosshair !important;
}

.sm-map-viewport.is-add-pin-mode .sm-map-stage {
    cursor: crosshair !important;
}

/* Admin Pin Drag & Drop State */
.sm-map-pin.is-admin-editable {
    cursor: grab;
}

.sm-map-pin.is-admin-editable:active,
.sm-map-pin.is-admin-editable.is-dragging {
    cursor: grabbing !important;
    z-index: 9999 !important;
    transition: none !important;
    filter: brightness(1.3) drop-shadow(0 0 18px #00f0ff);
    transform: translate(-50%, -50%) scale(1.18) !important;
}

/* Admin Pin Edit Modal */
.sm-map-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sm-map-modal-card {
    background: linear-gradient(145deg, #090e1a 0%, #050811 100%);
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 240, 255, 0.15);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px 30px;
    color: #e2e8f0;
    animation: smModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes smModalFadeIn {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.sm-map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.sm-map-modal-title {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #ffffff 0%, #00f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sm-map-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sm-map-modal-close:hover {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.12);
}

.sm-map-pin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sm-form-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sm-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.sm-form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .sm-form-row-2,
    .sm-form-row-3 {
        grid-template-columns: 1fr;
    }
}

.sm-form-input,
.sm-form-select,
.sm-form-textarea {
    background: rgba(2, 6, 23, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.sm-form-input:focus,
.sm-form-select:focus,
.sm-form-textarea:focus {
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
    background: rgba(2, 6, 23, 0.98);
}

.sm-form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.sm-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.sm-btn-modal-cancel {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-btn-modal-cancel:hover {
    color: #ffffff;
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

.sm-btn-modal-delete {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #f43f5e;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-btn-modal-delete:hover {
    background: #f43f5e;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.45);
}

.sm-btn-modal-save {
    background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
    border: none;
    color: #000000;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 900;
    font-size: 0.92rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transition: all 0.2s ease;
}

.sm-btn-modal-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.6);
}

/* Drawer Pin Actions & Direct Edit Button */
.sm-drawer-pin-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sm-drawer-pin-edit-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: var(--sm-map-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-drawer-pin-edit-btn:hover {
    background: var(--sm-map-cyan);
    color: #000000;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
    transform: scale(1.1);
}

/* ==========================================================================
   6. DEDICATED MAP EDITOR STUDIO SUITE STYLES
   ========================================================================== */

/* Topbar Map Studio Toggle Button */
.sm-map-editor-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.12) 0%, rgba(168, 85, 247, 0.16) 100%);
    border: 1px solid rgba(0, 240, 255, 0.45);
    color: var(--sm-map-cyan);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

.sm-map-editor-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(168, 85, 247, 0.35) 100%);
    border-color: var(--sm-map-cyan);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    transform: translateY(-1px);
}

.sm-map-editor-toggle-btn.is-active {
    background: linear-gradient(135deg, #00f0ff 0%, #a855f7 100%);
    color: #030712;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.6), 0 0 12px rgba(168, 85, 247, 0.4);
}

.sm-editor-btn-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00f0ff;
    box-shadow: 0 0 8px #00f0ff;
    animation: smPulseDot 1.5s infinite;
}

.sm-map-editor-toggle-btn.is-active .sm-editor-btn-pulse {
    background: #030712;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    animation: none;
}

@keyframes smPulseDot {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* EDITOR HUD STATUS BAR (Fixed at bottom of Map Viewport) */
.sm-map-editor-hud {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 9, 20, 0.92);
    border: 1px solid rgba(0, 240, 255, 0.35);
    border-radius: 30px;
    padding: 7px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 45;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.2);
    backdrop-filter: blur(14px);
    pointer-events: auto;
    animation: smHudFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes smHudFadeUp {
    from { opacity: 0; transform: translate(-50%, 15px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.sm-hud-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sm-hud-badge {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0, 240, 255, 0.15);
    color: var(--sm-map-cyan);
    border: 1px solid rgba(0, 240, 255, 0.35);
}

.sm-hud-coords {
    font-size: 0.82rem;
    font-family: monospace;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.sm-hud-center {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    padding: 3px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.sm-hud-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-hud-tool-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.sm-hud-tool-btn.is-active {
    background: var(--sm-map-cyan);
    color: #030712;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}

.sm-hud-right {
    display: flex;
    align-items: center;
}

.sm-hud-status {
    font-size: 0.7rem;
    font-weight: 800;
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

/* DEDICATED MAP EDITOR SIDEBAR (380px) */
.sm-map-editor-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    background: linear-gradient(180deg, #070c18 0%, #04070e 100%);
    border-left: 1.5px solid rgba(0, 240, 255, 0.35);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 240, 255, 0.1);
    z-index: 50;
    display: flex;
    flex-direction: column;
    animation: smEditorSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #e2e8f0;
}

@keyframes smEditorSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.sm-editor-sb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(10, 16, 30, 0.7);
}

.sm-editor-sb-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sm-editor-badge {
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, #00f0ff 0%, #a855f7 100%);
    color: #030712;
    letter-spacing: 0.06em;
}

.sm-editor-sb-title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.sm-editor-sb-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sm-editor-sb-close:hover {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.12);
}

/* Editor Tabs Bar */
.sm-editor-tabs {
    display: flex;
    background: rgba(3, 7, 18, 0.85);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    padding: 4px;
    gap: 4px;
}

.sm-editor-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 8px 6px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.sm-editor-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.sm-editor-tab-btn.is-active {
    background: rgba(0, 240, 255, 0.14);
    color: var(--sm-map-cyan);
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Editor Panes & Forms */
.sm-editor-pane {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sm-editor-pane::-webkit-scrollbar {
    width: 5px;
}

.sm-editor-pane::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.25);
    border-radius: 3px;
}

.sm-inspector-empty-hint {
    background: rgba(15, 23, 42, 0.5);
    border: 1px dashed rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.84rem;
    line-height: 1.6;
    margin: 20px 0;
}

.sm-inspector-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sm-insp-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sm-insp-group label {
    font-size: 0.74rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sm-insp-id-badge {
    font-size: 0.65rem;
    font-family: monospace;
    font-weight: 800;
    color: var(--sm-map-cyan);
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 1px 6px;
    border-radius: 3px;
}

.sm-insp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sm-insp-input,
.sm-insp-select,
.sm-insp-textarea {
    background: rgba(2, 6, 23, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    padding: 8px 10px;
    color: #ffffff;
    font-size: 0.85rem;
    outline: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.sm-insp-input:focus,
.sm-insp-select:focus,
.sm-insp-textarea:focus {
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    background: rgba(2, 6, 23, 1);
}

.sm-insp-textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.4;
}

/* Coordinates Live Card */
.sm-insp-coords-card {
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sm-insp-card-title {
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--sm-map-cyan);
    letter-spacing: 0.05em;
}

.sm-insp-coord-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sm-coord-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #cbd5e1;
    font-weight: 700;
}

.sm-coord-mini-input {
    width: 65px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 4px;
    color: var(--sm-map-cyan);
    font-size: 0.8rem;
    font-family: monospace;
    font-weight: 800;
    text-align: right;
    padding: 2px 6px;
    outline: none;
}

.sm-coord-mini-input:focus {
    border-color: var(--sm-map-cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.35);
}

.sm-coord-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
    outline: none;
}

.sm-coord-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--sm-map-cyan);
    box-shadow: 0 0 8px var(--sm-map-cyan);
    cursor: pointer;
}

.sm-coord-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--sm-map-cyan);
    box-shadow: 0 0 8px var(--sm-map-cyan);
    cursor: pointer;
    border: none;
}

/* Inspector Actions */
.sm-insp-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.sm-btn-insp-save {
    background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
    border: none;
    color: #000000;
    border-radius: 6px;
    padding: 9px 16px;
    font-weight: 900;
    font-size: 0.84rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
}

.sm-btn-insp-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.55);
}

.sm-btn-insp-duplicate {
    flex: 1;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: #c084fc;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-btn-insp-duplicate:hover {
    background: #a855f7;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
}

.sm-btn-insp-delete {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #f43f5e;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-btn-insp-delete:hover {
    background: #f43f5e;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(244, 63, 94, 0.45);
}

/* Pins List Tab */
.sm-ed-list-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.sm-ed-search-input {
    background: rgba(2, 6, 23, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 6px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 0.82rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.sm-ed-search-input:focus {
    border-color: var(--sm-map-cyan);
}

.sm-btn-add-pin-toolbar {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: var(--sm-map-cyan);
    border-radius: 6px;
    padding: 7px 12px;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.sm-btn-add-pin-toolbar:hover {
    background: var(--sm-map-cyan);
    color: #030712;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.sm-ed-pins-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.sm-ed-pin-row {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-ed-pin-row:hover {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(0, 240, 255, 0.35);
}

.sm-ed-pin-row.is-active {
    border-color: var(--sm-map-cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.sm-ed-pin-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sm-ed-pin-info {
    flex: 1;
    min-width: 0;
}

.sm-ed-pin-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-ed-pin-meta {
    font-size: 0.7rem;
    color: #94a3b8;
    font-family: monospace;
}

.sm-ed-btn-row-edit {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: var(--sm-map-cyan);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
}

.sm-ed-btn-row-edit:hover {
    background: var(--sm-map-cyan);
    color: #030712;
}

.sm-btn-tool-secondary {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #cbd5e1;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sm-btn-tool-secondary:hover {
    border-color: var(--sm-map-cyan);
    color: var(--sm-map-cyan);
    background: rgba(0, 240, 255, 0.08);
}



