/* VTuber Smash site styles.
   Concept: a moonlit stream scene. The site dresses like a VTuber's stream overlay set in the
   game's first stage. One dark theme by choice: no light theme and no theme toggle.
   Every class is documented with an HTML snippet in STYLEGUIDE.md.

   Sections
    1 reset              2 tokens             3 base elements       4 layout helpers
    5 skip link          6 header and nav     7 footer and contact lists
    8 buttons            9 pills and badges   10 panels and scene frames
   11 character frames  12 rows and posts    13 tables             14 forms
   15 notices           16 filters and tabs  17 vote, crumbs, empty states
   18 toasts and dialogs                     19 account chip and panel
   20 page head and home hero motion         21 prose              22 signal colours
   23 reduced motion and forced colours */

/* 1. Reset ------------------------------------------------------------------ */

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

* { margin: 0; }

[hidden] { display: none !important; }

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }

ul, ol { padding-left: 1.4rem; }
ul[role="list"], ol[role="list"] { list-style: none; padding-left: 0; }

table { border-collapse: collapse; border-spacing: 0; }

p, li, dt, dd, h1, h2, h3, h4, h5, h6, figcaption, blockquote, td, th { overflow-wrap: break-word; }

/* 2. Tokens ----------------------------------------------------------------- */

:root {
  color-scheme: dark;

  /* Ground, text and accents */
  --night: #120d22;      /* page ground */
  --dusk: #1c1533;       /* raised panels */
  --haze: #2d2452;       /* borders, rules */
  --moon: #f4f0ff;       /* text */
  --mist: #b9b0d6;       /* secondary text */
  --sakura: #ff8fc8;     /* the one accent: primary actions, links, focus rings */
  --lantern: #ffc061;    /* rare warm highlight: NEW badges, warnings */
  --firefly: #5fe8b4;    /* status: open, fixed, success */
  --ember: #ff6577;      /* errors, critical */
  --struct: #0b0714;     /* the structure line */

  /* Signal colours, one per playable VTuber (set on a frame through .sig-<name>) */
  --sig-rosette: #ff8fc8;
  --sig-lilac: #c9a7ff;
  --sig-marina: #46d6c8;
  --sig-aurelia: #ffd45c;
  --sig-ren: #9fd8ff;
  --sig-noa: #7fffd0;
  --sig-briar: #ff7fa8;
  --sig-jet: #ff9a3d;
  --signal: var(--sakura);

  /* Mixed from the tokens above: plain values here, mixed ones below where color-mix() works */
  --header-bg: var(--dusk);
  --footer-bg: var(--struct);
  --strip-bg: var(--haze);
  --shade: rgba(11, 7, 20, 0.78); /* --struct at 78% */

  /* Type */
  --font-display: "Dela Gothic One", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-body: "M PLUS 2", "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
  --font-utility: "DotGothic16", ui-monospace, monospace;
  --step--2: 0.8125rem;
  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.25rem;
  --step-h1: clamp(2.4rem, 6vw, 4rem);
  --measure: 65ch;

  /* Shape and space */
  --radius-control: 6px;
  --radius-panel: 10px;
  --content-max: 1180px;
  --header-h: 4rem;
  --edge-glow: 55%;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --header-bg: color-mix(in srgb, var(--dusk) 96%, transparent);
    --footer-bg: color-mix(in srgb, var(--struct) 55%, var(--night));
    --strip-bg: color-mix(in srgb, var(--haze) 45%, var(--dusk));
    --shade: color-mix(in srgb, var(--struct) 78%, transparent);
  }
}

/* Older browsers don't pass custom properties to ::backdrop, so it gets its own. */
::backdrop { --shade: rgba(11, 7, 20, 0.78); }

/* 3. Base elements ---------------------------------------------------------- */

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--night);
  color: var(--moon);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The band behind a phone's status bar, in the header's colour. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top, 0px);
  background: var(--header-bg);
  z-index: 10;
  pointer-events: none;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

#app > main { flex: 1 0 auto; }

[id] { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 1rem); }

h1, h2, h3, h4, h5, h6 { color: var(--moon); line-height: 1.15; text-wrap: balance; }

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-h1);
  line-height: 1.05;
  letter-spacing: 0.005em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(var(--step-2), 1.1rem + 2vw, var(--step-3));
  letter-spacing: 0.005em;
}

h3 { font-family: var(--font-body); font-weight: 800; font-size: var(--step-1); line-height: 1.3; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 700; font-size: var(--step-0); line-height: 1.35; }

