/* ==========================================================================
   A CHAMA — LAYOUT DO ALTAR, JORNADA, NAVEGAÇÃO & TEMA (altar.css)
   ========================================================================== */

/* --- ESCALONAMENTO GLOBAL DE FONTE / ACESSIBILIDADE --- */
html.font-scale-sm { font-size: 14.5px; }
html.font-scale-md { font-size: 16px; }
html.font-scale-lg { font-size: 18px; }
html.font-scale-xl { font-size: 20px; }

:root {
    --bg-main: #0a1120;
    --bg-sky-gradient: radial-gradient(120% 85% at 50% 12%, #142033 0%, #0c1524 55%, #070c16 100%);
    --bg-surface: #141f33;
    --bg-elevated: #1a2942;
    --bg-glass: rgba(20, 31, 51, 0.88);
    --text-title: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(0, 0, 0, 0.3);
    --node-locked-bg: #1e293b;
    --node-locked-shadow: #0f172a;
    --btn-petrol: #38bdf8;
    --btn-petrol-hover: #0284c7;
    --btn-petrol-active: #0369a1;
    --accent-gold: #fbbf24;
    --accent-cyan: #38bdf8;
}

.light-theme {
    --bg-main: #a0c7df;
    --bg-sky-gradient: #a0c7df;
    --bg-surface: #ffffff;
    --bg-elevated: #f4f9fd;
    --bg-glass: rgba(255, 255, 255, 0.94);
    --text-title: #0f172a;
    --text-body: #1e293b;
    --text-muted: #475569;
    --border-color: rgba(24, 62, 80, 0.12);
    --input-bg: rgba(240, 246, 250, 0.9);
    --node-locked-bg: #dbeafe;
    --node-locked-shadow: #bfdbfe;
    --btn-petrol: #254d60;
    --btn-petrol-hover: #1c3e4f;
    --btn-petrol-active: #15313f;
    --accent-gold: #b45309;
    --accent-cyan: #0284c7;
}

* {
    font-family: 'Nunito', sans-serif;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

textarea, input, select { user-select: text; }

/* Estilização moderna das setas de seleção (<select>) nos temas Dark e Light */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2338bdf8' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1.1rem 1.1rem;
    padding-right: 2.35rem !important;
    cursor: pointer;
    color-scheme: dark;
}

.light-theme select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230284c7' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    color-scheme: light;
}

select option {
    background-color: #131b2e;
    color: #f8fafc;
}

.light-theme select option {
    background-color: #ffffff;
    color: #0f172a;
}

html, body {
    background-color: var(--bg-main);
    color: var(--text-body);
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    -webkit-touch-callout: none;
}

body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 767px), (min-width: 501px) and (max-height: 500px) and (orientation: landscape) {
    html, body {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
    }
}

button, a, input, select, textarea, [role="button"], .altar-action-chip, .nav-tab-btn, .theme-glass, .classic-flame-body {
    touch-action: manipulation;
}

#app-container {
    width: 100%;
    max-width: 440px;
    height: 100%;
    max-height: 920px;
    position: relative;
    background-color: var(--bg-main);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow: clip;
    transition: background-color 0.35s ease;
}

/* Afasta os ícones do topo respeitando a safe area sem desperdiçar espaço vertical */
#app-header {
    padding-top: max(calc(env(safe-area-inset-top, 0px) + 0.65rem), 0.65rem);
    padding-bottom: 0.5rem;
}

/* Regras exclusivas para iPhone/iPad em modo standalone (Dynamic Island / entalhe frontal / home bar) */
.ios-standalone #app-header {
    padding-top: max(calc(env(safe-area-inset-top, 47px) + 1.15rem), 3.2rem) !important;
}
.ios-standalone .bottom-nav-bar {
    bottom: max(calc(env(safe-area-inset-bottom, 0px) + 12px), 16px) !important;
    height: 56px !important;
    padding: 4px 8px !important;
}
.ios-standalone .ai-fab-btn {
    bottom: max(calc(env(safe-area-inset-bottom, 20px) + 78px), 88px) !important;
    z-index: 65 !important;
}

/* Safe Area do Modal de Leitura / Exercício do Dia */
#modal-lesson .lesson-modal-header {
    padding-top: max(calc(env(safe-area-inset-top, 0px) + 0.85rem), 1rem);
}
#modal-lesson .lesson-modal-body {
    padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 2rem), 2.5rem);
}
.ios-standalone #modal-lesson .lesson-modal-header {
    padding-top: max(calc(env(safe-area-inset-top, 47px) + 1.15rem), 3.2rem) !important;
}
.ios-standalone #modal-lesson .lesson-modal-body {
    padding-bottom: max(calc(env(safe-area-inset-bottom, 24px) + 2.5rem), 3.8rem) !important;
}

/* Safe Area para folhas inferiores (Shop, Settings, Bíblia, Mentor IA) em celulares */
@media (max-width: 767px) {
    .ios-standalone #modal-shop .modal-sheet,
    .ios-standalone #modal-settings .modal-sheet,
    .ios-standalone #modal-bible-picker .modal-sheet {
        padding-bottom: max(env(safe-area-inset-bottom, 20px), 1.5rem);
    }
    .ios-standalone #modal-theology-ai .modal-sheet > div:last-child {
        padding-bottom: max(calc(env(safe-area-inset-bottom, 20px) + 0.6rem), 1.6rem);
    }
}
@media (min-width: 768px) and (min-height: 500px) {
    #modal-lesson .lesson-modal-header,
    .ios-standalone #modal-lesson .lesson-modal-header {
        padding-top: 1rem !important;
    }
    #modal-lesson .lesson-modal-body,
    .ios-standalone #modal-lesson .lesson-modal-body {
        padding-bottom: 1.5rem !important;
    }
}

@media (min-width: 460px) and (min-height: 500px) {
    #app-container {
        height: 94dvh;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    #app-header {
        padding-top: 1.2rem;
        padding-bottom: 0.75rem;
    }
}

.tabular-nums { font-variant-numeric: tabular-nums; }
.transition-\[color\,background-color\,border-color\,opacity\,transform\] {
    transition-property: color, background-color, border-color, opacity, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.guest-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.34);
    color: #fbbf24;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.guest-header-pill:hover {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.5);
}
.guest-header-pill:active { transform: scale(0.96); }
.light-theme .guest-header-pill {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(180, 83, 9, 0.3);
    color: #b45309;
}

.guest-gate-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}
.light-theme .guest-gate-card {
    border-color: rgba(24, 62, 80, 0.12);
}

.theme-glass {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
}
.theme-surface { background: var(--bg-surface); border: 1px solid var(--border-color); }
.theme-text-title { color: var(--text-title); }
.theme-text-body { color: var(--text-body); }
.theme-text-muted { color: var(--text-muted); }

/* --- BOTÕES MINIMALISTAS APPLE-GRADE (SUBSTITUI ANTIGO 3D SKEUOMÓRFICO) --- */
.btn-3d-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.28);
    color: #ffffff !important;
    border-radius: 9999px;
    font-weight: 800;
    border: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-3d-orange:hover {
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.38);
    transform: translateY(-1px);
}
.btn-3d-orange:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.22);
}

.btn-3d-blue {
    background: var(--btn-petrol, #254d60);
    box-shadow: 0 4px 14px rgba(35, 75, 94, 0.25);
    color: #ffffff !important;
    border-radius: 9999px;
    font-weight: 800;
    border: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-3d-blue:hover {
    background: var(--btn-petrol-hover, #1c3e4f);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(35, 75, 94, 0.35);
}
.btn-3d-blue:active {
    background: var(--btn-petrol-active, #15313f);
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 2px 6px rgba(35, 75, 94, 0.2);
}

.btn-3d-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
    color: #ffffff !important;
    border-radius: 9999px;
    font-weight: 800;
    border: none;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-3d-green:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38);
}
.btn-3d-green:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.22);
}

.action-card-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    transition: all 0.2s ease;
}
.light-theme .action-card-btn {
    background: #ffffff;
    border-color: rgba(35, 75, 94, 0.08);
    box-shadow: 0 2px 8px rgba(35, 75, 94, 0.04);
}
.action-card-btn:active {
    transform: scale(0.97);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.social-auth-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 11px 16px; border-radius: 9999px; border-width: 1px; font-weight: 800; font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}
.social-auth-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}
.social-auth-btn:active { transform: translateY(1px) scale(0.98); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

/* --- TRILHA SINUOSA (JORNADA) --- */
.trail-node {
    width: 72px;
    height: 66px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s ease;
    z-index: 10;
}
.trail-node::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 14px;
    width: 22px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    transform: rotate(-18deg);
    pointer-events: none;
}
.trail-node:active { transform: translateY(6px) !important; }

