/* ============================================
   Human Genome Explorer — Minimal / Disappearing UI
   UI fades out after 3s idle, reappears on interaction.
   Focus is 100% on the 3D visualization.
   ============================================ */

:root {
    --bg: #08080c;
    --panel: rgba(8, 8, 16, 0.65);
    --panel-hover: rgba(12, 12, 24, 0.85);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: rgba(255, 255, 255, 0.7);
    --text-dim: rgba(255, 255, 255, 0.4);
    --text-bright: rgba(255, 255, 255, 0.92);
    --accent: #7dd3fc;          /* sky-300 */
    --accent-dim: rgba(125, 211, 252, 0.15);
    --accent-purple: #c4b5fd;   /* violet-300 */
    --accent-pink: #f9a8d4;     /* pink-300 */
    --accent-green: #86efac;    /* green-300 */
    --radius: 10px;
    --radius-sm: 6px;
    --blur: blur(12px);
    --fade-speed: 0.4s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

/* ── 3D Canvas ──────────────────────────────── */
#container { position: fixed; inset: 0; }
canvas { display: block; touch-action: none; }

/* ── UI Overlay ─────────────────────────────── */
#ui {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}
#ui > * { pointer-events: auto; }

/* ── Auto-hide: all fadeable elements ───────── */
#controls-panel,
#file-drop,
#annotations,
#breadcrumb,
.panel-toggle,
.epigenetic-legend {
    transition: opacity var(--fade-speed) ease;
}

/* Header stays visible at all times */
#header { transition: none; }

.ui-idle #controls-panel,
.ui-idle #file-drop,
.ui-idle #annotations,
.ui-idle #breadcrumb,
.ui-idle .panel-toggle,
.ui-idle .epigenetic-legend {
    opacity: 0;
    pointer-events: none;
}

/* Always keep header visible — never fade with idle UI */
.ui-idle #header {
    opacity: 1;
    pointer-events: auto;
}

/* Keep interactive panels visible even when idle */
.ui-idle #info-panel,
.ui-idle #snp-stats,
.ui-idle #gene-search-results,
.ui-idle #settings-panel.open,
.ui-idle #settings-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* ── Header — full-width top nav ────────────── */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 64px;
    background: rgba(5, 11, 24, 0.92);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    height: 52px;
    width: auto;
    max-width: 360px;
    object-fit: contain;
    object-position: left center;
    display: block;
}

/* ── Controls Panel — compact, bottom-left ──── */
#controls-panel {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: var(--panel);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 12px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    width: 200px;
}

#controls-panel::-webkit-scrollbar { width: 3px; }
#controls-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

#controls-panel h3 {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin: 10px 0 6px;
}
#controls-panel h3:first-child { margin-top: 0; }

#controls-panel p {
    margin: 3px 0;
    color: var(--text-dim);
    font-size: 11px;
}

kbd {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    font-size: 10px;
    margin-right: 3px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* ── View Selector — horizontal pills ───────── */
#view-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.view-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    font-size: 11px;
    transition: all 0.15s ease;
    flex: 1 1 45%;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-color: var(--border-hover);
}

.view-btn.active {
    background: var(--accent-dim);
    border-color: rgba(125, 211, 252, 0.25);
    color: var(--accent);
}

#toggle-colorblind.active {
    background: rgba(134, 239, 172, 0.12);
    border-color: rgba(134, 239, 172, 0.3);
    color: var(--accent-green);
}

/* ── 30nm Mode Toggle (compact horizontal row) ─ */
#fiber-30nm-toggle {
    margin: 4px 0 0;
    padding: 0;
    animation: fadeIn 0.15s ease;
}

.mode-buttons {
    display: flex;
    gap: 3px;
}

.mode-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.mode-btn:hover {
    background: rgba(196, 181, 253, 0.06);
    color: var(--text);
}

.mode-btn.active {
    background: rgba(196, 181, 253, 0.1);
    border-color: rgba(196, 181, 253, 0.25);
    color: var(--accent-purple);
}

