/* -------------------------------------------------------------
   SŁOIK ECHA WĘDROWCA - PREMIUM "LOGIKA MROKU" STYLE SYSTEM (v3-CORRECTION)
   ------------------------------------------------------------- */

/* Strict layout reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Core Design Tokens */
:root {
    /* Colors */
    --color-bg-start: #12161A;
    --color-bg-end: #0D0F12;
    --color-glass-base: rgba(20, 20, 25, 0.45);
    --color-glass-dark: rgba(10, 10, 12, 0.85);
    
    /* Amber Lava Primary Energy Signature */
    --color-accent-amber: #e69545; 
    --color-accent-amber-glow: rgba(230, 149, 69, 0.25);
    --color-accent-amber-deep: rgba(230, 149, 69, 0.65);
    
    /* Matte Silver Crisis / Apathy Signature */
    --color-accent-silver: #c0c0c0;
    --color-accent-silver-glow: rgba(192, 192, 192, 0.25);
    
    /* Glass Borders Specs */
    --border-glass-amber: 1px solid rgba(230, 149, 69, 0.15);
    --border-glass-silver: 1px solid rgba(192, 192, 192, 0.15);
    --border-glass-hover: 1px solid rgba(230, 149, 69, 0.35);
    
    /* Text Colors */
    --color-text-primary: #E2E8F0;
    --color-text-secondary: #94A3B8; /* Muted cosmic grey */
    --color-text-muted: #64748B;
    --color-text-accent: #e69545;
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Transitions */
    --transition-slow: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-medium: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: all 0.15s ease;
    --transition-serenity: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Base Styles */
body {
    font-family: var(--font-body);
    background-color: var(--color-bg-end);
    color: var(--color-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* -------------------------------------------------------------
   LAYERED BACKGROUND & ATMOSPHERE
   ------------------------------------------------------------- */

/* Layer 1: Locked Cosmic Nebula Backdrop */
.bg-echo-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('assets/gwiezdne_echo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    opacity: 0.45; 
    filter: saturate(95%) contrast(90%) blur(0.5px);
    transition: opacity 1.5s ease-in-out;
}

/* Layer 1.5: Deep Velvet Gradient Overlay Mask */
.bg-gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(10, 10, 12, 0.4) 0%, rgba(13, 15, 18, 0.8) 85%),
                linear-gradient(135deg, rgba(10, 10, 12, 0.5) 0%, rgba(13, 15, 18, 0.9) 100%);
    z-index: 2;
    opacity: 0.8; 
    pointer-events: none;
}

/* Layer 1.8: Semi-transparent Interactive Human Shadow Outline (Echo Wędrowca) */
.wandering-shadow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 800px;
    background: radial-gradient(ellipse at center, rgba(230, 149, 69, 0.03) 0%, rgba(18, 22, 26, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: screen;
    filter: blur(40px);
    transition: transform 0.8s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 1s ease;
}

/* Layer 2: Interactive Pointer Cursor Glow spotlight */
#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 4;
    mix-blend-mode: screen;
    background: radial-gradient(
        320px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
        rgba(230, 149, 69, 0.06) 0%,
        rgba(230, 149, 69, 0.01) 50%,
        transparent 100%
    );
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* Foreground Scrollable Layer Wrapper */
.content-wrapper {
    position: relative;
    z-index: 5;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -------------------------------------------------------------
   GLASSMORPHISM & ASYMMETRIC DESIGN
   ------------------------------------------------------------- */
.glass-panel {
    background: var(--color-glass-base);
    backdrop-filter: blur(25px) brightness(95%);
    -webkit-backdrop-filter: blur(25px) brightness(95%);
    border: var(--border-glass-amber);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    transition: var(--transition-slow);
}

.glass-panel:hover {
    border-color: rgba(230, 149, 69, 0.3);
    box-shadow: 0 12px 40px 0 rgba(230, 149, 69, 0.04), 
                0 8px 32px 0 rgba(0, 0, 0, 0.6);
}

/* Diagonal asymmetric filleted standard (two sharp corners, two opposite 32px filleted) */
.asymmetric-geometry-1 {
    border-radius: 32px 0 32px 0;
}

.asymmetric-geometry-2 {
    border-radius: 0 32px 0 32px;
}

.asymmetric-geometry-pill {
    border-radius: 24px 0 24px 0;
}

/* -------------------------------------------------------------
   HEADER & MINIMALIST NAVIGATION
   ------------------------------------------------------------- */
.main-header {
    width: 100%;
    position: relative;
    padding-top: 1.5rem;
    z-index: 100;
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 4.5rem;
}

/* Branding left block */
.branding {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.brand-subtitle {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
    text-transform: lowercase;
    margin-top: 0.25rem;
}

/* Main Nav Desktop */
.main-nav {
    display: block;
    transition: var(--transition-slow);
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2.2rem;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: var(--transition-slow);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent-amber);
    box-shadow: 0 0 8px var(--color-accent-amber);
    transition: var(--transition-slow);
}

.nav-link:hover {
    color: var(--color-text-primary);
    text-shadow: 0 0 10px rgba(230, 149, 69, 0.3);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active-subpage {
    color: var(--color-accent-amber);
    text-shadow: 0 0 8px rgba(230, 149, 69, 0.25);
}

.nav-link.active-subpage::after {
    width: 100%;
}

/* Hamburger toggle on mobile */
.menu-toggle {
    display: none; /* hidden desktop */
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    z-index: 110;
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-text-primary);
    border-radius: 2px;
    transition: var(--transition-medium);
}

.menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.header-separator {
    max-width: 1300px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 15%, rgba(255, 255, 255, 0.08) 85%, transparent);
    margin: 1rem auto 0;
    width: 90%;
}

/* -------------------------------------------------------------
   MAIN CONTAINER AND VIEWS LAYOUT
   ------------------------------------------------------------- */
.main-body {
    flex-grow: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.view-scene {
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.view-scene.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
}

/* -------------------------------------------------------------
   VIEW A: ENTRANCE GATEWAY (BRAMA)
   ------------------------------------------------------------- */
.brama-container {
    max-width: 750px;
    width: 100%;
    margin-top: 3rem;
    padding: 3.5rem 4rem;
    text-align: center;
}

.brama-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    color: var(--color-text-primary);
    text-transform: uppercase;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.brama-subtitle {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    letter-spacing: 0.08em;
    font-style: italic;
    margin-bottom: 3rem;
    line-height: 1.7;
}

/* Intent selections */
.intent-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3.5rem;
    width: 100%;
}

.intent-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    align-items: center;
    outline: none;
}

.intent-card:hover, .intent-card:focus-within {
    border-color: var(--color-accent-amber);
    background: rgba(230, 149, 69, 0.03);
    box-shadow: 0 0 20px 0 rgba(230, 149, 69, 0.05);
    transform: translateY(-2px);
}

.intent-card.selected {
    border-color: var(--color-accent-amber);
    background: rgba(230, 149, 69, 0.06);
    box-shadow: 0 0 25px 0 rgba(230, 149, 69, 0.1);
}

.intent-btn {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-accent-amber);
    background: transparent;
    border: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.intent-subtext {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    line-height: 1.5;
}

/* Authentication Gate */
.brama-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.2rem;
    width: 100%;
}