.trail-node.completed { background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%); box-shadow: 0 7px 0 #15803d, 0 10px 20px rgba(34, 197, 94, 0.28); color: #ffffff; }
.trail-node.completed:active { box-shadow: 0 1px 0 #15803d !important; }

.trail-node.current { background: linear-gradient(180deg, #ffb703 0%, #fb8500 100%); box-shadow: 0 7px 0 #c25e00, 0 0 28px rgba(251, 133, 0, 0.65); color: #ffffff; animation: pulseCurrentNode 2s infinite ease-in-out; }
.trail-node.current:active { box-shadow: 0 1px 0 #c25e00 !important; }

.trail-node.locked { background: var(--node-locked-bg); box-shadow: 0 7px 0 var(--node-locked-shadow); color: var(--text-muted); }
.trail-node.locked::after { background: rgba(255, 255, 255, 0.12); }

/* Cores por Época / Tier */
.trail-node.tier-1.locked { background: linear-gradient(180deg, #452715 0%, #2e190d 100%); box-shadow: 0 7px 0 #1a0d06; color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.25); }
.trail-node.tier-1.completed { background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%); box-shadow: 0 7px 0 #9a3412, 0 10px 20px rgba(234, 88, 12, 0.28); color: #fff; }
.trail-node.tier-2.locked { background: linear-gradient(180deg, #11382b 0%, #0b261d 100%); box-shadow: 0 7px 0 #061711; color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.25); }
.trail-node.tier-2.completed { background: linear-gradient(180deg, #34d399 0%, #059669 100%); box-shadow: 0 7px 0 #065f46, 0 10px 20px rgba(5, 150, 105, 0.28); color: #fff; }
.trail-node.tier-3.locked { background: linear-gradient(180deg, #132f4c 0%, #0c1f33 100%); box-shadow: 0 7px 0 #071320; color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.25); }
.trail-node.tier-3.completed { background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%); box-shadow: 0 7px 0 #075985, 0 10px 20px rgba(2, 132, 199, 0.28); color: #fff; }
.trail-node.tier-4.locked { background: linear-gradient(180deg, #311b4e 0%, #201135 100%); box-shadow: 0 7px 0 #12081f; color: #d8b4fe; border: 1px solid rgba(192, 132, 252, 0.25); }
.trail-node.tier-4.completed { background: linear-gradient(180deg, #c084fc 0%, #9333ea 100%); box-shadow: 0 7px 0 #6b21a8, 0 10px 20px rgba(147, 51, 234, 0.28); color: #fff; }
.trail-node.tier-5.locked { background: linear-gradient(180deg, #471628 0%, #2f0e1a 100%); box-shadow: 0 7px 0 #1c070f; color: #fda4af; border: 1px solid rgba(251, 113, 133, 0.25); }
.trail-node.tier-5.completed { background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%); box-shadow: 0 7px 0 #9f1239, 0 10px 20px rgba(225, 29, 72, 0.28); color: #fff; }
.trail-node.tier-6.locked { background: linear-gradient(180deg, #113a3b 0%, #0b2526 100%); box-shadow: 0 7px 0 #051617; color: #5eead4; border: 1px solid rgba(45, 212, 191, 0.25); }
.trail-node.tier-6.completed { background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 100%); box-shadow: 0 7px 0 #115e59, 0 10px 20px rgba(13, 148, 136, 0.28); color: #fff; }
.trail-node.tier-7.locked { background: linear-gradient(180deg, #1e2252 0%, #141738 100%); box-shadow: 0 7px 0 #0b0d24; color: #a5b4fc; border: 1px solid rgba(129, 140, 248, 0.25); }
.trail-node.tier-7.completed { background: linear-gradient(180deg, #818cf8 0%, #4f46e5 100%); box-shadow: 0 7px 0 #3730a3, 0 10px 20px rgba(79, 70, 229, 0.28); color: #fff; }
.trail-node.tier-8.locked { background: linear-gradient(180deg, #473910 0%, #2f2508 100%); box-shadow: 0 7px 0 #1c1604; color: #fde047; border: 1px solid rgba(250, 204, 21, 0.35); }
.trail-node.tier-8.completed { background: linear-gradient(180deg, #facc15 0%, #ca8a04 100%); box-shadow: 0 7px 0 #854d0e, 0 10px 20px rgba(202, 138, 4, 0.35); color: #fff; }

.nt-portal-card {
    background: linear-gradient(135deg, rgba(20, 24, 38, 0.94) 0%, rgba(15, 23, 42, 0.94) 100%);
    border: 2px solid rgba(251, 183, 3, 0.65);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65), 0 0 25px rgba(251, 183, 3, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.anim-shake { animation: shakeNode 0.4s ease-in-out !important; }

.floating-start-tag {
    position: absolute;
    top: -42px;
    background: #ffffff;
    color: #fb8500;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    animation: floatTag 1.5s ease-in-out infinite alternate;
    z-index: 20;
    pointer-events: none;
}
.floating-start-tag::after {
    content: ''; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 10px; height: 10px; background: #ffffff;
}

.trail-node.tomorrow-locked {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 2px dashed rgba(56, 189, 248, 0.65);
    box-shadow: 0 7px 0 #090d16, 0 0 22px rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}
.floating-tomorrow-tag {
    position: absolute; top: -40px; background: #0f172a; color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.5); font-weight: 900; font-size: 10px;
    letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.45); white-space: nowrap; z-index: 20; pointer-events: none;
}

/* --- FUNDO DE PAISAGEM CARTOGRÁFICA & VÉU DA JORNADA (FOG OF WAR / LAMPARINA) --- */
#journey-trail-container {
    position: relative;
    z-index: 10;
    --lamp-y: 60px;
    --lamp-x: 50%;
}

.journey-map-bg,
#tab-journey > #journey-map-canvas {
    position: absolute;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    min-height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    border-radius: 0;
}

/* Textura Cartográfica Pré-tonalizada (Evita layer GPU gigantesco de filter/blend no iOS Safari) */
.journey-map-terrain {
    position: absolute;
    inset: 0;
    background-image: url('/assets/journey-world-map-dark.jpg');
    background-repeat: repeat-y;
    background-position: center top;
    background-size: 100% auto;
    opacity: 0.96;
    z-index: 1;
}

.light-theme .journey-map-terrain {
    background-image: url('/assets/journey-world-map-light.jpg');
    opacity: 0.94;
}

/* Camada já pré-integrada na textura para compatibilidade sem estourar compositor mobile */
.journey-map-blue-overlay {
    display: none;
}

/* Shroud / Véu da Luz e Escuridão:
   A parte já percorrida fica 100% límpida e iluminada.
   Na lamparina (dia atual), a luz projeta seu foco radiante.
   Abaixo da lamparina, a escuridão/névoa monocromática cobre as etapas futuras. */
.journey-map-shroud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background: linear-gradient(
        to bottom,
        rgba(10, 17, 32, 0) 0px,
        rgba(10, 17, 32, 0) calc(var(--lamp-y, 450px) - 80px),
        rgba(10, 17, 32, 0.28) calc(var(--lamp-y, 450px) - 10px),
        rgba(10, 17, 32, 0.72) calc(var(--lamp-y, 450px) + 50px),
        rgba(10, 17, 32, 0.96) calc(var(--lamp-y, 450px) + 95px),
        #0a1120 calc(var(--lamp-y, 450px) + 120px),
        #0a1120 100%
    );
    transition: background 0.3s ease;
}

.light-theme .journey-map-shroud {
    background: linear-gradient(
        to bottom,
        rgba(160, 199, 223, 0) 0px,
        rgba(160, 199, 223, 0) calc(var(--lamp-y, 450px) - 80px),
        rgba(160, 199, 223, 0.35) calc(var(--lamp-y, 450px) - 10px),
        rgba(160, 199, 223, 0.75) calc(var(--lamp-y, 450px) + 50px),
        rgba(160, 199, 223, 0.96) calc(var(--lamp-y, 450px) + 95px),
        #a0c7df calc(var(--lamp-y, 450px) + 120px),
        #a0c7df 100%
    );
}

/* Card Translúcido Superior da Jornada (Garantido SEMPRE sobre o mapa com z-index elevado) */
.journey-top-card {
    position: relative;
    z-index: 35 !important;
    background: rgba(14, 23, 42, 0.60) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.light-theme .journey-top-card {
    position: relative;
    z-index: 35 !important;
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(35, 75, 94, 0.14);
    box-shadow: 0 10px 30px rgba(35, 75, 94, 0.08);
}

/* Lamparina / Foco de Luz Sagrada no Dia Atual */
.journey-lantern-light {
    position: absolute;
    top: var(--lamp-y, 60px);
    left: var(--lamp-x, 50%);
    transform: translate(-50%, -50%);
    width: 380px;
    height: 380px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(
        circle,
        rgba(251, 191, 36, 0.45) 0%,
        rgba(245, 158, 11, 0.28) 25%,
        rgba(217, 119, 6, 0.14) 48%,
        rgba(217, 119, 6, 0.03) 68%,
        transparent 82%
    );
    filter: blur(12px);
    animation: lanternGlowPulse 3.5s ease-in-out infinite alternate;
}

@keyframes lanternGlowPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.85;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.06);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.97);
        opacity: 0.9;
    }
}

/* --- NUVENS FLUTUANTES & FAGULHAS CELESTIAIS (ATMOSFERA VIVA) --- */
.journey-atmosphere-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3600px;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.journey-cloud {
    position: absolute;
    background-image: url('/assets/journey-cloud.png');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    will-change: transform;
    filter: brightness(0.68) saturate(0.45) sepia(0.25) hue-rotate(175deg) drop-shadow(0 14px 22px rgba(9, 13, 22, 0.35));
}

/* 8 Nuvens Orgânicas Distribuídas ao Longo da Trilha */
.journey-cloud.cloud-1 {
    top: 40px;
    width: 290px;
    height: 200px;
    opacity: 0.58;
    filter: drop-shadow(0 14px 22px rgba(9, 13, 22, 0.35));
    animation: driftCloud1 36s linear infinite;
}

.journey-cloud.cloud-2 {
    top: 260px;
    width: 330px;
    height: 240px;
    opacity: 0.52;
    filter: drop-shadow(0 16px 24px rgba(9, 13, 22, 0.32));
    animation: driftCloud2 44s linear infinite;
    animation-delay: -14s;
}

.journey-cloud.cloud-3 {
    top: 520px;
    width: 270px;
    height: 185px;
    opacity: 0.55;
    filter: drop-shadow(0 12px 18px rgba(9, 13, 22, 0.32));
    animation: driftCloud1 40s linear infinite;
    animation-delay: -22s;
}

.journey-cloud.cloud-4 {
    top: 860px;
    width: 350px;
    height: 250px;
    opacity: 0.50;
    filter: drop-shadow(0 16px 26px rgba(9, 13, 22, 0.30));
    animation: driftCloud2 42s linear infinite;
    animation-delay: -8s;
}

.journey-cloud.cloud-5 {
    top: 1320px;
    width: 310px;
    height: 220px;
    opacity: 0.54;
    filter: drop-shadow(0 14px 22px rgba(9, 13, 22, 0.32));
    animation: driftCloud1 35s linear infinite;
    animation-delay: -18s;
}

.journey-cloud.cloud-6 {
    top: 1840px;
    width: 320px;
    height: 230px;
    opacity: 0.50;
    filter: drop-shadow(0 15px 24px rgba(9, 13, 22, 0.30));
    animation: driftCloud2 46s linear infinite;
    animation-delay: -28s;
}

.journey-cloud.cloud-7 {
    top: 2420px;
    width: 340px;
    height: 245px;
    opacity: 0.52;
    filter: drop-shadow(0 14px 22px rgba(9, 13, 22, 0.32));
    animation: driftCloud1 38s linear infinite;
    animation-delay: -10s;
}

.journey-cloud.cloud-8 {
    top: 3120px;
    width: 300px;
    height: 215px;
    opacity: 0.48;
    filter: drop-shadow(0 14px 20px rgba(9, 13, 22, 0.30));
    animation: driftCloud2 44s linear infinite;
    animation-delay: -24s;
}

.light-theme .journey-cloud {
    opacity: 0.65;
    filter: drop-shadow(0 10px 18px rgba(35, 75, 94, 0.16));
}

@keyframes driftCloud1 {
    0% {
        transform: translate3d(-390px, 0, 0);
    }
    100% {
        transform: translate3d(calc(100vw + 390px), 0, 0);
    }
}

@keyframes driftCloud2 {
    0% {
        transform: scaleX(-1) translate3d(390px, 0, 0);
    }
    100% {
        transform: scaleX(-1) translate3d(calc(-100vw - 390px), 0, 0);
    }
}

/* --- AVES EM TOP VIEW (5 BANDOS CONSTANTES, MAPA VIVO & BATENDO ASAS) --- */
.journey-flock {
    position: absolute;
    pointer-events: none;
    z-index: 2; /* Fica sob o overlayer azul para receber o tom monocromático */
    will-change: transform, opacity;
}

/* Bando 1: V-formation de 4 Aves (Noroeste -> Sudeste) */
.journey-flock.flock-1 {
    top: 60px;
    left: 0;
    width: 60px;
    height: 60px;
    opacity: 0;
    animation: flightFlock1 11s cubic-bezier(0.4, 0.05, 0.2, 0.95) infinite;
}

@keyframes flightFlock1 {
    0% {
        transform: translate3d(-100px, 30px, 0) rotate(118deg);
        opacity: 0;
    }
    4% {
        opacity: 0.95;
    }
    82% {
        transform: translate3d(calc(100vw + 100px), 380px, 0) rotate(118deg);
        opacity: 0.95;
    }
    88%, 100% {
        transform: translate3d(calc(100vw + 100px), 380px, 0) rotate(118deg);
        opacity: 0;
    }
}

/* Bando 2: Trio Ágil (Sudeste -> Noroeste) */
.journey-flock.flock-2 {
    top: 170px;
    left: 0;
    width: 60px;
    height: 60px;
    opacity: 0;
    animation: flightFlock2 13s cubic-bezier(0.35, 0.1, 0.25, 0.9) infinite;
    animation-delay: 2s;
}

@keyframes flightFlock2 {
    0% {
        transform: translate3d(calc(100vw + 90px), 290px, 0) rotate(-70deg);
        opacity: 0;
    }
    4% {
        opacity: 0.92;
    }
    82% {
        transform: translate3d(-100px, 60px, 0) rotate(-70deg);
        opacity: 0.92;
    }
    88%, 100% {
        transform: translate3d(-100px, 60px, 0) rotate(-70deg);
        opacity: 0;
    }
}

/* Bando 3: Trio Cruzando Centro-Sul (Sudoeste -> Nordeste) */
.journey-flock.flock-3 {
    top: 300px;
    left: 0;
    width: 60px;
    height: 60px;
    opacity: 0;
    animation: flightFlock3 12s cubic-bezier(0.4, 0.05, 0.25, 0.95) infinite;
    animation-delay: 4.5s;
}

@keyframes flightFlock3 {
    0% {
        transform: translate3d(-100px, 320px, 0) rotate(52deg);
        opacity: 0;
    }
    4% {
        opacity: 0.92;
    }
    82% {
        transform: translate3d(calc(100vw + 100px), 60px, 0) rotate(52deg);
        opacity: 0.92;
    }
    88%, 100% {
        transform: translate3d(calc(100vw + 100px), 60px, 0) rotate(52deg);
        opacity: 0;
    }
}

/* Bando 4: Par de Aves Rasantes pelo Cânion (Oeste -> Leste) */
.journey-flock.flock-4 {
    top: 480px;
    left: 0;
    width: 60px;
    height: 60px;
    opacity: 0;
    animation: flightFlock4 14s cubic-bezier(0.38, 0.08, 0.22, 0.92) infinite;
    animation-delay: 1.5s;
}

@keyframes flightFlock4 {
    0% {
        transform: translate3d(-100px, 120px, 0) rotate(82deg);
        opacity: 0;
    }
    4% {
        opacity: 0.94;
    }
    80% {
        transform: translate3d(calc(100vw + 100px), 240px, 0) rotate(82deg);
        opacity: 0.94;
    }
    86%, 100% {
        transform: translate3d(calc(100vw + 100px), 240px, 0) rotate(82deg);
        opacity: 0;
    }
}

/* Bando 5: Dupla de Sentinelas (Leste -> Oeste) */
.journey-flock.flock-5 {
    top: 680px;
    left: 0;
    width: 60px;
    height: 60px;
    opacity: 0;
    animation: flightFlock5 15s cubic-bezier(0.35, 0.1, 0.25, 0.9) infinite;
    animation-delay: 7s;
}

@keyframes flightFlock5 {
    0% {
        transform: translate3d(calc(100vw + 100px), 160px, 0) rotate(-98deg);
        opacity: 0;
    }
    4% {
        opacity: 0.90;
    }
    80% {
        transform: translate3d(-100px, 80px, 0) rotate(-98deg);
        opacity: 0.90;
    }
    86%, 100% {
        transform: translate3d(-100px, 80px, 0) rotate(-98deg);
        opacity: 0;
    }
}

.journey-bird-wrap {
    position: absolute;
    width: 32px;
    height: 32px;
}

.bird-companion {
    top: -18px;
    left: -20px;
    transform: scale(0.85);
}

.bird-wingman {
    top: 16px;
    left: -22px;
    transform: scale(0.80);
}

.bird-scout {
    top: -26px;
    left: 18px;
    transform: scale(0.76);
}

.bird-solo {
    transform: scale(1.08);
}

.bird-flyer {
    position: relative;
    width: 100%;
    height: 100%;
    will-change: transform;
    animation: birdBodyBob 0.65s ease-in-out infinite alternate;
}

@keyframes birdBodyBob {
    0% { transform: translateY(0); }
    100% { transform: translateY(-2px); }
}

.bird-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.bird-svg .bird-wing {
    fill: #ffffff;
    will-change: transform;
}

.bird-svg .bird-torso {
    fill: #fdfefe;
}

.bird-svg .bird-beak {
    fill: #d97706;
}

.bird-svg .bird-feather-glow {
    fill: #e2e8f0;
    opacity: 0.85;
}

/* Sombra Projetada no Terreno (Cria Altura e Profundidade 3D Genuína) */
.bird-ground-shadow {
    position: absolute;
    top: 15px;
    left: 14px;
    width: 100%;
    height: 100%;
    opacity: 0.28;
    filter: blur(2px);
    pointer-events: none;
    transform: scale(0.8);
}

.shadow-svg .bird-wing,
.shadow-svg .bird-torso {
    fill: #090d16 !important;
}

/* Batimento de Asas: 3 batidas rápidas intercaladas com planar suave */
.wing-left {
    transform-origin: 28px 26px;
    animation: birdWingLeft 2.2s ease-in-out infinite;
}

.wing-right {
    transform-origin: 36px 26px;
    animation: birdWingRight 2.2s ease-in-out infinite;
}

.bird-companion .wing-left,
.bird-companion .wing-right {
    animation-delay: -0.35s;
}

.bird-wingman .wing-left,
.bird-wingman .wing-right {
    animation-delay: -0.65s;
}

@keyframes birdWingLeft {
    0%, 100% { transform: scaleY(1) rotate(0deg); }
    7% { transform: scaleY(0.35) rotate(-22deg); }
    14% { transform: scaleY(1.05) rotate(4deg); }
    21% { transform: scaleY(0.35) rotate(-22deg); }
    28% { transform: scaleY(1.05) rotate(4deg); }
    35% { transform: scaleY(0.35) rotate(-22deg); }
    42% { transform: scaleY(1) rotate(0deg); }
    50%, 82% { transform: scaleY(0.96) rotate(1deg); }
    90% { transform: scaleY(0.35) rotate(-22deg); }
}

@keyframes birdWingRight {
    0%, 100% { transform: scaleY(1) rotate(0deg); }
    7% { transform: scaleY(0.35) rotate(22deg); }
    14% { transform: scaleY(1.05) rotate(-4deg); }
    21% { transform: scaleY(0.35) rotate(22deg); }
    28% { transform: scaleY(1.05) rotate(-4deg); }
    35% { transform: scaleY(0.35) rotate(22deg); }
    42% { transform: scaleY(1) rotate(0deg); }
    50%, 82% { transform: scaleY(0.96) rotate(-1deg); }
    90% { transform: scaleY(0.35) rotate(22deg); }
}

/* Pills de Tier e Era com Alto Contraste (Legibilidade Garantida sobre Areia e Vegetação) */
.journey-tier-pill {
    background: rgba(9, 13, 22, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.light-theme .journey-tier-pill {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.journey-era-pill {
    background: rgba(9, 13, 22, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.light-theme .journey-era-pill {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Fagulhas / Embers Dourados Flutuando */
.journey-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 6px #f59e0b, 0 0 12px rgba(251, 191, 36, 0.55);
    pointer-events: none;
    will-change: transform, opacity;
}

.journey-spark.spark-1 {
    left: 42%;
    top: 150px;
    animation: sparkAscent 6.5s ease-in-out infinite;
}

.journey-spark.spark-2 {
    left: 56%;
    top: 320px;
    animation: sparkAscent 8s ease-in-out infinite;
    animation-delay: -3s;
}

.journey-spark.spark-3 {
    left: 46%;
    top: 480px;
    animation: sparkAscent 7.2s ease-in-out infinite;
    animation-delay: -4.5s;
}

.journey-spark.spark-4 {
    left: 36%;
    top: 240px;
    animation: sparkAscent 8.8s ease-in-out infinite;
    animation-delay: -1.8s;
}

@keyframes sparkAscent {
    0% {
        transform: translate3d(0, 0, 0) scale(0.6);
        opacity: 0;
    }
    20% {
        opacity: 0.85;
    }
    50% {
        transform: translate3d(14px, -60px, 0) scale(1.1);
        opacity: 0.95;
    }
    80% {
        opacity: 0.45;
    }
    100% {
        transform: translate3d(-10px, -130px, 0) scale(0.3);
        opacity: 0;
    }
}

/* Header Pills & Circular Buttons */
.header-dock-pill {
    position: relative;
    min-height: 34px;
    padding: 3px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
}
.header-dock-pill:active { transform: scale(0.95); }

/* Seletor de abas do topo: exclusivo para desktop (1024px+). No mobile e tablet, a navegação é feita pela barra inferior */
#wide-tab-switch {
    display: none !important;
}

.header-circle-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 9999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: var(--text-title);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}
.light-theme .header-circle-btn {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(35, 75, 94, 0.08);
    box-shadow: 0 2px 10px rgba(35, 75, 94, 0.06);
    color: #16374a;
}
.header-circle-btn:active {
    transform: scale(0.92);
}
.header-circle-btn:hover {
    background: var(--bg-elevated);
}
.light-theme .header-circle-btn:hover {
    background: #ffffff;
}

/* Botão da Loja no Topo (Header) com alta leitura em Modo Claro e Escuro */
.header-shop-btn {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #fbbf24 !important;
}
.header-shop-btn:hover {
    background: rgba(245, 158, 11, 0.22) !important;
}
.header-shop-btn i {
    color: #fbbf24 !important;
    font-size: 13px !important;
}
.light-theme .header-shop-btn {
    background: #fff7ed !important;
    border: 1.5px solid rgba(234, 88, 12, 0.35) !important;
    color: #c2410c !important;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12) !important;
}
.light-theme .header-shop-btn:hover {
    background: #ffedd5 !important;
    border-color: rgba(234, 88, 12, 0.5) !important;
}
.light-theme .header-shop-btn i {
    color: #c2410c !important;
    font-size: 13px !important;
    filter: drop-shadow(0 1px 2px rgba(194, 65, 12, 0.25));
}

/* Pílula de Acesso Rápido à Loja na tela do Altar */
.btn-altar-shop {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(249, 115, 22, 0.16) 100%);
    border: 1px solid rgba(245, 158, 11, 0.38);
    color: #fbbf24;
}
.btn-altar-shop i {
    color: #f59e0b;
}
.btn-altar-shop:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(249, 115, 22, 0.25) 100%);
}
.light-theme .btn-altar-shop {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
    border: 1.5px solid rgba(234, 88, 12, 0.38) !important;
    color: #9a3412 !important;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.10) !important;
}
.light-theme .btn-altar-shop:hover {
    background: #ffedd5 !important;
    border-color: rgba(234, 88, 12, 0.5) !important;
}
.light-theme .btn-altar-shop i {
    color: #c2410c !important;
}

#header-flame-slot {
    width: 32px; height: 32px; border-radius: 999px; background: rgba(251, 133, 0, 0.12);
    border: 1px solid rgba(251, 133, 0, 0.28); display: flex; align-items: center; justify-content: center;
    position: relative; overflow: visible; flex-shrink: 0;
}

/* Barras de Status do Pet */
.stat-bar-track { width: 100%; height: 8px; background: var(--input-bg); border-radius: 99px; overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 99px; transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* --- ABAS PRINCIPAIS --- */
.tab-view {
    display: none !important; flex: 1; min-height: 0; width: 100%; max-width: 100%;
    overflow-y: auto; overflow-x: hidden; scrollbar-width: none; scroll-behavior: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 68px), 72px) !important;
}
.tab-view::-webkit-scrollbar { display: none; }
.tab-view.active { display: flex !important; flex-direction: column; animation: tabInstantFade 0.08s ease-out forwards; }
#tab-journey.active, #tab-bible.active, #tab-friends.active { display: block !important; }
#tab-journey { padding-top: 0 !important; }
#tab-journey > *, #tab-friends > *, #tab-bible > * { flex-shrink: 0; }
#tab-bible { overflow-anchor: none; scroll-behavior: auto !important; }

@keyframes tabInstantFade {
    from { opacity: 0.85; }
    to { opacity: 1; }
}

/* Barra Inferior de Navegação Estilo Floating Minimalist Dock (Apple HIG Compact) */
.bottom-nav-bar {
    position: fixed;
    bottom: max(calc(env(safe-area-inset-bottom, 0px) + 8px), 12px);
    left: 50%;
    transform: translateX(-50%);
    height: 56px;
    width: calc(100% - 24px);
    max-width: 424px;
    margin: 0;
    padding: 4px 8px;
    background: rgba(12, 19, 34, 0.95);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1.5px solid rgba(249, 115, 22, 0.72);
    border-radius: 9999px;
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.7), 0 0 20px -2px rgba(249, 115, 22, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    align-items: center;
    z-index: 80;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.light-theme .bottom-nav-bar {
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid rgba(234, 88, 12, 0.72);
    box-shadow: 0 10px 28px -4px rgba(24, 62, 80, 0.18), 0 0 14px -2px rgba(234, 88, 12, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.nav-tab-btn {
    height: 44px;
    border-radius: 9999px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-weight: 800;
    color: #cbd5e1;
    border: 1px solid transparent;
    transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    position: relative;
}
.light-theme .nav-tab-btn {
    color: #475569;
}
.nav-tab-btn i {
    font-size: 16px;
    line-height: 1;
    color: #f97316 !important;
    filter: drop-shadow(0 1px 4px rgba(249, 115, 22, 0.35));
    transition: transform 0.22s ease, filter 0.22s ease;
}
.nav-tab-btn span { font-size: 9.5px; line-height: 1; font-weight: 800; letter-spacing: 0.02em; }
.nav-tab-btn:active { transform: scale(0.94); }
.nav-tab-btn.active {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.22);
}
.nav-tab-btn.active i {
    color: #fb923c !important;
    transform: translateY(-1px) scale(1.08);
    filter: drop-shadow(0 2px 6px rgba(249, 115, 22, 0.55));
}
.light-theme .nav-tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.light-theme .nav-tab-btn.active i {
    color: #ffffff !important;
    transform: translateY(-1px) scale(1.08);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.22));
}

/* Otimizações de Desempenho e GPU */
#journey-trail-container { z-index: 10; }
.trail-node.current, .floating-start-tag { will-change: transform; }
.app-paused *, .app-paused *::before, .app-paused *::after { animation-play-state: paused !important; }
body.journey-active #firefly-container { display: none; }
body.bible-active #firefly-container, body.friends-active #firefly-container { display: none; }

@media (prefers-reduced-motion: reduce) {
    *:not(#hero-flame-actor):not(#hero-flame-actor *):not(#classic-flame-body):not(#flame-action-animator):not(.anim-touch):not(.anim-oil):not(.anim-sing):not(.anim-wind):not(.anim-heal):not(.anim-celebrate):not(.anim-resurrect) {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- ANIMAÇÕES HEROICAS DO MASCOTE (MOBILE & PC) --- */
#flame-action-animator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-origin: center bottom;
    -webkit-transform-origin: center bottom;
    will-change: transform;
}

.classic-flame-body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
}

/* 1. Toque / Carinho: Compressão e Salto Elástico */
.anim-touch {
    animation: petAnimTouch 0.68s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    -webkit-animation: petAnimTouch 0.68s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}
@keyframes petAnimTouch {
    0% { transform: scale(1, 1); }
    25% { transform: scale(1.16, 0.82) translateY(8px); }
    55% { transform: scale(0.92, 1.15) translateY(-14px); }
    75% { transform: scale(1.05, 0.96) translateY(2px); }
    100% { transform: scale(1, 1) translateY(0); }
}
@-webkit-keyframes petAnimTouch {
    0% { -webkit-transform: scale(1, 1); }
    25% { -webkit-transform: scale(1.16, 0.82) translateY(8px); }
    55% { -webkit-transform: scale(0.92, 1.15) translateY(-14px); }
    75% { -webkit-transform: scale(1.05, 0.96) translateY(2px); }
    100% { -webkit-transform: scale(1, 1) translateY(0); }
}

/* 2. Óleo: Absorção Nutritiva e Pulso Quente */
.anim-oil {
    animation: petAnimOil 0.95s cubic-bezier(0.34, 1.4, 0.64, 1) forwards !important;
    -webkit-animation: petAnimOil 0.95s cubic-bezier(0.34, 1.4, 0.64, 1) forwards !important;
}
@keyframes petAnimOil {
    0% { transform: scale(1); filter: brightness(1); }
    20% { transform: scale(0.9, 1.08) translateY(-4px); filter: brightness(1.2) drop-shadow(0 0 16px rgba(245, 158, 11, 0.8)); }
    45% { transform: scale(1.18, 0.92) translateY(4px); filter: brightness(1.3) drop-shadow(0 0 24px rgba(245, 158, 11, 0.95)); }
    70% { transform: scale(0.98, 1.04) translateY(-2px); filter: brightness(1.1); }
    100% { transform: scale(1); filter: brightness(1); }
}
@-webkit-keyframes petAnimOil {
    0% { -webkit-transform: scale(1); filter: brightness(1); }
    20% { -webkit-transform: scale(0.9, 1.08) translateY(-4px); filter: brightness(1.2) drop-shadow(0 0 16px rgba(245, 158, 11, 0.8)); }
    45% { -webkit-transform: scale(1.18, 0.92) translateY(4px); filter: brightness(1.3) drop-shadow(0 0 24px rgba(245, 158, 11, 0.95)); }
    70% { -webkit-transform: scale(0.98, 1.04) translateY(-2px); filter: brightness(1.1); }
    100% { -webkit-transform: scale(1); filter: brightness(1); }
}

/* 3. Louvor / Música: Balanço Rítmico Alegre */
.anim-sing {
    animation: petAnimSing 1.05s ease-in-out forwards !important;
    -webkit-animation: petAnimSing 1.05s ease-in-out forwards !important;
}
@keyframes petAnimSing {
    0% { transform: rotate(0deg) scale(1); }
    18% { transform: rotate(-10deg) scale(1.08) translateY(-6px); }
    36% { transform: rotate(10deg) scale(1.08) translateY(-6px); }
    54% { transform: rotate(-8deg) scale(1.05) translateY(-3px); }
    72% { transform: rotate(6deg) scale(1.03) translateY(-2px); }
    100% { transform: rotate(0deg) scale(1) translateY(0); }
}
@-webkit-keyframes petAnimSing {
    0% { -webkit-transform: rotate(0deg) scale(1); }
    18% { -webkit-transform: rotate(-10deg) scale(1.08) translateY(-6px); }
    36% { -webkit-transform: rotate(10deg) scale(1.08) translateY(-6px); }
    54% { -webkit-transform: rotate(-8deg) scale(1.05) translateY(-3px); }
    72% { -webkit-transform: rotate(6deg) scale(1.03) translateY(-2px); }
    100% { -webkit-transform: rotate(0deg) scale(1) translateY(0); }
}

/* 4. Soprar / Vento: Ondulação Suave e Arejada */
.anim-wind {
    animation: petAnimWind 0.95s ease-in-out forwards !important;
    -webkit-animation: petAnimWind 0.95s ease-in-out forwards !important;
}
@keyframes petAnimWind {
    0% { transform: skewX(0deg) scale(1); }
    22% { transform: skewX(-12deg) scale(1.06, 0.96) translateX(4px); }
    50% { transform: skewX(10deg) scale(0.98, 1.04) translateX(-4px); }
    75% { transform: skewX(-4deg) scale(1.02, 0.99) translateX(1px); }
    100% { transform: skewX(0deg) scale(1) translateX(0); }
}
@-webkit-keyframes petAnimWind {
    0% { -webkit-transform: skewX(0deg) scale(1); }
    22% { -webkit-transform: skewX(-12deg) scale(1.06, 0.96) translateX(4px); }
    50% { -webkit-transform: skewX(10deg) scale(0.98, 1.04) translateX(-4px); }
    75% { -webkit-transform: skewX(-4deg) scale(1.02, 0.99) translateX(1px); }
    100% { -webkit-transform: skewX(0deg) scale(1) translateX(0); }
}

/* 5. Bálsamo / Saúde: Ascensão e Brilho Esmeralda */
.anim-heal {
    animation: petAnimHeal 1.05s cubic-bezier(0.34, 1.3, 0.64, 1) forwards !important;
    -webkit-animation: petAnimHeal 1.05s cubic-bezier(0.34, 1.3, 0.64, 1) forwards !important;
}
@keyframes petAnimHeal {
    0% { transform: scale(1) translateY(0); filter: brightness(1); }
    30% { transform: scale(1.1) translateY(-12px); filter: brightness(1.25) drop-shadow(0 0 20px rgba(16, 185, 129, 0.8)); }
    65% { transform: scale(1.05) translateY(-6px); filter: brightness(1.15) drop-shadow(0 0 14px rgba(16, 185, 129, 0.5)); }
    100% { transform: scale(1) translateY(0); filter: brightness(1); }
}
@-webkit-keyframes petAnimHeal {
    0% { -webkit-transform: scale(1) translateY(0); filter: brightness(1); }
    30% { -webkit-transform: scale(1.1) translateY(-12px); filter: brightness(1.25) drop-shadow(0 0 20px rgba(16, 185, 129, 0.8)); }
    65% { -webkit-transform: scale(1.05) translateY(-6px); filter: brightness(1.15) drop-shadow(0 0 14px rgba(16, 185, 129, 0.5)); }
    100% { -webkit-transform: scale(1) translateY(0); filter: brightness(1); }
}

/* 6. Celebração / Conquista */
.anim-celebrate {
    animation: petAnimCelebrate 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    -webkit-animation: petAnimCelebrate 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
}
@keyframes petAnimCelebrate {
    0% { transform: scale(1) translateY(0); }
    25% { transform: scale(1.2, 0.8) translateY(6px); }
    50% { transform: scale(0.95, 1.25) translateY(-22px) rotate(4deg); }
    75% { transform: scale(1.08, 0.95) translateY(-6px) rotate(-3deg); }
    100% { transform: scale(1) translateY(0) rotate(0deg); }
}
@-webkit-keyframes petAnimCelebrate {
    0% { -webkit-transform: scale(1) translateY(0); }
    25% { -webkit-transform: scale(1.2, 0.8) translateY(6px); }
    50% { -webkit-transform: scale(0.95, 1.25) translateY(-22px) rotate(4deg); }
    75% { -webkit-transform: scale(1.08, 0.95) translateY(-6px) rotate(-3deg); }
    100% { -webkit-transform: scale(1) translateY(0) rotate(0deg); }
}

/* 7. Ressurreição por Fricção: Transição da Brasa para Chama Viva */
.anim-resurrect {
    animation: flameResurrectBloom 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
    -webkit-animation: flameResurrectBloom 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}

/* Auth Overlay */
#auth-overlay .auth-flame { display: flex; justify-content: center; padding-top: 6px; transform: scale(0.85); transform-origin: center bottom; }
#auth-overlay .auth-flame .classic-flame-body { pointer-events: none; cursor: default; }
#auth-overlay {
    background: var(--bg-main); transition: opacity 0.4s ease; z-index: 500;
    overflow-y: auto; justify-content: flex-start;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
}
#auth-overlay > div { margin-top: auto; margin-bottom: auto; }
@media (max-width: 767px), (max-height: 500px) {
    #auth-overlay.vv-keyboard-open {
        top: var(--auth-vv-top, 0px) !important;
        bottom: auto !important;
        height: var(--auth-vv-height, 100%) !important;
        max-height: var(--auth-vv-height, 100%) !important;
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        justify-content: flex-start !important;
    }
    #auth-overlay.vv-keyboard-open > div {
        margin-top: auto;
        margin-bottom: auto;
        padding-top: 1.15rem !important;
        padding-bottom: 1.15rem !important;
    }
    #auth-overlay.vv-keyboard-open .auth-flame {
        display: none !important;
    }
    body.mobile-keyboard-open #chama-consent-bar {
        display: none !important;
    }
}

/* Suporte a Drag-to-Scroll & Wheel com Mouse (PC e notebooks touchscreen com mouse) */
.drag-scroll-x { cursor: grab; -webkit-user-select: none; user-select: none; }
.drag-scroll-x.cursor-grabbing,
.is-dragging-x { cursor: grabbing !important; scroll-snap-type: none !important; scroll-behavior: auto !important; }
.drag-scroll-x img,
.overflow-x-auto img { -webkit-user-drag: none; user-drag: none; }
@media (hover: none) and (pointer: coarse) {
    .desktop-only-arrow { display: none !important; }
    .drag-scroll-x { cursor: default; }
}
/* Garante que botões de seta no PC apareçam quando há mouse/trackpad mesmo em janelas menores */
@media (any-pointer: fine) {
    .pc-scroll-arrow { display: flex !important; }
}

#tab-pet {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 86px), 94px) !important;
}
@media (max-width: 767px) {
    #tab-pet {
        padding-top: 0.35rem !important;
        padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 86px), 94px) !important;
    }
}
@media (max-height: 860px) and (max-width: 767px) {
    #pet-stage-anchor { min-height: 100px !important; max-height: 170px !important; flex: 1 1 auto !important; }
    #hero-flame-actor { transform: translate(-50%, -50%) scale(0.90); }
    #tab-pet {
        padding-top: 0.2rem !important;
        padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 84px), 92px) !important;
    }
    #tab-pet #pet-bottom-controls > :not([hidden]) ~ :not([hidden]) { margin-top: 0.65rem !important; }
    #tab-pet .altar-card-porcelain { padding: 0.65rem 0.85rem !important; }
}
@media (max-height: 720px) and (max-width: 767px), (min-width: 501px) and (max-height: 500px) and (orientation: landscape) {
    #pet-stage-anchor { min-height: 76px !important; max-height: 132px !important; }
    #hero-flame-actor { transform: translate(-50%, -50%) scale(0.78); }
    #tab-pet {
        padding-top: 0.1rem !important;
        padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 80px), 86px) !important;
    }
    #tab-pet #pet-bottom-controls > :not([hidden]) ~ :not([hidden]) { margin-top: 0.55rem !important; }
    #tab-pet .altar-card-porcelain { padding: 0.5rem 0.7rem !important; border-radius: 20px !important; }
    .care-action-chip { padding: 0.35rem 0.5rem !important; font-size: 10px !important; }
    .pet-play-capsule { height: 34px !important; padding: 4px 12px !important; font-size: 10px !important; }
}
@media (max-width: 375px) {
    .care-actions-grid { gap: 4px !important; }
    .care-action-chip { padding: 0.35rem 0.45rem !important; font-size: 9.5px !important; }
    .bottom-nav-bar { left: 8px !important; right: 8px !important; }
}

/* --- RESPONSIVIDADE: MODAIS EM TABLET & DESKTOP (768px+ e altura >= 500px) --- */
@media (min-width: 768px) and (min-height: 500px) {
    html:not(.light-theme), html:not(.light-theme) body {
        background-color: #041527;
        background-image: none;
    }
    #modal-shop, #modal-settings, #modal-lesson, #modal-bible-picker, #modal-theology-ai { align-items: center; justify-content: center; padding: 28px; }
    #modal-shop .modal-sheet, #modal-settings .modal-sheet, #modal-bible-picker .modal-sheet, #modal-theology-ai .modal-sheet {
        max-width: 580px; height: min(88%, 820px); border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.08);
    }
    #modal-lesson .modal-sheet {
        max-width: 760px; height: 100%; max-height: 900px; border-radius: 24px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.08);
    }
    #auth-overlay > div { max-width: 392px; padding: 2rem; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.08); }
    .modal-sheet { line-height: 1.5; }
}

/* --- RESPONSIVIDADE: TABLET EM MODO VERTICAL / RETRATO (PORTRAIT) --- */
@media (min-width: 768px) and (orientation: portrait) {
    html, body {
        width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        position: fixed !important;
        inset: 0 !important;
    }
    #app-container {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        overflow: hidden !important;
    }
    #app-header {
        width: 100% !important;
        padding-inline: 1.5rem !important;
        flex-shrink: 0 !important;
    }
    #tab-pet {
        display: none;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        flex: 1 1 auto !important;
        height: 100% !important;
        max-height: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding-top: 0.5rem !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 78px) !important;
        overflow: hidden !important; /* NUNCA scroll no Altar em tablet: tudo cabe na tela com folga */
        position: relative !important;
        box-sizing: border-box !important;
    }
    #tab-pet.active {
        display: flex !important;
    }
    #altar-scenery-container, #firefly-container {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        z-index: 0 !important;
        pointer-events: none !important;
    }
    .scenery-base-wrap {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
    }
    #pet-stage-anchor {
        width: 100%;
        max-width: 600px;
        margin-inline: auto;
        min-height: 130px !important;
        max-height: none !important;
        flex: 1 1 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        margin: auto auto !important;
        overflow: visible !important;
    }
    #hero-flame-actor {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) scale(1.22) !important;
        margin: 0 !important;
    }
    #hero-ground-shadow {
        position: absolute !important;
        left: 50% !important;
        bottom: 22px !important;
        transform: translateX(-50%) scale(1.22) !important;
    }
    #pet-bottom-controls {
        width: 100% !important;
        max-width: 580px !important;
        margin-inline: auto !important;
        flex-shrink: 0 !important;
        margin-bottom: 0.25rem !important;
    }
    #tab-pet > div.w-full:not(#altar-scenery-container):not(#firefly-container) {
        width: 100% !important;
        max-width: 600px !important;
        margin-inline: auto !important;
    }
    #tab-journey {
        width: 100% !important;
        max-width: 100% !important;
    }
    #journey-trail-container {
        width: 100% !important;
        max-width: 100% !important;
    }
    .journey-map-bg {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    #tab-journey > div.w-full {
        width: 100% !important;
        max-width: 720px !important;
        margin-inline: auto !important;
    }
    #tab-bible > * { width: 100%; max-width: 720px; margin-inline: auto; }
    #tab-friends > * { width: 100%; max-width: 720px; margin-inline: auto; }

    /* Barra de menu inferior no tablet vertical: doca flutuante perfeitamente centralizada e fixa na tela */
    .bottom-nav-bar {
        display: grid !important;
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 48px) !important;
        max-width: 480px !important;
        bottom: max(calc(env(safe-area-inset-bottom, 0px) + 14px), 20px) !important;
        height: 58px !important;
        z-index: 90 !important;
        pointer-events: auto !important;
    }
    .ai-fab-btn {
        position: fixed !important;
        bottom: max(calc(env(safe-area-inset-bottom, 0px) + 82px), 88px) !important;
        right: max(calc((100vw - 480px) / 2 + 12px), 24px) !important;
    }
    #wide-tab-switch {
        display: none !important;
    }
}

