/* Hallmark · custom · TipDragon "the dragon's hoard": velvet purple, gold only for value and the one main action, the dragon head as the mark · nav: mark + wordmark, two links, one action · footer: mark over the links · job: sign in */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: P, the hoard picture is a generated stand-in until Ivan's artwork lands; the sign-in card is the first-screen action */
/* waive 7b: the QR code's paper is pure white so phones scan it */

/*
 * TipDragon's site and web wallet. Dark only, as the apps are: Renessa's
 * velvet grain under everything, the purple of the dragon's scales, and
 * gold kept for what is worth something (balances, the main button).
 * Every colour and font goes through the tokens below.
 */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/hanken-grotesk.woff2") format("woff2-variations");
}

:root {
  --font: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #0b0910;
  --bg-raised: #14101c;
  --text: #f4f1fa;
  --text-2: rgba(244, 241, 250, 0.86);
  --muted: rgba(244, 241, 250, 0.64);
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-2: rgba(255, 255, 255, 0.08);
  --shade: rgba(0, 0, 0, 0.35);
  --shade-deep: rgba(0, 0, 0, 0.55);

  --violet-200: #f0dcfe;
  --violet-300: #ddb1fc;
  --violet-400: #b649e9;
  --violet-500: #9732c9;
  --violet-600: #7922a9;
  --violet-700: #5a1881;
  --violet-glow: rgba(151, 50, 201, 0.4);
  --violet-wash: rgba(121, 34, 169, 0.1);

  --gold-200: #fbe7b0;
  --gold-300: #f7d98b;
  --gold-400: #f3c969;
  --gold-500: #e2ae45;
  --gold-700: #8f6215;
  --gold-ink: #241703;
  --gold-glow: rgba(243, 201, 105, 0.32);
  --gold-wash: rgba(243, 201, 105, 0.18);

  /* Money in, money out: Renessa's mint and coral (12 November). */
  --green: #7ee0b5;
  --mint-wash: rgba(126, 224, 181, 0.14);
  --coral: #e58876;
  --coral-wash: rgba(229, 136, 118, 0.14);
  --discord: #5865f2;
  --rose: #ffb3c1;
  --rose-wash: rgba(255, 118, 147, 0.1);
  --red-wash: rgba(240, 120, 110, 0.18);
  --red-edge: rgba(240, 120, 110, 0.5);
  --telegram: #2aabee;
  --paper: #fbf7ff;
  /* A QR code's paper stays pure white, or phones read it badly. */
  --qr-paper: #fff;
  /* The picture's veil on the side the words sit, and the sign-in card's glass. */
  --veil: rgba(11, 9, 16, 0.92);
  --veil-soft: rgba(11, 9, 16, 0.2);
  --door-top: rgba(34, 18, 48, 0.88);
  --door-bottom: rgba(16, 10, 24, 0.94);
  /* The glint that crosses the total when coins come in. */
  --glint: rgba(255, 244, 214, 0.55);

  --droplet:
    inset 0 1px 1px rgba(255, 255, 255, 0.18), inset 0 -10px 18px rgba(0, 0, 0, 0.28),
    0 12px 20px -10px rgba(0, 0, 0, 0.9);
  --raised: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 3px 10px var(--violet-glow);
  --raised-gold: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 6px 18px -4px var(--gold-glow);
  --raised-quiet: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 6px 14px -8px rgba(0, 0, 0, 0.9);
  --inset: inset 0 2px 4px rgba(0, 0, 0, 0.45);

  --page: 1180px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

/* hidden means hidden, whatever display a class gives. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html {
  scrollbar-color: var(--violet-700) var(--bg);
  caret-color: var(--violet-300);
}

/*
 * Opened from the Home Screen: no bounce past the top or bottom, which on
 * an iPhone carried the tab bar along with it (Noba, 13 November). In a
 * browser tab the bounce stays, with its pull-to-refresh.
 */
@media (display-mode: standalone) {
  html,
  body {
    overscroll-behavior-y: none;
  }
}

::selection {
  background: var(--violet-500);
  color: var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    url("/velvet.webp") 0 0 / 180px 180px repeat,
    radial-gradient(75% 75% at 50% 42%, transparent 55%, var(--shade-deep) 100%),
    linear-gradient(115deg, transparent 15%, var(--violet-wash) 42%, transparent 72%);
}

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

a {
  color: var(--violet-300);
}

:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 3px;
  border-radius: 8px;
}

/* The header: the dragon, the name, and the pages. */
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px var(--violet-glow));
}

.brand b {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--hair);
  background: var(--glass);
  box-shadow: var(--raised-quiet);
}

/* Cards and sections. */
.card {
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--hair);
  border-radius: 22px;
  box-shadow: var(--droplet);
  padding: 24px;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h2 {
  font-size: 20px;
  margin: 0 0 8px;
}

h3 {
  font-size: 16px;
  margin: 16px 0 4px;
  color: var(--violet-300);
}

.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--violet-300);
  margin-bottom: 4px;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 16px;
}

p,
li {
  color: var(--text-2);
}

.muted {
  color: var(--muted);
}

/* Buttons: raised with a darker lip, as in the Mini App. */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
  color: var(--paper);
  background: linear-gradient(180deg, var(--violet-400), var(--violet-500));
  border: 0;
  border-bottom: 3px solid var(--violet-700);
  box-shadow: var(--raised);
  transition:
    transform 0.12s var(--ease),
    opacity 0.12s var(--ease);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--violet-200);
  outline-offset: 3px;
  border-radius: 14px;
}

/* The one main action of a page: gold, because it leads to the coins. */
.btn.gold {
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  border-bottom-color: var(--gold-700);
  box-shadow: var(--raised-gold);
}

.btn.gold:focus-visible {
  outline-color: var(--gold-200);
}

.btn.quiet {
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--hair);
  border-bottom: 3px solid var(--shade-deep);
  box-shadow: var(--raised-quiet);
}

.btn.quiet:hover {
  background: var(--glass-2);
}

/* Outlined: the other ways in, next to the one filled button. */
.btn.line {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--hair-strong);
  box-shadow: none;
}

.btn.line:hover {
  background: var(--glass);
  border-color: var(--violet-300);
}

/* The features grid. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.grid .card {
  margin: 0;
}

.grid .card h2 {
  font-size: 17px;
}

.grid .card p {
  margin: 0;
  font-size: 15px;
}

.cmds {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cmds li code {
  display: inline-block;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--shade);
  box-shadow: var(--inset);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--violet-200);
}

/* The coins, NOBA first. */
.coins {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.coins li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: var(--glass);
  font-size: 13px;
  font-weight: 700;
}

.coins img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

/* Legal pages: readable lines. */
.legal h2 {
  margin-top: 28px;
  font-size: 18px;
}

.legal ol,
.legal ul {
  padding-left: 24px;
}

.legal li {
  margin: 4px 0;
}

/* A fact still to fill in before the page is final. */
mark.fill {
  background: var(--gold-wash);
  color: var(--gold-400);
  border-radius: 4px;
  padding: 0 4px;
}

footer {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

footer a {
  color: var(--muted);
}

/* Sign-in and the wallet. */
.narrow {
  max-width: 520px;
}

.stack {
  display: grid;
  gap: 16px;
}

.stack .card {
  margin: 0;
}

.h2 {
  font-size: 24px;
  margin: 2px 0 8px;
}

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

.between {
  justify-content: space-between;
}

.grow {
  flex: 1;
  min-width: 0;
  display: grid;
}

.small {
  font-size: 14px;
}

.signin {
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
}

.provider {
  text-align: center;
  width: 100%;
}

.telegram {
  min-height: 44px;
  display: grid;
}

.notice {
  border-radius: 12px;
  padding: 12px 12px;
  background: var(--glass);
}

.notice.bad {
  color: var(--rose);
  background: var(--rose-wash);
}

/* The day's wait after a first passkey (14 November), and the nudge to add one. */
.notice.warn,
.notice.protect {
  border: 1px solid rgba(243, 201, 105, 0.35);
  background: rgba(243, 201, 105, 0.08);
}

.notice.protect .btn {
  display: inline-block;
  margin-top: 10px;
}

button.btn {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button.btn.small {
  padding: 8px 12px;
  font-size: 14px;
}

button.btn:disabled {
  color: var(--muted);
  background: var(--glass);
  border-color: var(--hair);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: var(--glass);
  color: var(--violet-300);
}

.toggle {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.coinlist,
.history,
.devices {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.coinlist li,
.history li,
.devices li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hair);
}

.coinlist li:first-child,
.history li:first-child,
.devices li:first-child {
  border-top: 0;
}

.coinlist img,
.history img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
}

.coinlist .zero {
  opacity: 0.5;
}

.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.amount.in {
  color: var(--green);
}

#more {
  margin-top: 12px;
}