.auth-gate {
    width: 100%;
    display: flex;
    justify-content: center;
}

.google-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
    border: 1px solid rgba(230, 149, 69, 0.30);
    padding: 0.9rem 2.5rem;
    color: var(--color-accent-amber);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-slow);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.google-auth-btn:hover {
    background: var(--color-accent-amber);
    border-color: var(--color-accent-amber);
    color: #0D0F12;
    box-shadow: 0 0 25px rgba(230, 149, 69, 0.5);
    transform: scale(1.02);
}

.google-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.privacy-covenant {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 580px;
    text-align: justify;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1.5rem;
}

/* -------------------------------------------------------------
   VIEW B: THE SANCTUARY (v3-CORRECTION UNIFIED UNIBODY CARD)
   ------------------------------------------------------------- */
.sanctuary-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1.5rem;
}

/* Profile / settings row remains at the topmost of View B */
.profile-bar {
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(230, 149, 69, 0.3);
}

.user-name {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    cursor: pointer;
    transition: var(--transition-medium);
}

.logout-btn:hover {
    color: var(--color-accent-amber);
}

/* Quiet Checkin toggle */
.czuwanie-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.czuwanie-label {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--color-text-secondary);
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(230, 149, 69, 0.15);
    border-color: rgba(230, 149, 69, 0.4);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: var(--color-accent-amber);
    box-shadow: 0 0 8px var(--color-accent-amber);
}

