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

.reset-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 18, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reset-overlay.visible {
    opacity: 1;
}

.reset-dialog {
    background: linear-gradient(135deg, #151b30, #0e1225);
    border: 1px solid rgba(100, 140, 255, 0.2);
    border-radius: 20px;
    padding: 32px 28px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(100, 140, 255, 0.08);
}

.reset-dialog p {
    color: #b0bcdc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.reset-dialog-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reset-dialog .keep-btn {
    padding: 14px 24px;
    border-radius: 28px;
    border: 1px solid rgba(100, 220, 120, 0.4);
    background: linear-gradient(135deg, rgba(100, 220, 120, 0.15), rgba(80, 200, 100, 0.1));
    color: #a0dca8;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.reset-dialog .keep-btn:hover {
    background: linear-gradient(135deg, rgba(100, 220, 120, 0.3), rgba(80, 200, 100, 0.2));
    border-color: rgba(100, 220, 120, 0.7);
    color: #c0f0c8;
}

.reset-dialog .fresh-btn {
    padding: 12px 24px;
    border-radius: 28px;
    border: 1px solid rgba(180, 140, 160, 0.2);
    background: transparent;
    color: #807088;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.reset-dialog .fresh-btn:hover {
    border-color: rgba(200, 140, 160, 0.4);
    color: #a08898;
}

.save-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 18, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.save-overlay.visible {
    opacity: 1;
}

.save-dialog {
    background: linear-gradient(135deg, #151b30, #0e1225);
    border: 1px solid rgba(100, 140, 255, 0.2);
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 15px rgba(100, 140, 255, 0.08);
    position: relative;
}

.save-dialog-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #5a6a8a;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
    touch-action: manipulation;
}

.save-dialog-close:hover {
    color: #a0b4f0;
}

.save-dialog h3 {
    color: #c0d0f0;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.save-dialog-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.save-dialog .save-option-primary {
    padding: 14px 24px;
    border-radius: 28px;
    border: 1px solid rgba(110, 193, 228, 0.4);
    background: linear-gradient(135deg, rgba(110, 193, 228, 0.15), rgba(80, 160, 220, 0.1));
    color: #90d0f0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.save-dialog .save-option-primary:hover {
    background: linear-gradient(135deg, rgba(110, 193, 228, 0.3), rgba(80, 160, 220, 0.2));
    border-color: rgba(110, 193, 228, 0.7);
    color: #c0e8ff;
}

.save-dialog .save-option-secondary {
    padding: 12px 24px;
    border-radius: 28px;
    border: 1px solid rgba(100, 140, 255, 0.15);
    background: transparent;
    color: #7088b0;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.save-dialog .save-option-secondary:hover {
    border-color: rgba(100, 140, 255, 0.35);
    color: #a0b4f0;
}

[data-replit], iframe[src*="replit"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    overflow: hidden !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0e1a;
    color: #e0e6f0;
    height: 100vh;
    height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

html {
    height: -webkit-fill-available;
    overflow: hidden;
}

canvas#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

header {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.95) 0%, rgba(10, 14, 26, 0.7) 100%);
    border-bottom: 1px solid rgba(100, 140, 255, 0.2);
}

header h1 {
    font-size: 2rem;
    letter-spacing: 6px;
    background: linear-gradient(135deg, #6ec1e4, #a78bfa, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 0.85rem;
    color: #7b8ab8;
    margin-top: 4px;
    letter-spacing: 2px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    transition: opacity 0.6s;
}

.controls button {
    padding: 6px 16px;
    border: 1px solid rgba(100, 140, 255, 0.3);
    border-radius: 20px;
    background: rgba(100, 140, 255, 0.1);
    color: #a0b4f0;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.controls button:hover {
    background: rgba(100, 140, 255, 0.25);
    color: #d0dfff;
}

.controls button.active {
    background: rgba(100, 200, 140, 0.2);
    border-color: rgba(100, 200, 140, 0.4);
    color: #90e0b0;
}

@media (max-width: 767px) {
    .controls {
        gap: 6px;
    }
    .controls button {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}

#chat-area {
    position: relative;
    z-index: 1;
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 20px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 140, 255, 0.3) transparent;
}

#chat-area::-webkit-scrollbar {
    width: 6px;
}

#chat-area::-webkit-scrollbar-track {
    background: transparent;
}

