/* ============================================
   Workspace Section
   ============================================ */
.workspace-section {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 900;
    background: var(--void);
}

/* ============================================
   Sidebar
   ============================================ */
.workspace-sidebar {
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, var(--dark) 0%, var(--void) 100%);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.ws-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.ws-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 16px rgba(255, 107, 0, 0.30);
    transition: box-shadow 0.2s ease;
}

body[data-ws-theme="pascal"] .ws-brand-icon {
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.3);
}

.ws-brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
}

/* Navigation Items */
.ws-nav {
    padding: 1rem 0;
    flex: 1;
}

.ws-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.ws-nav-item:hover {
    color: var(--text);
    background: rgba(255, 107, 0, 0.07);
}

.ws-nav-item.active {
    color: var(--cyan);
    background: rgba(255, 107, 0, 0.09);
    border-left-color: var(--cyan);
}

.ws-nav-item svg {
    flex-shrink: 0;
}

/* Sidebar Footer */
.ws-sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.ws-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ws-user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--cyan), var(--amber));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.ws-user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ws-user-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-user-email {
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-logout-btn {
    width: 100%;
    padding: 0.6rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.ws-logout-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: rgba(255, 107, 0, 0.08);
}

/* ============================================
   Main Content Area
   ============================================ */
.workspace-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--navy);
}

.ws-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 251, 240, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-shrink: 0;
    transition: background 0.3s ease;
}

body[data-ws-theme="pascal"] .ws-main-header {
    background: rgba(12, 18, 33, 0.88);
}

.ws-main-header h2 {
    font-size: 1.3rem;
    color: var(--text);
    font-weight: 700;
}

body[data-ws-theme="pascal"] .ws-main-header h2 {
    color: var(--white);
}

.ws-launch-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.ws-main-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

/* ============================================
   Native Document Workbench
   ============================================ */
.ws-viewer-panel {
    margin: 1rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(255, 107, 0, 0.08);
}

.ws-viewer-toolbar,
.ws-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.ws-viewer-toolbar {
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.ws-upload-group,
.ws-tool-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.ws-file-input {
    display: none;
}

.ws-file-name {
    max-width: 360px;
    color: var(--text-dim);
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-action-btn,
.ws-icon-btn,
.ws-theme-select {
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.70);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ws-action-btn {
    padding: 0 0.9rem;
}

.ws-action-btn.primary {
    background: linear-gradient(135deg, var(--cyan), var(--orange));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.28);
}

.ws-action-btn.primary:hover {
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.45);
    transform: translateY(-1px);
}

.ws-icon-btn {
    width: 42px;
}

.ws-theme-select {
    padding: 0 0.55rem;
}

.ws-action-btn:hover,
.ws-icon-btn:hover,
.ws-theme-select:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.ws-action-btn.primary:hover {
    border-color: transparent;
}

.ws-search-bar {
    justify-content: flex-start;
}

.ws-search-input {
    flex: 1;
    min-width: 220px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    padding: 0 0.75rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ws-search-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.10);
}

.ws-coord-input {
    width: 92px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    padding: 0 0.6rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.ws-viewer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    min-height: 560px;
    min-width: 0;
}

.ws-split-viewer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    min-width: 0;
    min-height: 560px;
}

.ws-split-viewer.split-active.split-horizontal {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
}

.ws-split-viewer.split-active.split-vertical {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.ws-pane {
    position: relative;
    min-width: 0;
    min-height: 560px;
    border-right: 1px solid rgba(255, 107, 0, 0.12);
}

.ws-pane:last-child {
    border-right: 0;
}

.ws-pane-label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 0, 0.18);
    background: rgba(255, 251, 240, 0.92);
    color: var(--cyan);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    pointer-events: none;
}

.ws-svg-stage {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    background:
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        #0A0E1A;
    background-size: 40px 40px;
    cursor: grab;
    touch-action: none;
}

