:root {
    --ink: #24143f;
    --ink-soft: #514660;
    --muted: #7a7187;
    --purple: #6d3df1;
    --purple-dark: #5728df;
    --purple-soft: #eee8ff;
    --lavender: #f7f3ff;
    --lavender-2: #e7dcff;
    --coral: #ff977b;
    --coral-soft: #fff0ea;
    --cream: #fffdf9;
    --surface: #ffffff;
    --line: #e8e1ef;
    --green: #239c66;
    --danger: #b83d56;
    --shadow: 0 18px 45px rgba(67, 39, 99, .10), 0 2px 8px rgba(67, 39, 99, .05);
    --shadow-soft: 0 8px 26px rgba(58, 30, 90, .07);
    --serif: Georgia, "Times New Roman", serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

button,
input,
textarea {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: var(--purple);
    text-decoration: none;
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.section-shell {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 28px;
    line-height: 1;
}

.brand-mark {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--purple);
    border: 1.6px solid currentColor;
    border-radius: 55% 45% 58% 42% / 58% 42% 55% 45%;
    font-family: var(--sans);
    font-size: 27px;
    line-height: 1;
    transform: rotate(-10deg);
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 11px 20px;
    background: transparent;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

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

.button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(109, 61, 241, .28);
    outline-offset: 2px;
}

.button.primary {
    border-color: var(--purple);
    background: linear-gradient(135deg, var(--purple), #7447f5);
    box-shadow: 0 9px 24px rgba(109, 61, 241, .22);
    color: #fff;
}

.button.primary:hover {
    background: linear-gradient(135deg, var(--purple-dark), var(--purple));
    box-shadow: 0 12px 30px rgba(109, 61, 241, .30);
}

.button.outline {
    border-color: var(--purple);
    background: rgba(255, 255, 255, .75);
    color: var(--purple);
}

.button.soft {
    border-color: var(--lavender-2);
    background: var(--purple-soft);
    color: var(--purple-dark);
}

.button.google {
    border-color: var(--line);
    background: #fff;
    box-shadow: var(--shadow-soft);
    color: var(--ink);
}

.button.google .google-mark {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
}

.button.small {
    min-height: 40px;
    padding: 9px 17px;
    border-radius: 9px;
    font-size: 14px;
}

.button.large {
    min-height: 58px;
    padding: 16px 28px;
    font-size: 17px;
}

.button.full {
    width: 100%;
}

.button:disabled {
    cursor: not-allowed;
    filter: grayscale(.2);
    opacity: .6;
    transform: none;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--purple);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .075em;
    line-height: 1.35;
}

.eyebrow.centered,
.centered {
    text-align: center;
}

.section-title {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 500;
    line-height: 1.12;
    text-align: center;
}

.section-intro {
    width: min(720px, 100%);
    margin: 18px auto 40px;
    color: var(--ink-soft);
    font-size: 17px;
    text-align: center;
}

.site-header {
    position: relative;
    z-index: 20;
    display: grid;
    width: min(1320px, calc(100% - 48px));
    min-height: 86px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin: 0 auto;
}

.site-header > .button {
    justify-self: end;
}

.site-header.compact {
    min-height: 76px;
}

.desktop-nav {
    display: flex;
    gap: 48px;
}

.desktop-nav a {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.desktop-nav a:hover {
    color: var(--purple);
}

.landing {
    background:
        radial-gradient(circle at 82% 8%, rgba(255, 179, 157, .20), transparent 24rem),
        radial-gradient(circle at 42% 24%, rgba(214, 198, 255, .20), transparent 25rem),
        var(--cream);
}

.hero {
    display: grid;
    min-height: 685px;
    grid-template-columns: .92fr 1.08fr;
    align-items: center;
    gap: 60px;
    padding: 46px 0 64px;
}

.hero h1 {
    max-width: 600px;
    margin: 0 0 24px;
    font-family: var(--serif);
    font-size: clamp(48px, 5.4vw, 74px);
    font-weight: 500;
    letter-spacing: -.035em;
    line-height: 1.03;
}

.hero-lede {
    max-width: 570px;
    margin: 0 0 28px;
    color: var(--ink-soft);
    font-size: 19px;
    line-height: 1.55;
}

.hero-actions {
    display: grid;
    max-width: 430px;
    gap: 12px;
}

.trust-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 20px 0 12px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
}

.trust-line span:not(:last-child)::after {
    content: "•";
    margin: 0 8px;
    color: var(--purple);
}

.micro-disclaimer {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.hero-visual {
    position: relative;
    min-height: 550px;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(.2px);
}

.orb-coral {
    top: 0;
    right: 2%;
    width: 430px;
    height: 430px;
    background: linear-gradient(150deg, #ffac93, #ffd1c4 70%, rgba(255, 255, 255, .2));
    opacity: .82;
}

.orb-lavender {
    right: 0;
    bottom: 5%;
    width: 530px;
    height: 270px;
    background: radial-gradient(ellipse, rgba(184, 154, 255, .35), rgba(240, 233, 255, .05) 72%);
    transform: rotate(-10deg);
}

.floating-card {
    position: absolute;
    border: 1px solid rgba(74, 45, 99, .10);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.intake-preview {
    top: 80px;
    left: 11%;
    width: min(420px, 80%);
    border-radius: 22px;
    padding: 34px;
}

.preview-progress {
    color: var(--ink-soft);
    font-size: 13px;
}

.preview-progress div {
    height: 6px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #ece8f2;
}

.preview-progress i {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: var(--purple);
}

.intake-preview h2 {
    margin: 27px 0 18px;
    font-size: 22px;
}

.preview-option {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    border: 1px solid #c9b8fb;
    border-radius: 10px;
    padding: 13px 15px;
    font-size: 14px;
}

.preview-option i {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1.5px solid #9984c7;
    border-radius: 50%;
}

.support-note {
    right: 0;
    bottom: 75px;
    display: flex;
    width: min(390px, 76%);
    align-items: center;
    gap: 18px;
    border-radius: 18px;
    padding: 24px;
}

.coach-avatar {
    display: inline-grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), #8b65ff);
    color: #fff;
    font-size: 26px;
}

.support-note strong {
    display: block;
    margin-bottom: 3px;
}

.support-note p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.privacy-note {
    position: absolute;
    right: 26%;
    bottom: 30px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.privacy-note span {
    margin-right: 7px;
    color: var(--purple);
}

.pain-section {
    padding: 54px 0 70px;
    border-top: 1px solid rgba(67, 39, 99, .09);
}

.pain-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    margin-top: 34px;
}

.pain-card {
    display: flex;
    min-height: 176px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    border: 1px solid #e5ddf0;
    border-radius: 20px;
    padding: 22px 14px;
    background: linear-gradient(155deg, #fff, #f7f2ff);
    box-shadow: 0 5px 18px rgba(63, 31, 98, .035);
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.3;
    text-align: center;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pain-card:hover {
    border-color: #bba6f5;
    box-shadow: var(--shadow-soft);
    transform: translateY(-3px);
}

.pain-card span {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 50%;
    background: rgba(238, 232, 255, .8);
    color: var(--purple);
    font-family: var(--sans);
    font-size: 32px;
}

.value-section {
    padding: 70px 0 90px;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.value-card {
    min-height: 300px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 26px;
    background: rgba(255, 255, 255, .78);
    box-shadow: var(--shadow-soft);
}

.value-card .line-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 32px;
}

.line-icon.lavender {
    background: var(--purple-soft);
    color: var(--purple);
}

.line-icon.coral {
    background: var(--coral-soft);
    color: #d96e54;
}

.value-card h3 {
    margin: 22px 0 12px;
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.22;
}

.value-card p {
    margin: 0;
    color: var(--ink-soft);
}

.how-section {
    padding: 70px 0 90px;
    border-top: 1px solid rgba(67, 39, 99, .09);
}

.steps-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin: 46px auto 54px;
}

.steps-row article {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
}

.steps-row article:not(:last-child)::after {
    position: absolute;
    top: 31px;
    right: -38px;
    width: 30px;
    border-top: 2px dotted #c9b8fb;
    content: "";
}

.steps-row article > span {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid #bba6f5;
    border-radius: 50%;
    background: var(--lavender);
    color: var(--purple);
    font-family: var(--serif);
    font-size: 30px;
}

.steps-row h3 {
    margin: 2px 0 5px;
    font-size: 17px;
}

.steps-row p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.product-preview {
    display: grid;
    grid-template-columns: .92fr 1.08fr;
    gap: 28px;
}

.app-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-soft);
}

.plan-preview,
.chat-preview {
    min-height: 490px;
    padding: 30px;
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.card-heading h2,
.card-heading h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
}

.card-heading h3 {
    font-size: 23px;
}

.card-heading > span {
    color: var(--muted);
    font-size: 12px;
}

.timeline-item {
    position: relative;
    margin: 24px 0 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 15px 16px 15px 27px;
}

.timeline-item::before {
    position: absolute;
    top: -28px;
    bottom: -28px;
    left: -17px;
    width: 1px;
    background: #c9b8fb;
    content: "";
}

.timeline-item:first-of-type::before {
    top: 22px;
}

.timeline-item:last-of-type::before {
    bottom: calc(100% - 23px);
}

.timeline-item i {
    position: absolute;
    top: 17px;
    left: -24px;
    width: 15px;
    height: 15px;
    border: 2px solid var(--purple);
    border-radius: 50%;
    background: #fff;
}

.timeline-item.active i {
    box-shadow: inset 0 0 0 3px #fff;
    background: var(--purple);
}

.timeline-item small {
    display: block;
    margin-bottom: 3px;
    color: var(--purple);
    font-weight: 700;
}

.timeline-item strong {
    display: block;
}

.timeline-item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.coin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 10px;
    background: #fff8db;
    color: #6c5500 !important;
    font-size: 12px;
}

.mini-message {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.mini-message > span {
    display: grid;
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    place-items: center;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
}

.mini-message p {
    max-width: 75%;
    margin: 0;
    border-radius: 13px 13px 13px 4px;
    padding: 12px 14px;
    background: var(--purple-soft);
    font-size: 14px;
}

.mini-message.user {
    justify-content: flex-end;
}

.mini-message.user p {
    border-radius: 13px 13px 4px 13px;
    background: linear-gradient(135deg, #fbf8ff, #e9ddff);
}

.mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 24px 0 12px;
}

.mode-row span {
    border: 1px solid #cdbef6;
    border-radius: 8px;
    padding: 6px 9px;
    color: var(--ink-soft);
    font-size: 11px;
}

.fake-composer {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #b7a4ea;
    border-radius: 10px;
    padding: 8px 9px 8px 14px;
    color: var(--muted);
    font-size: 13px;
}

.fake-composer b {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 8px;
    background: var(--purple);
    color: #fff;
}

.cost-note {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.safety-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 88px 0;
    border-top: 1px solid rgba(67, 39, 99, .09);
}

.safety-copy h2 {
    margin: 0 0 18px;
    font-family: var(--serif);
    font-size: 47px;
    font-weight: 500;
}

.safety-copy > p:last-child {
    max-width: 540px;
    color: var(--ink-soft);
    font-size: 17px;
}

.safety-points {
    display: grid;
    gap: 15px;
}

.safety-points p {
    position: relative;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 18px 20px 18px 58px;
    background: rgba(255, 255, 255, .72);
    color: var(--muted);
    font-size: 14px;
}

.safety-points span {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--purple);
    font-size: 24px;
}

.safety-points strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
}

