:root {
    --bg-deep: #08090b;
    --bg-surface: #101216;
    --bg-surface-elevated: rgba(22, 25, 31, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.035);
    --glass-border: rgba(255, 255, 255, 0.045);
    --glass-border-active: rgba(203, 190, 255, 0.35);
    
    --primary-cosmic: #cbbeff;
    --primary-glow: rgba(203, 190, 255, 0.3);
    --primary-container: #473b7b;
    --primary-light: #e7deff;
    
    --secondary-teal: #00dbe9;
    --secondary-glow: rgba(0, 219, 233, 0.25);
    
    --accent-gold: #ffd56b;
    
    --text-main: #f0f1f5;
    --text-muted: #9b9aab;
    --text-dim: #646375;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* SIN SCROLL */
}

body {
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(circle at 50% -10%, rgba(71, 59, 123, 0.35) 0%, transparent 60%),
        radial-gradient(circle at 10% 80%, rgba(0, 219, 233, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 90% 60%, rgba(203, 190, 255, 0.06) 0%, transparent 40%);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrado horizontal automático en viewport */
    position: relative;
    padding-bottom: 0;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Tipografía */
h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Glassmorphism Panels */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.glow-cosmic {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(203, 190, 255, 0.08);
}

.glow-teal {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(0, 219, 233, 0.08);
}

.glow-purple {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(203, 190, 255, 0.08);
}

/* Header Suavizado Zen */
.app-header {
    width: 100%;
    max-width: 480px;
    height: 48px;
    flex-shrink: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(10px, 2.5vw, 18px);
    box-sizing: border-box;
    background: rgba(8, 9, 13, 0.42);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.035);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0, 219, 233, 0.45)) drop-shadow(0 0 12px rgba(203, 190, 255, 0.35));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.brand-badge:hover .brand-logo-img {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 0 10px rgba(0, 219, 233, 0.65)) drop-shadow(0 0 16px rgba(203, 190, 255, 0.5));
}

.brand-title {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: none;
    font-weight: 700;
    color: rgba(203, 190, 255, 0.95);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    font-size: 11.5px;
    color: rgba(240, 241, 245, 0.85);
    transition: all 0.25s ease;
}

.user-badge:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Contenedor Principal (Cero Scroll - Adaptación Fluida 100% Viewport) */
.app-container {
    width: 100%;
    max-width: 480px;
    height: calc(100dvh - 46px - 48px - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 46px - 48px - env(safe-area-inset-bottom, 0px));
    margin: 0 auto;
    padding: clamp(1px, 0.3vh, 4px) clamp(8px, 2vw, 16px);
    display: flex;
    flex-direction: column;
    align-self: center;
    box-sizing: border-box;
    overflow: hidden; /* CERO SCROLL REQUERIDO */
    position: relative;
}

.app-container.view-calendar-active {
    overflow-y: auto;
}

.app-container::-webkit-scrollbar {
    display: none;
}

/* Vistas */
.app-view {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    box-sizing: border-box;
}

#viewPlayer, #viewCalendar {
    justify-content: space-between;
}

#viewPlayer.active {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly; /* Distribución armónica sin huecos negros */
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    gap: 0;
    box-sizing: border-box;
    padding: clamp(1px, 0.3vh, 4px) 0;
}

.app-view.active {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: fadeIn 0.25s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Luna 3D / Geométrica Visual */
.moon-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    flex-shrink: 1;
    min-height: 0;
    width: 100%;
}

.moon-stage .subtle-divider {
    margin: clamp(2px, 0.4vh, 5px) 0;
}

.moon-container {
    position: relative;
    width: clamp(72px, 13vh, 110px);
    height: clamp(72px, 13vh, 110px);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease-out;
    flex-shrink: 1;
}

.moon-sphere {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moon-aura {
    position: absolute;
    inset: -18px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(203, 190, 255, 0.32) 0%, rgba(0, 219, 233, 0.08) 50%, transparent 72%);
    pointer-events: none;
    opacity: 0.65;
    transition: transform 0.1s ease, opacity 0.2s ease;
}

.moon-info {
    text-align: center;
    margin-top: 2px;
    margin-bottom: clamp(2px, 0.6vh, 6px);
}

.moon-phase-tag {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary-cosmic);
    font-weight: 600;
}

.moon-illumination {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 1px 0;
    line-height: 1.1;
}

.moon-distance-badge {
    display: none !important;
}

.moon-zodiac {
    display: none !important;
}

/* Subtítulos de sección y links zen */
.section-subtitle {
    font-size: 11px;
    color: var(--primary-light);
    font-style: italic;
    line-height: 1.35;
    opacity: 0.92;
    margin-top: 2px;
    letter-spacing: 0.01em;
}

.affirmation-subtitle {
    color: #ffd56b;
    opacity: 0.95;
    font-size: 11.5px;
}

.affirmation-banner {
    font-size: clamp(10.5px, 1.4vh, 12px);
    color: #ffd56b;
    font-style: italic;
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
    margin: clamp(2px, 0.4vh, 5px) auto clamp(3px, 0.5vh, 6px) auto;
    padding: 0 4px;
    display: block;
    width: 100%;
    text-shadow: 0 0 10px rgba(255, 213, 107, 0.35);
}