#chat-area::-webkit-scrollbar-thumb {
    background: rgba(100, 140, 255, 0.3);
    border-radius: 3px;
}

.message {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 0.95rem;
    animation: fadeIn 0.4s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: manual;
    -webkit-hyphens: manual;
}

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

.message.user {
    align-self: flex-end;
    max-width: 80%;
    margin-right: 12px;
    background: linear-gradient(135deg, rgba(100, 140, 255, 0.25), rgba(130, 100, 255, 0.2));
    border: 1px solid rgba(100, 140, 255, 0.2);
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(40, 50, 80, 0.8), rgba(30, 40, 65, 0.8));
    border: 1px solid rgba(100, 140, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.message.assistant .label {
    font-size: 0.7rem;
    color: #a78bfa;
    letter-spacing: 2px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.thinking-indicator {
    align-self: flex-start;
    padding: 14px 18px;
    color: #a78bfa;
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.85;
}

#pause-btn {
    position: fixed;
    bottom: calc(82px - 0.2em);
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(167, 139, 250, 0.5);
    background: rgba(20, 25, 45, 0.85);
    color: #a78bfa;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.25s, border-color 0.25s;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0;
    line-height: 1;
}

#pause-btn.visible {
    display: flex;
}

#pause-btn.active {
    opacity: 1;
    border-color: rgba(167, 139, 250, 0.85);
}

#pause-btn.inactive {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

#paused-label {
    position: fixed;
    bottom: 133px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    color: rgba(167, 139, 250, 0.65);
    text-transform: uppercase;
    display: none;
    z-index: 999;
    pointer-events: none;
}

#paused-label.visible {
    display: block;
}

#input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 20px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    background: #0a0e1a;
    border-top: 1px solid rgba(100, 140, 255, 0.15);
    display: flex;
    gap: 12px;
    align-items: center;
}

#user-input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid rgba(100, 140, 255, 0.2);
    border-radius: 24px;
    background: rgba(20, 25, 45, 0.8);
    color: #e0e6f0;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
    touch-action: manipulation;
}

#user-input:focus {
    border-color: rgba(100, 140, 255, 0.5);
}

#user-input::placeholder {
    color: #4a5578;
}

#user-input::-webkit-search-cancel-button,
#user-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

#send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6e8ef0, #a78bfa);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#send-btn:hover {
    transform: scale(1.08);
}

#send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#mic-btn {
    min-width: 48px;
    height: 44px;
    border-radius: 22px;
    border: 1px solid rgba(100, 140, 255, 0.3);
    background: rgba(100, 140, 255, 0.1);
    color: #a0b4f0;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    transition: all 0.3s ease;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

#mic-btn .mic-label {
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    font-weight: 500;
    display: none;
}

#mic-btn.mic-invite .mic-label {
    display: inline;
}

@media (max-width: 767px) {
    #mic-btn {
        min-width: 88px;
        padding: 0 14px;
    }
    #mic-btn .mic-label {
        display: none;
    }
}

#mic-btn:hover {
    background: rgba(100, 140, 255, 0.25);
    color: #d0dfff;
}

#mic-btn.listening {
    background: rgba(255, 80, 80, 0.3);
    border-color: rgba(255, 80, 80, 0.6);
    color: #ff6b6b;
    animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 80, 80, 0.4); transform: scale(1); }
    50% { box-shadow: 0 0 12px 4px rgba(255, 80, 80, 0.2); transform: scale(1.08); }
}

#splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
}

#splash-overlay h1 {
    font-size: 2.5rem;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #6ec1e4, #a78bfa, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

#splash-overlay p {
    color: #7b8ab8;
    font-size: 0.95rem;
    letter-spacing: 2px;
    margin-bottom: 50px;
}

#begin-btn {
    padding: 18px 48px;
    font-size: 1.2rem;
    letter-spacing: 2px;
    border: 2px solid rgba(140, 210, 245, 0.6);
    border-radius: 50px;
    background: rgba(110, 193, 228, 0.06);
    color: #d0e4ff;
    cursor: pointer;
    transition: all 0.4s ease;
    animation: btnPulse 2s ease-in-out infinite;
    touch-action: manipulation;
}

