/* ==========================================================
   STORY OVERLAY
========================================================== */

.hero .story-overlay {

    position: fixed;

    inset: 0;

    display: flex;

    justify-content: center;

    align-items: center;

    pointer-events: none;

    z-index: 30;

}

.hero .story-caption {

    position: absolute;

    left: 8%;

    top: 50%;

    transform:
        translateY(calc(-50% + 24px));

    width: min(360px, 28vw);

    opacity: 0;

    transition:
        opacity .8s ease,
        transform .8s ease;

}

.hero .story-caption.visible {

    opacity: 1;

    transform:
        translateY(-50%);

}

.hero .extra-instructions {
    margin-top: 10px;

    font-size: .85rem;
    font-style: italic;
    line-height: 1.4;

    color: var(--color-text-light);
}

.hero .story-kicker {

    font-size: .95rem;

    letter-spacing: .2em;

    text-transform: uppercase;

    color: var(--color-text-light);

    margin-bottom: 10px;

}

.hero .story-person {

    font-size: clamp(3rem,
            5vw,
            5.5rem);

    line-height: .95;

    font-weight: 700;

    color: var(--color-text);

    letter-spacing: -.04em;

}

/* ==========================================================
   STORY NAVIGATOR
========================================================== */

.story-nav {

    position: fixed;

    right: 40px;

    top: 50%;

    transform: translateY(-50%);

    display: flex;

    flex-direction: column;

    gap: 18px;

    z-index: 1000;

}

.story-step {

    display: flex;

    align-items: center;

    gap: 12px;

    opacity: .45;

    transition:

        opacity .35s ease,

        transform .35s ease;

}

.story-dot {

    width: 12px;

    height: 12px;

    border-radius: 50%;

    background: #C4B5FD;

    flex-shrink: 0;

}

.story-label {

    font-size: .85rem;

    color: var(--color-text-light);

    white-space: nowrap;

}

.story-step.active {

    opacity: 1;

    transform: translateX(-6px);

}

.story-step.active .story-dot {

    background: var(--color-primary);

    box-shadow:

        0 0 18px rgba(124, 58, 237, .45);

}


/* ==========================================================
   PHONE
========================================================== */

.phone {

    width: 320px;

    height: 640px;

    margin: auto;

    background: #111;

    border-radius: 42px;

    padding: 12px;

    box-shadow: var(--shadow-large);

    position: relative;

}

.phone-notch {

    width: 120px;

    height: 26px;

    background: #000;

    border-radius: 999px;

    position: absolute;

    left: 50%;

    top: 12px;

    transform: translateX(-50%);

    z-index: 10;

}

.phone-screen {

    width: 100%;

    height: 100%;

    background: white;

    border-radius: 32px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    padding: 32px;

}

.profile-image {

    width: 180px;

    height: 180px;

    margin: auto;

    border-radius: 50%;

    background: #ece8ff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 80px;

}

.profile-tags {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;

    justify-content: center;

}

.profile-tags span {

    background: #f3f3f3;

    padding: 10px 16px;

    border-radius: 999px;

    font-size: .9rem;

}

.swipe-actions {

    display: flex;

    justify-content: space-evenly;

    margin-top: 30px;

}

.accept {

    color: #ff3366;

}

.reject {

    color: #888;

}

/* ==========================================================
   DEVICE
========================================================== */

.device {

    width: 330px;

    margin: 0 auto;

    perspective: 1800px;

    position: relative;

    transform:
        rotate(var(--device-rotation, 0deg));

}

.device-glow {

    position: absolute;

    width: 340px;

    height: 340px;

    left: 50%;

    top: 45%;

    transform: translate(-50%, -50%);

    background:

        radial-gradient(rgba(124, 58, 237, .35),

            transparent 70%);

    filter: blur(45px);

    z-index: -1;

}

