/* NoSpoil. One family (Archivo), two widths: expanded and heavy for display, normal for text.
   Palette: cobalt field, navy ink, cool paper, true-black redaction bars, signal yellow for actions. */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --cobalt: #2140e8;
  --cobalt-deep: #1a33bd;
  --ink: #0b1437;
  --paper: #f4f6fb;
  --white: #ffffff;
  --bar: #000000;
  --signal: #ffd23f;
  --signal-deep: #f2bf14;
  --line: #cfd6ea;
  --muted: #4d5884;
  --danger: #c2261c;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1120px;

  /* What the signed-in app's themes change (public/look.css, src/web/look.ts), by what each
     colour does: text, cards and their borders, links, the dark bars and the empty state, and
     the shades used on the dark ink. Each is the brand's own colour until a theme says otherwise. */
  --text: var(--ink);
  --surface: var(--white);
  --border: var(--ink);
  --link: var(--cobalt);
  --chrome: var(--ink);
  --state-off: var(--ink);
  --on-ink-muted: #aab4de;
  --on-ink-soft: #d5dcf5;
  --on-ink-nav: #c6cdea;
  --on-ink-dim: #8792c4;
  --on-ink-link: #b4c2ff;
  --accent-soft: #8ea0ff;
  --glyph: #39457a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* The hidden attribute always wins, even where a class sets its own display. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  /* Keep every page clear of a phone's home bar, notch and rounded corners. In the installed
     app there is no browser toolbar under the page, so without this the last line of a
     full-height page (the watch page's chat box) sits under the home bar. Zero on screens
     that have none of these. */
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.06;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
}

h3 {
  font-size: 1.3125rem;
  line-height: 1.2;
}

p {
  margin: 0;
  max-width: 62ch;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
}

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

/* ---------- wordmark: the name redacts its own spoiler ---------- */

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark-bar {
  background: var(--bar);
  color: var(--white);
  padding: 0.08em 0.34em 0.1em;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 22px;
  border: 2px solid var(--bar);
  border-radius: 2px;
  background: var(--signal);
  color: var(--bar);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  background: var(--signal-deep);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

.btn-quiet {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-quiet:hover {
  background: rgb(11 20 55 / 0.08);
}

.btn-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9375rem;
}

.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgb(194 38 28 / 0.08);
}

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
}

/* Tall enough to hit with a thumb. */
.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.top nav a:hover {
  text-decoration: underline;
}

/* ---------- hero ---------- */

.hero {
  background: var(--cobalt);
  color: var(--white);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding-block: clamp(28px, 5vw, 64px) clamp(48px, 7vw, 96px);
}