.final-cta {
    display: flex;
    min-height: 170px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 38px;
    overflow: hidden;
    border: 1px solid #d9cbfb;
    border-radius: 22px;
    padding: 30px 70px;
    background:
        radial-gradient(circle at 10% 120%, rgba(255, 163, 137, .35), transparent 16rem),
        linear-gradient(110deg, #fffaf7, #f4edff);
}

.final-cta > div {
    display: flex;
    align-items: center;
    gap: 28px;
}

.final-cta h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 38px;
    font-weight: 500;
    line-height: 1.12;
}

.leaf-art {
    color: #9b88c5;
    font-family: var(--serif);
    font-size: 78px;
    transform: rotate(-20deg);
}

.site-footer {
    display: grid;
    grid-template-columns: 1.3fr .7fr .7fr 1fr;
    gap: 38px;
    padding: 35px 0 24px;
    border-top: 1px solid var(--line);
}

.site-footer .brand {
    font-size: 24px;
}

.site-footer .brand-mark {
    width: 31px;
    height: 31px;
    font-size: 23px;
}

.site-footer p {
    color: var(--muted);
    font-size: 13px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a {
    color: var(--ink-soft);
    font-size: 13px;
}

.footer-trust strong {
    font-size: 13px;
}

.footer-disclaimer {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 11px !important;
    text-align: center;
}

/* Modals and forms */
.modal-backdrop {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    overflow: auto;
    place-items: center;
    padding: 24px;
    background: rgba(27, 14, 48, .54);
    backdrop-filter: blur(9px);
}

.modal {
    position: relative;
    width: min(640px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 24px;
    padding: 36px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(22, 9, 42, .30);
}

.modal-close {
    position: absolute;
    z-index: 3;
    top: 16px;
    right: 18px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--lavender);
    color: var(--ink-soft);
    font-size: 25px;
}

.modal-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 28px;
    font-family: var(--serif);
    font-size: 23px;
}

.modal-brand .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 24px;
}

.modal h2 {
    margin: 0 0 13px;
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 500;
    line-height: 1.14;
}

.modal > p {
    color: var(--ink-soft);
}

.intake-modal {
    width: min(690px, 100%);
}

.intake-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
    color: var(--muted);
    font-size: 13px;
}

.intake-progress > div {
    height: 7px;
    flex: 1;
    overflow: hidden;
    border-radius: 999px;
    background: #eeeaf3;
}

.intake-progress i {
    display: block;
    width: 20%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple), #8e6cff);
    transition: width .25s ease;
}

.intake-step {
    display: none;
}

.intake-step.active {
    display: block;
    animation: fadeSlide .3s ease both;
}

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

.choice-list {
    display: grid;
    gap: 11px;
    margin-top: 25px;
}

.choice-list button {
    position: relative;
    min-height: 57px;
    border: 1px solid #d6c9ee;
    border-radius: 11px;
    padding: 14px 18px 14px 51px;
    background: #fff;
    font-weight: 600;
    text-align: left;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.choice-list button::before {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 18px;
    height: 18px;
    border: 1.5px solid #a897c5;
    border-radius: 50%;
    content: "";
    transform: translateY(-50%);
}

.choice-list button:hover,
.choice-list button.selected {
    border-color: var(--purple);
    background: var(--lavender);
    transform: translateY(-1px);
}

.choice-list button.selected::before {
    border: 5px solid var(--purple);
}

.intake-next {
    width: 100%;
    margin-top: 18px;
}

.intake-step textarea,
.auth-modal input,
.auth-page-card input,
.checkin-modal textarea {
    width: 100%;
    border: 1px solid #d7caeb;
    border-radius: 11px;
    padding: 14px 15px;
    background: #fff;
}

.intake-step textarea {
    min-height: 150px;
    margin-top: 20px;
    resize: vertical;
}

.field-note {
    margin: 8px 0 18px;
    color: var(--muted) !important;
    font-size: 12px;
}

.modal-safety {
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.insight-step {
    text-align: center;
}

.insight-icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #e8f8f0;
    color: var(--green);
    font-size: 28px;
}

.insight-step blockquote {
    margin: 24px 0;
    border-left: 3px solid var(--purple);
    border-radius: 0 10px 10px 0;
    padding: 17px 18px;
    background: var(--lavender);
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 19px;
    font-style: italic;
    text-align: left;
}

.insight-list {
    margin-bottom: 24px;
    text-align: left;
}

.insight-list p {
    margin: 10px 0;
    font-size: 14px;
}

.insight-list span {
    margin-right: 9px;
    color: var(--green);
}

.auth-modal {
    width: min(510px, 100%);
}

.auth-modal > .button.google {
    margin-top: 20px;
}

.google-fast-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 21px 0 8px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 750;
}

.google-fast-label span {
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--purple);
    color: #fff;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-modal > .google-fast-label + .button.google {
    margin-top: 0;
}

.button.google.google-emphasis {
    min-height: 60px;
    justify-content: flex-start;
    border: 2px solid var(--purple);
    padding: 10px 17px;
    box-shadow: 0 10px 28px rgba(109, 61, 241, .18);
}

.button.google.google-emphasis:hover {
    border-color: var(--purple-dark);
    background: #faf8ff;
    box-shadow: 0 13px 32px rgba(109, 61, 241, .25);
}

.google-button-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.2;
}

.google-button-copy strong {
    font: inherit;
    font-weight: 800;
}

.google-button-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 550;
}

.or {
    position: relative;
    margin: 24px 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.or::before {
    position: absolute;
    z-index: 0;
    top: 50%;
    right: 0;
    left: 0;
    border-top: 1px solid var(--line);
    content: "";
}

.or span {
    position: relative;
    z-index: 1;
    padding: 0 12px;
    background: #fff;
}

.auth-modal form {
    display: grid;
    gap: 15px;
}

.auth-modal label:not(.check-label),
.checkin-modal label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.auth-modal label small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.inline-link,
.auth-back {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--purple);
    font-size: 12px;
    font-weight: 700;
}

.auth-back {
    justify-self: center;
    margin-top: 2px;
}

.check-label {
    display: grid;
    grid-template-columns: 19px 1fr;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 12px;
}

.check-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--purple);
}

.form-error {
    min-height: 20px;
    margin: 0;
    color: var(--danger) !important;
    font-size: 12px;
    text-align: center;
}

.form-success {
    margin: 0;
    color: var(--green) !important;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 78% 8%, rgba(255, 179, 157, .20), transparent 24rem),
        radial-gradient(circle at 26% 76%, rgba(214, 198, 255, .28), transparent 27rem),
        var(--cream);
}

.auth-page-main {
    display: grid;
    min-height: calc(100vh - 86px);
    place-items: center;
    padding: 38px 20px 80px;
}

.auth-page-card {
    width: min(520px, 100%);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 40px;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-page-card h1 {
    margin: 0 0 14px;
    font-family: var(--serif);
    font-size: 40px;
    font-weight: 500;
    line-height: 1.1;
}

.auth-page-card > p {
    color: var(--ink-soft);
}

.auth-page-card form {
    display: grid;
    gap: 16px;
    margin-top: 26px;
    text-align: left;
}

.auth-page-card label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
}

.reset-symbol {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--purple-soft);
    color: var(--purple);
    font-size: 25px;
}

.reset-complete h2 {
    margin: 20px 0 10px;
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 500;
}

.reset-invalid {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.toast {
    position: fixed;
    z-index: 2000;
    right: 24px;
    bottom: 24px;
    max-width: min(400px, calc(100% - 48px));
    border: 1px solid #d8cef0;
    border-radius: 13px;
    padding: 14px 18px;
    background: #fff;
    box-shadow: var(--shadow);
    color: var(--ink);
    font-size: 14px;
}

.toast.error {
    border-color: #f0bec9;
    color: #8f2940;
}

/* Authenticated application */
.app-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 6%, rgba(255, 182, 159, .11), transparent 25rem),
        #faf8fd;
}

.app-header {
    position: sticky;
    z-index: 60;
    top: 0;
    display: grid;
    min-height: 76px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 0 max(24px, calc((100vw - 1440px) / 2));
    background: rgba(255, 253, 249, .92);
    backdrop-filter: blur(16px);
}

.app-header .brand {
    font-size: 25px;
}

.app-header .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 23px;
}

.app-nav {
    display: flex;
    gap: 8px;
}

