@charset "UTF-8";

/* ============================================================================
 * Private Sun Yat-sen Memorial Hall — Apple Desktop Shell (desktop-shell.css)
 * ============================================================================
 * COMMENTING STANDARDS
 * 1. Block comments only. Inline comments are strictly prohibited.
 * 2. Section dividers use the === banner format.
 * 3. All prose is written in English.
 * ============================================================================ */

/* ============================================================================
 * Section 1: Mobile & Tablet Isolation Guard (Screens <= 768px or Mobile Devices)
 * ============================================================================
 * Completely hides all desktop-specific shell elements on mobile/tablet devices
 * (including iPads, iPhones, and Android) or on screens <= 768px.
 * The mobile UI remains 100% pristine and unaffected.
 * ============================================================================ */
@media (max-width: 768px) {
    .desktop-sidebar,
    .desktop-search-dropdown {
        display: none !important;
    }

    .desktop-stage {
        display: contents !important;
    }
}

html.device-mobile .desktop-sidebar,
html.device-mobile .desktop-search-dropdown,
body.device-mobile .desktop-sidebar,
body.device-mobile .desktop-search-dropdown {
    display: none !important;
}

html.device-mobile .desktop-stage,
body.device-mobile .desktop-stage {
    display: contents !important;
}

html.device-mobile,
html.device-mobile body,
body.device-mobile {
    padding-left: 0 !important;
}

/* ============================================================================
 * Section 2: Desktop Layout & Authentic Apple Sidebar (Screens > 768px on Desktop)
 * ============================================================================ */