.sign-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 219, 233, 0.08);
    border: 1px solid rgba(0, 219, 233, 0.22);
    color: var(--secondary-teal);
    font-size: 10.5px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.sign-link-badge:hover {
    background: rgba(0, 219, 233, 0.18);
    border-color: var(--secondary-teal);
    box-shadow: 0 0 10px rgba(0, 219, 233, 0.25);
    transform: translateY(-1px);
}

/* Flujo Zen Continuo (Cero bordes de ficha, cero scroll) */
.sanctuary-flow {
    padding: clamp(1px, 0.3vh, 3px) 2px 0 2px;
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 0.35vh, 4px);
    flex-shrink: 0;
    position: relative;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

/* Bloque Inferior Anclado (Adaptado 100% al Viewport) */
.player-bottom-group {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;
    min-height: 0;
    margin-top: 0;
}

.player-bottom-group > .subtle-divider:first-child {
    margin: clamp(2px, 0.4vh, 5px) 0;
}

/* Estructura Zen Minimalista del Reproductor */
.zen-player-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 2px;
    margin-bottom: 2px;
}

.zen-track-name {
    font-size: clamp(11.5px, 1.5vh, 13px);
    font-weight: 600;
    color: var(--primary-light);
    letter-spacing: 0.01em;
    text-align: left;
    max-width: 65%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zen-player-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    margin-bottom: 2px;
}

.zen-actions-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sanctuary-freq-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.freq-tag-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-tag {
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(203, 190, 255, 0.12);
    border: 1px solid rgba(203, 190, 255, 0.2);
    color: var(--primary-light);
    font-weight: 600;
}

.freq-number-display {
    font-size: clamp(22px, 3vh, 27px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.05;
    margin: 0;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
}

.freq-hz {
    font-size: 13.5px;
    color: var(--primary-cosmic);
    font-weight: 400;
}

.vibration-title {
    font-size: 11.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Secciones fluidas continuas (cero bordes de fichas o tarjetas, cero scroll) */
.seamless-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-top: none !important;
    border-radius: 0 !important;
    padding: clamp(2px, 0.4vh, 5px) 2px !important;
}

.horoscope-section {
    margin-top: 0;
    padding: 1px 2px 2px 2px !important;
}

.energy-section {
    margin-top: 0;
    margin-bottom: 0;
    padding: 1px 2px !important;
}

.energy-section + .subtle-divider {
    margin: clamp(2px, 0.4vh, 4px) 0 !important;
}

/* Compatibilidad */
.sanctuary-panel { background: transparent !important; border: none !important; box-shadow: none !important; }
.freq-hero-card { display: none; }
.player-panel { display: none; }

.player-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.now-playing-info {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.now-playing-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
}

.now-playing-title {
    font-size: 12px;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-play {
    width: clamp(30px, 4vh, 35px);
    height: clamp(30px, 4vh, 35px);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-cosmic), #9d85ff);
    border: none;
    outline: none;
    color: #120f29;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--primary-glow);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
    flex-shrink: 0;
}

.btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(203, 190, 255, 0.45);
}

.btn-play:active {
    transform: scale(0.95);
}

.btn-icon-action {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-icon-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--glass-border-active);
    color: #fff;
}

/* Modo de Audio Selector */
.audio-mode-selector {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    padding: 2px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border);
}

.mode-btn {
    flex: 1;
    padding: 3px 6px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 9.5px;
    font-weight: 500;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mode-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Selector de Duración */
.duration-selector-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 1px 0;
}

.duration-label {
    font-size: 9.5px;
    color: var(--text-dim);
    font-weight: 600;
}

.duration-pills {
    display: flex;
    align-items: center;
    gap: 3px;
}

.duration-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.duration-btn.active {
    background: rgba(203, 190, 255, 0.15);
    border-color: var(--primary-cosmic);
    color: #ffffff;
}

.duration-btn.premium-locked {
    opacity: 0.8;
}

.pill-badge {
    font-size: 7.5px;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.pill-free {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

.pill-lunar {
    background: rgba(0, 219, 233, 0.2);
    color: var(--secondary-teal);
    border: 1px solid rgba(0, 219, 233, 0.3);
}

.pill-master {
    background: linear-gradient(135deg, rgba(255, 213, 107, 0.25), rgba(255, 170, 0, 0.25));
    color: #ffd56b;
    border: 1px solid rgba(255, 213, 107, 0.4);
}

.playback-timer-display {
    font-size: 9px;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: monospace;
    margin-top: 1px;
}

/* Panel de Cielo Cósmico Zen (Tonalidades Rosas / Celestes con Estrellas) */
.visualizer-box {
    width: 100%;
    height: clamp(36px, 6vh, 60px);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    background: rgba(15, 13, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    margin: 4px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.visualizer-box:hover {
    border-color: rgba(203, 190, 255, 0.25);
    box-shadow: 0 6px 20px rgba(186, 158, 255, 0.12);
}

.visualizer-box.is-fullscreen,
.visualizer-box:fullscreen,
.visualizer-box:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    z-index: 999999 !important;
    background: #0f0d1a !important;
    cursor: pointer;
}

.visualizer-fullscreen-hint {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 16, 36, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-dim);
    font-size: 11px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.visualizer-box.is-fullscreen .visualizer-fullscreen-hint,
.visualizer-box:fullscreen .visualizer-fullscreen-hint {
    opacity: 0.9;
    animation: fadeOutHint 3.8s forwards;
}

@keyframes fadeOutHint {
    0% { opacity: 0.9; }
    70% { opacity: 0.9; }
    100% { opacity: 0; }
}

#waveCanvas {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
}

/* Separadores Sutiles Cósmicos (Homologados entre Vistas) */
.subtle-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.08) 15%, 
        rgba(203, 190, 255, 0.24) 50%, 
        rgba(255, 255, 255, 0.08) 85%, 
        rgba(255, 255, 255, 0) 100%
    );
    margin: clamp(4px, 0.6vh, 8px) 0;
    flex-shrink: 0;
}

