:root {
  /* Chai-like: neutral near-black, white active chips, a soft moonlight accent. */
  --bg: #0e0e10;
  --bg-2: #151518;
  --card: #1c1c20;
  --line: #2a2a30;
  --text: #f4f4f5;
  --dim: #a1a1aa;
  --faint: #8b8b94; /* ≥ 4.5:1 on --bg for small text */
  --pink: #f9a8d4;
  --violet: #a78bfa;
  --mint: #c4b5fd;
  --grad: linear-gradient(120deg, #e9e7ff 0%, #c4b5fd 60%, #f5d0fe 100%);
  --grad-soft: linear-gradient(120deg, rgba(233,231,255,.10), rgba(196,181,253,.12) 60%, rgba(245,208,254,.10));
  --radius: 14px;
  --side: 240px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.5; overflow-x: hidden; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
#shell { display: flex; min-height: 100dvh; }
#app { flex: 1; min-width: 0; min-height: 100dvh; position: relative; }
.onb, .page, .center { max-width: 520px; margin: 0 auto; }
/* Keyboard focus: a visible ring (the mouse and touch don't show it). */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.field:focus-visible, .composer textarea:focus-visible { outline: none; }

/* ---------- onboarding ---------- */
.onb { min-height: 100dvh; display: flex; flex-direction: column; padding: 20px 20px calc(24px + var(--safe-b)); position: relative; overflow: hidden; }
.onb::before { content: ''; position: absolute; inset: -20% -40% auto; height: 70%; background: var(--grad); filter: blur(90px); opacity: .22; pointer-events: none; }
.onb > * { position: relative; }
.onb-top { height: 44px; display: flex; align-items: center; }
.back { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 22px; }
.back:active { background: var(--card); }
.onb h1 { font-size: 26px; font-weight: 800; margin: 8px 0 6px; line-height: 1.25; text-align: center; }
.onb .sub { color: var(--dim); text-align: center; margin: 0 0 28px; font-size: 14px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 18px 20px; border-radius: 18px;
  background: var(--card); border: 1.5px solid transparent; font-weight: 600; font-size: 16px; text-align: left; transition: transform .1s; }
.opt:active { transform: scale(.98); }
.opt .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); flex: none; }
.opt.on { border-color: var(--violet); background: var(--grad-soft); }
.opt.on .dot { border: 0; background: var(--grad); box-shadow: inset 0 0 0 5px var(--card); }
.age { justify-content: center; padding: 20px; font-size: 17px; }
.age.first { background: var(--grad); color: #1a1530; }
.logo { width: 92px; height: 92px; margin: 24px auto 16px; border-radius: 28px; background: var(--grad); display: grid; place-items: center;
  font-size: 46px; font-weight: 800; color: #1a1530; box-shadow: 0 12px 40px rgba(167,139,250,.35); }
.spacer { flex: 1; }
.cta { width: 100%; padding: 18px; border-radius: 999px; background: var(--grad); color: #1a1530; font-weight: 700; font-size: 16px; margin-top: 20px; }
.cta:disabled { opacity: .4; }
.lang-row { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding: 16px 20px; border-radius: 18px; background: var(--card); color: var(--dim); }
.lang-row b { color: var(--text); font-weight: 600; }
.onb .ask { font-weight: 700; text-align: center; margin: 0 0 12px; }
.note18 { color: var(--faint); font-size: 12.5px; text-align: center; margin-top: 14px; }
.signin { display: flex; gap: 8px; margin-top: 22px; }
.signin input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 14px; outline: none; }
.signin button { padding: 0 18px; border-radius: 14px; border: 0; background: var(--grad); color: #fff; font-weight: 700; cursor: pointer; }
.gender { display: flex; align-items: center; gap: 16px; padding: 12px; }
.gender img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; background: var(--bg-2); }
.gender span { flex: 1; font-size: 18px; }

/* ---------- home: Discover ---------- */
.home { padding: 0 16px calc(84px + var(--safe-b)); max-width: 1400px; margin: 0 auto; }
.home-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 14px 0 12px; background: var(--bg); }
.brand { font-size: 20px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; }
.search { flex: 1; min-width: 0; max-width: 600px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px;
  border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--dim); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15px; color: var(--text); }
