/* MaTorii Dreams - Theme Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Prevent text selection cursor on interactive elements */
button, .style-btn, .brain-btn, .viz-btn, .auto-toggle,
.play-btn, .icon-btn, .settings-btn, .status-text, .title, .subtitle,
.brainwave-label, .modal-title, .plan-btn, .cta-btn, label,
.option-btn, .pill-btn, .settings-tab, .section-label {
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

/* Restore pointer cursor where needed */
button, .style-btn, .brain-btn, .viz-btn, .auto-toggle,
.play-btn, .icon-btn, .settings-btn, .plan-btn, .cta-btn,
.option-btn, .pill-btn, .settings-tab {
    cursor: pointer;
}

fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-inline-size: auto;
}

legend {
    padding: 0;
}

:root {
    --text-main: rgba(35, 30, 35, 0.95);
    --text-dim: rgba(35, 30, 35, 0.75);
    --glass-bg: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.36);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --glass-blur: blur(4.8px);
    --accent: #5e5468;
}

html, body {
    height: 100%;
    font-family: 'system-ui', 'Spectral', serif;
    color: var(--text-main);
    overflow: hidden;
    font-weight: 400;
    cursor: default;
}

/* Only show text cursor in text inputs */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="url"], input[type="tel"],
input[type="number"], textarea, [contenteditable="true"] {
    cursor: text;
}

/* --- BRIDGE AESTHETICS (Gradients & Overlays) --- */
.gradient-bg {
    position: fixed; inset: 0; z-index: -2;
    transition: background 3s ease;
}

/* Animated gradient for settings/stats pages */
.gradient-bg.animated {
    background: linear-gradient(
        135deg,
        hsl(260, 45%, 82%),
        hsl(240, 50%, 78%),
        hsl(280, 40%, 80%),
        hsl(220, 45%, 82%)
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

/* Overlay removed - gradient background is now the sole background element */
.overlay {
    display: none;
}

.container {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    /* Start hidden, fade in when visualiser is ready */
    opacity: 0;
    transition: opacity 0.8s ease;
}

.container.ready {
    opacity: 1;
}
    margin: 0 auto;
}

/* --- TYPOGRAPHY --- */
.header {
    text-align: center;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header svg {
    display: block;
    margin: 0 auto;
}

.title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(35, 30, 35, 0.9);
    text-align: center;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5);
}

/* App version display at bottom center */
.app-version-display {
    position: fixed;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    color: rgba(60, 50, 70, 0.5);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    z-index: 50;
    pointer-events: none;
}

/* --- FULLSCREEN CANVAS VISUALIZER --- */
#visualizerCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* --- USER STATUS --- */
.user-status {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    gap: 0.8rem;
    font-size: 0.85rem;
    z-index: 20;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

.user-status:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Hide user-status on scroll (mobile) */
.user-status.scrolled {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.user-name {
    color: var(--text-dim);
}

.premium-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #333;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.upgrade-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.upgrade-btn:hover {
    transform: scale(1.05);
}

.logout-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.logout-link:hover {
    color: var(--text-main);
}

/* --- UI COMPONENTS --- */
.status-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.4s;
}

.status-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 500;
    color: var(--text-main);
    text-align: center;
    transition: opacity 0.5s ease;
}

/* Play button wrapper with enso timer */
.play-btn-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Breathing Enso Timer - centered around play button */
.enso-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.enso-timer.active {
    opacity: 1;
}

/* Input Area */
.dream-wrapper {
    width: 100%;
    max-width: 500px;
    display: flex;
    gap: 0.8rem;
    position: relative;
}

.dream-input {
    flex: 1;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    color: var(--text-main);
    font-family: 'Spectral', serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}
.dream-input:focus {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
.dream-input::placeholder { color: var(--text-dim); font-style: italic; }

/* Hide caret when collapsed/playing */
.container.collapsed .dream-input,
.container.fading .dream-input {
    caret-color: transparent;
}

/* Ensure caret matches text color when focused */
.dream-input {
    caret-color: var(--text-main);
}

.dream-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0 1.5rem;
    color: var(--text-main);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}
.dream-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
.dream-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Controls */
.controls { display: flex; align-items: center; gap: 2rem; margin-top: 1rem; }

.play-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}
.play-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15), 0 0 30px rgba(255, 255, 255, 0.15);
}


.icon-btn.recording { color: #d64545; animation: pulse 2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Fullscreen Button - fixed at bottom center */
.fullscreen-btn {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s, bottom 0.5s ease;
    padding: 6px 12px;
    opacity: 0.3;
    z-index: 150;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.fullscreen-btn:hover {
    color: var(--text-main);
    opacity: 1;
}
.fullscreen-btn:focus,
.fullscreen-btn:focus-visible {
    outline: none;
    box-shadow: none;
}
/* Move up when playing to sit above controls */
body.is-playing .fullscreen-btn {
    bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
}
body.is-playing .fullscreen-btn svg {
    width: 28px;
    height: 28px;
}

/* Fullscreen tooltip - appears when session starts */
.fullscreen-tooltip {
    position: fixed;
    bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}
.fullscreen-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
}
body.is-playing .fullscreen-tooltip {
    bottom: calc(10.5rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 600px) {
    .fullscreen-tooltip {
        right: 0.75rem;
        left: auto;
        transform: none;
        bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
    }
    body.is-playing .fullscreen-tooltip {
        bottom: calc(9.5rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Style Selector (Pills) */
.style-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.style-btn {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-style: italic;
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}
.style-btn:hover {
    color: var(--text-main);
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}
.style-btn.active {
    border-color: var(--glass-border);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Brainwave Selector */
.brainwave-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.brainwave-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    color: var(--text-dim);
    width: 100%;
    text-align: center;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.brain-btn {
    font-family: 'Spectral', serif;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.brain-btn:hover {
    color: var(--text-main);
    background: var(--glass-bg);
    border-color: var(--glass-border);
    transform: translateY(-1px);
}
.brain-btn.active {
    border-color: var(--glass-border);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.loading-dots:after {
    content: '.';
    animation: dots 1.5s steps(5, end) infinite;
}
@keyframes dots { 0%, 20% { content: '.'; } 40% { content: '..'; } 60% { content: '...'; } 80%, 100% { content: ''; } }

/* Visualizer Mode Selector */
.viz-selector {
    display: flex;
    gap: 0.5rem;
}
.viz-btn {
    font-family: 'Spectral', serif;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
}
.viz-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.15);
}
.viz-btn.active {
    border-color: var(--glass-border);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.2);
}

/* Auto Drift Toggle */
.auto-toggle {
    font-family: 'Spectral', serif;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.auto-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}
.auto-toggle.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--glass-border);
    color: var(--text-main);
}

/* Settings Drawer (slides up from bottom) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    background: linear-gradient(135deg, hsl(260, 45%, 88%), hsl(240, 50%, 85%), hsl(220, 40%, 90%));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px 24px 0 0;
    padding: 1.5rem 2rem 2rem;
    z-index: 10001;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
    opacity: 1;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.35s;
}
.modal.open {
    visibility: visible;
    transform: translateY(0);
}
/* Drawer handle/indicator */
.modal::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(128, 128, 128, 0.4);
    border-radius: 2px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-main);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-main); }
.modal-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 420px; /* Consistent height across tabs */
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0 0.5rem;
    margin: -0.5rem 0 0.5rem;
}
.settings-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    color: var(--text-dim);
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}
.settings-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}
.settings-tab.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    border-bottom-color: transparent;
}
.settings-tab-content {
    display: none;
}
.settings-tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Settings Sections - card style like account page */
.settings-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.section-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-main);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0.25rem;
}

/* Slider Groups */
.sliders-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.sliders-row .slider-group {
    flex: 1 1 0;
    min-width: 0;
}
@media (max-width: 600px) {
    .sliders-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    .sliders-row .slider-group {
        flex: none;
        width: 100%;
    }
}
.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.slider-group label {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
/* Custom range slider — glass aesthetic */
.slider-group input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    outline: none;
    cursor: pointer;
}
.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
}
.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 12px rgba(94, 84, 104, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}
.slider-group input[type="range"]::-moz-range-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}
.slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    cursor: pointer;
}
/* Pill Button (Auto) */
.pill-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--text-dim);
    padding: 0.25rem 0.75rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
}
.pill-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}
.pill-btn.active {
    background: var(--text-main);
    color: var(--bg-dark);
    border-color: var(--text-main);
}

/* Button Groups */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.button-group.large {
    gap: 1rem;
}
/* Grid layout for gradient swatches */
#gradientSelector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.75rem;
}

