/* ============================================================
   VELEIRAS — Design System
   "Does this feel like walking into a quiet room,
    or clicking through a website?"
   ============================================================ */

/* ── CSS Variables ── */
:root {
    /* The darkness — where candles live */
    --void:              #0A0A0F;
    --night:             #111118;
    --dusk:              #1A1A24;
    --ash:               #2A2A36;

    /* Candlelight — the only light source */
    --flame-core:        #E8DECA;
    --flame-warm:        #FFD93D;
    --flame-amber:       #F4A623;
    --flame-deep:        #E8751A;
    --flame-ember:       #D94A3C;

    /* Breath — the cool complement */
    --breath-blue:       #4A6FA5;
    --breath-soft:       #8B9DC3;
    --breath-mist:       rgba(255,255,255,0.04);

    /* Text — lit by candlelight */
    --text-primary:      #E8E0D4;
    --text-secondary:    #9A9488;
    --text-whisper:      #847E76;

    /* Functional */
    --action:            #FFD93D;
    --action-hover:      #FFE066;
    --action-text:       #0A0A0F;
    --error:             #D94A3C;
    --success:           #3D9B6E;

    /* Button system */
    --btn-radius:        6px;
    --btn-radius-sm:     5px;

    /* Motion */
    --ease-breath:       cubic-bezier(0.4, 0.0, 0.2, 1);
    --ease-enter:        cubic-bezier(0.0, 0.0, 0.2, 1);
    --ease-exit:         cubic-bezier(0.4, 0.0, 1.0, 1);
    --dur-quick:         200ms;
    --dur-calm:          600ms;
    --dur-ritual:        1500ms;
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--void);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Global Scrollbars — thin, brand-colored ── */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.35);
}

/* ── Typography ── */
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/assets/fonts/cormorant-garamond-light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/assets/fonts/cormorant-garamond-regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'DM Sans';
    src: url('/assets/fonts/dm-sans-regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'DM Sans';
    src: url('/assets/fonts/dm-sans-medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

.font-serif {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

.font-sans {
    font-family: 'DM Sans', -apple-system, sans-serif;
}

/* Person names — always serif, always reverent */
.person-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--flame-core);
}

.person-years {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.person-epitaph {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Life story — large, readable, intimate */
.life-story {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--text-primary);
    max-width: 640px;
    margin: 0 auto;
}

/* ── Links ── */
a {
    color: var(--flame-warm);
    text-decoration: none;
    transition: color var(--dur-quick) var(--ease-breath);
}
a:hover {
    color: var(--action-hover);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border: 1px solid transparent;
    border-radius: var(--btn-radius);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition:
        background var(--dur-quick) var(--ease-breath),
        border-color var(--dur-quick) var(--ease-breath),
        color var(--dur-quick) var(--ease-breath),
        box-shadow var(--dur-calm) var(--ease-breath),
        transform var(--dur-quick) var(--ease-breath);
    text-decoration: none;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.btn:focus-visible {
    outline: 2px solid var(--flame-amber);
    outline-offset: 2px;
}
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 2px solid var(--flame-amber);
    outline-offset: 2px;
}
.user-menu-toggle:focus-visible,
.sea-info-btn:focus-visible,
.tint-swatch:focus-visible,
.mem-more-btn:focus-visible,
.follow-heart:focus-visible,
.symbol-arrow:focus-visible,
.preset-btn:focus-visible,
.audio-toggle-btn:focus-visible {
    outline: 2px solid var(--flame-amber);
    outline-offset: 2px;
}
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(244,166,35,0.90), rgba(232,117,26,0.85));
    color: var(--action-text);
    border-color: rgba(244,166,35,0.40);
    box-shadow:
        0 0 20px rgba(244,166,35,0.18),
        inset 0 1px 0 rgba(255,248,231,0.15);
}
.btn-primary:hover {
    background: linear-gradient(135deg, rgba(232,150,30,0.95), rgba(210,110,20,0.90));
    border-color: rgba(244,166,35,0.50);
    box-shadow:
        0 0 32px rgba(244,166,35,0.28),
        0 0 8px rgba(244,166,35,0.15),
        inset 0 1px 0 rgba(255,248,231,0.20);
    transform: translateY(-1px);
}
.btn-primary:active {
    background: linear-gradient(135deg, rgba(232,117,26,0.95), rgba(244,166,35,0.85));
    box-shadow: 0 0 12px rgba(244,166,35,0.15);
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: rgba(154,148,136,0.25);
}
.btn-ghost:hover {
    color: var(--text-primary);
    border-color: rgba(154,148,136,0.40);
    background: rgba(255,248,231,0.03);
}
.btn-ghost:active {
    background: rgba(255,248,231,0.06);
    border-color: rgba(154,148,136,0.40);
    color: var(--text-primary);
}

/* ── Button Loading State ── */
.btn-loading {
    min-height: 42px;
    min-width: 120px;
    pointer-events: none;
    opacity: 0.7;
    position: relative;
    color: transparent !important;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,248,231,0.25);
    border-top-color: var(--flame-warm, #FFD93D);
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn-secondary {
    background: rgba(255,248,231,0.06);
    color: var(--flame-core);
    border-color: rgba(244,166,35,0.30);
}
.btn-secondary:hover {
    background: rgba(255,248,231,0.10);
    border-color: rgba(244,166,35,0.50);
    box-shadow: 0 0 16px rgba(244,166,35,0.10);
}
.btn-secondary:active {
    background: rgba(255,248,231,0.14);
    border-color: rgba(244,166,35,0.50);
}

.btn-danger {
    background: rgba(192,57,43,0.15);
    color: #E8685A;
    border-color: rgba(192,57,43,0.50);
}
.btn-danger:hover {
    background: rgba(192,57,43,0.25);
    border-color: rgba(192,57,43,0.70);
    color: #F08070;
    box-shadow: 0 0 16px rgba(192,57,43,0.12);
}
.btn-danger:active {
    background: rgba(192,57,43,0.30);
    border-color: rgba(192,57,43,0.70);
}

.btn-small,
.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    border-radius: var(--btn-radius-sm);
    gap: 4px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ── Form Fields ── */
.field {
    margin-bottom: 24px;
}

.field label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--dusk);
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    transition: border-color var(--dur-quick) var(--ease-breath),
                box-shadow var(--dur-quick) var(--ease-breath);
    outline: none;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--flame-warm);
    box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.1);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-secondary);
}