.hero h1 {
  font-size: clamp(2.6rem, 1.1rem + 6.4vw, 5.6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

/* The headline is a spoiler with the name blacked out. */
.redact {
  display: inline-block;
  width: 3.1em;
  height: 0.74em;
  margin-right: 0.08em;
  background: var(--bar);
  vertical-align: baseline;
  transform-origin: left center;
  animation: sweep 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both;
}

@keyframes sweep {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.hero-lede {
  margin-top: 28px;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.45;
  max-width: 34ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 32px;
}

.hero-cta small {
  font-size: 0.9375rem;
}

/* ---------- chat panel (hero demo, and the look of every chat line) ---------- */

.chat-panel {
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--bar);
  border-radius: 2px;
}

.chat-head {
  padding: 12px 16px;
  border-bottom: 2px solid var(--bar);
  font-weight: 700;
}

.chat-lines {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
  height: 300px;
  margin: 0;
  padding: 14px 16px;
  overflow: hidden;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.chat-lines li {
  overflow-wrap: anywhere;
}

.who {
  font-weight: 700;
}

.bar {
  display: inline-block;
  height: 0.95em;
  background: var(--bar);
  vertical-align: -0.12em;
  transform-origin: left center;
  animation: sweep 0.35s ease-out both;
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 6px;
  border: 1.5px solid currentColor;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.tag-stays {
  border-color: var(--line);
  color: var(--muted);
}

.demo-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 2px solid var(--bar);
}

.demo-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid var(--bar);
  border-radius: 2px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
}

.demo-note {
  margin: 0;
  padding: 0 14px 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- content bands ---------- */

.band {
  padding-block: clamp(56px, 8vw, 104px);
}

.band + .band {
  border-top: 2px solid var(--ink);
}

.band-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.band-head p {
  font-size: 1.1875rem;
}

/* ---------- supported games: a ring of title plates ----------
   One transform moves the whole ring, so it stays on the compositor. The far side shows the plates'
   black backs, which read as redaction bars passing behind the titles. */

.games {
  --pw: clamp(168px, 21vw, 250px);
  --r: calc(var(--pw) * var(--rk, 2.62)); /* landing.tsx sets --n, --step and --rk from the number of plates */
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.ring-stage {
  position: relative;
  height: calc(var(--pw) * 2.05);
  perspective: 1500px;
  perspective-origin: 50% 42%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.ring-stage.dragging {
  cursor: grabbing;
}

/* Fade the plates out at the edges of the page. */
.ring-stage::before,
.ring-stage::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: min(14vw, 180px);
  pointer-events: none;
}

.ring-stage::before {
  left: 0;
  background: linear-gradient(to right, var(--ink), rgb(11 20 55 / 0));
}

.ring-stage::after {
  right: 0;
  background: linear-gradient(to left, var(--ink), rgb(11 20 55 / 0));
}

.ring-tilt,
.ring,
.plate {
  transform-style: preserve-3d;
}

.ring-tilt {
  position: absolute;
  inset: 0;
  /* The tilt drops the front plate by r × sin 9°; lifting by that much keeps it in the same place however wide the ring is. */
  transform: translateY(calc(var(--pw) * 0.21 - var(--r) * 0.1564)) translateZ(calc(var(--r) * -1)) rotateX(-9deg);
}

.ring {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: ring-spin calc(var(--n, 15) * 4.67s) linear infinite;
  will-change: transform;
}

/* landing.js takes over the rotation so the ring can be dragged. */
.ring.driven {
  animation: none;
}

@keyframes ring-spin {
  to {
    transform: rotateY(-360deg);
  }
}

.plate {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--pw);
  height: calc(var(--pw) * 1.5);
  margin: calc(var(--pw) * -0.75) 0 0 calc(var(--pw) * -0.5);
  font-size: calc(var(--pw) / 10);
  transform: rotateY(calc(var(--i) * var(--step, 24deg))) translateZ(var(--r));
}

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.front {
  display: flex;
  flex-direction: column;
  padding: 0.85em 0.9em 0.95em;
  border: 2px solid var(--bar);
  background: var(--bg);
  color: var(--fg);
}

.back {
  background: var(--bar);
  transform: rotateY(180deg);
}

.plate-no {
  font-size: 0.68em;
  font-weight: 700;
  font-stretch: 125%;
  line-height: 1;
}

.plate-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.plate-title b {
  display: block;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.015em;
}

.plate-title b span {
  display: block;
  white-space: nowrap;
}

.plate-title small {
  margin-top: 0.7em;
  font-size: 0.7em;
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

.plate-secret {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.plate-secret i {
  flex: 0 1 auto;
  min-width: 1.2em;
  height: 1.25em;
  background: var(--bar);
}

/* With cover art: the picture fills the plate and the redaction line becomes a black strip along the bottom. */
.plate-art {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: calc(100% - 1.95em);
  object-fit: cover;
  /* The cover is part of the ring, not a picture to pick up: presses go through it to the
     ring, so dragging turns the ring instead of dragging the image. */
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.has-art .plate-secret {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.15em;
  padding: 0 1.3em;
  background: var(--bar);
  color: var(--white);
}

.has-art .plate-secret i {
  background: var(--signal);
}

.games-foot {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-top: clamp(20px, 3vw, 36px);
  text-align: center;
}

.games-more b {
  display: inline-block;
  padding: 0.3em 0.7em 0.34em;
  background: var(--signal);
  color: var(--bar);
  font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.5rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.15;
}

.games-legal {
  font-size: 0.8125rem;
  color: #aab4de;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 10px;
  font-size: 4rem;
  font-weight: 900;
  font-stretch: 125%;
  line-height: 1;
  color: var(--cobalt);
}

.steps h3 {
  margin-bottom: 8px;
}

.sorting {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 2px solid var(--ink);
  background: var(--white);
}

.sorting > div {
  padding: 24px;
}

.sorting > div + div {
  border-left: 2px solid var(--ink);
}

.sorting h3 {
  margin-bottom: 4px;
}

.sorting .when {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.sorting ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.35;
}

/* Removed examples keep readable text and carry a small redaction bar as their marker. */
.sorting .gone li {
  position: relative;
  padding-left: 2.1em;
}

.sorting .gone li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.5em;
  height: 0.7em;
  background: var(--bar);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.split p + p {
  margin-top: 14px;
}

.mock {
  background: var(--ink);
  color: var(--white);
  padding: 20px;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.mock ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mock .hid {
  color: #aab4de;
}

.mock .hid::before {
  content: '';
  display: inline-block;
  width: 5.5em;
  height: 0.85em;
  margin-right: 8px;
  background: var(--signal);
  vertical-align: -0.08em;
}

.prices {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 2px solid var(--ink);
}

.prices th,
.prices td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

.prices thead th {
  border-bottom: 2px solid var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
}

.prices tbody tr:last-child th,
.prices tbody tr:last-child td {
  border-bottom: 0;
}

.prices tbody th {
  font-size: 1.3125rem;
  font-weight: 800;
  font-stretch: 125%;
}

.prices .price {
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 125%;
  white-space: nowrap;
}

.after-table {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 28px;
}

.faq {
  display: grid;
  gap: 0;
  max-width: 780px;
  border-top: 2px solid var(--ink);
}

.faq details {
  border-bottom: 2px solid var(--ink);
}

.faq summary {
  padding: 18px 0;
  font-size: 1.1875rem;
  font-weight: 700;
  cursor: pointer;
}

.faq details p {
  padding-bottom: 20px;
}

.foot {
  padding-block: 36px 48px;
  border-top: 2px solid var(--ink);
  font-size: 0.9375rem;
  color: var(--muted);
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}

.foot nav {
  display: flex;
  gap: 20px;
}

/* ---------- prose pages (terms, privacy, messages) ---------- */

.prose {
  padding-block: 48px 96px;
}

.prose h1 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  margin-bottom: 20px;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 36px 0 10px;
}

.prose p,
.prose li {
  max-width: 68ch;
}

.prose p + p {
  margin-top: 12px;
}

.prose ul {
  padding-left: 1.2em;
}

/* ---------- dashboard ---------- */

.dash {
  padding-block: 8px 96px;
}

.state {
  display: grid;
  gap: 10px;
  padding: 28px;
  background: var(--state-off);
  color: var(--white);
}

.state.on {
  background: var(--cobalt);
}

.state h1 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
}

.state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.notice {
  margin-top: 16px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  background: var(--signal);
  color: var(--ink);
  font-weight: 600;
}

.notice.bad {
  background: var(--surface);
  border-color: var(--danger);
  color: var(--danger);
}

.tally {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 2px solid var(--ink);
  border-top: 0;
  background: var(--white);
}

.tally div {
  padding: 16px 20px;
}

.tally div + div {
  border-left: 1px solid var(--line);
}

.tally b {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.1;
}

.tally span {
  font-size: 0.9375rem;
  color: var(--muted);
}

.panel {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 16px 48px;
  padding-block: 36px;
  border-bottom: 2px solid var(--ink);
}

.panel > header p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.fields {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 6px;
}

.field > label,
.field > legend,
fieldset.field > legend {
  font-weight: 700;
  padding: 0;
}

fieldset.field {
  margin: 0;
  padding: 0;
  border: 0;
}

.hint {
  font-size: 0.9375rem;
  color: var(--muted);
}

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

.choices label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}

.choices input {
  accent-color: var(--link);
}

.choices label:has(input:checked) {
  background: var(--text);
  color: var(--surface);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--link);
}

.text-input,
textarea.text-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  font: inherit;
  color: var(--text);
}

.copy-row {
  display: flex;
  gap: 8px;
}

.copy-row input {
  flex: 1;
  min-width: 0;
}

.pass-list {
  display: grid;
  gap: 0;
  border: 2px solid var(--border);
  background: var(--surface);
}

.pass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 20px;
  padding: 14px 18px;
}

.pass + .pass {
  border-top: 1px solid var(--line);
}

.pass b {
  font-size: 1.1875rem;
}

.pass .price {
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.3125rem;
}

.log {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 2px solid var(--border);
  background: var(--surface);
}

.log li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  padding: 12px 16px;
  font-size: 0.9375rem;
}

.log li + li {
  border-top: 1px solid var(--line);
}

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

.log .said {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.log .said[data-hidden='1'] span {
  background: var(--bar);
  color: transparent;
  user-select: none;
}

.log button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  color: var(--link);
  cursor: pointer;
}

.empty {
  padding: 18px;
  border: 2px dashed var(--line);
  color: var(--muted);
}

/* ---------- Safe chat and overlays ---------- */

