/* Tibelu design tokens · direction D "dark tech" (2026-10-24, A-024; muted navy ground A-026): dark by default,
   electric blue for actions, Space Grotesk + Inter, photos first, 10-12px corners.
   Contrast (WCAG AA): text #E8ECF4 on bg 14.4:1 · muted #A3AEC2 on card-2 5.9:1 ·
   white on --blue #2563EB 5.2:1 · --link #84B4FF on card 7.3:1. */
:root {
  --bg: #141C2B;         /* ground: muted navy (A-026) */
  --card: #1B2538;       /* cards, bars */
  --card-2: #233047;     /* chips, inputs, raised */
  --line: #313F57;
  --blue: #2563EB;       /* action, white text on it */
  --blue-dark: #1D4FD8;
  --link: #84B4FF;       /* links and small accents on dark */
  --online: #22C55E;
  --ink: #E8ECF4;        /* text */
  --ink-soft: #C3CAD8;
  --muted: #A3AEC2;
  --danger: #FF8A7A;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 10px;
  --wrap: 1200px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--link); }
.muted { color: var(--muted); }
.soft { color: var(--ink-soft); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { display: flex; flex-wrap: nowrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo span { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.02em; line-height: 1; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: 15px; }
.nav a:not(.btn), .nav .btn-link { color: var(--ink-soft); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:not(.btn):hover, .nav .btn-link:hover { color: var(--ink); }
.nav form { margin: 0; }
@media (max-width: 640px) { .nav .hide-sm, .nav a.hide-sm:not(.btn) { display: none; } .nav { gap: 8px 14px; } .nav .btn { min-height: 40px; padding: 8px 14px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: var(--radius-sm); font: 600 15px var(--body); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--blue); color: #FFFFFF; }
.btn-primary:hover { background: var(--blue-dark); color: #FFFFFF; }
a.btn-primary, a.btn-primary:visited, a.btn-primary:hover, button.btn-primary { color: #FFFFFF; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
a.btn-ghost, a.btn-ghost:visited { color: var(--ink); }
.btn-ghost:hover, a.btn-ghost:hover { background: var(--card-2); color: var(--ink); }
.btn-dark { background: var(--card-2); color: var(--ink); }
a.btn-dark, a.btn-dark:visited, a.btn-dark:hover { color: var(--ink); }
.btn-dark:hover { background: var(--line); }
.btn-lg { min-height: 52px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--ink-soft); font: inherit; cursor: pointer; }

.badge-ai { display: inline-block; padding: 2px 8px; border-radius: 6px; background: rgba(20, 28, 43, .72); border: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.on::before { background: var(--online); box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }

.photo { background: var(--card-2); display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; font-size: 12px; color: var(--muted); position: relative; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.photo .badge-ai { position: absolute; top: 10px; right: 10px; }

/* Avatar strip (story rings, thinner and blue) */
.stories { display: flex; gap: 12px; padding: 2px 0 4px; overflow-x: auto; scrollbar-width: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-soft); flex: 0 0 auto; font-size: 12px; font-weight: 600; }
.ring { width: 56px; height: 56px; border-radius: 50%; padding: 2px; background: var(--blue); display: flex; }
.ring.off { background: var(--line); }
.ring > span { flex: 1; border-radius: 50%; background: var(--card-2); border: 2px solid var(--bg); overflow: hidden; }
.ring img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.ring.off img { filter: grayscale(1); opacity: .6; }
.ring.sm { width: 38px; height: 38px; }

/* Home */
.home { max-width: 1100px; display: flex; flex-direction: column; gap: 24px; padding-bottom: 40px; }
.home .stories { justify-content: safe center; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 900px; margin: 0 auto; }
.hero h1 { font-size: clamp(26px, 4.2vw, 44px); line-height: 1.1; text-wrap: balance; }
.hero-lede { font-size: 16px; line-height: 1.5; color: var(--ink-soft); margin: 0; max-width: 640px; text-wrap: pretty; }
.hero-cta { min-width: 260px; margin-top: 6px; }
@media (max-width: 600px) { .hero-cta { width: 100%; } .hero-lede { font-size: 15px; } }
.hero-note { margin: 0; font-size: 13px; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* Profile cards: the photo is the card */
.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feed { grid-template-columns: 1fr; } }
.card { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--card); color: #FFFFFF; text-decoration: none; isolation: isolate; }
.card .photo { position: absolute; inset: 0; padding: 0; border-radius: 0; }
.card .photo img { transition: transform .4s ease; }
.card:hover .photo img { transform: scale(1.03); }
.card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 56px 16px 16px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(to top, rgba(12, 17, 28, .94) 0%, rgba(12, 17, 28, .7) 55%, rgba(12, 17, 28, 0) 100%); }
.card-name { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; line-height: 1; }
.card-name span { font-weight: 500; color: var(--ink-soft); font-size: 20px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; color: var(--ink-soft); }
.card-line { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-cta { margin-top: 6px; }
.card-cta .btn { width: 100%; min-height: 44px; }

.soon-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .soon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.soon-card { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; }
.soon-card strong { font-family: var(--display); font-weight: 700; font-size: 20px; }

.block { padding: 20px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.block-sage { background: var(--card); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { display: flex; gap: 12px; align-items: baseline; }
.step .num { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1; color: var(--link); }
.step p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fact { padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.fact strong { color: var(--ink); }
@media (max-width: 700px) { .steps, .facts { grid-template-columns: 1fr; } }
.section { display: flex; flex-direction: column; gap: 14px; }
.section h2, .block h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; font-size: 22px; line-height: 1.15; margin: 0; }

.footer { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer a { color: var(--ink-soft); }
.footer nav { display: flex; flex-wrap: wrap; gap: 12px 18px; }

/* Profile */
.ig-banner { background: var(--blue); color: #FFFFFF; padding: 12px 16px; text-align: center; font-size: 14px; font-weight: 600; }
.profile { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-start; padding-bottom: 64px; }
.profile-hero { flex: 1 1 420px; min-width: 0; }
.profile-hero .photo { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.profile-hero .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 64px 18px 18px; background: linear-gradient(to top, rgba(12, 17, 28, .94), rgba(12, 17, 28, 0)); text-align: left; display: flex; flex-direction: column; gap: 4px; }
.profile-hero .caption .display { font-size: 36px; color: #FFFFFF; }
.profile-hero .caption span { font-size: 13px; color: var(--ink-soft); }
.profile-info { flex: 1 1 360px; display: flex; flex-direction: column; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 6px 10px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.now { padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.now p { margin: 4px 0 0; font-size: 16px; line-height: 1.45; color: var(--ink); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.grid3 .photo { aspect-ratio: 4 / 5; border-radius: 8px; font-size: 10px; padding: 4px; }
.grid3 .locked { background: var(--card-2) center / cover no-repeat; color: #FFFFFF; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.sticky-cta { position: sticky; bottom: 0; padding: 12px 16px 18px; background: rgba(20, 28, 43, .92); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .sticky-cta { display: none; } }
@media (max-width: 640px) {
  .profile-hero { margin: 0 -16px; }
  .profile-hero .photo { border-radius: 0; }
}

/* Chat: see "Chat app" at the end of this file (UX review 2, 2026-10-24) */

/* Plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.plan.featured { border: 2px solid var(--blue); }
.plan h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 28px; }
.plan .price { font-family: var(--display); font-size: 30px; font-weight: 700; }
.plan ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-soft); }
.plan form { margin-top: auto; }
.plan .btn { width: 100%; }
.tag { padding: 4px 8px; border-radius: 6px; background: var(--blue); color: #FFFFFF; font-size: 12px; font-weight: 600; }

/* Forms */
.narrow { max-width: 480px; margin: 0 auto; padding: 16px 16px 64px; display: flex; flex-direction: column; gap: 16px; }
.narrow .display { font-size: clamp(28px, 5vw, 38px) !important; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--ink-soft); }
.field input[type=email], .field input[type=password], .field input[type=text], .field input[type=date] { min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card-2); color: var(--ink); font: inherit; font-size: 16px; }
.field input:focus { border-color: var(--link); outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--blue); }
.errorlist { margin: 0; padding: 0; list-style: none; color: var(--danger); font-size: 13px; }
.messages { list-style: none; margin: 0; padding: 0; }
.messages li { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--card-2); border: 1px solid var(--line); margin-bottom: 12px; }

.prose { max-width: 760px; padding-top: 8px; padding-bottom: 64px; color: var(--ink-soft); }
.prose h1 { color: var(--ink); font-size: clamp(28px, 4.5vw, 38px); margin-bottom: 16px; }

/* Legal pages */
.legal { max-width: 760px; }
.legal h2 { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); margin: 36px 0 8px; scroll-margin-top: 80px; }
.legal .legal-meta { color: var(--muted); font-size: 14px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 14px; display: block; overflow-x: auto; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--card-2); color: var(--ink); }
.legal .legal-review { color: var(--muted); font-size: 14px; margin-top: 40px; }

/* Pricing */
.pricing { padding-top: 12px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 20px; }
.pricing-head { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.pricing-head .display { font-size: clamp(28px, 4.5vw, 40px); }
.pricing-head p { margin: 0; }
.center { text-align: center; margin: 0; }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); margin-top: 4px; }
.seg a { padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.seg a[aria-current] { background: var(--blue); color: #FFFFFF; }
.tokens { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tokens h2 { font-family: var(--display); font-weight: 700; font-size: 24px; margin: 0; }
.tokens > p { margin: 0; }
.tag-soft { background: var(--card-2); color: var(--ink-soft); border: 1px solid var(--line); }
.token-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .token-grid { grid-template-columns: 1fr; } }
.token-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.token-box h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.token-box p { margin: 0; }
.price-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.price-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.price-list li:first-child { border-top: 0; }
.price-list small { display: block; color: var(--muted); font-size: 12px; }
.price-list em { font-style: normal; color: var(--online); font-size: 12px; font-weight: 600; margin-left: 4px; }
.price-list strong { color: var(--ink); white-space: nowrap; }

.help-line { margin: 24px auto 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.help-line a { color: var(--ink-soft); }


/* Her reply arrives bubble by bubble */
.bubble.reveal { display: none; }
.typing .dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 4px; }
.typing .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-muted); animation: blink 1s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; }
.typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing .dots i { animation: none; } }

/* Gifts */
.gift-bubble { display: flex; flex-direction: column; gap: 2px; background: linear-gradient(135deg, #2563EB, #7C3AED); }
.gift-bubble strong { font-size: 18px; }
.gifts { margin: 0 14px 8px; border: 1px solid var(--c-her-border); border-radius: var(--radius); background: var(--c-bar); }
.gifts summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; min-height: 44px; font-size: 14px; font-weight: 600; }
.gifts summary::-webkit-details-marker { display: none; }
.balance { font-size: 12px; font-weight: 600; color: var(--link); background: var(--card-2); border-radius: 6px; padding: 3px 8px; }
.gift-rail { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: thin; }
.gift { flex: 0 0 auto; width: 96px; min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card-2); color: var(--ink); cursor: pointer; font: inherit; text-align: center; }
.gift:hover:not([disabled]) { border-color: var(--link); }
.gift[disabled] { opacity: .45; cursor: not-allowed; }
.gift-emoji { font-size: 26px; line-height: 1; }
.gift-name { font-size: 12px; font-weight: 600; line-height: 1.2; }
.gift-cost { font-size: 11px; color: var(--muted); }
.gifts-foot { margin: 0; padding: 0 14px 10px; }

/* Token packs page */
.packs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .packs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .packs-grid { grid-template-columns: 1fr; } }
.pack { gap: 10px; }
.pack-tokens { font-family: var(--display); font-weight: 700; font-size: 30px; }
.pack-tokens span { font-size: 15px; color: var(--muted); font-weight: 500; }
.pack-bonus { color: var(--online); font-size: 13px; font-weight: 600; }
.pack .price { font-size: 22px; font-weight: 700; }
.price-list strong small { display: inline; color: var(--muted); font-weight: 500; }

/* ==========================================================================
   Navigation and wayfinding (UX review 2026-10-24)
   Global header with a <details> menu below 1024px, chat top bar with the
   companion switcher (>= 1000px) and a menu in the chat head (all sizes),
   breadcrumbs, back links, chat lists, empty states, full footer.
   Contrast (measured): --ink on --card 12.96:1 · --link on --card-2 6.28:1 ·
   --muted on --card 6.86:1 · --ink-soft on --card 9.33:1 · --ink-soft on --bg 10.37:1.
   ========================================================================== */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--blue); color: #FFFFFF; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; color: #FFFFFF; }
main:focus { outline: none; }

/* Header */
.site-top { position: sticky; top: 0; z-index: 30; background: rgba(20, 28, 43, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header { position: relative; min-height: 64px; }
.nav-wide { flex: 1; justify-content: center; }
#companions, #chats, #tokens { scroll-margin-top: 80px; }
.nav-end { flex-wrap: nowrap; justify-content: flex-end; gap: 8px 18px; }
.nav a[aria-current]:not(.btn) { color: var(--ink); box-shadow: inset 0 -2px 0 var(--blue); }
.nav a.token-chip { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--link); font-size: 14px; font-weight: 600; white-space: nowrap; }
.nav a.token-chip:hover { color: var(--ink); border-color: var(--link); }
.nav a.token-chip[aria-current] { box-shadow: none; border-color: var(--link); }
.nav-narrow-only { display: none; }
@media (max-width: 1023px) {
  .nav-wide, .nav .nav-wide-only { display: none !important; }
  .nav-narrow-only { display: block; }
  .nav .btn { min-height: 44px; padding: 8px 14px; }
  .nav-end { gap: 8px; }
}

/* Menu (details/summary: works without JS; base.html closes it on Escape or outside tap) */
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 15px var(--body); cursor: pointer; user-select: none; }
.menu-btn:hover { background: var(--card-2); }
.menu[open] > .menu-btn { background: var(--card-2); border-color: var(--link); }
.menu-btn.icon-only { width: 44px; padding: 0; border-color: transparent; background: transparent; }
.menu[open] > .menu-btn.icon-only { background: var(--card-2); border-color: var(--line); }
.menu-panel { position: absolute; top: calc(100% + 6px); right: 16px; z-index: 40; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 88px); max-height: calc(100dvh - 88px); overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 10px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); color: var(--ink); text-align: left; }
@media (min-width: 641px) { .site-header .menu-panel { right: 24px; } }
.menu-label { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.menu-stories { gap: 10px; padding: 2px 2px 6px; justify-content: flex-start; }
.menu-stories .story { min-width: 56px; min-height: 44px; }
.story[aria-current] { color: var(--ink); }
.story[aria-current] .ring { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--link); }
.menu-links { display: flex; flex-direction: column; padding-top: 6px; border-top: 1px solid var(--line); }
.menu-links a:not(.btn), .menu-signout { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font: 500 16px var(--body); }
.menu-links a:not(.btn):hover, .menu-signout:hover { background: var(--card-2); color: var(--ink); }
.menu-links a[aria-current]:not(.btn) { background: var(--card-2); font-weight: 600; box-shadow: none; }
.menu-links form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--line); }
.menu-signout { width: 100%; border: 0; background: none; color: var(--ink-soft); cursor: pointer; text-align: left; }
.menu-links .btn { margin-top: 8px; }


/* Breadcrumbs and back links */
.page-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "/"; content: "/" / ""; margin: 0 8px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-soft); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--link); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.seg a { min-height: 44px; }
.legal-docs { margin-top: 40px; display: flex; flex-direction: column; gap: 10px; }
.legal-docs .seg { flex-wrap: wrap; margin-top: 0; align-self: flex-start; }