.field textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Date inputs — light calendar icon on dark bg */
input[type="date"] {
    color-scheme: dark;
}

/* Number input spinners — visible on dark bg */
.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    filter: invert(1);
}

/* Radio buttons — custom styled for dark theme */
input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

input[type="radio"]:checked {
    border-color: var(--flame-warm, #ffd93d);
    background: transparent;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--flame-warm, #ffd93d);
}

/* Checkboxes — custom styled for dark theme */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.40);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    transition: border-color 0.2s, background 0.2s;
}

input[type="checkbox"]:checked {
    border-color: var(--flame-warm, #ffd93d);
    background: var(--flame-warm, #ffd93d);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid #0A0A0F;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Autofill — prevent browser white background on dark theme */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--dusk, #14141A) inset !important;
    -webkit-text-fill-color: var(--text-primary, #E8E4DB) !important;
    caret-color: var(--text-primary, #E8E4DB);
    transition: background-color 5000s ease-in-out 0s;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-whisper);
    margin-top: 4px;
    line-height: 1.4;
}

.field-error {
    font-size: 0.875rem;
    color: var(--error);
    margin-top: 6px;
}

/* ── Password strength chips ── */
.pw-checks {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    margin: 8px 0 16px;
}
.pw-check {
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--ash, #333);
    color: var(--text-whisper, #666);
    background: transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1.5;
}
.pw-check.pass {
    color: var(--flame-warm, #F4A623);
    border-color: rgba(244,166,35,0.4);
    background: rgba(244,166,35,0.08);
}

/* ── Cards / Surfaces ── */
.surface {
    background: var(--breath-mist);
    border-radius: 16px;
    padding: 32px;
}

/* ── THE SEA (Landing Canvas) ── */
.sea-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background: var(--void);
    cursor: grab;
    touch-action: none;
}
.sea-container:active {
    cursor: grabbing;
}

.sea-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 40px;
    text-align: center;
    background: linear-gradient(transparent, var(--void) 70%);
    pointer-events: none;
}

.sea-tagline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    color: var(--flame-core);
    margin-bottom: 24px;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeInSlow 2s var(--ease-enter) 1s forwards;
}

.sea-cta {
    pointer-events: auto;
    opacity: 0;
    animation: fadeInSlow 2s var(--ease-enter) 2.5s forwards;
}

.sea-headline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 300;
    color: var(--flame-core);
    letter-spacing: 0.02em;
    line-height: 1.3;
    margin: 0 0 12px;
    text-wrap: balance;
    opacity: 0;
    animation: fadeInSlow 2s var(--ease-enter) 0.8s forwards;
}

.sea-subline {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.9375rem, 2vw, 1.125rem);
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto 28px;
    opacity: 0;
    animation: fadeInSlow 2s var(--ease-enter) 1.4s forwards;
}

.sea-cta-group {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    pointer-events: auto;
    opacity: 0;
    animation: fadeInSlow 2s var(--ease-enter) 2s forwards;
}

.sea-cta-secondary {
    font-size: 0.875rem;
    padding: 8px 20px;
    color: var(--text-secondary);
    border-color: rgba(90,85,78,0.30);
}
.sea-cta-secondary:hover {
    color: var(--text-secondary);
    border-color: rgba(154,148,136,0.30);
    background: rgba(255,248,231,0.02);
}

.sea-stats {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 15;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 0.875rem;
    color: var(--text-whisper);
    letter-spacing: 0.02em;
    pointer-events: none;
}

.stat-flame {
    vertical-align: -2px;
    margin-right: 2px;
}

.sea-stats-sep {
    color: var(--ash);
    margin: 0 4px;
}

.sea-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
}

.sea-logo {
    display: inline-block;
    line-height: 0;
    flex-shrink: 0;
    max-width: min(200px, 40vw);
}

.sea-logo img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 100%;
}

.sea-nav-links {
    display: flex;
    gap: 24px;
}

.sea-nav-links a {
    font-size: 0.875rem;
    color: var(--text-whisper);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(90,85,78,0.5);
}
.sea-nav-links a:hover {
    color: var(--text-secondary);
    text-decoration-color: var(--text-secondary);
}

.sea-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sea-nav-right .sea-nav-link {
    font-size: 0.875rem;
    color: var(--text-whisper);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}
.sea-nav-right .sea-nav-link:hover {
    color: var(--text-secondary);
}

/* ── User Account Menu ── */
.user-menu {
    position: relative;
    margin-left: 8px;
}

.user-menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.20);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.user-menu-toggle:hover,
.user-menu.open .user-menu-toggle {
    border-color: var(--flame-warm);
    background: rgba(255,217,61,0.06);
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--night, #0A0A0F);
    border: 1px solid var(--ash);
    border-radius: 12px;
    padding: 12px 0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    z-index: 50;
}

.user-menu.open .user-menu-dropdown {
    display: block;
}

.user-menu-header {
    padding: 4px 16px 12px;
    font-size: 0.875rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--ash);
    margin-bottom: 4px;
}

.user-menu-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 0 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
    box-sizing: border-box;
}

.user-menu-link:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}

.user-menu-logout {
    color: var(--text-whisper);
}

.user-menu-divider {
    height: 1px;
    background: var(--ash);
    margin: 4px 0;
}

/* ── Account Modals (Change password / email) ── */

.um-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 250ms ease;
}
.um-modal-overlay.um-active {
    opacity: 1;
}

.um-modal-box {
    background: #0f1219;
    border: 1px solid var(--ash, #2A2A36);
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 420px;
    width: 100%;
    position: relative;
    transform: translateY(12px) scale(0.97);
    transition: transform 250ms var(--ease-enter, ease);
}
.um-modal-overlay.um-active .um-modal-box {
    transform: translateY(0) scale(1);
}

.um-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-whisper);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 200ms;
}
.um-modal-close:hover {
    color: var(--text-primary);
}

.um-modal-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.um-modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-whisper);
    margin: 0 0 24px;
}

.um-modal-box .field {
    margin-bottom: 16px;
}

.um-modal-box .pw-checks {
    margin: -8px 0 16px;
}

