/* ==========================================================================
   bhfr — sticker-card UI with a marker-pen narrator.
   Tokens → base → components → views → creator themes.
   ========================================================================== */

:root {
  --ink: #1b1340;
  --ink-soft: #5b4f8a;
  --paper: #ede6ff;
  --paper-deep: #dccfff;
  --card: #ffffff;
  --pop: #ff4fa3;
  --pop-deep: #e0268a;
  --zap: #ffe14d;
  --pool: #3ddbd9;
  --lime: #9bf26b;
  --tomato: #ff6a3d;
  --grape: #9b8cff;

  --f-display: "Bagel Fat One", "Arial Black", system-ui, sans-serif;
  --f-body: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-marker: "Gochi Hand", "Comic Sans MS", cursive;

  --line: 3px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --lift: 5px;
  --shadow: 0 var(--lift) 0 var(--ink);
  --shadow-card: 6px 7px 0 var(--ink);
  --gutter: 16px;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Creator theme defaults; overridden by .pal-* and .font-* */
  --t-bg: #ffd6ec;
  --t-card: #ffffff;
  --t-accent: #ff4fa3;
  --t-accent-ink: #ffffff;
  --t-ink: #1b1340;
  --t-soft: #5b4f8a;
  --t-font: var(--f-display);
  --t-font-size: 1;
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--ink);
  -webkit-mask: url("/img/doodle-squiggle.svg") repeat;
  mask: url("/img/doodle-squiggle.svg") repeat;
  opacity: 0.55;
  pointer-events: none;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Everything public is lowercase. Stored text keeps its case; this is display only.
   Buttons don't inherit text-transform by default, so opt them in. What people are
   typing stays as typed, and moderators see reported text exactly as written. */