.device-frame {

    background: linear-gradient(180deg,
            #202020,
            #090909);

    border-radius: 46px;

    padding: 10px;

    border: 1px solid rgba(255, 255, 255, .06);

    box-shadow:

        0 60px 120px rgba(0, 0, 0, .18),

        inset 0 1px rgba(255, 255, 255, .05);

    transition:

        transform .8s var(--ease);

}

.device-screen {

    background: white;

    border-radius: 36px;

    overflow: hidden;

    height: 640px;

    display: flex;

    flex-direction: column;

}

/* ==========================================
   PHONE SCREENS
========================================== */

.phone-screens {

    position: relative;

    flex: 1;

    overflow: hidden;

}

.profile-screen {
    overflow: hidden;
}

.phone-screen {

    position: absolute;

    inset: 0;

    display: flex;

    flex-direction: column;

    opacity: 0;

    pointer-events: none;

    transition:

        opacity .6s ease;

}

.phone-screen.active {

    opacity: 1;

    pointer-events: auto;

}

.device-notch {

    width: 110px;

    height: 24px;

    background: #050505;

    border-radius: 999px;

    margin: 8px auto 12px;

}

.status-bar {

    display: flex;

    justify-content: space-between;

    padding:

        18px 22px;

    font-size: .8rem;

    color: #666;

}

.profile-avatar {

    width: 150px;

    height: 150px;

    margin: 28px auto;

    border-radius: 50%;

    background:

        linear-gradient(135deg,

            #ede9fe,

            #ddd6fe);

    display: flex;

    justify-content: center;

    align-items: center;

    font-size: 72px;

    transition:

        transform .8s cubic-bezier(.22, 1, .36, 1),

        opacity .8s ease;

}

.profile-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.profile-card {

    display: flex;

    flex-direction: column;

    align-items: center;

    text-align: center;

    padding: 24px;

    height: auto;

    min-height: 100%;

    box-sizing: border-box;

    transition: transform 0.05s linear;

}

/*
 * Used only while Scene 1 calculates the fully-expanded
 * height of Emily's profile.
 *
 * Without this, max-height transitions on the photos and
 * prompt can cause JavaScript to measure the card before
 * those sections have reached their final height.
 */

.profile-card:not(.avatar-ready) .profile-avatar {

    opacity: 0;

    transform: scale(.7);

}

.profile-card.profile-measuring,
.profile-card.profile-measuring * {

    transition: none !important;
    animation: none !important;

}

.profile-avatar {

    margin: 24px auto 20px;
}

.profile-name {

    margin-bottom: 6px;
}

.profile-age {

    margin-bottom: 18px;
}

.profile-tags {

    margin-bottom: 20px;
}

.profile-bio {

    max-width: 220px;

    margin: 0 auto;

    color: #666;

    line-height: 1.5;

}

.extra-photo {

    width: 72px;

    height: 72px;

    border-radius: 18px;

    background: #f3f3f3;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 2rem;

    opacity: 0;

    transform: translateY(20px);

    transition: all .6s ease;

}

.profile-prompt {
    opacity: 0;
    transform: translateY(20px);

    max-height: 0;
    margin-top: 0;
    overflow: hidden;

    transition:
        max-height .6s ease,
        margin-top .6s ease,
        opacity .6s ease,
        transform .6s ease;
}

.profile-card.show-prompt .profile-prompt {
    opacity: 1;
    transform: translateY(0);

    max-height: 120px;
    margin-top: 28px;
}

.profile-photos {
    display: flex;
    justify-content: center;
    gap: 12px;

    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;

    transition:
        max-height .6s ease,
        margin-top .6s ease,
        opacity .6s ease;
}

.profile-card.show-photo-1 .profile-photos {
    max-height: 100px;
    margin-top: 20px;
    opacity: 1;
}

.extra-photo {

    width: 70px;

    height: 70px;

    border-radius: 18px;

    background: #f3f3f3;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 2rem;

    transform: translateY(20px);

    opacity: 0;

    transition:
        opacity .6s ease,
        transform .6s ease;

}

.profile-card.show-photo-1 .extra-photo:first-child {

    opacity: 1;

    transform: translateY(0);

}

.profile-card.show-photo-2 .extra-photo:last-child {

    opacity: 1;

    transform: translateY(0);

}

.profile-name {

    font-size: 1.85rem;

    margin-bottom: 4px;

}

.profile-age {

    color: var(--color-text-light);

    margin-bottom: 20px;

}

.profile-tags {

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 10px;

    margin-bottom: 30px;

}

.profile-tags span {

    background: #f5f5f5;

    padding: 8px 14px;

    border-radius: 999px;

    font-size: .85rem;

}

.profile-bio {

    max-width: 220px;

    margin:

        0 auto 40px;

    color: #666;

}

.action-row {

    opacity: 0;
    transform: translateY(30px);

    transition:
        opacity .6s ease,
        transform .6s ease;

    margin-top: 24px;
    padding: 24px 0 28px;
    flex-shrink: 0;
}

.profile-card.show-actions .action-row {
    opacity: 1;
    transform: translateY(0);
}

.reject-btn,
.accept-btn {

    width: 64px;

    height: 64px;

    font-size: 1.5rem;

}

/* ==========================================================
   BUTTON
========================================================== */

.btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 14px 28px;

    border-radius: var(--radius-pill);

    background: var(--color-primary);

    color: white;

    font-weight: 600;

    transition:

        transform .25s,

        box-shadow .25s;

    position: relative;

    overflow: hidden;
}

.btn::before {

    content: "";

    position: absolute;

    inset: 0;

    background:

        linear-gradient(110deg,

            transparent,

            rgba(255, 255, 255, .35),

            transparent);

    transform:

        translateX(-120%);

}

.btn:hover::before {

    transform:

        translateX(120%);

    transition:

        transform .8s;

}

.btn:hover {

    transform: translateY(-3px);

    box-shadow: var(--shadow-medium);
}

/* ==========================================================
   HERO
========================================================== */

.eyebrow {

    color: var(--color-primary);

    font-weight: 700;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.hero h1 {

    font-size: var(--font-size-hero);

    line-height: 1.05;

    max-width: 900px;
}

.hero-subtitle {

    max-width: 700px;

    color: var(--color-text-light);

    font-size: 1.25rem;
}

/* ==========================================================
   HERO BACKGROUND
========================================================== */

.hero {

    position: relative;

    overflow: visible;

}

.hero-background {

    position: absolute;

    inset: 0;

    overflow: hidden;

    pointer-events: none;

}

.blob {

    position: absolute;

    border-radius: 50%;

    filter: blur(120px);

    opacity: .45;

}

.blob-left {

    width: 500px;

    height: 500px;

    background: #7C3AED;

    left: -180px;

    top: 120px;

}

.blob-right {

    width: 420px;

    height: 420px;

    background: #FF9F43;

    right: -150px;

    bottom: 80px;

}

.scroll-indicator {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 12px;

    color: var(--color-text-light);

}

.mouse {

    width: 34px;

    height: 56px;

    border: 2px solid #999;

    border-radius: 999px;

    position: relative;

}

.wheel {

    width: 6px;

    height: 12px;

    border-radius: 999px;

    background: #999;

    position: absolute;

    left: 50%;

    top: 8px;

    transform: translateX(-50%);

    animation:

        scroll-wheel 1.6s infinite;

}

.profile-tags,
.profile-bio,
.profile-prompt {

    opacity: 0;

    transform: translateY(20px);

    transition:
        opacity .5s ease,
        transform .5s ease;

}

.profile-card.show-tags .profile-tags {

    opacity: 1;

    transform: translateY(0);

}

.profile-card.show-bio .profile-bio {

    opacity: 1;
    transform: none;

}

.profile-card.show-actions .action-row {

    opacity: 1;
    transform: none;

}

/* ==========================================================
   SCENE 2 — LIKE EMILY
========================================================== */

.like-result {

    width: 100%;
    height: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 40px 30px;

    opacity: 0;

    transform: translateY(20px);

    transition:
        opacity .7s ease,
        transform .7s ease;

}

.like-result.visible {

    opacity: 1;

    transform: translateY(0);

}

.like-heart {

    width: 86px;

    height: 86px;

    border-radius: 50%;

    background: #fff0f3;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 28px;

    transform: scale(.85);

}

.like-heart span {

    color: #ff3366;

    font-size: 3rem;

    line-height: 1;

}

.like-heart.animate {

    animation:
        like-heart-pop .8s ease forwards;

}

.like-result-kicker {

    color: #ff3366;

    font-size: .75rem;

    font-weight: 700;

    letter-spacing: .14em;

    text-transform: uppercase;

    margin-bottom: 14px;

}

.like-result-heading {

    max-width: 240px;

    margin: 0 0 18px;

    font-size: 1.65rem;

    line-height: 1.2;

}

.like-result-body {

    max-width: 245px;

    margin: 0;

    color: #777;

    font-size: .95rem;

    line-height: 1.65;

}

@keyframes like-heart-pop {

    0% {

        transform: scale(.7);

    }

    45% {

        transform: scale(1.12);

    }

    70% {

        transform: scale(.96);

    }

    100% {

        transform: scale(1);

    }

}

/* ==========================================================
   STORY NARRATIVE
========================================================== */

.story-narrative {

    width: min(460px, 34vw);

    flex: 0 0 auto;

    text-align: left;

    opacity: 0;

    transform: translateY(250px);

    transition:
        opacity 1s ease,
        transform 1s ease;

}

.hero .story-narrative {

    position: fixed;

    top: 50%;

    right: 8%;

    width: min(460px, 34vw);

    transform:
        translateY(calc(-50% + 18px));

    z-index: 30;

}

.hero .story-narrative.visible {

    transform:
        translateY(-50%);

}

.story-narrative.visible {

    opacity: 1;

    transform: translateY(0);

}

.story-narrative-text {

    font-size: clamp(1.5rem,
            2.3vw,
            2.35rem);

    line-height: 1.18;

    font-weight: 600;

    letter-spacing: -.025em;

    color: var(--color-text);

}


/* ==========================================================
   MESSAGE COMPOSER
========================================================== */

.message-composer {

    width: 100%;

    height: 100%;

    padding:
        34px 22px 24px;

    display: flex;

    flex-direction: column;

    background:
        linear-gradient(180deg,
            #ffffff 0%,
            #faf8ff 100%);

}

.composer-header {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 30px;

}

.composer-back {

    font-size: 1.8rem;

    color: #999;

}

.composer-header strong {

    font-size: 1rem;

}

.composer-profile {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 24px;

}

.composer-avatar {

    width: 52px;

    height: 52px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #ede9fe;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 1.8rem;

}

.composer-profile strong,
.composer-profile span {

    display: block;

}

.composer-profile strong {

    margin-bottom: 3px;

}

.composer-profile span {

    font-size: .72rem;

    color: #888;

}

.composer-box {

    flex: 1;

    min-height: 180px;

    border:
        1px solid #e5e7eb;

    border-radius: 18px;

    background: white;

    padding: 18px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, .04);

    position: relative;

}

.composer-input {

    font-size: .92rem;

    line-height: 1.6;

    color: #333;

    text-align: left;

    min-height: 30px;

}

.composer-cursor {

    display: inline-block;

    width: 1px;

    height: 1.05em;

    background: var(--color-primary);

    margin-left: 2px;

    vertical-align: middle;

    animation:
        composer-cursor-blink 1s infinite;

}

.composer-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin-top: 16px;

}

.composer-hint {

    font-size: .72rem;

    color: #999;

}

.composer-send {

    padding:
        10px 18px;

    border-radius: 999px;

    background: var(--color-primary);

    color: white;

    font-size: .8rem;

    font-weight: 600;

    transition:
        opacity .3s ease,
        transform .3s ease;

}

.composer-send:disabled {

    opacity: .35;

}

.message-composer.send-ready .composer-send {
    transform: scale(1.03);
}

.message-composer.sending {

    opacity: .8;

    transform: scale(.98);

    transition:
        opacity .35s ease,
        transform .35s ease;

}

@keyframes composer-cursor-blink {

    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }

}


