/* ═══════════════════════════════════════
   SOUL HARVEST — Design System
   继承 justincase.vip 双面风格:
     活人(Self)  = 右侧暖金色调
     逝者(Memorial) = 左侧深空靛蓝色调
   ═══════════════════════════════════════ */

/* ── BACK BUTTON ── */
.back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    color: #f8fafc;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateX(-2px);
}

.back-btn-mode {
    top: 20px;
    left: 20px;
    background: rgba(30, 41, 59, 0.85);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #050510;
    color: #f8fafc;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', Georgia, serif;
}

code,
.mono {
    font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
textarea {
    font-family: inherit;
}

/* ── CSS VARIABLES ── */
:root {
    /* Dark theme (逝者/Memorial = Left side) */
    --memorial-bg: linear-gradient(160deg, #050510 0%, #0c1027 40%, #0a0e1a 100%);
    --memorial-accent: #6366f1;
    --memorial-accent-light: #818cf8;
    --memorial-accent-glow: rgba(99, 102, 241, 0.3);
    --memorial-card-bg: rgba(255, 255, 255, 0.03);
    --memorial-card-border: rgba(255, 255, 255, 0.06);
    --memorial-text: #f8fafc;
    --memorial-text-dim: #94a3b8;

    /* Warm theme (活人/Self = Right side) */
    --self-bg: linear-gradient(160deg, #fffbf5 0%, #fef3e2 40%, #fff7ed 100%);
    --self-accent: #f59e0b;
    --self-accent-dark: #d97706;
    --self-accent-glow: rgba(245, 158, 11, 0.3);
    --self-card-bg: rgba(255, 255, 255, 0.7);
    --self-card-border: rgba(245, 158, 11, 0.1);
    --self-text: #1e293b;
    --self-text-dim: #78716c;

    /* Shared */
    --ai-purple: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --progress-amber: #f5a623;
    --glass-bg: rgba(18, 18, 30, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-pill: 9999px;
}

/* ═══════════════════════════════════════
   ENTRY PAGE — Activation Code
   ═══════════════════════════════════════ */
.harvest-entry {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #050510;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.harvest-entry::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../../assets/bg-dark.png') center/cover no-repeat;
    opacity: 0.12;
    pointer-events: none;
}

.harvest-entry::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.entry-logo {
    position: relative;
    z-index: 2;
    width: 100px;
    height: 100px;
    border-radius: 22%;
    object-fit: cover;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.4)) drop-shadow(0 0 80px rgba(245, 158, 11, 0.2));
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.entry-title {
    position: relative;
    z-index: 2;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #818cf8 0%, #f8fafc 40%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.entry-subtitle {
    position: relative;
    z-index: 2;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--memorial-text-dim);
    text-align: center;
    max-width: 400px;
    line-height: 1.7;
    margin-bottom: 3rem;
}

/* Activation Code Input */
.code-input-group {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.code-input {
    width: 280px;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: #f8fafc;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    outline: none;
}

.code-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
    text-transform: none;
}

.code-input:focus {
    border-color: var(--memorial-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 0 30px rgba(99, 102, 241, 0.1);
}

.code-submit {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.code-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.code-submit:active {
    transform: translateY(0);
}

.entry-hint {
    position: relative;
    z-index: 2;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

.code-error {
    position: relative;
    z-index: 2;
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.code-error.visible {
    opacity: 1;
}

/* ═══════════════════════════════════════
   MODE SELECTION — Split Screen
   活人=暖金(右), 逝者=靛蓝(左)
   ═══════════════════════════════════════ */
.mode-select {
    display: none;
    /* hidden until activation */
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.mode-select.active {
    display: flex;
}

.mode-split {
    display: flex;
    width: 100%;
    height: 100%;
}

.mode-side {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    cursor: pointer;
    overflow: hidden;
    transition: flex 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mode-split:hover .mode-side {
    flex: 0.75;
}

.mode-split .mode-side:hover {
    flex: 1.5;
}

/* Memorial side (Left = Dark) */
.mode-memorial {
    background: var(--memorial-bg);
}

.mode-memorial::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../../assets/bg-dark.png') center/cover no-repeat;
    opacity: 0.2;
    transition: opacity 0.6s ease;
}

.mode-memorial:hover::before {
    opacity: 0.35;
}

.mode-memorial::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(99, 102, 241, 0.06) 45%, transparent 50%);
    background-size: 300% 100%;
    animation: sweepDark 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sweepDark {
    0% {
        background-position: 150% 0;
    }

    100% {
        background-position: -150% 0;
    }
}

/* Self side (Right = Warm) */
.mode-self {
    background: var(--self-bg);
}

.mode-self::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../../assets/bg-light.png') center/cover no-repeat;
    opacity: 0.25;
    transition: opacity 0.6s ease;
}

.mode-self:hover::before {
    opacity: 0.4;
}

.mode-self::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(245, 158, 11, 0.08) 45%, transparent 50%);
    background-size: 300% 100%;
    animation: sweepWarm 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sweepWarm {
    0% {
        background-position: -150% 0;
    }

    100% {
        background-position: 150% 0;
    }
}

.mode-content {
    position: relative;
    z-index: 10;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.mode-split:hover .mode-side:not(:hover) .mode-content {
    opacity: 0.5;
    transform: scale(0.97);
}

.mode-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
}

.mode-memorial .mode-label {
    color: var(--memorial-accent-light);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.mode-self .mode-label {
    color: var(--self-accent-dark);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.mode-title {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.mode-memorial .mode-title {
    background: linear-gradient(135deg, #e2e8f0, #a5b4fc, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px var(--memorial-accent-glow));
}

.mode-self .mode-title {
    background: linear-gradient(135deg, #1e293b, #92400e, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px var(--self-accent-glow));
}

.mode-desc {
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    max-width: 400px;
    font-weight: 300;
    margin-bottom: 2rem;
}

.mode-memorial .mode-desc {
    color: #cbd5e1;
}

.mode-self .mode-desc {
    color: var(--self-text-dim);
}

.mode-self .mode-content {
    align-items: flex-end;
    text-align: right;
}

.mode-self .mode-content {
    display: flex;
    flex-direction: column;
}

.mode-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.mode-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.mode-features li:hover {
    transform: translateX(4px);
}

.mode-memorial .mode-features li {
    color: #e2e8f0;
}

.mode-self .mode-features li {
    color: #57534e;
    flex-direction: row-reverse;
}

.mode-self .mode-features li:hover {
    transform: translateX(-4px);
}

.mode-features .feat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.mode-memorial .feat-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--memorial-accent-light);
}

.mode-self .feat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--self-accent);
}

.mode-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.mode-memorial .mode-cta {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 30px var(--memorial-accent-glow);
}

.mode-memorial .mode-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.5);
}

.mode-self .mode-cta {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 30px var(--self-accent-glow);
}

.mode-self .mode-cta:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 40px rgba(245, 158, 11, 0.5);
}

/* Center divider between modes */
.mode-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    z-index: 100;
    pointer-events: none;
}

.mode-divider-line {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            transparent 0%, rgba(255, 255, 255, 0.08) 15%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.08) 85%, transparent 100%);
}

