/* Kawaii Corner · Pokémon 30th Party theme (matches shopkawaiicorner.com/pages/pokemon-30th-party)
   Cream-stripe ground, white scalloped header, bubblegum pink lettering with a thick white
   outline, pastel pill buttons with a solid offset shadow, sky-blue accents. Fredoka throughout. */
:root {
  --ink: #C2477C;
  --ink-2: #C2477C;
  --muted: #A0648A;
  --navy: #FFFFFF;
  --navy-2: #FFE4F0;
  --pink: #F990BB;
  --pink-deep: #D9467F;
  --pink-text: #C23F78;
  --pink-soft: #FFE4F0;
  --pink-bg: #FFF0F6;
  --pink-dot: #FBD0E2;
  --pink-shadow: #F7C3D9;
  --blue: #86D1F5;
  --blue-mid: #6EB7E7;
  --blue-deep: #608AB2;
  --blue-line: #ACC7E7;
  --blue-soft: #E0F5FF;
  --blue-shadow: #9FCFEA;
  --gold: #FFE08A;
  --gold-shadow: #E8C35C;
  --white: #FFFFFF;
  --line: #E4E4EA;
  --error: #B4234F;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Fredoka', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-weight: 500;
  color: var(--ink);
  background-color: #FFF7E6;
  background-image: url(/img/pattern.jpg);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; }

.display { font-family: var(--display); font-weight: 700; }

/* ---------- top bar ---------- */
.topbar { background: var(--white); }
.stroke { color: var(--pink); -webkit-text-stroke: 6px #fff; paint-order: stroke fill; }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 14px 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  max-width: 560px; margin: 0 auto;
}
.topbar img.logo { width: 92px; height: auto; display: block; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--blue-deep); text-transform: uppercase; }
.roof { display: block; width: 100%; height: 22px; object-fit: cover; object-position: top; margin-top: -1px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 0 26px; border: none; border-radius: 999px;
  font-size: 20px; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.btn:active { transform: translateY(3px); }
/* pastel pill + pink outline + white lettering with a pink outline + solid offset shadow */
.btn-primary, .btn-dark {
  border: 4px solid var(--pink); background: var(--pink-soft); color: var(--white);
  -webkit-text-stroke: 4px var(--pink); paint-order: stroke fill; box-shadow: 0 6px 0 var(--pink);
  text-transform: uppercase; letter-spacing: .04em;
}
.btn-primary:active, .btn-dark:active { box-shadow: 0 2px 0 var(--pink); }
.btn-dark { border-color: var(--blue); background: var(--blue-soft); -webkit-text-stroke-color: var(--blue-mid); box-shadow: 0 6px 0 var(--blue); }
.btn-dark:active { box-shadow: 0 2px 0 var(--blue); }
.btn-ghost { background: var(--white); color: var(--ink-2); border: 3px solid var(--line); min-height: 56px; }
.btn[disabled] { background: #F6F2F4; border-color: #E4DDE2; color: var(--white); -webkit-text-stroke: 4px #CDBFC8; box-shadow: 0 6px 0 #E4DDE2; cursor: default; transform: none; }
.btn-block { width: 100%; }
.link-btn { background: none; border: none; color: var(--blue-deep); font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 8px; }

/* ---------- cards ---------- */
.card {
  background: var(--white); border-radius: 28px;
  outline: 3px dotted var(--pink); outline-offset: -10px;
  box-shadow: 0 8px 0 var(--pink-shadow);
  padding: 26px 22px;
}
.card.blue { outline-color: var(--blue); box-shadow: 0 8px 0 var(--blue-shadow); }

/* ---------- mini prize art ---------- */
.giftcard {
  width: 104px; height: 66px; flex: none; border-radius: 10px; border: 3px solid var(--white);
  box-shadow: 0 4px 0 #F5B3CF; transform: rotate(4deg); padding: 6px 8px;
  display: flex; flex-direction: column; justify-content: space-between;
  background-color: var(--pink-soft);
  background-image: radial-gradient(var(--white) 1.5px, transparent 2px); background-size: 10px 10px;
}
.giftcard img { width: 40px; display: block; }
.giftcard b { font-family: var(--display); font-weight: 700; font-size: 15px; }
.pass {
  width: 112px; height: 66px; flex: none; display: flex; border-radius: 10px; overflow: hidden;
  border: 3px solid var(--white); box-shadow: 0 4px 0 var(--blue-shadow); transform: rotate(-4deg); background: var(--blue-soft);
}
.pass .main { flex: 1; padding: 5px 7px; display: flex; flex-direction: column; justify-content: space-between; }
.pass .tag { font-size: 8px; font-weight: 700; letter-spacing: 1px; color: var(--blue-deep); }
.pass .route { font-family: var(--display); font-weight: 700; font-size: 13px; }
.pass .stub {
  width: 26px; border-left: 2px dashed var(--blue); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 10px; color: var(--pink-deep); writing-mode: vertical-rl;
}
/* The prize cards float, sway and catch the light. They animate `translate` / `rotate`
   (separate from their `transform` tilt and the TV's `scale`), so nothing else moves.
   Different lengths keep the two cards out of step. Reduced-motion users get still cards. */
.pass, .giftcard { position: relative; animation: prizeFloatA 4.2s ease-in-out infinite; }
.giftcard { overflow: hidden; animation-name: prizeFloatB; animation-duration: 4.9s; animation-delay: -2.4s; }
.pass::after, .giftcard::after {
  content: ''; position: absolute; top: -30%; bottom: -30%; left: -70%; width: 38%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .8), transparent);
  transform: skewX(-18deg); animation: prizeShine 5.6s ease-in-out infinite;
}
.giftcard::after { animation-delay: 2.8s; }
/* Tapped on the vote screen: one happy hop, then a quicker float while it's the pick. */
.opt[aria-pressed="true"] .pass, .opt[aria-pressed="true"] .giftcard {
  animation: prizeHop .65s cubic-bezier(.3, 1.6, .5, 1) 1, prizeFloatA 2.2s ease-in-out .65s infinite;
}
@keyframes prizeFloatA { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -7px; rotate: -1.5deg; } }
@keyframes prizeFloatB { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -7px; rotate: 1.5deg; } }
@keyframes prizeShine { 0%, 68% { left: -70%; } 100% { left: 135%; } }
@keyframes prizeHop { 0% { translate: 0 0; rotate: 0deg; } 40% { translate: 0 -16px; rotate: -5deg; } 100% { translate: 0 0; rotate: 0deg; } }

