/* ==========================================================================
   GIAO DIỆN NHÀ THỜ ONLINE 3D - PHONG CÁCH CHIBI & ORBIT CAMERA (NIEMPHAT.ONLINE)
   Hỗ trợ xoay camera 360 độ bằng chạm vuốt, zoom 2 ngón, Joystick mượt mà
   ========================================================================== */

:root {
    --gold-primary: #d4af37;
    --gold-light: #fef08a;
    --gold-glow: rgba(212, 175, 55, 0.5);
    --gold-deep: #92400e;
    --glass-bg: rgba(24, 16, 11, 0.85);
    --glass-border: rgba(253, 230, 138, 0.35);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    --text-gold: #fde68a;
    --text-white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    touch-action: none;
    background-color: #0d0805;
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-white);
}

input, button, textarea, select {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #fef08a;
    outline-offset: 3px;
}

.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;
}

#church-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    touch-action: none;
}

#sanctuary-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    cursor: grab;
    touch-action: none;
}

#sanctuary-canvas:active {
    cursor: grabbing;
}

/* ==========================================================================
   1. BANNER TIÊU ĐỀ TRÊN CÙNG (TOP HEADER)
   ========================================================================== */
.top-header-banner {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    text-align: center;
    width: 90%;
    max-width: 480px;
}

