/* PAIMT ARENA website. Soot register only (design/design-system.md): bone chalk on mourning plum,
   full paint spent on the marks a player made. Every colour, radius and shadow below is a token
   from design/tokens.json; web-only values (layout widths, type clamps) are marked. */

@font-face { font-family: "Permanent Marker"; src: url("../fonts/PermanentMarker-Regular.woff") format("woff"), url("../fonts/PermanentMarker-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-Medium.woff") format("woff"), url("../fonts/BarlowCondensed-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-SemiBold.woff") format("woff"), url("../fonts/BarlowCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-Bold.woff") format("woff"), url("../fonts/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-ExtraBold.woff") format("woff"), url("../fonts/BarlowCondensed-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: dark;
  /* Soot theme */
  --ground: #211a26; --surface: #1d1b24; --raised: #2b2733; --raised-hi: #353042; --selected: #334c4c;
  --text: #d3cdc3; --muted: #b7b0a6; --edge: #524c5c; --rule: rgba(211, 205, 195, 0.18); --rule-soft: rgba(211, 205, 195, 0.1);
  --ghost-rose: rgba(117, 66, 76, 0.46); --ghost-teal: rgba(77, 107, 104, 0.38);
  --void-soot: #0e0c10; --haunted-ink: #110e13; --ink: #1d1a17; --paper: #faf6ee; --canvas: #f2ead9; --cream: #fffdf4;
  /* paint: the accent code */
  --coral: #ff5d73; --amber: #ffb63e; --teal: #3ec5b7; --violet: #7c6cff; --pink: #ff8fab; --sky: #51b3ff;
  --lime: #6bd65a; --oxblood: #8c1f28; --wood: #c98d4e; --red-coat: #f2343f; --void-ink: #6a3cc4;
  --paint-teal: #66b8ab; --paint-rose: #c26678;
  /* tempered: quiet shapes behind type */
  --dead-teal: #4d6b68; --oxidised-rose: #75424c; --spent-gold: #74634d; --mourning-violet: #51435a; --bruised-slate: #3c3a48;
  --gesso: #c9bfa8; --sketch: #a89f92;
  --r-panel: 14px; --r-mark: 12px; --r-toast: 10px; --r-chip: 9px; --r-bar: 7px; --r-bar-sm: 3px;
  --sh-control: 2px 2px 0 rgba(14, 12, 16, 0.12); --sh-card: 3px 3px 0 rgba(14, 12, 16, 0.18); --sh-sheet: 4px 4px 0 rgba(14, 12, 16, 0.26);
  --marker: "Permanent Marker", "Barlow Condensed", "Arial Narrow", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  /* web layout */
  --max: 86rem; --gutter: clamp(16px, 4vw, 64px); --hatch: repeating-linear-gradient(135deg, rgba(183, 176, 166, 0.5) 0 1.4px, transparent 1.4px 5px);
  --acc: var(--coral);
}
@media (min-width: 1800px) { html { font-size: 112.5%; } }
@media (min-width: 2300px) { html { font-size: 125%; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; min-height: 100vh; background: var(--ground); color: var(--text);
  font: 500 1.0625rem/1.45 var(--cond); letter-spacing: 0; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* pencil tooth: ash flecks, strongest at the edges, never over the letters (behind everything) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--tooth, none); background-size: 256px 256px; opacity: 0.75;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 38%, rgba(0, 0, 0, 0.32) 25%, #000 100%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 38%, rgba(0, 0, 0, 0.32) 25%, #000 100%);
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: 0; }
a { color: var(--paint-teal); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { color: var(--text); }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
::selection { background: var(--dead-teal); color: var(--cream); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r-chip); font-family: var(--marker); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- type -------------------------------------------------------------------------------- */
.mk { font-family: var(--marker); font-weight: 400; letter-spacing: 0; }
.caps { text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.title {
  font: 400 clamp(2.5rem, 1.4rem + 4.6vw, 5.6rem)/1.02 var(--marker); text-transform: uppercase; color: var(--text);
  text-shadow: -0.048em 0.038em 0 var(--ghost-rose), 0.058em -0.019em 0 var(--ghost-teal);
  overflow-wrap: anywhere;
}
.title:focus { outline: none; }
.title--md { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.9rem); }
.kick { font: 400 1rem/1.3 var(--marker); text-transform: uppercase; color: var(--muted); }
.lede { font: 400 clamp(1.05rem, 0.98rem + 0.3vw, 1.3rem)/1.46 var(--marker); color: var(--text); max-width: 46ch; }
.fine { font: 600 0.875rem/1.4 var(--cond); color: var(--muted); }
.data { font: 800 1.5rem/1.2 var(--cond); }
.muted { color: var(--muted); }
.pos { color: var(--paint-teal); }
.neg { color: var(--paint-rose); }
.cube { display: inline-block; width: 0.5em; height: 0.5em; background: currentColor; transform: rotate(18deg); border-radius: 1px; flex: none; }
.sep { display: inline-block; width: 0.34em; height: 0.34em; margin: 0 0.55em 0.12em; background: var(--edge); transform: rotate(24deg); vertical-align: middle; }

/* ---- layout -------------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
main { display: block; min-height: 70vh; }
.page { padding-bottom: 5rem; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c7 { grid-column: span 7; } .c6 { grid-column: span 6; }
.c5 { grid-column: span 5; } .c4 { grid-column: span 4; }
@media (max-width: 1100px) { .c8, .c7, .c6, .c5, .c4 { grid-column: span 12; } .t6 { grid-column: span 6; } }
@media (max-width: 700px) { .t6 { grid-column: span 12; } .grid { gap: 1rem; } }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* section head: a Marker word on the ground and one plain line under it */
.sh { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap; margin: 3.5rem 0 1.1rem; }
.sh h2 { font: 400 clamp(1.65rem, 1.2rem + 1.5vw, 2.35rem)/1.12 var(--marker); text-transform: uppercase; }
.sh p { font: 600 1rem/1.35 var(--cond); color: var(--muted); margin-top: 0.2rem; max-width: 62ch; }
.sh--tight { margin-top: 2.2rem; }

/* ---- sticker panels ----------------------------------------------------------------------- */
.panel {
  position: relative; isolation: isolate; background: var(--surface); color: var(--text);
  border: 2px solid var(--edge); border-radius: var(--r-panel); box-shadow: var(--sh-card); min-width: 0;
}
.panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background-image: var(--tooth, none); background-size: 256px 256px; opacity: 0.45;
  -webkit-mask-image: radial-gradient(closest-side, transparent 72%, #000 140%); mask-image: radial-gradient(closest-side, transparent 72%, #000 140%);
}
.panel--raised { background: var(--raised); }
.panel--sheet { box-shadow: var(--sh-sheet); }
.pad { padding: 1.125rem; }
@media (min-width: 900px) { .pad { padding: 1.4rem 1.5rem; } }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 1.1rem 1.25rem 0.9rem; border-bottom: 1px solid var(--rule-soft); flex-wrap: wrap; }
.panel__head h3 { font: 400 1.4rem/1.2 var(--marker); text-transform: uppercase; }
.panel__head p { font: 600 0.95rem/1.35 var(--cond); color: var(--muted); margin-top: 0.15rem; }
.panel__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.85rem 1.25rem; border-top: 1px solid var(--rule-soft); }
.label { font: 400 0.875rem/1.3 var(--marker); text-transform: uppercase; color: var(--muted); }
.empty { padding: 1.4rem 1.25rem; color: var(--muted); font: 600 1rem/1.4 var(--cond); }

