/* ═══════════════════════════════════════════════
   Pocket CFO — Unified Design System
   Editorial Style / Light Theme
   Primary: #eca413 | Background: #f8f7f6
   ═══════════════════════════════════════════════ */

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

html, body {
    height: 100%;
}

body {
    font-family: 'Manrope', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f8f7f6;
    color: #1b170d;
}

/* ── Typography ── */
.serif-heading {
    font-family: 'Playfair Display', 'Noto Serif JP', serif;
}

.report-body {
    font-family: 'Noto Serif JP', serif;
    line-height: 1.8;
}

/* ── Editorial Dividers ── */
.editorial-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #eca41333, transparent);
}

/* ── Scrollbar ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Custom Range Slider ── */
input[type=range] {
    -webkit-appearance: none;
    background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #eca413;
    cursor: pointer;
    margin-top: -9px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid #fcfaf8;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #e7dfcf;
    border-radius: 1px;
}

/* ── Editorial Input ── */
.editorial-input:focus {
    outline: none;
    border-bottom-color: #eca413;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════
   Chat Page — Voice Visualizer
   ═══════════════════════════════════════════════ */

.mesh-gradient {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(236, 164, 19, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(236, 164, 19, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(200, 180, 150, 0.05) 0%, transparent 50%),
        #ffffff;
}

/* Concentric ring visualizer */
.visualizer-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.visualizer-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(236, 164, 19, 0.12);
    transition: all 0.6s ease;
    pointer-events: none;
}

.visualizer-ring:nth-child(1) { width: 72px; height: 72px; }
.visualizer-ring:nth-child(2) { width: 108px; height: 108px; }
.visualizer-ring:nth-child(3) { width: 144px; height: 144px; }
.visualizer-ring:nth-child(4) { width: 180px; height: 180px; }

/* Idle */
.voice-idle .visualizer-ring {
    animation: breathe-idle 6s ease-in-out infinite;
}
.voice-idle .visualizer-ring:nth-child(2) { animation-delay: 0.8s; }
.voice-idle .visualizer-ring:nth-child(3) { animation-delay: 1.6s; }
.voice-idle .visualizer-ring:nth-child(4) { animation-delay: 2.4s; }

@keyframes breathe-idle {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.03); opacity: 0.5; }
}

/* Listening */
.voice-listening .visualizer-ring {
    border-color: rgba(236, 164, 19, 0.35);
    animation: pulse-listen 1.5s ease-in-out infinite;
}
.voice-listening .visualizer-ring:nth-child(2) { animation-delay: 0.15s; }
.voice-listening .visualizer-ring:nth-child(3) { animation-delay: 0.3s; }
.voice-listening .visualizer-ring:nth-child(4) { animation-delay: 0.45s; }

@keyframes pulse-listen {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.08); opacity: 0.6; }
}

/* Thinking */
.voice-thinking .visualizer-ring {
    border-color: rgba(236, 164, 19, 0.2);
    border-style: dashed;
    animation: spin-think 4s linear infinite;
}
.voice-thinking .visualizer-ring:nth-child(2) { animation-direction: reverse; animation-duration: 6s; }
.voice-thinking .visualizer-ring:nth-child(3) { animation-duration: 8s; }
.voice-thinking .visualizer-ring:nth-child(4) { animation-direction: reverse; animation-duration: 10s; }

@keyframes spin-think {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Speaking */
.voice-speaking .visualizer-ring {
    border-color: rgba(236, 164, 19, 0.4);
    animation: breathe-speak 2s ease-in-out infinite;
}
.voice-speaking .visualizer-ring:nth-child(2) { animation-delay: 0.2s; }
.voice-speaking .visualizer-ring:nth-child(3) { animation-delay: 0.4s; }
.voice-speaking .visualizer-ring:nth-child(4) { animation-delay: 0.6s; }

@keyframes breathe-speak {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    30% { transform: scale(1.06); opacity: 0.7; }
    60% { transform: scale(0.98); opacity: 0.4; }
}

/* Mic button */
.mic-btn {
    position: relative;
    z-index: 10;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: #eca413;
    color: white;
    box-shadow: 0 4px 20px rgba(236, 164, 19, 0.25);
}
.mic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(236, 164, 19, 0.35);
}
.mic-btn:active { transform: scale(0.95); }
.mic-btn.listening {
    background: #ef4444;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
    animation: mic-pulse 1s ease-in-out infinite;
}

@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 4px 32px rgba(239, 68, 68, 0.5); }
}

/* Voice status text */
.voice-status {
    text-align: center;
    font-size: 0.7rem;
    color: #9a804c;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 10px;
    min-height: 1.2em;
    transition: opacity 0.3s ease;
}

/* ═══════════════════════════════════════════════
   Chat Bubbles
   ═══════════════════════════════════════════════ */
.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 8px;
    font-size: 0.938rem;
    line-height: 1.6;
    animation: fadeInUp 0.3s ease;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-bubble.user {
    background: #eca413;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
    background: #f5f0e6;
    color: #1b170d;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

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

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 4px;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #eca413;
    animation: bounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.32s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════
   Page Transitions
   ═══════════════════════════════════════════════ */
.page-enter {
    animation: pageEnter 0.25s ease;
}

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

/* ═══════════════════════════════════════════════
   Welcome Mesh Blobs
   ═══════════════════════════════════════════════ */
.welcome-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