/* The security page. */
.field {
  font: inherit;
  color: var(--text);
  background: var(--shade);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 12px 12px;
  box-shadow: var(--inset);
  min-width: 0;
}

.field:focus-visible {
  outline: 2px solid var(--violet-500);
  outline-offset: 1px;
}

.row .field {
  flex: 1;
  max-width: 220px;
}

/* A coin's name and its amount: on a phone the amount goes under the name. */
.coin-head .right {
  min-width: 0;
}

@media (max-width: 560px) {
  .coin-head {
    flex-wrap: wrap;
  }

  .coin-head .right {
    flex-basis: 100%;
    justify-items: start;
    text-align: left;
  }

  .coin-head .amount {
    text-align: left;
  }
}

.grid-form {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

/* Confirm on another app: a switch, then each group with its dollar amount. */
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--violet-500);
}

.cf-groups {
  display: grid;
  gap: 12px;
  padding-left: 32px;
}

.cf-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cf-over {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cf-over .field {
  width: 120px;
}

.qr {
  display: block;
  width: 200px;
  height: 200px;
  max-width: 100%;
  border-radius: 12px;
  background: var(--qr-paper);
  margin: 8px 0;
}

.totp {
  margin-top: 8px;
}

.words {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  padding-left: 0;
  list-style-position: inside;
  font-family: var(--mono);
  font-weight: 700;
}

.words li {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hair);
  background: var(--shade);
}

.phrase {
  border-color: var(--gold-wash);
}

details.recover {
  margin-top: 12px;
}

details.recover summary {
  cursor: pointer;
  color: var(--violet-300);
  font-weight: 700;
}

/* Coins and the coin page. */
.coinlink {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.coinlink:hover b {
  color: var(--violet-300);
}

.right {
  display: grid;
  justify-items: end;
  text-align: right;
}

.total-usd {
  font-size: 22px;
  font-weight: 800;
  margin: -4px 0 8px;
  font-variant-numeric: tabular-nums;
}

.coin-big {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
}

.amount.big {
  font-size: 20px;
}

.tabs {
  margin-top: 12px;
}

.address {
  overflow-wrap: anywhere;
}

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

.field.wide {
  width: 100%;
  max-width: none;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 8px 0 12px;
}

.facts dt {
  color: var(--muted);
  font-size: 14px;
}

.facts dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.quote h3 {
  color: var(--text);
  margin-top: 0;
}

/* The Swap page: DragonSwap's screens, its text as it was written, line by line. */
.screen-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.screen .row {
  margin-top: 12px;
}

.btn.bad {
  background: var(--red-wash);
  border-color: var(--red-edge);
}

/* Short numbered steps inside a notice (the link code's). */
.steps {
  margin: 0 0 8px;
  padding-left: 20px;
  display: grid;
  gap: 2px;
}

/*
=========================================================
THE FRONT DOOR (the home page)
=========================================================
*/

/*
 * The first screen: the dragon on its hoard behind, the name and one line
 * on the left, and the way in right under them. Nothing to scroll past to
 * sign in. On a phone the picture is a band on top.
 */
.page {
  position: relative;
  z-index: 1;
  width: min(var(--page), 100% - 32px);
  margin: 0 auto;
}

.site-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
}

.site-top nav .btn {
  margin-left: 8px;
  padding: 8px 16px;
}

.front {
  position: relative;
  isolation: isolate;
  min-height: min(100svh, 920px);
  margin-top: -76px;
  padding-top: 76px;
}

.front-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.front-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 40%;
  animation: hoard-in 1.4s var(--ease) both;
}

/* The picture fades into the page on the left, where the words sit, and at the bottom. */
.front-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, var(--veil) 30%, var(--veil-soft) 62%, transparent 80%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}

.front-inner {
  display: grid;
  gap: 20px;
  max-width: 480px;
  padding: 28px 0 56px;
}

.front h1 {
  font-size: clamp(40px, 5.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0;
  overflow-wrap: break-word;
  min-width: 0;
  text-wrap: balance;
}

.front .lead {
  font-size: 19px;
  color: var(--text-2);
  margin: 0;
  max-width: 34ch;
  text-wrap: pretty;
}

.works {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}

.works li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.works svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* The way in: one card, the dragon on top so it is clearly TipDragon's. */
.door {
  position: relative;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--door-top), var(--door-bottom));
  border: 1px solid var(--hair-strong);
  box-shadow: var(--droplet);
  backdrop-filter: blur(10px);
  animation: door-in 0.8s 0.15s var(--ease) both;
}

.door-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.door-head img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: none;
}

.door-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.door-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.door .signin {
  margin: 0 0 12px;
}

.door .note {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.door .note a {
  color: var(--text-2);
}

.door .notice {
  margin: 0 0 12px;
}

.btn .google {
  width: 18px;
  height: 18px;
}

.btn.provider svg {
  fill: currentColor;
}

/* Signed in already: the card says who, and opens the wallet. */
.door .me {
  display: grid;
  gap: 12px;
}

/* The sections under the first screen. */
.band {
  padding: 72px 0;
  border-top: 1px solid var(--hair);
}

.band h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 12px;
  max-width: 22ch;
  text-wrap: balance;
}

.band > .page > p {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 32px;
  max-width: 52ch;
}

/* Where the dragon lives: three apps side by side, a hairline between. */
.homes {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hair);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  box-shadow: var(--droplet);
}

.homes > li {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
  border-left: 1px solid var(--hair);
}

.homes > li:first-child {
  border-left: 0;
}

.homes h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 20px;
  color: var(--text);
}

.homes h3 svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  color: var(--violet-300);
}

.homes p {
  margin: 0;
}

.homes .btn {
  justify-self: start;
  margin-top: 8px;
}

/* What the dragon does: each thing with the command that does it. */
.does {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.does li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 0;
  border-top: 1px solid var(--hair);
}

.does b {
  font-size: 18px;
  color: var(--text);
}

.does span {
  grid-column: 1;
  color: var(--muted);
  font-size: 15px;
}

.does code {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 14px;
  white-space: nowrap;
}

.more {
  margin-top: 24px;
}

/* The coins, bigger: the hoard's contents. */
.hoard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hoard li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: var(--glass);
  font-weight: 700;
  color: var(--text);
}

.hoard img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
}

.hoard small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
}

.hoard li:first-child {
  border-color: var(--gold-wash);
  box-shadow: 0 0 0 1px var(--gold-wash) inset;
}

/* The close: back to the way in. */
.close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.close h2 {
  margin: 0;
}

