        * {
            box-sizing: border-box;
        }

        :root {
            --c-void-900: #0a0a1a;
            --c-void-800: #1a1a3a;
            --c-void-700: #0d1025;
            --c-void-600: rgba(255, 255, 255, 0.03);
            --c-void-500: rgba(255, 255, 255, 0.08);
            --c-void-glass: rgba(0, 0, 0, 0.2);
            --orb-1: rgba(59, 130, 246, 0.4);
            --orb-2: rgba(139, 92, 246, 0.3);
            --orb-3: rgba(6, 182, 212, 0.3);
            --c-stone-100: #f3f4f6;
            --c-stone-300: #9ca3af;
            --c-stone-500: #6b7280;
            --c-accent-400: #60a5fa;
            --c-accent-500: #a78bfa;
            --c-accent-600: #34d4ed;
            /* Library hero — per-theme background pair. Themes that don't override
               these get the default blue/purple wash below. */
            --hero-bg: linear-gradient(135deg, rgba(96, 165, 250, 0.18), rgba(167, 139, 250, 0.10));
            --hero-overlay: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.28), transparent 60%);
            --font-display: 'Inter', system-ui, sans-serif;
            --font-body: 'Inter', system-ui, sans-serif;
            --font-mono: 'JetBrains Mono', monospace;
            --border-radius: 12px;
            --card-border: 1px solid var(--c-void-500);

            /* --- Ferro Ember brand constants (DESIGN.md §2.1) — theme-independent, never override --- */
            /* THE trust signal — iron-oxide rust. Semantic: verified / sealed / kept / safe.
               Warm (memories, anti-cold-cloud) AND literally Ferro (iron + time = patina = permanence).
               Differentiates from iCloud blue by being warm, not by picking another cool hue. */
            --fv-ember:        #BF4D2A;   /* primary trust accent (light grounds) */
            --fv-ember-bright: #E86A2C;   /* on dark grounds, ember reads brighter/molten */
            --fv-ember-glow:   #D9743F;   /* hover/bloom halo on The Settle */
            --fv-on-ember:     #FDF9F2;   /* warm off-white text/glyph on ember fills */

            /* Ferrous ink + warm neutrals (the "iron" cue; brand chrome, wordmark tile) */
            --fv-ink:          #201B15;   /* warm charcoal — NEVER blue-black; the ferrous ink */
            --fv-paper:        #F7F6F3;   /* warm off-white — canonical light ground */
            --fv-graphite:     #16181C;   /* warm graphite — canonical dark ground (iOS default) */
            --fv-muted:        #6E6154;   /* warm taupe — secondary text/metadata on light */
            --fv-muted-dark:   #9A968F;   /* warm grey — secondary text on dark */
            --fv-hairline:     #E4D9C6;   /* warm rule/border on light (the "ground line") */

            /* Semantic status — SEPARATE from the ember and from theme accents. Do not restyle. */
            --fv-good:  #2E7D5B;   /* generic success (non-trust): saved, uploaded */
            --fv-warn:  #C08A3E;   /* brass — caution / attention */
            --fv-crit:  #B23A34;   /* destructive / error — the ONLY red; never decorative */

            /* Motion (DESIGN.md "The Settle") — first in-product use: connect panel */
            --fv-settle: 520ms cubic-bezier(0.2, 0.9, 0.1, 1);
        }

        /* ============================================================ */
        /* Vault Steel coherence pass (2026-07-27) — decorative colors    */
        /* derive from the active theme's accent ramp; genuine status    */
        /* colors move to the theme-independent --fv-good/warn/crit      */
        /* tokens instead of hardcoded Tailwind hues (cyan/blue/purple/  */
        /* teal/orange/green/yellow/pink/emerald/red sprinkled per       */
        /* section). See DESIGN.md §0/§2.                                */
        /* ============================================================ */

        /* Decorative accent — section headings + their icons, and small
           inline icons (stat cards, media-type badges, list rows) that
           formerly carried a per-section/per-type rainbow hue. One
           consistent treatment across all 15 themes. */
        .section-accent,
        .icon-accent {
            color: var(--c-accent-400);
        }

        /* Semantic status text — theme-independent (DESIGN.md §2.1). */
        .text-good { color: var(--fv-good); }
        .text-warn { color: var(--fv-warn); }
        .text-crit { color: var(--fv-crit); }

        /* Semantic status banners/badges — translucent tint + matching
           border + foreground, all derived from one status token. */
        .bg-good-soft {
            background: color-mix(in srgb, var(--fv-good) 18%, transparent);
            border: 1px solid color-mix(in srgb, var(--fv-good) 32%, transparent);
            color: var(--fv-good);
        }
        .bg-warn-soft {
            background: color-mix(in srgb, var(--fv-warn) 18%, transparent);
            border: 1px solid color-mix(in srgb, var(--fv-warn) 32%, transparent);
            color: var(--fv-warn);
        }
        .bg-crit-soft {
            background: color-mix(in srgb, var(--fv-crit) 18%, transparent);
            border: 1px solid color-mix(in srgb, var(--fv-crit) 32%, transparent);
            color: var(--fv-crit);
        }
        .bg-good-soft:hover { background: color-mix(in srgb, var(--fv-good) 28%, transparent); }
        .bg-warn-soft:hover { background: color-mix(in srgb, var(--fv-warn) 28%, transparent); }
        .bg-crit-soft:hover { background: color-mix(in srgb, var(--fv-crit) 28%, transparent); }

        /* Solid status buttons (destructive/caution/success primary
           actions) — replaces hardcoded bg-red-*/bg-yellow-*/bg-emerald-*. */
        .btn-good { background: var(--fv-good); color: white; }
        .btn-good:hover { background: color-mix(in srgb, var(--fv-good) 85%, white); }
        .btn-warn { background: var(--fv-warn); color: white; }
        .btn-warn:hover { background: color-mix(in srgb, var(--fv-warn) 85%, white); }
        .btn-crit { background: var(--fv-crit); color: white; }
        .btn-crit:hover { background: color-mix(in srgb, var(--fv-crit) 85%, white); }
        /* Escalated destructive tier (e.g. "Nuclear Reset" — deletes files, not just records) */
        .btn-crit-strong { background: color-mix(in srgb, var(--fv-crit) 70%, black); color: white; }
        .btn-crit-strong:hover { background: color-mix(in srgb, var(--fv-crit) 85%, black); }

        /* Thumbnail multi-select ring + checkmark badge (was ring-cyan-400 / bg-cyan-500) */
        .selected-ring { box-shadow: 0 0 0 2px var(--c-accent-400); }
        .select-check { background: var(--c-accent-400); }

        body {
            background: linear-gradient(135deg, var(--c-void-900) 0%, var(--c-void-800) 50%, var(--c-void-700) 100%);
            min-height: 100vh;
            font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
            color: var(--c-stone-100);
            transition: background 0.5s ease, color 0.3s ease;
        }

        .bg-orb {
            position: fixed;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.5;
            pointer-events: none;
            z-index: 0;
            transition: background 0.5s ease;
        }

        .bg-orb-1 {
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, var(--orb-1) 0%, transparent 70%);
            top: -200px;
            left: -200px;
            animation: float1 20s ease-in-out infinite;
        }

        .bg-orb-2 {
            width: 500px;
            height: 500px;
            background: radial-gradient(circle, var(--orb-2) 0%, transparent 70%);
            bottom: -150px;
            right: -150px;
            animation: float2 25s ease-in-out infinite;
        }

        .bg-orb-3 {
            width: 400px;
            height: 400px;
            background: radial-gradient(circle, var(--orb-3) 0%, transparent 70%);
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation: float3 30s ease-in-out infinite;
        }

        @keyframes float1 {
            0%, 100% {
                transform: translate(0, 0);
            }

            50% {
                transform: translate(100px, 50px);
            }
        }

        @keyframes float2 {
            0%, 100% {
                transform: translate(0, 0);
            }

            50% {
                transform: translate(-80px, -40px);
            }
        }

        @keyframes float3 {
            0%, 100% {
                transform: translate(-50%, -50%) scale(1);
            }

            50% {
                transform: translate(-50%, -50%) scale(1.2);
            }
        }

        .glass {
            background: var(--c-void-600);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--c-void-500);
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }

        .glass-dark {
            background: var(--c-void-800);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--c-void-500);
            border-radius: 12px;
            transition: all 0.3s ease;
        }

        .glow-blue {
            box-shadow: 0 0 40px color-mix(in srgb, var(--c-accent-400) 20%, transparent);
        }

        .stat-card {
            transition: all 0.3s ease;
        }

            .stat-card:hover {
                transform: translateY(-4px);
                box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
            }

        .expandable-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
        }

            .expandable-content.open {
                max-height: 1000px;
            }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
            }

            50% {
                opacity: 0.5;
            }
        }

        .pulse {
            animation: var(--sync-animation, pulse 2s infinite);
        }

        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--c-void-800);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--c-stone-500);
            border-radius: 4px;
        }

        .text-gradient {
            background: linear-gradient(135deg, var(--c-accent-400) 0%, var(--c-accent-500) 50%, var(--c-accent-600) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .section-header {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

            .section-header::after {
                content: '';
                position: absolute;
                bottom: -4px;
                left: 0;
                width: 100%;
                height: 2px;
                background: linear-gradient(90deg, currentColor, transparent);
                opacity: 0.3;
            }

        .counter {
            font-variant-numeric: tabular-nums;
        }

        .status-active {
            background: color-mix(in srgb, var(--fv-good) 20%, transparent);
            border-color: color-mix(in srgb, var(--fv-good) 30%, transparent);
        }

        .status-revoked {
            background: color-mix(in srgb, var(--fv-crit) 20%, transparent);
            border-color: color-mix(in srgb, var(--fv-crit) 30%, transparent);
        }

        .confirm-dialog {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

            .confirm-dialog.hidden {
                display: none;
            }

        /* Library subtabs row: tabs on left, search bar on right */
        .library-subtabs-row {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--c-void-500);
        }

        /* Phase 10: always-visible search bar in header */
        .library-search-bar {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 10px;
            background: var(--c-void-800);
            border: 1px solid var(--c-void-500);
            margin-left: auto;
            width: 220px;
            transition: border-color 0.15s ease, width 0.2s ease;
        }
        .library-search-bar:focus-within {
            border-color: var(--c-accent-400);
            width: 280px;
        }
        .library-search-bar > i {
            color: var(--c-stone-500);
            flex-shrink: 0;
        }
        .library-search-bar input {
            background: transparent !important;
            border: none !important;
            outline: none !important;
            color: var(--c-stone-100);
            font-size: 13px;
            flex: 1;
            min-width: 0;
            padding: 2px 0 !important;
            border-radius: 0 !important;
        }
        .library-search-bar input::placeholder {
            color: var(--c-stone-500);
            opacity: 1;
        }
        .library-search-clear {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--c-stone-500);
            padding: 2px;
            display: flex;
            align-items: center;
            border-radius: 4px;
            transition: color 0.15s ease;
        }
        .library-search-clear:hover { color: var(--c-stone-100); }

        @media (max-width: 767px) {
            .library-subtabs-row {
                flex-wrap: wrap;
            }
            .library-search-bar {
                width: 100%;
                margin-left: 0;
                order: -1;
            }
            .library-search-bar:focus-within { width: 100%; }
        }

        /* Browse-integrated search bar (same styling as header bar) */
        .browse-search-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            border-radius: 12px;
            background: var(--c-void-800);
            border: 1px solid var(--c-void-500);
            transition: border-color 0.15s ease;
        }
        .browse-search-bar:focus-within {
            border-color: var(--c-accent-400);
        }
        .browse-search-bar > i {
            color: var(--c-stone-500);
            flex-shrink: 0;
        }
        .browse-search-bar input {
            background: transparent !important;
            border: none !important;
            outline: none !important;
            color: var(--c-stone-100);
            font-size: 14px;
            flex: 1;
            min-width: 0;
            padding: 0 !important;
            border-radius: 0 !important;
        }
        .browse-search-bar input::placeholder {
            color: var(--c-stone-500);
            opacity: 1;
        }

        /* Tab Navigation */
        .tab-nav {
            display: flex;
            gap: 2px;
            padding: 4px;
            border-radius: 14px;
            background: var(--c-void-800);
        }

        .tab-btn {
            padding: 8px 20px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s ease;
            color: var(--c-stone-500);
            background: transparent;
            border: none;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .tab-btn:hover { color: var(--c-stone-300); }

        .tab-btn.active {
            background: var(--c-void-600);
            color: var(--c-stone-100);
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            border: 1px solid var(--c-void-500);
        }

        /* Thumbnail Grid */
        .thumb-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
            gap: 4px;
        }

        @media (min-width: 768px) {
            .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
        }

        .thumb-cell {
            position: relative;
            aspect-ratio: 1;
            overflow: hidden;
            border-radius: 8px;
            cursor: pointer;
            background: var(--c-void-800);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .thumb-cell:hover {
            transform: scale(1.03);
            box-shadow: 0 4px 20px rgba(0,0,0,0.3);
            z-index: 1;
        }

        .thumb-cell img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: opacity 0.3s ease;
        }

        .thumb-cell .thumb-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 8px;
            background: linear-gradient(transparent, rgba(0,0,0,0.75));
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .thumb-cell:hover .thumb-overlay { opacity: 1; }

        .thumb-cell .video-badge {
            position: absolute;
            top: 6px;
            right: 6px;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            border-radius: 4px;
            padding: 2px 6px;
            font-size: 11px;
            color: white;
            display: flex;
            align-items: center;
            gap: 3px;
        }

        .thumb-cell .thumb-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0.15;
        }

        /* Month Selector */
        .month-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 6px;
        }

        @media (min-width: 768px) {
            .month-grid { grid-template-columns: repeat(6, 1fr); }
        }

        @media (min-width: 1024px) {
            .month-grid { grid-template-columns: repeat(12, 1fr); }
        }

        .month-pill {
            padding: 8px 6px;
            border-radius: 10px;
            font-size: 13px;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s ease;
            background: var(--c-void-800);
            border: 1px solid transparent;
        }

        .month-pill:hover:not(:disabled) { border-color: var(--c-void-500); }
        .month-pill:disabled { cursor: default; }

        .month-pill.active {
            background: var(--c-accent-400);
            color: white;
            border-color: var(--c-accent-400);
        }

        .month-pill .m-count {
            font-size: 10px;
            opacity: 0.6;
            display: block;
        }

        /* Year Strip */
        .year-strip {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .year-btn {
            padding: 6px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            background: var(--c-void-800);
            border: 1px solid transparent;
            color: var(--c-stone-300);
        }

        .year-btn:hover { border-color: var(--c-void-500); }

        .year-btn.active {
            background: var(--c-accent-400);
            color: white;
        }

        /* Asset Detail Overlay */
        .asset-detail-overlay {
            position: fixed;
            inset: 0;
            z-index: 200;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(20px);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        .asset-detail-overlay.open {
            opacity: 1;
            pointer-events: all;
        }

        .asset-detail-panel {
            width: 90vw;
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
        }

        /* Search */
        .search-input-wrap {
            position: relative;
        }

        .search-input-wrap > .search-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0.4;
            pointer-events: none;
        }

        .search-input-wrap input {
            width: 100%;
            padding: 14px 16px 14px 44px;
            font-size: 15px;
            border-radius: 14px;
            border: 1px solid var(--c-void-500);
            background: var(--c-void-800);
            color: var(--c-stone-100);
            outline: none;
            transition: border-color 0.2s;
        }

        .search-input-wrap input:focus { border-color: var(--c-accent-400); }

        .filter-chip {
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
            background: var(--c-void-800);
            border: 1px solid var(--c-void-500);
            color: var(--c-stone-300);
        }

        .filter-chip:hover { border-color: var(--c-accent-400); }

        .filter-chip.active {
            background: var(--c-accent-400);
            color: white;
            border-color: var(--c-accent-400);
        }

        .filter-chip .chip-count {
            display: inline-block;
            margin-left: 4px;
            padding: 0 5px;
            border-radius: 8px;
            font-size: 10px;
            background: rgba(255,255,255,0.15);
            min-width: 18px;
            text-align: center;
        }

        .filter-chip.active .chip-count {
            background: rgba(255,255,255,0.3);
        }

        /* Smart Filters Panel */
        .smart-filters-panel {
            border-top: 1px solid var(--c-void-500);
            padding-top: 14px;
            margin-top: 14px;
        }

        .smart-filters-panel .filter-row {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 10px;
        }

        .smart-filters-panel .filter-row:last-child {
            margin-bottom: 0;
        }

        .filter-row-label {
            font-size: 11px;
            opacity: 0.4;
            min-width: 70px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .filter-toggle {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            user-select: none;
        }

        .filter-toggle input[type="checkbox"] {
            appearance: none;
            width: 36px;
            height: 20px;
            border-radius: 10px;
            background: var(--c-void-800);
            border: 1px solid var(--c-void-500);
            position: relative;
            cursor: pointer;
            transition: all 0.2s;
        }

        .filter-toggle input[type="checkbox"]::after {
            content: '';
            position: absolute;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: var(--c-stone-300);
            top: 2px;
            left: 2px;
            transition: all 0.2s;
        }

        .filter-toggle input[type="checkbox"]:checked {
            background: var(--c-accent-400);
            border-color: var(--c-accent-400);
        }

        .filter-toggle input[type="checkbox"]:checked::after {
            background: white;
            left: 18px;
        }

        .location-selector {
            padding: 5px 12px;
            border-radius: 16px;
            font-size: 12px;
            background: var(--c-void-800);
            border: 1px solid var(--c-void-500);
            color: var(--c-stone-300);
            cursor: pointer;
            outline: none;
            max-width: 200px;
        }

        .location-selector:focus { border-color: var(--c-accent-400); }

        .leaflet-control-zoom a {
            background: rgba(15,15,30,0.85) !important;
            color: #ccc !important;
            border-color: rgba(255,255,255,0.15) !important;
        }
        .leaflet-control-zoom a:hover { background: rgba(30,30,60,0.95) !important; color: #fff !important; }

        .loc-tooltip {
            background: rgba(15,15,30,0.9) !important;
            border: 1px solid rgba(255,255,255,0.15) !important;
            color: #e0e0e0 !important;
            font-size: 11px !important;
            border-radius: 8px !important;
            padding: 4px 8px !important;
            box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
        }
        .loc-tooltip::before { border-top-color: rgba(15,15,30,0.9) !important; }

        .smart-filters-toggle {
            font-size: 12px;
            color: var(--c-accent-400);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            opacity: 0.8;
            transition: opacity 0.2s;
        }

        .smart-filters-toggle:hover { opacity: 1; }

        .active-filters-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 10px;
        }

        .active-filter-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 11px;
            background: var(--c-accent-400);
            color: white;
            cursor: pointer;
        }

        .active-filter-tag:hover {
            opacity: 0.8;
        }

        /* Favorite-heart badge: intentionally NOT tokenized (survivor).
           A universal favorite/love convention (like a gold star), not
           decorative theme chrome — see color-token-cleanup-report.md. */
        .fav-badge {
            position: absolute;
            top: 6px;
            right: 6px;
            color: #f472b6;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
            z-index: 2;
        }

        .deleted-overlay {
            position: absolute;
            inset: 0;
            background: color-mix(in srgb, var(--fv-crit) 25%, transparent);
            pointer-events: none;
            z-index: 1;
        }

        .deleted-days-badge {
            position: absolute;
            top: 6px;
            left: 6px;
            background: color-mix(in srgb, var(--fv-crit) 85%, transparent);
            backdrop-filter: blur(4px);
            border-radius: 6px;
            padding: 2px 8px;
            font-size: 11px;
            font-weight: 600;
            color: white;
            z-index: 3;
        }

        .deleted-restore-btn {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background: color-mix(in srgb, var(--fv-good) 90%, transparent);
            backdrop-filter: blur(4px);
            border: none;
            border-radius: 8px;
            padding: 4px 10px;
            font-size: 11px;
            font-weight: 600;
            color: white;
            cursor: pointer;
            z-index: 3;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .deleted-restore-btn:hover {
            background: var(--fv-good);
        }

        .year-btn.deleted-btn {
            background: color-mix(in srgb, var(--fv-crit) 15%, transparent);
            border-color: color-mix(in srgb, var(--fv-crit) 30%, transparent);
            color: var(--fv-crit);
        }

        .year-btn.deleted-btn.active {
            background: var(--fv-crit);
            border-color: var(--fv-crit);
            color: white;
        }

        /* Pagination */
        .pagination {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin-top: 20px;
        }

        .page-btn {
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
            background: var(--c-void-800);
            border: 1px solid var(--c-void-500);
            color: var(--c-stone-300);
        }

        .page-btn:hover:not(:disabled) { border-color: var(--c-accent-400); }
        .page-btn:disabled { opacity: 0.3; cursor: default; }

        .page-btn.active {
            background: var(--c-accent-400);
            color: white;
            border-color: var(--c-accent-400);
        }

        /* ===== Setup Wizard ===== */
        .setup-wizard {
            position: fixed;
            inset: 0;
            z-index: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--c-void-900) 0%, var(--c-void-800) 50%, var(--c-void-700) 100%);
        }

        .setup-wizard.hidden { display: none; }

        .setup-card {
            width: 100%;
            max-width: 560px;
            margin: 0 20px;
            animation: setupFadeIn 0.4s ease;
        }

        @keyframes setupFadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .setup-step-dots {
            display: flex;
            gap: 8px;
            justify-content: center;
            margin-top: 24px;
        }

        .setup-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--c-void-500);
            transition: all 0.3s;
        }

        .setup-dot.active {
            background: var(--c-accent-400);
            box-shadow: 0 0 8px var(--c-accent-400);
        }

        .setup-dot.done {
            background: var(--fv-good);
        }

        .drive-card {
            padding: 16px;
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.2s;
            background: var(--c-void-800);
            border: 2px solid transparent;
        }

        .drive-card:hover { border-color: var(--c-void-500); }

        .drive-card.selected {
            border-color: var(--c-accent-400);
            background: color-mix(in srgb, var(--c-accent-400) 10%, transparent);
        }

        .drive-usage-bar {
            height: 6px;
            border-radius: 3px;
            background: var(--c-void-500);
            overflow: hidden;
            margin-top: 8px;
        }

        .drive-usage-fill {
            height: 100%;
            border-radius: 3px;
            background: linear-gradient(90deg, var(--c-accent-400), var(--c-accent-500));
            transition: width 0.5s ease;
        }

        .policy-card {
            padding: 20px;
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.2s;
            background: var(--c-void-800);
            border: 2px solid transparent;
            text-align: center;
        }

        .policy-card:hover { border-color: var(--c-void-500); }

        .policy-card.selected {
            border-color: var(--c-accent-400);
            background: color-mix(in srgb, var(--c-accent-400) 10%, transparent);
        }

        .setup-input {
            width: 100%;
            padding: 12px 16px;
            border-radius: 12px;
            font-size: 14px;
            border: 1px solid var(--c-void-500);
            background: var(--c-void-800);
            color: var(--c-stone-100);
            outline: none;
            transition: border-color 0.2s;
        }

        .setup-input:focus { border-color: var(--c-accent-400); }

        .setup-input.error { border-color: var(--fv-crit); }

        @keyframes checkmark {
            from { transform: scale(0); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .checkmark-anim {
            animation: checkmark 0.5s ease forwards;
        }

        /* ===== Lock Screen ===== */
        .lock-overlay {
            position: fixed;
            inset: 0;
            z-index: 900;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            transition: opacity 0.3s ease;
        }

        .lock-overlay.hidden { display: none; }

        /* ===== Admin Panel ===== */
        .admin-overlay {
            position: fixed;
            inset: 0;
            z-index: 300;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: flex;
            justify-content: flex-end;
            transition: opacity 0.3s ease;
        }

        .admin-overlay.hidden { display: none; }

        .admin-panel {
            width: 100%;
            max-width: 520px;
            height: 100vh;
            overflow-y: auto;
            background: var(--c-void-900);
            border-left: 1px solid var(--c-void-500);
            padding: 24px;
            animation: adminSlideIn 0.3s ease;
        }

        @keyframes adminSlideIn {
            from { transform: translateX(100%); }
            to { transform: translateX(0); }
        }

        .admin-tab-bar {
            display: flex;
            gap: 2px;
            padding: 4px;
            border-radius: 12px;
            background: var(--c-void-800);
            margin-bottom: 20px;
        }

        .admin-tab-btn {
            flex: 1;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            color: var(--c-stone-500);
            background: transparent;
            border: none;
            text-align: center;
        }

        .admin-tab-btn:hover { color: var(--c-stone-300); }

        .admin-tab-btn.active {
            background: var(--c-void-600);
            color: var(--c-stone-100);
            border: 1px solid var(--c-void-500);
        }

        .user-card {
            padding: 16px;
            border-radius: 14px;
            background: var(--c-void-800);
            border: 1px solid var(--c-void-500);
            transition: all 0.2s;
        }

        /* Was a per-user rotating rainbow (bg-gradient-to-br + 5 hardcoded
           hue pairs, set from JS) — one consistent accent-token gradient,
           matching .settings-avatar below and the logo tile. */
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 16px;
            color: white;
            background: linear-gradient(135deg, var(--c-accent-400), var(--c-accent-500));
        }

        .role-badge {
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 6px;
            font-weight: 600;
        }

        /* Two roles differentiated within the SAME accent ramp (not two
           unrelated hues) so both stay theme-coherent. */
        .role-badge.admin { background: color-mix(in srgb, var(--c-accent-500) 20%, transparent); color: var(--c-accent-500); }
        .role-badge.member { background: color-mix(in srgb, var(--c-accent-400) 20%, transparent); color: var(--c-accent-400); }

        .request-card {
            padding: 16px;
            border-radius: 14px;
            background: var(--c-void-800);
            border: 1px solid color-mix(in srgb, var(--fv-warn) 25%, transparent);
        }

        /* Pending-count badge: an attention/caution cue (awaiting admin
           action), not a destructive/error state — fv-warn, not fv-crit. */
        .pending-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            min-width: 18px;
            height: 18px;
            border-radius: 9px;
            background: var(--fv-warn);
            color: white;
            font-size: 11px;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
        }

        .pending-badge.hidden { display: none; }

        .settings-slider {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: var(--c-void-500);
            outline: none;
        }

        .settings-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--c-accent-400);
            cursor: pointer;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        }

        .settings-slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: var(--c-accent-400);
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        }

        /* ============================================================ */
        /* Phase 7: Sidebar navigation (Library / Insights / Settings)  */
        /* Desktop: 64px left rail. Mobile: 64px bottom bar.            */
        /* ============================================================ */
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            width: 64px;
            background: var(--c-void-900);
            border-right: var(--card-border);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 24px 0;
            gap: 10px;
            z-index: 40;
        }

        .sidebar-item {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--c-stone-500);
            background: transparent;
            border: none;
            cursor: pointer;
            position: relative;
            transition: color 0.2s ease, background 0.2s ease;
        }

        .sidebar-item:hover {
            color: var(--c-stone-100);
            background: var(--c-void-700);
        }

        .sidebar-item.active {
            color: var(--c-accent-400);
            background: var(--c-void-700);
        }

        .sidebar-item:focus-visible {
            outline: 2px solid var(--c-accent-400);
            outline-offset: 2px;
        }

        /* Active accent bar — left edge on desktop, top on mobile */
        .sidebar-item.active::before {
            content: '';
            position: absolute;
            left: -12px;
            top: 10px;
            bottom: 10px;
            width: 3px;
            border-radius: 0 2px 2px 0;
            background: linear-gradient(180deg, var(--c-accent-400), var(--c-accent-500));
        }

        /* Desktop: shift authenticated content right of the rail. */
        @media (min-width: 768px) {
            #main-content { padding-left: 64px; }
        }

        /* Mobile: rail becomes a bottom tab bar; push content above it. */
        @media (max-width: 767px) {
            .sidebar {
                top: auto;
                right: 0;
                bottom: 0;
                left: 0;
                height: 64px;
                width: auto;
                flex-direction: row;
                padding: 0;
                justify-content: space-around;
                border-right: none;
                border-top: var(--card-border);
            }
            .sidebar-item.active::before {
                left: 10px;
                right: 10px;
                top: -1px;
                bottom: auto;
                height: 3px;
                width: auto;
                border-radius: 0 0 2px 2px;
            }
            #main-content { padding-bottom: 64px; }
        }

        /* ============================================================ */
        /* Phase 8: Form controls, hover/focus, reduced-motion          */
        /* Low specificity so existing inline styles still win.         */
        /* ============================================================ */

        /* Text inputs, selects, textareas — theme-aware defaults */
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]),
        select,
        textarea {
            background: var(--c-void-800);
            color: var(--c-stone-100);
            border: 1px solid var(--c-void-500);
            border-radius: 10px;
            padding: 8px 12px;
            font-family: inherit;
            font-size: 14px;
            outline: none;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"])::placeholder,
        textarea::placeholder {
            color: var(--c-stone-500);
            opacity: 1;
        }

        /* Focus ring: accent glow, visible but not jarring */
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="file"]):focus-visible,
        select:focus-visible,
        textarea:focus-visible {
            border-color: var(--c-accent-400);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent-400) 30%, transparent);
        }

        /* <select> options: most browsers pick up the styled background. */
        select option {
            background: var(--c-void-800);
            color: var(--c-stone-100);
        }

        /* Checkbox / radio — use theme accent */
        input[type="checkbox"],
        input[type="radio"] {
            accent-color: var(--c-accent-400);
        }

        /* Global focus rings for buttons and links */
        button:focus-visible,
        a:focus-visible {
            outline: 2px solid var(--c-accent-400);
            outline-offset: 2px;
        }

        /* Glass cards: subtle hover lift. Opt out with .no-hover. */
        .glass:hover {
            transform: translateY(-1px);
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
        }

        /* Containers that hold interactive children shouldn't lift. */
        .glass.no-hover:hover,
        header .glass:hover,
        .setup-card:hover,
        .admin-panel:hover,
        .asset-detail-panel:hover,
        #login-overlay .glass:hover,
        #lock-overlay .glass:hover {
            transform: none;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        /* Filter chip: snappier transitions + visible focus */
        .filter-chip {
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        }
        .filter-chip:focus-visible {
            outline: 2px solid var(--c-accent-400);
            outline-offset: 2px;
        }

        /* Respect user motion preference — kill transitions and animations. */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.001ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.001ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* ============================================================ */
        /* Phase 9: Library hero banner + Recent Syncs strip            */
        /* Hero background is theme-controlled via --hero-bg /          */
        /* --hero-overlay so each theme can set its own mood.           */
        /* ============================================================ */

        .library-hero {
            position: relative;
            padding: 32px;
            overflow: hidden;
            background-image: var(--hero-bg-image, none), var(--hero-overlay), var(--hero-bg);
            background-size: cover, auto, auto;
            background-position: center, center, center;
            border-radius: 20px;
            border: var(--card-border);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        /* Hero text always readable — shadow + semi-transparent backdrop */
        .library-hero-main {
            background: rgba(0, 0, 0, 0.35);
            border-radius: 12px;
            padding: 12px 16px;
        }

        .library-hero-name {
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
        }

        .library-hero-subtitle {
            text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
        }

        .library-hero-stat-value {
            text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
        }

        .library-hero-content {
            position: relative;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 24px;
            flex-wrap: wrap;
        }

        .library-hero-main {
            flex: 1;
            min-width: 0;
        }

        .library-hero-name {
            font-size: 32px;
            font-weight: 700;
            line-height: 1.1;
            color: var(--c-stone-100);
            margin: 0;
            letter-spacing: -0.02em;
        }

        .library-hero-subtitle {
            font-size: 14px;
            color: var(--c-stone-300);
            margin: 6px 0 0;
        }

        .library-hero-meta {
            display: flex;
            gap: 24px;
            align-items: center;
            flex-wrap: wrap;
        }

        .library-hero-stat {
            text-align: right;
        }

        .library-hero-stat-value {
            font-size: 22px;
            font-weight: 600;
            color: var(--c-stone-100);
            line-height: 1.1;
        }

        .library-hero-stat-label {
            font-size: 10px;
            color: var(--c-stone-500);
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-top: 2px;
        }

        /* Recent Syncs horizontal strip of day clusters */
        .recent-syncs-strip {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            padding: 4px 2px 12px;
            scrollbar-width: thin;
            scrollbar-color: var(--c-void-500) transparent;
        }

        .recent-syncs-strip::-webkit-scrollbar { height: 8px; }
        .recent-syncs-strip::-webkit-scrollbar-track { background: transparent; }
        .recent-syncs-strip::-webkit-scrollbar-thumb {
            background: var(--c-void-500);
            border-radius: 4px;
        }

        .sync-day {
            flex: 0 0 auto;
            min-width: 240px;
            max-width: 240px;
            background: var(--c-void-800);
            border: var(--card-border);
            border-radius: 14px;
            padding: 12px;
            cursor: pointer;
            transition: border-color 0.15s ease, transform 0.15s ease;
        }

        .sync-day:hover {
            border-color: var(--c-accent-400);
            transform: translateY(-1px);
        }

        .sync-day:focus-visible {
            outline: 2px solid var(--c-accent-400);
            outline-offset: 2px;
        }

        .sync-day-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-bottom: 10px;
            gap: 8px;
        }

        .sync-day-date {
            font-size: 13px;
            font-weight: 600;
            color: var(--c-stone-100);
            white-space: nowrap;
        }

        .sync-day-count {
            font-size: 11px;
            color: var(--c-stone-500);
            white-space: nowrap;
        }

        .sync-day-thumbs {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 3px;
        }

        .sync-day-thumb {
            aspect-ratio: 1;
            border-radius: 4px;
            overflow: hidden;
            background: var(--c-void-900);
            position: relative;
        }

        .sync-day-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .sync-day-thumb-more {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 600;
            color: var(--c-stone-300);
            background: var(--c-void-700);
            border: var(--card-border);
        }

        /* Corner badge on a thumbnail: favorite (star) or edited (pencil). */
        .thumb-badge {
            position: absolute;
            top: 2px;
            right: 2px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 9px;
            line-height: 1;
            color: #0a0a1a;
            font-weight: 700;
            box-shadow: 0 1px 3px rgba(0,0,0,0.35);
            pointer-events: none;
        }
        /* Not tokenized (survivor, matches .fav-badge above): gold star = favorite. */
        .thumb-badge-fav  { background: #fbbf24; }
        .thumb-badge-edit { background: var(--c-accent-400); }

        /* Memory card badges row (below header, above thumb grid). */
        .memory-badges {
            display: flex;
            gap: 6px;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }
        .memory-badge {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 10px;
            background: var(--c-void-700);
            border: var(--card-border);
            color: var(--c-stone-300);
            white-space: nowrap;
        }

        /* Theme art divider — decorative strip between content sections.
           Hidden by default. Whimsical themes show it in their theme.css. */
        .theme-art-divider {
            display: none;
            height: 120px;
            margin: 8px 0;
            border-radius: var(--border-radius);
            background-image: var(--hero-bg-image, none);
            background-size: cover;
            background-position: center;
            border: var(--card-border);
            opacity: 0.6;
        }

        /* Empty state themed illustration — whimsical themes override via --empty-state-image */
        .empty-state-img {
            width: 200px;
            height: 200px;
            margin: 0 auto 16px;
            background-image: var(--empty-state-image, none);
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            border-radius: var(--border-radius);
        }
        /* Hide the div entirely when no theme image is set (premium themes) */
        .empty-state-img:not([style]) {
            display: var(--empty-state-image, none);
        }

        .recent-syncs-empty {
            padding: 40px;
            text-align: center;
            color: var(--c-stone-500);
            font-size: 14px;
            border: 1px dashed var(--c-void-500);
            border-radius: 14px;
        }

        /* Window card — single consolidated view for This Week / This Month */
        .window-card {
            width: 100%;
            padding: 20px;
        }
        .window-card-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            margin-bottom: 10px;
        }
        .window-card-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--c-stone-100);
        }
        .window-card-count {
            font-size: 13px;
            color: var(--c-stone-500);
        }
        .window-card-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 4px;
            margin: 12px 0;
        }
        @media (max-width: 640px) {
            .window-card-grid { grid-template-columns: repeat(3, 1fr); }
        }
        .window-card-browse {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 500;
            border: none;
            cursor: pointer;
            background: var(--c-void-700);
            color: var(--c-accent-400);
            transition: background 0.15s ease;
        }
        .window-card-browse:hover { background: var(--c-void-600); }
        .window-card-browse:focus-visible {
            outline: 2px solid var(--c-accent-400);
            outline-offset: 2px;
        }

        @media (max-width: 640px) {
            .library-hero { padding: 24px; }
            .library-hero-name { font-size: 24px; }
            .library-hero-meta { gap: 16px; }
            .library-hero-stat-value { font-size: 18px; }
        }

        /* Phase 11: Contextual stats panel next to map */
        .context-stats-row {
            display: flex;
            gap: 16px;
            align-items: stretch;
        }
        .context-stats-row > :first-child {
            flex: 1;
            min-width: 0;
        }
        .context-stats-panel {
            flex: 1;
            min-width: 220px;
            height: 320px;
            background: var(--c-void-800);
            border: var(--card-border);
            border-radius: 12px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: var(--c-void-500) transparent;
        }
        .context-stats-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--c-stone-100);
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .context-stat-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }
        .context-stat {
            background: var(--c-void-700);
            border-radius: 8px;
            padding: 10px;
            text-align: center;
        }
        .context-stat-value {
            font-size: 15px;
            font-weight: 700;
            color: var(--c-stone-100);
            line-height: 1.2;
        }
        .context-stat-label {
            font-size: 9px;
            color: var(--c-stone-500);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            margin-top: 2px;
        }
        .context-device-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 10px;
            border-radius: 8px;
            background: transparent;
            border: none;
            width: 100%;
            cursor: pointer;
            transition: background 0.15s ease;
            text-align: left;
        }
        .context-device-row:hover { background: var(--c-void-700); }
        .context-device-name {
            font-size: 12px;
            color: var(--c-stone-100);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .context-device-count {
            font-size: 11px;
            color: var(--c-stone-500);
            flex-shrink: 0;
            margin-left: 8px;
        }
        .context-subtype-chip {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 8px;
            background: var(--c-void-700);
            color: var(--c-stone-300);
            white-space: nowrap;
        }

        @media (max-width: 767px) {
            .context-stats-row {
                flex-direction: column;
            }
        }

        /* ============================================================ */
        /* Insights page (P15-16)                                       */
        .insights-split {
            display: flex;
            align-items: center;
            gap: 24px;
            flex-wrap: wrap;
        }
        @media (max-width: 640px) {
            .insights-split { flex-direction: column; }
            .insights-split > :first-child { width: 160px; height: 160px; }
        }

        /* Settings page (P12-14)                                       */
        /* ============================================================ */
        .settings-section-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--c-stone-100);
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
        }
        .settings-label {
            font-size: 12px;
            font-weight: 600;
            color: var(--c-stone-300);
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }
        .settings-theme-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            gap: 8px;
        }
        .settings-theme-card {
            padding: 10px;
            border-radius: 10px;
            cursor: pointer;
            text-align: center;
            border: 2px solid transparent;
            transition: border-color 0.15s ease, transform 0.15s ease;
            background: var(--c-void-800);
        }
        .settings-theme-card:hover { transform: translateY(-1px); }
        .settings-theme-card.active {
            border-color: var(--c-accent-400);
        }
        .settings-theme-swatch {
            width: 100%;
            height: 28px;
            border-radius: 6px;
            margin-bottom: 6px;
        }
        .settings-theme-name {
            font-size: 11px;
            color: var(--c-stone-300);
        }
        .settings-avatar {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: 700;
            color: white;
            background: linear-gradient(135deg, var(--c-accent-400), var(--c-accent-500));
        }
        .settings-role-badge {
            font-size: 10px;
            padding: 2px 8px;
            border-radius: 8px;
            background: var(--c-void-700);
            color: var(--c-stone-500);
            text-transform: uppercase;
            letter-spacing: 0.06em;
            display: inline-block;
            margin-top: 2px;
        }
        .settings-role-badge.admin {
            background: color-mix(in srgb, var(--c-accent-400) 15%, transparent);
            color: var(--c-accent-400);
        }
        .settings-tier-divider {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--c-accent-400);
            margin: 24px 0 16px;
            padding: 8px 0;
            border-top: 1px solid var(--c-void-500);
        }
        .settings-tier-danger {
            color: var(--fv-crit);
            border-color: color-mix(in srgb, var(--fv-crit) 20%, transparent);
        }
        .settings-device-card {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px;
            border-radius: 10px;
            background: var(--c-void-700);
        }
        .settings-device-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--c-void-800);
            color: var(--c-stone-500);
        }
        .settings-requests-badge {
            font-size: 10px;
            padding: 1px 6px;
            border-radius: 8px;
            background: var(--fv-warn);
            color: white;
            margin-left: 4px;
        }

        /* Live Photo motion clip section in asset detail */
        .live-photo-section {
            margin-top: 12px;
            border-radius: 12px;
            overflow: hidden;
            border: var(--card-border);
            background: var(--c-void-800);
        }
        .live-photo-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
        }
        .live-photo-badge {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.08em;
            padding: 2px 8px;
            border-radius: 6px;
            background: linear-gradient(135deg, var(--c-accent-400), var(--c-accent-500));
            color: #0a0a1a;
        }
        .live-photo-label {
            font-size: 12px;
            color: var(--c-stone-500);
        }
        .live-photo-video {
            width: 100%;
            max-height: 30vh;
            display: block;
            background: #000;
        }