#begin-btn:hover {
    background: rgba(110, 193, 228, 0.2);
    border-color: rgba(160, 220, 255, 0.9);
    transform: scale(1.05);
    color: #fff;
    box-shadow: 0 0 20px rgba(130, 200, 240, 0.4), 0 0 50px rgba(140, 170, 255, 0.2), 0 0 80px rgba(167, 139, 250, 0.1);
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(130, 200, 240, 0.1), 0 0 25px rgba(130, 200, 240, 0.05);
        border-color: rgba(140, 210, 245, 0.45);
    }
    50% {
        box-shadow: 0 0 18px rgba(130, 200, 240, 0.35), 0 0 45px rgba(140, 170, 255, 0.15), 0 0 70px rgba(167, 139, 250, 0.08);
        border-color: rgba(160, 220, 255, 0.75);
    }
}

#splash-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

#adult-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(5, 8, 18, 0.96);
}

html.orion-adult-acknowledged #adult-gate-overlay {
    display: none;
}

.adult-gate-card {
    width: 100%;
    max-width: 560px;
    padding: 34px 30px 28px;
    text-align: center;
    background: linear-gradient(135deg, rgba(21, 27, 48, 0.98), rgba(14, 18, 37, 0.98));
    border: 1px solid rgba(140, 170, 255, 0.22);
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.55), 0 0 24px rgba(100, 140, 255, 0.08);
}

.adult-gate-title {
    font-size: 2.2rem;
    letter-spacing: 5px;
    color: #ffffff;
    margin-bottom: 10px;
}

.adult-gate-lead {
    color: #b8aee8;
    font-size: 1.08rem;
    line-height: 1.5;
    margin-bottom: 22px;
}

.adult-gate-privacy {
    color: #c0cbe5;
    font-size: 0.92rem;
    line-height: 1.65;
    text-align: left;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: rgba(100, 140, 255, 0.07);
    border: 1px solid rgba(140, 170, 255, 0.14);
    border-radius: 16px;
}

.adult-gate-privacy p + p {
    margin-top: 12px;
}

.adult-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.adult-gate-button {
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border: 1px solid rgba(110, 193, 228, 0.42);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(110, 193, 228, 0.16), rgba(100, 140, 255, 0.12));
    color: #d7e8ff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.adult-gate-button:hover {
    background: linear-gradient(135deg, rgba(110, 193, 228, 0.28), rgba(100, 140, 255, 0.22));
    border-color: rgba(160, 220, 255, 0.78);
    color: #ffffff;
    transform: scale(1.015);
}

.adult-gate-button:focus-visible,
.adult-gate-alone:focus-visible {
    outline: 3px solid rgba(167, 139, 250, 0.9);
    outline-offset: 3px;
}

.adult-gate-alone {
    margin-top: 18px;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: #9caed8;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    touch-action: manipulation;
}

.adult-gate-alone:hover {
    color: #d0dfff;
}

/* Profile Picker */
#picker-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    flex-direction: column;
    align-items: center;
    padding: 44px 24px 40px;
    overflow-y: auto;
    box-sizing: border-box;
    background: transparent;
}

.picker-title {
    font-size: 1.4rem;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #6ec1e4, #a78bfa, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 32px;
    margin-top: 16px;
    flex-shrink: 0;
}

.picker-cards {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.picker-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    min-height: 80px;
    background: linear-gradient(135deg, rgba(30, 40, 70, 0.75), rgba(20, 30, 55, 0.75));
    border: 1px solid rgba(140, 170, 255, 0.18);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    box-sizing: border-box;
}

.picker-card:hover {
    background: linear-gradient(135deg, rgba(50, 65, 105, 0.85), rgba(35, 50, 85, 0.85));
    border-color: rgba(140, 170, 255, 0.45);
    transform: scale(1.02);
}

.picker-card:active {
    transform: scale(0.98);
}

.picker-card-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.picker-card-info {
    flex: 1;
}

.picker-card-name {
    font-size: 1.25rem;
    font-weight: bold;
    color: #c8d4f0;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.picker-card-date {
    font-size: 0.75rem;
    color: #6a7ca4;
    margin-top: 5px;
}

.picker-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 480px;
    min-height: 58px;
    padding: 16px 24px;
    font-size: 1rem;
    letter-spacing: 1.5px;
    border: 2px solid rgba(167, 139, 250, 0.45);
    border-radius: 50px;
    background: rgba(167, 139, 250, 0.07);
    color: #c4b5fd;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    box-sizing: border-box;
    flex-shrink: 0;
}