p { max-width: var(--measure); text-wrap: pretty; }

a {
  color: var(--sakura);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }

strong, b { font-weight: 700; }
small { font-size: var(--step--2); }
hr { border: 0; border-top: 1px solid var(--haze); }

code, pre, samp { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }
pre { overflow-x: auto; padding: 0.85rem 1rem; background: var(--struct); border: 1px solid var(--haze); border-radius: var(--radius-control); }

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.02rem 0.4rem;
  border: 1px solid var(--haze);
  border-bottom-width: 3px;
  border-radius: 5px;
  background: var(--night);
  color: var(--moon);
  font-family: var(--font-body);
  font-size: 0.875em;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}

::selection { background: color-mix(in srgb, var(--sakura) 38%, transparent); color: var(--moon); }

:focus-visible { outline: 3px solid var(--sakura); outline-offset: 3px; }
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

/* 4. Layout helpers --------------------------------------------------------- */

/* The one side gutter: on .wrap, the inner wrapper of every full-width band. */
.wrap {
  width: 100%;
  max-width: calc(var(--content-max) + 32px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.band { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band-tight { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.band-raised { background: var(--dusk); border-block: 1px solid var(--haze); }

.stack { display: flex; flex-direction: column; gap: var(--stack-gap, 1rem); }
.stack-sm { --stack-gap: 0.5rem; }
.stack-lg { --stack-gap: 2rem; }
.stack > *, .cluster > *, .grid > *, .split > * { min-width: 0; }

.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, 0.75rem); }
/* Buttons with the edge look need room for their rings: use .actions around them. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }

.grid { display: grid; gap: var(--grid-gap, 1.5rem); grid-template-columns: minmax(0, 1fr); }
.grid-frames { --grid-gap: 2rem; }
@media (min-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.split { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}
.section-head > * { min-width: 0; }

.measure { max-width: var(--measure); }
.center { text-align: center; }
.center > p { margin-inline: auto; }
.muted { color: var(--mist); }
.small { font-size: var(--step--1); }
.tiny { font-size: var(--step--2); }

.label {
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}

.lead { font-size: var(--step-1); line-height: 1.55; color: var(--moon); max-width: 58ch; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; font-size: var(--step--2); color: var(--mist); }
.meta > * + *::before { content: "\00B7"; content: "\00B7" / ""; margin-right: 0.5rem; color: var(--mist); }

.user-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* 5. Skip link -------------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-control);
  background: var(--sakura);
  color: var(--struct);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip-link:focus,
.skip-link:focus-visible { transform: none; outline-color: var(--moon); }

/* 6. Header and nav: a stream title bar ------------------------------------ */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--haze);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-block: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.25rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--moon);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--moon); text-decoration: none; }

.wordmark-dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--sakura);
  box-shadow: 0 0 0 2px var(--struct), 0 0 10px 1px color-mix(in srgb, var(--sakura) 70%, transparent);
}

.header-pill { flex: none; }

.site-nav { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }

.nav-list { display: flex; align-items: center; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.7rem;
  border-radius: var(--radius-control);
  color: var(--mist);
  font-size: var(--step--1);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.nav-list a:hover { color: var(--moon); background: color-mix(in srgb, var(--haze) 60%, transparent); }
.nav-list a[aria-current="page"] { color: var(--moon); }
.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.3rem;
  height: 2px;
  border-radius: 2px;
  background: var(--sakura);
  box-shadow: 0 0 8px var(--sakura);
}