/* ---- buttons -------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 44px;
  padding: 0.56em 1.1em 0.6em; font: 400 1.0625rem/1 var(--marker); text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--text); background: var(--raised); border: 2px solid var(--edge); border-radius: var(--r-chip); box-shadow: var(--sh-control);
  cursor: pointer; user-select: none;
}
.btn:hover { background: var(--raised-hi); color: var(--text); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn--go { background: var(--teal); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--void-soot); }
.btn--go:hover { background: #57d3c6; color: var(--ink); }
.btn--paper { background: var(--paper); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--void-soot); }
.btn--paper:hover { background: var(--cream); color: var(--ink); }
.btn--stop { background: transparent; color: var(--coral); border-color: var(--coral); box-shadow: none; }
.btn--stop:hover { background: rgba(255, 93, 115, 0.12); color: var(--coral); }
.btn--ghost { background: transparent; box-shadow: none; }
.btn--big { font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.6rem); min-height: 58px; padding: 0.55em 1.25em 0.62em; border-radius: var(--r-toast); }
.btn--small { font-size: 0.9375rem; min-height: 36px; padding: 0.42em 0.8em 0.46em; }
.btn--block { width: 100%; }
.link { font-family: var(--marker); text-transform: uppercase; font-size: 0.95rem; color: var(--paint-teal); text-decoration: none; background: none; border: 0; padding: 0.3em 0; cursor: pointer; }
.link:hover { color: var(--text); text-decoration: underline; }

/* ---- chips and pills ------------------------------------------------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: 0.5em; min-height: 38px; padding: 0.38em 0.85em 0.44em;
  font: 400 0.9375rem/1.1 var(--marker); text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--muted); background: transparent; border: 2px solid var(--edge); border-radius: var(--r-chip); cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-current="page"], .chip[aria-pressed="true"], .chip.is-on { color: var(--text); background: var(--selected); border-color: var(--dead-teal); }
.chip .n { font: 800 0.95rem/1 var(--cond); color: var(--text); }
.tag {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.16em 0.55em 0.2em; font: 400 0.8125rem/1.25 var(--marker);
  text-transform: uppercase; white-space: nowrap; color: var(--ink); background: var(--acc); border: 2px solid var(--ink); border-radius: var(--r-chip);
}
.tag--quiet { color: var(--muted); background: transparent; border-color: var(--edge); }
.tag--line { color: var(--text); background: transparent; border-color: var(--text); }
.tag--you { background: var(--teal); }
.tag--live { background: var(--coral); }
.tag--warn { background: var(--amber); }
/* rank tier pill: 40% tier colour over paper, ink letters; PICASSO is the four-colour wash */
.tier {
  display: inline-block; padding: 0.06em 0.62em 0.12em; font: 400 0.875rem/1.3 var(--marker); text-transform: uppercase; white-space: nowrap;
  color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r-chip);
  background: color-mix(in srgb, var(--tier, var(--gesso)) 42%, var(--paper));
}
.tier--lg { font-size: 1.125rem; padding: 0.08em 0.8em 0.14em; }
.tier--picasso { color: var(--canvas); background: linear-gradient(rgba(29, 26, 23, 0.55), rgba(29, 26, 23, 0.55)), linear-gradient(90deg, var(--coral), var(--amber), var(--teal), var(--violet)); }
.tier--goldleaf { background: color-mix(in srgb, var(--amber) 58%, var(--paper)); }