/* ── Collapsible Navigation Hints ──────────── */
.nav-hints summary {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin: 10px 0 6px;
    cursor: pointer;
    list-style: none;
}
.nav-hints summary::before {
    content: '▸ ';
    font-size: 8px;
}
.nav-hints[open] summary::before {
    content: '▾ ';
}
.nav-hints p {
    margin: 2px 0;
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── View Labels (bottom center) ────────────── */
#view-labels {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    z-index: 20;
}

.view-label {
    background: var(--panel);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-bright);
    border: 1px solid var(--border);
    margin-bottom: 6px;
    display: inline-block;
    font-weight: 500;
}

.view-label.small {
    font-size: 11px;
    padding: 4px 14px;
    color: var(--text-dim);
    display: block;
    font-weight: 400;
}

/* ── File Drop Zone — compact pill ─────────── */
#file-drop {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    background: var(--panel);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 11px;
    white-space: nowrap;
}

#file-drop:hover,
#file-drop.drag-over {
    border-color: var(--accent);
    background: var(--panel-hover);
}

#file-drop p { margin: 0; display: inline; }
#file-drop .hint { display: none; }

#file-input { display: none; }

/* ── SNP Stats ──────────────────────────────── */
#snp-stats {
    position: absolute;
    top: 64px;
    right: 16px;
    width: 150px;
    padding: 10px 14px;
    background: var(--panel);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid rgba(134, 239, 172, 0.12);
    border-radius: var(--radius);
}

#snp-stats h3 {
    color: var(--accent-green);
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* ── Info Panel — stays visible ─────────────── */
#info-panel {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 320px;
    max-height: 380px;
    overflow-y: auto;
    padding: 16px;
    background: var(--panel-hover);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius);
}

#info-panel h2 {
    color: var(--accent-purple);
    margin-bottom: 8px;
    padding-right: 28px;
    font-size: 15px;
    font-weight: 600;
}

#info-panel p { line-height: 1.5; color: var(--text); }

#close-info {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

#close-info:hover {
    background: rgba(255, 100, 100, 0.15);
    border-color: rgba(255, 100, 100, 0.3);
    color: #fca5a5;
}

#gene-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

#info-panel a, #gene-details a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(125, 211, 252, 0.3);
    transition: border-color 0.15s;
}
#info-panel a:hover, #gene-details a:hover {
    border-bottom-color: var(--accent);
}

/* ── Loading Screen ─────────────────────────── */
#loading {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

#loading.hidden { opacity: 0; pointer-events: none; }

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ────────────────────────────────── */
.hidden { display: none !important; }
.relative { position: relative; }
.flex-gap { display: flex; gap: 4px; }
.flex-wrap-gap { display: flex; gap: 4px; flex-wrap: wrap; }
.full-width { width: 100%; }
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 6px; }
.fs-small { font-size: 10px; }

.hic-url-field {
    flex: 1;
    font-size: 10px;
    padding: 4px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #e2e8f0;
}

.hic-btn-small {
    font-size: 10px;
    padding: 4px 8px;
}

/* ── Chromosome Selector Grid ──────────────── */
.chr-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 8px;
}

.chr-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 3px 0;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.15s ease;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.chr-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-color: var(--border-hover);
}

.chr-btn.active {
    background: var(--accent-dim);
    border-color: rgba(125, 211, 252, 0.25);
    color: var(--accent);
}

.chr-btn.sex {
    color: var(--accent-pink);
}

.chr-btn.sex.active {
    background: rgba(249, 168, 212, 0.12);
    border-color: rgba(249, 168, 212, 0.25);
    color: var(--accent-pink);
}

/* ── Chromosome Switch Loading ─────────────── */
.chr-grid.switching {
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}
.chr-grid.switching .chr-btn.active {
    animation: chr-pulse 0.8s ease-in-out infinite;
}
@keyframes chr-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Gene Labels (CSS2D) ────────────────────── */
.gene-label {
    background: var(--panel);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-weight: 500;
}