.mode-divider-glow {
    position: absolute;
    inset: 0;
    width: 60px;
    left: -29px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    animation: divPulse 4s ease-in-out infinite alternate;
}

@keyframes divPulse {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* ═══════════════════════════════════════
   APP SHELL — Main Harvest Interface
   ═══════════════════════════════════════ */
.harvest-app {
    display: none;
    /* hidden until mode selected */
    min-height: 100vh;
    flex-direction: column;
}

.harvest-app.active {
    display: flex;
}

/* -- Top Bar -- */
.harvest-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

/* Memorial topbar */
.harvest-app.mode-memorial .harvest-topbar {
    background: rgba(5, 5, 16, 0.85);
}

/* Self topbar */
.harvest-app.mode-self .harvest-topbar {
    background: rgba(255, 251, 245, 0.85);
    border-bottom-color: rgba(245, 158, 11, 0.1);
}

.harvest-app.mode-self .harvest-topbar {
    color: var(--self-text);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.topbar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.topbar-step {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    opacity: 0.5;
}

/* -- Global Progress Bar -- */
.progress-global {
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.harvest-app.mode-memorial .progress-fill {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

.harvest-app.mode-self .progress-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.progress-percent {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
}

.harvest-app.mode-memorial .progress-percent {
    color: var(--memorial-accent-light);
}

.harvest-app.mode-self .progress-percent {
    color: var(--self-accent);
}

/* -- Main Content Area -- */
.harvest-main {
    flex: 1;
    display: flex;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex-direction: column;
}

/* -- Chat Interface -- */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 1rem;
    overflow-y: auto;
}

.chat-bubble {
    max-width: 85%;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    line-height: 1.7;
    font-size: 0.95rem;
    animation: bubbleIn 0.4s ease;
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AI Question bubble */
.bubble-ai {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.harvest-app.mode-memorial .bubble-ai {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: #e2e8f0;
}

.harvest-app.mode-self .bubble-ai {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.12);
    color: var(--self-text);
}

.bubble-ai-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.6;
}

/* User Answer bubble */
.bubble-user {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.harvest-app.mode-memorial .bubble-user {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.harvest-app.mode-self .bubble-user {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: var(--self-text);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* -- Input Area -- */
.chat-input-area {
    position: sticky;
    bottom: 0;
    padding: 1rem 0;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chat-textarea {
    flex: 1;
    min-height: 52px;
    max-height: 160px;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
}

.harvest-app.mode-memorial .chat-textarea {
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
}

.harvest-app.mode-memorial .chat-textarea:focus {
    border-color: var(--memorial-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.harvest-app.mode-self .chat-textarea {
    background: #fff;
    color: var(--self-text);
    border-color: rgba(245, 158, 11, 0.15);
}

.harvest-app.mode-self .chat-textarea:focus {
    border-color: var(--self-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.chat-textarea::placeholder {
    opacity: 0.35;
}

.btn-voice,
.btn-send {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-send {
    color: #fff;
}

.harvest-app.mode-memorial .btn-send {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.harvest-app.mode-self .btn-send {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.3);
}

.btn-send:hover {
    transform: translateY(-1px);
}

.btn-voice {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.harvest-app.mode-self .btn-voice {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.15);
    color: var(--self-accent-dark);
}

/* -- Stats Sidebar -- */
.chat-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    font-size: 0.8rem;
    opacity: 0.5;
}

.chat-stats span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-skip {
    background: none;
    border: none;
    font-size: 0.8rem;
    opacity: 0.4;
    transition: opacity 0.3s;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-pill);
}

.btn-skip:hover {
    opacity: 0.8;
}

.harvest-app.mode-memorial .btn-skip {
    color: #94a3b8;
}

.harvest-app.mode-self .btn-skip {
    color: var(--self-text-dim);
}

/* ═══════════════════════════════════════
   DNA FORM — Step 1 Basic Info
   ═══════════════════════════════════════ */
.dna-form {
    display: none;
}

.dna-form.active {
    display: block;
}

.form-card {
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
}

.harvest-app.mode-memorial .form-card {
    background: var(--memorial-card-bg);
    border: 1px solid var(--memorial-card-border);
    backdrop-filter: blur(10px);
}

.harvest-app.mode-self .form-card {
    background: var(--self-card-bg);
    border: 1px solid var(--self-card-border);
    backdrop-filter: blur(10px);
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.harvest-app.mode-memorial .form-title {
    background: linear-gradient(135deg, #c7d2fe, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.harvest-app.mode-self .form-title {
    background: linear-gradient(135deg, #92400e, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    opacity: 0.6;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.harvest-app.mode-memorial .form-input,
.harvest-app.mode-memorial .form-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.harvest-app.mode-memorial .form-input:focus,
.harvest-app.mode-memorial .form-select:focus {
    border-color: var(--memorial-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.harvest-app.mode-self .form-input,
.harvest-app.mode-self .form-select {
    background: #fff;
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: var(--self-text);
}

.harvest-app.mode-self .form-input:focus,
.harvest-app.mode-self .form-select:focus {
    border-color: var(--self-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-submit {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.harvest-app.mode-memorial .form-submit {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.harvest-app.mode-self .form-submit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.form-submit:hover {
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════
   DIMENSION PROGRESS PANEL
   ═══════════════════════════════════════ */
.dim-panel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dim-card {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.harvest-app.mode-memorial .dim-card {
    background: var(--memorial-card-bg);
    border: 1px solid var(--memorial-card-border);
}

.harvest-app.mode-self .dim-card {
    background: var(--self-card-bg);
    border: 1px solid var(--self-card-border);
}

.dim-name {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.dim-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.dim-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.harvest-app.mode-memorial .dim-bar-fill {
    background: var(--memorial-accent);
}

.harvest-app.mode-self .dim-bar-fill {
    background: var(--self-accent);
}

.dim-percent {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    margin-top: 0.3rem;
    opacity: 0.5;
}

/* ═══════════════════════════════════════
   MILESTONE TOAST
   ═══════════════════════════════════════ */
.milestone-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 500;
    pointer-events: none;
}

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

.harvest-app.mode-memorial .milestone-toast {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
}

.harvest-app.mode-self .milestone-toast {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400e;
}

/* ═══════════════════════════════════════
   LOADING / THINKING INDICATOR
   ═══════════════════════════════════════ */
.thinking {
    display: inline-flex;
    gap: 4px;
    padding: 1rem 1.5rem;
    align-self: flex-start;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: thinkPulse 1.4s ease-in-out infinite;
}

.thinking-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.harvest-app.mode-memorial .thinking-dot {
    background: var(--memorial-accent-light);
}

.harvest-app.mode-self .thinking-dot {
    background: var(--self-accent);
}

@keyframes thinkPulse {

    0%,
    80%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .mode-split {
        flex-direction: column;
    }

    .mode-side {
        padding: 2rem;
        min-height: 50vh;
    }

    .mode-split:hover .mode-side {
        flex: 1;
    }

    .mode-split .mode-side:hover {
        flex: 1;
    }

    .mode-self .mode-content {
        align-items: flex-start;
        text-align: left;
    }

    .mode-self .mode-features li {
        flex-direction: row;
    }

    .mode-divider {
        display: none;
    }

    .code-input-group {
        flex-direction: column;
    }

    .code-input {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .harvest-main {
        padding: 1rem;
    }
}

/* ═══════════════════════════════════════
   UTILITY ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════
   AGREEMENT PAGE (PRD §6.2)
   ═══════════════════════════════════════ */
.harvest-agreement {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050510;
    padding: 2rem;
    position: relative;
}

.harvest-agreement::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.agreement-card {
    position: relative;
    max-width: 680px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    backdrop-filter: blur(30px);
    animation: fadeSlideUp 0.6s ease;
}

.agreement-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #818cf8, #f8fafc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.agreement-subtitle {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--memorial-text-dim);
    text-align: center;
    margin-bottom: 2rem;
}

.agreement-body {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.75rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.agreement-body::-webkit-scrollbar {
    width: 4px;
}

.agreement-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

.agreement-body h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #c7d2fe;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.agreement-body h3:first-child {
    margin-top: 0;
}

.agreement-body p {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.agreement-body ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0.75rem;
}

.agreement-body li {
    font-size: 0.85rem;
    color: #94a3b8;
    padding: 0.3rem 0 0.3rem 1.5rem;
    position: relative;
    line-height: 1.6;
}

.agreement-body li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--memorial-accent-light);
}

.agreement-warn {
    color: #fbbf24 !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    background: rgba(251, 191, 36, 0.08);
    border-radius: var(--radius-sm);
    border-left: 3px solid #f59e0b;
}

.agreement-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.agreement-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.agreement-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--memorial-accent);
    cursor: pointer;
}

.agreement-check span {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.agreement-btn {
    padding: 0.875rem 2.5rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    border-radius: var(--radius-pill);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.agreement-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.agreement-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

/* ═══════════════════════════════════════
   CONFIDENCE BAR (PRD §3.4 — 逝者模式)
   ═══════════════════════════════════════ */
.confidence-bar {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.confidence-label {
    font-size: 0.78rem;
    color: var(--memorial-text-dim);
    white-space: nowrap;
}

.confidence-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.conf-btn {
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    background: transparent;
    color: #94a3b8;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.conf-btn:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: #e2e8f0;
}

.conf-btn.active {
    border-color: var(--memorial-accent);
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
}

/* ═══════════════════════════════════════
   PERSON GRAPH PANEL (PRD §3.3.9)
   ═══════════════════════════════════════ */
.person-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100vh;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 200;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.person-panel.open {
    right: 0;
}

.person-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.person-panel-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
}

.person-panel-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.person-panel-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
}

.person-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.person-empty {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    padding: 2rem 1rem;
    line-height: 1.7;
}

.person-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    transition: border-color 0.2s;
    animation: fadeSlideUp 0.3s ease;
}

.person-card:hover {
    border-color: var(--memorial-accent-glow);
}

.person-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.person-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.person-relation {
    font-size: 0.72rem;
    color: var(--memorial-accent-light);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-pill);
}

.person-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.trait-tag {
    font-size: 0.68rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
}

.person-meta {
    font-size: 0.7rem;
    color: #64748b;
}

.person-panel-toggle {
    position: fixed;
    right: 1.5rem;
    bottom: 6rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.person-panel-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.4);
}

.person-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--memorial-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Self mode overrides for person panel */
.harvest-app.mode-self .person-panel {
    background: rgba(255, 251, 245, 0.95);
    border-left-color: rgba(245, 158, 11, 0.15);
}

.harvest-app.mode-self .person-panel-header h3 {
    color: var(--self-text);
}

.harvest-app.mode-self .person-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(245, 158, 11, 0.1);
}

.harvest-app.mode-self .person-name {
    color: var(--self-text);
}

.harvest-app.mode-self .person-relation {
    color: var(--self-accent-dark);
    background: rgba(245, 158, 11, 0.1);
}

.harvest-app.mode-self .person-panel-toggle {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--self-accent-dark);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.harvest-app.mode-self .person-badge {
    background: var(--self-accent);
}

/* Responsive override for person panel */
@media (max-width: 768px) {
    .person-panel {
        width: 100%;
        right: -100%;
    }

    .person-panel-toggle {
        right: 1rem;
        bottom: 5rem;
        width: 42px;
        height: 42px;
    }

    .confidence-bar {
        padding: 0.5rem 0.75rem;
    }
}

/* ═══════════════════════════════════════
   EVENT GRAPH PANEL (PRD §3.3.10)
   ═══════════════════════════════════════ */
.event-panel {
    position: fixed;
    top: 0;
    left: -360px;
    width: 340px;
    height: 100vh;
    background: rgba(5, 5, 16, 0.95);
    border-right: 1px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(20px);
    overflow-y: auto;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding-bottom: 2rem;
}

.event-panel.open {
    left: 0;
}

.event-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

.event-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e7ff;
}

.event-panel-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
}

.event-panel-list {
    padding: 1rem;
}

.event-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

.event-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.event-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.event-age {
    font-weight: 600;
    color: #a5b4fc;
    font-size: 0.9rem;
}

.event-location {
    font-size: 0.8rem;
    color: #94a3b8;
}

.event-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}

.event-tag {
    font-size: 0.75rem;
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.event-meta {
    font-size: 0.75rem;
    color: #64748b;
}

.event-empty {
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
    padding: 2rem 1rem;
}

.event-panel-toggle {
    position: fixed;
    left: 1rem;
    bottom: 6rem;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
    transition: all 0.2s;
}

.event-panel-toggle:hover {
    transform: scale(1.1);
}

.event-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #6366f1;
    color: white;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ═══════════════════════════════════════
   LIFE-GRID RADAR (PRD §3.6.4)
   ═══════════════════════════════════════ */
.lifegrid-container {
    position: fixed;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 800;
}

.lifegrid-mini {
    background: rgba(5, 5, 16, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    backdrop-filter: blur(20px);
    width: 60px;
}

.lifegrid-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

.lifegrid-title {
    font-size: 0.65rem;
    color: #94a3b8;
}

.lifegrid-coverage {
    font-size: 0.75rem;
    font-weight: 700;
    color: #10b981;
}

.lifegrid-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.lifegrid-cell {
    width: 36px;
    height: 14px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    cursor: default;
}

.lifegrid-cell.dark {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lifegrid-cell.dim {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.2);
}

.lifegrid-cell.bright {
    background: rgba(34, 197, 94, 0.35);
    border: 1px solid rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
    animation: gridPulse 2s ease infinite;
}

.lifegrid-age {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.lifegrid-cell.bright .lifegrid-age {
    color: rgba(255, 255, 255, 0.9);
}

@keyframes gridPulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 16px rgba(34, 197, 94, 0.6);
    }
}

/* ═══════════════════════════════════════
   VOICE RECORDER
   ═══════════════════════════════════════ */
.voice-recorder {
    text-align: center;
    padding: 1.5rem;
}

.voice-status {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.voice-waveform {
    height: 48px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.voice-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    color: #e0e7ff;
    margin: 0.5rem 0;
}

.voice-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.voice-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-btn-record {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
}

.voice-btn-record:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.voice-btn-stop {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.voice-recordings {
    margin-top: 1rem;
}

/* ═══════════════════════════════════════
   PHOTO UPLOAD
   ═══════════════════════════════════════ */
.photo-upload-section {
    margin: 1rem 0;
}

.photo-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e0e7ff;
    margin-bottom: 0.75rem;
}

.photo-dropzone {
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.photo-dropzone:hover,
.photo-dropzone.dragover {
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(99, 102, 241, 0.05);
}

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

.dropzone-icon {
    font-size: 2rem;
}

.dropzone-text {
    font-size: 0.9rem;
    color: #94a3b8;
}

.dropzone-hint {
    font-size: 0.75rem;
    color: #64748b;
}

.dropzone-input {
    display: none;
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.photo-preview-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.photo-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.photo-info {
    padding: 0.3rem 0.5rem;
    background: rgba(0, 0, 0, 0.6);
}

.photo-name {
    font-size: 0.65rem;
    color: #94a3b8;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-size {
    font-size: 0.6rem;
    color: #64748b;
}

.photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════
   EQ SCENARIOS
   ═══════════════════════════════════════ */
.eq-scenario {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
}

.eq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.eq-category {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.eq-progress {
    font-size: 0.8rem;
    color: #64748b;
}

.eq-dimension {
    font-size: 0.75rem;
    color: #6366f1;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.eq-question {
    font-size: 1.1rem;
    color: #e0e7ff;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 3px solid #6366f1;
}

.eq-answer {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #f8fafc;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.eq-answer:focus {
    border-color: rgba(99, 102, 241, 0.5);
}

.eq-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.eq-skip {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.eq-skip:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #e0e7ff;
}

.eq-submit {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.eq-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.eq-complete {
    text-align: center;
    padding: 3rem 1rem;
}

.eq-complete-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.eq-complete h3 {
    color: #e0e7ff;
    font-size: 1.3rem;
}

.eq-complete p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════
   RESPONSIVE OVERRIDES (new panels)
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .event-panel {
        width: 100%;
        left: -100%;
    }

    .event-panel-toggle {
        left: 1rem;
        bottom: 5rem;
        width: 42px;
        height: 42px;
    }

    .lifegrid-container {
        display: none;
    }
}

/* ═══════════════════════════════════════
   STEP TABS NAVIGATION
   ═══════════════════════════════════════ */
.step-tabs {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    background: rgba(5, 5, 16, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 4px;
    z-index: 900;
    backdrop-filter: blur(20px);
}

.step-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.step-tab:hover {
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
}

.step-tab.active {
    color: #e0e7ff;
    background: rgba(99, 102, 241, 0.2);
    font-weight: 600;
}

.harvest-app.mode-self .step-tab.active {
    color: var(--self-text);
    background: rgba(245, 158, 11, 0.15);
}

/* ═══════════════════════════════════════
   STEP HEADER & NAVIGATION
   ═══════════════════════════════════════ */
.step-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #818cf8, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
}

.step-nav {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.step-nav-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.step-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e7ff;
}

.step-nav-next {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.step-nav-next:hover {
    background: rgba(99, 102, 241, 0.25);
}

/* Voice recording state indicator */
.btn-voice.recording {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #ef4444 !important;
    animation: recordPulse 1.2s ease infinite;
}

@keyframes recordPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Self mode step styles */
.harvest-app.mode-self .step-title {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.harvest-app.mode-self .step-nav-next {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--self-accent);
}

@media (max-width: 768px) {
    .step-tabs {
        width: 100%;
        border-radius: 0;
        justify-content: space-around;
    }

    .step-tab {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
    }
}

/* ═══════════════════════════════════════
   PHASE 3: INVITATION PANEL
   ═══════════════════════════════════════ */
.invite-panel {
    padding: 2rem;
    text-align: center;
}

.invite-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.invite-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.invite-generate-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.invite-generate-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.invite-link-box {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
}

.invite-link-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.invite-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.6rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.invite-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.invite-copied {
    color: #10b981;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.contributors-title {
    font-size: 1rem;
    margin: 1.5rem 0 0.5rem;
}

.contributors-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.contributor-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 0.5rem 0;
}

.contributor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.contributor-info {
    flex: 1;
    text-align: left;
}

.contributor-name {
    display: block;
    font-weight: 500;
}

.contributor-relation {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.contributor-stats {
    text-align: right;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.contributor-answers,
.contributor-dims {
    display: block;
}

/* Invited Welcome */
.invited-welcome {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.invited-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.invited-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.invited-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.invited-form {
    text-align: left;
}

.invited-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 1rem 0 0.3rem;
}

.invited-input,
.invited-select {
    width: 100%;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.invited-start-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.invited-start-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

/* ═══════════════════════════════════════
   ENCRYPTION SETUP
   ═══════════════════════════════════════ */
.encryption-setup {
    text-align: center;
    padding: 2rem;
    max-width: 440px;
    margin: 0 auto;
}

.encryption-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.encryption-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.encryption-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.encryption-form {
    text-align: left;
}

.encryption-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 1rem 0 0.3rem;
}

.encryption-input {
    width: 100%;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.encryption-strength {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    min-height: 1.2em;
}

.encryption-warning {
    margin: 1rem 0;
    padding: 0.8rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #fbbf24;
}

.encryption-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

.encryption-skip {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.6rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.encryption-skip:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

/* ═══════════════════════════════════════
   ADMIN DASHBOARD
   ═══════════════════════════════════════ */
.admin-dashboard {
    padding: 1.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.admin-refresh {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    color: #e2e8f0;
    cursor: pointer;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #818cf8;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.3rem;
}

.stat-active .stat-value {
    color: #10b981;
}

.stat-complete .stat-value {
    color: #f59e0b;
}

.admin-section {
    margin-bottom: 1.5rem;
}

.admin-section-title {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.code-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-select,
.admin-btn {
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.admin-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

.admin-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.admin-table th,
.admin-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table th {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.code-cell code {
    font-family: 'JetBrains Mono', monospace;
    color: #818cf8;
    font-size: 0.75rem;
}

.code-exhausted {
    opacity: 0.4;
}

.mode-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mode-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-bar-label {
    width: 100px;
    font-size: 0.8rem;
}

.mode-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.mode-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s;
}

.mode-bar-fill.memorial {
    background: linear-gradient(90deg, #6366f1, #818cf8);
}

.mode-bar-fill.self {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.mode-bar-count {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    min-width: 2em;
    text-align: right;
}

.health-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
}

.health-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.health-dot.ok {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.health-dot.error {
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

.health-dot.pending {
    background: #f59e0b;
    animation: pulse 1.5s infinite;
}

.health-status {
    margin-left: auto;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Admin Login */
.admin-login {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 360px;
    margin: 0 auto;
}

.admin-login-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.admin-login-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.admin-login-input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.admin-login-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}

.admin-login-error {
    color: #ef4444;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════
   DATA EXPORT
   ═══════════════════════════════════════ */
.export-panel {
    text-align: center;
    padding: 2rem;
}

.export-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.export-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.export-desc {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.export-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.export-stat {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.8rem;
}

.export-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #818cf8;
}

.export-stat-label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.export-formats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.export-format {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.export-btn {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.export-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.export-status {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ═══════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════ */
.lang-switch-fixed {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 200;
}

.lang-switcher {
    display: flex;
    gap: 1px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    max-width: 240px;
}

.lang-btn {
    padding: 0.25rem 0.45rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.lang-btn.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.5);
}

.lang-btn:hover {
    color: #fff;
    background: rgba(99, 102, 241, 0.25);
}

/* ═══════════════════════════════════════
   AVATAR PREVIEW
   ═══════════════════════════════════════ */
.avatar-preview {
    padding: 1rem 0;
}

.avatar-hero {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    position: relative;
}

.avatar-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -60%);
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
}

.avatar-initial {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.avatar-name {
    font-size: 1.8rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.avatar-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: 0.3rem;
    position: relative;
    z-index: 1;
}

.avatar-progress-ring {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 1rem auto 0;
}

.progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.progress-fill {
    fill: none;
    stroke: #6366f1;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: #818cf8;
}

.avatar-section {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.avatar-section-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Trait Tags */
.trait-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.trait-tag {
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    color: #a5b4fc;
    transition: all 0.2s;
}

.trait-tag:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: scale(1.05);
}

.trait-empty,
.timeline-empty,
.memory-empty,
.people-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    padding: 0.6rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.timeline-dot {
    position: absolute;
    left: -1.55rem;
    top: 0.8rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    border: 2px solid rgba(5, 5, 16, 1);
}

.type-birth .timeline-dot {
    background: #10b981;
}

.type-death .timeline-dot {
    background: #ef4444;
}

.timeline-age {
    min-width: 3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #818cf8;
    font-family: 'JetBrains Mono', monospace;
}

.timeline-content {
    flex: 1;
}

.timeline-label {
    display: block;
    font-size: 0.85rem;
}

.timeline-detail {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Memories */
.memory-card {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid rgba(99, 102, 241, 0.4);
    border-radius: 0 8px 8px 0;
    margin-bottom: 0.8rem;
    font-style: italic;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* People Grid */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.8rem;
}

.person-avatar-card {
    text-align: center;
    padding: 0.8rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.person-avatar-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.3rem;
    font-size: 1rem;
    font-weight: 600;
}

.person-avatar-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
}

.person-avatar-relation {
    display: block;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Simulated Chat */
.sim-chat {
    max-width: 500px;
    margin: 0 auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
}

.sim-chat-msg {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    max-width: 80%;
}

.sim-user {
    background: rgba(99, 102, 241, 0.2);
    margin-left: auto;
    border-bottom-right-radius: 4px;
    text-align: right;
}

.sim-avatar {
    background: rgba(255, 255, 255, 0.06);
    border-bottom-left-radius: 4px;
    min-height: 2.5rem;
}

.sim-typing {
    display: flex;
    gap: 4px;
    padding: 0.3rem 0;
}

.sim-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: simTyping 1.4s infinite;
}

.sim-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.sim-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes simTyping {

    0%,
    60%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    30% {
        opacity: 1;
        transform: scale(1);
    }
}

.sim-text {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.sim-disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 1rem;
    padding: 0.5rem;
}

/* ═══════════════════════════════════════
   RESPONSIVE OVERRIDES (Phase 3)
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .export-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .people-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .step-tab {
        font-size: 0.65rem;
        padding: 0.35rem 0.4rem;
    }

    .lang-switch-fixed {
        top: 8px;
        right: 8px;
    }

    .avatar-hero {
        padding: 2rem 1rem;
    }

    .avatar-name {
        font-size: 1.4rem;
    }

    .sim-chat-msg {
        max-width: 90%;
    }
}