body[data-ws-theme="lightburst"] .ws-svg-stage,
body[data-ws-theme="seaside"] .ws-svg-stage,
body[data-ws-theme="citrus"] .ws-svg-stage {
    background:
        linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0,0,0,0.05) 1px, transparent 1px),
        #F8F9FC;
    background-size: 40px 40px;
}

.ws-svg-stage.dragging {
    cursor: grabbing;
}

.ws-mimic-stage {
    border-left: 1px solid rgba(255, 107, 0, 0.12);
}

.ws-svg-stage.drop-active {
    outline: 3px solid var(--cyan);
    outline-offset: -3px;
    background:
        linear-gradient(90deg, rgba(255, 107, 0, 0.10) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 107, 0, 0.10) 1px, transparent 1px),
        #ffffff;
}

.ws-drop-hint {
    position: absolute;
    inset: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--text-dim);
    text-align: center;
    border: 2px dashed rgba(255, 107, 0, 0.30);
    border-radius: 8px;
    pointer-events: none;
}

.ws-drop-hint strong {
    color: var(--cyan);
    font-size: 1rem;
}

.ws-svg-content,
.ws-mimic-content,
.ws-mimic-split-content,
.ws-telemetry-layer {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.ws-mimic-content {
    opacity: 0.42;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.ws-svg-content {
    z-index: 2;
}

.ws-mimic-content {
    z-index: 1;
}

.ws-mimic-split-content {
    z-index: 2;
}

.ws-telemetry-layer {
    z-index: 3;
    pointer-events: none;
}

.ws-svg-content svg,
.ws-mimic-content svg,
.ws-mimic-split-content svg,
.ws-telemetry-layer svg {
    display: block;
    max-width: none;
}

.ws-svg-content svg {
    background: #ffffff;
}

.ws-svg-image-layer {
    display: block;
    max-width: none;
    object-fit: fill;
    background: #ffffff;
    user-select: none;
    pointer-events: none;
}

.ws-tile-layer {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    contain: strict;
    pointer-events: none;
}

.ws-tile-image {
    position: absolute;
    display: block;
    max-width: none;
    object-fit: fill;
    user-select: none;
    pointer-events: none;
}

.ws-tile-image[data-loaded="pending"] {
    background: rgba(255, 107, 0, 0.04);
}

.ws-tile-image[data-loaded="error"] {
    background: rgba(230, 57, 70, 0.08);
}

.ws-marker {
    vector-effect: non-scaling-stroke;
    cursor: pointer;
}

.ws-marker-label {
    pointer-events: none;
    font-family: Arial, sans-serif;
}

.ws-telemetry-marker {
    cursor: pointer;
    pointer-events: auto;
    vector-effect: non-scaling-stroke;
}

@keyframes wsTelemetryPulse {
    0% {
        opacity: 0.45;
        transform: scale(0.82);
    }
    50% {
        opacity: 1;
        transform: scale(1.35);
    }
    100% {
        opacity: 0.45;
        transform: scale(0.82);
    }
}

.ws-telemetry-layer.telemetry-flashing .ws-telemetry-marker circle {
    animation: wsTelemetryPulse 1s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.ws-crosshair {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--orange);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: none;
    pointer-events: none;
}

.ws-crosshair::before,
.ws-crosshair::after {
    content: "";
    position: absolute;
    background: var(--orange);
}

.ws-crosshair::before {
    left: 50%;
    top: -8px;
    width: 2px;
    height: 36px;
}

.ws-crosshair::after {
    top: 50%;
    left: -8px;
    width: 36px;
    height: 2px;
}

.ws-inspector {
    border-left: 1px solid var(--glass-border);
    background: rgba(255, 251, 240, 0.88);
    padding: 0.75rem;
    overflow-y: auto;
    transition: background 0.3s ease;
    min-height: 0;
}

body[data-ws-theme="pascal"] .ws-inspector {
    background: rgba(255, 255, 255, 0.05);
}

.ws-status {
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
}

.ws-coordinate-readout {
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 107, 0, 0.08);
    color: var(--text);
    font-family: Consolas, monospace;
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}

.ws-visible-readout {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 184, 0, 0.10);
    color: var(--text-dim);
    font-family: Consolas, monospace;
    font-size: 0.78rem;
    margin-bottom: 0.75rem;
}

