/* Sealed correspondence: warm paper, deep ink, one drop of wax.
   Nothing is loaded from anywhere else -- no webfont, no CDN, no analytics --
   because a privacy app that phones a third party on load is not one. */

:root {
  --paper:   #f4eee2;
  --paper-2: #fffdf8;
  --paper-3: #ebe3d3;
  --ink:     #16222f;
  --ink-2:   #42505e;
  --ink-3:   #7b8795;
  --wax:     #c2362a;
  --wax-2:   #e4705f;
  --gold:    #a8822f;
  --line:    rgba(22, 34, 47, .14);
  --line-2:  rgba(22, 34, 47, .07);
  --good:    #2f6f4f;
  --serif: Iowan Old Style, Palatino Linotype, Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans Ethiopic", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --r: 3px;
  --bub-them: #fffdf8;
  --bub-mine: #f7e2d8;
  --strip: #fffdf8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:   #141a1f;
    --paper-2: #1b232a;
    --paper-3: #0f1418;
    --ink:     #ece3d3;
    --ink-2:   #b3bcc4;
    --ink-3:   #7d8893;
    --wax:     #e0705f;
    --wax-2:   #c2362a;
    --gold:    #cfa366;
    --line:    rgba(236, 227, 211, .16);
    --line-2:  rgba(236, 227, 211, .08);
    --good:    #6fbf93;
    --bub-them: #222b33;
    --bub-mine: #3d2620;
    --strip:   #1b232a;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(168,130,47,.07), transparent 42%),
    radial-gradient(circle at 86% 78%, rgba(194,54,42,.06), transparent 46%);
  background-attachment: fixed;
}

/* the faint grain that makes it paper rather than a panel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

.wrap { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }

/* ---------- masthead ---------- */

.top {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; }
.seal {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--wax-2), var(--wax) 62%, #8e241b);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.18);
  position: relative; flex: none; align-self: center;
}
.seal::after {
  content: ""; position: absolute; inset: 7px;
  border: 1.5px solid rgba(255,245,230,.6); border-radius: 50%;
}
.mark { font: 400 25px/1 var(--sans); letter-spacing: .5px; }
.name {
  font: 400 15px/1 var(--mono);
  letter-spacing: .26em; text-transform: uppercase; color: var(--ink-3);
}
.top .spacer { flex: 1; }

.chip {
  font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--good); border: 1px solid currentColor; border-radius: 100px;
  padding: 6px 10px; white-space: nowrap;
}
.chip.off { color: var(--ink-3); }

/* ---------- gate ---------- */

.hero { padding: 52px 0 10px; }
.kicker {
  font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--wax); margin: 0 0 18px;
}
h1 {
  font: 400 clamp(38px, 9vw, 62px)/1.02 var(--serif);
  letter-spacing: -.02em; margin: 0 0 20px;
}
h1 em { font-style: italic; color: var(--wax); }
.lede { font: 400 19px/1.6 var(--serif); color: var(--ink-2); max-width: 52ch; margin: 0 0 30px; }

.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