/* Option Buttons - account page style */
.option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    position: relative;
}
.option-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}
.option-btn.active {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--accent, #667eea);
    color: var(--accent, #667eea);
}
.option-btn svg {
    opacity: 0.8;
}
.option-btn.active svg {
    opacity: 1;
}

/* Large option buttons (Visuals tab) */
.button-group.large .option-btn {
    padding: 1rem 1.25rem;
    min-width: 90px;
    gap: 0.5rem;
}
.button-group.large .option-btn span {
    font-size: 0.85rem;
}

/* Wellness goals grid - 3 columns for 6 goals */
.wellness-goals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 640px) {
    .wellness-goals {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Option description text (account page context) */
.account-content .option-desc {
    font-size: 0.78rem;
    color: var(--text-dim, rgba(255,255,255,0.5));
    font-weight: 300;
}

/* Gradient swatch buttons - account page style */
.gradient-swatch {
    min-width: 70px;
}
.gradient-swatch .swatch {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, border-color 0.2s;
}
.gradient-swatch.active .swatch {
    border-color: var(--accent, #667eea);
    transform: scale(1.1);
}
.gradient-swatch span:last-child {
    font-size: 0.7rem;
}

/* Subscription section */
.subscription-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.manage-subscription {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}
.manage-subscription:hover {
    color: var(--text-main);
}

.settings-btn, .icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.3s ease;
}
.settings-btn:hover, .icon-btn:hover {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    color: var(--text-main);
}

/* Premium locked state */
.premium-locked,
[data-premium] {
    opacity: 0.6;
    position: relative;
}
.premium-locked::after,
[data-premium]::after {
    content: '\2605';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.6rem;
    color: gold;
}

/* Upgrade modal */
.upgrade-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.upgrade-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
}
.upgrade-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    margin-bottom: 1rem;
}
.upgrade-content ul {
    text-align: left;
    margin: 1rem 0;
    padding-left: 1.5rem;
}
.upgrade-content li {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}
.upgrade-buttons {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    justify-content: center;
}
.upgrade-buttons button {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s;
}
.upgrade-buttons button:hover {
    transform: scale(1.05);
}
.close-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-dim);
}

/* Subscription info in settings */
.subscription-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.manage-subscription {
    color: var(--text-dim);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}
.manage-subscription:hover {
    color: var(--text-main);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- LANDING PAGE --- */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}
.landing-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.landing-subtitle {
    font-family: 'Spectral', serif;
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 3rem;
}
.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin-bottom: 3rem;
}
.feature {
    padding: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}
.feature h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.feature p {
    font-size: 0.9rem;
    color: var(--text-dim);
}
.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.cta-btn {
    padding: 1rem 2rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}
.cta-btn:hover {
    transform: scale(1.05);
}
.cta-primary {
    background: var(--accent);
    color: white;
    border: none;
}
.cta-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

/* --- AUTH PAGES (Login, Register, Password Reset) --- */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.auth-logo-link {
    display: inline-block;
    margin-bottom: 0.5rem;
}
.auth-logo-link svg {
    width: 100px;
    height: 100px;
}
.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-group label {
    font-family: 'system-ui', 'Spectral', serif;
    font-size: 0.9rem;
    color: var(--text-dim);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-family: 'Spectral', serif;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
}
.form-group input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
.form-group input::placeholder {
    color: var(--text-dim);
}
.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}
.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
}
.checkbox-group a {
    color: var(--text-main);
    text-decoration: none;
}
.checkbox-group a:hover {
    text-decoration: underline;
}
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.remember-row label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    cursor: pointer;
}
.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}
.forgot-link {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}
.forgot-link:hover {
    color: var(--text-main);
}
.auth-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    width: 100%;
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--text-dim);
}
.auth-footer a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* Login two-card layout */
.login-duo {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.5rem;
}
.login-duo .auth-card {
    max-width: 380px;
}
.login-cta-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.login-cta-card .auth-header {
    margin-bottom: 0;
}
.login-cta-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text-main);
    margin: 0 0 0.75rem;
}
.login-cta-text {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}
.login-cta-btn {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}
.login-cta-btn:hover {
    background: var(--accent);
    color: white;
}
.login-form-card .auth-footer {
    border-top: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}
@media (max-width: 800px) {
    .login-duo {
        flex-direction: column;
        gap: 1rem;
    }
    .login-duo .auth-card {
        max-width: 420px;
    }
}
.message {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.message.error, .message.bad {
    background: rgba(214, 69, 69, 0.2);
    border: 1px solid rgba(214, 69, 69, 0.3);
    color: #d64545;
}
.message.good, .message.success {
    background: rgba(69, 214, 69, 0.2);
    border: 1px solid rgba(69, 214, 69, 0.3);
    color: #2d8f2d;
}
/* SilverStripe default forms within auth pages */
.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.auth-card .field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.auth-card .field label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}
.auth-card .field input[type="text"],
.auth-card .field input[type="email"],
.auth-card .field input[type="password"],
.auth-card .field input {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-family: 'Spectral', serif;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.auth-card .field input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
.auth-card .btn-toolbar,
.auth-card .Actions {
    margin-top: 0.5rem;
}
.auth-card .btn-toolbar .action,
.auth-card .Actions .action,
.auth-card input[type="submit"],
.auth-card button[type="submit"] {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.9rem 2rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.auth-card .btn-toolbar .action:hover,
.auth-card .Actions .action:hover,
.auth-card input[type="submit"]:hover,
.auth-card button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.back-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 0.5rem 1rem;
}
.back-link:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-main);
}
.features-preview {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.features-preview h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 0.8rem;
}
.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}
.feature-tag {
    background: rgba(255,255,255,0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* --- PRICING PAGE --- */
.pricing-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
}
.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}
.pricing-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.pricing-subtitle {
    font-size: 1.1rem;
    color: var(--text-dim);
    max-width: 500px;
}

/* Billing Toggle */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 2rem;
}
.toggle-label {
    font-size: 0.95rem;
    color: var(--text-dim);
    transition: color 0.3s ease, font-weight 0.3s ease;
    cursor: pointer;
}
.toggle-label.active {
    color: var(--text);
    font-weight: 600;
}
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 26px;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s ease, background 0.3s ease;
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(24px);
    background: #fff;
}
.save-badge {
    display: inline-block;
    background: rgba(69, 214, 69, 0.15);
    color: #2d8f2d;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.3rem;
    vertical-align: middle;
}
.billing-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.yearly-note {
    display: block;
    font-family: 'Spectral', serif;
    font-style: italic;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dim);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.yearly-note.visible {
    opacity: 1;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    width: 100%;
}
.plan-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.plan-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(94, 84, 104, 0.3);
}
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.plan-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 0.25rem;
}
.plan-kanji {
    font-weight: 300;
    opacity: 0.8;
    font-size: 0.9em;
}
.plan-meaning {
    font-family: 'Spectral', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 1rem;
}
.plan-description {
    font-family: 'Spectral', serif;
    font-size: 1rem;
    color: var(--text-main);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}
.plan-tagline {
    font-family: 'Spectral', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 1.5rem;
}
.plan-price {
    text-align: center;
    margin-bottom: 1.5rem;
}
.price-amount {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 300;
}
.price-period {
    color: var(--text-dim);
    font-size: 0.9rem;
}
.price-savings {
    background: rgba(69, 214, 69, 0.15);
    color: #2d8f2d;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 0.5rem;
}
.plan-features {
    flex: 1;
    margin-bottom: 2rem;
}
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.feature-item:last-child {
    border-bottom: none;
}
.feature-check {
    color: #4CAF50;
    flex-shrink: 0;
    margin-top: 2px;
}
.feature-x {
    color: var(--text-dim);
    opacity: 0.5;
    flex-shrink: 0;
    margin-top: 2px;
}
.feature-text {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-main);
}
.feature-text.disabled {
    color: var(--text-dim);
    opacity: 0.6;
}
.plan-includes {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin: 1.5rem 0 0.75rem 0;
    text-align: left;
}
.plan-note {
    font-family: 'Spectral', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-main);
    opacity: 0.85;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}