/* --- RESPONSIVIDADE: DESKTOP & TABLET EM PAISAGEM (LANDSCAPE 1024px+ ou 768px+ Landscape) --- */
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px), (min-width: 768px) and (min-height: 600px) and (orientation: landscape) {
    html:not(.light-theme), html:not(.light-theme) body {
        background-color: #041527;
        background-image: none;
    }
    #app-header, .ios-standalone #app-header {
        padding-top: 1.05rem !important;
        padding-bottom: 0.7rem !important;
        padding-inline: 1.5rem !important;
    }
    #app-container {
        max-width: 1240px;
        max-height: 920px;
        height: 92vh;
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        display: grid;
        grid-template-columns: minmax(340px, 420px) minmax(400px, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    }
    #app-container > header {
        grid-column: 1 / -1;
        grid-row: 1;
        border-bottom: 1px solid var(--border-color);
    }
    #tab-pet {
        grid-column: 1;
        grid-row: 2;
        border-right: 1px solid var(--border-color);
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        padding-top: 0.75rem !important;
        padding-bottom: 1rem !important;
        overflow-y: auto !important;
        scrollbar-width: none !important;
        height: 100% !important;
        box-sizing: border-box !important;
    }
    #pet-stage-anchor {
        min-height: 110px !important;
        max-height: none !important;
        flex: 1 1 auto !important;
        margin-block: auto !important;
    }
    #pet-bottom-controls {
        margin-top: auto !important;
        margin-bottom: 0 !important;
    }
    #hero-flame-actor {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    #flame-evolution-scaler {
        margin-inline: auto !important;
    }
    #tab-journey {
        grid-column: 2;
        grid-row: 2;
        padding-left: 24px;
        padding-right: 24px;
        display: flex !important;
        flex-direction: column;
        animation: none;
        overflow-y: auto;
    }
    #tab-journey > * { max-width: 720px; margin-inline: auto; }
    #tab-bible, #tab-friends {
        grid-column: 2;
        grid-row: 2;
        padding-left: 24px;
        padding-right: 24px;
        height: 100%;
        max-height: calc(92vh - 85px);
        overflow-y: auto !important;
    }
    #tab-bible > *, #tab-friends > * { max-width: 720px; margin-inline: auto; }
    body.bible-active #tab-journey, body.friends-active #tab-journey { display: none !important; }
    body.journey-active #tab-journey { display: flex !important; }
    body:not(.bible-active):not(.friends-active) #tab-journey { display: flex !important; }
    body.journey-active #tab-bible, body.journey-active #tab-friends { display: none !important; }
    body.bible-active #tab-friends { display: none !important; }
    body.friends-active #tab-bible { display: none !important; }

    /* Nas telas maiores em landscape/desktop, o menu inferior fica no topo (#wide-tab-switch) e a barra de vida do mascote desce */
    .bottom-nav-bar { display: none !important; }
    #wide-tab-switch { display: inline-flex !important; }

    /* Quarto Secreto no Desktop/Paisagem: permanece 100% confinado na coluna da esquerda (#tab-pet) junto ao mascote */
    body.in-prayer-sanctuary #app-container > #app-header {
        display: flex !important;
    }
    body.in-prayer-sanctuary #app-header > #wide-tab-switch {
        display: inline-flex !important;
    }
    body.in-prayer-sanctuary #app-header #header-left-dock {
        pointer-events: auto !important;
        opacity: 1 !important;
    }
    body.in-prayer-sanctuary:not(.bible-active):not(.friends-active) #app-container > #tab-journey,
    body.in-prayer-sanctuary.journey-active #app-container > #tab-journey {
        display: flex !important;
    }
    body.in-prayer-sanctuary.bible-active #app-container > #tab-bible {
        display: block !important;
    }
    body.in-prayer-sanctuary.friends-active #app-container > #tab-friends {
        display: block !important;
    }
    body.in-prayer-sanctuary #app-container #tab-pet {
        grid-column: 1 !important;
        grid-row: 2 !important;
        position: relative !important;
        border-right: 1px solid var(--border-color) !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        padding: 0 !important;
    }
    body.in-prayer-sanctuary #tab-pet #prayer-sanctuary-view {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0.75rem 0.85rem !important;
        box-sizing: border-box !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    body.in-prayer-sanctuary #tab-pet #prayer-sanctuary-view > header,
    body.in-prayer-sanctuary #tab-pet #sanctuary-breath-overlay-card,
    body.in-prayer-sanctuary #tab-pet #prayer-sanctuary-view > div:last-child {
        max-width: 100% !important;
        width: 100% !important;
        margin-inline: 0 !important;
    }
    body.in-prayer-sanctuary #app-container #pet-stage-anchor {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        top: 52px !important;
        bottom: 300px !important;
        height: auto !important;
        min-height: 140px !important;
        max-height: none !important;
        margin: 0 !important;
    }
}