body.safe {
  background: var(--ink);
  color: var(--white);
  height: 100vh;
  /* On a phone, 100vh reaches under the browser's toolbar, where the newest lines would hide. */
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

body.safe.overlay,
body.counter {
  background: transparent;
}

.safe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bar);
  font-size: 0.9375rem;
}

.safe-head .count {
  font-weight: 800;
  color: var(--signal);
}

.safe-banner {
  padding: 10px 14px;
  background: var(--signal);
  color: var(--bar);
  font-weight: 700;
  font-size: 0.9375rem;
}

.safe-banner a {
  color: inherit;
}

/* ---------- the chat feed: Safe chat, the overlay and the watch page ---------- */

/* The lines, with the "new messages" button over their foot. */
.feed {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* A scroll box. Lines sit at the foot, newest last, as in Twitch's chat; reading back is a
   normal scroll, and public/chat.js pauses the chat while it lasts. */
.safe-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 8px 0 10px;
  overflow-x: hidden;
  overflow-y: auto;
  /* A flick that reaches the end stays in the chat instead of moving the page. */
  overscroll-behavior: contain;
  /* chat.js keeps the reader's place itself when old lines go, the same in every browser. */
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 0.3) transparent;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Few lines rest at the foot; many scroll. (justify-content: flex-end would cut off the top for good.) */
.safe-lines > :first-child {
  margin-top: auto;
}

.safe-lines > li {
  padding: 3px 14px;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  .safe-lines > .ln:hover {
    background: rgb(255 255 255 / 0.05);
  }
}

.safe-lines .unchecked {
  opacity: 0.7;
}

/* Badges: Twitch's pictures, or our own square glyphs where a platform gives none (Kick). */
.bdgs {
  margin-right: 1px;
}

/* Pictures and glyphs both align by their middle: a glyph's own baseline depends on whether it
   holds letters, which would leave "OG" lower than a star. */
.bdg {
  position: relative;
  top: -1px;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  vertical-align: middle;
}

.gl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 18px;
  height: 18px;
  margin-right: 4px;
  padding: 0 3px;
  background: var(--gl-bg, var(--glyph));
  color: var(--gl-fg, var(--white));
  font-size: 0.625rem;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1;
  position: relative;
  top: -1px;
  vertical-align: middle;
}

.gl svg {
  flex: none;
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.gl b {
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Months subscribed, or subs given: the subscriber glyph reads "★ 12". */
.gl i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.gl-word {
  background: var(--glyph);
}

.safe-lines .nm {
  font-weight: 700;
}

/* Emotes keep the line's height, as Twitch's do: 28 pixels, drawn over the line gap. */
.em {
  width: 28px;
  height: 28px;
  margin: -6px 1px;
  vertical-align: middle;
}

.em-kick {
  width: auto;
}

/* A giant emote, bought with Bits: on a line of its own. */
.em-giant {
  display: block;
  width: 112px;
  height: 112px;
  margin: 4px 0 2px;
}

.ch {
  white-space: nowrap;
}

.ch img {
  width: 28px;
  height: 28px;
  margin: -6px 0;
  vertical-align: middle;
}

.ch b {
  margin-left: 1px;
  font-weight: 800;
}

.mn {
  font-weight: 700;
}

.lk {
  color: var(--on-ink-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lk:hover {
  color: var(--white);
}

/* Above a line: what it answers, and Twitch's labels for paid and first messages. */
.ln-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-bottom: 1px;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--on-ink-muted);
}

.rp {
  flex: 1 1 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp svg {
  width: 11px;
  height: 11px;
  margin-right: 4px;
  fill: currentColor;
  vertical-align: -1px;
}

.rp b {
  color: var(--on-ink-soft);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  background: var(--bar);
  color: var(--signal);
  font-size: 0.625rem;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.tag-src {
  color: var(--on-ink-soft);
}

/* The viewer's own messages carry a yellow edge; lines that name them or answer them, a red one. */
.safe-lines .mine {
  box-shadow: inset 3px 0 0 var(--signal);
}

.safe-lines .me {
  background: rgb(194 38 28 / 0.3);
  box-shadow: inset 3px 0 0 #ff6b5e;
}

/* Paid for: highlighted with channel points, a first message, a message effect, a cheer. */
.safe-lines .hl {
  background: color-mix(in srgb, var(--cobalt) 50%, transparent);
  box-shadow: inset 3px 0 0 var(--accent-soft);
}

.safe-lines .intro {
  box-shadow: inset 3px 0 0 #8ff0d0;
}

.safe-lines .fx {
  background: linear-gradient(100deg, rgb(255 210 63 / 0.18), color-mix(in srgb, var(--cobalt) 32%, transparent) 60%, rgb(224 5 185 / 0.22));
  box-shadow: inset 3px 0 0 var(--signal);
}

.safe-lines .cheered {
  box-shadow: inset 3px 0 0 #b48cff;
}

/* A line the filter hid: a redaction bar and who it was from. */
.safe-lines .hid {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--on-ink-muted);
  font-size: 0.8125rem;
}

.safe-lines .hid::before {
  content: '';
  flex: none;
  width: 3.4em;
  height: 0.8em;
  background: var(--signal);
}

/* Twitch's notices (subs, gifts, raids, announcements) and Kick's (subs, gifts, KICKs).
   --nt is each kind's colour: yellow for subs, gifts and KICKs, set apart below for the rest. */
.nt {
  --nt: var(--signal);
}

.safe-lines > .nt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 10px;
  padding: 9px 12px 10px 10px;
  border-left: 4px solid var(--nt);
  background: rgb(255 255 255 / 0.07);
}

.nt-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  background: var(--nt);
  color: var(--bar);
}

.nt-ic svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.nt-av {
  flex: none;
  width: 32px;
  height: 32px;
  outline: 2px solid var(--nt);
}

.nt-main {
  min-width: 0;
}

.nt-main p {
  max-width: none;
}

.nt-head {
  margin-bottom: 2px;
  color: var(--nt);
  font-size: 0.6875rem;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nt-sys {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.nt-sys b {
  font-weight: 800;
}

.nt-msg {
  margin-top: 3px;
}

.nt-hid {
  margin-top: 3px;
  color: var(--on-ink-muted);
  font-size: 0.8125rem;
}

.nt-hid::before {
  content: '';
  display: inline-block;
  width: 2.4em;
  height: 0.75em;
  margin-right: 7px;
  background: var(--signal);
  vertical-align: -0.04em;
}

/* Taken away by the channel's moderators, not by the filter: no redaction bar. */
.nt-gone {
  margin-top: 3px;
  color: var(--on-ink-dim);
  font-size: 0.8125rem;
  font-style: italic;
}

.nt-raid {
  --nt: var(--accent-soft);
}

.nt-streak {
  --nt: #ff9f43;
}

.nt-charity {
  --nt: #ff7ab2;
}

.nt-mod {
  --nt: #2fd18a;
}

.nt-bits {
  --nt: #b48cff;
}

.nt-quiet {
  --nt: #6f7bb0;
}

.nt-ann {
  --nt: var(--accent-soft);
}

.nt-ann.ann-blue {
  --nt: #4aa8ff;
}

.nt-ann.ann-green {
  --nt: #2fd18a;
}

.nt-ann.ann-orange {
  --nt: #ff9f43;
}

.nt-ann.ann-purple {
  --nt: #b48cff;
}

.safe-lines > .nt.me {
  background: rgb(194 38 28 / 0.3);
}

/* Over the foot of the lines while the chat is paused: how many arrived, and back down. */
.feed-more {
  position: absolute;
  bottom: 12px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid var(--bar);
  border-radius: 2px;
  background: var(--signal);
  box-shadow: 0 3px 0 var(--bar);
  color: var(--bar);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
  cursor: pointer;
}

.feed-more:hover {
  background: var(--signal-deep);
}

.feed-more svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* Pinned at the top of the chat (Kick's KICKs gifts), for as long as the platform pins it. */
.pin {
  padding: 8px 10px 0;
}

.pin-card {
  --nt: var(--signal);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  padding: 8px 38px 10px 10px;
  border-left: 4px solid var(--nt);
  background: var(--bar);
  font-size: 0.9375rem;
}

.pin-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--signal);
  font-size: 0.625rem;
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pin-head svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

.pin-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.pin-x:hover {
  color: var(--signal);
}

/* The room's rules, by the chat box: slow mode, followers-only and so on. */
.room {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: none;
  margin: 0;
  padding: 8px 12px 0;
  border-top: 1px solid rgb(255 255 255 / 0.15);
}

.room-chip {
  padding: 1px 7px;
  border: 1px solid rgb(255 255 255 / 0.4);
  color: var(--on-ink-soft);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* The overlay sits over the stream in OBS: no scrolling, the newest lines at the foot, the
   oldest cut off at the top. */
body.overlay .safe-lines {
  justify-content: flex-end;
  overflow: hidden;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.9), 0 0 6px rgb(0 0 0 / 0.6);
  font-size: 1.125rem;
}

body.overlay .safe-lines > :first-child {
  margin-top: 0;
}

body.counter {
  margin: 0;
  padding: 12px;
}

.counter-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bar);
  color: var(--white);
  font-weight: 700;
}

.counter-chip b {
  font-size: 1.75rem;
  font-weight: 900;
  font-stretch: 125%;
  color: var(--signal);
  line-height: 1;
}

.counter-chip small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c6cdea;
}

