/* AUTO-GENERATED by build_css_bundles.py from style.css + theme.css.
   Do not edit - edit the source files instead. */
/* ==== style.css ==== */
/* Instagram Viewer - Optimized CSS */

/* Maintenance Banner */
.maintenance-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
    flex-wrap: wrap;
    word-break: break-word;
}
.maintenance-banner .maintenance-icon {
    font-size: 18px;
}

:root {
    /* Backgrounds */
    --bg: #f5f5f7;
    --card-bg: #ffffff;
    --item-bg: #ebebed;
    --item-hover: #e3e3e5;
    --overlay-bg: #000;
    
    /* Text colors */
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #afafaf;
    --text-on-dark: #fff;
    --text-on-accent: #fff;
    
    /* Borders */
    --border: #d1d1d6;
    --border-light: #dadadd;
    --accent: #1d1d1f;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
    --shadow: 0 2px 8px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.05);
    --shadow-lg: 0 4px 16px rgba(0,0,0,.12), 0 8px 32px rgba(0,0,0,.08);
    
    /* Border radius */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Accent & gradients */
    --accent-color: #FF006E;
    --accent-color-soft: #e00062;
    --accent-color-rgb: 255,0,110;
    --gradient-warm-start: #FF006E;
    --gradient-warm-mid: #FF5C8A;
    --gradient-warm-end: #FFB347;
    --cta-warm-rgb: 255, 179, 71; /* rgb() form of --gradient-warm-end */

/* --accent-color: #DC143C;
--accent-color-soft: #c41136;
--accent-color-rgb: 220,20,60;
--gradient-warm-start: #DC143C;
--gradient-warm-mid: #E94B7C;
--gradient-warm-end: #FF6B9D; */

    /* Component-specific */
    --search-btn-bg: #1d1d1f;
    --search-btn-color: #fff;
    
    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Transitions */
    --transition-fast: 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Backgrounds */
    --bg: #000000;
    --card-bg: #030303;
    --item-bg: #0d0d0d;
    --item-hover: #131313;
    --overlay-bg: #000;
    
    /* Text colors */
    --text-primary: #fafafa;
    --text-secondary: #a1a1a6;
    --text-tertiary: #48484a;
    --text-on-dark: #fff;
    --text-on-accent: #fff;
    
    /* Borders */
    --border: rgba(255,255,255,.06);
    --border-light: #151515;
    --accent: #fafafa;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.2);
    --shadow: 0 2px 4px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.25);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
@media (max-width: 768px) { html { font-size: 15px; } }
@media (max-width: 480px) { html { font-size: 15px; } }

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
background: 
        radial-gradient(ellipse at top left, rgba(var(--accent-color-rgb), 0.03) 0%, transparent 100%),
        var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    /* Safe area for iPhone notch/home bar */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

input, textarea, select, button {
    font-family: inherit;
}

/* Prevent iOS auto-zoom on focus and improve touch behavior */
input, textarea, select {
    font-size: 16px; /* iOS zooms on < 16px */
    touch-action: manipulation; /* Disable double-tap zoom on inputs */
    -webkit-tap-highlight-color: transparent;
}

/* Eliminate 300ms tap delay on interactive elements */
a, button, [role="button"], .tab, .action-btn, .nav-link, .mobile-menu-item {
    touch-action: manipulation;
}

[data-theme="dark"] body {
    background: 
        radial-gradient(ellipse at bottom left, rgba(var(--accent-color-rgb), 0.04) 0%, transparent 100%),
        var(--bg);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px) 40px;
}

/* Header */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    padding: 0 clamp(12px, 4vw, 32px);
    padding-left: max(clamp(12px, 4vw, 32px), env(safe-area-inset-left));
    padding-right: max(clamp(12px, 4vw, 32px), env(safe-area-inset-right));
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 clamp(16px, 4vw, 48px);
    position: relative;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* Image-based logo with theme switching */
.logo-image {
    height: 54px;
    width: auto;
    display: block;
    /* Crop ~3% from the right edge */
    clip-path: inset(0 3% 0 0);
    margin-right: -3%; /* Compensate for the clipped space */
}

.logo-image.logo-light {
    display: block;
}

.logo-image.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-image.logo-light {
    display: none;
}

[data-theme="dark"] .logo-image.logo-dark {
    display: block;
}

/* Fallback text logo (hidden when images exist) */
.logo-icon { width: 24px; height: 24px; display: none; align-items: center; justify-content: center; }
.logo-icon svg { width: 20px; height: 20px; }

.logo-text { font-size: 20px; font-weight: 700; letter-spacing: -.5px; color: var(--text-primary); display: none; }
.logo-accent { color: var(--accent-color); }

/* Logo link */
.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.5px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
}

/* Header Navigation */
.header-nav {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-right: 12px;
}

.nav-link {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .08s, color .08s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--item-bg);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background .15s, color .15s;
    font-family: inherit;
}

.nav-dropdown-toggle:hover {
    color: var(--text-primary);
    background: var(--item-bg);
}

.nav-dropdown-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform .15s;
}

.nav-dropdown.open .nav-dropdown-toggle svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 1000;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: background .1s;
}

.nav-dropdown-item:hover {
    background: var(--item-bg);
}

.nav-dropdown-item svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    color: var(--text-secondary);
}

.header-notes {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    pointer-events: none;
}

.note {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: lowercase;
    letter-spacing: .3px;
    opacity: .7;
    transition: opacity .2s;
}
.note-1 { transform: translateY(-3px); }
.note-2 { transform: translateY(4px); opacity: .6; }
.note-3 { transform: translateY(-5px); font-weight: 600; opacity: .8; }
.note-4 { transform: translateY(3px); opacity: .55; }
.note-5 { transform: translateY(-2px); opacity: .65; }
.site-header:hover .note { opacity: 1; }

.site-header .theme-slider { position: static; }

/* Theme Slider Toggle */
.theme-slider {
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 100;
    transition: transform .15s;
}
.theme-slider:hover { transform: scale(1.08); }
.theme-slider:active { transform: scale(.92); }

.slider-track {
    position: relative;
    width: 44px;
    height: 22px;
    background: linear-gradient(135deg, #74b9ff 0%, #81ecec 50%, #ffeaa7 100%);
    border-radius: 11px;
    box-shadow: 
        var(--shadow-sm),
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    transition: background .4s cubic-bezier(.4, 0, .2, 1), box-shadow .3s;
    overflow: hidden;
}

[data-theme="dark"] .slider-track {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 50%, #1e272e 100%);
    box-shadow: 
        var(--shadow-sm),
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.slider-thumb {
    position: absolute;
    left: 3px;
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 50%;
    box-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: left .4s cubic-bezier(.4, 0, .2, 1), transform .2s, background .3s;
    z-index: 2;
}

[data-theme="dark"] .slider-thumb {
    left: calc(100% - 19px);
    background: linear-gradient(145deg, #dfe6e9 0%, #b2bec3 100%);
    box-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.slider-thumb::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), transparent 50%);
    border-radius: 50%;
}

.slider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    transition: opacity .3s, transform .3s;
    z-index: 1;
}

.slider-icon svg {
    width: 10px;
    height: 10px;
    stroke-width: 2;
    fill: none;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.slider-icon.icon-sun svg {
    stroke: #f39c12;
    fill: #f39c12;
    fill-opacity: 0.2;
}

.slider-icon.icon-moon svg {
    stroke: #ecf0f1;
    fill: #ecf0f1;
    fill-opacity: 0.3;
}

/* Light mode: sun visible, moon faded */
.icon-sun { opacity: 1; transform: scale(1); }
.icon-moon { opacity: 0.4; transform: scale(0.9); }

/* Dark mode: moon visible, sun faded */
[data-theme="dark"] .icon-sun { opacity: 0.4; transform: scale(0.9); }
[data-theme="dark"] .icon-moon { opacity: 1; transform: scale(1); }

/* Hover glow effect */
.theme-slider:hover .slider-track {
    box-shadow: 
        var(--shadow),
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        0 0 12px rgba(116, 185, 255, 0.3);
}

[data-theme="dark"] .theme-slider:hover .slider-track {
    box-shadow: 
        var(--shadow),
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 12px rgba(99, 110, 114, 0.4);
}

/* Search */
.search-container { display: flex; justify-content: center; margin-bottom: 24px; padding-top: 12px; }

.search-box {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 6px 6px 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow);
    transition: box-shadow .08s, transform .08s, border-color .08s;
}
@media (hover: hover) {
    .search-box:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--border); }
}
.search-box:focus-within { box-shadow: var(--shadow-lg); border-color: rgba(0,0,0,.15); }
[data-theme="dark"] .search-box:focus-within { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.1); }

.at-symbol { color: var(--text-tertiary); font-size: 16px; font-weight: 500; transition: color .08s, transform .08s; transform: translateY(-1px); }
.search-box:hover .at-symbol { color: var(--text-secondary); }
.search-box:focus-within .at-symbol { color: var(--text-primary); transform: translateY(-1px) scale(1.1); }

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 14px 10px;
    background: transparent;
    color: var(--text-primary);
}
.search-box input::placeholder { color: var(--text-tertiary); }

.search-btn {
    background: var(--search-btn-bg);
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--search-btn-color);
    transition: background .1s ease, transform .08s ease, box-shadow .1s ease;
}
.search-btn svg { width: 16px; height: 16px; stroke: var(--search-btn-color); stroke-width: 2; fill: none; transition: stroke .1s ease; }
.search-btn:hover { background: #333; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.search-btn:active { transform: scale(.95); }
.search-btn:disabled { opacity: .5; cursor: not-allowed; }

[data-theme="dark"] .search-btn:hover { background: #3a3a3a; box-shadow: 0 2px 12px rgba(0,0,0,.3); }

/* Loading */
.loading {
    text-align: center;
    padding: 14px 0 20px;
    min-height: 176px;
    contain: layout paint;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.loader-visual {
    position: relative;
    width: 136px;
    height: 136px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.loader-avatar {
    --loader-avatar-bg-1: #050608;
    --loader-avatar-bg-2: #040507;
    --loader-avatar-bg-3: #020304;
    --loader-avatar-highlight-2: rgba(255, 255, 255, 0.006);
    --loader-avatar-highlight-3: rgba(255, 255, 255, 0.014);
    --loader-avatar-top-glow: rgba(255, 255, 255, 0.004);
    --loader-avatar-inner-shadow: rgba(0, 0, 0, 0.32);
    --loader-avatar-border: rgba(255, 255, 255, 0.02);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background:
        linear-gradient(180deg, var(--loader-avatar-bg-1) 0%, var(--loader-avatar-bg-2) 58%, var(--loader-avatar-bg-3) 100%);
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    z-index: 2;
    isolation: isolate;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24), inset 0 0 0 1px var(--loader-avatar-border), inset 0 -10px 16px var(--loader-avatar-inner-shadow);
}
[data-theme="dark"] .loader-avatar {
    --loader-avatar-bg-1: #040506;
    --loader-avatar-bg-2: #030405;
    --loader-avatar-bg-3: #010203;
    --loader-avatar-highlight-2: rgba(255, 255, 255, 0.004);
    --loader-avatar-highlight-3: rgba(255, 255, 255, 0.012);
    --loader-avatar-top-glow: rgba(255, 255, 255, 0.003);
    --loader-avatar-inner-shadow: rgba(0, 0, 0, 0.36);
    --loader-avatar-border: rgba(255, 255, 255, 0.018);
}
.loader-avatar::before {
    content: '';
    position: absolute;
    inset: -28% -52%;
    background: linear-gradient(
        110deg,
        transparent 18%,
        var(--loader-avatar-highlight-2) 38%,
        var(--loader-avatar-highlight-3) 50%,
        var(--loader-avatar-highlight-2) 62%,
        transparent 84%
    );
    background-size: 60% 100%;
    background-repeat: no-repeat;
    opacity: 0.08;
    animation: shimmer 1.35s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 0;
}

.loader-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.004), transparent 24%, rgba(0, 0, 0, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.012), inset 0 -10px 16px var(--loader-avatar-inner-shadow);
    z-index: 1;
}

.loader-avatar.loaded {
    animation: none;
    background: var(--border-light);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.loader-avatar.loaded::before,
.loader-avatar.loaded::after {
    opacity: 0;
}

.loader-avatar img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .15s linear; position: relative; z-index: 2; }
.loader-avatar.loaded img { opacity: 1; }

.loader-tech-shell,
.loader-tech-text,
.loader-scan-bars,
.loader-orbit {
    position: absolute;
    inset: 0;
    display: none;
    pointer-events: none;
}

.loader-tech-text {
    align-items: center;
    justify-content: center;
    gap: 0.18em;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.loader-tech-text span {
    display: inline-block;
}

.loader-scan-bars {
    inset: auto 0 8px 0;
    height: 44px;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
}

.loader-scan-bars span {
    display: block;
    width: 6px;
    border-radius: 999px;
    transform-origin: 50% 100%;
}

.loader-orbit-ring,
.loader-orbit-node {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.loader-orbit-node::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 9px;
    height: 9px;
    margin-left: -4.5px;
    border-radius: 50%;
}

.loader-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    border-top-color: #3b82f6;
    animation: spin .7s linear infinite;
}
.loader-ring.done { border-top-color: #22c55e; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Shared spinner (used by viewer pages, modals, etc.) */
.spinner-ring {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: rgba(255,255,255,.6);
    border-radius: 50%;
    animation: spin .8s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
}

.loader-username {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .08s ease-out, transform .08s ease-out;
    min-height: 24px;
}
.loader-username.show { opacity: 1; transform: translateY(0); }

.loader-status { font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 20px; }
.loader-status.done { color: #22c55e; }

.loader-dots.hidden { display: none !important; }
.loader-dots span { display: inline-block; width: 4px; height: 4px; background: var(--text-secondary); border-radius: 50%; animation: blink .9s ease-in-out infinite; }
.loader-dots span:nth-child(2) { animation-delay: .15s; }
.loader-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Error - Compact inline style */
.error-card {
    text-align: center;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    max-width: 400px;
    margin: 18px auto 24px;
}
.error-message {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.error-retry {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .08s, border-color .08s, color .08s, transform .08s, box-shadow .08s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.error-retry:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border);
    transform: translateY(-1px);
}
.error-retry:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Profile Card */
.profile-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: clamp(16px, 3vw, 24px) clamp(16px, 4vw, 32px);
    display: flex;
    gap: clamp(14px, 3vw, 24px);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    scroll-margin-top: 80px;
    transition: box-shadow .08s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-pic-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
    align-self: center;
}

.profile-pic-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--gradient-warm-start), var(--gradient-warm-mid), var(--gradient-warm-end), var(--gradient-warm-mid), var(--gradient-warm-start));
    padding: 4px;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
    transition: opacity .08s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-pic-wrapper:hover .profile-pic-ring { opacity: 0.85; }