.um-modal-hint {
    font-size: 0.875rem;
    color: var(--text-whisper);
    margin: -8px 0 16px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--ash, #2A2A36);
}
.um-modal-hint.error {
    color: var(--flame-core, #E8751A);
    border-color: rgba(232,117,26,0.3);
    background: rgba(232,117,26,0.06);
}

.um-modal-msg {
    font-size: 0.875rem;
    text-align: center;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.um-modal-msg.error {
    color: var(--flame-core, #E8751A);
    background: rgba(232,117,26,0.08);
    border: 1px solid rgba(232,117,26,0.2);
}
.um-modal-msg.success {
    color: var(--flame-warm, #F4A623);
    background: rgba(244,166,35,0.08);
    border: 1px solid rgba(244,166,35,0.2);
}

.um-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}
.um-modal-actions .btn {
    min-width: 120px;
}

@media (max-width: 480px) {
    .um-modal-overlay { padding: 16px; }
    .um-modal-box { padding: 28px 20px 24px; }
    .um-modal-actions { flex-direction: column-reverse; }
    .um-modal-actions .btn { width: 100%; }
}


/* ── Global Notification Modal (vNotify / vConfirm) ── */

.v-notify-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 24px;
}

.v-notify-overlay.v-active {
    opacity: 1;
}

.v-notify-box {
    background: var(--surface, #141420);
    border: 1px solid var(--ash, #2A2A36);
    border-radius: 16px;
    padding: 36px 32px 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.v-active .v-notify-box {
    transform: scale(1);
}

.v-notify-msg {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--text-primary, #F5F0EB);
    line-height: 1.65;
    margin-bottom: 28px;
}

.v-notify-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.v-notify-actions .btn {
    min-width: 100px;
}

@media (max-width: 480px) {
    .v-notify-overlay { padding: 16px; }
    .v-notify-box { padding: 28px 20px 24px; }
}

/* ── Candle Lighting Veil (Moment of Silence) ── */

.candle-veil {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background 1.5s ease;
}

.candle-veil.v-descend {
    background: rgba(0, 0, 0, 0.6);
    pointer-events: auto;
}

.candle-veil-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: 2.25rem;
    color: var(--flame-warm, #FFD93D);
    text-shadow: 0 0 30px rgba(255, 217, 61, 0.35), 0 0 60px rgba(255, 217, 61, 0.15);
    letter-spacing: 0.03em;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1.5s ease, transform 2s ease;
    padding: 0 32px;
    max-width: 600px;
    line-height: 1.5;
}

.candle-veil-text.v-visible {
    opacity: 1;
    transform: translateY(0);
}

.candle-veil-symbol {
    font-size: 2rem;
    color: var(--flame-warm, #FFD93D);
    text-shadow: 0 0 20px rgba(255, 217, 61, 0.4);
    opacity: 0;
    transition: opacity 1.5s ease;
}

.candle-veil-symbol.v-visible {
    opacity: 1;
    animation: symbolPulse 2s ease-in-out 1;
}

@keyframes symbolPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

@media (max-width: 480px) {
    .candle-veil-text { font-size: 1.75rem; padding: 0 24px; }
}

/* ── Mobile Search Toggle Button ── */
.sea-search-toggle {
    display: none; /* shown only on mobile via media query */
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}
.sea-search-toggle:hover { color: var(--text-primary); }
.sea-search-toggle svg  { display: block; }

/* ── Info Button (i) ── */
.sea-info-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.875rem;
    font-style: italic;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
    white-space: nowrap;
}
.sea-info-btn:hover {
    color: var(--text-primary);
}
.sea-info-icon {
    display: none; /* shown on mobile via media query */
}
@media (max-width: 520px) {
    .sea-info-btn { font-size: 0.75rem; padding: 6px 0; }
}

/* ── Info Panel Overlay ── */
.sea-info-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}
.sea-info-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sea-info-panel {
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: #0f1219;
    border-left: 1px solid var(--ash);
    overflow-y: auto;
    transform: translateX(40px);
    transition: transform 300ms var(--ease-enter);
    position: relative;
}
.sea-info-overlay.active .sea-info-panel {
    transform: translateX(0);
}

.sea-info-close {
    position: sticky;
    top: 0;
    float: right;
    margin: 16px 16px 0 0;
    background: none;
    border: none;
    color: var(--text-whisper);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 2;
    transition: color 0.2s;
}
.sea-info-close:hover {
    color: var(--text-primary);
}

.sea-info-content {
    padding: 48px 32px 32px;
}

.info-section {
    padding: 24px 0;
}

.info-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 16px;
}
.info-text:last-child {
    margin-bottom: 0;
}
.info-text.primary {
    color: var(--text-primary);
    font-size: 1.0625rem;
}
.info-text.accent {
    color: var(--flame-core);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 300;
}
.info-text.dim {
    color: var(--text-whisper);
    font-size: 0.875rem;
}

.info-divider {
    border: none;
    border-top: 1px solid var(--ash);
    margin: 0;
}

.info-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--ash);
}

/* Persistent legal footer on landing page (TMG §5 compliance) */
.sea-legal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 10px 16px;
    z-index: 25;
    pointer-events: none;
}
.sea-legal-footer a {
    color: var(--text-whisper, #555570);
    font-size: 0.75rem;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
    pointer-events: auto;
}
.sea-legal-footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Close button on legal pages */
.legal-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    font-size: 1.25rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}
.legal-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .sea-info-panel {
        max-width: none;
    }
    .sea-info-content {
        padding: 48px 20px 24px;
    }
}