/* The footer: the mark over the links. */
.site-foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hair);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-foot .page {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-foot a {
  color: var(--muted);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-foot p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* One reveal: sections rise in once as they come into view (only with scripting on). */
.js .rise {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.js .rise.seen {
  opacity: 1;
  transform: none;
}

@keyframes hoard-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes door-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .homes {
    grid-template-columns: minmax(0, 1fr);
  }

  .homes > li {
    border-left: 0;
    border-top: 1px solid var(--hair);
  }

  .homes > li:first-child {
    border-top: 0;
  }

  .does {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* A phone: the dragon becomes a band on top, the words and the way in below it. */
@media (max-width: 760px) {
  .front {
    min-height: 0;
    margin-top: 0;
    padding-top: 0;
  }

  .front-art {
    position: relative;
    inset: auto;
    height: 34svh;
    min-height: 220px;
    margin: 0 -16px;
    z-index: 0;
  }

  .front-art img {
    object-position: 50% 30%;
  }

  .front-art::after {
    background: linear-gradient(0deg, var(--bg) 0%, transparent 45%);
  }

  .front-inner {
    max-width: none;
    margin-top: -48px;
    position: relative;
    padding-bottom: 40px;
  }

  .site-top nav > a:not(.btn) {
    display: none;
  }

  .band {
    padding: 52px 0;
  }

  .does li {
    grid-template-columns: minmax(0, 1fr);
  }

  .does code {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .rise {
    opacity: 1;
    transform: none;
  }
}

/*
=========================================================
THE TRANSPARENCY PAGE
=========================================================
*/
.ledger-page {
  padding: 32px 0 72px;
}

.ledger-page h1 {
  font-size: clamp(36px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 12px;
  text-wrap: balance;
}

.ledger-page .lead {
  max-width: 56ch;
}

.ledger-page h2 {
  font-size: 24px;
  margin: 48px 0 12px;
}

.totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0 8px;
}

.totals div {
  padding: 20px 24px;
  border-radius: 20px;
  border: 1px solid var(--hair);
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
}

.totals dt {
  color: var(--muted);
  font-size: 15px;
}

.totals dd {
  margin: 4px 0 0;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Gold is for what is worth something: the coins on chain. */
.gold-figure {
  color: var(--gold-300);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

table.reserves {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.reserves th,
.reserves td {
  padding: 12px 16px;
  text-align: right;
  border-top: 1px solid var(--hair);
  vertical-align: middle;
}

.reserves thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.reserves th:first-child,
.reserves td:first-child {
  text-align: left;
  padding-left: 0;
}

.reserves tbody th {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.reserves tbody th img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
}

.reserves small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.reserves td b {
  display: block;
  overflow-wrap: anywhere;
}

.reserves td.short {
  color: var(--rose);
}

.counted {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  max-width: 72ch;
}

@media (max-width: 760px) {
  .totals {
    grid-template-columns: minmax(0, 1fr);
  }

  .reserves thead {
    display: none;
  }

  .reserves tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px 16px;
    padding: 12px 0;
    border-top: 1px solid var(--hair);
  }

  .reserves th,
  .reserves td {
    border: 0;
    padding: 0;
    text-align: left;
  }

  .reserves tbody th {
    grid-column: 1 / -1;
  }

  .reserves td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 13px;
  }
}

/*
=========================================================
THE WALLET SHELL (every signed-in page)
=========================================================
*/

/* The header: the dragon, the pages, then USD, the bell and you. Stays on top while scrolling. */
.app-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--hair);
}

.app-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.app-bar .brand img {
  width: 36px;
  height: 36px;
}

.app-nav {
  flex: 1;
  gap: 4px;
}

.app-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--glass);
  border-color: var(--hair);
  box-shadow: inset 0 -2px 0 var(--gold-400);
}

.app-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ic {
  width: 20px;
  height: 20px;
  flex: none;
}

/* USD for now: the currency picker comes when there's more than one. */
.currency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.currency .ic {
  width: 16px;
  height: 16px;
}

.icon-btn,
.avatar-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: var(--glass);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.15s var(--ease);
}

.icon-btn:hover,
.avatar-btn:hover,
.icon-btn[aria-expanded="true"],
.avatar-btn[aria-expanded="true"] {
  background: var(--glass-2);
}

.icon-btn:active,
.avatar-btn:active {
  transform: scale(0.96);
}

.icon-btn:focus-visible,
.avatar-btn:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
  border-radius: 999px;
}

/* The bell's count: gold, because what came in is coins. */
.count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold-400);
  color: var(--gold-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.avatar-btn {
  overflow: hidden;
  border-color: var(--gold-wash);
  background: linear-gradient(180deg, var(--violet-500), var(--violet-700));
  font-weight: 800;
}

.avatar-btn img,
.avatar-big img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The two menus under the header, on the right. */
.panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(360px, 100%);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--hair-strong);
  background: linear-gradient(180deg, var(--door-top), var(--door-bottom));
  box-shadow: var(--droplet);
  display: grid;
  gap: 12px;
}

.panel h2 {
  font-size: 16px;
  margin: 0;
}

.notes {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notes li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--hair);
}

.notes li:first-child {
  border-top: 0;
}

/* New since the bell was last opened: a gold edge. */
.notes li.new {
  box-shadow: inset 3px 0 0 var(--gold-400);
  padding-left: 12px;
}

.notes img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
}

.notes small {
  display: block;
  line-height: 1.3;
}

.me-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.me-head small {
  display: block;
}

.avatar-big {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  flex: none;
  border-radius: 999px;
  border: 2px solid var(--gold-wash);
  background: linear-gradient(180deg, var(--violet-500), var(--violet-700));
  font-size: 20px;
  font-weight: 800;
}

.menu {
  display: grid;
  margin: 0;
  padding: 4px 0 0;
  list-style: none;
  border-top: 1px solid var(--hair);
}

.menu a,
.menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text-2);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu a:hover,
.menu button:hover {
  background: var(--glass);
  color: var(--text);
}

.menu .ic {
  color: var(--violet-300);
}

/* The header and the page share one width, so their edges line up. */
.app-top .page {
  width: min(960px, 100% - 32px);
}

.app-wrap {
  max-width: 992px;
  padding-top: 24px;
}

/* The hoard: what you have, in gold, and what you can do with it. */
.hoard-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid var(--gold-wash);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--violet-glow), transparent 55%),
    linear-gradient(180deg, var(--door-top), var(--door-bottom));
  box-shadow: var(--droplet);
}

/* The dragon behind the numbers, faint. */
.hoard-mark {
  position: absolute;
  right: -40px;
  top: -24px;
  z-index: -1;
  width: 220px;
  height: 220px;
  /* Oni's gold-and-black head behind the hoard (13 November, Ivan's pick): a crest, faint. */
  opacity: 0.2;
}

.hoard-label {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-2);
}

.hoard-total {
  margin: 4px 0 0;
  font-size: clamp(40px, 7vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--gold-300);
  overflow-wrap: anywhere;
}

.hoard-note {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 15px;
}

/* Deposit, Send, Withdraw, Swap: one row; two by two on a narrow phone (13 November). */
.hoard-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 520px;
}

@media (max-width: 420px) {
  .hoard-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A sheet over the page: choosing a coin for Deposit or Withdraw. */
dialog.sheet {
  width: min(440px, 100% - 32px);
  max-height: min(640px, 100% - 64px);
  padding: 0;
  border-radius: 24px;
  border: 1px solid var(--hair-strong);
  background: linear-gradient(180deg, var(--door-top), var(--door-bottom));
  color: var(--text);
  box-shadow: var(--droplet);
}

dialog.sheet::backdrop {
  background: var(--shade-deep);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px 20px;
}

.sheet-head h2 {
  margin: 0;
}

.picker-list {
  padding: 0 20px 16px;
}

/* Any coin can be deposited: none looks unavailable here. */
.picker-list .zero {
  opacity: 1;
}

/* On a phone: the pages move to a bar at the bottom, the header keeps the tools. */
.tabbar {
  display: none;
}

@media (max-width: 760px) {
  .app-nav,
  .currency {
    display: none;
  }

  .app-bar {
    gap: 12px;
    min-height: 60px;
  }

  .panel {
    width: 100%;
  }

  .tabbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: grid;
    /* Five since the chat (13 November): Wallet, Swap, Chat, Activity, Security. */
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    background: var(--bg-raised);
    border-top: 1px solid var(--hair);
    /*
     * No layer of its own (translateZ, will-change): on an iPhone that left
     * the bar where it was when Safari's bars changed size, below the
     * screen and out of reach (Noba, 13 November). The bounce that carried
     * it up is stopped from the Home Screen by overscroll-behavior instead.
     */
  }

  .tabbar a {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 4px 0;
    border-radius: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
  }

  .tabbar a[aria-current="page"] {
    color: var(--gold-300);
  }

  body[data-page] {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .hoard-card {
    padding: 24px 20px;
  }

  .hoard-mark {
    width: 160px;
    height: 160px;
    right: -32px;
  }
}

/*
=========================================================
FLOWS: ACTIVITY, THE COIN SHEET, EMPTY STATES, THE TOUR
=========================================================
*/
.btn.small {
  padding: 8px 12px;
  font-size: 14px;
}

/* The Activity filters: one segmented choice, then coin and dates, then the export. */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 8px 0 16px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  border: 1px solid var(--hair);
  background: var(--shade);
}

.segmented button {
  padding: 8px 16px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-pressed="true"] {
  color: var(--text);
  background: var(--glass-2);
  box-shadow: var(--raised-quiet);
}

.segmented button:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

.filter {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.filter .field {
  padding: 8px 12px;
  min-width: 140px;
}

.filters .btn {
  margin-left: auto;
}

/* A day's heading between the lines. */
.history li.day {
  padding: 16px 0 4px;
  border-top: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* The dragon when there's nothing yet: the picture fades into the card. */
.empty,
.coinlist li.empty,
.history li.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 0 8px;
  text-align: center;
  border-top: 0 !important;
}

.empty img {
  width: 180px;
  height: 180px;
  -webkit-mask-image: radial-gradient(closest-side, black 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, black 62%, transparent 100%);
}

/* Oni's dragon with the scroll (13 November) has no background to fade: shown whole. */
.empty img[src$="/empty-notes.webp"] {
  -webkit-mask-image: none;
  mask-image: none;
}

.empty p {
  margin: 0;
  max-width: 40ch;
  color: var(--muted);
}

.empty.small img {
  width: 120px;
  height: 120px;
}

.empty.small p {
  font-size: 14px;
}

/* The coin sheet's search and networks. */
.picker-tools {
  display: grid;
  gap: 12px;
  padding: 0 20px 12px;
}

.nets {
  gap: 8px;
}

.nets .chip {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--muted);
}