.picker-new-btn:hover {
    background: rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.75);
    color: #e9d5ff;
}

.picker-new-btn:active {
    transform: scale(0.98);
}

#mic-btn.auto-listening {
    background: rgba(220, 50, 50, 0.2);
    border-color: rgba(220, 50, 50, 0.5);
    color: #ff6b6b;
    animation: micPulse 2.5s ease-in-out infinite;
}

#input-area.hot-listening {
    border-top-color: rgba(220, 50, 50, 0.45);
    animation: inputBarGlow 2.5s ease-in-out infinite;
}

#user-input.hot-listening {
    border-color: rgba(220, 50, 50, 0.45);
    background: rgba(35, 8, 8, 0.6);
    color: #ffaaaa;
}

#user-input.hot-listening::placeholder {
    color: #50e080;
    font-weight: 700;
}

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

#user-input.mic-hint::placeholder {
    color: rgba(140, 145, 180, 0.55);
    font-weight: 400;
    animation: micHintFade 0.9s ease forwards;
}

@keyframes inputBarGlow {
    0%, 100% { box-shadow: 0 -3px 14px rgba(220, 50, 50, 0.12); }
    50%       { box-shadow: 0 -3px 24px rgba(220, 50, 50, 0.3);  }
}

#mic-btn.mic-tap {
    animation: micTapConfirm 0.3s ease-out;
}

@keyframes micTapConfirm {
    0% { transform: scale(1); }
    40% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

#mic-btn.mic-invite {
    border-color: rgba(80, 220, 120, 0.8);
    color: #50e080;
    background: rgba(80, 220, 120, 0.15);
    animation: micInvitePulse 1.8s ease-in-out infinite;
}

@keyframes micInvitePulse {
    0%, 100% { box-shadow: 0 0 8px 2px rgba(80, 220, 120, 0.4), 0 0 20px 6px rgba(80, 220, 120, 0.15); }
    50% { box-shadow: 0 0 18px 8px rgba(80, 220, 120, 0.6), 0 0 40px 14px rgba(80, 220, 120, 0.2); }
}

#voice-error-bar {
    display: none;
}

#journal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: #0a0e1a;
    flex-direction: column;
    overflow: hidden;
}

#journal-overlay.visible {
    display: flex;
}

.journal-header {
    padding: 20px 24px;
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.98) 0%, rgba(10, 14, 26, 0.85) 100%);
    border-bottom: 1px solid rgba(100, 140, 255, 0.2);
    text-align: center;
}

.journal-header h2 {
    font-size: 1.4rem;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #6ec1e4, #a78bfa, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.journal-header .journal-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 10px;
}

.journal-header .journal-stats .stat {
    text-align: center;
}

.journal-header .journal-stats .stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #a78bfa;
}

.journal-header .journal-stats .stat-label {
    font-size: 0.7rem;
    color: #7b8ab8;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.journal-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 6px 14px;
    border: 1px solid rgba(100, 140, 255, 0.3);
    border-radius: 20px;
    background: rgba(100, 140, 255, 0.1);
    color: #a0b4f0;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.journal-back-btn:hover {
    background: rgba(100, 140, 255, 0.25);
    color: #d0dfff;
}

.journal-entries {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 140, 255, 0.3) transparent;
}

.journal-entries::-webkit-scrollbar { width: 6px; }
.journal-entries::-webkit-scrollbar-track { background: transparent; }
.journal-entries::-webkit-scrollbar-thumb { background: rgba(100, 140, 255, 0.3); border-radius: 3px; }

.journal-empty {
    text-align: center;
    padding: 60px 20px;
    color: #4a5578;
    font-size: 1rem;
}

.journal-entry {
    background: linear-gradient(135deg, rgba(30, 38, 65, 0.7), rgba(20, 28, 50, 0.7));
    border: 1px solid rgba(100, 140, 255, 0.1);
    border-left: 3px solid rgba(167, 139, 250, 0.5);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 14px;
    animation: fadeIn 0.4s ease;
    cursor: pointer;
    transition: all 0.3s ease;
}

.journal-entry:hover {
    border-color: rgba(167, 139, 250, 0.4);
    background: linear-gradient(135deg, rgba(40, 50, 80, 0.8), rgba(30, 38, 65, 0.8));
    transform: translateX(4px);
}