/* Secciones Fluidas (Cero bordes de ficha, cero cajas o cuadrantes) */
.horoscope-card, .horoscope-section {
    padding: clamp(2px, 0.3vh, 4px) 2px;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex-shrink: 0;
}

.zodiac-select-dropdown {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 1px 6px;
    font-size: 10px;
    cursor: pointer;
    outline: none;
}

.horoscope-card .energy-text,
.horoscope-section .energy-text {
    font-size: clamp(9.5px, 1.2vh, 11px);
    color: var(--text-main);
    line-height: 1.35;
    margin: clamp(1px, 0.25vh, 3px) 0;
}

#horoscopeRitualText {
    font-size: clamp(8.5px, 1.1vh, 10px);
    color: var(--primary-light);
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: clamp(1px, 0.2vh, 3px);
    line-height: 1.35;
}

/* Sección Energía & Afirmación (Fluida, Cero bordes de ficha) */
.energy-card, .energy-section {
    padding: clamp(2px, 0.3vh, 4px) 2px;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex-shrink: 0;
}

.energy-title {
    font-size: clamp(9.5px, 1.2vh, 11px);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-cosmic);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.energy-card .energy-text,
.energy-section .energy-text {
    font-size: clamp(9px, 1.15vh, 10.5px);
    color: var(--text-muted);
    line-height: 1.35;
}

.affirmation-text {
    margin-top: clamp(1px, 0.2vh, 3px);
    padding-top: clamp(1px, 0.2vh, 3px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-style: italic;
    font-size: clamp(9px, 1.15vh, 10.5px);
    color: var(--primary-light);
    line-height: 1.35;
}

/* Calendario Cósmico Homologado (Flujo Continuo, Calendario Arriba, El Resto Abajo) */
.stats-row-flow {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: clamp(2px, 0.4vh, 6px) 16px;
    background: transparent;
    border: none;
    flex-shrink: 0;
}

.stat-flow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 8.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 1px;
}

.stat-value {
    font-size: clamp(14px, 1.8vh, 18px);
    font-weight: 700;
    color: var(--primary-cosmic);
    font-family: var(--font-heading);
}

.stat-unit {
    font-size: 8.5px;
    color: var(--text-dim);
}

/* 1. Panel del Calendario Arriba (Sin Ficha, Sin Bordes) */
.calendar-panel {
    padding: clamp(1px, 0.25vh, 4px) 2px;
    display: flex;
    flex-direction: column;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

/* 2. Detalle del Día Seleccionado (Espacioso, Ordenado y Zen) */
#selectedDayDetail, .calendar-detail-flow {
    padding: clamp(12px, 1.8vh, 18px) 8px !important;
    background: transparent !important;
    border: none !important;
    border-left: none !important;
    box-shadow: none !important;
    flex-shrink: 0;
}

.cal-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: clamp(10px, 1.4vh, 14px);
    gap: 12px;
}

.cal-date-label {
    font-size: clamp(10px, 1.25vh, 11px);
    text-transform: uppercase;
    color: var(--primary-cosmic);
    letter-spacing: 0.08em;
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

.cal-phase-title {
    font-size: clamp(15px, 2vh, 17px);
    color: #ffffff;
    font-family: var(--font-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-illum-tag {
    font-size: 12px;
    color: var(--secondary-teal);
    font-weight: 500;
}

.cal-freq-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: clamp(8px, 1.1vh, 12px) 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin: clamp(12px, 1.6vh, 16px) 0;
}

.cal-vibration-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(12px, 1.5vh, 13.5px);
    color: #ffffff;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cal-hz-display {
    font-size: clamp(15px, 2vh, 17px);
    font-weight: 700;
    color: var(--primary-light);
    font-family: var(--font-heading);
    flex-shrink: 0;
    white-space: nowrap;
    text-align: right;
}

.cal-hz-unit {
    font-size: 12px;
    color: var(--secondary-teal);
    font-weight: 600;
}

.cal-transit-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: clamp(8px, 1.1vh, 11px) 14px;
    margin: clamp(10px, 1.4vh, 14px) 0;
}

.cal-transit-card .cal-meta-k {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-dim);
    font-weight: 600;
}

.cal-transit-card .cal-meta-v {
    font-size: clamp(11.5px, 1.45vh, 13px);
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
}

.cal-meta-dot {
    color: var(--text-dim);
    margin: 0 4px;
}

.cal-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(8px, 1.2vw, 14px);
    margin: clamp(12px, 1.6vh, 16px) 0;
}