.feature-item.feature-sub {
    padding-left: 1.8rem;
    padding-top: 0;
    border-bottom: none;
}
.feature-item.feature-sub .feature-text {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-style: italic;
}
.feature-item.highlight .feature-text {
    color: var(--accent);
}
.plan-btn {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
}
.plan-btn.primary {
    background: var(--accent);
    color: white;
    border: none;
}
.plan-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.plan-btn.secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}
.plan-btn.secondary:hover {
    background: var(--glass-bg);
}
.plan-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.faq-section {
    max-width: 700px;
    margin-top: 4rem;
    width: 100%;
}
.faq-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
}
.faq-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
}
.faq-question {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.faq-answer {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Dark mode (starfield) text colors */
body.dark-mode {
    --text-main: rgba(255, 255, 255, 0.95);
    --text-dim: rgba(255, 255, 255, 0.75);
}

body.dark-mode .title {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .subtitle {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

body.dark-mode .app-version-display {
    color: rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .glass-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .style-btn,
body.dark-mode .control-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .style-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

body.dark-mode input[type="text"],
body.dark-mode .dream-input {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode input[type="text"]::placeholder,
body.dark-mode .dream-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

body.dark-mode .user-status {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .user-status:hover {
    background: rgba(0, 0, 0, 0.35);
}

body.dark-mode .user-status a {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .back-link {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .back-link:hover {
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.9);
}

/* Modal always stays light - force dark text regardless of dark mode */
body.dark-mode .modal {
    --text-main: rgba(35, 30, 35, 0.95);
    --text-dim: rgba(35, 30, 35, 0.75);
}

body.dark-mode .modal .modal-title,
body.dark-mode .modal h3,
body.dark-mode .modal label,
body.dark-mode .modal .section-label,
body.dark-mode .modal .slider-group label,
body.dark-mode .modal .manage-subscription {
    color: rgba(35, 30, 35, 0.7);
}

body.dark-mode .modal .modal-close {
    color: rgba(35, 30, 35, 0.65);
}

body.dark-mode .modal .modal-close:hover {
    color: rgba(35, 30, 35, 0.9);
}

body.dark-mode .modal .settings-tab {
    color: rgba(35, 30, 35, 0.65);
}

body.dark-mode .modal .settings-tab:hover {
    color: rgba(35, 30, 35, 0.8);
}

body.dark-mode .modal .settings-tab.active {
    color: rgba(35, 30, 35, 0.95);
}

body.dark-mode .modal .option-btn {
    color: rgba(35, 30, 35, 0.7);
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .modal .option-btn:hover {
    color: rgba(35, 30, 35, 0.9);
    background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .modal .option-btn.active {
    color: var(--accent, #667eea);
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--accent, #667eea);
}

body.dark-mode .modal .pill-btn {
    color: rgba(35, 30, 35, 0.7);
    border-color: rgba(35, 30, 35, 0.2);
}

/* --- ACCOUNT PAGE --- */
.account-page {
    overflow-y: auto;
}

@media (max-width: 768px) {
    .back-link {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        justify-content: center;
        padding: 0;
    }

    .back-link .back-text {
        display: none;
    }

    .back-link svg {
        margin: 0;
    }

    .user-status {
        padding: 0.35rem 0.75rem;
    }
}

/* Account Layout with Side Menu */
.account-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.account-nav {
    width: 240px;
    flex-shrink: 0;
    padding: 4rem 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.account-nav .account-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.nav-menu li {
    margin-bottom: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: left;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent, #667eea);
}

.nav-item svg {
    opacity: 0.7;
}

.nav-item.active svg {
    opacity: 1;
}

.nav-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.nav-footer .logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-footer .logout-btn:hover {
    opacity: 1;
}

.account-content {
    flex: 1;
    padding: 3rem 3rem 2rem;
    overflow-y: auto;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.section-desc {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.visuals-row {
    display: flex;
    gap: 1.5rem;
    grid-column: 1 / -1;
}

.visuals-row .account-card {
    flex: 1;
    min-width: 0;
}

/* Mobile: Bottom navigation */
@media (max-width: 768px) {
    .account-layout {
        flex-direction: column;
        padding-bottom: 70px;
    }

    .account-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        z-index: 100;
    }

    .account-nav .account-title {
        display: none;
    }

    .nav-menu {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-menu li {
        margin: 0;
        flex: 0 0 auto;
    }

    .nav-item {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.6rem 0.75rem;
        font-size: 0.65rem;
        text-align: center;
        justify-content: center;
        border-radius: 0;
        white-space: nowrap;
    }

    .nav-footer {
        display: none;
    }

    .account-content {
        padding: 4rem 1rem 2rem;
        width: 100%;
        max-width: none;
    }

    .account-grid,
    #tab-voice .account-grid {
        grid-template-columns: 1fr;
    }

    .visuals-row {
        flex-direction: column;
    }
}

.account-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
}

/* Card entrance animations for stats page */
.account-card.animate-in {
    opacity: 0;
    transform: translateY(20px);
}

.account-card.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.account-card-wide {
    grid-column: 1 / -1;
}

/* Voice tab: 3 cards across (Voice, Voice Style, Accent) - desktop only */
@media (min-width: 769px) {
    #tab-voice .account-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Device List */
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-header-row .card-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.device-count {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.device-list-loading,
.device-list-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.device-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

.device-item:last-child {
    margin-bottom: 0;
}

.device-item.current {
    border-color: rgba(147, 112, 219, 0.3);
    background: rgba(147, 112, 219, 0.04);
}

.device-icon {
    flex-shrink: 0;
    color: var(--text-dim);
}

.device-info {
    flex: 1;
    min-width: 0;
}

.device-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.device-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: rgba(147, 112, 219, 0.15);
    color: rgba(147, 112, 219, 0.9);
    white-space: nowrap;
}

.device-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
}

.device-remove-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}

.device-remove-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.subscription-status {
    margin-bottom: 1rem;
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-badge.premium {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.status-badge.free {
    background: var(--glass-border);
    color: var(--text-main);
}

.status-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.status-note.warning {
    color: #d97706;
    opacity: 1;
    font-weight: 500;
}

.usage-info {
    margin-top: 0.75rem;
}

.usage-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.usage-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
    max-width: 100%;
}

.usage-text {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

.subscription-actions {
    margin-top: 1rem;
}

.account-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    transition: transform 0.2s;
}

.account-btn:hover {
    transform: scale(1.05);
}

.account-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.account-btn.secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.account-btn.danger {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #b91c1c;
    cursor: pointer;
}

.account-btn.danger:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.6);
}

.account-btn.danger:disabled {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
    color: #dc2626;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Danger Card */
.danger-card {
    border-color: rgba(220, 38, 38, 0.3);
}

.danger-card .card-title {
    color: #b91c1c;
}

.danger-text {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.deletion-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid;
}

.deletion-status.success {
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.3);
    color: #047857;
}

.deletion-status.error {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #b91c1c;
}

.account-form .form-group {
    margin-bottom: 1rem;
}

.account-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.account-form input {
    width: 100%;
    padding: 0.7rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
}

.account-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.account-form .auth-btn {
    width: 100%;
    margin-top: 0.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    opacity: 0.7;
    font-size: 0.9rem;
    flex: 1;
    min-width: 0;
}

.info-value {
    flex-shrink: 0;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.verified {
    color: #059669;
    font-weight: 500;
}

.not-verified {
    color: #dc2626;
    font-weight: 500;
}

.resend-link {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.account-footer {
    text-align: center;
    margin-top: 2rem;
}

.logout-btn {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.logout-btn:hover {
    opacity: 1;
}

/* Dream History */
.dream-history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dream-item {
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: background 0.2s;
}

.dream-item:hover {
    background: rgba(255,255,255,0.08);
}

.dream-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.dream-style {
    text-transform: capitalize;
}

.dream-mood {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 500;
    color: var(--accent, #667eea);
    margin-bottom: 0.5rem;
}

.dream-preview {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.dream-prompt {
    font-size: 0.8rem;
    opacity: 0.7;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.prompt-label {
    font-weight: 500;
}

.empty-history {
    text-align: center;
    padding: 2rem;
    opacity: 0.7;
}

.empty-history a {
    color: var(--accent, #667eea);
}

.history-pagination {
    text-align: center;
    margin-top: 1rem;
}

#load-more-dreams {
    cursor: pointer;
}

#load-more-dreams:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-dim);
}

.empty-state svg {
    opacity: 0.4;
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Account page visual preferences */
.account-page .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.account-page .button-group.large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.account-page .button-group.gradient-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.account-page .option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
}

.account-page .option-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.account-page .option-btn.active {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--accent, #667eea);
    color: var(--accent, #667eea);
}

.account-page .option-btn svg {
    opacity: 0.8;
}

.account-page .option-btn.active svg {
    opacity: 1;
}

.account-page .gradient-swatch {
    min-width: 80px;
}

.account-page .gradient-swatch .swatch {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s, border-color 0.2s;
}

.account-page .gradient-swatch.active .swatch {
    border-color: var(--accent, #667eea);
    transform: scale(1.1);
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    z-index: 1000;
    animation: fadeInUp 0.3s ease;
}

.toast.success {
    border-color: rgba(74, 222, 128, 0.5);
}

.toast.error {
    border-color: rgba(248, 113, 113, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* --- HOMEPAGE / LANDING PAGE --- */
body.landing-page {
    overflow-y: auto;
}

/* Hero Section */
.hero-section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-visualizer {
    position: fixed;
    top: 50%;
    left: -5%;
    width: 110%;
    height: 100vh;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subheadline {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    max-width: 700px;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 2.5rem;
}

/* Features Section */
.features-section {
    position: relative;
    z-index: 10;
    padding: 4rem 2rem 6rem;
    max-width: 1100px;
    margin: 0 auto;
    /* Height controlled by CMS via SectionHeightStyle inline style */
}

.features-intro {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-style: italic;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 4rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

@media (max-width: 768px) {
    .features-section {
        padding: 3rem 1.5rem 4rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.feature-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.feature-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.feature-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.6;
    margin-bottom: 1rem;
    font-weight: 400;
}

.feature-body {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.85;
}

/* Closing/CTA Section */
.closing-section {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 6rem 2rem 8rem;
    max-width: 700px;
    margin: 0 auto;
    height: 75vh;
}

.closing-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.closing-body {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 2.5rem;
}

/* Brand Story Section */
.brand-story-section {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    /* Height controlled by CMS via SectionHeightStyle inline style */
}

.brand-story-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-story-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 2.5rem;
    letter-spacing: 0.02em;
}

.brand-story-body {
    max-width: 650px;
    margin-bottom: 2.5rem;
}

.brand-story-body p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.brand-story-body em,
.brand-story-body i {
    font-weight: 500;
    font-style: italic;
}

.brand-story-body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .brand-story-section {
        padding: 3rem 1.5rem;
    }

    .brand-story-body p {
        line-height: 1.7;
    }
}

/* Site Stats Section */
.site-stats-section {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    height: 50vh;
}

.site-stats-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 300;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.site-stats-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.site-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    padding: 1.5rem;
}

.site-stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 300;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.site-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .site-stats-section {
        padding: 3rem 1.5rem;
    }

    .site-stats-grid {
        gap: 1.5rem;
    }

    .site-stat-item {
        min-width: 120px;
        padding: 1rem;
    }
}

/* Personalized Recommendations */
.recommendation-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
    font-size: 0.8rem;
}

.recommendation-indicator:hover {
    background: rgba(255, 255, 255, 0.2);
}

.rec-icon {
    font-size: 0.9rem;
}

.rec-text {
    opacity: 0.8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recommendation-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.rec-tooltip-content {
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    min-width: 250px;
    max-width: 320px;
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.rec-tooltip-content strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.rec-tooltip-content small {
    display: block;
    opacity: 0.7;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.rec-apply-btn {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: inherit;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rec-apply-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Wizard Recommendations - Accessible across all gradient themes */
.style-card.recommended,
.duration-card.recommended {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
    position: relative;
}

.style-card.recommended::after,
.duration-card.recommended::after {
    content: '✦';
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.75rem;
    color: white;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.5);
}

.wizard-rec-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    margin-top: 1.25rem;
    text-align: center;
    animation: recSlideUp 0.5s ease backwards;
}

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

.wizard-rec-hint .rec-title {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
}

.wizard-rec-hint .rec-reason {
    font-size: 0.72rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.35);
    max-width: 300px;
}

/* Session check-in message (step 2 greeting) */
.wizard-rec-hint.wizard-checkin {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(90, 70, 110, 0.65);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.wizard-checkin .checkin-message {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Binaural Recommendation Prompt - Accessible across all gradient themes */
.binaural-rec-prompt {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    text-align: center;
}

.binaural-rec-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.binaural-rec-content .rec-sparkle {
    font-size: 1.25rem;
    opacity: 0.85;
}

.binaural-rec-content .rec-question {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    max-width: 320px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.binaural-rec-content .rec-question strong {
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
}

.binaural-rec-content .rec-reason {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    max-width: 300px;
}

.binaural-rec-content .rec-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.binaural-rec-content .rec-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.binaural-rec-content .rec-yes {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.binaural-rec-content .rec-yes:hover {
    background: rgba(255, 255, 255, 0.25);
}

.binaural-rec-content .rec-no {
    background: rgba(255, 255, 255, 0.05);
}

.binaural-rec-content .rec-no:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* --- CONTENT PAGES (Terms, Privacy, etc.) --- */
body.content-page {
    overflow-y: auto;
}

.content-container {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.content-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    margin-bottom: 2rem;
    text-align: center;
}

.content-body {
    font-size: 1rem;
    line-height: 1.8;
}

.content-body h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin: 2rem 0 1rem;
}

.content-body h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 1.5rem 0 0.75rem;
}

.content-body p {
    margin-bottom: 1rem;
}

.content-body ul, .content-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.content-body li {
    margin-bottom: 0.5rem;
}

.content-body a {
    color: var(--accent, #667eea);
    text-decoration: underline;
}

/* --- PRICING PAGE EXTRAS --- */
body.pricing-page {
    overflow-y: auto;
}

.plans-grid.three-tier {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1000px;
}

@media (max-width: 900px) {
    .plans-grid.three-tier {
        grid-template-columns: 1fr;
    }
}

.plan-quota {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent, #667eea);
    margin-top: 0.5rem;
}

.feature-item.highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    margin: 0.3rem -0.6rem;
}

/* --- MESSAGE PAGES (Verification Failed, etc.) --- */
body.message-page {
    overflow-y: auto;
}

.message-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.message-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    max-width: 450px;
}

.message-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: rgba(214, 69, 69, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-icon svg {
    color: #d64545;
}

.message-icon.success {
    background: rgba(74, 222, 128, 0.2);
}

.message-icon.success svg {
    color: #4ade80;
}

.message-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.message-text {
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.message-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 2rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.message-btn:hover {
    transform: translateY(-2px);
}

.secondary-link {
    display: block;
    margin-top: 1rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    text-decoration: none;
}

.secondary-link:hover {
    color: var(--text-main);
}

/* === ONBOARDING WIZARD === */
.onboarding-wizard {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

/* Progress Dots */
.wizard-progress {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(180, 160, 200, 0.5);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--gradient-accent-glow, var(--text-main));
    opacity: 1;
    box-shadow: 0 0 8px var(--gradient-accent, rgba(255, 255, 255, 0.3));
}

.progress-dot.completed {
    background: var(--gradient-accent-glow, rgba(74, 222, 128, 0.7));
    opacity: 0.8;
}

/* Wizard Back Button */
.wizard-back {
    position: absolute;
    left: -80px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.wizard-back.visible {
    opacity: 1;
    pointer-events: auto;
}

.wizard-back:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.wizard-back:active {
    transform: translateY(-50%) scale(0.95);
}

.wizard-back svg {
    opacity: 0.8;
}

/* Mobile: position back button at top-left */
@media (max-width: 768px) {
    .wizard-back {
        position: fixed;
        left: 1rem;
        top: 4.5rem;
        transform: none;
    }

    .wizard-back:hover {
        transform: scale(1.05);
    }

    .wizard-back:active {
        transform: scale(0.95);
    }
}

/* Wizard Steps */
.wizard-step {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    animation: stepFadeIn 0.4s ease;
}

.wizard-step.active {
    display: flex;
}

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

.wizard-question {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    text-align: center;
    color: var(--text-main);
    margin: 0;
}

/* Mood Input */
.mood-input {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    color: var(--text-main);
    font-family: 'Spectral', serif;
    font-size: 1.125rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    text-align: center;
}

.mood-input:focus {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.mood-input::placeholder {
    color: var(--text-dim);
    font-style: italic;
}

/* Starter Prompts (Step 4) - Unified card styling */
.starter-prompts-expandable {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    max-width: 450px;
}

.prompt-category {
    position: relative;
}

.prompt-category-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.75rem 1.25rem;
    color: var(--text-muted);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}

.prompt-category-btn:hover {
    transform: translateY(-2px);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.prompt-category.expanded .prompt-category-btn {
    color: var(--text-main);
    border-color: rgba(147, 112, 219, 0.5);
    background: rgba(147, 112, 219, 0.15);
}

.prompt-suboptions {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    min-width: 180px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.prompt-category.expanded .prompt-suboptions {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: promptDropdownFadeIn 0.2s ease;
}

@keyframes promptDropdownFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.prompt-chip {
    background: transparent;
    border: none;
    padding: 0.6rem 0.85rem;
    color: var(--text-muted);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.prompt-chip:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.12);
}

body.dark-mode .prompt-category-btn {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .prompt-category-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

body.dark-mode .prompt-suboptions {
    background: rgba(20, 20, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Mood Input with Voice Button */
.mood-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.mood-input-wrapper .mood-input {
    padding-right: 50px;
}

.voice-input-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-input-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.voice-input-btn.listening {
    color: #ef4444;
    animation: pulse-mic 1s ease-in-out infinite;
}

@keyframes pulse-mic {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
}

/* Wizard Buttons */
.wizard-btn {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.8rem 2rem;
    color: var(--text-main);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}

.wizard-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.wizard-btn.primary {
    background: rgba(255, 255, 255, 0.25);
}

.wizard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Unified Wizard Card System
   Consistent styling across all wizard steps
   ============================================ */

/* Base wizard card - all selection cards inherit this */
.wizard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    animation: cardSlideUp 0.4s ease backwards;
    position: relative;
}

.wizard-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.wizard-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

body.dark-mode .wizard-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .wizard-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Stagger animation delays */
.wizard-card:nth-child(1) { animation-delay: 0.05s; }
.wizard-card:nth-child(2) { animation-delay: 0.1s; }
.wizard-card:nth-child(3) { animation-delay: 0.15s; }
.wizard-card:nth-child(4) { animation-delay: 0.2s; }
.wizard-card:nth-child(5) { animation-delay: 0.25s; }
.wizard-card:nth-child(6) { animation-delay: 0.3s; }

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

/* Card grid container - 2 column default */
.wizard-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: 100%;
}

/* Card icon - consistent sizing */
.wizard-card .card-icon {
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.wizard-card:hover .card-icon {
    transform: scale(1.1);
}

/* Card title - consistent typography */
.wizard-card .card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-main);
}

/* Card description - consistent styling */
.wizard-card .card-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.3;
}

/* Session Type Cards (Step 1) */
.session-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.session-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1.5rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    animation: cardSlideUp 0.4s ease backwards;
}

.session-card:nth-child(1) { animation-delay: 0.1s; }
.session-card:nth-child(2) { animation-delay: 0.15s; }

.session-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.session-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.card-icon {
    opacity: 0.8;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-main);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
    padding: 0 0.5rem;
    margin-bottom: 0.75rem;
}

.card-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-badge.free {
    background: rgba(100, 80, 140, 0.85);
    color: rgba(255, 255, 255, 0.95);
}

.card-badge.quota {
    background: rgba(100, 80, 140, 0.85);
    color: rgba(255, 255, 255, 0.95);
}

.card-badge.exhausted {
    background: rgba(180, 130, 50, 0.75);
    color: rgba(255, 255, 255, 0.95);
}

.session-card.exhausted {
    opacity: 0.6;
}

.session-card.exhausted:hover {
    opacity: 0.8;
}

/* Mood Cards (Step 2) - flexbox for natural centering */
.mood-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
}

/* Match mood card styling to session-card for consistency */
.mood-card {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.mood-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    min-width: 100px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--glass-shadow);
    animation: cardSlideUp 0.4s ease backwards;
}

.mood-card:nth-child(1) { animation-delay: 0.05s; }
.mood-card:nth-child(2) { animation-delay: 0.1s; }
.mood-card:nth-child(3) { animation-delay: 0.15s; }
.mood-card:nth-child(4) { animation-delay: 0.2s; }
.mood-card:nth-child(5) { animation-delay: 0.25s; }
.mood-card:nth-child(6) { animation-delay: 0.3s; }

.mood-card:hover {
    transform: translateY(-2px);
    border-color: rgba(147, 112, 219, 0.4);
    background: rgba(147, 112, 219, 0.08);
}

.mood-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.mood-card .mood-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.mood-card .mood-icon svg {
    width: 100%;
    height: 100%;
}

.mood-card .mood-icon { color: rgba(35, 30, 35, 0.75); }

.mood-card:hover .mood-icon {
    transform: scale(1.15);
}

.mood-card .mood-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: 'Spectral', serif;
}

.wizard-skip-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-dim);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-skip-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* Feedback Wizard (Post-Session) */
.feedback-wizard {
    position: fixed;
    inset: 0;
    /*background: var(--glass-bg);*/
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback-wizard.visible {
    opacity: 1;
}

.feedback-wizard.fade-out {
    opacity: 0;
}

/* Keep visualiser visible during feedback wizard for continuity */

.feedback-wizard-content {
    max-width: 480px;
    width: 100%;
    padding: 2rem;
    text-align: center;
}

.feedback-wizard-progress {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.feedback-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glass-border);
    transition: all 0.3s ease;
}

.feedback-dot.active {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.feedback-dot.completed {
    background: rgba(74, 222, 128, 0.6);
}

.feedback-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.feedback-step.active {
    display: block;
}

.feedback-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}

.feedback-subtitle {
    font-family: 'Spectral', serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 2rem;
}

.feedback-mood-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
}

.feedback-mood-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    min-width: 100px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--glass-shadow);
    animation: cardSlideUp 0.4s ease backwards;
}

.feedback-mood-card:nth-child(1) { animation-delay: 0.05s; }
.feedback-mood-card:nth-child(2) { animation-delay: 0.1s; }
.feedback-mood-card:nth-child(3) { animation-delay: 0.15s; }
.feedback-mood-card:nth-child(4) { animation-delay: 0.2s; }
.feedback-mood-card:nth-child(5) { animation-delay: 0.25s; }

.feedback-mood-card:hover {
    transform: translateY(-2px);
    border-color: rgba(147, 112, 219, 0.4);
    background: rgba(147, 112, 219, 0.08);
}

.feedback-mood-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.feedback-mood-card .mood-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.feedback-mood-card .mood-icon svg {
    width: 100%;
    height: 100%;
}

.feedback-mood-card .mood-icon { color: rgba(35, 30, 35, 0.75); }

.feedback-mood-card:hover .mood-icon {
    transform: scale(1.15);
}

.feedback-mood-card .mood-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: 'Spectral', serif;
}

.feedback-skip-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-dim);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-skip-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

.feedback-textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'Spectral', serif;
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 1.5rem;
}

.feedback-textarea:focus {
    border-color: var(--accent-primary);
}

.feedback-textarea::placeholder {
    color: var(--text-dim);
}

.feedback-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.feedback-btn {
    padding: 0.75rem 2rem;
    border-radius: 24px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.feedback-btn.primary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.feedback-btn.primary:hover {
    background: var(--glass-bg-hover);
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.feedback-btn.secondary {
    background: transparent;
    border: none;
    color: var(--text-muted);
}

.feedback-btn.secondary:hover {
    color: var(--text-main);
}

.feedback-thank-you {
    margin-bottom: 2rem;
}

.feedback-check-icon {
    color: rgba(74, 222, 128, 0.8);
    margin-bottom: 1rem;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Export Format Cards (Save Recording Step) */
.export-format-cards {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.export-format-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.export-format-card:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.export-format-card:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.export-format-card svg {
    color: var(--text-main);
    opacity: 0.8;
}

.export-format-card .format-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

.export-format-card .format-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Melody Export */
.melody-export-section {
    margin-top: 1.25rem;
}

.melody-export-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.melody-export-title {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.melody-voice-options {
    display: flex;
    gap: 0.5rem;
}

.melody-voice-option {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-dim);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.melody-voice-option.selected {
    color: var(--text-main);
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.25);
}

.melody-export-status {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    min-height: 1em;
}

/* Export Progress Bar */
.export-progress {
    margin: 1.5rem auto;
    max-width: 280px;
    text-align: center;
}

.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Capturing Indicator on Record Button */
.icon-btn.capturing {
    animation: capturingPulse 2s ease-in-out infinite;
}

@keyframes capturingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* View Stats Link */
.view-stats-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.2s ease;
    animation: fadeIn 0.5s ease 0.4s backwards;
}

.view-stats-link:hover {
    color: var(--text-main);
    background: var(--glass-bg);
}

.view-stats-link svg {
    opacity: 0.7;
}

.view-stats-link:hover svg {
    opacity: 1;
}

/* Journey Bar — compact inline row for replay / streak / stats */
.journey-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease 0.3s backwards;
}

.journey-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.journey-bar-item:hover {
    color: rgba(255, 255, 255, 1);
}

.journey-bar-item.selected {
    color: rgba(74, 222, 128, 0.9);
}

.jb-icon {
    display: inline-flex;
    align-items: center;
}

.jb-icon svg {
    opacity: 0.7;
}

.journey-bar-item:hover .jb-icon svg {
    opacity: 1;
}

.journey-bar-dot {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    user-select: none;
}

/* Listening Mode Cards (Step 3 - Headphones/Speakers) */
.listening-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.listening-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    animation: cardSlideUp 0.4s ease backwards;
    position: relative;
}

.listening-card:nth-child(1) { animation-delay: 0.05s; }
.listening-card:nth-child(2) { animation-delay: 0.1s; }
.listening-card:nth-child(3) { animation-delay: 0.15s; }
.listening-card:nth-child(4) { animation-delay: 0.2s; }

/* Three-up layout for listening cards */
.listening-cards.three-up {
    grid-template-columns: repeat(3, 1fr);
}

.listening-cards.three-up .card-desc {
    font-size: 0.75rem;
}

/* Two-up layout is the default 2x2 grid */
.listening-cards.two-up {
    grid-template-columns: repeat(2, 1fr);
}

.listening-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.listening-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.listening-card.last-used::after {
    content: 'Last used';
    position: absolute;
    top: -10px;
    right: 12px;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    background: rgba(100, 80, 140, 0.85);
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.dark-mode .listening-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .listening-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.wizard-hint {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    text-align: center;
}

body.dark-mode .wizard-hint {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 500px) {
    .listening-cards,
    .duration-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .duration-card:nth-child(4),
    .duration-card:nth-child(5) {
        grid-column: auto;
        justify-self: auto;
        width: 100%;
    }

    .session-cards {
        grid-template-columns: 1fr;
    }

    /* Mood cards use flexbox, just adjust min-width */
    .mood-card {
        min-width: 100px;
        padding: 1rem 1rem;
    }
}

/* Style/Soundscape Cards (Step 5) - Carousel */
.style-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.style-cards {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding: 0.5rem 15%;
    width: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.style-cards::-webkit-scrollbar {
    display: none;
}

.style-card {
    flex: 0 0 70%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.25rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    position: relative;
}

.style-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.style-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.style-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--text-main);
}

.style-card-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.3;
}

/* Carousel nav row (arrows + dots centered below cards) */
.style-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 0.75rem;
}

.style-carousel-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.style-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.08);
}

.style-carousel-nav:active {
    transform: scale(0.95);
}

.style-carousel-nav svg {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

/* Carousel dot indicators */
.style-carousel-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.style-carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(180, 160, 200, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-carousel-dot.active {
    background: var(--gradient-accent-glow, var(--text-main));
    transform: scale(1.3);
    box-shadow: 0 0 6px var(--gradient-accent, rgba(255, 255, 255, 0.3));
}

/* Mobile: slightly wider cards */
@media (max-width: 768px) {
    .style-card {
        flex: 0 0 75%;
    }

    .style-cards {
        padding: 0.5rem 12.5%;
    }
}

/* Desktop: keep base card size, adjust padding */
@media (min-width: 769px) {
    .style-cards {
        padding: 0.5rem 15%;
        gap: 1rem;
    }
}

body.dark-mode .style-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .style-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

body.dark-mode .style-card-title {
    color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .style-card-desc {
    color: rgba(255, 255, 255, 0.75);
}

body.dark-mode .style-carousel-nav {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .style-carousel-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Style Cards - Testing badge */
.style-card.testing {
    border-color: rgba(59, 130, 246, 0.4);
    position: relative;
}

.style-card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.6rem;
    padding: 3px 7px;
    background: rgba(37, 99, 235, 0.85);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

body.dark-mode .style-card.testing {
    border-color: rgba(59, 130, 246, 0.3);
}

/* Style Cards - Coming Soon badge */
.style-card.coming-soon {
    border-color: rgba(245, 158, 11, 0.4);
    position: relative;
    opacity: 0.7;
}

.style-card.coming-soon.disabled {
    cursor: not-allowed;
    pointer-events: none;
}

.style-card-badge.coming-soon-badge {
    background: rgba(180, 100, 0, 0.85);
    color: #fff;
    font-weight: 600;
}

.style-card-badge.testing-badge {
    background: rgba(37, 99, 235, 0.85);
    color: #fff;
    font-weight: 600;
}

body.dark-mode .style-card.coming-soon {
    border-color: rgba(245, 158, 11, 0.3);
}

/* Style Cards - Loading state */
.style-cards-loading,
.style-cards-empty {
    flex: 0 0 100%;
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Duration Cards (Step 6) - Grid layout like other steps */
.duration-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.duration-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--text-main);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    animation: cardSlideUp 0.4s ease backwards;
    position: relative;
}

.duration-card:nth-child(1) { animation-delay: 0.05s; }
.duration-card:nth-child(2) { animation-delay: 0.1s; }
.duration-card:nth-child(3) { animation-delay: 0.15s; }
.duration-card:nth-child(4) { animation-delay: 0.2s; }
.duration-card:nth-child(5) { animation-delay: 0.25s; }

/* Center last 2 cards if there's an odd number */
.duration-card:nth-child(4) {
    grid-column: 1 / 2;
    justify-self: end;
    width: calc(100% - 0.375rem);
}

.duration-card:nth-child(5) {
    grid-column: 2 / 3;
    justify-self: start;
    width: calc(100% - 0.375rem);
}

.duration-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.duration-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.duration-card[data-premium] {
    opacity: 0.6;
}

.duration-card[data-premium]::after {
    content: '\2605';
    margin-left: 0.4rem;
    font-size: 0.7rem;
    color: gold;
}

body.dark-mode .duration-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .duration-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Voice Cards (Step 7) */
.voice-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.voice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    position: relative;
    animation: cardSlideUp 0.4s ease backwards;
}

.voice-card:nth-child(1) { animation-delay: 0.05s; }
.voice-card:nth-child(2) { animation-delay: 0.1s; }

.voice-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.voice-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.voice-card[data-premium] {
    opacity: 0.6;
}

.voice-card[data-premium]::after {
    content: '\2605';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    color: gold;
}

body.dark-mode .voice-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .voice-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.voice-icon {
    opacity: 0.8;
}

.voice-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--text-main);
}

.voice-preview {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-preview:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-main);
    transform: scale(1.1);
}

/* Ready State */
.ready-orb {
    width: 120px;
    height: 120px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-core {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.25), rgba(147, 112, 219, 0.15));
    box-shadow: 0 0 30px rgba(147, 112, 219, 0.25);
    transition: all 0.8s ease;
}

.orb-pulse {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(147, 112, 219, 0.1);
    animation: orbPulse 2.5s ease-out infinite;
}

@keyframes orbPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.ready-orb.ready .orb-core {
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.4), rgba(200, 180, 255, 0.25));
    box-shadow: 0 0 40px rgba(200, 180, 255, 0.4);
}

.ready-orb.ready .orb-pulse {
    background: rgba(200, 180, 255, 0.15);
}

.ready-message {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 500;
    color: var(--text-dim);
    text-align: center;
    margin: 0;
    min-height: 1.5em;
}

.begin-btn {
    position: relative;
    padding: 1rem 3rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-main);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.begin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 30%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 70%,
        transparent 100%
    );
    pointer-events: none;
}

.begin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.begin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.begin-btn.ready {
    border-color: var(--gradient-accent-glow, rgba(200, 180, 255, 0.5));
    box-shadow: 0 0 20px var(--gradient-accent, rgba(200, 180, 255, 0.2));
    animation: beginPulse 2s ease-in-out infinite;
}

/*.begin-btn.ready:hover::before {*/
/*    animation: glassShimmer 0.6s ease-out forwards;*/
/*}*/

@keyframes beginPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--gradient-accent, rgba(200, 180, 255, 0.2));
    }
    50% {
        box-shadow: 0 0 40px var(--gradient-accent, rgba(200, 180, 255, 0.35));
    }
}