.journal-entry:active {
    transform: translateX(2px);
}

.journal-entry .entry-date {
    font-size: 0.7rem;
    color: #6ec1e4;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.journal-entry .entry-topic {
    font-size: 1.05rem;
    color: #e0e6f0;
    font-weight: 600;
    margin-bottom: 6px;
}

.journal-entry .entry-question {
    font-size: 0.85rem;
    color: #a78bfa;
    font-style: italic;
    margin-bottom: 6px;
    padding-left: 10px;
    border-left: 2px solid rgba(167, 139, 250, 0.3);
}

.journal-entry .entry-number {
    float: right;
    font-size: 0.7rem;
    color: rgba(100, 140, 255, 0.3);
    letter-spacing: 1px;
}

.message.quest {
    background: linear-gradient(135deg, rgba(200, 160, 40, 0.12), rgba(220, 180, 60, 0.08), rgba(180, 140, 30, 0.12));
    border: 2px solid rgba(220, 180, 60, 0.45);
    border-radius: 18px;
    padding: 20px 22px;
    margin: 16px 10px;
    position: relative;
    animation: questShimmer 4s ease-in-out infinite;
}

.message.quest .quest-icon {
    font-size: 1.6rem;
    margin-right: 8px;
    display: inline-block;
    animation: questStarSpin 6s linear infinite;
}

@keyframes questStarSpin {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(10deg); }
}

.message.quest .quest-label {
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #e0b040;
    margin-bottom: 10px;
    display: block;
    font-weight: 600;
}

.message.quest .quest-text {
    color: #e8dcc0;
    font-size: 0.95rem;
    line-height: 1.7;
}

.message.quest .quest-return {
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(220, 180, 60, 0.7);
    text-align: center;
    margin-top: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.message.quest .quest-return:hover {
    color: rgba(220, 180, 60, 1);
    text-decoration: underline;
}

.message.quest .quest-skip {
    display: block;
    width: 100%;
    background: none;
    border: 0;
    font-style: italic;
    font-size: 0.82rem;
    color: rgba(232, 220, 192, 0.75);
    text-align: center;
    margin-top: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.message.quest .quest-skip:hover {
    color: rgba(232, 220, 192, 1);
    text-decoration: underline;
}

@keyframes questShimmer {
    0% { box-shadow: 0 0 10px rgba(220, 180, 60, 0.1), 0 0 20px rgba(220, 180, 60, 0.05); border-color: rgba(220, 180, 60, 0.35); }
    50% { box-shadow: 0 0 20px rgba(220, 180, 60, 0.25), 0 0 40px rgba(220, 180, 60, 0.1); border-color: rgba(220, 180, 60, 0.6); }
    100% { box-shadow: 0 0 10px rgba(220, 180, 60, 0.1), 0 0 20px rgba(220, 180, 60, 0.05); border-color: rgba(220, 180, 60, 0.35); }
}

.confirm-btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 12px 0 4px 0;
}

.confirm-btn {
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.confirm-btn.yes {
    border: 1px solid rgba(100, 220, 120, 0.4);
    background: linear-gradient(135deg, rgba(100, 220, 120, 0.15), rgba(80, 200, 100, 0.1));
    color: #90d8a0;
}

.confirm-btn.yes:hover {
    background: linear-gradient(135deg, rgba(100, 220, 120, 0.3), rgba(80, 200, 100, 0.2));
    border-color: rgba(100, 220, 120, 0.7);
    color: #b0f0c0;
}

.confirm-btn.retry {
    border: 1px solid rgba(200, 160, 255, 0.4);
    background: linear-gradient(135deg, rgba(200, 160, 255, 0.15), rgba(180, 140, 235, 0.1));
    color: #c0a8e8;
}

.confirm-btn.retry:hover {
    background: linear-gradient(135deg, rgba(200, 160, 255, 0.3), rgba(180, 140, 235, 0.2));
    border-color: rgba(200, 160, 255, 0.7);
    color: #d8c0f8;
}

.age-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 14px 10px;
    max-width: 340px;
    margin: 10px auto;
}

.age-picker-label {
    width: 100%;
    text-align: center;
    color: #8090b8;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.age-picker button {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(100, 140, 255, 0.25);
    background: rgba(100, 140, 255, 0.08);
    color: #c0ccf0;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.age-picker button:hover, .age-picker button:active {
    background: rgba(100, 140, 255, 0.25);
    border-color: rgba(100, 140, 255, 0.6);
    color: #e0e8ff;
    transform: scale(1.08);
}

.age-picker .age-adult-btn {
    width: 100%;
    height: 44px;
    margin-top: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 22px;
    border: 1px solid rgba(180, 160, 220, 0.3);
    background: rgba(180, 160, 220, 0.08);
    color: #b0a0d0;
}

.age-picker .age-adult-btn:hover, .age-picker .age-adult-btn:active {
    background: rgba(180, 160, 220, 0.2);
    border-color: rgba(180, 160, 220, 0.6);
    color: #d0c0f0;
}

.quest-complete-btn {
    display: block;
    margin: 10px auto 8px auto;
    padding: 10px 24px;
    border: 1px solid rgba(220, 180, 60, 0.4);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(220, 180, 60, 0.15), rgba(200, 160, 40, 0.1));
    color: #e0b040;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: questBtnGlow 2.5s ease-in-out infinite alternate;
}