.search:focus-within { border-color: var(--dim); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); font-size: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 500; font-size: 14px; }
.chip.on { background: #fff; color: #111; border-color: #fff; }
/* Mood chips (2026-10-27): each mood has its own colour (--m), on the filter row and on the cards. */
.chips.moods { padding-top: 0; margin-top: -6px; }
.chip.mood { border-color: color-mix(in srgb, var(--m) 45%, transparent); color: var(--m); background: color-mix(in srgb, var(--m) 10%, var(--card)); }
.chip.mood.on { background: var(--m); color: #111; border-color: var(--m); }
.card-moods { display: flex; gap: 4px; margin-top: 6px; overflow: hidden; }
/* Phones: the mood row scrolls, a fade on the right says there is more. Computers: it wraps (below). */
.chips.moods { mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
/* Continue: the latest chats in one row */
.keep-label { margin: 4px 0 10px; }
.keep { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 16px; scrollbar-width: none; }
.keep::-webkit-scrollbar { display: none; }
.keep-row { flex: none; display: flex; align-items: center; gap: 10px; width: 250px; padding: 10px 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); text-align: left; }
.keep-row img, .keep-row .ini { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: none; }
.keep-row div { flex: 1; min-width: 0; }
.keep-row b, .keep-row span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keep-row b { font-size: 14px; }
.keep-row span { font-size: 12.5px; color: var(--dim); font-style: italic; }
.keep-row small { align-self: flex-start; color: var(--faint); font-size: 11.5px; }
.mood-tag { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; white-space: nowrap; color: var(--m);
  background: color-mix(in srgb, var(--m) 14%, transparent); border: 1px solid color-mix(in srgb, var(--m) 35%, transparent); }
.section { font-weight: 700; font-size: 16px; margin: 24px 0 12px; }
.empty { color: var(--dim); grid-column: 1 / -1; text-align: center; padding: 30px 0; }
/* Cards like Chai's: picture on top, title and premise below. 2 columns on phones, as many as fit on computers. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--card); text-align: left; transition: transform .12s; }
.card:active { transform: scale(.98); }
.card-pic { position: relative; aspect-ratio: 3 / 4; background: var(--bg-2); overflow: hidden; }
.card-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.card .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 48px; font-weight: 800; color: rgba(255,255,255,.14); background: var(--grad-soft); }
.card-text { padding: 10px 12px 12px; }
.card-title { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title span { font-weight: 500; color: var(--dim); }
.card-blurb { font-size: 13px; font-style: italic; color: var(--dim); line-height: 1.45; margin-top: 4px; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(13px * 1.45 * 3); }
.tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.12); color: #e4e4e7; white-space: nowrap; }
.card .badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
.card .plays { position: absolute; bottom: 8px; left: 8px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
.card .drawing { position: absolute; top: 45%; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--dim); animation: blink 1.6s infinite; }
.ini { display: grid; place-items: center; font-weight: 700; color: var(--dim); background: var(--card); }

/* ---------- chats page ---------- */
.chats h1 { font-size: 22px; margin: 16px 0 12px; }
.chat-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.chat-row img, .chat-row .ini { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; }
.chat-row div { flex: 1; min-width: 0; }
.chat-row b, .chat-row span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row span { font-size: 13px; color: var(--dim); }
.chat-row small { color: var(--faint); font-size: 12px; }

/* ---------- sidebar (computers) ---------- */
#side { display: none; }
#tabs { display: none; }
@media (min-width: 900px) {
  #side { display: flex; flex-direction: column; flex: none; width: var(--side); height: 100dvh; position: sticky; top: 0;
    padding: 14px 10px; background: #0a0a0b; border-right: 1px solid var(--line); overflow-y: auto; }
  body[data-screen=onb] #side { display: none; }
  .side-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 16px; }
  .side-brand { font-size: 18px; font-weight: 800; color: var(--text); text-decoration: none; white-space: nowrap; }
  .side-fold { width: 32px; height: 32px; border-radius: 8px; color: var(--dim); font-size: 18px; }
  .side-item, .side-chat, .side-me { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    color: var(--text); text-decoration: none; font-size: 15px; white-space: nowrap; }
  .side-item svg { flex: none; color: var(--dim); }
  .side-item.on { background: var(--card); }
  .side-item.on svg { color: var(--text); }
  .side-sep { height: 1px; background: var(--line); margin: 10px 4px; }
  .side-label { font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); padding: 6px 12px; }
  .side-chats { display: flex; flex-direction: column; }
  .side-chat { padding: 7px 12px; font-size: 14px; color: var(--dim); }
  .side-chat.on { background: var(--card); color: var(--text); }
  .side-chat img, .side-chat .ini, .side-me .ini { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
  .side-chat span, .side-item span { overflow: hidden; text-overflow: ellipsis; }
  .side-me { margin-top: auto; border-top: 1px solid var(--line); border-radius: 0; padding-top: 14px; }
  .home-top .brand { display: none; }
  .home { padding-bottom: 40px; }
  .chips.moods { flex-wrap: wrap; mask-image: none; -webkit-mask-image: none; }
  .chip.mood { padding: 6px 12px; font-size: 13px; }
  /* « folds the sidebar to icons */
  body.mini #side { width: 68px; }
  body.mini #side span:not(.ini), body.mini .side-label, body.mini .side-brand span { display: none; }
  body.mini .side-top { flex-direction: column; gap: 8px; padding: 4px 0 12px; }
  body.mini .side-fold { transform: rotate(180deg); }
  body.mini .side-item, body.mini .side-chat, body.mini .side-me { justify-content: center; padding: 10px 0; }
}
@media (hover: hover) and (min-width: 900px) {
  .side-item:not(.on):hover, .side-chat:not(.on):hover, .side-me:hover, .side-fold:hover { background: rgba(255,255,255,.05); }
}

/* ---------- tab bar (phones) ---------- */
@media (max-width: 899px) {
  #tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; padding: 6px 4px calc(6px + var(--safe-b));
    background: rgba(10,10,11,.96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
  body[data-screen=onb] #tabs, body[data-screen=chat] #tabs { display: none; }
  #tabs a, #tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0;
    color: var(--faint); text-decoration: none; font-size: 11px; }
  #tabs .on { color: var(--text); }
  .page { padding-bottom: calc(90px + var(--safe-b)); }
}

/* ---------- chat ---------- */
.chat { height: 100dvh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.chat-bg { position: absolute; inset: 0 0 auto; height: 62%; background-size: cover; background-position: center 20%; opacity: .32; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 30%, transparent); mask-image: linear-gradient(#000 30%, transparent); }
.chat-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 4px;
  background: linear-gradient(rgba(14,14,16,.92), rgba(14,14,16,.6)); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.05); }
.chat-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-head .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; border-radius: 14px; padding: 2px 6px 2px 2px; }
.chat-head .who > span { min-width: 0; }
.chat-head .who b { display: block; font-size: 16px; }
.chat-head .who b + span { font-size: 12px; color: var(--dim); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgs { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 20px; white-space: normal; word-wrap: break-word; animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.msg.ai { align-self: flex-start; background: rgba(28,28,32,.92); border: 1px solid rgba(255,255,255,.06); border-bottom-left-radius: 6px; backdrop-filter: blur(6px); }
.msg.me { align-self: flex-end; background: var(--grad); color: #1a1530; border-bottom-right-radius: 6px; font-weight: 500; }
.msg em { font-style: italic; color: var(--dim); }
.msg.me em { color: #3d3266; }
.sms { display: inline-block; margin: 3px 0; padding: 7px 12px; max-width: 100%; border-radius: 16px 16px 16px 4px;
  background: #2c2c33; color: var(--text); font-style: normal; }
.sms b { display: block; font-size: 11px; font-weight: 600; color: var(--faint); margin-bottom: 1px; }
.msg.me .sms { background: rgba(26,21,48,.12); color: inherit; }
.meta { font-size: 11px; color: var(--faint); margin: -6px 4px 0; align-self: flex-start; font-variant-numeric: tabular-nums; }
.divider { align-self: center; font-size: 11.5px; color: var(--faint); padding: 3px 12px; border-radius: 999px; background: rgba(28,28,32,.8); }
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 15px 16px; border-radius: 20px; border-bottom-left-radius: 6px; background: rgba(28,28,32,.92); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { position: relative; z-index: 2; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b));
  background: rgba(14,14,16,.95); border-top: 1px solid rgba(255,255,255,.05); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); background: var(--card); border-radius: 22px; padding: 11px 16px;
  max-height: 140px; outline: none; line-height: 1.4; }
.composer textarea:focus { border-color: var(--violet); }
.send { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--grad); color: #1a1530; font-size: 20px; font-weight: 800; display: grid; place-items: center; }
.send:disabled { opacity: .35; }
/* 🔄 another answer, under the newest reply */
.retry { align-self: flex-start; margin: -4px 0 0 4px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--dim);
  background: rgba(28,28,32,.7); border: 1px solid var(--line); animation: fade .3s; }
.hint { font-size: 12px; color: var(--faint); text-align: center; padding: 0 12px 6px; }

/* ---------- sheets & toasts ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 520px; max-height: 88dvh; overflow-y: auto; background: var(--bg-2); border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + var(--safe-b)); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { font-size: 18px; margin: 0 0 14px; }
.sheet h3 { font-size: 13px; color: var(--dim); font-weight: 600; margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .4px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { padding: 9px 16px; border-radius: 999px; background: var(--card); color: var(--dim); font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--grad); color: #1a1530; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--violet); }
.switch.on::after { transform: translateX(20px); }
.menu-item { display: block; width: 100%; text-align: left; padding: 15px 4px; border-bottom: 1px solid var(--line); font-weight: 500; }
.menu-item:last-child { border-bottom: 0; }
.menu-item.danger { color: #ff8fa3; }
.menu-item[data-sure] { background: rgba(255,143,163,.12); border-radius: 12px; padding-left: 12px; padding-right: 12px; }
.seg button.wait { opacity: .5; }
.pre { white-space: pre-wrap; font-size: 13px; color: var(--dim); background: var(--card); border-radius: 14px; padding: 12px 14px; margin: 0; }
.small { font-size: 12.5px; color: var(--faint); }
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 30; max-width: 88%; padding: 11px 18px;
  border-radius: 999px; background: #26262b; color: var(--text); font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: fade .2s; }
.center { min-height: 100dvh; display: grid; place-items: center; color: var(--dim); }

/* 💡 suggested replies */
.idea { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--card); border: 1px solid var(--line); font-size: 19px; display: grid; place-items: center; }
.idea:disabled { opacity: .5; }
.suggests { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 2px; background: rgba(14,14,16,.95); }
.suggests[hidden] { display: none; }
.suggests .typing { align-self: flex-start; }
.sug { text-align: left; padding: 10px 14px; border-radius: 16px; background: var(--grad-soft); border: 1px solid rgba(167,139,250,.35); font-size: 14px; line-height: 1.45; }
.sug b { display: block; font-size: 12px; color: var(--dim); font-weight: 600; margin-bottom: 2px; }
.sug em { font-style: italic; color: var(--dim); }
.suggests .meta { margin: 0 4px 4px; }