body {
  text-transform: lowercase;
}
button {
  text-transform: inherit;
}
input,
textarea,
select {
  text-transform: none;
}
input::placeholder,
textarea::placeholder {
  text-transform: lowercase;
}
.keep-case,
.admin-page {
  text-transform: none;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  font-weight: 400;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 4px solid var(--zap);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 7px var(--ink);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--zap);
  padding: 8px 12px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r-sm);
}
.skip:focus {
  left: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.noscript {
  padding: 24px;
  text-align: center;
}

.boot {
  min-height: 60dvh;
  display: grid;
  place-items: center;
}

/* ---------- type ---------- */

.display {
  font-family: var(--f-display);
  letter-spacing: -0.01em;
}
.h1 {
  font-family: var(--f-display);
  font-size: clamp(40px, 11vw, 64px);
  line-height: 0.95;
}
.h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1;
}
.h3 {
  font-family: var(--f-body);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.eyebrow {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.muted {
  color: var(--ink-soft);
}
.small {
  font-size: 14px;
}
.tiny {
  font-size: 12.5px;
}
.center {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}

/* The marker narrator. Handwritten, a little crooked, always has an opinion. */
.marker {
  font-family: var(--f-marker);
  font-size: 22px;
  line-height: 1.1;
  color: var(--pop-deep);
  transform: rotate(-3deg);
  display: inline-block;
}
.marker-lg {
  font-size: 30px;
}
.hl {
  background: linear-gradient(transparent 55%, var(--zap) 55% 92%, transparent 92%);
  padding: 0 0.1em;
}

/* ---------- layout ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--gutter);
  padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.logo {
  text-decoration: none;
}
.logo-mark {
  display: inline-block;
  font-family: var(--f-display);
  font-size: 26px;
  line-height: 1;
  color: var(--pop);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 2px 3px 0 var(--ink);
  transform: rotate(-4deg);
  transition: transform 0.25s var(--ease-pop);
}
.logo:hover .logo-mark {
  transform: rotate(3deg) scale(1.06);
}
.topnav {
  display: flex;
  gap: 8px;
  align-items: center;
}

main,
main:focus-visible {
  outline: none;
  box-shadow: none;
}

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 12px var(--gutter) 96px;
}
.page-wide {
  max-width: 980px;
}

.stack > * + * {
  margin-top: var(--gap, 16px);
}
.stack-sm {
  --gap: 10px;
}
.stack-lg {
  --gap: 28px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row-between {
  justify-content: space-between;
}
.row-nowrap {
  flex-wrap: nowrap;
}
.grow {
  flex: 1 1 auto;
  min-width: 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.btn {
  --b-bg: var(--card);
  --b-fg: var(--ink);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  background: var(--b-bg);
  color: var(--b-fg);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.1;
  text-decoration: none;
  text-align: center;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background-color 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 calc(var(--lift) + 1px) 0 var(--ink);
}
.btn:active {
  transform: translateY(calc(var(--lift) - 1px));
  box-shadow: 0 1px 0 var(--ink);
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow);
}
.btn-pop {
  --b-bg: var(--pop);
  --b-fg: #fff;
}
.btn-zap {
  --b-bg: var(--zap);
}
.btn-pool {
  --b-bg: var(--pool);
}
.btn-ink {
  --b-bg: var(--ink);
  --b-fg: #fff;
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.btn-ghost:hover,
.btn-ghost:active {
  box-shadow: none;
  transform: none;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.btn-danger {
  --b-bg: var(--tomato);
  --b-fg: #fff;
}
.btn-lg {
  min-height: 60px;
  font-size: 20px;
  padding: 14px 26px;
  border-radius: 22px;
}
.btn-sm {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 15px;
  border-radius: var(--r-sm);
  --lift: 3px;
}
.btn-xs {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 14px;
  border-radius: 10px;
  --lift: 2px;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-icon {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  --lift: 3px;
  border-radius: 14px;
}
.btn .emoji {
  font-size: 1.15em;
}
.btn.is-busy {
  pointer-events: none;
}
.btn.is-busy::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.link-btn {
  background: none;
  border: 0;
  padding: 4px 2px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  color: inherit;
}

/* ---------- cards & surfaces ---------- */

.card {
  background: var(--card);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
  position: relative;
}
.card-flat {
  box-shadow: none;
}
.card-tight {
  padding: 14px;
}
.card-zap {
  background: var(--zap);
}
.card-pop {
  background: var(--pop);
  color: #fff;
}
.card-pool {
  background: var(--pool);
}
.card-ink {
  background: var(--ink);
  color: #fff;
}
.tilt-l {
  transform: rotate(-1.5deg);
}
.tilt-r {
  transform: rotate(1.5deg);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: var(--card);
  white-space: nowrap;
}
.pill-live {
  background: var(--lime);
}
.pill-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  animation: blink 1.4s ease-in-out infinite;
}
.pill-ended {
  background: var(--zap);
}
.pill-revealed {
  background: var(--pop);
  color: #fff;
}
.pill-draft {
  background: var(--paper-deep);
}
.pill-lore {
  background: var(--pool);
}
.pill-vibes {
  background: var(--grape);
  color: #fff;
}

.divider {
  border: 0;
  border-top: var(--line) dashed color-mix(in srgb, var(--ink) 30%, transparent);
  margin: 22px 0;
}

.empty {
  text-align: center;
  padding: 28px 16px;
  border: var(--line) dashed color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: var(--r-lg);
}

/* ---------- forms ---------- */

.field {
  display: block;
}
.field > .label {
  display: block;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 6px;
}
.field > .hint {
  display: block;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 6px;
}
.input,
.textarea,
.select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  background: var(--card);
  font-size: 17px;
  font-weight: 600;
  transition: box-shadow 0.12s ease;
}
.input::placeholder,
.textarea::placeholder {
  color: color-mix(in srgb, var(--ink) 40%, transparent);
  font-weight: 500;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--zap), 0 0 0 7px var(--ink);
}
.textarea {
  resize: none;
  min-height: 84px;
  line-height: 1.3;
}
.input-big {
  font-size: 22px;
  font-weight: 800;
}
.input-code {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.input-error {
  border-color: var(--tomato);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tomato) 35%, transparent);
}
.error-text {
  color: #c2311b;
  font-weight: 700;
  font-size: 14.5px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 600;
  line-height: 1.35;
}
.check input {
  appearance: none;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0;
  border: var(--line) solid var(--ink);
  border-radius: 9px;
  background: var(--card);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check input:checked {
  background: var(--lime);
}
.check input:checked::after {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 3.5px solid var(--ink);
  border-bottom: 3.5px solid var(--ink);
  transform: translateY(-2px) rotate(-45deg);
}

/* Segmented toggle */
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: var(--line) solid var(--ink);
  border-radius: 16px;
  background: var(--card);
  max-width: 100%;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 11px;
  font-weight: 800;
  font-size: 14.5px;
  white-space: nowrap;
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.seg-block {
  display: flex;
}
.seg-block button {
  flex: 1;
}

/* Radio cards (audience picker etc.) */
.choice-list {
  display: grid;
  gap: 12px;
}
.choice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 16px;
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.1s ease, background-color 0.15s ease;
}
.choice:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}
.choice[aria-pressed="true"],
.choice[aria-checked="true"] {
  background: var(--zap);
}
.choice-emoji {
  font-size: 30px;
  line-height: 1;
  flex: 0 0 auto;
}
.choice strong {
  display: block;
  font-size: 18px;
  font-weight: 900;
}
.choice span.desc {
  display: block;
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-top: 2px;
}