.quest-complete-btn:hover {
    background: linear-gradient(135deg, rgba(220, 180, 60, 0.3), rgba(200, 160, 40, 0.2));
    border-color: rgba(220, 180, 60, 0.7);
    color: #f0c860;
    transform: scale(1.03);
}

@keyframes questBtnGlow {
    0% { box-shadow: 0 0 6px rgba(220, 180, 60, 0.15); }
    100% { box-shadow: 0 0 14px rgba(220, 180, 60, 0.3), 0 0 24px rgba(200, 160, 40, 0.1); }
}

#age-indicator {
    position: fixed;
    bottom: 70px;
    left: 16px;
    font-size: 0.7rem;
    color: rgba(123, 138, 184, 0.5);
    letter-spacing: 1px;
    z-index: 10;
    pointer-events: none;
}

#gear-btn {
    padding: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: 1px solid rgba(100, 140, 255, 0.18);
    border-radius: 50%;
    background: rgba(100, 140, 255, 0.06);
    color: rgba(160, 180, 240, 0.45);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 44px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

#gear-btn:hover {
    background: rgba(100, 140, 255, 0.18);
    color: rgba(200, 215, 255, 0.75);
}

#gear-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(15, 20, 45, 0.97);
    border: 1px solid rgba(100, 140, 255, 0.25);
    border-radius: 10px;
    overflow: hidden;
    z-index: 9999;
    min-width: 170px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

#gear-dropdown.open {
    display: block;
}

.gear-menu-item {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    font-size: 0.88rem;
    color: #a0b4f0;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s;
    white-space: nowrap;
}

.gear-menu-item:hover {
    background: rgba(100, 140, 255, 0.18);
    color: #d0dfff;
}

.gear-menu-item.muted {
    color: rgba(120, 140, 200, 0.4);
    cursor: default;
    font-size: 0.82rem;
}

.gear-menu-item.muted:hover {
    background: none;
    color: rgba(120, 140, 200, 0.4);
}

.gear-menu-item.danger {
    color: #f87171;
}

.gear-menu-item.danger:hover {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

#full-reset-dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    background: rgba(5, 8, 20, 0.75);
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

#full-reset-dialog-overlay.visible {
    display: flex;
}

.full-reset-dialog {
    background: linear-gradient(160deg, #141c38, #1a2445);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 18px;
    padding: 32px 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.full-reset-dialog h3 {
    font-size: 1.1rem;
    color: #fca5a5;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.full-reset-dialog p {
    font-size: 0.88rem;
    color: #8a9cc8;
    line-height: 1.6;
    margin-bottom: 28px;
}

.full-reset-dialog-btns {
    display: flex;
    gap: 12px;
}

.full-reset-cancel-btn {
    flex: 1;
    min-height: 48px;
    border: 1px solid rgba(140, 170, 255, 0.25);
    border-radius: 24px;
    background: transparent;
    color: #a0b4f0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.full-reset-cancel-btn:hover {
    background: rgba(100, 140, 255, 0.12);
    color: #c8d4f0;
}

.full-reset-confirm-btn {
    flex: 1;
    min-height: 48px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 24px;
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.full-reset-confirm-btn:hover {
    background: rgba(248, 113, 113, 0.22);
    color: #fca5a5;
}

#gear-wrapper {
    position: relative;
}

#parent-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: linear-gradient(180deg, #0d1225 0%, #141c35 50%, #1a2440 100%);
    flex-direction: column;
    overflow: hidden;
}

#parent-overlay.visible {
    display: flex;
}