.nets .chip[aria-pressed="true"] {
  color: var(--gold-ink);
  background: var(--gold-300);
  border-color: var(--gold-300);
}

.nets .chip:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

/* The tour: what a step names is lit in gold, the rest of the page dims. */
.tour-on {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  box-shadow:
    0 0 0 4px var(--gold-400),
    0 0 0 100vmax var(--shade-deep);
}

.icon-btn.tour-on,
.avatar-btn.tour-on {
  border-radius: 999px;
}

.tour-card {
  position: fixed;
  z-index: 50;
  width: min(320px, 100% - 32px);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--gold-wash);
  background: linear-gradient(180deg, var(--door-top), var(--door-bottom));
  box-shadow: var(--droplet);
  display: grid;
  gap: 8px;
  animation: door-in 0.3s var(--ease) both;
}

.tour-count {
  color: var(--gold-300);
  font-size: 13px;
  font-weight: 700;
}

.tour-card h2 {
  margin: 0;
  font-size: 18px;
}

.tour-card p {
  margin: 0;
  font-size: 15px;
}

.tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 760px) {
  .filters .btn {
    margin-left: 0;
  }

  .filter {
    flex: 1 1 140px;
  }

  .filter .field {
    min-width: 0;
    width: 100%;
  }
}

/*
=========================================================
POLISH: THE COIN PAGE, THE 404, THE GLINT
=========================================================
*/

/* A coin's own header: its picture, name and network, and what you hold of it in gold. */
.coin-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 20px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--gold-wash);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--violet-glow), transparent 55%),
    linear-gradient(180deg, var(--door-top), var(--door-bottom));
  box-shadow: var(--droplet);
}

.coin-hero .coin-big {
  width: 56px;
  height: 56px;
}

.coin-hero h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.coin-hero-amount {
  text-align: right;
  min-width: 0;
}

.coin-hero-amount .amount {
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 800;
  color: var(--gold-300);
  text-align: right;
}

.coin-tabs,
.coin-hero #coin-send {
  grid-column: 1 / -1;
  justify-self: start;
}

.segmented button[aria-selected="true"] {
  color: var(--text);
  background: var(--glass-2);
  box-shadow: var(--raised-quiet);
}

/* Deposit: the QR code beside the address, each value in its own box with Copy. */
.deposit-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.deposit-grid .qr {
  margin: 0;
}

.deposit-info {
  display: grid;
  gap: 12px;
}

.deposit-info p {
  margin: 0;
}

.copy-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--hair-strong);
  background: var(--shade);
}

.copy-box > span {
  grid-column: 1 / -1;
}

.copy-box code {
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: 15px;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* The 404: the dragon sleeping where the page should be. */
.lost {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 32px 0 48px;
  text-align: center;
}

.lost img {
  width: 220px;
  height: 220px;
  -webkit-mask-image: radial-gradient(closest-side, black 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, black 62%, transparent 100%);
}

.lost .lead {
  max-width: 44ch;
}

/* Something new came in: one gold glint across the total, and the bell's count pops in. */
.hoard-total {
  position: relative;
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.hoard-total.glint::after {
  content: "";
  position: absolute;
  inset: 0 -40%;
  background: linear-gradient(100deg, transparent 40%, var(--glint) 50%, transparent 60%);
  transform: translateX(-60%);
  animation: glint 1.4s 0.5s var(--ease) 2 both;
  pointer-events: none;
}

.count.pop {
  animation: pop 0.5s 0.3s var(--ease) both;
}

@keyframes glint {
  to {
    transform: translateX(60%);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }

  70% {
    transform: scale(1.15);
    opacity: 1;
  }

  100% {
    transform: none;
  }
}

@media (max-width: 760px) {
  .coin-hero {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 20px;
  }

  .coin-hero-amount {
    grid-column: 1 / -1;
    text-align: left;
  }

  .coin-hero-amount .amount {
    text-align: left;
  }

  .deposit-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .deposit-info {
    width: 100%;
  }
}

/* A state in words: On in gold, Off quiet. */
.badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 8px;
  border: 1px solid var(--hair);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.badge.on {
  color: var(--gold-ink);
  background: var(--gold-300);
  border-color: var(--gold-300);
}

/*
=========================================================
NOBA'S ROUND (12 NOVEMBER): TWO BOTS, THE SWAP PAGE, LIVE ARRIVALS
=========================================================
*/

/* "Add to Discord": a small menu of the two bots. */
.add-menu {
  position: relative;
  display: inline-block;
}

.add-menu summary {
  list-style: none;
  cursor: pointer;
}

.add-menu summary::-webkit-details-marker {
  display: none;
}

.add-menu summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.add-menu[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.add-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  width: 280px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--hair-strong);
  background: linear-gradient(180deg, var(--door-top), var(--door-bottom));
  box-shadow: var(--droplet);
}

.add-pop a {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}

.add-pop a:hover {
  background: var(--glass-2);
}

.add-pop small {
  color: var(--muted);
  font-size: 13px;
}

.close .add-menu .add-pop {
  left: 0;
  right: auto;
}

/* A coin's logo in running text or on a button (DragonSwap's screens). */
img.ci {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  vertical-align: -3px;
  margin-right: 4px;
}

.btn img.ci {
  margin: 0;
}

/* The Swap page: you pay, you get. */
.swap-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.swap-side {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--hair);
  background: var(--shade);
}

.swap-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  min-height: 32px;
}

.unit button {
  padding: 4px 12px;
  font-size: 13px;
}

.swap-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dollar {
  font-size: 32px;
  font-weight: 800;
  color: var(--muted);
}

.swap-amount {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.swap-amount::placeholder {
  color: var(--muted);
}

.swap-amount:focus-visible {
  outline: none;
}

.swap-side:focus-within {
  border-color: var(--violet-300);
}

.swap-get {
  flex: 1;
  font-size: 15px;
}

.coin-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  background: var(--glass-2);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.coin-pick img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.coin-pick .chev {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.coin-pick:hover {
  border-color: var(--violet-300);
}

.coin-pick:focus-visible,
.flip:focus-visible,
.link-btn:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

.swap-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  min-height: 20px;
}

.link-btn {
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--gold-300);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

/* The flip between the two sides. */
.flip {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -20px 0;
  z-index: 1;
  border-radius: 12px;
  border: 1px solid var(--hair-strong);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}

.flip:hover {
  transform: rotate(180deg);
}

.swap-go {
  width: 100%;
  margin-top: 8px;
  padding: 16px;
  font-size: 17px;
}

.swap-more {
  justify-content: center;
}

.coinlist button.coinlink {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.coinlist .coinlink[aria-current="true"] b {
  color: var(--gold-300);
}

/* The quote sheet: DragonSwap's screens, one under the other. */
dialog.sheet.wide {
  width: min(560px, 100% - 32px);
}

.sheet-body {
  padding: 0 20px 20px;
  overflow-y: auto;
}

.sheet-note {
  margin: 0 20px 12px;
}

.sheet-body .screen {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--hair);
  background: var(--shade);
}

/* What came in while you look: a card slides in at the corner, then goes. */
.toasts {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 60;
  display: grid;
  gap: 8px;
  width: min(340px, 100% - 32px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--gold-wash);
  background: linear-gradient(180deg, var(--door-top), var(--door-bottom));
  box-shadow:
    inset 3px 0 0 var(--gold-400),
    var(--droplet);
  color: var(--text);
  text-decoration: none;
  pointer-events: auto;
  animation: toast-in 0.45s var(--ease) both;
}

.toast b {
  display: block;
}

.toast .amount {
  text-align: left;
}

.toast img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
}

.toast.leaving {
  animation: toast-out 0.5s var(--ease) both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(24px);
  }
}

@media (max-width: 760px) {
  .toasts {
    top: 68px;
    right: 16px;
  }

  .add-pop {
    right: -8px;
  }
}

/* The swap form reads as one thing: narrower than the page. */
.swap-card {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
}

/*
=========================================================
NOBA'S SECOND ROUND (12 NOVEMBER)
=========================================================
*/