.ws-search-results {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: clamp(180px, 32vh, 420px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.15rem;
}

.ws-floating-search-panel {
    position: absolute;
    top: 58px;
    right: 14px;
    z-index: 18;
    width: min(360px, calc(100% - 28px));
    max-height: min(64vh, 470px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 46px rgba(12, 18, 32, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    pointer-events: auto;
}

.ws-floating-search-panel[hidden] {
    display: none;
}

.ws-floating-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ws-floating-search-close {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    cursor: pointer;
}

.ws-floating-search-summary {
    padding: 0.4rem 0.65rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.76rem;
}

.ws-floating-search-results {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    padding: 0.55rem 0.55rem 0.65rem;
}

body[data-ws-theme="pascal"] .ws-floating-search-panel {
    background: rgba(10, 14, 26, 0.88);
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

/* ============================================
   Projects Grid
   ============================================ */
.ws-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.ws-project-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.ws-project-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 107, 0, 0.14);
}

.ws-project-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.ws-project-card h4 {
    font-size: 1.1rem;
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.ws-project-card p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.ws-card-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.ws-enhance-btn,
.ws-open-btn {
    margin-top: 0.5rem;
    padding: 0.3rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(255, 107, 0, 0.35);
    border-radius: 6px;
    color: var(--cyan);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.02em;
}

.ws-open-btn {
    background: rgba(255, 107, 0, 0.10);
    border-color: var(--cyan);
}

.ws-enhance-btn:hover:not(:disabled),
.ws-open-btn:hover:not(:disabled) {
    background: rgba(255, 107, 0, 0.15);
    border-color: var(--cyan);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.18);
}

.ws-enhance-btn:disabled,
.ws-open-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.ws-project-card.active {
    border-color: var(--cyan);
    background: rgba(255, 107, 0, 0.07);
    box-shadow: 0 0 0 1px rgba(255, 107, 0, 0.25);
}

.ws-project-card.ws-open-workspace {
    border-style: dashed;
    border-color: var(--cyan);
    background: rgba(255, 107, 0, 0.04);
}

/* ============================================
   Semantic Search Results (Qdrant + Ragas)
   ============================================ */
.ws-search-result {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.ws-search-result:hover {
    background: rgba(255, 107, 0, 0.07);
    border-color: var(--cyan);
}

.ws-search-result.active {
    background: rgba(0, 212, 255, 0.10);
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.12);
}

.ws-search-result.suggestion {
    border-style: dashed;
    background: rgba(255, 184, 0, 0.08);
}

.ws-result-title {
    font-size: 0.88rem;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-result-meta {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: monospace;
}

.ws-search-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    padding: 0.3rem 0;
}

/* Ragas quality metrics bar */
.ws-metrics {
    display: flex;
    gap: 1rem;
    padding: 0.4rem 0;
    font-size: 0.72rem;
    color: var(--cyan);
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   URL Crawl Form (Crawl4AI)
   ============================================ */
.ws-crawl-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.ws-crawl-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.65rem;
    color: var(--text);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s;
}

.ws-crawl-input:focus {
    border-color: var(--amber);
}

.ws-crawl-btn {
    padding: 0.4rem 0.85rem;
    background: transparent;
    border: 1px solid rgba(255, 184, 0, 0.5);
    border-radius: 6px;
    color: var(--amber);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

.ws-crawl-btn:hover:not(:disabled) {
    background: rgba(255, 184, 0, 0.1);
    border-color: var(--amber);
}

.ws-crawl-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.ws-crawl-msg {
    font-size: 0.78rem;
    color: var(--green);
    margin-top: 0.25rem;
    display: none;
}

.ws-project-card.ws-open-workspace:hover {
    background: rgba(255, 107, 0, 0.09);
}

/* ============================================
   Iframe Container
   ============================================ */
.ws-iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
}

.ws-iframe-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 251, 240, 0.94);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    transition: background 0.3s ease;
}

