/* Hatful. A dark stage, a marigold spotlight, and slips of cream paper.
   Sections: fonts and tokens, base, controls, home page, pages of text,
   app frame, lobby, writing, the turn, the end, sheets and toasts, motion. */

/* ---------------------------------------------------------------- fonts --- */

@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('/fonts/fredoka-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('/fonts/fredoka-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url('/fonts/caveat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url('/fonts/caveat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #171029;
  --ink-2: #221838;
  --ink-3: #32265a;
  --line: #4a3b7c;
  --text: #f6f1ff;
  --muted: #b9addb;
  --paper: #fff7e3;
  --paper-ink: #2a2040;
  --sun: #ffc93c;
  --sun-deep: #d99a00;
  --coral: #ff6f61;
  --teal: #2fd0bd;
  --mint: #74e6a6;
  --mint-deep: #2fa868;
  --font: 'Fredoka', ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive;
  --radius: 20px;
  color-scheme: dark;
}

.team-0 { --team: var(--coral); }
.team-1 { --team: var(--teal); }

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* The stage light from above. Fixed, so it stays put while the page scrolls. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 55% at 50% -8%, #4a3492 0%, #2c1f58 42%, transparent 72%),
    var(--ink);
}

h1, h2, h3 { font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--sun); text-underline-offset: 3px; }
strong { font-weight: 600; }
small { font-size: 0.85em; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }
.hand { font-family: var(--hand); font-size: 1.25em; line-height: 1.1; }
.label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.team-name { color: var(--team); font-weight: 600; white-space: nowrap; }

/* ------------------------------------------------------------- controls --- */