.menu-button {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin-left: auto;
  padding: 0 0.9rem;
  border: 1px solid var(--haze);
  border-radius: var(--radius-control);
  background: var(--night);
  color: var(--moon);
  font-size: var(--step--1);
  font-weight: 700;
}
.menu-button:hover { border-color: var(--sakura); }

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}
.menu-icon { position: relative; }
.menu-icon::before,
.menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-button[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-button[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

.account-slot { position: relative; flex: none; padding-left: 0.75rem; border-left: 1px solid var(--haze); }

@media (min-width: 900px) and (max-width: 1099.98px) {
  .site-header .header-pill { display: none; }
}

@media (max-width: 899.98px) {
  /* Without script the nav stays visible under the wordmark. */
  #app:not(.js) .header-inner { flex-wrap: wrap; }
  #app:not(.js) .site-nav { width: 100%; margin-left: 0; flex-wrap: wrap; padding-bottom: 0.5rem; }
  #app:not(.js) .nav-list { flex-wrap: wrap; }
  #app:not(.js) .account-slot { display: none; }

  .js .menu-button { display: inline-flex; }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    max-height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    padding: 0.25rem max(16px, env(safe-area-inset-right, 0px)) 1.25rem max(16px, env(safe-area-inset-left, 0px));
    background: var(--dusk);
    border-bottom: 1px solid var(--haze);
    box-shadow: 0 18px 40px var(--shade);
  }
  .js .site-header.is-open .site-nav { display: flex; }

  .js .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav-list a {
    display: flex;
    min-height: 3rem;
    padding: 0 0.25rem;
    border-bottom: 1px solid var(--haze);
    border-radius: 0;
    font-size: var(--step-0);
  }
  .js .nav-list a[aria-current="page"]::after {
    left: auto;
    right: 0.35rem;
    top: 50%;
    bottom: auto;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    transform: translateY(-50%);
  }
  .js .account-slot { padding: 1rem 0 0; border-left: 0; }
}

@media (max-width: 599.98px) {
  .site-header .header-pill { display: none; }
}

/* 7. Footer and contact lists ---------------------------------------------- */

.site-footer {
  margin-top: auto;
  padding-block: 2.75rem calc(2rem + env(safe-area-inset-bottom, 0px));
  background: var(--footer-bg);
  border-top: 1px solid var(--haze);
  color: var(--mist);
  font-size: var(--step--1);
}

.footer-inner { display: grid; gap: 2rem; }
.footer-studio { color: var(--moon); max-width: 62ch; }

.footer-heading {
  margin-bottom: 0.85rem;
  font-family: var(--font-body);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
}

.addr-list { display: grid; gap: 1.25rem 2rem; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) {
  .addr-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.addr { display: grid; gap: 0.4rem; min-width: 0; }
.addr-label { font-size: var(--step--2); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mist); }
.addr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; min-width: 0; }
/* An address, for when the site lists one (STYLEGUIDE.md, section 7): selectable text, then
   Copy and Email. No page uses it yet. */
.addr-text {
  max-width: 100%;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--haze);
  border-radius: var(--radius-control);
  background: var(--night);
  color: var(--moon);
  font-size: var(--step--1);
  font-weight: 700;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}
.addr-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.addr-mail { font-size: var(--step--1); }
#app:not(.js) .copy-btn { display: none; }
@media (max-width: 479.98px) {
  .addr-text { flex-basis: 100%; }
}

.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; list-style: none; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--moon); }
.footer-nav a[aria-current="page"] { color: var(--sakura); font-weight: 700; }
.footer-copy { font-size: var(--step--2); color: var(--mist); }

/* 8. Buttons ---------------------------------------------------------------- */

/* The game's edge look: structure line, blended middle line, signal line, soft glow. */
.edge,
.btn-primary {
  box-shadow:
    0 0 0 2px var(--struct),
    0 0 0 4px color-mix(in srgb, var(--struct) 50%, var(--signal)),
    0 0 0 6px var(--signal),
    0 0 22px 2px color-mix(in srgb, var(--signal) var(--edge-glow), transparent);
}

.btn {
  --signal: var(--sakura);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--haze);
  border-radius: var(--radius-control);
  background: var(--dusk);
  color: var(--moon);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn:hover { border-color: var(--mist); color: var(--moon); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  --signal: var(--sakura);
  border-color: transparent;
  background: var(--sakura);
  color: var(--struct);
}
.btn-primary:hover {
  --edge-glow: 85%;
  border-color: transparent;
  background: color-mix(in srgb, var(--sakura) 86%, var(--moon));
  color: var(--struct);
}
.btn-primary:focus-visible { outline-color: var(--moon); outline-offset: 9px; }
.btn-primary:disabled,
.btn-primary[aria-disabled="true"] { --edge-glow: 0%; }

.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: var(--sakura); background: color-mix(in srgb, var(--sakura) 8%, transparent); }

.btn-danger {
  background: transparent;
  border-color: color-mix(in srgb, var(--ember) 60%, var(--haze));
  color: var(--ember);
}
.btn-danger:hover { border-color: var(--ember); background: color-mix(in srgb, var(--ember) 12%, transparent); color: var(--ember); }

.btn-small { min-height: 2.25rem; padding: 0.3rem 0.75rem; font-size: var(--step--2); }
.btn-block { width: 100%; }