body[data-ws-theme="pascal"] .ws-iframe-toolbar {
    background: rgba(8, 12, 20, 0.9);
}

.ws-iframe-back {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.ws-iframe-back:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.14);
}

.ws-iframe-title {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.ws-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: var(--void);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .workspace-sidebar {
        width: 220px;
    }

    .ws-viewer-layout {
        grid-template-columns: 1fr;
    }

    .ws-inspector {
        border-left: 0;
        border-top: 1px solid var(--glass-border);
        max-height: 220px;
    }

    .ws-floating-search-panel {
        top: auto;
        right: 10px;
        bottom: 10px;
        width: min(420px, calc(100% - 20px));
        max-height: 42vh;
    }

    .ws-split-viewer.split-active.split-horizontal,
    .ws-split-viewer.split-active.split-vertical {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    }

    .ws-pane {
        min-height: 420px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 107, 0, 0.12);
    }

    .ws-svg-stage {
        min-height: 420px;
    }

    .ws-projects-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .ws-main-header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .workspace-section {
        flex-direction: column;
    }

    .workspace-sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .ws-nav {
        display: flex;
        padding: 0;
        overflow-x: auto;
    }

    .ws-nav-item {
        padding: 0.5rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .ws-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--cyan);
    }

    .ws-sidebar-footer {
        display: none;
    }

    .ws-viewer-panel {
        margin: 0.5rem;
    }

    .ws-upload-group,
    .ws-tool-group,
    .ws-search-bar {
        width: 100%;
    }

    .ws-file-name {
        max-width: 160px;
    }

    .ws-search-input {
        min-width: 100%;
    }

    .ws-search-results {
        max-height: 220px;
    }

    .ws-floating-search-panel {
        left: 8px;
        right: 8px;
        width: auto;
    }
}

/* ============================================
   Premium Button Overrides (Part 1c)
   ============================================ */
body[data-ws-theme="pascal"] .ws-action-btn,
body[data-ws-theme="pascal"] .ws-icon-btn {
    background: rgba(255,255,255,0.06);
    border-color: rgba(0, 212, 255, 0.2);
    color: rgba(255,255,255,0.85);
}
body[data-ws-theme="pascal"] .ws-action-btn:hover,
body[data-ws-theme="pascal"] .ws-icon-btn:hover {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.08), 0 4px 12px rgba(0,0,0,0.4);
}
body[data-ws-theme="pascal"] .ws-action-btn.primary {
    background: linear-gradient(135deg, #00D4FF, #0088CC);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
}

/* ============================================
   Refined Inspector (Part 1d)
   ============================================ */
.ws-inspector {
    border-left: 1px solid rgba(0, 212, 255, 0.1);
}
body[data-ws-theme="pascal"] .ws-inspector {
    background: rgba(6, 9, 18, 0.95);
    backdrop-filter: blur(20px);
}
.ws-panel-section {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 8px;
}

/* ============================================
   Pane Label Refinement (Part 1e)
   ============================================ */
body[data-ws-theme="pascal"] .ws-pane-label {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.25);
    color: #00D4FF;
    backdrop-filter: blur(8px);
}

/* ============================================
   Document Tabs
   ============================================ */
.ws-doc-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 8px 0;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    overflow-x: auto;
    scrollbar-width: none;
    min-height: 38px;
}
.ws-doc-tabs::-webkit-scrollbar { display: none; }