.btn {
  appearance: none;
  border: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 46px;
  padding: 0.65em 1.2em;
  border-radius: 999px;
  background: var(--ink-3);
  color: var(--text);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 #0a061499;
  transition: transform 0.08s, box-shadow 0.08s, background-color 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.btn:hover { background: #3d2f6e; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a061499; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

.btn-primary { background: var(--sun); color: #2b1d00; box-shadow: 0 4px 0 var(--sun-deep); }
.btn-primary:hover { background: #ffd35c; }
.btn-primary:active { box-shadow: 0 1px 0 var(--sun-deep); transform: translateY(3px); }
.btn-good { background: var(--mint); color: #05301a; box-shadow: 0 4px 0 var(--mint-deep); }
.btn-good:hover { background: #8cecb6; }
.btn-good:active { box-shadow: 0 1px 0 var(--mint-deep); transform: translateY(3px); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { background: #ffffff10; }
.btn-ghost:active { box-shadow: inset 0 0 0 2px var(--line); }
.btn-sun { background: #ffc93c1f; color: var(--sun); box-shadow: inset 0 0 0 2px #ffc93c70; }
.btn-sun:hover { background: #ffc93c33; }
.btn-big { font-size: 1.14rem; min-height: 58px; padding: 0.8em 1.5em; }
.btn-small { font-size: 0.9rem; min-height: 38px; padding: 0.4em 0.95em; box-shadow: 0 2px 0 #0a061480; }
.btn-danger { color: #ffb4ac; }
.btn-quiet { background: transparent; box-shadow: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.btn-quiet:hover { background: #ffffff10; }
.btn.armed, .menu-item.armed { background: var(--coral); color: #2b0600; box-shadow: 0 3px 0 #b8392d; }
.btn-count { font-weight: 500; opacity: 0.7; font-variant-numeric: tabular-nums; }

.icon-btn {
  appearance: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff12;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: #ffffff22; }

.linklike {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  color: var(--sun);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.quiet-link { color: var(--muted); }

.input {
  width: 100%;
  min-height: 48px;
  padding: 0.55em 0.9em;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #0e091cb3;
  color: var(--text);
  font: inherit;
}
.input::placeholder { color: #8d81b3; }
.input:focus { outline: none; border-color: var(--sun); }
.input-big { font-size: 1.3rem; font-weight: 500; min-height: 60px; }

.name-field, .field { display: grid; gap: 8px; }
.field-label { font-weight: 600; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-label small { font-weight: 400; color: var(--muted); text-align: right; }

.segmented {
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: 16px;
  background: #0e091cb3;
}
.segmented button {
  appearance: none;
  flex: 1;
  border: 0;
  min-height: 42px;
  padding: 0.3em 0.5em;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.segmented button.on { background: var(--sun); color: #2b1d00; }

.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 16px; background: #0e091cb3; }
.stepper button {
  appearance: none;
  border: 0;
  width: 44px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink-3);
  color: var(--text);
  font: inherit;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper output { min-width: 2.4ch; text-align: center; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.toggle {
  appearance: none;
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--text);
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.toggle-track { width: 56px; height: 32px; border-radius: 999px; background: #0e091c; box-shadow: inset 0 0 0 2px var(--line); position: relative; transition: background-color 0.15s; flex: none; }
.toggle-knob { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background-color 0.15s; }
.toggle.on .toggle-track { background: #ffc93c33; box-shadow: inset 0 0 0 2px var(--sun); }
.toggle.on .toggle-knob { transform: translateX(24px); background: var(--sun); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none;
  border: 0;
  min-height: 40px;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  background: #0e091cb3;
  box-shadow: inset 0 0 0 2px var(--line);
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chip.on { background: #ffc93c26; box-shadow: inset 0 0 0 2px var(--sun); color: var(--text); }

/* A slip of paper. */
.slip {
  position: relative;
  background: var(--paper) linear-gradient(180deg, transparent 48.5%, #5b4a1a14 50%, transparent 51.5%);
  color: var(--paper-ink);
  font-family: var(--hand);
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 10px 26px #06030e80, 0 1px 0 #fff inset;
  transform: rotate(var(--tilt, 0deg));
}

/* ------------------------------------------------------------ home page --- */

html.in-app #landing { display: none; }

.landing, .doc { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand svg, .brand .logo-art { width: 40px; height: 40px; display: block; }
.brand > span:first-child { display: block; line-height: 0; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.45em 0.8em;
  border-radius: 999px;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current='page'] { background: #ffffff14; }
@media (max-width: 430px) {
  .site-head .brand { font-size: 1.3rem; gap: 8px; }
  .site-head .brand svg { width: 34px; height: 34px; }
  .site-nav { gap: 0; }
  .site-nav a { font-size: 0.93rem; padding: 0.45em 0.55em; }
}

.resume {
  display: block;
  margin: 4px 0 8px;
  padding: 0.8em 1.1em;
  border-radius: 16px;
  background: #ffc93c1f;
  box-shadow: inset 0 0 0 2px #ffc93c70;
  color: var(--sun);
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.hero {
  display: grid;
  gap: 8px;
  padding: 12px 0 40px;
  align-items: center;
}
.hero-art { order: -1; display: grid; justify-items: center; gap: 4px; }
.hero-stage { position: relative; width: min(46vw, 190px); margin-top: 46px; }
.hat-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  display: block;
  width: 100%;
  cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 18px 40px #ffc93c40);
  transition: transform 0.2s;
}
.hat-button:hover { transform: rotate(-3deg) scale(1.03); }
.hat-button svg { display: block; width: 100%; height: auto; }
.hat-button.bump { animation: bump 0.4s; }
.hero-slip {
  position: absolute;
  left: 50%;
  bottom: 84%;
  z-index: 2;
  padding: 0.18em 0.7em 0.24em;
  font-size: 1.7rem;
  line-height: 1.1;
  white-space: nowrap;
  transform: translateX(-50%) rotate(var(--tilt, -3deg));
  pointer-events: none;
}
.hero-slip.pop { animation: pop 0.45s cubic-bezier(0.2, 1.5, 0.4, 1); }
.hat-hint { color: var(--muted); font-size: 0.95rem; min-height: 1.5em; text-align: center; }

.eyebrow {
  color: var(--sun);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero h1 { font-size: clamp(2.5rem, 10.5vw, 4.4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; }
.lede { font-size: 1.16rem; color: #ded5f7; margin-top: 16px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cta .btn { flex: 1 1 220px; }
.fine { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
.aka { margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
.aka strong { color: var(--text); font-weight: 500; }

.band { padding: 40px 0; border-top: 1px solid #ffffff12; }
.band > h2 { font-size: clamp(1.7rem, 6vw, 2.4rem); margin-bottom: 22px; }

.steps { display: grid; gap: 14px; counter-reset: step; }
.steps li {
  position: relative;
  padding: 18px 18px 18px 70px;
  border-radius: var(--radius);
  background: #ffffff0a;
  border: 1px solid #ffffff12;
}
.step-no {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sun);
  color: #2b1d00;
  font-weight: 700;
  font-size: 1.2rem;
}
.steps h3 { font-size: 1.2rem; margin-bottom: 4px; }
.steps p { color: #d5cbee; }

.round-cards { display: grid; gap: 22px; padding: 6px 4px; }
.round-card {
  position: relative;
  padding: 22px 20px 20px;
  border-radius: 6px;
  background: var(--paper) linear-gradient(180deg, transparent 49%, #5b4a1a12 50%, transparent 51%);
  color: var(--paper-ink);
  box-shadow: 0 14px 30px #06030e80;
}
.round-card:nth-child(1) { transform: rotate(-1.2deg); }
.round-card:nth-child(2) { transform: rotate(0.9deg); }
.round-card:nth-child(3) { transform: rotate(-0.6deg); }
.round-no { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #7a6a9c; }
.round-card .round-emoji { position: absolute; right: 16px; top: 12px; font-size: 2rem; }
.round-card h3 { font-family: var(--hand); font-size: 2.3rem; font-weight: 700; margin: 2px 0 6px; }
.round-card p { color: #4c4166; }
.aside { margin-top: 26px; max-width: 40em; font-size: 1.1rem; color: #d5cbee; }

.ways { display: grid; gap: 14px; }
.way {
  padding: 22px;
  border-radius: var(--radius);
  background: #ffffff0a;
  border: 1px solid #ffffff12;
  display: grid;
  gap: 8px;
  justify-items: start;
}
.way-emoji { font-size: 2rem; line-height: 1; }
.way h3 { font-size: 1.3rem; }
.way p { color: #d5cbee; }
.way .btn { margin-top: 8px; }

.faq { display: grid; gap: 10px; max-width: 46em; }
details {
  border-radius: 16px;
  background: #ffffff0a;
  border: 1px solid #ffffff12;
}
summary {
  cursor: pointer;
  padding: 0.9em 2.6em 0.9em 1.1em;
  font-weight: 600;
  list-style: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 1em; top: 50%; translate: 0 -50%; font-size: 1.5rem; font-weight: 400; color: var(--sun); line-height: 1; }
details[open] > summary::after { content: '−'; }
details > p, details > ul { padding: 0 1.1em 1em; color: #d5cbee; }

.closing { text-align: center; padding-bottom: 56px; }
.closing .cta { justify-content: center; max-width: 560px; margin-inline: auto; }

.site-foot {
  padding: 28px 0 calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid #ffffff12;
  color: var(--muted);
  font-size: 0.95rem;
  display: grid;
  gap: 12px;
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot a { color: var(--muted); }

.noscript { max-width: 40em; margin: 20px auto; padding: 16px 20px; text-align: center; color: var(--muted); }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 40px; padding: 48px 0 72px; }
  .hero-art { order: 0; }
  .hero-stage { width: min(34vw, 360px); margin-top: 60px; }
  .hero-slip { font-size: 2.4rem; }
  .cta .btn { flex: 0 1 auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .round-cards { grid-template-columns: repeat(3, 1fr); }
  .ways { grid-template-columns: 1fr 1fr; }
  .band { padding: 56px 0; }
}

/* -------------------------------------------------------- pages of text --- */

.prose { max-width: 720px; padding: 24px 0 56px; }
.prose h1 { font-size: clamp(2.1rem, 8vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em; }
.prose h2 { font-size: 1.6rem; margin: 44px 0 12px; scroll-margin-top: 16px; }
.prose h3 { font-size: 1.25rem; margin: 0 0 8px; }
.prose p { margin-top: 12px; color: #ded5f7; }
.prose .lede { color: #ded5f7; }
.prose ul, .prose ol { margin-top: 12px; display: grid; gap: 8px; color: #ded5f7; }
.prose ul > li { padding-left: 1.3em; position: relative; }
.prose ul > li::before { content: ''; position: absolute; left: 0.2em; top: 0.62em; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--sun); }
.prose ol { counter-reset: item; }
.prose ol > li { padding-left: 2em; position: relative; counter-increment: item; }
.prose ol > li::before { content: counter(item); position: absolute; left: 0; top: 0.1em; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--sun); color: #2b1d00; font-weight: 700; font-size: 0.85em; display: grid; place-items: center; }
.prose strong { color: var(--text); }
.prose .cta { margin-top: 44px; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.toc a {
  padding: 0.35em 0.9em;
  border-radius: 999px;
  background: #ffffff10;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.toc a:hover { background: #ffffff20; }

.rule-round {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #ffffff0a;
  border: 1px solid #ffffff12;
  border-left: 5px solid var(--sun);
}
.rule-round p:first-of-type { margin-top: 0; }

.word-list { display: flex !important; flex-wrap: wrap; gap: 10px 10px !important; padding: 4px 0; }
.word-list li {
  padding: 0.1em 0.65em 0.2em !important;
  background: var(--paper);
  color: var(--paper-ink);
  font-family: var(--hand);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  border-radius: 3px;
  box-shadow: 0 4px 10px #06030e66;
}
.word-list li::before { display: none; }
.word-list li:nth-child(3n) { transform: rotate(-1deg); }
.word-list li:nth-child(4n + 1) { transform: rotate(0.8deg); }
.word-list li:nth-child(5n + 2) { transform: rotate(-0.4deg); background: #fffdf4; }
.word-list li:nth-child(7n) { background: #ffeecb; }

.empty-hat { text-align: center; margin: 0 auto; padding-top: 40px; }
.empty-hat svg { width: 170px; height: auto; margin: 0 auto 20px; display: block; }
.empty-hat .lede { margin-inline: auto; }
.empty-hat .cta { justify-content: center; }

/* ------------------------------------------------------------ app frame --- */

.app-inner { min-height: 100vh; min-height: 100dvh; }

.boot {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
}
.boot svg { width: 84px; height: 84px; animation: wobble 1.6s ease-in-out infinite; }

.screen {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
}
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 0 10px;
}
.brand-small { font-size: 1.15rem; gap: 8px; justify-self: start; }
.brand-small svg { width: 32px; height: 32px; }
.topbar-center { justify-self: center; }
.topbar-right { justify-self: end; display: flex; gap: 6px; }

.code-chip {
  appearance: none;
  border: 0;
  padding: 0.3em 0.75em 0.3em 0.9em;
  border-radius: 999px;
  background: #ffc93c1f;
  box-shadow: inset 0 0 0 2px #ffc93c70;
  color: var(--sun);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 1.05rem;
  cursor: pointer;
}
.mode-chip { padding: 0.3em 0.85em; border-radius: 999px; background: #ffffff12; color: var(--muted); font-size: 0.9rem; font-weight: 500; white-space: nowrap; }

.banner {
  margin-bottom: 8px;
  padding: 0.5em 1em;
  border-radius: 12px;
  background: #ff6f6126;
  box-shadow: inset 0 0 0 1px #ff6f6180;
  color: #ffd0cb;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.screen-main { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 6px 0 0; }
.stack { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.screen-title { font-size: clamp(1.9rem, 8vw, 2.5rem); font-weight: 700; letter-spacing: -0.01em; }
.screen-sub { color: var(--muted); margin-top: 6px; font-size: 1.05rem; }

.dock {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: auto;
  padding: 26px 0 calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #17102900, var(--ink) 20px);
  display: grid;
  gap: 8px;
}
.dock-row { display: flex; gap: 10px; align-items: center; }
.dock-row > .btn { flex: 1; }
.dock-row > .btn-small { flex: 0 0 auto; }
.dock-note { text-align: center; color: var(--muted); font-size: 0.95rem; }

.card {
  background: #ffffff0a;
  border: 1px solid #ffffff14;
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 14px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head h2, .card > h2 { font-size: 1.2rem; }
.count { color: var(--muted); font-size: 0.9rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 10px; align-items: center; }
.row-wrap { flex-wrap: wrap; }
.row > .btn { flex: 1; }
.row-wrap > .btn { flex: 0 1 auto; }

.waiting { flex: 1; text-align: center; color: var(--muted); padding: 10px 0; }
.dots { display: inline-flex; gap: 4px; margin-right: 10px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); animation: blink 1.2s infinite both; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }

.notice { padding: 0.8em 1em; border-radius: 14px; background: #ff6f6126; color: #ffd0cb; }

.hat { display: block; width: 132px; line-height: 0; margin: 0 auto; filter: drop-shadow(0 14px 30px #ffc93c33); }
.hat svg { width: 100%; height: auto; display: block; }
.hat-wobble svg { animation: wobble 2.4s ease-in-out infinite; transform-origin: 50% 80%; }
.hat-drop svg { animation: bump 0.5s; }
.hat-tip svg { animation: tip 1.4s 0.3s cubic-bezier(0.3, 1.4, 0.5, 1) both; transform-origin: 30% 90%; }

/* Entry screens */
.choices { display: grid; gap: 12px; }
.choice {
  appearance: none;
  border: 0;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: #ffffff0a;
  box-shadow: inset 0 0 0 2px #ffffff1a;
  color: var(--text);
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.choice:disabled { opacity: 0.5; cursor: not-allowed; }
.choice.on { background: #ffc93c1a; box-shadow: inset 0 0 0 2px var(--sun); }
.choice-emoji { font-size: 2rem; line-height: 1; }
.choice-text { display: grid; gap: 2px; }
.choice-text strong { font-size: 1.1rem; }
.choice-text small { color: var(--muted); font-size: 0.95rem; }
.choice-mark { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); }
.choice.on .choice-mark { background: var(--sun); box-shadow: inset 0 0 0 6px #2b1d00, 0 0 0 2px var(--sun); }

.code-input {
  width: 100%;
  padding: 0.25em 0 0.25em 0.42em;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: #0e091cb3;
  color: var(--sun);
  font: inherit;
  font-size: clamp(2.8rem, 16vw, 4.4rem);
  font-weight: 700;
  letter-spacing: 0.42em;
  text-align: center;
  text-transform: uppercase;
}
.code-input::placeholder { color: #4a3b7c; }
.code-input:focus { outline: none; border-color: var(--sun); }

.pass { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: 5vh; }
.pass .dock { width: 100%; }
.pass-to { font-size: 1.2rem; color: var(--muted); }
.pass-name { font-size: clamp(2.6rem, 13vw, 4rem); font-weight: 700; color: var(--team, var(--text)); overflow-wrap: anywhere; }
.pass .screen-title { margin-top: 8px; }
.pass .screen-sub { max-width: 26em; }
.invited { text-align: center; display: grid; gap: 6px; justify-items: center; padding-top: 2vh; }
.invited .hat { margin-bottom: 8px; }
.newbie p { margin-top: 8px; }
.newbie p:first-of-type { margin-top: 0; }

/* ---------------------------------------------------------------- lobby --- */

.invite { text-align: center; justify-items: center; }
.invite .row { width: 100%; }
.code-big {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--paper-ink);
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.code-static { cursor: default; }
.code-big span {
  width: clamp(54px, 17vw, 72px);
  aspect-ratio: 5 / 6;
  display: grid;
  place-items: center;
  background: var(--paper);
  border-radius: 6px;
  font-family: var(--hand);
  font-size: clamp(2.6rem, 12vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px #06030e80;
}
.code-big span:nth-child(1) { transform: rotate(-3deg); }
.code-big span:nth-child(2) { transform: rotate(2deg) translateY(2px); }
.code-big span:nth-child(3) { transform: rotate(-1.5deg) translateY(-1px); }
.code-big span:nth-child(4) { transform: rotate(3deg); }
button.code-big:active span { transform: scale(0.96); }
.invite-url { color: var(--muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.qr-box { display: grid; gap: 8px; justify-items: center; }
.qr { width: min(64vw, 230px); height: auto; aspect-ratio: 1; border-radius: 12px; display: block; }
.qr-wait { background: #ffffff10; animation: blink 1.2s infinite both; }
.invite-sheet { display: grid; gap: 14px; }

.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.team-col {
  border-radius: 16px;
  padding: 12px;
  background: color-mix(in srgb, var(--team) 10%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--team) 45%, transparent);
  display: grid;
  gap: 10px;
  min-width: 0;
}
.team-col h3 { font-size: 1rem; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.players { display: grid; gap: 6px; }
.player {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 38px;
  padding: 0.3em 0.7em;
  border-radius: 12px;
  background: #0e091c99;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  animation: arrive 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.player.me { box-shadow: inset 0 0 0 2px var(--team); }
.player.away { opacity: 0.55; }
.chip-name { overflow-wrap: anywhere; min-width: 0; }
.tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.1em 0.5em; border-radius: 999px; background: #ffffff1c; color: var(--muted); }
.tag-host { background: #ffc93c33; color: var(--sun); }
.player-gap { color: var(--muted); font-size: 0.88rem; padding: 0.4em 0.7em; border-radius: 12px; border: 2px dashed #ffffff26; text-align: center; }

.player-rows { display: grid; gap: 10px; }
.player-row { padding: 12px; border-radius: 14px; background: #ffffff0a; border-left: 5px solid var(--team); display: grid; gap: 10px; }
.player-row-name { display: grid; }
.player-row-name small { color: var(--muted); }
.player-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.settings { display: grid; gap: 18px; }
.settings-line { font-weight: 500; }

/* -------------------------------------------------------------- writing --- */

.slip-inputs { display: grid; gap: 14px; padding: 2px 4px; }
.slip-input { display: flex; align-items: center; padding: 2px 4px 2px 0; transition: transform 0.15s; }
.slip-input:focus-within { transform: rotate(0deg) scale(1.02); box-shadow: 0 0 0 3px var(--sun), 0 10px 26px #06030e80; }
.slip-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--paper-ink);
  font-family: var(--hand);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.42em 0.2em 0.42em 0.7em;
}
.slip-input input::placeholder { color: #a99cbd; font-weight: 400; }
.slip-input input:focus { outline: none; }
.dice {
  appearance: none;
  border: 0;
  background: #2a204014;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
  transition: transform 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.dice:hover { background: #2a204026; }
.dice:active { transform: rotate(180deg) scale(0.9); }

.hat-fill { text-align: center; display: grid; gap: 8px; padding-top: 8px; }
.hat-count { font-size: 1.1rem; color: var(--muted); }
.hat-count strong { color: var(--sun); font-size: 1.5rem; font-variant-numeric: tabular-nums; }

.progress { display: grid; gap: 6px; }
.progress li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 0.4em 0.7em; border-radius: 12px; background: #0e091c80; }
.progress small { color: var(--muted); }
.progress-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #ffffff14; color: var(--muted); font-size: 0.9rem; }
.progress li.done .progress-mark { background: var(--mint); color: #05301a; font-weight: 700; }

.name-inputs { display: grid; gap: 8px; }
.name-inputs li { display: flex; gap: 6px; align-items: center; }
.name-inputs .input { min-width: 0; padding-inline: 0.7em; }
.name-inputs .icon-btn { width: 34px; height: 34px; flex: none; font-size: 0.85rem; }
.teams-setup .team-col { padding: 10px; }
.btn-add { width: 100%; background: transparent; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--team) 45%, transparent); }

/* ------------------------------------------------------------- the turn --- */

.scorebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: 'a mid b';
  align-items: center;
  gap: 8px;
}
.score {
  padding: 8px 12px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--team) 14%, transparent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--team) 35%, transparent);
  display: grid;
  min-width: 0;
  transition: box-shadow 0.2s, background-color 0.2s;
}
.score.team-0 { grid-area: a; }
.score.team-1 { grid-area: b; text-align: right; }
.score.up { background: color-mix(in srgb, var(--team) 26%, transparent); box-shadow: inset 0 0 0 2px var(--team); }
.score-team { font-size: 0.82rem; font-weight: 600; color: var(--team); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-value { font-size: 1.9rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.score-mid { grid-area: mid; display: grid; justify-items: center; gap: 2px; text-align: center; }
.round-pill { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.round-kind { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }

.recap { border-color: color-mix(in srgb, var(--team) 50%, transparent); }
.recap-flag { font-family: var(--hand); font-size: 2rem; font-weight: 700; color: var(--sun); line-height: 1; transform: rotate(-2deg); transform-origin: left; }
.recap h2 { font-size: 1.25rem; font-weight: 500; }
.recap h2 strong { font-size: 1.5em; font-weight: 700; color: var(--team); }
.slips-row { display: flex; flex-wrap: wrap; gap: 10px 8px; }
.slip-mini {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.12em 0.6em 0.2em;
  font-size: 1.35rem;
  line-height: 1.2;
  box-shadow: 0 4px 10px #06030e66;
  animation: arrive 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
  cursor: default;
}
.slips-row li:nth-child(odd) .slip-mini { --tilt: -1.2deg; }
.slips-row li:nth-child(even) .slip-mini { --tilt: 1deg; }
button.slip-mini { cursor: pointer; }
.slip-x { font-family: var(--font); font-size: 0.7rem; width: 20px; height: 20px; border-radius: 50%; background: #2a20401f; display: inline-grid; place-items: center; }
.recap-fix { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #0e091c80; }

.round-intro { text-align: center; justify-items: center; gap: 6px; padding: 22px 18px; background: #ffc93c14; border-color: #ffc93c55; }
.round-intro .round-emoji { font-size: 3.2rem; line-height: 1.1; }
.round-intro h2 { font-size: 2.1rem; font-weight: 700; }
.round-rule { font-size: 1.2rem; font-weight: 500; }
.round-done { width: 100%; padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px dashed #ffc93c55; color: var(--text); }
.round-done span { color: var(--team); font-weight: 700; white-space: nowrap; }

.next-up { text-align: center; justify-items: center; gap: 4px; border-color: color-mix(in srgb, var(--team) 55%, transparent); background: color-mix(in srgb, var(--team) 9%, transparent); }
.next-up .next-name { font-size: clamp(2.2rem, 11vw, 3.2rem); font-weight: 700; color: var(--team); overflow-wrap: anywhere; }
.next-team { color: #ded5f7; }
.hat-left { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }

.turn { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.turn-top { display: flex; align-items: center; gap: 16px; }
.turn-meta { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.rule-chip { font-weight: 600; font-size: 1.05rem; }
.turn-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.turn-count strong { color: var(--text); font-size: 1.2em; }
.turn-meta .btn-quiet { padding-left: 0; min-height: 32px; }

.timer { position: relative; width: 108px; aspect-ratio: 1; flex: none; }
.timer svg { width: 100%; height: 100%; display: block; }
.timer-track { fill: none; stroke: #ffffff17; stroke-width: 9; }
.timer-ring { fill: none; stroke: var(--sun); stroke-width: 9; stroke-linecap: round; transition: stroke 0.3s; }
.timer-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.low .timer-ring { stroke: var(--coral); }
.timer.low .timer-label { color: var(--coral); }
.timer.critical { animation: pulse 0.5s ease-in-out infinite alternate; }
.timer.paused { opacity: 0.6; animation: none; }

.slip-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 8px 0; }
.slip-big {
  --tilt: -1.5deg;
  width: min(100%, 440px);
  min-height: min(38vh, 280px);
  padding: 22px 20px 26px;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.02;
  overflow-wrap: anywhere;
  animation: draw 0.3s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.slip-big.size-xl { font-size: clamp(3.6rem, 19vw, 5.6rem); }
.slip-big.size-l { font-size: clamp(3rem, 15vw, 4.4rem); }
.slip-big.size-m { font-size: clamp(2.4rem, 11.5vw, 3.5rem); }
.slip-big.size-s { font-size: clamp(2rem, 9vw, 2.8rem); }
.slip-paused { font-size: 3rem; color: #8b7fa3; animation: none; align-content: center; gap: 6px; }
.slip-paused small { font-family: var(--font); font-size: 0.95rem; font-weight: 500; }
.rule-reminder { color: var(--muted); text-align: center; max-width: 24em; }

.btn-got { flex: 2 !important; min-height: 76px; font-size: 1.5rem; }
.btn-skip { flex: 1 !important; min-height: 76px; }

.turn-watch { align-items: center; text-align: center; gap: 10px; padding-top: 12px; }
.turn-watch .timer { width: min(52vw, 190px); }
.turn-watch .timer-label { font-size: 4rem; }
.watch-who { font-size: 1.5rem; font-weight: 500; margin-top: 8px; }
.watch-who strong { color: var(--team); font-weight: 700; }
.watch-role { font-size: 1.1rem; padding: 0.4em 1em; border-radius: 18px; background: #ffffff10; }
.watch-role.mine { background: color-mix(in srgb, var(--team) 24%, transparent); font-weight: 600; }
.watch-count { display: grid; margin-top: 6px; }
.watch-count strong { font-size: 3.4rem; font-weight: 700; line-height: 1; color: var(--sun); font-variant-numeric: tabular-nums; }
.watch-count span { color: var(--muted); font-size: 0.95rem; }
.feed { justify-content: center; }
.turn-watch .dock { width: 100%; }
.turn-watch .dock-row { justify-content: center; }

/* -------------------------------------------------------------- the end --- */

.final { text-align: center; display: grid; justify-items: center; gap: 6px; padding-top: 8px; }
.final-title { font-size: clamp(2rem, 9vw, 2.8rem); font-weight: 700; }
.final-score { font-size: clamp(4rem, 22vw, 6rem); font-weight: 700; line-height: 1; display: flex; gap: 0.15em; font-variant-numeric: tabular-nums; }
.final-score .team-0, .final-score .team-1 { color: var(--team); }
.final-sep { color: var(--muted); }

.rounds-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rounds-table th { font-size: 0.82rem; font-weight: 600; color: var(--team, var(--muted)); text-align: right; padding: 4px 6px 8px; white-space: nowrap; }
.rounds-table th:first-child { text-align: left; color: var(--muted); }
.rounds-table td { padding: 8px 6px; border-top: 1px solid #ffffff14; text-align: right; font-size: 1.15rem; font-weight: 500; }
.rounds-table td:first-child { text-align: left; font-size: 1rem; }
.rounds-table td.best { color: var(--sun); font-weight: 700; }

.awards { display: grid; gap: 10px; }
.award {
  position: relative;
  padding: 14px 16px 14px 66px;
  border-radius: var(--radius);
  background: #ffffff0a;
  border: 1px solid #ffffff14;
  display: grid;
  gap: 1px;
}
.award-emoji { position: absolute; left: 16px; top: 50%; translate: 0 -50%; font-size: 2rem; }
.award strong { font-size: 1.25rem; }
.award strong.hand { font-size: 1.7rem; }
.award small { color: var(--muted); }

.authors { padding: 0; display: block; }
.authors ul { padding: 0 1.1em 1em; display: grid; gap: 6px; }
.authors li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #ffffff1c; padding-bottom: 4px; }
.authors small { color: var(--muted); white-space: nowrap; }

/* ----------------------------------------------------- sheets and toasts --- */

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #08040fb3;
  display: grid;
  align-items: end;
  justify-items: center;
  animation: fade 0.15s;
}
.sheet {
  width: min(100%, 540px);
  max-height: 88dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--ink-2);
  border: 1px solid #ffffff1c;
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
  animation: rise 0.22s cubic-bezier(0.2, 1, 0.3, 1);
}
.sheet:focus { outline: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 12px; position: sticky; top: -8px; background: var(--ink-2); z-index: 1; }
.sheet-head h2 { font-size: 1.4rem; }
.sheet-body { display: grid; gap: 14px; }
@media (min-width: 620px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 26px; border-bottom: 1px solid #ffffff1c; padding-bottom: 22px; }
}

.menu { display: grid; gap: 8px; }
.menu-item {
  appearance: none;
  border: 0;
  width: 100%;
  min-height: 54px;
  padding: 0.6em 1em;
  border-radius: 16px;
  background: #ffffff0d;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: 1.05rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-item:hover { background: #ffffff1a; }
.menu-danger { color: #ffb4ac; }

.rules-steps { display: grid; gap: 8px; counter-reset: item; }
.rules-steps li { padding-left: 2.1em; position: relative; counter-increment: item; }
.rules-steps li::before { content: counter(item); position: absolute; left: 0; top: 0.1em; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--sun); color: #2b1d00; font-weight: 700; font-size: 0.85em; display: grid; place-items: center; }
.rules-rounds { display: grid; gap: 8px; }
.rules-rounds li { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px; border-radius: 14px; background: #ffffff0a; }
.rules-rounds .round-emoji { font-size: 1.7rem; line-height: 1.2; }
.rules-rounds p { color: var(--muted); font-size: 0.95rem; }

.toasts {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(12px + env(safe-area-inset-top));
  z-index: 60;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  max-width: 460px;
  padding: 0.65em 1.1em;
  border-radius: 16px;
  background: var(--paper);
  color: var(--paper-ink);
  font-weight: 500;
  text-align: center;
  box-shadow: 0 12px 30px #06030ea6;
  animation: toast 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.toast-error { background: #ffd9d4; color: #5a0f08; }

.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 70; pointer-events: none; }

/* ----------------------------------------------------------------- motion --- */

@keyframes pop {
  from { transform: translate(-50%, 90%) scale(0.3) rotate(0deg); opacity: 0; }
  to { transform: translate(-50%, 0) scale(1) rotate(var(--tilt, -3deg)); opacity: 1; }
}
@keyframes bump {
  0%, 100% { transform: none; }
  30% { transform: translateY(6px) scale(1.04, 0.95); }
  60% { transform: translateY(-4px) scale(0.98, 1.03); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
@keyframes tip {
  0% { transform: rotate(0deg); }
  40% { transform: rotate(-22deg) translateY(-6px); }
  100% { transform: rotate(0deg); }
}
@keyframes draw {
  from { transform: translateY(46px) rotate(5deg) scale(0.86); opacity: 0; }
  to { transform: rotate(var(--tilt, 0deg)); opacity: 1; }
}
@keyframes arrive {
  from { transform: scale(0.7) rotate(var(--tilt, 0deg)); opacity: 0; }
  to { transform: rotate(var(--tilt, 0deg)); opacity: 1; }
}
@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}
@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}
@keyframes fade {
  from { opacity: 0; }
}
@keyframes rise {
  from { transform: translateY(40px); opacity: 0; }
}
@keyframes toast {
  from { transform: translateY(-16px) scale(0.9); opacity: 0; }
}

@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;
  }
}