/* --- REGRAS DEDICADAS PARA IPAD E TABLETS (OCUPA 100% DA ÁREA, EXCLUINDO CELULARES DEITADOS) --- */
@media (pointer: coarse) and (min-width: 768px) and (min-height: 500px),
       (min-width: 768px) and (max-width: 1180px) and (min-height: 500px) and (orientation: landscape) {
    html, body {
        width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        background-color: var(--bg-main) !important;
    }
    #app-container {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
    }
}

.device-ipad html, .device-ipad body {
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background-color: var(--bg-main) !important;
}
.device-ipad #app-container {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}
.device-ipad #tab-pet {
    width: 100% !important;
    max-width: 100% !important;
}
.device-ipad #altar-scenery-container,
.device-ipad #firefly-container,
.device-ipad .scenery-base-wrap {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    inset: 0 !important;
}
.device-ipad #tab-journey,
.device-ipad #journey-trail-container {
    width: 100% !important;
    max-width: 100% !important;
}
.device-ipad .journey-map-bg {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

/* --- ADAPTAÇÃO COMPACTA PARA LAPTOPS & CHROMEBOOKS (Altura útil entre 500px e 840px) --- */
@media (min-width: 768px) and (min-height: 500px) and (max-height: 840px) and (orientation: landscape), (min-width: 1024px) and (min-height: 500px) and (max-height: 840px) {
    #app-container {
        height: min(98vh, calc(100vh - 12px)) !important;
        max-height: none !important;
        border-radius: 20px !important;
    }
    #app-header, .ios-standalone #app-header {
        padding-top: 0.65rem !important;
        padding-bottom: 0.45rem !important;
        padding-inline: 1.25rem !important;
    }
    #tab-pet {
        padding-top: 0.35rem !important;
        padding-bottom: 0.55rem !important;
        padding-inline: 0.85rem !important;
        overflow-y: auto !important;
        scrollbar-width: none !important;
    }
    #pet-stage-anchor {
        min-height: 95px !important;
        margin-block: 0.2rem !important;
    }
    #pet-bottom-controls {
        margin-top: auto !important;
        margin-bottom: 0 !important;
    }
    #pet-bottom-controls > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0.45rem !important;
    }
    #tab-pet .altar-card-porcelain {
        padding: 0.6rem 0.8rem !important;
        border-radius: 18px !important;
    }
    #tab-pet .altar-action-chip {
        min-height: 38px !important;
        padding: 0.3rem 0.25rem !important;
    }
    .pet-play-capsule {
        height: 32px !important;
        padding: 4px 12px !important;
        font-size: 10px !important;
        margin-bottom: 0.35rem !important;
    }
}