.cal-meta-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: clamp(7px, 1vh, 10px) clamp(8px, 1.2vw, 12px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-meta-k {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    font-weight: 600;
}

.cal-meta-v {
    font-size: clamp(10.5px, 1.35vh, 12px);
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-meta-v small {
    color: var(--text-muted);
    font-size: 9.5px;
}

.cal-affirmation-banner {
    font-size: clamp(12px, 1.5vh, 13px);
    font-style: italic;
    color: #ffd56b;
    text-align: center;
    line-height: 1.6;
    margin: clamp(16px, 2.2vh, 22px) auto;
    padding: 0 12px;
    max-width: 90%;
    text-shadow: 0 0 10px rgba(255, 213, 107, 0.25);
}

/* Botón de Reproducción Cósmico (Espacioso y Centrado) */
.btn-play-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 28px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-cosmic), #8a64ff);
    border: none;
    outline: none;
    color: #0c0a18;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(110, 68, 255, 0.35);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
    margin: 4px auto 0 auto;
}

.btn-play-compact:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(110, 68, 255, 0.5);
}

.btn-play-compact:active {
    transform: scale(0.97);
}

.tip-flow, .tip-card {
    padding: clamp(6px, 1vh, 10px) 12px;
    margin: 4px 0 0 0;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.035) !important;
    border-radius: var(--radius-sm);
    box-shadow: none !important;
    text-align: center;
    flex-shrink: 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(2px, 0.4vh, 5px);
}

.btn-nav-month {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-nav-month:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--glass-border-active);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: clamp(7.5px, 0.95vh, 9px);
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: clamp(1px, 0.3vh, 3px);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: clamp(1px, 0.3vh, 3px);
    flex: 1;
}

.calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: clamp(8.5px, 1.05vh, 10.5px);
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    min-height: clamp(18px, 2.8vh, 28px);
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.07);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    border-color: var(--primary-cosmic);
    font-weight: 700;
}

.calendar-day.selected {
    background: var(--primary-container);
    border-color: var(--primary-cosmic);
    color: #ffffff;
}

.calendar-day.meditated {
    background: radial-gradient(circle, rgba(0, 219, 233, 0.18) 0%, rgba(203, 190, 255, 0.06) 100%);
    border-color: var(--secondary-teal);
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 219, 233, 0.2);
}

.calendar-day.meditated::after {
    content: '★';
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 8px;
    color: #ffd56b;
    text-shadow: 0 0 8px #ffd56b, 0 0 14px var(--secondary-teal);
}

.calendar-day.future.disabled {
    opacity: 0.2;
    cursor: not-allowed !important;
    pointer-events: none;
    background: transparent;
    border-color: transparent;
    color: var(--text-dim);
}

.tip-card {
    padding: clamp(3px, 0.5vh, 6px) 10px;
    margin: 0;
    flex-shrink: 0;
}


/* Botón de Calendario en Header Superior */
.header-cal-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 11.5px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-cal-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-cosmic);
    color: #ffffff;
}

.header-cal-btn.active {
    background: rgba(203, 190, 255, 0.2);
    border-color: var(--primary-cosmic);
    color: var(--primary-light);
}

/* Barra de Navegación Inferior (Siempre Fija y Visible con Safe Area en iOS) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(52px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(14px, 3.5vw, 24px) env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    background: rgba(10, 11, 16, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 18px;
    border-radius: var(--radius-sm);
}

.nav-item .material-symbols-outlined {
    font-size: 19px;
    font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 20;
    opacity: 0.72;
    transition: transform 0.2s ease, opacity 0.2s ease, text-shadow 0.2s ease;
}

.nav-item.active {
    color: var(--primary-cosmic);
}

.nav-item.active .material-symbols-outlined {
    transform: scale(1.05);
    font-variation-settings: 'FILL' 0, 'wght' 250, 'GRAD' 0, 'opsz' 20;
    opacity: 1;
    text-shadow: 0 0 10px rgba(186, 158, 255, 0.4);
}

/* Modal de Autenticación */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-container {
    width: 100%;
    max-width: 380px;
    padding: 24px;
    border-radius: var(--radius-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary-cosmic);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-cosmic), #9d85ff);
    color: #0d0b1a;
    font-weight: 600;
    font-family: var(--font-heading);
    border: none;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    box-shadow: 0 4px 16px var(--primary-glow);
}

.auth-toggle {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-toggle a {
    color: var(--primary-cosmic);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

/* --- ESTILOS PASE CÓSMICO & FREEMIUM MONETIZACIÓN (Suave & Zen) --- */
.cosmic-pass-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 213, 107, 0.06);
    border: 1px solid rgba(255, 213, 107, 0.2);
    color: rgba(255, 226, 138, 0.92);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 0 10px rgba(255, 213, 107, 0.05);
}

.cosmic-pass-btn:hover {
    background: rgba(255, 213, 107, 0.12);
    border-color: rgba(255, 213, 107, 0.35);
    color: #ffd56b;
    box-shadow: 0 0 14px rgba(255, 213, 107, 0.2);
    transform: translateY(-1px);
}

/* Selector de Duración */
.duration-selector-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
}

.duration-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.duration-pills {
    display: flex;
    gap: 6px;
}

.duration-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 11px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.duration-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.duration-btn.active {
    background: rgba(203, 190, 255, 0.15);
    border-color: var(--primary-cosmic);
    color: var(--primary-light);
    font-weight: 600;
}