/* accents: set --acc once */
.acc-wood { --acc: var(--wood); } .acc-sky { --acc: var(--sky); } .acc-teal { --acc: var(--teal); } .acc-pink { --acc: var(--pink); }
.acc-amber { --acc: var(--amber); } .acc-violet { --acc: var(--violet); } .acc-coral { --acc: var(--coral); } .acc-lime { --acc: var(--lime); }
.acc-oxblood { --acc: var(--oxblood); } .acc-void { --acc: var(--void-ink); } .acc-red-coat { --acc: var(--red-coat); } .acc-chalk { --acc: var(--text); }
.acc-text { color: var(--acc); }
/* oxblood and void separate on value: never type on Soot. Their words stay chalk, their marks keep the colour */
.acc-oxblood .acc-text, .acc-void .acc-text, .acc-text.acc-oxblood, .acc-text.acc-void { color: var(--text); }

/* ---- avatars and player names --------------------------------------------------------------- */
.av {
  --av: 34px; position: relative; flex: none; width: var(--av); height: var(--av); border-radius: 50%; overflow: hidden;
  display: inline-grid; place-items: center; background: var(--av-bg, var(--bruised-slate)); color: var(--text);
  font: 400 calc(var(--av) * 0.5)/1 var(--marker); text-transform: uppercase; border: 2px solid var(--edge);
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av--lg { --av: 64px; } .av--xl { --av: 96px; } .av--sm { --av: 26px; border-width: 1.5px; }
.who { display: inline-flex; align-items: center; gap: 0.6em; min-width: 0; color: var(--text); text-decoration: none; }
.who__name { font: 400 1.0625rem/1.25 var(--marker); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.who:hover .who__name { color: var(--paint-teal); }
.pname { color: inherit; text-decoration: none; }
a.pname:hover { color: var(--paint-teal); text-decoration: underline; }

/* ---- arena art: drained by default, repainted by a hit (hover, focus) or by being live -------- */
.art { position: relative; overflow: hidden; background: var(--void-soot); }
.art img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.05) brightness(0.56) contrast(1.06); transition: filter 0.22s cubic-bezier(0.2, 0.9, 0.3, 1); }
.repaint:hover .art img, .repaint:focus-within .art img, .art.is-live img { filter: saturate(1) brightness(0.82) contrast(1.02); }
.art.is-live img { filter: saturate(1) brightness(0.7); }
.art--none { background: var(--hatch), var(--haunted-ink); }
.art__name { position: absolute; left: 0.6rem; bottom: 0.45rem; right: 0.6rem; font: 400 0.8125rem/1.2 var(--marker); color: var(--muted); text-transform: uppercase; }
.sticker-photo { border: 2px solid var(--text); border-radius: var(--r-mark); box-shadow: var(--sh-sheet); overflow: hidden; }