@media (min-width: 769px) {
    /* Hide mobile top navigation bar and bottom tab bar strictly on desktop */
    html:not(.device-mobile) .apple-top-nav,
    html:not(.device-mobile) .apple-tab-bar {
        display: none !important;
    }

    /* Fixed Apple Translucent Left Sidebar */
    .desktop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 240px;
        height: 100vh;
        height: 100dvh;
        background: rgba(22, 22, 24, 0.94);
        backdrop-filter: blur(35px) saturate(190%);
        -webkit-backdrop-filter: blur(35px) saturate(190%);
        border-right: 0.5px solid rgba(255, 255, 255, 0.08);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 20px 12px 18px 12px;
        box-sizing: border-box;
        z-index: 30000 !important;
        user-select: none;
        -webkit-user-select: none;
        overflow: visible !important;
    }

    .desktop-sidebar,
    .desktop-sidebar *,
    .desktop-sidebar *::before,
    .desktop-sidebar *::after {
        box-sizing: border-box;
    }

    /* Light Mode Sidebar */
    @media (prefers-color-scheme: light) {
        .desktop-sidebar {
            background: rgba(246, 246, 248, 0.94);
            border-right: 0.5px solid rgba(0, 0, 0, 0.08);
        }
    }

    /* Sidebar Top Container */
    .desktop-sidebar-top {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 14px;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .desktop-sidebar-top::-webkit-scrollbar {
        width: 3px;
    }

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

    @media (prefers-color-scheme: light) {
        .desktop-sidebar-top::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.15);
        }
    }

    /* Apple-Style Brand Header */
    .desktop-sidebar-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: #ffffff;
        padding: 4px 8px 10px 8px;
        border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    }

    @media (prefers-color-scheme: light) {
        .desktop-sidebar-brand {
            color: #1c1c1e;
            border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
        }
    }

    .desktop-sidebar-brand-icon {
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    .desktop-sidebar-brand-text {
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang TC", "PingFang SC", sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: -0.2px;
    }

    /* Apple-Style Search Box */
    .desktop-search-box {
        position: relative;
        width: 100%;
        padding: 0 4px;
        box-sizing: border-box;
    }

    .desktop-search-input-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .desktop-search-input-wrapper svg {
        position: absolute;
        left: 10px;
        width: 14px;
        height: 14px;
        stroke: rgba(255, 255, 255, 0.4);
        fill: none;
        pointer-events: none;
    }

    @media (prefers-color-scheme: light) {
        .desktop-search-input-wrapper svg {
            stroke: rgba(0, 0, 0, 0.4);
        }
    }

    .desktop-search-input {
        width: 100%;
        height: 30px;
        padding: 0 10px 0 30px;
        font-size: 12.5px;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", sans-serif;
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
        border: none;
        border-radius: 7px;
        outline: none;
        box-sizing: border-box;
        transition: all 0.2s ease;
    }

    @media (prefers-color-scheme: light) {
        .desktop-search-input {
            color: #1c1c1e;
            background: rgba(0, 0, 0, 0.06);
        }
    }

    .desktop-search-input:focus {
        background: rgba(255, 255, 255, 0.14);
        box-shadow: 0 0 0 2px #fa586a;
    }

    @media (prefers-color-scheme: light) {
        .desktop-search-input:focus {
            background: #ffffff;
            box-shadow: 0 0 0 2px #fa586a;
        }
    }

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

    @media (prefers-color-scheme: light) {
        .desktop-search-input::placeholder {
            color: rgba(0, 0, 0, 0.35);
        }
    }

    /* Floating Search Dropdown */
    .desktop-search-dropdown {
        position: absolute;
        top: 36px;
        left: 4px;
        right: 4px;
        max-height: 320px;
        overflow-y: auto;
        background: rgba(30, 30, 32, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border: 0.5px solid rgba(255, 255, 255, 0.12);
        border-radius: 10px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
        z-index: 10001;
        display: none;
        padding: 6px;
        box-sizing: border-box;
    }

    @media (prefers-color-scheme: light) {
        .desktop-search-dropdown {
            background: rgba(255, 255, 255, 0.98);
            border: 0.5px solid rgba(0, 0, 0, 0.12);
            box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
        }
    }

    .desktop-search-dropdown.active {
        display: block;
    }

    .desktop-search-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 10px;
        border-radius: 6px;
        text-decoration: none;
        color: #ffffff;
        font-size: 13px;
        transition: background 0.15s ease;
    }

    @media (prefers-color-scheme: light) {
        .desktop-search-item {
            color: #1c1c1e;
        }
    }

    .desktop-search-item:hover,
    .desktop-search-item.highlighted {
        background: rgba(250, 88, 106, 0.2);
    }

    .desktop-search-item-badge {
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.1);
        color: #aaaaaa;
        margin-left: auto;
    }

    @media (prefers-color-scheme: light) {
        .desktop-search-item-badge {
            background: rgba(0, 0, 0, 0.06);
            color: #666666;
        }
    }

    .desktop-search-empty {
        padding: 12px;
        text-align: center;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.4);
    }

    /* Sidebar Navigation Sections */
    .desktop-nav-section {
        display: flex;
        flex-direction: column;
        gap: 1px;
    }

    .desktop-nav-header {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.35);
        padding: 10px 10px 4px 10px;
    }

    @media (prefers-color-scheme: light) {
        .desktop-nav-header {
            color: rgba(0, 0, 0, 0.38);
        }
    }

    /* Authentic Apple Music Capsule Nav Items */
    .desktop-nav-item {
        position: relative;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 7px 10px 7px 14px;
        border-radius: 7px;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.8);
        font-size: 13.5px;
        font-weight: 500;
        transition: background 0.15s ease, color 0.15s ease;
    }

    @media (prefers-color-scheme: light) {
        .desktop-nav-item {
            color: rgba(0, 0, 0, 0.8);
        }
    }

    .desktop-nav-item svg {
        width: 17px;
        height: 17px;
        fill: currentColor;
        flex-shrink: 0;
    }

    .desktop-nav-item:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #ffffff;
    }

    @media (prefers-color-scheme: light) {
        .desktop-nav-item:hover {
            background: rgba(0, 0, 0, 0.05);
            color: #000000;
        }
    }

    /* Apple Music Selected State: Red vertical bar + Deeper neutral background */
    .desktop-nav-item.active {
        background: rgba(255, 255, 255, 0.10) !important;
        color: #ffffff !important;
        font-weight: 600 !important;
    }

    .desktop-nav-item.active svg {
        fill: currentColor !important;
    }

    .desktop-nav-item.active::before {
        content: "";
        position: absolute;
        left: 2px;
        top: 50%;
        transform: translateY(-50%);
        width: 3.5px;
        height: 16px;
        border-radius: 2px;
        background-color: #fa586a !important;
    }

    @media (prefers-color-scheme: light) {
        .desktop-nav-item.active {
            background: rgba(0, 0, 0, 0.06) !important;
            color: #1c1c1e !important;
        }
    }

    /* Apple Fluid Dynamic Sliding Indicator */
    .desktop-nav-indicator {
        position: absolute;
        left: 2px;
        width: 3.5px;
        height: 16px;
        border-radius: 2px;
        background-color: #fa586a !important;
        pointer-events: none;
        z-index: 100;
        opacity: 0;
        will-change: top, height, opacity;
    }

    /* When JS indicator is active, hide the static pseudo-element to avoid duplication */
    .has-desktop-indicator .desktop-nav-item.active::before {
        display: none !important;
    }

    /* Sidebar Footer */
    .desktop-sidebar-bottom {
        display: flex;
        flex-direction: column;
        padding-top: 10px;
        margin: 8px -12px 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
        border-top: 0.5px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
    }

    @media (prefers-color-scheme: light) {
        .desktop-sidebar-bottom {
            border-top: 0.5px solid rgba(0, 0, 0, 0.08);
        }
    }

    /* Sidebar Footer Profile (Apple Music Profile Style with Identicon) */
    .desktop-profile-card {
        display: flex;
        align-items: center;
        gap: 8px;
        height: 24px;
        padding: 0 6px;
        border-radius: 5px;
        text-decoration: none;
        color: #ffffff;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        transition: background-color 0.15s ease, transform 0.15s ease;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }

    .desktop-profile-card:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .desktop-profile-card:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.12);
    }

    @media (prefers-color-scheme: light) {
        .desktop-profile-card {
            color: #1c1c1e;
        }

        .desktop-profile-card:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        .desktop-profile-card:active {
            background: rgba(0, 0, 0, 0.09);
        }
    }

    .desktop-profile-avatar {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
        border: 0.5px solid rgba(255, 255, 255, 0.15);
        background: rgba(255, 255, 255, 0.05);
    }

    @media (prefers-color-scheme: light) {
        .desktop-profile-avatar {
            border: 0.5px solid rgba(0, 0, 0, 0.1);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
            background: rgba(0, 0, 0, 0.03);
        }
    }

    .desktop-profile-avatar svg {
        width: 100%;
        height: 100%;
        display: block;
    }

    .desktop-profile-uuid {
        font-size: 11px;
        font-weight: 500;
        font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
        letter-spacing: -0.2px;
        line-height: 1;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        min-width: 0 !important;
        flex: 1;
        display: block !important;
        color: rgba(255, 255, 255, 0.85);
        transition: color 0.15s ease;
    }

    .desktop-profile-uuid.copied {
        color: #34c759 !important;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "PingFang TC", sans-serif;
        font-weight: 600;
    }

    @media (prefers-color-scheme: light) {
        .desktop-profile-uuid {
            color: rgba(0, 0, 0, 0.82);
        }
    }
}