.gene-label:hover {
    background: var(--panel-hover);
    border-color: var(--accent-purple);
    color: var(--text-bright);
    transform: scale(1.05);
}

/* Label Color setting overrides */
body.label-light .gene-label { color: #f8fafc; }
body.label-light .gene-label:hover { color: #ffffff; }
body.label-dark .gene-label {
    color: #1e293b;
    background: rgba(241, 245, 249, 0.92);
    border-color: rgba(30, 41, 59, 0.2);
}
body.label-dark .gene-label:hover {
    color: #0f172a;
    background: rgba(226, 232, 240, 0.96);
    border-color: rgba(30, 41, 59, 0.35);
}

.gene-label.important {
    border-color: rgba(249, 168, 212, 0.3);
    color: var(--accent-pink);
}

.gene-label.landmark {
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    font-weight: 600;
    font-size: 12px;
}

/* ── SNP Marker Tooltip ─────────────────────── */
.snp-tooltip {
    background: var(--panel);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--accent-green);
    border: 1px solid rgba(134, 239, 172, 0.15);
}

/* ── Annotations — right side spotlight cards ─── */
#annotations {
    position: absolute;
    top: 64px;
    right: 16px;
    max-width: 220px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    pointer-events: auto;
    padding-right: 4px;
}

#annotations::-webkit-scrollbar { width: 3px; }
#annotations::-webkit-scrollbar-track { background: transparent; }
#annotations::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.annotation {
    background: rgba(30,41,59,0.6);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(71,85,105,0.3);
    margin-bottom: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    animation: fadeInRight 0.3s ease;
}

.annotation:hover {
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(100,150,255,0.2);
}

.annotation .annotation-title {
    font-weight: bold;
    color: #e2e8f0;
    margin-bottom: 4px;
    font-size: 11px;
}

.annotation .annotation-text {
    color: #94a3b8;
    line-height: 1.4;
    font-size: 10px;
}

.annotation .annotation-step {
    font-size: 8px;
    color: #475569;
    margin-top: 4px;
    text-align: right;
}

.annotation.highlight {
    background: rgba(74,144,217,0.15);
    border-color: rgba(74,144,217,0.3);
}

.annotation.highlight .annotation-title { color: #e2e8f0; }

.annotation.spotlight-active { outline: 2px solid rgba(59,130,246,0.6); }

/* Collapsed cards — title only, text hidden */
.annotation.collapsed {
    padding: 6px 10px;
}
.annotation.collapsed .annotation-text,
.annotation.collapsed .annotation-step {
    display: none;
}
.annotation.collapsed .annotation-title {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.annotation.collapsed .annotation-title::after {
    content: '›';
    font-size: 14px;
    color: #475569;
    font-weight: 300;
    line-height: 1;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(6px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ── Epigenetic Legend ───────────────────────── */
.epigenetic-legend {
    position: fixed;
    bottom: 16px;
    left: 230px;
    background: var(--panel);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text);
    z-index: 100;
    animation: fadeIn 0.3s ease;
}
.epigenetic-legend strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-bright);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.legend-row { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.legend-row .swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* ── Breadcrumb ─────────────────────────────── */
#breadcrumb {
    position: fixed;
    top: 0;
    height: 64px;
    line-height: 64px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-dim);
    font-size: 11px;
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    pointer-events: none;
    z-index: 10;
    letter-spacing: 0.04em;
}

/* ── Gene Search ────────────────────────────── */
#gene-search {
    width: 100%;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 12px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease;
}

#gene-search::placeholder { color: var(--text-dim); }
#gene-search:focus { border-color: rgba(125, 211, 252, 0.3); }

.view-btn:focus-visible,
.mode-btn:focus-visible,
#close-info:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

#gene-search:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

#gene-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 180px;
    overflow-y: auto;
    background: var(--panel-hover);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-hover);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 100;
}