/* ==========================================================
   EMILY DASHBOARD
========================================================== */

.emily-dashboard {

    width: 100%;

    height: 100%;

    padding:
        34px 22px;

    background:
        linear-gradient(180deg,
            #fff,
            #faf8ff);

}

.emily-header {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 28px;

}

.emily-avatar {

    width: 48px;

    height: 48px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #ede9fe;

    font-size: 1.7rem;

}

.emily-header strong,
.emily-header span {

    display: block;

}

.emily-header strong {

    font-size: .92rem;

}

.emily-header span {

    color: #999;

    font-size: .72rem;

    margin-top: 2px;

}

.emily-stat-card {

    display: flex;

    align-items: center;

    justify-content: space-around;

    padding: 25px 12px;

    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 14px 40px rgba(0, 0, 0, .06);

}

.emily-stat {

    text-align: center;

}

.emily-stat strong,
.emily-stat span {

    display: block;

}

.emily-stat strong {

    font-size: 2rem;

    line-height: 1;

}

.emily-stat span {

    color: #888;

    font-size: .72rem;

    margin-top: 8px;

}

.emily-stat-divider {

    width: 1px;

    height: 42px;

    background: #eee;

}

.emily-inbox-preview {

    margin-top: 22px;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 16px;

    border-radius: 18px;

    background: #f7f5ff;

}

.emily-inbox-preview>span:first-child {

    font-size: 1.4rem;

}

.emily-inbox-preview div {

    flex: 1;

}

.emily-inbox-preview strong,
.emily-inbox-preview small {

    display: block;

}

.emily-inbox-preview strong {

    font-size: .82rem;

}

.emily-inbox-preview small {

    font-size: .7rem;

    color: #999;

}

.preview-arrow {

    color: #aaa;

}


/* ==========================================================
   EMILY INBOX
========================================================== */

.emily-inbox {

    width: 100%;

    height: 100%;

    padding:
        34px 18px 0;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    background: #fff;

}

.inbox-header {

    position: relative;

    z-index: 10;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        0 4px 18px;

    border-bottom:
        1px solid #eee;

    background: #fff;

}

.inbox-header span {

    font-size: 1rem;

    font-weight: 700;

}

.inbox-header strong {

    font-size: .72rem;

    color: #999;

}

.message-list {

    position: relative;

    padding-top: 8px;

    transition:
        transform 1.1s cubic-bezier(.22, 1, .36, 1);

}

.message-viewport {

    position: relative;

    overflow: hidden;

    flex: 1;

    min-height: 0;

}

.incoming-message {

    display: flex;

    gap: 12px;

    padding:
        16px 4px;

    min-height: 88px;

    border-bottom:
        1px solid #f1f1f1;

}

.incoming-avatar {

    width: 38px;

    height: 38px;

    flex-shrink: 0;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f3f3f3;

}

.incoming-copy {

    min-width: 0;

    position: relative;

    padding-right: 10px;

}

.incoming-copy strong {

    display: block;

    font-size: .78rem;

    margin-bottom: 4px;

}

.incoming-copy p {

    margin: 0;

    font-size: .69rem;

    line-height: 1.45;

    color: #777;

}

.incoming-copy span {

    position: absolute;

    right: 0;

    bottom: 0;

    color: #bbb;

    font-weight: 700;

}

.profile-card.show-actions .accept-btn,
.profile-card.show-actions .reject-btn {

    animation:
        action-pulse 1.8s ease-in-out infinite;

}

.profile-card.show-actions .reject-btn {

    animation-delay: .15s;

}

@keyframes action-pulse {

    0%,
    100% {

        transform: scale(1);

    }

    50% {

        transform: scale(1.2);

    }

}

.device-stage {

    width: 100%;

    min-height: 640px;

    position: relative;

    display: flex;

    justify-content: center;

    align-items: flex-start;

}

/* Keep the composer within the available phone screen. */
.message-composer {
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
}

.composer-header,
.composer-profile,
.composer-footer {
    flex-shrink: 0;
}

.composer-profile>div:last-child {
    min-width: 0;
}

.composer-box {
    flex: 1 1 0;
    min-height: 72px;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
}

.composer-input {
    min-height: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* The cursor now flows with the message's last character. */
.composer-input::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -0.12em;
    background: var(--color-primary);
    animation: composer-cursor-blink 1s infinite;
}

.message-composer.message-complete .composer-input::after {
    visibility: hidden;
}

/* ==========================================================
   SCENE 4B — MEET RYAN
========================================================== */

.inbox-screen {
    transition: opacity .6s ease;
}

.inbox-screen.ryan-screen-fading {
    opacity: 0;
    pointer-events: none;
}

.ryan-kicker {
    font-size: .8rem;
    letter-spacing: .2em;
    color: var(--color-text-light);
    margin-bottom: 6px;
}

.ryan-name {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -.04em;
}

.ryan-editor {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    text-align: left;
    background: #faf8ff;
}

.ryan-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 16px;
    background: white;
    border-bottom: 1px solid #eee;
    font-size: .9rem;
    font-weight: 600;
}