/* Progress & meters without inline widths */
progress.bar,
meter.bar {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 14px;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  overflow: hidden;
}
progress.bar::-webkit-progress-bar {
  background: var(--card);
}
progress.bar::-webkit-progress-value {
  background: var(--t-accent, var(--pop));
  border-radius: 999px;
  transition: width 0.35s var(--ease-pop);
}
progress.bar::-moz-progress-bar {
  background: var(--t-accent, var(--pop));
  border-radius: 999px;
}
meter.bar::-webkit-meter-bar {
  background: var(--card);
  border: 0;
  height: 100%;
}
meter.bar::-webkit-meter-optimum-value,
meter.bar::-webkit-meter-suboptimum-value,
meter.bar::-webkit-meter-even-less-good-value {
  background: var(--m-fill, var(--grape));
}
meter.bar::-moz-meter-bar {
  background: var(--m-fill, var(--grape));
}
meter.bar-lime {
  --m-fill: var(--lime);
}
meter.bar-pop {
  --m-fill: var(--pop);
}
meter.bar-pool {
  --m-fill: var(--pool);
}
meter.bar-fat {
  height: 22px;
}

/* ---------- sheets, toasts ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.18s ease;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  padding: 10px var(--gutter) max(24px, env(safe-area-inset-bottom));
  animation: sheet-up 0.32s var(--ease-pop);
}
.sheet-handle {
  width: 48px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 25%, transparent);
  margin: 2px auto 14px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
@media (min-width: 640px) {
  .sheet-backdrop {
    align-items: center;
  }
  .sheet {
    border-radius: 28px;
    border-bottom: var(--line) solid var(--ink);
    box-shadow: var(--shadow-card);
  }
}

.toasts {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: #fff;
  border: var(--line) solid var(--ink);
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 700;
  box-shadow: 0 5px 0 var(--pop);
  animation: toast-in 0.3s var(--ease-pop);
  pointer-events: auto;
}
.toast-error {
  background: var(--tomato);
  box-shadow: 0 5px 0 var(--ink);
}
.toast.is-leaving {
  animation: fade 0.2s ease reverse forwards;
}

/* Turnstile runs invisibly; this card only shows if Cloudflare needs a tap. */
.ts-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.ts-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ts-card {
  width: min(100%, 360px);
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: grid;
  gap: 12px;
}
.ts-overlay:not(.is-open) .ts-card {
  /* keep the widget rendered but out of sight until it's needed */
  position: absolute;
  left: -9999px;
}

.confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 90;
  pointer-events: none;
}

/* ---------- stickers & assets ---------- */

.asset {
  display: inline-grid;
  place-items: center;
  line-height: 1;
}
.asset-emoji {
  font-size: 1.4em;
}
.asset img {
  width: 1.8em;
  height: 1.8em;
}
.asset-lg {
  font-size: 44px;
}
.asset-lg img {
  width: 76px;
  height: 76px;
}

.sticker {
  position: absolute;
  width: 72px;
  height: 72px;
  pointer-events: none;
  filter: drop-shadow(2px 3px 0 rgba(27, 19, 64, 0.35));
  animation: sticker-slap 0.5s var(--ease-pop) both;
}
.sticker.slot-0 {
  top: -26px;
  right: -14px;
  transform: rotate(14deg);
}
.sticker.slot-1 {
  bottom: -22px;
  left: -16px;
  transform: rotate(-12deg);
  animation-delay: 0.08s;
}
.sticker.slot-2 {
  top: 38%;
  right: -26px;
  width: 58px;
  height: 58px;
  transform: rotate(-8deg);
  animation-delay: 0.16s;
}

/* ---------- topbar menu ---------- */

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: var(--line) solid var(--ink);
  background: var(--zap);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 3px 0 var(--ink);
}

/* ==========================================================================
   Views
   ========================================================================== */

/* ---------- landing ---------- */

.hero {
  padding: 18px 0 8px;
  position: relative;
}
.hero-title {
  font-family: var(--f-display);
  font-size: clamp(52px, 15vw, 96px);
  line-height: 0.88;
  letter-spacing: -0.02em;
}
.hero-title .w {
  display: block;
}
.hero-title .w-2 {
  color: var(--pop);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 5px 0 var(--ink);
  transform: rotate(-2deg);
  transform-origin: left;
  margin: 4px 0 2px;
}
.hero-title .w-3 {
  position: relative;
  display: inline-block;
}
.hero-title .w-3 .circle {
  position: absolute;
  inset: -12% -8% -18% -8%;
  width: 116%;
  height: 136%;
  max-width: none;
  pointer-events: none;
}
.hero-sub {
  font-size: 19px;
  font-weight: 600;
  max-width: 30ch;
  margin-top: 18px;
}
.hero-cta {
  margin-top: 22px;
}
.hero-note {
  margin-top: 12px;
}