/* ── Sea Search ── */
.sea-search-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    max-width: 40vw;
}
.sea-search-input {
    width: 100%;
    padding: 7px 14px;
    border: 1px solid rgba(154,148,136,0.20);
    border-radius: var(--btn-radius, 6px);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary, #f1f5f9);
    font-size: 0.875rem;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.sea-search-input::placeholder {
    color: var(--text-whisper, #64748b);
}
.sea-search-input:focus {
    border-color: rgba(244,166,35,0.45);
    background: rgba(255,255,255,0.06);
}
.sea-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #0f1219;
    border: 1px solid var(--ash, #1e2030);
    border-radius: 8px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.sea-search-results.active {
    display: block;
}
.sea-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(30,32,48,0.5);
}
.sea-search-item:last-child {
    border-bottom: none;
}
.sea-search-item:hover {
    background: rgba(255,248,231,0.04);
}
.sea-search-name {
    color: var(--text-primary, #f1f5f9);
    font-size: 0.875rem;
}
.sea-search-name mark {
    background: none;
    color: var(--flame-warm, #ffd93d);
    font-weight: 600;
}
.sea-search-years {
    color: var(--text-whisper, #64748b);
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-left: 12px;
}
.sea-search-empty {
    padding: 14px;
    text-align: center;
    color: var(--text-whisper, #64748b);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    /* Row 1: logo — Unser Versprechen — Language picker */
    .sea-nav {
        flex-wrap: wrap;
        gap: 10px 0;
        padding: 14px 20px;
        align-items: center;
        background: rgba(6,6,10,0.78);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    .sea-nav-right {
        gap: 16px;
    }
    /* Row 2: search bar full width, hidden until toggle clicked */
    .sea-search-wrap {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: none !important;
        flex: 1 1 100%;
        order: 3;
        margin-top: 4px;
        display: none;
    }
    .sea-search-wrap.open { display: block; padding-bottom: 4px; }
    /* Search input: solid dark background when open on mobile */
    .sea-search-wrap.open .sea-search-input {
        background: rgba(15,18,25,0.92);
        border-color: rgba(154,148,136,0.4);
    }
    /* Show search toggle icon on mobile */
    .sea-search-toggle { display: flex; color: var(--text-primary); }
    /* Collapse "Our promise" to just the ⓘ icon */
    .sea-info-label { display: none; }
    .sea-info-icon {
        display: inline-flex;
        width: 20px;
        height: 20px;
        border: 1px solid rgba(154,148,136,0.35);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 0.7rem;
        font-style: italic;
        line-height: 1;
    }
    /* Hide social proof on mobile */
    .sea-stats { display: none; }
}

/* Scroll content below the sea */
.sea-scroll-content {
    position: relative;
    z-index: 5;
    margin-top: 100vh;
    padding-bottom: 80px;
}

.scroll-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
}

.scroll-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 300;
    color: var(--text-primary);
    max-width: 600px;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-enter), transform 1s var(--ease-enter);
}

.scroll-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-text.secondary {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.scroll-divider {
    width: 60px;
    height: 1px;
    background: var(--ash);
    margin: 0 auto;
}

/* ── MEMORIAL PAGE ── */

/* Cultural decorative symbol */
/* ── Memorial Tint System ── */
.memorial-container[style*="--memorial-tint"] {
    position: relative;
}
.memorial-container::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 50% 35% at 50% 18%, var(--memorial-tint, rgba(255,217,61,0.015)), transparent 55%);
    opacity: 0.07;
    z-index: 0;
}
.memorial-container > * {
    position: relative;
    z-index: 1;
}

/* ── Memorial Symbol (above name) ── */
.memorial-symbol {
    display: flex;
    justify-content: center;
    padding: 0;
    opacity: 0.3;
    animation: symbolBreathe 6s var(--ease-breath) infinite;
}
@keyframes symbolBreathe {
    0%, 100% { opacity: 0.25; }
    50%      { opacity: 0.38; }
}
.memorial-symbol-svg {
    width: 52px;
    height: 80px;
    color: var(--memorial-tint, var(--symbol-tint, var(--text-whisper)));
}

/* Legacy border layout (unused) */
.memorial-borders {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.memorial-border {
    position: absolute;
    top: 80px;
    bottom: 0;
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    overflow: hidden;
    color: var(--border-tint, #9A9A9A);
    opacity: 0.08;
}

.memorial-border-left {
    right: calc(50% + 360px);
}

.memorial-border-right {
    left: calc(50% + 360px);
}

.border-motif {
    width: 48px;
    height: 96px;
    flex-shrink: 0;
}

.memorial-border-right .border-motif {
    transform: scaleX(-1);
}

@media (max-width: 1100px) {
    .memorial-border-left { right: calc(50% + 340px); }
    .memorial-border-right { left: calc(50% + 340px); }
    .memorial-border { opacity: 0.06; }
}

@media (max-width: 768px) {
    .memorial-borders { display: none; }
}

/* Border theme picker (create flow + manage panel) */
.border-theme-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px;
    -webkit-overflow-scrolling: touch;
}

.border-theme-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--ash);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
    color: inherit;
    flex-shrink: 0;
}

.border-theme-tile:hover {
    border-color: var(--text-whisper);
    background: rgba(255,255,255,0.04);
}

.border-theme-tile.selected {
    border-color: var(--flame-warm);
    background: rgba(255,217,61,0.06);
}

.border-theme-svg {
    width: 24px;
    height: 48px;
    flex-shrink: 0;
}

.border-theme-none {
    font-size: 1.25rem;
    color: var(--text-whisper);
    padding: 8px 6px;
    line-height: 1;
}

.border-theme-tile.selected .border-theme-none {
    color: var(--flame-warm);
}

/* Individual symbol picker tiles */
.border-symbol-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--ash);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
    color: inherit;
    flex-shrink: 0;
    width: 64px;
    height: 84px;
}

.border-symbol-tile:hover {
    border-color: var(--text-whisper);
    background: rgba(255,255,255,0.04);
}

.border-symbol-tile.selected {
    border-color: var(--flame-warm);
    background: rgba(255,217,61,0.06);
}

.border-symbol-svg {
    width: 36px;
    height: 54px;
    flex-shrink: 0;
}

.border-symbol-tile.selected .border-theme-none {
    color: var(--flame-warm);
}

/* ── Symbol Picker (Create Flow) ── */

.symbol-carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
}
.symbol-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--ash);
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: all var(--dur-quick) var(--ease-breath);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.symbol-arrow:hover {
    border-color: var(--flame-warm);
    color: var(--flame-warm);
    background: rgba(255,217,61,0.06);
}

.symbol-cards {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
    min-height: 160px;
}

.symbol-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px 10px;
    cursor: pointer;
    transition: opacity var(--dur-quick) var(--ease-breath);
    width: 100px;
    opacity: 0.55;
}
.symbol-card:hover {
    opacity: 0.85;
}
.symbol-card.selected {
    opacity: 1;
}