.ws-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 6px;
    border-radius: 6px 6px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
    max-width: 180px;
    transition: all 0.15s ease;
    position: relative;
    bottom: -1px;
}
.ws-tab:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8); }
.ws-tab.active {
    background: rgba(10,14,26,0.95);
    border-color: rgba(0, 212, 255, 0.2);
    color: rgba(255,255,255,0.92);
}
.ws-tab-thumb {
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
    image-rendering: pixelated;
}
.ws-tab-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.ws-tab-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0, 212, 255, 0.15);
    color: #00D4FF;
    flex-shrink: 0;
}
.ws-tab-badge-mimic { background: rgba(255,184,0,0.15); color: #FFB800; }
.ws-tab-add {
    width: 26px;
    height: 26px;
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ws-tab-add:hover { border-color: rgba(0, 212, 255, 0.5); color: #00D4FF; }

/* ============================================
   Zoom Slider
   ============================================ */
.ws-zoom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.12);
    outline: none;
    cursor: pointer;
}
.ws-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 6px rgba(0, 212, 255, 0.4);
    cursor: pointer;
}
.ws-zoom-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cyan);
    border: none;
    cursor: pointer;
}
.ws-zoom-pct {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Contextual HUD
   ============================================ */
.ws-hud {
    position: absolute;
    top: 44px;
    left: 10px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(6, 9, 18, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 212, 255, 0.15);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.4s ease;
    opacity: 1;
}
.ws-hud.faded { opacity: 0; }
.ws-hud-sep { opacity: 0.3; }

/* ============================================
   Mini-map
   ============================================ */
.ws-minimap-wrap {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 90;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.2);
    background: rgba(6, 9, 18, 0.85);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.ws-minimap-wrap:hover { opacity: 1 !important; }
.ws-minimap { display: block; }
.ws-minimap-vp {
    position: absolute;
    border: 1.5px solid rgba(0, 212, 255, 0.8);
    background: rgba(0, 212, 255, 0.08);
    pointer-events: none;
    border-radius: 2px;
    transition: left 0.08s, top 0.08s, width 0.08s, height 0.08s;
}

/* ============================================
   Compass Control
   ============================================ */
.ws-compass {
    position: absolute;
    bottom: 122px;
    right: 16px;
    z-index: 90;
    width: 44px;
    height: 44px;
    opacity: 0.65;
    transition: opacity 0.2s;
    cursor: pointer;
}
.ws-compass:hover { opacity: 1; }
.ws-compass-ring { position: relative; }
.ws-compass-dots { position: absolute; top: 0; left: 0; width: 40px; height: 40px; }
.ws-compass-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.2s;
}
.ws-compass-dot.following { background: #00D4FF; box-shadow: 0 0 6px rgba(0, 212, 255, 0.6); }

/* ============================================
   Comparison Wheel
   ============================================ */
.ws-wheel-trigger {
    position: absolute;
    top: 44px;
    right: 10px;
    z-index: 91;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(6, 9, 18, 0.8);
    color: rgba(0, 212, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}
.ws-wheel-trigger:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.7);
    color: #00D4FF;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.ws-wheel-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    width: 220px;
    height: 220px;
}
.ws-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(6, 9, 18, 0.95);
    border: 1.5px solid rgba(0, 212, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}
.ws-wheel-center:hover { background: rgba(0, 212, 255, 0.15); color: #fff; }

.ws-wheel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 212, 255, 0.25);
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(12px);
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transform-origin: center center;
    transform: translate(calc(cos(var(--angle)) * 80px), calc(sin(var(--angle)) * 80px));
    transition: all 0.2s ease;
    font-size: 11px;
}
.ws-wheel-item:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.25);
    color: #fff;
    transform: translate(calc(cos(var(--angle)) * 80px), calc(sin(var(--angle)) * 80px)) scale(1.1);
}
.ws-wheel-item.active {
    border-color: #00D4FF;
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
    color: #00D4FF;
}
.ws-wheel-icon { font-size: 18px; line-height: 1; }
.ws-wheel-label { font-size: 9px; font-weight: 600; opacity: 0.8; letter-spacing: 0.5px; }