.ryan-save-status {
    font-size: .72rem;
    color: #888;
}

.ryan-save-status.saved {
    color: #28805a;
}

.ryan-editor-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 16px 24px;
}

.ryan-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.ryan-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ede9fe;
    font-size: 1.8rem;
}

.ryan-identity strong,
.ryan-identity span {
    display: block;
}

.ryan-identity span {
    font-size: .75rem;
    color: #888;
}

.ryan-field-label {
    margin: 18px 0 9px;
    font-size: .78rem;
    font-weight: 600;
}

.ryan-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ryan-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 8px 4px;
    border-radius: 12px;
    background: #eee9fb;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
}

.ryan-photo.visible {
    opacity: 1;
    transform: translateY(0);
}

.ryan-photo>span {
    font-size: 1.8rem;
}

.ryan-photo small {
    font-size: .6rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.ryan-field {
    min-height: 64px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    font-size: .82rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ryan-field.is-typing::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -0.12em;
    background: var(--color-primary);
    animation: composer-cursor-blink 1s infinite;
}

/* ==========================================================
   RYAN — FEED, MESSAGES AND WAITING
========================================================== */

.ryan-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    text-align: left;
    background: #faf8ff;
}

.ryan-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 16px;
    background: white;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.ryan-panel-header small {
    font-size: .65rem;
    font-weight: 400;
    color: #888;
}