/* --- ADAPTAÇÃO ULTRA-COMPACTA PARA CHROMEBOOKS & TELAS 720p/768p (Altura útil entre 500px e 720px) --- */
@media (min-width: 768px) and (min-height: 500px) and (max-height: 720px) and (orientation: landscape), (min-width: 1024px) and (min-height: 500px) and (max-height: 720px) {
    #app-container {
        height: 98vh !important;
        border-radius: 16px !important;
    }
    #app-header, .ios-standalone #app-header {
        padding-top: 0.35rem !important;
        padding-bottom: 0.3rem !important;
        padding-inline: 1rem !important;
    }
    #tab-pet {
        padding-top: 0.15rem !important;
        padding-bottom: 0.35rem !important;
        padding-inline: 0.65rem !important;
        overflow-y: auto !important;
        scrollbar-width: none !important;
    }
    #pet-stage-anchor {
        min-height: 80px !important;
        margin-block: 0 !important;
    }
    #pet-bottom-controls > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0.3rem !important;
    }
    #tab-pet .altar-card-porcelain {
        padding: 0.45rem 0.65rem !important;
        border-radius: 16px !important;
    }
    #tab-pet .altar-card-porcelain .grid-cols-4 {
        gap: 0.35rem !important;
    }
    #tab-pet .altar-action-chip {
        min-height: 32px !important;
        padding: 0.2rem 0.15rem !important;
    }
    .pet-play-capsule {
        height: 28px !important;
        padding: 3px 10px !important;
        font-size: 9.5px !important;
        margin-bottom: 0.2rem !important;
    }
}