button, .btn {
  font: 500 14px/1 var(--sans); letter-spacing: .01em;
  padding: 13px 20px; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper-2);
  transition: transform .08s ease, opacity .15s ease;
}
button:hover, .btn:hover { opacity: .88; }
button:active { transform: translateY(1px); }
button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
button.ghost:hover { border-color: var(--ink-3); opacity: 1; }
button.waxy { background: var(--wax); border-color: var(--wax); color: #fff6ef; }
button.tiny { font-size: 12px; padding: 8px 12px; }
button:disabled { opacity: .45; cursor: default; }

.join { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.join label { display: block; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 9px; }
input[type=text], textarea {
  width: 100%; font: 400 14px/1.5 var(--mono); color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 13px; resize: none;
}
input[type=text]:focus, textarea:focus { outline: 2px solid var(--wax); outline-offset: -1px; }

/* ---------- the honest part ---------- */

.ledger { margin-top: 48px; border-top: 2px solid var(--ink); padding-top: 0; }
.ledger h2 {
  font: 400 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  margin: 20px 0 14px; color: var(--ink-3);
}
.cols { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .cols { grid-template-columns: 1fr; gap: 10px; } }
.cols ul { list-style: none; margin: 0; padding: 0; }
.cols li {
  position: relative; padding-left: 26px; margin-bottom: 13px;
  font-size: 14.5px; line-height: 1.5; color: var(--ink-2);
}
.cols li b { color: var(--ink); font-weight: 600; }
.cols li::before {
  position: absolute; left: 0; top: 0;
  font: 600 13px/1.6 var(--mono);
}
.can li::before { content: "✓"; color: var(--good); }
.cant li::before { content: "✕"; color: var(--wax); }

.fine { margin-top: 30px; font-size: 13.5px; line-height: 1.6; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 18px; }
.fine code { font: 400 12.5px var(--mono); color: var(--ink-2); }

/* ---------- invite card ---------- */

.card {
  margin-top: 28px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 1px 0 var(--line-2), 0 10px 30px -22px rgba(22,34,47,.5);
  padding: 20px;
}
.card h3 { font: 400 20px/1.2 var(--serif); margin: 0 0 6px; }
.card p { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); }
.linkbox {
  font: 400 12.5px/1.5 var(--mono); word-break: break-all;
  background: var(--paper-3); border: 1px dashed var(--line);
  border-radius: var(--r); padding: 12px; color: var(--ink-2);
  user-select: all;
}

/* ---------- room ---------- */

.roombar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.words { display: flex; align-items: center; gap: 9px; }
.pip { width: 13px; height: 13px; border-radius: 50%; flex: none; box-shadow: inset 0 -1px 1px rgba(0,0,0,.3); }
.words .w {
  font: 500 13px/1 var(--mono); letter-spacing: .06em;
  color: var(--ink); text-transform: lowercase;
}
.words .sep { color: var(--ink-3); }
.words small { display: block; font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.roombar .spacer { flex: 1; }

.slips { list-style: none; margin: 0; padding: 24px 0 10px; min-height: 30vh; }
.slip {
  max-width: 82%; margin: 0 0 14px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  padding: 11px 14px 12px;
  box-shadow: 0 8px 20px -18px rgba(22,34,47,.6);
  animation: rise .22s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
.slip .who {
  display: flex; gap: 10px; align-items: baseline;
  font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 6px;
}
.slip .who b { color: var(--ink-2); font-weight: 600; letter-spacing: .1em; }
.slip .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; line-height: 1.5; }
.slip.mine { margin-left: auto; background: var(--ink); border-color: var(--ink); border-left-color: var(--wax); color: var(--paper-2); }
.slip.mine .who { color: rgba(255,253,248,.55); }
.slip.mine .who b { color: rgba(255,253,248,.85); }
.slip.bad { border-left-color: var(--wax); background: color-mix(in srgb, var(--wax) 8%, var(--paper-2)); }
.slip.bad .body { color: var(--wax); font: 400 14px/1.5 var(--mono); }
.slip .fuse { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.slip.mine .fuse { color: rgba(255,253,248,.5); }

.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty p { font: 400 17px/1.5 var(--serif); margin: 0 0 6px; }
.empty small { font: 400 13px var(--sans); }

/* ---------- composer ---------- */

.composer {
  position: sticky; bottom: 0; padding: 12px 0 14px;
  background: linear-gradient(to bottom, transparent, var(--paper) 22%);
  display: flex; gap: 10px; align-items: flex-end;
}
.composer textarea { font: 400 15.5px/1.5 var(--sans); max-height: 180px; min-height: 48px; }
.composer button { flex: none; height: 48px; }

/* ---------- drawer ---------- */

.drawer { border-top: 1px solid var(--line); margin-top: 6px; display: none; }
.drawer.open { display: block; }
.drawer .grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; padding: 18px 0; }
@media (max-width: 620px) { .drawer .grid { grid-template-columns: 1fr; } }
.field label { display: block; font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
select {
  width: 100%; font: 400 14px var(--sans); color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 12px;
}
.field .hint { font-size: 12.5px; color: var(--ink-3); margin: 7px 0 0; }
.print { font: 400 12px/1.6 var(--mono); color: var(--ink-2); word-break: break-all; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: var(--ink); color: var(--paper-2); font: 500 13px var(--sans);
  padding: 11px 17px; border-radius: 100px; opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; z-index: 50;
  box-shadow: 0 14px 30px -14px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

footer { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
footer a { color: var(--ink-2); }
[hidden] { display: none !important; }

/* Helpers, so the page needs no inline style attribute and the CSP can stay
   strict: no 'unsafe-inline' anywhere, for script or style. */
.mt-10 { margin-top: 10px; }
.mt-14 { margin-top: 14px; }
.hint.flush { margin-top: 0; }

/* The seal's colour is a 24-step wheel derived from the room key, chosen by
   class rather than by an inline style for the same reason. */
.pip.h0  { background: hsl(0   58% 46%); } .pip.h1  { background: hsl(15  58% 46%); }
.pip.h2  { background: hsl(30  58% 46%); } .pip.h3  { background: hsl(45  58% 44%); }
.pip.h4  { background: hsl(60  52% 40%); } .pip.h5  { background: hsl(75  50% 38%); }
.pip.h6  { background: hsl(90  48% 38%); } .pip.h7  { background: hsl(105 46% 36%); }
.pip.h8  { background: hsl(120 44% 34%); } .pip.h9  { background: hsl(135 46% 34%); }
.pip.h10 { background: hsl(150 50% 34%); } .pip.h11 { background: hsl(165 52% 34%); }
.pip.h12 { background: hsl(180 50% 34%); } .pip.h13 { background: hsl(195 56% 38%); }
.pip.h14 { background: hsl(210 58% 44%); } .pip.h15 { background: hsl(225 58% 48%); }
.pip.h16 { background: hsl(240 52% 50%); } .pip.h17 { background: hsl(255 50% 50%); }
.pip.h18 { background: hsl(270 48% 48%); } .pip.h19 { background: hsl(285 48% 46%); }
.pip.h20 { background: hsl(300 46% 44%); } .pip.h21 { background: hsl(315 52% 46%); }
.pip.h22 { background: hsl(330 56% 46%); } .pip.h23 { background: hsl(345 58% 46%); }

/* Modern browsers size the composer to its content; older ones fall back to
   the rows attribute app.js keeps up to date. */
.composer textarea { field-sizing: content; }

/* The download card: the code, then the reasons, then what the file should be. */
.appcard {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
}
.appcard h3 { margin-top: 0; }
.appcard p { margin: 0 0 10px; }
.appcard p:last-child { margin-bottom: 0; }
.appcard a { color: var(--wax); }
.qr {
  display: block; width: 148px; height: 148px;
  background: #fffdf8; padding: 7px; border-radius: var(--r);
  border: 1px solid var(--line);
}
.apkline {
  font: 400 11.5px/1.5 var(--mono); color: var(--ink-3);
  border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 12px !important;
}
@media (max-width: 560px) {
  .appcard { grid-template-columns: 1fr; justify-items: start; }
}

/* ---------- a profile, and the people it can reach ---------- */

.mecard { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: start; }
@media (max-width: 620px) { .mecard { grid-template-columns: 1fr; gap: 18px; } }
.mecard .kicker { margin-bottom: 10px; }
.addr {
  font: 500 clamp(20px, 5vw, 29px)/1.1 var(--mono);
  letter-spacing: .04em; margin: 0 0 16px; color: var(--ink);
  word-break: break-all;
}
.mekeys { text-align: right; min-width: 170px; }
@media (max-width: 620px) { .mekeys { text-align: left; } }
.mekeys small {
  display: block; font: 500 10px/1 var(--mono); letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.mekeys .print { margin: 0 0 14px; }
.mekeys .print:last-child { margin-bottom: 0; }

.listhead {
  font: 400 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); margin: 34px 0 12px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.people { list-style: none; margin: 0; padding: 0; }
.person { margin-bottom: 8px; }
.personbtn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: var(--r);
  padding: 13px 15px; font-size: 15px; font-weight: 400;
}
.personbtn:hover { border-color: var(--ink-3); border-left-color: var(--wax); opacity: 1; }
.personbtn b { font-weight: 600; }
.personbtn .paddr {
  font: 400 11.5px var(--mono); color: var(--ink-3); letter-spacing: .04em;
  margin-left: auto; white-space: nowrap;
}
@media (max-width: 520px) { .personbtn .paddr { display: none; } }
.personbtn .count {
  font: 500 11px/1 var(--mono); color: var(--paper-2); background: var(--wax);
  border-radius: 100px; padding: 4px 8px; margin-left: 10px;
}


/* ========== messenger layout ==========
   The shapes people already know -- a list of conversations, bubbles with
   tails, a pill to type in -- wearing Shuk's paper and wax rather than
   somebody else's green. */

/* ---- avatars ---- */
.av {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font: 600 17px/1 var(--sans); color: #fff; letter-spacing: .01em;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .18);
  user-select: none;
}
.av.sm { width: 36px; height: 36px; font-size: 14px; }
.av.h0 { background: hsl(0 52% 46%); }
.av.h1 { background: hsl(15 52% 46%); }
.av.h2 { background: hsl(30 52% 46%); }
.av.h3 { background: hsl(45 52% 46%); }
.av.h4 { background: hsl(60 52% 34%); }
.av.h5 { background: hsl(75 52% 34%); }
.av.h6 { background: hsl(90 52% 34%); }
.av.h7 { background: hsl(105 52% 34%); }
.av.h8 { background: hsl(120 52% 34%); }
.av.h9 { background: hsl(135 52% 46%); }
.av.h10 { background: hsl(150 52% 46%); }
.av.h11 { background: hsl(165 52% 46%); }
.av.h12 { background: hsl(180 52% 46%); }
.av.h13 { background: hsl(195 52% 46%); }
.av.h14 { background: hsl(210 52% 46%); }
.av.h15 { background: hsl(225 52% 46%); }
.av.h16 { background: hsl(240 52% 46%); }
.av.h17 { background: hsl(255 52% 46%); }
.av.h18 { background: hsl(270 52% 46%); }
.av.h19 { background: hsl(285 52% 46%); }
.av.h20 { background: hsl(300 52% 46%); }
.av.h21 { background: hsl(315 52% 46%); }
.av.h22 { background: hsl(330 52% 46%); }
.av.h23 { background: hsl(345 52% 46%); }

/* ---- the strip at the top of the list, and the chat header ---- */
.mestrip, .chatbar {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  background: var(--strip);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-top: 14px;
}
.chatbar {
  position: sticky; top: 0; z-index: 20;
  margin-top: 0; border-radius: 0;
  border-left: 0; border-right: 0; border-top: 0;
  box-shadow: 0 1px 0 var(--line-2), 0 6px 18px -16px rgba(0,0,0,.5);
}
.stripcopy { min-width: 0; flex: 1; }
.stripcopy b { display: block; font: 600 16px/1.25 var(--sans); }
.stripcopy span {
  display: block; font: 400 12px/1.4 var(--mono); color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.addr2 { letter-spacing: .04em; }

button.icon {
  width: 38px; height: 38px; flex: none; padding: 0;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 50%;
  color: var(--ink-2);
}
button.icon svg { width: 21px; height: 21px; }
button.icon:hover { background: var(--paper-3); opacity: 1; }

/* ---- the list of conversations ---- */
.chats { list-style: none; margin: 10px 0 0; padding: 0; }
.chats li { border-bottom: 1px solid var(--line-2); }
.chats li:last-child { border-bottom: 0; }
.chatrow {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: transparent; color: var(--ink); border: 0; border-radius: var(--r);
  padding: 11px 10px; font-weight: 400;
}
.chatrow:hover { background: var(--paper-2); opacity: 1; }
.chatrow .mid { flex: 1; min-width: 0; }
.chatrow .nm { display: flex; align-items: baseline; gap: 8px; }
.chatrow .nm b { font: 600 15.5px/1.3 var(--sans); }
.chatrow .when {
  margin-left: auto; font: 400 11px var(--mono); color: var(--ink-3); white-space: nowrap;
}
.chatrow .last {
  display: block; font-size: 13.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px;
}
.chatrow .count {
  font: 600 11px/1 var(--sans); color: #fff; background: var(--wax);
  border-radius: 100px; padding: 5px 8px; margin-left: 8px; flex: none;
}

/* ---- the thread ---- */
.thread {
  list-style: none; margin: 0; padding: 18px 2px 6px;
  display: flex; flex-direction: column; gap: 3px; min-height: 40vh;
}
.b {
  position: relative; max-width: 76%;
  padding: 7px 11px 6px; border-radius: 13px;
  background: var(--bub-them);
  box-shadow: 0 1px 1px rgba(22,34,47,.10);
  animation: pop .16s ease both;
}
@keyframes pop { from { opacity: 0; transform: translateY(4px); } }
.b + .b { margin-top: 2px; }
.b.theirs { align-self: flex-start; border-top-left-radius: 5px; }
.b.mine { align-self: flex-end; background: var(--bub-mine); border-top-right-radius: 5px; }
/* the little tail, only on the first of a run */
.b.theirs.lead::before, .b.mine.lead::before {
  content: ""; position: absolute; top: 0; width: 9px; height: 13px;
}
.b.theirs.lead::before {
  left: -7px;
  background: var(--bub-them);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.b.mine.lead::before {
  right: -7px;
  background: var(--bub-mine);
  clip-path: polygon(0 0, 0 100%, 100% 0);
}
.b .nm {
  display: block; font: 600 12.5px/1.4 var(--sans); margin-bottom: 1px;
}
.b .tx { font-size: 15.5px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.b .mt {
  float: right; margin: 4px 0 0 10px;
  font: 400 10.5px/1 var(--mono); color: var(--ink-3);
  display: flex; align-items: center; gap: 5px;
}
.b .mt .burn { color: var(--wax); opacity: .8; }
.b.bad { background: color-mix(in srgb, var(--wax) 12%, var(--bub-them)); align-self: center; max-width: 92%; }
.b.bad .tx { font: 400 13px/1.5 var(--mono); color: var(--wax); }

/* ---- the composer ---- */
.bar {
  position: sticky; bottom: 0; z-index: 10;
  display: flex; align-items: flex-end; gap: 9px;
  padding: 10px 0 14px;
  background: linear-gradient(to bottom, transparent, var(--paper) 30%);
}
.bar textarea {
  flex: 1; border-radius: 22px; padding: 11px 16px;
  font: 400 15.5px/1.45 var(--sans);
  background: var(--strip); border: 1px solid var(--line);
  min-height: 44px; max-height: 150px; field-sizing: content;
}
button.send {
  width: 44px; height: 44px; flex: none; padding: 0;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--wax); border: 0; color: #fff5ef;
  box-shadow: 0 3px 10px -4px rgba(194,54,42,.7);
}
button.send svg { width: 20px; height: 20px; margin-left: -1px; }
button.send:disabled { opacity: .5; }

/* ---- the new-conversation button ---- */
.fab {
  position: fixed; right: max(18px, calc(50vw - 380px + 18px)); bottom: 24px;
  width: 54px; height: 54px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; z-index: 30;
  background: var(--wax); border: 0; color: #fff5ef;
  box-shadow: 0 8px 22px -8px rgba(194,54,42,.85);
}
.fab svg { width: 24px; height: 24px; }

/* ---- sheets ---- */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(16,22,28,.42);
  display: grid; place-items: end center;
  padding: 16px;
  animation: fade .15s ease both;
}
@keyframes fade { from { opacity: 0; } }
@media (min-width: 620px) { .sheet { place-items: center; } }
.sheetcard {
  width: 100%; max-width: 460px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
  animation: rise2 .2s ease both;
}
@keyframes rise2 { from { transform: translateY(14px); } }
.sheetcard h3 { font: 400 22px/1.2 var(--serif); margin: 0 0 12px; }
.sheetcard .kicker { margin: 18px 0 8px; }
.sheetcard .addr { margin-bottom: 14px; }
.sheetcard .mekeys { text-align: left; margin-top: 20px; }


/* ---- a conversation fills the screen, like an app and not a document ---- */
body.talking .top,
body.talking footer { display: none; }
body.talking .wrap { padding-bottom: 0; }

#chat, #room {
  display: flex; flex-direction: column;
  min-height: 100dvh;
}
#chat[hidden], #room[hidden] { display: none; }
#chat .thread, #room .thread { flex: 1 1 auto; }

/* the chat header spans the gutter, so it reads as a bar and not a card */
.chatbar {
  margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px;
}
.roombar { position: sticky; top: 0; z-index: 20; background: var(--paper); }

/* a softer focus ring than the page default: the pill is already a shape */
.bar textarea:focus {
  outline: none;
  border-color: var(--wax);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wax) 16%, transparent);
}
