@charset "UTF-8";

/* ============================================================================
 * Private Sun Yat-sen Memorial Hall — Apple Native Tab Bar (tab-bar.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.
 * ============================================================================ */

/* ============================================================================
 * Desktop Isolation: Completely Hide Mobile Shell Bars on Screens > 768px on Desktop
 * ============================================================================ */
@media (min-width: 769px) {
    html:not(.device-mobile) .apple-tab-bar,
    html:not(.device-mobile) .apple-top-nav {
        display: none !important;
    }
}

/* ============================================================================
 * Mobile & Tablet Component Definitions
 * ============================================================================ */
    /* Fixed Apple Native Top Navigation Bar (Authentic Frosted Glass Header) */
    .apple-top-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(44px + env(safe-area-inset-top, 0px));
        padding-top: env(safe-area-inset-top, 0px);
        display: flex;
        align-items: flex-end;
        justify-content: center;
        background: rgba(20, 20, 22, 0.88);
        backdrop-filter: blur(25px) saturate(190%);
        -webkit-backdrop-filter: blur(25px) saturate(190%);
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        border-bottom: 0.5px solid rgba(255, 255, 255, 0.15);
        z-index: 25000;
        box-sizing: border-box;
        user-select: none;
        -webkit-user-select: none;
        transition: opacity 0.18s ease;
    }

    .apple-top-nav.nav-hidden {
        display: none !important;
    }

    /* Cleanly unload and hide Home page dropdown navigation bar and arrow hint */
    body.tab-navigating .top-hover-trigger,
    body.tab-navigating .mobile-arrow-hint,
    body.tab-navigating .dropdown-nav-bar,
    body.tab-navigating .memorial-banner,
    body.tab-navigating .status-banner,
    .top-hover-trigger.nav-hidden,
    .mobile-arrow-hint.nav-hidden,
    .dropdown-nav-bar.nav-hidden {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .apple-top-nav .nav-title {
        font-size: 17px;
        font-weight: 600;
        letter-spacing: -0.3px;
        color: #ffffff;
        font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC", "Microsoft JhengHei", sans-serif;
        margin: 0;
        padding: 0;
        height: 44px;
        line-height: 44px;
        display: flex;
        align-items: center;
        pointer-events: none;
    }
    /* Fixed Apple Native UITabBar Container (Authentic Translucent Frosted Glass) */
    .apple-tab-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: calc(52px + env(safe-area-inset-bottom, 34px));
        padding-top: 3px;
        padding-bottom: env(safe-area-inset-bottom, 34px);
        padding-left: 6px;
        padding-right: 6px;
        display: flex;
        align-items: flex-start;
        justify-content: space-around;
        background: rgba(22, 22, 24, 0.82);
        backdrop-filter: blur(25px) saturate(190%);
        -webkit-backdrop-filter: blur(25px) saturate(190%);
        border-top: 0.5px solid rgba(255, 255, 255, 0.15);
        box-sizing: border-box;
        z-index: 10000;
        user-select: none;
        -webkit-user-select: none;
    }

    /* Subpage Bottom Bar Hiding: completely hide tab bar when pushing into any subpage */
    body.is-subpage .apple-tab-bar,
    body.is-subpage #apple-tab-bar,
    body:has(.nav-back-link) .apple-tab-bar,
    body:has(.nav-back-link) #apple-tab-bar {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.is-subpage,
    body:has(.nav-back-link) {
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 16px)) !important;
    }

    /* Standalone WebApp CSS: Anchor cleanly to device bottom */
    @media all and (display-mode: standalone) {
        .apple-tab-bar {
            bottom: 0;
        }
    }

    html.is-standalone .apple-tab-bar {
        bottom: 0;
    }

    /* Individual Tab Button Item (Anchored to top 49-52px content zone) */
    .apple-tab-bar .tab-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: 48px;
        text-decoration: none;
        color: #98989f;
        transition: color 0.18s ease, opacity 0.12s ease;
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
        padding: 2px 0 0 0;
        box-sizing: border-box;
    }

    /* Icon Container & Apple SF Symbol Silhouette Standard */
    .apple-tab-bar .tab-item .tab-icon {
        width: 30px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 2px;
    }

    .apple-tab-bar .tab-item .tab-icon svg {
        width: 25px;
        height: 25px;
        fill: currentColor;
        stroke: none;
    }

    /* Tab Label Typography (Apple 10.5pt Standard Specification) */
    .apple-tab-bar .tab-item .tab-label {
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: -0.24px;
        font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC", "Microsoft JhengHei", sans-serif;
        line-height: 1.15;
        margin-top: 1px;
    }

    /* Active Selected State (Authentic Apple iOS System Blue Tint) */
    .apple-tab-bar .tab-item.active {
        color: #0a84ff;
    }

    .apple-tab-bar .tab-item.active .tab-label {
        font-weight: 600;
    }

    /* iOS Tap Press Animation: subtle opacity transition without scale twitch */
    .apple-tab-bar .tab-item:active {
        opacity: 0.7;
    }

/* ============================================================================
 * Light Theme Color Overrides
 * ============================================================================ */
@media (prefers-color-scheme: light) {
    .apple-top-nav {
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(25px) saturate(190%);
        -webkit-backdrop-filter: blur(25px) saturate(190%);
        border-bottom-color: rgba(0, 0, 0, 0.12);
    }

    .apple-top-nav .nav-title {
        color: #000000;
    }

    .apple-tab-bar {
        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(25px) saturate(190%);
        -webkit-backdrop-filter: blur(25px) saturate(190%);
        border-top-color: rgba(0, 0, 0, 0.12);
    }

    .apple-tab-bar .tab-item {
        color: #8e8e93;
    }

    .apple-tab-bar .tab-item.active {
        color: #007aff;
    }
}