/* ==================== THE UNIFIED GLASS CARD ==================== */
.unified-sanctuary-card {
    position: relative;
    width: 100%;
    max-width: 480px; /* Locked width desktop, adaptive mobile */
    
    /* Flex alignment column stack for top-to-bottom layout hierarchy */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 35px 30px 10px; /* adjusted bottom padding to allow links to breathe */
    gap: 1.25rem;
    overflow: visible;
    
    /* Premium Glassmorphism Shader specs matching 3900.png */
    background: rgba(25, 25, 30, 0.4);
    backdrop-filter: blur(35px) brightness(95%);
    -webkit-backdrop-filter: blur(35px) brightness(95%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    
    /* Diagonal asymmetric geometries */
    border-radius: 32px 0 32px 0; 
    transition: var(--transition-slow);
}

.unified-sanctuary-card:hover {
    border-color: rgba(230, 149, 69, 0.25);
    box-shadow: 0 25px 60px rgba(230, 149, 69, 0.03), 
                0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Chevron back navigation button placed in top-left */
.session-bridge-btn {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition-medium);
    z-index: 10;
}

.session-bridge-btn:hover {
    color: var(--color-accent-amber);
    border-color: rgba(230, 149, 69, 0.25);
    background: rgba(230, 149, 69, 0.04);
}

/* Re-coded stout, wide-body Mason Jar outline SVG */
.spiritual-vessel-wrapper {
    position: relative;
    width: 170px; /* wide body jar */
    height: 204px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6;
    margin-top: 0.2rem;
    transition: filter 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.jar-svg-outline {
    width: 100%;
    height: 100%;
    stroke: var(--color-accent-amber);
    stroke-width: 1.5px;
    fill: none;
    filter: drop-shadow(0 0 12px rgba(230, 149, 69, 0.65)); /* Amber Lava soft glow */
    transition: filter 0.8s ease;
}

.jar-rim, .jar-neck, .jar-body {
    stroke: var(--color-accent-amber);
    stroke-width: 1.8px;
}

/* Fireflies drifting coordinates container */
.vessel-particle-chamber {
    position: absolute;
    width: 110px;
    height: 140px;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 35px;
    overflow: hidden;
    pointer-events: none;
    z-index: 7;
}

.vessel-particle-chamber.vortex-spin {
    animation: vortex-vibrate 0.8s ease-in-out infinite;
}

@keyframes vortex-vibrate {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-48%) rotate(1deg); }
    75% { transform: translateX(-52%) rotate(-1deg); }
}

.firefly-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--color-accent-amber);
    box-shadow: 0 0 12px var(--color-accent-amber);
    opacity: 0.6;
    pointer-events: none;
}

/* Particle stream overlay */
.alchemy-particle-stream {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8;
    overflow: visible;
}

.ascending-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-accent-amber);
    box-shadow: 0 0 18px var(--color-accent-amber);
    transition: var(--transition-slow);
}

/* Inner inputs blocks (fade on Serenity Hold) */
.capture-block-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: var(--transition-serenity);
}

.capture-block-inner.serenity-hide {
    opacity: 0 !important;
    transform: scale(0.97) translateY(8px) !important;
    pointer-events: none !important;
}

/* Prompt elegant typography label */
.prompt-label {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary); /* Silver off-white */
    text-align: center;
    line-height: 1.5;
    min-height: 44px; /* prevents shift */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

/* Recessed dark pill slot input slot */
.capture-textarea {
    width: 100%;
    min-height: 110px;
    background: rgba(10, 10, 12, 0.5); /* Embedded transparent dark slot */
    border: none !important; /* Borderless */
    border-radius: 16px; /* Pill coordinates */
    padding: 1.25rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--color-text-primary);
    resize: none;
    outline: none;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8); /* Dark recessed inner shadow */
    transition: var(--transition-medium);
}