/* ---------- stickers ---------- */
.jar {
  position: relative; border-radius: 20px; padding: 10px;
  display: flex; flex-wrap: wrap-reverse; align-content: flex-start; justify-content: flex-start;
  background-size: 34px 34px;
}
.jar.japan {
  background-color: #F4FBFF; border: 3px solid #CBE8F8;
  background-image: linear-gradient(#DDF0FB 1px, transparent 1px), linear-gradient(90deg, #DDF0FB 1px, transparent 1px);
}
.jar.gift {
  background-color: #FFF7FB; border: 3px solid #F8D3E3;
  background-image: linear-gradient(#FBE0EC 1px, transparent 1px), linear-gradient(90deg, #FBE0EC 1px, transparent 1px);
}
.jar-empty {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 16px; font-weight: 600; color: var(--muted); pointer-events: none;
}
.sticker {
  --s: 34px; --c: var(--pink); --r: 0deg;
  position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%;
  border: max(2px, calc(var(--s) * 0.08)) solid var(--white);
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0 calc(var(--s) * .1), var(--c) calc(var(--s) * .14));
  box-shadow: 0 2px 0 rgba(26,34,48,.18);
  transform: rotate(var(--r));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: calc(var(--s) * .32); line-height: 1; color: var(--ink);
}
.sticker.ball {
  border: none; box-shadow: none; background: url(/img/pokeball.png) center / contain no-repeat;
  color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff;
}
.poke {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 50%; overflow: hidden;
  background-repeat: no-repeat; image-rendering: pixelated; pointer-events: none;
}
.sticker.has-poke {
  background: radial-gradient(circle at 50% 50%, var(--white) 0 46%, var(--c) 47%);
}
/* ---------- living Pokémon + move effects ---------- */
.sticker.has-poke .poke { animation: breathe 3s ease-in-out infinite; animation-delay: var(--d, 0s); }
.sticker.has-poke { cursor: pointer; }
.sticker.has-poke.mini { background: var(--c); border-width: 2px; box-shadow: 0 1px 0 rgba(26,34,48,.18); }
.sticker.has-poke.mini .poke { animation: none; }

/* tug-of-war bar */
.tug { display: flex; height: 44px; border-radius: 999px; overflow: hidden; border: 3px solid var(--white); box-shadow: 0 5px 0 var(--pink-shadow); background: var(--white); }
.tug > div { display: flex; align-items: center; min-width: 0; padding: 0 14px; font-weight: 700; white-space: nowrap; transition: flex-grow .6s ease; }
.tug .japan { background: var(--blue); color: var(--white); -webkit-text-stroke: 4px var(--blue-mid); paint-order: stroke fill; justify-content: flex-start; }
.tug .gift { background: var(--pink); color: var(--white); -webkit-text-stroke: 4px var(--pink-deep); paint-order: stroke fill; justify-content: flex-end; }
@keyframes breathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4%) scale(1.06); } }
.fx-layer { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 8; overflow: visible; }
.fx-p { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; display: block; }
.fx-ring { border-style: solid; border-radius: 50%; box-sizing: border-box; background: transparent; }
.fx-flash { border-radius: 50%; filter: blur(3px); }
.fx-note { font-family: var(--display); font-weight: 700; line-height: 1; text-align: center; text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.fx-coin { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF6C8 0 20%, #FFC93C 21% 70%, #E0A100 71%); box-shadow: 0 0 0 2px #fff; }
.fx-say {
  position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 0; z-index: 9; pointer-events: none;
  background: var(--pink-deep); color: var(--white); font: 700 12px/1.2 var(--body); letter-spacing: .2px;
  padding: 5px 10px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 0 var(--pink);
}
.fx-say.below { bottom: auto; top: calc(100% + 12px); }
.sticker .ini {
  position: absolute; left: 50%; bottom: calc(var(--s) * -0.18); transform: translateX(-50%) rotate(calc(var(--r) * -1));
  background: var(--white); color: var(--ink); font-family: var(--body); font-weight: 700;
  font-size: max(9px, calc(var(--s) * .24)); letter-spacing: .5px; line-height: 1.2;
  padding: 1px 6px; border-radius: 999px; box-shadow: 0 1px 0 rgba(26,34,48,.25); white-space: nowrap;
}
.sticker.pop { animation: pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.sticker.you { z-index: 5; transform: rotate(-6deg) scale(1.55); box-shadow: 0 3px 0 var(--ink); }
.sticker.you.pop { animation: popYou .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.sticker.you::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid var(--ink);
  animation: ring 1.4s ease-out infinite;
}
.you-tag {
  position: absolute; bottom: calc(100% + 16px); left: 50%; transform: translateX(-50%) rotate(6deg);
  background: var(--pink-deep); color: var(--white); font-family: var(--body); font-weight: 700; border: 3px solid var(--white);
  font-size: 13px; letter-spacing: 1px; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  animation: bob 1.2s ease-in-out infinite;
}
.sticker.tag-below .you-tag { bottom: auto; top: calc(100% + 14px); }
.sticker.tag-below.has-poke .you-tag { top: calc(100% + 22px); }
@keyframes pop { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(var(--r)); } }
@keyframes popYou { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: rotate(-6deg) scale(1.55); } }
@keyframes ring { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes bob { 0%, 100% { margin-bottom: 0; } 50% { margin-bottom: 5px; } }

.lead-badge {
  display: inline-flex; align-items: center; gap: 6px; background: var(--gold); color: var(--ink);
  font-weight: 700; letter-spacing: 1.5px; border: 3px solid var(--white); border-radius: 999px;
  box-shadow: 0 4px 0 var(--gold-shadow); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