/* Escudo "Gire o celular para a vertical" — ativado via JS apenas quando um smartphone gira fisicamente para paisagem
   (nunca dispara quando o teclado abre em pé, nem em tablets, desktops/Chromebooks ou dentro do jogo) */
#app-orientation-shield {
    display: none !important;
}
body.mobile-landscape-shield:not(.game-active) #app-orientation-shield {
    display: flex !important;
}

/* Mantém smartphone em coluna vertical (portrait) se o navegador do SO permitir girar para paisagem */
@media (min-width: 501px) and (max-height: 500px) and (orientation: landscape) {
    #app-container {
        width: 100% !important;
        max-width: 440px !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin-inline: auto !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.55) !important;
    }
    #tab-pet.active {
        justify-content: flex-start !important;
    }
    #pet-stage-anchor {
        flex: 0 0 auto !important;
        min-height: 110px !important;
    }
}

@media (hover: hover) and (pointer: fine) {
    .trail-node:hover { filter: brightness(1.1); }
    .action-card-btn:hover { border-color: rgba(251, 133, 0, 0.35); }
    .tab-view { scrollbar-width: thin; }
}

/* ==========================================================================
   DESIGN ARCHITECTURE: APPLE HIG & O PROVADOR DA CHAMA
   (Baby/Celestial Sky Blue Theme, Serene Mascot Staging & Interactive Try-On)
   ========================================================================== */

/* --- TEMA CELESTE (LIGHT THEME ELEVATION) --- */
.light-theme {
    background-color: #b3d6eb;
}
.light-theme #app-container {
    background: var(--bg-sky-gradient);
    box-shadow: 0 25px 70px rgba(35, 75, 94, 0.22);
}

/* Modais, Janelas de Login e Popups estilo Apple Porcelana Minimalista */
.light-theme .overlay-modal {
    background: rgba(15, 23, 42, 0.45) !important;
}
.light-theme .modal-sheet,
.light-theme #auth-overlay > div {
    background: #ffffff !important;
    border-color: rgba(24, 62, 80, 0.14) !important;
    box-shadow: 0 20px 55px -10px rgba(24, 62, 80, 0.2) !important;
    border-radius: 24px !important;
    color: #0f172a !important;
}
.light-theme .modal-sheet h2,
.light-theme .modal-sheet h3 {
    color: #0f172a !important;
}
.light-theme .modal-sheet p {
    color: #334155 !important;
}
.light-theme .modal-sheet button[data-i18n="btn_cancel"],
.light-theme .modal-sheet button.theme-glass {
    background: rgba(24, 62, 80, 0.05) !important;
    border: 1px solid rgba(24, 62, 80, 0.16) !important;
    color: #1e293b !important;
}
.light-theme .modal-sheet button[data-i18n="btn_cancel"]:hover,
.light-theme .modal-sheet button.theme-glass:hover {
    background: rgba(24, 62, 80, 0.10) !important;
}
.light-theme #modal-use-key .bg-\[var\(--input-bg\)\] {
    background: #f1f7fa !important;
    border-color: rgba(217, 119, 6, 0.35) !important;
}
.light-theme #modal-reward .bg-\[var\(--input-bg\)\] {
    background: #f1f7fa !important;
    border-color: rgba(24, 62, 80, 0.12) !important;
}
.light-theme #auth-overlay input,
.light-theme .overlay-modal input,
.light-theme .overlay-modal select {
    background: rgba(240, 246, 250, 0.85);
    border-color: rgba(24, 62, 80, 0.12);
    color: #1a3344;
}
.light-theme #auth-overlay input:focus,
.light-theme .overlay-modal input:focus {
    background: #ffffff;
    border-color: #38bdf8;
}

/* Friend Visit Altar da Comunhão em Modo Claro */
.light-theme #friend-visit-container .theme-surface {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(24, 62, 80, 0.12) !important;
    box-shadow: 0 8px 24px rgba(24, 62, 80, 0.08) !important;
}
.light-theme #lounge-stage-card {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(24, 62, 80, 0.14) !important;
    box-shadow: 0 12px 36px rgba(24, 62, 80, 0.08) !important;
    color: #0f172a !important;
}
.light-theme #lounge-stage-card .visit-subtabs-track {
    background: rgba(24, 62, 80, 0.06) !important;
    border: 1px solid rgba(24, 62, 80, 0.12) !important;
}

/* ==========================================================================
   QUARTO SECRETO & SALA DE ORAÇÃO - LIGHT THEME CONTRASTE & LEGIBILIDADE
   ========================================================================== */
.light-theme #prayer-sanctuary-view {
    color: #0f172a;
}
.light-theme #prayer-sanctuary-view h2 {
    color: #92400e !important; /* Amber 800 - alta legibilidade sobre céu claro */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}
.light-theme #prayer-sanctuary-view p {
    color: #1e3a5f !important; /* Navy/Slate escuro e nítido sobre o fundo celeste */
    font-weight: 700 !important;
}
.light-theme #btn-sanctuary-exit-top {
    background: #ffffff !important;
    border: 1.5px solid rgba(24, 62, 80, 0.20) !important;
    color: #0f172a !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.10) !important;
    font-weight: 800 !important;
}
.light-theme #btn-sanctuary-exit-top:hover {
    background: #f8fafc !important;
    border-color: rgba(24, 62, 80, 0.35) !important;
}
.light-theme #prayer-sanctuary-view .altar-card-porcelain {
    background: #ffffff !important;
    border: 1.5px solid rgba(217, 119, 6, 0.35) !important;
    box-shadow: 0 12px 32px -4px rgba(24, 62, 80, 0.14) !important;
}
.light-theme #sanctuary-breath-pill {
    background: #fffbeb !important;
    border: 1.5px solid #fde68a !important;
    color: #92400e !important;
    font-weight: 900 !important;
}
.light-theme #sanctuary-breath-countdown {
    color: #b45309 !important;
    font-weight: 900 !important;
}
.light-theme #btn-toggle-breath-exercise {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    border: 1px solid rgba(180, 83, 9, 0.4) !important;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.30) !important;
    font-weight: 900 !important;
}
.light-theme #btn-toggle-breath-exercise:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
}
.light-theme button[onclick="window.openPrayerWallModal()"] {
    background: #ffffff !important;
    border: 2px solid rgba(217, 119, 6, 0.40) !important;
    color: #92400e !important;
    box-shadow: 0 6px 20px rgba(24, 62, 80, 0.10) !important;
    font-weight: 900 !important;
}
.light-theme button[onclick="window.openPrayerWallModal()"]:hover {
    background: #fffdf5 !important;
    border-color: rgba(217, 119, 6, 0.70) !important;
}
.light-theme #btn-sanctuary-fireplace-toggle {
    background: #ffffff !important;
    border: 2px solid rgba(24, 62, 80, 0.16) !important;
    color: #0f172a !important;
    box-shadow: 0 6px 20px rgba(24, 62, 80, 0.08) !important;
    font-weight: 800 !important;
}
.light-theme #btn-sanctuary-fireplace-toggle:hover {
    background: #f8fafc !important;
    border-color: rgba(24, 62, 80, 0.30) !important;
}
.light-theme #sanctuary-toast {
    background: #ffffff !important;
    border: 2px solid rgba(217, 119, 6, 0.45) !important;
    box-shadow: 0 14px 36px rgba(24, 62, 80, 0.18) !important;
}
.light-theme #sanctuary-toast #sanctuary-toast-msg {
    color: #92400e !important;
    font-weight: 800 !important;
}
.light-theme #sanctuary-toast span {
    color: #334155 !important;
}

/* Modal Mural de Pedidos em Modo Claro */
.light-theme #modal-prayer-wall-popup .modal-sheet {
    background: #ffffff !important;
    border: 1.5px solid rgba(217, 119, 6, 0.30) !important;
    box-shadow: 0 25px 70px -10px rgba(15, 23, 42, 0.28) !important;
}
.light-theme #modal-prayer-wall-popup .grid.grid-cols-4 {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}
.light-theme #modal-prayer-wall-popup .grid.grid-cols-4 button.bg-amber-500\/20 {
    background: #ffffff !important;
    color: #92400e !important;
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.20) !important;
}
.light-theme #modal-prayer-wall-popup .grid.grid-cols-4 button:not(.bg-amber-500\/20) {
    color: #475569 !important;
    border-color: transparent !important;
}
.light-theme #modal-prayer-wall-popup .grid.grid-cols-4 button:not(.bg-amber-500\/20):hover {
    color: #0f172a !important;
    background: rgba(255, 255, 255, 0.7) !important;
}
.light-theme #sanctuary-tab-badge {
    color: #92400e !important;
    font-weight: 900 !important;
}
.light-theme #sanctuary-count-pill {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
    font-weight: 800 !important;
}
.light-theme #modal-prayer-wall-popup button[onclick="window.openNewPrayerModal()"] {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    border: 1px solid rgba(180, 83, 9, 0.3) !important;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.30) !important;
}
.light-theme #sanctuary-prayers-list > div {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05) !important;
}
.light-theme #sanctuary-prayers-list > div:hover {
    border-color: rgba(217, 119, 6, 0.45) !important;
    background: #ffffff !important;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.10) !important;
}
.light-theme #sanctuary-prayers-list p {
    color: #1e293b !important; /* Texto da oração preto azulado bem nítido */
    font-weight: 600 !important;
}
.light-theme #sanctuary-prayers-list .font-black {
    color: #0f172a !important; /* Nome do autor escuro e de alto contraste */
}
.light-theme #sanctuary-prayers-list .font-mono {
    color: #475569 !important; /* Handles e contadores legíveis */
}
.light-theme #sanctuary-prayers-list button[onclick*="intercedeForPrayer"] {
    background: #fef3c7 !important;
    border: 1.5px solid #f59e0b !important;
    color: #92400e !important;
    font-weight: 900 !important;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.15) !important;
}
.light-theme #sanctuary-prayers-list button[onclick*="intercedeForPrayer"]:hover {
    background: #fde68a !important;
    color: #78350f !important;
}
.light-theme #sanctuary-prayers-list button[onclick*="confirmDeleteSanctuaryPrayer"] {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #64748b !important;
}
.light-theme #sanctuary-prayers-list button[onclick*="confirmDeleteSanctuaryPrayer"]:hover {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #b91c1c !important;
}
.light-theme #modal-prayer-wall-popup button[data-i18n="prayers_close_btn"],
.light-theme #modal-prayer-wall-popup button[onclick="window.closePrayerWallModal()"].w-full {
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 800 !important;
}
.light-theme #modal-prayer-wall-popup button[data-i18n="prayers_close_btn"]:hover,
.light-theme #modal-prayer-wall-popup button[onclick="window.closePrayerWallModal()"].w-full:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Modal Novo Pedido de Oração em Modo Claro */
.light-theme #modal-new-prayer .modal-sheet {
    background: #ffffff !important;
    border: 1.5px solid rgba(217, 119, 6, 0.30) !important;
    box-shadow: 0 25px 70px -10px rgba(15, 23, 42, 0.28) !important;
}
.light-theme #btn-prayer-scope-comm.active,
.light-theme #modal-new-prayer #btn-prayer-scope-comm.bg-amber-500\/20 {
    background: #ffffff !important;
    border: 2px solid #f59e0b !important;
    color: #92400e !important;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.18) !important;
}
.light-theme #btn-prayer-scope-friends.active,
.light-theme #modal-new-prayer #btn-prayer-scope-friends.bg-amber-500\/20 {
    background: #ffffff !important;
    border: 2px solid #f59e0b !important;
    color: #92400e !important;
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.18) !important;
}
.light-theme #modal-new-prayer button:not(.bg-amber-500\/20)[id^="btn-prayer-scope"] {
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #475569 !important;
}
.light-theme #container-prayer-anonymous {
    background: #faf5ff !important;
    border: 1.5px solid #d8b4fe !important;
    box-shadow: 0 2px 6px rgba(147, 51, 234, 0.08) !important;
}
.light-theme #container-prayer-anonymous p:first-child {
    color: #581c87 !important;
    font-weight: 800 !important;
}
.light-theme #container-prayer-anonymous p:last-child {
    color: #7e22ce !important;
}
.light-theme #input-new-prayer-text {
    background: #f8fafc !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
}
.light-theme #input-new-prayer-text:focus {
    background: #ffffff !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}