/* ---------- top bar: the same on the dashboard and the watch page ---------- */

/* A slim dark bar with the wordmark on the left and search at the right end, in the same
   place on every signed-in page. */
.top-bar {
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 5px 12px;
  border-bottom: 2px solid var(--bar);
  background: var(--chrome);
  color: var(--white);
  font-size: 0.875rem;
}

.top-bar .mark {
  font-size: 1rem;
}

.top-bar .chan-box {
  flex: none;
  width: 260px;
}

.top-bar .text-input {
  min-height: 30px;
  padding: 3px 10px;
  border-color: rgb(255 255 255 / 0.7);
  background: transparent;
  color: var(--white);
  font-size: 0.875rem;
}

.top-bar .text-input::placeholder {
  color: var(--on-ink-muted);
}

.top-bar .text-input:focus {
  border-color: var(--white);
  background: rgb(255 255 255 / 0.08);
}

/* Wider than the box and hung from its right edge. On the watch page that is exactly the chat
   column, so suggestions open over our own chat and never over Twitch's player. */
.top-bar .chan-list {
  left: auto;
  width: min(356px, calc(100vw - 24px));
}

/* ---------- dashboard: top bar, side menu, one section at a time ---------- */

/* The scrollbar's space is always there, so the page does not jump sideways when a short
   section follows a long one. */
html:has(body.app) {
  overflow-y: scroll;
}