.parent-header {
    padding: 24px;
    background: linear-gradient(180deg, rgba(13, 18, 37, 0.98) 0%, rgba(13, 18, 37, 0.85) 100%);
    border-bottom: 1px solid rgba(140, 170, 255, 0.15);
    text-align: center;
    position: relative;
}

.parent-header h2 {
    font-size: 1.3rem;
    letter-spacing: 3px;
    color: #c8d4f0;
    margin-bottom: 4px;
}

.parent-header .parent-subtitle {
    font-size: 0.8rem;
    color: #8a9cc4;
}

.parent-back-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 6px 14px;
    border: 1px solid rgba(140, 170, 255, 0.25);
    border-radius: 20px;
    background: rgba(100, 140, 255, 0.08);
    color: #a0b4f0;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.parent-back-btn:hover {
    background: rgba(100, 140, 255, 0.2);
    color: #d0dfff;
}

.parent-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(140, 170, 255, 0.2) transparent;
}

.parent-content::-webkit-scrollbar { width: 6px; }
.parent-content::-webkit-scrollbar-track { background: transparent; }
.parent-content::-webkit-scrollbar-thumb { background: rgba(140, 170, 255, 0.2); border-radius: 3px; }

.parent-section {
    background: linear-gradient(135deg, rgba(35, 45, 75, 0.5), rgba(25, 35, 60, 0.5));
    border: 1px solid rgba(140, 170, 255, 0.1);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 18px;
}

.parent-section h3 {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8a9cc4;
    margin-bottom: 14px;
}

.parent-stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 16px 0;
}

.parent-stat {
    text-align: center;
}

.parent-stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #b8a4f8;
}

.parent-stat-label {
    font-size: 0.7rem;
    color: #8a9cc4;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

.parent-topic-list {
    list-style: none;
    padding: 0;
}

.parent-topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(140, 170, 255, 0.06);
}

.parent-topic-item:last-child {
    border-bottom: none;
}

.parent-topic-name {
    color: #d0d8f0;
    font-size: 0.9rem;
}

.parent-topic-date {
    color: #6a7ca4;
    font-size: 0.75rem;
}

.parent-question-item {
    padding: 10px 0 10px 14px;
    border-left: 2px solid rgba(167, 139, 250, 0.3);
    margin-bottom: 10px;
    color: #c8bef8;
    font-style: italic;
    font-size: 0.9rem;
    line-height: 1.5;
}

.parent-question-topic {
    font-size: 0.7rem;
    color: #6a7ca4;
    font-style: normal;
    margin-top: 4px;
}

.parent-chart-container {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 10px 0;
}

.parent-chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.parent-chart-bar {
    width: 100%;
    max-width: 32px;
    background: linear-gradient(180deg, #a78bfa, #6ec1e4);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
}

.parent-chart-label {
    font-size: 0.55rem;
    color: #6a7ca4;
    text-align: center;
}

.parent-profile-text {
    color: #c8d4f0;
    font-size: 0.95rem;
    line-height: 1.7;
}

.parent-profile-text p {
    margin-bottom: 12px;
}

.parent-profile-loading {
    color: #6a7ca4;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

#teacher-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: linear-gradient(180deg, #0d1225 0%, #141c35 50%, #1a2440 100%);
    flex-direction: column;
    overflow: hidden;
}

#teacher-overlay.visible {
    display: flex;
}

.teacher-header {
    padding: 24px;
    background: linear-gradient(180deg, rgba(13, 18, 37, 0.98) 0%, rgba(13, 18, 37, 0.85) 100%);
    border-bottom: 1px solid rgba(140, 170, 255, 0.15);
    text-align: center;
    position: relative;
}

.teacher-header h2 {
    font-size: 1.3rem;
    letter-spacing: 3px;
    color: #c8d4f0;
    margin-bottom: 4px;
}

.teacher-date {
    position: absolute;
    top: 28px;
    right: 24px;
    font-size: 0.72rem;
    color: #6a7ca4;
    letter-spacing: 0.5px;
}

.teacher-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(140, 170, 255, 0.2) transparent;
}