/* A fake Know Me card in the hero, with marker arrows */
.demo {
  position: relative;
  margin: 44px 8px 10px;
}
.demo .card {
  padding: 22px 18px 18px;
}
.demo-q {
  font-weight: 900;
  font-size: 22px;
  line-height: 1.15;
  margin: 8px 0 14px;
}
.demo-opts {
  display: grid;
  gap: 8px;
}
.demo-opt {
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  background: var(--card);
}
.demo-opt.is-picked {
  background: var(--zap);
  animation: wiggle 2.8s ease-in-out infinite;
}
.demo-note {
  position: absolute;
  right: -2px;
  bottom: -46px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.demo-note svg {
  width: 44px;
  height: 44px;
  transform: scaleX(-1) rotate(20deg);
}

.how {
  margin-top: 78px;
}
.how-steps {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  counter-reset: how;
}
.how-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
}
.how-step .n {
  counter-increment: how;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: var(--line) solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 26px;
  box-shadow: 0 4px 0 var(--ink);
}
.how-step:nth-child(1) .n {
  background: var(--pool);
}
.how-step:nth-child(2) .n {
  background: var(--zap);
}
.how-step:nth-child(3) .n {
  background: var(--pop);
  color: #fff;
}
.how-step .n::before {
  content: counter(how);
}

.strip {
  margin: 56px calc(var(--gutter) * -1) 0;
  padding: 16px 0;
  background: var(--ink);
  color: var(--zap);
  overflow: hidden;
  transform: rotate(-2deg);
  border-block: var(--line) solid var(--ink);
}
.strip-track {
  display: flex;
  gap: 28px;
  width: max-content;
  font-family: var(--f-display);
  font-size: 26px;
  white-space: nowrap;
  animation: marquee 26s linear infinite;
}
.strip-track span:nth-child(3n + 2) {
  color: var(--pop);
}
.strip-track span:nth-child(3n) {
  color: var(--pool);
}

.promise {
  margin-top: 64px;
}
.promise-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.promise-list li {
  display: flex;
  gap: 10px;
  font-weight: 600;
}
.promise-list li::before {
  content: "✦";
  color: var(--pop);
  font-weight: 900;
}

.footer {
  margin-top: 72px;
  padding-top: 18px;
  border-top: var(--line) dashed color-mix(in srgb, var(--ink) 30%, transparent);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- template picker ---------- */

.tpl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tpl {
  text-align: left;
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  padding: 14px;
  background: var(--card);
  box-shadow: 0 5px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 150px;
  transition: transform 0.15s var(--ease-pop);
}
.tpl:nth-child(4n + 1) {
  background: #ffe1f1;
}
.tpl:nth-child(4n + 2) {
  background: #dffbfa;
}
.tpl:nth-child(4n + 3) {
  background: #fff6c9;
}
.tpl:nth-child(4n + 4) {
  background: #ebe6ff;
}
.tpl:hover {
  transform: rotate(-1.5deg) translateY(-2px);
}
.tpl:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
}
.tpl-emoji {
  font-size: 34px;
  line-height: 1;
}
.tpl-name {
  font-weight: 900;
  font-size: 17px;
  line-height: 1.1;
}
.tpl-blurb {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.tpl-count {
  margin-top: auto;
  font-size: 12.5px;
  font-weight: 800;
}
.tpl-blank {
  background: var(--card) !important;
  border-style: dashed;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ---------- editor ---------- */

.steps {
  display: flex;
  gap: 6px;
  margin: 4px 0 18px;
}
.steps li {
  list-style: none;
  flex: 1;
}
.steps {
  padding: 0;
}
.step-dot {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--card);
  padding: 0;
}
.step-dot[aria-current="step"] {
  background: var(--pop);
}
.step-dot.is-done {
  background: var(--ink);
}

.editor-foot {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin: 24px calc(var(--gutter) * -1) 0;
  padding: 12px var(--gutter) max(12px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: var(--line) solid var(--ink);
  display: flex;
  gap: 10px;
  align-items: center;
}
.editor-body {
  margin-top: 16px;
}
.save-state {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.qcard {
  padding: 16px;
}
.qcard + .qcard {
  margin-top: 18px;
}
.card.has-problem {
  border-color: var(--tomato);
  box-shadow: 6px 7px 0 var(--tomato);
}
.qcard-top {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.qnum {
  font-family: var(--f-display);
  font-size: 22px;
  line-height: 1;
}
.qcard .textarea {
  font-weight: 800;
  font-size: 19px;
  min-height: 64px;
}
.qcard-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.opt-edit {
  display: flex;
  gap: 8px;
  align-items: center;
}
.opt-edit + .opt-edit {
  margin-top: 8px;
}
.opt-edit .input {
  min-height: 46px;
  font-size: 16px;
}
.opt-asset {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  background: var(--card);
  display: grid;
  place-items: center;
  font-size: 22px;
  padding: 0;
}
.opt-asset img {
  width: 30px;
  height: 30px;
}
.opt-asset.is-empty {
  border-style: dashed;
  color: var(--ink-soft);
  font-size: 18px;
}
.opt-remove {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  font-size: 22px;
  font-weight: 900;
  border-radius: 10px;
}
.opt-remove:hover {
  background: color-mix(in srgb, var(--tomato) 20%, transparent);
}
.qcard-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.problem {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tomato) 18%, var(--card));
  font-weight: 700;
  font-size: 14.5px;
}

/* "Answer it yourself" step */
.mine-q + .mine-q {
  margin-top: 16px;
}
.mine-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.mine-opt {
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  padding: 9px 14px;
  font-weight: 700;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s var(--ease-pop), background-color 0.12s ease;
}
.mine-opt[aria-pressed="true"] {
  background: var(--lime);
  transform: rotate(-2deg) scale(1.04);
  box-shadow: 0 3px 0 var(--ink);
}
.mine-opt[aria-pressed="true"]::after {
  content: "✓";
  font-weight: 900;
}
.mine-q.is-vibes .mine-opt[aria-pressed="true"] {
  background: var(--grape);
  color: #fff;
}

/* Look step */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.swatch {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: var(--line) solid var(--ink);
  padding: 0;
  position: relative;
  box-shadow: 0 3px 0 var(--ink);
}
.swatch::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--t-accent);
}
.swatch {
  background: var(--t-bg);
}
.swatch[aria-pressed="true"] {
  transform: rotate(-6deg) scale(1.08);
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}
.font-pick {
  min-width: 76px;
  padding: 8px 12px;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  background: var(--card);
  font-family: var(--t-font);
  font-size: calc(22px * var(--t-font-size));
  line-height: 1.1;
}
.font-pick[aria-pressed="true"],
.doodle-pick[aria-pressed="true"] {
  background: var(--zap);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.doodle-pick {
  width: 64px;
  height: 64px;
  border: var(--line) solid var(--ink);
  border-radius: 16px;
  background: var(--card);
  position: relative;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  padding: 0;
}
.doodle-pick > span {
  position: relative;
  z-index: 1;
}
.sticker-picks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.sticker-pick {
  aspect-ratio: 1;
  border: var(--line) solid transparent;
  border-radius: 14px;
  background: transparent;
  padding: 4px;
}
.sticker-pick[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--zap);
}
.sticker-pick img {
  width: 100%;
  height: 100%;
}