@keyframes glassShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Processing Indicator */
.processing-indicator {
    position: fixed;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.processing-indicator.active {
    opacity: 1;
}

.processing-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(147, 112, 219, 0.8);
    animation: processingPulse 1.5s ease-in-out infinite;
}

@keyframes processingPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Playing UI - fixed at bottom */
.playing-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1rem calc(3rem + env(safe-area-inset-bottom, 0px));
    z-index: 100;
}

.playing-ui.slide-in {
    animation: controlsSlideIn 0.5s ease;
}

@keyframes controlsSlideIn {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wizard fade out */
.onboarding-wizard.fade-out {
    animation: wizardFadeOut 0.4s ease forwards;
}

@keyframes wizardFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Dark mode adjustments for wizard */
body.dark-mode .wizard-question,
body.dark-mode .card-title,
body.dark-mode .voice-name,
body.dark-mode .mood-input,
body.dark-mode .wizard-btn,
body.dark-mode .duration-card,
body.dark-mode .begin-btn {
    color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .card-icon,
body.dark-mode .voice-icon {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .mood-card .mood-icon,
body.dark-mode .feedback-mood-card .mood-icon {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .card-desc,
body.dark-mode .ready-message,
body.dark-mode .mood-input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

body.dark-mode .session-card,
body.dark-mode .voice-card,
body.dark-mode .duration-card,
body.dark-mode .listening-card,
body.dark-mode .style-card,
body.dark-mode .mood-input,
body.dark-mode .mood-card,
body.dark-mode .feedback-mood-card,
body.dark-mode .prompt-category-btn,
body.dark-mode .wizard-btn,
body.dark-mode .begin-btn {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .session-card:hover,
body.dark-mode .voice-card:hover,
body.dark-mode .duration-card:hover,
body.dark-mode .listening-card:hover,
body.dark-mode .style-card:hover,
body.dark-mode .mood-card:hover,
body.dark-mode .feedback-mood-card:hover,
body.dark-mode .prompt-category-btn:hover,
body.dark-mode .wizard-btn:hover,
body.dark-mode .begin-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Light mode overrides - dark text/borders on light backgrounds */
body:not(.dark-mode) .session-card,
body:not(.dark-mode) .voice-card,
body:not(.dark-mode) .duration-card,
body:not(.dark-mode) .listening-card,
body:not(.dark-mode) .style-card,
body:not(.dark-mode) .mood-input,
body:not(.dark-mode) .mood-card,
body:not(.dark-mode) .feedback-mood-card,
body:not(.dark-mode) .prompt-category-btn,
body:not(.dark-mode) .wizard-btn,
body:not(.dark-mode) .begin-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 0, 0, 0.15);
}

body:not(.dark-mode) .session-card:hover,
body:not(.dark-mode) .voice-card:hover,
body:not(.dark-mode) .duration-card:hover,
body:not(.dark-mode) .listening-card:hover,
body:not(.dark-mode) .style-card:hover,
body:not(.dark-mode) .mood-card:hover,
body:not(.dark-mode) .feedback-mood-card:hover,
body:not(.dark-mode) .prompt-category-btn:hover,
body:not(.dark-mode) .wizard-btn:hover,
body:not(.dark-mode) .begin-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(0, 0, 0, 0.25);
}

body:not(.dark-mode) .wizard-btn.primary {
    background: rgba(0, 0, 0, 0.12);
}

body:not(.dark-mode) .prompt-category-btn {
    border-color: rgba(0, 0, 0, 0.15);
}

body:not(.dark-mode) .prompt-category-btn:hover,
body:not(.dark-mode) .prompt-category.expanded .prompt-category-btn {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .prompt-suboptions {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .prompt-chip:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Mobile adjustments */
@media (max-width: 500px) {
    .voice-cards {
        grid-template-columns: 1fr;
    }

    .voice-card {
        width: 100%;
        max-width: 200px;
    }

    .wizard-question {
        font-size: 1.4rem;
    }
}

/* ========================================
   Pre-Session Mood Modal
   ======================================== */
.mood-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.mood-modal-overlay.fade-out {
    animation: fadeOut 0.2s ease forwards;
}

.mood-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12);
}

.mood-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0 0 0.5rem;
    color: #2d2a3e;
}

.mood-modal-subtitle {
    color: #777;
    margin: 0 0 1.5rem;
    font-size: 0.85rem;
    font-family: 'Spectral', serif;
}

.mood-options {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pre-mood-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    min-width: 60px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pre-mood-btn:hover {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

.mood-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    opacity: 0.85;
    transition: all 0.2s ease;
}

.pre-mood-btn:hover .mood-circle {
    opacity: 1;
    transform: scale(1.1);
}

.mood-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: 'Spectral', serif;
}

.mood-skip-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-family: 'Spectral', serif;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.mood-skip-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    color: #555;
}