.app-nav a {
    border-radius: 8px;
    padding: 9px 13px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.app-nav a:hover,
.app-nav a.active {
    background: var(--purple-soft);
    color: var(--purple);
}

.app-account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.test-badge {
    border: 1px solid #e2c76a;
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff8dc;
    color: #6d5908;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.coin-balance {
    display: inline-flex;
    height: 40px;
    align-items: center;
    gap: 6px;
    border: 1px solid #eadb9b;
    border-radius: 999px;
    padding: 7px 13px;
    background: #fffaf0;
    color: #725a00;
    font-size: 12px;
}

.coin-balance span {
    color: #efbd20;
}

.buy-coins-button,
.add-coins-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 8px 15px;
    background: var(--purple);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(92, 61, 174, .18);
}

.buy-coins-button span,
.add-coins-button span {
    font-size: 17px;
    line-height: 1;
}

.buy-coins-button:hover,
.add-coins-button:hover {
    background: #4e3198;
}

.avatar-button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
    font-weight: 800;
}

.app-shell {
    display: grid;
    width: min(1440px, 100%);
    grid-template-columns: 270px minmax(0, 1fr);
    margin: 0 auto;
}

.app-sidebar {
    position: sticky;
    top: 76px;
    height: calc(100vh - 76px);
    overflow: auto;
    border-right: 1px solid var(--line);
    padding: 26px 20px 40px;
    background: rgba(255, 253, 249, .63);
}

.sidebar-card {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 18px;
    background: rgba(255, 255, 255, .78);
}

.sidebar-card h2,
.sidebar-card h3 {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.22;
}

.sidebar-card h2 {
    font-size: 23px;
}

.sidebar-card h3 {
    font-size: 19px;
}

.sidebar-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    margin: 16px 0 9px;
    border-radius: 999px;
    background: #ece7f2;
}

.progress-track i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--purple);
    transition: width .3s ease;
}

.text-button,
.danger-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--purple);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.danger-button {
    color: var(--danger);
}

.sidebar-safety {
    padding: 5px 4px;
    color: var(--muted);
    font-size: 10px;
}

.app-content {
    min-width: 0;
    padding: 38px 34px 70px;
}

.welcome-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.welcome-row h1 {
    max-width: 780px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.06;
}

.today-grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 20px;
    margin-bottom: 20px;
}

.today-step,
.current-pattern {
    min-height: 205px;
    padding: 25px;
}

.today-step {
    background:
        radial-gradient(circle at 95% 15%, rgba(255, 161, 135, .20), transparent 10rem),
        #fff;
}

.today-step > p,
.current-pattern > p {
    margin: 24px 0;
    color: var(--ink-soft);
    font-size: 16px;
}

.status-pill {
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--coral-soft);
    color: #a44f3b !important;
    font-size: 10px !important;
    font-weight: 800;
    text-transform: uppercase;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(360px, .82fr) minmax(490px, 1.18fr);
    align-items: start;
    gap: 20px;
}

.plan-card {
    position: sticky;
    top: 96px;
    padding: 26px;
}

.plan-card .card-heading {
    align-items: center;
    margin-bottom: 22px;
}

.plan-card .card-heading h2 {
    font-size: 29px;
}

.action-list {
    display: grid;
    gap: 11px;
}

.plan-action {
    display: grid;
    min-height: 76px;
    grid-template-columns: 24px 1fr;
    align-items: start;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.plan-action input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--purple);
}

.plan-action span {
    color: var(--ink-soft);
    font-size: 14px;
}

.plan-action.completed span {
    color: var(--muted);
    text-decoration: line-through;
}

.skeleton-list div {
    height: 74px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f2eef7, #faf8fd, #f2eef7);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    to { background-position: -200% 0; }
}

.week-details {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 15px;
}

.week-details summary {
    cursor: pointer;
    color: var(--purple);
    font-size: 13px;
    font-weight: 800;
}

.week-details ol {
    display: grid;
    gap: 10px;
    padding-left: 22px;
    color: var(--ink-soft);
    font-size: 13px;
}

.chat-card {
    min-height: 730px;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--line);
    padding: 19px 22px;
}

.chat-wallet-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-chip-button {
    border: 0;
    cursor: pointer;
}

.coin-chip-button > span {
    color: #efbd20;
}

.add-coins-button {
    min-height: 32px;
    padding: 6px 11px;
    box-shadow: none;
    font-size: 11px;
}

.mobile-chat-back,
.latest-message-button,
.add-coins-mobile-label {
    display: none;
}

.coach-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coach-identity .coach-avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 23px;
}

.coach-identity h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
}

.coach-identity p {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.coach-identity p i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}

.mode-selector {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    padding: 12px 18px;
    scrollbar-width: thin;
}

.mode-selector button {
    min-width: max-content;
    border: 1px solid #d4c7ef;
    border-radius: 999px;
    padding: 7px 11px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 700;
}

.mode-selector button.active {
    border-color: var(--purple);
    background: var(--purple-soft);
    color: var(--purple);
}

.next-thread {
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #e8defb;
    padding: 9px 19px;
    background: #fbf9ff;
    font-size: 11px;
}

.next-thread span {
    border-radius: 999px;
    padding: 3px 7px;
    background: var(--purple-soft);
    color: var(--purple);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.next-thread p {
    margin: 0;
    overflow: hidden;
    color: var(--ink-soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.messages {
    display: flex;
    height: 420px;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding: 22px;
    scroll-behavior: smooth;
}

.chat-message {
    display: flex;
    max-width: 84%;
    align-items: flex-end;
    gap: 9px;
}

.chat-message.coach {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    justify-content: flex-end;
}

.chat-message .message-avatar {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
    font-size: 17px;
}

.message-bubble {
    border-radius: 15px 15px 15px 5px;
    padding: 12px 14px;
    background: var(--purple-soft);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.52;
    white-space: pre-wrap;
}

.chat-message.user .message-bubble {
    border: 1px solid #dfd2fa;
    border-radius: 15px 15px 5px 15px;
    background: linear-gradient(135deg, #fff, #f2ecff);
}

.chat-message.safety .message-bubble {
    border: 1px solid #f0c9d1;
    background: #fff5f7;
}

.voice-bubble {
    display: grid;
    min-width: 260px;
    gap: 7px;
}

.voice-bubble audio {
    width: 100%;
    height: 36px;
}

.voice-bubble small {
    color: var(--muted);
    font-size: 10px;
}

.message-loading {
    display: flex;
    align-self: flex-start;
    gap: 5px;
    border-radius: 14px;
    padding: 14px 17px;
    background: var(--purple-soft);
}

.message-loading i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9a7be8;
    animation: bounce 1s infinite alternate;
}

.message-loading i:nth-child(2) { animation-delay: .16s; }
.message-loading i:nth-child(3) { animation-delay: .32s; }

@keyframes bounce {
    to { opacity: .35; transform: translateY(-4px); }
}

.chat-composer {
    display: grid;
    grid-template-columns: 43px 1fr 43px;
    align-items: end;
    gap: 9px;
    margin: 0 18px;
    border: 1px solid #bca9ec;
    border-radius: 13px;
    padding: 8px;
    background: #fff;
}

.chat-composer textarea {
    max-height: 130px;
    min-height: 42px;
    resize: none;
    border: 0;
    padding: 10px 4px;
    outline: 0;
    line-height: 1.4;
}

.record-button,
.send-button {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border: 0;
    border-radius: 10px;
}

.record-button {
    background: var(--lavender);
    color: var(--purple);
    font-size: 21px;
}

.send-button {
    background: var(--purple);
    color: #fff;
    font-size: 20px;
}

.composer-meta {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 6px 21px 16px;
    color: var(--muted);
    font-size: 9px;
}

.recording-panel,
.voice-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 0 18px 10px;
    border: 1px solid #dccdf9;
    border-radius: 13px;
    padding: 12px 14px;
    background: #fbf9ff;
}

.recording-state {
    display: grid;
    grid-template-columns: 10px auto;
    align-items: center;
    gap: 2px 8px;
    font-size: 12px;
}

.recording-state > span:last-child {
    grid-column: 2;
    color: var(--muted);
    font-size: 10px;
}

.recording-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e3455f;
    animation: pulse 1.1s infinite;
}

@keyframes pulse {
    50% { opacity: .35; }
}

.recording-actions,
.voice-preview > div {
    display: flex;
    gap: 8px;
}

.voice-preview audio {
    max-width: 270px;
    height: 36px;
}

.progress-card {
    margin-top: 20px;
    padding: 26px;
}

.mood-history {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.mood-point {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.mood-point strong {
    display: block;
    font-family: var(--serif);
    font-size: 22px;
}

.mood-point span,
.mood-point small {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.empty-state {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 13px;
}

.paywall-modal {
    width: min(1180px, 100%);
    padding: 30px 38px 22px;
    overflow-x: hidden;
    transition: width .2s ease;
}

.paywall-modal.checkout-active {
    width: min(900px, 100%);
}

.paywall-modal .modal-brand {
    margin-bottom: 16px;
}

.paywall-package-step > .eyebrow,
.paywall-package-step > h2,
.paywall-subtitle {
    text-align: center;
}

.paywall-package-step > .eyebrow {
    display: table;
    margin: 0 auto 12px;
    border-radius: 999px;
    padding: 7px 15px;
    background: #f5f1ff;
    color: var(--purple);
    letter-spacing: .08em;
}

.paywall-package-step > h2 {
    margin: 0 0 10px;
    font-size: clamp(36px, 4vw, 52px);
    letter-spacing: -.02em;
}

.paywall-package-step > h2 span {
    display: inline-block;
    color: #8b61ff;
    font-family: var(--sans);
    font-size: .72em;
    transform: translateY(-2px);
}

.paywall-subtitle {
    max-width: 670px;
    margin: 0 auto 18px;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.55;
}

.paywall-balance-summary {
    display: flex;
    width: fit-content;
    min-width: 360px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 26px;
    border: 1px solid #eadb9b;
    border-radius: 999px;
    padding: 10px 19px;
    background: #fffaf0;
    color: #54496a;
    font-size: 13px;
}

.paywall-balance-summary .coin-stack {
    color: #c8951f;
    font-size: 21px;
    line-height: 1;
}

.paywall-balance-summary > span:not(.coin-stack) {
    font-weight: 700;
}

.paywall-balance-summary > span:not(.coin-stack)::after {
    margin-left: 8px;
    color: #a89061;
    content: "·";
}

.paywall-balance-summary strong {
    color: var(--ink);
    white-space: nowrap;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
    margin: 0;
}

.package-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 398px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid #e5def1;
    border-radius: 18px;
    padding: 30px 24px 22px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.package-card:hover {
    border-color: #bca9ec;
    transform: translateY(-2px);
}

.package-card:focus-visible {
    outline: 3px solid rgba(109, 61, 241, .25);
    outline-offset: 3px;
}

.package-card.recommended {
    border: 2px solid var(--purple);
    background: linear-gradient(160deg, #fff 0%, #faf7ff 60%, #f3edff 100%);
}

.package-card.selected {
    border-color: var(--purple);
    box-shadow: 0 18px 40px rgba(90, 47, 201, .13);
}

.package-card.recommended.selected {
    box-shadow: 0 20px 48px rgba(90, 47, 201, .18);
}

.package-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
    transform: translateX(-50%);
    white-space: nowrap;
}

.recommended-label {
    background: linear-gradient(135deg, #7851f4, #5f31e3);
    color: #fff;
    box-shadow: 0 8px 18px rgba(98, 50, 226, .22);
}

.best-value-label {
    background: #eee7ff;
    color: #5f31d8;
}

.package-icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    margin-bottom: 16px;
    border: 1px solid #ded1fb;
    border-radius: 50%;
    background: #faf8ff;
    color: #7449ef;
}

.package-icon svg {
    width: 29px;
    height: 29px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.45;
}

.package-card h3 {
    margin: 0 0 7px;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 500;
    line-height: 1.12;
}

.package-coins {
    color: var(--purple);
    font-size: 16px;
    font-weight: 850;
}

.package-equivalent {
    min-height: 40px;
    margin: 14px 0 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.45;
}

.package-savings {
    width: fit-content;
    min-height: 25px;
    margin-top: 18px;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eee8ff;
    color: #6540d6;
    font-size: 11px;
    font-weight: 800;
}

.package-savings:empty {
    visibility: hidden;
}

.package-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 10px 0 18px;
}

.package-price {
    font-family: var(--serif);
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
}

.package-price-row del {
    color: #8f879b;
    font-size: 14px;
}

.package-choose-button {
    width: 100%;
    min-height: 52px;
    margin-top: auto;
    border-radius: 11px;
    font-size: 14px;
}

.paywall-reassurance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 14px;
    color: #7449ef !important;
    font-size: 13px;
}

.paywall-reassurance span {
    font-size: 20px;
}

.paywall-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid #e7dff3;
    border-radius: 16px;
    background: #fdfcff;
}

.paywall-benefit {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
    padding: 18px 22px;
}

.paywall-benefit + .paywall-benefit {
    border-left: 1px solid #ebe4f4;
}

.benefit-icon {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    place-items: center;
}

.benefit-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.paywall-benefit strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.paywall-benefit p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.paywall-payment-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin: 20px -38px -22px;
    border-top: 1px solid #ece6f2;
    padding: 14px 38px;
    background: #fdfcff;
}