/* Asset picker sheet */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 6px;
}
.asset-grid button {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--card);
  font-size: 28px;
  display: grid;
  place-items: center;
  padding: 4px;
}
.asset-grid button:hover {
  border-color: var(--ink);
}
.asset-grid img {
  width: 100%;
  height: 100%;
}

/* A themed box inside the editor (look + preview steps) */
.km-frame {
  border: var(--line) solid var(--ink);
  border-radius: var(--r-lg);
  padding: 8px 22px 28px;
  overflow: hidden;
}
.km-frame .intro-card {
  margin-top: 30px;
}
.km-frame .q-top {
  margin-top: 16px;
}

/* Published */
.linkbox {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.linkbox .input {
  font-size: 15px;
  font-weight: 700;
  min-height: 48px;
}
.invite-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}
.invite-row + .invite-row {
  border-top: 2px dashed color-mix(in srgb, var(--ink) 20%, transparent);
}

/* ==========================================================================
   Themed Know Me surface (answering, preview, share cards)
   ========================================================================== */

.km {
  background-color: var(--t-bg);
  color: var(--t-ink);
  position: relative;
  isolation: isolate;
}
.km:is(.doodle-squiggle, .doodle-stars, .doodle-hearts, .doodle-grid)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--t-ink);
  -webkit-mask: var(--t-doodle, none) repeat;
  mask: var(--t-doodle, none) repeat;
  opacity: 0.8;
  pointer-events: none;
}
.km-screen {
  min-height: calc(100dvh - 64px);
  margin: -12px calc(var(--gutter) * -1) -96px;
  padding: 18px var(--gutter) 60px;
}
.km-inner {
  max-width: 560px;
  margin: 0 auto;
}
.km .card,
.km-card {
  background: var(--t-card);
  color: var(--t-ink);
  border-color: var(--t-ink);
  box-shadow: 6px 7px 0 var(--t-ink);
}
.km .muted {
  color: var(--t-soft);
}
.km-title {
  font-family: var(--t-font);
  font-size: calc(clamp(34px, 9vw, 48px) * var(--t-font-size));
  line-height: 1;
  overflow-wrap: anywhere;
}
.km-owner {
  font-weight: 800;
  font-size: 15px;
  color: var(--t-soft);
}
.km-intro {
  font-family: var(--f-marker);
  font-size: 24px;
  line-height: 1.1;
  color: var(--t-accent);
  transform: rotate(-2deg);
  display: inline-block;
}
.km .btn-pop,
.km-accent {
  --b-bg: var(--t-accent);
  --b-fg: var(--t-accent-ink);
}
.km .btn {
  border-color: var(--t-ink);
  box-shadow: 0 var(--lift) 0 var(--t-ink);
}
.km .btn:active {
  box-shadow: 0 1px 0 var(--t-ink);
}
.km .pill {
  border-color: var(--t-ink);
  color: var(--t-ink);
  background: var(--t-card);
}
.km .pill-lore {
  background: var(--pool);
  color: var(--ink);
}
.km .pill-vibes {
  background: var(--grape);
  color: #fff;
}
.km .pill-live {
  background: var(--lime);
  color: var(--ink);
}
.km .pill-ended {
  background: var(--zap);
  color: var(--ink);
}
.km .pill-revealed {
  background: var(--pop);
  color: #fff;
}
.km .marker {
  color: var(--t-accent);
}