.btn-link {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sakura);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* 9. Pills (overlay status labels) and badges (content labels) ------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem 0.15rem;
  border: 1px solid var(--haze);
  border-radius: 4px;
  background: color-mix(in srgb, var(--haze) 55%, transparent);
  color: var(--mist);
  font-family: var(--font-utility);
  font-size: var(--step--2);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-dot::before,
.pill-dev::before {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.pill-accent,
.pill-dev { color: var(--sakura); border-color: color-mix(in srgb, var(--sakura) 55%, transparent); background: color-mix(in srgb, var(--sakura) 10%, transparent); }
.pill-ok { color: var(--firefly); border-color: color-mix(in srgb, var(--firefly) 50%, transparent); background: color-mix(in srgb, var(--firefly) 10%, transparent); }
.pill-warn { color: var(--lantern); border-color: color-mix(in srgb, var(--lantern) 55%, transparent); background: color-mix(in srgb, var(--lantern) 10%, transparent); }
.pill-error { color: var(--ember); border-color: color-mix(in srgb, var(--ember) 55%, transparent); background: color-mix(in srgb, var(--ember) 10%, transparent); }
.pill-new { color: var(--struct); border-color: var(--lantern); background: var(--lantern); }

.badge {
  --tone: var(--mist);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid color-mix(in srgb, var(--tone) 60%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  color: var(--tone);
  font-size: var(--step--2);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-solid { border-color: var(--tone); background: var(--tone); color: var(--struct); }
.badge-example { --tone: var(--lantern); border-style: dashed; }
.badge-new { --tone: var(--lantern); border-color: var(--tone); background: var(--tone); color: var(--struct); }
.badge-role { --tone: var(--sakura); }
.badge-pinned, .badge-locked { --tone: var(--mist); }

.badge-status[data-status="open"] { --tone: var(--firefly); }
.badge-status[data-status="planned"] { --tone: var(--lantern); }
.badge-status[data-status="in-progress"] { --tone: var(--sakura); border-color: var(--tone); background: var(--tone); color: var(--struct); }
.badge-status[data-status="done"] { --tone: var(--firefly); border-color: var(--tone); background: var(--tone); color: var(--struct); }
.badge-status[data-status="declined"] { --tone: var(--mist); }
.badge-status[data-status="new"] { --tone: var(--lantern); }
.badge-status[data-status="confirmed"] { --tone: var(--sakura); }
.badge-status[data-status="fixing"] { --tone: var(--sakura); border-color: var(--tone); background: var(--tone); color: var(--struct); }
.badge-status[data-status="fixed"] { --tone: var(--firefly); border-color: var(--tone); background: var(--tone); color: var(--struct); }
.badge-status[data-status="wont-fix"],
.badge-status[data-status="duplicate"] { --tone: var(--mist); }

.badge-sev[data-severity="crash"],
.badge-sev[data-severity="blocker"] { --tone: var(--ember); border-color: var(--tone); background: var(--tone); color: var(--struct); }
.badge-sev[data-severity="major"] { --tone: var(--ember); }
.badge-sev[data-severity="minor"] { --tone: var(--lantern); }
.badge-sev[data-severity="cosmetic"] { --tone: var(--mist); }

/* 10. Panels (OBS-style docks) and scene frames ---------------------------- */

.panel {
  min-width: 0;
  background: var(--dusk);
  border: 1px solid var(--haze);
  border-radius: var(--radius-panel);
}

.panel-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  min-height: 2.25rem;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid var(--haze);
  border-radius: calc(var(--radius-panel) - 1px) calc(var(--radius-panel) - 1px) 0 0;
  background: var(--strip-bg);
  color: var(--mist);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.panel-title :is(h2, h3, h4, p) {
  margin: 0;
  max-width: none;
  font-family: var(--font-body);
  font-size: inherit;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--moon);
}

.panel-body { padding: 1rem 1.1rem 1.15rem; }
.panel-body > * + * { margin-top: 0.75rem; }
.panel-flush > .panel-body { padding: 0; }
.panel-flush > .panel-body > .rows { border: 0; border-radius: 0 0 calc(var(--radius-panel) - 1px) calc(var(--radius-panel) - 1px); }

.scene { min-width: 0; background: var(--night); border: 1px solid var(--haze); border-radius: 0; }

.scene-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2rem;
  padding: 0.3rem 0.75rem;
  background: var(--struct);
  border-bottom: 1px solid var(--haze);
  color: var(--mist);
  font-family: var(--font-utility);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scene-bar::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--sakura);
  box-shadow: 0 0 6px var(--sakura);
}
.scene-title { margin: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--moon); }
.scene-bar > :last-child:not(.scene-title) { margin-left: auto; }
.scene-body { position: relative; }
.scene-body > img { width: 100%; }
.scene-caption { padding: 0.6rem 0.8rem; border-top: 1px solid var(--haze); color: var(--mist); font-size: var(--step--1); }