.ryan-muted {
    color: #888;
    font-size: .75rem;
    line-height: 1.5;
}

/* Feed */

.ryan-feed-window {
    flex: 1;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
}

.ryan-feed-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border: 1px solid #eee;
    border-radius: 18px;
    background: white;
    overflow: hidden;
    transition:
        transform .75s ease,
        opacity .75s ease;
}

.ryan-feed-scroll {
    flex: 1;
    min-height: 0;
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ryan-feed-portrait {
    display: grid;
    place-items: center;
    height: 170px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: #eee9fb;
    font-size: 5rem;
}

.ryan-feed-scroll h3 {
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.ryan-feed-prompt {
    margin-top: 24px;
    padding: 16px 0;
    font-size: .84rem;
    line-height: 1.65;
}

.ryan-feed-prompt p {
    margin-top: 8px;
}

.ryan-feed-actions {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-shrink: 0;
    padding: 10px;
    border-top: 1px solid #f1f1f1;
    font-size: 1.8rem;
}

.ryan-feed-actions span:last-child {
    color: var(--color-primary);
}

.ryan-swipe-label {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 5px 10px;
    border: 2px solid currentColor;
    border-radius: 6px;
    background: white;
    font-weight: 700;
    opacity: 0;
}

.swipe-left {
    transform: translateX(-120%) rotate(-12deg);
    opacity: 0;
}

.swipe-right {
    transform: translateX(120%) rotate(12deg);
    opacity: 0;
}

.swipe-left .ryan-swipe-label {
    color: #a45e67;
    opacity: 1;
}

.swipe-right .ryan-swipe-label {
    color: #28805a;
    opacity: 1;
}

/* Personal messages */

.ryan-compose-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
}

.ryan-compose-avatar {
    flex-shrink: 0;
    text-align: center;
    font-size: 2.8rem;
}

.ryan-message-draft {
    flex: 1;
    min-height: 72px;
    padding: 14px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: white;
    font-size: .85rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ryan-message-draft.is-typing::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -0.12em;
    background: var(--color-primary);
    animation: composer-cursor-blink 1s infinite;
}

.ryan-compose-footer {
    flex-shrink: 0;
    padding: 12px 16px;
    text-align: right;
    color: var(--color-primary);
    font-size: .8rem;
}

/* Match */

.ryan-match {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    height: 100%;
    padding: 24px;
    text-align: center;
    background: #f5f0ff;
}

.ryan-match-avatars {
    font-size: 2.5rem;
}

.ryan-match-avatars span {
    color: var(--color-primary);
    font-size: 1.6rem;
}

.ryan-match p {
    color: #777;
    font-size: .85rem;
}

/* Chats and time passing */

.ryan-chat-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.ryan-chat-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 62px;
    align-items: start;
    gap: 8px;
    padding: 18px 12px;
    border-bottom: 1px solid #eee;
    background: white;
    transition:
        background .4s ease,
        transform .5s ease,
        opacity .5s ease;
}