/* Chat lists (home "Continue chatting", account "My chats") and empty states */
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.chat-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.chat-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.chat-row:hover { border-color: var(--link); color: var(--ink); }
.chat-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-row-text .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row-go { font-size: 14px; font-weight: 600; color: var(--link); white-space: nowrap; }
.account-chats { display: flex; flex-direction: column; gap: 10px; }
.account-chats h2 { margin: 0; }
.empty { padding: 20px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--card); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.empty p { margin: 0; }
.feed > .empty { grid-column: 1 / -1; }

/* Messages (Django messages framework) */
.messages li.error { border-color: var(--danger); }
.messages li.success { border-color: var(--online); }

/* Footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 32px; padding-bottom: 8px; }
.footer-grid nav { display: flex; flex-direction: column; }
.footer-grid nav a { display: flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.footer-grid nav a:hover { color: var(--ink); text-decoration: underline; }
.footer-title { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.footer-brand p { margin: 10px 0 0; max-width: 300px; }
.site-footer .help-line { margin-top: 8px; }
.site-footer .footer { margin-top: 16px; padding-top: 16px; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   Layout fit (UX review 2, 2026-10-24)
   Pages: sticky footer, one top rhythm under the header, header 64px at every
   size, home aligned to the header width, prose headings on the type scale.
   Chat: a window-height app. One centred shell (max 1240px) holds the top bar
   and the layout, so logo, switcher, photos and chat share the same edges.
   Desktop (>= 1000px): photos column 340px + chat; only the thread and the
   photos scroll. Mobile: one-line chat head, small photo strip, full-width
   chat, one-row gift bar, composer at the bottom of the screen.
   Contrast (measured): --ink on --card 12.96:1 · --muted on --card 6.86:1 ·
   --link on --card-2 6.28:1 · white on --blue 5.17:1 · --ink on badge ground
   (#141C2B at .72 over photos) >= 7:1 on the darkest and lightest crops tested.
   ========================================================================== */