.symbol-card svg {
    width: 48px;
    height: 96px;
    flex-shrink: 0;
}

.symbol-card-label {
    font-size: 0.8125rem;
    color: var(--text-whisper);
    text-align: center;
    line-height: 1.3;
}
.symbol-card.selected .symbol-card-label {
    color: var(--flame-warm);
}

.symbol-none span {
    font-size: 1.5rem;
    color: var(--text-whisper);
    line-height: 96px;
}
.symbol-none.selected span {
    color: var(--flame-warm);
}

.symbol-culture-label {
    font-size: 0.875rem;
    color: var(--text-whisper);
    text-align: center;
    margin-top: 4px;
    margin-bottom: 28px;
    min-height: 1.2em;
}

@media (max-width: 400px) {
    .symbol-card {
        width: 80px;
        padding: 10px 6px 8px;
    }
    .symbol-card svg {
        width: 36px;
        height: 72px;
    }
    .symbol-carousel {
        gap: 6px;
    }
}

/* Zone 1 — Presence (above the fold) */
.zone-presence {
    min-height: 45vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px 20px;
    position: relative;
}

.memorial-candle {
    width: 80px;
    height: 120px;
    margin-bottom: 40px;
    position: relative;
}

.memorial-name {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 12px;
}

.memorial-years {
    font-size: 1rem;
    margin-bottom: 32px;
}

.memorial-epitaph {
    max-width: 500px;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Follow heart */
.follow-heart {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    margin-top: 12px;
    color: var(--text-whisper);
    opacity: 0.5;
    transition: color 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.follow-label {
    font-size: 0.875rem;
    margin-left: 6px;
    font-family: 'Cormorant Garamond', Georgia, serif;
}
.follow-heart:hover {
    color: var(--flame-warm);
    opacity: 0.7;
    transform: scale(1.1);
}
.follow-heart .heart-path {
    transition: fill 0.3s ease, stroke 0.3s ease;
    fill: transparent;
}
.follow-heart.active {
    color: var(--flame-warm);
    opacity: 0.7;
}
.follow-heart.active .heart-path {
    fill: var(--flame-warm);
    stroke: var(--flame-warm);
}
.follow-heart:disabled {
    opacity: 0.5;
    pointer-events: none;
}
@keyframes follow-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.follow-heart.follow-pulse {
    animation: follow-pop 0.6s ease;
}

/* Follow — subtle text button (bottom of page) */
.follow-text-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-whisper);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.875rem;
    font-style: italic;
    opacity: 0.5;
    transition: color 0.3s ease, opacity 0.3s ease;
    text-decoration: none;
    padding: 8px 16px;
}
.follow-text-btn:hover {
    color: var(--flame-warm);
    opacity: 0.7;
}
.follow-text-btn.active {
    color: var(--flame-warm);
    opacity: 0.6;
}

/* Scroll indicator */
.scroll-invite {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-whisper);
    font-size: 0.875rem;
    animation: breathe 3s var(--ease-breath) infinite;
}

/* Zone 2 — Memory */
.zone-memory {
    padding: 16px 24px;
    max-width: 800px;
    margin: 0 auto;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 48px 0;
}

.photo-item {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-calm) var(--ease-breath);
}

.photo-item:hover img {
    transform: scale(1.03);
}

/* Zone 3 — Gathering */
.zone-gathering {
    padding: 80px 24px;
    max-width: 640px;
    margin: 0 auto;
}

.candle-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
}

.candle-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.candle-flame-mini {
    width: 12px;
    height: 18px;
    background: var(--flame-warm);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 2s ease-in-out infinite;
    flex-shrink: 0;
}

.guestbook-entry {
    padding: 24px 0;
    border-bottom: 1px solid var(--ash);
}

.guestbook-author {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.guestbook-time {
    font-size: 0.875rem;
    color: var(--text-whisper);
    margin-bottom: 12px;
}

.guestbook-message {
    color: var(--text-secondary);
    line-height: 1.7;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
}

/* Guest book form */
.guestbook-form {
    margin-top: 48px;
}

.guestbook-note {
    font-size: 0.875rem;
    color: var(--text-whisper);
    margin-top: 12px;
    font-style: italic;
}

/* ── Candle Info Panel ── */
.candle-info-toggle:hover {
    color: var(--text-secondary);
    border-color: var(--text-whisper);
}
.candle-info-panel.visible {
    display: block !important;
}

/* ── MANAGE MODAL ── */
.manage-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.manage-backdrop.open { display: block; }

.manage-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: var(--night);
    border: 1px solid var(--ash);
    border-radius: 20px;
    padding: 32px;
    width: 92vw;
    max-width: 640px;
    height: 85vh;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    flex-direction: column;
}
.manage-panel.open { display: flex; }

.manage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ash);
    flex-shrink: 0;
}

.manage-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.manage-close {
    background: none;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.manage-close:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--text-whisper);
}

.manage-badge {
    background: var(--flame-amber);
    color: var(--void);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 10px;
}

.manage-section {
    padding: 20px 0 0;
}
.manage-section:first-child {
    padding-top: 0;
}

.manage-section-label {
    color: var(--text-primary);
    font-size: 1.0625rem;
    font-weight: 500;
    margin: 0 0 8px 0;
}
.manage-section-hint {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Tab bar */
.manage-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    flex-shrink: 0;
}
.manage-tab {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.16);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    text-align: center;
    font-family: inherit;
}
.manage-tab:hover {
    color: var(--text-primary);
}
.manage-tab.active {
    color: var(--flame-warm);
    border-bottom-color: var(--flame-warm);
}

/* Tab panels */
.manage-tab-panel {
    display: none;
}
.manage-tab-panel.active {
    display: block;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 16px;
}

/* Share link action buttons */
.share-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--ash);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.share-action-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}
.share-action-btn.copied {
    background: rgba(255,217,61,0.12);
    border-color: var(--flame-warm);
    color: var(--flame-warm);
}