/* Lower thirds: the name plate of a stream overlay. */
.lower-third {
  position: relative;
  display: grid;
  gap: 0.05rem;
  align-self: flex-start;
  justify-self: start;
  max-width: 100%;
  padding: 0.45rem 1.5rem 0.5rem 0.8rem;
  border-left: 4px solid var(--signal);
  background: color-mix(in srgb, var(--struct) 88%, transparent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.9rem) 100%, 0 100%);
}
.lower-third-name { font-size: var(--step-1); font-weight: 800; line-height: 1.2; color: var(--moon); }
.lower-third-sub { font-size: var(--step--2); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mist); }

/* 11. Character frames ------------------------------------------------------ */

.frame {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  border-radius: 0;
  background:
    radial-gradient(90% 60% at 50% 92%, color-mix(in srgb, var(--signal) 24%, transparent), transparent 72%),
    linear-gradient(180deg, var(--dusk), var(--night));
  color: var(--moon);
  text-decoration: none;
  transition: box-shadow 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}
a.frame:hover { color: var(--moon); text-decoration: none; }
.frame:focus-visible { outline-color: var(--moon); outline-offset: 9px; }

.frame-art { display: block; aspect-ratio: 5 / 4; padding: 0.9rem 0.9rem 1.4rem; }
.frame-art img { width: 100%; height: 100%; object-fit: contain; }
.frame .lower-third { align-self: stretch; margin: -1.6rem 0.75rem 0.9rem; }

@media (hover: hover) {
  .frame:hover { --edge-glow: 85%; }
}

/* 12. Rows (threads, requests, bugs) and posts ------------------------------ */

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--dusk);
  border: 1px solid var(--haze);
  border-radius: var(--radius-panel);
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 1rem;
  max-width: none;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--haze);
}
.row:first-child { border-top: 0; }
.row:hover,
.row:focus-within { background: color-mix(in srgb, var(--haze) 35%, transparent); }
.row-vote { grid-template-columns: auto minmax(0, 1fr) auto; }

.row-main { display: grid; gap: 0.2rem; min-width: 0; }
/* A title of one long unbroken word must wrap, not widen the row. */
.row-main > * { min-width: 0; }
.row-title { margin: 0; font-family: var(--font-body); font-size: var(--step-0); font-weight: 700; line-height: 1.35; }
.row-title,
.row-excerpt { overflow-wrap: anywhere; }
.row-title a { color: var(--moon); text-decoration: none; }
.row-title a:hover { color: var(--sakura); text-decoration: underline; }
/* The title link covers the whole row; other controls sit above it. */
.row-title a::after { content: ""; position: absolute; inset: 0; }
.row .vote,
.row button,
.row-side a,
.row-meta a { position: relative; z-index: 1; }

.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; font-size: var(--step--2); color: var(--mist); }
.row-meta > * + *::before { content: "\00B7"; content: "\00B7" / ""; margin-right: 0.5rem; }
.row-excerpt {
  display: -webkit-box;
  overflow: hidden;
  max-width: none;
  color: var(--mist);
  font-size: var(--step--1);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.row-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.4rem; }

@media (max-width: 639.98px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row-vote { grid-template-columns: auto minmax(0, 1fr); }
  .row-side { justify-content: flex-start; }
  .row-vote .row-side { grid-column: 2; }
}

.posts { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }

.post { min-width: 0; background: var(--dusk); border: 1px solid var(--haze); border-radius: var(--radius-panel); }
.post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--haze);
  border-radius: calc(var(--radius-panel) - 1px) calc(var(--radius-panel) - 1px) 0 0;
  background: var(--strip-bg);
  font-size: var(--step--1);
}
.post-body { padding: 0.9rem 1rem 1rem; }
.post-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem; padding: 0 1rem 0.8rem; }

.author { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-weight: 700; color: var(--moon); }
.author-name { overflow-wrap: anywhere; }

.time {
  font-family: var(--font-utility);
  font-size: var(--step--2);
  letter-spacing: 0.04em;
  color: var(--mist);
  white-space: nowrap;
}

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4rem 1rem; margin: 0; }
.kv dt { color: var(--mist); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 0.15rem; }
.kv dd { margin: 0; min-width: 0; }