.teacher-content::-webkit-scrollbar { width: 6px; }
.teacher-content::-webkit-scrollbar-track { background: transparent; }
.teacher-content::-webkit-scrollbar-thumb { background: rgba(140, 170, 255, 0.2); border-radius: 3px; }

.explorer-card {
    background: linear-gradient(135deg, rgba(35, 45, 75, 0.5), rgba(25, 35, 60, 0.5));
    border: 1px solid rgba(140, 170, 255, 0.1);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 18px;
}

.explorer-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.explorer-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.explorer-card-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #c8d4f0;
    letter-spacing: 1px;
}

.explorer-card-meta {
    font-size: 0.72rem;
    color: #6a7ca4;
    margin-left: auto;
    text-align: right;
    line-height: 1.6;
}

.explorer-topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.explorer-topic-tag {
    background: rgba(100, 140, 255, 0.1);
    border: 1px solid rgba(100, 140, 255, 0.2);
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 0.75rem;
    color: #a0b4f0;
}

.explorer-question {
    padding: 10px 0 10px 14px;
    border-left: 2px solid rgba(167, 139, 250, 0.3);
    margin-bottom: 14px;
    color: #c8bef8;
    font-style: italic;
    font-size: 0.88rem;
    line-height: 1.5;
}

.view-report-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(140, 170, 255, 0.25);
    border-radius: 20px;
    background: rgba(100, 140, 255, 0.08);
    color: #a0b4f0;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.view-report-btn:hover {
    background: rgba(100, 140, 255, 0.2);
    color: #d0dfff;
}

.parent-empty {
    color: #4a5578;
    text-align: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

#onboarding-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

#onboarding-overlay.visible {
    display: flex;
    animation: vsOverlayFadeIn 0.6s ease-in forwards;
}

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

.onboarding-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 480px;
    animation: vsOverlayFadeIn 0.4s ease forwards;
}

.onboarding-screen.active {
    display: flex;
}

.onboarding-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.onboarding-prompt {
    font-size: 1.1rem;
    color: #b8aee8;
    letter-spacing: 0.5px;
    margin: 0 0 32px 0;
}

.onboarding-text-input {
    width: 100%;
    max-width: 320px;
    padding: 16px 20px;
    font-size: 1.2rem;
    border-radius: 16px;
    border: 2px solid rgba(110, 193, 228, 0.4);
    background: rgba(15, 20, 40, 0.85);
    color: #e8eeff;
    text-align: center;
    outline: none;
    letter-spacing: 1px;
    margin-bottom: 24px;
    transition: border-color 0.2s;
}

.onboarding-text-input:focus {
    border-color: rgba(167, 139, 250, 0.8);
}

.onboarding-continue-btn {
    padding: 14px 48px;
    border-radius: 28px;
    border: none;
    background: linear-gradient(135deg, #6e8ef0, #a78bfa);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.4;
    pointer-events: none;
}

.onboarding-continue-btn.enabled {
    opacity: 1;
    pointer-events: auto;
}

.onboarding-continue-btn.enabled:hover {
    transform: scale(1.04);
}

.onboarding-skip-btn {
    display: none;
    margin-top: 14px;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: #8fa2cc;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    touch-action: manipulation;
}

#onboarding-overlay.kid-alone .onboarding-skip-btn {
    display: inline-block;
}

.onboarding-skip-btn:hover,
.onboarding-skip-btn:focus-visible {
    color: #d0dfff;
}

.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
    max-width: 380px;
}

.color-dot {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.color-dot:hover {
    transform: scale(1.1);
}

.color-dot.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.5), 0 0 18px rgba(255,255,255,0.25);
    transform: scale(1.12);
}

.color-label {
    font-size: 0.65rem;
    color: #8090b8;
    margin-top: 6px;
    text-align: center;
    letter-spacing: 0.5px;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.age-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
    max-width: 380px;
}

.age-btn {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 2px solid rgba(110, 193, 228, 0.3);
    background: rgba(20, 28, 55, 0.85);
    color: #c8d8f8;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    touch-action: manipulation;
}

.age-btn:hover {
    border-color: rgba(167, 139, 250, 0.6);
    background: rgba(30, 35, 70, 0.9);
}

.age-btn.selected {
    border-color: #a78bfa;
    background: rgba(100, 80, 200, 0.35);
    color: #ffffff;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.35);
    transform: scale(1.08);
}