/* Backdrop blur overlay behind wheel */
.ws-wheel-backdrop {
    position: absolute;
    inset: 0;
    z-index: 199;
    background: rgba(6,9,18,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ============================================
   Quick Jump Panel
   ============================================ */
.ws-quickjump-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(6, 9, 18, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    animation: ws-qj-in 0.15s ease;
}
@keyframes ws-qj-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ws-quickjump-panel {
    width: 100%;
    max-width: 580px;
    background: rgba(10, 14, 26, 0.97);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.8), 0 0 0 1px rgba(0, 212, 255, 0.06);
}
.ws-quickjump-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4);
}
.ws-quickjump-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    font-family: inherit;
    caret-color: #00D4FF;
}
.ws-quickjump-input::placeholder { color: rgba(255,255,255,0.25); }
.ws-quickjump-esc {
    font-size: 10px;
    padding: 2px 6px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: rgba(255,255,255,0.4);
    font-family: inherit;
    cursor: pointer;
}
.ws-quickjump-results {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.2) transparent;
}
.ws-quickjump-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    padding: 4px 18px;
}
.ws-quickjump-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    cursor: pointer;
    transition: background 0.1s;
    border-radius: 0;
}
.ws-quickjump-item:hover,
.ws-quickjump-item.selected {
    background: rgba(0, 212, 255, 0.08);
}
.ws-quickjump-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: #00D4FF;
}
.ws-quickjump-item-main { flex: 1; min-width: 0; }
.ws-quickjump-item-title { font-size: 13px; color: rgba(255,255,255,0.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-quickjump-item-sub { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 1px; }
.ws-quickjump-item-coord {
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    color: rgba(0, 212, 255, 0.6);
    background: rgba(0, 212, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}
.ws-quickjump-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 11px;
    color: rgba(255,255,255,0.3);
}
.ws-quickjump-footer kbd {
    font-size: 10px;
    padding: 1px 5px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    font-family: inherit;
    margin-right: 2px;
}

/* ============================================
   Category Filter Bar
   ============================================ */
.ws-category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 0 4px;
    min-height: 0;
}
.ws-category-filter-bar:empty { display: none; }
.ws-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.07);
    color: rgba(255,255,255,0.72);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1.3;
}
.ws-cat-pill:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: rgba(0, 212, 255, 0.5);
    color: #fff;
}
.ws-cat-pill.active {
    background: rgba(0, 212, 255, 0.28);
    border-color: #00D4FF;
    color: #fff;
    font-weight: 600;
}
.ws-cat-pill .ws-cat-pill-count {
    opacity: 0.6;
    font-size: 10px;
}
.ws-cat-pill-all {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255,255,255,0.05);
}
.ws-cat-pill-all.active {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
}

/* ============================================
   Marker Info Tooltip / Lightbox
   ============================================ */
.ws-marker-tooltip {
    position: absolute;
    z-index: 200;
    width: 240px;
    max-width: calc(100vw - 24px);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(10, 14, 26, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    padding: 0;
    overflow: hidden;
    pointer-events: all;
    animation: wsTooltipIn 0.15s ease;
}
@keyframes wsTooltipIn {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)  scale(1); }
}
.ws-marker-tooltip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.12);
    gap: 8px;
}
.ws-marker-tooltip-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    flex: 1;
    word-break: break-word;
}
.ws-marker-tooltip-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s;
}
.ws-marker-tooltip-close:hover { color: #fff; }
.ws-marker-tooltip-body {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ws-marker-tooltip-cat {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: #00D4FF;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ws-marker-tooltip-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.65);
}
.ws-marker-tooltip-meta dt { font-weight: 600; color: rgba(255,255,255,0.4); }
.ws-marker-tooltip-meta dd { margin: 0; word-break: break-word; }
.ws-marker-tooltip-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    max-height: 72px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}
.ws-marker-tooltip-footer {
    padding: 8px 12px 10px;
    display: flex;
    gap: 6px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}
.ws-marker-tooltip-footer button {
    flex: 1;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.1);
    color: #00D4FF;
    font-weight: 600;
    transition: background 0.15s;
}
.ws-marker-tooltip-footer button:hover { background: rgba(0, 212, 255, 0.22); }
.ws-marker-tooltip-footer .ws-tt-copy {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.6);
}
.ws-marker-tooltip-footer .ws-tt-copy:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ============================================
   Improved Minimap
   ============================================ */