.profile-pic {
    width: 102px;
    height: 102px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(110deg, #d0d0d0 30%, #ffffff 50%, #d0d0d0 70%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
    border: 4px solid var(--card-bg);
    opacity: 0;
    transition: opacity .1s ease-out;
}
[data-theme="dark"] .profile-pic {
    background: linear-gradient(110deg, #0f0f0f 30%, #4a4a4a 50%, #0f0f0f 70%);
    background-size: 200% 100%;
}
.profile-pic.loaded {
    animation: none;
    background: none;
    opacity: 1;
}

.profile-pic-overlay {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .08s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}
.profile-pic-wrapper:hover .profile-pic-overlay { opacity: 1; }
.profile-pic-overlay svg { width: 26px; height: 26px; stroke: var(--text-on-dark); stroke-width: 2; fill: none; }

.profile-info { flex: 1; min-width: 0; }
.profile-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.profile-info h2 { font-size: 20px; font-weight: 600; letter-spacing: -.3px; margin: 0; }
.profile-username { color: var(--text-secondary); font-size: 14px; margin-bottom: 6px; transition: color .1s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; }
.profile-username:hover { color: var(--accent-color-soft); }
.profile-bio { font-size: 13px; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
/* Expandable bio: when clamped (overflowing) the bio becomes tappable to reveal
   the full text, keeping the profile card compact by default without losing
   info. The .is-clamped class (set in JS) provides the affordance; .expanded
   removes the line clamp. */
.profile-bio.is-clamped { cursor: pointer; }
.profile-bio.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

.profile-stats { display: flex; gap: 24px; }
.stat { 
    display: flex; 
    flex-direction: column;
    cursor: default;
}
.stat-value { font-size: 16px; font-weight: 600; letter-spacing: -.2px; color: var(--text-primary); }
.stat-label { font-size: 11px; color: var(--text-secondary); }

/* Private Badge */
.private-badge {
    display: inline-flex;
    align-items: center;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    transition: transform .1s cubic-bezier(0.4, 0, 0.2, 1), background-color .1s cubic-bezier(0.4, 0, 0.2, 1);
}
.private-badge:hover { transform: scale(1.05); background: #fde68a; }
[data-theme="dark"] .private-badge { background: rgba(254,243,199,.15); color: #fcd34d; }
[data-theme="dark"] .private-badge:hover { background: rgba(254,243,199,.25); }

/* Gender Stats */
.gender-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    transition: box-shadow .08s cubic-bezier(0.4, 0, 0.2, 1);
}
.gender-stat { 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    font-size: 13px; 
    font-weight: 500;
    transition: transform .1s cubic-bezier(0.4, 0, 0.2, 1), opacity .1s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}
.gender-stat:hover { transform: scale(1.05); opacity: 0.9; }
.gender-icon { font-size: 14px; transition: transform .1s cubic-bezier(0.4, 0, 0.2, 1); }
.gender-stat:hover .gender-icon { transform: rotate(12deg); }
.gender-stat.male { color: #3b82f6; }
.gender-stat.female { color: #ec4899; }
.gender-stat.unknown { color: var(--text-secondary); }

/* Private Message */
.private-message {
    text-align: center;
    padding: 22px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
}

[data-theme="dark"] .private-message {
    border-color: transparent;
}

.private-message h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.private-message p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Profile Card Actions (Cross-linking buttons - right side) */
.profile-card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
    padding-left: 16px;
    align-self: center;
}

.profile-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    background: var(--item-bg);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
    white-space: nowrap;
}

.profile-action-btn:hover {
    color: var(--text-primary);
    background: var(--item-hover);
    border-color: var(--border);
}

.profile-action-btn svg {
    width: 13px;
    height: 13px;
    stroke-width: 2;
    flex-shrink: 0;
}

.profile-action-btn.primary {
    background: var(--accent-color);
    color: var(--text-on-accent);
    border-color: transparent;
}

.profile-action-btn.primary:hover {
    background: var(--accent-color-soft);
    color: var(--text-on-accent);
}

/* Mobile: absolute positioned action buttons in top-right */
.profile-card-actions-mobile {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    z-index: 5;
}

/* Switch to mobile action buttons when profile card goes vertical (768px) */
@media (max-width: 768px) {
    .profile-card-actions {
        display: none;
    }
    .profile-card-actions-mobile {
        display: flex;
    }
}

/* ───────────────────────────────────────────────────────────────────────
   Profile-card CTAs (Recent Follows funnel)
   Deliberately uses NEW class names (.follows-cta / .profile-quick-cta)
   instead of .profile-action-btn: cosmos.css + theme.css both override
   .profile-action-btn background/border/color with !important, which would
   flatten these gradients. Nothing else targets these classes, so the rules
   below win everywhere without needing !important.
   ─────────────────────────────────────────────────────────────────────── */

/* Primary CTA — "See Who @user Recently Followed...". Warm translucent wash
   (accent pink into the gradient's amber end) on a tight 12px radius: bright
   enough to pull the eye, still see-through and flat rather than cartoonish. */
.follows-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.1px;
    text-decoration: none;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(var(--accent-color-rgb), .18) 0%, rgba(var(--cta-warm-rgb), .24) 100%);
    border: 1px solid rgba(var(--cta-warm-rgb), .38);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.follows-cta:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--cta-warm-rgb), .6);
    box-shadow: 0 3px 10px rgba(var(--accent-color-rgb), .18), inset 0 1px 0 rgba(255, 255, 255, .09);
}
.follows-cta:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}
.follows-cta__icon {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}
.follows-cta__text { min-width: 0; }
.follows-cta__user { white-space: nowrap; color: var(--accent-color); font-weight: 700; }
.follows-cta__arrow {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-left: 2px;
    opacity: .8;
    transition: transform .12s ease;
}
.follows-cta:hover .follows-cta__arrow { transform: translateX(2px); }

/* Desktop: lives in the right-hand action column, so cap the width and keep
   the label left-aligned when it wraps to two lines. */
.profile-card-actions .follows-cta {
    max-width: 250px;
    text-align: left;
}
/* Column layout — don't let the shared `flex: 1 1 0` stretch these vertically. */
.profile-card-actions .profile-quick-cta {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 13px;
}

/* Secondary quick CTAs (Stories / Posts) — same warm wash as the primary CTA,
   just compact. */
.profile-quick-cta {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* inline-flex drops the literal space before the trailing emoji */
    padding: 9px 10px;
    white-space: nowrap;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .2px;
    line-height: 1;
    text-decoration: none;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(var(--accent-color-rgb), .18) 0%, rgba(var(--cta-warm-rgb), .24) 100%);
    border: 1px solid rgba(var(--cta-warm-rgb), .38);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.profile-quick-cta:hover {
    border-color: rgba(var(--cta-warm-rgb), .6);
    box-shadow: 0 3px 10px rgba(var(--accent-color-rgb), .18), inset 0 1px 0 rgba(255, 255, 255, .09);
    transform: translateY(-1px);
}
.profile-quick-cta:active { transform: translateY(0); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); }

/* Inline placement modifier: pulls the mobile action row out of the absolute
   top-right corner and into normal flow at the bottom of the card, where it
   becomes its own slim CTA strip. Must come AFTER the base
   .profile-card-actions-mobile rule (same specificity, later wins).
   The negative inline/bottom margins cancel the card's own padding (14px at
   <=768px, 12px at <=480px) so the strip bleeds to the card edges and reads as
   a separate bottom section rather than a floating button. */
.profile-card-actions--inline {
    position: static;
    flex-direction: row;
    align-items: stretch;
    /* The card centers its children at <=768px, so stretch explicitly or the
       strip shrink-wraps to its buttons instead of spanning the card. */
    align-self: stretch;
    width: auto;
    gap: 8px;
    margin: 0 -14px -14px;
    padding: 8px 14px 8px;
    /* Starts fully transparent so the top edge dissolves into the card instead of
       drawing a seam. One gradient, no blur — cheap to paint on mobile. */
    background: linear-gradient(180deg,
        rgba(var(--cta-warm-rgb), 0) 0%,
        rgba(var(--cta-warm-rgb), .03) 45%,
        rgba(var(--accent-color-rgb), .07) 100%);
}

/* Warm translucent wash for the strip's buttons — brighter and more orange
   than the neutral glass pills, but still see-through and flat (no heavy
   gradient), with a tighter radius so it reads modern rather than cartoonish. */
.profile-card-actions--inline .follows-cta {
    width: 100%;
    justify-content: center;
    padding: 13px 16px;
    font-size: 14px;
    text-align: center;
}

/* Tabs */
.connections-container { 
    background: var(--card-bg); 
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); 
    box-shadow: var(--shadow);
    padding: 12px;
    margin-bottom: 12px;
    /* Performance: contain this component's layout calculations */
    contain: layout style;
}
[data-theme="dark"] .connections-container {
    border-color: transparent;
    box-shadow: var(--shadow);
}

.tabs { display: flex; gap: 2px; padding: 4px; background: var(--item-bg); border-radius: 8px; margin-bottom: 12px; }
.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color .1s, background .1s;
}
.tab:hover { color: var(--text-primary); }
.tab.active { background: var(--card-bg); color: var(--text-primary); }
[data-theme="dark"] .tab.active { background: var(--card-bg); }

.tab-count {
    font-size: 11px;
    font-weight: 700;
    font-family: inherit;
    line-height: 1;
    color: var(--text-tertiary);
    background: transparent;
    padding: 3px 6px;
    border-radius: 10px;
    transition: background .1s, color .1s;
    min-width: 20px;
    text-align: center;
}
.tab.active .tab-count { background: linear-gradient(135deg, var(--gradient-warm-start) 0%, var(--gradient-warm-start) 70%, var(--gradient-warm-end) 100%); color: var(--text-on-dark); }

/* Panels */
.tab-panel { display: none; padding: 0 2px 2px; }
.tab-panel.active { display: block; }