.capture-textarea:focus {
    background: rgba(10, 10, 12, 0.65);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.9), 
                0 0 10px rgba(230, 149, 69, 0.05);
}

.capture-textarea::placeholder {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Fullwidth save button as flat amber gradient bar */
.btn-save-fullwidth {
    width: 100%;
    height: 48px;
    background: linear-gradient(90deg, #e69545, #f5b064); /* flat warm amber gradient */
    border: none;
    border-radius: 16px 0 16px 0; /* asymmetrical smooth curves */
    color: #0D0F12; /* Dark bold contrast */
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-medium);
    outline: none;
}

.btn-save-fullwidth:hover, .btn-save-fullwidth:focus {
    box-shadow: 0 0 25px rgba(230, 149, 69, 0.6);
    transform: scale(1.01);
}

/* Silent Grace Anchor inner layout */
.silent-grace-block-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fade-in-grace 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fade-in-grace {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.grace-whisper {
    font-family: var(--font-body);
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
    text-align: center;
    font-style: italic;
}

.embers-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    min-height: 40px;
    width: 100%;
}

/* Pulsing ember points */
.pulsing-ember {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--color-accent-amber);
    box-shadow: 0 0 10px var(--color-accent-amber);
    cursor: pointer;
    position: relative;
    animation: ember-breathe 2.5s infinite ease-in-out;
}

@keyframes ember-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px var(--color-accent-amber);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 22px var(--color-accent-amber);
        opacity: 1;
    }
}

.pulsing-ember:nth-child(2) { animation-delay: 0.4s; }
.pulsing-ember:nth-child(3) { animation-delay: 0.8s; }

/* Micro glassmorphic speech bubble */
.speech-bubble {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 250px;
    background: var(--color-glass-dark);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: var(--border-glass-amber);
    padding: 1rem;
    border-radius: 12px 12px 12px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    z-index: 100;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 8px;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: rgba(230, 149, 69, 0.15) transparent transparent transparent;
}

.pulsing-ember.expanded .speech-bubble {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.btn-pill-muted {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--color-text-secondary) !important;
}

.btn-pill-muted:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: var(--color-text-primary) !important;
}

/* ==================== BOTTOM LINKS BROUGHT BACK INSIDE CARD ==================== */
.sanctuary-links-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    
    /* Frosted glass surface alignment coordinates */
    margin-top: 25px; /* elegant separation from orange button above */
    padding-bottom: 25px; /* sufficient breathing room from base of unified glass card */
    border-top: 1px solid rgba(255, 255, 255, 0.03); /* micro line separating link area */
    padding-top: 15px;
    z-index: 10;
}

.text-link-item {
    background: transparent;
    border: none;
    color: var(--color-text-secondary); /* off-white/muted gray tone */
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    transition: var(--transition-medium);
    outline: none;
}

.text-link-item:hover {
    color: var(--color-accent-amber); /* amber hover highlight */
    text-shadow: 0 0 8px rgba(230, 149, 69, 0.35);
}