.sanctuary-title-box {
    background: linear-gradient(180deg, rgba(58, 36, 21, 0.92) 0%, rgba(26, 15, 8, 0.95) 100%);
    border: 1.5px solid var(--glass-border);
    border-radius: 18px;
    padding: 8px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 20px var(--gold-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
}

.sanctuary-title-box h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fef08a;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 12px var(--gold-glow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-pill-group {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.status-pill {
    background: rgba(20, 13, 8, 0.85);
    border: 1px solid rgba(253, 230, 138, 0.25);
    border-radius: 9999px;
    padding: 3px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-gold);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   2. CÔNG CỤ ÂM THANH TRÁI TRÊN CÙNG
   ========================================================================== */
.top-left-tools {
    position: absolute;
    top: 14px;
    left: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-glass-tool {
    height: 38px;
    border-radius: 9999px;
    background: rgba(30, 20, 14, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-gold);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
}

.btn-glass-tool.playing {
    border-color: #10b981;
    color: #6ee7b7;
}

/* Gợi ý xoay camera */
.cam-hint-pill {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 12, 7, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(253, 230, 138, 0.25);
    border-radius: 9999px;
    padding: 4px 14px;
    font-size: 11px;
    color: #e2d9cf;
    z-index: 10;
    pointer-events: none;
    letter-spacing: 0.3px;
    animation: fade-hint 6s forwards;
}

@keyframes fade-hint {
    0% { opacity: 0; transform: translate(-50%, -10px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    80% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

/* ==========================================================================
   3. BẢNG Ý LỄ BÊN PHẢI (OFFERING BOARD)
   ========================================================================== */
.right-offering-card {
    position: absolute;
    top: 105px;
    right: 16px;
    z-index: 15;
    background: rgba(26, 17, 11, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: var(--glass-shadow);
    color: var(--text-white);
    max-width: 190px;
    font-size: 12px;
}

.card-header-small {
    font-size: 12px;
    font-weight: 700;
    color: #fef08a;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
}

.offering-list {
    list-style: none;
}

.offering-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 11.5px;
    color: #e2d9cf;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    padding-bottom: 3px;
}

.offering-item span:last-child {
    color: #fef08a;
    font-weight: 600;
}

/* ==========================================================================
   4. CẦN GẠT JOYSTICK ĐIỀU HƯỚNG GÓC DƯỚI TRÁI (DYNAMIC JOYSTICK)
   ========================================================================== */
.joy-zone {
    position: absolute;
    left: 20px;
    bottom: 24px;
    width: 120px;
    height: 120px;
    z-index: 25;
    touch-action: none;
}

.joy-base {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(30, 20, 14, 0.7);
    backdrop-filter: blur(10px);
    border: 1.5px solid var(--glass-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.joy-knob {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fef08a 0%, #d4af37 60%, #92400e 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    cursor: grab;
    transition: transform 0.05s ease-out;
}

/* ==========================================================================
   5. CỤM NÚT HÀNH ĐỘNG DƯỚI PHẢI (BOTTOM RIGHT ACTIONS DOCK)
   Icon to rõ ràng, có text mô tả tính năng ở dưới, màu sắc nổi bật, dễ bấm
   ========================================================================== */
.bottom-right-dock {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 30;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.dock-actions-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.btn-mobile-fab {
    display: none !important;
}

.btn-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 64px;
    padding: 6px 8px;
    border-radius: 16px;
    background: rgba(28, 16, 10, 0.92);
    backdrop-filter: blur(16px);
    border: 1.5px solid rgba(254, 240, 138, 0.45);
    color: #fde68a;
    cursor: pointer;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    transition: all 0.2s ease;
}

.btn-dock-item:active {
    transform: scale(0.93);
}

.dock-icon {
    font-size: 24px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.dock-label {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: #fef08a;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.2px;
}

/* Nút chính nổi bật (Cầu Nguyện) */
.btn-dock-highlight {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    border: 2px solid #fef08a;
    color: #ffffff;
    min-width: 78px;
    box-shadow: 0 8px 26px rgba(245, 158, 11, 0.65);
}

.btn-dock-highlight .dock-icon {
    font-size: 26px;
}

.btn-dock-highlight .dock-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 11.5px;
}

/* Nút ngồi ghế mờ khi đứng xa ghế trống */
.btn-dock-item.disabled {
    opacity: 0.45;
    filter: grayscale(0.5);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

/* Nút ngồi ghế SÁNG BỪNG LÊN khi người dùng đi vào gần ghế trống */
.btn-dock-item.can-sit {
    opacity: 1 !important;
    filter: none !important;
    border-color: #fef08a;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.95), rgba(180, 83, 9, 0.95));
    box-shadow: 0 0 24px rgba(254, 240, 138, 0.95);
    animation: pulse-gold 1.2s infinite;
}

.btn-dock-action {
    height: 54px;
    padding: 0 20px;
    border-radius: 9999px;
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
    border: 2px solid #fef08a;
    color: #ffffff;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
    transition: all 0.2s;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.btn-dock-action span:first-child {
    font-size: 22px;
}

.btn-dock-action:active {
    transform: scale(0.94);
}

.btn-dock-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(30, 18, 10, 0.92);
    backdrop-filter: blur(16px);
    border: 1.8px solid rgba(254, 240, 138, 0.5);
    color: var(--text-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    transition: all 0.25s;
}

.btn-dock-circle:active {
    transform: scale(0.92);
}

.btn-dock-circle.disabled {
    opacity: 0.45;
    filter: grayscale(0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-dock-circle.can-sit {
    opacity: 1 !important;
    filter: none !important;
    border-color: #fef08a;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.95), rgba(180, 83, 9, 0.95));
    box-shadow: 0 0 24px rgba(254, 240, 138, 0.95);
    animation: pulse-gold 1.2s infinite;
}

@keyframes pulse-gold {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); box-shadow: 0 0 30px rgba(254, 240, 138, 1); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   6. BONG BÓNG LỜI CẦU NGUYỆN (SPEECH BUBBLES)
   ========================================================================== */
.prayer-speech-bubble {
    position: absolute;
    z-index: 20;
    background: rgba(255, 253, 245, 0.96);
    color: #1c1917;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    transition: opacity 0.3s;
}

.prayer-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: rgba(255, 253, 245, 0.96) transparent transparent transparent;
}

/* ==========================================================================
   7. CÁC MODAL KÍNH MỜ
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.active {
    display: flex;
}

.modal-window {
    width: 100%;
    max-width: 440px;
    max-height: 88vh;
    background: linear-gradient(180deg, rgba(38, 26, 17, 0.96) 0%, rgba(20, 13, 8, 0.98) 100%);
    border: 1.5px solid var(--glass-border);
    border-radius: 22px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f5f5f4;
    animation: modal-pop 0.25s ease-out;
}

@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(253, 230, 138, 0.15);
}

.modal-head h2 {
    font-size: 16px;
    font-weight: 700;
    color: #fef08a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-modal-close {
    background: none;
    border: none;
    color: #a8a29e;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.modal-content-area {
    padding: 18px 20px;
    overflow-y: auto;
    font-size: 14.5px;
    line-height: 1.65;
}

.input-custom-name {
    width: 100%;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(253, 230, 138, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    margin-top: 6px;
}

.avatar-selection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 14px 0;
}

.avatar-card-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: inherit;
    font: inherit;
}

.quick-prayer-pill {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(253, 230, 138, 0.18);
    border-radius: 6px;
    padding: 5px 10px;
    color: #fef08a;
    cursor: pointer;
    font-size: 11.5px;
}

.quick-prayer-pill:hover {
    background: rgba(253, 230, 138, 0.18);
}

.church-toast {
    position: fixed;
    left: 50%;
    bottom: max(92px, calc(env(safe-area-inset-bottom) + 80px));
    z-index: 200;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 14px;
    border: 1px solid rgba(253, 230, 138, 0.4);
    border-radius: 12px;
    background: rgba(28, 16, 10, 0.95);
    box-shadow: var(--glass-shadow);
    color: #fef08a;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.church-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.avatar-card-item.selected {
    border-color: #fef08a;
    background: rgba(217, 119, 6, 0.35);
    box-shadow: 0 0 12px var(--gold-glow);
}

.avatar-card-item span:first-child {
    font-size: 26px;
}

.avatar-card-item span:last-child {
    font-size: 11.5px;
    font-weight: 600;
    color: #fef08a;
}

/* ==========================================================================
   BẢNG CHỌN MÀU ÁO LỄ CÔNG GIÁO (ROBE COLOR PICKER)
   ========================================================================== */
.robe-color-options {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 6px 2px;
}

.robe-color-swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    outline: none;
}

.robe-color-swatch:hover {
    transform: scale(1.08);
    border-color: rgba(254, 240, 138, 0.8);
}

.robe-color-swatch.selected {
    border-color: #fef08a !important;
    transform: scale(1.15);
    box-shadow: 0 0 16px rgba(254, 240, 138, 0.85), 0 4px 14px rgba(0, 0, 0, 0.6);
}

.robe-color-swatch.selected::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
    .right-offering-card { display: none; }

    /* 1. CÔNG CỤ ÂM THANH TRÊN CÙNG MOBILE: TINH TẾ GỌN GÀNG GÓC TRÁI */
    .top-left-tools {
        top: 10px;
        left: 10px;
        gap: 6px;
        z-index: 40;
    }

    .btn-glass-tool {
        height: 36px;
        width: 36px;
        min-width: 36px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    .btn-glass-tool span:last-child {
        display: none !important;
    }

    .btn-glass-tool span:first-child {
        font-size: 16px;
        margin: 0;
    }

    /* 2. TIÊU ĐỀ THÁNH ĐƯỜNG TRÊN CÙNG: KHÔNG BAO GIỜ CHE KHUẤT NÚT NHẠC */
    .top-header-banner {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        max-width: calc(100vw - 100px);
        pointer-events: none;
    }

    .sanctuary-title-box {
        padding: 4px 14px;
        background: rgba(22, 14, 9, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(254, 240, 138, 0.3);
        border-radius: 9999px;
    }

    .sanctuary-title-box h1 {
        font-size: 12px;
        letter-spacing: 0.8px;
        white-space: nowrap;
        margin: 0;
    }

    .status-pill-group {
        margin-top: 4px;
        gap: 6px;
    }

    .status-pill {
        font-size: 10px;
        padding: 2px 8px;
    }

    /* 3. ĐIỀU HƯỚNG JOYSTICK & NÚT HÀNH ĐỘNG FAB ĐỒNG ĐIỆU HOÀNG GIA TINH TẾ */
    .joy-zone {
        left: 14px;
        bottom: calc(20px + env(safe-area-inset-bottom, 12px));
        width: 84px;
        height: 84px;
        z-index: 30;
    }

    .joy-base {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: rgba(20, 12, 8, 0.86);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1.5px solid rgba(254, 240, 138, 0.4);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 0 16px rgba(0, 0, 0, 0.5);
    }

    .joy-knob {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 35%, #fef08a 0%, #d4af37 60%, #92400e 100%);
        border: 1.5px solid #fef08a;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(251, 191, 36, 0.4);
    }

    /* NÚT HÀNH ĐỘNG FAB BÊN PHẢI ĐỒNG ĐIỆU 100% VỚI CẦN GẠT JOYSTICK */
    .bottom-right-dock {
        right: 14px;
        bottom: calc(20px + env(safe-area-inset-bottom, 12px));
        flex-direction: column-reverse;
        align-items: flex-end;
        gap: 10px;
        z-index: 45;
    }

    .btn-mobile-fab {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 84px;
        height: 84px;
        min-width: 84px;
        border-radius: 50%;
        background: rgba(20, 12, 8, 0.86);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1.5px solid rgba(254, 240, 138, 0.4);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 0 16px rgba(0, 0, 0, 0.5);
        color: #ffffff;
        cursor: pointer;
        padding: 0;
        gap: 3px;
        z-index: 50;
        transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .btn-mobile-fab:active {
        transform: scale(0.93);
    }

    .fab-inner-core {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: radial-gradient(circle at 35% 35%, #fef08a 0%, #d4af37 60%, #92400e 100%);
        border: 1.5px solid #fef08a;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(251, 191, 36, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.25s ease;
    }

    .btn-mobile-fab.is-active .fab-inner-core {
        background: radial-gradient(circle at 35% 35%, #fca5a5 0%, #ef4444 60%, #991b1b 100%);
        border-color: #fca5a5;
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.6);
        transform: rotate(90deg);
    }

    .fab-inner-core .dock-icon {
        font-size: 20px;
        color: #1e130c;
        margin: 0;
    }

    .btn-mobile-fab.is-active .fab-inner-core .dock-icon {
        color: #ffffff;
    }

    .btn-mobile-fab .dock-label {
        font-size: 8px;
        font-weight: 700;
        letter-spacing: 0.3px;
        color: #fde68a;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    }

    .dock-actions-container {
        display: none;
        flex-direction: column-reverse;
        gap: 8px;
        align-items: stretch;
        background: rgba(22, 14, 9, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1.5px solid rgba(254, 240, 138, 0.4);
        border-radius: 18px;
        padding: 10px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
        opacity: 0;
        transform: translateY(16px) scale(0.96);
        transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        pointer-events: none;
    }

    .dock-actions-container.is-open {
        display: flex;
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .dock-actions-container .btn-dock-item {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        height: 44px;
        min-width: 165px;
        padding: 0 14px;
        border-radius: 12px;
        gap: 12px;
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(254, 240, 138, 0.2);
        box-shadow: none;
    }

    .dock-actions-container .btn-dock-item:active {
        background: rgba(254, 240, 138, 0.15);
        transform: scale(0.97);
    }

    .dock-actions-container .btn-dock-item .dock-icon {
        font-size: 20px;
    }

    .dock-actions-container .btn-dock-item .dock-label {
        font-size: 13px;
        font-weight: 600;
        color: #fde68a;
    }

    .dock-actions-container .btn-dock-highlight {
        background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
        border: 1.5px solid #fef08a;
    }

    .dock-actions-container .btn-dock-highlight .dock-label {
        color: #ffffff;
        font-weight: 700;
    }

    .btn-dock-circle {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .btn-dock-action {
        height: 44px;
        padding: 0 12px;
        font-size: 12.5px;
    }

    .cam-hint-pill {
        top: 72px;
        font-size: 10px;
        padding: 3px 10px;
        width: 90%;
        text-align: center;
    }

    @media (max-width: 380px) {
        .joy-zone {
            left: 8px;
            width: 82px;
            height: 82px;
        }
        .joy-knob {
            width: 36px;
            height: 36px;
        }
        .bottom-right-dock {
            right: 6px;
            gap: 3px;
        }
        .btn-dock-item {
            min-width: 40px;
            padding: 2px 3px;
        }
        .dock-label {
            font-size: 8px;
        }
        .btn-dock-highlight {
            min-width: 52px;
        }
    }
}

/* ==========================================================================
   MÀN HÌNH LOADING MÔ HÌNH 3D CATHEDRAL TÔN NGHIÊM & CHUYÊN NGHIỆP
   ========================================================================== */
.model-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1e130c 0%, #0a0604 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    backdrop-filter: blur(8px);
}

.model-loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-box {
    background: rgba(28, 17, 10, 0.85);
    border: 1px solid rgba(254, 240, 138, 0.25);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(217, 119, 6, 0.15);
    border-radius: 20px;
    padding: 32px 36px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cross-icon {
    font-size: 42px;
    color: #fde047;
    filter: drop-shadow(0 0 16px rgba(253, 224, 71, 0.8));
    animation: pulseCross 2.4s ease-in-out infinite;
}

@keyframes pulseCross {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.12); opacity: 1; filter: drop-shadow(0 0 24px rgba(253, 224, 71, 1)); }
}

.loading-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fef08a;
    text-transform: uppercase;
}

.loading-subtitle {
    font-size: 13.5px;
    color: #cbd5e1;
    line-height: 1.5;
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 6px;
    border: 1px solid rgba(254, 240, 138, 0.2);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #d97706, #fbbf24, #fef08a);
    border-radius: 999px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.progress-percent {
    font-size: 13px;
    font-weight: 600;
    color: #fde68a;
    letter-spacing: 0.5px;
}