.payment-brand-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.payment-brand-row .payment-brand {
    display: inline-flex;
    min-width: 54px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd6e8;
    border-radius: 6px;
    padding: 5px 8px;
    background: #fff;
}

.payment-brand-row .payment-brand-wide {
    min-width: 70px;
}

.payment-brand-row img {
    display: block;
    max-width: 64px;
    max-height: 23px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.payment-brand-row .payment-brand-wide img {
    max-width: 66px;
}

.secure-footer-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.footer-note-icon {
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    object-fit: contain;
}

.secure-footer-note:last-child {
    text-align: right;
}

/* Checkout step */
.paywall-checkout-step {
    animation: paywall-step-in .22s ease;
}

@keyframes paywall-step-in {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.checkout-step-header {
    display: grid;
    grid-template-columns: 150px 1fr 150px;
    align-items: start;
    gap: 12px;
    margin: 4px 0 22px;
    text-align: center;
}

.checkout-step-header .eyebrow {
    margin-bottom: 6px;
}

.checkout-step-header h2 {
    margin: 0;
    font-size: 34px;
}

.change-package-button {
    justify-self: start;
    border: 0;
    padding: 8px 0;
    background: transparent;
    color: var(--purple);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.checkout-step-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

.checkout-order-summary {
    position: static;
    width: 100%;
    display: block;
    border: 1px solid #d9ccf4;
    border-radius: 17px;
    padding: 22px;
    background: linear-gradient(150deg, #fff, #f4eeff);
    box-shadow: 0 16px 36px rgba(75, 39, 161, .09);
}

.summary-kicker {
    display: block;
    margin-bottom: 15px;
    color: var(--purple);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.summary-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.summary-title-row strong {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 550;
    line-height: 1.12;
}

.summary-title-row b {
    font-family: var(--serif);
    font-size: 26px;
    white-space: nowrap;
}

.summary-coins {
    display: block;
    margin-top: 14px;
    color: var(--purple);
    font-size: 15px;
    font-weight: 850;
}

.checkout-order-summary p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.embedded-checkout-panel {
    min-width: 0;
    border: 1px solid #ebe5f2;
    border-radius: 17px;
    padding: 24px;
    background: #faf9fc;
}

.stripe-checkout-loading {
    display: flex;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.stripe-checkout-loading i {
    width: 22px;
    height: 22px;
    border: 2px solid #d9cff2;
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: stripe-spin .8s linear infinite;
}

@keyframes stripe-spin {
    to { transform: rotate(360deg); }
}

.stripe-or {
    position: relative;
    margin: 18px 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.stripe-or::before {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    border-top: 1px solid var(--line);
    content: "";
}

.stripe-or span {
    position: relative;
    padding: 0 10px;
    background: #faf9fc;
}

#embedded-payment-form {
    display: grid;
    gap: 18px;
}

.stripe-pay-button {
    min-height: 54px;
    font-size: 15px;
}

.checkout-error {
    margin-top: 12px;
}

.checkout-trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px 15px;
    margin-top: 15px;
    color: #665b76;
    font-size: 10px;
}

.checkout-trust-row span::before {
    margin-right: 5px;
    color: var(--purple);
    content: "✓";
}

.secure-payment-note {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.secure-payment-note span {
    color: var(--purple);
}

.checkin-modal input[type="range"] {
    width: 100%;
    accent-color: var(--purple);
}

.checkin-modal form {
    display: grid;
    gap: 22px;
    margin-top: 24px;
}

.checkin-modal output {
    color: var(--purple);
    font-size: 12px;
    font-weight: 600;
}

.urge-modal ol {
    display: grid;
    gap: 11px;
    margin: 24px 0;
    padding-left: 26px;
}

.urge-modal li {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 13px;
    background: var(--lavender);
    color: var(--ink-soft);
}

.account-email {
    margin: -5px 0 24px;
    color: var(--muted);
    font-size: 13px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-block: 1px solid var(--line);
    padding: 18px 0;
}

.settings-row strong {
    display: block;
    margin-bottom: 4px;
}

.settings-row p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.switch {
    position: relative;
    width: 48px;
    height: 27px;
    flex: 0 0 48px;
}

.switch input {
    position: absolute;
    opacity: 0;
}

.switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d8d1df;
    transition: background .2s ease;
}

.switch span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    content: "";
    transition: transform .2s ease;
}

.switch input:checked + span {
    background: var(--purple);
}

.switch input:checked + span::after {
    transform: translateX(21px);
}

.settings-links {
    display: flex;
    gap: 18px;
    margin: 20px 0;
    font-size: 12px;
}

.settings-modal > .button,
.settings-modal > .danger-button,
.settings-modal > .logout-button {
    margin-top: 12px;
}

.settings-modal > .danger-button,
.settings-modal > .logout-button {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
}

.safety-overlay {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(27, 14, 48, .72);
    backdrop-filter: blur(10px);
}

.safety-overlay section {
    width: min(500px, 100%);
    border-radius: 22px;
    padding: 34px;
    background: #fff;
    text-align: center;
}

.safety-symbol {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #fff1f4;
    color: var(--danger);
    font-size: 32px;
}

.safety-overlay h2 {
    margin: 0 0 12px;
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 500;
}

.safety-overlay p {
    color: var(--ink-soft);
}

.safety-overlay .button {
    margin-top: 10px;
}

/* Legal and simple pages */
.legal-page,
.legal-summary {
    margin: 24px 0 30px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    background: #fff;
    color: var(--ink-soft);
    line-height: 1.65;
}

.legal-summary a,
.legal-links a,
.footer-trust a {
    color: var(--purple);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 30px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
    font-size: 14px;
}

.simple-page {
    min-height: 100vh;
    background: #fbf9ff;
}

.legal-shell {
    width: min(780px, calc(100% - 40px));
    margin: 50px auto 100px;
}

.legal-shell h1,
.simple-card h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(42px, 6vw, 64px);
    font-weight: 500;
}

.legal-updated {
    color: var(--muted);
}

.legal-notice {
    margin: 30px 0;
    border: 1px solid #e3cc83;
    border-radius: 12px;
    padding: 15px;
    background: #fff9e6;
    color: #67530e;
    font-size: 13px;
}

.legal-shell section {
    border-top: 1px solid var(--line);
    padding: 22px 0;
}

.legal-shell section h2 {
    margin: 0 0 8px;
    font-family: var(--serif);
    font-size: 25px;
    font-weight: 500;
}

.legal-shell section p {
    margin: 0;
    color: var(--ink-soft);
}

.legal-summary {
    margin: 24px 0 30px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    background: #fff;
    color: var(--ink-soft);
    line-height: 1.65;
}

.legal-summary a,
.legal-links a,
.footer-trust a {
    color: var(--purple);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 30px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
    font-size: 14px;
}

.simple-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.simple-card {
    width: min(560px, 100%);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 36px;
    background: #fff;
    box-shadow: var(--shadow);
}

.simple-card h1 {
    margin-top: 32px;
    font-size: 43px;
}

.simple-card p {
    color: var(--ink-soft);
}

@media (max-width: 1180px) {
    .pain-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .plan-card {
        position: static;
    }

    .app-shell {
        grid-template-columns: 230px minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .desktop-nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 55px;
    }

    .hero-copy {
        position: relative;
        z-index: 2;
    }

    .hero-visual {
        min-height: 500px;
    }

    .steps-row {
        gap: 24px;
    }

    .steps-row article {
        grid-template-columns: 52px 1fr;
    }

    .steps-row article:not(:last-child)::after {
        display: none;
    }

    .steps-row article > span {
        width: 48px;
        height: 48px;
        font-size: 25px;
    }

    .product-preview {
        grid-template-columns: 1fr;
    }

    .safety-section {
        gap: 40px;
    }

    .final-cta {
        padding: 30px 36px;
    }

    .site-footer {
        grid-template-columns: 1.2fr .8fr .8fr;
    }

    .footer-trust {
        grid-column: 1 / -1;
    }

    .app-header {
        grid-template-columns: 1fr auto;
    }

    .app-nav {
        position: fixed;
        z-index: 70;
        right: 0;
        bottom: 0;
        left: 0;
        justify-content: space-around;
        border-top: 1px solid var(--line);
        padding: 8px 6px max(8px, env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(14px);
    }

    .app-nav a {
        padding: 8px;
        font-size: 11px;
    }

    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: static;
        display: grid;
        height: auto;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 18px;
    }

    .sidebar-card {
        margin: 0;
    }

    .sidebar-safety {
        grid-column: 1 / -1;
    }

    .app-content {
        padding: 28px 18px 100px;
    }

    .paywall-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .section-shell,
    .site-header {
        width: min(100% - 28px, 1180px);
    }

    .site-header {
        min-height: 72px;
    }

    .site-header .brand {
        font-size: 24px;
    }

    .hero {
        min-height: auto;
        padding: 34px 0 30px;
    }

    .hero h1 {
        font-size: clamp(43px, 12vw, 58px);
    }

    .hero-lede {
        font-size: 17px;
    }

    .hero-actions {
        max-width: none;
    }

    .hero-visual {
        min-height: 420px;
    }

    .orb-coral {
        width: 280px;
        height: 280px;
    }

    .orb-lavender {
        width: 100%;
    }

    .intake-preview {
        top: 35px;
        left: 0;
        width: 88%;
        padding: 23px;
    }

    .support-note {
        right: 0;
        bottom: 32px;
        width: 86%;
        padding: 17px;
    }

    .privacy-note {
        display: none;
    }

    .pain-section,
    .value-section,
    .how-section,
    .safety-section {
        padding-top: 55px;
        padding-bottom: 55px;
    }

    .pain-grid,
    .value-grid,
    .steps-row,
    .safety-section {
        grid-template-columns: 1fr;
    }

    .pain-grid {
        gap: 10px;
    }

    .pain-card {
        min-height: 88px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 14px;
        text-align: left;
    }

    .pain-card span {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
        font-size: 27px;
    }

    .value-card {
        min-height: auto;
    }

    .steps-row {
        margin-top: 35px;
    }

    .product-preview {
        margin-inline: -5px;
    }

    .plan-preview,
    .chat-preview {
        min-height: auto;
        padding: 20px;
    }

    .safety-section {
        gap: 25px;
    }

    .safety-copy h2 {
        font-size: 38px;
    }

    .final-cta {
        flex-direction: column;
        align-items: stretch;
        padding: 28px 22px;
    }

    .final-cta > div {
        gap: 15px;
    }

    .leaf-art {
        display: none;
    }

    .final-cta h2 {
        font-size: 32px;
    }

    .site-footer {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer > div:first-child,
    .footer-trust {
        grid-column: 1 / -1;
    }

    .modal-backdrop {
        align-items: end;
        padding: 0;
    }

    .modal {
        width: 100%;
        max-height: 94vh;
        border-radius: 24px 24px 0 0;
        padding: 28px 20px calc(25px + env(safe-area-inset-bottom));
    }

    .auth-modal input:not([type="checkbox"]),
    .auth-page-card input:not([type="checkbox"]) {
        font-size: 16px;
    }

    .modal h2 {
        font-size: 31px;
    }

    .choice-list button {
        min-height: 54px;
    }

    .app-header {
        min-height: 66px;
        padding: 0 14px;
    }

    .app-header .brand {
        font-size: 22px;
    }

    .test-badge {
        display: none;
    }

    .coin-balance {
        padding: 6px 10px;
    }

    .buy-coins-button {
        min-height: 36px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .avatar-button {
        width: 36px;
        height: 36px;
    }

    .app-sidebar {
        display: block;
        padding: 14px;
    }

    .app-sidebar .sidebar-card:not(.focus-card),
    .sidebar-safety {
        display: none;
    }

    .focus-card {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 4px 14px;
    }

    .focus-card .eyebrow {
        grid-column: 1 / -1;
    }

    .focus-card h2 {
        margin: 0;
        font-size: 19px;
    }

    .focus-card .progress-track {
        width: 80px;
        margin: 0;
    }

    .focus-card > p:last-child {
        grid-column: 2;
        margin: 0;
    }

    .welcome-row {
        align-items: stretch;
        flex-direction: column;
    }

    .welcome-row h1 {
        font-size: 38px;
    }

    .today-grid {
        grid-template-columns: 1fr;
    }

    .today-step,
    .current-pattern,
    .plan-card,
    .progress-card {
        padding: 20px;
    }

    .workspace-grid {
        display: flex;
        flex-direction: column;
    }

    .chat-card {
        width: 100%;
        min-height: 680px;
    }

    .messages {
        height: 390px;
        padding: 17px;
    }

    .chat-message {
        max-width: 93%;
    }

    .voice-bubble {
        min-width: 210px;
    }

    .chat-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-wallet-actions {
        width: 100%;
        justify-content: space-between;
    }

    .add-coins-button {
        flex: 0 0 auto;
    }

    .recording-panel,
    .voice-preview {
        align-items: stretch;
        flex-direction: column;
    }

    .voice-preview audio {
        max-width: none;
        width: 100%;
    }

    .composer-meta {
        justify-content: space-between;
    }

    .paywall-modal,
    .paywall-modal.checkout-active {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
        padding: max(17px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
    }

    .paywall-modal .modal-close {
        top: max(10px, env(safe-area-inset-top));
        right: 10px;
    }

    .paywall-modal .modal-brand {
        margin-bottom: 16px;
        font-size: 21px;
    }

    .paywall-package-step > .eyebrow {
        max-width: calc(100% - 20px);
        margin-bottom: 10px;
        padding: 6px 11px;
        font-size: 9px;
        text-align: center;
    }

    .paywall-package-step > h2 {
        margin-bottom: 8px;
        padding: 0 8px;
        font-size: 34px;
    }

    .paywall-subtitle {
        margin-bottom: 16px;
        padding: 0 6px;
        font-size: 13px;
    }

    .paywall-balance-summary {
        min-width: 0;
        margin-bottom: 24px;
        padding: 9px 15px;
        font-size: 12px;
    }

    .package-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .package-card,
    .package-card.recommended {
        min-height: 0;
        padding: 21px 18px 17px;
        transform: none;
    }

    .package-card:hover {
        transform: none;
    }

    .package-card {
        display: grid;
        grid-template-columns: 44px 1fr auto;
        grid-template-areas:
            "icon title price"
            "icon coins price"
            "equiv equiv equiv"
            "save save save"
            "button button button";
        align-items: center;
        column-gap: 12px;
    }

    .package-icon {
        width: 44px;
        height: 44px;
        grid-area: icon;
        margin: 0;
    }

    .package-icon svg {
        width: 25px;
        height: 25px;
    }

    .package-card h3 {
        grid-area: title;
        margin: 0 0 3px;
        font-size: 20px;
    }

    .package-coins {
        grid-area: coins;
        font-size: 13px;
    }

    .package-equivalent {
        min-height: 0;
        grid-area: equiv;
        margin: 13px 0 0;
        font-size: 11px;
    }

    .package-savings {
        grid-area: save;
        margin-top: 10px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .package-price-row {
        display: grid;
        grid-area: price;
        justify-items: end;
        gap: 3px;
        margin: 0;
    }

    .package-price {
        font-size: 28px;
    }

    .package-price-row del {
        font-size: 11px;
    }

    .package-choose-button {
        min-height: 48px;
        grid-area: button;
        margin-top: 14px;
    }

    .package-badge {
        top: -10px;
        left: auto;
        right: 12px;
        padding: 5px 9px;
        font-size: 8px;
        transform: none;
    }

    .paywall-reassurance {
        margin: 14px 0;
        font-size: 12px;
    }

    .paywall-benefits {
        grid-template-columns: 1fr;
    }

    .paywall-benefit {
        padding: 14px 16px;
    }

    .paywall-benefit + .paywall-benefit {
        border-top: 1px solid #ebe4f4;
        border-left: 0;
    }

    .benefit-icon {
        width: 44px;
        height: 44px;
    }

    .paywall-payment-footer {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 16px -16px -18px;
        padding: 14px 16px max(14px, env(safe-area-inset-bottom));
        text-align: center;
    }

    .secure-footer-note {
        justify-content: center;
        white-space: normal;
    }

    .secure-footer-note:last-child {
        text-align: center;
    }

    .paywall-payment-footer .secure-footer-note:last-child {
        display: none;
    }

    .checkout-step-header {
        grid-template-columns: 1fr;
        gap: 2px;
        margin: 2px 0 16px;
        text-align: left;
    }

    .checkout-step-header > span {
        display: none;
    }

    .checkout-step-header .change-package-button {
        grid-row: 1;
        margin-bottom: 5px;
    }

    .checkout-step-header > div {
        grid-row: 2;
    }

    .checkout-step-header .eyebrow {
        display: none;
    }

    .checkout-step-header h2 {
        font-size: 30px;
    }

    .checkout-step-layout {
        display: flex;
        min-height: 0;
        flex-direction: column;
        gap: 14px;
        max-width: none;
        margin: 0;
    }

    .checkout-order-summary {
        position: static;
        width: 100%;
        padding: 16px 18px;
    }

    .summary-kicker {
        margin-bottom: 8px;
        font-size: 9px;
    }

    .summary-title-row strong {
        font-size: 21px;
    }

    .summary-title-row b {
        font-size: 23px;
    }

    .summary-coins {
        margin-top: 8px;
        font-size: 13px;
    }

    .checkout-order-summary p {
        margin-top: 4px;
        font-size: 10px;
    }

    .embedded-checkout-panel {
        width: 100%;
        min-height: 0;
        flex: 1;
        border-radius: 16px;
        padding: 17px 14px;
        background: #fff;
    }

    #express-checkout-element {
        min-height: 0;
    }

    .stripe-checkout-loading {
        min-height: 88px;
    }

    .checkout-trust-row {
        gap: 5px 10px;
    }

    .auth-page-card {
        padding: 32px 22px;
    }

    .auth-page-card h1 {
        font-size: 34px;
    }

    .settings-links {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .app-account {
        gap: 7px;
    }

    .app-account > .coin-balance {
        display: none;
    }

    .buy-coins-button {
        padding-inline: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* Recovery space: plan-first onboarding and conversation-led dashboard */

body.plan-generating {
    overflow: hidden;
}

.plan-generation-overlay {
    position: fixed;
    z-index: 200;
    inset: 0;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 24px;
    background: rgba(248, 245, 255, .72);
    backdrop-filter: blur(18px) saturate(.9);
    -webkit-backdrop-filter: blur(18px) saturate(.9);
}

.plan-generation-card {
    width: min(560px, 100%);
    border: 1px solid rgba(109, 61, 241, .15);
    border-radius: 28px;
    padding: 34px 38px 30px;
    background:
        radial-gradient(circle at 90% 0, rgba(255, 151, 123, .15), transparent 12rem),
        radial-gradient(circle at 0 100%, rgba(109, 61, 241, .12), transparent 14rem),
        rgba(255, 255, 255, .96);
    box-shadow: 0 32px 90px rgba(57, 28, 96, .22);
    text-align: center;
}

.plan-generation-card .modal-brand {
    justify-content: center;
}

.plan-generation-symbol {
    position: relative;
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    margin: 26px auto 22px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f4efff, #fff);
    color: var(--purple);
    box-shadow: 0 12px 30px rgba(109, 61, 241, .18);
}

.plan-generation-symbol::before,
.plan-generation-symbol::after {
    position: absolute;
    border: 2px solid transparent;
    border-top-color: var(--purple);
    border-right-color: rgba(255, 151, 123, .8);
    border-radius: 50%;
    content: "";
    inset: -8px;
    animation: plan-orbit 2.2s linear infinite;
}

.plan-generation-symbol::after {
    border-top-color: rgba(109, 61, 241, .25);
    border-right-color: transparent;
    inset: 7px;
    animation-direction: reverse;
    animation-duration: 1.7s;
}

.plan-generation-symbol span {
    font-size: 37px;
    line-height: 1;
    transform: rotate(-8deg);
}

@keyframes plan-orbit {
    to { transform: rotate(360deg); }
}

.plan-generation-card h1 {
    margin: 8px 0 10px;
    font-family: var(--serif);
    font-size: clamp(34px, 5vw, 46px);
    font-weight: 500;
    letter-spacing: -.025em;
    line-height: 1.05;
}

.plan-generation-copy {
    max-width: 450px;
    margin: 0 auto 25px;
    color: var(--ink-soft);
    font-size: 15px;
}

.plan-generation-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #ede7f7;
    box-shadow: inset 0 1px 2px rgba(50, 25, 80, .08);
}

.plan-generation-progress i {
    display: block;
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple), #9b75ff, var(--coral));
    box-shadow: 0 0 16px rgba(109, 61, 241, .38);
    transition: width .32s ease;
}

.plan-generation-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 1px 18px;
    color: var(--muted);
    font-size: 12px;
}

.plan-generation-status strong {
    color: var(--ink-soft);
    text-align: left;
}

.plan-generation-steps {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    color: #a29aa9;
    font-size: 12px;
    list-style: none;
    text-align: left;
}

.plan-generation-steps li {
    position: relative;
    padding-left: 23px;
    transition: color .2s ease;
}

.plan-generation-steps li::before {
    position: absolute;
    top: .42em;
    left: 2px;
    width: 8px;
    height: 8px;
    border: 1px solid #cfc6d7;
    border-radius: 50%;
    background: #fff;
    content: "";
}

.plan-generation-steps li.active {
    color: var(--purple);
    font-weight: 800;
}

.plan-generation-steps li.active::before {
    border-color: var(--purple);
    background: var(--purple);
    box-shadow: 0 0 0 4px var(--purple-soft);
}

.plan-generation-steps li.complete {
    color: var(--ink-soft);
}

.plan-generation-steps li.complete::before {
    border-color: var(--green);
    background: var(--green);
    box-shadow: inset 0 0 0 2px #fff;
}

.plan-generation-card > .button {
    margin-top: 22px;
}

.plan-generation-overlay.is-ready .plan-generation-symbol::before,
.plan-generation-overlay.is-ready .plan-generation-symbol::after,
.plan-generation-overlay.has-error .plan-generation-symbol::before,
.plan-generation-overlay.has-error .plan-generation-symbol::after {
    animation: none;
}

.plan-generation-overlay.is-ready .plan-generation-symbol {
    background: #eaf8f1;
    color: var(--green);
}

.plan-generation-overlay.has-error .plan-generation-symbol {
    background: #fff2f4;
    color: var(--danger);
}

.redesigned-app.app-shell {
    display: block;
    width: min(1280px, 100%);
}

.redesigned-app .app-content {
    padding: 34px 32px 76px;
}

.plan-ready-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 34px;
    margin-bottom: 22px;
    border: 1px solid rgba(109, 61, 241, .16);
    border-radius: 27px;
    padding: 34px 37px;
    background:
        radial-gradient(circle at 92% 15%, rgba(255, 151, 123, .18), transparent 15rem),
        radial-gradient(circle at 10% 120%, rgba(109, 61, 241, .12), transparent 18rem),
        #fff;
    box-shadow: var(--shadow-soft);
}

.plan-ready-hero h1 {
    max-width: 760px;
    margin: 5px 0 12px;
    font-family: var(--serif);
    font-size: clamp(38px, 4.5vw, 55px);
    font-weight: 500;
    letter-spacing: -.03em;
    line-height: 1.04;
}

.plan-ready-hero > div:first-child > p:not(.eyebrow) {
    max-width: 720px;
    margin: 0;
    color: var(--ink-soft);
    font-size: 16px;
}

.current-focus-pill {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    border: 1px solid #ddd1f8;
    border-radius: 999px;
    padding: 8px 13px;
    background: rgba(247, 243, 255, .78);
    font-size: 12px;
}

.current-focus-pill span {
    color: var(--purple);
    font-weight: 800;
}

.current-focus-pill strong {
    overflow: hidden;
    color: var(--ink-soft);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-ready-actions {
    display: grid;
    min-width: 195px;
    gap: 10px;
}

.conversation-first-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, .72fr);
    align-items: start;
    gap: 22px;
}

.conversation-first-grid .chat-card {
    min-height: 0;
}

.chat-purpose {
    margin: 0;
    border-bottom: 1px solid #eee8f4;
    padding: 11px 21px;
    background: #fcfaff;
    color: var(--muted);
    font-size: 12px;
}

.conversation-first-grid .messages {
    height: 390px;
    min-height: 390px;
}

.starter-replies {
    border-top: 1px solid #f0ebf5;
    padding: 12px 18px 13px;
    background: linear-gradient(180deg, #fff, #fcfaff);
}

.starter-replies > span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.starter-replies > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.starter-replies button {
    min-height: 34px;
    border: 1px solid #d9cef3;
    border-radius: 999px;
    padding: 7px 11px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
}

.starter-replies button:hover {
    border-color: var(--purple);
    background: var(--purple-soft);
    color: var(--purple);
}

.today-plan-card {
    position: sticky;
    top: 94px;
    padding: 24px;
}

.today-plan-card .card-heading {
    align-items: center;
    margin-bottom: 17px;
}

.today-plan-card .card-heading h2 {
    margin-top: 2px;
    font-size: 27px;
}

.today-plan-card .card-heading > span {
    color: var(--purple);
    font-size: 11px;
    font-weight: 800;
}

.first-plan-step {
    margin-bottom: 11px;
    border: 1px solid #f3d5ca;
    border-radius: 15px;
    padding: 17px;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 151, 123, .18), transparent 8rem),
        #fffaf8;
}

.first-plan-step p {
    margin: 13px 0 15px;
    color: var(--ink-soft);
    font-size: 14px;
}

.first-plan-step .button {
    width: 100%;
}

.today-plan-card .plan-action {
    min-height: 0;
    padding: 13px;
}

.why-plan-details {
    margin-top: 15px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.why-plan-details summary {
    cursor: pointer;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.why-plan-details p {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.view-plan-inline {
    margin-top: 15px;
}

.tools-section {
    margin-top: 28px;
}

.section-heading {
    margin-bottom: 13px;
}

.section-heading h2 {
    margin: 2px 0 0;
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 500;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tool-card {
    display: grid;
    grid-template-columns: 45px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.tool-symbol {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border-radius: 13px;
    background: var(--purple-soft);
    color: var(--purple);
    font-size: 22px;
}

.tool-card h3 {
    margin: 0 0 3px;
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 500;
}

.tool-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.dashboard-safety {
    max-width: 820px;
    margin: 14px 2px 0;
    color: var(--muted);
    font-size: 10px;
}

.redesigned-app .progress-card {
    margin-top: 22px;
}

.full-plan-modal {
    width: min(680px, 100%);
}

.full-plan-insight {
    margin: 0 0 16px;
    color: var(--ink-soft);
}

.full-plan-focus {
    display: grid;
    gap: 3px;
    margin-bottom: 18px;
    border-left: 3px solid var(--purple);
    padding: 10px 13px;
    background: var(--lavender);
}

.full-plan-focus span {
    color: var(--purple);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.full-plan-list {
    display: grid;
    gap: 9px;
    margin: 0 0 22px;
    padding-left: 22px;
}

.full-plan-list li {
    border-bottom: 1px solid var(--line);
    padding: 0 0 9px 4px;
    color: var(--ink-soft);
    font-size: 13px;
}

@media (max-width: 1050px) {
    .conversation-first-grid {
        grid-template-columns: 1fr;
    }

    .today-plan-card {
        position: static;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .redesigned-app .app-content {
        padding: 20px 14px 104px;
    }

    .plan-ready-hero {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 22px;
        padding: 25px 21px;
    }

    .plan-ready-hero h1 {
        font-size: clamp(36px, 10vw, 45px);
    }

    .plan-ready-actions {
        grid-template-columns: 1fr 1fr;
        min-width: 0;
    }

    .current-focus-pill {
        align-items: flex-start;
        border-radius: 14px;
        flex-direction: column;
        gap: 2px;
    }

    .current-focus-pill strong {
        width: 100%;
        white-space: normal;
    }

    .conversation-first-grid {
        gap: 16px;
    }

    .conversation-first-grid .messages {
        height: 360px;
        min-height: 360px;
    }

    .chat-purpose {
        padding-inline: 17px;
    }

    .starter-replies {
        padding-inline: 14px;
    }

    .chat-composer textarea {
        font-size: 16px;
    }

    .today-plan-card {
        padding: 20px;
    }

    .tool-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .tool-card .button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .plan-generation-overlay {
        padding: 12px;
    }

    .plan-generation-card {
        padding: 27px 23px 24px;
    }
}

@media (max-width: 520px) {
    .plan-ready-actions {
        grid-template-columns: 1fr;
    }

    .plan-ready-actions .button {
        width: 100%;
    }

    .conversation-first-grid .chat-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .conversation-first-grid .chat-wallet-actions {
        width: 100%;
        justify-content: space-between;
    }

    .starter-replies > div {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .starter-replies button:last-child {
        grid-column: 1 / -1;
    }

    .plan-generation-card h1 {
        font-size: 34px;
    }

    .plan-generation-steps {
        font-size: 11px;
    }
}

html.mobile-chat-open {
    overflow: hidden;
}

    body.mobile-chat-open {
        position: fixed;
        inset: 0;
        width: 100%;
        height: var(--mobile-chat-height, 100dvh);
        overflow: hidden;
        overscroll-behavior: none;
        background: #fff;
    }

    body.mobile-chat-open .app-header,
    body.mobile-chat-open .plan-ready-hero,
    body.mobile-chat-open .today-plan-card,
    body.mobile-chat-open .tools-section,
    body.mobile-chat-open .progress-card {
        display: none !important;
    }

    body.mobile-chat-open .redesigned-app,
    body.mobile-chat-open .redesigned-app .app-content,
    body.mobile-chat-open .conversation-first-grid {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
    }

    body.mobile-chat-open .conversation-first-grid {
        display: block;
    }

    body.mobile-chat-open .conversation-first-grid .chat-card {
        position: fixed;
        z-index: 900;
        top: var(--mobile-chat-top, 0);
        right: 0;
        bottom: auto;
        left: 0;
        display: flex;
        width: 100%;
        height: var(--mobile-chat-height, 100dvh);
        min-height: 0;
        flex-direction: column;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        overflow: hidden;
        overscroll-behavior: none;
    }

    body.mobile-chat-open .conversation-first-grid .chat-header {
        display: grid;
        min-height: 61px;
        flex: 0 0 auto;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        border-bottom-color: #eee8f4;
        padding: max(8px, env(safe-area-inset-top)) 11px 8px;
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(16px);
    }

    body.mobile-chat-open .mobile-chat-back {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        border: 0;
        border-radius: 11px;
        padding: 0;
        background: var(--lavender);
        color: var(--purple);
        font-size: 23px;
        line-height: 1;
    }

    body.mobile-chat-open .coach-identity {
        min-width: 0;
        gap: 8px;
    }

    body.mobile-chat-open .coach-identity .coach-avatar {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 20px;
    }

    body.mobile-chat-open .coach-identity > div {
        min-width: 0;
    }

    body.mobile-chat-open .coach-identity h2 {
        overflow: hidden;
        font-size: 17px;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.mobile-chat-open .coach-identity p {
        overflow: hidden;
        font-size: 9px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.mobile-chat-open .conversation-first-grid .chat-wallet-actions {
        width: auto;
        justify-content: flex-end;
        gap: 5px;
    }

    body.mobile-chat-open .coin-chip-button {
        min-height: 32px;
        padding: 5px 8px;
        font-size: 10px;
        white-space: nowrap;
    }

    body.mobile-chat-open .add-coins-button {
        min-height: 34px;
        flex: 0 0 auto;
        padding: 5px 9px;
        white-space: nowrap;
    }

    body.mobile-chat-open .add-coins-desktop-label {
        display: none;
    }

    body.mobile-chat-open .add-coins-mobile-label {
        display: inline;
    }

    body.mobile-chat-open .chat-purpose {
        display: none;
    }

    body.mobile-chat-open .conversation-first-grid .messages {
        display: flex;
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
        gap: 14px;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 18px 14px 28px;
        background:
            radial-gradient(circle at 8% 0, rgba(109, 61, 241, .055), transparent 14rem),
            linear-gradient(180deg, #fdfcff, #fff);
        scroll-behavior: auto;
        scroll-padding-block: 14px;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    body.mobile-chat-open .chat-message {
        width: auto;
        max-width: 100%;
        align-items: flex-start;
    }

    body.mobile-chat-open .chat-message.user {
        max-width: 88%;
    }

    body.mobile-chat-open .chat-message .message-avatar {
        display: none;
    }

    body.mobile-chat-open .message-bubble {
        max-width: 100%;
        border-radius: 17px 17px 17px 6px;
        padding: 12px 14px;
        font-size: 16px;
        line-height: 1.55;
        overflow-wrap: anywhere;
    }

    body.mobile-chat-open .chat-message.user .message-bubble {
        border-radius: 17px 17px 6px 17px;
    }

    body.mobile-chat-open .voice-bubble {
        min-width: min(275px, calc(100vw - 44px));
    }

    body.mobile-chat-open .latest-message-button:not([hidden]) {
        position: absolute;
        z-index: 4;
        right: 14px;
        bottom: calc(91px + env(safe-area-inset-bottom));
        display: inline-flex;
        min-height: 38px;
        align-items: center;
        justify-content: center;
        border: 1px solid #d8cdf0;
        border-radius: 999px;
        padding: 8px 13px;
        background: rgba(255, 255, 255, .97);
        color: var(--purple);
        box-shadow: 0 8px 24px rgba(54, 31, 83, .16);
        font-size: 11px;
        font-weight: 800;
        backdrop-filter: blur(12px);
    }

    body.mobile-chat-open .starter-replies {
        flex: 0 0 auto;
        padding: 10px 12px;
    }

    body.mobile-chat-open .starter-replies > span {
        margin-bottom: 6px;
    }

    body.mobile-chat-open .starter-replies button {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 10px;
    }

    body.mobile-chat-open .recording-panel,
    body.mobile-chat-open .voice-preview {
        flex: 0 0 auto;
        margin: 8px 10px 0;
    }

    body.mobile-chat-open .chat-composer {
        flex: 0 0 auto;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 7px;
        margin: 8px 10px 0;
        border-radius: 16px;
        padding: 7px;
        box-shadow: 0 -4px 24px rgba(58, 30, 90, .06);
    }

    body.mobile-chat-open .chat-composer textarea {
        max-height: 104px;
        min-height: 42px;
        padding: 9px 3px;
        font-size: 16px;
        line-height: 1.42;
    }

    body.mobile-chat-open .record-button,
    body.mobile-chat-open .send-button {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    body.mobile-chat-open .composer-meta {
        flex: 0 0 auto;
        justify-content: space-between;
        gap: 8px;
        padding: 5px 13px max(7px, env(safe-area-inset-bottom));
        background: #fff;
        font-size: 9px;
        white-space: nowrap;
    }
@media (max-width: 380px) {
    body.mobile-chat-open .conversation-first-grid .chat-header {
        gap: 6px;
        padding-inline: 8px;
    }

    body.mobile-chat-open .mobile-chat-back {
        width: 35px;
        height: 35px;
    }

    body.mobile-chat-open .coach-identity .coach-avatar {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        font-size: 18px;
    }

    body.mobile-chat-open .coach-identity h2 {
        font-size: 15px;
    }

    body.mobile-chat-open .coach-identity p {
        font-size: 8px;
    }

    body.mobile-chat-open .coin-unit {
        display: none;
    }

    body.mobile-chat-open .coin-chip-button {
        padding-inline: 6px;
    }

    body.mobile-chat-open .add-coins-button {
        padding-inline: 7px;
    }
}
/* Diagnostic breakup quiz */
.diagnostic-intake{max-width:760px;max-height:92vh;overflow:auto}.diagnostic-intake fieldset{border:0;padding:0;margin:0}.quiz-question{margin:0 0 24px}.quiz-question legend{font-weight:750;margin-bottom:10px;color:#29233a}.quiz-question legend small{font-weight:500;color:#746d84}.choice-list.compact{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.choice-list.compact button{padding:13px 14px;text-align:left;min-height:48px}.choice-list.multi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rating-grid{display:grid;gap:14px;margin:22px 0}.rating-grid label{display:grid;grid-template-columns:1fr auto;gap:8px;font-weight:700;background:#faf8ff;border:1px solid #ece6f7;border-radius:14px;padding:13px 15px}.rating-grid output{font-variant-numeric:tabular-nums;color:#7259a8}.rating-grid input{grid-column:1/-1;width:100%;accent-color:#7659a8}.context-grid{display:grid;gap:8px}.analysis-step.active{display:grid;min-height:420px;place-items:center}.analysis-loader{text-align:center;max-width:440px;margin:auto}.analysis-spinner{display:block;width:66px;height:66px;margin:0 auto 24px;border:6px solid #eee8f7;border-top-color:#7b61aa;border-radius:50%;animation:unfold-spin 1s linear infinite}.analysis-pulse{display:flex;justify-content:center;gap:7px;margin-top:22px}.analysis-pulse i{width:8px;height:8px;border-radius:50%;background:currentColor;animation:unfold-pulse 1.1s infinite}.analysis-pulse i:nth-child(2){animation-delay:.16s}.analysis-pulse i:nth-child(3){animation-delay:.32s}@keyframes unfold-spin{to{transform:rotate(360deg)}}@keyframes unfold-pulse{0%,100%{opacity:.25;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}.story-intro{color:#686174;line-height:1.6}.story-field textarea{width:100%;resize:vertical;min-height:160px}.voice-intake-card{margin:16px 0;padding:14px;border:1px solid #e7e0f2;border-radius:16px;background:#fbf9ff}.voice-record-button{width:100%;display:flex;align-items:center;gap:13px;border:0;background:transparent;text-align:left;cursor:pointer}.voice-record-button small{display:block;color:#746d84;margin-top:3px}.voice-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:#eadff8}.voice-icon svg{width:23px;height:23px;fill:#7257a4}.voice-status{display:flex;align-items:center;gap:9px;margin-top:12px}.recording-dot{width:10px;height:10px;border-radius:50%;background:#d94b64;animation:unfold-pulse 1s infinite}.privacy-inline{font-size:.82rem;color:#746d84}.score-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.score-summary span{padding:14px;border:1px solid #ebe5f3;border-radius:14px;background:#fbf9ff}.score-summary strong{display:block;font-size:1.05rem;margin-bottom:3px}.intake-error{margin:8px 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:620px){.choice-list.compact,.choice-list.multi-grid{grid-template-columns:1fr}.diagnostic-intake{max-height:96vh}.score-summary{grid-template-columns:1fr}}

/* Step-by-step diagnostic quiz — one question per screen */
.diagnostic-intake {
    width: min(640px, calc(100vw - 48px));
    max-width: 640px;
    max-height: calc(100dvh - 48px);
    overflow-x: hidden;
    overflow-y: auto;
}
.diagnostic-intake .modal-brand { margin-bottom: 22px; }
.diagnostic-intake .intake-progress { margin-bottom: 34px; }
.diagnostic-intake .intake-step:not(.analysis-step):not(.insight-step) { min-height: 390px; }
.diagnostic-intake .eyebrow { margin-bottom: 12px; }
.diagnostic-intake h2 { max-width: 560px; }
.question-support { margin: -2px 0 0; color: var(--muted); line-height: 1.5; }
.question-options {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 26px;
}
.question-options button {
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    padding: 15px 18px 15px 54px;
    line-height: 1.35;
}
.question-options button::before {
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    left: 18px;
    border-width: 1.5px;
}
.question-options button.selected::before {
    border-width: 6px;
}
.multi-select-options button::before { border-radius: 6px; }
.multi-select-options button.selected::before {
    border: 2px solid var(--purple);
    background: var(--purple);
    box-shadow: inset 0 0 0 4px var(--lavender);
}
.quiz-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}
.quiz-actions .button { min-width: 132px; }
.quiz-actions .button.full { width: 100%; }
.quiz-actions-back-only { justify-content: flex-start; }
.quiz-back-button,
.quiz-skip-button {
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    padding: 7px 3px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}
.quiz-back-button:hover,
.quiz-skip-button:hover {
    color: var(--ink-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.auto-advance-note {
    margin: -18px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}
.story-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}
.story-actions .button.full { min-width: 0; }
.quiz-skip-button {
    align-self: center;
    padding-inline: 12px;
}
.single-rating {
    margin: 42px 0 34px;
    padding: 28px;
    border: 1px solid #e7e0f2;
    border-radius: 18px;
    background: #fbf9ff;
}
.rating-value { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: 25px; }
.rating-value output { color: var(--purple); font-family: var(--serif); font-size: 58px; line-height: 1; }
.rating-value span { color: var(--muted); font-size: 14px; }
.single-rating input[type="range"] { width: 100%; accent-color: var(--purple); }
.rating-ends { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: 12px; }
.story-divider { display: flex; align-items: center; gap: 12px; margin: 15px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.story-divider::before,.story-divider::after { height: 1px; flex: 1; background: #ece6f3; content: ""; }
.story-field textarea { margin-top: 18px; font-size: 16px; line-height: 1.55; }
.voice-intake-card audio { width: 100%; margin-top: 12px; }
.analysis-step.active { min-height: 430px; }

@media (max-width: 700px) {
    .modal-backdrop { align-items: stretch; overflow: hidden; }
    .diagnostic-intake {
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
        padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
    }
    .diagnostic-intake .modal-close { top: 16px; right: 16px; }
    .diagnostic-intake .modal-brand { margin-bottom: 25px; padding-right: 52px; }
    .diagnostic-intake .intake-progress { gap: 10px; margin-bottom: 28px; }
    .diagnostic-intake .intake-progress span { min-width: 96px; font-size: 12px; }
    .diagnostic-intake .intake-step:not(.analysis-step):not(.insight-step) {
        display: none;
        min-height: 0;
        padding-bottom: 8px;
    }
    .diagnostic-intake .intake-step.active { display: block; }
    .diagnostic-intake h2 { font-size: clamp(28px, 8vw, 34px); }
    .question-options { gap: 10px; margin-top: 22px; }
    .question-options button { min-height: 56px; padding: 14px 14px 14px 51px; }
    .quiz-actions { position: sticky; bottom: 0; z-index: 2; margin: 24px -4px 0; padding: 12px 4px 2px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 22%); }
    .quiz-actions .button { min-width: 0; flex: 1; }
    .quiz-actions-back-only .quiz-back-button { min-width: 70px; }
    .story-actions .quiz-skip-button { flex: 0 0 auto; }
    .single-rating { margin: 30px 0 24px; padding: 24px 18px; }
    .rating-value output { font-size: 52px; }
    .story-field textarea { min-height: 145px; }
    .voice-intake-card { padding: 13px; }
    .voice-record-button { align-items: center; }
    .analysis-step.active { min-height: calc(100dvh - 190px); }
}

@media (max-width: 380px) {
    .diagnostic-intake { padding-inline: 16px; }
    .diagnostic-intake .modal-brand { margin-bottom: 20px; }
    .diagnostic-intake .intake-progress { margin-bottom: 22px; }
    .question-options button { min-height: 52px; font-size: 14px; }
    .quiz-actions { gap: 8px; }
    .quiz-actions .button { padding-inline: 12px; }
}


/* Companion onboarding and response format */
.reply-preference-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-4px 0 14px;padding:10px 13px;border:1px solid #ebe4f5;border-radius:12px;background:#fbf9ff;font-size:.86rem;color:#625a70}.reply-preference-strip button{border:0;background:transparent;color:#6d4bd1;font-weight:750;cursor:pointer}.companion-setup-backdrop{z-index:1200}.companion-setup-modal{width:min(620px,calc(100vw - 28px));max-height:calc(100vh - 28px);overflow:auto;padding:30px}.companion-setup-modal h2{margin:8px 0 10px;font-family:Georgia,serif;font-size:clamp(28px,5vw,38px);line-height:1.08}.setup-copy{color:#70687c;line-height:1.55;margin-bottom:24px}.setup-fieldset{border:0;padding:0;margin:0 0 22px}.setup-fieldset legend{font-weight:800;margin-bottom:10px}.setup-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.setup-options.two{grid-template-columns:repeat(2,minmax(0,1fr))}.setup-options label{position:relative;cursor:pointer}.setup-options input{position:absolute;opacity:0;pointer-events:none}.setup-options label>span{display:flex;flex-direction:column;justify-content:center;min-height:58px;padding:12px 14px;border:1.5px solid #ddd4eb;border-radius:13px;background:#fff;transition:.18s}.setup-options input:checked+span{border-color:#6f48ee;background:#f4f0ff;box-shadow:0 0 0 1px #6f48ee}.setup-options small{display:block;margin-top:3px;color:#766e82;font-weight:500}.companion-setup-modal .button.full{width:100%}.form-error{color:#a32f48;font-weight:650}.coach-identity h2{transition:.2s}.chat-message.coach.is-delayed{opacity:0;transform:translateY(5px)}.chat-message.coach.is-delayed.is-visible{opacity:1;transform:none;transition:opacity .2s,transform .2s}
@media(max-width:620px){.companion-setup-modal{padding:22px 18px}.setup-options,.setup-options.two{grid-template-columns:1fr}.setup-options label>span{min-height:54px}.reply-preference-strip{margin-inline:0}}

@media (max-width: 700px) {
    #auth-modal:not([hidden]),
    #signin-modal:not([hidden]) {
        display: flex;
        align-items: flex-end;
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
    }
    #auth-modal .auth-modal,
    #signin-modal .auth-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
    }
    .button.google.google-emphasis {
        width: 100%;
        min-width: 0;
        min-height: 62px;
    }
    .google-button-copy {
        overflow: hidden;
        text-align: left;
        white-space: normal;
    }
}

/* Mobile diagnostic quiz visibility hardening */
@media (max-width: 700px) {
    #intake-modal:not([hidden]) {
        display: flex !important;
        position: fixed;
        inset: 0;
        z-index: 2000;
        align-items: stretch;
        justify-content: stretch;
        width: 100%;
        min-width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 0;
        overflow: hidden;
        background: #fff;
        backdrop-filter: none;
    }

    #intake-modal .diagnostic-intake {
        display: block;
        position: relative;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        box-sizing: border-box;
    }

    #intake-form {
        display: block;
        width: 100%;
        min-height: 1px;
    }

    #intake-form > .intake-step {
        width: 100%;
        box-sizing: border-box;
    }

    #intake-form > .intake-step.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    #intake-form > .analysis-step.active {
        display: grid !important;
    }

    body.modal-open {
        overflow: hidden;
        overscroll-behavior: none;
        touch-action: none;
    }

    #intake-modal .diagnostic-intake {
        touch-action: pan-y;
    }
}