.light-theme #modal-new-prayer button[data-i18n="btn_cancel"] {
    background: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
    font-weight: 800 !important;
}
.light-theme #modal-new-prayer button[data-i18n="btn_cancel"]:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   CARD DE CONVITES & BAÚ DA FRATERNIDADE (HUB DE COMPARTILHAMENTO)
   Adaptável em Dark Mode (Noturno Dourado) e Light Mode (Porcelana Dourada)
   ========================================================================== */
.invite-chest-card {
    background: linear-gradient(135deg, #1A243B 0%, #131C31 55%, #0E1628 100%);
    border: 1px solid rgba(251, 191, 36, 0.40);
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.60);
    color: #ffffff;
}
.invite-chest-glow-1 { background: rgba(251, 191, 36, 0.15); }
.invite-chest-glow-2 { background: rgba(249, 115, 22, 0.10); }
.invite-chest-title { color: #ffffff; }
.invite-chest-sub { color: #cbd5e1; }
.invite-progress-pill {
    background: rgba(251, 191, 36, 0.15);
    color: #fde047;
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.invite-progress-track {
    background: rgba(2, 6, 23, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.10);
}
.invite-milestone-card {
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.10);
}
.invite-milestone-title { color: #ffffff; }
.invite-milestone-card-2 {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.10) 0%, rgba(249, 115, 22, 0.10) 100%);
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.invite-milestone-title-2 { color: #fde047; }
.invite-milestone-rewards-2 { color: #ffffff; }
.invite-milestone-item { color: #fde047; }
.invite-action-btn {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.invite-action-btn:hover { background: rgba(255, 255, 255, 0.16); }
.invite-action-btn-icon {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #7dd3fc;
}
.invite-action-btn-icon:hover { background: rgba(255, 255, 255, 0.16); }
.invite-btn-pill.is-locked {
    background: rgba(255, 255, 255, 0.10);
    color: #94a3b8;
    border: 1px solid transparent;
}
.invite-btn-pill.is-claimed {
    background: rgba(16, 185, 129, 0.20);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Modo Claro: Card Branco Porcelana com Detalhes Dourados / Âmbar */
.light-theme .invite-chest-card,
body.light-theme .invite-chest-card,
html.light-theme .invite-chest-card {
    background: #ffffff !important;
    border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 10px 28px -4px rgba(24, 62, 80, 0.08), 0 2px 10px rgba(245, 158, 11, 0.08) !important;
    color: #0f172a !important;
}
.light-theme .invite-chest-glow-1, body.light-theme .invite-chest-glow-1 { background: rgba(251, 191, 36, 0.16) !important; }
.light-theme .invite-chest-glow-2, body.light-theme .invite-chest-glow-2 { background: rgba(249, 115, 22, 0.08) !important; }
.light-theme .invite-chest-title, body.light-theme .invite-chest-title { color: #0f172a !important; }
.light-theme .invite-chest-sub, body.light-theme .invite-chest-sub { color: #475569 !important; }
.light-theme .invite-progress-pill, body.light-theme .invite-progress-pill {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #b45309 !important;
    border: 1px solid rgba(245, 158, 11, 0.32) !important;
}
.light-theme .invite-progress-track, body.light-theme .invite-progress-track {
    background: #e2e8f0 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
}
.light-theme .invite-milestone-card, body.light-theme .invite-milestone-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}
.light-theme .invite-milestone-title, body.light-theme .invite-milestone-title { color: #0f172a !important; }
.light-theme .invite-milestone-card-2, body.light-theme .invite-milestone-card-2 {
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.70) 0%, rgba(255, 237, 213, 0.70) 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.06) !important;
}
.light-theme .invite-milestone-title-2, body.light-theme .invite-milestone-title-2 { color: #92400e !important; }
.light-theme .invite-milestone-rewards-2, body.light-theme .invite-milestone-rewards-2 { color: #334155 !important; }
.light-theme .invite-milestone-item, body.light-theme .invite-milestone-item { color: #b45309 !important; }
.light-theme .invite-action-btn {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}
.light-theme .invite-action-btn:hover { background: #f8fafc !important; }
.light-theme .invite-action-btn-icon {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0284c7 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}
.light-theme .invite-action-btn-icon:hover { background: #f8fafc !important; }
.light-theme .invite-btn-pill.is-locked {
    background: #e2e8f0 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
}
.light-theme .invite-btn-pill.is-claimed {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #047857 !important;
    border: 1px solid rgba(16, 185, 129, 0.32) !important;
}

/* Seletor de Tamanho de Fonte (Segmented Control) em Modo Claro */
.light-theme .font-scale-picker-track {
    background: rgba(24, 62, 80, 0.06) !important;
    border: 1px solid rgba(24, 62, 80, 0.12) !important;
}

/* --- BOTÕES PETROL APPLE HIG (#234b5e) --- */
.btn-petrol {
    background: var(--btn-petrol);
    color: #ffffff !important;
    font-weight: 800;
    border-radius: 9999px;
    padding: 9px 20px;
    box-shadow: 0 4px 14px rgba(35, 75, 94, 0.25);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    font-size: 12px;
}
.btn-petrol:hover {
    background: var(--btn-petrol-hover);
    transform: translateY(-1px);
}
.btn-petrol:active {
    background: var(--btn-petrol-active);
    transform: translateY(2px) scale(0.97);
    box-shadow: 0 1px 4px rgba(35, 75, 94, 0.2);
}

/* --- PALCO DO MASCOTE NO ALTAR (#tab-pet) --- */
#tab-pet {
    background: transparent;
    box-sizing: border-box;
}
#tab-pet::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
@media (max-width: 767px), (orientation: portrait) {
    #tab-pet {
        padding-bottom: max(calc(env(safe-area-inset-bottom, 0px) + 86px), 94px) !important;
    }
}
#tab-pet.active {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
}
.light-theme #tab-pet {
    background: transparent;
}

#pet-stage-anchor {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 150px;
    max-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: visible;
    z-index: 22;
    margin: 0.35rem 0;
}

/* Sombra de solo ambiente realista com respiração */
.hero-ground-shadow {
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.26) 0%, rgba(15, 23, 42, 0.08) 50%, transparent 75%);
    filter: blur(4px);
    pointer-events: none;
    z-index: 12;
    animation: mascotGroundShadowPulse 4s ease-in-out infinite;
}
.light-theme .hero-ground-shadow {
    background: radial-gradient(ellipse at center, rgba(35, 75, 94, 0.30) 0%, rgba(35, 75, 94, 0.07) 50%, transparent 75%);
}
@keyframes mascotGroundShadowPulse {
    0%, 100% { transform: translateX(-50%) scaleX(1) scaleY(1); opacity: 0.85; }
    50% { transform: translateX(-50%) scaleX(0.85) scaleY(0.8); opacity: 0.5; }
}

/* Cápsula Unificada de Jogo e Chaves */
.pet-play-capsule {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    border-radius: 9999px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.light-theme .pet-play-capsule {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(24, 62, 80, 0.16) !important;
    box-shadow: 0 6px 20px rgba(24, 62, 80, 0.10) !important;
    color: #0f172a !important;
}
.light-theme .pet-play-capsule span,
.light-theme .pet-play-capsule #chama-game-btn-title,
.light-theme .pet-play-capsule #chama-game-btn-sub {
    color: #0f172a !important;
}
.light-theme .pet-play-capsule .fa-lock {
    color: #475569 !important;
}
.light-theme .pet-play-capsule .fa-key {
    color: #d97706 !important;
}
.light-theme .pet-play-capsule #altar-keys-count {
    color: #b45309 !important;
    font-weight: 900 !important;
}

/* Barra de XP do Mascote no Altar com Alto Contraste */
.light-theme #tab-pet #xp-bar-track {
    background: rgba(24, 62, 80, 0.14) !important;
    border: 1px solid rgba(24, 62, 80, 0.16) !important;
}
.light-theme #tab-pet #xp-bar {
    background: linear-gradient(90deg, #0284c7 0%, #0369a1 100%) !important;
    box-shadow: 0 1px 6px rgba(2, 132, 199, 0.40) !important;
}

/* --- TOGGLE SWITCHES APPLE HIG STYLE (ALTO CONTRASTE LIGHT & DARK) --- */
.apple-toggle-switch {
    width: 46px;
    height: 26px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.24);
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease;
    flex-shrink: 0;
    outline: none;
}
.apple-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.30), 0 0 1px rgba(0, 0, 0, 0.20);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.apple-toggle-switch:checked {
    background: #0284c7 !important;
    border-color: #0369a1 !important;
}
.apple-toggle-switch:checked::after {
    transform: translateX(20px);
}

/* Light Mode: Alto Contraste com Borda Nítida */
.light-theme .apple-toggle-switch {
    background: #cbd5e1 !important;
    border: 1.5px solid #94a3b8 !important;
}
.light-theme .apple-toggle-switch::after {
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25), 0 0 1px rgba(15, 23, 42, 0.20) !important;
}
.light-theme .apple-toggle-switch:checked {
    background: #254d60 !important;
    border-color: #183848 !important;
}
.pet-play-capsule:active {
    transform: scale(0.96);
}

/* Card Sereno de Vitalidade (decluttering dos 4 gráficos) */
.serenity-vitality-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 12px 16px;
    box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
}
.light-theme .serenity-vitality-card {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(35, 75, 94, 0.08);
    box-shadow: 0 12px 32px -4px rgba(35, 75, 94, 0.08), 0 4px 12px -2px rgba(35, 75, 94, 0.03);
}

