:root {
    --bg: #ffffff;
    --text: #1d2130;
    --text-muted: #5b6275;
    --border: #e3e5ee;
    --on-accent: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12141c;
        --text: #eceef5;
        --text-muted: #a3a9bb;
        --border: #2a2e3d;
        --on-accent: #12141c;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

h1,
h2,
h3,
.logo {
    font-family: var(--heading-font);
}

h2 {
    margin: 0 0 8px;
}

a {
    color: var(--accent);
}

[hidden] {
    display: none !important;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.header {
    border-bottom: 1px solid var(--border);
}

.header__inner,
.footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo {
    font-weight: 700;
    font-size: 22px;
    color: var(--text);
    text-decoration: none;
}

.nav,
.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.nav a,
.footer__links a {
    color: var(--text-muted);
    text-decoration: none;
}

.nav a:hover,
.footer__links a:hover {
    color: var(--text);
}

.button {
    display: inline-block;
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--on-accent);
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button--small {
    padding: 8px 14px;
    font-size: 14px;
}

.button--secondary {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.button--ghost {
    background: transparent;
    color: var(--accent);
}

.button--inverse {
    background: #ffffff;
    border-color: #ffffff;
    color: #1d2130;
}

.button:disabled {
    opacity: 0.6;
    cursor: default;
}

.lead {
    font-size: 18px;
    color: var(--text-muted);
}

.section {
    padding: 56px 0;
}

.section--muted {
    background: var(--surface);
}

.section__head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section__head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section__hint {
    color: var(--text-muted);
}

.avatar {
    flex: none;
    object-position: center 18%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    object-fit: cover;
}


.avatar--square {
    border-radius: var(--radius);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 12px;
    font-weight: 700;
}

.bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
}

.bubble--user {
    align-self: flex-end;
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

details {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

summary {
    cursor: pointer;
    font-weight: 600;
}

.plans__legal {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.layout-centered .hero {
    padding: 72px 0 40px;
    text-align: center;
}

.layout-centered .hero h1 {
    font-size: clamp(32px, 5vw, 50px);
    line-height: 1.15;
    margin: 0 0 16px;
}

.layout-centered .lead {
    max-width: 640px;
    margin: 0 auto 28px;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.chip {
    flex: none;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.characters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.character {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.character__cover {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--surface);
}

.character__photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.3s ease;
}

.character:hover .character__photo {
    transform: scale(1.04);
}

.character__tag {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.character__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px 16px 16px;
}

.character__body h3 {
    margin: 0;
}


.character__body p {
    flex: 1;
    color: var(--text-muted);
    font-size: 15px;
}

.banner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 32px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #d55bb0));
    color: #ffffff;
}

.banner p {
    margin: 0;
    opacity: 0.9;
}

.messenger {
    display: grid;
    grid-template-columns: 300px 1fr;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.messenger__list {
    border-right: 1px solid var(--border);
}

.chat-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.chat-item--unread {
    background: var(--surface);
}

.chat-item__text {
    flex: 1;
    min-width: 0;
}

.chat-item__top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.chat-item__top span,
.chat-item__preview,
.messenger__status {
    color: var(--text-muted);
    font-size: 14px;
}

.chat-item__preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.messenger__window {
    display: flex;
    flex-direction: column;
}

.messenger__header {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.messenger__messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.paywall {
    margin: 0 20px 20px;
    padding: 24px;
    border: 1px dashed var(--accent);
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
}

.paywall__lock {
    width: 22px;
    height: 16px;
    margin: 10px auto 12px;
    border-radius: 4px;
    background: var(--accent);
    position: relative;
}

.paywall__lock::before {
    content: "";
    position: absolute;
    left: 4px;
    bottom: 12px;
    width: 14px;
    height: 12px;
    border: 3px solid var(--accent);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    box-sizing: border-box;
}

.paywall h3 {
    margin: 0 0 4px;
}

.paywall p {
    margin: 0 0 16px;
    color: var(--text-muted);
}

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 24px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}

.plan--featured {
    border: 2px solid var(--accent);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 20%, transparent);
}

.plan__note {
    position: absolute;
    top: -12px;
    left: 24px;
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 13px;
    font-weight: 600;
}

.plan h3 {
    margin: 0;
}

.plan__price {
    margin: 8px 0 16px;
    font-size: 32px;
    font-weight: 700;
}

.plan__price span {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-muted);
}

.plan__billed,
.plan-column__billed {
    margin: -12px 0 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.plan-column__billed {
    margin-top: -8px;
}

.plan__features {
    flex: 1;
    margin: 0 0 20px;
    padding-left: 20px;
}

.app {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100vh;
    padding: 24px 16px;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: var(--text-muted);
    text-decoration: none;
}

.sidebar__link:hover,
.sidebar__link--active {
    background: var(--bg);
    color: var(--text);
}

.sidebar__upgrade {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 14px;
}

.sidebar__upgrade span {
    color: var(--text-muted);
}

.app__main {
    min-width: 0;
}

.layout-split .container {
    max-width: 960px;
    padding: 0 32px;
}

.layout-split .hero {
    padding: 56px 0 40px;
    border-bottom: 1px solid var(--border);
}

.layout-split .hero__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.layout-split .hero h1 {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    margin: 0 0 16px;
}

.hero__quote {
    padding: 24px;
    border-left: 4px solid var(--accent);
    background: var(--surface);
    font-family: var(--heading-font);
}

.hero__quote p {
    margin: 0 0 12px;
    font-size: 20px;
    font-style: italic;
}

.hero__quote span {
    color: var(--text-muted);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
}

.tabs {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    margin: 16px 0 8px;
    border-bottom: 1px solid var(--border);
}

.tab {
    flex: none;
    padding: 10px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-muted);
    font: inherit;
    cursor: pointer;
}

.tab.is-active {
    border-bottom-color: var(--accent);
    color: var(--text);
    font-weight: 600;
}

.partner {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.partner__text {
    flex: 1;
    min-width: 0;
}

.partner__text h3 {
    margin: 0;
    font-size: 18px;
}

.partner__role {
    margin-left: 8px;
    color: var(--accent);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.partner__text p {
    margin: 4px 0 0;
    color: var(--text-muted);
}

.workspace {
    display: grid;
    grid-template-columns: 260px 1fr;
    margin-top: 16px;
    border: 1px solid var(--border);
    background: var(--bg);
}

.workspace__list {
    border-right: 1px solid var(--border);
}

.thread {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.thread--unread {
    box-shadow: inset 3px 0 0 var(--accent);
}

.thread__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.thread__text span {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thread time {
    color: var(--text-muted);
    font-size: 12px;
}

.workspace__chat {
    padding: 20px 24px;
}

.workspace__title {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.workspace__title div {
    display: flex;
    flex-direction: column;
}

.workspace__title span {
    color: var(--text-muted);
    font-size: 14px;
}

.line {
    padding: 8px 0;
}

.line__author {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.line--user .line__author {
    color: var(--text-muted);
}

.line p {
    margin: 2px 0 0;
    font-family: var(--heading-font);
    font-size: 17px;
}

.locked {
    position: relative;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.locked__preview {
    min-height: 190px;
    padding: 20px;
    filter: blur(5px);
    user-select: none;
}

.locked__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    text-align: center;
}

.locked__overlay p {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.plan-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-top: 24px;
    border: 1px solid var(--border);
}

.plan-column {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-right: 1px solid var(--border);
}

.plan-column:last-child {
    border-right: 0;
}

.plan-column--featured {
    background: var(--surface);
    box-shadow: inset 0 4px 0 var(--accent);
}

.plan-column__head h3 {
    margin: 0;
}

.plan-column__note {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.plan-column__price {
    margin: 8px 0 12px;
    font-family: var(--heading-font);
    font-size: 30px;
}

.plan-column__price span {
    color: var(--text-muted);
    font-size: 15px;
}

.plan-column ul {
    flex: 1;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.plan-column li {
    padding: 6px 0;
    border-bottom: 1px dotted var(--border);
}

@media (max-width: 860px) {
    .app {
        display: block;
    }

    .sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        height: auto;
        padding: 12px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar__nav {
        flex-direction: row;
        overflow-x: auto;
        width: 100%;
    }

    .sidebar__upgrade {
        display: none;
    }

    .layout-split .container {
        padding: 0 16px;
    }

    .layout-split .hero__inner,
    .messenger,
    .workspace {
        grid-template-columns: 1fr;
    }

    .messenger__list,
    .workspace__list {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .plan-column {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

.legal {
    max-width: 760px;
}

.legal__updated {
    color: var(--text-muted);
}

.footer {
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}

.footer__company {
    margin-top: 4px;
}

.checkout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--surface);
}

.checkout__box {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.checkout__box .button {
    width: 100%;
}

.checkout__message {
    margin: 0;
    text-align: center;
}

.checkout__legal {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.button--disabled {
    opacity: 0.6;
    cursor: default;
}

.credits {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: center;
    margin-top: 40px;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--surface);
}

.credits__text h3 {
    margin: 0 0 8px;
}

.credits__text p {
    margin: 0;
    color: var(--text-muted);
}

.credits__packs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.credit {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.credit:hover {
    border-color: var(--accent);
}

.credit__amount {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

.credit__label,
.credit__note {
    color: var(--text-muted);
    font-size: 13px;
}

.credit__price {
    margin-top: 8px;
    color: var(--accent);
    font-weight: 700;
}

.credit-table {
    margin-top: 40px;
}

.credit-table h3 {
    margin: 0 0 4px;
}

.credit-table p {
    margin: 0 0 12px;
    color: var(--text-muted);
}

.credit-table table {
    width: 100%;
    border-collapse: collapse;
}

.credit-table td {
    padding: 12px 0;
    border-bottom: 1px dotted var(--border);
}

.credit-table__price {
    font-family: var(--heading-font);
    font-size: 18px;
    text-align: right;
}

.credit-table__action {
    width: 1%;
    padding-left: 16px !important;
}

.header--split {
    border-bottom: 2px solid var(--accent);
    background: var(--surface);
}

.header--split .nav a {
    font-family: var(--heading-font);
}

@media (max-width: 720px) {
    .credits {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .header .button--small {
        display: none;
    }
}

.avatar--feed {
    width: 72px;
    height: 72px;
}

.hero__quote-author {
    display: flex;
    gap: 12px;
    align-items: center;
}

@media (max-width: 860px) {
    .messenger,
    .workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .avatar--feed {
        width: 56px;
        height: 56px;
    }

    .partner {
        flex-wrap: wrap;
    }

    .partner__text {
        flex-basis: calc(100% - 72px);
    }

    .partner .button {
        margin-left: 72px;
    }
}

.chips,
.tabs,
.sidebar__nav {
    scrollbar-width: none;
}
