:root {
    --bg: #100e17;
    --bg-2: #15111e;
    --panel: #1c1827;
    --panel-2: #231c31;
    --line: #2e2640;
    --text: #efe9f7;
    --muted: #b4aabe;
    --accent: #f472b6;
    --accent-2: #a78bfa;
    --danger: #f87171;
    --ok: #34d399;
    --radius: 20px;
    --font: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { color-scheme: dark; }
::selection { background: #70518c; color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; }
#form1 { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; min-width: 0; }
body {
    background: radial-gradient(1200px 600px at 80% -10%, #2a1740 0%, transparent 60%), var(--bg);
    color: var(--text);
    font: 16px/1.55 var(--font);
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h2 { font-size: 1.35rem; margin-top: 1.6em; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.container { max-width: 1200px; margin: 0 auto; padding: 40px 28px 64px; }
.container.narrow { max-width: 720px; }

/* ---------- top bar & footer ---------- */
.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px max(28px, calc((100vw - 1144px) / 2)); border-bottom: 1px solid var(--line);
    background: rgba(14, 11, 20, .75); backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 1.2rem; color: var(--text); letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: 5px; border-radius: 11px; background: linear-gradient(135deg, #f472b6, #a78bfa); color: #21122f; font-size: 1.4rem; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--text); font-size: .9rem; }
.nav a.btn { color: #1a0f22; }
.nav a.muted { color: var(--muted); }
select.lang-switch { width: auto; max-width: 130px; padding: 5px 8px; border-radius: 999px; font-size: .85rem; background: transparent; color: var(--muted); }
.footer {
    border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem;
    padding: 20px 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 16px; }

.verify-banner { padding: 8px 24px; background: rgba(167, 139, 250, .14); border-bottom: 1px solid var(--line); font-size: .9rem; text-align: center; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- buttons & forms ---------- */
.btn, input[type=submit].btn {
    display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 600;
    color: #1a0f22; background: linear-gradient(135deg, var(--accent), var(--accent-2));
    padding: 11px 20px; border-radius: 12px; text-align: center; transition: background .18s, box-shadow .18s, transform .18s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; box-shadow: 0 6px 22px #0003; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: default; }
.btn-sm { padding: 6px 14px; font-size: .875rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: #1a0f0f; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
button.link.danger { color: var(--danger); }

label { display: block; margin: 14px 0 6px; font-size: .9rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input:not([type]), select, textarea {
    width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--bg-2); color: var(--text); font: inherit;
}
input[type=search] { -webkit-appearance: none; appearance: none; }
input[type=file] { max-width: 100%; color: var(--muted); font: inherit; }
input[type=file]::file-selector-button { margin-right: 10px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; border-color: transparent; }
label.check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; color: var(--text); margin: 18px 0; }
label.check input { margin-top: 4px; width: auto; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.card { background: linear-gradient(145deg, #211c2e, var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.auth-card { max-width: 460px; margin: 32px auto; padding: 32px; box-shadow: 0 24px 70px #0003; }
.auth-card .btn { margin-top: 10px; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.alert-error { background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .4); }
.alert-info { background: rgba(167, 139, 250, .12); border: 1px solid rgba(167, 139, 250, .4); }
.tag { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: #1a0f22; margin-left: 6px; }
.danger-zone { border-color: rgba(248, 113, 113, .35); }
.danger-zone input { max-width: 200px; margin-bottom: 10px; }

/* ---------- avatars & meters ---------- */
.avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 36px; height: 36px; border-radius: 50%; font-weight: 700; color: #1a0f22;
}
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.avatar-md { width: 44px; height: 44px; font-size: 1.1rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.meter { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin-top: 8px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s ease; }

/* ---------- landing ---------- */
.hero { max-width: 1200px; margin: 0 auto; padding: 90px 28px 80px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 72px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 4.5vw, 3.7rem); line-height: 1.09; letter-spacing: -.045em; margin: 24px 0; }
.hero-text { min-width: 0; }
.eyebrow { color: var(--accent-2); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; font-size: .8rem; }
.grad { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.03rem; line-height: 1.8; color: #c0b6cd; max-width: 530px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 10px; }
.fineprint { font-size: .82rem; color: var(--muted); }
.hero-demo { position: relative; background: linear-gradient(150deg, #292036, #17131f); border: 1px solid #4b385e; border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 22px; box-shadow: 0 30px 90px #0005, 0 0 100px #a78bfa12; }
.demo-conversation { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 12px; }
.demo-conversation .bubble { max-width: 92%; font-size: .95rem; line-height: 1.65; padding: 15px 18px; }
.demo-conversation .bubble.me { background: linear-gradient(120deg, #8050b3, #9c518d); }
.demo-spark { margin-left: auto; color: var(--accent-2); font-size: 1.7rem; }
.demo-memory { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; color: #c9badb; font-size: .8rem; }
.demo-memory-check { margin-left: auto; color: var(--ok); }
.demo-head { display: flex; gap: 12px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.demo-head small { display: block; color: var(--muted); }
.push-setting { margin: 14px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.push-setting p { margin: 6px 0 0; }
.push-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 16px 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: .92rem; }
.push-prompt .push-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.about-me { margin-top: 10px; }
.about-me summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.about-me textarea { width: 100%; margin-top: 8px; resize: vertical; }
.about-me input { width: 100%; margin-top: 8px; }
.about-me small { display: block; margin-top: 4px; }
.practice { display: inline-flex; align-items: center; gap: 4px; }
.practice select { max-width: 11rem; padding: 4px 6px; font-size: .85rem; }
.roleplay-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: .9rem; }
.roleplay-bar[hidden] { display: none; }
.roleplay-bar select { padding: 4px 6px; font-size: .85rem; }
.roleplay-bar { flex-shrink: 0; }   /* chat options open on a short phone squeezed it to a sliver */
.roleplay-card .start-row { flex-wrap: wrap; }
.showcase { max-width: 1200px; margin: 0 auto; padding: 12px 28px 28px; }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.showcase-card { display: flex; gap: 14px; align-items: flex-start; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.showcase-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.showcase-card { margin-bottom: 0; padding: 25px; }
.showcase-card:hover { text-decoration: none; }
.showcase-card .avatar { box-shadow: 0 0 0 5px #ffffff05; }
.showcase-card p { margin: 6px 0 0; font-size: .94rem; }
.features { max-width: 1200px; margin: 0 auto; padding: 32px 28px 80px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.feature { border-top: 1px solid #493851; padding: 24px 4px; }
.feature h3 { font-size: 1.02rem; }
.feature p { color: var(--muted); margin: 0; font-size: .94rem; }

.portrait-showcase { max-width: 1200px; margin: 0 auto 32px; padding: 0 28px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.portrait-card { position: relative; display: block; overflow: hidden; border-radius: 24px; border: 1px solid var(--line); aspect-ratio: 4 / 5; background: var(--panel); color: #fff; }
.portrait-card::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, #100e17dd); pointer-events: none; }
.portrait-card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .3s ease; }
.portrait-card:hover img { transform: scale(1.035); }
.portrait-ai { position: absolute; top: 16px; left: 16px; border: 1px solid #ffffff40; border-radius: 999px; padding: 4px 10px; background: #100e17b3; color: #fff; font-size: .72rem; }
.portrait-caption { position: absolute; bottom: 24px; left: 24px; right: 24px; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.portrait-caption strong { font-size: 1.7rem; }
.portrait-caption > span { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #ffffff55; border-radius: 50%; }
@media (max-width: 600px) {
    .portrait-showcase { grid-template-columns: 1fr; padding: 0 18px; gap: 16px; }
    .portrait-card { aspect-ratio: 4 / 4.2; }
}

/* ---------- companions ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.section-head { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.companion-card { display: flex; gap: 16px; align-items: center; color: var(--text); margin: 0; }
.companion-card:hover { border-color: var(--accent-2); text-decoration: none; }
.companion-meta { flex: 1; min-width: 0; }
.companion-preview { color: var(--muted); font-size: .88rem; line-height: 1.35; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.companion-story { color: var(--accent-2); font-size: .78rem; font-weight: 700; margin-top: 6px; }
.liked-section { margin: 30px 0 38px; }
.liked-card { display: flex; gap: 14px; align-items: center; margin: 0; }
.liked-card .avatar-lg { flex: 0 0 auto; }
.liked-card .muted { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.liked-choose { display: inline-block; margin-top: 7px; font-size: .85rem; font-weight: 700; }
.companion-name { font-weight: 700; font-size: 1.05rem; }
.character-card { display: flex; flex-direction: column; margin: 0; }
.character-card { padding: 26px; }
.character-head .avatar-lg { width: 64px; height: 64px; }
.character-card p { margin: 10px 0 0; }
.character-head { display: flex; gap: 14px; align-items: center; }
.available-character { padding: 0 0 20px; overflow: hidden; }
/* a catalogue, not a list: four or more portrait cards across on a laptop */
.grid:has(> .available-character) { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.available-character .available-photo { aspect-ratio: 4 / 5; }
.available-character > p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.available-photo { display: grid; place-items: center; position: relative; aspect-ratio: 4 / 3; overflow: hidden; color: #fff; text-decoration: none; }
.available-photo:hover { text-decoration: none; }
.available-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; transition: transform .25s ease; }
.available-photo:hover img { transform: scale(1.035); }
.available-photo:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.available-initial { font-size: 4rem; font-weight: 700; }
.available-character .character-head, .available-character > p, .available-character .start-row, .available-character .about-me { margin-left: 20px; margin-right: 20px; }
.available-character .character-head { padding-top: 18px; }
.available-character .about-me { margin-top: 14px; }
.start-row { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 8px; margin-top: auto; padding-top: 16px; }
.start-row .btn { grid-column: 1 / -1; }
.start-row select, .start-row input { min-width: 0; padding: 7px 10px; font-size: .875rem; }
.create-card { align-items: center; justify-content: center; text-align: center; color: var(--text); border-style: dashed; min-height: 220px; }
.create-card:hover { border-color: var(--accent); text-decoration: none; }
.create-plus { font-size: 2.4rem; color: var(--accent); line-height: 1; margin-bottom: 8px; }

/* ---------- chat ---------- */
body.page-chat .footer, body.page-room .footer { display: none; }
body.page-chat #form1 { height: 100vh; height: 100dvh; min-height: 0; }
body.page-chat .topbar { flex-shrink: 0; }
body.page-chat .main, body.page-chat.unverified .main { flex: 1; height: auto !important; min-height: 0; }
.chat-layout { display: grid; grid-template-columns: 240px 1fr; height: 100%; }
.chat-side { border-right: 1px solid var(--line); padding: 14px 10px; overflow-y: auto; background: rgba(21, 17, 30, .6); }
.side-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 10px 10px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--text); }
.side-item:hover { background: var(--panel); text-decoration: none; }
.side-item.active { background: var(--panel-2); }
.side-name { flex: 1; }
/* the last line under each name in the chat sidebar */
.side-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-preview { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-add { color: var(--muted); font-size: .9rem; margin-top: 8px; }
.chat-switcher { display: none; flex: 0 0 auto; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.chat-switcher summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; font-weight: 700; }
.chat-switcher summary::-webkit-details-marker { display: none; }
.chat-switcher summary span { transition: transform .2s ease; }
.chat-switcher[open] summary span { transform: rotate(180deg); }
.chat-switcher summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chat-switcher nav { max-height: min(40vh, 300px); overflow-y: auto; padding: 4px 10px 10px; border-top: 1px solid var(--line); }
.chat-main { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.chat-head { flex-wrap: wrap; display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.chat-title { flex: 1; min-width: 0; }
.chat-name { font-weight: 700; font-size: 1rem; margin: 0; line-height: inherit; }
.page-h { font-size: 1.5rem; margin: 0 0 14px; }
.chat-sub { color: var(--muted); font-size: .85rem; }
.ai-tag { font-size: .75rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--accent-2); color: var(--accent-2); vertical-align: middle; }
.chat-tools { flex-wrap: wrap; display: flex; align-items: center; gap: 16px; }
.bond { width: 150px; }
.bond .meter { margin-top: 0; }
.switch { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .85rem; color: var(--muted); cursor: pointer; }
.switch input { width: auto; }
.daily { margin: 10px 20px 0; padding: 8px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.crisis, .crisis-static { margin: 10px 20px 0; padding: 12px 16px; border-radius: 12px; background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .45); }
.crisis-static { margin: 0 0 20px; }
.crisis a, .crisis-static a { color: var(--ok); font-weight: 700; display: inline-block; padding: 6px 2px; }
.messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.load-more { align-self: center; margin-bottom: 10px; }
.empty-hint { margin: auto; color: var(--muted); text-align: center; max-width: 360px; }
.bubble { max-width: min(560px, 78%); padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word; }
.bubble.them { align-self: flex-start; background: var(--panel-2); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, #db2777, #7c3aed); color: #fff; border-bottom-right-radius: 6px; }
.bubble.proactive { border: 1px solid var(--accent-2); }
.bubble.pending { opacity: .7; }
.bubble.streaming::after { content: "▍"; margin-left: 2px; opacity: .6; animation: blink 1s infinite; }
.bubble.failed { opacity: .5; border: 1px dashed var(--danger); }
.bubble.typing { display: inline-flex; gap: 4px; padding: 14px; }
.bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .2s; }
.bubble.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.photo { position: relative; max-width: min(300px, 70%); margin: 2px 0; }
.photo.me { align-self: flex-end; }
.photo.them { align-self: flex-start; }
.photo img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--panel-2); }
.ai-image-tag { position: absolute; left: 8px; bottom: 8px; font-size: .68rem; padding: 2px 7px; border-radius: 999px; background: rgba(14, 11, 20, .75); color: #fff; }
/* creator insights */
.insight-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 16px 0; }
.insight-totals .card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin: 0; }
.insight-totals strong { font-size: 1.6rem; }
.insight-card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.insight-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.insight-table th { text-align: left; font-weight: 500; font-size: .78rem; color: var(--muted); padding: 4px 8px 4px 0; vertical-align: bottom; }
.insight-table td { padding: 4px 8px 4px 0; font-weight: 600; }
.insight-tips { margin: 10px 0 0; padding-left: 20px; font-size: .9rem; color: var(--muted); }
/* community: creator leaderboards side by side on wide screens */
.creator-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 24px 0; }
.creator-boards ol { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.creator-boards h2 { margin: 0; font-size: 1.1rem; }
/* Memories page: usage bar (pinned part first) */
.memory-usage { margin: 12px 0; }
.memory-meter { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.memory-meter-pinned { background: var(--accent-2); }
.memory-meter-auto { background: var(--accent); opacity: .7; }
.memory-warning { color: #fbbf24; }
/* gallery: "Use as chat background" under each photo */
.gallery-cell { display: flex; flex-direction: column; gap: 6px; }
.gallery-cell .gallery-bg { align-self: flex-start; }
/* +Lore tag (Character.AI): the character has a lorebook */
.tag-lore { background: rgba(96, 165, 250, .16); color: #93c5fd; border-color: rgba(96, 165, 250, .45); }
/* the lorebook inside the chat options */
.lore-viewer { flex-basis: 100%; }
.lore-viewer > summary { list-style: none; display: inline-flex; }
.lore-viewer > summary::-webkit-details-marker { display: none; }
.lore-viewer dl { max-height: 40vh; overflow: auto; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.lore-viewer dt { font-weight: 600; font-size: .85rem; color: #93c5fd; margin-top: 8px; }
.lore-viewer dt:first-child { margin-top: 0; }
.lore-viewer dd { margin: 2px 0 0; font-size: .9rem; white-space: pre-line; }
/* under a reply that picked up something they told before (chat.js rememberedNote) */
.remembered { align-self: flex-start; max-width: min(520px, 85%); margin: -2px 0 8px; font-size: .82rem; color: var(--muted); }
.remembered summary { cursor: pointer; list-style: none; display: inline-block; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); }
.remembered summary::-webkit-details-marker { display: none; }
.remembered ul { margin: 6px 0 4px; padding-left: 18px; }
.remembered a { color: inherit; text-decoration: underline; }
.milestone { align-self: center; margin: 10px 0; padding: 8px 16px; border-radius: 999px; font-size: .9rem; font-weight: 600;
    background: linear-gradient(135deg, rgba(244, 114, 182, .18), rgba(167, 139, 250, .18)); border: 1px solid var(--accent-2); animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.photo-wait { align-self: flex-start; color: var(--muted); font-size: .9rem; padding: 6px 4px; animation: blink 1.6s infinite; }
.pending-group { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: stretch; }
.pending-group.pending { opacity: .7; }
.pending-group.failed { opacity: .5; }
.attach-preview { display: flex; align-items: center; gap: 12px; margin: 0 20px 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.attach-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.attach-preview .muted { flex: 1; }
.msg-actions { align-self: flex-start; display: flex; flex-wrap: wrap; max-width: 100%; gap: 4px; margin: -2px 0 6px 4px; opacity: .55; transition: opacity .15s; }
.msg-actions:hover, .msg-actions:focus-within { opacity: 1; }
.msg-actions .voice-btn { margin: 0; }
.icon-btn { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 999px; font-size: .8rem; line-height: 1; padding: 5px 8px; cursor: pointer; }
.icon-btn:hover { border-color: var(--line); }
.icon-btn.on { border-color: var(--accent); color: var(--accent); }
.report-form { align-self: flex-start; display: grid; gap: 8px; width: min(420px, 90%); margin: 0 0 8px 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.voice-btn {
    align-self: flex-start; margin: -2px 0 6px 6px; border: 1px solid var(--line); background: transparent; color: var(--muted);
    border-radius: 999px; font-size: .75rem; line-height: 1; padding: 5px 10px; cursor: pointer;
}
.voice-btn:hover, .voice-btn.playing { color: var(--accent); border-color: var(--accent); }
.voice-btn.loading { opacity: .6; cursor: progress; }
.mic { padding: 8px 12px; font-size: 1.05rem; line-height: 1; }
.mic.recording { background: var(--danger); color: #1a0f0f; border-color: transparent; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, .5); } 50% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); } }
.rec-status { flex: 1; align-self: center; color: var(--muted); padding: 0 6px; }
.limit { margin: 0 20px 8px; padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.composer { display: flex; gap: 10px; padding: 12px 20px 6px; border-top: 1px solid var(--line); }
.composer textarea { min-width: 0; resize: none; border-radius: 22px; padding: 11px 16px; max-height: 160px; }
.composer-foot { padding: 0 24px 10px; }
/* the Send button never wraps (in Chinese it broke into two lines, 发/送) */
.composer #send, .composer #groupSend { flex: none; white-space: nowrap; min-width: 56px; }

/* ---------- admin ---------- */
.container.admin { max-width: 1280px; }
.admin-nav { font-size: .9rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi span { color: var(--muted); font-size: .8rem; }
.kpi b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: .78rem; }
.kpi.warn { border-color: var(--danger); }
.admin-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
table.data th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px 8px; }
table.data td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; }
table.data tr.disabled td { opacity: .5; }
.tag.warn { border-color: var(--danger); color: var(--danger); }
.report { border-top: 1px solid var(--line); padding: 12px 0; }
.report:first-of-type { border-top: 0; }
.report blockquote { margin: 8px 0; padding: 10px 12px; border-left: 3px solid var(--accent-2); background: var(--bg-2); border-radius: 0 10px 10px 0; }
.report-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.admin-actions { white-space: nowrap; }
.char-row { display: flex; flex-wrap: wrap; gap: 18px; }
.char-cell { display: flex; gap: 10px; align-items: center; }
.admin-actions .grant { display: flex; gap: 4px; margin-top: 6px; }
.admin-actions .grant select, .admin-actions .grant input { width: auto; padding: 4px 6px; font-size: .8rem; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

/* ---------- memories, pricing, prose ---------- */
.memory-list { list-style: none; padding: 0; margin: 0; }
.memory-list li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.memory-list li:last-child { border-bottom: 0; }
.memory-text { flex: 1; }
.memory-body { flex: 1; min-width: 0; }
.memory-list li.pinned .memory-text { color: var(--text); font-weight: 600; }
.memory-edit summary { cursor: pointer; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.memory-edit textarea { margin: 6px 0; }
.add-memory { display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; }
@media (max-width: 600px) { .add-memory { grid-template-columns: 1fr; } }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.plan { position: relative; display: flex; flex-direction: column; margin: 0; }
.plan ul { padding-left: 18px; color: #d8d0e6; flex: 1; }
.plan-featured { border-color: var(--accent); box-shadow: 0 20px 60px rgba(244, 114, 182, .15); }
.plan-ribbon { position: absolute; top: -12px; right: 18px; background: var(--accent); color: #1a0f22; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.price { font-size: clamp(1.45rem, 1.9vw, 1.8rem); font-weight: 700; margin-bottom: 6px; }
.price .per-month, .price .per-year { white-space: nowrap; }
.price .per-year, body.yearly .price .per-month { display: none; }
body.yearly .price .per-year { display: inline; }
.interval { display: flex; gap: 18px; justify-content: center; margin: 8px 0 4px; }
.interval label { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; margin: 0; color: var(--text); cursor: pointer; }
.interval input { width: auto; }
#billing .interval { justify-content: flex-start; margin-bottom: 12px; }
.prose h3 { margin-top: 1.6em; }
.prose li { margin-bottom: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding-top: 36px; }
    .features, .plans { grid-template-columns: 1fr 1fr; }
    .chat-layout { grid-template-columns: 1fr; }
    .chat-side { display: none; }
    .chat-switcher { display: block; }
    .bond { display: none; }
}
@media (max-width: 600px) {
    .features, .plans, .row2 { grid-template-columns: 1fr; }
    .topbar { padding: 12px 16px; }
    .nav { gap: 12px; font-size: .9rem; }
    .chat-head { padding: 10px 12px; }
    .switch span { display: none; }
    .messages { padding: 14px 12px; }
    .composer { padding: 10px 12px 6px; }
    .start-row { grid-template-columns: 1fr; }
}

/* Keep controls usable when navigation and translated labels wrap. */
@media (max-width: 1100px) {
    .chat-tools { gap: 10px; }
    .chat-head .chat-tools { width: 100%; }
    .hero { gap: 36px; }
}
@media (max-width: 900px) {
    .hero { max-width: 700px; padding-top: 52px; gap: 36px; }
    .hero-demo { width: 100%; }
    .hero h1 { font-size: clamp(2.5rem, 7vw, 3.7rem); }
}
@media (max-width: 600px) {
    .topbar { flex-wrap: wrap; gap: 10px; position: relative; }
    .nav { width: 100%; gap: 12px; }
    select.lang-switch { margin-left: auto; max-width: 105px; }
    .container, .showcase { padding-left: 18px; padding-right: 18px; }
    .hero { padding: 36px 18px 40px; }
    .hero h1 { font-size: 2.65rem; }
    .hero .eyebrow { font-size: .69rem; letter-spacing: .02em; }
    .hero-demo { padding: 18px; border-radius: 22px; }
    .hero-cta .btn { flex: 1 1 auto; }
    .features { padding: 12px 18px 32px; gap: 4px; }
    .feature { padding: 20px 0; }
    .showcase-card { padding: 20px; }
    .auth-card { max-width: calc(100% - 36px); padding: 24px; margin: 18px auto 32px; }
    .section-head { gap: 0; }
    .footer { padding: 24px 18px; }
    .footer-links { flex-wrap: wrap; }
    .chat-tools .switch span { display: inline; }
    .chat-tools .practice { margin: 0; }
    .chat-tools .practice select { max-width: 9rem; }
    .composer { gap: 6px; }
    .composer .btn { padding: 10px; }
    .composer-foot { font-size: .72rem; }
    .bubble { max-width: 90%; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.discovery .section-head h2 { margin: 8px 0; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.discovery-filters { display: flex; gap: 16px; align-items: end; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.discovery-filters label { margin: 0; min-width: 190px; }
.discovery-search { flex: 1; }
.discovery-filters input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--text); font: inherit; }
.discovery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 24px 0; }
.discovery-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); display: flex; flex-direction: column; }
.discovery-photo { position: relative; aspect-ratio: 4 / 4.5; overflow: hidden; }
.discovery-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; }
.discovery-fallback { height: 100%; display: grid; place-items: center; font-size: 6rem; color: #21122f; }
.discovery-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.discovery-body .section-head { margin: 0; align-items: center; }
.discovery-body h3 { margin: 0; font-size: 1.3rem; }
.discovery-body p { margin: 10px 0; }
.discovery-body .btn { margin-top: auto; }
.selection-preview { display: flex; gap: 14px; align-items: center; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.character-selected { border-color: var(--accent); box-shadow: 0 0 0 2px #f472b633; scroll-margin-top: 100px; }
@media (max-width: 900px) { .discovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .discovery-grid { grid-template-columns: 1fr; } .discovery-filters { flex-direction: column; align-items: stretch; } }
.avatar-fullbody img { transform: scale(3); transform-origin: 50% 12%; }
.portrait-view { margin: 0 0 18px; }
.discovery { scroll-margin-top: 90px; }
.memory-preview { max-width: 1200px; margin: 0 auto; padding: 16px 28px 48px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
.memory-preview h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-top: 12px; }
.memory-demo { margin: 0; }
.memory-demo .btn-row { margin-top: 16px; align-items: center; }
.memory-demo .bubble { max-width: 100%; }
.memory-demo #demoStatus { margin-bottom: 0; min-height: 1.5em; }
.personality-preview { margin: 0 0 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.personality-preview summary { cursor: pointer; color: var(--accent-2); font-weight: 600; }
.personality-preview blockquote { margin: 10px 0 0; padding: 12px 14px; border-left: 2px solid var(--accent-2); background: var(--bg-2); border-radius: 0 12px 12px 0; font-size: .92rem; }
@media (max-width: 900px) { .memory-preview { gap: 24px; } }
@media (max-width: 600px) { .memory-preview { grid-template-columns: 1fr; padding: 12px 18px 32px; } }
/* A portrait-led introduction and a shorter route to discovery. */
.hero { padding-top: 60px; padding-bottom: 52px; gap: 48px; }
.hero .lead { max-width: 470px; }
.hero-visual { min-width: 0; position: relative; padding: 22px 0; }
.hero-portraits { display: grid; grid-template-columns: .8fr 1fr .8fr; gap: 12px; align-items: center; }
.hero-person { position: relative; overflow: hidden; aspect-ratio: 3 / 5; border-radius: 80px 80px 24px 24px; border: 1px solid #ffffff26; box-shadow: 0 20px 40px #0004; }
.hero-person img { display: block; height: 100%; width: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-person::after { content: ''; position: absolute; inset: 60% 0 0; background: linear-gradient(transparent,#100e17d9); }
.hero-person > span { position: absolute; bottom: 18px; left: 12px; right: 12px; text-align: center; z-index: 1; color: white; font-weight: 600; font-size: .85rem; }
.hero-person small { font-size: .75rem; margin-left: 3px; opacity: .9; }
.hero-person-main { transform: translateY(-22px); }
.hero-person-side:first-child { transform: rotate(-5deg); }
.hero-person-side:last-child { transform: rotate(5deg); }
.hero-message { position: relative; display: flex; gap: 14px; margin: 0 12px; padding: 18px 20px; background: #251e32; border: 1px solid #59456d; border-radius: 18px; box-shadow: 0 16px 45px #0005; }
.hero-message small { color: #d3b9ed; }
.hero-message p { margin: 5px 0; font-size: 1rem; line-height: 1.5; }
.hero-message-spark { color: var(--accent); font-size: 1.8rem; }
.discovery-photo { aspect-ratio: 4 / 3.8; }
.discovery-body { padding: 20px; }
.discovery-more { display: flex; justify-content: center; margin: 24px 0 36px; }
.discovery-card { transition: border-color .2s, box-shadow .2s; }
.discovery-card:hover { border-color: #705486; box-shadow: 0 12px 36px #0003; }
.memory-preview { padding-top: 48px; border-top: 1px solid var(--line); }
.closing-cta { max-width: 1144px; margin: 0 auto 56px; padding: 44px 28px; text-align: center; border: 1px solid #493456; border-radius: 28px; background: radial-gradient(ellipse at top,#3e254c55,transparent 75%),var(--panel); }
.closing-cta h2 { margin: 12px 0; font-size: clamp(2rem,4vw,3rem); letter-spacing: -.03em; }
.closing-cta > .muted { max-width: 520px; margin: 0 auto 24px; }
.closing-pricing { display: inline-block; margin: 16px; }
@media (max-width: 900px) {
 .hero { grid-template-columns: 1fr 1fr; max-width: 1200px; gap: 28px; }
 .hero h1 { font-size: clamp(2.3rem,5vw,3.4rem); }
 .hero-person { border-radius: 48px 48px 18px 18px; }
 .hero-message { margin: 0; padding: 14px; }
 .closing-cta { margin-left: 28px; margin-right: 28px; }
}
@media (max-width: 600px) {
 .hero { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 24px; gap: 20px; }
 .hero h1 { font-size: 2.6rem; margin: 18px 0; }
 .hero .lead { font-size: 1rem; line-height: 1.65; }
 .hero-cta { margin-top: 20px; }
 .hero-visual { padding-top: 12px; }
 .hero-portraits { max-width: 400px; margin: auto; gap: 10px; }
 .hero-person { aspect-ratio: 3 / 4; }
 .hero-person-main { transform: translateY(-12px); }
 .hero-message p { font-size: .94rem; }
 .memory-preview { padding-top: 28px; }
 .closing-cta { margin: 0 18px 32px; padding: 28px 20px; }
}

/* Dedicated romance discovery: large portraits, compact copy. */
.romance-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:28px 0 22px}
.romance-tabs a{padding:10px 18px;border:1px solid #393043;border-radius:30px;color:#d7cede;text-decoration:none;font-weight:600}
.romance-tabs a:hover,.romance-tabs a[aria-current=page]{background:#35243e;border-color:#d88bbb;color:#fff}
.romance-intro{max-width:780px;padding:20px 0 26px}
.romance-intro h1{font-size:clamp(2.2rem,4.5vw,3.7rem);letter-spacing:-.045em;line-height:1.1;margin:14px 0 20px}
.romance-intro .lead{font-size:1.1rem;line-height:1.7}
.romance-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.romance-card{border:1px solid #302838;border-radius:22px;overflow:hidden;background:#1c1725;transition:transform .2s,border-color .2s}
.romance-card:hover{transform:translateY(-4px);border-color:#c180b2}
.romance-image{display:block;position:relative;aspect-ratio:2/3;overflow:hidden;color:white}
.romance-image img{width:100%;height:100%;object-fit:cover;object-position:50% 25%}
.romance-image:after{content:"";position:absolute;inset:50% 0 0;background:linear-gradient(transparent,rgba(12,8,18,.9))}
.romance-caption{position:absolute;bottom:16px;left:20px;right:20px;z-index:1}
.romance-caption h2{font-size:1.65rem;margin:0}.romance-caption h2 span{font-size:1rem;font-weight:400;color:#e0d4e8}
.romance-caption p{margin:4px 0 0;font-size:.85rem;color:#eee0f3}
.romance-card-body{padding:18px;display:flex;flex-direction:column;gap:18px}
.romance-card-body p{font-size:.92rem;line-height:1.6;min-height:4.8em;margin:0;color:#d9cfe0}
.romance-card-tags{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:-7px 0 0;padding:0;min-height:26px}
.romance-card-tags li{padding:4px 9px;border-radius:999px;border:1px solid #5a4564;background:#2a2034;color:#ebd9ee;font-size:.72rem;line-height:1.2}
.romance-profile-link{align-self:flex-start;color:#eab4d7;font-size:.84rem;font-weight:700}
.romance-filters{display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin;padding:0 1px 14px;margin:-8px 0 8px}
.romance-filter{flex:0 0 auto;min-height:40px;border:1px solid #5a4564;border-radius:999px;padding:8px 15px;background:#231b2d;color:#e9dce9;font:inherit;font-size:.84rem;cursor:pointer}
.romance-filter:hover{border-color:var(--accent)}
.romance-filter[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#211324;font-weight:700}
.romance-benefits{display:grid;grid-template-columns:repeat(3,1fr);gap:32px;padding:64px 0;border-bottom:1px solid #302838}
.romance-benefits span{color:#d391ca;font-size:.8rem;letter-spacing:.15em}.romance-benefits h2{font-size:1.25rem}.romance-benefits p{color:#b9afc2;line-height:1.75}
.romance-faq{max-width:850px;margin:56px auto}.romance-faq details{padding:20px 0;border-bottom:1px solid #302838}.romance-faq summary{cursor:pointer;font-weight:600}.romance-faq p{color:#b9afc2;line-height:1.8}
@media(max-width:1000px){.romance-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.romance-tabs{gap:8px}.romance-tabs a{padding:9px 12px;font-size:.8rem}.romance-intro{padding-top:6px}.romance-gallery{gap:12px}.romance-caption{left:12px;bottom:12px}.romance-caption h2{font-size:1.2rem}.romance-card-body{padding:12px;gap:12px}.romance-card-body p{font-size:.8rem;min-height:8em}.romance-card-body .btn{padding:10px 5px;font-size:.8rem}.romance-benefits{grid-template-columns:1fr;gap:18px;padding:38px 0}.romance-image{aspect-ratio:3/5}}
@media(prefers-reduced-motion:reduce){.romance-card{transition:none}.romance-card:hover{transform:none}}

.page-romance .main{width:100%;max-width:1256px;margin:0 auto;padding:0 28px;box-sizing:border-box}
@media(max-width:600px){.page-romance .main{padding:0 16px}}

.romance-intro{padding:8px 0 12px}.romance-search{display:flex;align-items:center;gap:12px;margin:16px 0 24px;padding:14px 18px;border:1px solid #393043;border-radius:16px;background:#1c1725}.romance-search label{margin:0;font-size:.85rem;white-space:nowrap}.romance-search input{max-width:380px;margin:0}.romance-search[hidden],.romance-card[hidden]{display:none}.anime-note{color:#b9afc2;font-size:.85rem;border-left:2px solid #b783e0;padding-left:14px;line-height:1.6}.romance-card:focus-within{border-color:#d88bbb}
@media(max-width:600px){.romance-search{flex-wrap:wrap;padding:12px}.romance-search label{width:100%}.romance-search input{flex:1;min-width:0}.romance-intro h1{margin-top:8px}.romance-tabs{gap:6px}.romance-tabs a{padding:8px 10px;font-size:.75rem}}

.romance-search input[type=search]{appearance:none;background:#100d17;border:1px solid #4a3d55;border-radius:10px;color:#f6effb;padding:11px 13px;font:inherit;min-height:42px}.romance-search input:focus-visible{outline:2px solid #d391ca;outline-offset:2px}
@media(max-width:600px){.romance-tabs{flex-wrap:nowrap;overflow-x:auto;margin:20px 0 16px}.romance-tabs a{white-space:nowrap;flex-shrink:0}.romance-intro h1{font-size:2rem;margin-bottom:12px}.romance-intro .lead{font-size:.95rem;line-height:1.6;margin:12px 0}.romance-intro .eyebrow{font-size:.65rem;margin:8px 0}.romance-intro .fineprint{margin:12px 0}.romance-search{margin-top:12px}}
@media(max-width:600px){.page-romance .romance-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.page-romance .romance-tabs a{text-align:center}}

.category-directory{max-width:1256px;margin:auto;padding:52px 28px}.category-directory h1{font-size:clamp(2.3rem,4vw,3.8rem);letter-spacing:-.04em;line-height:1.12;max-width:750px;margin:16px 0}.category-directory>.lead{max-width:700px;font-size:1.1rem}.category-tools{margin:30px 0 24px;max-width:500px}.category-tools label{font-size:.85rem;color:#d6cadf}.category-tools input{display:block;width:100%;box-sizing:border-box;background:#1c1725;color:white;border:1px solid #47394f;border-radius:12px;padding:14px;font:inherit;margin-top:8px}.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.category-card{display:block;border:1px solid #393043;background:#1c1725;border-radius:22px;overflow:hidden;color:inherit;text-decoration:none;transition:transform .2s,border-color .2s}.category-card:hover{transform:translateY(-4px);border-color:#d391ca;text-decoration:none}.category-card img{width:100%;height:340px;object-fit:cover;object-position:50% 25%}.category-card>div{padding:24px}.category-card span{font-size:.8rem;color:#bb9fd1}.category-card h2{font-size:1.6rem;margin:8px 0 12px}.category-card p{color:#b9afc2;line-height:1.65;min-height:5em}.category-card strong{color:#e5b5db;font-size:.95rem}.category-card[hidden],.category-tools[hidden]{display:none}.category-tools input:focus-visible,.category-card:focus-visible{outline:2px solid #d391ca;outline-offset:4px}
@media(max-width:700px){.category-directory{padding:30px 18px}.category-grid{grid-template-columns:1fr}.category-card img{height:310px}.category-card p{min-height:0}.category-card>div{padding:20px}}
@media(prefers-reduced-motion:reduce){.category-card{transition:none}.category-card:hover{transform:none}}

.creator{max-width:900px}.creator h1{letter-spacing:-.035em}.creator-progress{display:flex;gap:12px;margin:26px 0}.creator-progress span{flex:1;padding:12px;border-bottom:2px solid #393043;color:#a99bb8}.creator-progress span[aria-current=step]{border-color:#d391ca;color:#f3dbf0}.creator-style-examples{display:grid;grid-template-columns:1fr 1fr;gap:18px;max-width:500px}.creator-style-examples>div{position:relative;border-radius:16px;overflow:hidden}.creator-style-examples img{width:100%;height:210px;object-fit:cover;object-position:50% 20%;display:block}.creator-style-examples span{position:absolute;bottom:0;left:0;right:0;padding:24px 14px 10px;background:linear-gradient(transparent,#100b19);font-weight:600}.creator-presets{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 24px}.creator-presets button{background:#30203c;color:#eddbf6;border:1px solid #624774;border-radius:24px;padding:9px 16px;cursor:pointer}.creator-controls{display:flex;justify-content:space-between;gap:16px;border-top:1px solid #393043;margin-top:24px;padding-top:22px}.creator-controls #creatorNext{margin-left:auto}.creator-summary{background:#110e19;border-radius:14px;padding:18px;margin:20px 0;overflow-wrap:anywhere}.creator-summary p{margin:8px 0;color:#cabdd4}.creator [hidden]{display:none!important}.creator-form h2{margin-top:0}.creator-form h2:focus{outline:none}
@media(max-width:600px){.creator-progress{gap:5px;font-size:.8rem}.creator-progress span{padding:10px 4px}.creator-style-examples img{height:180px}.creator-form{padding:20px}}

.feature-picker{text-align:center}.visual-options{border:0;padding:0;margin:26px 0 32px;min-width:0}.visual-options legend{font-size:1.25rem;font-weight:700;margin-bottom:16px;width:100%;text-align:center}.visual-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.visual-option{position:relative;display:block;margin:0!important;cursor:pointer}.visual-option input{position:absolute;opacity:0;width:1px;height:1px}.visual-tile{position:relative;display:block;aspect-ratio:1;border-radius:16px;border:2px solid transparent;overflow:hidden;background-repeat:no-repeat;background-size:300% 200%;background-origin:border-box;background-color:#332a37}.hair-styles .visual-tile{background-image:url('/Content/creator/hair-styles.jpg')}.hair-colors .visual-tile{background-image:url('/Content/creator/hair-colors.jpg')}.visual-tile.tile-0{background-position:0 0}.visual-tile.tile-1{background-position:50% 0}.visual-tile.tile-2{background-position:100% 0}.visual-tile.tile-3{background-position:0 100%}.visual-tile.tile-4{background-position:50% 100%}.visual-tile.tile-5{background-position:100% 100%}.visual-label{position:absolute;bottom:0;left:0;right:0;padding:30px 4px 10px;background:linear-gradient(transparent,rgba(0,0,0,.85));color:white;font-size:.82rem;font-weight:600}.visual-check{display:none;position:absolute;right:7px;top:7px;background:#f36896;color:white;border-radius:50%;width:23px;height:23px;line-height:23px;font-size:14px}.visual-option input:checked+.visual-tile{border-color:#f36896;box-shadow:0 0 0 1px #f36896}.visual-option input:checked+.visual-tile .visual-check{display:block}.visual-option input:focus-visible+.visual-tile{outline:3px solid #d5b5ff;outline-offset:4px}.eye-colors{grid-template-columns:repeat(3,minmax(0,1fr));max-width:440px;margin:auto}.eye-colors .visual-tile{background-image:url('/Content/creator/eye-colors.jpg');background-size:300% 100%}.creator-progress{position:relative}.creator-progress span[aria-current=step]{border-color:#f36896}.visual-option:hover .visual-tile{filter:brightness(1.06)}
@media(max-width:700px){.visual-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.creator-progress{font-size:.72rem}.creator-progress span{padding:10px 2px}.visual-label{font-size:.75rem}.visual-options legend{font-size:1.1rem}}

/* Adult entry prompt and browse-first homepage. */
.age-required{overflow:hidden}.age-required #form1{visibility:hidden}
.age-gate{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:24px;background:#0c0a10;overflow:auto}.age-gate[hidden]{display:none}
.age-card{display:grid;grid-template-columns:.85fr 1fr;width:min(940px,100%);border:1px solid #352a40;border-radius:28px;overflow:hidden;background:#1b1723;box-shadow:0 30px 100px #0008}
.age-art{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:40px;background:radial-gradient(ellipse at center,#76405d 0, #35203e 45%,#1b1723 75%)}
.age-art strong{font-size:100px;line-height:1;color:#ff8cae;letter-spacing:-6px}.age-art .brand-mark{font-size:42px;width:70px;height:70px}.age-art>span:last-child{font-size:23px;font-weight:700}
.age-copy{padding:50px 40px}.age-copy h1,.age-copy h2{font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.15;margin:14px 0 22px}.age-copy p{color:#c8bfce;line-height:1.7}.age-copy .btn{margin-top:12px}.age-legal{display:flex;gap:22px;font-size:.85rem;margin-top:24px}
.browse-rail{display:none}.page-discover .hero{max-width:1400px;padding:32px;gap:32px;grid-template-columns:1.4fr 1fr;background:linear-gradient(120deg,#27182f,#171320);border:1px solid #3a2942;border-radius:24px;margin:24px auto}
.page-discover .hero h1{font-size:clamp(2rem,3.3vw,3rem);margin:14px 0}.page-discover .hero .lead{font-size:1rem;line-height:1.65}.page-discover .hero-portraits{max-width:360px;margin:auto}.page-discover .hero-person{aspect-ratio:3/4;border-radius:22px}.page-discover .hero-message{display:none}.page-discover .hero-cta{margin-top:20px}.page-discover .hero .fineprint{margin-bottom:0}
.page-discover .showcase{max-width:1400px;padding:20px 0}.page-discover .discovery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.page-discover .discovery-card{border-radius:18px;overflow:hidden;background:#1b1722;border-color:#332939}.page-discover .discovery-photo{aspect-ratio:4/5}.page-discover .discovery-body{padding:18px}.page-discover .discovery-body h3{font-size:1.2rem}.page-discover .discovery-body .section-head{flex-wrap:wrap;gap:8px}.page-discover .discovery-filters{background:#1b1722;padding:16px;border:1px solid #332939;border-radius:16px}.page-discover .romance-tabs{margin:18px 0}
.create-banner{display:flex;align-items:center;gap:18px;padding:20px 24px;margin:18px 0 24px;border:1px solid #634373;border-radius:18px;background:linear-gradient(110deg,#32213e,#201829);text-decoration:none;color:#fff}.create-banner:hover{border-color:#e999d3}.create-banner-icon{display:grid;place-items:center;width:48px;height:48px;background:#5c3969;border-radius:14px;font-size:30px}.create-banner strong{display:block;font-size:1.1rem}.create-banner small{display:block;color:#c7bbd0;margin-top:5px}.create-banner>span:last-child{margin-left:auto;font-size:24px}
@media(min-width:1200px){.page-discover .main{margin-left:230px;padding:0 30px}.page-discover .footer{margin-left:230px}.browse-rail{display:flex;flex-direction:column;gap:8px;position:fixed;top:92px;left:18px;width:192px;padding-top:16px}.browse-rail>a{padding:13px 16px;border-radius:12px;text-decoration:none;color:#d4c8dc}.browse-rail>a:hover,.browse-rail>a[aria-current]{background:#31223b;color:#fff}.browse-rail>.btn{margin-top:20px}.browse-rail .small{line-height:1.7;padding:12px}}
@media(min-width:1550px){.page-discover .discovery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1199px){.page-discover .main{padding:0 20px}}
@media(max-width:700px){.age-gate{padding:16px;align-items:start}.age-card{grid-template-columns:1fr;margin:auto}.age-art{padding:20px;gap:12px;flex-direction:row}.age-art strong{font-size:46px;letter-spacing:-2px}.age-art .brand-mark{width:38px;height:38px;font-size:24px}.age-art>span:last-child{font-size:18px}.age-copy{padding:24px}.page-discover .main{padding:0 16px}.page-discover .hero{grid-template-columns:1fr;padding:24px;gap:0;margin:16px 0}.page-discover .hero-visual{display:none}.page-discover .hero h1{font-size:2.2rem}.page-discover .discovery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.page-discover .discovery-body{padding:12px}.page-discover .discovery-body h3{font-size:1.05rem}.page-discover .discovery-body .tag{font-size:.65rem}.page-discover .discovery-body .btn{padding:10px 8px;font-size:.8rem}.create-banner{padding:16px;gap:12px}.create-banner small{line-height:1.5}.page-discover .discovery-filters{flex-wrap:wrap}.page-discover .discovery-filters label{min-width:0;flex:1 1 180px}}

@media(min-width:1200px){.page-with-rail .main{width:calc(100% - 230px);max-width:none;margin:0 0 0 230px;padding:28px 30px 0}.page-with-rail .footer{margin-left:230px}.page-with-rail .romance-tabs{display:none}}

.skip-link{position:fixed;top:8px;left:16px;transform:translateY(-160%);z-index:1100;background:#fff;color:#201525;padding:12px 20px;border-radius:10px}.skip-link:focus{transform:none}
.browse-tools{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:14px 0 22px}.browse-tools[hidden],.memory-tools[hidden],.memory-list>li[hidden]{display:none}.browse-tools select{width:auto}.browse-tools [role=status]{margin-left:auto;color:#c8bbd3;font-size:.9rem}
.story-starters{flex-shrink:0;padding:10px 16px;border-top:1px solid #352d40;background:#19141f}.story-starters[open]{max-height:35vh;overflow:auto}.story-starters summary{cursor:pointer;font-weight:600}.preset-row{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.memory-tools{margin-bottom:20px}.memory-tools label{display:block;margin:10px 0}.memory-tools input[type=checkbox]{width:auto;margin-right:8px}.memory-tools input[type=search]{width:100%}
:focus-visible{outline:3px solid #d8b4fe;outline-offset:3px}.story-starters .btn,.preset-row .btn{min-height:44px}.age-copy select{margin:8px 0 12px;width:100%}
@media(max-width:600px){.browse-tools select{max-width:100%}.browse-tools [role=status]{width:100%;margin-left:0}.memory-list>li{flex-wrap:wrap}.memory-body{min-width:0;flex-basis:70%}.story-starters{padding:8px 12px}.story-starters summary{min-height:32px;line-height:32px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

.discovery-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:.9rem;color:#cabed4}.discovery-summary[hidden]{display:none}.discovery-filters{flex-wrap:wrap}.discovery-filters label{flex:1 1 140px;min-width:0}.discovery-filters .discovery-search{flex:2 1 220px}
.history-search{flex-shrink:0;padding:10px 16px;border-bottom:1px solid #352d40;background:#19141f}.history-search[open]{max-height:38vh;overflow:auto}.history-search summary{cursor:pointer;min-height:30px;line-height:30px}.history-search-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}.history-search-controls label{width:100%}.history-search-controls input{flex:1;min-width:100px}.history-search ol{list-style:none;padding:0;margin:12px 0}.history-search li{padding:12px;border:1px solid #403347;border-radius:12px;margin:8px 0}.history-search li strong{font-size:.8rem;color:#d1bddc}.history-search li p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0;font-size:.9rem}.history-search li .show-in-chat{background:none;border:0;padding:0;min-height:32px;font:inherit;font-size:.85rem;color:var(--accent);text-decoration:underline;cursor:pointer}.bubble.found{outline:2px solid var(--accent);outline-offset:3px}.every-plan{text-align:center;max-width:46rem;margin:18px auto 6px}.history-search li mark{background:#6d3f8f;color:#fff;border-radius:3px;padding:0 2px}.milestone.chat-break{background:none;border:1px dashed #6b5a7b;color:#e4d6ee;font-weight:500}
@media(max-width:600px){.history-search{padding:8px 12px}.discovery-summary{align-items:flex-start}.discovery-summary .btn{flex-shrink:0}}

/* ---- left menu (2026-09-25) ---- */
.side-menu{display:none}
@media(min-width:1024px){
  body.has-side .main{margin-left:236px;width:auto;max-width:none;padding-left:24px;padding-right:24px;box-sizing:border-box}
  body.has-side .footer{margin-left:236px}
  body.has-side .topbar .nav-dup{display:none}
  body.has-side.page-with-rail .romance-tabs,body.has-side .page-romance .romance-tabs{display:none}
  .side-menu{display:flex;flex-direction:column;gap:14px;position:fixed;top:64px;bottom:0;left:0;width:220px;padding:14px 12px 16px;overflow-y:auto;box-sizing:border-box;border-right:1px solid rgba(255,255,255,.07);background:#140f1b;z-index:20}
  .side-group{display:flex;flex-direction:column;gap:2px}
  .side-group a,.side-more summary{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;color:#d4c8dc;text-decoration:none;cursor:pointer;list-style:none}
  .side-more summary::-webkit-details-marker{display:none}
  .side-group a>span,.side-more summary>span{width:20px;text-align:center}
  .side-group a:hover,.side-group a[aria-current],.side-more summary:hover{background:#2b1f35;color:#fff}
  .side-more a{padding-left:42px;font-size:.9rem}
  .side-bottom{margin-top:auto}
  .side-label{display:block;font-size:.75rem;color:#9d8fab;margin:0 4px 6px;text-transform:uppercase;letter-spacing:.06em}
  .side-seg{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;background:#211829;border-radius:10px;padding:4px}
  .side-seg a{text-align:center;padding:6px 0;border-radius:8px;font-size:.82rem;color:#cbbfd6;text-decoration:none}
  .side-seg a.on{background:#8b5cf6;color:#fff}
  .side-upgrade{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;border-radius:12px;text-decoration:none;color:#fff;font-weight:600;background:linear-gradient(120deg,#8b5cf6,#ec4899)}
  .side-upgrade>span:first-child{display:flex;gap:8px}
  .side-badge{background:#fff;color:#be185d;border-radius:999px;padding:2px 8px;font-size:.72rem;font-weight:700;white-space:nowrap}
  .side-note{font-size:.75rem;color:#8c7f99;margin:0 6px;line-height:1.5}
}
.promo-banner{display:inline-flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;margin:10px auto 0;padding:10px 16px;border-radius:12px;background:linear-gradient(120deg,rgba(139,92,246,.2),rgba(236,72,153,.2));border:1px solid rgba(236,72,153,.4)}
.price .was{opacity:.55;font-weight:400;font-size:.7em;margin-right:4px}
.promo-tag{background:#ec4899;color:#2a0f1f;margin-top:6px;display:inline-block}
.center .lead{margin-left:auto;margin-right:auto}
/* ---- left menu v2: full height, logo, line icons (2026-09-25) ---- */
@media(min-width:1024px){
  .side-menu{top:0;gap:6px;padding:18px 12px 14px;background:linear-gradient(180deg,#1d1530 0%,#120e19 45%,#0f0c15 100%)}
  body.has-side .topbar{padding-left:252px}
  body.has-side .topbar .brand{display:none}
  .side-logo{display:flex;align-items:center;gap:10px;padding:4px 10px 16px;text-decoration:none;color:#fff;font-weight:800;font-size:1.35rem;letter-spacing:.01em}
  .side-logo .brand-mark{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#f472b6,#8b5cf6);font-size:1.05rem}
  .side-logo span:last-child{background:linear-gradient(90deg,#f0abfc,#a78bfa);-webkit-background-clip:text;background-clip:text;color:transparent}
  .side-group a svg,.side-more summary svg,.side-upgrade svg{width:20px;height:20px;flex:none}
  .side-main{padding-top:8px;border-top:1px solid rgba(255,255,255,.07);gap:4px}
  .side-group a[aria-current]{background:linear-gradient(90deg,#2a1f45,#231a36);color:#fff;font-weight:600}
  .side-bottom{margin-top:auto;display:flex;flex-direction:column;gap:10px}
  .side-account{padding-top:10px;border-top:1px solid rgba(255,255,255,.07)}
  .side-upgrade{background:linear-gradient(120deg,#4c2a86,#6d3fc0);border:1px solid rgba(167,139,250,.45)}
  .side-more[open] summary{background:#2b1f35;color:#fff}
  .side-more .side-interest{margin:8px 6px 6px}
}
.gallery-ask{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin-top:12px}
.gallery-item{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:inherit}
.gallery-item img{width:100%;aspect-ratio:4/5;object-fit:cover;object-position:50% 25%;border-radius:14px;background:#1d1626}
.gallery-item span{font-size:.85rem;color:#b9abc7}
.trust-row{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 22px;list-style:none;padding:0;margin:18px auto;color:#cbbfd6;font-size:.9rem}
.faq{max-width:760px;margin:28px auto 8px}
.faq h2{text-align:center}
.faq details{border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px 16px;margin:10px 0;background:#1a1422}
.faq summary{cursor:pointer;font-weight:600}
.faq p{margin:10px 0 2px;color:#cbbfd6}
.persona-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px;margin:14px 0}
.persona-card label{display:block;margin-top:8px;font-size:.85rem;color:#b9abc7}
.persona-card input,.persona-card select,.persona-card textarea{width:100%;box-sizing:border-box}
.persona-card .start-row{margin-top:10px;flex-wrap:wrap}
.persona-assign{align-items:center;margin:6px 0}.persona-assign .companion-name{min-width:120px}
.google-signin{display:flex;flex-direction:column;align-items:center;gap:6px;margin:10px 0 4px}
.or-divider{display:flex;align-items:center;gap:10px;width:100%;color:var(--muted);font-size:.85rem}
.or-divider::before,.or-divider::after{content:"";flex:1;height:1px;background:rgba(255,255,255,.1)}
.tag-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.tag-chips .chip{border:1px solid rgba(255,255,255,.12);background:#1d1626;color:#d4c8dc;border-radius:999px;padding:7px 14px;font-size:.88rem;cursor:pointer}
.tag-chips .chip:hover{border-color:#8b5cf6}
.tag-chips .chip.on{background:linear-gradient(120deg,#7c3aed,#be185d);color:#fff;border-color:transparent}

/* Voice call */
.call-btn { margin-left: .4rem; }
.call-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(8, 6, 20, .88); backdrop-filter: blur(8px); padding: 16px; }
.call-overlay[hidden] { display: none; }
.call-card { text-align: center; max-width: 360px; width: 100%; }
.call-card .avatar-xl { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; object-position: center 20%; margin: 0 auto 1rem; display: block; box-shadow: 0 0 0 4px var(--accent); animation: call-pulse 2s ease-in-out infinite; }
.call-card h2 { margin: .2rem 0; }
.call-status { opacity: .8; min-height: 1.4em; margin: .3rem 0; }
.call-timer { font-size: 1.6rem; font-variant-numeric: tabular-nums; margin: .4rem 0 1.4rem; }
.call-actions { display: flex; gap: .8rem; justify-content: center; }
.call-hangup { background: var(--danger); color: #fff; border-color: var(--danger); }
#callMute[aria-pressed="true"] { background: var(--accent-2); color: #111; }
@keyframes call-pulse { 50% { box-shadow: 0 0 0 10px rgba(244, 114, 182, .25); } }
@media (prefers-reduced-motion: reduce) { .call-card .avatar-xl { animation: none; } }
/* Suggested replies */
.suggest { display: flex; flex-wrap: wrap; gap: .4rem; padding: .4rem 0 .2rem; align-items: center; }
.suggest[hidden] { display: none; }
.suggest-chip { border: 1px solid var(--accent-2); background: transparent; color: inherit; border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .9rem; cursor: pointer; max-width: 100%; text-align: left; }
.suggest-chip:hover { background: rgba(167, 139, 250, .15); }
.suggest-off { border: 0; background: transparent; color: inherit; opacity: .6; cursor: pointer; font-size: 1.1rem; padding: .2rem .5rem; min-width: 32px; min-height: 32px; }
/* Invite */
.invite-row { display: flex; gap: .5rem; align-items: center; margin: .5rem 0; }
.invite-row input { flex: 1; min-width: 0; }

/* Community */
.community .tabs { display: flex; gap: 1rem; margin: .5rem 0 1rem; }
.community .tabs a[aria-current] { font-weight: 600; text-decoration: underline; }
.report-char summary { cursor: pointer; font-size: .85rem; opacity: .75; }
.report-char[open] { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.share-agree { display: flex; gap: .5rem; align-items: flex-start; margin: .5rem 0; }
.tag.status-approved { background: rgba(52, 211, 153, .2); }
.tag.status-pending { background: rgba(251, 191, 36, .2); }
.tag.status-rejected { background: rgba(248, 113, 113, .2); }

/* Character profile */
.profile-card { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 2rem; align-items: start; margin: 1.5rem 0; }
.profile-photo { position: relative; border-radius: 18px; overflow: hidden; }
.profile-photo img { width: 100%; height: auto; display: block; }
.profile-photo > #profileMain { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; }
.profile-backstory { line-height: 1.7; overflow-wrap: anywhere; }
.profile-photo .discovery-fallback { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; font-size: 5rem; position: relative; }
.profile-photo .discovery-fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.profile-body h1 { margin: .2rem 0; }
.profile-tagline { font-size: 1.15rem; }
.profile-tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .6rem 0; }
.profile-sample { border-left: 3px solid var(--accent); margin: 1rem 0 .3rem; padding: .4rem .9rem; font-style: italic; }
.profile-actions { flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
#like[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.profile-similar { margin: 2rem 0; }
/* Editing the companion's newest reply */
.reply-editor { display: flex; flex-wrap: wrap; gap: 8px; align-self: stretch; max-width: min(560px, 92%); }
.reply-editor textarea { flex: 1 1 100%; min-height: 96px; border-radius: 14px; padding: 10px 12px; }

/* Chat text size (chat options → Aa), remembered per device */
html[data-chat-text="small"] .bubble { font-size: .9375rem; }
html[data-chat-text="large"] .bubble { font-size: 1.125rem; }
html[data-chat-text="larger"] .bubble { font-size: 1.25rem; }

.help-filter { width: 100%; max-width: 520px; margin: 4px 0 18px; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
.whats-new { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.whats-new ul { margin: 8px 0; padding-left: 20px; }
.whats-new li { margin: 4px 0; }
.whats-new .link { min-height: 32px; min-width: 44px; padding: 0 8px; }

/* Group chats (/App/Groups.aspx, /App/Group.aspx) */
.companions-groups { margin: 14px 0 0; }
.group-entry { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.group-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; }
.group-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.group-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-height: 44px; }
.group-faces { display: inline-flex; flex: none; }
.group-faces .avatar + .avatar { margin-left: -12px; box-shadow: 0 0 0 2px var(--panel); }
.group-meta { display: flex; flex-direction: column; min-width: 0; }
.group-meta strong, .group-meta h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-item { flex-wrap: wrap; }
.group-edit summary { list-style: none; cursor: pointer; }
.group-edit summary::-webkit-details-marker { display: none; }
.group-edit[open] { flex-basis: 100%; order: 3; }
.group-edit-body { padding-top: 6px; }
.group-new { margin-top: 18px; }
.group-new h2 { margin-top: 0; }
.group-pick { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.group-pick legend { margin-bottom: 8px; }
.group-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.group-choice:has(input:checked) { border-color: var(--accent); background: var(--panel-2); }
.group-choice input { width: 20px; height: 20px; margin: 0; }
.group-room { display: flex; flex-direction: column; max-width: 820px; height: calc(100dvh - 90px); padding-top: 10px; padding-bottom: 6px; }
.group-head { display: flex; align-items: center; gap: 12px; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.group-head h1 { margin: 0; font-size: 1.15rem; }
.group-head .group-meta { flex: 1; }
.group-scene { display: flex; align-items: center; gap: 6px; margin: 0; flex: none; }
.group-scene select { max-width: 9.5rem; min-height: 40px; padding: 4px 8px; }
.group-head .icon-link, .group-head .group-faces { flex: none; }
.group-head .group-meta { min-width: 0; }
@media (max-width: 480px) { .group-head { flex-wrap: wrap; } .group-scene { flex-basis: 100%; } .group-scene select { max-width: none; flex: 1; } }
.group-head .icon-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: inherit; text-decoration: none; font-size: 1.2rem; }
.group-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px 2px; }
.group-line { display: flex; align-items: flex-end; gap: 8px; }
.group-line.me { justify-content: flex-end; }
.group-line.them { align-items: flex-start; }
.group-line.them > .avatar { margin-top: 22px; }   /* beside the bubble, below the name */
.group-line.pending { opacity: .7; }
.group-said { display: flex; flex-direction: column; gap: 3px; max-width: min(560px, 82%); }
.group-line.me .group-said { align-items: flex-end; }
.group-said .bubble { max-width: 100%; }
.group-said .speaker { font-size: .8rem; color: var(--muted); padding-left: 4px; }
.group-said .group-tools { display: flex; gap: 4px; }
.group-said .group-play, .group-said .group-share { align-self: flex-start; min-width: 44px; min-height: 36px; padding: 0 12px; }
.group-typing { padding-left: 44px; }
.group-composer { padding: 10px 0 4px; }
.group-composer textarea { flex: 1; }
.group-composer .group-talk { flex: none; min-width: 44px; padding-left: 12px; padding-right: 12px; font-size: 1.1rem; }
.group-room .composer-foot { padding: 0 4px 4px; text-align: center; }
@media (max-width: 600px) { .group-room { height: calc(100dvh - 70px); } .group-said { max-width: 86%; } }

.hero-also { flex-basis: 100%; margin: 4px 0 0; color: var(--muted); }
.hero-also a { display: inline-block; padding: 6px 2px; min-height: 32px; }

/* Say hi before signing up (character page) */
.guest-chat { max-width: 720px; margin: 2rem 0; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.guest-chat h2 { margin: 0 0 4px; font-size: 1.25rem; }
.guest-log { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; max-height: 360px; overflow-y: auto; }
.guest-log:empty { display: none; }
.guest-log > .bubble.them:first-child { animation: guest-open .45s ease-out both; }
@keyframes guest-open { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .guest-log > .bubble.them:first-child { animation: none; } }
.guest-compose { display: flex; gap: 8px; }
.guest-compose input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
.guest-error { color: var(--danger); margin: 8px 0 0; }
.guest-failed-label { display: block; margin-top: 4px; font-weight: 600; }
.guest-signup { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--panel-2); text-align: center; }
.guest-signup p { margin: 0 0 10px; }
.guest-chat .fineprint { margin: 10px 0 0; }

@media (max-width: 760px) { .profile-card { grid-template-columns: 1fr; gap: 1rem; } }
.tag-chips a.chip { display: inline-block; text-decoration: none; }

.profile-album { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; padding-bottom: 2px; }
.album-thumb { flex: 0 0 64px; height: 80px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.album-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; }
.album-thumb.on { border-color: var(--accent); }.profile-photo { overflow: visible; }
.profile-photo > img, .profile-photo > .discovery-fallback { border-radius: 18px; overflow: hidden; }

/* Moments */
.moments-feed { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.moment-head { display: flex; gap: .7rem; align-items: center; }
.moment-text { margin: .7rem 0; line-height: 1.55; }
.moment-photo { width: 100%; aspect-ratio: 4 / 5; height: auto; max-height: 520px; object-fit: cover; object-position: center 22%; border-radius: 14px; display: block; }   /* no taller than 4:5, like a feed */
.moment-actions { margin-top: .7rem; }
.profile-scenario, .scenario-hook { border-left: 3px solid var(--accent-2); padding-left: .7rem; }

/* Generate */
.generate-card { margin: 1rem 0; }
.generate-card select { margin: .3rem 0 .6rem; }
.generate-presets { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Match quiz */
.match-quiz fieldset { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.match-quiz legend { font-weight: 600; margin-bottom: .4rem; width: 100%; }
.match-quiz label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); cursor: pointer; }
.match-quiz label:has(input:checked) { border-color: var(--accent); background: rgba(244, 114, 182, .14); }
.match-quiz input { accent-color: var(--accent); }
.match-quiz label:has(input:focus-visible) { outline: 3px solid #d8b4fe; outline-offset: 2px; }
.match-card img { width: 100%; height: auto; border-radius: 12px; display: block; margin-bottom: .6rem; }
.hero-quiz { display: inline-block; margin-top: .6rem; }

/* Top-up packs */
.topup { margin: 1.5rem auto; max-width: 760px; text-align: center; }
.topup .btn-row { justify-content: center; flex-wrap: wrap; gap: .6rem; }

/* Yearly-first pricing */
.price .billed { display: block; font-size: .8rem; margin-top: .15rem; }

/* Safety links stand out wherever they appear (age notice, side menu, footer) */
a[href="/Safety.aspx"]{font-weight:700}
/* "New" badge on the newest story series (home stories card, story picker) */
.badge-new{display:inline-block;margin-left:.2rem;padding:0 .45rem;border-radius:999px;background:#f2a4d8;color:#1a0f1f;font-size:.75rem;font-weight:700;line-height:1.6;vertical-align:middle}
/* Brand mark: the app icon (pink N) inside the rounded square */
.brand-mark.brand-mark-icon{background:none;overflow:hidden;padding:0}.brand-mark-icon img{width:100%;height:100%;display:block;border-radius:inherit}

/* Phone header: one row (brand, sign in, get started, menu); secondary links move into the menu. */
.nav-more { display: none; position: relative; }
.nav-more summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; font-size: 1.1rem; color: var(--text); }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-more-panel { position: absolute; right: 0; top: 48px; min-width: 210px; display: flex; flex-direction: column; gap: 2px; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); z-index: 20; }
.nav-more-panel a { padding: 10px 12px; border-radius: 10px; }
.nav-more-panel a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav-more-panel select.lang-switch { margin: 8px 6px 2px; max-width: none; }
@media (max-width: 600px) {
    .nav > .nav-dup, .nav > select.lang-switch { display: none; }
    .nav-more { display: block; }
    .topbar { flex-wrap: nowrap; }
    .nav { width: auto; flex-wrap: nowrap; margin-left: auto; gap: 10px; }
}
/* the full-height chat has no side menu: up to small laptops its header links go behind the menu too, so the header stays one row */
@media (min-width: 601px) and (max-width: 1100px) {
    body.page-chat .nav > .nav-dup { display: none; }
    body.page-chat .nav-more { display: block; }
}
/* Phone home: companions are the first thing visitors see; the decorative message bubble waits for wider screens. */
@media (max-width: 600px) {
    .page-discover .hero-visual { display: block; order: -1; padding: 0 0 2px; }
    .hero-message { display: none; }
    .hero { gap: 18px; padding-top: 20px; }
    .hero-portraits { max-width: 280px; gap: 8px; }
    .hero-person-main { transform: translateY(-8px); }
}
/* Phones: comfortable tap targets for header, FAQ, footer and profile links; small labels stay readable. */
@media (max-width: 600px) {
    .nav > a:not(.btn) { padding: 10px 4px; }
    .faq summary, .romance-faq summary { padding-top: 12px; padding-bottom: 12px; }
    .footer a { display: inline-block; padding: 8px 2px; }
    .romance-profile-link { padding: 8px 0; }
    .eyebrow, .hero .eyebrow, .romance-intro .eyebrow { font-size: .75rem; }
    .tag, .page-discover .discovery-body .tag { font-size: .75rem; }
    .hero-quiz, .closing-pricing, button.link, .portrait-view, .discovery-body h3 a { display: inline-block; padding: 8px 0; }
    .chip { min-height: 36px; }
    .nav > a.nav-signin { display: none; }
    .container { padding-top: 22px; }
    .portrait-gallery-nav a, label a.small { display: inline-block; padding: 8px 2px; }
    #portraitCollectionTitle { font-size: 1.6rem; }
    .brand { white-space: nowrap; }
    .personality-preview summary { padding: 8px 0; }
    .footer a { min-width: 32px; text-align: center; }
    nav.tabs a { display: inline-block; padding: 8px 4px; }
    .about-me summary { padding: 10px 0; }
    .verify-banner a { display: inline-block; padding: 8px 4px; }
    .verify-address { display: none; }
    .verify-banner { padding: 2px 16px; }
    input[type=checkbox], input[type=radio], label.check input[type=checkbox] { width: 20px; height: 20px; flex: 0 0 20px; }
    #practiceSelect, #voicePick, #textSize, #replyLength, #chatBackdrop, .history-search summary, .history-search-controls input { min-height: 36px; }
    .chat-tools label.switch { min-height: 36px; }
    .discovery-filters label, .discovery-filters .discovery-search { flex: 0 0 auto; }
    .page-discover .discovery-filters label { flex: 0 0 auto; }
    /* two-column cards: photo, name, tagline and Meet; the profile page has the rest */
    .discovery-body > p:nth-of-type(3), .discovery-body .portrait-view, .discovery-body .personality-preview { display: none; }
    .purpose-boundary { flex-wrap: wrap; }
    body .purpose-boundary > div { flex: 1 1 calc(100% - 40px); }
    body .purpose-boundary > a { margin-left: 34px; }
    /* long stacks of text cards become one swipeable row (later stylesheets set the grid, body raises specificity) */
    body .purpose-grid, .features { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: thin; }
    body .purpose-grid > *, .features > * { scroll-snap-align: start; }
    .plans .plan-featured { order: -1; }
    /* scenes and story episodes: one swipe row per series instead of a tall stack */
    .grid:has(> .roleplay-card) { grid-auto-flow: column; grid-auto-columns: 84%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; align-items: start; padding-bottom: 10px; }
    .grid:has(> .roleplay-card) > .roleplay-card { scroll-snap-align: start; }
    /* "Meet someone new": two compact cards per row; interests are on the profile */
    .grid:has(> .available-character) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .available-character > p.muted.small { display: none; }
    .available-character .character-head, .available-character > p, .available-character .start-row, .available-character .about-me { margin-left: 10px; margin-right: 10px; }
    .available-character .character-head { padding-top: 10px; }
    .available-character > p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .88rem; margin-bottom: 0; }
    .available-character .available-photo { aspect-ratio: 4 / 5; }
    .available-character .start-row { padding-top: 10px; }
    .available-character .about-me summary { font-size: .8rem; }
    .available-character .about-me input { margin-bottom: 8px; }
    .available-character { padding-bottom: 12px; }
    .available-character .character-head .muted { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .chat-head .chat-tools-toggle { display: grid; }
    .msg-actions .icon-btn, .msg-actions .voice-btn { min-width: 36px; min-height: 32px; }
    .chat-main:not(.tools-open) .chat-tools, .chat-main:not(.tools-open) .history-search { display: none; }
    /* these labels are styled in later stylesheets; body raises specificity so the phone size wins */
    body .story-ideas .eyebrow, body .auth-journey-banner .eyebrow, body .portrait-look-ai { font-size: .75rem; }
}
/* the same 12 px floor on wide screens (the desktop styles had 10.4–11.2 px) */
body .story-ideas .eyebrow, body .auth-journey-banner .eyebrow, body .portrait-look-ai { font-size: .75rem; }
/* /stories: a shelf of series cards, each with the companion who stars in it. */
.stories-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; align-items: start; }
.stories-page > h1, .stories-page > p, .stories-page > script { grid-column: 1 / -1; margin: 0; }
.stories-page { row-gap: 18px; }
.story-card { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.story-cover-wrap { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.story-cover { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.story-cover-wrap::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, #100e17f2); }
.story-cover-text { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; }
.story-cover-text h2 { margin: 6px 0 2px; font-size: 1.45rem; color: #fff; }
.story-cover-text p { margin: 0; color: #e7dcee; font-size: .9rem; }
.story-banner { aspect-ratio: 16 / 6; border-radius: 18px; margin: 26px 0 14px; }
.story-cover-text h3 { margin: 6px 0 2px; font-size: 1.3rem; color: #fff; }
.story-continue { display: block; margin: 14px 20px 0; text-align: center; }
.story-card .story-episodes { list-style: none; margin: 0; padding: 16px 20px 18px; display: grid; gap: 10px; }
.chat-tools-toggle { display: none; place-items: center; width: 40px; height: 40px; margin-left: auto; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); font-size: 1.3rem; cursor: pointer; }
.chat-main.tools-open .chat-tools-toggle { background: var(--panel-2); }
/* Profile: a bar pinned to the bottom of phone screens with the main chat button. */
.profile-sticky-cta { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(14, 11, 20, .92); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
@media (max-width: 600px) {
    .profile-sticky-cta { display: block; }
    body:has(.profile-sticky-cta) .footer { padding-bottom: 90px; }
}
.msg-actions.me-actions { justify-content: flex-end; margin-top: -2px; }
/* Chat: a character panel on wide screens (portrait, who they are, profile link). */
.chat-profile { display: none; }
@media (min-width: 1200px) {
    .chat-layout { grid-template-columns: 240px 1fr 300px; }
    .chat-profile { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-left: 1px solid var(--line); overflow-y: auto; min-height: 0; }
    .chat-profile-photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 25%; border-radius: 18px; margin-bottom: 8px; }
    .chat-profile h2 { margin: 0; font-size: 1.25rem; }
    .chat-profile p { margin: 0; }
    .chat-profile .btn { align-self: flex-start; margin-top: 6px; }
    .chat-head .chat-title { flex: 0 0 auto; }
    .chat-head .chat-sub { white-space: nowrap; }
}
.template-starts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 22px; }
.template-start { display: flex; flex-direction: column; gap: 6px; margin: 0; color: var(--text); }
.template-start:hover { border-color: var(--accent-2); text-decoration: none; }

/* Creator: one-tap template starts */
.template-chips { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:4px 0 14px; }
/* template starts look like the tag chips (they were plain links) */
.template-chips .chip { border: 1px solid rgba(255,255,255,.12); background: #1d1626; color: #d4c8dc; border-radius: 999px; padding: 7px 14px; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.template-chips .chip:hover { border-color: #8b5cf6; color: #fff; }
@media (max-width: 640px) {
    .template-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .template-chips > span { flex: 0 0 auto; }
}
/* Chat: switch between takes of a regenerated reply */
.take-nav { display:inline-flex; align-items:center; gap:2px; }
.take-nav[hidden] { display:none; }
.take-pos { font-size:.8rem; color:var(--muted); min-width:2.4em; text-align:center; }
/* Chat on every screen: room for the conversation */
.roleplay-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.roleplay-bar select { width: auto; min-width: 0; text-overflow: ellipsis; }
.roleplay-bar #roleplayScene { flex: 0 1 22rem; min-width: 6.5rem; }   /* never squeezed to an untappable sliver (es/pt at 320 px); the bar scrolls instead */
.roleplay-bar #roleplayTone { flex: 0 0 auto; }
.roleplay-bar .btn, .roleplay-bar > span { flex: 0 0 auto; white-space: nowrap; }
.daily { cursor: pointer; }
.daily:not(.open) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.suggest-chip { flex: 0 0 auto; white-space: nowrap; }
/* end chat on every screen */
.daily, .suggest, .composer-foot { flex-shrink: 0; }   /* with options open on a 640 px phone they were crushed to 6-14 px slivers */
@media (max-height: 900px) { .chat-main.tools-open .daily, .chat-main.tools-open .push-prompt, .chat-main.tools-open .story-starters, .chat-main.tools-open .suggest { display: none; } body .chat-main.tools-open .chat-tools { max-height: 30vh; } }
@media (max-height: 900px) {
    .chat-head .chat-tools-toggle { display: grid; }
    .chat-main:not(.tools-open) .chat-tools, .chat-main:not(.tools-open) .history-search { display: none; }
    .chat-main.tools-open .chat-tools { max-height: 40vh; overflow-y: auto; }
}
.roleplay-bar .rp-short { display: none; }
@media (max-width: 600px) { body .roleplay-bar .rp-short { display: inline; } }
/* Chat on phones: room for the conversation */
@media (max-width: 600px) {
    body .roleplay-bar { flex-wrap: nowrap; overflow-x: auto; padding: 6px 10px; gap: 6px; scrollbar-width: none; }
    body .roleplay-bar[hidden] { display: none; }
    body .roleplay-bar .rp-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    body .roleplay-bar select { min-height: 36px; text-overflow: ellipsis; }
    body .roleplay-bar #roleplayScene { flex: 1 1 0; min-width: 5.5rem; }   /* at 320 px in es/pt it shrank to 23 px; the bar scrolls sideways instead */
    body .roleplay-bar #roleplayTone { flex: 0 0 6.5em; }
    body .roleplay-bar .rp-full { display: none; }
    body #roleplayExit { min-width: 40px; }
    body .roleplay-bar .btn { flex: 0 0 auto; white-space: nowrap; }
    body .daily { margin: 6px 10px 0; padding: 6px 12px; cursor: pointer; }
    body .daily:not(.open) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    body .push-prompt { margin: 6px 10px; padding: 6px 10px; font-size: .82rem; gap: 6px 10px; }
    body .story-starters { padding: 6px 12px; }
    body .suggest { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: .3rem 0 .1rem; }
    body .suggest-chip { flex: 0 0 auto; white-space: nowrap; }
    body .composer-foot { padding: 0 12px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Sign-up: detected country and time zone as one line to check */
.signup-place { margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.signup-place summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; cursor: pointer; color: var(--text); }
.signup-place[open] { padding-bottom: 12px; }
#googleStatus:empty { margin: 0; }
/* Phones: compact discovery filters */
@media (max-width: 600px) {
    body .discovery-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
    body .discovery-filters label { min-width: 0; }
    body .discovery-filters .discovery-search { grid-column: 1 / -1; }
    body .discovery-filters .filter-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    body .discovery-filters select, body .discovery-filters input { min-height: 44px; }
    body .tag-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
    body .tag-chips .chip { flex: 0 0 auto; white-space: nowrap; }
}
.discovery-summary .btn[hidden] { display: none; }
/* Chat: the companion faintly behind the conversation (fixed to the list, not scrolling with it) */
.messages.has-backdrop { background-image: linear-gradient(rgba(16, 14, 23, .86), rgba(16, 14, 23, .93)), var(--chat-backdrop); background-size: cover; background-position: center 22%; }
.messages.has-backdrop.backdrop-off { background-image: none; }   /* chat options → Background: Plain */
/* Chat: day dividers */
.day-sep { align-self: center; margin: 10px 0 4px; padding: 3px 12px; border-radius: 999px; background: rgba(28, 24, 39, .85); border: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
/* Chat: jump back to the newest message */
.jump-latest { position: relative; z-index: 2; align-self: center; margin: -46px 0 8px; min-height: 36px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 999px; background: var(--panel); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
.jump-latest[hidden] { display: none; }
/* Account: jump row; sections stop below the sticky header */
.account-nav { margin: 4px 0 16px; }
.container > .card[id] { scroll-margin-top: 84px; }
/* Chat: *actions* in replies */
.bubble em { font-style: italic; color: #d9cde6; }
/* Show / hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); min-height: 44px; min-width: 64px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--accent); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.gift-title { margin: 12px 0 6px; }
.bubble.me em { color: inherit; opacity: .9; }
/* Community: search */
.community-search { display: flex; gap: 8px; margin: 12px 0; }
.community-search input { flex: 1; min-width: 0; min-height: 44px; }
.community-search .filter-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Chat: tap a bubble to see when it was sent */
.bubble.show-time::after { content: attr(data-time); display: block; margin-top: 4px; font-size: .75rem; font-style: normal; opacity: .75; }
/* Keepsakes */
.keepsake { margin: 0 0 14px; }
.keepsake blockquote { margin: 0 0 8px; white-space: pre-wrap; line-height: 1.55; }
.star-btn.on { color: #fbbf24; }
/* Text for screen readers only */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Comfortable portrait browsing on small phones; keep introductions readable. */
.romance-occupation{font-size:.78rem;font-weight:600;letter-spacing:.02em;color:var(--accent);line-height:1.4}
.romance-card-body{gap:14px}.romance-card:focus-within{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent)}
@media(max-width:420px){.romance-gallery{grid-template-columns:1fr}.page-romance .romance-image{aspect-ratio:4/5}.romance-card-body p{min-height:0;font-size:.95rem}.romance-card-body{padding:18px}.romance-card-body .btn{min-height:44px}.romance-caption h2{font-size:1.65rem}}

.romance-card .personality-preview{margin:0;padding-top:8px}.romance-card .personality-preview summary{min-height:44px;display:flex;align-items:center;gap:8px;list-style:none}.romance-card .personality-preview summary::before{content:"+";font-size:1.2rem}.romance-card .personality-preview[open] summary::before{content:"−"}.romance-card .personality-preview summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}

/* /guides: readable article column */
.guide, .guides-hub { max-width: 780px; }
.guide .crumbs { margin: 0 0 10px; }
.guide .crumbs a { color: var(--muted); }
.guide-body { line-height: 1.7; font-size: 1.04rem; }
.guide-body h2 { margin: 34px 0 10px; }
.guide-body h3 { margin: 22px 0 8px; font-size: 1.08rem; }
.guide-body li { margin: 6px 0; }
.guide-body em { color: #e4dcef; }
.guide-table-wrap { overflow-x: auto; margin: 14px 0; }
.guide-table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.guide-table th, .guide-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.12); }
.guide-table th { font-weight: 600; white-space: nowrap; }
.guide-lead { font-size: 1.12rem; color: var(--text); }
.guide-box { border: 1px solid var(--line); background: var(--panel-2); border-radius: 14px; padding: 6px 18px; margin: 20px 0; }
.guide-cta { border: 1px solid var(--line); background: var(--panel-2); border-radius: 16px; padding: 8px 20px; margin: 30px 0; }
.guide-related ul { padding-left: 20px; }
.guide-related li { margin: 8px 0; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 12px 0 26px; }
.guide-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; color: var(--text); }
.guide-card:hover { border-color: var(--accent-2); }
.home-switch { text-align: center; margin: 18px auto 0; max-width: 760px; }
/* keyword landing pages */
.topic-companions { margin: 30px 0 10px; }
.topic-companions .discovery-grid { margin-top: 12px; }
.topic-links { columns: 2 260px; padding-left: 20px; }
.topic-links li { margin: 6px 0; break-inside: avoid; }
.profile-topics a { white-space: normal; }

/* Arabic: mirror the shared shell; preserve natural direction in mixed-language chat text. */
[dir="rtl"] .nav-more-panel { right: auto; left: 0; text-align: start; }
[dir="rtl"] .side-menu { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .chat-side { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .bubble { unicode-bidi: plaintext; text-align: start; }
[dir="rtl"] .bubble.them { border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
[dir="rtl"] .bubble.me { border-bottom-right-radius: 18px; border-bottom-left-radius: 6px; }
[dir="rtl"] .insight-table th, [dir="rtl"] table.data th { text-align: start; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="password"], [dir="rtl"] code, [dir="rtl"] pre { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] textarea { unicode-bidi: plaintext; text-align: start; }
[dir="rtl"] .brand-mark { margin-right: 0; margin-left: 5px; }
[dir="rtl"] .badge { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .insight-tips, [dir="rtl"] .creator-boards ol, [dir="rtl"] .remembered ul { padding-left: 0; padding-right: 20px; }
@media (min-width: 1024px) {
    [dir="rtl"] body.has-side .main, [dir="rtl"] body.has-side .footer { margin-left: 0; margin-right: 236px; }
    [dir="rtl"] body.has-side .topbar { padding-left: 24px; padding-right: 252px; }
}