.pill-badge {
    font-size: 8.5px;
    background: linear-gradient(135deg, #ffd56b, #ff9f43);
    color: #0c0a18;
    padding: 1px 5px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.btn-icon-action {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-action:hover {
    background: rgba(0, 219, 233, 0.15);
    border-color: var(--secondary-teal);
    color: var(--secondary-teal);
    box-shadow: 0 0 12px rgba(0, 219, 233, 0.25);
}

/* Tarjeta de Horóscopo & Tránsito Lunar */
.horoscope-card {
    padding: 10px 4px;
    border: none !important;
    background: transparent !important;
}

.zodiac-select-dropdown {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: #ffffff;
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.zodiac-select-dropdown:focus {
    border-color: var(--secondary-teal);
}

/* Pill Badges por Tier */
.pill-badge.pill-free {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
}

.pill-badge.pill-lunar {
    background: linear-gradient(135deg, #00dbe9, #6e44ff);
    color: #ffffff;
    font-weight: 700;
}

.pill-badge.pill-master {
    background: linear-gradient(135deg, #ffd56b, #ff9f43);
    color: #0c0a18;
    font-weight: 800;
    box-shadow: 0 0 8px rgba(255, 213, 107, 0.4);
}

/* Modal Pase Cósmico Escalonado */
.cycle-toggle-wrapper {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 3px;
    margin-bottom: 16px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.cycle-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 11.5px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cycle-btn.active {
    background: var(--primary-cosmic);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(110, 68, 255, 0.35);
}

.discount-badge {
    font-size: 9px;
    background: #ffd56b;
    color: #0c0a18;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.tiered-plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.tier-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.2s ease;
}

.tier-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 219, 233, 0.3);
}

.tier-card.featured-tier {
    background: linear-gradient(135deg, rgba(255, 213, 107, 0.08) 0%, rgba(110, 68, 255, 0.08) 100%);
    border-color: rgba(255, 213, 107, 0.4);
    box-shadow: 0 0 20px rgba(255, 213, 107, 0.12);
}

.tier-ribbon {
    position: absolute;
    top: -9px;
    right: 12px;
    background: linear-gradient(135deg, #ffd56b, #ff9f43);
    color: #0c0a18;
    font-size: 8.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    letter-spacing: 0.04em;
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 10px 0 14px 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-grow: 1;
}

.tier-features li {
    font-size: 11px;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.35;
}

.feat-check {
    color: var(--secondary-teal);
    font-weight: bold;
    flex-shrink: 0;
}

.btn-tier-select {
    width: 100%;
    padding: 9px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: #ffffff;
    transition: all 0.2s ease;
}

.btn-tier-select:hover {
    background: rgba(0, 219, 233, 0.2);
    border-color: var(--secondary-teal);
    color: var(--secondary-teal);
}

.btn-tier-featured {
    background: linear-gradient(135deg, var(--primary-cosmic), #8a64ff);
    border: none;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(110, 68, 255, 0.4);
}

.btn-tier-featured:hover {
    background: linear-gradient(135deg, #8a64ff, #ffd56b);
    color: #0c0a18;
    box-shadow: 0 4px 18px rgba(255, 213, 107, 0.4);
}

/* ============================================================
   PORTAL SANDBOX WEBPAY PLUS CHILE & COMPROBANTE OFICIAL
   ============================================================ */

.webpay-portal-card {
    background: #ffffff;
    color: #222222;
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 35px rgba(99, 91, 255, 0.25);
    overflow: hidden;
    animation: modalScaleIn 0.25s ease-out;
}

.stripe-header {
    background: linear-gradient(135deg, #635bff 0%, #0a2540 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #7a73ff;
}

.stripe-logo-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stripe-logo-text {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
}

.stripe-checkout-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.stripe-sandbox-tag {
    font-size: 10px;
    background: rgba(0, 219, 233, 0.2);
    color: #00dbe9;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: 1px solid rgba(0, 219, 233, 0.4);
}

.webpay-header {
    background: linear-gradient(135deg, #635bff 0%, #0a2540 100%);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.webpay-order-summary {
    background: #f8fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.webpay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    margin-bottom: 6px;
}

.webpay-label {
    color: #64748b;
}

.webpay-val {
    font-weight: 600;
    color: #0f172a;
}

.webpay-total-row {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    margin-bottom: 2px;
}

.webpay-amount {
    font-size: 22px;
    font-weight: 800;
    color: #635bff;
    font-family: var(--font-heading);
}

.webpay-methods-title {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    padding: 14px 20px 8px 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.webpay-methods-grid {
    padding: 0 20px 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.webpay-method-opt {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.webpay-method-opt input {
    margin-right: 12px;
    accent-color: #635bff;
    cursor: pointer;
}

.webpay-method-opt:hover {
    border-color: #635bff;
    background: #f8faff;
}

.webpay-method-opt.active {
    border-color: #635bff;
    background: #f5f6ff;
}

/* Mock Stripe Card Inputs */
.stripe-mock-inputs {
    margin: 0 20px 14px 20px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stripe-mock-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stripe-mock-label {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.stripe-mock-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12.5px;
    font-family: monospace;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.method-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.method-icon {
    font-size: 20px;
}

.method-info {
    display: flex;
    flex-direction: column;
}

.method-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.method-sub {
    font-size: 11px;
    color: #64748b;
}

.webpay-actions-box {
    padding: 14px 20px 16px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-wp-approve {
    background: #635bff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.35);
    transition: all 0.2s ease;
}

.btn-wp-approve:hover {
    background: #5046e4;
    transform: translateY(-1px);
}

.btn-wp-reject {
    background: #f04438;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-wp-reject:hover {
    background: #d92d20;
}

.btn-wp-cancel {
    background: transparent;
    border: none;
    color: #667085;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
    text-align: center;
}

.btn-wp-cancel:hover {
    color: #101828;
}

.webpay-footer-notes {
    padding: 8px 20px 12px 20px;
    text-align: center;
    font-size: 10.5px;
    color: #98a2b3;
}

/* VOUCHER / COMPROBANTE OFICIAL */
.webpay-voucher-card {
    background: #ffffff;
    color: #222222;
    border-radius: 14px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    padding: 24px;
    animation: modalScaleIn 0.25s ease-out;
}

.voucher-status {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 2px dashed #eaecf0;
    margin-bottom: 16px;
}

.voucher-status.approved #voucherIcon {
    color: #12b76a;
}

.voucher-status.rejected #voucherIcon {
    color: #f04438;
}

.voucher-status h3 {
    font-size: 18px;
    font-weight: 800;
    margin: 6px 0 2px 0;
    color: #101828;
    font-family: var(--font-heading);
}

.voucher-status p {
    font-size: 12px;
    color: #667085;
}

.voucher-details-table {
    display: flex;
    flex-direction: column;
    gap: 9px;
    background: #f9fafb;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #eaecf0;
}

.voucher-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.v-label {
    color: #667085;
}

.v-val {
    font-weight: 600;
    color: #1d2939;
    text-align: right;
}

/* ==========================================================================
   Selector de Idiomas (i18n Suave & Zen en Menú Desplegable Compacto)
   ========================================================================== */
.lang-selector-group {
    display: inline-flex;
    align-items: center;
}

.lang-select-dropdown {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-light);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-full);
    padding: 3px 18px 3px 8px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.04em;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23cbbeff' d='M0 0l4 5 4-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 7px;
    line-height: 1.2;
}

.lang-select-dropdown:hover,
.lang-select-dropdown:focus {
    background-color: rgba(255, 255, 255, 0.09);
    border-color: rgba(203, 190, 255, 0.3);
    color: #ffffff;
}

.lang-select-dropdown option {
    background: #141224;
    color: #ffffff;
    font-size: 11px;
}

.lang-opt-btn {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(155, 154, 171, 0.75);
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.lang-opt-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.lang-opt-btn.active {
    background: rgba(203, 190, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(203, 190, 255, 0.22);
    box-shadow: 0 0 8px rgba(203, 190, 255, 0.12);
}

/* ==========================================================================
   Modal "Mi Perfil Cósmico"
   ========================================================================== */
.profile-modal-container {
    max-width: 500px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
}

.profile-avatar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.avatar-preview-box {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(203, 190, 255, 0.2) 0%, rgba(0, 219, 233, 0.15) 100%);
    border: 2px solid var(--primary-cosmic);
    box-shadow: 0 0 25px rgba(203, 190, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.avatar-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-user-badge-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    overflow: hidden;
}

.profile-user-badge-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 8px 0 12px 0;
}

.avatar-preset-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-preset-btn:hover {
    background: rgba(203, 190, 255, 0.18);
    border-color: var(--primary-cosmic);
    transform: scale(1.12);
}

.avatar-preset-btn.selected {
    border-color: var(--secondary-teal);
    background: rgba(0, 219, 233, 0.2);
    box-shadow: 0 0 12px rgba(0, 219, 233, 0.4);
    transform: scale(1.15);
}

.avatar-upload-row {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: center;
    margin-top: 6px;
}

.btn-upload-file {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-upload-file:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--primary-cosmic);
}

.profile-stats-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin: 16px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 12px;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-stat-label {
    color: var(--text-muted);
    font-size: 11px;
}

.profile-stat-val {
    color: var(--text-main);
    font-weight: 700;
}

.profile-actions-row {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-save-profile {
    flex: 2;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-container) 0%, #6e44ff 100%);
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(110, 68, 255, 0.35);
    transition: all 0.2s ease;
}

.btn-save-profile:hover {
    box-shadow: 0 6px 22px rgba(110, 68, 255, 0.55);
    transform: translateY(-1px);
}

.btn-logout-profile {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(240, 68, 56, 0.1);
    border: 1px solid rgba(240, 68, 56, 0.3);
    color: #f04438;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout-profile:hover {
    background: rgba(240, 68, 56, 0.2);
    border-color: #f04438;
}

.profile-toast-msg {
    text-align: center;
    font-size: 12px;
    color: #12b76a;
    font-weight: 600;
    margin-top: 10px;
    display: none;
}

@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotating {
    animation: rotating 1s linear infinite;
    display: inline-block;
}

/* ========================================================
   SISTEMA RESPONSIVO SIN SCROLL (ADAPTACIÓN AUTOMÁTICA)
   ======================================================== */

.moon-distance-badge {
    display: none !important;
}

/* Modals accesibles y scrolleables internamente en pantallas ultra pequeñas */
.modal-overlay {
    align-items: center;
    padding: 12px;
}

.modal-container {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
}

/* Responsive Tweaks para pantallas ultra compactas (< 480px) */
@media (max-width: 480px) {
    .app-header {
        padding: 0 10px;
        height: 42px;
    }
    
    .brand-title {
        font-size: 11px;
    }
    
    .lang-opt-btn {
        padding: 2px 5px;
        font-size: 9.5px;
    }
    
    .cosmic-pass-btn, .user-badge {
        padding: 3px 8px;
        font-size: 10.5px;
    }
    
    .app-container {
        padding: 2px 8px;
        height: calc(100dvh - 42px - 44px);
        max-height: calc(100dvh - 42px - 44px);
    }
    
    .bottom-nav {
        height: 44px;
    }
    
    .nav-item {
        padding: 2px 10px;
        font-size: 8.5px;
    }
}

/* ============================================================
   RESPONSIVE HOMOLOGADO: CALENDARIO ARRIBA, EL RESTO ABAJO, CERO SCROLL
   ============================================================ */
@media (min-width: 768px) {
    .app-container {
        max-width: 480px;
    }

    .app-container.view-calendar-active,
    .app-container:has(#viewCalendar.active) {
        max-width: 480px;
    }
}

/* ========================================================
   COMPUERTA DE VALIDACIÓN Y ACCESO PRIVADO (STAGING GATE)
   ======================================================== */
.staging-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(14, 11, 28, 0.94) 0%, rgba(5, 5, 8, 0.98) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 16px;
    box-sizing: border-box;
}

.staging-gate-overlay.active {
    display: flex;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

body.staging-locked .app-container,
body.staging-locked .app-header,
body.staging-locked .bottom-nav {
    filter: blur(10px);
    pointer-events: none;
    user-select: none;
}

.staging-gate-card {
    width: 100%;
    max-width: 430px;
    background: rgba(18, 15, 36, 0.92);
    border: 1px solid rgba(203, 190, 255, 0.25);
    border-radius: 22px;
    padding: clamp(20px, 3vh, 26px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 32px rgba(157, 133, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
}

.staging-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.staging-logo-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staging-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.staging-logo-glow {
    position: absolute;
    inset: -8px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, rgba(0, 219, 233, 0.45) 0%, rgba(157, 133, 255, 0.25) 60%, transparent 80%);
    filter: blur(8px);
    animation: cosmicPulse 3s ease-in-out infinite alternate;
}

.staging-shield-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 219, 233, 0.12);
    border: 1px solid rgba(0, 219, 233, 0.35);
    color: var(--secondary-teal);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.staging-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 2px 0 6px 0;
    letter-spacing: -0.01em;
}

.staging-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
    max-width: 380px;
}

.staging-tabs-row {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 3px;
    gap: 4px;
    margin-bottom: 14px;
}

.staging-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.staging-tab-btn.active {
    background: linear-gradient(135deg, rgba(157, 133, 255, 0.35), rgba(0, 219, 233, 0.25));
    color: #ffffff;
    border: 1px solid rgba(203, 190, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.staging-chips-box {
    text-align: left;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(203, 190, 255, 0.22);
    border-radius: 10px;
    padding: 8px 10px;
}

.staging-chips-label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-light);
    display: block;
    margin-bottom: 5px;
}

.staging-chips-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.staging-chip-btn {
    text-align: left;
    background: rgba(203, 190, 255, 0.07);
    border: 1px solid rgba(203, 190, 255, 0.18);
    border-radius: 6px;
    color: #ffd56b;
    font-size: 10.5px;
    font-family: var(--font-body);
    padding: 5px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.staging-chip-btn:hover {
    background: rgba(203, 190, 255, 0.18);
    border-color: #ffd56b;
    box-shadow: 0 0 10px rgba(255, 213, 107, 0.2);
}

.staging-error-msg {
    background: rgba(255, 87, 87, 0.15);
    border: 1px solid rgba(255, 87, 87, 0.4);
    color: #ff9b9b;
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    text-align: center;
}

.staging-submit-btn {
    width: 100%;
    padding: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.staging-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.3;
}

.staging-badge-header {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 219, 233, 0.12);
    border: 1px solid rgba(0, 219, 233, 0.3);
    color: var(--secondary-teal);
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.staging-badge-header:hover {
    background: rgba(0, 219, 233, 0.24);
    box-shadow: 0 0 10px rgba(0, 219, 233, 0.3);
}

.staging-dot-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--secondary-teal);
    box-shadow: 0 0 8px var(--secondary-teal);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.btn-lock-staging {
    background: rgba(255, 87, 87, 0.12);
    border: 1px solid rgba(255, 87, 87, 0.35);
    color: #ff9b9b;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-lock-staging:hover {
    background: rgba(255, 87, 87, 0.25);
}

.shake {
    animation: shakeAnim 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shakeAnim {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* ========================================================
   GLOBAL COSMIC TOAST NOTIFICATION SYSTEM
   ======================================================== */
.cosmic-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 440px;
}

.cosmic-toast-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(18, 14, 38, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #f3f0ff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    cursor: pointer;
    animation: cosmicToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cosmic-toast-item.toast-out {
    animation: cosmicToastSlideOut 0.3s ease forwards;
}

.cosmic-toast-item.cosmic-toast-error {
    border: 1px solid rgba(255, 87, 87, 0.5);
    box-shadow: 0 10px 32px rgba(255, 87, 87, 0.25), 0 0 14px rgba(255, 87, 87, 0.2);
}
.cosmic-toast-item.cosmic-toast-error .cosmic-toast-icon {
    color: #ff6b6b;
}

.cosmic-toast-item.cosmic-toast-warning {
    border: 1px solid rgba(255, 213, 107, 0.5);
    box-shadow: 0 10px 32px rgba(255, 213, 107, 0.2), 0 0 14px rgba(255, 213, 107, 0.15);
}
.cosmic-toast-item.cosmic-toast-warning .cosmic-toast-icon {
    color: #ffd56b;
}

.cosmic-toast-item.cosmic-toast-success {
    border: 1px solid rgba(18, 183, 106, 0.5);
    box-shadow: 0 10px 32px rgba(18, 183, 106, 0.2), 0 0 14px rgba(18, 183, 106, 0.15);
}
.cosmic-toast-item.cosmic-toast-success .cosmic-toast-icon {
    color: #12b76a;
}

.cosmic-toast-item.cosmic-toast-info {
    border: 1px solid rgba(126, 231, 234, 0.5);
    box-shadow: 0 10px 32px rgba(126, 231, 234, 0.2), 0 0 14px rgba(126, 231, 234, 0.15);
}
.cosmic-toast-item.cosmic-toast-info .cosmic-toast-icon {
    color: #7ee7ea;
}

.cosmic-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.cosmic-toast-msg {
    flex: 1;
}

@keyframes cosmicToastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cosmicToastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
}

/* ============================================================
   ADAPTACIÓN RESPONSIVA Y PANTALLA HORIZONTAL (LANDSCAPE)
   Diseño fluido y balanceado para notebooks, iPhone y pantallas rotadas
   ============================================================ */

/* Botón de Instalación PWA en Header */
.install-pwa-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 219, 233, 0.14) !important;
    border: 1px solid rgba(0, 219, 233, 0.35) !important;
    color: var(--secondary-teal) !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.install-pwa-btn:hover {
    background: rgba(0, 219, 233, 0.25) !important;
    border-color: var(--secondary-teal) !important;
    box-shadow: 0 0 10px rgba(0, 219, 233, 0.3);
}

/* Notebooks y pantallas con altura vertical reducida (<= 750px) */
@media (max-height: 750px) and (orientation: portrait) {
    .moon-container {
        width: clamp(70px, 11vh, 95px);
        height: clamp(70px, 11vh, 95px);
    }
    .visualizer-box {
        height: clamp(44px, 7vh, 65px);
    }
    .affirmation-banner {
        font-size: 11px;
        margin: 3px auto 6px auto;
    }
    .energy-text {
        font-size: 10px !important;
    }
}

/* Pantalla Horizontal / Modo Paisaje (Landscape) - CERO SCROLL & CERO SOLAPAMIENTO */
@media (orientation: landscape) and (max-height: 600px) {
    .app-container {
        max-width: 960px !important;
        height: calc(100dvh - 38px - 40px - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 38px - 40px - env(safe-area-inset-bottom, 0px));
        padding: 2px 14px;
        overflow: hidden !important;
    }

    .app-header {
        height: 38px;
        max-width: 960px;
        padding: 0 14px;
    }

    .bottom-nav {
        max-width: 960px;
        height: calc(40px + env(safe-area-inset-bottom, 0px));
        padding: 0 14px env(safe-area-inset-bottom, 0px);
    }

    .nav-item {
        padding: 2px 14px;
        font-size: 8px;
    }

    #viewPlayer.active {
        display: grid !important;
        grid-template-columns: 1fr 1.15fr !important;
        grid-template-rows: auto 1fr !important;
        gap: 4px 18px !important;
        align-items: center !important;
        height: 100% !important;
        max-height: 100% !important;
        padding: 0 4px !important;
        overflow: hidden !important;
    }

    /* Columna 1, Fila 1: Luna + Info (en línea) */
    .moon-stage {
        grid-column: 1 !important;
        grid-row: 1 !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .moon-container {
        width: 48px !important;
        height: 48px !important;
        flex-shrink: 0 !important;
    }

    .moon-info {
        text-align: left !important;
        margin: 0 !important;
    }

    .moon-phase-tag {
        font-size: 8.5px !important;
    }

    .moon-illumination {
        font-size: 13px !important;
        margin: 0 !important;
    }

    .moon-stage .subtle-divider {
        display: none !important;
    }

    /* Columna 1, Fila 2: Controles + Canvas (DEBAJO de la Luna, sin tocarse) */
    .sanctuary-flow {
        grid-column: 1 !important;
        grid-row: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .zen-track-name {
        font-size: 11px !important;
    }

    .freq-number-display {
        font-size: 16px !important;
    }

    .duration-btn {
        padding: 2px 6px !important;
        font-size: 9px !important;
    }

    .visualizer-box {
        height: 36px !important;
        min-height: 28px !important;
        margin-top: 1px !important;
    }

    /* Columna 2 (Derecha): Afirmación + Energía + Horóscopo */
    .player-bottom-group {
        grid-column: 2 !important;
        grid-row: 1 / span 2 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 3px !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 100% !important;
    }

    .player-bottom-group > .subtle-divider:first-child {
        display: none !important;
    }

    .affirmation-banner {
        font-size: 11px !important;
        line-height: 1.25 !important;
        margin: 0 auto 2px auto !important;
    }

    .energy-section {
        padding: 1px 0 !important;
    }

    .energy-title {
        font-size: 10px !important;
    }

    .energy-text {
        font-size: 9.5px !important;
        line-height: 1.22 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .horoscope-section {
        padding: 1px 0 !important;
    }

    .horoscope-section h4 {
        font-size: 10px !important;
    }

    .horoscope-section select {
        height: 22px !important;
        font-size: 9.5px !important;
    }

    #horoscopeRitualText {
        font-size: 9px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}