:root { --header-h: 64px; --chat-shell: 1240px; --topbar-h: 60px; }

/* Pages: footer at the bottom of short pages, same gap under the header */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > .wrap { width: 100%; }
body > .wrap .messages { margin-top: 16px; }
.site-top + main, .site-top ~ main { padding-top: 24px; }
@media (max-width: 640px) { .site-top + main, .site-top ~ main { padding-top: 16px; } }
.site-header { min-height: var(--header-h); padding-top: 10px; padding-bottom: 10px; }
.site-top .btn { min-height: 44px; padding: 0 18px; }
.home { max-width: var(--wrap); }
.page-top { margin-top: -12px; }
.prose h1 { margin: 0 0 16px; }
.prose h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; font-size: 22px; line-height: 1.2; color: var(--ink); margin: 32px 0 8px; }
.prose p { margin: 0 0 12px; }
.prose .steps { margin: 8px 0 8px; }
.narrow { padding-top: 0; }
.token-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .token-grid-2 { grid-template-columns: 1fr; } }

/* Chat app ---------------------------------------------------------------- */
body.chat-body { height: 100vh; height: 100dvh; overflow: hidden; }
body.chat-body > main { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; padding: 0; }
body.chat-body > .wrap { position: fixed; top: 8px; left: 0; right: 0; z-index: 50; }
.chat-app { --c-bg: var(--bg); --c-bar: var(--card); --c-her: var(--card-2); --c-her-border: var(--line); --c-text: var(--ink); --c-muted: var(--muted);
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--c-bg); color: var(--c-text); }
.chat-app.night { --c-bg: #0F1522; --c-bar: #161E2F; --c-her: #1D283C; }
body.chat-body:has(.chat-app.night) { background: #0F1522; }
.chat-shell { width: 100%; max-width: var(--chat-shell); margin: 0 auto; }

/* Top bar (desktop): logo · switcher · tokens, account, menu */
.chat-topbar { display: none; flex: none; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { position: relative; display: flex; align-items: center; gap: 24px; height: var(--topbar-h); padding: 0 20px 0 12px; }
.topbar-inner .logo { flex: none; }
.topbar-stories { flex: 1; min-width: 0; justify-content: safe center; gap: 4px; padding: 0; }
.topbar-stories .story { padding: 3px; border-radius: 50%; }
.topbar-stories .ring.sm { width: 36px; height: 36px; }
.topbar-stories .story[aria-current] .ring { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--link); }
.topbar-links { flex: none; flex-wrap: nowrap; gap: 4px 16px; }
.topbar-links .token-chip { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--link); font-size: 14px; font-weight: 600; white-space: nowrap; }
.topbar-links a.token-chip:hover { color: var(--ink); border-color: var(--link); }
.topbar-menu .menu-panel { right: 0; top: calc(100% + 8px); }

/* Layout: one column on mobile and tablet */
.chat-layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas: "head" "media" "chat"; }
.chat-head { grid-area: head; position: relative; z-index: 5; display: flex; align-items: center; gap: 6px; min-height: 60px; padding: 6px 8px; background: var(--c-bar); border-bottom: 1px solid var(--c-her-border); }
.who-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.who-link:hover { color: inherit; }
.who-link:hover .name { text-decoration: underline; }
.chat-head .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.who-name { display: flex; align-items: center; gap: 8px; }
.chat-head .name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.chat-head .sub { display: block; font-size: 12px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .menu-panel { right: 8px; top: calc(100% + 4px); }
.counter { flex: none; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--link); text-align: right; padding-right: 4px; }
.counter span { font-weight: 400; color: var(--c-muted); }
.icon-btn { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--c-text); border-radius: var(--radius-sm); }
.icon-btn:hover { background: var(--card-2); color: var(--c-text); }

