:root {
    --header-height: 56px;
}

/* Desktop 預設隱藏；手機版由 media query 顯示 */
#mobileMenuBtn {
    display: none;
}

@media (max-width: 768px) {
    #mobileMenuBtn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

.header {
    border-bottom: 1px solid #1a1a1a !important;
}

.header .clock-date,
.header .clock-time {
    color: #c8d8e8 !important;
}

.header .header-avatar {
    background: #1c1c1c !important;
    border: 1px solid #2a2a2a !important;
    color: #9ab8d0 !important;
}

.lang-btn {
    background: transparent;
    border: 1px solid #383838;
    color: #9ab8d0;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
    touch-action: manipulation;
}

.lang-btn:hover {
    background: #1a1a1a;
    color: #e0e8f0;
}

.lang-btn.is-zh {
    color: #ff9d6f;
    border-color: rgba(255, 107, 53, 0.55);
}

/* ===== Controller Header Patrol Preview Switch ===== */
.header-preview-mode {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
    user-select: none;
}

.header-preview-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #9ab8d0;
    white-space: nowrap;
}

.header-apple-sw {
    position: relative;
    width: 42px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.header-apple-sw input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.header-apple-track {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.header-apple-thumb {
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}

.header-apple-sw input:checked+.header-apple-track {
    background: #34c759;
    border-color: #34c759;
}

.header-apple-sw input:checked+.header-apple-track+.header-apple-thumb {
    transform: translateX(18px);
}

@media (max-width: 1024px) {
    .header-preview-label {
        display: none;
    }

    .header-preview-mode {
        margin-right: 8px;
    }
}