.gene-search-result {
    padding: 5px 8px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.gene-search-result:hover { background: rgba(255, 255, 255, 0.04); }

.gene-search-result-name {
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 12px;
}

.gene-search-result-desc {
    color: var(--text-dim);
    font-size: 10px;
    margin-top: 1px;
}

/* ── Panel toggle (mobile) ──────────────────── */
.panel-toggle {
    display: none;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 20;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
    #controls-panel {
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        max-height: 40vh;
    }
    #file-drop { left: auto; right: 8px; }
    #info-panel { width: auto; left: 8px; right: 8px; max-height: 50vh; }
    #header { left: 8px; right: 8px; }
    #annotations { top: auto; bottom: 50%; left: 8px; right: 8px; max-width: 100%; max-height: 20vh; }
    #view-selector { flex-direction: row; flex-wrap: wrap; }
    .view-btn { flex: 1 1 45%; text-align: center; }
    .panel-toggle { display: block; }
    #controls-panel.collapsed { display: none; }
}

/* ── Settings Panel ────────────────────────────── */
#settings-panel {
    position: fixed;
    bottom: 16px;
    left: 224px;
    width: 280px;
    max-height: calc(100vh - 48px);
    background: var(--settings-panel-bg, rgba(8, 8, 16, 0.82));
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    z-index: 50;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
#settings-panel.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#settings-panel.hidden { display: none; }

/* Keep settings visible during idle */
.ui-idle #settings-panel.open {
    opacity: 1;
    pointer-events: auto;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 6px;
    border-bottom: 1px solid var(--border);
}
.settings-header h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-bright);
    letter-spacing: 0.02em;
}
.settings-close {
    width: 24px; height: 24px;
    background: transparent; border: 1px solid var(--border);
    border-radius: 50%; color: var(--text-dim);
    font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease;
}
.settings-close:hover {
    background: rgba(255,100,100,0.15);
    border-color: rgba(255,100,100,0.3);
    color: #fca5a5;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px 8px;
}
.settings-content::-webkit-scrollbar { width: 3px; }
.settings-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.settings-content h3 {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin: 10px 0 6px;
}
.settings-content h3:first-child { margin-top: 6px; }

/* Setting rows */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    gap: 8px;
}
.setting-row-slider {
    flex-direction: column;
    align-items: stretch;
}
.setting-slider-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-label {
    font-size: 11px;
    color: var(--text);
    flex: 1;
    min-width: 0;
}
.setting-note {
    font-size: 9px;
    color: var(--text-dim);
}
.setting-value {
    font-size: 10px;
    color: var(--accent);
    font-family: 'SF Mono', 'Cascadia Code', monospace;
    min-width: 32px;
    text-align: right;
}

/* Toggle switch */
.setting-toggle {
    width: 34px; height: 18px;
    border-radius: 9px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}
.setting-toggle::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: transform 0.15s ease, background 0.15s ease;
}
.setting-toggle.on {
    background: var(--accent-dim);
    border-color: rgba(125,211,252,0.3);
}
.setting-toggle.on::after {
    transform: translateX(16px);
    background: var(--accent);
}

