:root {
  --yellow: #ffe135;
  --red: #ff3b3b;
  --blue: #2d7ff9;
  --pink: #ff4fa3;
  --cyan: #22d3ee;
  --green: #35d07f;
  --orange: #ff8a1f;
  --ink: #111;
  --paper: #fff8e7;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-s: 4px 4px 0 var(--ink);
  --border: 4px solid var(--ink);
  --font: 'Bangers', 'Dela Gothic One', system-ui, sans-serif;
  --font-jp: 'Dela Gothic One', 'Hiragino Sans', system-ui, sans-serif;
  --burst: polygon(50% 0%, 58.5% 13%, 71.7% 5%, 73.7% 20.3%, 89.1% 18.8%, 84.2% 33.5%, 98.7% 38.9%, 88% 50%, 98.7% 61.1%, 84.2% 66.5%, 89.1% 81.2%, 73.7% 79.7%, 71.7% 95%, 58.5% 87%, 50% 100%, 41.5% 87%, 28.3% 95%, 26.3% 79.7%, 10.9% 81.2%, 15.8% 66.5%, 1.3% 61.1%, 12% 50%, 1.3% 38.9%, 15.8% 33.5%, 10.9% 18.8%, 26.3% 20.3%, 28.3% 5%, 41.5% 13%);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-jp);
  color: var(--ink);
  background-color: var(--yellow);
  /* ベンデイ・ドット */
  background-image: radial-gradient(circle, rgba(255, 79, 163, .45) 26%, transparent 28%);
  background-size: 18px 18px;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  transition: background-color .4s;
}

button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(40px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

/* ---------- 画面切替 ---------- */
.screen { display: none; }
.screen.active { display: block; animation: screen-in .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes screen-in { from { transform: scale(.9) rotate(-2deg); opacity: 0; } }

/* ---------- 共通パーツ ---------- */
.panel {
  background: #fff;
  border: var(--border);
  box-shadow: var(--shadow);
  border-radius: 6px;
  padding: 16px;
  margin: 20px 0;
}

h2 {
  font-family: var(--font);
  font-weight: 400;
  margin: 0 0 12px;
  font-size: 1.4rem;
  letter-spacing: .04em;
}

.bubble {
  position: relative;
  display: inline-block;
  background: var(--cyan);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 1rem;
  box-shadow: var(--shadow-s);
}
.bubble::after {
  content: '';
  position: absolute;
  left: 24px; bottom: -14px;
  border: 7px solid transparent;
  border-top: 9px solid var(--ink);
}

.btn {
  font-family: var(--font-jp);
  font-size: 1rem;
  padding: 12px 18px;
  border: var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-s);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-white { background: #fff; }

/* ---------- タイトル ---------- */
.logo { position: relative; text-align: center; padding-top: 18px; }
.logo h1 {
  font-family: var(--font);
  font-weight: 400;
  margin: 0;
  line-height: .9;
  transform: rotate(-4deg);
}
.logo h1 span { display: block; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.logo .l1 {
  font-size: clamp(3.4rem, 17vw, 5.6rem);
  color: var(--red);
  text-shadow: 5px 5px 0 var(--ink);
}
.logo .l2 {
  font-size: clamp(2.6rem, 13vw, 4.4rem);
  color: var(--blue);
  text-shadow: 5px 5px 0 var(--ink);
  margin-top: 4px;
}
.logo-burst {
  position: absolute;
  left: -6px; top: 0;
  width: 92px; height: 92px;
  background: var(--pink);
  clip-path: var(--burst);
  display: grid; place-items: center;
  animation: wobble 1.6s ease-in-out infinite;
  z-index: 2;
}
.logo-burst span {
  font-family: var(--font);
  font-size: 1.5rem;
  color: #fff;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  transform: rotate(12deg);
}
@keyframes wobble { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.1); } }

.tagline {
  display: inline-block;
  margin: 18px 0 0;
  background: var(--ink);
  color: var(--yellow);
  padding: 6px 12px;
  font-size: .95rem;
  transform: rotate(1.5deg);
}

.name-panel { background: var(--paper); }
.name-panel .bubble { margin-bottom: 18px; }
#name {
  width: 100%;
  font: inherit;
  font-size: 1.25rem;
  padding: 12px 14px;
  border: var(--border);
  border-radius: 6px;
  background: #fff;
  outline: none;
}
#name:focus { box-shadow: 0 0 0 4px var(--pink); }
#name.shake { animation: shake .4s; border-color: var(--red); }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.target-panel { background: var(--blue); }
.target-panel h2 { color: #fff; -webkit-text-stroke: 1px var(--ink); font-family: var(--font-jp); font-size: 1.1rem; }
.targets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.targets button {
  font-family: var(--font);
  font-size: 2rem;
  line-height: 1;
  padding: 10px 0 6px;
  background: #fff;
  border: var(--border);
  border-radius: 50%;
  aspect-ratio: 1;
  box-shadow: var(--shadow-s);
  transition: transform .12s;
}
.targets button small { display: block; font-family: var(--font-jp); font-size: .7rem; }
.targets button[aria-checked="true"] {
  background: var(--yellow);
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 4px 4px 0 var(--ink), 0 0 0 6px var(--pink);
}
.targets button:nth-child(1)[aria-checked="true"] { background: var(--yellow); }
.targets button:nth-child(2)[aria-checked="true"] { background: var(--cyan); }
.targets button:nth-child(3)[aria-checked="true"] { background: var(--green); }
.targets button:nth-child(4)[aria-checked="true"] { background: var(--orange); }
.targets button:nth-child(5)[aria-checked="true"] { background: var(--pink); }
.targets button:nth-child(6)[aria-checked="true"] { background: var(--red); color: #fff; }

.btn-start {
  display: grid;
  place-items: center;
  margin: 8px auto 0;
  width: 220px; height: 220px;
  border: none;
  background: var(--ink);
  clip-path: var(--burst);
  animation: pulse 1.1s ease-in-out infinite;
  position: relative;
}
.btn-start::before {
  content: '';
  position: absolute;
  inset: 8px;
  background: var(--red);
  clip-path: var(--burst);
}
.btn-start span {
  position: relative;
  font-family: var(--font);
  font-size: 3rem;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-6deg);
}
.btn-start:active { transform: scale(.92); }
@keyframes pulse { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.06) rotate(4deg); } }