/* Her photos and clips: every item carries the AI label */
.chat-media { grid-area: media; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 6px 8px; background: var(--c-bar); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.chat-media::-webkit-scrollbar { display: none; }
.media-item { position: relative; margin: 0; flex: 0 0 auto; width: 48px; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--card-2); }
.media-item img, .media-item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .badge-ai { position: absolute; z-index: 1; top: 3px; right: 3px; font-size: 10px; line-height: 1.2; padding: 0 4px; border-radius: 4px; pointer-events: none; }

/* Chat column: thread scrolls, gifts and composer stay at the bottom */
.chat { grid-area: chat; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--c-bg); }
.chat > * { min-width: 0; flex: none; }
.thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.thread > :first-child { margin-top: auto; }
.notice { margin: 4px auto 8px; max-width: 340px; text-align: center; font-size: 12px; color: var(--c-muted); }
.bubble { max-width: min(78%, 560px); padding: 10px 14px; font-size: 15px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.bubble.her { align-self: flex-start; border-radius: 14px 14px 14px 4px; background: var(--c-her); border: 1px solid var(--c-her-border); }
.bubble.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--blue); color: #FFFFFF; }
.bubble.crisis { border-color: var(--danger); }
.typing { margin: 0; padding: 0 14px 6px; font-size: 13px; color: var(--c-muted); display: none; }
.typing.htmx-request { display: block; }
.paywall-warning { margin: 0 14px 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--card-2); color: var(--ink); display: flex; align-items: center; gap: 12px; font-size: 13px; }
.paywall-warning span { flex: 1; }
.paywall-warning .btn { min-height: 44px; padding: 8px 16px; }
.gifts { margin: 0 14px 10px; max-width: 100%; min-width: 0; }
.gift-rail { min-width: 0; max-width: 100%; }
.composer { display: flex; gap: 10px; align-items: center; padding: 10px 14px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--c-her-border); background: var(--c-bar); }
.composer input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--c-her-border); background: var(--c-bg); color: var(--c-text); font: inherit; font-size: 16px; }
.composer input:focus { border-color: var(--link); outline: none; box-shadow: 0 0 0 1px var(--link); }
.send { flex: none; width: 48px; height: 48px; border-radius: var(--radius-sm); border: 0; background: var(--blue); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.send:hover { background: var(--blue-dark); }

/* Mobile and tablet: gift bar in one compact row (title + rail), small print on one line */
@media (max-width: 999px) {
  .gifts { margin: 0 10px 8px; }
  .gifts summary { min-height: 36px; padding: 6px 12px; font-size: 13px; }
  .gift-rail { gap: 6px; padding: 0 10px 8px; scrollbar-width: none; }
  .gift-rail::-webkit-scrollbar { display: none; }
  .gift { width: auto; min-width: 0; min-height: 48px; padding: 6px 12px 6px 10px; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; justify-items: start; text-align: left; }
  .gift-emoji { grid-row: 1 / 3; font-size: 20px; }
  .gift-name { white-space: nowrap; }
  .gifts-foot { padding: 0 12px 8px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .thread { padding: 12px 10px; }
  .composer { padding-left: 10px; padding-right: 10px; }
  .bubble { max-width: 85%; }
}

/* Desktop: top bar + photos column + chat in one centred block */
@media (min-width: 1000px) {
  .chat-topbar { display: block; }
  .chat-menu { display: none; }
  .chat-layout { grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "media head" "media chat"; }
  .chat-media { flex-direction: column; gap: 10px; overflow-x: hidden; overflow-y: auto; padding: 12px; border-bottom: 0; border-right: 1px solid var(--line); scrollbar-width: thin; }
  .media-item { width: 100%; border-radius: var(--radius); }
  .media-item .badge-ai { top: 10px; right: 10px; font-size: 11px; padding: 2px 8px; border-radius: 6px; }
  .chat-head { padding: 8px 12px 8px 8px; }
  .thread { padding: 16px 20px; }
  .gifts { margin: 0 20px 10px; }
  .composer { padding: 12px 20px 16px; }
  .paywall-warning { margin: 0 20px 10px; }
  .typing { padding: 0 20px 6px; }
}
@media (min-width: 600px) and (max-width: 999px) { .media-item { width: 60px; } }
@media (min-width: 1242px) {
  .chat-layout { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* ==========================================================================
   Light ground, navy blocks (A-030, Jordi 24/10/2026: «blanco en el fondo, azul
   en las zonas con elementos; masculino pero limpio; cualquier texto sobre los
   bloques azul marino»). Page ground is off-white; structure (header, footer,
   chat bars, photo column, menus, overlays on photos) is solid navy with white
   text. Electric blue only for actions and the user's own messages.
   Contrast: --ink #0F1626 on #F4F6FA 16.7:1 · --muted #5A6780 on #FFFFFF 5.7:1,
   on #EEF2F7 5.1:1 · --link #1D4FD8 on #FFFFFF 6.6:1 · on navy: #FFFFFF on
   #141C2B 17.1:1, #B3BDD0 on #1B2538 8.1:1, #9CC3FF on #1B2538 8.5:1.
   ========================================================================== */
:root {
  --bg: #F4F6FA; --card: #FFFFFF; --card-2: #EEF2F7; --line: #D9E0EA;
  --ink: #0F1626; --ink-soft: #33405A; --muted: #5A6780; --link: #1D4FD8;
  --danger: #B42318; --online: #16A34A;
  --navy: #141C2B; --navy-2: #1B2538;
  color-scheme: light;
}
/* Navy scope: any text inside these blocks is light. */
.site-top, .site-footer, .chat-topbar, .chat-head, .chat-media, .menu-panel, .sticky-cta, .block,
.card-body, .profile-hero .caption, .ig-banner {
  --bg: #141C2B; --card: #1B2538; --card-2: #233047; --line: #313F57;
  --ink: #FFFFFF; --ink-soft: #D6DCE8; --muted: #B3BDD0; --link: #9CC3FF; --online: #22C55E;
  --c-bg: #141C2B; --c-bar: #141C2B; --c-text: #FFFFFF; --c-muted: #B3BDD0; --c-her-border: #313F57;
  color: var(--ink);
}
.site-top { background: var(--navy); border-bottom-color: #0B111C; }
.site-footer, .site-footer .footer { background: var(--navy); color: var(--ink-soft); }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: #FFFFFF; }
.chat-topbar, .chat-head, .chat-media { background: var(--navy); border-color: #0B111C; }
.menu-panel { background: var(--navy-2); border-color: #313F57; }
.sticky-cta { background: rgba(20, 28, 43, .96); border-top-color: #0B111C; }
.block { background: var(--navy); border-color: var(--navy); }
.site-top .logo, .chat-topbar .logo, .site-top .nav a:not(.btn), .site-top .btn-link { color: var(--ink); }
.site-top .nav a:not(.btn):hover, .site-top .btn-link:hover { color: #FFFFFF; text-decoration: underline; }
.ring > span { border-color: var(--navy); }

/* Light content */
.badge-ai { color: #FFFFFF; background: rgba(20, 28, 43, .78); border-color: rgba(255, 255, 255, .18); }
.chat-app { --c-bg: #F4F6FA; --c-bar: #FFFFFF; --c-her: #FFFFFF; --c-her-border: #D9E0EA; --c-text: #0F1626; --c-muted: #5A6780; }
.chat-app.night { --c-bg: #EDF1F7; --c-bar: #FFFFFF; --c-her: #FFFFFF; }
body.chat-body:has(.chat-app.night) { background: #EDF1F7; }
.bubble.her { box-shadow: 0 1px 2px rgba(15, 22, 38, .06); }
.composer { background: #FFFFFF; }
.composer input { background: #F4F6FA; }
.gifts { background: #FFFFFF; }
.gift { background: #F4F6FA; color: var(--ink); }
.gift:hover:not([disabled]) { border-color: var(--blue); }
.balance { background: #EEF2F7; color: var(--link); }
.card { background: var(--navy); box-shadow: 0 1px 3px rgba(15, 22, 38, .12); }
.plan, .token-box, .fact, .now, .soon-card { background: #FFFFFF; box-shadow: 0 1px 2px rgba(15, 22, 38, .05); }
.plan.featured { border-color: var(--blue); }
.seg { background: #FFFFFF; }
.chips li { background: #FFFFFF; }
.photo { background: #E4E9F1; }
.messages li { background: #FFFFFF; }
.field input[type=email], .field input[type=password], .field input[type=text], .field input[type=date] { background: #FFFFFF; }
.legal th { background: #EEF2F7; }
.price-list em { color: #15803D; }
.help-line { color: var(--muted); }

/* Chat full screen + companion switcher (Jordi 24/10/2026: «que el chat ocupe toda la pantalla»;
   the row of faces in the top bar is replaced by a «Switch companion» menu). */
.chat-shell { max-width: none; }
.topbar-inner { justify-content: space-between; padding: 0 16px; }
.switcher { position: relative; margin-right: auto; margin-left: 24px; }
.switcher-btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 8px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); font-size: 14px; font-weight: 600; }
.switcher-btn::-webkit-details-marker { display: none; }
.switcher-btn:hover, .switcher[open] .switcher-btn { border-color: var(--link); }
.switcher-faces { display: inline-flex; }
.switcher-faces .ring.sm { width: 28px; height: 28px; padding: 1px; }
.switcher-faces .ring + .ring { margin-left: -9px; }
.switcher-panel { left: 0; right: auto; top: calc(100% + 8px); width: min(520px, calc(100vw - 32px)); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; }
.switcher-item { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; }
.switcher-item:hover { background: var(--card-2); color: var(--ink); }
.switcher-item[aria-current] { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--link); }
.switcher-item strong { display: block; font-size: 14px; }
.switcher-item small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switcher-item .ring.sm { flex: none; }
@media (min-width: 1000px) {
  .chat-layout { grid-template-columns: 300px minmax(0, 1fr); }
  /* the conversation keeps a readable measure in the middle of the wide column */
  .thread { padding-inline: max(16px, calc((100% - 860px) / 2)); }
  .gifts { margin-inline: max(16px, calc((100% - 860px) / 2)); }
  .composer { padding-inline: max(16px, calc((100% - 860px) / 2)); }
  #paywall .paywall-warning, #gift-notice .paywall-warning { margin-inline: max(16px, calc((100% - 860px) / 2)); }
  .typing { padding-inline: max(16px, calc((100% - 860px) / 2)); }
}

/* Mobile first (Jordi: «principalmente el uso será mobile»): switch companion from the chat head */
.switcher-mobile { margin: 0; }
.switcher-mobile .switcher-panel { left: auto; right: 0; width: min(360px, calc(100vw - 16px)); grid-template-columns: 1fr; max-height: min(70vh, 520px); overflow-y: auto; }
@media (min-width: 1000px) { .switcher-mobile { display: none; } }
@media (max-width: 999px) {
  .chat-head .menu-panel { position: fixed; top: 64px; right: 8px; left: 8px; width: auto; }
  .switcher-mobile .switcher-panel { left: 8px; right: 8px; width: auto; }
}

/* Companion header (Jordi: «la cabecera de la web como está, pero encajar diferente la de la
   companion: color, separador…»). The navy bar is the app frame; her header is the start of the
   conversation: white, a hairline and a blue accent under it, bigger face with an online dot,
   counter as a pill. Mobile keeps one compact line. */
@media (min-width: 1000px) {
  .chat-head { background: #FFFFFF; color: var(--ink); border-bottom: 1px solid #E3E8F0; box-shadow: 0 1px 0 rgba(15, 22, 38, .03), 0 6px 16px -12px rgba(15, 22, 38, .25);
    --ink: #0F1626; --ink-soft: #33405A; --muted: #5A6780; --link: #1D4FD8; --card-2: #EEF2F7; --line: #D9E0EA;
    --c-bar: #FFFFFF; --c-text: #0F1626; --c-muted: #5A6780; min-height: 72px; padding: 10px 20px 10px 12px; position: relative; }
  .chat-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 96px; height: 2px; background: var(--blue); border-radius: 2px; }
  .chat-head .icon-btn { color: var(--ink); }
  .chat-head .icon-btn:hover { background: #EEF2F7; }
  .chat-head .ring.sm { width: 46px; height: 46px; position: relative; }
  .chat-head .ring.sm > span { border-color: #FFFFFF; }
  .chat-head .who-link .ring.sm::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #16A34A; border: 2px solid #FFFFFF; }
  .chat-head .name { font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
  .chat-head .badge-ai { background: #EEF2F7; color: #0F1626; border-color: #D9E0EA; }
  .chat-head .sub { font-size: 13px; color: #5A6780; }
  .chat-head .counter { background: #EEF2F7; color: #1D4FD8; border-radius: 999px; padding: 6px 12px; line-height: 1.2; }
  .chat-head .counter br { display: none; }
  .chat-head .counter span { margin-left: 4px; color: #5A6780; }
  .chat-media { border-right: 1px solid #0B111C; }
  /* gifts use the whole width of the chat column */
  .gifts { margin-inline: 16px; }
}
@media (min-width: 1000px) {
  /* the composer and the gift row also use the whole width of the chat column */
  .composer { padding-inline: 16px; }
  .gift { flex: 1 0 96px; max-width: 150px; }
}

/* Mobile photos (Jordi: «pensemos otra manera mejor»): no strip eating chat space; a photo button
   in her header opens a full-screen swipe gallery (scroll-snap, no JS). */
.gallery-mobile { margin: 0; }
.gallery-sheet { position: fixed; z-index: 60; left: 0; right: 0; top: 60px; bottom: 0; background: #0B111C;
  display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior: contain; }
.gallery-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; }
.gallery-slide img, .gallery-slide video { max-width: 100%; max-height: calc(100% - 40px); border-radius: 12px; object-fit: contain; }
.gallery-slide figcaption { color: #D6DCE8; font-size: 13px; display: flex; align-items: center; gap: 8px; }
@media (max-width: 999px) { .chat-media { display: none; } .chat-layout { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "head" "chat"; } }
@media (min-width: 1000px) { .gallery-mobile { display: none; } }

/* Conversation: small, proportional side space (Jordi) */
.thread { padding-inline: clamp(12px, 3.5%, 48px); }
.typing { padding-inline: clamp(12px, 3.5%, 48px); }
.bubble { max-width: min(72%, 640px); }
@media (min-width: 1000px) {
  .thread, .typing { padding-inline: clamp(16px, 4%, 56px); }
  #paywall .paywall-warning, #gift-notice .paywall-warning { margin-inline: 16px; }
}

/* Her replies come after a pause; «typing…» shows only shortly before they arrive */
.typing.on { display: block; }