/* Range slider */
.setting-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    outline: none;
    margin: 4px 0 2px;
}
.setting-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}
.setting-range::-moz-range-thumb {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

/* Select dropdown */
.setting-select {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 3px 6px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    max-width: 120px;
}
.setting-select:focus { border-color: rgba(125,211,252,0.3); }
.setting-select option { background: #12121c; color: #ddd; }

/* Color preset buttons */
.color-preset-group {
    display: flex;
    gap: 6px;
}
.color-preset-btn {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.color-preset-btn:hover { transform: scale(1.1); }
.color-preset-btn.active {
    border-color: var(--accent);
    box-shadow: 0 0 6px rgba(125,211,252,0.3);
}

/* Folder row */
.setting-folder {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}
.setting-folder-name { color: var(--text-dim); }
.setting-folder-change {
    color: var(--accent);
    text-decoration: none;
    font-size: 10px;
}
.setting-folder-change:hover { text-decoration: underline; }

/* Action button */
.setting-action-btn {
    width: 100%;
    padding: 5px 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.setting-action-btn:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border-color: var(--border-hover);
}

/* Footer */
.settings-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.settings-reset {
    color: var(--text-dim);
    font-size: 10px;
    text-decoration: none;
    transition: color 0.15s ease;
}
.settings-reset:hover { color: var(--accent-pink); }

/* Backdrop */
#settings-backdrop {
    position: fixed;
    inset: 0;
    z-index: 49;
}

/* High contrast mode */
body.high-contrast {
    --border: rgba(255, 255, 255, 0.15);
    --text: rgba(255, 255, 255, 0.9);
    --text-dim: rgba(255, 255, 255, 0.6);
}

/* Focus indicator styles */
body.focus-bold :focus-visible { outline-width: 3px; }
body.focus-highlight :focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 8px rgba(125,211,252,0.4);
}

/* ── Settings panel responsive ─────────────── */
@media (max-width: 768px) {
    #settings-panel {
        left: 8px;
        right: 8px;
        bottom: 0;
        width: auto;
        max-height: 60vh;
        border-radius: var(--radius) var(--radius) 0 0;
    }
}

/* ── Profile Picker Modal ──────────────────── */
#profile-picker {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 8, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.profile-picker-modal {
    position: relative;
    background: rgba(12, 12, 20, 0.95);
    border: 1px solid var(--border-hover);
    border-radius: 16px;
    padding: 32px;
    min-width: 320px;
    max-width: 480px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.profile-picker-modal h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 24px;
    letter-spacing: 0.02em;
}

#profile-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Profile card */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    position: relative;
    color: var(--text);
    font-family: inherit;
    font-size: inherit;
}

.profile-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.profile-card.active {
    border-color: rgba(125, 211, 252, 0.3);
    background: var(--accent-dim);
}

.profile-card-avatar {
    font-size: 32px;
    line-height: 1;
}

.profile-card-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-bright);
}

.profile-card-new {
    border-style: dashed;
    opacity: 0.7;
}

.profile-card-new:hover {
    opacity: 1;
}

.profile-card-new .profile-card-avatar {
    font-size: 28px;
    color: var(--text-dim);
}

.profile-card-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
}

.profile-card:hover .profile-card-delete {
    opacity: 1;
}

.profile-card-delete:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #fca5a5;
}

/* New profile form */
.profile-new-form {
    text-align: center;
    min-width: 260px;
}

.profile-new-form h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 16px;
}

.profile-name-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    margin-bottom: 16px;
}

.profile-name-input:focus {
    border-color: rgba(125, 211, 252, 0.3);
}

.profile-avatar-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.profile-avatar-btn {
    width: 44px;
    height: 44px;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    transform: scale(1.1);
}

.profile-avatar-btn.active {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 8px rgba(125, 211, 252, 0.2);
}

.profile-form-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.profile-form-btn {
    padding: 6px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-form-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
}

.profile-form-btn-primary {
    background: var(--accent-dim);
    border-color: rgba(125, 211, 252, 0.25);
    color: var(--accent);
}

.profile-form-btn-primary:hover {
    background: rgba(125, 211, 252, 0.2);
    border-color: rgba(125, 211, 252, 0.4);
}

/* Profile chip in header */
#profile-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid var(--border);
}

.profile-chip-name {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
}

.profile-chip-switch {
    font-size: 10px;
    color: var(--accent);
    background: transparent;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.profile-chip-switch:hover {
    background: var(--accent-dim);
    border-color: rgba(125, 211, 252, 0.4);
}

/* ── PIN Modal ────────────────────────────────── */
#pin-modal {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 8, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pin-modal-content {
    position: relative;
    background: rgba(12, 12, 20, 0.95);
    border: 1px solid var(--border-hover);
    border-radius: 16px;
    padding: 32px;
    min-width: 280px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.pin-modal-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 4px;
}