/* Dark mode - fade to black instead of white */
body.dark-mode .mood-modal-overlay {
    background: rgba(0, 0, 0, 0.85);
}

body.dark-mode .mood-modal-content {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .mood-modal-title {
    color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .mood-modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
}

body.dark-mode .pre-mood-btn {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .pre-mood-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .mood-skip-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

/* ═══════════════════════════════════════════════════════════
   APP TOAST (reusable notification)
   ═══════════════════════════════════════════════════════════ */

.app-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(20, 20, 30, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    white-space: nowrap;
}

.app-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.app-toast-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.app-toast-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(147, 112, 219, 0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.app-toast-link:hover {
    color: rgba(147, 112, 219, 1);
}

/* Type variants */
.app-toast.success { border-color: rgba(74, 222, 128, 0.4); }
.app-toast.warning { border-color: rgba(251, 191, 36, 0.4); }
.app-toast.error   { border-color: rgba(248, 113, 113, 0.4); }

/* PWA Install Toast */
.pwa-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: rgba(20, 20, 30, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    white-space: nowrap;
}

.pwa-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pwa-toast-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.pwa-toast-btn {
    padding: 0.35rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-toast-install {
    background: rgba(99, 102, 241, 0.85);
    color: #fff;
}

.pwa-toast-install:hover {
    background: rgba(99, 102, 241, 1);
}

.pwa-toast-dismiss {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
}

.pwa-toast-dismiss:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ═══════════════════════════════════════════════════════════
   ARCHETYPE SELECTION MODAL
   ═══════════════════════════════════════════════════════════ */

.archetype-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.archetype-modal.open {
    opacity: 1;
    visibility: visible;
}

.archetype-modal-content {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.archetype-modal.open .archetype-modal-content {
    transform: translateY(0);
}

.archetype-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-main);
    text-align: center;
    margin: 0 0 1.5rem;
}

/* Suggested archetype (hero card) */
.archetype-suggestion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.archetype-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.archetype-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.archetype-card.selected {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.12);
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.18);
}

.archetype-card.suggested {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(147, 112, 219, 0.35);
    box-shadow: 0 2px 12px rgba(147, 112, 219, 0.12);
    padding: 1.5rem 2rem;
}

.archetype-card.suggested:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(147, 112, 219, 0.5);
    box-shadow: 0 4px 16px rgba(147, 112, 219, 0.18);
}

