﻿/* ============================================================
   Simulation V2 â€” Day 0 Case Intro (cinematic overlay)
   ============================================================
   Reusable across all cases. Image slots are present in the
   schema (avatar_url) and CSS is ready to render them â€” but
   defaults to gradient initials if none are provided.
   ============================================================ */

:root {
    --ci-bg: #0b0f1a;
    --ci-bg-2: #111827;
    --ci-card: #1a2233;
    --ci-card-2: #232c40;
    --ci-text: #e6ecf5;
    --ci-text-dim: #94a3b8;
    --ci-text-muted: #64748b;
    --ci-accent: #818cf8;
    --ci-accent-2: #f472b6;
    --ci-slack: #4a154b;
    --ci-slack-bg: #1f1226;
    --ci-email: #1f2937;
    --ci-border: rgba(148, 163, 184, 0.18);
}

/* â”€â”€ Body lock while intro is showing â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body.ci-locked {
    overflow: hidden;
}

/* â”€â”€ Overlay shell â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(129, 140, 248, 0.12), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(244, 114, 182, 0.08), transparent 55%),
        var(--ci-bg);
    color: var(--ci-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: ci-fade-overlay 0.35s ease;
}
.ci-overlay.ci-fade-out { animation: ci-fade-overlay-out 0.2s ease forwards; }

@keyframes ci-fade-overlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ci-fade-overlay-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.ci-stage {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* â”€â”€ Progress dots â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding-top: 0.25rem;
}
.ci-dot {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.25);
    transition: background 0.25s ease;
}
.ci-dot.is-done    { background: rgba(129, 140, 248, 0.55); }
.ci-dot.is-current { background: var(--ci-accent); }

/* â”€â”€ Screen host â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-screen-host {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.25rem;
}
.ci-screen-host.ci-fade-in {
    animation: ci-fade-screen 0.35s ease;
}
@keyframes ci-fade-screen {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ci-screen {
    max-width: 760px;
    margin: 0 auto;
}

.ci-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--ci-accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.ci-screen-title {
    font-size: 1.85rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--ci-text);
    margin: 0 0 1rem;
}

.ci-body {
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--ci-text-dim);
}
.ci-body p:first-child { margin-top: 0; }
.ci-body p:last-child  { margin-bottom: 0; }
.ci-body strong       { color: var(--ci-text); }

/* â”€â”€ Cover screen â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-screen-cover {
    text-align: center;
    padding-top: 3rem;
}
.ci-scene-image {
    display: block;
    width: 100%;
    max-height: 38vh;
    height: auto;
    object-fit: contain;
    margin: 0 auto 1.25rem;
    border-radius: 8px;
}
.ci-cover-stamp {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: rgba(244, 114, 182, 0.12);
    border: 1px solid rgba(244, 114, 182, 0.3);
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ci-accent-2);
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.ci-cover-title {
    font-size: 3rem;
    line-height: 1.05;
    font-weight: 800;
    background: linear-gradient(135deg, #a5b4fc 0%, #f9a8d4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0 0 0.5rem;
}
.ci-cover-subtitle {
    font-size: 1.25rem;
    color: var(--ci-text-dim);
    margin-bottom: 1rem;
}
.ci-cover-tagline {
    font-style: italic;
    color: var(--ci-text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
.ci-cover-body {
    margin-top: 1.25rem;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

/* â”€â”€ Company brief / fact grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0 1.5rem;
}
.ci-fact {
    background: var(--ci-card);
    border: 1px solid var(--ci-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
}
.ci-fact-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ci-text-muted);
    font-weight: 600;
}
.ci-fact-value {
    font-size: 1.1rem;
    color: var(--ci-text);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* â”€â”€ Avatars â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ci-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* â”€â”€ Quote card (generic character message) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-quote-card {
    background: var(--ci-card);
    border: 1px solid var(--ci-border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}
.ci-quote-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.ci-quote-name { font-weight: 700; color: var(--ci-text); }
.ci-quote-role { font-size: 0.85rem; color: var(--ci-text-muted); }
.ci-quote-body {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ci-text);
    font-style: italic;
}

/* â”€â”€ Slack card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-slack-card {
    background: var(--ci-slack-bg);
    border: 1px solid rgba(244, 114, 182, 0.25);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}
.ci-slack-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(244, 114, 182, 0.15);
}
.ci-slack-header > div { flex: 1; min-width: 0; }
.ci-slack-name { font-weight: 700; color: var(--ci-text); }
.ci-slack-role { font-size: 0.78rem; color: var(--ci-text-muted); }
.ci-slack-time { font-size: 0.72rem; color: var(--ci-text-muted); }
.ci-slack-body {
    font-size: 0.97rem;
    line-height: 1.55;
    color: var(--ci-text);
}

/* â”€â”€ Email card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-email-card {
    background: var(--ci-email);
    border: 1px solid var(--ci-border);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}
.ci-email-header {
    background: rgba(0, 0, 0, 0.25);
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--ci-border);
    font-size: 0.85rem;
    color: var(--ci-text-dim);
}
.ci-email-header div { padding: 0.15rem 0; }
.ci-email-body {
    padding: 1.25rem;
    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--ci-text);
    font-family: Georgia, 'Times New Roman', serif;
}

/* â”€â”€ Slack archive (multiple messages) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-slack-archive {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.ci-slack-msg {
    background: var(--ci-slack-bg);
    border: 1px solid rgba(244, 114, 182, 0.18);
    border-radius: 10px;
    padding: 0.85rem 1rem;
}
.ci-slack-msg-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}
.ci-slack-msg-header > div { flex: 1; }
.ci-slack-msg-body {
    font-size: 0.93rem;
    line-height: 1.5;
    color: var(--ci-text);
}
.ci-slack-msg-body em { color: var(--ci-text-dim); }

/* â”€â”€ You screen â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-bullets {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}
.ci-bullets li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    color: var(--ci-text-dim);
    line-height: 1.55;
}
.ci-bullets li::before {
    content: 'â–¸';
    position: absolute;
    left: 0;
    color: var(--ci-accent);
}

/* â”€â”€ Dynamic roster grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-rep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
    margin-top: 1.25rem;
}
.ci-rep-card {
    background: var(--ci-card);
    border: 1px solid var(--ci-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}
.ci-rep-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
}
.ci-rep-name { font-weight: 700; color: var(--ci-text); }
.ci-rep-arch {
    font-size: 0.78rem;
    color: var(--ci-accent);
    margin-top: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ci-rep-tenure {
    font-size: 0.78rem;
    color: var(--ci-text-muted);
    margin-top: 0.15rem;
}
.ci-rep-bio {
    font-size: 0.85rem;
    color: var(--ci-text-dim);
    margin-top: 0.5rem;
    line-height: 1.45;
}
.ci-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--ci-text-muted);
    font-style: italic;
}

/* â”€â”€ Begin CTA â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-screen-cta {
    text-align: center;
    padding-top: 2rem;
}
.ci-cta-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--ci-text);
    margin: 0 0 0.75rem;
}
.ci-cta-body {
    color: var(--ci-text-dim);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto 1.75rem;
}
.ci-begin-btn {
    font-size: 1.1rem;
    padding: 0.85rem 2rem;
}

/* â”€â”€ Controls â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ci-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0 0;
}
.ci-controls > #ci-skip { margin-left: auto; }
.ci-btn {
    border: 1px solid var(--ci-border);
    background: var(--ci-card);
    color: var(--ci-text);
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}
.ci-btn:hover:not(:disabled) { background: var(--ci-card-2); }
.ci-btn:active:not(:disabled) { transform: translateY(1px); }
.ci-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ci-btn-ghost { background: transparent; }
.ci-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.04); }
.ci-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    border-color: transparent;
    color: white;
}
.ci-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #818cf8 0%, #f472b6 100%);
}

/* â”€â”€ Replay-intro link (rendered into header by play-core) â”€â”€ */
.ci-replay-link {
    font-size: 0.82rem;
    color: var(--ci-text-muted, #94a3b8);
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
    cursor: pointer;
}
.ci-replay-link:hover { color: var(--ci-accent, #818cf8); }

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 640px) {
    .ci-stage { padding: 1rem 1rem 0.75rem; }
    .ci-cover-title { font-size: 2.1rem; }
    .ci-screen-title { font-size: 1.5rem; }
    .ci-controls { flex-wrap: wrap; }
    .ci-rep-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .ci-overlay,
    .ci-screen-host.ci-fade-in,
    .ci-overlay.ci-fade-out {
        animation: none !important;
    }
}

/* ============================================================
   Inline narrative cards (rendered INSIDE play view, not the
   overlay). Used by play-core's renderNarrative() to expand
   [[slack:CHARID: ...]] and [[email:CHARID|Subject: ...]]
   mini-syntax embedded in round briefings.
   ============================================================ */

.narr-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.narr-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.82rem;
}
.narr-name { font-weight: 700; color: #e2e8f0; font-size: 0.9rem; }
.narr-role { font-size: 0.74rem; color: #94a3b8; }

.narr-slack {
    background: rgba(74, 21, 75, 0.18);
    border: 1px solid rgba(244, 114, 182, 0.25);
    border-left: 3px solid #f472b6;
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    margin: 0.85rem 0;
}
.narr-slack-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(244, 114, 182, 0.15);
}
.narr-slack-head > div:nth-child(2) { flex: 1; min-width: 0; }
.narr-channel-tag {
    font-size: 0.7rem;
    color: #f472b6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.narr-slack-body {
    font-size: 0.93rem;
    line-height: 1.55;
    color: #e2e8f0;
}

.narr-email {
    background: rgba(31, 41, 55, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-left: 3px solid #818cf8;
    border-radius: 8px;
    margin: 0.85rem 0;
    overflow: hidden;
}
.narr-email-head {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 0.78rem;
    color: #cbd5e1;
}
.narr-email-head div { padding: 0.1rem 0; }
.narr-email-body {
    padding: 0.85rem 0.9rem;
    font-size: 0.93rem;
    line-height: 1.55;
    color: #e2e8f0;
    font-family: Georgia, 'Times New Roman', serif;
}
.narr-email-body p { margin: 0 0 0.6rem; }
.narr-email-body p:last-child { margin-bottom: 0; }

/* ============================================================
   Rep Moments (state-aware sales-team character cards).
   Rendered between team_intro and previous-round results.
   ============================================================ */

.rep-moment-card {
    border-left: 3px solid #818cf8;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(244, 114, 182, 0.03));
}
.rep-moment-card.rep-moment-positive,
.rep-moment-card.rep-moment-celebrate,
.rep-moment-card.rep-moment-closed_big_deal,
.rep-moment-card.rep-moment-ramp_complete {
    border-left-color: #34d399;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.06), rgba(16, 185, 129, 0.02));
}
.rep-moment-card.rep-moment-negative,
.rep-moment-card.rep-moment-frustrated,
.rep-moment-card.rep-moment-quota_overload,
.rep-moment-card.rep-moment-morale_collapse,
.rep-moment-card.rep-moment-peer_quit {
    border-left-color: #f87171;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.06), rgba(244, 63, 94, 0.02));
}
.rep-moment-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
}
.rep-moment-meta { flex: 1; min-width: 0; }
.rep-moment-name { font-weight: 700; color: #e2e8f0; }
.rep-moment-arch {
    font-size: 0.74rem;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.1rem;
}
.rep-moment-tag {
    font-size: 0.68rem;
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.rep-moment-body {
    font-size: 0.97rem;
    line-height: 1.55;
    color: #e2e8f0;
    font-style: italic;
    padding: 0.5rem 0 0.25rem;
}


/* ============================================================
   Inbox (Phase A "aesthetic wrapper")
   ============================================================
   Stack of in-character messages (slack/email/voicemail/memo)
   shown at the top of the briefing column each round. Reuses
   .narr-avatar / .narr-name / .narr-role from above.
   ============================================================ */

.inbox-card {
    border-left: 3px solid #38bdf8;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), rgba(99, 102, 241, 0.02));
}
.inbox-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.inbox-head h3 { margin: 0; }
.inbox-count {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.inbox-stack {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.inbox-msg {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-left: 3px solid #64748b;
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.inbox-msg:hover {
    border-color: rgba(148, 163, 184, 0.32);
}
.inbox-msg-slack     { border-left-color: #a78bfa; }
.inbox-msg-email     { border-left-color: #38bdf8; }
.inbox-msg-voicemail { border-left-color: #fbbf24; }
.inbox-msg-memo      { border-left-color: #94a3b8; }

.inbox-msg-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}
.inbox-msg-meta { flex: 1; min-width: 0; }
.inbox-channel-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    flex-shrink: 0;
}
.inbox-channel-icon { font-size: 0.85rem; }

.inbox-msg-slack     .inbox-channel-tag { color: #c4b5fd; border-color: rgba(167, 139, 250, 0.4); }
.inbox-msg-email     .inbox-channel-tag { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.4); }
.inbox-msg-voicemail .inbox-channel-tag { color: #fcd34d; border-color: rgba(251, 191, 36, 0.4); }
.inbox-msg-memo      .inbox-channel-tag { color: #cbd5e1; border-color: rgba(148, 163, 184, 0.4); }

.inbox-msg-subject {
    font-weight: 700;
    color: #e2e8f0;
    font-size: 0.92rem;
    margin-bottom: 0.3rem;
    line-height: 1.35;
}
.inbox-msg-body {
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.5;
}
.inbox-msg-body p { margin: 0 0 0.5rem; }
.inbox-msg-body p:last-child { margin-bottom: 0; }
.inbox-msg-body strong { color: #f1f5f9; }
.inbox-msg-body em { color: #cbd5e1; }

@media (prefers-reduced-motion: no-preference) {
    .inbox-msg {
        animation: inboxArrive 0.35s ease-out both;
    }
    .inbox-msg:nth-child(1) { animation-delay: 0.05s; }
    .inbox-msg:nth-child(2) { animation-delay: 0.15s; }
    .inbox-msg:nth-child(3) { animation-delay: 0.25s; }
    .inbox-msg:nth-child(4) { animation-delay: 0.35s; }
    .inbox-msg:nth-child(n+5) { animation-delay: 0.45s; }
}
@keyframes inboxArrive {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Channel-native chrome (Phase A polish)
   ============================================================
   Each channel renders distinctly so an email looks like an
   email, a voicemail like a voicemail, a memo like a memo, etc.
   The base .inbox-msg shell still owns the left-tint + arrival
   animation; sub-classes layer channel-specific typography +
   chrome on top.
   ============================================================ */

.inbox-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    margin-bottom: 0.55rem;
}
.inbox-eyebrow-icon { font-size: 0.85rem; letter-spacing: 0; }
.inbox-eyebrow-dot  { color: #475569; font-weight: 400; margin: 0 0.1rem; }
.inbox-eyebrow-time { color: #64748b; font-weight: 500; }
.inbox-eyebrow-handle {
    font-family: 'SF Mono', 'Cascadia Mono', ui-monospace, monospace;
    text-transform: lowercase;
    letter-spacing: 0;
}

/* SLACK ───────────────────────────────────────────────────── */
.inbox-msg-slack {
    background: linear-gradient(180deg, rgba(76, 29, 149, 0.10), rgba(15, 23, 42, 0.55) 60%);
}
.inbox-eyebrow-slack { color: #c4b5fd; }
.inbox-eyebrow-slack .inbox-eyebrow-handle { color: #c4b5fd; }
.inbox-slack-body {
    color: #e2e8f0;
    padding-left: 2.7rem;  /* hangs under the avatar */
    font-size: 0.9rem;
    line-height: 1.5;
}
.inbox-slack-body p:first-child { margin-top: -0.2rem; }

/* EMAIL ───────────────────────────────────────────────────── */
.inbox-msg-email {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.04), rgba(15, 23, 42, 0.55) 70%);
}
.inbox-eyebrow-email { color: #7dd3fc; }
.inbox-email-letterhead {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding-bottom: 0.55rem;
    margin-bottom: 0.6rem;
}
.inbox-email-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.7;
}
.inbox-email-label {
    color: #64748b;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    width: 3.6rem;
    flex-shrink: 0;
}
.inbox-email-val {
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    min-width: 0;
}
.inbox-email-val .narr-avatar {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
}
.inbox-email-from-name { color: #e2e8f0; font-weight: 600; font-size: 0.82rem; }
.inbox-email-from-role { color: #64748b; font-size: 0.74rem; }
.inbox-email-subject {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.005em;
}
.inbox-email-body {
    font-family: ui-serif, Georgia, 'Times New Roman', serif;
    color: #d1d5db;
    line-height: 1.65;
    font-size: 0.9rem;
}

/* VOICEMAIL ───────────────────────────────────────────────── */
.inbox-msg-voicemail {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.06), rgba(15, 23, 42, 0.55) 60%);
}
.inbox-eyebrow-voicemail { color: #fcd34d; }
.inbox-vm-player {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 999px;
    padding: 0.35rem 0.7rem 0.35rem 0.4rem;
    margin: 0.45rem 0 0.55rem;
}
.inbox-vm-play {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    color: #1a1a1a;
    font-size: 0.7rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.25);
}
.inbox-vm-wave {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    height: 22px;
    min-width: 0;
}
.inbox-vm-wave span {
    flex: 1;
    background: linear-gradient(180deg, #fcd34d, #f59e0b);
    border-radius: 2px;
    min-height: 4px;
    opacity: 0.8;
}
.inbox-vm-duration {
    font-family: 'SF Mono', 'Cascadia Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    color: #fcd34d;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.inbox-vm-label {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
    font-style: italic;
}
.inbox-vm-transcript-eyebrow {
    font-size: 0.6rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-align: center;
    margin: 0.2rem 0 0.45rem;
    font-weight: 700;
    position: relative;
}
.inbox-vm-transcript-eyebrow::before,
.inbox-vm-transcript-eyebrow::after {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1px;
    background: rgba(148, 163, 184, 0.25);
    vertical-align: middle;
    margin: 0 0.5rem;
}
.inbox-vm-body {
    font-style: italic;
    color: #d1d5db;
    font-size: 0.88rem;
    line-height: 1.55;
}

/* MEMO ────────────────────────────────────────────────────── */
.inbox-msg-memo {
    background:
        repeating-linear-gradient(180deg, rgba(148, 163, 184, 0.04) 0, rgba(148, 163, 184, 0.04) 24px, transparent 24px, transparent 25px),
        rgba(15, 23, 42, 0.55);
}
.inbox-eyebrow-memo {
    color: #cbd5e1;
    justify-content: center;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    padding: 0.35rem 0;
    letter-spacing: 0.22em;
}
.inbox-memo-letterhead {
    font-family: 'SF Mono', 'Cascadia Mono', ui-monospace, monospace;
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.75;
    margin-top: 0.1rem;
}
.inbox-memo-row { display: flex; gap: 0.5rem; }
.inbox-memo-label {
    color: #94a3b8;
    font-weight: 700;
    width: 3.4rem;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}
.inbox-memo-val { color: #e2e8f0; }
.inbox-memo-divider {
    border-top: 1px dashed rgba(148, 163, 184, 0.32);
    margin: 0.6rem 0;
}
.inbox-memo-body {
    font-family: ui-serif, Georgia, 'Times New Roman', serif;
    color: #d1d5db;
    line-height: 1.65;
    font-size: 0.9rem;
}

/* Subtle waveform breathe — disabled when reduced-motion is on */
@media (prefers-reduced-motion: no-preference) {
    .inbox-vm-wave span {
        animation: vmWaveBreathe 1.6s ease-in-out infinite alternate;
        transform-origin: center;
    }
    .inbox-vm-wave span:nth-child(2n)  { animation-delay: 0.15s; }
    .inbox-vm-wave span:nth-child(3n)  { animation-delay: 0.3s; }
    .inbox-vm-wave span:nth-child(5n)  { animation-delay: 0.45s; }
    .inbox-vm-wave span:nth-child(7n)  { animation-delay: 0.6s; }
}
@keyframes vmWaveBreathe {
    from { transform: scaleY(0.7); opacity: 0.55; }
    to   { transform: scaleY(1.0); opacity: 0.92; }
}