.intro-card {
  padding: 26px 22px 44px;
  margin-top: 28px;
}
.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 18px;
}
.notice {
  font-size: 14px;
  line-height: 1.4;
  padding: 12px 14px;
  border: 2px dashed currentColor;
  border-radius: 14px;
  margin-bottom: 16px;
}

/* Question screen */
.q-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.q-count {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.q-card {
  padding: 22px 18px;
}
.q-prompt {
  font-family: var(--t-font);
  font-size: calc(clamp(26px, 7vw, 34px) * var(--t-font-size));
  line-height: 1.05;
  margin: 12px 0 6px;
  overflow-wrap: anywhere;
}
.q-hint {
  font-size: 14.5px;
  font-weight: 600;
}
.q-asset {
  margin: 10px 0 0;
}
.q-opts {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.q-opts.is-duel {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border: var(--line) solid var(--t-ink);
  border-radius: 18px;
  background: var(--t-card);
  color: var(--t-ink);
  font-weight: 800;
  font-size: 18px;
  text-align: left;
  line-height: 1.2;
  box-shadow: 0 4px 0 var(--t-ink);
  transition:
    transform 0.12s var(--ease-pop),
    background-color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.opt:hover {
  transform: translateY(-1px);
}
.opt:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--t-ink);
}
.opt[aria-pressed="true"],
.opt[aria-checked="true"] {
  background: var(--t-accent);
  color: var(--t-accent-ink);
  transform: rotate(-1.2deg) scale(1.02);
}
.opt .box {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: var(--line) solid currentColor;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.opt[aria-checked="true"] .box::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 3.5px solid currentColor;
  border-bottom: 3.5px solid currentColor;
  transform: translateY(-2px) rotate(-45deg);
}
.opt .opt-label {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.is-duel .opt {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-height: 170px;
  font-size: 21px;
  padding: 16px 10px;
  border-radius: 24px;
}
.is-duel .opt:nth-child(1) {
  transform: rotate(-2deg);
}
.is-duel .opt:nth-child(2) {
  transform: rotate(2deg);
}
.is-duel .opt[aria-pressed="true"] {
  transform: rotate(0) scale(1.05);
}
.is-duel .opt .asset {
  font-size: 44px;
}
.is-duel .opt .asset img {
  width: 64px;
  height: 64px;
}
.duel-or {
  display: none;
}
.q-opts.is-duel {
  position: relative;
}
.q-opts.is-duel .duel-or {
  display: grid;
  place-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: var(--line) solid var(--t-ink);
  background: var(--zap);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 16px;
  z-index: 2;
  transform: rotate(-10deg);
  pointer-events: none;
}

.snark {
  min-height: 34px;
  margin-top: 14px;
  text-align: right;
}
.snark .marker {
  animation: scribble-in 0.35s var(--ease-pop);
}

.q-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

/* Score */
.score-wrap {
  text-align: center;
  padding: 30px 0 10px;
}
.score-big {
  position: relative;
  display: inline-block;
  font-family: var(--f-display);
  font-size: clamp(96px, 30vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  padding: 10px 24px;
}
.score-big .of {
  font-size: 0.42em;
  color: var(--t-soft, var(--ink-soft));
}
.score-circle {
  position: absolute;
  inset: -10% -14%;
  width: 128%;
  height: 120%;
  max-width: none;
  pointer-events: none;
  overflow: visible;
}
.score-circle path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 0.9s 0.5s ease-out forwards;
}
.score-pct {
  font-weight: 900;
  font-size: 20px;
}
.score-roast {
  margin-top: 16px;
}

/* ---------- results (creator & reveal) ---------- */

.res-head {
  padding: 22px 18px;
}
.res-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.stat {
  flex: 1 1 90px;
  border: var(--line) solid var(--ink);
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--card);
}
.stat b {
  display: block;
  font-family: var(--f-display);
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
}
.stat span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.km .stat {
  background: var(--t-card);
  border-color: var(--t-ink);
}
.km .stat span {
  color: var(--t-soft);
}
.card.km {
  border-color: var(--ink);
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 22px calc(var(--gutter) * -1) 16px;
  padding: 4px var(--gutter) 8px;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  flex: 0 0 auto;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  padding: 8px 16px;
  font-weight: 800;
  font-size: 15px;
}
.tab[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 0 var(--pop);
}

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 8px;
  margin: 20px 0 8px;
}
.pod {
  text-align: center;
}
.pod-name {
  font-weight: 900;
  font-size: 15px;
  overflow-wrap: anywhere;
  line-height: 1.1;
  margin-bottom: 6px;
}
.pod-block {
  border: var(--line) solid var(--ink);
  border-radius: 16px 16px 6px 6px;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 34px;
  box-shadow: 0 5px 0 var(--ink);
}
.pod-score {
  font-size: 13px;
  font-weight: 800;
  font-family: var(--f-body);
}
.pod-1 .pod-block {
  height: 150px;
  background: var(--zap);
}
.pod-2 .pod-block {
  height: 110px;
  background: var(--pool);
}
.pod-3 .pod-block {
  height: 84px;
  background: var(--pop);
  color: #fff;
}
.pod-1 .pod-crown {
  width: 48px;
  margin: 0 auto 2px;
  animation: bob 2.4s ease-in-out infinite;
}
.pod-empty .pod-block {
  background: var(--paper-deep);
  border-style: dashed;
  box-shadow: none;
}