.ws-minimap-wrap {
    cursor: crosshair !important;
    user-select: none;
    touch-action: none;
}
.ws-minimap-label {
    position: absolute;
    top: 3px;
    left: 6px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(0, 212, 255, 0.6);
    letter-spacing: 0.06em;
    pointer-events: none;
    text-transform: uppercase;
}
/* Remove minimap vp transition during drag for immediate response */
.ws-minimap-vp {
    transition: none !important;
}

/* ============================================
   Mobile & Touch Improvements
   ============================================ */
@media (max-width: 768px) {
    .ws-upload-group { flex-wrap: wrap; }
    .ws-minimap-wrap { bottom: 8px; right: 8px; }
    .ws-marker-tooltip { width: 200px; }
    .ws-category-filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }
    .ws-cat-pill { flex-shrink: 0; }
    .ws-svg-stage { min-height: 320px; }
}

/* ============================================
   Category Filter Bar
   ============================================ */
.ws-category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 0 4px;
    min-height: 0;
}
.ws-category-filter-bar:empty { display: none; }
.ws-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.07);
    color: rgba(255,255,255,0.72);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    line-height: 1.3;
}
.ws-cat-pill:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: rgba(0, 212, 255, 0.5);
    color: #fff;
}
.ws-cat-pill.active {
    background: rgba(0, 212, 255, 0.28);
    border-color: #00D4FF;
    color: #fff;
    font-weight: 600;
}
.ws-cat-pill .ws-cat-pill-count {
    opacity: 0.6;
    font-size: 10px;
}
.ws-cat-pill-all {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255,255,255,0.05);
}
.ws-cat-pill-all.active {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
}

/* ============================================
   Marker Info Tooltip / Lightbox
   ============================================ */
.ws-marker-tooltip {
    position: absolute;
    z-index: 200;
    width: 240px;
    max-width: calc(100vw - 24px);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(10, 14, 26, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    padding: 0;
    overflow: hidden;
    pointer-events: all;
    animation: wsTooltipIn 0.15s ease;
}
@keyframes wsTooltipIn {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)  scale(1); }
}
.ws-marker-tooltip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 12px 8px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.12);
    gap: 8px;
}
.ws-marker-tooltip-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.35;
    flex: 1;
    word-break: break-word;
}
.ws-marker-tooltip-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s;
}
.ws-marker-tooltip-close:hover { color: #fff; }
.ws-marker-tooltip-body {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ws-marker-tooltip-cat {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: #00D4FF;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ws-marker-tooltip-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.65);
}
.ws-marker-tooltip-meta dt { font-weight: 600; color: rgba(255,255,255,0.4); }
.ws-marker-tooltip-meta dd { margin: 0; word-break: break-word; }
.ws-marker-tooltip-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    max-height: 72px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}
.ws-marker-tooltip-footer {
    padding: 8px 12px 10px;
    display: flex;
    gap: 6px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}
.ws-marker-tooltip-footer button {
    flex: 1;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.1);
    color: #00D4FF;
    font-weight: 600;
    transition: background 0.15s;
}
.ws-marker-tooltip-footer button:hover { background: rgba(0, 212, 255, 0.22); }
.ws-marker-tooltip-footer .ws-tt-copy {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.6);
}
.ws-marker-tooltip-footer .ws-tt-copy:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ============================================
   Improved Minimap
   ============================================ */
.ws-minimap-wrap {
    cursor: crosshair !important;
    user-select: none;
    touch-action: none;
}
.ws-minimap-label {
    position: absolute;
    top: 3px;
    left: 6px;
    font-size: 9px;
    font-weight: 700;
    color: rgba(0, 212, 255, 0.6);
    letter-spacing: 0.06em;
    pointer-events: none;
    text-transform: uppercase;
}

/* ============================================
   Mobile & Touch Improvements
   ============================================ */
@media (max-width: 768px) {
    .ws-upload-group {
        flex-wrap: wrap;
    }
    .ws-minimap-wrap {
        bottom: 8px;
        right: 8px;
    }
    .ws-marker-tooltip {
        width: 200px;
    }
    .ws-category-filter-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }
    .ws-cat-pill { flex-shrink: 0; }
}