/* The dragon on its hoard at every page's foot, bottom right, see-through under the words. */
.site-foot > .page,
.app-wrap > footer {
  position: relative;
  isolation: isolate;
}

.site-foot > .page {
  min-height: 200px;
}

.site-foot > .page::before,
.app-wrap > footer::before {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -40px;
  z-index: -1;
  width: 240px;
  height: 260px;
  background: url("/brand/hoard-dragon-560.webp") right bottom / contain no-repeat;
  opacity: 0.3;
  pointer-events: none;
}

.app-wrap > footer {
  min-height: 180px;
  align-items: flex-start;
}

.app-wrap > footer::before {
  bottom: -48px;
  width: 200px;
  height: 220px;
  opacity: 0.22;
}

/* On the home page it is the close: big, rising behind "Your hoard is waiting". */
.home .site-foot > .page::before {
  width: 360px;
  height: 390px;
  opacity: 0.62;
}

/* The transparency page: the dragon asleep under the numbers. Every coin counted. */
.sleeper {
  display: block;
  width: min(820px, 100%);
  height: auto;
  margin: 40px auto -32px;
  opacity: 0.55;
}

/* The sleeping dragon where there's nothing (no coins; a missing page). */
.empty img.wide,
.lost img.wide {
  width: 260px;
  height: auto;
  -webkit-mask-image: none;
  mask-image: none;
}

.lost img.wide {
  width: 320px;
}

/* The wallet's coin filter. */
.coin-filter {
  margin: 8px 0 4px;
}

/* A coin's history by kind: a row of choices that scrolls sideways on a phone. */
.kinds {
  display: flex;
  gap: 8px;
  margin: 4px 0 8px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.kinds button {
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: var(--glass);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.kinds button:hover {
  color: var(--text);
}

.kinds button[aria-pressed="true"] {
  color: var(--gold-ink);
  background: var(--gold-300);
  border-color: var(--gold-300);
}

.kinds button:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

/* The home page's cards slide in one after another as they come into view, and out as they leave. */
.slide {
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js .slide:not(.in) {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
}

/* iPhone: nothing in a column may push the page wider (long balances, inputs' own widths). */
.stack > *,
.swap-side,
.swap-row,
.swap-meta > span {
  min-width: 0;
}

.swap-amount {
  width: 0;
}

.swap-meta b {
  overflow-wrap: anywhere;
}

input[type="date"].field {
  -webkit-appearance: none;
  appearance: none;
  min-height: 40px;
  min-width: 0;
}

input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

@media (max-width: 760px) {
  .site-foot > .page::before {
    width: 170px;
    height: 190px;
    opacity: 0.25;
  }

  .home .site-foot > .page::before {
    width: 240px;
    height: 260px;
    opacity: 0.5;
  }

  .app-wrap > footer::before {
    width: 140px;
    height: 150px;
  }

  /* Activity's filters: the choice, then coin, the two dates side by side, then the export. */
  .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }

  .filters .segmented {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .filters .coin-f,
  .filters .btn {
    grid-column: 1 / -1;
  }

  .swap-meta {
    flex-direction: column;
    gap: 4px;
  }
}

/* DragonSwap's several-pick lists as big checkboxes: the box, the coin, its amount and dollars. */
.tick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--hair-strong);
  background: var(--glass);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.tick:hover {
  background: var(--glass-2);
}

.tick:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

.tick:disabled {
  cursor: wait;
}

.tick[aria-checked="true"] {
  border-color: var(--gold-wash);
  background: var(--gold-wash);
}

.tick img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
}

.tick .right small {
  display: block;
}

/* The box: empty, or gold with a tick. */
.tick .box {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  border: 2px solid var(--violet-300);
  background: var(--shade);
}

.tick[aria-checked="true"] .box {
  border-color: var(--gold-300);
  background: var(--gold-300);
}

.tick[aria-checked="true"] .box::after {
  content: "";
  width: 7px;
  height: 13px;
  margin-top: -3px;
  border: solid var(--gold-ink);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.tick-filter {
  margin-top: 12px;
}

/*
 * Ivan, 12 November: the footer's dragon a little smaller, in from the
 * right edge, and the footer tighter at the bottom so the dragon sits
 * there instead of floating above the words.
 */
.site-foot {
  padding-bottom: 16px;
}

.site-foot > .page {
  min-height: 150px;
}

.site-foot > .page::before {
  right: 8px;
  bottom: -16px;
  width: 190px;
  height: 205px;
}

.home .site-foot > .page::before {
  right: 8px;
  width: 300px;
  height: 325px;
}

.app-wrap {
  padding-bottom: 16px;
}

.app-wrap > footer {
  min-height: 130px;
}

.app-wrap > footer::before {
  right: 8px;
  bottom: -16px;
  width: 150px;
  height: 160px;
}

@media (max-width: 760px) {
  .site-foot > .page {
    min-height: 0;
  }

  .site-foot > .page::before {
    right: 4px;
    width: 120px;
    height: 130px;
  }

  .home .site-foot > .page::before {
    width: 170px;
    height: 185px;
  }

  .app-wrap > footer {
    min-height: 110px;
  }

  .app-wrap > footer::before {
    right: 4px;
    width: 104px;
    height: 112px;
  }
}

/*
 * Ivan, 12 November: the sleeping dragon goes under the words, not below
 * them: faint, behind the end of the transparency page's text.
 */
.ledger-page {
  position: relative;
  isolation: isolate;
}

.sleeper {
  position: absolute;
  right: 0;
  bottom: 24px;
  z-index: -1;
  width: min(760px, 92%);
  margin: 0;
  opacity: 0.24;
  pointer-events: none;
}

@media (max-width: 760px) {
  .sleeper {
    width: 100%;
    bottom: 16px;
    opacity: 0.2;
  }
}

/*
 * A history line as Renessa's wallet draws it (Sanvi, 12 November): the
 * mark of what it was on mint (in) or coral (out), the title and time, the
 * amount (mint when in) with its dollars under it.
 */
.history li.hist {
  gap: 12px;
}

.hist-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
}

.hist-mark svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hist.is-in .hist-mark {
  color: var(--green);
  background: var(--mint-wash);
}

.hist.is-out .hist-mark {
  color: var(--coral);
  background: var(--coral-wash);
}

.hist .right small {
  display: block;
  font-size: 13px;
}

.amount.out {
  color: var(--text);
}

/* The home page's "find us on": three links, each in its own colour. */
.works a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
}

.works a:hover {
  color: var(--text);
  background: var(--glass);
}

.works a:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

.works .discord svg {
  color: var(--discord);
}

.works .telegram svg {
  color: var(--telegram);
}

.works img {
  width: 18px;
  height: 18px;
}

/* The find-us links centred under the sign-in card. */
.works {
  justify-content: center;
}

/*
 * The global chat (Ivan and Noba, 13 November): Sanvi's Renessa chat in
 * the wallet's tokens. Bubbles ("droplets") in runs by the same person,
 * the corners facing a neighbour tightened; a reply's quote card tucked
 * above its bubble with the violet edge; reaction chips; one tray of
 * reactions and actions on a tap.
 */
:root {
  --chat-own: rgba(139, 92, 246, 0.24);
  --chat-other: rgba(255, 255, 255, 0.07);
  --chat-edge: rgba(255, 255, 255, 0.06);
  --chat-name: #c4b5fd;
  --chat-quote: rgba(255, 255, 255, 0.04);
  --chat-quote-edge: rgba(167, 139, 250, 0.7);
  --chat-quote-text: rgba(244, 241, 250, 0.6);
  --chat-chip-mine-edge: rgba(196, 181, 253, 0.35);
  --chat-bar: rgba(15, 15, 15, 0.95);
  --chat-field: rgba(255, 255, 255, 0.06);
  --chat-tray: #1b1822;
  --chat-tray-edge: rgba(255, 255, 255, 0.1);
  --chat-action: #e9e3f7;
  --chat-danger: #ff7a7d;
  --chat-gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 45%);
  --chat-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.28), inset 0 -10px 18px rgba(0, 0, 0, 0.32),
    0 12px 20px -10px rgba(0, 0, 0, 0.9);
  --chat-tray-shadow: 0 14px 28px rgba(0, 0, 0, 0.7);
}

body[data-page="chat"] {
  overflow: hidden;
}

.chat-wrap {
  padding-top: 16px;
  padding-bottom: 0;
}

.chat-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 760px;
  height: calc(100dvh - 120px);
  min-height: 320px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--hair);
  border-radius: 24px;
  background: var(--veil-soft);
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hair);
}