body.app {
  --bar-h: 44px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.app-top {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
}

.app-top .chan-search {
  margin-left: auto;
}

.rail {
  position: sticky;
  top: var(--bar-h);
  height: calc(100vh - var(--bar-h));
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 20px;
  background: var(--chrome);
  color: var(--white);
}

.rail-nav {
  display: grid;
  gap: 2px;
}

.rail-nav a {
  display: block;
  padding: 10px 12px;
  border-left: 4px solid transparent;
  color: var(--on-ink-nav);
  font-weight: 600;
  text-decoration: none;
}

.rail-nav a:hover {
  color: var(--white);
  background: rgb(255 255 255 / 0.06);
}

.rail-nav a[aria-current='true'] {
  color: var(--white);
  border-left-color: var(--signal);
  background: rgb(255 255 255 / 0.09);
}

/* Full labels in the side menu, one-word labels in the phone menu. */
.rail-nav .short {
  display: none;
}

.rail-foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.rail-who {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.rail-foot .btn-quiet {
  border-color: rgb(255 255 255 / 0.5);
  color: var(--white);
}

.rail-foot .btn-quiet:hover {
  background: rgb(255 255 255 / 0.1);
}

/* The page uses the whole screen beside the menu. Only on very wide monitors is it capped,
   and then it sits in the middle, so there is never an empty strip down one side. */
.app-main {
  width: 100%;
  max-width: 1740px;
  margin-inline: auto;
  padding: 32px clamp(20px, 4vw, 48px) 80px;
}

.app-main .state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.app-main .state h1 {
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.25rem);
}

.app-main .state p {
  margin-top: 8px;
}

.app-main .state .state-actions {
  margin-top: 0;
}

.view {
  padding-top: 40px;
}

.view > h2 {
  margin-bottom: 20px;
  font-size: 1.75rem;
}

.view-hint {
  margin: -8px 0 20px;
  color: var(--muted);
}

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

.tile {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 18px 20px;
  border: 2px solid var(--border);
  background: var(--surface);
  container-type: inline-size;
}

/* The number scales with its tile, so a seven-digit count still fits on one line on a phone. */
.tile b {
  font-size: 1.5rem;
  font-size: clamp(1rem, 12cqi, 1.9rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1.1;
  white-space: nowrap;
}

.tile > span {
  font-size: 0.9375rem;
  color: var(--muted);
}

.meter {
  display: block;
  height: 8px;
  margin-top: 8px;
  background: var(--line);
}

.meter > span {
  display: block;
  height: 100%;
  background: var(--cobalt);
}

.meter-wide {
  width: 100%;
  max-width: 420px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 24px 24px;
  border: 2px solid var(--border);
  background: var(--surface);
}

.card-wide {
  grid-column: 1 / -1;
}

.card h3 {
  font-size: 1.1875rem;
}

.card-hint {
  max-width: 70ch;
  font-size: 0.9375rem;
  color: var(--muted);
}

.card-hint:empty {
  display: none;
}

.card-hint a {
  font-weight: 600;
  color: var(--link);
}

/* The action sits on the card's bottom edge, so a row of cards lines up whatever the text length. */
.card > .btn,
.card > .choices,
.card > .copy-row,
.card > .chan-search {
  margin-top: auto;
}

.card > form,
.card > div,
.card > .meter {
  align-self: stretch;
}

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

/* Lists inside a card use the card's own frame: dividing lines only, no second box. */
.card .pass-list,
.card .log {
  border: 0;
}

.card .pass,
.card .log li {
  padding-inline: 0;
}

.card .pass:first-child,
.card .log li:first-child {
  padding-top: 0;
}

.card .pass:last-child,
.card .log li:last-child {
  padding-bottom: 0;
}

/* ---------- dashboard, Streams: what is live now, as a grid of previews ---------- */

.stream-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 20px;
  margin-top: 20px;
}

.pick {
  display: grid;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 700;
}

.pick select {
  min-height: 42px;
  max-width: 240px;
  padding: 0 10px;
  border: 2px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

.stream-status {
  max-width: none;
  margin: 14px 0 12px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.streams {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px 16px;
}

.stream {
  display: grid;
  align-content: start;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.stream .thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin-bottom: 6px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--ink);
}

.stream .thumb img,
.stream .blank {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream .blank {
  display: grid;
  place-items: center;
  color: rgb(255 255 255 / 0.35);
  font-size: 3rem;
  font-weight: 800;
  font-stretch: 125%;
}

/* How many are watching and where, on black bars across the preview's corners. */
.stream .watching,
.stream .where {
  position: absolute;
  bottom: 0;
  padding: 2px 8px;
  background: var(--bar);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
}

.stream .watching {
  left: 0;
}

.stream .where {
  right: 0;
  background: var(--signal);
  color: var(--bar);
}

/* The site's mark, square, as tall as the "watching" bar beside it and in the site's colour. */
.stream .where.site {
  width: calc(0.8125rem * 1.55 + 4px);
  height: calc(0.8125rem * 1.55 + 4px);
  padding: 0;
  font-weight: 900;
}

.stream .where.site-twitch {
  background: #9146ff;
  color: #fff;
}

.stream .where.site-kick {
  background: #53fc18;
  color: #000;
}

/* The same mark in the platform choice above the list. */
.choices .site {
  width: 18px;
  height: 18px;
  font-size: 0.6875rem;
}

.stream .who,
.stream .what,
.stream .title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream .who {
  font-size: 1.0625rem;
}

.stream .what,
.stream .title {
  font-size: 0.875rem;
  color: var(--muted);
}

.stream:hover .thumb,
.stream:focus-visible .thumb {
  border-color: var(--cobalt);
  box-shadow: 5px 5px 0 var(--cobalt);
}

.stream:hover .who {
  color: var(--link);
}

.how {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}

.how summary {
  font-weight: 700;
  cursor: pointer;
}

.how .plain-list {
  margin-top: 10px;
  max-width: 80ch;
}

#streams > .card-note {
  margin-bottom: 4px;
}

#streams > .recent {
  margin-top: 16px;
}

/* "Watched recently": one-click links back to the viewer's last few channels. */
.recent h4 {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  font-weight: 700;
}

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

.recent a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 2px solid var(--border);
  font-weight: 600;
  text-decoration: none;
}

.recent a:hover {
  background: var(--text);
  color: var(--surface);
}

.recent img {
  width: 24px;
  height: 24px;
  margin-left: -6px;
}

/* ---------- favourites: the star, on watch pages, previews, search and the Streams choice ---------- */

/* Two layers of one sharp star: the outline, and a fill in the action colour that grows out of
   the middle when the star turns on, so the outline seems to fill itself. */
.star {
  display: block;
  overflow: visible;
}

.star .star-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: miter;
  transition: stroke 0.2s;
}

.star .star-fill {
  fill: var(--signal);
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.25, 1.35);
}

[aria-pressed='true'] > .star .star-fill,
.fav-filter:has(input:checked) .star .star-fill {
  transform: scale(1);
}

[aria-pressed='true'] > .star .star-line,
.fav-filter:has(input:checked) .star .star-line {
  stroke: var(--signal);
}

.fav-star {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.fav-star .star {
  width: 20px;
  height: 20px;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.25, 1.35);
}

@media (hover: hover) {
  .fav-star:hover .star {
    transform: rotate(-12deg) scale(1.1);
  }

  .fav-star:hover .star .star-line {
    stroke: var(--signal);
  }
}

/* Turning on: the star spins in from small, a square ring opens round it, and five sparks fly
   out along its points. Turning off: a quick squeeze. A save that fails: a shake. */
