    /* ============================================================
       TOKENS
       ============================================================ */
    :root {
        --bg: #000000;
        --panel: #0f0f12;
        --sidebar-w: 260px;
        --sidebar-w-collapsed: 76px;
        --accent: #3b82f6;
        --accent-soft: rgba(59, 130, 246, 0.2);
        --text: #ffffff;
        --text-dim: rgba(255, 255, 255, 0.55);
        --text-faint: rgba(255, 255, 255, 0.4);
        /* Shared line work: container edges and quiet row separators. */
        --border: rgba(255, 255, 255, 0.08);
        --divider: rgba(255, 255, 255, 0.06);
        --ease: cubic-bezier(0.4, 0, 0.2, 1);
        --dur: 0.4s;
        --safe-top: env(safe-area-inset-top, 0px);
        --safe-bottom: env(safe-area-inset-bottom, 0px);
        --safe-left: env(safe-area-inset-left, 0px);
        --safe-right: env(safe-area-inset-right, 0px);
        /* Shared width for the Z-Arc Studio search bar and tool cards */
        --tools-max: 620px;
        /* Top spacing for the Arc Tools view */
        --tools-offset: clamp(18px, 4vh, 44px);
    }

    /* Separate HTML pages still navigate normally, but supporting browsers
       animate the outgoing/incoming snapshots so a tab switch has no blank
       or expanded frame. Unsupported browsers keep the prefetched navigation. */
    @view-transition {
        navigation: auto;
    }

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 180ms;
        animation-timing-function: var(--ease);
    }

    @media (prefers-reduced-motion: reduce) {
        ::view-transition-group(*),
        ::view-transition-old(*),
        ::view-transition-new(*) {
            animation-duration: 0.01ms !important;
        }
    }

    html.reduce-motion ::view-transition-group(*),
    html.reduce-motion ::view-transition-old(*),
    html.reduce-motion ::view-transition-new(*) {
        animation-duration: 0.01ms !important;
    }

    /* ============================================================
       BASE
       ============================================================ */
    *,
    *::before,
    *::after {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        background-color: var(--bg);
        color: var(--text);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                     Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        -webkit-tap-highlight-color: transparent;
        overscroll-behavior-y: none;
    }

    /* Subtle ambient texture */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 70%);
        pointer-events: none;
        z-index: -1;
    }

    /* Time-of-day ambient wash — shifts with the studio phase */
    body::after {
        content: '';
        position: fixed;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background:
            radial-gradient(58% 46% at 50% -8%, var(--phase-ambient, transparent), transparent 72%),
            radial-gradient(46% 46% at 100% 100%, var(--phase-ambient-2, transparent), transparent 72%);
        transition: opacity 1.2s ease;
    }

    /* The phase is set on <html> by site-config.js in <head>, so the correct
       ambience is present before first paint. The body variants keep the
       live phase updates from site-chrome.js working. */
    html[data-phase="morning"] body,
    body[data-phase="morning"] {
        --phase-ambient: rgba(242, 195, 122, 0.07);
        --phase-ambient-2: rgba(120, 170, 230, 0.04);
    }

    html[data-phase="afternoon"] body,
    body[data-phase="afternoon"] {
        --phase-ambient: rgba(190, 215, 240, 0.055);
        --phase-ambient-2: rgba(120, 170, 230, 0.03);
    }

    html[data-phase="evening"] body,
    body[data-phase="evening"] {
        --phase-ambient: rgba(224, 160, 124, 0.075);
        --phase-ambient-2: rgba(120, 90, 160, 0.045);
    }

    html[data-phase="night"] body,
    body[data-phase="night"] {
        --phase-ambient: rgba(111, 143, 201, 0.08);
        --phase-ambient-2: rgba(70, 90, 150, 0.05);
    }

    button {
        font: inherit;
        color: inherit;
        touch-action: manipulation;
    }

    /* ============================================================
       SIDEBAR
       ============================================================ */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--sidebar-w);
        background: linear-gradient(180deg, #0f0f12 0%, #0a0a0d 50%, #08080b 100%);
        border-right: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        padding: calc(40px + var(--safe-top)) 0 calc(24px + var(--safe-bottom)) var(--safe-left);
        z-index: 40;
        overflow: visible;
        transition: width var(--dur) var(--ease),
                    min-width var(--dur) var(--ease),
                    max-width var(--dur) var(--ease),
                    transform var(--dur) var(--ease);
    }

    .sidebar::before {
        content: '';
        position: absolute;
        inset: 0;
        background:
            radial-gradient(ellipse at 0% 0%, rgba(30, 35, 50, 0.15) 0%, transparent 50%),
            radial-gradient(ellipse at 100% 100%, rgba(20, 25, 40, 0.1) 0%, transparent 50%);
        pointer-events: none;
        z-index: 1;
    }

    .sidebar::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.06) 20%, rgba(255, 255, 255, 0.06) 80%, transparent 100%);
        pointer-events: none;
        z-index: 2;
    }

    .sidebar.collapsed {
        width: var(--sidebar-w-collapsed);
    }

    /* Head-resolved collapsed preference: apply the exact rail geometry before
       paint so a tab/page switch never flashes an expanded sidebar. studio.js
       adds the real .collapsed class immediately afterwards. */
    @media (min-width: 769px) {
        html[data-sidebar-collapsed="1"] .sidebar {
            width: var(--sidebar-w-collapsed);
        }
        html[data-sidebar-collapsed="1"] .sidebar ~ .vertical-line {
            left: var(--sidebar-w-collapsed);
        }
        html[data-sidebar-collapsed="1"] .sidebar ~ .main-content {
            margin-left: var(--sidebar-w-collapsed);
        }
    }

    /* Applied briefly while crossing a responsive breakpoint so the width
       snaps to its final state instead of animating through larger sizes. */
    html.sidebar-no-transition .sidebar,
    html.sidebar-no-transition .main-content,
    html.sidebar-no-transition .vertical-line {
        transition: none !important;
    }

    /* Toggle button attached to sidebar edge */
    .sidebar-toggle {
        position: absolute;
        top: calc(16px + var(--safe-top));
        right: -18px;
        z-index: 30;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.55);
        background: linear-gradient(135deg, #141418 0%, #0d0d10 100%);
        border: 1px solid var(--border);
        border-radius: 10px;
        box-shadow:
            0 4px 20px rgba(0, 0, 0, 0.5),
            4px 0 15px rgba(0, 0, 0, 0.4);
        transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
                    color 0.3s var(--ease), transform 0.3s var(--ease),
                    box-shadow 0.3s var(--ease);
    }

    .sidebar-toggle:hover {
        background: linear-gradient(135deg, #1a1a20 0%, #111115 100%);
        border-color: rgba(255, 255, 255, 0.1);
        color: #ffffff;
        transform: scale(1.05);
    }

    .sidebar-toggle:active {
        transform: scale(0.96);
    }

    .sidebar-toggle:focus-visible,
    .mobile-menu-btn:focus-visible,
    .nav-item:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.35);
        outline-offset: 2px;
    }

    .sidebar-toggle svg {
        width: 20px;
        height: 20px;
        transition: transform 0.4s var(--ease);
    }

    .sidebar.collapsed .sidebar-toggle svg {
        transform: rotate(180deg);
    }

    /* Mobile hamburger (hidden on desktop) */
    .mobile-menu-btn {
        display: none;
        position: fixed;
        top: calc(14px + var(--safe-top));
        left: calc(14px + var(--safe-left));
        z-index: 36; /* above backdrop, below drawer panel */
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.85);
        background: rgba(16, 16, 20, 0.9);
        border: 1px solid var(--border);
        border-radius: 12px;
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .mobile-menu-btn:active {
        transform: scale(0.94);
    }

    .mobile-menu-btn svg {
        width: 22px;
        height: 22px;
    }

    /* Drawer backdrop */
    .backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(0, 0, 0, 0.65);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    /* Sidebar brand — brushed steel with time-of-day light */
    .sidebar-header {
        position: relative;
        z-index: 3;
        isolation: isolate;
        padding: 10px 16px 20px;
        margin-bottom: 18px;
        border-bottom: 1px solid var(--divider);
        transition: opacity 0.2s ease, visibility 0.2s ease;
    }

    /* Iridescent light bleed and a sparse field of interface particles. */
    .sidebar-header::before,
    .sidebar-header::after {
        content: '';
        position: absolute;
        z-index: 0;
        pointer-events: none;
    }

    .sidebar-header::before {
        inset: -24px -20px -8px;
        background:
            radial-gradient(46% 58% at 24% 32%, rgba(34, 211, 238, 0.17), transparent 72%),
            radial-gradient(52% 62% at 80% 62%, rgba(139, 92, 246, 0.18), transparent 74%),
            radial-gradient(30% 40% at 60% 8%, rgba(59, 130, 246, 0.12), transparent 76%);
        filter: blur(14px);
        animation: studioBrandAmbient 9s ease-in-out infinite alternate;
    }

    .sidebar-header::after {
        inset: -14px 0 0;
        background-image:
            radial-gradient(1px 1px at 12px 22px, rgba(125, 211, 252, 0.85), transparent 100%),
            radial-gradient(1px 1px at 58px 9px, rgba(167, 139, 250, 0.7), transparent 100%),
            radial-gradient(1.5px 1.5px at 97px 43px, rgba(34, 211, 238, 0.65), transparent 100%),
            radial-gradient(1px 1px at 35px 72px, rgba(147, 197, 253, 0.75), transparent 100%),
            radial-gradient(1px 1px at 133px 88px, rgba(139, 92, 246, 0.65), transparent 100%);
        background-size: 156px 112px;
        opacity: 0.55;
        animation: studioBrandParticles 14s ease-in-out infinite alternate;
    }

    .studio-brand {
        --brand-glow: rgba(56, 189, 248, 0.3);
        --brand-sweep: 7s;
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        gap: 11px;
        min-width: 0;
        min-height: 64px;
        padding: 9px 14px 9px 11px;
        overflow: hidden;
        isolation: isolate;
        border: 1px solid transparent;
        border-radius: 26px;
        background:
            radial-gradient(100% 140% at 10% -18%, rgba(34, 211, 238, 0.2), transparent 58%),
            radial-gradient(90% 130% at 96% 118%, rgba(139, 92, 246, 0.22), transparent 62%),
            linear-gradient(145deg, rgba(19, 27, 44, 0.9), rgba(4, 7, 15, 0.94) 54%, rgba(16, 12, 34, 0.92)),
            linear-gradient(115deg, rgba(226, 240, 255, 0.55), rgba(34, 211, 238, 0.35) 34%, rgba(99, 102, 241, 0.42) 66%, rgba(192, 132, 252, 0.5));
        background-origin: padding-box, padding-box, padding-box, border-box;
        background-clip: padding-box, padding-box, padding-box, border-box;
        -webkit-backdrop-filter: blur(22px) saturate(160%);
        backdrop-filter: blur(22px) saturate(160%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.24),
            inset 0 -1px 0 rgba(0, 0, 0, 0.78),
            inset 0 0 34px rgba(59, 130, 246, 0.16),
            inset 0 -18px 30px rgba(0, 0, 0, 0.3),
            0 1px 0 rgba(255, 255, 255, 0.05),
            0 16px 38px rgba(0, 0, 0, 0.58),
            0 0 32px rgba(99, 102, 241, 0.2);
        transition: box-shadow 0.6s ease;
    }

    .studio-brand::before {
        content: '';
        position: absolute;
        inset: -60% -70%;
        z-index: 0;
        pointer-events: none;
        background: linear-gradient(
            105deg,
            transparent 40%,
            rgba(34, 211, 238, 0.05) 44%,
            rgba(139, 92, 246, 0.22) 50%,
            rgba(125, 211, 252, 0.08) 55%,
            transparent 60%
        );
        transform: translateX(-78%) rotate(12deg);
        animation: studioSteelSweep var(--brand-sweep) var(--ease) infinite;
    }

    .studio-brand::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        border-radius: inherit;
        pointer-events: none;
        background:
            repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 6px),
            radial-gradient(120% 120% at 50% 0%, rgba(255, 255, 255, 0.055), transparent 62%);
        box-shadow:
            inset 0 0 0 1px rgba(190, 220, 255, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.14),
            inset 0 0 30px var(--brand-glow);
        transition: box-shadow 0.6s ease;
    }

    .studio-brand-emblem,
    .studio-brand-copy {
        position: relative;
        z-index: 1;
    }

    .studio-brand-emblem {
        position: relative;
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        border-radius: 12px;
        color: #bae6fd;
        border: 1px solid rgba(148, 197, 255, 0.3);
        background:
            radial-gradient(circle at 28% 18%, rgba(224, 242, 254, 0.3), transparent 34%),
            radial-gradient(circle at 82% 88%, rgba(139, 92, 246, 0.36), transparent 58%),
            linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.24),
            inset 0 0 14px rgba(59, 130, 246, 0.28),
            0 0 18px rgba(56, 189, 248, 0.26),
            0 5px 14px rgba(0, 0, 0, 0.46);
        transition: transform 0.45s var(--ease), box-shadow 0.6s ease;
    }

    /* Ambient bloom behind the inline ZA monogram. */
    .studio-brand-emblem::before {
        content: '';
        position: absolute;
        inset: 2px;
        border-radius: inherit;
        background:
            radial-gradient(circle at 50% 38%, rgba(103, 232, 249, 0.22), transparent 62%),
            radial-gradient(circle at 72% 78%, rgba(192, 132, 252, 0.24), transparent 68%);
        filter: blur(2px);
        pointer-events: none;
    }

    .studio-brand-emblem::after {
        content: '';
        position: absolute;
        inset: -4px;
        border-radius: 14px;
        border: 1px solid transparent;
        border-top-color: rgba(125, 211, 252, 0.8);
        border-right-color: rgba(167, 139, 250, 0.15);
        border-bottom-color: rgba(167, 139, 250, 0.45);
        box-shadow: 0 0 12px rgba(96, 165, 250, 0.35), inset 0 0 8px rgba(139, 92, 246, 0.24);
        pointer-events: none;
        animation: studioEmblemOrbit 9s linear infinite;
    }

    .studio-brand-emblem svg {
        position: relative;
        z-index: 1;
        width: 90%;
        height: 90%;
        overflow: visible;
        filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.7)) drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
        animation: studioBrandGlyph 4.5s ease-in-out infinite alternate;
    }

    .studio-brand-copy {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
    }

    .studio-brand-title {
        display: flex;
        align-items: baseline;
        gap: 5px;
        white-space: nowrap;
    }

    .studio-brand-main {
        color: #f4f8ff;
        font-size: 0.98rem;
        font-weight: 850;
        line-height: 1.05;
        letter-spacing: 0.01em;
    }

    .studio-brand-sub {
        color: #8fa8c8;
        font-size: 0.7rem;
        font-weight: 600;
        line-height: 1.05;
        letter-spacing: 0.04em;
        opacity: 0.78;
    }

    @supports ((-webkit-background-clip: text) or (background-clip: text)) {
        .studio-brand-main {
            background: linear-gradient(180deg, #ffffff 0%, #e8f2ff 26%, #9fb8d0 52%, #ffffff 70%, #b9c9dd 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
            filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 6px rgba(226, 240, 255, 0.3));
        }

        .studio-brand-sub {
            background: linear-gradient(180deg, #b9d4f0 0%, #6f8caf 60%, #9dbce0 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
        }
    }

    .studio-brand-tagline {
        display: block;
        margin-top: 5px;
        color: rgba(160, 190, 225, 0.5);
        font-size: 0.46rem;
        font-weight: 600;
        line-height: 1;
        letter-spacing: 0.28em;
        text-transform: uppercase;
        white-space: nowrap;
    }


    @keyframes studioSteelSweep {
        0%, 24% {
            transform: translateX(-78%) rotate(12deg);
            opacity: 0;
        }
        32% {
            opacity: 0.9;
        }
        58%, 100% {
            transform: translateX(78%) rotate(12deg);
            opacity: 0;
        }
    }

    @keyframes studioBrandAmbient {
        from {
            opacity: 0.7;
            transform: translate3d(-4px, 2px, 0) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translate3d(5px, -3px, 0) scale(1.04);
        }
    }

    @keyframes studioBrandParticles {
        from {
            opacity: 0.35;
            transform: translate3d(0, 4px, 0);
        }
        to {
            opacity: 0.7;
            transform: translate3d(-8px, -8px, 0);
        }
    }

    @keyframes studioBrandGlyph {
        from {
            opacity: 0.82;
            transform: scale(0.96) rotate(-2deg);
        }
        to {
            opacity: 1;
            transform: scale(1.04) rotate(2deg);
        }
    }


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


    @media (hover: hover) {
        .studio-brand:hover {
            border-color: rgba(165, 210, 255, 0.5);
            box-shadow:
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                inset 0 -1px 0 rgba(0, 0, 0, 0.72),
                inset 0 0 38px var(--brand-glow),
                0 0 0 1px rgba(125, 211, 252, 0.22),
                0 0 34px rgba(99, 102, 241, 0.3),
                0 16px 36px rgba(0, 0, 0, 0.5);
        }

        .studio-brand:hover .studio-brand-emblem {
            transform: translateY(-1px) rotate(-4deg) scale(1.05);
            box-shadow:
                inset 0 1px 0 rgba(224, 242, 254, 0.6),
                inset 0 0 18px rgba(59, 130, 246, 0.4),
                0 0 26px rgba(56, 189, 248, 0.45),
                0 5px 14px rgba(0, 0, 0, 0.46);
        }

        .studio-brand:hover .studio-brand-main {
            filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 12px rgba(226, 240, 255, 0.5));
        }

        .studio-brand:hover .studio-brand-tagline {
            color: rgba(186, 230, 253, 0.72);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .sidebar-header::before,
        .sidebar-header::after,
        .studio-brand::before,
        .studio-brand-emblem::before,
        .studio-brand-emblem::after,
        .dropzone-folder.is-format-prompt .dropzone-folder-arrow {
            animation: none !important;
        }
    }

    .sidebar.collapsed .sidebar-header {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Collapsed rail: keep the Z emblem visible as the studio mark */
    @media (min-width: 769px) {
        .sidebar.collapsed .sidebar-header {
            padding: 10px 12px 18px;
            margin-bottom: 14px;
        }

        .sidebar.collapsed .studio-brand {
            justify-content: center;
            gap: 0;
            padding: 6px;
        }

        .sidebar.collapsed .studio-brand-copy {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }


        .sidebar.collapsed .studio-brand-emblem {
            width: 38px;
            height: 38px;
            flex-basis: 38px;
            border-radius: 9px;
        }

        .sidebar.collapsed .studio-brand-emblem svg {
            width: 22px;
            height: 22px;
        }
    }

    /* Nav list */
    .sidebar-nav {
        position: relative;
        z-index: 3;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 0 12px;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
    }

    .sidebar-nav::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.12);
        border-radius: 3px;
    }

    /* Route-derived pre-paint geometry. site-config.js puts data-active-tab
       on <html> before the body exists, so the highlight is already in the
       right place in the first frame that shows the new page's content. */
    html { --nav-step: 52px; }
    html[data-active-tab="home"] { --tab-index: 0; }
    html[data-active-tab="library"] { --tab-index: 1; }
    html[data-active-tab="tools"] { --tab-index: 2; }
    html[data-active-tab="pulse-kit"] { --tab-index: 3; }
    html[data-active-tab="blogs"] { --tab-index: 4; }
    html[data-active-tab="settings"] { --tab-index: 5; }

    @media (max-width: 768px) {
        html { --nav-step: 56px; }
    }

    @media (max-height: 500px) and (orientation: landscape) {
        html { --nav-step: 48px; }
    }

    /* Sliding active indicator */
    .nav-indicator {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 0;
        height: var(--indicator-height, 48px);
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(40, 50, 70, 0.5) 0%, rgba(30, 40, 60, 0.35) 100%);
        border: 1px solid var(--accent-soft);
        box-shadow:
            0 0 0 1px rgba(59, 130, 246, 0.1) inset,
            0 4px 16px rgba(59, 130, 246, 0.15);
        pointer-events: none;
        z-index: 0;
        /* Hidden until the head-resolved route places it, then it snaps.
           There is deliberately no position transition: separate HTML pages
           swap content instantly, so a sliding highlight would always lag. */
        opacity: 0;
        transform: translate3d(0,
            var(--indicator-y, calc(var(--nav-step, 52px) * var(--tab-index, 0))), 0);
        transform-origin: top center;
        backface-visibility: hidden;
        transition: none;
    }

    /* The head-resolved route makes the highlight visible with the page's
       first frame; studio.js later replaces this with measured geometry. */
    html[data-active-tab] .nav-indicator {
        opacity: 1;
    }

    html[data-active-tab="contact"] .nav-indicator {
        opacity: 0;
    }

    html[data-active-tab] .sidebar.collapsed .nav-indicator {
        opacity: 0;
    }

    /* No sidebar transition at all: every tab state is committed instantly. */
    @media (prefers-reduced-motion: reduce) {
        .nav-indicator,
        .nav-item,
        .nav-icon,
        .nav-item span {
            transition: none !important;
        }
    }

    .nav-indicator::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 22px;
        border-radius: 0 3px 3px 0;
        background: linear-gradient(180deg, #64748b 0%, var(--accent) 50%, #64748b 100%);
        box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    }

    .sidebar.collapsed .nav-indicator {
        opacity: 0;
    }

    /* Nav items */
    .nav-item {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 48px;
        padding: 12px 16px;
        border: 1px solid transparent;
        border-radius: 10px;
        background: transparent;
        color: var(--text-dim);
        font-size: 0.95rem;
        font-weight: 400;
        /* contact.html inherits 1.6 from site-pages.css; pin it here so every
           page uses the same nav-item height and vertical rhythm. */
        line-height: 1.6;
        text-align: left;
        text-decoration: none;
        cursor: pointer;
        touch-action: manipulation;
        /* No transition: hover and active states land in the same frame. */
        transition: none;
    }

    .nav-item:hover {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
        color: rgba(255, 255, 255, 0.95);
    }

    .nav-item.active {
        color: #ffffff;
    }

    /* Pre-paint active state from site-config.js. :where() keeps hover and
       focus styles higher in the cascade, so interaction still feels crisp. */
    html[data-active-tab="home"] :where(.nav-item[data-tab="home"]),
    html[data-active-tab="library"] :where(.nav-item[data-tab="library"]),
    html[data-active-tab="tools"] :where(.nav-item[data-tab="tools"]),
    html[data-active-tab="pulse-kit"] :where(.nav-item[data-tab="pulse-kit"]),
    html[data-active-tab="contact"] :where(.nav-item[data-tab="contact"]),
    html[data-active-tab="blogs"] :where(.nav-item[data-tab="blogs"]),
    html[data-active-tab="settings"] :where(.nav-item[data-tab="settings"]) {
        color: #ffffff;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        opacity: 0.6;
        transition: none;
    }

    .nav-item:hover .nav-icon,
    .nav-item.active .nav-icon {
        opacity: 1;
    }

    .nav-item.active .nav-icon {
        transform: scale(1.1);
    }

    .nav-item:active .nav-icon {
        transform: scale(0.95);
    }

    .nav-item span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: none;
    }

    /* Collapsed (icon rail) */
    .sidebar.collapsed .nav-item {
        justify-content: center;
        gap: 0;
        padding: 12px;
    }

    .sidebar.collapsed .nav-item span {
        opacity: 0;
        width: 0;
        pointer-events: none;
    }

    .sidebar.collapsed .nav-icon {
        margin: 0 auto;
    }

    .sidebar.collapsed .nav-item.active {
        background: rgba(59, 130, 246, 0.12);
    }

    .sidebar.collapsed .nav-item.active .nav-icon {
        transform: scale(1.15);
    }

    /* ============================================================
       DEVICE FOOTER
       ============================================================ */
    .sidebar-footer {
        position: relative;
        z-index: 3;
        flex-shrink: 0;
        margin-top: 14px;
        padding: 14px 12px 0;
    }

    .sidebar-footer-divider {
        height: 1px;
        margin: 12px 0;
        background: var(--divider);
    }

    .device-chip {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 10px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.012) 100%);
        border: 1px solid var(--border);

        color: rgba(255, 255, 255, 0.45);
        font-size: 0.78rem;
        font-weight: 400;
        /* Match the contact.html sidebar footer geometry exactly. */
        line-height: 1.6;
        letter-spacing: 0.02em;
        white-space: nowrap;
        overflow: hidden;
        transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    }

    .device-chip:hover {
        color: rgba(255, 255, 255, 0.7);
        border-color: var(--border);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%);
    }

    .device-icon {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        opacity: 0.75;
        transition: margin var(--dur) var(--ease), transform 0.25s var(--ease);
    }

    .device-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: opacity 0.2s ease, width var(--dur) var(--ease);
    }

    /* Icon-rail mode */
    .sidebar.collapsed .device-chip {
        justify-content: center;
        gap: 0;
        padding: 10px;
    }

    .sidebar.collapsed .device-name {
        opacity: 0;
        width: 0;
    }

    .sidebar.collapsed .device-icon {
        margin: 0 auto;
    }

    /* ============================================================
       MAIN CONTENT
       ============================================================ */
    .vertical-line {
        position: fixed;
        top: 0;
        bottom: 0;
        left: var(--sidebar-w);
        width: 1px;
        /* Sidebar already supplies this edge; a second rail reads as a double line. */
        background: none;
        pointer-events: none;
        z-index: 10;
        transition: left var(--dur) var(--ease);
    }

    .sidebar.collapsed ~ .vertical-line {
        left: var(--sidebar-w-collapsed);
    }

    .main-content {
        flex: 1;
        min-height: 100vh;
        min-height: 100dvh;
        margin-left: var(--sidebar-w);
        padding: clamp(24px, 5vw, 64px) clamp(20px, 4vw, 56px);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        position: relative;
        transition: margin-left var(--dur) var(--ease);
    }

    .sidebar.collapsed ~ .main-content {
        margin-left: var(--sidebar-w-collapsed);
    }

    /* Panels stack in a grid so height adapts to content */
    .tab-panels {
        flex: 1;
        display: grid;
        grid-template-rows: 1fr;
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
    }

    .tab-panel {
        grid-area: 1 / 1;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transform: translateY(18px) scale(0.985);
        transition: opacity 0.35s var(--ease),
                    transform 0.35s var(--ease),
                    visibility 0.35s;
    }

    .tab-panel.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        z-index: 1;
    }

    .panel-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 80vh;
        text-align: center;
        padding: clamp(8px, 3vw, 32px);
        width: 100%;
    }

    .panel-title {
        font-size: clamp(1.75rem, 6vw, 2.75rem);
        font-weight: 300;
        letter-spacing: -0.02em;
        line-height: 1.15;
        margin-bottom: clamp(8px, 1.5vw, 16px);
        background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        overflow-wrap: break-word;
    }

    .panel-desc {
        font-size: clamp(0.95rem, 2.6vw, 1.1rem);
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.5);
        font-weight: 400;
        max-width: 46ch;
        margin: 0 auto;
        overflow-wrap: break-word;
    }

    /* ============================================================
       Z-ARC STUDIO SEARCH BAR
       ============================================================ */
    .tools-search {
        position: relative;
        left: auto;
        top: auto;
        flex-shrink: 0;
        width: 100%;
        max-width: var(--tools-max);
        margin: 0 auto 14px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s var(--ease), visibility 0.3s;
    }

    .tools-search.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .search-shell {
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
        height: 52px;
        padding: 0 12px 0 16px;
        border-radius: 14px;
        background:
            linear-gradient(135deg, rgba(23, 24, 30, 0.94) 0%, rgba(12, 12, 16, 0.96) 100%);
        border: 1px solid var(--border);
        box-shadow:
            0 10px 30px rgba(0, 0, 0, 0.55),
            0 2px 6px rgba(0, 0, 0, 0.4);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        transition: border-color 0.25s var(--ease),
                    box-shadow 0.25s var(--ease),
                    background 0.25s var(--ease);
    }

    /* Soft top light sweep */
    .search-shell::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, transparent 45%);
        pointer-events: none;
    }

    .search-shell:hover {
        border-color: rgba(255, 255, 255, 0.14);
    }

    .search-shell:focus-within {
        border-color: rgba(59, 130, 246, 0.45);
        background:
            linear-gradient(135deg, rgba(27, 29, 38, 0.96) 0%, rgba(14, 15, 21, 0.98) 100%);
        box-shadow:
            0 0 0 3px rgba(59, 130, 246, 0.12),
            0 1px 0 rgba(255, 255, 255, 0.07) inset,
            0 12px 38px rgba(0, 0, 0, 0.6),
            0 0 26px rgba(59, 130, 246, 0.12);
    }

    .search-icon {
        position: relative;
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        color: rgba(255, 255, 255, 0.42);
        transition: color 0.25s var(--ease);
    }

    .search-shell:focus-within .search-icon {
        color: #60a5fa;
    }

    .search-input {
        position: relative;
        flex: 1;
        min-width: 0;
        height: 100%;
        padding: 0 12px 0 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: #ffffff;
        font: inherit;
        font-size: 0.95rem;
        letter-spacing: 0.01em;
        caret-color: #60a5fa;
    }

    .search-input::placeholder {
        color: rgba(255, 255, 255, 0.34);
    }

    .search-input::-webkit-search-cancel-button,
    .search-input::-webkit-search-decoration {
        -webkit-appearance: none;
        appearance: none;
    }

    .search-kbd {
        position: relative;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 4px 7px;
        border-radius: 6px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.035);
        color: rgba(255, 255, 255, 0.34);
        font-family: inherit;
        font-size: 0.68rem;
        font-weight: 500;
        letter-spacing: 0.06em;
        line-height: 1;
        white-space: nowrap;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        user-select: none;
        transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
                    background 0.25s var(--ease);
    }

    .search-kbd:hover {
        color: rgba(255, 255, 255, 0.7);
        border-color: rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.07);
    }

    .search-kbd:focus-visible {
        outline: 2px solid rgba(59, 130, 246, 0.7);
        outline-offset: 2px;
    }

    .search-shell:focus-within .search-kbd {
        color: rgba(255, 255, 255, 0.55);
        border-color: rgba(59, 130, 246, 0.3);
    }

    /* Search bar on mobile: clears the hamburger button */
    @media (max-width: 768px) {
        :root {
            --tools-offset: calc(60px + var(--safe-top));
        }

        .search-shell {
            height: 50px;
            padding: 0 10px 0 14px;
        }

        .search-input {
            font-size: 16px; /* prevents iOS auto-zoom on focus */
        }

        .search-kbd {
            display: none;
        }
    }

    @media (max-width: 420px) {
        :root {
            --tools-offset: calc(56px + var(--safe-top));
        }

        .search-shell {
            height: 48px;
            border-radius: 12px;
        }
    }

    @media (max-height: 500px) and (orientation: landscape) {
        :root {
            --tools-offset: calc(12px + var(--safe-top));
        }

        .search-shell {
            height: 44px;
        }
    }

    /* ============================================================
       Z-ARC STUDIO — TOOL LIST + CONVERTER PAGE
       ============================================================ */
    [hidden] {
        display: none !important;
    }

    .tools-view {
        width: 100%;
        max-width: var(--tools-max);
        margin: 0 auto;
    }

    .tools-hub-title {
        margin: 0 0 6px;
        font-size: clamp(1.5rem, 3.6vw, 2rem);
        font-weight: 400;
        letter-spacing: -0.02em;
        line-height: 1.2;
        color: #ffffff;
    }

    .tools-hub-sub {
        margin: 0 0 20px;
        font-size: 0.86rem;
        color: rgba(255, 255, 255, 0.42);
        line-height: 1.55;
    }

    /* Stack the search bar above the cards in normal document flow */
    .tab-panel[data-panel="tools"] {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: var(--tools-offset);
    }

    .tab-panel[data-panel="tools"].converter-mode {
        padding-top: 8px;
    }

    /* Subpages replace the tool list, so the search must not reserve space. */
    .tab-panel[data-panel="tools"].converter-mode .tools-search {
        display: none;
    }

    .tool-grid {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .tools-empty-state {
        margin: 14px 0 0;
        padding: 18px 16px;
        border-radius: 14px;
        border: 1px dashed rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.015);
        color: rgba(255, 255, 255, 0.46);
        font-size: 0.8rem;
        line-height: 1.5;
        text-align: center;
    }

    .tools-empty-state[hidden] {
        display: none !important;
    }

    .tool-card {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        padding: 18px;
        text-align: left;
        text-decoration: none;
        border-radius: 16px;
        border: 1px solid var(--border);
        background: linear-gradient(135deg, rgba(23, 24, 30, 0.9) 0%, rgba(11, 11, 15, 0.95) 100%);
        box-shadow:
            0 10px 28px rgba(0, 0, 0, 0.45);
        color: inherit;
        cursor: pointer;
        transition: transform 0.25s var(--ease),
                    border-color 0.25s var(--ease),
                    box-shadow 0.25s var(--ease);
    }

    .tool-card:hover {
        transform: translateY(-2px);
        border-color: rgba(59, 130, 246, 0.35);
        box-shadow:
            0 14px 34px rgba(0, 0, 0, 0.55),
            0 0 26px rgba(59, 130, 246, 0.12);
    }

    .tool-card:active {
        transform: translateY(0) scale(0.995);
    }

    .tool-card-icon {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        border-radius: 12px;
        border: 1px solid rgba(59, 130, 246, 0.22);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.06) 100%);
        color: #93c5fd;
    }

    .tool-card-icon svg {
        width: 22px;
        height: 22px;
    }

    .tool-card-body {
        display: flex;
        flex-direction: column;
        gap: 3px;
        flex: 1;
        min-width: 0;
    }

    .tool-card-title {
        font-size: 0.96rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        color: #ffffff;
    }

    .tool-card-desc {
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.42);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tool-card-arrow {
        display: grid;
        place-items: center;
        flex-shrink: 0;
        color: rgba(255, 255, 255, 0.26);
        transition: transform 0.25s var(--ease), color 0.25s var(--ease);
    }

    .tool-card-arrow svg {
        width: 16px;
        height: 16px;
    }

    .tool-card:hover .tool-card-arrow {
        transform: translateX(3px);
        color: rgba(255, 255, 255, 0.6);
    }

    /* ---------- Home workbench: tool shelf + compact hero ad ---------- */
    .ad-slot.home-hero-video-ad {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        padding: 10px 12px;
    }

    .home-video-ad.home-hero-video-ad .ad-label {
        margin-bottom: 6px;
    }

    .home-video-ad.home-hero-video-ad .ad-reserve {
        min-height: 96px;
    }

    /* Full-width video banner that replaces the old blog preview below FAQ. */
    .home-feed-video-ad {
        margin: 34px 0 0;
    }

    .home-tool-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .home-tool-card {
        align-items: flex-start;
        text-decoration: none;
    }

    .home-tool-card:focus-visible {
        outline: 2px solid rgba(59, 130, 246, 0.65);
        outline-offset: 3px;
    }

    .home-tool-card .tool-card-desc {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.55;
    }

    /* ---------- Converter page ---------- */

    .converter-page {
        width: 100%;
        max-width: var(--tools-max);
        margin: 0 auto;
        animation: converterIn 0.32s var(--ease);
    }

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

    .converter-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
    }

    .back-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 12px 7px 8px;
        border-radius: 9px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.03);
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.78rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease,
                    border-color 0.2s ease, transform 0.2s ease;
    }

    .back-btn:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.06);
        border-color: var(--border);
    }

    .back-btn:active {
        transform: scale(0.97);
    }

    .back-btn svg {
        width: 15px;
        height: 15px;
    }

    .converter-head-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: wrap;
    }

    .converter-guide-btn {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 7px 12px;
        border-radius: 999px;
        border: 1px solid rgba(59, 130, 246, 0.28);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(14, 165, 233, 0.06));
        color: #bfdbfe;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        cursor: pointer;
        transition: color 0.2s var(--ease), background 0.2s var(--ease),
                    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
                    transform 0.2s var(--ease);
    }

    .converter-guide-btn svg {
        width: 14px;
        height: 14px;
    }

    .converter-guide-btn:hover {
        color: #ffffff;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(14, 165, 233, 0.12));
        border-color: rgba(96, 165, 250, 0.55);
        box-shadow: 0 0 18px rgba(59, 130, 246, 0.22);
    }

    .converter-guide-btn:active {
        transform: scale(0.97);
    }

    .converter-guide-btn:focus-visible {
        outline: 2px solid rgba(147, 197, 253, 0.8);
        outline-offset: 3px;
    }

    .converter-title {
        font-size: clamp(1.3rem, 3.6vw, 1.7rem);
        font-weight: 400;
        letter-spacing: -0.02em;
        line-height: 1.2;
        color: #ffffff;
        margin-bottom: 6px;
    }

    .converter-sub {
        font-size: 0.86rem;
        color: rgba(255, 255, 255, 0.42);
        margin-bottom: 20px;
    }

    .dropzone {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 30px 20px;
        border-radius: 16px;
        border: 1.5px dashed var(--border);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.008) 100%);
        text-align: center;
        cursor: pointer;
        transition: border-color 0.25s var(--ease),
                    background 0.25s var(--ease),
                    box-shadow 0.25s var(--ease);
    }

    .dropzone:hover,
    .dropzone.dragover {
        border-color: rgba(59, 130, 246, 0.5);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    }

    .dropzone-icon {
        width: 26px;
        height: 26px;
        color: rgba(255, 255, 255, 0.4);
        margin-bottom: 4px;
        transition: color 0.25s var(--ease);
    }

    .dropzone:hover .dropzone-icon,
    .dropzone.dragover .dropzone-icon {
        color: #60a5fa;
    }

    .dropzone-title {
        font-size: 0.92rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.8);
    }

    .dropzone-hint {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.4);
    }

    .dropzone-browse {
        color: #60a5fa;
    }

    .dropzone-meta {
        margin-top: 4px;
        font-size: 0.7rem;
        letter-spacing: 0.03em;
        color: rgba(255, 255, 255, 0.28);
    }

    /* Audio Format Converter single-file drop box: rose border matches the
       Choose folder button while other drop zones keep their original look. */
    #dropzone {
        border-color: rgba(244, 114, 182, 0.38);
    }

    #dropzone:hover,
    #dropzone.dragover {
        border-color: rgba(244, 114, 182, 0.55);
        background: linear-gradient(135deg, rgba(244, 114, 182, 0.12) 0%, rgba(190, 24, 93, 0.06) 100%);
        box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.1);
    }

    #dropzone:hover .dropzone-icon,
    #dropzone.dragover .dropzone-icon {
        color: #f9a8d4;
    }

    .file-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: linear-gradient(135deg, rgba(23, 24, 30, 0.9) 0%, rgba(11, 11, 15, 0.95) 100%);
    }

    .file-badge {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        border-radius: 10px;
        border: 1px solid rgba(59, 130, 246, 0.2);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.05) 100%);
        color: #93c5fd;
    }

    .file-badge svg {
        width: 18px;
        height: 18px;
    }

    .file-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
        min-width: 0;
    }

    .file-name {
        font-size: 0.86rem;
        color: #ffffff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .file-meta {
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.38);
    }

    .file-clear {
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        border-radius: 8px;
        border: 1px solid transparent;
        background: transparent;
        color: rgba(255, 255, 255, 0.4);
        font-size: 1rem;
        line-height: 1;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .file-clear:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .file-clear:disabled,
    .file-queue-remove:disabled,
    .file-queue-clear:disabled {
        opacity: 0.35;
        cursor: default;
    }

    .dropzone-folder-row {
        display: flex;
        align-items: center;
        gap: 12px;
        row-gap: 8px;
        flex-wrap: wrap;
        margin-top: 10px;
    }

    .dropzone-folder {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        min-width: 200px;
        min-height: 46px;
        padding: 12px 24px;
        border-radius: 12px;
        border: 1px solid rgba(244, 114, 182, 0.38);
        background: linear-gradient(180deg, rgba(244, 114, 182, 0.16) 0%, rgba(190, 24, 93, 0.12) 100%);
        color: #fbcfe8;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
        letter-spacing: 0.02em;
        cursor: pointer;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
            box-shadow 0.2s ease, transform 0.2s ease;
    }

    .dropzone-folder-icon {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        color: #f9a8d4;
    }

    .dropzone-folder-label {
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
    }

    .dropzone-folder:hover {
        background: linear-gradient(180deg, rgba(244, 114, 182, 0.22) 0%, rgba(190, 24, 93, 0.16) 100%);
        border-color: rgba(244, 114, 182, 0.55);
        color: #fdf2f8;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
            0 8px 22px rgba(190, 24, 93, 0.18);
        transform: translateY(-1px);
    }

    .dropzone-folder:active {
        transform: translateY(0);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
            0 3px 10px rgba(190, 24, 93, 0.14);
    }

    .dropzone-folder:disabled {
        opacity: 0.4;
        cursor: default;
    }

    .dropzone-folder.is-format-disabled {
        opacity: 0.45;
        cursor: not-allowed;
        color: rgba(255, 255, 255, 0.45);
        border-color: rgba(148, 163, 184, 0.24);
        background: rgba(148, 163, 184, 0.08);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .dropzone-folder.is-format-disabled:hover {
        background: rgba(148, 163, 184, 0.08);
        border-color: rgba(148, 163, 184, 0.24);
        color: rgba(255, 255, 255, 0.45);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
        transform: none;
    }

    .dropzone-folder.is-format-disabled .dropzone-folder-icon {
        color: inherit;
    }

    .dropzone-folder:disabled:hover {
        transform: none;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    /* Empty-state folder cue: light green instead of the rose action styling. */
    .dropzone-folder.is-format-prompt {
        border-color: rgba(74, 222, 128, 0.42);
        background: linear-gradient(180deg, rgba(74, 222, 128, 0.14) 0%, rgba(34, 197, 94, 0.07) 100%);
        color: #bbf7d0;
        box-shadow: inset 0 1px 0 rgba(187, 247, 208, 0.18);
        cursor: default;
        pointer-events: none;
    }

    .dropzone-folder.is-format-prompt .dropzone-folder-icon {
        color: #86efac;
    }

    .dropzone-folder-note {
        flex: 1 1 220px;
        font-size: 0.68rem;
        letter-spacing: 0.02em;
        color: rgba(255, 255, 255, 0.3);
    }

    .dropzone-folder[hidden] + .dropzone-folder-note,
    .dropzone-folder.is-format-prompt + .dropzone-folder-note {
        display: none;
    }

    .dropzone-folder-arrow {
        display: none;
        flex-shrink: 0;
        font-size: 0.85rem;
        line-height: 1;
    }

    .dropzone-folder.is-format-prompt .dropzone-folder-arrow {
        display: inline-flex;
        animation: formatArrowBounce 1.5s ease-in-out infinite;
    }

    .dropzone-folder-arrow[hidden] {
        display: none;
    }

    @keyframes formatSelectPulse {
        0%, 100% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12); }
        50% { box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.28); }
    }

    @keyframes formatArrowBounce {
        0%, 100% { transform: translateY(-2px); }
        50% { transform: translateY(3px); }
    }

    .file-queue {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: linear-gradient(135deg, rgba(23, 24, 30, 0.9) 0%, rgba(11, 11, 15, 0.95) 100%);
    }

    .file-queue-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .file-queue-title {
        font-size: 0.8rem;
        color: #ffffff;
        letter-spacing: 0.01em;
    }

    .file-queue-clear {
        padding: 4px 9px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: transparent;
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.68rem;
        font-weight: 600;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .file-queue-clear:hover:not(:disabled) {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.06);
        border-color: var(--border);
    }

    .file-queue-actions {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .file-queue-retry-all {
        padding: 4px 9px;
        border-radius: 8px;
        border: 1px solid rgba(147, 197, 253, 0.24);
        background: rgba(147, 197, 253, 0.08);
        color: #93c5fd;
        font-size: 0.68rem;
        font-weight: 600;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .file-queue-retry-all:hover:not(:disabled) {
        color: #ffffff;
        background: rgba(147, 197, 253, 0.16);
        border-color: rgba(147, 197, 253, 0.4);
    }

    .file-queue-retry {
        flex-shrink: 0;
        padding: 3px 7px;
        border-radius: 7px;
        border: 1px solid rgba(147, 197, 253, 0.24);
        background: rgba(147, 197, 253, 0.08);
        color: #93c5fd;
        font-size: 0.64rem;
        font-weight: 600;
        cursor: pointer;
    }

    .file-queue-retry:hover:not(:disabled) {
        color: #ffffff;
        background: rgba(147, 197, 253, 0.16);
    }

    .file-queue-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 6px;
        max-height: 238px;
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .file-queue-item {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.025);
    }

    .file-queue-item.is-converting {
        border-color: rgba(59, 130, 246, 0.25);
        background: rgba(59, 130, 246, 0.06);
    }

    .file-queue-info {
        display: flex;
        flex-direction: column;
        gap: 1px;
        flex: 1;
        min-width: 0;
    }

    .file-queue-name {
        font-size: 0.78rem;
        color: #ffffff;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .file-queue-meta {
        font-size: 0.66rem;
        color: rgba(255, 255, 255, 0.34);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .file-queue-status {
        flex-shrink: 0;
        font-size: 0.66rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        color: rgba(255, 255, 255, 0.4);
    }

    .file-queue-item.is-converting .file-queue-status {
        color: #93c5fd;
    }

    .file-queue-item.is-done .file-queue-status {
        color: #86efac;
    }

    .file-queue-item.is-failed .file-queue-status {
        color: #fca5a5;
    }

    .file-queue-remove {
        display: grid;
        place-items: center;
        width: 24px;
        height: 24px;
        flex-shrink: 0;
        border-radius: 7px;
        border: 1px solid transparent;
        background: transparent;
        color: rgba(255, 255, 255, 0.35);
        font-size: 0.95rem;
        line-height: 1;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .file-queue-remove:hover:not(:disabled) {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .converter-options {
        display: flex;
        gap: 14px;
        margin: 16px 0;
        transition: gap 0.34s var(--ease);
    }

    .converter-options.is-ogg,
    .converter-options.is-opus-vbr {
        gap: 0;
    }

    .option-group {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
    }

    /* Bitrate and bit depth share one animated slot: lossy formats show
       bitrate; lossless formats show bit depth in the same position. Ogg
       Vorbis collapses the slot because it uses the quality slider instead. */
    .quality-slot {
        flex: 1 1 0;
        min-width: 0;
        display: grid;
        max-width: 100%;
        max-height: 80px;
        opacity: 1;
        visibility: visible;
        transition: max-width 0.34s var(--ease),
                    max-height 0.34s var(--ease),
                    opacity 0.22s ease,
                    visibility 0s linear 0s;
    }

    .quality-slot.is-off {
        max-width: 0;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        overflow: hidden;
        transition: max-width 0.34s var(--ease),
                    max-height 0.34s var(--ease),
                    opacity 0.18s ease,
                    visibility 0s linear 0.34s;
    }

    .quality-panel {
        grid-area: 1 / 1;
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.22s ease,
                    transform 0.3s var(--ease),
                    visibility 0s linear 0s;
    }

    .quality-panel.is-off {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(4px);
        transition: opacity 0.18s ease,
                    transform 0.24s var(--ease),
                    visibility 0s linear 0.24s;
    }

    .option-label {
        font-size: 0.66rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.32);
    }

    #formatOptionLabel.is-awaiting-format {
        color: #ffffff;
    }

    .option-label-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .tier-badge {
        padding: 2px 7px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.03);
        color: rgba(255, 255, 255, 0.45);
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        line-height: 1.5;
        white-space: nowrap;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    }

    .tier-badge.is-empty {
        opacity: 0;
        visibility: hidden;
    }

    .tier-badge[data-class="high"] {
        color: #93c5fd;
        border-color: rgba(59, 130, 246, 0.3);
        background: rgba(59, 130, 246, 0.12);
    }

    .tier-badge[data-class="standard"] {
        color: #a7f3d0;
        border-color: rgba(16, 185, 129, 0.28);
        background: rgba(16, 185, 129, 0.1);
    }

    .tier-badge[data-class="low"] {
        color: #fcd34d;
        border-color: rgba(245, 158, 11, 0.28);
        background: rgba(245, 158, 11, 0.1);
    }

    .tier-badge[data-class="lossless"] {
        color: #a7f3d0;
        border-color: rgba(16, 185, 129, 0.28);
        background: rgba(16, 185, 129, 0.1);
    }

    .tier-badge[data-class="lossy"] {
        color: #fcd34d;
        border-color: rgba(245, 158, 11, 0.28);
        background: rgba(245, 158, 11, 0.1);
    }

    .tier-badge[data-class="legacy"] {
        color: #c4b5fd;
        border-color: rgba(139, 92, 246, 0.32);
        background: rgba(139, 92, 246, 0.12);
    }

    .advanced-settings {
        margin-bottom: 16px;
        padding: 14px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.022) 0%, rgba(255, 255, 255, 0.006) 100%);
    }

    .advanced-head {
        display: flex;
        align-items: center;
        gap: 7px;
        margin-bottom: 10px;
    }

    .advanced-head svg {
        width: 13px;
        height: 13px;
        color: rgba(147, 197, 253, 0.7);
    }

    .advanced-title {
        font-size: 0.66rem;
        font-weight: 600;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.32);
    }

    /* Bitrate mode collapses away for lossless formats and Ogg Vorbis.
       Opus tuning rows use the same animated collapse. */
    .bitrate-mode-group,
    .container-group,
    .id3-version-group,
    .opus-option-group {
        max-height: 64px;
        margin-top: 14px;
        overflow: hidden;
        overflow: clip;
        overflow-clip-margin: 4px;
        transition: max-height 0.34s var(--ease),
                    margin-top 0.34s var(--ease),
                    opacity 0.24s ease,
                    visibility 0s linear 0s;
    }

    .bitrate-mode-group.is-off,
    .container-group.is-off,
    .id3-version-group.is-off,
    .opus-option-group.is-off {
        max-height: 0;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.34s var(--ease),
                    margin-top 0.34s var(--ease),
                    opacity 0.2s ease,
                    visibility 0s linear 0.34s;
    }

    /* Audio profile sits below the bitrate mode and only shows for AAC / AC3 */
    .music-profile-group {
        max-height: 64px;
        margin-top: 14px;
        overflow: hidden;
        overflow: clip;
        overflow-clip-margin: 4px;
        transition: max-height 0.34s var(--ease),
                    margin-top 0.34s var(--ease),
                    opacity 0.24s ease,
                    visibility 0s linear 0s;
    }

    .music-profile-group.is-off {
        max-height: 0;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.34s var(--ease),
                    margin-top 0.34s var(--ease),
                    opacity 0.2s ease,
                    visibility 0s linear 0.34s;
    }

    /* Optional clip guard: hidden for lossless formats, off by default */
    .clip-guard-group {
        max-height: 220px;
        margin-top: 14px;
        overflow: hidden;
        overflow: clip;
        overflow-clip-margin: 4px;
        transition: max-height 0.34s var(--ease),
                    margin-top 0.34s var(--ease),
                    opacity 0.24s ease,
                    visibility 0s linear 0s;
    }

    .clip-guard-group.is-off {
        max-height: 0;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.34s var(--ease),
                    margin-top 0.34s var(--ease),
                    opacity 0.2s ease,
                    visibility 0s linear 0.34s;
    }

    /* Shared slider styling: FLAC compression and Ogg Vorbis quality.
       Both sliders sit directly below the sample-rate option. */
    .flac-compression-group {
        --flac-accent: #3b82f6;
        --flac-accent-rgb: 59, 130, 246;
        max-height: 150px;
        margin-top: 14px;
        overflow: hidden;
        overflow: clip;
        overflow-clip-margin: 6px;
        position: relative;
        transition: max-height 0.34s var(--ease),
                    margin-top 0.34s var(--ease),
                    opacity 0.24s ease,
                    visibility 0s linear 0s;
    }

    .flac-compression-group.is-off {
        max-height: 0;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.34s var(--ease),
                    margin-top 0.34s var(--ease),
                    opacity 0.2s ease,
                    visibility 0s linear 0.34s;
    }

    .flac-compression-group.is-low {
        --flac-accent: #ef4444;
        --flac-accent-rgb: 239, 68, 68;
    }

    .flac-compression-group.is-mid {
        --flac-accent: #22c55e;
        --flac-accent-rgb: 34, 197, 94;
    }

    .flac-compression-group.is-max {
        --flac-accent: #f59e0b;
        --flac-accent-rgb: 245, 158, 11;
    }

    .flac-level-value {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 28px;
        height: 20px;
        padding: 0 8px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        line-height: 1;
        transition: color 0.2s ease, background 0.2s ease,
                    border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .flac-compression-group.is-max .flac-level-value {
        color: #fde68a;
        border-color: rgba(245, 158, 11, 0.45);
        background: rgba(245, 158, 11, 0.16);
        box-shadow: 0 0 18px rgba(245, 158, 11, 0.22);
    }

    .flac-compression-group.is-low .flac-level-value,
    .flac-compression-group.is-mid .flac-level-value {
        border-color: rgba(var(--flac-accent-rgb), 0.45);
        background: rgba(var(--flac-accent-rgb), 0.14);
        box-shadow: 0 0 18px rgba(var(--flac-accent-rgb), 0.22);
    }

    .flac-compression-group.is-low .flac-level-value {
        color: #fecaca;
    }

    .flac-compression-group.is-mid .flac-level-value {
        color: #bbf7d0;
    }

    .flac-slider-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .flac-slider-edge {
        flex: 0 0 auto;
        min-width: 8px;
        color: rgba(255, 255, 255, 0.28);
        font-size: 0.6rem;
        font-weight: 600;
        text-align: center;
    }

    .flac-slider {
        --flac-progress: 62.5%;
        -webkit-appearance: none;
        appearance: none;
        flex: 1 1 auto;
        width: 100%;
        height: 4px;
        border-radius: 999px;
        background: linear-gradient(90deg,
            var(--flac-accent, #3b82f6) 0 var(--flac-progress),
            rgba(255, 255, 255, 0.09) var(--flac-progress) 100%);
        outline: none;
        cursor: pointer;
    }

    .flac-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 15px;
        height: 15px;
        border-radius: 50%;
        border: 3px solid var(--flac-accent, #3b82f6);
        background: #0f0f12;
        box-shadow: 0 0 0 4px rgba(var(--flac-accent-rgb, 59, 130, 246), 0.14);
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .flac-slider::-moz-range-thumb {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        border: 3px solid var(--flac-accent, #3b82f6);
        background: #0f0f12;
        box-shadow: 0 0 0 4px rgba(var(--flac-accent-rgb, 59, 130, 246), 0.14);
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .flac-slider:hover::-webkit-slider-thumb,
    .flac-slider:focus-visible::-webkit-slider-thumb {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(var(--flac-accent-rgb, 59, 130, 246), 0.24);
    }

    .flac-slider:hover::-moz-range-thumb,
    .flac-slider:focus-visible::-moz-range-thumb {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(var(--flac-accent-rgb, 59, 130, 246), 0.24);
    }

    .flac-compression-group.is-max .flac-slider {
        background: linear-gradient(90deg,
            #f59e0b 0 var(--flac-progress),
            rgba(255, 255, 255, 0.09) var(--flac-progress) 100%);
    }

    .flac-compression-group.is-max .flac-slider::-webkit-slider-thumb {
        border-color: #f59e0b;
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2),
                    0 0 16px rgba(245, 158, 11, 0.45);
    }

    .flac-compression-group.is-max .flac-slider::-moz-range-thumb {
        border-color: #f59e0b;
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2),
                    0 0 16px rgba(245, 158, 11, 0.45);
    }

    .flac-compression-note {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 12px;
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.6rem;
        letter-spacing: 0.02em;
    }

    .flac-compression-tag {
        color: rgba(147, 197, 253, 0.8);
        font-weight: 600;
        transition: color 0.2s ease;
    }

    .flac-compression-group.is-max .flac-compression-tag {
        color: #fcd34d;
    }

    .flac-compression-group.is-low .flac-compression-tag {
        color: #fca5a5;
    }

    .flac-compression-group.is-mid .flac-compression-tag {
        color: #86efac;
    }

    .flac-sparkles {
        position: absolute;
        top: 26px;
        right: 4px;
        width: 1px;
        height: 1px;
        pointer-events: none;
    }

    .flac-sparkle {
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #fcd34d;
        opacity: 0;
        box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
    }

    .flac-sparkle:nth-child(2) { background: #93c5fd; box-shadow: 0 0 8px rgba(59, 130, 246, 0.8); }
    .flac-sparkle:nth-child(3) { background: #a7f3d0; box-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
    .flac-sparkle:nth-child(4) { background: #fcd34d; }
    .flac-sparkle:nth-child(5) { background: #93c5fd; }
    .flac-sparkle:nth-child(6) { background: #a7f3d0; }
    .flac-sparkle:nth-child(7) { background: #fcd34d; }
    .flac-sparkle:nth-child(8) { background: #93c5fd; }

    .flac-sparkle:nth-child(1) { --tx: -46px; --ty: -18px; --delay: 0s; }
    .flac-sparkle:nth-child(2) { --tx: 34px; --ty: -20px; --delay: 0.03s; }
    .flac-sparkle:nth-child(3) { --tx: -30px; --ty: 10px; --delay: 0.06s; }
    .flac-sparkle:nth-child(4) { --tx: 46px; --ty: 4px; --delay: 0.02s; }
    .flac-sparkle:nth-child(5) { --tx: -12px; --ty: -24px; --delay: 0.08s; }
    .flac-sparkle:nth-child(6) { --tx: 20px; --ty: 18px; --delay: 0.05s; }
    .flac-sparkle:nth-child(7) { --tx: -52px; --ty: 6px; --delay: 0.1s; }
    .flac-sparkle:nth-child(8) { --tx: 52px; --ty: -10px; --delay: 0.07s; }

    .flac-compression-group.is-color-pulse::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 8px;
        background: linear-gradient(100deg,
            transparent 18%,
            rgba(var(--flac-accent-rgb), 0.18) 46%,
            rgba(var(--flac-accent-rgb), 0.09) 54%,
            transparent 82%);
        transform: translateX(-110%);
        animation: flacSweep 0.45s ease-out;
        pointer-events: none;
    }

    .flac-compression-group.is-color-pulse .flac-level-value {
        animation: flacBadgePulse 0.42s ease;
    }

    .flac-compression-group.is-color-pulse .flac-slider {
        animation: flacTrackPulse 0.42s ease;
    }

    .flac-compression-group.is-celebrating::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 8px;
        background: linear-gradient(100deg,
            transparent 18%,
            rgba(245, 158, 11, 0.16) 46%,
            rgba(147, 197, 253, 0.12) 54%,
            transparent 82%);
        transform: translateX(-110%);
        animation: flacSweep 0.8s ease-out;
        pointer-events: none;
    }

    .flac-compression-group.is-celebrating .flac-level-value {
        animation: flacMaxPop 0.6s var(--ease);
    }

    .flac-compression-group.is-celebrating .flac-sparkle {
        animation: flacSpark 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) var(--delay) forwards;
    }

    @keyframes flacMaxPop {
        0% { transform: scale(0.82); }
        45% { transform: scale(1.22); }
        100% { transform: scale(1); }
    }

    @keyframes flacBadgePulse {
        0% { box-shadow: 0 0 0 0 rgba(var(--flac-accent-rgb), 0); }
        40% { box-shadow: 0 0 24px rgba(var(--flac-accent-rgb), 0.65); }
        100% { box-shadow: 0 0 18px rgba(var(--flac-accent-rgb), 0.22); }
    }

    @keyframes flacTrackPulse {
        0% { box-shadow: 0 0 0 rgba(var(--flac-accent-rgb), 0); }
        40% { box-shadow: 0 0 12px rgba(var(--flac-accent-rgb), 0.5); }
        100% { box-shadow: 0 0 0 rgba(var(--flac-accent-rgb), 0); }
    }

    @keyframes flacSpark {
        0% { opacity: 0; transform: translate(0, 0) scale(0.35); }
        15% { opacity: 1; }
        100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.1); }
    }

    @keyframes flacSweep {
        from { transform: translateX(-110%); }
        to { transform: translateX(110%); }
    }

    .clip-guard-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.025);
        cursor: pointer;
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    .clip-guard-row:hover {
        border-color: var(--border);
        background: rgba(255, 255, 255, 0.04);
    }

    .clip-guard-copy {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
    }

    .clip-guard-title {
        font-size: 0.78rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.78);
    }

    .clip-guard-hint {
        font-size: 0.66rem;
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.32);
    }

    .switch {
        position: relative;
        flex: 0 0 auto;
        width: 36px;
        height: 20px;
    }

    .switch-input {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .switch-track {
        display: block;
        width: 36px;
        height: 20px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        background: rgba(255, 255, 255, 0.06);
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .switch-thumb {
        display: block;
        width: 14px;
        height: 14px;
        margin: 2px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.55);
        transition: transform 0.2s var(--ease), background 0.2s ease;
    }

    .switch-input:checked + .switch-track {
        background: rgba(59, 130, 246, 0.35);
        border-color: rgba(59, 130, 246, 0.55);
    }

    .switch-input:checked + .switch-track .switch-thumb {
        transform: translateX(16px);
        background: #bfdbfe;
    }

    .switch-input:focus-visible + .switch-track {
        outline: 2px solid rgba(147, 197, 253, 0.7);
        outline-offset: 2px;
    }

    .switch-input:disabled + .switch-track {
        opacity: 0.45;
    }

    .select-wrap {
        position: relative;
    }

    .select {
        width: 100%;
        height: 36px;
        padding: 0 30px 0 11px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.03);
        color: rgba(255, 255, 255, 0.8);
        font: inherit;
        font-size: 0.78rem;
        appearance: none;
        -webkit-appearance: none;
        outline: none;
        cursor: pointer;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .select:focus {
        border-color: rgba(59, 130, 246, 0.5);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .select:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        border-color: var(--border);
    }

    .select:disabled + .select-arrow {
        opacity: 0.4;
    }

    .select option {
        background: #101014;
        color: #ffffff;
    }

    .select-arrow {
        position: absolute;
        top: 50%;
        right: 10px;
        width: 14px;
        height: 14px;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.35);
        pointer-events: none;
    }

    /* ---------- Custom sample-rate dropdown ---------- */

    .select-menu-wrap .select-native {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

    .select-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding-right: 11px;
        text-align: left;
        overflow: visible;
    }

    .select-trigger[aria-expanded="true"] {
        border-color: rgba(59, 130, 246, 0.5);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    /* Empty converter: highlight the Output format dropdown, not the folder cue. */
    #formatSelectWrap.is-awaiting-format .select-trigger {
        border-color: rgba(59, 130, 246, 0.8);
        background: rgba(59, 130, 246, 0.08);
        animation: formatSelectPulse 1.6s ease-in-out infinite;
    }

    .select-trigger .select-arrow {
        position: static;
        transform: none;
        flex: none;
        transition: transform 0.2s ease;
    }

    .select-trigger[aria-expanded="true"] .select-arrow {
        transform: rotate(180deg);
    }

    .select-value {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .select-value.is-placeholder {
        color: rgba(255, 255, 255, 0.38);
    }

    .select-value.is-in {
        animation: valueIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .select-value.is-out {
        animation: valueOut 0.18s ease-in forwards;
    }

    .value-ghost {
        position: absolute;
        z-index: 3;
        pointer-events: none;
    }

    @keyframes valueOut {
        from { opacity: 1; transform: translateY(0); filter: blur(0); }
        to   { opacity: 0; transform: translateY(-8px); filter: blur(3px); }
    }

    @keyframes valueIn {
        from { opacity: 0; transform: translateY(8px); filter: blur(3px); }
        to   { opacity: 1; transform: translateY(0); filter: blur(0); }
    }

    .select-menu {
        position: fixed;
        z-index: 120;
        padding: 6px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: #0b0b0e;
        box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        animation: menuIn 0.14s ease;
    }

    /* Firefox has no ::-webkit-scrollbar support, so it gets the thin fallback */
    @supports not selector(::-webkit-scrollbar) {
        .select-menu {
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
        }
    }

    /* Slim, inset scrollbar shared by every custom dropdown */
    .select-menu::-webkit-scrollbar {
        width: 10px;
    }

    .select-menu::-webkit-scrollbar-track {
        background: transparent;
        margin: 6px 0;
    }

    .select-menu::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.16);
        background-clip: content-box;
        border: 2px solid transparent;
        border-radius: 999px;
        min-height: 40px;
    }

    .select-menu::-webkit-scrollbar-thumb:hover {
        background-color: rgba(255, 255, 255, 0.26);
    }

    .select-menu::-webkit-scrollbar-thumb:active {
        background-color: rgba(255, 255, 255, 0.34);
    }

    @keyframes menuIn {
        from { opacity: 0; transform: translateY(-4px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .select-group-label {
        display: flex;
        align-items: center;
        gap: 7px;
        margin: 2px 0 3px;
        padding: 6px 9px;
        border-radius: 7px;
        color: rgba(255, 255, 255, 0.85);
        background-color: #0b0b0e;
        background-image: linear-gradient(rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.075));
        box-shadow: 0 1px 0 var(--divider);
        font-size: 0.6rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        line-height: 1.4;
    }

    .select-group-label::before {
        content: '';
        width: 5px;
        height: 5px;
        flex: none;
        border-radius: 50%;
        background: currentColor;
        box-shadow: 0 0 8px currentColor;
    }

    .select-option {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        padding: 7px 9px;
        border: 0;
        border-radius: 7px;
        background: transparent;
        color: rgba(255, 255, 255, 0.7);
        font: inherit;
        font-size: 0.78rem;
        text-align: left;
        cursor: pointer;
        transition: background 0.12s ease, color 0.12s ease;
    }

    .select-option:hover,
    .select-option.is-active,
    .select-option:focus-visible {
        outline: none;
        background: rgba(255, 255, 255, 0.06);
        color: #ffffff;
    }

    .select-option[aria-selected="true"] {
        background: rgba(59, 130, 246, 0.12);
        color: #ffffff;
    }

    .select-option .option-check {
        width: 13px;
        height: 13px;
        flex: none;
        color: #93c5fd;
        opacity: 0;
    }

    .select-option[aria-selected="true"] .option-check {
        opacity: 1;
    }

    .select-option .option-main {
        display: flex;
        align-items: center;
        gap: 7px;
        min-width: 0;
    }

    .select-option .option-main > span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .select-option .option-recommended {
        flex: none;
        padding: 1px 6px;
        border: 1px solid rgba(96, 165, 250, 0.32);
        border-radius: 999px;
        background: rgba(59, 130, 246, 0.12);
        color: #93c5fd;
        font-size: 0.6rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .convert-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 46px;
        border-radius: 12px;
        border: 1px solid rgba(59, 130, 246, 0.5);
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        color: #ffffff;
        font-size: 0.88rem;
        font-weight: 500;
        letter-spacing: 0.01em;
        cursor: pointer;
        box-shadow:
            0 8px 24px rgba(37, 99, 235, 0.25),
            0 1px 0 rgba(255, 255, 255, 0.15) inset;
        transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
                    filter 0.25s var(--ease), opacity 0.25s var(--ease);
    }

    .convert-btn svg {
        width: 17px;
        height: 17px;
    }

    .convert-btn:hover:not(:disabled) {
        transform: translateY(-1px);
        filter: brightness(1.06);
        box-shadow:
            0 12px 30px rgba(37, 99, 235, 0.35),
            0 1px 0 rgba(255, 255, 255, 0.18) inset;
    }

    .convert-btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .convert-btn:disabled {
        opacity: 0.38;
        cursor: not-allowed;
        box-shadow: none;
        filter: grayscale(0.3);
    }

    .progress {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 14px;
    }

    .progress > .progress-track {
        position: relative;
        height: 10px;
        border-radius: 999px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)),
            rgba(255, 255, 255, 0.06);
        box-shadow:
            inset 0 1px 3px rgba(0, 0, 0, 0.55),
            0 0 0 1px rgba(96, 165, 250, 0.08);
        overflow: visible;
    }

    .progress > .progress-track > .progress-fill {
        position: relative;
        display: block;
        width: 0;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg,
            #2563eb 0%, #38bdf8 35%, #a78bfa 65%, #38bdf8 100%);
        background-size: 220% 100%;
        box-shadow:
            0 0 8px rgba(56, 189, 248, 0.9),
            0 0 18px rgba(59, 130, 246, 0.65),
            0 0 36px rgba(59, 130, 246, 0.35);
        transition: width 0.22s linear;
        animation:
            progressFlow 2.6s linear infinite,
            progressGlow 1.8s ease-in-out infinite;
        will-change: width;
    }

    .progress > .progress-track > .progress-fill::before {
        content: '';
        position: absolute;
        top: 50%;
        right: -1px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        transform: translate(50%, -50%);
        background: radial-gradient(circle,
            #ffffff 0%, #7dd3fc 35%, rgba(56, 189, 248, 0) 70%);
        filter: blur(1px);
        opacity: 0.95;
        animation: progressHeadPulse 1.1s ease-in-out infinite;
        pointer-events: none;
    }

    .progress > .progress-track > .progress-fill::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(110deg,
            transparent 20%, rgba(255, 255, 255, 0.6) 48%, transparent 76%);
        background-size: 220% 100%;
        animation: progressShine 1.7s linear infinite;
        mix-blend-mode: screen;
        pointer-events: none;
    }

    .progress > .progress-label {
        font-size: 0.72rem;
        letter-spacing: 0.06em;
        color: rgba(186, 230, 253, 0.78);
        text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    }

    .progress-timing {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: -2px;
        font-size: 0.68rem;
        letter-spacing: 0.045em;
        font-variant-numeric: tabular-nums;
        color: rgba(255, 255, 255, 0.42);
    }

    .progress-timing[hidden] {
        display: none;
    }

    .progress-elapsed {
        color: rgba(255, 255, 255, 0.52);
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.08);
    }

    .progress-eta {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        color: rgba(186, 230, 253, 0.82);
        text-shadow: 0 0 9px rgba(56, 189, 248, 0.38);
    }

    .progress-eta::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #38bdf8;
        box-shadow: 0 0 8px rgba(56, 189, 248, 0.9), 0 0 16px rgba(59, 130, 246, 0.5);
        animation: timingPulse 1.2s ease-in-out infinite;
    }

    @keyframes timingPulse {
        0%, 100% { opacity: 0.55; transform: scale(0.85); }
        50% { opacity: 1; transform: scale(1.15); }
    }

    @keyframes progressFlow {
        from { background-position: 0% 50%; }
        to { background-position: 220% 50%; }
    }

    @keyframes progressGlow {
        0%, 100% {
            box-shadow:
                0 0 8px rgba(56, 189, 248, 0.85),
                0 0 18px rgba(59, 130, 246, 0.6),
                0 0 34px rgba(59, 130, 246, 0.3);
        }
        50% {
            box-shadow:
                0 0 12px rgba(125, 211, 252, 1),
                0 0 26px rgba(59, 130, 246, 0.9),
                0 0 52px rgba(59, 130, 246, 0.5);
        }
    }

    @keyframes progressShine {
        from { background-position: 220% 50%; }
        to { background-position: -20% 50%; }
    }

    @keyframes progressHeadPulse {
        0%, 100% { opacity: 0.75; transform: translate(50%, -50%) scale(0.9); }
        50% { opacity: 1; transform: translate(50%, -50%) scale(1.15); }
    }

    .convert-done {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 14px;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(34, 197, 94, 0.25);
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.03) 100%);
        animation: converterIn 0.3s var(--ease);
        cursor: pointer;
    }

    .done-icon {
        display: grid;
        place-items: center;
        width: 30px;
        height: 30px;
        flex-shrink: 0;
        align-self: flex-start;
        border-radius: 50%;
        border: 1px solid rgba(34, 197, 94, 0.35);
        background: rgba(34, 197, 94, 0.15);
        color: #4ade80;
    }

    .done-icon svg {
        width: 16px;
        height: 16px;
    }

    .done-copy {
        display: flex;
        flex: 1;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        text-align: left;
        overflow-wrap: anywhere;
    }

    .done-copy strong {
        font-size: 0.82rem;
        font-weight: 500;
        color: #bbf7d0;
    }

    .done-copy span {
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.45);
    }

    .done-copy .done-size {
        margin-top: 2px;
        font-size: 0.95rem;
        font-weight: 700;
        letter-spacing: 0.015em;
        color: #f0fdf4;
        font-variant-numeric: tabular-nums;
    }

    .done-copy .done-status {
        font-size: 0.66rem;
        color: rgba(255, 255, 255, 0.34);
    }

    .done-save {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex-shrink: 0;
        height: 32px;
        padding: 0 12px;
        border-radius: 9px;
        border: 1px solid rgba(34, 197, 94, 0.35);
        background: rgba(34, 197, 94, 0.12);
        color: #bbf7d0;
        font-family: inherit;
        font-size: 0.72rem;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
    }

    .done-save svg {
        width: 14px;
        height: 14px;
    }

    .done-save:hover:not(:disabled) {
        background: rgba(34, 197, 94, 0.2);
        border-color: rgba(34, 197, 94, 0.55);
        color: #dcfce7;
    }

    .done-save:focus-visible {
        outline: 2px solid rgba(74, 222, 128, 0.6);
        outline-offset: 2px;
    }

    .done-save:disabled {
        opacity: 0.55;
        cursor: default;
    }

    .done-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .done-meta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex-shrink: 0;
        height: 32px;
        padding: 0 12px;
        border-radius: 9px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.72);
        font-family: inherit;
        font-size: 0.72rem;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
    }

    .done-meta svg {
        width: 14px;
        height: 14px;
    }

    .done-meta:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.3);
        color: #ffffff;
    }

    .done-meta:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.45);
        outline-offset: 2px;
    }

    .done-meta:disabled {
        opacity: 0.55;
        cursor: default;
    }

    .metadata-dialog {
        position: fixed;
        inset: 50% auto auto 50%;
        transform: translate(-50%, -50%);
        width: min(680px, calc(100vw - 28px));
        max-height: min(84vh, 820px);
        margin: 0;
        padding: 0;
        overflow: hidden;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: #0b0b0f;
        color: var(--text);
        box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7);
    }

    .metadata-dialog::backdrop {
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .metadata-dialog[open] {
        animation: converterIn 0.22s var(--ease);
    }

    .container-notice-dialog {
        width: min(520px, calc(100vw - 28px));
    }

    /* Container notices get a springy, centred entrance/exit. The transform must
       repeat the dialog's translate(-50%, -50%) or it drifts off-centre while
       animating. */
    .container-notice-dialog[open] {
        animation: containerNoticeDialogIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .container-notice-dialog.is-closing {
        animation: containerNoticeDialogOut 0.22s cubic-bezier(0.4, 0, 1, 1) both;
        pointer-events: none;
    }

    .container-notice-dialog::backdrop {
        animation: containerNoticeBackdropIn 0.3s ease-out both;
    }

    .container-notice-dialog.is-closing::backdrop {
        animation: containerNoticeBackdropOut 0.2s ease-in both;
    }

    .container-notice-body {
        padding: 18px 20px 20px;
        animation: containerNoticeBodyIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    .container-notice-dialog.is-closing .container-notice-body {
        animation: none;
    }

    @keyframes containerNoticeDialogIn {
        from { opacity: 0; transform: translate(-50%, -46%) scale(0.92); }
        to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }

    @keyframes containerNoticeDialogOut {
        from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
        to   { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
    }

    @keyframes containerNoticeBackdropIn {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    @keyframes containerNoticeBackdropOut {
        from { opacity: 1; }
        to   { opacity: 0; }
    }

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

    .container-notice-body p {
        margin: 0 0 20px;
        color: var(--text-dim);
        line-height: 1.6;
    }

    .container-notice-actions {
        display: flex;
        justify-content: flex-end;
    }

    .metadata-head {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        padding: 18px 20px 14px;
        border-bottom: 1px solid var(--divider);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.015) 100%);
    }

    .metadata-head > div {
        flex: 1;
        min-width: 0;
    }

    .metadata-head h2 {
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        color: #f8fafc;
    }

    .metadata-head p {
        margin-top: 4px;
        font-size: 0.7rem;
        color: var(--text-faint);
        overflow-wrap: anywhere;
    }

    .metadata-close {
        display: grid;
        place-items: center;
        width: 30px;
        height: 30px;
        flex-shrink: 0;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.6);
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
        transition: background 0.18s var(--ease), color 0.18s var(--ease);
    }

    .metadata-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }

    .metadata-close:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.45);
        outline-offset: 2px;
    }

    .metadata-body {
        max-height: calc(84vh - 78px);
        padding: 16px 20px 20px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .metadata-section + .metadata-section {
        margin-top: 18px;
    }

    .metadata-section h3 {
        margin-bottom: 8px;
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.42);
    }

    .metadata-grid {
        display: grid;
        grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.075);
        border-radius: 10px;
    }

    .metadata-key,
    .metadata-value {
        padding: 8px 10px;
        border-bottom: 1px solid var(--divider);
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .metadata-key {
        color: rgba(255, 255, 255, 0.38);
        background: rgba(255, 255, 255, 0.025);
    }

    .metadata-value {
        min-width: 0;
        color: rgba(255, 255, 255, 0.82);
        overflow-wrap: anywhere;
    }

    .metadata-grid > .metadata-key:nth-last-child(2),
    .metadata-grid > .metadata-value:last-child {
        border-bottom: 0;
    }

    .metadata-tags {
        display: grid;
        gap: 6px;
    }

    .metadata-tag {
        display: grid;
        grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
        gap: 10px;
        padding: 8px 10px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.035);
    }

    .metadata-tag-key {
        font-size: 0.68rem;
        font-weight: 600;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.48);
        overflow-wrap: anywhere;
    }

    .metadata-tag-value {
        min-width: 0;
        font-size: 0.72rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.8);
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

    .metadata-chapters {
        display: grid;
        gap: 6px;
    }

    .metadata-chapter {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 10px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.035);
        font-size: 0.72rem;
    }

    .metadata-chapter span:first-child {
        min-width: 0;
        color: rgba(255, 255, 255, 0.78);
        overflow-wrap: anywhere;
    }

    .metadata-chapter span:last-child {
        flex-shrink: 0;
        color: rgba(255, 255, 255, 0.35);
        font-variant-numeric: tabular-nums;
    }

    .metadata-empty,
    .metadata-loading {
        padding: 14px 0;
        font-size: 0.74rem;
        color: var(--text-faint);
        text-align: center;
    }

    .metadata-note {
        margin-top: 16px;
        padding-top: 12px;
        border-top: 1px solid var(--divider);
        font-size: 0.68rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.36);
    }

    .converter-note {
        margin-top: 14px;
        text-align: center;
        font-size: 0.68rem;
        letter-spacing: 0.02em;
        color: rgba(255, 255, 255, 0.38);
    }

    .meta-form-grid label {
        display: flex;
        flex-direction: column;
        gap: 4px;
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.7);
    }
    .meta-form-grid input,
    .meta-form-grid textarea {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 8px 10px;
        color: #fff;
        font-family: inherit;
    }
    .meta-cover-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 12px 0;
    }
    .meta-cover-row img {
        width: 96px;
        height: 96px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid var(--border);
        cursor: zoom-in;
    }
    .meta-cover-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 0.78rem;
        color: rgba(255,255,255,0.7);
    }
    .meta-cover-upload {
        cursor: pointer;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 0.78rem;
    }
    .meta-section-title {
        margin-top: 14px;
        font-size: 0.85rem;
        color: rgba(255,255,255,0.8);
    }
    .meta-tag-row {
        display: flex;
        gap: 8px;
        margin-top: 6px;
    }
    .meta-tag-row input {
        flex: 1;
        background: rgba(255,255,255,0.06);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 8px 10px;
        color: #fff;
        font-family: inherit;
    }

    @media (max-width: 560px) {
        .converter-options {
            flex-direction: column;
        }

        .option-group {
            flex: 0 0 auto;
        }

        .quality-slot {
            flex: 0 0 auto;
        }

        .dropzone {
            padding: 24px 16px;
        }

        .converter-sub {
            margin-bottom: 16px;
        }

        .tool-card {
            gap: 12px;
            padding: 15px;
        }

        .tool-card-icon {
            width: 40px;
            height: 40px;
            border-radius: 11px;
        }

        .select {
            height: 42px;
            font-size: 16px; /* prevents iOS auto-zoom on focus */
        }

        .convert-done {
            flex-wrap: wrap;
        }

        .done-actions {
            width: 100%;
            flex-direction: column;
        }

        .done-save,
        .done-meta {
            width: 100%;
        }

        .metadata-dialog {
            width: calc(100vw - 18px);
            max-height: 88vh;
        }

        .metadata-body {
            max-height: calc(88vh - 78px);
            padding: 14px 14px 18px;
        }

        .metadata-head {
            padding: 16px 14px 12px;
        }

        .metadata-grid,
        .metadata-tag {
            grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
        }
    }

    /* ============================================================
       RESPONSIVE
       ============================================================ */

    /* Laptops / small desktops */
    @media (max-width: 1180px) {
        :root {
            --sidebar-w: 224px;
        }
    }

    /* Tablets landscape */
    @media (max-width: 1024px) {
        :root {
            --sidebar-w: 210px;
        }
        .sidebar-header {
            padding: 10px 12px 18px;
        }
        .studio-brand {
            gap: 8px;
            min-height: 58px;
            padding: 8px 10px;
        }
        .studio-brand-emblem {
            width: 30px;
            height: 30px;
            flex-basis: 30px;
        }
        .studio-brand-main {
            font-size: 0.82rem;
        }
        .studio-brand-sub {
            font-size: 0.6rem;
        }
        .studio-brand-tagline {
            font-size: 0.4rem;
            letter-spacing: 0.22em;
        }
        .nav-item {
            padding: 12px 14px;
            font-size: 0.92rem;
        }
    }

    /* Tablets portrait / phones: off-canvas drawer.
       Never wider than the desktop rail's full width, so shrinking or
       minimizing the window cannot bloat the sidebar past 210px. */
    @media (max-width: 768px) {
        .sidebar {
            width: min(var(--sidebar-w), 84vw);
            transform: translateX(-100%);
            box-shadow: 24px 0 60px rgba(0, 0, 0, 0.6);
            padding-top: calc(56px + var(--safe-top));
            border-right: none;
        }

        .sidebar.mobile-open {
            transform: translateX(0);
        }

        /* Drawer is always "expanded", but still width-capped. */
        .sidebar.collapsed {
            width: min(var(--sidebar-w), 84vw);
        }

        .sidebar.collapsed .sidebar-header {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .sidebar.collapsed .nav-item {
            justify-content: flex-start;
            gap: 12px;
            padding: 12px 16px;
        }

        .sidebar.collapsed .nav-item span {
            opacity: 1;
            width: auto;
            pointer-events: auto;
        }

        .sidebar.collapsed .nav-icon {
            margin: 0;
            transform: none;
        }

        .sidebar.collapsed .device-chip {
            justify-content: flex-start;
            gap: 10px;
            padding: 10px 12px;
        }

        .sidebar.collapsed .device-name {
            opacity: 1;
            width: auto;
        }

        .sidebar.collapsed .device-icon {
            margin: 0;
        }

        /* Close (chevron) button sits inside the drawer */
        .sidebar-toggle {
            right: 14px;
            top: calc(14px + var(--safe-top));
            width: 40px;
            height: 40px;
        }

        .mobile-menu-btn {
            display: flex;
        }

        .vertical-line {
            display: none;
        }

        .main-content {
            margin-left: 0;
            padding-top: calc(76px + var(--safe-top));
            padding-left: calc(clamp(20px, 5vw, 40px) + var(--safe-left));
            padding-right: calc(clamp(20px, 5vw, 40px) + var(--safe-right));
            padding-bottom: calc(32px + var(--safe-bottom));
        }

        .sidebar.collapsed ~ .main-content {
            margin-left: 0;
        }

        /* Larger touch targets */
        .nav-item {
            min-height: 52px;
            font-size: 1rem;
        }

        .nav-icon {
            width: 22px;
            height: 22px;
        }
    }

    /* Small phones */
    @media (max-width: 420px) {
        /* Sidebar width stays capped by the 768px drawer rule above. */
        .panel-title {
            font-size: clamp(1.5rem, 8vw, 2rem);
        }
        .panel-desc {
            font-size: 0.95rem;
        }
        .main-content {
            padding-top: calc(72px + var(--safe-top));
        }
    }

    /* Very small phones */
    @media (max-width: 340px) {
        .panel-title {
            font-size: 1.35rem;
        }
        .panel-desc {
            font-size: 0.9rem;
        }
    }

    /* Short landscape phones */
    @media (max-height: 500px) and (orientation: landscape) {
        .sidebar {
            padding-top: calc(16px + var(--safe-top));
        }
        .sidebar-header {
            display: none;
        }
        .sidebar-toggle {
            top: calc(10px + var(--safe-top));
        }
        .nav-item {
            min-height: 44px;
            padding: 8px 14px;
        }
        .main-content {
            padding-top: calc(20px + var(--safe-top));
            align-items: stretch;
        }
        .panel-title {
            font-size: 1.5rem;
        }
        .panel-desc {
            font-size: 0.9rem;
        }
    }

    /* Hover-capable devices only */
    @media (hover: none) {
        .sidebar-toggle:hover,
        .nav-item:hover {
            transform: none;
        }
        .nav-item:hover {
            background: transparent;
            color: var(--text-dim);
        }
    }

    /* Accessibility: reduced motion */
    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.001ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.001ms !important;
            scroll-behavior: auto !important;
        }

        .quality-panel.is-off,
        .quality-slot.is-off {
            transition-delay: 0s !important;
        }

        .bitrate-mode-group.is-off,
        .container-group.is-off,
        .id3-version-group.is-off,
        .opus-option-group.is-off {
            transition-delay: 0s !important;
        }

        .music-profile-group.is-off {
            transition-delay: 0s !important;
        }

        .flac-compression-group.is-off {
            transition-delay: 0s !important;
        }
    }

    /* ============================================================
       CONTENT PAGES — HOME / BLOGS / LIBRARY / SETTINGS
       ============================================================ */
    .main-content {
        justify-content: safe center;
    }

    .tab-panels {
        position: relative;
    }

    /* Only the active panel contributes height; hidden panels are removed
       from the grid so a long homepage cannot stretch the tools page. */
    .tab-panel:not(.active) {
        position: absolute;
        inset: 0;
        overflow: hidden;
    }

    .tab-panels:has(.tab-panel.active[data-panel="home"]),
    .tab-panels:has(.tab-panel.active[data-panel="blogs"]),
    .tab-panels:has(.tab-panel.active[data-panel="library"]),
    .tab-panels:has(.tab-panel.active[data-panel="pulse-kit"]),
    .tab-panels:has(.tab-panel.active[data-panel="contact"]),
    .tab-panels:has(.tab-panel.active[data-panel="settings"]) {
        max-width: 1080px;
    }

    .tab-panel[data-panel="home"],
    .tab-panel[data-panel="blogs"],
    .tab-panel[data-panel="library"],
    .tab-panel[data-panel="pulse-kit"],
    .tab-panel[data-panel="contact"],
    .tab-panel[data-panel="settings"] {
        align-items: flex-start;
        padding: clamp(8px, 2vw, 20px) 0;
    }

    .tab-panel[data-panel="home"] .panel-content,
    .tab-panel[data-panel="blogs"] .panel-content,
    .tab-panel[data-panel="library"] .panel-content,
    .tab-panel[data-panel="pulse-kit"] .panel-content,
    .tab-panel[data-panel="contact"] .panel-content,
    .tab-panel[data-panel="settings"] .panel-content {
        justify-content: flex-start;
        align-items: stretch;
        min-height: auto;
        text-align: left;
        padding: 0;
        width: 100%;
    }

    .page-shell {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: clamp(44px, 6vw, 76px);
    }

    .page-head {
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-width: 760px;
    }

    .page-title {
        font-size: clamp(2rem, 5vw, 3.2rem);
        line-height: 1.08;
        letter-spacing: -0.04em;
        font-weight: 500;
        color: #fff;
    }

    .page-desc {
        color: var(--text-dim);
        font-size: clamp(0.98rem, 2.2vw, 1.08rem);
        line-height: 1.7;
        max-width: 68ch;
    }

    .eyebrow {
        display: inline-block;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: #93c5fd;
    }

    .section {
        display: flex;
        flex-direction: column;
        gap: 22px;
    }

    .section-head {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-width: 760px;
    }

    .section-title {
        font-size: clamp(1.5rem, 3.4vw, 2.15rem);
        line-height: 1.2;
        letter-spacing: -0.03em;
        font-weight: 500;
        color: #fff;
    }

    .section-sub {
        color: var(--text-dim);
        line-height: 1.7;
        max-width: 68ch;
        font-size: 0.98rem;
    }

    /* ---------- Buttons ---------- */
    .btn-primary,
    .btn-ghost {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 12px 18px;
        border-radius: 12px;
        border: 1px solid transparent;
        font-family: inherit;
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        transition: transform 0.22s var(--ease),
                    border-color 0.22s var(--ease),
                    background 0.22s var(--ease),
                    box-shadow 0.22s var(--ease);
    }

    .btn-primary {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: #fff;
        box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 34px rgba(37, 99, 235, 0.38);
    }

    .btn-primary svg,
    .btn-ghost svg {
        width: 17px;
        height: 17px;
    }

    .btn-ghost {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .btn-ghost:hover {
        transform: translateY(-2px);
        border-color: rgba(59, 130, 246, 0.38);
        background: rgba(59, 130, 246, 0.08);
    }

    .btn-primary:focus-visible,
    .btn-ghost:focus-visible,
    .blog-card:focus-visible,
    .footer-links a:focus-visible,
    .footer-links button:focus-visible {
        outline: 2px solid #60a5fa;
        outline-offset: 3px;
    }

    .text-link {
        color: #93c5fd;
        background: none;
        border: 0;
        padding: 0;
        font: inherit;
        cursor: pointer;
        text-decoration: underline;
        text-decoration-color: rgba(147, 197, 253, 0.35);
        text-underline-offset: 2px;
    }

    .text-link:hover {
        color: #fff;
    }

    .tech-body code,
    .article-body code {
        padding: 2px 5px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.07);
        color: #bfdbfe;
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        font-size: 0.86em;
    }

    /* ---------- Hero ---------- */
    .hero {
        display: grid;
        grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
        gap: clamp(28px, 5vw, 64px);
        align-items: center;
        padding-top: clamp(4px, 2vw, 18px);
    }

    .hero-copy {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .hero-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 11px 7px 9px;
        border-radius: 999px;
        border: 1px solid rgba(59, 130, 246, 0.25);
        background: rgba(59, 130, 246, 0.08);
        color: #bfdbfe;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .pulse-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #34d399;
        box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
        animation: dotPulse 2.4s ease-in-out infinite;
    }

    .pulse-dot.amber {
        background: #fbbf24;
        box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.14);
        animation: none;
    }

    @keyframes dotPulse {
        0%, 100% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12); }
        50% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0.03); }
    }

    .hero-title {
        font-size: clamp(2.45rem, 6.4vw, 4.5rem);
        line-height: 0.98;
        letter-spacing: -0.055em;
        font-weight: 600;
        color: #fff;
    }

    .hero-title .grad {
        background: linear-gradient(115deg, #60a5fa 0%, #a78bfa 52%, #34d399 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }

    .hero-sub {
        max-width: 56ch;
        color: rgba(255, 255, 255, 0.62);
        font-size: clamp(0.98rem, 2.1vw, 1.08rem);
        line-height: 1.75;
    }

    .hero-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .hero-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 7px 8px;
        list-style: none;
        padding: 0;
        margin: 2px 0 0;
    }

    .hero-chips li {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.55);
        padding: 5px 9px;
        border-radius: 7px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.025);
    }

    .mini-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #34d399;
    }

    /* ---------- Local engine card ---------- */
    .signal-card {
        position: relative;
        overflow: hidden;
        border-radius: 24px;
        border: 1px solid var(--border);
        background:
            radial-gradient(120% 120% at 12% 0%, rgba(59, 130, 246, 0.2), transparent 56%),
            linear-gradient(160deg, rgba(24, 26, 35, 0.96) 0%, rgba(8, 8, 12, 0.99) 100%);
        box-shadow:
            0 26px 60px rgba(0, 0, 0, 0.5);
        padding: 22px;
    }

    .signal-card::after {
        content: "";
        position: absolute;
        width: 220px;
        height: 220px;
        right: -100px;
        bottom: -130px;
        border-radius: 50%;
        background: rgba(52, 211, 153, 0.09);
        filter: blur(30px);
        pointer-events: none;
    }

    .signal-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .signal-label {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        color: rgba(255, 255, 255, 0.62);
    }

    .signal-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #34d399;
        box-shadow: 0 0 10px rgba(52, 211, 153, 0.85);
    }

    .signal-badge {
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        color: #93c5fd;
        padding: 4px 7px;
        border-radius: 5px;
        border: 1px solid rgba(59, 130, 246, 0.28);
        background: rgba(59, 130, 246, 0.1);
    }

    .waveform {
        display: flex;
        align-items: flex-end;
        gap: 3px;
        height: 108px;
        margin: 26px 0 18px;
    }

    .waveform span {
        flex: 1;
        min-width: 2px;
        height: var(--h, 30%);
        border-radius: 999px;
        background: linear-gradient(to top, rgba(59, 130, 246, 0.24), #60a5fa 65%, #a5f3fc 100%);
        transform-origin: bottom;
        animation: wavePulse 1.9s ease-in-out infinite alternate;
        animation-delay: calc(var(--i, 0) * -0.07s);
        opacity: 0.86;
    }

    @keyframes wavePulse {
        from { transform: scaleY(0.5); opacity: 0.45; }
        to { transform: scaleY(1); opacity: 1; }
    }

    .signal-readout {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        font-size: 0.64rem;
        letter-spacing: 0.09em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.5);
        padding-bottom: 16px;
        border-bottom: 1px solid var(--divider);
    }

    .signal-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 16px;
    }

    .signal-stat {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 10px 11px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.025);
    }

    .signal-stat strong {
        font-size: 1.15rem;
        font-weight: 600;
        color: #fff;
    }

    .signal-stat span {
        font-size: 0.66rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .signal-foot {
        margin-top: 13px;
        font-size: 0.66rem;
        color: rgba(255, 255, 255, 0.5);
        line-height: 1.5;
    }

    /* ---------- Stats ---------- */
    .stat-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .stat-card {
        padding: 18px 18px 16px;
        border-radius: 16px;
        border: 1px solid var(--border);
        background: linear-gradient(160deg, rgba(20, 21, 28, 0.8), rgba(9, 9, 13, 0.9));
    }

    .stat-value {
        display: block;
        font-size: clamp(1.45rem, 3vw, 1.9rem);
        font-weight: 600;
        letter-spacing: -0.03em;
        color: #fff;
        line-height: 1.1;
    }

    .stat-value .unit {
        font-size: 0.7em;
        color: #93c5fd;
        margin-left: 2px;
    }

    .stat-label {
        display: block;
        margin-top: 6px;
        font-size: 0.68rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.52);
    }

    /* ---------- Feature cards ---------- */
    .feature-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .feature-card {
        display: flex;
        flex-direction: column;
        padding: 22px;
        border-radius: 18px;
        border: 1px solid var(--border);
        background: linear-gradient(160deg, rgba(22, 23, 31, 0.72), rgba(9, 9, 13, 0.9));
        transition: transform 0.25s var(--ease),
                    border-color 0.25s var(--ease),
                    box-shadow 0.25s var(--ease);
    }

    .feature-card:hover {
        transform: translateY(-3px);
        border-color: rgba(59, 130, 246, 0.3);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(59, 130, 246, 0.07);
    }

    .feature-icon {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 11px;
        border: 1px solid rgba(59, 130, 246, 0.22);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.05));
        color: #93c5fd;
    }

    .feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .feature-card h3 {
        margin: 16px 0 8px;
        font-size: 1rem;
        font-weight: 600;
        color: #fff;
        letter-spacing: -0.01em;
    }

    .feature-card p {
        font-size: 0.88rem;
        line-height: 1.68;
        color: rgba(255, 255, 255, 0.53);
    }

    /* ---------- Steps ---------- */
    .steps {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        border: 1px solid var(--border);
        border-radius: 20px;
        overflow: hidden;
        background: linear-gradient(160deg, rgba(18, 19, 25, 0.8), rgba(8, 8, 12, 0.9));
    }

    .step {
        position: relative;
        padding: 24px 20px;
        border-right: 1px solid var(--divider);
    }

    .step:last-child {
        border-right: 0;
    }

    .step-num {
        font-size: 0.66rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        color: #93c5fd;
    }

    .step h3 {
        margin: 12px 0 8px;
        font-size: 0.98rem;
        font-weight: 600;
        color: #fff;
    }

    .step p {
        font-size: 0.84rem;
        line-height: 1.65;
        color: rgba(255, 255, 255, 0.5);
    }

    /* ---------- Format groups ---------- */
    .format-groups {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .format-group {
        padding: 20px;
        border-radius: 18px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.022);
    }

    .format-group-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .format-group h3 {
        font-size: 0.92rem;
        font-weight: 600;
        color: #fff;
    }

    .format-count {
        font-size: 0.63rem;
        color: rgba(255, 255, 255, 0.5);
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .format-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
        margin-top: 14px;
    }

    .format-tag {
        font-size: 0.74rem;
        padding: 6px 9px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.03);
        color: rgba(255, 255, 255, 0.72);
        cursor: default;
        transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
    }

    .format-tag:hover {
        border-color: rgba(255, 255, 255, 0.25);
        color: #fff;
    }

    .format-tag.lossless {
        border-color: rgba(52, 211, 153, 0.24);
        color: #a7f3d0;
        background: rgba(52, 211, 153, 0.05);
    }

    .format-tag.lossy {
        border-color: rgba(96, 165, 250, 0.24);
        color: #bfdbfe;
        background: rgba(96, 165, 250, 0.05);
    }

    .format-tag.legacy {
        border-color: rgba(251, 191, 36, 0.22);
        color: #fde68a;
        background: rgba(251, 191, 36, 0.04);
    }

    .format-group p {
        margin-top: 14px;
        font-size: 0.8rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.52);
    }

    /* ---------- Technical details ---------- */
    .tech-list {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .tech-item {
        border: 1px solid var(--border);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.022);
        overflow: hidden;
    }

    .tech-item summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 16px 18px;
        font-size: 0.92rem;
        font-weight: 500;
        color: #fff;
        cursor: pointer;
        list-style: none;
    }

    .tech-item summary::-webkit-details-marker,
    .faq-item summary::-webkit-details-marker {
        display: none;
    }

    .tech-item summary::after {
        content: "+";
        flex-shrink: 0;
        color: #93c5fd;
        font-size: 1.15rem;
        font-weight: 400;
        transition: transform 0.2s var(--ease);
    }

    .tech-item[open] summary::after {
        transform: rotate(45deg);
    }

    .tech-body {
        padding: 0 18px 18px;
        font-size: 0.87rem;
        line-height: 1.75;
        color: rgba(255, 255, 255, 0.55);
    }

    .tech-body p + p {
        margin-top: 10px;
    }

    /* ---------- Privacy band ---------- */
    .privacy-band {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        gap: 28px;
        align-items: center;
        padding: clamp(24px, 4vw, 38px);
        border-radius: 24px;
        border: 1px solid rgba(59, 130, 246, 0.2);
        background:
            radial-gradient(120% 140% at 0% 0%, rgba(59, 130, 246, 0.16), transparent 55%),
            radial-gradient(100% 120% at 100% 100%, rgba(52, 211, 153, 0.08), transparent 55%),
            linear-gradient(160deg, rgba(18, 20, 28, 0.92), rgba(8, 8, 12, 0.98));
    }

    .privacy-band h2 {
        margin: 10px 0 12px;
        font-size: clamp(1.55rem, 3.4vw, 2.15rem);
        line-height: 1.2;
        letter-spacing: -0.03em;
        color: #fff;
        font-weight: 500;
    }

    .privacy-band p {
        font-size: 0.92rem;
        line-height: 1.75;
        color: rgba(255, 255, 255, 0.56);
        max-width: 62ch;
    }

    .privacy-band .btn-ghost {
        margin-top: 18px;
    }

    .privacy-points {
        display: grid;
        gap: 9px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .privacy-points li {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 13px;
        border-radius: 11px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.025);
        font-size: 0.82rem;
        color: rgba(255, 255, 255, 0.65);
    }

    .privacy-points svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        color: #34d399;
    }

    /* ---------- FAQ ---------- */
    .faq-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .faq-item {
        border: 1px solid var(--border);
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.02);
        overflow: hidden;
    }

    .faq-item summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 15px 17px;
        font-size: 0.9rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
        cursor: pointer;
        list-style: none;
    }

    .faq-item summary::after {
        content: "+";
        flex-shrink: 0;
        color: #93c5fd;
        font-size: 1.1rem;
        transition: transform 0.2s var(--ease);
    }

    .faq-item[open] summary::after {
        transform: rotate(45deg);
    }

    .faq-item p {
        padding: 0 17px 16px;
        font-size: 0.86rem;
        line-height: 1.7;
        color: rgba(255, 255, 255, 0.52);
    }

    /* ---------- From the blog ---------- */
    .note-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .note-link {
        display: flex;
        flex-direction: column;
        gap: 9px;
        padding: 22px;
        border-radius: 16px;
        border: 1px solid var(--border);
        background:
            radial-gradient(100% 100% at 0% 0%, rgba(59, 130, 246, 0.07), transparent 55%),
            linear-gradient(160deg, rgba(20, 21, 29, 0.82), rgba(8, 8, 12, 0.96));
        text-decoration: none;
        transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
    }

    .note-link:hover {
        transform: translateY(-3px);
        border-color: rgba(59, 130, 246, 0.32);
    }

    .note-link span {
        font-size: 0.63rem;
        font-weight: 700;
        letter-spacing: 0.13em;
        text-transform: uppercase;
        color: #93c5fd;
    }

    .note-link strong {
        font-size: 1.02rem;
        line-height: 1.35;
        font-weight: 600;
        color: #fff;
    }

    .note-link em {
        margin-top: 6px;
        font-style: normal;
        font-size: 0.8rem;
        font-weight: 600;
        color: #93c5fd;
    }

    /* ---------- CTA band ---------- */
    .cta-band {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: clamp(24px, 4vw, 36px);
        border-radius: 24px;
        border: 1px solid var(--border);
        background:
            radial-gradient(110% 150% at 100% 0%, rgba(59, 130, 246, 0.16), transparent 58%),
            linear-gradient(160deg, rgba(20, 22, 30, 0.9), rgba(8, 8, 12, 0.98));
    }

    .cta-band h2 {
        font-size: clamp(1.35rem, 3vw, 1.75rem);
        line-height: 1.25;
        letter-spacing: -0.02em;
        color: #fff;
        font-weight: 500;
        max-width: 22ch;
    }

    .cta-band p {
        margin-top: 8px;
        font-size: 0.86rem;
        color: rgba(255, 255, 255, 0.52);
    }

    /* ---------- Blog ---------- */
    .blog-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .blog-card {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: clamp(20px, 3vw, 26px);
        border-radius: 20px;
        border: 1px solid var(--border);
        background:
            radial-gradient(100% 100% at 0% 0%, rgba(59, 130, 246, 0.06), transparent 55%),
            linear-gradient(160deg, rgba(20, 21, 29, 0.85), rgba(8, 8, 12, 0.97));
        cursor: pointer;
        text-align: left;
        transition: transform 0.25s var(--ease),
                    border-color 0.25s var(--ease),
                    box-shadow 0.25s var(--ease);
    }

    .blog-card:hover {
        transform: translateY(-4px);
        border-color: rgba(59, 130, 246, 0.32);
        box-shadow: 0 22px 48px rgba(0, 0, 0, 0.48);
    }

    .blog-tag {
        align-self: flex-start;
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.13em;
        text-transform: uppercase;
        padding: 6px 9px;
        border-radius: 999px;
        border: 1px solid rgba(59, 130, 246, 0.24);
        background: rgba(59, 130, 246, 0.1);
        color: #bfdbfe;
    }

    .blog-tag.story {
        border-color: rgba(52, 211, 153, 0.24);
        background: rgba(52, 211, 153, 0.08);
        color: #a7f3d0;
    }

    .blog-title {
        font-size: clamp(1.3rem, 2.7vw, 1.65rem);
        line-height: 1.24;
        letter-spacing: -0.025em;
        font-weight: 600;
        color: #fff;
    }

    .blog-title a {
        color: inherit;
        text-decoration: none;
    }

    .blog-title a::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 20px;
    }

    .blog-card:has(.blog-title a:focus-visible) {
        outline: 2px solid #60a5fa;
        outline-offset: 3px;
    }

    .blog-excerpt {
        font-size: 0.92rem;
        line-height: 1.72;
        color: rgba(255, 255, 255, 0.52);
    }

    .blog-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: auto;
        padding-top: 6px;
        font-size: 0.76rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .blog-read {
        position: relative;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: #93c5fd;
        font-weight: 600;
        text-decoration: none;
    }

    .blog-read svg {
        width: 15px;
        height: 15px;
        transition: transform 0.2s var(--ease);
    }

    .blog-card:hover .blog-read svg {
        transform: translateX(3px);
    }

    .blog-note {
        padding: 18px 20px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.02);
        font-size: 0.84rem;
        line-height: 1.65;
        color: rgba(255, 255, 255, 0.52);
    }

    /* ---------- Article / info dialogs ---------- */
    .article-dialog,
    .info-dialog {
        width: min(780px, calc(100vw - 28px));
        max-height: min(88vh, 920px);
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        background: #0b0b10;
        color: #fff;
        box-shadow: 0 40px 100px rgba(0, 0, 0, 0.75);
        overflow: hidden;
    }

    .article-dialog::backdrop,
    .info-dialog::backdrop {
        background: rgba(0, 0, 0, 0.74);
        backdrop-filter: blur(7px);
    }

    .article-shell,
    .info-shell {
        display: flex;
        flex-direction: column;
        max-height: inherit;
        min-height: 0;
    }

    .article-head,
    .info-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
        padding: 18px 22px 16px;
        border-bottom: 1px solid var(--divider);
        background: rgba(11, 11, 16, 0.94);
        backdrop-filter: blur(12px);
    }

    .article-kicker {
        display: block;
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: #93c5fd;
        margin-bottom: 6px;
    }

    .article-head h2,
    .info-head h2 {
        font-size: clamp(1.15rem, 2.6vw, 1.45rem);
        line-height: 1.25;
        letter-spacing: -0.02em;
        font-weight: 600;
        color: #fff;
    }

    .article-close,
    .info-close {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        border-radius: 9px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.7);
        font-size: 1.2rem;
        line-height: 1;
        cursor: pointer;
        transition: background 0.2s var(--ease), color 0.2s var(--ease);
    }

    .article-close:hover,
    .info-close:hover {
        background: rgba(255, 255, 255, 0.09);
        color: #fff;
    }

    .article-progress {
        height: 2px;
        background: rgba(255, 255, 255, 0.07);
        flex-shrink: 0;
    }

    .article-progress span {
        display: block;
        height: 100%;
        width: 0;
        background: linear-gradient(90deg, #3b82f6, #34d399);
        transition: width 0.1s linear;
    }

    .article-scroll,
    .info-scroll {
        overflow-y: auto;
        padding: 26px 26px 36px;
        overscroll-behavior: contain;
    }

    .info-scroll {
        padding-top: 22px;
    }

    .article-meta-line {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 14px;
        margin-bottom: 22px;
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.5);
    }

    .article-body {
        max-width: 64ch;
        margin: 0 auto;
        font-size: 1.01rem;
        line-height: 1.86;
        color: rgba(255, 255, 255, 0.76);
    }

    .article-body p + p {
        margin-top: 16px;
    }

    .article-body h2 {
        margin: 30px 0 10px;
        font-size: 1.32rem;
        line-height: 1.3;
        letter-spacing: -0.02em;
        color: #fff;
        font-weight: 600;
    }

    .article-body h3 {
        margin: 24px 0 8px;
        font-size: 1.06rem;
        color: #fff;
        font-weight: 600;
    }

    .article-body strong {
        color: rgba(255, 255, 255, 0.94);
        font-weight: 600;
    }

    .article-body a {
        color: #93c5fd;
        text-decoration: underline;
        text-decoration-color: rgba(147, 197, 253, 0.35);
        text-underline-offset: 3px;
    }

    .article-body ul,
    .article-body ol {
        margin: 16px 0;
        padding-left: 22px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .article-body blockquote {
        margin: 24px 0;
        padding: 16px 20px;
        border-left: 3px solid #3b82f6;
        border-radius: 0 12px 12px 0;
        background: rgba(59, 130, 246, 0.08);
        color: #dbeafe;
        font-style: italic;
    }

    .article-end {
        max-width: 64ch;
        margin: 34px auto 0;
        padding-top: 22px;
        border-top: 1px solid var(--divider);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .article-end p {
        font-size: 0.86rem;
        line-height: 1.65;
        color: rgba(255, 255, 255, 0.52);
    }

    .article-end .btn-ghost {
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    /* ---------- Converter guide dialog ---------- */
    .converter-guide-dialog {
        position: fixed;
        inset: 50% auto auto 50%;
        transform: translate(-50%, -50%);
        width: min(660px, calc(100vw - 28px));
        max-height: min(88vh, 820px);
        margin: 0;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 22px;
        background:
            radial-gradient(120% 150% at 12% 0%, rgba(59, 130, 246, 0.16), transparent 45%),
            radial-gradient(110% 130% at 100% 100%, rgba(14, 165, 233, 0.08), transparent 52%),
            #0b0b10;
        color: #ffffff;
        box-shadow: 0 42px 110px rgba(0, 0, 0, 0.8);
        overflow: hidden;
    }

    .converter-guide-dialog::backdrop {
        background: rgba(0, 0, 0, 0.74);
        backdrop-filter: blur(8px);
    }

    .converter-guide-dialog[open] {
        animation: guideDialogIn 0.22s var(--ease);
    }

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

    .guide-shell {
        display: flex;
        flex-direction: column;
        max-height: inherit;
        min-height: 0;
    }

    .guide-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
        padding: 19px 22px 15px;
        border-bottom: 1px solid var(--divider);
        background: rgba(11, 11, 16, 0.72);
        backdrop-filter: blur(14px);
    }

    .guide-kicker {
        display: block;
        margin-bottom: 6px;
        color: #93c5fd;
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
    }

    .guide-head h2 {
        margin: 0;
        color: #ffffff;
        font-size: clamp(1.12rem, 2.7vw, 1.38rem);
        font-weight: 600;
        letter-spacing: -0.02em;
        line-height: 1.25;
    }

    .guide-close {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        border-radius: 9px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.7);
        font-size: 1.2rem;
        line-height: 1;
        cursor: pointer;
        transition: background 0.2s var(--ease), color 0.2s var(--ease),
                    border-color 0.2s var(--ease);
    }

    .guide-close:hover {
        background: rgba(255, 255, 255, 0.09);
        border-color: var(--border);
        color: #ffffff;
    }

    .guide-body {
        min-height: 0;
        overflow-y: auto;
        padding: 22px 24px 18px;
        overscroll-behavior: contain;
    }

    .guide-slide {
        display: none;
    }

    .guide-slide.is-active {
        display: block;
        animation: guideSlideIn 0.28s var(--ease);
    }

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

    .guide-visual {
        display: grid;
        place-items: center;
        width: 54px;
        height: 54px;
        margin-bottom: 16px;
        border-radius: 16px;
        border: 1px solid rgba(96, 165, 250, 0.28);
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(14, 165, 233, 0.08));
        color: #bfdbfe;
        box-shadow: 0 0 24px rgba(37, 99, 235, 0.18) inset;
    }

    .guide-visual svg {
        width: 27px;
        height: 27px;
    }

    .guide-slide h3 {
        margin: 0 0 8px;
        color: #ffffff;
        font-size: clamp(1.08rem, 2.5vw, 1.28rem);
        font-weight: 600;
        letter-spacing: -0.02em;
        line-height: 1.3;
    }

    .guide-slide > p {
        margin: 0 0 15px;
        color: rgba(255, 255, 255, 0.58);
        font-size: 0.87rem;
        line-height: 1.65;
    }

    .guide-list {
        display: grid;
        gap: 9px;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .guide-list li {
        position: relative;
        padding-left: 15px;
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.82rem;
        line-height: 1.58;
    }

    .guide-list li::before {
        content: '';
        position: absolute;
        left: 0;
        top: 7px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #38bdf8;
        box-shadow: 0 0 9px rgba(56, 189, 248, 0.75);
    }

    .guide-list strong {
        color: #e0f2fe;
        font-weight: 600;
    }

    .guide-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 14px 22px 18px;
        border-top: 1px solid var(--divider);
        background: rgba(11, 11, 16, 0.82);
        backdrop-filter: blur(14px);
    }

    .guide-dots {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 22px;
    }

    .guide-dot {
        width: 7px;
        height: 7px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.16);
        cursor: pointer;
        transition: width 0.2s var(--ease), background 0.2s var(--ease),
                    box-shadow 0.2s var(--ease);
    }

    .guide-dot:hover {
        background: rgba(255, 255, 255, 0.32);
    }

    .guide-dot.is-active {
        width: 22px;
        background: linear-gradient(90deg, #38bdf8, #60a5fa);
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    }

    .guide-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .guide-back,
    .guide-next {
        min-height: 36px;
        padding: 0 14px;
        border-radius: 10px;
        font-size: 0.76rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        cursor: pointer;
        transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
                    color 0.2s var(--ease), box-shadow 0.2s var(--ease),
                    transform 0.2s var(--ease);
    }

    .guide-back {
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.035);
        color: rgba(255, 255, 255, 0.64);
    }

    .guide-back:hover {
        border-color: var(--border);
        background: rgba(255, 255, 255, 0.07);
        color: #ffffff;
    }

    .guide-next {
        border: 1px solid rgba(96, 165, 250, 0.45);
        background: linear-gradient(135deg, #2563eb, #0ea5e9);
        color: #ffffff;
        box-shadow: 0 8px 22px rgba(37, 99, 235, 0.3);
    }

    .guide-next:hover {
        background: linear-gradient(135deg, #3b82f6, #38bdf8);
        box-shadow: 0 10px 26px rgba(56, 189, 248, 0.38);
    }

    .guide-back:active,
    .guide-next:active {
        transform: scale(0.97);
    }

    .guide-back[hidden] {
        display: none;
    }

    @media (max-width: 560px) {
        .guide-body {
            padding: 18px 17px 14px;
        }

        .guide-head,
        .guide-foot {
            padding-left: 17px;
            padding-right: 17px;
        }
    }

    /* ---------- Library ---------- */
    .ongoing-banner {
        position: relative;
        overflow: hidden;
        padding: clamp(24px, 4.5vw, 42px);
        border-radius: 24px;
        border: 1px solid rgba(251, 191, 36, 0.18);
        background:
            radial-gradient(110% 140% at 100% 0%, rgba(251, 191, 36, 0.1), transparent 55%),
            radial-gradient(100% 130% at 0% 100%, rgba(59, 130, 246, 0.1), transparent 55%),
            linear-gradient(160deg, rgba(20, 20, 26, 0.92), rgba(8, 8, 12, 0.98));
    }

    .ongoing-badge {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 7px 11px;
        border-radius: 999px;
        border: 1px solid rgba(251, 191, 36, 0.28);
        background: rgba(251, 191, 36, 0.07);
        color: #fde68a;
        font-size: 0.65rem;
        font-weight: 700;
        letter-spacing: 0.15em;
        text-transform: uppercase;
    }

    .ongoing-banner h2 {
        margin: 16px 0 10px;
        font-size: clamp(1.6rem, 3.8vw, 2.4rem);
        line-height: 1.16;
        letter-spacing: -0.035em;
        font-weight: 500;
        color: #fff;
        max-width: 20ch;
    }

    .ongoing-banner > p {
        max-width: 66ch;
        font-size: 0.94rem;
        line-height: 1.75;
        color: rgba(255, 255, 255, 0.52);
    }

    .progress-list {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin-top: 26px;
        max-width: 620px;
    }

    .progress-row {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr) 40px;
        gap: 12px;
        align-items: center;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.6);
    }

    .progress-row strong {
        font-weight: 500;
    }

    .progress-track {
        height: 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.07);
        overflow: hidden;
    }

    .progress-fill {
        height: 100%;
        width: var(--w, 0%);
        border-radius: inherit;
        background: linear-gradient(90deg, #3b82f6, #34d399);
        animation: growBar 1.4s var(--ease) both;
    }

    @keyframes growBar {
        from { width: 0; }
        to { width: var(--w, 0%); }
    }

    .progress-row em {
        font-style: normal;
        font-size: 0.72rem;
        color: rgba(255, 255, 255, 0.38);
        text-align: right;
    }

    .library-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .library-card {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 20px;
        border-radius: 16px;
        border: 1px dashed var(--border);
        background: rgba(255, 255, 255, 0.018);
    }

    .library-card .status {
        align-self: flex-start;
        font-size: 0.6rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #fde68a;
        padding: 4px 7px;
        border-radius: 5px;
        background: rgba(251, 191, 36, 0.08);
        border: 1px solid rgba(251, 191, 36, 0.18);
    }

    .library-card h3 {
        font-size: 0.95rem;
        line-height: 1.35;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.9);
    }

    .library-card p {
        font-size: 0.82rem;
        line-height: 1.62;
        color: rgba(255, 255, 255, 0.52);
    }

    .page-note {
        font-size: 0.8rem;
        line-height: 1.65;
        color: rgba(255, 255, 255, 0.5);
        max-width: 70ch;
    }

    /* ---------- Settings ---------- */
    /* Center the whole Settings column (header, cards, note) inside the
       workspace to the right of the sidebar. The wrapper is capped and
       auto-centered, so it stays evenly in the middle whether the sidebar
       is expanded or collapsed. Internal text stays left-aligned. */
    .tab-panel[data-panel="settings"] .settings-shell {
        max-width: 780px;
        margin-left: auto;
        margin-right: auto;
    }

    .settings-stack {
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-width: 780px;
    }

    .settings-card {
        border: 1px solid var(--border);
        border-radius: 18px;
        background: linear-gradient(160deg, rgba(20, 21, 29, 0.82), rgba(8, 8, 12, 0.96));
        overflow: hidden;
    }

    .settings-heading {
        padding: 16px 20px;
        border-bottom: 1px solid var(--divider);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.42);
    }

    .setting-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: 17px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    }

    .setting-row:last-child {
        border-bottom: 0;
    }

    /* Early Access Mode removes the whole Remember last tab row. Early Access
       Mode then becomes the last row, so the rule above keeps one even divider
       between it and Reduce motion with no trailing border. The pre-paint
       attribute comes from site-config.js, so the row never flashes on load. */
    html[data-early-access="1"] .remember-tab-row {
        display: none;
    }

    .setting-copy h3 {
        font-size: 0.94rem;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 4px;
    }

    .setting-copy p {
        font-size: 0.82rem;
        line-height: 1.55;
        color: rgba(255, 255, 255, 0.52);
        max-width: 56ch;
    }

    /* ---------- Settings lever switches ---------- */
    .setting-switch {
        --lever-width: 56px;
        --lever-height: 38px;
        position: relative;
        flex: 0 0 auto;
        width: var(--lever-width);
        height: var(--lever-height);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .setting-switch input {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        opacity: 0;
        cursor: pointer;
        z-index: 3;
    }

    .setting-switch-track {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 21px;
        border-radius: 9px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 42%, rgba(0, 0, 0, 0.18)),
            linear-gradient(180deg, #30343c, #15171c);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.14),
            inset 0 -2px 4px rgba(0, 0, 0, 0.55),
            0 2px 6px rgba(0, 0, 0, 0.35);
        transition:
            border-color 0.3s var(--ease),
            box-shadow 0.3s var(--ease);
    }

    .setting-switch-track::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 32px;
        height: 7px;
        transform: translate(-50%, -50%);
        border-radius: 999px;
        background: #090b0e;
        box-shadow:
            inset 0 1px 3px rgba(0, 0, 0, 0.9),
            0 1px 0 rgba(255, 255, 255, 0.05);
        transition: box-shadow 0.3s var(--ease);
    }

    .setting-switch-lever {
        position: absolute;
        left: 50%;
        bottom: 10px;
        width: 9px;
        height: 23px;
        margin-left: -4.5px;
        border-radius: 6px 6px 4px 4px;
        background: linear-gradient(90deg, #8e97a6, #eef2f8 42%, #a8b1bf);
        box-shadow:
            0 2px 4px rgba(0, 0, 0, 0.5),
            inset 0 -1px 1px rgba(0, 0, 0, 0.25);
        transform-origin: 50% calc(100% + 4px);
        transform: rotate(-24deg);
        transition:
            transform 0.38s cubic-bezier(0.34, 1.08, 0.64, 1),
            background 0.3s var(--ease),
            box-shadow 0.3s var(--ease);
    }

    .setting-switch-lever::after {
        content: "";
        position: absolute;
        left: 50%;
        top: -10px;
        width: 20px;
        height: 20px;
        margin-left: -10px;
        border-radius: 50%;
        background: radial-gradient(circle at 34% 26%, #ffffff 0%, #dfe5ee 34%, #97a2b2 72%, #6b7585 100%);
        box-shadow:
            0 2px 5px rgba(0, 0, 0, 0.45),
            inset 0 0 0 1px rgba(255, 255, 255, 0.28),
            inset 0 -2px 3px rgba(0, 0, 0, 0.18);
        transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
        z-index: 1;
    }

    /* ON / OFF lettering sits on the lever knob and stays upright while the
       lever tilts. */
    .setting-switch-state {
        position: absolute;
        left: 50%;
        top: -10px;
        width: 20px;
        height: 20px;
        margin-left: -10px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 7px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: -0.01em;
        pointer-events: none;
        opacity: 0;
        z-index: 2;
        transform: rotate(24deg);
        transition:
            opacity 0.2s var(--ease),
            color 0.3s var(--ease),
            transform 0.38s cubic-bezier(0.34, 1.08, 0.64, 1);
    }

    .setting-switch-state-off {
        color: #b91c1c;
        opacity: 1;
    }

    .setting-switch-state-on {
        color: #15803d;
        opacity: 0;
    }

    /* On: the lever settles to the right and the metal picks up a green
       "live" accent that matches the ON lettering. */
    .setting-switch input:checked + .setting-switch-track {
        border-color: rgba(74, 222, 128, 0.45);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.16),
            inset 0 -2px 4px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(34, 197, 94, 0.14),
            0 4px 14px rgba(22, 163, 74, 0.26);
    }

    .setting-switch input:checked + .setting-switch-track::before {
        box-shadow:
            inset 0 1px 3px rgba(0, 0, 0, 0.9),
            0 0 10px rgba(34, 197, 94, 0.5),
            0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .setting-switch input:checked + .setting-switch-track .setting-switch-lever {
        transform: rotate(24deg);
        background: linear-gradient(90deg, #86b39a, #f1fff5 42%, #a8d4b9);
        box-shadow:
            0 2px 5px rgba(0, 0, 0, 0.45),
            0 0 10px rgba(34, 197, 94, 0.28),
            inset 0 -1px 1px rgba(0, 0, 0, 0.2);
    }

    .setting-switch input:checked + .setting-switch-track .setting-switch-lever::after {
        background: radial-gradient(circle at 34% 26%, #ffffff 0%, #e9fbef 36%, #b7e6c5 72%, #7cc99a 100%);
        box-shadow:
            0 2px 6px rgba(0, 0, 0, 0.4),
            0 0 10px rgba(34, 197, 94, 0.38),
            inset 0 0 0 1px rgba(255, 255, 255, 0.35),
            inset 0 -2px 3px rgba(0, 0, 0, 0.15);
    }

    .setting-switch input:checked + .setting-switch-track .setting-switch-state {
        transform: rotate(-24deg);
    }

    .setting-switch input:checked + .setting-switch-track .setting-switch-state-off {
        opacity: 0;
    }

    .setting-switch input:checked + .setting-switch-track .setting-switch-state-on {
        opacity: 1;
    }

    .setting-switch:hover .setting-switch-track {
        border-color: rgba(255, 255, 255, 0.24);
    }

    .setting-switch:hover input:checked + .setting-switch-track {
        border-color: rgba(134, 239, 172, 0.7);
    }

    /* Pressing brightens the handle, like light catching a real switch. */
    .setting-switch:active .setting-switch-lever {
        transition-duration: 0.12s;
        filter: brightness(1.08);
    }

    .setting-switch input:focus-visible + .setting-switch-track {
        outline: 2px solid rgba(147, 197, 253, 0.8);
        outline-offset: 5px;
    }

    .setting-switch input:disabled + .setting-switch-track {
        opacity: 0.45;
    }

    .setting-switch input:disabled {
        cursor: not-allowed;
    }

    @media (prefers-reduced-motion: reduce) {
        .setting-switch-track,
        .setting-switch-track::before,
        .setting-switch-lever,
        .setting-switch-lever::after,
        .setting-switch-state {
            transition-duration: 0.001ms;
        }
    }

    /* The lever is the direct feedback for this preference, so it keeps its
       short transition even after Reduce motion switches the rest of the
       interface to instant changes. */
    html.reduce-motion .setting-switch-track,
    html.reduce-motion .setting-switch-track::before,
    html.reduce-motion .setting-switch-lever,
    html.reduce-motion .setting-switch-lever::after,
    html.reduce-motion .setting-switch-state {
        transition-duration: 0.3s !important;
    }

    .settings-note {
        padding: 16px 18px;
        border-radius: 13px;
        border: 1px solid rgba(52, 211, 153, 0.15);
        background: rgba(52, 211, 153, 0.04);
        font-size: 0.82rem;
        line-height: 1.65;
        color: rgba(255, 255, 255, 0.55);
        max-width: 780px;
    }

    /* ---------- Footer ---------- */
    .site-footer {
        width: 100%;
        max-width: 1080px;
        margin: clamp(44px, 7vw, 82px) auto 0;
        padding-top: 26px;
        border-top: 1px solid var(--divider);
        display: flex;
        flex-direction: column;
        gap: 18px;
        text-align: left;
    }

    .footer-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 28px;
        flex-wrap: wrap;
    }

    .footer-brand strong {
        font-size: 0.98rem;
        font-weight: 600;
        color: #fff;
    }

    .footer-brand p {
        margin-top: 7px;
        max-width: 38ch;
        font-size: 0.8rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.5);
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        align-items: flex-start;
        justify-content: flex-end;
    }

    .footer-links a,
    .footer-links button {
        padding: 6px 9px;
        border: 0;
        border-radius: 7px;
        background: transparent;
        color: rgba(255, 255, 255, 0.5);
        font-family: inherit;
        font-size: 0.8rem;
        cursor: pointer;
        transition: color 0.2s var(--ease), background 0.2s var(--ease);
    }

    .footer-links a:hover,
    .footer-links button:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

    /* Desktop footer: reserve room for the full copyright string so
       "reserved." cannot wrap, while the utility links keep the same row. */
    @media (min-width: 981px) {
        .site-footer .footer-top {
            flex-wrap: nowrap;
        }
        .site-footer .footer-brand {
            flex: 0 0 auto;
            min-width: max-content;
        }
        .site-footer .footer-brand p {
            max-width: none;
            white-space: nowrap;
        }
        .site-footer .footer-links {
            flex: 0 1 auto;
            min-width: 0;
        }
    }

    .footer-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        flex-wrap: wrap;
        padding-top: 14px;
        border-top: 1px solid var(--divider);
        font-size: 0.73rem;
        color: rgba(255, 255, 255, 0.5);
    }

    /* ---------- Ad slots ---------- */
    .ad-slot {
        display: block;
        padding: 14px;
        border: 1px dashed var(--border);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.015);
        text-align: center;
    }

    .ad-slot[hidden] {
        display: none;
    }

    .ad-label {
        display: block;
        margin-bottom: 8px;
        font-size: 0.6rem;
        letter-spacing: 0.17em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.5);
    }

    .ad-slot ins {
        display: block;
        min-height: 90px;
    }

    /* Home page video banner: reserved, honestly labelled space. */
    .home-video-ad {
        padding: 12px 14px;
        border: 1px solid var(--border);
        background: linear-gradient(160deg, rgba(20, 21, 28, 0.8), rgba(9, 9, 13, 0.9));
    }

    .home-video-ad .ad-label {
        color: #aebfca;
    }

    .home-video-ad .ad-reserve {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: clamp(140px, 18vw, 220px);
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 10px;
        background: rgba(174, 191, 202, 0.035);
    }

    .home-video-ad .ad-placeholder {
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        font-size: 0.68rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgba(174, 191, 202, 0.42);
        pointer-events: none;
    }

    .home-video-ad .ad-reserve ins {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    /* ---------- Consent banner ---------- */
    .consent-banner {
        position: fixed;
        left: 50%;
        bottom: max(18px, env(safe-area-inset-bottom));
        transform: translateX(-50%);
        z-index: 140;
        width: min(920px, calc(100vw - 32px));
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 24px;
        padding: 18px 20px;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(12, 13, 20, 0.96);
        backdrop-filter: blur(20px);
        box-shadow:
            0 24px 70px rgba(0, 0, 0, 0.72),
            0 1px 0 rgba(255, 255, 255, 0.04) inset;
    }

    .consent-banner[hidden] {
        display: none;
    }

    .consent-copy {
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .consent-copy strong {
        display: block;
        margin-bottom: 6px;
        font-size: 0.98rem;
        line-height: 1.3;
        letter-spacing: -0.01em;
        color: #fff;
    }

    .consent-copy p {
        margin: 0;
        max-width: none;
        font-size: 0.8rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.6);
    }

    .consent-copy a {
        color: #93c5fd;
        text-decoration: underline;
        text-underline-offset: 2px;
    }

    .consent-copy a:hover {
        color: #bfdbfe;
    }

    .consent-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    .consent-actions .btn-primary,
    .consent-actions .btn-ghost {
        padding: 10px 16px;
        font-size: 0.8rem;
        border-radius: 10px;
        white-space: nowrap;
    }

    .consent-actions .btn-primary {
        border-color: rgba(96, 165, 250, 0.55);
        box-shadow: 0 8px 24px rgba(37, 99, 235, 0.34);
    }

    .consent-actions .btn-ghost {
        color: rgba(255, 255, 255, 0.82);
        border-color: rgba(255, 255, 255, 0.14);
    }

    .consent-actions .btn-ghost:hover {
        color: #fff;
        border-color: rgba(59, 130, 246, 0.45);
        background: rgba(59, 130, 246, 0.1);
    }

    /* ---------- Motion preference ---------- */
    html.reduce-motion *,
    html.reduce-motion *::before,
    html.reduce-motion *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    @media (prefers-reduced-motion: reduce) {
        .waveform span,
        .pulse-dot {
            animation: none;
        }
    }

    /* ---------- Content responsive ---------- */
    @media (max-width: 980px) {
        .hero {
            grid-template-columns: 1fr;
        }

        .signal-card {
            max-width: 540px;
        }

        .feature-grid,
        .library-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .steps {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .step:nth-child(2) {
            border-right: 0;
        }

        .step:nth-child(-n+2) {
            border-bottom: 1px solid var(--divider);
        }

        .format-groups {
            grid-template-columns: 1fr;
        }

        .privacy-band {
            grid-template-columns: 1fr;
        }

        .blog-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 640px) {
        .stat-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .home-tool-grid {
            grid-template-columns: 1fr;
        }

        .feature-grid,
        .library-grid,
        .steps {
            grid-template-columns: 1fr;
        }

        .step {
            border-right: 0;
            border-bottom: 1px solid var(--divider);
        }

        .step:last-child {
            border-bottom: 0;
        }

        .cta-band {
            flex-direction: column;
            align-items: flex-start;
        }

        .note-links {
            grid-template-columns: 1fr;
        }

        .hero-actions {
            flex-direction: column;
            align-items: stretch;
            width: 100%;
        }

        .hero-actions .btn-primary,
        .hero-actions .btn-ghost {
            width: 100%;
        }

        .progress-row {
            grid-template-columns: 108px minmax(0, 1fr) 36px;
            gap: 9px;
            font-size: 0.74rem;
        }

        .consent-banner {
            flex-direction: column;
            align-items: stretch;
            gap: 14px;
            padding: 16px;
        }

        .consent-actions {
            width: 100%;
            justify-content: stretch;
        }

        .consent-actions .btn-primary,
        .consent-actions .btn-ghost {
            flex: 1;
        }

        .article-scroll,
        .info-scroll {
            padding: 20px 18px 30px;
        }

        .article-head,
        .info-head {
            padding: 14px 16px;
        }

        .article-body {
            font-size: 0.97rem;
        }

        .setting-row {
            gap: 16px;
            padding: 15px 16px;
        }

        .footer-top {
            flex-direction: column;
        }

        .footer-links {
            justify-content: flex-start;
        }
    }

    /* ============================================================
       SIDE-BY-SIDE TAG SYNC & COMPARATOR
       ============================================================ */
    .tag-sync-page {
        max-width: 1040px;
    }

    .sync-privacy-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 10px;
        border-radius: 999px;
        border: 1px solid rgba(52, 211, 153, 0.24);
        background: rgba(52, 211, 153, 0.08);
        color: #6ee7b7;
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .sync-privacy-badge svg {
        width: 12px;
        height: 12px;
    }

    .sync-hero-note {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 18px;
        margin: 0 0 18px;
        padding: 12px 14px;
        border-radius: 12px;
        border: 1px solid rgba(96, 165, 250, 0.14);
        background: rgba(96, 165, 250, 0.045);
        color: rgba(255, 255, 255, 0.5);
        font-size: 0.76rem;
        line-height: 1.55;
    }

    .sync-hero-note strong {
        color: rgba(255, 255, 255, 0.78);
        font-weight: 600;
    }

    .sync-drop-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-bottom: 14px;
    }

    .sync-dropzone {
        position: relative;
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
        gap: 5px;
        min-height: 176px;
        padding: 18px;
        overflow: hidden;
    }

    .sync-dropzone:hover,
    .sync-dropzone.dragover {
        border-color: rgba(59, 130, 246, 0.5);
    }

    .sync-dropzone.is-loaded {
        border-style: solid;
        border-color: rgba(52, 211, 153, 0.24);
        background: linear-gradient(135deg, rgba(52, 211, 153, 0.055) 0%, rgba(255, 255, 255, 0.01) 100%);
    }

    .sync-side-label {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        margin-bottom: 6px;
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.42);
    }

    .sync-side-dot {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
    }

    .sync-dropzone.sync-target .sync-side-dot {
        background: #fbbf24;
        box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
    }

    .sync-dropzone .dropzone-title {
        font-size: 0.9rem;
        line-height: 1.35;
    }

    .sync-dropzone .dropzone-meta {
        max-width: 34ch;
        line-height: 1.5;
    }

    .sync-loaded-file {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
        margin-top: 4px;
        padding-top: 10px;
        border-top: 1px solid var(--divider);
    }

    .sync-loaded-name {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 0.82rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.86);
        word-break: break-word;
    }

    .sync-loaded-name svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        color: #6ee7b7;
    }

    .sync-loaded-meta {
        font-size: 0.7rem;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.4);
    }

    .sync-loaded-format {
        display: inline-flex;
        width: fit-content;
        margin-top: 2px;
        padding: 2px 7px;
        border-radius: 5px;
        border: 1px solid rgba(96, 165, 250, 0.2);
        background: rgba(96, 165, 250, 0.08);
        color: #93c5fd;
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .sync-clear {
        position: absolute;
        top: 10px;
        right: 10px;
        display: grid;
        place-items: center;
        width: 26px;
        height: 26px;
        border-radius: 7px;
        border: 1px solid var(--border);
        background: rgba(0, 0, 0, 0.3);
        color: rgba(255, 255, 255, 0.5);
        font-size: 1rem;
        line-height: 1;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease;
    }

    .sync-clear:hover {
        color: #ffffff;
        background: rgba(248, 113, 113, 0.12);
        border-color: rgba(248, 113, 113, 0.25);
    }

    .sync-sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .sync-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 4px 0 14px;
        padding: 12px 14px;
        border-radius: 13px;
        border: 1px solid var(--border);
        background: linear-gradient(135deg, rgba(23, 24, 30, 0.78) 0%, rgba(11, 11, 15, 0.9) 100%);
    }

    .sync-status {
        flex: 1 1 260px;
        min-width: 0;
        font-size: 0.78rem;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.55);
    }

    .sync-status strong {
        color: rgba(255, 255, 255, 0.85);
        font-weight: 600;
    }

    .sync-status.is-error {
        color: #fca5a5;
    }

    .sync-status.is-warn {
        color: #fcd34d;
    }

    .sync-status.is-success {
        color: #6ee7b7;
    }

    .sync-loaded-file[hidden],
    .sync-clear[hidden] {
        display: none;
    }

    .sync-dropzone.is-loaded .dropzone-title,
    .sync-dropzone.is-loaded .dropzone-hint,
    .sync-dropzone.is-loaded .dropzone-meta {
        display: none;
    }

    .sync-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sync-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 36px;
        padding: 8px 13px;
        border-radius: 9px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.055);
        color: rgba(255, 255, 255, 0.8);
        font-family: inherit;
        font-size: 0.74rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }

    .sync-btn:hover:not(:disabled) {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.09);
        border-color: var(--border);
    }

    .sync-btn:active:not(:disabled) {
        transform: scale(0.98);
    }

    .sync-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .sync-btn-primary {
        border-color: rgba(59, 130, 246, 0.35);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.22) 0%, rgba(59, 130, 246, 0.1) 100%);
        color: #dbeafe;
    }

    .sync-btn-primary:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.32) 0%, rgba(59, 130, 246, 0.16) 100%);
        border-color: rgba(59, 130, 246, 0.5);
    }

    .sync-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 7px 14px;
        margin: 0 0 18px;
        font-size: 0.68rem;
        color: rgba(255, 255, 255, 0.4);
    }

    .sync-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        white-space: nowrap;
    }

    .sync-pill::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.2);
    }

    .sync-pill.match::before { background: #34d399; }
    .sync-pill.diff::before { background: #fbbf24; }
    .sync-pill.missing::before { background: #f87171; }
    .sync-pill.target-only::before { background: #60a5fa; }

    .sync-group {
        margin: 0 0 14px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.018);
        overflow: hidden;
    }

    .sync-group > summary {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 13px 15px;
        cursor: pointer;
        list-style: none;
        user-select: none;
    }

    .sync-group > summary::-webkit-details-marker {
        display: none;
    }

    .sync-group > summary::after {
        content: "";
        width: 8px;
        height: 8px;
        margin-left: auto;
        border-right: 1.5px solid rgba(255, 255, 255, 0.4);
        border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
        transform: rotate(45deg);
        transition: transform 0.2s ease;
    }

    .sync-group[open] > summary::after {
        transform: rotate(-135deg);
    }

    .sync-group-title {
        font-size: 0.82rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.82);
    }

    .sync-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 18px;
        padding: 0 6px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.48);
        font-size: 0.6rem;
        font-weight: 700;
    }

    .sync-group-hint {
        margin-left: 2px;
        font-size: 0.66rem;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.32);
    }

    .sync-table-wrap {
        overflow-x: auto;
        border-top: 1px solid var(--divider);
    }

    .sync-table {
        width: 100%;
        min-width: 760px;
        border-collapse: collapse;
        font-size: 0.74rem;
    }

    .sync-table th {
        padding: 9px 12px;
        text-align: left;
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.32);
        background: rgba(255, 255, 255, 0.018);
        border-bottom: 1px solid var(--divider);
        white-space: nowrap;
    }

    .sync-table td {
        padding: 10px 12px;
        vertical-align: top;
        border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    }

    .sync-table tr:last-child td {
        border-bottom: 0;
    }

    .sync-table tr.is-match td:first-child {
        box-shadow: inset 3px 0 0 #34d399;
    }

    .sync-table tr.is-diff td:first-child {
        box-shadow: inset 3px 0 0 #fbbf24;
    }

    .sync-table tr.is-missing td:first-child {
        box-shadow: inset 3px 0 0 #f87171;
    }

    .sync-table tr.is-target-only td:first-child {
        box-shadow: inset 3px 0 0 #60a5fa;
    }

    .sync-table tr.is-staged {
        background: rgba(52, 211, 153, 0.045);
    }

    .sync-tag-label {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 130px;
    }

    .sync-tag-label strong {
        color: rgba(255, 255, 255, 0.82);
        font-weight: 600;
    }

    .sync-tag-key {
        font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
        font-size: 0.58rem;
        color: rgba(255, 255, 255, 0.26);
        word-break: break-all;
    }

    .sync-value {
        max-width: 260px;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.7);
        word-break: break-word;
        white-space: pre-wrap;
    }

    .sync-value.is-empty {
        color: rgba(255, 255, 255, 0.25);
        font-style: italic;
    }

    .sync-value.is-staged {
        color: #a7f3d0;
    }

    .sync-status-cell {
        white-space: nowrap;
    }

    .sync-status-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 2px 7px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.035);
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.45);
    }

    .sync-status-badge.match {
        border-color: rgba(52, 211, 153, 0.25);
        background: rgba(52, 211, 153, 0.09);
        color: #6ee7b7;
    }

    .sync-status-badge.diff {
        border-color: rgba(251, 191, 36, 0.25);
        background: rgba(251, 191, 36, 0.09);
        color: #fcd34d;
    }

    .sync-status-badge.missing {
        border-color: rgba(248, 113, 113, 0.25);
        background: rgba(248, 113, 113, 0.09);
        color: #fca5a5;
    }

    .sync-status-badge.target-only {
        border-color: rgba(96, 165, 250, 0.25);
        background: rgba(96, 165, 250, 0.09);
        color: #93c5fd;
    }

    .sync-status-badge.staged {
        border-color: rgba(52, 211, 153, 0.35);
        background: rgba(52, 211, 153, 0.13);
        color: #a7f3d0;
    }

    .sync-copy-btn {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 9px;
        border-radius: 7px;
        border: 1px solid rgba(96, 165, 250, 0.25);
        background: rgba(96, 165, 250, 0.08);
        color: #bfdbfe;
        font-family: inherit;
        font-size: 0.64rem;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    .sync-copy-btn:hover {
        background: rgba(96, 165, 250, 0.16);
        border-color: rgba(96, 165, 250, 0.4);
        color: #ffffff;
    }

    .sync-copy-btn.is-staged {
        border-color: rgba(52, 211, 153, 0.3);
        background: rgba(52, 211, 153, 0.1);
        color: #a7f3d0;
    }

    .sync-copy-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

    .sync-cover-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        padding: 14px;
        border-top: 1px solid var(--divider);
        transition: background 0.2s ease, box-shadow 0.2s ease;
    }

    .sync-cover-grid.dragover {
        background: rgba(59, 130, 246, 0.06);
        box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
    }

    .sync-cover-card {
        display: flex;
        gap: 12px;
        min-width: 0;
        padding: 12px;
        border-radius: 11px;
        border: 1px solid var(--border);
        background: rgba(0, 0, 0, 0.16);
    }

    .sync-cover-art {
        display: grid;
        place-items: center;
        width: 78px;
        height: 78px;
        flex-shrink: 0;
        overflow: hidden;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.025);
    }

    .sync-cover-art img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sync-cover-art svg {
        width: 26px;
        height: 26px;
        color: rgba(255, 255, 255, 0.18);
    }

    .sync-cover-body {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
    }

    .sync-cover-label {
        font-size: 0.58rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.32);
    }

    .sync-cover-detail {
        font-size: 0.72rem;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.62);
    }

    .sync-cover-actions {
        margin-top: auto;
        padding-top: 5px;
    }

    .sync-cover-note {
        grid-column: 1 / -1;
        padding: 9px 11px;
        border-radius: 8px;
        border: 1px solid rgba(251, 191, 36, 0.16);
        background: rgba(251, 191, 36, 0.05);
        font-size: 0.68rem;
        line-height: 1.5;
        color: rgba(255, 255, 255, 0.48);
    }

    .sync-empty-state {
        padding: 26px 18px;
        text-align: center;
        border-radius: 13px;
        border: 1px dashed rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.012);
        color: rgba(255, 255, 255, 0.38);
        font-size: 0.78rem;
        line-height: 1.6;
    }

    .sync-empty-state strong {
        display: block;
        margin-bottom: 3px;
        color: rgba(255, 255, 255, 0.7);
        font-weight: 600;
    }

    .sync-ad-slot {
        margin: 52px 0 44px;
    }

    /* Compact photo/display banners on the Tag Sync view. They reuse the dark
       workbench slot shell, reserve a fixed banner height before any creative
       loads, and follow the shared Ads toggle (data-ads-enabled=0 hides every
       .ad-slot). Neighbouring sections keep their own margins, so switching
       Ads OFF closes the slots without collapsing the page. */
    .sync-photo-ad {
        margin: 0 0 18px;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: linear-gradient(160deg, rgba(20, 21, 28, 0.8), rgba(9, 9, 13, 0.9));
        text-align: center;
    }

    .sync-photo-ad .ad-label {
        margin-bottom: 6px;
        font-size: 0.58rem;
        color: #aebfca;
    }

    .sync-photo-ad .ad-reserve {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: clamp(88px, 9vw, 112px);
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 9px;
        background: rgba(174, 191, 202, 0.035);
    }

    .sync-photo-ad .ad-placeholder {
        position: absolute;
        inset: 0;
        display: grid;
        place-items: center;
        font-size: 0.62rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: rgba(174, 191, 202, 0.42);
        pointer-events: none;
    }

    .sync-photo-ad .ad-reserve ins {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .tag-sync-page .converter-note {
        margin-bottom: 18px;
    }

    .sync-editorial {
        max-width: 820px;
        margin: 0 auto;
        padding: 34px 0 8px;
        border-top: 1px solid var(--divider);
    }

    .sync-editorial-kicker {
        display: block;
        margin-bottom: 8px;
        font-size: 0.64rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: #60a5fa;
    }

    .sync-editorial h1 {
        margin: 0 0 14px;
        font-size: clamp(1.55rem, 4vw, 2.1rem);
        font-weight: 400;
        line-height: 1.18;
        letter-spacing: -0.025em;
        color: #ffffff;
    }

    .sync-editorial h2 {
        margin: 34px 0 10px;
        font-size: clamp(1.12rem, 2.6vw, 1.35rem);
        font-weight: 500;
        line-height: 1.3;
        letter-spacing: -0.015em;
        color: rgba(255, 255, 255, 0.92);
    }

    .sync-editorial h3 {
        margin: 22px 0 7px;
        font-size: 0.96rem;
        font-weight: 600;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.84);
    }

    .sync-editorial p,
    .sync-editorial li {
        font-size: 0.9rem;
        line-height: 1.75;
        color: rgba(255, 255, 255, 0.6);
    }

    .sync-editorial p {
        margin: 0 0 14px;
    }

    .sync-editorial ul,
    .sync-editorial ol {
        margin: 0 0 16px;
        padding-left: 1.25rem;
    }

    .sync-editorial li {
        margin-bottom: 7px;
    }

    .sync-editorial strong {
        color: rgba(255, 255, 255, 0.82);
        font-weight: 600;
    }

    .sync-editorial a {
        color: #93c5fd;
        text-underline-offset: 2px;
    }

    .sync-editorial table {
        width: 100%;
        margin: 16px 0 22px;
        border-collapse: collapse;
        font-size: 0.78rem;
        line-height: 1.55;
    }

    .sync-editorial th,
    .sync-editorial td {
        padding: 9px 10px;
        text-align: left;
        vertical-align: top;
        border: 1px solid var(--divider);
    }

    .sync-editorial th {
        background: rgba(255, 255, 255, 0.035);
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.64rem;
        font-weight: 700;
        letter-spacing: 0.07em;
        text-transform: uppercase;
    }

    .sync-editorial td {
        color: rgba(255, 255, 255, 0.58);
    }

    .sync-editorial code {
        padding: 1px 5px;
        border-radius: 4px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.82em;
    }

    .sync-faq {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin: 16px 0 22px;
    }

    .sync-faq details {
        border-radius: 10px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.018);
        overflow: hidden;
    }

    .sync-faq summary {
        padding: 11px 13px;
        cursor: pointer;
        list-style: none;
        font-size: 0.84rem;
        font-weight: 600;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.8);
    }

    .sync-faq summary::-webkit-details-marker {
        display: none;
    }

    .sync-faq summary::after {
        content: "+";
        float: right;
        margin-left: 12px;
        color: #60a5fa;
        font-weight: 400;
    }

    .sync-faq details[open] summary::after {
        content: "\2212";
    }

    .sync-faq details > p {
        margin: 0;
        padding: 0 13px 13px;
        font-size: 0.84rem;
        line-height: 1.7;
        color: rgba(255, 255, 255, 0.56);
    }

    .sync-trust-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 24px 0 0;
        padding-top: 16px;
        border-top: 1px solid var(--divider);
    }

    .sync-trust-links a {
        display: inline-flex;
        align-items: center;
        padding: 5px 9px;
        border-radius: 7px;
        border: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.025);
        color: rgba(255, 255, 255, 0.58);
        font-size: 0.68rem;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s ease, border-color 0.2s ease;
    }

    .sync-trust-links a:hover {
        color: #ffffff;
        border-color: rgba(96, 165, 250, 0.3);
    }

    /* ---------- Converter editorial ---------- */
    /* Reserved video banner between the convert action and the field guide.
       It reuses the Home video-slot shell, but keeps a shorter, stable height
       so the control area never jumps when ads are enabled or disabled. */
    .converter-video-ad {
        margin: 20px 0 0;
    }

    .converter-video-ad .ad-label {
        margin-bottom: 6px;
    }

    .converter-video-ad .ad-reserve {
        min-height: 96px;
    }

    /* Second banner: between the batch-packing table and the folder-metadata
       section. It shares the reserved dark slot shell but stays shorter so
       the editorial flow is not interrupted by a tall creative. */
    .converter-inline-ad {
        margin: 26px 0 8px;
    }

    .converter-inline-ad .ad-label {
        margin-bottom: 6px;
    }

    .converter-inline-ad .ad-reserve {
        min-height: 112px;
    }

    /* Third banner: after the converter FAQ and before the copyright note.
       The following heading keeps its own margin, so Ads OFF leaves a clean
       handoff instead of collapsing the two sections together. */
    .converter-faq-video-ad {
        margin: 26px 0 0;
    }

    .converter-faq-video-ad .ad-label {
        margin-bottom: 6px;
    }

    .converter-faq-video-ad .ad-reserve {
        min-height: 112px;
    }

    /* Metadata Editor video banner: sits between the drop/browse work area and
       the Workbench Guide. The reserved height matches the other converter
       banners, and the guide keeps its own top spacing when Ads is OFF so the
       two sections never collapse together. */
    .metadata-video-ad {
        margin: 22px 0 0;
    }

    .metadata-video-ad .ad-label {
        margin-bottom: 6px;
    }

    .metadata-video-ad .ad-reserve {
        min-height: 112px;
    }

    .meta-editorial {
        margin-top: 22px;
    }

    .converter-ad-slot {
        margin: 50px 0 0;
    }

    .converter-editorial {
        padding-top: 30px;
    }

    .converter-editorial [id] {
        scroll-margin-top: 26px;
    }

    .converter-jump {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
        margin: 0 0 28px;
    }

    .converter-jump a {
        display: inline-flex;
        align-items: center;
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid rgba(96, 165, 250, 0.16);
        background: rgba(96, 165, 250, 0.045);
        color: #93c5fd;
        font-size: 0.68rem;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    }

    .converter-jump a:hover {
        color: #ffffff;
        background: rgba(96, 165, 250, 0.11);
        border-color: rgba(96, 165, 250, 0.32);
    }

    .converter-feature-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 16px 0 24px;
    }

    .converter-feature-card {
        padding: 15px;
        border: 1px solid rgba(255, 255, 255, 0.075);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.018);
        transition: transform 0.2s ease, border-color 0.2s ease,
                    background 0.2s ease, box-shadow 0.2s ease;
    }

    .converter-feature-card:hover {
        transform: translateY(-2px);
        border-color: rgba(96, 165, 250, 0.24);
        background: rgba(96, 165, 250, 0.045);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    }

    .converter-feature-icon {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        margin-bottom: 10px;
        border-radius: 9px;
        border: 1px solid rgba(96, 165, 250, 0.22);
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.06));
        color: #93c5fd;
    }

    .converter-feature-icon svg {
        width: 17px;
        height: 17px;
    }

    .converter-feature-card h3 {
        margin: 0 0 5px;
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.88);
    }

    .converter-feature-card p {
        margin: 0;
        font-size: 0.78rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.55);
    }

    .converter-preset-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin: 16px 0 24px;
    }

    .converter-preset {
        border: 1px solid rgba(255, 255, 255, 0.075);
        border-radius: 11px;
        background: rgba(255, 255, 255, 0.018);
        overflow: hidden;
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    .converter-preset[open] {
        border-color: rgba(96, 165, 250, 0.22);
        background: rgba(96, 165, 250, 0.04);
    }

    .converter-preset summary {
        position: relative;
        padding: 12px 34px 12px 13px;
        cursor: pointer;
        list-style: none;
    }

    .converter-preset summary::-webkit-details-marker {
        display: none;
    }

    .converter-preset summary::after {
        content: "+";
        position: absolute;
        top: 11px;
        right: 13px;
        color: #60a5fa;
        font-size: 0.95rem;
        font-weight: 400;
    }

    .converter-preset[open] summary::after {
        content: "\2212";
    }

    .converter-preset summary span {
        display: block;
        font-size: 0.84rem;
        font-weight: 600;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.82);
    }

    .converter-preset summary small {
        display: block;
        margin-top: 2px;
        font-size: 0.67rem;
        line-height: 1.4;
        color: #93c5fd;
    }

    .converter-preset > p {
        margin: 0;
        padding: 0 13px 13px;
        font-size: 0.78rem;
        line-height: 1.65;
        color: rgba(255, 255, 255, 0.55);
    }

    @media (max-width: 640px) {
        .converter-feature-grid,
        .converter-preset-grid {
            grid-template-columns: 1fr;
        }

        .converter-editorial {
            padding-top: 24px;
        }
    }

    @media (max-width: 760px) {
        .sync-drop-grid,
        .sync-cover-grid {
            grid-template-columns: 1fr;
        }

        .sync-toolbar {
            align-items: stretch;
        }

        .sync-actions {
            flex-direction: column;
        }

        .sync-btn {
            width: 100%;
        }

        .sync-table {
            min-width: 700px;
        }

        .sync-editorial {
            padding-top: 26px;
        }
    }


    /* Multi-page navigation: quiet active state in the footer. */
    .footer-links a[aria-current="page"] {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.05);
    }
