/* chat: calm and plain. The system font, one deep green, no borders, hairlines only between
   list rows, rounded bubbles. Light or dark follows the system. */
:root {
  /* Chat's own colours, resolved from the shared rc.css tokens when it is linked (rc_head), and
     from the same values when it is not. Chat keeps a white page and deep-green bubbles. */
  --c-bg: var(--surface, #ffffff); --c-soft: var(--sunk, #efede8); --c-fg: var(--fg, #1f1e1c); --c-muted: var(--muted, #67645f);
  --c-line: var(--line, #e4e1da); --c-accent: var(--accent, #2f6f55); --c-accent-soft: color-mix(in srgb, var(--c-accent) 13%, var(--c-bg));
  --c-mine: var(--accent, #2f6f55); --c-on-mine: #ffffff; --c-theirs: var(--c-soft); --c-on-theirs: var(--c-fg);
  --c-raised: var(--surface, #ffffff); --c-bad: var(--bad, #c0392f); --c-shadow: 0 10px 40px rgba(0, 0, 0, .16);
  --c-font: var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --r: 20px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: var(--bg, #161615); --c-soft: #262523; --c-fg: var(--fg, #ecebe6); --c-muted: var(--muted, #a09e97);
    --c-line: var(--line, #34332f); --c-accent: var(--accent, #6cc79a);
    --c-mine: #2f6f55; --c-on-mine: #ffffff; --c-theirs: #2a2927;
    --c-raised: var(--surface, #1f1f1d); --c-bad: var(--bad, #ef7a70); --c-shadow: 0 10px 40px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--c-bg); color: var(--c-fg); }
body { font: 16px/1.4 var(--c-font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
/* rc.css styles every button and input; chat draws its own, so reset what it sets. */
button { background: none; border: 0; padding: 0; margin: 0; min-height: 0; border-radius: 0; display: inline-block; gap: 0;
  line-height: inherit; text-align: inherit; font-size: inherit; justify-content: normal; align-items: normal; cursor: pointer; }
button:hover { border-color: transparent; }
a { color: var(--c-accent); }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--c-muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.hidden { display: none !important; }

/* --- the two panes ---------------------------------------------------------------------------- */
#app { display: flex; flex-direction: column; height: 100dvh; }
.shell { display: grid; grid-template-columns: 1fr; flex: 1; min-height: 0; }
.netbar { flex: none; padding: calc(6px + var(--safe-t)) 16px 6px; text-align: center; font-size: 14px; background: var(--warn-bg, #faf0d9); color: var(--warn, #94650b); }
.side, .main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--c-bg); }
.shell.has-conv .side { display: none; }
.shell:not(.has-conv) .main { display: none; }
@media (min-width: 761px) {
  .shell { grid-template-columns: minmax(300px, 360px) 1fr; }
  .shell .side, .shell.has-conv .side, .shell:not(.has-conv) .main { display: flex; }
  .side { border-right: 1px solid var(--c-line); }
  .icon.back { visibility: hidden; width: 8px; }
}
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pad { padding: 8px 16px calc(24px + var(--safe-b)); }

/* --- bars ------------------------------------------------------------------------------------- */
.bar { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: calc(6px + var(--safe-t)) 8px 6px; flex: none; }
.bar h1 { flex: 1; margin: 0; font-size: 20px; font-weight: 700; text-align: center; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side > .bar h1 { font-size: 22px; }
.icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; color: var(--c-accent); flex: none; }
.icon:active { background: var(--c-soft); }
.icon.me .face { width: 32px; height: 32px; }
.spacer { width: 44px; flex: none; }
.text-btn { min-width: 44px; height: 44px; padding: 0 8px; color: var(--c-accent); font-weight: 600; }
.text-btn:disabled { color: var(--c-muted); opacity: .5; }
.conv-head { gap: 4px; }
.who-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; text-align: left; }
.who-btn span { display: flex; flex-direction: column; min-width: 0; }
.who-btn b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-btn small { color: var(--c-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-btn small:empty { display: none; }

/* --- search ----------------------------------------------------------------------------------- */
.search { position: relative; margin: 0 16px 8px; flex: none; }
.search svg { position: absolute; left: 11px; top: 10px; width: 20px; height: 20px; color: var(--c-muted); pointer-events: none; }
.search :is(#q, #pq) { min-height: 0; width: 100%; height: 40px; border: 0; border-radius: 12px; background: var(--c-soft); padding: 0 12px 0 38px; font-size: 16px; }
.search :is(#q, #pq)::placeholder { color: var(--c-muted); }
.search :is(#q, #pq)::-webkit-search-cancel-button { display: none; }

/* --- faces ------------------------------------------------------------------------------------ */
.face { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; background: var(--c-soft); display: inline-block; }
.face.sm { width: 36px; height: 36px; }
.face.xs { width: 28px; height: 28px; }
.face.xxs { width: 16px; height: 16px; }
.face.xl { width: 88px; height: 88px; }
.face.ic { display: grid; place-items: center; color: var(--c-accent); background: var(--c-accent-soft); }
.face.pair { position: relative; background: none; }
.face.pair img { position: absolute; width: 68%; height: 68%; border-radius: 50%; object-fit: cover; border: 2px solid var(--c-bg); }
.face.pair .a { top: 0; left: 0; }
.face.pair .b { right: 0; bottom: 0; }
.face.pair span.a, .face.pair span.b { position: absolute; width: 68%; height: 68%; border-radius: 50%; background: var(--c-soft); }

/* --- rows ------------------------------------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 72px; text-align: left; position: relative; }
.rows li + li .row::before { content: ""; position: absolute; top: 0; left: 80px; right: 0; border-top: 1px solid var(--c-line); }
.row:active, .row.on { background: var(--c-soft); }
.row.static { cursor: default; }
.row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .top { display: flex; align-items: baseline; gap: 6px; }
.row b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .top b { flex: 1; min-width: 0; }
.row time { color: var(--c-muted); font-size: 13px; flex: none; }
.row .sub { color: var(--c-muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.unread .sub { color: var(--c-fg); }
.row.unread b { font-weight: 700; }
.row .dot { width: 10px; height: 10px; border-radius: 5px; background: var(--c-accent); flex: none; }
.muted-ic svg { width: 15px; height: 15px; color: var(--c-muted); vertical-align: -2px; }
.row .tick { width: 24px; height: 24px; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--c-line); flex: none; display: grid; place-items: center; }
.row .tick.on { background: var(--c-mine); box-shadow: none; color: var(--c-on-mine); }
.row .tick svg { width: 16px; height: 16px; stroke-width: 2.6; }
.row[disabled] { cursor: default; }
.sec { margin: 14px 16px 4px; font-size: 13px; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.empty { padding: 24px 24px; text-align: center; color: var(--c-muted); }
.empty.big { padding-top: 15vh; }
.empty.big p:first-child { color: var(--c-fg); font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.foot { padding: 16px; text-align: center; color: var(--c-muted); font-size: 15px; }
.link { color: var(--c-accent); font-weight: 500; text-decoration: none; }
.chips { display: flex; gap: 6px; padding: 0 16px 8px; overflow-x: auto; flex: none; }
.chip { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border-radius: 18px; background: var(--c-accent-soft); white-space: nowrap; font-size: 15px; }
.chip svg { width: 14px; height: 14px; }

/* --- buttons and boxes ------------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 22px;
  background: var(--c-mine); color: var(--c-on-mine); font-weight: 600; text-decoration: none; border: 0; cursor: pointer; }
.btn.plain { background: var(--c-soft); color: var(--c-fg); }
.btn.wide { width: 100%; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.group-box { background: var(--c-soft); border-radius: 16px; padding: 14px 16px; margin: 16px 0; }
.group-box h3 { margin: 0 0 6px; font-size: 15px; }
.group-box .btns { justify-content: flex-start; margin-top: 10px; }
.group-box .btn.plain { background: var(--c-bg); }
.group-box .rows { margin: 0 -16px -14px; }
.group-box .row { min-height: 60px; }
.group-box .row .face { width: 40px; height: 40px; }
.group-box .rows li + li .row::before { left: 68px; }
.group-box.danger .row-btn { color: var(--c-bad); font-weight: 600; min-height: 44px; width: 100%; text-align: left; }
.linkbox { font-size: 15px; background: var(--c-bg); border-radius: 10px; padding: 10px 12px; margin: 8px 0 0; overflow-wrap: break-word; user-select: all; }
.who { text-align: center; padding: 8px 0 4px; }
.who h2 { margin: 10px 0 0; font-size: 22px; }
.who p { margin: 2px 0 6px; }
.privacy { color: var(--c-muted); font-size: 14px; text-align: center; padding: 0 12px; }
.field { display: block; margin: 12px 0; font-size: 16px; }
.field span { display: block; font-size: 13px; color: var(--c-muted); margin: 0 0 4px 4px; }
.field :is(#gname, #rename) { min-height: 0; width: 100%; height: 46px; border: 0; border-radius: 12px; background: var(--c-soft); padding: 0 14px; font-size: 17px; }
.switch { font-size: 16px; margin: 0; display: flex; align-items: center; justify-content: space-between; min-height: 32px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { width: 50px; height: 30px; border-radius: 15px; background: var(--c-line); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 13px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + i { background: var(--c-accent); }
.switch input:checked + i::after { transform: translateX(20px); }
.nothing { flex: 1; display: grid; place-items: center; color: var(--c-muted); padding: 24px; text-align: center; }

/* --- messages --------------------------------------------------------------------------------- */
.msgs { padding: 8px 12px 12px; display: flex; flex-direction: column; }
.msgs .list { margin-top: auto; }
.m-wrap { transition: background .6s; border-radius: 12px; }
.m-wrap.flash { background: var(--c-accent-soft); }
.when { text-align: center; color: var(--c-muted); font-size: 12px; margin: 18px 0 8px; }
.sender { margin: 10px 0 2px 44px; font-size: 12px; color: var(--c-muted); }
.m { display: flex; align-items: flex-end; gap: 8px; margin-top: 2px; }
.m.mine { justify-content: flex-end; }
.m .col { display: flex; flex-direction: column; max-width: min(78%, 520px); min-width: 0; }
.m.mine .col { align-items: flex-end; }
.m.theirs .col { align-items: flex-start; }
.av, .av-space { width: 28px; height: 28px; flex: none; }
.bubble { padding: 8px 13px; border-radius: var(--r); background: var(--c-theirs); color: var(--c-on-theirs); overflow-wrap: anywhere; white-space: pre-wrap;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; max-width: 100%; }
.bubble.mine { background: var(--c-mine); color: var(--c-on-mine); }
.bubble.mine a { color: inherit; }
.bubble.first { margin-top: 6px; }
.bubble.mine:not(.last) { border-bottom-right-radius: 6px; }
.bubble.mine:not(.first) { border-top-right-radius: 6px; }
.bubble.theirs:not(.last) { border-bottom-left-radius: 6px; }
.bubble.theirs:not(.first) { border-top-left-radius: 6px; }
.bubble.pending { opacity: .7; }
.bubble.failed { opacity: .55; }
.bubble.bare { padding: 0; background: none; }
.bubble .text.big { font-size: 40px; line-height: 1.15; }
.bubble:has(.text.big):not(:has(.quote)) { background: none; padding: 0 2px; }
.unsent { font-style: italic; opacity: .75; }
.quote { display: flex; align-items: center; gap: 8px; max-width: 100%; text-align: left; font-size: 14px; line-height: 1.3; padding: 5px 10px 5px 8px; margin: 2px -5px 6px;
  border-radius: 10px; border-left: 3px solid currentColor; background: rgba(0, 0, 0, .06); color: inherit; }
.quote { min-width: min(170px, 100%); }
.quote > span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.quote b { font-size: 13px; }
.quote span span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.quote img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; }
.bubble.mine .quote { background: rgba(255, 255, 255, .18); }
.photo { display: block; position: relative; width: min(260px, 62vw, calc(320px / var(--r))); aspect-ratio: 1 / var(--r); border-radius: 16px; overflow: hidden; background: var(--c-soft); margin: 0 -8px; }
.bubble.bare .photo { margin: 0; }
.bubble:not(.bare) .photo { margin: -3px -8px 6px; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prog { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.4); overflow: hidden; }
.prog i { display: block; height: 100%; background: #fff; transition: width .2s; }
.filecard { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; padding: 4px 0; min-width: 180px; }
.filecard svg { flex: none; }
.filecard span { display: flex; flex-direction: column; min-width: 0; }
.filecard b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filecard small { opacity: .75; }
.reacts { display: flex; gap: 4px; margin-top: -6px; position: relative; z-index: 1; padding: 0 6px; }
.reacts .r { background: var(--c-bg); box-shadow: 0 0 0 2px var(--c-bg); border-radius: 12px; padding: 1px 6px; font-size: 14px; display: flex; align-items: center; gap: 2px; min-height: 24px;
  background: var(--c-soft); }
.reacts .r.me { background: var(--c-accent-soft); }
.reacts small { font-size: 12px; color: var(--c-muted); }
.state { text-align: right; color: var(--c-muted); font-size: 12px; margin: 3px 4px 4px; display: flex; justify-content: flex-end; align-items: center; gap: 2px; }
.state.err { color: var(--c-bad); }
/* Shown only when a send takes a while (the first of a session can take a few seconds): a
   quick one never flashes it. */
.state.sending { opacity: 0; animation: chat-late .2s .6s forwards; }
@keyframes chat-late { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .state.sending { animation-duration: 0s; } }
.state.faces .face { border: 1px solid var(--c-bg); }
.start { text-align: center; color: var(--c-muted); padding: 10vh 16px 16px; }
.start p { margin: 12px 0 16px; }
.jump { position: absolute; right: 14px; bottom: calc(80px + var(--safe-b)); }
.jump .icon { background: var(--c-bg); box-shadow: var(--c-shadow); }

/* --- composer --------------------------------------------------------------------------------- */
.composer { flex: none; padding: 6px 8px calc(8px + var(--safe-b)); background: var(--c-bg); }
.row-in { display: flex; align-items: flex-end; gap: 4px; }
.composer textarea { flex: 1; min-height: 40px; max-height: 160px; resize: none; border: 0; border-radius: 20px; background: var(--c-soft);
  padding: 9px 14px; font-size: 16px; line-height: 22px; margin: 2px 0; }
.composer .sendb { width: 0; overflow: hidden; opacity: 0; transition: opacity .15s, width .15s; background: var(--c-mine); color: var(--c-on-mine); height: 36px; border-radius: 18px; margin: 4px 0 4px 2px; }
.composer.ready .sendb { width: 36px; opacity: 1; }
.composer .sendb svg { stroke-width: 2.4; width: 20px; height: 20px; }
.replying { display: flex; align-items: center; gap: 6px; padding: 0 0 4px 12px; font-size: 14px; color: var(--c-muted); }
.replying span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replying .icon { width: 32px; height: 32px; color: var(--c-muted); }
.blocked { text-align: center; color: var(--c-muted); margin: 8px; }

/* --- the sheet, the viewer, the toast ----------------------------------------------------------- */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0); transition: background .18s; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back.in { background: rgba(0, 0, 0, .4); }
.sheet { width: 100%; max-width: 420px; background: var(--c-raised); border-radius: 20px 20px 0 0; padding: 12px 12px calc(12px + var(--safe-b)); transform: translateY(100%); transition: transform .18s ease-out; box-shadow: var(--c-shadow); }
@media (min-width: 761px) { .sheet-back { align-items: center; } .sheet { border-radius: 20px; } }
.sheet-back.in .sheet { transform: none; }
.sheet .emoji { display: flex; justify-content: space-between; padding: 4px 4px 12px; }
.sheet .emoji button { font-size: 28px; width: 50px; height: 50px; border-radius: 25px; }
.sheet .emoji button.on { background: var(--c-accent-soft); }
.sheet > button, .sheet > a { display: block; width: 100%; min-height: 50px; text-align: left; padding: 0 16px; border-radius: 12px; font-size: 17px; color: var(--c-fg); text-decoration: none; line-height: 50px; }
.sheet > button:active, .sheet > a:active { background: var(--c-soft); }
.sheet .danger { color: var(--c-bad); }
.sheet .cancel { text-align: center; color: var(--c-muted); }
.viewer { position: fixed; inset: 0; background: #000; z-index: 30; display: grid; place-items: center; touch-action: none; transition: background .15s; }
.viewer img { grid-area: 1 / 1; max-width: 100vw; max-height: 100dvh; object-fit: contain; transition: transform .15s; }
.viewer .blur { width: 100vw; height: 100dvh; filter: blur(8px); }
.viewer.loaded .blur { visibility: hidden; }
.viewer .full { opacity: 0; transition: opacity .2s, transform .15s; }
.viewer.loaded .full { opacity: 1; }
.viewer-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; gap: 8px; align-items: center; padding: calc(8px + var(--safe-t)) 8px 12px;
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); color: #fff; }
.viewer-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.viewer-who small { opacity: .75; font-size: 13px; }
.viewer-bar .icon { color: #fff; }
.viewer-bar .btn.plain { background: rgba(255,255,255,.16); color: #fff; }
.viewer-wait { position: absolute; bottom: calc(24px + var(--safe-b)); left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 14px; }
.viewer.loaded:not(.failed) .viewer-wait { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(76px + var(--safe-b)); transform: translate(-50%, 150%); max-width: min(92vw, 440px); background: var(--c-fg); color: var(--c-bg);
  padding: 10px 16px; border-radius: 14px; font-size: 15px; z-index: 40; transition: transform .2s, opacity .2s; box-shadow: var(--c-shadow); text-align: center; opacity: 0; pointer-events: none; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* --- the visitor and invite pages ----------------------------------------------------------------- */
.visit { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 24px calc(24px + var(--safe-b)); max-width: 460px; margin: 0 auto; overflow: auto; }
body:has(.visit) { overflow: auto; }
.visit h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin: 18px 0 8px; }
.visit p { margin: 8px 0; }
.visit .btn { min-width: 200px; margin-top: 12px; font-size: 17px; min-height: 50px; border-radius: 25px; }
.visit .note { background: var(--c-soft); border-radius: 14px; padding: 12px 16px; margin-top: 16px; }
.visit form { margin: 0; }
.hero { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; background: var(--c-soft); }
.stack { display: flex; justify-content: center; }
.stack .hero { width: 88px; height: 88px; border: 3px solid var(--c-bg); }
.stack .hero + .hero { margin-left: -24px; }
.logo { width: 76px; height: 76px; border-radius: 22px; background: var(--c-accent) url("/icon.svg") center / cover; }
.msgs { position: relative; }
.new-mark { display: flex; align-items: center; gap: 10px; margin: 16px 4px 6px; color: var(--c-accent); font-size: 12px; font-weight: 600; }
.new-mark::before, .new-mark::after { content: ""; flex: 1; border-top: 1px solid currentColor; opacity: .35; }
.jump-b { height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 22px;
  background: var(--c-bg); color: var(--c-accent); box-shadow: var(--c-shadow); font-size: 14px; font-weight: 600; }
.jump.pill .jump-b { padding: 0 16px 0 12px; background: var(--c-raised); color: var(--c-accent); box-shadow: var(--c-shadow), 0 0 0 1px var(--c-line); }
.jump.pill .jump-b svg { width: 18px; height: 18px; }
.jump.pill { right: 50%; transform: translateX(50%); }
.sheet-msg { display: flex; gap: 10px; align-items: center; padding: 4px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--c-line); }
.sheet-msg img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.sheet-msg > span { display: flex; flex-direction: column; min-width: 0; }
.sheet-msg small { color: var(--c-muted); font-size: 13px; }
.sheet-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.sheet .danger.sure { background: var(--c-bad); color: #fff; text-align: center; font-weight: 600; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 15px; }
.empty.big .small { margin-top: 20px; }
/* A wide screen: the conversation is a column, not the whole window. */
@media (min-width: 761px) {
  .msgs .list, .msgs .older { width: 100%; max-width: 760px; margin-left: auto; margin-right: auto; }
  .msgs .list { margin-top: auto; }
  .composer > * { max-width: 760px; margin-left: auto; margin-right: auto; }
}
.visit .about { max-width: 34ch; margin-top: 20px; }
.name-note { display: flex; align-items: center; gap: 4px; margin: 0 16px 8px; padding: 8px 4px 8px 14px; border-radius: 12px; background: var(--c-accent-soft); font-size: 14px; flex: none; }
.composer .name-note { margin: 0 0 6px; }
.name-note span { flex: 1; }
.name-note a { font-weight: 600; }
.name-note .icon { width: 36px; height: 36px; color: var(--c-muted); }
.bubble.gone, .bubble.mine.gone { background: none; color: var(--c-muted); box-shadow: inset 0 0 0 1px var(--c-line); border: 1px dashed transparent; font-size: 15px; }
.bubble.gone .unsent { opacity: 1; }
/* Keyboard and screen readers. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline: none; box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-accent) 50%, transparent); }
.nw { white-space: nowrap; }
.bubble:focus-visible { outline-offset: 3px; }
.row:focus-visible { outline-offset: -2px; border-radius: 12px; }
.row .bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row .bottom .sub { flex: 1; min-width: 0; }
/* The list's bar follows the shared header (rc.css): mark, name, then the person. */
.list-bar { padding-left: 16px; gap: 10px; }
.list-bar h1 { flex: none; text-align: left; }
.list-bar .grow { flex: 1; }
.list-bar .rc-mark { display: inline-flex; flex: none; width: 28px; height: 28px; border-radius: 7px; }
.list-bar .rc-mark svg { width: 28px; height: 28px; display: block; stroke: none; }
.list-bar .icon.me { margin-left: -6px; }
.rc-env { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--warn-bg, #faf0d9); color: var(--warn, #94650b); }
/* Visitor pages under the shared header. */
.rc-header + .visit { min-height: calc(100dvh - 57px); }
.rc-header .rc-mark svg { stroke: none; }
/* The model: its answer being written, what it reads, and the @model it answers to. */
.typing { display: inline-flex; gap: 4px; align-items: center; height: 22px; vertical-align: middle; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .3; animation: chat-dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes chat-dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: .8; transform: translateY(-2px); } }
.caret { display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: currentColor; opacity: .35; }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .5; } }
.bubble .at, .composer .mention b { color: var(--c-accent); font-weight: 600; }
.bubble.mine .at { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.state.left { justify-content: flex-start; text-align: left; }
.state.left.indent { margin-left: 40px; }
.model-note { display: flex; gap: 8px; align-items: flex-start; max-width: 520px; margin: 18px auto 10px; padding: 10px 14px; border-radius: 14px;
  background: var(--c-accent-soft); color: var(--c-fg); font-size: 14px; line-height: 1.4; }
.model-note .face { margin-top: 1px; }
.model-start { padding-top: 6vh; max-width: 460px; margin: 0 auto; }
.model-start p { margin: 8px 0; }
.model-start p:first-of-type { color: var(--c-fg); font-size: 17px; margin-top: 12px; }
.suggest { padding: 0 0 6px 48px; }
.mention { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 20px; background: var(--c-soft); font-size: 15px; min-height: 40px; }
.mention span { color: var(--c-muted); }