.chat-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.chat-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.chat-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--coral-wash);
  color: var(--coral);
  font-size: 12px;
  font-weight: 600;
}

.chat-closed {
  display: grid;
  flex: 1;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 12px 16px;
}

.chat-loading,
.chat-empty,
.chat-older {
  margin: 16px 0;
  font-size: 13px;
  text-align: center;
}

.chat-older:empty {
  margin: 4px 0;
}

.chat-time {
  margin: 18px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 2px;
  border-radius: 24px;
}

.chat-row.first {
  margin-top: 14px;
}

.chat-row.mine {
  flex-direction: row-reverse;
}

.chat-face {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--violet-200);
  font-size: 12px;
  font-weight: 700;
}

.chat-face.blank {
  visibility: hidden;
}

.chat-face.tone-0 {
  background: linear-gradient(135deg, var(--violet-400), var(--violet-700));
}

.chat-face.tone-1 {
  background: linear-gradient(135deg, var(--violet-500), var(--violet-600));
}

.chat-face.tone-2 {
  background: linear-gradient(135deg, var(--violet-300), var(--violet-600));
  color: var(--bg);
}

.chat-face.tone-3 {
  background: linear-gradient(135deg, var(--gold-500), var(--violet-700));
}

.chat-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: min(78%, 420px);
}

.chat-row.mine .chat-col {
  align-items: flex-end;
}

.chat-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px 12px;
  color: var(--chat-name);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.chat-tippy {
  color: var(--muted);
  font-weight: 500;
}

.chat-staff {
  font-size: 12px;
}

.chat-bubble {
  position: relative;
  padding: 9px 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border: 1px solid var(--chat-edge);
  border-radius: 22px;
  background: var(--chat-other);
  box-shadow: var(--chat-shadow);
  color: var(--text);
  font-size: 15px;
  line-height: 21px;
  cursor: pointer;
}

.chat-bubble::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--chat-gloss);
  opacity: 0.45;
  content: "";
  pointer-events: none;
}

.chat-row.mine .chat-bubble {
  background: var(--chat-own);
}

/* In a run, the corners facing a neighbour tighten (Renessa's Droplet). */
.chat-row:not(.mine):not(.first) .chat-bubble {
  border-top-left-radius: 6px;
}

.chat-row:not(.mine):not(.last) .chat-bubble {
  border-bottom-left-radius: 6px;
}

.chat-row.mine:not(.first) .chat-bubble {
  border-top-right-radius: 6px;
}

.chat-row.mine:not(.last) .chat-bubble {
  border-bottom-right-radius: 6px;
}

.chat-emoji {
  line-height: 1.15;
  cursor: pointer;
}

.chat-emoji.e1 {
  font-size: 52px;
}

.chat-emoji.e2 {
  font-size: 44px;
}

.chat-emoji.e3 {
  font-size: 38px;
}

.chat-emoji.e4 {
  font-size: 32px;
}

.chat-quote {
  display: grid;
  max-width: 100%;
  margin-bottom: -8px;
  padding: 7px 12px 14px;
  border: 1px solid var(--chat-edge);
  border-left: 2px solid var(--chat-quote-edge);
  border-radius: 16px;
  background: var(--chat-quote);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-row.mine .chat-quote {
  border-right: 2px solid var(--chat-quote-edge);
  border-left: 1px solid var(--chat-edge);
}

.chat-quote b {
  color: var(--chat-name);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.chat-quote span {
  overflow: hidden;
  color: var(--chat-quote-text);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-edited {
  margin: 2px 12px 0;
  color: var(--chat-quote-text);
  font-size: 11px;
}

.chat-reacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.chat-chip {
  height: 24px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--chat-other);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.chat-chip.mine {
  border-color: var(--chat-chip-mine-edge);
  background: var(--chat-own);
}

.chat-row.flash .chat-bubble,
.chat-tip.flash {
  animation: chat-flash 0.9s ease-in-out 2;
}

@keyframes chat-flash {
  50% {
    box-shadow:
      0 0 0 3px var(--coral),
      var(--chat-shadow);
  }
}

/* A tip sent from the chat: Renessa's TipCard, in the wallet's gold. */
.chat-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(92%, 380px);
  margin: 14px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--gold-wash);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gold-wash), var(--violet-wash));
  cursor: pointer;
}

.chat-tip img {
  flex: none;
  border-radius: 50%;
}

.chat-tip p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
}

.chat-tip b {
  color: var(--gold-300);
  font-size: 20px;
  line-height: 1.3;
}

.chat-latest {
  position: absolute;
  right: 16px;
  bottom: 84px;
  padding: 6px 12px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: var(--chat-tray);
  box-shadow: var(--chat-tray-shadow);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.chat-bottom {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--chat-edge);
  background: var(--chat-bar);
}

.chat-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.chat-note a {
  color: var(--chat-name);
}

.chat-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--hair);
  border-left: 3px solid var(--violet-400);
  border-radius: 16px;
  background: var(--glass);
}

.chat-banner-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.chat-banner-text b {
  color: var(--chat-name);
  font-size: 12px;
  font-weight: 700;
}

.chat-banner-text span {
  overflow: hidden;
  color: var(--text-2);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-x {
  display: grid;
  flex: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: var(--glass-2);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-input {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 16px;
  resize: none;
  border: 1px solid var(--hair);
  border-radius: 22px;
  background: var(--chat-field);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 20px;
}

.chat-input:focus {
  border-color: var(--violet-400);
  outline: none;
}

.chat-send {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hair-strong);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--violet-400), var(--violet-600));
  box-shadow: var(--raised);
  color: var(--paper);
  cursor: pointer;
}

/* The tray: the six reactions over the actions, at the bottom of the screen. */
.chat-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--shade-deep);
}

.chat-tray {
  width: min(100%, 420px);
  overflow: hidden;
  border: 1px solid var(--chat-tray-edge);
  border-radius: 22px;
  background: var(--chat-tray);
  box-shadow: var(--chat-tray-shadow);
}

.chat-tray-reacts {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hair);
}