.howto {
  text-align: center;
  background: #fff;
  border: 3px dashed var(--ink);
  padding: 10px;
  font-size: .9rem;
  line-height: 1.7;
}
.howto b { color: var(--red); }

/* ---------- モード選択 ---------- */
.mode-panel { background: var(--pink); }
.mode-panel h2 { color: #fff; -webkit-text-stroke: 1px var(--ink); font-family: var(--font-jp); font-size: 1.1rem; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modes button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px;
  background: #fff;
  border: var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-s);
  font-family: var(--font-jp);
  transition: transform .12s;
}
.modes .em { font-size: 2.2rem; line-height: 1; }
.modes b { font-size: 1.05rem; }
.modes small { font-size: .72rem; line-height: 1.4; color: #444; }
.modes button[aria-checked="true"] { background: var(--yellow); transform: rotate(-3deg) scale(1.04); box-shadow: 4px 4px 0 var(--ink), 0 0 0 5px var(--blue); }
.modes button[data-mode="jama"][aria-checked="true"] {
  background: repeating-linear-gradient(45deg, var(--yellow) 0 14px, var(--orange) 14px 28px);
  transform: rotate(3deg) scale(1.04);
}
.modes button[data-mode="jama"][aria-checked="true"] .em { animation: wobble .5s ease-in-out infinite; }
.mode-tag { display: inline-block; margin-right: 8px; font-size: 1rem; }
.mode-tag:empty { display: none; }

/* ---------- ランキング ---------- */
.ranking { background: var(--paper); }
.rk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rk-head h2 {
  margin: 0;
  font-size: 2rem;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
}
.period { display: flex; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; }
.period button { border: none; background: #fff; padding: 6px 12px; font-family: var(--font-jp); font-size: .85rem; }
.period button.on { background: var(--ink); color: var(--yellow); }

.rk-modes { display: flex; gap: 6px; margin-top: 12px; }
.rk-modes button {
  flex: 1;
  font-family: var(--font-jp);
  font-size: .85rem;
  padding: 6px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: #fff;
}
.rk-modes button.on { background: var(--pink); color: #fff; }
.rk-modes button[data-mode="jama"].on { background: var(--orange); color: var(--ink); }
.rk-targets { display: flex; gap: 5px; margin: 12px 0; flex-wrap: wrap; }
.rk-targets button {
  font-family: var(--font);
  font-size: 1rem;
  padding: 4px 8px 2px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}
.rk-targets button.on { background: var(--blue); color: #fff; }

.rk-list { list-style: none; margin: 0; padding: 0; }
.rk-list li {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  margin-bottom: 8px;
}
.rk-list li.me { background: var(--cyan); animation: me-blink 1s steps(2) 4; }
@keyframes me-blink { 50% { background: var(--yellow); } }
.rk-no {
  font-family: var(--font);
  font-size: 1.5rem;
  text-align: center;
  line-height: 1;
}
.rk-list li:nth-child(1) .rk-no { font-size: 1.9rem; }
.rk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
.rk-score { text-align: right; font-family: var(--font); font-size: 1.25rem; line-height: 1.05; }
.rk-score small { display: block; font-size: .85rem; color: #555; }
.rk-list li:nth-child(1) { background: var(--yellow); }
.rk-list li:nth-child(1).me { background: var(--cyan); }
.rk-msg { text-align: center; margin: 8px 0 0; font-size: .9rem; }
.rk-msg:empty { display: none; }

/* ---------- カウントダウン ---------- */
#screen-countdown, #screen-play {
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}
#screen-countdown.active, #screen-play.active { display: flex; }

.cd-label, .play-target {
  font-size: 1.3rem;
  background: #fff;
  border: var(--border);
  box-shadow: var(--shadow-s);
  padding: 8px 18px;
  margin: 0;
  transform: rotate(-2deg);
}
.cd-label b, .play-target b { font-family: var(--font); font-size: 2rem; color: var(--red); }

.cd-burst {
  margin: 24px 0;
  width: min(80vw, 340px);
  aspect-ratio: 1;
  background: var(--red);
  clip-path: var(--burst);
  display: grid;
  place-items: center;
  animation: spin 6s linear infinite;
}
#count {
  font-family: var(--font);
  font-size: min(44vw, 190px);
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 8px 8px 0 var(--ink);
  animation: spin-rev 6s linear infinite;
}
#count.pop { animation: count-pop .5s cubic-bezier(.2, 1.8, .4, 1), spin-rev 6s linear infinite; }
@keyframes count-pop { from { transform: scale(2.4); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
.cd-warn { font-size: .9rem; background: var(--ink); color: #fff; padding: 4px 10px; }

/* ---------- プレイ中 ---------- */
body.playing {
  background-color: var(--blue);
  background-image:
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, .14) 0 10deg, transparent 10deg 20deg),
    radial-gradient(circle, rgba(0, 0, 0, .18) 26%, transparent 28%);
  background-size: 100% 100%, 16px 16px;
  cursor: pointer;
  touch-action: manipulation;
}
.mystery {
  margin: 32px 0;
  padding: 28px 22px;
  background: #fff;
  border: 5px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  border-radius: 10px;
  animation: float 2.3s ease-in-out infinite;
}
.mystery .q {
  font-family: var(--font);
  font-size: min(20vw, 104px);
  letter-spacing: .04em;
  color: var(--pink);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.tap-hint {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #fff;
  -webkit-text-stroke: 1px var(--ink);
  margin: 0;
}
.tap-hint b { font-size: 1.6rem; color: var(--yellow); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.go-pop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font);
  font-size: min(48vw, 260px);
  color: var(--yellow);
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
  text-shadow: 10px 10px 0 var(--ink);
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}
.go-pop.show { animation: go-pop .8s ease-out forwards; }
@keyframes go-pop {
  0% { transform: scale(.3) rotate(-20deg); opacity: 1; }
  40% { transform: scale(1.1) rotate(4deg); opacity: 1; }
  100% { transform: scale(1.6) rotate(0); opacity: 0; }
}

/* ---------- じゃまモード ---------- */
body.playing.jama-play {
  background-color: var(--jama-bg, var(--orange));
  transition: background-color .08s;
}
body.jama-play .mystery { animation-duration: var(--beat, .5s); }
body.jama-tilt main { transform: rotate(-6deg) scale(1.03); transition: transform .2s cubic-bezier(.2, 1.8, .4, 1); }
.jama { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.fake-timer {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top)); right: 12px;
  background: var(--ink);
  color: var(--green);
  border: 3px solid #fff;
  border-radius: 6px;
  padding: 4px 10px 2px;
  text-align: center;
  transform: rotate(4deg);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .4);
}
.fake-timer small { display: block; font-family: var(--font-jp); font-size: .65rem; color: #fff; }
.fake-timer span { font-family: var(--font); font-size: 2.2rem; letter-spacing: .05em; }
.dancer {
  position: absolute;
  font-size: clamp(40px, 12vw, 64px);
  animation: dance var(--beat, .5s) ease-in-out infinite alternate;
  filter: drop-shadow(3px 3px 0 var(--ink));
}
.dancer.hop { translate: 0 0; animation: dance var(--beat, .5s) ease-in-out infinite alternate, hop .18s ease-out; }
@keyframes dance { from { transform: rotate(-18deg); } to { transform: rotate(18deg) scale(1.1); } }
@keyframes hop { 50% { translate: 0 -16px; } }
.jama-word {
  position: absolute;
  font-family: var(--font);
  font-size: clamp(1.6rem, 8vw, 2.6rem);
  color: #fff;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 2px 12px 0;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--ink);
  animation: word-pop 1.2s cubic-bezier(.2, 1.8, .4, 1) forwards;
}
.jama-word.big { font-size: clamp(2.6rem, 14vw, 4.4rem); background: var(--red) !important; }
@keyframes word-pop {
  0% { transform: rotate(var(--r)) scale(0); opacity: 1; }
  25% { transform: rotate(var(--r)) scale(1.1); }
  80% { opacity: 1; }
  100% { transform: rotate(var(--r)) scale(1); opacity: 0; }
}

/* ---------- 結果 ---------- */
.result-burst {
  margin: 8px auto 0;
  width: min(86vw, 380px);
  aspect-ratio: 1.25;
  background: var(--yellow);
  clip-path: var(--burst);
  display: grid;
  place-items: center;
  position: relative;
  animation: burst-in .6s cubic-bezier(.2, 1.8, .4, 1);
  filter: drop-shadow(6px 6px 0 var(--ink));
}
.result-burst.c-red { background: var(--red); }
.result-burst.c-blue { background: var(--blue); }
.result-burst.c-pink { background: var(--pink); }
.result-burst.c-gray { background: #bbb; }
.result-burst.c-rainbow {
  background: conic-gradient(var(--red), var(--orange), var(--yellow), var(--green), var(--cyan), var(--blue), var(--pink), var(--red));
  animation: burst-in .6s cubic-bezier(.2, 1.8, .4, 1), hue 2s linear infinite;
}
@keyframes burst-in { from { transform: scale(0) rotate(-180deg); } }
@keyframes hue { to { filter: drop-shadow(6px 6px 0 var(--ink)) hue-rotate(360deg); } }
#r-word {
  font-family: var(--font);
  font-size: clamp(3rem, 15vw, 5rem);
  color: #fff;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-8deg);
}
.r-comment { display: table; margin: 4px auto 0; background: #fff; font-size: 1.05rem; }

.score-card { text-align: center; background: #fff; }
.r-time {
  font-family: var(--font);
  font-size: clamp(3.6rem, 18vw, 5.4rem);
  line-height: 1;
}
.r-time small { font-family: var(--font-jp); font-size: 1.2rem; margin-left: 6px; }
.r-diff { font-size: 1.15rem; margin-top: 4px; }
.r-diff .early { color: var(--blue); }
.r-diff .late { color: var(--red); }
.r-rank {
  margin-top: 12px;
  font-size: 1.05rem;
  background: var(--ink);
  color: var(--yellow);
  padding: 8px;
  border-radius: 4px;
}
.r-rank:empty { display: none; }
.r-rank b { font-family: var(--font); font-size: 1.6rem; color: #fff; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions #again { grid-column: 1 / -1; font-size: 1.4rem; padding: 14px; }

/* ---------- 演出 ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 15; opacity: 0; background: #fff; }
#flash.on { animation: flash .5s ease-out; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }

.mute {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  right: 10px;
  z-index: 30;
  width: 48px; height: 48px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 1.3rem;
}
body.playing .mute, body.counting .mute { display: none; }

.banner {
  position: fixed;
  left: 50%; top: 22%;
  z-index: 25;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-8deg) scale(0);
  background: var(--red);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 10px 26px 4px;
  white-space: nowrap;
}
.banner span {
  font-family: var(--font);
  font-size: clamp(2.2rem, 11vw, 4.2rem);
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
}
.banner.show { animation: banner 3.2s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes banner {
  0% { transform: translate(-50%, -50%) rotate(-30deg) scale(0); }
  15% { transform: translate(-50%, -50%) rotate(-8deg) scale(1.15); }
  25%, 80% { transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
  100% { transform: translate(-50%, -50%) rotate(-8deg) scale(0); }
}

.popper {
  position: fixed;
  bottom: -160px;
  font-size: 72px;
  line-height: 1;
  opacity: 0;
  z-index: 21;
  pointer-events: none;
  transition: bottom .4s cubic-bezier(.2, 1.6, .4, 1);
}
.popper.left { left: 4px; transform: rotate(10deg); }
.popper.right { right: 4px; transform: scaleX(-1) rotate(10deg); }
body.party .popper, body.party-lite .popper { bottom: 6px; opacity: 1; }
.popper.fire { animation: kick .25s; }
@keyframes kick { 50% { translate: 0 -18px; scale: 1.25; } }

/* 1位：画面全体がお祝いモード */
body.party {
  background-image:
    repeating-conic-gradient(from 0deg at 50% 40%, rgba(255, 255, 255, .35) 0 9deg, transparent 9deg 18deg),
    radial-gradient(circle, rgba(0, 0, 0, .15) 26%, transparent 28%);
  background-size: 100% 100%, 16px 16px;
  background-attachment: fixed;
  animation: party-bg 1.2s steps(1) infinite;
}
@keyframes party-bg {
  0% { background-color: var(--red); }
  16% { background-color: var(--orange); }
  33% { background-color: var(--yellow); }
  50% { background-color: var(--green); }
  66% { background-color: var(--cyan); }
  83% { background-color: var(--pink); }
}
body.party main { animation: shake-screen .5s 3; }
body.party .score-card { animation: rainbow-border 1s linear infinite; }
@keyframes rainbow-border {
  0% { box-shadow: 8px 8px 0 var(--red); }
  25% { box-shadow: 8px 8px 0 var(--yellow); }
  50% { box-shadow: 8px 8px 0 var(--cyan); }
  75% { box-shadow: 8px 8px 0 var(--pink); }
}
@keyframes shake-screen {
  20% { transform: translate(-6px, 4px) rotate(-1deg); }
  40% { transform: translate(6px, -4px) rotate(1deg); }
  60% { transform: translate(-4px, -2px); }
  80% { transform: translate(4px, 2px); }
}
body.party-lite { background-color: var(--pink); }

.crown {
  position: fixed;
  left: 50%; top: -120px;
  font-size: 96px;
  z-index: 24;
  pointer-events: none;
  translate: -50% 0;
  animation: crown-drop 1.4s cubic-bezier(.3, 1.6, .5, 1) forwards;
}
@keyframes crown-drop { to { top: 8px; rotate: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  body.party { background-color: var(--yellow); }
}

@media (min-width: 640px) {
  .targets { grid-template-columns: repeat(6, 1fr); }
  .targets button { font-size: 1.7rem; }
}