.ryan-chat-avatar {
    font-size: 1.6rem;
}

.ryan-chat-copy {
    min-width: 0;
}

.ryan-chat-copy strong {
    font-size: .85rem;
}

.ryan-chat-copy p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    margin-top: 5px;
    color: #888;
    font-size: .72rem;
    line-height: 1.5;
}

.ryan-chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    color: #999;
}

.ryan-sent-check {
    font-size: .85rem;
}

.ryan-time {
    display: inline-block;
    font-size: .65rem;
    white-space: nowrap;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .3s ease, transform .3s ease;
}

.ryan-time.changing {
    opacity: 0;
    transform: translateY(-6px);
}

.ryan-chat-row.has-reply {
    background: #f0eaff;
}

.ryan-chat-row.has-reply .ryan-chat-copy p {
    color: var(--color-primary);
}

.ryan-chat-row.opening {
    transform: scale(1.025);
    background: #f0eaff;
}

.ryan-chat-row.receding {
    opacity: 0;
    transform: translateY(20px);
}

/* Expanded conversation */

.ryan-thread {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-height: 0;
    padding: 16px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ryan-thread-date {
    align-self: center;
    color: #999;
    font-size: .65rem;
}

.ryan-bubble {
    max-width: 88%;
    flex-shrink: 0;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: .78rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    animation: ryan-bubble-in .35s ease both;
}

.ryan-bubble.outgoing {
    align-self: flex-end;
    background: #eae1fc;
    border-bottom-right-radius: 4px;
}

.ryan-bubble.incoming {
    background: white;
    border: 1px solid #eee;
    border-bottom-left-radius: 4px;
}

.ryan-bubble small {
    display: block;
    margin-top: 3px;
    text-align: right;
    color: #999;
}

.ryan-thread-footer {
    flex-shrink: 0;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: white;
    text-align: right;
    color: #888;
}

@keyframes ryan-bubble-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .ryan-feed-card,
    .ryan-chat-row,
    .ryan-time {
        transition: none;
    }

    .ryan-bubble {
        animation: none;
    }

    .ryan-thread,
    .ryan-feed-scroll {
        scroll-behavior: auto;
    }
}