/* Settings row — consistent lock/check structure */
.setting-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
}
.setting-row + .setting-row {
    margin-top: 2px;
}
.setting-indicator {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.setting-content {
    flex: 1;
    min-width: 0;
}
.setting-label {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.4;
}
.setting-hint {
    color: var(--text-whisper);
    font-size: 0.875rem;
    margin-top: 2px;
    line-height: 1.4;
}
.upgrade-link {
    color: var(--flame-warm);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.15s;
}
.upgrade-link:hover {
    opacity: 0.8;
}

/* Manage trigger button (on memorial page) */
.manage-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    border: 1px dashed rgba(168,162,158,0.3);
    border-radius: 12px;
    color: var(--text-whisper);
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.manage-trigger:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(168,162,158,0.5);
    color: var(--text-secondary);
}

.manage-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.875rem;
}

.manage-link-label {
    color: var(--text-secondary);
}

/* ── THRESHOLD MOMENT ── */
.threshold {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
}

.threshold-message {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 400px;
    line-height: 1.6;
}

.threshold-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── ENTRY TRANSITION ── */
.entry-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--void);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: entryFade 1.5s var(--ease-exit) 1.5s forwards;
    pointer-events: none;
}

.entry-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 300;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeInSlow 1s var(--ease-enter) 0.3s forwards;
}

/* ── LOGIN / REGISTER ── */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px 40px;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--flame-core);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 32px;
    line-height: 1.5;
}

.login-link {
    font-size: 0.875rem;
    color: var(--text-whisper);
}
.login-link:hover {
    color: var(--text-secondary);
}

/* Google OAuth button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--ash, #2A2A36);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    margin-bottom: 20px;
}
.btn-google:hover {
    border-color: rgba(212,160,23,0.4);
    background: rgba(255,255,255,0.07);
    color: var(--text-primary);
}

/* Divider between Google and email form */
.login-divider {
    position: relative;
    text-align: center;
    margin: 4px 0 24px;
}
.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    border-top: 1px solid var(--ash);
}
.login-divider span {
    position: relative;
    background: #0f1219;
    padding: 0 12px;
    color: var(--text-whisper);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.field-success {
    font-size: 0.875rem;
    color: var(--success);
    margin-top: 6px;
}

/* ── CREATE FLOW ── */
.create-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
}

.create-form {
    width: 100%;
    max-width: 480px;
    padding-bottom: 48px;
}

.create-step-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--flame-core);
    margin-bottom: 16px;
    text-align: center;
}

.create-step-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 28px;
}

.create-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
}

.create-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ash);
    transition: background var(--dur-calm) var(--ease-breath);
}

.create-step-dot.active {
    background: var(--flame-warm);
}

.create-step-dot.complete {
    background: var(--flame-amber);
}

/* Photo upload area */
.photo-upload {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4/3;
    border-radius: 12px;
    border: 2px dashed var(--ash);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    cursor: pointer;
    transition: border-color var(--dur-quick) var(--ease-breath);
    overflow: hidden;
    position: relative;
}

.photo-upload:hover {
    border-color: var(--flame-warm);
}

.photo-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    pointer-events: none;
    user-select: none;
}

.photo-upload.has-photo {
    cursor: grab;
}
.photo-upload.has-photo:active {
    cursor: grabbing;
}

.drag-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.55);
    border-radius: 20px;
    padding: 2px 10px;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    display: none;
    z-index: 2;
}
.photo-upload.has-photo .drag-hint {
    display: block;
}
.photo-upload.has-photo:hover .drag-hint {
    opacity: 1;
    visibility: visible;
}

.photo-upload-icon {
    color: var(--text-whisper);
    font-size: 2rem;
}

/* ── PERSISTENT CANDLE (upper left corner) ── */
.persistent-candle {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 40;
    width: 24px;
    height: 36px;
    opacity: 0;
    transition: opacity var(--dur-calm) var(--ease-enter);
}

.persistent-candle.visible {
    opacity: 1;
}

/* ── Zone Dividers — flame flourish ── */
.zone-divider {
    display: block;
    margin: 0 auto 16px;
    color: var(--memorial-tint, var(--flame-warm));
    opacity: 0.6;
}

/* ── Epitaph — decorative quotes ── */
.epitaph-quote {
    position: relative;
    color: var(--text-secondary);
    margin-top: 16px;
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 28px;
}
.epitaph-quote::before,
.epitaph-quote::after {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2em;
    line-height: 1;
    position: absolute;
    color: var(--memorial-tint, var(--flame-warm));
    opacity: 0.08;
}
.epitaph-quote::before {
    content: '\201C';
    top: -4px;
    left: 4px;
}
.epitaph-quote::after {
    content: '\201D';
    bottom: -14px;
    right: 4px;
}

/* ── Life Story — drop cap + serif ── */
.life-story-text {
    color: var(--text-secondary);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.85;
    white-space: pre-wrap;
}
.life-story-text::first-letter {
    float: left;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 3.2em;
    line-height: 0.8;
    padding-right: 8px;
    padding-top: 4px;
    color: var(--memorial-tint, var(--flame-warm));
    opacity: 0.7;
}