/* torn paper edge for brand bands */
.torn { -webkit-mask: var(--torn) bottom / 100% 26px no-repeat, linear-gradient(#000, #000) top / 100% calc(100% - 25px) no-repeat;
  mask: var(--torn) bottom / 100% 26px no-repeat, linear-gradient(#000, #000) top / 100% calc(100% - 25px) no-repeat;
  --torn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 26' preserveAspectRatio='none'%3E%3Cpath d='M0 0H1200V9L1188 13 1171 8 1153 15 1139 10 1121 17 1104 9 1089 14 1070 8 1052 16 1037 11 1019 18 1001 10 986 15 968 9 951 17 933 11 917 16 899 8 882 14 866 9 848 18 831 12 813 16 797 9 779 15 761 10 745 19 728 11 710 15 693 8 676 14 658 10 641 17 623 9 606 13 589 8 571 16 554 11 537 18 519 9 502 14 485 10 467 17 450 8 433 15 415 11 398 16 381 9 363 13 346 8 329 17 311 10 294 15 277 9 259 18 242 12 225 16 207 8 190 14 173 10 155 17 138 9 121 15 103 11 86 18 69 9 51 14 34 10 17 16 0 11Z'/%3E%3C/svg%3E"); }

/* ---- header -------------------------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(33, 26, 38, 0.94); border-bottom: 1px solid var(--rule-soft); backdrop-filter: blur(6px); }
.top__in { display: flex; align-items: center; gap: 1.25rem; min-height: 64px; }
.brand { display: inline-flex; flex-direction: column; align-items: center; line-height: 0.95; color: var(--text); text-decoration: none; font: 400 1.75rem var(--marker); padding: 0.1rem 0.15rem; }
.brand:hover { color: var(--text); }
.brand__arena { font-size: 0.55em; margin-top: -0.04em; }
.print { position: relative; display: inline-block; isolation: isolate; white-space: nowrap; }
.print::before, .print::after { content: attr(data-t); content: attr(data-t) / ""; position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; }
.print::before { color: var(--ghost-rose); transform: translate(-0.048em, 0.038em) rotate(-0.45deg); }
.print::after { color: var(--ghost-teal); transform: translate(0.058em, -0.019em) rotate(0.3deg); }
.nav { display: flex; align-items: center; gap: 0.25rem; margin-left: 0.5rem; }
.nav a { position: relative; padding: 0.55rem 0.75rem 0.6rem; font: 400 1.125rem/1 var(--marker); text-transform: uppercase; color: var(--muted); text-decoration: none; border-radius: var(--r-chip); }
.nav a:hover { color: var(--text); background: rgba(211, 205, 195, 0.06); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.18rem; height: 4px; border-radius: 3px; background: var(--teal); transform: rotate(-1.2deg); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.pulse { display: inline-flex; align-items: center; gap: 0.45em; font: 700 0.9375rem/1 var(--cond); color: var(--muted); white-space: nowrap; }
.pulse b { font: 400 1.0625rem/1 var(--marker); color: var(--text); }
.dot { display: inline-block; width: 0.62em; height: 0.62em; border-radius: 50%; background: var(--coral); flex: none; }
.dot--live { animation: pa-drain 2.6s ease-out infinite; }
.dot--off { background: var(--edge); }
.me-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0.65rem 0.2rem 0.2rem; border: 2px solid var(--edge); border-radius: 999px; color: var(--text); text-decoration: none; font: 400 0.95rem/1 var(--marker); max-width: 14rem; }
.me-chip:hover { border-color: var(--muted); color: var(--text); }
.me-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-chip { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.3em 0.7em 0.34em; border-radius: var(--r-chip); font: 400 0.875rem/1 var(--marker); text-transform: uppercase; text-decoration: none; color: var(--ink); background: var(--amber); border: 2px solid var(--ink); white-space: nowrap; }
.inline-chip:hover { color: var(--ink); background: #ffc664; }
@media (max-width: 760px) {
  .top { position: static; backdrop-filter: none; background: var(--ground); }
  .top__in { flex-wrap: wrap; gap: 0.25rem 0.75rem; padding-top: 0.6rem; padding-bottom: 0.4rem; }
  .brand { font-size: 1.45rem; }
  .nav { order: 3; width: 100%; margin: 0 0 0 -0.6rem; justify-content: flex-start; }
  .nav a { font-size: 1.0625rem; padding: 0.55rem 0.6rem; }
  .pulse { display: none; }
}

/* ---- footer -------------------------------------------------------------------------------- */
.foot { margin-top: 3rem; border-top: 1px solid var(--rule-soft); padding: 2.2rem 0 3rem; }
.foot__in { display: flex; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; align-items: flex-start; }
.foot .brand { font-size: 1.5rem; align-items: flex-start; }
.foot__links { display: flex; gap: 0.4rem 1.4rem; flex-wrap: wrap; }
.foot__links a { font: 400 0.95rem/1.6 var(--marker); text-transform: uppercase; color: var(--muted); text-decoration: none; }
.foot__links a:hover { color: var(--text); }
.foot p { font: 600 0.875rem/1.5 var(--cond); color: var(--muted); }

/* ---- toasts and the announcer ---------------------------------------------------------------- */
.toasts { position: fixed; z-index: 60; left: 50%; top: 76px; transform: translateX(-50%); display: grid; gap: 0.5rem; justify-items: center; width: min(92vw, 34rem); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 0.8rem; max-width: 100%; padding: 0.55rem 0.95rem 0.6rem;
  font: 400 1.125rem/1.25 var(--marker); color: var(--text); background: var(--raised);
  border: 2px solid var(--edge); border-radius: var(--r-toast); box-shadow: var(--sh-sheet);
}
.toast--loud { background: var(--acc); color: var(--ink); border-color: var(--ink); }
.toast--loud a { color: var(--ink); }
.toast--bad { border-color: var(--coral); }
.toast.is-out { opacity: 0; transition: opacity 0.3s; }

/* ---- loading and errors -------------------------------------------------------------------- */
.loading { display: grid; place-items: center; min-height: 50vh; }
.loading p { font: 400 1.25rem/1 var(--marker); color: var(--muted); text-transform: uppercase; }
.scribble { width: 92px; height: 30px; color: var(--edge); margin: 0 auto 0.9rem; }
.oops { max-width: 40rem; margin: 3rem auto; text-align: left; }
.oops h1, .oops h2 { font: 400 1.9rem/1.15 var(--marker); text-transform: uppercase; margin-bottom: 0.5rem; }

/* ---- ink burst --------------------------------------------------------------------------- */
.burst { color: var(--acc); pointer-events: none; }
.burst .glint { fill: none; stroke: var(--cream); stroke-width: 3; stroke-linecap: round; opacity: 0.5; }

/* ---- forms ------------------------------------------------------------------------------ */
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field > span, .field legend { font: 400 0.95rem/1.3 var(--marker); text-transform: uppercase; color: var(--muted); }
.field small { font: 600 0.875rem/1.35 var(--cond); color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 0.55rem 0.75rem; font: 600 1.0625rem/1.3 var(--cond); color: var(--text);
  background: var(--haunted-ink); border: 2px solid var(--edge); border-radius: var(--r-chip);
}
textarea.input { min-height: 7rem; resize: vertical; line-height: 1.45; }
.input:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; border-color: var(--muted); }
.radios { display: flex; flex-wrap: wrap; gap: 0.5rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.radios legend { margin-bottom: 0.45rem; padding: 0; }
.radio { position: relative; }
.radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio span { display: inline-flex; align-items: center; min-height: 40px; padding: 0.38em 0.9em 0.44em; font: 400 1rem/1.1 var(--marker); text-transform: uppercase; color: var(--muted); border: 2px solid var(--edge); border-radius: var(--r-chip); }
.radio input:checked + span { color: var(--text); background: var(--selected); border-color: var(--dead-teal); }
.radio input:focus-visible + span { outline: 3px solid var(--text); outline-offset: 3px; }
.radio input:hover + span { color: var(--text); }
.form-error { color: var(--coral); font: 400 1.0625rem/1.4 var(--marker); }

/* ---- motion: the four signatures --------------------------------------------------------- */
@keyframes pa-stamp { 0% { transform: scale(1.7) rotate(-5deg); opacity: 0; } 55% { transform: scale(0.94) rotate(0.8deg); opacity: 1; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes pa-drain { 0%, 40% { filter: saturate(0.05); } 46%, 100% { filter: saturate(1); } }
@keyframes pa-boil { 0% { filter: url(#pa-boil-1); } 33.4% { filter: url(#pa-boil-2); } 66.7% { filter: url(#pa-boil-3); } }
@keyframes pa-repaint { 0% { filter: saturate(0.05) brightness(0.5); } 100% { filter: saturate(1) brightness(0.82); } }
.stamp { animation: pa-stamp 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.boil { animation: pa-boil 0.36s steps(1) infinite; }
.boil.is-paused { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .stamp, .boil, .dot--live { animation: none !important; }
  .art img, .toast.is-out { transition: none !important; }
  html { scroll-behavior: auto; }
}