.link-divider {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

/* -------------------------------------------------------------
   Timeline Cosmic Thread Sidebar Panel (Milky Way Sidebar)
   ------------------------------------------------------------- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 12, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.sidebar-container {
    position: absolute;
    top: 0;
    right: -100%;
    width: 80%; 
    max-width: 500px;
    height: 100vh;
    border-left: var(--border-glass-amber);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    transition: right 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1000;
}

.sidebar-overlay.active .sidebar-container {
    right: 0;
}

.sidebar-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--color-accent-amber);
    text-transform: uppercase;
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.15rem;
    cursor: pointer;
    transition: var(--transition-medium);
}

.sidebar-close-btn:hover {
    color: var(--color-accent-amber);
}

.sidebar-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 3rem 2rem;
    position: relative;
}

/* Custom star path milky-way linear spine */
.milky-way-spine {
    position: relative;
    min-height: 100%;
    padding-left: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.milky-way-spine::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 6px;
    width: 1px;
    background: linear-gradient(180deg, 
                var(--color-accent-amber) 0%, 
                var(--color-text-muted) 85%, 
                transparent 100%);
    box-shadow: 0 0 10px rgba(230, 149, 69, 0.5);
}

.stellar-node {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.stellar-orb {
    position: absolute;
    left: -1px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    z-index: 10;
    transition: var(--transition-medium);
}

.stellar-orb.amber-orb {
    background-color: var(--color-accent-amber);
    box-shadow: 0 0 12px var(--color-accent-amber);
    animation: orb-pulse 2s infinite ease-in-out;
}

@keyframes orb-pulse {
    0%, 100% { box-shadow: 0 0 8px var(--color-accent-amber); }
    50% { box-shadow: 0 0 18px var(--color-accent-amber); }
}

.stellar-orb.silver-node {
    background-color: var(--color-accent-silver);
    box-shadow: 0 0 8px var(--color-accent-silver);
}

.stellar-details {
    padding-left: 2rem;
    display: flex;
    flex-direction: column;
}

.stellar-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

.stellar-label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-top: 0.25rem;
}

.stellar-label.silver-label {
    color: var(--color-text-secondary);
    font-style: italic;
}

/* Speech bubbles dynamically rendered next to node coordinates */
.sidebar-bubble {
    margin-top: 0.5rem;
    margin-left: 2rem;
    background: var(--color-glass-dark);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--border-glass-amber);
    border-radius: 0 16px 16px 16px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.5;
    max-width: 320px;
    color: var(--color-text-primary);
    display: none;
    animation: bubble-pop 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.stellar-node.active-node .sidebar-bubble {
    display: block;
}

@keyframes bubble-pop {
    from { opacity: 0; transform: scale(0.95) translateY(-5px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* -------------------------------------------------------------
   RETRIEVAL AND DIALOG MODALS DESIGN
   ------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 12, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-in-out;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    max-width: 600px;
    width: 85%;
    padding: 3rem;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close-top {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-medium);
}

.modal-close-top:hover {
    color: var(--color-accent-amber);
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--color-accent-amber);
    text-transform: uppercase;
}

.modal-title.crisis-title {
    color: var(--color-accent-silver);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.2);
}

.modal-body-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-primary);
}

.modal-body-text.empathetic-text {
    color: var(--color-text-secondary);
    font-style: italic;
    text-align: justify;
}

/* -------------------------------------------------------------
   FOOTER & MEDICAL DISCLAIMER
   ------------------------------------------------------------- */
.main-footer {
    width: 100%;
    margin-top: auto;
    padding-bottom: 2rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.disclaimer-block {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.disclaimer-text {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.footer-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05) 15%, rgba(255, 255, 255, 0.05) 85%, transparent);
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
}

.copyright-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
}

/* -------------------------------------------------------------
   RESPONSIVE SCALING STANDARDS
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 17, 21, 0.95);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border-left: var(--border-glass-amber);
        z-index: 105;
        padding: 6rem 2rem 2rem;
        transition: right 0.5s cubic-bezier(0.25, 1, 0.5, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
    }

    .main-nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .nav-link {
        font-size: 1rem;
    }

    .brand-title {
        font-size: 1.3rem;
    }

    .brama-container {
        padding: 2.2rem 1.8rem;
    }

    .brama-title {
        font-size: 1.6rem;
    }

    .intent-card {
        padding: 1.25rem 1.2rem;
    }

    .intent-btn {
        font-size: 0.95rem;
    }

    /* Sanctuary mobile layouts */
    .unified-sanctuary-card {
        padding: 30px 20px 10px;
    }

    .spiritual-vessel-wrapper {
        width: 140px;
        height: 168px;
    }

    .vessel-particle-chamber {
        width: 90px;
        height: 110px;
        bottom: 20px;
    }

    .silent-grace-block-inner {
        gap: 1.5rem;
    }

    .embers-wrapper {
        gap: 2rem;
    }

    .speech-bubble {
        width: 220px;
        bottom: 2.2rem;
    }

    .sidebar-container {
        width: 80%;
    }
}