/* Reusable inline help icon (ⓘ) with hover/focus tooltip. */
.info-tip { position: relative; display: inline-block; cursor: help; opacity: 0.55; margin-left: 5px; font-size: 0.85em; line-height: 1; }
.info-tip:hover, .info-tip:focus { opacity: 1; outline: none; }
.info-tip::after {
    content: attr(data-tip);
    position: absolute; left: 50%; bottom: 135%; transform: translateX(-50%);
    width: max-content; max-width: 240px; padding: 6px 10px;
    background: var(--c-void-800); color: var(--c-stone-100);
    border: 1px solid var(--c-void-500); border-radius: 8px;
    font-size: 0.7rem; line-height: 1.35; text-align: left; white-space: normal;
    opacity: 0; pointer-events: none; transition: opacity 0.12s; z-index: 60;
}
.info-tip:hover::after, .info-tip:focus::after { opacity: 1; }

/* ===== Connect panel ("Get your phone connected") ===== */
.connect-step { display: flex; align-items: flex-start; gap: 12px; }
.connect-step-num {
    flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    background: color-mix(in srgb, var(--c-accent-400) 18%, transparent);
    color: var(--c-accent-400);
    border: 1px solid color-mix(in srgb, var(--c-accent-400) 35%, transparent);
}
/* Ember = trust moment (paired / first photos). Glow reserved for exactly this. */
.connect-celebrate-check {
    width: 5rem; height: 5rem; border-radius: 9999px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--fv-ember-bright) 15%, transparent);
    border: 2px solid var(--fv-ember-bright);
    box-shadow: 0 0 40px color-mix(in srgb, var(--fv-ember-bright) 35%, transparent);
    animation: fv-settle-pop var(--fv-settle) both;
}
@keyframes fv-settle-pop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