.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; position: relative; }
.panel-subtitle-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.panel-subtitle { font-size: 13px; font-weight: 500; margin: 0; }
.panel-subtitle strong { font-weight: 700; }
.panel-loaded { font-size: 12px; color: var(--text-tertiary); font-weight: 500; }
/* Inline "order may not be exact" note — absolute bubble, zero layout shift. */
.order-note { display: inline-flex; align-items: center; line-height: 0; color: #ef4444; cursor: help; flex-shrink: 0; }
.order-note svg { width: 15px; height: 15px; }
.order-note:hover, .order-note:focus-visible { color: #dc2626; outline: none; }
.order-note-bubble {
    position: absolute; top: calc(100% + 6px); left: 4px; z-index: 60;
    width: max-content; max-width: min(260px, 82vw); padding: 8px 10px;
    background: var(--panel-bg, #1c1c1e); color: var(--text-primary, #f5f5f7);
    border: 1px solid var(--border-light, rgba(0,0,0,.12)); border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    font-size: 12px; line-height: 1.45; font-weight: 500; text-align: left;
    opacity: 0; visibility: hidden; transform: translateY(-2px);
    transition: opacity .12s ease, transform .12s ease; pointer-events: none;
}
.order-note:hover .order-note-bubble,
.order-note:focus .order-note-bubble,
.order-note:focus-within .order-note-bubble { opacity: 1; visibility: visible; transform: translateY(0); }

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: var(--item-bg);
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background-color .1s cubic-bezier(0.4, 0, 0.2, 1), border-color .1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .1s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.filter-bar:focus-within { background: var(--item-hover); border-color: rgba(var(--accent-color-rgb),.2); box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb),.05); }
.filter-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: color .1s cubic-bezier(0.4, 0, 0.2, 1), transform .1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}
.filter-bar:focus-within .filter-icon { color: var(--text-secondary); transform: scale(1.1); }
.filter-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}
.filter-input::placeholder { color: var(--text-tertiary); }
.filter-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: none;
    background: var(--border);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color .1s cubic-bezier(0.4, 0, 0.2, 1), color .1s cubic-bezier(0.4, 0, 0.2, 1), transform .1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}
.filter-clear:hover { background: var(--text-tertiary); color: var(--text-primary); transform: scale(1.1) rotate(90deg); }
.filter-clear:active { transform: scale(0.9) rotate(90deg); }
.filter-clear.hidden { display: none; }

.panel-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px; color: var(--text-secondary); font-size: 14px; }
.mini-spinner { width: 20px; height: 20px; border: 2.5px solid var(--border-light); border-top-color: var(--text-secondary); border-radius: 50%; animation: spin .8s cubic-bezier(0.4, 0.0, 0.2, 1) infinite; }

.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    background: var(--item-bg);
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color .1s cubic-bezier(0.4, 0, 0.2, 1), color .1s cubic-bezier(0.4, 0, 0.2, 1), transform .1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .1s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    transform: scale(1);
    border: 1px solid transparent;
}
@media (hover: hover) {
    .load-more-btn:hover { background: var(--item-hover); color: var(--text-primary); transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
}
.load-more-btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.load-more-btn:disabled { cursor: not-allowed; opacity: .7; transform: scale(1); }
.load-more-btn .btn-spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--text-primary); border-radius: 50%; animation: spin .8s cubic-bezier(0.4, 0.0, 0.2, 1) infinite; }

/* User List */
.user-list {
    display: flex;
    flex-direction: column;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: var(--radius);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
    /* Performance: contain paint to this element */
    contain: style;
}
.user-list::-webkit-scrollbar { width: 6px; }
.user-list::-webkit-scrollbar-track { background: transparent; }
.user-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--user-item-bg, transparent);
    border-radius: 10px;
    transition: background-color .08s ease-out, border-color .08s ease-out;
    /* Performance: isolate each item's paint */
    contain: style;
    -webkit-tap-highlight-color: transparent;
}
.user-item:last-of-type { border-bottom: none; }
.user-item:hover { background: var(--user-item-hover-bg, var(--item-hover)); }

.user-item-index {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--border);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color .08s ease-out, color .08s ease-out;
}
.user-item:hover .user-item-index {
    background: var(--user-item-index-hover-bg, var(--border));
    color: var(--user-item-index-hover-color, var(--text-secondary));
}

.avatar-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--border-light);
}
/* Only animate shimmer when in viewport and not loaded - uses content-visibility */
.avatar-wrapper:not(.loaded) {
    background: linear-gradient(110deg, #d0d0d0 30%, #ffffff 50%, #d0d0d0 70%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}
[data-theme="dark"] .avatar-wrapper:not(.loaded) {
    background: linear-gradient(110deg, #0f0f0f 30%, #4a4a4a 50%, #0f0f0f 70%);
    background-size: 200% 100%;
}
.avatar-wrapper.loaded { animation: none; background: var(--border-light); }
.avatar-wrapper img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; opacity: 0; transition: opacity .1s ease-out; }
.avatar-wrapper.loaded img { opacity: 1; }

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.user-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-item-link {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
    overflow: hidden;
}
.user-item-link:hover .user-item-username { color: var(--accent-color-soft); }
.user-item-username { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .1s cubic-bezier(0.4, 0, 0.2, 1); }
.user-item-name { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 16px; }

/* Action buttons */
.user-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    opacity: 1;
    transition: opacity .1s ease-out;
    position: relative;
}

/* Always-visible quick actions (Story Viewer + Follower Viewer) \u2014 the two
   highest-value cross-page links. Kept compact + accent-tinted so they read as
   primary CTAs that invite a tap without crowding out the username. */
.quick-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.action-btn.quick-btn {
    width: 32px;
    height: 32px;
    position: relative;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: none;
}
/* Beats `.action-btn svg { stroke: currentColor }` — a CSS stroke would
   otherwise override the element's stroke="url(#ig-warm)" attribute. */
.action-btn.quick-btn svg { width: 20px; height: 20px; stroke: url(#ig-warm); }
.action-btn.quick-btn:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

/* Story-viewer glyph: a miniature of the profile card's gradient ring. Same
   conic gradient + radial mask trick as .profile-pic-ring. */
.story-ring-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    background: conic-gradient(from 0deg, var(--gradient-warm-start), var(--gradient-warm-mid), var(--gradient-warm-end), var(--gradient-warm-mid), var(--gradient-warm-start));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
}

/* Play triangle inside the ring, so the icon reads as an action. Lives on the
   button rather than inside .story-ring-icon because that element's mask would
   clip any descendant. */
.quick-btn.story-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 7px;
    transform: translate(-40%, -50%);
    background: linear-gradient(135deg, var(--gradient-warm-start), var(--gradient-warm-mid), var(--gradient-warm-end));
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Collapsible menu of action icons \u2014 hidden by default; expands on toggle */
.menu-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px);
    transition: max-width .22s cubic-bezier(0.4, 0, 0.2, 1),
                opacity .14s ease-out,
                transform .22s cubic-bezier(0.4, 0, 0.2, 1);
}
.user-item.menu-open .menu-actions {
    max-width: 120px; /* room for the 2 remaining buttons (copy + open profile) + gaps */
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* 3-dots toggle: rotates 90\u00b0 when open as a visual cue */
.menu-toggle-btn {
    transition: background-color .08s ease-out, color .08s ease-out, transform .18s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-toggle-btn svg { fill: currentColor; stroke: none; }
.user-item.menu-open .menu-toggle-btn {
    transform: rotate(90deg);
    color: var(--text-primary);
    background: var(--border);
}

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--item-bg);
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background-color .08s ease-out, color .08s ease-out;
    flex-shrink: 0;
}
.action-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.action-btn:hover { background: var(--border); color: var(--text-primary); }
.action-btn:active { opacity: 0.7; }