.field { width: 100%; box-sizing: border-box; background: var(--card); color: inherit; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 16px; resize: vertical; }
.field:focus { outline: none; border-color: var(--violet); }

/* ---------- characters made by the user ---------- */
.page { min-height: 100dvh; padding: 6px 18px calc(28px + var(--safe-b)); }
.page h1 { font-size: 24px; font-weight: 800; margin: 4px 0 4px; }
.page .sub { color: var(--dim); margin: 0 0 6px; font-size: 14px; }
.page h3 { font-size: 13px; color: var(--dim); font-weight: 600; margin: 20px 0 8px; text-transform: uppercase; letter-spacing: .4px; }
.idea-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.idea-chips .chip { text-align: left; font-weight: 500; font-size: 13px; padding: 7px 12px; }
.refused { margin: 16px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(255,143,163,.12); color: #ffb3c1; font-size: 14px; }
.refused[hidden] { display: none; }
.card.new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; text-align: center;
  background: var(--grad-soft); border: 1.5px dashed rgba(167,139,250,.5); }
.card.new .plus { font-size: 34px; }
.card.new b { font-size: 15px; }
.card.new small { font-size: 12px; color: var(--dim); line-height: 1.35; }
.card .ph, .pic { background: var(--grad-soft); }
.card .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; font-weight: 800; color: rgba(255,255,255,.18); }
.card .drawing { position: absolute; top: 38%; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--dim); animation: blink 1.6s infinite; }
.pic { position: relative; width: min(240px, 70%); aspect-ratio: 5 / 6; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center; text-align: center; color: var(--dim); font-size: 13px; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pic span { position: relative; padding: 0 14px; }
.pic span:empty { display: none; }
.pic-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.center-text { text-align: center; margin: 8px 6px 0; }
.tags-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tags-row small { color: var(--dim); margin-right: 4px; }
.page .menu-item { text-align: center; }
.sheet .sample { display: block; width: 120px; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 14px; margin: 0 auto; }
.sheet .menu-item[data-close] { text-align: center; color: var(--dim); }
.tip-typed { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--dim); background: var(--card); padding: 8px 12px; border-radius: 12px; }
.tip-ex { display: flex; flex-direction: column; margin-top: 8px; }
.tip-more { margin: 18px 0 4px; }
.tip-more p { margin: 6px 0; }