/* 13. Tables ---------------------------------------------------------------- */

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  background: var(--dusk);
  border: 1px solid var(--haze);
  border-radius: var(--radius-panel);
}
.table-wrap table { width: 100%; font-size: var(--step--1); }
.table-wrap caption {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--haze);
  text-align: left;
  font-weight: 700;
  color: var(--moon);
}
.table-wrap th,
.table-wrap td { padding: 0.6rem 0.9rem; border-top: 1px solid var(--haze); text-align: left; vertical-align: top; }
.table-wrap thead th {
  border-top: 0;
  background: var(--strip-bg);
  color: var(--mist);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table-wrap tbody th { color: var(--moon); font-weight: 700; }

/* 14. Forms ----------------------------------------------------------------- */

.form { display: grid; gap: 1.25rem; max-width: 46rem; }

.field { display: grid; gap: 0.4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label,
.field > legend,
.field-label { color: var(--moon); font-size: var(--step--1); font-weight: 700; line-height: 1.4; }
.field > legend { margin-bottom: 0.4rem; padding: 0; }
.optional { color: var(--mist); font-weight: 500; }

input:not([type]),
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--haze);
  border-radius: var(--radius-control);
  background: var(--night);
  color: var(--moon);
  font-size: var(--step-0);
  line-height: 1.45;
  transition: border-color 0.15s ease;
}
input:not([type]):hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="search"]:hover,
input[type="url"]:hover,
select:hover,
textarea:hover { border-color: color-mix(in srgb, var(--mist) 55%, var(--haze)); }

input:focus-visible,
select:focus-visible,
textarea:focus-visible { border-color: var(--sakura); outline-offset: 1px; }

textarea { min-height: 9rem; resize: vertical; }
::placeholder { color: color-mix(in srgb, var(--mist) 85%, transparent); opacity: 1; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--mist) 50%),
    linear-gradient(135deg, var(--mist) 50%, transparent 50%);
  background-position: calc(100% - 1.2rem) 55%, calc(100% - 0.85rem) 55%;
  background-size: 0.36rem 0.36rem;
  background-repeat: no-repeat;
}
select option { background: var(--dusk); color: var(--moon); }

[aria-invalid="true"] { border-color: var(--ember) !important; }

.help { margin: 0; color: var(--mist); font-size: var(--step--2); }
.field-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 0.75rem; }
.counter {
  margin-left: auto;
  color: var(--mist);
  font-family: var(--font-utility);
  font-size: var(--step--2);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.counter.is-near { color: var(--lantern); }
.counter.is-full { color: var(--ember); }
.field-error { margin: 0; color: var(--ember); font-size: var(--step--1); font-weight: 700; }

.check-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0.65rem; }
.check-row input[type="checkbox"],
.check-row input[type="radio"] { width: 1.25rem; height: 1.25rem; margin: 0.22rem 0 0; accent-color: var(--sakura); }
.check-row label { color: var(--moon); font-weight: 500; }
.choice-list { display: grid; gap: 0.6rem; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; padding-top: 0.5rem; }
.form-status:empty { display: none; }

/* 15. Notices and the preview banner --------------------------------------- */

.notice {
  --tone: var(--mist);
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--haze);
  border-left: 4px solid var(--tone);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--tone) 8%, var(--dusk));
  color: var(--moon);
}
.notice-title { font-weight: 800; color: var(--moon); }
.notice-info { --tone: var(--mist); }
.notice-warn { --tone: var(--lantern); }
.notice-warn .notice-title { color: var(--lantern); }
.notice-error { --tone: var(--ember); }
.notice-error .notice-title { color: var(--ember); }
.notice-success { --tone: var(--firefly); }
.notice-success .notice-title { color: var(--firefly); }

.preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  padding: 0.7rem 1rem;
  border: 1px dashed color-mix(in srgb, var(--lantern) 65%, transparent);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--lantern) 7%, var(--night));
  color: var(--moon);
  font-size: var(--step--1);
}
.preview-banner p { margin: 0; }