.archetype-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    opacity: 0.85;
}

.archetype-icon svg {
    width: 100%;
    height: 100%;
}

.archetype-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-main);
}

.archetype-philosophy {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.archetype-tagline {
    font-family: 'Spectral', serif;
    font-size: 1rem;
    font-style: italic;
    font-weight: 500;
    color: var(--text-dim);
    text-align: center;
}

.archetype-reasoning {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.5;
    margin: 0;
    max-width: 320px;
}

/* Loop/pivot warning */
.archetype-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(200, 155, 20, 0.3);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.archetype-warning .warning-icon {
    flex-shrink: 0;
    color: rgba(160, 120, 10, 0.9);
}

.archetype-warning .warning-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* Action buttons */
.archetype-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.archetype-actions .wizard-btn {
    width: 100%;
}

/* Alternative archetypes grid */
.archetype-alternatives {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
    margin-top: 0.5rem;
}

.alternatives-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-main);
    text-align: center;
    margin: 0 0 1rem;
}

.archetype-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.archetype-cards .archetype-card {
    padding: 1rem;
    min-width: auto;
}

.archetype-cards .archetype-icon {
    width: 24px;
    height: 24px;
}

.archetype-cards .archetype-name {
    font-size: 1rem;
}

.archetype-cards .archetype-tagline {
    font-size: 0.75rem;
}