/* ── Audio Player — elevated ── */
.audio-card {
    text-align: center;
    padding: 20px 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    margin-bottom: 48px;
}
.audio-card-label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    color: var(--text-whisper);
    font-size: 0.9375rem;
    margin-bottom: 12px;
}
.audio-toggle-btn {
    background: none;
    border: 1px solid var(--ash);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    color: var(--text-whisper);
    font-size: 1.25rem;
    transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.audio-toggle-btn:hover {
    border-color: var(--memorial-tint, var(--flame-warm));
    box-shadow: 0 0 16px color-mix(in srgb, var(--memorial-tint, var(--flame-warm)) 12%, transparent);
}
.audio-toggle-btn.playing {
    border-color: var(--memorial-tint, var(--flame-warm));
    color: var(--memorial-tint, var(--flame-warm));
    animation: audioGlow 3s var(--ease-breath) infinite;
}
@keyframes audioGlow {
    0%, 100% { box-shadow: 0 0 12px color-mix(in srgb, var(--memorial-tint, var(--flame-warm)) 8%, transparent); }
    50%      { box-shadow: 0 0 24px color-mix(in srgb, var(--memorial-tint, var(--flame-warm)) 18%, transparent); }
}
.audio-duration {
    color: var(--text-whisper);
    font-size: 0.875rem;
    margin-top: 8px;
}

/* ── Guestbook — elevated ── */
.guestbook-entry-card {
    margin-bottom: 16px;
    padding: 16px;
    padding-left: 18px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border-left: 2px solid color-mix(in srgb, var(--memorial-tint, var(--flame-warm)) 15%, transparent);
}
.gb-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-whisper);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 4px;
}
.guestbook-entry-card:hover .gb-delete-btn { opacity: 1; }
.gb-delete-btn:hover { color: #e57373; }
.guestbook-form-wrap {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.guestbook-form-label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    color: var(--text-whisper);
    font-size: 0.9375rem;
    margin-bottom: 16px;
}

/* ── Slideshow — vignette + dots ── */
.slideshow-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    max-height: 80vh;
    width: 100%;
    overflow: hidden;
}
.slideshow-img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    opacity: 0;
    transition: opacity 1.5s ease;
    -webkit-mask-image: linear-gradient(to right, transparent, black 8px, black calc(100% - 8px), transparent),
                        linear-gradient(to bottom, transparent, black 8px, black calc(100% - 8px), transparent);
    -webkit-mask-composite: destination-in;
    mask-image: linear-gradient(to right, transparent, black 8px, black calc(100% - 8px), transparent),
                linear-gradient(to bottom, transparent, black 8px, black calc(100% - 8px), transparent);
    mask-composite: intersect;
}
/* First / active image is in flow; rest stacked on top */
.slideshow-img-active {
    opacity: 1;
}
.slideshow-img:not(:first-child) {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.slideshow-caption {
    color: var(--text-whisper);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 10px;
}
.slideshow-dot-active {
    box-shadow: 0 0 6px rgba(255,255,255,0.3);
}
.slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(0,0,0,0.4);
    color: rgba(255,255,255,0.7);
    border: none;
    font-size: 2.5rem;
    line-height: 1;
    padding: 12px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.3s, opacity 0.3s, background 0.3s;
    opacity: 0;
}
.slideshow-wrap:hover .slideshow-arrow,
.slideshow-wrap:focus-within .slideshow-arrow {
    opacity: 1;
}
/* Always show arrows on touch devices (no hover available) */
@media (hover: none) {
    .slideshow-arrow { opacity: 1; }
}
.slideshow-arrow-prev { left: 6px; }
.slideshow-arrow-next { right: 6px; }
.slideshow-arrow:hover {
    color: rgba(255,255,255,0.95);
    background: rgba(0,0,0,0.55);
}
@media (max-width: 600px) {
    .slideshow-arrow {
        opacity: 1;
        font-size: 2rem;
    }
    /* Limit photo height on mobile so it doesn't fill the entire screen */
    .slideshow-wrap { max-height: 55vh; }
    .slideshow-img  { max-height: 55vh; }
}

/* ── Media Sub-tabs (Photos / Audio) ── */
.media-subtabs {
    display: flex;
    gap: 0;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--ash);
}
.media-subtab {
    flex: 1;
    padding: 8px 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-whisper);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.media-subtab.active {
    color: var(--flame-warm);
    border-bottom-color: var(--flame-warm);
}
.media-subpanel {
    display: none;
}
.media-subpanel.active {
    display: block;
}