/* 16. Segmented filters and tabs ------------------------------------------- */

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  align-self: flex-start;
  justify-self: start;
  gap: 2px;
  max-width: 100%;
  padding: 2px;
  border: 1px solid var(--haze);
  border-radius: var(--radius-control);
  background: var(--night);
}
.segmented button {
  min-height: 2.25rem;
  padding: 0.3rem 0.8rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--mist);
  font-size: var(--step--1);
  font-weight: 700;
}
.segmented button:hover { color: var(--moon); background: color-mix(in srgb, var(--haze) 50%, transparent); }
.segmented button[aria-pressed="true"] { background: var(--haze); color: var(--moon); box-shadow: inset 0 -2px 0 var(--sakura); }

.tabs {
  display: flex;
  gap: 0.25rem;
  max-width: 100%;
  overflow-x: auto;
  border-bottom: 1px solid var(--haze);
  scrollbar-width: thin;
}
.tab {
  position: relative;
  flex: none;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: var(--radius-control) var(--radius-control) 0 0;
  background: transparent;
  color: var(--mist);
  font-size: var(--step--1);
  font-weight: 700;
  white-space: nowrap;
}
.tab:hover { color: var(--moon); }
.tab[aria-selected="true"] { color: var(--moon); }
.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0;
  height: 2px;
  background: var(--sakura);
  box-shadow: 0 0 8px var(--sakura);
}
.tab:focus-visible { outline-offset: -3px; }
.tab-panel { padding-top: 1.25rem; }

/* 17. Vote button, breadcrumbs, empty states ------------------------------- */

.vote {
  position: relative;
  display: inline-grid;
  justify-items: center;
  align-content: center;
  gap: 0.2rem;
  width: 3.5rem;
  min-height: 3.5rem;
  padding: 0.35rem 0.25rem;
  border: 1px solid var(--haze);
  border-radius: var(--radius-control);
  background: var(--night);
  color: var(--mist);
  font-weight: 700;
}
.vote-arrow {
  width: 0;
  height: 0;
  border-left: 0.45rem solid transparent;
  border-right: 0.45rem solid transparent;
  border-bottom: 0.55rem solid currentColor;
}
.vote-count { color: var(--moon); font-family: var(--font-utility); font-size: var(--step--1); line-height: 1; }
.vote:hover { border-color: var(--sakura); color: var(--sakura); }
.vote[aria-pressed="true"] {
  border-color: var(--sakura);
  background: color-mix(in srgb, var(--sakura) 14%, var(--night));
  box-shadow: inset 0 0 0 1px var(--sakura);
  color: var(--sakura);
}
.vote[aria-busy="true"] { cursor: progress; opacity: 0.7; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--mist);
  font-size: var(--step--1);
}
.crumbs li { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; max-width: 100%; }
.crumbs li + li::before { content: "/"; content: "/" / ""; color: var(--mist); }
.crumbs a { color: var(--mist); }
.crumbs a:hover { color: var(--moon); }
.crumbs [aria-current="page"] { min-width: 0; overflow: hidden; color: var(--moon); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.empty {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 2.25rem 1.25rem;
  border: 1px dashed var(--haze);
  border-radius: var(--radius-panel);
  color: var(--mist);
  text-align: center;
}
/* Centred grid items size to their content: a long unbroken search word must wrap instead. */
.empty > * { max-width: 100%; overflow-wrap: anywhere; }
.empty > p { max-width: min(100%, var(--measure)); margin-inline: auto; }
.empty-title { color: var(--moon); font-size: var(--step-1); font-weight: 800; }
.empty .actions { justify-content: center; padding-top: 0.5rem; }

/* 18. Toasts and dialogs ---------------------------------------------------- */

.toasts {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: grid;
  gap: 0.6rem;
  width: min(24rem, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  --tone: var(--mist);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.6rem 0.7rem 1rem;
  border: 1px solid var(--haze);
  border-left: 4px solid var(--tone);
  border-radius: var(--radius-control);
  background: var(--dusk);
  color: var(--moon);
  box-shadow: 0 12px 30px var(--shade);
  font-size: var(--step--1);
  pointer-events: auto;
}
.toast p { flex: 1; min-width: 0; margin: 0; padding-top: 0.15rem; }
.toast-success { --tone: var(--firefly); }
.toast-error { --tone: var(--ember); }
.toast-warn { --tone: var(--lantern); }
.toast-close {
  flex: none;
  min-height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--mist);
  font-size: var(--step--2);
  font-weight: 700;
}
.toast-close:hover { border-color: var(--haze); color: var(--moon); }
@media (max-width: 639.98px) {
  .toasts { left: max(16px, env(safe-area-inset-left, 0px)); width: auto; }
}

.dialog {
  width: min(30rem, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--haze);
  border-radius: var(--radius-panel);
  background: var(--dusk);
  color: var(--moon);
  box-shadow: 0 30px 80px var(--shade);
}
.dialog::backdrop { background: var(--shade); }
.dialog.dialog-fallback { position: fixed; inset: 0; z-index: 80; }
.dialog-inner { display: grid; gap: 1rem; padding: 1.35rem 1.25rem 1.3rem; }
.dialog-title { font-size: var(--step-2); }
.dialog-body { display: grid; gap: 0.75rem; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; padding-top: 0.25rem; }

/* 19. Account chip and panel ------------------------------------------------ */

.me-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 14rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--haze);
  border-radius: var(--radius-control);
  background: var(--night);
  color: var(--moon);
  font-size: var(--step--1);
  font-weight: 700;
}
.me-chip:hover { border-color: var(--sakura); }
.me-chip-dot { flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--mist); }
.me-chip.is-signed-in .me-chip-dot { background: var(--firefly); box-shadow: 0 0 8px var(--firefly); }
.me-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The nav row is tightest from 900 to 1200px: a long name shortens (the full name stays in
   the chip's label and the account panel). */
@media (min-width: 900px) and (max-width: 1199.98px) {
  .me-chip { max-width: 7.5rem; }
}

.account-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  z-index: 30;
  width: min(23rem, calc(100vw - 32px));
  padding: 1rem;
  border: 1px solid var(--haze);
  border-radius: var(--radius-panel);
  background: var(--dusk);
  box-shadow: 0 18px 50px var(--shade);
}
@media (max-width: 899.98px) {
  .account-panel { position: static; width: auto; margin-top: 0.75rem; box-shadow: none; }
}