.chat-react {
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.chat-react.mine {
  border-color: var(--chat-chip-mine-edge);
  background: var(--chat-own);
}

.chat-tray-actions {
  display: grid;
}

.chat-action {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-top: 1px solid var(--hair);
  background: transparent;
  color: var(--chat-action);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.chat-action:first-child {
  border-top: 0;
}

.chat-action.danger {
  color: var(--chat-danger);
}

.chat-action:hover,
.chat-action:focus-visible,
.chat-react:hover,
.chat-react:focus-visible {
  background: var(--glass-2);
  outline: none;
}

@media (max-width: 760px) {
  .chat-wrap {
    padding: 0;
  }

  .chat-shell {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .chat-col {
    max-width: 82%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-row.flash .chat-bubble,
  .chat-tip.flash {
    animation: none;
    outline: 3px solid var(--coral);
  }
}

/*
 * Send (13 November): who to, the people sent to lately, the two people
 * a username can be (Discord and Telegram), and the Tippy ID chip on the
 * wallet page.
 */
.send-recent {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.send-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.send-chips .chip {
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.send-matches {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.send-match {
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--hair-strong);
  background: var(--glass);
  cursor: pointer;
}

.send-match:hover,
.send-match:focus-visible {
  border-color: var(--violet-400);
}

.send-who {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--hair);
}

.send-person {
  display: grid;
  gap: 2px;
}

.send-person b {
  overflow-wrap: anywhere;
}

.tippy-id {
  /* Room below, off the Deposit button (Noba, 13 November). */
  margin: 2px 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--hair-strong);
  background: var(--glass);
  color: var(--violet-300);
  cursor: pointer;
}

/* The chat's pictures over the initials, and the one-time hint (13 November). */
.chat-face {
  position: relative;
  overflow: hidden;
}

/* A face with its picture: the picture as the background, the initial hidden behind it. */
.chat-face.has-pic {
  background-position: center;
  background-size: cover;
  color: transparent;
}

.chat-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 8px 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(196, 181, 253, 0.25);
  background: rgba(139, 92, 246, 0.14);
  color: var(--violet-200);
  font-size: 13px;
}

.chat-hint[hidden] {
  display: none;
}

/* A tip card's dollar value when it was sent (13 November). */
.chat-tip-usd {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/*
 * Ivan, 13 November: Noba (Tippy0) in gold, the rest of the staff with a
 * red tint; the name and the bubble, theirs and your own.
 */
.chat-row.queen .chat-name {
  color: var(--gold-300);
}

.chat-row.queen .chat-bubble,
.chat-row.queen.mine .chat-bubble {
  border-color: rgba(243, 201, 105, 0.38);
  background: linear-gradient(180deg, rgba(243, 201, 105, 0.22), rgba(226, 174, 69, 0.12));
}

.chat-row.staff .chat-name {
  color: #ff9a9a;
}

.chat-row.staff .chat-bubble,
.chat-row.staff.mine .chat-bubble {
  border-color: rgba(255, 120, 120, 0.34);
  background: linear-gradient(180deg, rgba(255, 92, 92, 0.2), rgba(200, 50, 70, 0.1));
}

/* Mentions (13 November): the picker above the box, and a mention in a message. */
.chat-mentions {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1b1822;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.7);
}

.chat-mentions[hidden] {
  display: none;
}

.chat-mention-pick {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e9e3f7;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.chat-mention-pick:hover,
.chat-mention-pick:focus-visible {
  background: rgba(139, 92, 246, 0.2);
}

.chat-mention-pick span {
  color: var(--muted);
  font-size: 12px;
}

.chat-mention {
  padding: 0 4px;
  border: 1px solid rgba(196, 181, 253, 0.35);
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.24);
  color: #d8ccff;
  font-weight: 600;
}

.chat-mention.me {
  border-color: rgba(243, 201, 105, 0.45);
  background: rgba(243, 201, 105, 0.18);
  color: var(--gold-200);
}

/* The mention the arrows are on (13 November). */
.chat-mention-pick.marked {
  background: rgba(139, 92, 246, 0.28);
}

/* One link everywhere: each sign-in on the wallet, with Remove (security page). */
.signins {
  list-style: none;
  padding: 0;
  margin: 8px 0 12px;
}

.signins li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--hair);
}

.signins li:first-child {
  border-top: 0;
}

/*
 * The chat's tip window (Ivan and Noba, 14 November): over the chat, which
 * stays there behind it, faded and softly blurred. A card in the middle on
 * a computer; on a phone a sheet that rises from the bottom, above the
 * keyboard (--kb, set by tip.js).
 */
.tip-sheet {
  width: min(420px, 100% - 32px);
  max-height: calc(100% - 48px - var(--kb, 0px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--chat-tray-edge);
  border-radius: 24px;
  /* Solid under the gradient: the chat fades behind the window, not through it. */
  background: linear-gradient(180deg, var(--door-top), var(--door-bottom)), var(--bg-raised);
  color: var(--text);
  box-shadow:
    var(--droplet),
    0 24px 60px -12px rgba(0, 0, 0, 0.8);
  animation: tip-in 0.22s var(--ease);
}

.tip-sheet::backdrop {
  /* Faded, not hidden: the chat still reads through it. */
  background: rgba(11, 9, 16, 0.42);
  -webkit-backdrop-filter: blur(2px) saturate(0.85);
  backdrop-filter: blur(2px) saturate(0.85);
  animation: tip-fade 0.22s var(--ease);
}

.tip-sheet.out {
  animation: tip-out 0.16s var(--ease) forwards;
}

.tip-sheet.out::backdrop {
  animation: tip-fade 0.16s var(--ease) reverse forwards;
}

.tip-sheet.busy .tip-fields {
  opacity: 0.6;
  pointer-events: none;
}

.tip-body {
  display: grid;
  gap: 14px;
  padding: 18px 18px 20px;
}

.tip-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tip-face {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.tip-who {
  display: grid;
  flex: 1;
  min-width: 0;
}

.tip-who h2 {
  margin: 0;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tip-who small {
  font-size: 12px;
}

.tip-head .chat-x {
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.tip-fields {
  display: grid;
  gap: 10px;
  transition: opacity 0.12s var(--ease);
}

.tip-fields .field {
  width: 100%;
}

/* The coins you hold, side by side; a row that scrolls when there are many. */
.tip-coins {
  display: flex;
  gap: 8px;
  margin: 0 -18px;
  padding: 2px 18px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tip-coins::-webkit-scrollbar {
  display: none;
}

.tip-coin {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tip-coin img {
  border-radius: 50%;
}

.tip-coin[aria-checked="true"] {
  border-color: var(--gold-400);
  background: var(--gold-wash);
  color: var(--gold-200);
}

.tip-coin:focus-visible,
.tip-chip:focus-visible {
  outline: 2px solid var(--violet-300);
  outline-offset: 2px;
}

.tip-amount-row,
.tip-code {
  display: flex;
  gap: 8px;
}

.tip-amount-row .btn {
  align-self: stretch;
}

.tip-amount-row .field {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
}

.tip-code .field {
  flex: 1;
}

.tip-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tip-chip {
  padding: 8px 0;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--glass);
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.tip-chip:hover {
  background: var(--glass-2);
}

.tip-chip.on {
  border-color: var(--gold-400);
  background: var(--gold-wash);
  color: var(--gold-200);
}

.tip-fields .btn.gold {
  width: 100%;
  justify-content: center;
}

.tip-code .btn {
  width: auto;
}

/* Sent: the coin pops, a line on who has it, and back to the chat. */
.tip-done {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0 4px;
  text-align: center;
}

.tip-done img {
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--gold-wash);
  animation: pop 0.45s var(--ease);
}

.tip-done b {
  margin-top: 8px;
  color: var(--gold-300);
  font-size: 20px;
}

.tip-done p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
}

@keyframes tip-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

@keyframes tip-out {
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

@keyframes tip-fade {
  from {
    opacity: 0;
  }
}

@keyframes tip-rise {
  from {
    transform: translateY(100%);
  }
}

@keyframes tip-sink {
  to {
    transform: translateY(100%);
  }
}

@media (max-width: 760px) {
  .tip-sheet {
    width: 100%;
    max-width: 100%;
    max-height: calc(100% - 40px - var(--kb, 0px));
    margin: auto 0 var(--kb, 0px);
    border-width: 1px 0 0;
    border-radius: 24px 24px 0 0;
    animation-name: tip-rise;
    animation-duration: 0.26s;
  }

  .tip-sheet.out {
    animation-name: tip-sink;
  }

  .tip-body {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .tip-sheet,
  .tip-sheet::backdrop,
  .tip-done img {
    animation: none;
  }
}

/*
 * Drops in the chat (14 November): the gift button beside the message box,
 * the drop window's kinds and options, and a drop's card in the room.
 */
.chat-tool {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold-wash);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-wash), var(--violet-wash));
  color: var(--gold-300);
  cursor: pointer;
}

.chat-tool:hover,
.chat-tool:focus-visible {
  border-color: var(--gold-400);
  outline: none;
}

.drop-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--shade);
}

.drop-kind {
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.drop-kind[aria-selected="true"] {
  background: var(--gold-wash);
  color: var(--gold-200);
  box-shadow: 0 0 0 1px var(--gold-400) inset;
}

.drop-option {
  display: grid;
  gap: 6px;
}

.drop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drop-chips .tip-chip {
  padding: 7px 12px;
}

.drop-summary {
  margin: 0;
  color: var(--gold-200);
  line-height: 1.45;
}

.chat-drop {
  display: grid;
  gap: 8px;
  width: min(92%, 400px);
  margin: 14px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--gold-wash);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gold-wash), var(--violet-wash));
  cursor: pointer;
}

.chat-drop.closed,
.chat-drop.cancelled {
  opacity: 0.88;
}

.chat-drop-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.chat-drop-head b {
  color: var(--gold-300);
  font-size: 15px;
}

.chat-drop-head span {
  overflow: hidden;
  color: var(--text-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-drop-money {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-drop-money img {
  flex: none;
  border-radius: 50%;
}

.chat-drop-money div {
  display: grid;
}

.chat-drop-money strong {
  color: var(--gold-200);
  font-size: 20px;
  line-height: 1.25;
}

.chat-drop-money small {
  color: var(--muted);
  font-size: 12px;
}

.chat-drop-line,
.chat-drop-names,
.chat-drop-small,
.chat-drop-in {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.chat-drop-line {
  color: var(--text-2);
}

.chat-drop-names,
.chat-drop-small {
  color: var(--muted);
}

.chat-drop-in {
  color: var(--green);
  font-weight: 700;
}

.chat-drop-phrase {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--shade);
  color: var(--gold-200);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  user-select: none;
}

.chat-drop-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.chat-drop-clock {
  color: var(--gold-300);
  font-weight: 700;
}

.chat-drop-join {
  justify-self: start;
}

/*
 * Back in with Face ID (14 November): a remembered device's lock card on
 * the sign-in page, its picture or initial, the passkey button, the code.
 */
.unlock {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 4px 0 8px;
}

.unlock-face {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet-400), var(--violet-700));
  background-position: center;
  background-size: cover;
  box-shadow:
    0 0 0 4px var(--gold-wash),
    var(--raised);
  color: var(--paper);
  font-size: 34px;
  font-weight: 800;
}

.unlock-face.has-pic {
  color: transparent;
}

.unlock .provider {
  width: 100%;
  justify-content: center;
}

.unlock-code {
  display: flex;
  gap: 8px;
  width: 100%;
}

.unlock-code .field {
  flex: 1;
  min-width: 0;
  font-size: 20px;
  letter-spacing: 0.2em;
  text-align: center;
}

.unlock-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.devices-all {
  margin-top: 12px;
}

/* The chat's people (14 November): who's here now in the header, everyone in a window. */
.chat-people {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.chat-people:hover,
.chat-people:focus-visible {
  border-color: var(--violet-400);
  outline: none;
}

.chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--mint-wash);
}