/* ── Manage Panel: Photo Grid ── */
.manage-photo-grid {
    columns: 3;
    column-gap: 8px;
}
.manage-photo-grid .manage-photo-thumb {
    break-inside: avoid;
    margin-bottom: 8px;
}
.manage-photo-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}
.manage-photo-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
.manage-photo-star,
.manage-photo-delete {
    position: absolute;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s, transform 0.15s;
}
.manage-photo-star {
    top: 4px;
    left: 4px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.manage-photo-star.active {
    color: #ffd93d;
}
.manage-photo-star:hover {
    color: #ffd93d;
    transform: scale(1.15);
}
.manage-photo-delete {
    top: 4px;
    right: 4px;
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    background: rgba(0,0,0,0.45);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.manage-photo-delete:hover {
    color: #ef4444;
    transform: scale(1.15);
}

/* ── Upload Progress Bar ── */
.upload-progress {
    position: sticky;
    bottom: 0;
    padding: 12px 16px;
    background: var(--night, #111118);
    border-top: 1px solid var(--ash);
    transition: opacity 0.3s;
    z-index: 5;
}
.upload-progress-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-align: center;
}
.upload-progress-track {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.upload-progress-fill {
    height: 100%;
    width: 0;
    background: var(--flame-warm, #ffd93d);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ── Manage Panel: Audio List ── */
.manage-audio-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.manage-audio-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--ash);
    border-radius: 8px;
    transition: opacity 0.3s, transform 0.3s;
}
.manage-audio-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.manage-audio-delete {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}
.manage-audio-delete:hover {
    color: #ef4444;
}

/* ── Confirm Modal ── */
.vel-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: velFadeIn 0.2s ease;
}
.vel-confirm-box {
    background: var(--surface, #1a1a1a);
    border: 1px solid var(--ash, #333);
    border-radius: 14px;
    padding: 28px 24px 20px;
    max-width: 320px;
    width: 90%;
    text-align: center;
}
.vel-confirm-msg {
    color: var(--text-primary, #eee);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 20px;
}
.vel-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.vel-confirm-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.vel-confirm-cancel {
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary, #aaa);
}
.vel-confirm-cancel:hover {
    background: rgba(255,255,255,0.14);
}
.vel-confirm-ok {
    background: #ef4444;
    color: #fff;
}
.vel-confirm-ok:hover {
    background: #dc2626;
}
@keyframes velFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Tint Picker ── */
.tint-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.tint-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
    background: none;
    padding: 0;
}
.tint-swatch:hover {
    transform: scale(1.15);
}
.tint-swatch.selected {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

/* ── FOOTER ── */
.footer {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--ash);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.footer-links a:hover {
    color: var(--text-primary);
}

.footer-tagline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    color: var(--text-whisper);
    margin-top: 16px;
    text-align: center;
}

/* ── COOKIE BANNER ── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: var(--dusk, #12121A);
    border-top: 1px solid var(--ash, #2A2A30);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-banner-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    flex: 1 1 auto;
    min-width: 200px;
    text-align: center;
}
.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

@media print {
    .cookie-banner { display: none !important; }
}

/* ── ANIMATIONS ── */
@keyframes fadeInSlow {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes entryFade {
    from { opacity: 1; }
    to   { opacity: 0; visibility: hidden; }
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.8; }
}

@keyframes flicker {
    0%, 100% { transform: scaleY(1) scaleX(1); opacity: 1; }
    25%      { transform: scaleY(1.05) scaleX(0.97); opacity: 0.95; }
    50%      { transform: scaleY(0.97) scaleX(1.02); opacity: 1; }
    75%      { transform: scaleY(1.03) scaleX(0.98); opacity: 0.97; }
}

@keyframes candlePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255,217,61,0.2); }
    50%      { box-shadow: 0 0 40px rgba(255,217,61,0.35); }
}

/* Skeleton loading (pulses like candlelight) */
.skeleton {
    background: linear-gradient(90deg, var(--dusk) 25%, var(--ash) 50%, var(--dusk) 75%);
    background-size: 200% 100%;
    animation: skeletonGlow 2s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonGlow {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .sea-nav { padding: 14px 20px; }
    .sea-overlay { padding: 24px 20px 32px; }
    .sea-cta-group { flex-direction: column; width: 100%; padding: 0 24px; }
    .sea-cta-group .btn { width: 100%; padding: 14px 24px; font-size: 1rem; }
    .manage-panel {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 24px 20px;
        top: 0;
        left: 0;
        transform: none;
    }
    .zone-memory { padding: 28px 20px; }
    .zone-gathering { padding: 28px 20px; }
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    .scroll-section { padding: 60px 20px; min-height: 60vh; }
    .login-container { padding: 60px 24px 32px; }
}

@media (max-width: 480px) {
    .memorial-name { font-size: 2rem; }
    .life-story { font-size: 1.1rem; }
    .life-story-text { font-size: 1rem; }
    .life-story-text::first-letter { font-size: 2.6em; }
    .epitaph-quote { padding: 0 16px; }
    .epitaph-quote::before, .epitaph-quote::after { font-size: 1.6em; }
    .threshold-actions { flex-direction: column; }
    .login-container { padding: 40px 16px 24px; }
    .login-card { max-width: 100%; }
    .login-title { font-size: 1.375rem; }
    .create-container { padding: 40px 20px; }
    .create-step-title { font-size: 1.375rem; margin-bottom: 24px; }
    .zone-presence { min-height: auto; padding: 28px 16px; }
    .scroll-section { padding: 32px 20px; min-height: 50vh; }
    .cookie-banner { padding: 12px 16px; gap: 10px; }
    .user-menu-toggle { width: 44px; height: 44px; }
    .mem-more-btn { min-width: 44px; min-height: 44px; }
    .user-menu-dropdown { width: calc(100vw - 32px); right: -8px; }
    .manage-panel { padding: 20px 16px; }
    .photo-gallery { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .sea-overlay { padding: 20px 16px 28px; }
    .sea-cta-group { padding: 0 16px; }
    .sea-search-input { padding: 10px 14px; font-size: 0.9375rem; }
    .lang-switcher-btn { min-height: 36px; padding: 6px 10px !important; }
}

/* ── Dashboard Memorial List ── */
.mem-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 40px;
    border-radius: 12px;
    border: 1px solid var(--ash);
}
.mem-list .mem-card:first-child { border-radius: 12px 12px 0 0; }
.mem-list .mem-card:last-child  { border-radius: 0 0 12px 12px; }
.mem-list .mem-card:only-child  { border-radius: 12px; }

.mem-card {
    display: flex;
    align-items: center;
    background: var(--night);
    position: relative;
    transition: background var(--dur-quick) var(--ease-breath);
}
.mem-card:not(:last-child) {
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.mem-card:hover {
    background: var(--dusk);
}
.mem-card--active {
    background: rgba(255,217,61,0.03);
}

.mem-card--paused {
    opacity: 0.55;
}

.mem-card--paused:hover {
    opacity: 0.8;
}

.mem-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    padding: 16px 0 16px 20px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.mem-card-flame {
    flex-shrink: 0;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mem-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mem-card-name {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mem-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
}

.mem-plan {
    letter-spacing: 0.02em;
}
.mem-plan--forever {
    color: var(--flame-warm);
}
.mem-plan--free {
    color: var(--text-whisper);
}
.mem-dot {
    color: var(--ash);
    font-size: 0.75rem;
}
.mem-state {
    color: var(--text-secondary);
}
.mem-state--dim {
    color: var(--text-whisper);
}

.mem-card-arrow {
    flex-shrink: 0;
    color: var(--text-whisper);
    transition: color var(--dur-quick), transform var(--dur-quick);
}
.mem-card-main:hover .mem-card-arrow {
    color: var(--text-secondary);
    transform: translateX(2px);
}

/* Upgrade badge */
.mem-card-upgrade {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--flame-amber);
    background: none;
    border: 1px solid rgba(244,166,35,0.25);
    border-radius: 4px;
    padding: 5px 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--dur-quick);
    margin-right: 4px;
}
.mem-card-upgrade:hover {
    background: rgba(244,166,35,0.08);
    border-color: rgba(244,166,35,0.45);
    color: var(--flame-warm);
}

/* Three-dot menu */
.mem-card-more {
    position: relative;
    flex-shrink: 0;
    padding: 0 12px 0 4px;
}

.mem-more-btn {
    background: none;
    border: none;
    color: var(--text-whisper);
    cursor: pointer;
    padding: 10px 8px;
    min-height: 44px;
    border-radius: 4px;
    transition: color var(--dur-quick), background var(--dur-quick);
    display: flex;
    align-items: center;
}
.mem-more-btn:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
}

.mem-more-dropdown {
    display: none;
    position: absolute;
    right: 8px;
    top: 100%;
    min-width: 160px;
    background: var(--night);
    border: 1px solid var(--ash);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 50;
    overflow: hidden;
}
.mem-card-more.open .mem-more-dropdown {
    display: block;
}

.mem-more-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--dur-quick), color var(--dur-quick);
    font-family: inherit;
}
.mem-more-item:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}
.mem-more-item--danger {
    color: var(--flame-ember);
}
.mem-more-item--danger:hover {
    background: rgba(192,57,43,0.08);
    color: var(--flame-ember);
}

/* ── Accessibility: Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