.account-box { display: grid; gap: 0.85rem; }
.account-box .form { gap: 0.85rem; }
.account-note { color: var(--mist); font-size: var(--step--1); }
.provider-list { display: grid; gap: 0.6rem; }

/* 20. Page head and the home hero's motion --------------------------------- */

.page-head {
  position: relative;
  padding-block: clamp(2.75rem, 8vw, 5rem) clamp(2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--haze);
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--night) 80%, transparent) 0%,
      color-mix(in srgb, var(--night) 88%, transparent) 70%,
      var(--night) 100%),
    url("../stage/stage_background.webp") center 30% / cover no-repeat var(--night);
}
.page-head .wrap { display: grid; gap: 0.9rem; }
.page-head .wrap > * { min-width: 0; }
.page-head h1 { max-width: 20ch; text-shadow: 0 2px 0 var(--struct); }

/* Home hero only: the VTubers settle onto the platform with a short stagger
   (.settle with --i: 0, 1, 2 ...) and their glow breathes (.breathe on the image).
   Both start fully visible and are off under prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .settle { animation: vts-settle 0.75s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 120ms); }
  .breathe { animation: vts-breathe 5.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -650ms); }
}
@keyframes vts-settle {
  from { transform: translateY(-16px); }
  to { transform: none; }
}
@keyframes vts-breathe {
  0%, 100% { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--signal) 40%, transparent)); }
  50% { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--signal) 75%, transparent)); }
}

/* 21. Prose (long text pages) ---------------------------------------------- */

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2.5rem; font-size: var(--step-2); }
.prose h3 { margin-top: 1.75rem; }
.prose ul,
.prose ol { display: grid; gap: 0.4rem; padding-left: 1.4rem; }
.prose li::marker { color: var(--sakura); }

/* 22. Signal colours (put on a .frame, .lower-third or any wrapper) -------- */

.sig-rosette { --signal: var(--sig-rosette); }
.sig-lilac { --signal: var(--sig-lilac); }
.sig-marina { --signal: var(--sig-marina); }
.sig-aurelia { --signal: var(--sig-aurelia); }
.sig-ren { --signal: var(--sig-ren); }
.sig-noa { --signal: var(--sig-noa); }
.sig-briar { --signal: var(--sig-briar); }
.sig-jet { --signal: var(--sig-jet); }

/* 23. Reduced motion and forced colours ------------------------------------ */

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .frame:hover { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active,
  .frame:hover { transform: none !important; }
}

@media (forced-colors: active) {
  .btn,
  .vote,
  .pill,
  .badge,
  .frame,
  .me-chip,
  .menu-button { border: 1px solid ButtonText; }
  .btn-primary { border: 2px solid ButtonText; }
  .nav-list a[aria-current="page"]::after,
  .tab[aria-selected="true"]::after { background: Highlight; }
}