/* --- OS 3 BOTÕES DE AÇÃO FLUTUANTES APPLE HIG (Alimentar, Orar, Ler Bíblia) --- */
.apple-action-dock {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}
.btn-apple-action {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -3px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, border-color 0.2s;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.light-theme .btn-apple-action {
    background: #ffffff;
    border-color: rgba(35, 75, 94, 0.08);
    box-shadow: 0 10px 24px -4px rgba(35, 75, 94, 0.09), 0 2px 8px -1px rgba(35, 75, 94, 0.04);
}
.btn-apple-action:active {
    transform: translateY(3px) scale(0.96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.btn-apple-action .action-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    font-size: 15px;
    transition: transform 0.2s ease;
}
.btn-apple-action:hover .action-icon-circle {
    transform: scale(1.08);
}
.btn-apple-action .action-label {
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    color: var(--text-title);
}
.btn-apple-action .action-sub {
    font-size: 9px;
    font-weight: 800;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Cores dos Ícones de Ação Apple */
.icon-feed { background: rgba(251, 133, 0, 0.14); color: #fb8500; border: 1px solid rgba(251, 133, 0, 0.25); }
.icon-pray { background: rgba(168, 85, 247, 0.14); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.25); }
.icon-bible { background: rgba(2, 132, 199, 0.14); color: #0284c7; border: 1px solid rgba(2, 132, 199, 0.25); }
.icon-wind { background: rgba(56, 189, 248, 0.14); color: #0284c7; border: 1px solid rgba(56, 189, 248, 0.25); }
.icon-heal { background: rgba(34, 197, 94, 0.14); color: #16a34a; border: 1px solid rgba(34, 197, 94, 0.25); }

/* --- O PROVADOR DA CHAMA & ARMAZÉM (Party Animals / Apple Store Grade) --- */
.shop-hero-showcase-container {
    height: 256px;
    min-height: 244px;
    max-height: 276px;
    padding: 14px 14px 10px 14px;
    background: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, 0.10) 0%, rgba(160, 203, 229, 0.04) 50%, transparent 75%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
@media (max-height: 700px) {
    .shop-hero-showcase-container {
        height: 228px;
        min-height: 218px;
        max-height: 240px;
        padding: 10px 12px 8px 12px;
    }
}
.light-theme .shop-hero-showcase-container {
    background: radial-gradient(circle at 50% 30%, rgba(160, 203, 229, 0.28) 0%, rgba(232, 243, 250, 0.12) 55%, transparent 80%);
}
.shop-stage-actor-wrapper {
    width: 210px;
    height: 176px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 34px;
    position: relative;
    margin: auto auto;
    overflow: visible;
}
.shop-hero-flame-actor {
    position: relative;
    width: 112px;
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    margin: 0 auto;
    transform: translateY(-2px);
}
.shop-hero-ground-shadow {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 114px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.32) 0%, transparent 70%);
    filter: blur(3px);
    z-index: 5;
    animation: mascotGroundShadowPulse 3.5s ease-in-out infinite;
}
.light-theme .shop-hero-ground-shadow {
    background: radial-gradient(ellipse at center, rgba(35, 75, 94, 0.35) 0%, transparent 70%);
}
.shop-stage-actor-wrapper .shop-hero-pedestal {
    bottom: 6px !important;
    left: 50% !important;
    z-index: 12 !important;
    transform: translateX(-50%) scale(1.06);
}
.shop-tryon-action-bar {
    margin-top: auto !important;
    z-index: 25;
    position: relative;
}

/* Card de Produto no Catálogo da Loja (Grade Fluida e Responsiva) */
.shop-card-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 120px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, border-color 0.2s;
    cursor: pointer;
    box-sizing: border-box;
}
.light-theme .shop-card-item {
    background: #ffffff;
    border-color: rgba(35, 75, 94, 0.08);
    box-shadow: 0 8px 22px -4px rgba(35, 75, 94, 0.07);
}
.shop-card-item:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
}
.shop-card-item:active {
    transform: scale(0.96);
}
.shop-card-item.is-trying-on {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 2px #38bdf8, 0 10px 24px -4px rgba(56, 189, 248, 0.3) !important;
}
.light-theme .shop-card-item.is-trying-on {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 2px #0284c7, 0 10px 24px -4px rgba(2, 132, 199, 0.25) !important;
    background: #f0f8ff;
}

.shop-card-category {
    font-size: 7.5px !important;
    font-weight: 900 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1 !important;
    margin-top: 2px;
}

.shop-card-title {
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    margin-top: 2px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#modal-shop.overlay-modal,
#modal-settings.overlay-modal {
    position: fixed !important;
    height: 100% !important;
    inset: 0 !important;
}

#modal-shop .modal-sheet {
    height: 88vh !important;
    max-height: 88vh !important;
}

#modal-settings .modal-sheet {
    height: 82vh !important;
    max-height: 82vh !important;
}

/* Pílula de Categoria na Loja */
.shop-cat-pill {
    padding: 7px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    cursor: pointer;
}
.light-theme .shop-cat-pill {
    background: #ffffff;
    border-color: rgba(35, 75, 94, 0.09);
    color: #4a6a7c;
}
.shop-cat-pill.active {
    background: #38bdf8;
    color: #0f172a;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35);
}
.light-theme .shop-cat-pill.active {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.28);
}

/* --- HEADER PILLS & HARMONIOUS THEMED CARDS --- */
.header-dock-pill {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: var(--text-title);
    transition: all 0.2s ease;
}
.light-theme .header-dock-pill {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(35, 75, 94, 0.08);
    box-shadow: 0 2px 10px rgba(35, 75, 94, 0.06);
    color: #16374a;
}
.header-dock-pill:hover {
    background: var(--bg-elevated);
}
.light-theme .header-dock-pill:hover {
    background: #ffffff;
}

.altar-card-porcelain {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.12);
    color: var(--text-title);
}
.light-theme .altar-card-porcelain {
    background: #ffffff;
    border-color: rgba(35, 75, 94, 0.06);
    box-shadow: 0 10px 28px -4px rgba(35, 75, 94, 0.08);
    color: #16374a;
}

.altar-action-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-title);
}
.light-theme .altar-action-chip {
    background: #f8fafc;
    border-color: rgba(35, 75, 94, 0.07);
    color: #16374a;
}
.altar-action-chip:hover {
    background: rgba(255, 255, 255, 0.1);
}
.light-theme .altar-action-chip:hover {
    background: #f1f5f9;
}

/* --- ENTRADAS DE TEXTO & FORMULÁRIOS SEGUROS E VISÍVEIS --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea {
    font-size: 16px !important;
    border-radius: 14px;
    color: var(--text-title) !important;
    background-color: var(--input-bg) !important;
    border: 1.5px solid var(--border-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: text !important;
    -webkit-user-select: text !important;
}
@media (min-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    textarea {
        font-size: 15px !important;
    }
}
.light-theme input[type="text"],
.light-theme input[type="email"],
.light-theme input[type="password"],
.light-theme textarea {
    background-color: #ffffff !important;
    border-color: rgba(22, 55, 74, 0.16);
    color: #16374a !important;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
    outline: none !important;
}
input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.75;
}

/* Inputs transparentes e embutidos em cápsulas arredondadas (Busca, etc) */
input.bg-transparent,
#lounge-invite-input,
.search-pill-input,
textarea.bg-transparent {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
input.bg-transparent:focus,
#lounge-invite-input:focus,
.search-pill-input:focus,
textarea.bg-transparent:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* --- ESPAÇAMENTO SEGURO DA BÍBLIA & MENTOR IA --- */
#tab-bible {
    padding-bottom: 140px !important;
}
.ai-fab-btn {
    height: 38px !important;
    padding: 0 14px 0 6px !important;
    bottom: max(calc(env(safe-area-inset-bottom, 0px) + 72px), 80px) !important;
    right: 14px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    z-index: 65 !important;
}
@media (min-width: 1024px) {
    .ai-fab-btn {
        bottom: 32px !important;
        right: 32px !important;
    }
}

/* ==========================================================================
   ELEVAÇÃO DE CONTRASTE & LEGIBILIDADE NO MODO CLARO (PORCELANA / CELESTE)
   ========================================================================== */
.light-theme .theme-text-title {
    color: #0f172a !important;
}
.light-theme .theme-text-body {
    color: #1e293b !important;
}
.light-theme .theme-text-muted {
    color: #475569 !important;
}
.light-theme .text-slate-200,
.light-theme .text-slate-300 {
    color: #1e293b !important;
}
.light-theme .text-slate-400,
.light-theme .text-slate-500 {
    color: #475569 !important;
}
.light-theme .text-purple-300,
.light-theme .text-purple-400 {
    color: #6b21a8 !important;
}
.light-theme .bg-purple-500\/15 {
    background-color: rgba(147, 51, 234, 0.12) !important;
}
.light-theme .border-purple-500\/30,
.light-theme .border-purple-500\/35 {
    border-color: rgba(147, 51, 234, 0.28) !important;
}
.light-theme .text-amber-300,
.light-theme .text-amber-400,
body.light-theme .text-amber-300,
body.light-theme .text-amber-400 {
    color: #b45309 !important;
}
.light-theme .text-sky-300 {
    color: #0369a1 !important;
}

/* Bíblia e Versículos */
.bible-text {
    line-height: 1.85 !important;
    font-size: var(--bible-font-size, 1.05rem) !important;
}
.bible-verse {
    border-radius: 4px;
    padding: 1px 2px;
    font-size: inherit !important;
    transition: background-color 0.2s ease;
}
.bible-verse sup {
    font-weight: 800;
    font-size: 0.72rem;
    color: var(--accent-gold);
    margin-right: 3px;
    user-select: none;
}
.light-theme .bible-text {
    color: #0f172a !important;
}
.light-theme .bible-verse sup {
    color: #b45309 !important;
}
.light-theme #bible-content {
    background: #ffffff !important;
    border-color: rgba(24, 62, 80, 0.12) !important;
    color: #0f172a !important;
    box-shadow: 0 10px 30px rgba(24, 62, 80, 0.06) !important;
}
.light-theme #bible-content h2 span {
    color: #0f172a !important;
}
.light-theme #bible-content h2 span:first-child {
    color: #0284c7 !important;
}

/* Trilha, Portal e Modais no Modo Claro */
.light-theme .nt-portal-card {
    background: #ffffff !important;
    border: 2px solid rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 10px 30px rgba(24, 62, 80, 0.08) !important;
}
.light-theme .floating-start-tag {
    background: #ffffff !important;
    color: #b45309 !important;
    box-shadow: 0 4px 14px rgba(24, 62, 80, 0.2) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}
.light-theme .floating-start-tag::after {
    background: #ffffff !important;
}
.light-theme .ai-msg-bubble {
    color: #0f172a !important;
}

/* Prevenção de múltiplas setas no seletor de idiomas e selects */
select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}
select::-ms-expand {
    display: none !important;
}
#settings-lang {
    background-image: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* Quarto Secreto - Esconde controles normais do Altar e, no mobile/retrato, oculta header, barra inferior e outras abas para manter foco total */
body.in-prayer-sanctuary #app-header,
body.in-prayer-sanctuary .bottom-nav-bar,
body.in-prayer-sanctuary #pet-bottom-controls,
body.in-prayer-sanctuary #btn-flame-speech-bubble,
body.in-prayer-sanctuary #flame-speech-card,
body.in-prayer-sanctuary #tab-journey,
body.in-prayer-sanctuary #tab-bible,
body.in-prayer-sanctuary #tab-friends {
    display: none !important;
}


/* Teclado aberto em campo de texto inline ou modal no celular:
   oculta imediatamente a barra inferior e flutuantes para nunca subirem junto com o teclado
   (inclusive sob interactive-widget=resizes-content no Android). */
@media (max-width: 767px), (max-height: 499px) {
    body.inline-keyboard-open .bottom-nav-bar,
    body.inline-keyboard-open .ai-fab-btn,
    body.inline-keyboard-open #chama-consent-bar,
    body.inline-keyboard-open #bible-verse-toolbar,
    body.inline-keyboard-open #bible-audio-dock,
    body.mobile-keyboard-open .bottom-nav-bar,
    body.mobile-keyboard-open .ai-fab-btn,
    body.mobile-keyboard-open #bible-verse-toolbar,
    body.mobile-keyboard-open #bible-audio-dock {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: none !important;
    }
    /* 16px evita o zoom automático do iOS ao focar o campo, que desalinha o layout */
    #lounge-invite-input {
        font-size: 16px !important;
    }
}

/* Anéis com leve brilho de luz nos avatares das salas devocionais */
.dev-avatar-ring-accepted {
    border: 2px solid #22c55e !important;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.72), 0 0 16px rgba(34, 197, 94, 0.28) !important;
}
.dev-avatar-ring-pending {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.72), 0 0 16px rgba(239, 68, 68, 0.28) !important;
}