/* "About" sheet from the chat header */
.about-pic { width: min(260px, 72%); aspect-ratio: 5 / 6; margin: 4px auto 14px; border-radius: var(--radius); overflow: hidden; background: var(--grad-soft); }
.about-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet .about-name { text-align: center; font-size: 22px; margin: 0; }
.about-name small { font-size: 14px; font-weight: 500; color: var(--dim); }
.about-tags { justify-content: center; }
.about-tags .tag { background: var(--card); color: var(--dim); font-size: 12px; padding: 3px 10px; }
.about-blurb { color: #d9d4ee; line-height: 1.6; margin: 14px 2px 6px; }

/* Placeholder cards while the gallery loads */
.card.skel { aspect-ratio: 3 / 5.2; background: linear-gradient(100deg, var(--card) 40%, #26262b 50%, var(--card) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* Mouse hover (computers only, so phones don't get stuck states) */
@media (hover: hover) {
  .card { transition: transform .15s, box-shadow .15s; }
  .card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #3f3f46; }
  .chip:not(.on):hover, .seg button:not(.on):hover, .icon-btn:hover, .idea:hover:not(:disabled), .retry:hover { background: var(--line); color: var(--text); }
  .back:hover, .chat-head .who:hover { background: rgba(255,255,255,.06); }
  .menu-item:hover { background: rgba(255,255,255,.04); }
  .opt:not(.on):hover { border-color: var(--line); }
  .cta:hover:not(:disabled), .send:hover:not(:disabled) { filter: brightness(1.08); }
  .sug:hover { border-color: var(--violet); }
}

/* On a computer: a wider chat column. */
@media (min-width: 700px) {
  .chat { max-width: 760px; margin: 0 auto; }
  .msg { max-width: min(86%, 580px); }
}

/* The first letter where a character has no picture (free users' own characters) */
.chat-head .ini { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.pic .ini, .about-pic .ini { width: 100%; height: 100%; font-size: 72px; background: var(--grad-soft); color: rgba(255,255,255,.3); }

/* 🌐 translate: a tappable reply, and its translation under a thin line */
.msg.ai.tr-on { cursor: pointer; }
.msg.ai.tr-on::after { content: '🌐'; font-size: 11px; opacity: .45; float: right; margin: 6px 0 -2px 8px; }
.msg .tr { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.12); }
.msg .tr.dim { color: var(--faint); font-size: 13px; }
.row select { background: var(--line); color: inherit; border: 0; border-radius: 10px; padding: 8px 10px; font: inherit; max-width: 55%; }
.uid { display: inline-flex; align-items: center; gap: 6px; background: var(--line); color: inherit; border: 0; border-radius: 10px; padding: 6px 10px; font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.uid svg { width: 14px; height: 14px; opacity: .7; }

/* 📋 copy button under each reply */
.acts { align-self: flex-start; margin: -4px 0 -4px 8px; height: 22px; display: flex; align-items: center; }
.copy { width: 26px; height: 22px; display: grid; place-items: center; border-radius: 8px; color: var(--faint); opacity: .7; }
.copy svg { width: 15px; height: 15px; }
.copy:hover, .copy.done { opacity: 1; color: var(--text); }
.copy.done { color: #6ee7a8; }

/* The character beside the chat (wide screens only, like Chai): big picture, name, tags, premise */
.chat-wrap { display: flex; min-height: 100dvh; }
.chat-wrap .chat { flex: 1; min-width: 0; }
.char-side { display: none; }
@media (min-width: 1240px) {
  .char-side { display: block; flex: none; width: 340px; height: 100dvh; overflow-y: auto; padding: 18px 18px 24px;
    border-left: 1px solid var(--line); background: #0a0a0b; }
  .char-side .about-pic { width: 100%; aspect-ratio: 4 / 5; margin: 0 0 16px; }
  .char-side .about-name { font-size: 22px; margin: 0; text-align: left; }
  .char-side .about-tags { justify-content: flex-start; }
  .char-side .about-blurb { font-size: 14px; margin: 14px 0 0; }
  .char-side .by { margin-top: 18px; font-size: 13px; color: var(--faint); }
}

/* 💎 Earn (the offerwall, 2026-10-28) */
.earn .balance { font-size: 30px; font-weight: 800; margin: 6px 0 8px; }
.earn-note { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 16px 0; }
.earn-note p { margin: 6px 0 0; }
.save-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.offer { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.offer img, .offer .ini { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; font-size: 22px; }
.offer div { flex: 1; min-width: 0; }
.offer b { display: block; font-size: 15px; }
.offer span:not(.gem):not(.ini) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.gem { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--grad); color: #1a1530; font-weight: 700; font-size: 14px; white-space: nowrap; }
.gem.dim { background: var(--card); color: var(--dim); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.gem:disabled { opacity: .5; }
.earn .rules { margin-top: 14px; }

/* The waiting list (beta seats) and invites (2026-10-28) */
.onb.wait .wl { display: flex; flex-direction: column; gap: 4px; }
.onb.wait .wl .field { width: 100%; }
.onb.wait h3 { margin: 26px 0 0; font-size: 14px; }
.onb.wait .small { color: var(--dim); text-align: center; }
.code { display: flex; gap: 8px; margin-top: 10px; }
.code input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 15px;
  outline: none; text-transform: uppercase; letter-spacing: .12em; }
.code button { padding: 0 18px; border-radius: 14px; border: 0; background: var(--grad); color: #fff; font-weight: 700; cursor: pointer; }
.onb .invited { text-align: center; color: var(--dim); margin: 6px 0 0; }
.invite-code { font-size: 30px; font-weight: 800; letter-spacing: .2em; text-align: center; padding: 14px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); margin: 6px 0 8px; user-select: all; }

/* 💎 Diamonds page (the tab that replaced Search, 2026-10-28) */
.home-top > * { min-width: 0; }
.earn .dm-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin: 8px 0 12px; }
.earn .dm-card .balance { margin: 0 0 4px; }
.earn .dm-card .small { margin-top: 2px; }
.earn h2 { font-size: 18px; margin: 22px 0 4px; }
.earn .dm-way { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin: 12px 0; }
.earn .dm-way h3 { margin: 0 0 4px; font-size: 16px; }
.earn .dm-way .offer:last-of-type { border-bottom: 0; }
.earn .dm-code { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 6px; }
.earn .dm-code span:first-child { font-size: 24px; font-weight: 800; letter-spacing: .18em; user-select: all; }
.earn .dm-btns { display: flex; gap: 8px; margin-top: 8px; }
.earn .faint { opacity: .7; }

/* 🔥 heat meter in a Spicy chat's header */
.chat-head .heat { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim, #aaa); flex: none; }
.chat-head .heat[hidden] { display: none; }
.chat-head .heat i { display: block; width: 54px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.chat-head .heat b { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #ff9a3c, #ff3d5a); transition: width .6s ease; }
.chat-head .heat em { font-style: normal; min-width: 30px; }
.chat-head .heat.hot span { animation: heatpulse 1.2s ease-in-out infinite; }
@keyframes heatpulse { 50% { transform: scale(1.2); } }