/* ============================================================================
 * Section 3: Desktop Home Ceremonial Hall Integration (> 768px)
 * ============================================================================ */
@media (min-width: 769px) {
    /* Top ceremonial and festival banner on home page */
    html:not(.device-mobile) .top-hover-trigger {
        position: fixed !important;
        top: 0 !important;
        left: 240px !important;
        width: calc(100% - 240px) !important;
        height: 15px !important;
        display: block !important;
        z-index: 20000 !important;
    }

    html:not(.device-mobile) .dropdown-nav-bar {
        left: 0 !important;
        width: 100% !important;
    }

    html:not(.device-mobile) body:not(.banner-active) .top-hover-trigger:hover .dropdown-nav-bar,
    html:not(.device-mobile) body:not(.banner-active) .dropdown-nav-bar:hover {
        transform: translateY(0) !important;
    }

    html:not(.device-mobile) .memorial-banner,
    html:not(.device-mobile) .status-banner {
        left: 240px !important;
        width: calc(100% - 240px) !important;
    }

    /* Strict vertical & horizontal centering for desktop ceremonial hall */
    html:not(.device-mobile) body.is-desktop-home,
    html:not(.device-mobile) body.has-desktop-sidebar.is-desktop-home {
        padding: 0 0 0 240px !important;
        width: 100% !important;
        height: 100vh !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    html:not(.device-mobile) body.is-desktop-home .desktop-stage,
    html:not(.device-mobile) body.has-desktop-sidebar.is-desktop-home .desktop-stage {
        width: 100% !important;
        height: 100vh !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* Centered ceremonial container within right-hand stage */
    html:not(.device-mobile) body.is-desktop-home .container,
    html:not(.device-mobile) body.has-desktop-sidebar.is-desktop-home .container {
        max-width: 500px !important;
        width: 100% !important;
        margin: auto auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Compact desktop viewports: scale down gracefully to prevent bottom clipping */
    @media (max-height: 720px) {
        body.is-desktop-home .portrait-img,
        body.has-desktop-sidebar.is-desktop-home .portrait-img {
            height: min(280px, 30vh) !important;
        }
        body.is-desktop-home .attendance-box,
        body.has-desktop-sidebar.is-desktop-home .attendance-box {
            margin: 0 auto 10px auto !important;
            padding: 3px 14px !important;
        }
        body.is-desktop-home .testament-box,
        body.has-desktop-sidebar.is-desktop-home .testament-box {
            margin-top: 6px !important;
        }
        body.is-desktop-home .testament-text,
        body.has-desktop-sidebar.is-desktop-home .testament-text {
            height: min(200px, 26vh) !important;
            font-size: clamp(0.75rem, 1.7vh, 0.92rem) !important;
            letter-spacing: 2px !important;
            line-height: 1.5 !important;
        }
    }
}

/* ============================================================================
 * Section 4: Subpages Desktop Layout (> 768px) (macOS Settings Specification)
 * ============================================================================ */
@media (min-width: 769px) {
    html:not(.device-mobile) body {
        padding: 0 0 0 240px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Desktop Subpage Background (macOS Settings Specification) */
    body.has-desktop-sidebar.is-desktop-subpage,
    body.has-desktop-sidebar.is-desktop-subpage .desktop-stage {
        background-color: #1e1e20 !important;
    }

    @media (prefers-color-scheme: light) {
        body.has-desktop-sidebar.is-desktop-subpage,
        body.has-desktop-sidebar.is-desktop-subpage .desktop-stage {
            background-color: #f2f2f7 !important;
        }
    }

    /* Desktop Home Ceremonial Hall Background */
    html:not(.device-mobile) body.is-desktop-home,
    html:not(.device-mobile) body.has-desktop-sidebar.is-desktop-home,
    html:not(.device-mobile) body.is-desktop-home .desktop-stage,
    html:not(.device-mobile) body.has-desktop-sidebar.is-desktop-home .desktop-stage {
        background-color: #111111 !important;
    }

    @media (prefers-color-scheme: light) {
        html:not(.device-mobile) body.is-desktop-home,
        html:not(.device-mobile) body.has-desktop-sidebar.is-desktop-home,
        html:not(.device-mobile) body.is-desktop-home .desktop-stage,
        html:not(.device-mobile) body.has-desktop-sidebar.is-desktop-home .desktop-stage {
            background-color: #f5f0e8 !important;
        }
    }

    /* Subpage Settings Container Centered in Right Stage */
    .ios-group-container {
        width: 100% !important;
        max-width: 680px !important;
        margin: 20px auto 40px auto !important;
        box-sizing: border-box !important;
    }

    .ios-section-header {
        font-size: 11px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        color: rgba(255, 255, 255, 0.4) !important;
        margin: 22px 0 6px 12px !important;
    }

    @media (prefers-color-scheme: light) {
        .ios-section-header {
            color: rgba(0, 0, 0, 0.45) !important;
        }
    }

    /* Authentic macOS Ventura Inset Grouped Card (Unified Card with Stacked Rows) */
    .ios-card {
        display: flex !important;
        flex-direction: column !important;
        background: rgba(36, 36, 40, 0.82) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 0.5px solid rgba(255, 255, 255, 0.10) !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
        margin-bottom: 16px !important;
    }

    @media (prefers-color-scheme: light) {
        .ios-card {
            background: #ffffff !important;
            border: 0.5px solid rgba(0, 0, 0, 0.08) !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        }
    }

    /* Rows inside Card: Authentic macOS Settings Row */
    .ios-card .ios-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 44px !important;
        padding: 0 14px !important;
        position: relative !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        text-decoration: none !important;
        color: #ffffff !important;
        transition: background-color 0.15s ease !important;
    }

    @media (prefers-color-scheme: light) {
        .ios-card .ios-row {
            color: #1c1c1e !important;
        }
    }

    .ios-card .ios-row:hover {
        background: rgba(255, 255, 255, 0.05) !important;
        transform: none !important;
        box-shadow: none !important;
    }

    @media (prefers-color-scheme: light) {
        .ios-card .ios-row:hover {
            background: rgba(0, 0, 0, 0.03) !important;
        }
    }

    /* Authentic Inset Separator Line Between Rows */
    .ios-card .ios-row:not(:last-child)::after {
        display: block !important;
        content: "" !important;
        position: absolute !important;
        left: 54px !important;
        right: 0 !important;
        bottom: 0 !important;
        height: 0.5px !important;
        background: rgba(255, 255, 255, 0.08) !important;
    }

    @media (prefers-color-scheme: light) {
        .ios-card .ios-row:not(:last-child)::after {
            background: rgba(0, 0, 0, 0.06) !important;
        }
    }

    /* Centered Festival Hero Header Card */
    .festival-hero {
        width: 100% !important;
        max-width: 800px !important;
        margin: 0 auto 20px auto !important;
        box-sizing: border-box !important;
    }

    /* Centered Markdown Content Article Card */
    .markdown-container {
        width: 100% !important;
        max-width: 800px !important;
        margin: 0 auto 40px auto !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
        height: auto !important;
    }

    /* Centered Charts Container */
    .charts-container {
        width: 100% !important;
        max-width: 800px !important;
        margin: 0 auto 40px auto !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
        height: auto !important;
    }

    /* ========================================================================
     * Desktop Apple macOS Toolbar Navigation Back Button (> 768px)
     * ========================================================================
     * Authentic macOS Ventura/Sonoma ghost toolbar button without capsule border.
     * ======================================================================== */
    .top-back-btn {
        position: fixed !important;
        top: 16px !important;
        left: calc(240px + 32px) !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        height: 28px !important;
        padding: 0 8px 0 6px !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 6px !important;
        color: rgba(255, 255, 255, 0.85) !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "PingFang SC", sans-serif !important;
        text-decoration: none !important;
        box-shadow: none !important;
        z-index: 1000 !important;
        transition: background-color 0.15s ease,
                    color 0.15s ease,
                    transform 0.15s ease !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        cursor: pointer !important;
    }

    @media (prefers-color-scheme: light) {
        .top-back-btn {
            background: transparent !important;
            border: none !important;
            color: #1c1c1e !important;
            box-shadow: none !important;
        }
    }

    .top-back-btn:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        color: #fa586a !important;
        border: none !important;
        box-shadow: none !important;
        transform: none !important;
    }

    @media (prefers-color-scheme: light) {
        .top-back-btn:hover {
            background: rgba(0, 0, 0, 0.06) !important;
            color: #fa586a !important;
            border: none !important;
            box-shadow: none !important;
        }
    }

    .top-back-btn:active {
        transform: scale(0.97) !important;
        background: rgba(255, 255, 255, 0.14) !important;
    }

    @media (prefers-color-scheme: light) {
        .top-back-btn:active {
            background: rgba(0, 0, 0, 0.10) !important;
        }
    }

    .top-back-btn svg {
        width: 13px !important;
        height: 13px !important;
        stroke: currentColor !important;
        stroke-width: 2px !important;
        fill: none !important;
        margin: 0 !important;
        transition: transform 0.15s ease !important;
    }

    .top-back-btn:hover svg {
        transform: translateX(-2px) !important;
    }

    /* ========================================================================
     * Desktop Split View Dynamic Content Stage Transition
     * ======================================================================== */
    .desktop-stage {
        width: 100% !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        box-sizing: border-box !important;
        padding: 40px 24px 60px 24px !important;
        position: relative !important;
        transition: opacity 0.18s cubic-bezier(0.25, 1, 0.5, 1);
        will-change: opacity;
    }

    /* Guarantee stage children never shrink to crush content cards */
    .desktop-stage > * {
        flex-shrink: 0 !important;
    }

    /* When a top-back-btn is visible (nav-from-content), shift content down
     * enough to clear the 16px-top + 28px-height button (total: 60px needed). */
    body.is-desktop-subpage.nav-from-content .desktop-stage {
        padding-top: 60px !important;
    }

    /* Hide the top-back-btn when the page was entered from the sidebar */
    body.nav-from-sidebar .top-back-btn {
        display: none !important;
    }

    .desktop-stage.stage-fading {
        opacity: 0 !important;
    }
}