/* Effectiveness indicator (optional badge) */
.archetype-effectiveness {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.archetype-effectiveness .eff-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.6);
}

.archetype-effectiveness.low .eff-dot {
    background: rgba(251, 191, 36, 0.6);
}

/* Dark mode */
body.dark-mode .archetype-modal-content {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .archetype-modal-title,
body.dark-mode .archetype-name,
body.dark-mode .alternatives-title {
    color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .archetype-philosophy,
body.dark-mode .archetype-tagline,
body.dark-mode .archetype-reasoning {
    color: rgba(255, 255, 255, 0.75);
}

body.dark-mode .archetype-icon {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .archetype-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .archetype-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

body.dark-mode .archetype-card.suggested {
    background: rgba(147, 112, 219, 0.15);
    border-color: rgba(147, 112, 219, 0.35);
    box-shadow: 0 2px 12px rgba(147, 112, 219, 0.15);
}

body.dark-mode .archetype-warning {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
}

body.dark-mode .archetype-warning .warning-text {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .archetype-alternatives {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .archetype-modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .archetype-cards {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .archetype-cards .archetype-card {
        padding: 0.85rem;
    }

    .archetype-card.suggested {
        padding: 1.25rem 1.5rem;
    }
}

/* Tablet landscape: allow scrolling when viewport height is limited */
@media (max-height: 600px) and (orientation: landscape),
       (min-width: 601px) and (max-width: 1024px) and (max-height: 800px) {
    html, body {
        overflow: auto;
        overflow-x: hidden;
    }

    .container {
        height: auto;
        min-height: 100%;
        justify-content: flex-start;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* Mobile app layout fixes */
@media (max-width: 600px) {
    html, body {
        overflow: auto;
        overflow-x: hidden;
    }

    .user-status {
        top: 0.5rem;
        right: 0.5rem;
        gap: 0.4rem;
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .user-status .welcome-text {
        display: none;
    }

    .container {
        height: auto;
        min-height: 100%;
        justify-content: flex-start;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .header svg {
        width: 120px;
        height: 120px;
    }

    .subtitle {
        font-size: 0.85rem;
        padding: 0 1.5rem;
        text-align: center;
        color: rgba(45, 35, 50, 0.95);
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
    }

    /* Fullscreen button - keep on mobile but position for thumb reach */
    .fullscreen-btn {
        bottom: 0.75rem;
        right: 0.75rem;
        left: auto;
        transform: none;
    }

    body.is-playing .fullscreen-btn {
        bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
    }

    /*!* Hide app version on small screens *!*/
    /*.app-version-display {*/
    /*    display: none;*/
    /*}*/

    /* Space for bottom of wizard */
    .journey-bar {
        margin-bottom: 1rem;
    }

    .session-cards {
        gap: 1rem;
    }

    .session-card {
        padding: 1.25rem;
    }
}

/* ==========================================
   Site Footer
   ========================================== */

.site-footer {
    position: relative;
    z-index: 100;
    background: #2a2a2f;
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    justify-content: center;
}

.footer-logo {
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-logo svg {
    width: 120px;
    height: 120px;
}

.footer-nav {
    width: 100%;
}

.footer-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li a {
    font-family: 'Spectral', serif;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu li a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.footer-social-heading {
    font-family: 'Spectral', serif;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.footer-social-links {
    display: flex;
    gap: 1rem;
}

.footer-social-links a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

.footer-social-links a:hover {
    color: #fff;
}

.footer-legal {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.footer-legal p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .footer-brand {
        flex: 0 0 auto;
    }

    .footer-nav {
        flex: 1;
        max-width: 500px;
    }

    .footer-menu {
        align-items: flex-end;
    }

    .footer-social {
        flex: 0 0 auto;
        align-items: flex-end;
    }

    .footer-legal {
        flex: 0 0 100%;
        text-align: center;
    }
}

/* ==========================================
   Cookie Policy Page
   ========================================== */

.cookie-group {
    margin-bottom: 2.5rem;
}

.cookie-group__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.cookie-group__desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.cookie-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.cookie-table thead {
    background: rgba(0, 0, 0, 0.03);
}

.cookie-table th {
    font-family: 'Spectral', serif;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.cookie-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    vertical-align: top;
}

.cookie-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.cookie-table code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.cookie-table__name {
    width: 20%;
    min-width: 120px;
}

.cookie-table__provider {
    width: 20%;
    min-width: 100px;
}

.cookie-table__purpose {
    width: 45%;
    min-width: 200px;
}

.cookie-table__expiry {
    width: 15%;
    min-width: 80px;
    white-space: nowrap;
}

/* Cookie Consent Form on Policy Page */
.cookie-consent-form {
    margin-bottom: 2rem;
}

.cookie-consent-form table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.cookie-consent-form td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: middle;
}

.cookie-consent-form td:first-child {
    font-family: 'Spectral', serif;
    font-weight: 600;
    width: 120px;
}

.cookie-consent-form td:last-child {
    text-align: right;
    width: 50px;
}

.cookie-consent-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cookie-consent-form input[type="submit"],
.cookie-consent-form button[type="submit"],
.cookie-consent-form .btn,
.cookie-consent-form input.action {
    font-family: 'Spectral', serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    background: var(--primary-color, #4a3f5c);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.cookie-consent-form input[type="submit"]:hover,
.cookie-consent-form button[type="submit"]:hover,
.cookie-consent-form .btn:hover,
.cookie-consent-form input.action:hover {
    background: var(--primary-dark, #3a2f4c);
    transform: translateY(-1px);
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */

.reveal {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.reveal--fade-up {
    transform: translateY(40px);
}

.reveal--fade-in {
    transform: none;
}

.reveal--stagger-children .reveal-child {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: calc(var(--reveal-index, 0) * 0.1s);
}

.reveal--stagger-children .reveal-child.is-visible {
    opacity: 1;
    transform: none;
}

/* Reduced Motion - respect user preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: opacity 0.3s ease;
        transform: none;
    }

    .reveal--stagger-children .reveal-child {
        transition: opacity 0.3s ease;
        transform: none;
        transition-delay: 0s;
    }
}

/* ========================================
   Section Background Styles
   ======================================== */

.bg--dark {
    background: rgba(0, 0, 0, 0.3);
}

.bg--light {
    background: rgba(255, 255, 255, 0.1);
}

.bg--glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ========================================
   Content Section Element
   ======================================== */

.content-section {
    position: relative;
    z-index: 10;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* Alternate section backgrounds for visual rhythm */
.content-section:nth-child(even) {
    background: rgba(255, 255, 255, 0.08);
}

.content-section-inner {
    max-width: 1200px;
    width: 100%;
}

/* Icon styling */
.content-section-icon {
    max-height: 48px;
    width: auto;
    margin-bottom: 1.5rem;
}

/* Top layout - headline above body */
.content-section--top .content-section-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.content-section--top .content-section-heading {
    max-width: 800px;
}

.content-section--top .content-section-body {
    max-width: 800px;
}

.content-section--top.text-centered .content-section-inner {
    align-items: center;
    text-align: center;
}

.content-section--top.text-left .content-section-inner {
    align-items: flex-start;
    text-align: left;
}

/* Left/Right layouts - three column with divider */
.content-section--left .content-section-inner,
.content-section--right .content-section-inner {
    display: grid;
    gap: 2rem;
    align-items: start;
}

/* Place all items explicitly in row 1 to ensure divider stretches */
.content-section--left .content-section-heading,
.content-section--left .content-section-body,
.content-section--left .content-section-divider,
.content-section--right .content-section-heading,
.content-section--right .content-section-body,
.content-section--right .content-section-divider {
    grid-row: 1;
}

/* Divider column styling */
.content-section-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
    align-self: stretch;
    justify-self: center;
}

/* Hide divider for top layout */
.content-section--top .content-section-divider {
    display: none;
}

.content-section--left.split-40-60 .content-section-inner {
    grid-template-columns: 40% auto 1fr;
}

.content-section--left.split-50-50 .content-section-inner {
    grid-template-columns: 1fr auto 1fr;
}

.content-section--left.split-60-40 .content-section-inner {
    grid-template-columns: 60% auto 1fr;
}

.content-section--right.split-40-60 .content-section-inner {
    grid-template-columns: 1fr auto 40%;
}

.content-section--right.split-50-50 .content-section-inner {
    grid-template-columns: 1fr auto 1fr;
}

.content-section--right.split-60-40 .content-section-inner {
    grid-template-columns: 1fr auto 60%;
}

/* Left layout - explicit column placement */
.content-section--left .content-section-heading {
    grid-column: 1;
}

.content-section--left .content-section-divider {
    grid-column: 2;
}

.content-section--left .content-section-body {
    grid-column: 3;
}

/* Right layout - swap heading and body positions */
.content-section--right .content-section-body {
    grid-column: 1;
}

.content-section--right .content-section-divider {
    grid-column: 2;
}

.content-section--right .content-section-heading {
    grid-column: 3;
}

/* Typography */
.content-section-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 1rem 0;
    color: var(--text-main);
}

.content-section-subheadline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    color: var(--text-main);
    margin: 0 0 1.25rem 0;
    font-weight: 500;
    font-style: italic;
}

.content-section-text {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.75;
    color: var(--text-body);
    text-align: justify;
}

.content-section-text p {
    margin: 0 0 1.25rem 0;
}

.content-section-text p:last-child {
    margin-bottom: 0;
}

/* Responsive - stack columns on tablet/mobile */
@media (max-width: 900px) {
    .content-section {
        padding: 4rem 1.5rem;
        min-height: auto;
    }

    .content-section--left .content-section-inner,
    .content-section--right .content-section-inner {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .content-section-divider {
        display: none;
    }

    /* Reset grid placement for stacked layout */
    .content-section--left .content-section-heading,
    .content-section--left .content-section-body,
    .content-section--right .content-section-heading,
    .content-section--right .content-section-body {
        grid-column: 1;
        grid-row: auto;
    }

    .content-section--left .content-section-body,
    .content-section--right .content-section-body {
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 1.5rem;
    }

    .content-section--right .content-section-heading {
        order: 1;
    }

    .content-section--right .content-section-body {
        order: 2;
    }
}

/* ========================================
   Testimonials Element
   ======================================== */

.testimonials-section {
    position: relative;
    z-index: 10;
    padding: 5rem 2rem;
}

.testimonials-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 400;
    text-align: center;
    margin: 0 0 3rem 0;
    color: var(--text-main);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    line-height: 1;
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    color: rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.testimonial-quote {
    font-family: 'Spectral', serif;
    font-size: 1rem;
    font-style: italic;
    line-height: 1.7;
    color: var(--text-body);
    margin: 0 0 1.5rem 0;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

.testimonial-author::before {
    content: '\2014\00a0';
}

/* Stagger animation for testimonial cards */
.testimonials-section.reveal--stagger-children .testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonials-section.reveal--stagger-children.is-visible .testimonial-card {
    opacity: 1;
    transform: none;
}

.testimonials-section.reveal--stagger-children .testimonial-card:nth-child(1) { transition-delay: 0s; }
.testimonials-section.reveal--stagger-children .testimonial-card:nth-child(2) { transition-delay: 0.1s; }
.testimonials-section.reveal--stagger-children .testimonial-card:nth-child(3) { transition-delay: 0.2s; }
.testimonials-section.reveal--stagger-children .testimonial-card:nth-child(4) { transition-delay: 0.3s; }
.testimonials-section.reveal--stagger-children .testimonial-card:nth-child(5) { transition-delay: 0.4s; }
.testimonials-section.reveal--stagger-children .testimonial-card:nth-child(6) { transition-delay: 0.5s; }

@media (max-width: 768px) {
    .testimonials-section {
        padding: 3rem 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }
}

/* ========================================
   Section CTA Buttons
   ======================================== */

.content-section .cta-btn,
.features-section .cta-btn,
.site-stats-section .cta-btn,
.testimonials-section .cta-btn {
    margin-top: 2.5rem;
    display: inline-block;
}

.content-section--top .cta-btn {
    align-self: center;
}

.features-section .cta-btn,
.site-stats-section .cta-btn {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.testimonials-inner .cta-btn {
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2.5rem;
}