/* Reflection: briefly recall the crowded inbox. */

.ryan-panel {
    position: relative;
}

.ryan-inbox-reminder {
    position: absolute;
    inset: 0;
    z-index: 5;

    display: flex;
    flex-direction: column;
    min-height: 0;

    background: #faf8ff;

    animation: ryan-reminder-in .6s ease both;
}

.ryan-inbox-reminder.leaving {
    animation: ryan-reminder-out .6s ease both;
}

.ryan-reminder-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;

    padding: 20px 16px;
    background: white;
    border-bottom: 1px solid #eee;
}

.ryan-reminder-header strong {
    font-size: 1rem;
}

.ryan-reminder-header>span {
    color: var(--color-primary);
    font-size: .75rem;
}

.ryan-reminder-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ryan-reminder-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 18px 14px;
    border-bottom: 1px solid #eee;
    background: white;
}

.ryan-reminder-avatar {
    flex-shrink: 0;
    font-size: 1.5rem;
}

.ryan-reminder-message>div {
    min-width: 0;
}

.ryan-reminder-message strong {
    font-size: .8rem;
}

.ryan-reminder-message p {
    margin-top: 5px;
    color: #888;
    font-size: .73rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Reveal each "Maybe…" separately. */

.ryan-maybes {
    display: flex;
    flex-wrap: wrap;
    gap: .15em .3em;
}

.ryan-maybes>span {
    opacity: 0;

    animation:
        ryan-maybe-in .6s ease var(--maybe-delay, 0ms) forwards;
}

@keyframes ryan-reminder-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes ryan-reminder-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes ryan-maybe-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .ryan-inbox-reminder,
    .ryan-inbox-reminder.leaving {
        animation: none;
    }

    .ryan-inbox-reminder.leaving {
        opacity: 0;
    }

    .ryan-maybes>span {
        animation: none;
        opacity: 1;
    }

}