.lb {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lb li + li {
  border-top: 2px dashed color-mix(in srgb, var(--ink) 18%, transparent);
}
.lb-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 2px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
}
button.lb-row:hover {
  background: color-mix(in srgb, var(--zap) 40%, transparent);
  border-radius: 12px;
}
.lb-rank {
  font-family: var(--f-display);
  font-size: 22px;
  text-align: center;
}
.lb-name {
  font-weight: 800;
  overflow-wrap: anywhere;
}
.lb-score {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.lb-row.is-me {
  background: var(--zap);
  border-radius: 12px;
}

.vq + .vq {
  margin-top: 16px;
}
.vq-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.vq-prompt {
  font-weight: 900;
  font-size: 18px;
  line-height: 1.15;
}
.vq-line {
  margin: 10px 0 12px;
}
.vbar + .vbar {
  margin-top: 10px;
}
.vbar-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.vbar-top .tag {
  font-size: 12px;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  margin-left: 6px;
  white-space: nowrap;
}
.tag-mine {
  background: var(--zap);
}
.tag-right {
  background: var(--lime);
}
.tag-you {
  background: var(--pool);
}
.tag-wrong {
  background: var(--tomato);
  color: #fff;
}

.callouts {
  display: grid;
  gap: 14px;
}
.callout {
  padding: 16px 18px;
}
.callout:nth-child(odd) {
  transform: rotate(-1deg);
}
.callout:nth-child(even) {
  transform: rotate(1deg);
}
.callout-emoji {
  font-size: 30px;
  line-height: 1;
}
.callout-title {
  font-weight: 900;
  font-size: 19px;
  line-height: 1.2;
  margin-top: 6px;
}

.answer-row {
  padding: 12px 0;
}
.answer-row + .answer-row {
  border-top: 2px dashed color-mix(in srgb, var(--ink) 18%, transparent);
}
.answer-row .q {
  font-weight: 800;
}
.answer-row .a {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 2px 9px;
  font-weight: 700;
  font-size: 14.5px;
  background: var(--card);
}
.chip-right {
  background: var(--lime);
}
.chip-wrong {
  background: color-mix(in srgb, var(--tomato) 35%, var(--card));
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.chip-mine {
  background: var(--zap);
}

.share-cards {
  display: grid;
  gap: 12px;
}
.share-preview {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.danger-zone {
  margin-top: 36px;
}

/* ---------- me / settings ---------- */

.list-card {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 14px 16px;
}
.list-card + .list-card {
  margin-top: 12px;
}
.list-swatch {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: var(--line) solid var(--ink);
  background: var(--t-bg);
  display: grid;
  place-items: center;
  font-size: 22px;
}
.list-title {
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.list-sub {
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 600;
}

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

.admin-report + .admin-report {
  margin-top: 14px;
}
.admin-report pre {
  white-space: pre-wrap;
  font-size: 13px;
  background: var(--paper);
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0 0;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.table th,
.table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 2px dashed color-mix(in srgb, var(--ink) 18%, transparent);
}
.table td.num,
.table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- legal ---------- */

.legal h2 {
  font-family: var(--f-body);
  font-weight: 900;
  font-size: 20px;
  margin-top: 26px;
}
.legal p,
.legal li {
  margin-top: 8px;
}

/* ==========================================================================
   Creator themes: palettes, fonts, doodles
   ========================================================================== */

.pal-bubblegum {
  --t-bg: #ffd6ec;
  --t-card: #ffffff;
  --t-accent: #ff4fa3;
  --t-accent-ink: #ffffff;
  --t-ink: #1b1340;
  --t-soft: #6b4a7a;
}
.pal-slime {
  --t-bg: #d6ffb0;
  --t-card: #fbfff5;
  --t-accent: #1f9e4a;
  --t-accent-ink: #ffffff;
  --t-ink: #10301a;
  --t-soft: #3f6647;
}
.pal-sunset {
  --t-bg: #ffd5ad;
  --t-card: #fffaf3;
  --t-accent: #ff5a1f;
  --t-accent-ink: #ffffff;
  --t-ink: #3a1406;
  --t-soft: #7a4a33;
}
.pal-midnight {
  --t-bg: #1b1340;
  --t-card: #2d2366;
  --t-accent: #ffe14d;
  --t-accent-ink: #1b1340;
  --t-ink: #f4f0ff;
  --t-soft: #bfb5ec;
}
.pal-ocean {
  --t-bg: #c4efff;
  --t-card: #ffffff;
  --t-accent: #1668ff;
  --t-accent-ink: #ffffff;
  --t-ink: #071a3d;
  --t-soft: #3e5579;
}
.pal-cherry {
  --t-bg: #ffe3e3;
  --t-card: #ffffff;
  --t-accent: #e0102f;
  --t-accent-ink: #ffffff;
  --t-ink: #3b0710;
  --t-soft: #7d3b45;
}

.font-chunky {
  --t-font: "Bagel Fat One", "Arial Black", sans-serif;
  --t-font-size: 1;
}
.font-marker {
  --t-font: "Caveat Brush", "Comic Sans MS", cursive;
  --t-font-size: 1.12;
}
.font-drama {
  --t-font: "DM Serif Display", Georgia, serif;
  --t-font-size: 1.08;
}
.font-drama .km-title,
.font-drama .q-prompt {
  font-style: italic;
}
.font-pixel {
  --t-font: "Pixelify Sans", "Courier New", monospace;
  --t-font-size: 0.95;
}
.font-pixel .km-title,
.font-pixel .q-prompt,
.font-pick.font-pixel {
  font-weight: 700;
}
.font-clean {
  --t-font: "Schibsted Grotesk", system-ui, sans-serif;
  --t-font-size: 1;
}
.font-clean .km-title,
.font-clean .q-prompt,
.font-pick.font-clean {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.doodle-squiggle {
  --t-doodle: url("/img/doodle-squiggle.svg");
}
.doodle-stars {
  --t-doodle: url("/img/doodle-stars.svg");
}
.doodle-hearts {
  --t-doodle: url("/img/doodle-hearts.svg");
}
.doodle-grid {
  --t-doodle: url("/img/doodle-grid.svg");
}
.doodle-none {
  --t-doodle: none;
}
.doodle-pick.km::before {
  opacity: 1;
}

/* ==========================================================================
   Motion
   ========================================================================== */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes sheet-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
@keyframes toast-in {
  from {
    transform: translateY(16px) scale(0.96);
    opacity: 0;
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
@keyframes wiggle {
  0%,
  86%,
  100% {
    transform: rotate(0);
  }
  90% {
    transform: rotate(-2deg);
  }
  94% {
    transform: rotate(2deg);
  }
}
@keyframes bob {
  50% {
    transform: translateY(-5px) rotate(-6deg);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes scribble-in {
  from {
    opacity: 0;
    transform: rotate(-12deg) scale(0.6);
  }
}
@keyframes sticker-slap {
  from {
    opacity: 0;
    scale: 1.8;
  }
  60% {
    opacity: 1;
    scale: 0.92;
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.enter {
  animation: pop-in 0.4s var(--ease-pop) both;
}
.enter-2 {
  animation-delay: 0.07s;
}
.enter-3 {
  animation-delay: 0.14s;
}
.enter-4 {
  animation-delay: 0.21s;
}
.shake {
  animation: shake 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .strip-track {
    animation: none;
  }
  .score-circle path {
    stroke-dashoffset: 0;
  }
}

@media (min-width: 720px) {
  .tpl-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .page {
    padding-top: 24px;
  }
}

.q-card:focus-visible {
  outline: none;
  box-shadow: 6px 7px 0 var(--t-ink);
}