.fav-star::before,
.fav-star::after {
  content: '';
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

.fav-star::after {
  inset: 5px;
  border: 2px solid var(--signal);
}

.fav-star::before {
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px;
}

.fav-star.pop .star {
  animation: star-pop 0.5s cubic-bezier(0.2, 0.8, 0.25, 1.2);
}

.fav-star.pop::after {
  animation: star-ring 0.5s ease-out;
}

.fav-star.pop::before {
  animation: star-sparks 0.55s cubic-bezier(0.15, 0.7, 0.3, 1);
}

.fav-star.unpop .star {
  animation: star-unpop 0.3s ease-out;
}

.fav-star.nope .star {
  animation: star-nope 0.4s ease-in-out;
}

@keyframes star-pop {
  0% {
    transform: scale(0.45) rotate(-72deg);
  }
  60% {
    transform: scale(1.25) rotate(6deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes star-ring {
  0% {
    opacity: 0.9;
    transform: rotate(45deg) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) scale(1.45);
  }
}

@keyframes star-sparks {
  0% {
    opacity: 1;
    box-shadow:
      0 0 var(--signal),
      0 0 var(--signal),
      0 0 var(--signal),
      0 0 var(--signal),
      0 0 var(--signal);
  }
  100% {
    opacity: 0;
    box-shadow:
      0 -18px var(--signal),
      17px -6px var(--signal),
      11px 15px var(--signal),
      -11px 15px var(--signal),
      -17px -6px var(--signal);
  }
}

@keyframes star-unpop {
  40% {
    transform: scale(0.72);
  }
}

@keyframes star-nope {
  20%,
  60% {
    transform: translateX(-3px);
  }
  40%,
  80% {
    transform: translateX(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .star .star-fill,
  .star .star-line,
  .fav-star .star {
    transition: none;
  }

  .fav-star.pop .star,
  .fav-star.pop::before,
  .fav-star.pop::after,
  .fav-star.unpop .star,
  .fav-star.nope .star {
    animation: none;
  }
}

/* On a preview: a black square on the picture's top right corner, shown under the pointer, on
   focus, when starred, and always on a touch screen (which has no pointer to rest there). */
.stream-cell {
  position: relative;
  display: grid;
  align-content: start;
}

.stream-cell .fav-star {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: var(--bar);
  color: var(--white);
  opacity: 0;
  transition: opacity 0.15s;
}

.stream-cell:hover .fav-star,
.stream-cell .fav-star:focus-visible,
.stream-cell .fav-star[aria-pressed='true'],
.stream-cell .fav-star.unpop {
  opacity: 1;
}

@media (hover: none) {
  .stream-cell .fav-star {
    opacity: 1;
  }
}

/* The preview keeps its pointer look while the pointer is on its star. */
.stream-cell:hover .stream .thumb {
  border-color: var(--cobalt);
  box-shadow: 5px 5px 0 var(--cobalt);
}

/* In the search list: "Favorites" as its first row (and "All channels" to come back), with an
   ink square where a channel has its picture. */
.chan-list .act-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
}

.chan-list .act-icon .star {
  width: 18px;
  height: 18px;
}

.chan-list .act-favs .star .star-fill {
  transform: scale(1);
}

.chan-list .act-favs .star .star-line {
  stroke: var(--signal);
}

.chan-list .act-favs {
  border-bottom: 1px solid var(--line);
}

.chan-list .act-back .text b {
  font-size: 0.875rem;
}

/* The Streams choice. */
.fav-filter .star {
  width: 18px;
  height: 18px;
}

#streams > .fav-off {
  margin-top: 24px;
}

/* Something to do before the card's main action, such as signing in again. */
.card-note {
  align-self: stretch;
  max-width: none;
  padding: 10px 12px;
  background: var(--signal);
  color: var(--bar);
  font-size: 0.9375rem;
  font-weight: 600;
}

.fields-foot {
  grid-column: 1 / -1;
}

/* On a wide screen the plans stand side by side instead of in rows. */
@media (min-width: 1100px) {
  .card .pass-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .card .pass-list .pass {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    justify-items: start;
    gap: 12px;
    padding: 20px;
    border: 2px solid var(--border);
  }

  .card .pass-list .pass .btn {
    margin-top: 4px;
  }
}

/* And the filter form splits in two: switches on the left, free-text fields on the right. */
@media (min-width: 1200px) {
  .fields-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
    align-items: start;
  }
}

/* ---------- channel search: a text box with a list of suggestions under it ---------- */

.chan-search {
  display: flex;
  gap: 8px;
}

.chan-box {
  position: relative;
  flex: 1;
  min-width: 0;
}

/* Always a white sheet with dark text, so it reads the same over the dashboard and the watch bar. */
.chan-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: min(430px, 70vh);
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  list-style: none;
  border: 2px solid var(--bar);
  background: var(--white);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--bar);
  font-size: 0.9375rem;
  line-height: 1.3;
  text-align: left;
}

.chan-list .group {
  padding: 8px 12px 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}

.chan-list .none {
  padding: 10px 12px;
  color: var(--muted);
}

.chan-list a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  color: inherit;
  text-decoration: none;
}

.chan-list a:hover,
.chan-list a[aria-selected='true'] {
  background: var(--signal);
  color: var(--bar);
}

.chan-list img,
.chan-list .initial {
  width: 32px;
  height: 32px;
}

.chan-list .initial {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
}

.chan-list .text {
  display: grid;
  min-width: 0;
}