/* ==========================================================
   STORY SHORTCUT
========================================================== */

:root {
    --navbar-main-height: 80px;
}

.navbar {
    height: auto;
}

.navbar>.container {
    height: var(--navbar-main-height);
}

.story-shortcut {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 4px 14px;
    padding: 7px 14px;

    background: #f0eaff;
    border-top: 1px solid rgba(124, 58, 237, .08);
}

.story-shortcut[hidden] {
    display: none;
}

.story-shortcut-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 3px 0;

    color: #6430cc;
    background: transparent;

    font-size: .82rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.story-shortcut-button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.story-shortcut-button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: 3px;
}

.story-shortcut-hint {
    color: #6e657e;
    font-size: .76rem;
    line-height: 1.4;
}

/* Cover the opening hero when jumping before it has faded. */
body.central-story-active .central-story {
    background: var(--color-bg);
}

@media (max-width: 1024px) {

    :root {
        --navbar-main-height: 64px;
    }

    .story-shortcut {
        gap: 3px 9px;
        padding: 4px 10px;
    }

    .story-shortcut-button {
        font-size: .72rem;
    }

    .story-shortcut-hint {
        font-size: .65rem;
    }

}

@media (max-width: 600px) {

    :root {
        --navbar-main-height: 54px;
    }

}

@media (max-width: 390px) {

    :root {
        --navbar-main-height: 52px;
    }

}

/* ==========================================================
   SCENE 3 — REJECTING PROFILES
========================================================== */

.profile-screen.reject-original-exit {
    animation: reject-profile-away .65s ease both;
}

.reject-profile-scene {
    display: flex;
    flex-direction: column;

    height: 100%;
    min-height: 0;

    background: #faf8ff;
    text-align: left;
}

.reject-profile-header {
    flex-shrink: 0;

    padding: 14px 18px;
    border-bottom: 1px solid #eee;

    background: white;
    font-size: .9rem;
    font-weight: 600;
}

.reject-profile-window {
    flex: 1;
    min-height: 0;

    padding: 12px;
    overflow: hidden;
}

.reject-profile-card {
    display: flex;
    flex-direction: column;

    height: 100%;
    min-height: 0;

    border: 1px solid #eee;
    border-radius: 18px;

    background: white;
    overflow: hidden;
}

.reject-profile-card.is-skipped {
    animation: reject-profile-away .65s ease both;
}

.reject-profile-scroll {
    flex: 1;
    min-height: 0;

    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.reject-profile-avatar {
    display: grid;
    place-items: center;

    min-height: 90px;
    height: clamp(90px, 19dvh, 170px);

    margin-bottom: 16px;
    border-radius: 12px;

    background: #eee9fb;
    font-size: 4rem;
}

.reject-profile-name {
    font-size: 1.15rem;
    line-height: 1.3;
}

.reject-profile-location {
    margin-top: 4px;

    color: #888;
    font-size: .75rem;
}

.reject-profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 16px;
}

.reject-profile-tags span {
    padding: 5px 9px;
    border-radius: 999px;

    background: #f4f2f7;
    color: #71677c;

    font-size: .65rem;
}

.reject-profile-bio {
    margin-top: 18px;

    color: #777;
    font-size: .82rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.reject-profile-actions {
    display: flex;
    justify-content: center;
    gap: 36px;

    flex-shrink: 0;

    padding: 10px;
    border-top: 1px solid #f1f1f1;

    font-size: 1.8rem;
}

.reject-profile-actions span:last-child {
    color: var(--color-primary);
}

@keyframes reject-profile-away {
    from {
        opacity: 1;
        transform: translateX(0) rotate(0);
    }

    to {
        opacity: 0;
        transform: translateX(-120%) rotate(-10deg);
    }
}

@media (prefers-reduced-motion: reduce) {

    .profile-screen.reject-original-exit,
    .reject-profile-card.is-skipped {
        animation: none;
        opacity: 0;
    }

}