.people-list {
  display: grid;
  gap: 2px;
  max-height: min(56vh, 520px);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.people-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-top: 1px solid var(--hair);
}

.people-row:first-child {
  border-top: 0;
}

.people-face {
  position: relative;
  width: 38px;
  height: 38px;
  font-size: 15px;
  overflow: visible;
}

.people-row.here .people-face::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--bg-raised);
  border-radius: 50%;
  background: var(--green);
}

.people-who {
  display: grid;
  flex: 1;
  min-width: 0;
}

.people-who b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-who .chat-staff {
  margin-left: 6px;
  font-size: 12px;
}

.people-who small {
  font-size: 12px;
}

.people-tools {
  display: flex;
  flex: none;
  gap: 6px;
}

.people-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hair);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
}

.people-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

/* Confirming money moves (14 November): ask or not, the web's way, Discord and Telegram's. */
.cf-body {
  display: grid;
  gap: 10px;
  padding-left: 4px;
}

.cf-ways {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--hair);
  border-radius: 12px;
}

.cf-ways legend {
  padding: 0 4px;
}

.cf-which {
  margin: 4px 0 0;
}

/* A swap that asks for the passkey or code first (14 November). */
.swap-proof {
  display: grid;
  gap: 10px;
}

.swap-proof p {
  margin: 0;
}

.swap-proof-ways,
.swap-proof-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.swap-proof-code .field {
  width: 130px;
}

/* Stickers (14 November): the picker above the message box, and a sticker in the room. */
.sticker-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--chat-tray-edge);
  border-radius: 18px;
  background: var(--chat-tray);
  box-shadow: var(--chat-tray-shadow);
}

.sticker-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sticker-tabs {
  display: flex;
  flex: 1;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.sticker-tab {
  flex: none;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sticker-tab[aria-selected="true"] {
  border-color: var(--gold-400);
  background: var(--gold-wash);
  color: var(--gold-200);
}

.sticker-find {
  width: 120px;
  padding: 6px 10px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--chat-field);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 6px;
  max-height: min(260px, 38vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sticker-tile {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 100%;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--glass);
  cursor: pointer;
  -webkit-touch-callout: none;
  user-select: none;
}

.sticker-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.sticker-tile:hover,
.sticker-tile:focus-visible {
  border-color: var(--violet-400);
  outline: none;
}

.sticker-star {
  position: absolute;
  top: 2px;
  right: 4px;
  color: var(--gold-300);
  font-size: 15px;
  line-height: 1;
  opacity: 0;
}

.sticker-tile.fav .sticker-star,
.sticker-tile:hover .sticker-star,
.sticker-tile:focus-visible .sticker-star {
  opacity: 1;
}

.sticker-empty {
  grid-column: 1 / -1;
  margin: 12px 0;
  text-align: center;
}

.sticker-hint {
  margin: 0;
}

.chat-sticker {
  display: inline-block;
  cursor: pointer;
}

.chat-sticker img {
  display: block;
  max-width: 150px;
  height: auto;
}

@media (pointer: coarse) {
  .sticker-star {
    opacity: 0.55;
  }
}

/*
 * Who someone is, as a colour (Ivan and Noba, 14 November): Ivan's
 * bubbles purple; in the people list Noba gold, Ivan purple, staff red.
 */
.chat-row.ivan .chat-name {
  color: var(--violet-300);
}

.chat-row.ivan .chat-bubble,
.chat-row.ivan.mine .chat-bubble {
  border-color: rgba(182, 73, 233, 0.45);
  background: linear-gradient(180deg, rgba(182, 73, 233, 0.3), rgba(121, 34, 169, 0.16));
}

/* Inside the list, not past it (Ivan, 14 November: the list clipped both edges). */
.people-row.queen,
.people-row.ivan,
.people-row.staff {
  margin: 2px 0;
  padding-inline: 10px;
  border-radius: 14px;
}

.people-row.queen {
  background: linear-gradient(90deg, rgba(243, 201, 105, 0.2), rgba(243, 201, 105, 0.04));
  box-shadow: inset 0 0 0 1px rgba(243, 201, 105, 0.3);
}

.people-row.queen .people-who b {
  color: var(--gold-300);
}

.people-row.ivan {
  background: linear-gradient(90deg, rgba(182, 73, 233, 0.24), rgba(182, 73, 233, 0.05));
  box-shadow: inset 0 0 0 1px rgba(182, 73, 233, 0.35);
}

.people-row.ivan .people-who b {
  color: var(--violet-300);
}

.people-row.staff {
  background: linear-gradient(90deg, rgba(255, 92, 92, 0.18), rgba(255, 92, 92, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 120, 120, 0.28);
}

.people-row.staff .people-who b {
  color: #ff9a9a;
}

/* Left in the last two minutes: still listed, a little dimmer. */
.people-row.left {
  opacity: 0.7;
}

/* Noba here: her crown by the count. */
.chat-queen {
  font-size: 13px;
  line-height: 1;
}

/* A sticker as a background: nothing for the browser to offer to save or share. */
.sticker-picture {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.chat-sticker {
  position: relative;
  max-width: 150px;
}

.sticker-tile-pic {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Double tap: a heart pops on the message. */
.chat-bubble,
.chat-emoji,
.chat-sticker {
  position: relative;
  touch-action: manipulation;
}

.chat-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 34px;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: chat-heart 0.8s var(--ease) forwards;
}

@keyframes chat-heart {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }

  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.25);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -120%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-heart {
    animation-duration: 0.01s;
  }
}

/*
 * The bell's and the account's menus (Ivan, 14 November): solid, with a
 * ×, a shade behind that closes them on a tap, and on a phone at most the
 * screen's height, scrolling inside.
 */
.panel {
  background: linear-gradient(180deg, var(--door-top), var(--door-bottom)), var(--bg-raised);
}

.panel h2 {
  padding-right: 40px;
}

.panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  font-size: 18px;
}

.panel-shade {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(11, 9, 16, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.note-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.note-link .grow {
  min-width: 0;
}

.note-link .amount {
  flex: none;
  white-space: nowrap;
}

.note-link:hover b,
.note-link:focus-visible b {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .panel {
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* With a mouse, the coins in the tip and drop windows wrap instead of scrolling sideways. */
@media (pointer: fine) {
  .tip-coins {
    flex-wrap: wrap;
    margin: 0;
    padding: 2px 0 4px;
    overflow: visible;
  }
}

/* Who reacted (14 November): in a message's tray, each emoji with the names. */
.chat-reactors {
  display: grid;
  gap: 6px;
  max-height: 160px;
  padding: 10px 14px;
  overflow-y: auto;
  border-bottom: 1px solid var(--hair);
}

.chat-reactor {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
}

.chat-reactor-e {
  flex: none;
  font-size: 16px;
}

/*
 * The bar at the bottom on a phone (Noba, 14 November, again: on iOS 26
 * Safari hides a bar pinned to the screen's bottom while its own toolbar
 * slides on scroll, a WebKit bug). So on a phone a page with the bar
 * doesn't scroll at all: the header and the bar stay put and only what's
 * between them scrolls, as in an app, and Safari's toolbar stays still.
 */
@media (max-width: 760px) {
  body[data-page]:has(> .tabbar) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    padding-bottom: 0;
    overflow: hidden;
  }

  body[data-page]:has(> .tabbar) > .app-top {
    flex: none;
  }

  body[data-page]:has(> .tabbar) > .wrap {
    flex: 1;
    width: 100%;
    min-height: 0;
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page]:has(> .tabbar) > .tabbar {
    position: static;
    flex: none;
  }
}