/* Copy button states */
.copy-btn svg:last-child { display: none; }
.copy-btn.copied svg:first-child { display: none; }
.copy-btn.copied svg:last-child { display: block; stroke: #22c55e; animation: checkPop .2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.copy-btn.copied { background: rgba(34,197,94,.15); color: #22c55e; }

@keyframes checkPop {
    0% { transform: scale(0.5) rotate(-5deg); opacity: 0; }
    50% { transform: scale(1.15) rotate(3deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Private badge — compact circular lock icon (keeps the warm accent gradient).
   Icon-only to save horizontal space; the label lives in title/aria-label. */
.private-badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--gradient-warm-start) 0%, var(--gradient-warm-start) 60%, var(--gradient-warm-end) 100%);
    color: var(--text-on-dark);
    border-radius: 50%;
    line-height: 0;
    transition: opacity .1s cubic-bezier(0.4, 0, 0.2, 1);
}
.user-item:hover .private-badge-pill { opacity: 0.9; }
.private-badge-pill svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Top 3 styling */
.user-item.top1 { box-shadow: inset 2px 0 0 var(--accent-color); }
.user-item.top2 { box-shadow: inset 2px 0 0 rgba(var(--accent-color-rgb),.5); }
.user-item.top3 { box-shadow: inset 2px 0 0 rgba(var(--accent-color-rgb),.25); }

/* Utilities */
.hidden:not(.results) { display: none !important; }
.pushed-down { display: none !important; }

/* Reserve scroll space synchronously when a search starts so that
   un-hiding #results later doesn't push #lower-sections / .site-footer
   downward (which would register as CLS). The class is added inside the
   click handler (within Chrome's 500ms input-exclusion window), so the
   one-time growth itself is excluded from CLS. min-height matches a
   typical results panel: profile card + tabs + skeleton list. */
.container.search-active {
    min-height: calc(100vh - 80px);
}
.results.hidden {
    display: none !important;
    max-height: none !important;
    opacity: 0 !important;
    transform: none !important;
    overflow: visible !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.empty-list, .error-text { color: var(--text-tertiary); font-size: 14px; padding: 20px; text-align: center; }
.error-text { color: #b91c1c; }

/* Results reveal */
.results {
    position: relative;
    overflow: visible;
}
.results:not(.hidden) {
    display: block;
    overflow: visible;
    animation: resultsReveal .18s ease-out;
}

@keyframes resultsReveal {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* New items animation - simplified for performance */
.user-item.new-item {
    animation: slideIn .2s ease-out backwards;
    will-change: opacity, transform;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .site-header { padding: 0 16px; }
    .header-content { height: 50px; }
    .header-notes { display: none; }
    .logo-text { font-size: 20px; }
    .logo-image { height: 48px; }
    
    .profile-card { flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 20px 20px 14px; margin-bottom: 10px; }
    .profile-pic-wrapper { width: 90px; height: 90px; }
    .profile-pic { width: 84px; height: 84px; }
    .profile-stats { justify-content: center; }
    
    .tab { padding: 14px 10px; }
    .tab-count { font-size: 12px; padding: 2px 7px; }
    
    .user-item { gap: 12px; padding: 12px 8px; margin: 0; }
    .avatar-wrapper { width: 44px; height: 44px; }
    .user-item-username { font-size: 14px; }
    .user-item-name { font-size: 12px; }
    
    /* Make action buttons visible on mobile by default */
    .user-item-actions {
        opacity: 1;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
        background: transparent;
        border: 1px solid var(--border);
        border-radius: 6px;
    }
    
    .action-btn svg {
        width: 14px;
        height: 14px;
        opacity: 0.6;
    }
    
    /* Keep the quick-action CTAs fully visible on mobile with the warm sheen
       (the generic dimming above is only for the secondary menu icons). */
    .action-btn.quick-btn {
        width: 28px;
        height: 28px;
        border-color: rgba(255, 255, 255, .07);
    }
    .action-btn.quick-btn svg { width: 18px; height: 18px; opacity: 1; }
    .story-ring-icon { width: 18px; height: 18px; }
    .quick-btn.story-btn::after { width: 5.5px; height: 6.5px; }
    
    .action-btn:active {
        background: var(--item-bg);
    }
    
    .action-btn:active svg {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .container { padding: 12px 12px 40px; }
    .header-content { height: 46px; }
    .logo-text { font-size: 18px; }
    .logo-image { height: 42px; }
    .profile-card { scroll-margin-top: 60px; }
    .profile-pic-wrapper { width: 80px; height: 80px; }
    .profile-pic { width: 74px; height: 74px; }
}

/* ============== Footer ============== */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-light);
    padding: 24px 20px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    margin-top: 44px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.1s ease;
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-separator {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-weight: 400;
}

.footer-disclaimer {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 400;
    font-style: italic;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .site-footer {
        padding: 20px 16px;
        margin-top: 28px;
    }
    
    .footer-content {
        gap: 10px;
    }
    
    .footer-links {
        font-size: 0.85rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
    
    .footer-disclaimer {
        font-size: 0.7rem;
    }
}
/* ============== MOBILE RESPONSIVE STYLES ============== */

/* Mobile Menu Button (Hamburger) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    position: relative;
    z-index: 1001;
    transition: transform 0.1s ease;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--text-primary, #fafafa);
    border-radius: 2px;
    transition: transform 0.15s ease, opacity 0.15s ease;
    transform-origin: center;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1000;
    touch-action: none; /* Prevent scroll-through on mobile */
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Drawer */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    background: var(--card-bg);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.15s;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

[data-theme="dark"] .mobile-menu {
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
    border-left: 1px solid var(--border);
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.mobile-menu-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--item-bg);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.1s ease, transform 0.1s ease;
}

.mobile-menu-close:hover {
    background: var(--item-hover);
    transform: rotate(90deg);
}

.mobile-menu-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
}

.mobile-menu-content {
    padding: 12px;
    flex: 1;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.1s ease, color 0.1s ease;
    margin-bottom: 4px;
}

.mobile-menu-item:hover {
    background: var(--item-bg);
}

.mobile-menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: var(--text-secondary);
    transition: stroke 0.1s ease;
}

.mobile-menu-item:hover svg {
    stroke: var(--accent-color);
}

.mobile-menu-divider {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 20px 16px 8px;
    margin-top: 12px;
}

/* Mobile Theme Toggle Visibility */
.mobile-theme-toggle {
    display: none;
}

.desktop-theme-toggle {
    display: flex;
}

/* Desktop Navigation Visibility */
.desktop-nav {
    display: flex;
}

/* Tablet and Mobile Responsive Breakpoints */
@media (max-width: 900px) {
    /* Show mobile hamburger button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Hide desktop navigation */
    .desktop-nav {
        display: none !important;
    }
    
    /* Show mobile theme toggle, hide desktop one */
    .mobile-theme-toggle {
        display: flex;
    }
    
    .desktop-theme-toggle {
        display: none !important;
    }
    
    /* Adjust hero section */
    .hero-section {
        padding: 30px 16px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Features grid */
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 16px;
        margin-bottom: 50px;
    }
    
    .feature {
        padding: 18px 14px;
    }
    
    .feature-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 10px;
    }
    
    .feature-title {
        font-size: 0.88rem;
    }
    
    .feature-text {
        font-size: 0.78rem;
    }
    
    /* Steps */
    .steps {
        padding: 0 16px;
        margin-bottom: 60px;
    }
    
    .steps-title {
        font-size: 1.6rem;
        margin-bottom: 32px;
    }
    
    .steps-grid {
        gap: 16px;
    }
    
    .step {
        padding: 24px 20px;
    }
    
    /* FAQ */
    .faq {
        margin: 60px auto;
        padding: 0 16px;
    }
    
    .faq-title {
        font-size: 1.6rem;
        margin-bottom: 32px;
    }
    
    .faq-list {
        gap: 20px;
    }
    
    .faq-item {
        padding-bottom: 20px;
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .site-header {
        padding: 0 12px;
    }
    
    .header-content {
        height: 56px;
        padding: 0 8px;
    }
    
    .header-notes {
        display: none;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .logo-icon svg {
        width: 18px;
        height: 18px;
    }
    
    /* Make mobile theme toggle smaller */
    .mobile-theme-toggle .slider-track {
        width: 38px;
        height: 20px;
    }
    
    .mobile-theme-toggle .slider-thumb {
        width: 14px;
        height: 14px;
        left: 2px;
    }
    
    [data-theme="dark"] .mobile-theme-toggle .slider-thumb {
        left: calc(100% - 16px);
    }
    
    .mobile-theme-toggle .slider-icon {
        width: 10px;
        height: 10px;
    }
    
    .mobile-theme-toggle .slider-icon svg {
        width: 8px;
        height: 8px;
    }
    
    /* Container padding */
    .container {
        padding: 0 16px 50px;
    }
    
    /* Hero section */
    .hero-section {
        padding: 25px 16px 0;
    }
    
    .badge {
        font-size: 0.7rem;
        margin-bottom: 16px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }
    
    /* Search box */
    .search-container {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .search-box {
        padding: 5px 5px 5px 16px;
    }
    
    .at-symbol {
        font-size: 15px;
    }
    
    .search-box input {
        font-size: 16px;
        padding: 12px 8px;
    }
    
    .search-btn {
        padding: 12px 14px;
    }
    
    .search-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Stats */
    .stats {
        gap: 24px;
        margin-bottom: 28px;
        flex-wrap: wrap;
    }
    
    .stat {
        font-size: 0.85rem;
    }
    
    .stat-icon {
        width: 16px;
        height: 16px;
    }
    
    /* Profile card */
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 14px 14px;
    }
    
    .profile-pic-wrapper {
        width: 72px;
        height: 72px;
    }
    
    .profile-pic {
        width: 66px;
        height: 66px;
    }
    
    .profile-info h2 {
        font-size: 18px;
    }
    
    .profile-name-row {
        justify-content: center;
    }
    
    .profile-username {
        font-size: 13px;
    }
    
    .profile-bio {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .profile-stats {
        justify-content: center;
        gap: 20px;
    }
    
    .stat-value {
        font-size: 15px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    /* Gender stats */
    .gender-stats {
        gap: 12px;
        padding: 8px 12px;
    }
    
    .gender-stat {
        font-size: 12px;
    }
    
    /* Tabs */
    .tab {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .tab-count {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    /* User items */
    .user-item {
        gap: 12px;
        padding: 12px 8px;
        margin: 0;
    }
    
    .avatar-wrapper {
        width: 44px;
        height: 44px;
    }
    
    .user-item-username {
        font-size: 14px;
    }
    
    .user-item-name {
        font-size: 12px;
    }
    
    .action-btn {
        width: 34px;
        height: 34px;
    }
    
    .action-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Filter bar */
    .filter-bar {
        padding: 8px 12px;
    }
    
    .filter-input {
        font-size: 16px;
    }

    /* Features - stack to single column on smaller tablets */
    .features {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    /* Even smaller adjustments for phones */
    .container {
        padding: 0 12px 40px;
    }

    .loading {
        padding: 6px 0 10px;
        min-height: 136px;
    }

    .loader-visual {
        width: 112px;
        height: 112px;
        margin-bottom: 4px;
    }
    
    .header-content {
        height: 52px;
        padding: 0 4px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-icon {
        width: 20px;
        height: 20px;
    }
    
    .logo-icon svg {
        width: 16px;
        height: 16px;
    }
    
    /* Mobile theme toggle even smaller */
    .mobile-theme-toggle .slider-track {
        width: 36px;
        height: 18px;
    }
    
    .mobile-theme-toggle .slider-thumb {
        width: 12px;
        height: 12px;
        left: 2px;
    }
    
    [data-theme="dark"] .mobile-theme-toggle .slider-thumb {
        left: calc(100% - 14px);
    }
    
    .mobile-theme-toggle .slider-icon {
        width: 9px;
        height: 9px;
    }
    
    .mobile-theme-toggle .slider-icon svg {
        width: 7px;
        height: 7px;
    }
    
    .mobile-menu-btn {
        width: 28px;
        height: 28px;
        padding: 5px;
    }
    
    /* Hero section */
    .hero-section {
        padding: 20px 12px 0;
    }
    
    .badge {
        font-size: 0.65rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Search */
    .search-box {
        padding: 4px 4px 4px 12px;
    }
    
    .search-box input {
        font-size: 16px;
        padding: 10px 6px;
    }
    
    .search-btn {
        padding: 10px 12px;
    }
    
    /* Stats */
    .stats {
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .stat {
        font-size: 0.8rem;
    }
    
    /* Profile card */
    .profile-card {
        padding: 12px 12px;
        gap: 10px;
        scroll-margin-top: 60px;
    }

    /* Match the tighter card padding so the CTA strip stays edge-to-edge. */
    .profile-card-actions--inline {
        margin: 0 -12px -12px;
        padding: 7px 12px 7px;
    }
    
    .profile-pic-wrapper {
        width: 64px;
        height: 64px;
    }
    
    .profile-pic {
        width: 58px;
        height: 58px;
    }
    
    .profile-info h2 {
        font-size: 16px;
    }
    
    .profile-username {
        font-size: 12px;
    }
    
    .profile-bio {
        font-size: 11px;
    }
    
    .profile-stats {
        gap: 16px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    /* Gender stats */
    .gender-stats {
        gap: 10px;
        padding: 6px 10px;
    }
    
    .gender-stat {
        font-size: 11px;
    }
    
    /* Connections container */
    .connections-container {
        padding: 8px;
    }
    
    /* Tabs */
    .tabs {
        padding: 3px;
        gap: 1px;
    }
    
    .tab {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .tab-count {
        font-size: 9px;
        padding: 2px 4px;
        min-width: 18px;
    }
    
    /* Panel */
    .panel-subtitle {
        font-size: 12px;
    }
    
    .panel-loaded {
        font-size: 11px;
    }
    
    /* Filter bar */
    .filter-bar {
        padding: 6px 10px;
    }
    
    .filter-icon {
        width: 13px;
        height: 13px;
    }
    
    .filter-input {
        font-size: 16px;
    }
    
    /* User items */
    .user-item {
        gap: 10px;
        padding: 10px 6px;
        margin: 0;
    }
    
    .avatar-wrapper {
        width: 42px;
        height: 42px;
    }
    
    .user-item-username {
        font-size: 13px;
    }
    
    .user-item-name {
        font-size: 11px;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
    }
    
    .action-btn svg {
        width: 15px;
        height: 15px;
    }
    
    .private-badge-pill {
        font-size: 8px;
        padding: 2px 5px 2px 4px;
    }
    
    .private-badge-pill svg {
        width: 8px;
        height: 8px;
    }
    
    /* Load more button */
    .load-more-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    /* Features */
    .features {
        margin-bottom: 40px;
    }
    
    .feature {
        padding: 16px 12px;
    }
    
    .feature-icon {
        width: 24px;
        height: 24px;
        margin-bottom: 8px;
    }
    
    .feature-title {
        font-size: 0.82rem;
        margin-bottom: 4px;
    }
    
    .feature-text {
        font-size: 0.75rem;
    }
    
    /* Steps */
    .steps {
        margin-bottom: 50px;
    }
    
    .steps-title {
        font-size: 1.4rem;
        margin-bottom: 28px;
    }
    
    .steps-grid {
        gap: 12px;
    }
    
    .step {
        padding: 20px 16px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .step-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .step-text {
        font-size: 0.85rem;
    }
    
    /* FAQ */
    .faq {
        margin: 50px auto;
    }
    
    .faq-title {
        font-size: 1.4rem;
        margin-bottom: 28px;
    }
    
    .faq-list {
        gap: 16px;
    }
    
    .faq-item {
        padding-bottom: 16px;
    }
    
    .faq-q {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
    
    .faq-a {
        font-size: 0.85rem;
    }
    
    /* Private message */
    .private-message {
        padding: 24px 16px;
    }
    
    .private-message h3 {
        font-size: 15px;
    }
    
    .private-message p {
        font-size: 13px;
    }
    
    /* Loading */
    .loader-avatar {
        width: 70px;
        height: 70px;
        margin-bottom: 0;
    }
    
    .loader-username {
        font-size: 16px;
        margin-bottom: 2px;
        min-height: 22px;
    }
    
    .loader-status {
        font-size: 13px;
        min-height: 18px;
    }
    
    /* Error */
    .error-card {
        padding: 14px 20px;
    }
    
    .error-message {
        font-size: 14px;
    }
    
    .error-retry {
        font-size: 13px;
    }
}

/* Landscape phone optimization */
@media (max-width: 900px) and (max-height: 500px) {
    .hero-section {
        padding: 20px 16px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }
    
    .stats {
        margin-bottom: 20px;
    }
}

/* Prevent body scroll when mobile menu is open (iOS-safe) */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Prevent pull-to-refresh on Android / overscroll bounce on iOS */
html, body {
    overscroll-behavior-y: none;
}

/* ==== theme.css ==== */
/* ═══════════════════════════════════════════════════════
   THEME — InstaPeep  (Consolidated Production Design)
   Single source: cosmos dark + ember-ocean bg +
   accent-haze-seam-soft cards + orbit-lattice loader +
   cream light mode.
   Loads AFTER style.css to override base styles.
   ═══════════════════════════════════════════════════════ */


/* ── Core Variables (dark / default) ── */
:root,
[data-theme="dark"] {
    /* Base palette — ember-ocean variant frozen */
    --bg: #03060d;
    --card-bg: rgba(5, 8, 15, 0.978);
    --item-bg: rgba(255, 255, 255, 0.02);
    --item-hover: rgba(255, 255, 255, 0.032);
    --panel-bg: rgba(5, 8, 15, 0.946);
    --text-primary: #f0eef5;
    --text-secondary: #919cb1;
    --text-tertiary: #4d596d;
    --text-on-accent: #fff;
    --text-on-dark: #fff;
    --border: rgba(255, 255, 255, 0.052);
    --border-light: rgba(255, 255, 255, 0.036);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 10px 34px rgba(0, 0, 0, 0.54);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
    --accent-color: #FF006E;
    --accent-color-rgb: 255, 0, 110;
    --search-btn-bg: linear-gradient(135deg, #b9514b, #7a5773, #165f77);
    --search-btn-color: #fff;
    --overlay-bg: rgba(0, 0, 0, 0.85);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --cosmos-solid: rgba(4, 7, 14, 0.982);
    --cosmos-solid-border: rgba(255, 255, 255, 0.038);
    --cosmos-gradient: linear-gradient(135deg, #FF006E, #FF5C8A, #FFB347);
    --cosmos-ring: conic-gradient(from 0deg, #FF006E, #FF5C8A, #FFB347, #FF5C8A, #FF006E);
    --cosmos-card-shadow: 0 22px 48px -30px rgba(0, 0, 0, 0.84), 0 14px 30px -18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.025);
    --cosmos-soft-shadow: 0 16px 34px -26px rgba(0, 0, 0, 0.7), 0 10px 22px -16px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.02);

    /* Ember-ocean surface tokens */
    --ember-surface-strong: rgba(5, 8, 15, 0.978);
    --ember-surface-soft: rgba(255, 255, 255, 0.016);
    --ember-border-strong: rgba(255, 255, 255, 0.04);
    --ember-border-soft: rgba(255, 255, 255, 0.032);
    --ember-header-bg: rgba(2, 4, 10, 0.93);

    /* Ember-ocean nebula animation tokens */
    --ember-ocean-shift-duration: 38s;
    --ember-ocean-nebula-1: #d6662b;
    --ember-ocean-nebula-2: #d38a16;
    --ember-ocean-nebula-3: #ef8c47;
    --ember-ocean-nebula-4: #f1b57a;
    --ember-ocean-nebula-1-opacity: 0.14;
    --ember-ocean-nebula-2-opacity: 0.12;
    --ember-ocean-nebula-3-opacity: 0.1;
    --ember-ocean-nebula-4-opacity: 0.07;
    --ember-ocean-warm-gradient:
        radial-gradient(circle at 16% 24%, rgba(201, 93, 44, 0.16), transparent 28%),
        radial-gradient(circle at 36% 80%, rgba(210, 134, 30, 0.11), transparent 24%),
        radial-gradient(circle at 74% 18%, rgba(219, 113, 60, 0.1), transparent 25%);
    --ember-ocean-cool-gradient:
        radial-gradient(circle at 28% 24%, rgba(35, 110, 141, 0.08), transparent 28%),
        radial-gradient(circle at 80% 26%, rgba(11, 123, 157, 0.16), transparent 30%),
        radial-gradient(circle at 68% 74%, rgba(73, 144, 216, 0.1), transparent 26%);
    --ember-ocean-mobile-bg:
        radial-gradient(circle at 20% 18%, rgba(19, 10, 8, 0.22), transparent 36%),
        radial-gradient(circle at 80% 20%, rgba(3, 16, 24, 0.22), transparent 40%),
        linear-gradient(180deg, rgba(2, 4, 10, 0.5), rgba(2, 4, 10, 0.22));
    --ember-ocean-mobile-warm-gradient:
        radial-gradient(circle at 18% 22%, rgba(201, 93, 44, 0.1), transparent 28%),
        radial-gradient(circle at 34% 78%, rgba(210, 134, 30, 0.08), transparent 24%),
        radial-gradient(circle at 76% 18%, rgba(219, 113, 60, 0.06), transparent 26%);
    --ember-ocean-mobile-cool-gradient:
        radial-gradient(circle at 24% 22%, rgba(35, 110, 141, 0.06), transparent 26%),
        radial-gradient(circle at 78% 24%, rgba(11, 123, 157, 0.1), transparent 30%),
        radial-gradient(circle at 68% 72%, rgba(73, 144, 216, 0.06), transparent 25%);
    --ember-ocean-star-opacity: 0.62;

    /* Card depth tokens — accent-haze-seam-soft frozen */
    --lab-results-bleed: clamp(20px, 3vw, 40px);
    --lab-results-bleed-block: clamp(18px, 2vw, 30px);
    --lab-primary-shadow: 0 8px 14px -16px rgba(0, 0, 0, 0.18), 0 0 28px 8px rgba(255, 0, 110, 0.024), 0 0 62px 18px rgba(255, 92, 138, 0.012);
    --lab-secondary-shadow: 0 6px 10px -14px rgba(0, 0, 0, 0.14), 0 0 18px 5px rgba(255, 0, 110, 0.018), 0 0 42px 12px rgba(255, 92, 138, 0.008);
    --lab-tab-shadow: 0 6px 10px -12px rgba(0, 0, 0, 0.14), 0 0 14px 4px rgba(255, 0, 110, 0.014), 0 0 28px 8px rgba(255, 92, 138, 0.006);

    /* Loader visual tokens */
    --lab-loader-ink: color-mix(in srgb, var(--text-primary) 84%, transparent);
    --lab-loader-track: rgba(var(--accent-color-rgb), 0.12);
    --lab-loader-glow: rgba(var(--accent-color-rgb), 0.18);
    --lab-loader-glow-strong: rgba(var(--accent-color-rgb), 0.32);
}


/* ── Base ── */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    background: var(--bg) !important;
    color: var(--text-primary);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}


/* ═══════════ SPACE BACKGROUND ═══════════ */
.space-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    contain: layout style;
    /* Static stars — zero-cost radial-gradient dots baked into one texture */
    background-image:
        radial-gradient(1px 1px at 12%  5%,  rgba(255,220,240,0.55), transparent),
        radial-gradient(2px 2px at 45%  8%,  rgba(255,220,240,0.5),  transparent),
        radial-gradient(1px 1px at 78%  3%,  rgba(255,180,220,0.45), transparent),
        radial-gradient(3px 3px at 25% 12%,  rgba(255,180,220,0.6),  transparent),
        radial-gradient(1px 1px at 60% 15%,  rgba(255,220,240,0.45), transparent),
        radial-gradient(2px 2px at 90% 18%,  rgba(255,220,240,0.5),  transparent),
        radial-gradient(1px 1px at  8% 22%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(2px 2px at 72% 32%,  rgba(255,220,240,0.5),  transparent),
        radial-gradient(3px 3px at 85% 38%,  rgba(255,180,220,0.6),  transparent),
        radial-gradient(2px 2px at  5% 45%,  rgba(255,220,240,0.45), transparent),
        radial-gradient(1px 1px at 28% 52%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(2px 2px at 80% 55%,  rgba(255,220,240,0.5),  transparent),
        radial-gradient(1px 1px at 55% 62%,  rgba(255,220,240,0.45), transparent),
        radial-gradient(3px 3px at 22% 72%,  rgba(255,180,220,0.55), transparent),
        radial-gradient(1px 1px at 10% 82%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(3px 3px at 58% 92%,  rgba(255,180,220,0.55), transparent),
        radial-gradient(1px 1px at 32%  7%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(2px 2px at 68% 42%,  rgba(255,220,240,0.45), transparent),
        radial-gradient(1px 1px at 40% 68%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(2px 2px at 75% 78%,  rgba(255,220,240,0.45), transparent),
        radial-gradient(1px 1px at 48% 85%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(1px 1px at 88% 65%,  rgba(255,220,240,0.35), transparent),
        radial-gradient(2px 2px at 15% 35%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(1px 1px at 52% 28%,  rgba(255,220,240,0.35), transparent),
        radial-gradient(2px 2px at 38% 48%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(1px 1px at 92% 88%,  rgba(255,220,240,0.35), transparent),
        radial-gradient(1px 1px at 65% 95%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(2px 2px at 18% 58%,  rgba(255,220,240,0.35), transparent),
        radial-gradient(1px 1px at 82% 15%,  rgba(255,220,240,0.4),  transparent),
        radial-gradient(2px 2px at 42% 75%,  rgba(255,220,240,0.45), transparent);
}

.space-bg .nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

/* Nebulas: ember-ocean — static (no animation, same visual as frame 0) */
.space-bg .nebula-1 {
    width: 650px; height: 650px;
    background: var(--ember-ocean-nebula-1);
    top: -20%; left: -12%;
    opacity: var(--ember-ocean-nebula-1-opacity);
}
.space-bg .nebula-2 {
    width: 500px; height: 500px;
    background: var(--ember-ocean-nebula-2);
    top: 40%; right: -18%;
    opacity: var(--ember-ocean-nebula-2-opacity);
}
.space-bg .nebula-3 {
    width: 450px; height: 450px;
    background: var(--ember-ocean-nebula-3);
    bottom: -15%; left: 25%;
    opacity: var(--ember-ocean-nebula-3-opacity);
}
.space-bg .nebula-4 {
    width: 300px; height: 300px;
    background: var(--ember-ocean-nebula-4);
    top: 10%; right: 20%;
    opacity: var(--ember-ocean-nebula-4-opacity);
}

/* Warm/cool gradient overlays — static (frozen at warm-dominant state) */
.space-bg::before,
.space-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: scale(1.24);
    filter: blur(62px);
}

.space-bg::before {
    background: var(--ember-ocean-warm-gradient);
    opacity: 0.92;
}

.space-bg::after {
    background: var(--ember-ocean-cool-gradient);
    opacity: 0.06;
}

/* Keyframes kept for theme-lab.css variants that may re-enable animation */
@keyframes cosmosDrift1 { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(20px, -30px, 0); } }
@keyframes cosmosDrift2 { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(-30px, 20px, 0); } }
@keyframes cosmosDrift3 { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(15px, -20px, 0); } }
@keyframes emberWarmFade { 0%, 22% { opacity: 0.92; } 100% { opacity: 0.08; } }
@keyframes emberCoolFade { 0%, 22% { opacity: 0.06; } 100% { opacity: 0.88; } }


/* ── Z-layering ── */
body > *:not(.space-bg) {
    position: relative;
    z-index: 1;
}

main,
.container,
.lower-sections,
.site-footer {
    position: relative;
    z-index: 1;
}

.results:not(.hidden) {
    padding-top: 18px;
    padding-bottom: 24px;
}

.results.hidden {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


/* ─── Results bleed for card depth shadows ─── */
.results {
    width: calc(100% + (var(--lab-results-bleed) * 2));
    margin-inline: calc(var(--lab-results-bleed) * -1);
    margin-block: calc(var(--lab-results-bleed-block) * -1);
    padding-inline: var(--lab-results-bleed);
    padding-block: var(--lab-results-bleed-block);
}


/* ─── Card shadow assignments ─── */
.profile-card {
    box-shadow: var(--lab-primary-shadow) !important;
    margin-bottom: 10px !important;
}

.connections-container,
.content-container {
    box-shadow: var(--lab-secondary-shadow) !important;
}

.tabs {
    box-shadow: var(--lab-tab-shadow) !important;
}


/* ═══════════ PAGE SHELL ═══════════ */
.container {
    max-width: 1100px;
}


/* ═══════════ HEADER — Glass Blur ═══════════ */
.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid var(--cosmos-solid-border) !important;
    box-shadow: none !important;
}

body {
    padding-top: 51px !important;
}

.header-content {
    min-height: 50px;
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ember-header-bg);
    z-index: -1;
}

@media (max-width: 768px) {
    .site-header {
        padding: 0 12px !important;
    }

    body {
        padding-top: 51px !important;
    }
}

/* Logo */
.logo-light { display: none !important; }
.logo-dark  { display: block !important; opacity: 0.92; }

/* Nav links */
.nav-link { color: var(--text-secondary); }
.nav-link:hover, .nav-link.active { color: var(--text-primary); }

/* Dropdown */
.nav-dropdown-menu,
.dropdown-menu {
    background: var(--ember-surface-strong) !important;
    border: 1px solid var(--ember-border-strong) !important;
}
.nav-dropdown-item:hover,
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}


/* ═══════════ HERO CHIP ═══════════ */
.badge,
.hero-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 6px 16px !important;
    border-radius: var(--radius-full) !important;
    background: rgba(var(--accent-color-rgb), 0.12) !important;
    border: 1px solid rgba(var(--accent-color-rgb), 0.2) !important;
    color: var(--accent-color) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
    margin-bottom: 22px !important;
}

.badge svg,
.hero-chip svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}


/* ═══════════ HERO TITLE GRADIENT ═══════════ */
.hero-title .highlight,
.hero-title .grad {
    background: var(--cosmos-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.hero-title {
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.04em !important;
}


/* ═══════════ HERO SUBTITLE ═══════════ */
.hero-section {
    max-width: 920px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.hero-subtitle {
    color: #cbc8d9 !important;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

.search-container {
    max-width: 620px !important;
}


/* ═══════════ TRUST STATS ═══════════ */
.stats {
    display: flex !important;
    justify-content: center !important;
    gap: 36px !important;
    flex-wrap: wrap !important;
    margin-bottom: 28px !important;
}

.stat {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    text-align: center;
}

.stat .stat-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat .stat-icon-wrap svg {
    width: 15px;
    height: 15px;
    stroke: var(--accent-color);
    fill: none;
    stroke-width: 2;
}

.stat .stat-icon-wrap ~ .stat-icon { display: none !important; }
.stat .stat-icon-wrap ~ span .stat-icon { display: none !important; }

.stat > .stat-icon {
    width: 15px;
    height: 15px;
    stroke: var(--accent-color);
    color: var(--accent-color);
}


/* ═══════════ SEO BIO ═══════════ */
.seo-bio {
    max-width: 760px !important;
    margin: 0 auto 20px !important;
    padding: 0 24px !important;
    text-align: center !important;
}

.seo-content {
    max-width: 760px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

.seo-bio p,
.seo-content p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.seo-bio strong,
.seo-content strong {
    color: var(--text-primary);
    font-weight: 600;
}


/* ═══════════ SEARCH BOX ═══════════ */
[data-theme="dark"] .search-box,
[data-theme="dark"] .hero-section .search-box {
    background: rgba(2, 3, 10, 0.986) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: 14px !important;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

[data-theme="dark"] .search-box:focus-within,
[data-theme="dark"] .hero-section .search-box:focus-within {
    border-color: rgba(var(--accent-color-rgb), 0.5) !important;
    box-shadow: 0 0 0 5px rgba(var(--accent-color-rgb), 0.08), 0 8px 40px rgba(var(--accent-color-rgb), 0.1) !important;
}

[data-theme="dark"] .search-btn,
[data-theme="dark"] .hero-section .search-btn {
    background: var(--cosmos-gradient) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.3);
}

[data-theme="dark"] .search-btn:hover,
[data-theme="dark"] .hero-section .search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(var(--accent-color-rgb), 0.5) !important;
    opacity: 1 !important;
}


/* ═══════════ FEATURE CARDS ═══════════ */
.features {
    max-width: 980px !important;
    margin: 0 auto 36px !important;
    padding: 0 24px !important;
    gap: 16px !important;
}

.feature {
    background: rgba(2, 3, 10, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius) !important;
    padding: 18px 14px !important;
    text-align: center !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
    transition: background-color 0.1s ease, border-color 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(var(--accent-color-rgb), 0.2) !important;
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
}

.feature .feature-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--cosmos-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.35);
}

.feature .feature-icon-wrap svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

.feature .feature-icon-wrap ~ .feature-icon { display: none !important; }

.feature > svg.feature-icon {
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto 12px;
    padding: 11px;
    border-radius: 10px;
    background: var(--cosmos-gradient);
    box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.35);
    stroke: #fff !important;
    color: #fff !important;
    display: block;
}

.feature .feature-title { font-size: 13px !important; font-weight: 500 !important; }
.feature .feature-text  { font-size: 11.5px !important; color: var(--text-secondary) !important; line-height: 1.5; }


/* ═══════════ STEPS ═══════════ */
.steps {
    max-width: 1040px !important;
    padding: 0 24px !important;
    margin: 0 auto 44px !important;
}

.step {
    background: rgba(2, 3, 10, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}

.step-number { background: var(--accent-color) !important; color: #fff !important; }
.steps-title { color: var(--text-primary) !important; }


/* ═══════════ SEO SECTION (lower) ═══════════ */
.seo-section {
    max-width: 720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.seo-section h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.seo-section p  { font-size: 13.5px; color: var(--text-secondary); line-height: 1.75; }


/* ═══════════ FAQ ═══════════ */
.faq { max-width: 720px !important; }
.faq-title { color: var(--text-primary) !important; }
.faq-item { border-bottom-color: rgba(255, 255, 255, 0.06) !important; }


/* ═══════════ PROFILE CARD ═══════════ */
.profile-card {
    margin: 18px 0 10px !important;
    background: rgba(2, 3, 10, 0.986) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: var(--cosmos-card-shadow) !important;
}

.profile-pic-wrapper {
    width: 110px !important;
    height: 110px !important;
    background: transparent !important;
}

.profile-pic-ring {
    background: var(--cosmos-ring) !important;
    box-shadow: 0 0 28px rgba(var(--accent-color-rgb), 0.22);
}

.profile-pic {
    width: 102px !important;
    height: 102px !important;
    border: 4px solid var(--bg) !important;
}

.profile-stats .stat-value {
    color: #f7f4ff !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.04);
}

.profile-stats .stat-label { color: rgba(208, 203, 230, 0.86) !important; }
.stat-label { text-transform: none !important; }

.profile-action-btn {
    border: 1px solid var(--ember-border-soft) !important;
    background: var(--ember-surface-soft) !important;
    color: var(--text-primary) !important;
}

.profile-action-btn:hover {
    border-color: rgba(var(--accent-color-rgb), 0.4) !important;
    background: rgba(var(--accent-color-rgb), 0.1) !important;
}


/* ═══════════ CONNECTIONS / TABS ═══════════ */
.connections-container {
    background: rgba(2, 3, 10, 0.986) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius-lg) !important;
    padding: 22px !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}

.tabs {
    background: rgba(1, 2, 7, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius) !important;
    padding: 3px !important;
    gap: 0 !important;
}

.tab {
    flex: 1;
    text-align: center;
    border-radius: var(--radius-sm) !important;
    font-weight: 500;
    color: var(--text-tertiary);
    transition: background-color 0.08s ease, color 0.08s ease;
}

.tab.active {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    font-weight: 600;
}

.tab-count {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-tertiary) !important;
}

.tab.active .tab-count {
    background: rgba(var(--accent-color-rgb), 0.15) !important;
    color: var(--accent-color) !important;
}

/* Filter Bar */
.filter-bar {
    background: rgba(1, 2, 8, 0.62) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: var(--radius-sm) !important;
}

.filter-input {
    color: var(--text-primary) !important;
    background: transparent !important;
}

.filter-input::placeholder { color: var(--text-tertiary) !important; }


/* ═══════════ USER LIST ═══════════ */
.user-item {
    --user-item-bg: transparent;
    --user-item-hover-bg: rgba(255, 255, 255, 0.05);
    --user-item-index-hover-bg: var(--border);
    --user-item-index-hover-color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.035) !important;
    background: var(--user-item-bg) !important;
    border-radius: 0 !important;
    border-left: none !important;
    margin-bottom: 0;
    box-shadow: none;
    transition: background-color 0.08s ease;
}

.user-item:hover {
    background: var(--user-item-hover-bg) !important;
}

.user-item:last-child {
    border-bottom: none !important;
}

.load-more-btn {
    background: var(--ember-surface-soft) !important;
    border: 1px solid var(--ember-border-soft) !important;
    color: var(--accent-color) !important;
}

.load-more-btn:hover { background: rgba(var(--accent-color-rgb), 0.1) !important; }

.action-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    color: rgba(223, 219, 241, 0.88) !important;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}


/* ═══════════ GENDER STATS ═══════════ */
.gender-stats {
    background: rgba(2, 3, 10, 0.986) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}


/* ═══════════ PRIVATE MESSAGE ═══════════ */
.private-message {
    background: rgba(2, 3, 10, 0.986) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}


/* ═══════════ ERROR / LOADER ═══════════ */
.error-card {
    background: rgba(2, 3, 10, 0.986) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}

.loader-container {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Loader visual token setup */
.loader-visual {
    --lab-loader-ink: color-mix(in srgb, var(--text-primary) 84%, transparent);
    --lab-loader-track: rgba(var(--accent-color-rgb), 0.12);
    --lab-loader-glow: rgba(var(--accent-color-rgb), 0.18);
    --lab-loader-glow-strong: rgba(var(--accent-color-rgb), 0.32);
}

.loader-ring {
    inset: -6px;
    border-width: 3.5px !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    border-top-color: var(--accent-color) !important;
    box-shadow: 0 0 18px rgba(var(--accent-color-rgb), 0.32);
}

.loader-ring.done {
    border-color: transparent !important;
    border-top-color: #22c55e !important;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.32);
}

.loader-username { color: var(--text-primary) !important; }
.loader-status   { color: rgba(233, 229, 248, 0.92) !important; }
.loader-dots span { background: rgba(233, 229, 248, 0.85) !important; }
.panel-loading   { color: rgba(233, 229, 248, 0.92) !important; }

.mini-spinner {
    border-color: rgba(255, 255, 255, 0.14) !important;
    border-top-color: var(--accent-color) !important;
    box-shadow: 0 0 14px rgba(var(--accent-color-rgb), 0.24);
}

/* Shimmer */
.avatar-wrapper,
[data-theme="dark"] .avatar-wrapper {
    background: linear-gradient(110deg, rgba(12, 12, 24, 1) 30%, rgba(40, 40, 60, 0.5) 50%, rgba(12, 12, 24, 1) 70%) !important;
    background-size: 200% 100% !important;
}

[data-theme="dark"] .media-item:not(.loaded),
.media-item:not(.loaded) {
    background: linear-gradient(110deg, rgba(12, 12, 24, 1) 30%, rgba(40, 40, 60, 0.5) 50%, rgba(12, 12, 24, 1) 70%) !important;
    background-size: 200% 100% !important;
}


/* ═══════════ ORBIT-LATTICE LOADER (frozen) ═══════════ */
/* Show orbit container */
.loader-orbit {
    display: block;
}

/* Orbit-lattice: hide blur rings, show clean nodes only */
.loader-orbit::before { display: none; }
.loader-orbit::after  { display: none; }
.loader-orbit-ring        { display: none; }
.loader-orbit-ring--inner { display: none; }

/* Avatar with visible shimmer highlight for contrast */
.loader-avatar,
[data-theme="dark"] .loader-avatar {
    --loader-avatar-bg-1: #070811;
    --loader-avatar-bg-2: #1a2130;
    --loader-avatar-bg-3: #030409;
    --loader-avatar-highlight-2: rgba(135, 176, 255, 0.18) !important;
    --loader-avatar-highlight-3: rgba(228, 240, 255, 0.82) !important;
    --loader-avatar-top-glow: rgba(255, 255, 255, 0.1) !important;
    --loader-avatar-inner-shadow: rgba(1, 3, 10, 0.42) !important;
    --loader-avatar-border: rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 -18px 24px rgba(1, 3, 10, 0.42) !important;
}

/* Orbit node base */
.loader-orbit-node {
    inset: 10px;
    border: none;
    box-shadow: none;
    animation: labLoaderOrbit 4.4s linear infinite;
}

.loader-orbit-node--one {
    --loader-orbit-transform: rotate(0deg) scaleX(1.08) scaleY(0.7);
    animation-duration: 3s;
}
.loader-orbit-node--two {
    --loader-orbit-transform: rotate(54deg) scaleX(0.84) scaleY(1);
    animation-duration: 4.2s;
}
.loader-orbit-node--three {
    --loader-orbit-transform: rotate(126deg) scaleX(0.92) scaleY(0.62);
    animation-duration: 5s;
}

.loader-orbit-node::before {
    top: 2px;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent-color) 54%, #17202b 46%) 0%, color-mix(in srgb, var(--accent-color) 38%, #0a0f16 62%) 100%);
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.028), 0 0 10px rgba(var(--accent-color-rgb), 0.12);
}

.loader-orbit-node--one::before   { width: 8px; height: 8px; margin-left: -4px; }
.loader-orbit-node--two::before   { width: 6px; height: 6px; margin-left: -3px; opacity: 0.82; }
.loader-orbit-node--three::before { width: 4px; height: 4px; margin-left: -2px; opacity: 0.72; }

@keyframes labLoaderOrbit {
    from { transform: var(--loader-orbit-transform, none) rotate(0deg); }
    to   { transform: var(--loader-orbit-transform, none) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .loader-orbit::before,
    .loader-orbit::after,
    .loader-orbit-ring,
    .loader-orbit-node {
        animation: none !important;
    }
}


/* ═══════════ FOOTER ═══════════ */
.site-footer {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
}


/* ═══════════ MOBILE MENU ═══════════ */
.mobile-menu {
    background: var(--ember-surface-strong) !important;
    border-left: 1px solid var(--ember-border-strong) !important;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .mobile-menu {
    background: var(--ember-surface-strong) !important;
    border-left: 1px solid var(--ember-border-strong) !important;
}

.mobile-menu-header { border-bottom-color: var(--ember-border-strong) !important; }

.mobile-menu-close {
    background: var(--ember-surface-soft) !important;
}

.mobile-menu-close:hover,
.mobile-menu-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.mobile-menu-overlay.active { background: rgba(0, 0, 0, 0.6); }


/* ═══════════ CONTENT TABS (Story Viewer) ═══════════ */
.content-container {
    background: var(--ember-surface-strong) !important;
    border: 1px solid var(--ember-border-strong) !important;
    border-radius: var(--radius-lg) !important;
    padding: 18px !important;
    overflow: visible !important;
}

.content-tabs {
    background: var(--ember-surface-soft) !important;
    border-color: var(--ember-border-soft) !important;
    border-radius: var(--radius) !important;
    margin: 0 0 18px !important;
    padding: 3px !important;
    gap: 0 !important;
}

.content-tab { color: var(--text-tertiary); }
.content-tab:hover { color: var(--text-secondary); }
.content-tab.active {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
}

.content-panel { padding: 18px 4px 4px !important; }

.story-viewer { background: var(--cosmos-solid) !important; }

.highlight-cover {
    background: var(--cosmos-solid) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .highlight-cover {
    background: linear-gradient(110deg, rgba(12, 12, 24, 1) 30%, rgba(40, 40, 60, 0.5) 50%, rgba(12, 12, 24, 1) 70%) !important;
    background-size: 200% 100% !important;
}

.highlight-item.loaded .highlight-cover {
    background: var(--card-bg) !important;
    animation: none !important;
}

.modal-content { background: var(--card-bg) !important; }
.modal-info    { background: var(--card-bg) !important; }


/* ═══════════ LANDING SECTIONS (lower page) ═══════════ */
.landing-section {
    max-width: 920px;
    margin: 60px auto;
    padding: 0 24px;
}

.landing-section--wide { max-width: 1080px; }

.landing-section__title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.landing-section__title--lg { font-size: 1.8rem; margin-bottom: 12px; }

.landing-section__subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.landing-section__note {
    text-align: center;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card-grid--sm {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    text-align: center;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--cosmos-soft-shadow);
}

.info-card--compact { padding: 20px; }

.info-card--body {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px;
    line-height: 1.7;
    box-shadow: var(--cosmos-soft-shadow);
}

.info-card__emoji  { font-size: 2rem; margin-bottom: 8px; }
.info-card__title  { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.info-card__text   { font-size: 0.82rem; color: var(--text-secondary); }
.info-card__heading { color: var(--text-primary); font-size: 1.05rem; margin-bottom: 10px; }
.info-card__para   { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; }
.info-card__para:last-child { margin-bottom: 0; }
.info-card__label  { color: var(--text-primary); font-weight: 600; }

.star-rating { display: flex; gap: 4px; margin-bottom: 12px; color: #f59e0b; }

.testimonial__quote  { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.testimonial__author { font-weight: 600; color: var(--text-primary); font-size: 0.85rem; }

.stat-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin: 40px auto;
    max-width: 1040px;
    padding: 0 24px;
}

.stat-block { text-align: center; }
.stat-block__value { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.stat-block__label { font-size: 0.75rem; color: var(--text-tertiary); display: block; margin-top: 2px; }

.disclaimer-section {
    max-width: 920px;
    margin: 40px auto 20px;
    padding: 20px 24px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.disclaimer-section a { color: var(--text-secondary); }

.info-card--body a,
.faq-a a,
.landing-section a:not(.footer-link) {
    color: var(--accent-color);
}


/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 768px) {
    /* GPU savings: fewer nebulas, smaller blur, kill gradient overlays & animations */
    .space-bg {
        background: var(--ember-ocean-mobile-bg);
        /* Flatten stars: replace 30 radial-gradients with a simpler set */
        background-image:
            radial-gradient(1px 1px at 12%  5%,  rgba(255,220,240,0.45), transparent),
            radial-gradient(2px 2px at 45%  8%,  rgba(255,220,240,0.4),  transparent),
            radial-gradient(1px 1px at 78%  3%,  rgba(255,180,220,0.35), transparent),
            radial-gradient(2px 2px at 25% 32%, rgba(255,220,240,0.4),  transparent),
            radial-gradient(1px 1px at 60% 55%, rgba(255,220,240,0.35), transparent),
            radial-gradient(2px 2px at 85% 38%, rgba(255,180,220,0.45), transparent),
            radial-gradient(1px 1px at 22% 72%, rgba(255,220,240,0.35), transparent),
            radial-gradient(2px 2px at 68% 88%, rgba(255,220,240,0.4),  transparent),
            radial-gradient(1px 1px at 42% 45%, rgba(255,220,240,0.35), transparent),
            radial-gradient(2px 2px at 90% 65%, rgba(255,220,240,0.4),  transparent);
    }
    .space-bg .nebula {
        filter: blur(80px);
    }
    /* Only keep 2 nebulas on mobile — hide 3 & 4 */
    .space-bg .nebula-1 { width: 350px; height: 350px; top: -20%; left: -15%; opacity: calc(var(--ember-ocean-nebula-1-opacity) * 0.65); }
    .space-bg .nebula-2 { width: 280px; height: 280px; right: -20%; opacity: calc(var(--ember-ocean-nebula-2-opacity) * 0.6); }
    .space-bg .nebula-3 { display: none; }
    .space-bg .nebula-4 { display: none; }

    /* Lighter gradient overlays on mobile */
    .space-bg::before {
        background: var(--ember-ocean-mobile-warm-gradient);
        opacity: 0.5;
        filter: none;
    }
    .space-bg::after {
        background: var(--ember-ocean-mobile-cool-gradient);
        opacity: 0.4;
        filter: none;
    }

    .results:not(.hidden) { padding-top: 14px; padding-bottom: 18px; }

    .results {
        width: 100% !important;
        margin-inline: 0 !important;
        padding-inline: 0 !important;
    }

    :root {
        --lab-results-bleed: 0px;
        --lab-results-bleed-block: 14px;
    }

    .profile-pic-wrapper { width: 90px !important; height: 90px !important; }
    .profile-pic { width: 82px !important; height: 82px !important; }

    .profile-card { margin: 0 0 10px !important; }
    .gender-stats  { margin-bottom: 18px !important; }
    .private-message { margin-bottom: 18px !important; }

    .connections-container { padding: 16px !important; }
    .content-container { padding: 16px !important; }
    .content-tabs  { margin-bottom: 16px !important; }
    .content-panel { padding: 14px 2px 2px !important; }

    .features { grid-template-columns: 1fr 1fr !important; padding: 0 20px !important; margin-bottom: 44px !important; }
    .stats { gap: 28px !important; margin-bottom: 32px !important; }

    .hero-title    { font-size: 1.9rem !important; }
    .hero-subtitle { font-size: 0.92rem !important; margin-bottom: 28px !important; }
    .badge, .hero-chip { margin-bottom: 16px !important; }
}

@media (max-width: 480px) {
    /* Even lighter on small phones */
    .space-bg .nebula { filter: blur(60px); }
    .space-bg .nebula-1 { width: 250px; height: 250px; top: -25%; left: -20%; }
    .space-bg .nebula-2 { width: 200px; height: 200px; right: -25%; }
    /* ::before/::after already killed at 768px */

    .results:not(.hidden) { padding-top: 12px; padding-bottom: 16px; }

    .profile-pic-wrapper { width: 80px !important; height: 80px !important; }
    .profile-pic { width: 72px !important; height: 72px !important; }

    .profile-card { margin: 0 0 8px !important; }
    .connections-container { padding: 14px !important; }
    .content-container { padding: 14px !important; }
    .content-tabs  { margin-bottom: 14px !important; }
    .content-panel { padding: 12px 0 0 !important; }

    .features { grid-template-columns: 1fr !important; padding: 0 16px !important; }
    .stats { gap: 24px !important; }

    .hero-title  { font-size: 1.55rem !important; margin-bottom: 10px !important; }
    .badge, .hero-chip { margin-bottom: 14px !important; font-size: 10.5px !important; }
    .hero-subtitle { font-size: 0.88rem !important; }
}


/* ═══════════════════════════════════════════════════════
   LIGHT MODE  [data-theme="light"]
   ═══════════════════════════════════════════════════════ */

[data-theme="light"],
[data-theme="light"] body {
    --bg: #fafafa;
    --card-bg: #ffffff;
    --item-bg: rgba(0, 0, 0, 0.02);
    --item-hover: rgba(0, 0, 0, 0.035);
    --panel-bg: #ffffff;
    --text-primary: #111111;
    --text-secondary: #6b6b6b;
    --text-tertiary: #a0a0a0;
    --border: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 34px rgba(0, 0, 0, 0.08);
    --cosmos-solid: #ffffff;
    --cosmos-solid-border: rgba(0, 0, 0, 0.06);
    --cosmos-card-shadow: 0 16px 32px -24px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    --cosmos-soft-shadow: 0 10px 24px -22px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
    --lab-mode-surface-strong: #ffffff;
    --lab-mode-surface-soft: #fafafa;
    --lab-mode-border: rgba(0, 0, 0, 0.07);
    --lab-mode-divider: rgba(0, 0, 0, 0.08);
    --lab-mode-chip-bg: rgba(0, 0, 0, 0.03);
    --lab-mode-chip-border: rgba(0, 0, 0, 0.06);
    --lab-mode-header: rgba(255, 255, 255, 0.96);
    --lab-mode-row-bg: #fafafa;
    --lab-mode-row-hover: #ffffff;
    --lab-mode-row-border: rgba(0, 0, 0, 0.05);
    --lab-mode-media-bg: #fafafa;
    --lab-mode-control-bg: #ffffff;
    --lab-mode-control-hover: #fafafa;
    --lab-mode-control-border: rgba(0, 0, 0, 0.08);
    --lab-mode-active-bg: rgba(var(--accent-color-rgb), 0.09);
    --lab-mode-active-border: rgba(var(--accent-color-rgb), 0.16);
    --lab-mode-flat-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 18px -16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] body {
    background: var(--bg) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .space-bg {
    display: block !important;
    opacity: 0.18;
}

[data-theme="light"] .space-bg .nebula-1 { background: #dde3ea !important; top: -24%; left: -14%; opacity: 0.07 !important; }
[data-theme="light"] .space-bg .nebula-2 { background: #e2e6ec !important; top: 46%; right: -18%; opacity: 0.06 !important; }
[data-theme="light"] .space-bg .nebula-3 { background: #dee2e8 !important; bottom: -16%; left: 24%; opacity: 0.05 !important; }
[data-theme="light"] .space-bg .nebula-4 { background: #e6eaf0 !important; top: 8%; right: 18%; opacity: 0.04 !important; }

[data-theme="light"] .site-header {
    background: var(--lab-mode-header) !important;
    border-bottom-color: var(--lab-mode-border) !important;
}

[data-theme="light"] .site-header::before {
    background: var(--lab-mode-header) !important;
}

[data-theme="light"] .logo-light { display: block !important; }
[data-theme="light"] .logo-dark  { display: none !important; }

[data-theme="light"] .nav-link,
[data-theme="light"] .nav-dropdown-toggle,
[data-theme="light"] .story-viewer-link {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active,
[data-theme="light"] .nav-dropdown-toggle:hover,
[data-theme="light"] .story-viewer-link:hover {
    color: var(--text-primary) !important;
}

[data-theme="light"] .nav-dropdown-menu {
    background: var(--lab-mode-surface-strong) !important;
    border-color: var(--lab-mode-border) !important;
    box-shadow: var(--cosmos-soft-shadow) !important;
}

[data-theme="light"] .nav-dropdown-item:hover {
    background: var(--lab-mode-surface-soft) !important;
}

[data-theme="light"] .mobile-menu {
    background: var(--lab-mode-surface-strong) !important;
    border-left-color: var(--lab-mode-border) !important;
    box-shadow: -10px 0 28px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .mobile-menu-header {
    border-bottom-color: var(--lab-mode-border) !important;
}

[data-theme="light"] .mobile-menu-close,
[data-theme="light"] .mobile-menu-item:hover {
    background: var(--lab-mode-surface-soft) !important;
}

[data-theme="light"] .hero-title,
[data-theme="light"] .steps-title,
[data-theme="light"] .faq-title,
[data-theme="light"] .landing-section__title,
[data-theme="light"] .landing-section__title--lg,
[data-theme="light"] .feature-title,
[data-theme="light"] .step-title,
[data-theme="light"] .faq-q,
[data-theme="light"] .info-card__heading,
[data-theme="light"] .info-card__title,
[data-theme="light"] .info-card__label,
[data-theme="light"] .testimonial__author,
[data-theme="light"] .stat-block__value,
[data-theme="light"] .panel-subtitle strong {
    color: var(--text-primary) !important;
}

[data-theme="light"] .hero-title .highlight,
[data-theme="light"] .hero-title .grad {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: currentColor !important;
    background-clip: initial !important;
    color: var(--accent-color) !important;
}

[data-theme="light"] .hero-subtitle,
[data-theme="light"] .seo-bio p,
[data-theme="light"] .seo-content p,
[data-theme="light"] .feature-text,
[data-theme="light"] .step-text,
[data-theme="light"] .faq-a,
[data-theme="light"] .testimonial__quote,
[data-theme="light"] .landing-section__subtitle,
[data-theme="light"] .landing-section__note,
[data-theme="light"] .info-card__text,
[data-theme="light"] .info-card__para,
[data-theme="light"] .panel-subtitle,
[data-theme="light"] .panel-loaded,
[data-theme="light"] .stats .stat,
[data-theme="light"] .stat-block__label,
[data-theme="light"] .footer-link,
[data-theme="light"] .footer-copyright,
[data-theme="light"] .footer-disclaimer,
[data-theme="light"] .disclaimer-section {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .seo-bio strong,
[data-theme="light"] .seo-content strong {
    color: var(--text-primary) !important;
}

[data-theme="light"] .badge,
[data-theme="light"] .hero-chip {
    background: var(--lab-mode-chip-bg) !important;
    border-color: var(--lab-mode-chip-border) !important;
    color: var(--text-secondary) !important;
}

[data-theme="light"] .search-box,
[data-theme="light"] .profile-card,
[data-theme="light"] .connections-container,
[data-theme="light"] .content-container,
[data-theme="light"] .feature,
[data-theme="light"] .step,
[data-theme="light"] .info-card,
[data-theme="light"] .info-card--body,
[data-theme="light"] .gender-stats,
[data-theme="light"] .private-message,
[data-theme="light"] .error-card,
[data-theme="light"] .story-viewer {
    background: var(--lab-mode-surface-strong) !important;
    border-color: var(--lab-mode-border) !important;
}

[data-theme="light"] .tabs,
[data-theme="light"] .content-tabs,
[data-theme="light"] .filter-bar,
[data-theme="light"] .stat .stat-icon-wrap,
[data-theme="light"] .highlight-cover {
    background: var(--lab-mode-surface-soft) !important;
    border-color: var(--lab-mode-border) !important;
    box-shadow: none !important;
}

[data-theme="light"] .profile-stats .stat-value {
    color: var(--text-primary) !important;
    text-shadow: none !important;
}

[data-theme="light"] .profile-stats .stat-label {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .user-item,
[data-theme="light"] .media-item,
[data-theme="light"] .highlight-cover {
    background: var(--lab-mode-row-bg) !important;
    border: 1px solid var(--lab-mode-row-border) !important;
    box-shadow: none !important;
}

[data-theme="light"] .media-item,
[data-theme="light"] .highlight-cover {
    background: var(--lab-mode-media-bg) !important;
}

[data-theme="light"] .user-item:hover,
[data-theme="light"] .media-item:hover,
[data-theme="light"] .highlight-item:hover .highlight-cover,
[data-theme="light"] .view-btn:hover,
[data-theme="light"] .story-nav-btn:hover {
    background: var(--lab-mode-row-hover) !important;
}

[data-theme="light"] .search-box:focus-within {
    border-color: rgba(var(--accent-color-rgb), 0.22) !important;
    box-shadow: 0 0 0 4px rgba(var(--accent-color-rgb), 0.08), var(--cosmos-soft-shadow) !important;
}

[data-theme="light"] .search-box input,
[data-theme="light"] .filter-input {
    color: var(--text-primary) !important;
}

[data-theme="light"] .search-box input::placeholder,
[data-theme="light"] .filter-input::placeholder,
[data-theme="light"] .at-symbol,
[data-theme="light"] .footer-separator {
    color: var(--text-tertiary) !important;
}

[data-theme="light"] .tab,
[data-theme="light"] .content-tab,
[data-theme="light"] .view-btn,
[data-theme="light"] .story-nav-btn {
    color: var(--text-secondary) !important;
    background: var(--lab-mode-control-bg) !important;
    border: 1px solid var(--lab-mode-control-border) !important;
    box-shadow: var(--lab-mode-flat-shadow) !important;
}

[data-theme="light"] .tab:hover,
[data-theme="light"] .content-tab:hover,
[data-theme="light"] .view-btn:hover,
[data-theme="light"] .story-nav-btn:hover {
    color: var(--text-primary) !important;
    background: var(--lab-mode-control-hover) !important;
    border-color: var(--lab-mode-border) !important;
}

[data-theme="light"] .tab.active,
[data-theme="light"] .content-tab.active,
[data-theme="light"] .view-btn.active {
    background: var(--lab-mode-active-bg) !important;
    border-color: var(--lab-mode-active-border) !important;
    color: var(--accent-color) !important;
    box-shadow: none !important;
}

[data-theme="light"] .tab-count {
    background: rgba(24, 24, 32, 0.05) !important;
    color: var(--text-secondary) !important;
}

[data-theme="light"] .tab.active .tab-count {
    background: rgba(var(--accent-color-rgb), 0.1) !important;
    color: var(--accent-color) !important;
}

[data-theme="light"] .search-btn {
    background: var(--accent-color) !important;
    border: 1px solid transparent !important;
    color: #fff !important;
    box-shadow: 0 12px 24px -16px rgba(var(--accent-color-rgb), 0.38) !important;
}

[data-theme="light"] .search-btn:hover {
    background: color-mix(in srgb, var(--accent-color) 92%, black) !important;
    box-shadow: 0 14px 26px -16px rgba(var(--accent-color-rgb), 0.42) !important;
}

[data-theme="light"] .profile-action-btn,
[data-theme="light"] .profile-action-btn-mobile,
[data-theme="light"] .action-btn,
[data-theme="light"] .load-more-btn,
[data-theme="light"] .error-retry {
    background: var(--lab-mode-control-bg) !important;
    border: 1px solid var(--lab-mode-control-border) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--lab-mode-flat-shadow) !important;
}

[data-theme="light"] .error-retry {
    font-weight: 600;
    letter-spacing: 0.01em;
}

[data-theme="light"] .profile-action-btn:hover,
[data-theme="light"] .profile-action-btn-mobile:hover,
[data-theme="light"] .action-btn:hover,
[data-theme="light"] .load-more-btn:hover,
[data-theme="light"] .error-retry:hover {
    background: var(--lab-mode-control-hover) !important;
    border-color: var(--lab-mode-border) !important;
    color: var(--text-primary) !important;
    transform: translateY(-1px);
}

[data-theme="light"] .profile-action-btn.primary {
    background: var(--lab-mode-active-bg) !important;
    border-color: var(--lab-mode-active-border) !important;
    color: var(--accent-color) !important;
    box-shadow: none !important;
}

[data-theme="light"] .profile-action-btn.primary:hover {
    background: rgba(var(--accent-color-rgb), 0.14) !important;
    border-color: rgba(var(--accent-color-rgb), 0.22) !important;
    color: var(--accent-color) !important;
}

[data-theme="light"] .action-btn { color: var(--text-secondary) !important; }

[data-theme="light"] .action-btn svg,
[data-theme="light"] .view-btn svg,
[data-theme="light"] .story-nav-btn svg {
    stroke: currentColor !important;
}

/* Quick-action CTAs keep their gradient glyph + barely-there plate on light —
   a white translucent plate would vanish, and the generic rule above would
   repaint the follow icon in currentColor. */
[data-theme="light"] .action-btn.quick-btn {
    background: rgba(0, 0, 0, 0.035) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
    box-shadow: none !important;
}

[data-theme="light"] .action-btn.quick-btn:hover {
    background: rgba(0, 0, 0, 0.07) !important;
    border-color: rgba(0, 0, 0, 0.09) !important;
}

[data-theme="light"] .action-btn.quick-btn svg {
    stroke: url(#ig-warm) !important;
}

[data-theme="light"] .loader-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-theme="light"] .loader-avatar,
[data-theme="light"] [data-theme="dark"] .loader-avatar {
    --loader-avatar-bg-1: #f0f2f5 !important;
    --loader-avatar-bg-2: #e2e5ea !important;
    --loader-avatar-bg-3: #fafbfc !important;
    --loader-avatar-highlight-2: rgba(255, 255, 255, 0.5) !important;
    --loader-avatar-highlight-3: rgba(255, 255, 255, 0.95) !important;
    --loader-avatar-top-glow: rgba(255, 255, 255, 0.4) !important;
    --loader-avatar-inner-shadow: rgba(160, 170, 185, 0.28) !important;
    --loader-avatar-border: rgba(24, 24, 32, 0.06) !important;
    box-shadow: 0 14px 28px rgba(100, 116, 139, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.80), inset 0 -10px 18px rgba(160, 170, 185, 0.18) !important;
}

[data-theme="light"] .loader-ring {
    border-color: rgba(24, 24, 32, 0.08) !important;
    border-top-color: var(--accent-color) !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

[data-theme="light"] .loader-orbit { display: none !important; }

[data-theme="light"] .loader-status,
[data-theme="light"] .panel-loading {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .loader-dots span {
    background: var(--text-secondary) !important;
}

[data-theme="light"] .mini-spinner {
    border-color: rgba(24, 24, 32, 0.12) !important;
    border-top-color: var(--accent-color) !important;
    box-shadow: none !important;
}

[data-theme="light"] .faq-item {
    border-bottom-color: var(--lab-mode-divider) !important;
}

[data-theme="light"] .disclaimer-section,
[data-theme="light"] .site-footer {
    border-top-color: var(--lab-mode-border) !important;
}

[data-theme="light"] .faq-a a,
[data-theme="light"] .landing-section a:not(.footer-link),
[data-theme="light"] .disclaimer-section a {
    color: var(--accent-color) !important;
}

@media (max-width: 768px) {
    [data-theme="light"] .space-bg {
        opacity: 0.16;
    }

    [data-theme="light"] .space-bg .nebula-4 {
        display: none;
    }
}


/* ═══════════ NAVBAR THEME TOGGLE ═══════════ */
.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.theme-btn svg {
    width: 16px;
    height: 16px;
}

/* Dark mode: show moon, hide sun */
.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-icon-sun { display: block; }
[data-theme="light"] .theme-icon-moon { display: none; }

[data-theme="light"] .theme-btn {
    border-color: rgba(73, 61, 48, 0.1);
    background: rgba(73, 61, 48, 0.04);
    color: var(--text-secondary);
}

[data-theme="light"] .theme-btn:hover {
    background: rgba(73, 61, 48, 0.08);
    color: var(--text-primary);
}