.chan-list .text b,
.chan-list .what {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chan-list .what {
  font-size: 0.8125rem;
  color: var(--muted);
}

.chan-list a:hover .what,
.chan-list a[aria-selected='true'] .what {
  color: var(--bar);
}

/* A channel's picture, with a small mark in its bottom right corner for the site it is on. */
.chan-list .pic {
  position: relative;
  width: 32px;
  height: 32px;
}

.chan-list .pic img,
.chan-list .pic .initial {
  display: grid;
}

.site {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  font-size: 0.5625rem;
  font-weight: 900;
  line-height: 1;
}

.chan-list .pic .site {
  position: absolute;
  right: -5px;
  bottom: -5px;
  border: 1.5px solid var(--white);
  box-sizing: content-box;
}

.site-twitch {
  background: #9146ff;
  color: #fff;
}

.site-kick {
  background: #53fc18;
  color: #000;
}

.chan-list .live {
  padding: 2px 7px;
  background: var(--bar);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.plain-list {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding-left: 1.1em;
  font-size: 0.9375rem;
  color: var(--muted);
}

.below-cards {
  max-width: none;
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
}

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

  .rail {
    position: static;
    display: block;
    height: auto;
    padding: 6px 12px 8px;
  }

  /* Every section stays visible on a phone: a four-across grid, nothing to scroll sideways. */
  .rail-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .rail-nav a {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    border-bottom: 3px solid transparent;
    font-size: 0.875rem;
    white-space: nowrap;
  }

  .rail-nav a[aria-current='true'] {
    border-bottom-color: var(--signal);
  }

  .rail-nav .long {
    display: none;
  }

  .rail-nav .short {
    display: inline;
  }

  .rail-foot {
    display: none;
  }

  .app-main {
    padding-top: 20px;
  }

  /* The suggestions cannot hang over what is under the bar on a phone (on the watch page that
     is Twitch's player). They become a full-width block inside the bar, which pushes the page
     down while the list is open. `display: contents` lets the text box and the list sit in the
     bar's own rows. */
  .top-bar {
    flex-wrap: wrap;
    gap: 8px 10px;
  }

  .top-bar .chan-search,
  .top-bar .chan-box {
    display: contents;
  }

  .top-bar .text-input {
    order: 2;
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .top-bar .bar-toggle {
    order: 3;
    margin-left: 0;
  }

  .top-bar .chan-list {
    position: static;
    order: 10;
    flex-basis: 100%;
    width: auto;
    max-height: 45vh;
    box-shadow: none;
  }

  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .tile {
    padding: 14px;
  }

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

  .card {
    padding: 18px;
  }

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

  .card .pass .btn {
    grid-column: 1 / -1;
  }
}

/* ---------- watch page: Twitch video with a filtered chat beside it ---------- */

body.watch {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

/* With the top bar hidden, the video and chat take the whole window. */
body.watch.bar-hidden {
  grid-template-rows: minmax(0, 1fr);
}

body.watch.bar-hidden .watch-top {
  display: none;
}

/* The shared top bar (see .top-bar), above the video and chat. */
.watch-top {
  position: relative;
}

.watch-back {
  font-weight: 600;
}

.watch-top .bar-toggle {
  margin-left: auto;
}

/* "Hide bar" in the top bar, "Show bar" in the chat heading. Never over the video. */
.bar-toggle {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgb(255 255 255 / 0.55);
  border-radius: 2px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.bar-toggle:hover {
  background: rgb(255 255 255 / 0.12);
}

/* Who is on: picture, name (cut short when long), and the "Filtered" chip. */
.watch-chat .safe-title {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.watch-pic {
  display: grid;
  flex: none;
  width: 24px;
  height: 24px;
  overflow: hidden;
}

.watch-pic img,
.watch-pic .initial {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.watch-pic .initial {
  background: var(--cobalt);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
}

.watch-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filtered {
  flex: none;
  padding: 2px 6px;
  background: var(--signal);
  color: var(--bar);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.watch-chat .safe-head .fav-star {
  margin: -4px 0;
}

.watch-chat .safe-count {
  white-space: nowrap;
}

.watch-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  min-height: 0;
}

.watch-video {
  min-height: 0;
  background: var(--bar);
}

.watch-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* A column: heading, any notice, the lines (which take all spare height), then the footnote. */
.watch-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 2px solid var(--bar);
}

.watch-chat .feed {
  flex: 1;
}

.watch-foot {
  max-width: none;
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid rgb(255 255 255 / 0.15);
  font-size: 0.8125rem;
  color: var(--on-ink-muted);
}

.watch-foot a {
  color: var(--white);
}

/* The box for sending a message, under the chat lines. It keeps clear of the window's bottom
   edge on every screen: on a desktop nothing else does (a phone also gets its home-bar inset). */
.say {
  display: flex;
  gap: 8px;
  padding: 10px 12px 14px;
  border-top: 1px solid rgb(255 255 255 / 0.15);
}

.say input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  border: 2px solid rgb(255 255 255 / 0.7);
  border-radius: 2px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
}

.say input::placeholder {
  color: var(--on-ink-muted);
}

.say input:focus {
  border-color: var(--white);
  background: rgb(255 255 255 / 0.08);
}

/* The line under the box belongs to it: no rule between them, and the box's own space above it. */
.say:not([hidden]) + .watch-foot {
  padding-top: 0;
  border-top: 0;
}

.safe-lines .note {
  font-size: 0.8125rem;
  color: var(--on-ink-muted);
}

/* A line a moderator removed on the channel. */
.safe-lines .gone {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--on-ink-dim);
}

/* The rule above the chat box belongs to the room's rules when they are shown. */
.room:not([hidden]) + .say {
  border-top: 0;
}

/* The banner's own action, such as taking a paused chat's place back. */
.safe-banner button {
  padding: 2px 10px;
  border: 2px solid var(--bar);
  border-radius: 2px;
  background: var(--bar);
  color: var(--white);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

/* The "i" beside the chat box. It is the bottom-right corner of a panel that is clipped down
   to the size of a button; on hover, focus or a tap the clip opens and the square grows into
   the whole note. One shape, so it reads as the button itself unfolding. */
.morph {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
}

.morph-btn {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: help;
}

.morph-panel {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 0;
  display: block;
  width: 252px;
  padding: 10px 12px 12px;
  border: 2px solid rgb(255 255 255 / 0.7);
  border-radius: 2px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  clip-path: inset(calc(100% - 38px) 0 0 calc(100% - 38px));
  transition: clip-path 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.morph-tip {
  display: block;
  opacity: 0;
  transition: opacity 0.12s;
}

/* The closed button's own face: the letter, and the two edges the clipped panel does not have. */
.morph-i {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid rgb(255 255 255 / 0.7);
  border-radius: 2px;
  background: var(--ink);
  font-weight: 800;
  font-style: italic;
  transition: opacity 0.12s;
}

.morph-btn:focus-visible .morph-panel,
.morph-btn[aria-expanded='true'] .morph-panel {
  clip-path: inset(0);
}

.morph-btn:focus-visible .morph-tip,
.morph-btn[aria-expanded='true'] .morph-tip {
  opacity: 1;
  transition-delay: 0.12s;
}

.morph-btn:focus-visible .morph-i,
.morph-btn[aria-expanded='true'] .morph-i {
  opacity: 0;
}

/* Opening on hover is for a mouse only. A touch screen keeps "hovering" over the last thing
   tapped, which left the note open after a tap anywhere else. */
@media (hover: hover) {
  .morph-btn:hover .morph-panel {
    clip-path: inset(0);
  }

  .morph-btn:hover .morph-tip {
    opacity: 1;
    transition-delay: 0.12s;
  }

  .morph-btn:hover .morph-i {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .morph-panel,
  .morph-tip,
  .morph-i {
    transition: none;
  }
}

/* Every other tooltip on the site (public/tip.js): the same panel as the "i" note, unfolding
   the same way from the corner nearest what it explains. */
.tip {
  --tip-fold: 16px;
  position: fixed;
  z-index: 60;
  max-width: 280px;
  padding: 8px 11px 9px;
  border: 2px solid rgb(255 255 255 / 0.7);
  border-radius: 2px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
  transition: clip-path 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tip[data-from='bottom-left'] {
  clip-path: inset(calc(100% - var(--tip-fold)) calc(100% - var(--tip-fold)) 0 0);
}

.tip[data-from='bottom-right'] {
  clip-path: inset(calc(100% - var(--tip-fold)) 0 0 calc(100% - var(--tip-fold)));
}

.tip[data-from='top-left'] {
  clip-path: inset(0 calc(100% - var(--tip-fold)) calc(100% - var(--tip-fold)) 0);
}

.tip[data-from='top-right'] {
  clip-path: inset(0 0 calc(100% - var(--tip-fold)) calc(100% - var(--tip-fold)));
}

.tip.open {
  clip-path: inset(0);
}

.tip-text {
  display: block;
  opacity: 0;
  transition: opacity 0.12s;
}

.tip.open .tip-text {
  opacity: 1;
  transition-delay: 0.12s;
}

/* Something with a tip says so to a mouse; the one whose tip is open is marked. */
[data-tip] {
  cursor: help;
}

[data-tip-open] {
  outline: 2px solid var(--signal);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .tip,
  .tip-text {
    transition: none;
  }
}

@media (max-width: 860px) {
  .watch-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  /* Twitch asks for a player at least 300 pixels tall. A phone held upright is too narrow for
     16:9 to reach that, so the box is taller than the picture and the player centres it.
     Wider screens in this layout keep 16:9 (56.25% of the width). */
  .watch-video {
    height: max(300px, 56.25vw);
  }

  .watch-chat {
    border-top: 2px solid var(--bar);
    border-left: 0;
  }

  .watch-back {
    display: none;
  }
}

/* A phone held sideways: the video would be taller than the screen and leave no room for the
   chat under it, so the chat goes beside the video instead. */
@media (orientation: landscape) and (max-height: 500px) {
  .watch-main {
    grid-template-columns: minmax(0, 1fr) clamp(240px, 36vw, 320px);
    grid-template-rows: minmax(0, 1fr);
  }

  .watch-video {
    height: auto;
  }

  .watch-chat {
    border-top: 0;
    border-left: 2px solid var(--bar);
  }

  .watch-foot {
    display: none;
  }
}

/* Phones and tablets, upright or sideways: less space under the chat box (the owner found it a
   bit much). The home-bar gap keeps most of itself: the bar is a thin line near the very edge. */
@media (max-width: 860px), (orientation: landscape) and (max-height: 500px) {
  body.watch {
    padding-bottom: max(0px, calc(env(safe-area-inset-bottom, 0px) - 12px));
  }

  .say {
    padding: 8px 10px 8px;
  }

  .watch-foot {
    padding: 8px 12px 6px;
  }

  .say:not([hidden]) + .watch-foot {
    padding-top: 0;
  }
}

/* iPhones zoom the whole page when a text box with type under 16px is tapped. */
@media (pointer: coarse) {
  .top-bar .text-input,
  .say input {
    font-size: 1rem;
  }
}

/* ---------- admin ---------- */

.admin table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 2px solid var(--ink);
  font-size: 0.9375rem;
}

.admin th,
.admin td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin .scroll {
  overflow-x: auto;
}

.inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.inline-form input {
  width: 6.5em;
  min-height: 36px;
  padding: 0 8px;
  border: 2px solid var(--ink);
  font: inherit;
}

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .hero-grid,
  .split,
  .panel {
    grid-template-columns: minmax(0, 1fr);
  }

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

  /* Shorter demo chat, so the box to type in is not pushed off the first screen. */
  .chat-lines {
    height: 180px;
  }

  .sorting > div + div {
    border-left: 0;
    border-top: 2px solid var(--ink);
  }

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

  .tally div:nth-child(3) {
    border-left: 0;
  }

  .tally div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .prices thead {
    display: none;
  }

  .prices tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }

  .prices th,
  .prices td {
    padding: 0;
    border: 0;
  }

  .prices td:nth-child(3),
  .prices td:nth-child(4) {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.9375rem;
  }

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

  .pass .btn {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .redact,
  .bar,
  .ring {
    animation: none;
  }
}

/* ------------------------------------------------------------------ YouTube
   YouTube's branding rules: its icon is shown exactly as YouTube provides it (no recolouring, no
   letter mark like Twitch's T and Kick's K), on a plain background, at no less than the brand
   pack's minimum size, and always inside a link to YouTube content. Nothing is ever placed over
   YouTube's player: messages about the stream take the player's place instead. */
:root {
  --yt-icon-h: 20px;
}

.yt-icon {
  display: inline-block;
  flex: none;
  width: auto;
  height: var(--yt-icon-h);
  vertical-align: middle;
}

/* In the search list, at the right of a YouTube channel's row. */
.chan-list a .yt-icon {
  margin-left: auto;
}

.chan-list a .yt-icon ~ .live {
  margin-left: 8px;
}

/* YouTube's icon keeps its own shape wherever it sits: these outrank the picture rules of the
   search list (32 px squares), the recent and starred channels (24 px squares) and the Streams
   previews (stretched to fill the preview). */
.chan-list img.yt-icon,
.recent img.yt-icon,
.stream .where img.yt-icon {
  width: auto;
  height: var(--yt-icon-h);
  object-fit: contain;
}

.recent img.yt-icon {
  height: 16px;
  margin-left: 0;
}

.stream .where img.yt-icon {
  display: block;
  height: 16px;
}

/* On a Streams preview: YouTube's icon on a plain white tile, in the corner the site marks use. */
.stream .where.yt-chip {
  display: grid;
  place-items: center;
  height: calc(0.8125rem * 1.55 + 4px);
  padding: 0 6px;
  background: #fff;
}

/* What YouTube's player box shows when no player is in it: not live, cannot be played here, or
   waiting for the visitor to agree to YouTube's cookies. */
.yt-video {
  position: relative;
}

.yt-card {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
  height: 100%;
  min-height: 220px;
  padding: 24px clamp(16px, 5vw, 48px);
  background: var(--ink);
  color: var(--white);
}

.yt-card[hidden] {
  display: none;
}

.yt-card p {
  max-width: 54ch;
  margin: 0;
}

.yt-card a {
  color: var(--signal);
}

.yt-card .btn {
  color: var(--bar);
}

.yt-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.yt-card-hint {
  color: var(--on-ink-dim);
  font-size: 0.8125rem;
}

/* YouTube's paid messages, in the site's own colours (YouTube's are its own), hotter as the tier rises. */
.nt-paid {
  --nt: var(--signal);
}

.nt-paid.tier-1,
.nt-paid.tier-2 {
  --nt: var(--accent-soft);
}

.nt-paid.tier-3,
.nt-paid.tier-4 {
  --nt: var(--signal);
}

.nt-paid.tier-5,
.nt-paid.tier-6 {
  --nt: #ff9f43;
}

.nt-paid.tier-7 {
  --nt: #ff6b6b;
}

/* A YouTube Jewels gift: its own picture in place of the notice's glyph. */
.nt-av.nt-gift {
  object-fit: contain;
  background: transparent;
}

/* YouTube's poll, pinned at the top of the chat while it runs. */
.pin-card.nt-poll {
  --nt: var(--accent-soft);
  grid-template-columns: minmax(0, 1fr);
}

.poll-options {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.poll-options li {
  padding: 4px 8px;
  border: 1px solid rgb(255 255 255 / 0.25);
}

.poll-note {
  margin-top: 4px;
  color: var(--on-ink-dim);
  font-size: 0.75rem;
}

/* Connect YouTube: a YouTube button (Google's rule for asking for YouTube permissions). */
.btn-yt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-yt .yt-icon {
  padding: 2px;
  border-radius: 2px;
  background: #fff;
}