#pin-modal-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

#pin-dots {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border-hover);
    background: transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.pin-dot.filled {
    background: var(--accent);
    border-color: var(--accent);
}

#pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 200px;
    margin: 0 auto 16px;
}

.pin-pad-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-bright);
    font-size: 20px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-pad-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}

.pin-pad-btn:active {
    background: var(--accent-dim);
    border-color: rgba(125, 211, 252, 0.3);
}

.pin-pad-btn.backspace {
    font-size: 16px;
    color: var(--text-dim);
}

#pin-error {
    color: #f87171;
    font-size: 12px;
    margin-bottom: 8px;
}

#pin-cancel {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    padding: 6px 20px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

#pin-cancel:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-color: var(--border-hover);
}

/* Shake animation for wrong PIN */
@keyframes pinShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.pin-modal-content.shake {
    animation: pinShake 0.4s ease;
}

/* Lock icon on profile cards */
.profile-card-lock {
    font-size: 12px;
    position: absolute;
    bottom: 4px;
    right: 6px;
    opacity: 0.5;
}

/* Lock button in header chip */
.profile-chip-lock {
    font-size: 10px;
    color: var(--accent-pink);
    background: transparent;
    border: 1px solid rgba(249, 168, 212, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.profile-chip-lock:hover {
    background: rgba(249, 168, 212, 0.1);
    border-color: rgba(249, 168, 212, 0.4);
}

/* PIN checkbox in new profile form */
.profile-pin-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: center;
}

.profile-pin-row label {
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
}

.profile-pin-row input[type="checkbox"] {
    accent-color: var(--accent);
}

/* ── Feature 4: Gene Search badges ──────────── */
.gene-search-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
    vertical-align: middle;
}

.gene-search-badge.trait-badge {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
    border-color: rgba(167, 139, 250, 0.3);
}

.gene-search-loading {
    color: #94a3b8;
    font-style: italic;
    padding: 6px 10px;
}

.gene-search-error {
    color: #f87171;
    padding: 6px 10px;
}

/* ── Feature 10: Pathway select ─────────────── */
.pathway-select {
    width: 100%;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    padding: 5px 8px;
    font-size: 11px;
    cursor: pointer;
}

.pathway-select option {
    background: #0a0a14;
    color: #e2e8f0;
}

.pathway-select:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.5);
}

/* ── Reduced motion ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Touch / Mobile support (Feature 6) ─────── */
canvas {
    /* Prevent rubber-band scroll & default browser pan/zoom on 3D canvas */
    touch-action: none;
    /* Prevent text selection on drag on touch devices */
    -webkit-user-select: none;
    user-select: none;
}

/* Tablet breakpoint — shrink controls panel for narrower screens */
@media (max-width: 900px) {
    #controls-panel {
        max-height: 50vh;
        overflow-y: auto;
        width: 180px;
        font-size: 11px;
    }

    #controls-panel h3 {
        font-size: 10px;
        margin-top: 8px;
    }

    .chr-btn {
        min-width: 22px;
        padding: 3px 2px;
        font-size: 9px;
    }

    .view-btn {
        padding: 4px 6px;
        font-size: 10px;
    }
}

/* Small-phone breakpoint — hide panel by default, use toggle */
@media (max-width: 600px) {
    #controls-panel {
        display: none;
    }

    #controls-panel.mobile-open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 200px;
        z-index: 100;
        background: rgba(8, 8, 16, 0.97);
        overflow-y: auto;
        padding: 48px 12px 12px;
    }

    .panel-toggle {
        display: block !important;
        font-size: 13px;
    }

    #header h1 {
        font-size: 12px;
    }

    #header p {
        display: none;
    }
}

/* ── Population filter buttons (Feature 3) ──── */
.pop-filter-btn {
    padding: 3px 7px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    font-size: 10px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pop-filter-btn:hover {
    background: var(--accent-dim);
    border-color: rgba(125, 211, 252, 0.4);
    color: var(--accent);
}

.pop-filter-btn.active {
    background: rgba(125, 211, 252, 0.18);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* ── Cell Cycle Educational Popup ──────────────────────────────────────── */

#cc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#cc-backdrop.cc-hidden { display: none; }

#cc-modal {
    position: relative;
    background: rgba(10, 14, 26, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    width: min(860px, 96vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

#cc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

#cc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.02em;
}

#cc-title-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

#cc-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
#cc-close:hover { color: var(--text-bright); background: rgba(255,255,255,0.08); }

#cc-body {
    display: grid;
    grid-template-columns: 175px 1fr 235px;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#cc-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 8px 12px 16px;
    border-right: 1px solid rgba(255,255,255,0.05);
}

#cc-ring-wrap {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

#cc-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-right: 1px solid rgba(255,255,255,0.05);
}

#cc-illus {
    width: 100%;
    max-width: 380px;
    height: 260px;
}

/* Enable CSS transforms on SVG elements inside the illustration */
#cc-illus .chr-group,
#cc-illus .aster-group,
#cc-illus .aster-ball {
    transform-box: fill-box;
    transform-origin: center;
}

#cc-right {
    padding: 16px 16px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

#cc-phase-label {
    font-size: 17px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

#cc-phase-sub {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: -4px;
    font-style: italic;
}

#cc-dna-badge {
    display: inline-block;
    background: rgba(125, 211, 252, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.2);
    color: var(--accent);
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    width: fit-content;
}

#cc-desc {
    font-size: 11px;
    color: var(--text);
    line-height: 1.55;
}

#cc-keyfact {
    font-size: 10px;
    color: var(--accent-green);
    background: rgba(134, 239, 172, 0.07);
    border-left: 2px solid var(--accent-green);
    padding: 5px 8px;
    border-radius: 0 4px 4px 0;
    line-height: 1.4;
}

.cc-key-icon { margin-right: 4px; }

#cc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.cc-nav-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text);
    font-size: 14px;
    padding: 6px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.cc-nav-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-bright); }

#cc-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}

#cc-progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    border-radius: 0 0 14px 14px;
}

/* Responsive: stack on small screens */
@media (max-width: 600px) {
    #cc-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    #cc-left, #cc-center { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); }
    #cc-right { padding: 12px; }
}

/* ── License Modal ──────────────────────────── */
#license-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#license-modal.hidden { display: none; }

.license-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.license-modal-box {
    position: relative;
    background: rgba(8, 8, 20, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.license-logo {
    height: 32px;
    margin-bottom: 4px;
}

.license-modal-box h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-bright);
    text-align: center;
}

.license-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
}
.license-subtitle a {
    color: var(--accent);
    text-decoration: none;
}
.license-subtitle a:hover { text-decoration: underline; }

#license-key-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-size: 15px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    padding: 12px 14px;
    text-align: center;
    letter-spacing: 0.05em;
    outline: none;
    transition: border-color 0.2s;
}
#license-key-input:focus {
    border-color: var(--accent);
}

#license-activate-btn {
    width: 100%;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    padding: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}
#license-activate-btn:hover { opacity: 0.88; }
#license-activate-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.license-loading {
    font-size: 12px;
    color: var(--text-dim);
}
.license-loading.hidden { display: none; }

.license-error {
    font-size: 12px;
    color: #f87171;
    text-align: center;
}
.license-error.hidden { display: none; }

/* ── License Expiry Banner ──────────────────── */
#license-banner {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #fbbf24;
    white-space: nowrap;
}
#license-banner.hidden { display: none; }
#license-banner a {
    color: #fbbf24;
    font-weight: 600;
    text-decoration: none;
}
#license-banner a:hover { text-decoration: underline; }
#license-banner-close {
    background: none;
    border: none;
    color: #fbbf24;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}
#license-banner-close:hover { opacity: 1; }
