:root {
  --ink: #173f35;
  --muted: #658177;
  --cream: #fffaf0;
  --paper: #ffffff;
  --green: #1d7c5b;
  --green-dark: #125a42;
  --lime: #cde86c;
  --yellow: #ffd755;
  --orange: #f28a45;
  --pink: #f3aaa6;
  --purple: #7753a8;
  --line: #dbe6df;
  --shadow: 0 20px 60px rgba(36, 83, 65, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 5%, rgba(255, 215, 85, 0.2), transparent 24rem),
    var(--cream);
}

body.thai,
body.thai button,
body.thai textarea,
body.thai input,
body.thai select {
  font-family: "Noto Sans Thai", "Atkinson Hyperlegible", system-ui, sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

.page-shell {
  min-height: 100vh;
  padding: 0 42px 34px;
}

.app-shell[hidden],
.portal-shell[hidden] {
  display: none;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  color: #18201d;
  background: #f4f1e8;
  font-family: "Atkinson Hyperlegible", "Noto Sans Thai", system-ui, sans-serif;
}

.portal-sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 27px 20px 22px;
  color: #f8f4e8;
  background:
    radial-gradient(circle at 20% 5%, rgba(236, 255, 92, 0.13), transparent 14rem),
    #17231f;
  box-shadow: 8px 0 30px rgba(21, 31, 27, 0.12);
}

.portal-logo {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 7px 27px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.portal-logo-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid #17231f;
  border-radius: 13px 17px 12px 18px;
  color: #17231f;
  background: #d9f05b;
  box-shadow: 4px 4px 0 #fff;
  font: 700 20px/1 "Fredoka", sans-serif;
  transform: rotate(-4deg);
}

.portal-logo strong,
.portal-logo small {
  display: block;
}

.portal-logo strong {
  font: 700 16px/1.15 "Fredoka", "Noto Sans Thai", sans-serif;
}

.portal-logo small {
  margin-top: 5px;
  color: #9db0a8;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-nav {
  display: grid;
  gap: 7px;
  margin-top: 26px;
}

.portal-nav-item {
  min-width: 0;
  height: 48px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  color: #afbeb8;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.portal-nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

.portal-nav-item.active {
  color: #17231f;
  background: #d9f05b;
  box-shadow: 4px 4px 0 rgba(255,255,255,0.86);
  transform: translate(-2px, -2px) rotate(-0.5deg);
}

.portal-nav-item span {
  font-size: 19px;
  text-align: center;
}

.portal-nav-item b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-nav-item em {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 10px;
  color: inherit;
  background: rgba(255,255,255,0.11);
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.portal-nav-item.active em {
  background: rgba(23,35,31,0.12);
}

.sidebar-quote {
  position: relative;
  margin-top: auto;
  padding: 20px 16px 16px;
  border: 1px dashed rgba(217,240,91,0.35);
  border-radius: 14px;
  color: #9eb0a8;
  background: rgba(255,255,255,0.035);
}

.sidebar-quote span {
  position: absolute;
  top: -15px;
  left: 13px;
  color: #d9f05b;
  font: 700 40px/1 Georgia, serif;
}

.sidebar-quote p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.portal-main {
  min-width: 0;
}

.portal-header {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 38px;
  border-bottom: 1px solid #dcd8cc;
  background: rgba(250,248,241,0.88);
  backdrop-filter: blur(12px);
}

.portal-breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #89918d;
  font-size: 12px;
}

.portal-breadcrumb b {
  color: #c3c2ba;
}

.portal-breadcrumb strong {
  color: #17231f;
}

.portal-language {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-left: auto;
  padding: 6px 9px 6px 11px;
  border: 1px solid #d8d5ca;
  border-radius: 11px;
  background: #fff;
}

.portal-language select {
  border: 0;
  outline: 0;
  color: #17231f;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid #d7d3c7;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.portal-content {
  padding: 38px clamp(24px, 4.5vw, 72px) 70px;
}

.portal-hero {
  position: relative;
  min-height: 365px;
  overflow: hidden;
  padding: clamp(38px, 5vw, 62px);
  border: 2px solid #17231f;
  border-radius: 24px 31px 22px 28px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 26%, #d9f05b 0 5%, transparent 5.4%),
    radial-gradient(circle at 74% 74%, rgba(255,255,255,0.11) 0 18%, transparent 18.4%),
    linear-gradient(125deg, #1d3029, #285748 62%, #1f4036);
  box-shadow: 10px 11px 0 #d9f05b;
}

.portal-hero::before {
  content: "</>";
  position: absolute;
  right: 7%;
  bottom: -25px;
  color: rgba(255,255,255,0.08);
  font: 700 clamp(130px, 18vw, 250px)/1 "Fredoka", sans-serif;
  transform: rotate(-7deg);
}

.portal-hero::after {
  content: "AI?";
  position: absolute;
  top: 19%;
  right: 11%;
  padding: 9px 13px;
  border: 2px solid #17231f;
  border-radius: 8px;
  color: #17231f;
  background: #ffbd7f;
  box-shadow: 4px 4px 0 #fff;
  font: 700 18px/1 "Fredoka", sans-serif;
  transform: rotate(8deg);
}

.hero-sticker {
  position: absolute;
  z-index: 2;
  top: 23px;
  right: 24px;
  padding: 8px 12px;
  border: 2px solid #17231f;
  border-radius: 50%;
  color: #17231f;
  background: #ffdd58;
  box-shadow: 3px 3px 0 #fff;
  font-size: 10px;
  font-weight: 700;
  transform: rotate(8deg);
}

.portal-kicker {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
  color: #d9f05b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.portal-hero h1 {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0;
  font: 700 clamp(48px, 7vw, 96px)/0.87 "Fredoka", "Noto Sans Thai", sans-serif;
  letter-spacing: -0.055em;
}

.portal-hero h1 em {
  display: block;
  color: #d9f05b;
  font-style: normal;
  text-shadow: 3px 3px 0 #17231f;
}

.portal-hero > p:not(.portal-kicker) {
  position: relative;
  z-index: 2;
  max-width: 580px;
  margin: 25px 0 0;
  color: #cbd7d2;
  font-size: 15px;
  line-height: 1.55;
}

.hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 17px;
  align-items: center;
  margin-top: 28px;
}

.browse-button,
.launch-button {
  min-height: 46px;
  padding: 0 19px;
  border: 2px solid #17231f;
  border-radius: 11px;
  color: #17231f;
  background: #d9f05b;
  box-shadow: 4px 4px 0 #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 150ms ease;
}

.browse-button:hover,
.launch-button:hover {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 7px 7px 0 #fff;
}

.hero-actions > span {
  max-width: 220px;
  color: #8fa59c;
  font-size: 10px;
}

.program-section {
  padding-top: 62px;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title-row p {
  margin: 0 0 7px;
  color: #74827d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.section-title-row h2 {
  margin: 0;
  font: 700 clamp(30px, 4vw, 45px)/1 "Fredoka", "Noto Sans Thai", sans-serif;
  letter-spacing: -0.035em;
}

.section-title-row > span {
  padding: 6px 10px;
  border: 1px solid #d5d1c4;
  border-radius: 15px;
  color: #73807b;
  background: #fff;
  font-size: 11px;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.program-card {
  min-width: 0;
  overflow: hidden;
  border: 2px solid #202824;
  border-radius: 17px 21px 16px 20px;
  background: #fff;
  box-shadow: 5px 6px 0 #d8d3c5;
  transition: 180ms ease;
}

.program-card:hover {
  transform: translateY(-5px) rotate(-0.4deg);
  box-shadow: 8px 11px 0 #d8d3c5;
}

.program-card[hidden] {
  display: none;
}

.program-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 42% 1fr;
}

.card-art {
  position: relative;
  min-height: 170px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 2px solid #202824;
  background: #e6efcb;
}

.featured .card-art {
  min-height: 100%;
  border-right: 2px solid #202824;
  border-bottom: 0;
}

.card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image: radial-gradient(#20392f 0.7px, transparent 0.7px);
  background-size: 11px 11px;
}

.card-art > i {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border: 2px solid #202824;
  border-radius: 7px;
  color: #202824;
  background: #ffdd58;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  transform: rotate(-5deg);
}

.mini-veggie {
  position: absolute;
  width: 72px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 3px solid #21342d;
  border-radius: 48%;
  color: #20342c;
  font-weight: 700;
  box-shadow: inset -7px -8px rgba(0,0,0,0.08), 5px 6px 0 rgba(28,50,42,0.13);
}

.carrot-mini { left: 15%; bottom: 18%; background: #f19a4a; transform: rotate(-8deg); }
.tomato-mini { left: 44%; bottom: 12%; width: 85px; height: 75px; background: #e8665c; transform: rotate(5deg); }
.berry-mini { right: 8%; bottom: 23%; width: 65px; height: 72px; background: #965eb1; transform: rotate(10deg); }

.quiz-art { background: #ffd873; }
.quiz-art b { font: 700 88px/1 "Fredoka", sans-serif; transform: rotate(-8deg); }
.quiz-art span { position: absolute; right: 15px; bottom: 12px; font-weight: 700; transform: rotate(5deg); }
.rubric-art { grid-template-columns: repeat(3, 48px); gap: 8px; background: #bad8f2; }
.rubric-art span { width: 48px; height: 58px; display: grid; place-items: center; border: 2px solid #202824; background: #fff; font-size: 23px; transform: rotate(-4deg); }
.rubric-art span:nth-child(2) { transform: rotate(4deg) translateY(8px); }
.karaoke-art { background: #dfa8de; }
.karaoke-art b { font-size: 83px; }
.karaoke-art span { position: absolute; bottom: 12px; padding: 4px 8px; border: 2px solid #202824; background: #fff; font-weight: 700; }
.excuse-art { background: #ff9a78; }
.excuse-art b { font-size: 82px; }
.excuse-art span { position: absolute; right: 15px; top: 15px; font: 700 24px/1 "Fredoka", sans-serif; transform: rotate(8deg); }
.meeting-art { background: #a7d9cc; }
.meeting-art b { font: 700 45px/1 "Fredoka", sans-serif; transform: rotate(-7deg); }
.meeting-art span { position: absolute; bottom: 13px; right: 15px; }
.email-art { background: #ffcf79; }
.email-art b { font-size: 73px; }
.email-art span { position: absolute; bottom: 14px; font-weight: 700; }
.food-art { background: #b8d983; }
.food-art b { position: absolute; left: 17px; top: 9px; font-size: 60px; transform: rotate(-9deg); }
.food-art span { font-size: 37px; }

.card-body {
  padding: 21px 22px 23px;
}

.card-category {
  color: #73817b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-body h3 {
  margin: 7px 0 8px;
  font: 700 24px/1.05 "Fredoka", "Noto Sans Thai", sans-serif;
}

.card-body p {
  min-height: 42px;
  margin: 0;
  color: #69756f;
  font-size: 12px;
  line-height: 1.45;
}

.launch-button {
  margin-top: 19px;
  box-shadow: 3px 3px 0 #202824;
}

.launch-button:hover {
  box-shadow: 5px 5px 0 #202824;
}

.soon-button {
  margin-top: 19px;
  padding: 7px 11px;
  border: 1px dashed #98a49f;
  border-radius: 8px;
  color: #7a8681;
  background: #f4f5f2;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.portal-back-button {
  height: 41px;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #d3ded7;
  border-radius: 21px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.portal-toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  padding: 11px 17px;
  border: 2px solid #17231f;
  border-radius: 12px;
  color: #17231f;
  background: #d9f05b;
  box-shadow: 4px 4px 0 #17231f;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 180ms ease;
}

.portal-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.topbar {
  max-width: 1440px;
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  color: var(--ink);
  font: 700 24px/1 "Fredoka", sans-serif;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 48% 52% 45% 55%;
  color: #fff;
  font-size: 13px;
  letter-spacing: -1px;
  background: var(--green);
  transform: rotate(-4deg);
  box-shadow: inset -4px -5px 0 rgba(0, 0, 0, 0.07);
}

.brand-face {
  transform: translateY(2px);
}

.brand-leaf {
  position: absolute;
  top: -8px;
  width: 16px;
  height: 19px;
  border-radius: 100% 0 100% 0;
  background: var(--lime);
  transform-origin: bottom;
}

.brand-leaf-one {
  left: 9px;
  transform: rotate(-24deg);
}

.brand-leaf-two {
  right: 6px;
  transform: rotate(23deg) scale(0.85);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.language-control select {
  height: 42px;
  padding: 0 32px 0 14px;
  border: 1px solid #dce7e0;
  border-radius: 22px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(32, 76, 61, 0.05);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.icon-button,
.help-button {
  border: 1px solid #dce7e0;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 16px rgba(32, 76, 61, 0.05);
  cursor: pointer;
  transition: 180ms ease;
}

.icon-button:hover,
.help-button:hover {
  border-color: #b8d0c4;
  background: #fff;
  transform: translateY(-1px);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.icon-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-off {
  display: none;
}

.icon-button.muted .sound-on {
  display: none;
}

.icon-button.muted .sound-off {
  display: block;
}

.help-button {
  height: 42px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 17px;
  border-radius: 22px;
  color: var(--ink);
  font-weight: 700;
}

.help-button span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
}

.app-layout {
  max-width: 1440px;
  min-height: calc(100vh - 126px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(330px, 430px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(202, 219, 209, 0.85);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.setup-screen {
  width: min(560px, 100%);
  min-height: auto;
  display: block;
}

.setup-screen .control-panel {
  min-height: calc(100vh - 126px);
}

.competition-screen {
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(202, 219, 209, 0.85);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.competition-screen[hidden],
.setup-screen[hidden] {
  display: none;
}

.competition-screen .stage-panel {
  min-height: calc(100vh - 126px);
  padding-top: 132px;
}

.competition-toolbar {
  position: absolute;
  z-index: 14;
  top: 17px;
  left: 20px;
  right: 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.back-button,
.again-button {
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 23px;
  color: #fff;
  background: rgba(20, 63, 51, 0.78);
  box-shadow: 0 7px 20px rgba(22, 61, 48, 0.16);
  backdrop-filter: blur(8px);
  font-size: 13px;
  cursor: pointer;
}

.back-button:disabled {
  cursor: wait;
  opacity: 0.42;
}

.again-button {
  color: var(--ink);
  background: var(--yellow);
}

.round-status {
  justify-self: center;
  min-width: 210px;
  padding: 7px 18px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  color: #fff;
  background: rgba(31, 55, 51, 0.68);
  box-shadow: 0 8px 20px rgba(20, 45, 38, 0.14);
  backdrop-filter: blur(8px);
  text-align: center;
}

.round-status span,
.round-status strong {
  display: block;
}

.round-status span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.round-status strong {
  margin-top: 1px;
  font: 700 16px/1.2 "Fredoka", sans-serif;
}

.competition-screen .scene-chip {
  top: 83px;
}

.leaderboard {
  position: absolute;
  z-index: 13;
  top: 92px;
  right: 20px;
  width: 190px;
  padding: 10px;
  border: 2px solid rgba(255,255,255,0.82);
  border-radius: 17px;
  color: #fff;
  background: rgba(20, 52, 45, 0.76);
  box-shadow: 0 10px 26px rgba(17, 47, 39, 0.18);
  backdrop-filter: blur(9px);
}

.leaderboard-title {
  display: block;
  padding: 1px 5px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.leaderboard ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  min-width: 0;
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 7px;
  align-items: center;
  padding: 5px 8px 5px 5px;
  border-radius: 10px;
  background: rgba(255,255,255,0.14);
}

.leaderboard li:first-child {
  color: #3f3300;
  background: var(--yellow);
}

.leaderboard b {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font: 700 12px/1 "Fredoka", sans-serif;
}

.leaderboard strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-panel {
  position: relative;
  z-index: 3;
  padding: 50px 48px 36px;
  background: rgba(255, 255, 255, 0.98);
}

.eyebrow,
.stage-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--green);
}

h1 {
  margin: 10px 0 8px;
  font: 700 clamp(34px, 4vw, 46px)/1.05 "Fredoka", sans-serif;
  letter-spacing: -0.035em;
}

.intro {
  max-width: 310px;
  margin: 0 0 27px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 25px;
  padding: 4px;
  border: 0;
  border-radius: 13px;
  background: #edf3ef;
}

.mode-switch label {
  cursor: pointer;
}

.mode-switch input {
  position: absolute;
  opacity: 0;
}

.mode-switch span {
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #6a8279;
  font-size: 14px;
  font-weight: 700;
  transition: 180ms ease;
}

.mode-switch input:checked + span {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 10px rgba(31, 73, 58, 0.09);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #81948d;
  font-size: 12px;
}

.section-heading label,
.field-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

textarea {
  width: 100%;
  height: 140px;
  resize: vertical;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #fbfdfb;
  font-size: 14px;
  line-height: 1.6;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

textarea:focus,
.number-control:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(29, 124, 91, 0.1);
}

.field-hint {
  margin: 5px 3px 0;
  color: #91a39c;
  font-size: 11px;
}

.number-control {
  height: 72px;
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fbfdfb;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.number-control button {
  width: 36px;
  height: 36px;
  margin: auto;
  border: 0;
  border-radius: 50%;
  color: var(--green);
  background: #e7f2ec;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.number-control input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: 700 31px/1 "Fredoka", sans-serif;
  text-align: center;
  appearance: textfield;
}

.number-control input::-webkit-inner-spin-button {
  display: none;
}

.timer-section {
  margin-top: 22px;
}

.sound-section {
  margin-top: 20px;
}

.sound-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.sound-controls select {
  min-width: 0;
  height: 42px;
  padding: 0 34px 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.sound-controls select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(29, 124, 91, 0.1);
}

.add-sound-button {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1.5px solid #bfd7ca;
  border-radius: 11px;
  color: var(--green-dark);
  background: #edf7f1;
  font-size: 12px;
  cursor: pointer;
  transition: 160ms ease;
}

.add-sound-button:hover {
  border-color: var(--green);
  background: #e2f2e9;
}

.add-sound-button span {
  font-size: 20px;
  line-height: 1;
}

.custom-sound-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.time-options button {
  height: 38px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  color: #6c8179;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}

.time-options button:hover {
  border-color: #a5c7b8;
}

.time-options button.active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  box-shadow: 0 5px 12px rgba(29, 124, 91, 0.2);
}

.repeat-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 21px 0;
  cursor: pointer;
}

.repeat-option input {
  position: absolute;
  opacity: 0;
}

.checkmark {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1.5px solid #c8d9d0;
  border-radius: 6px;
  background: #fff;
  transition: 160ms ease;
}

.checkmark svg {
  width: 13px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.repeat-option input:checked + .checkmark {
  border-color: var(--green);
  background: var(--green);
}

.repeat-option input:checked + .checkmark svg {
  opacity: 1;
}

.repeat-option strong,
.repeat-option small {
  display: block;
}

.repeat-option strong {
  font-size: 13px;
}

.repeat-option small {
  margin-top: 2px;
  color: #869991;
  font-size: 11px;
}

.pick-button {
  width: 100%;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 0;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, #258663, var(--green-dark));
  box-shadow: 0 11px 22px rgba(20, 94, 68, 0.22), inset 0 1px rgba(255, 255, 255, 0.25);
  font: 700 16px/1 "Fredoka", sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.pick-button svg {
  width: 19px;
  fill: var(--yellow);
}

.pick-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(20, 94, 68, 0.27), inset 0 1px rgba(255, 255, 255, 0.25);
}

.pick-button:active:not(:disabled) {
  transform: translateY(1px);
}

.pick-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.keyboard-tip {
  margin: 10px 0 0;
  color: #98a8a1;
  font-size: 11px;
  text-align: center;
}

kbd {
  padding: 2px 6px;
  border: 1px solid #d6e0db;
  border-bottom-width: 2px;
  border-radius: 5px;
  color: #687d75;
  background: #f6f8f7;
  font-family: inherit;
  font-size: 10px;
}

.stage-panel {
  position: relative;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(65px, 8vw, 104px) 40px 0;
  background: #eef6e5;
  transition: background 420ms ease;
}

.competition-mode .page-shell {
  padding-bottom: 18px;
}

.stage-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.44;
  background-image: radial-gradient(rgba(81, 128, 98, 0.2) 0.7px, transparent 0.7px);
  background-size: 14px 14px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

.scene-world {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  transition: opacity 260ms ease, filter 420ms ease;
}

.scene-world::before,
.scene-world::after,
.scene-shape {
  content: "";
  position: absolute;
  display: block;
  transition:
    inset 420ms ease,
    width 420ms ease,
    height 420ms ease,
    border-radius 420ms ease,
    background 420ms ease,
    box-shadow 420ms ease,
    transform 420ms ease,
    opacity 220ms ease;
}

.scene-chip {
  position: absolute;
  z-index: 7;
  top: 18px;
  left: 50%;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  color: #fff;
  background: rgba(20, 63, 51, 0.72);
  box-shadow: 0 7px 20px rgba(22, 61, 48, 0.16);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: 220ms ease;
}

.game-show-lights {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.game-show-lights i {
  position: absolute;
  top: -25%;
  width: 90px;
  height: 120%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.48), rgba(255, 224, 89, 0.03) 75%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  transform-origin: center top;
  animation: spotlightSweep 1.25s ease-in-out infinite alternate;
}

.game-show-lights i:nth-child(1) { left: 2%; transform: rotate(-18deg); }
.game-show-lights i:nth-child(2) { left: 20%; animation-delay: -0.5s; transform: rotate(11deg); }
.game-show-lights i:nth-child(3) { left: 39%; animation-delay: -0.9s; transform: rotate(-8deg); }
.game-show-lights i:nth-child(4) { right: 39%; animation-delay: -0.2s; transform: rotate(9deg); }
.game-show-lights i:nth-child(5) { right: 20%; animation-delay: -0.75s; transform: rotate(-12deg); }
.game-show-lights i:nth-child(6) { right: 2%; animation-delay: -1s; transform: rotate(18deg); }

.stage-panel.is-dancing .game-show-lights {
  opacity: 0.75;
}

.stage-panel.is-dancing .scene-chip {
  animation: sceneChipPop 850ms ease-in-out infinite;
}

/* Cozy kitchen */
.stage-panel.scene-kitchen {
  background: linear-gradient(#ffe8b9 0 58%, #e6b77b 58% 100%);
}

.scene-kitchen .scene-world {
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(178, 116, 67, 0.13) 50%, transparent 50.5%),
    linear-gradient(rgba(178, 116, 67, 0.13) 1px, transparent 1px),
    #fff1d2;
  background-size: 110px 100%, 100% 74px, auto;
}

.scene-kitchen .scene-world::before {
  left: 7%;
  top: 10%;
  width: 25%;
  height: 25%;
  border: 9px solid #fff;
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 48%, #fff 48% 53%, transparent 53%),
    linear-gradient(transparent 48%, #fff 48% 53%, transparent 53%),
    linear-gradient(#8ed4ef, #d9f3f9);
  box-shadow: 0 8px 0 rgba(101, 67, 45, 0.12);
}

.scene-kitchen .scene-world::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 29%;
  background:
    linear-gradient(90deg, #d38a55 0 14%, #f1c38f 14% 15%, #d38a55 15% 31%, #f1c38f 31% 32%, #d38a55 32% 48%, #f1c38f 48% 49%, #d38a55 49% 65%, #f1c38f 65% 66%, #d38a55 66% 82%, #f1c38f 82% 83%, #d38a55 83%);
  border-top: 14px solid #fff5dd;
}

.scene-kitchen .shape-1,
.scene-kitchen .shape-2,
.scene-kitchen .shape-3 {
  top: 12%;
  width: 18%;
  height: 17%;
  border-radius: 10px 10px 18px 18px;
  background: #8dbd8a;
  box-shadow: inset 0 -9px rgba(0, 0, 0, 0.06);
}

.scene-kitchen .shape-1 { right: 5%; }
.scene-kitchen .shape-2 { right: 25%; background: #f4a261; }
.scene-kitchen .shape-3 { right: 45%; background: #78a7c7; }
.scene-kitchen .shape-4 {
  left: 10%;
  bottom: 24%;
  width: 17%;
  height: 6%;
  border-radius: 50%;
  background: #f8f0dc;
  box-shadow: 0 8px 0 #bd8057;
}
.scene-kitchen .shape-5 {
  left: 14%;
  bottom: 30%;
  width: 7%;
  height: 10%;
  border-radius: 50% 50% 40% 40%;
  background: #ef6f62;
}
.scene-kitchen .shape-6,
.scene-kitchen .shape-7,
.scene-kitchen .shape-8 { opacity: 0; }

/* Sunny garden */
.stage-panel.scene-garden {
  background: linear-gradient(#9fe3f4 0 61%, #a9d878 61% 100%);
}

.scene-garden .scene-world {
  background:
    radial-gradient(circle at 82% 14%, #ffe468 0 7%, rgba(255, 228, 104, 0.24) 7.5% 13%, transparent 14%),
    linear-gradient(#9fe3f4 0 64%, #9bd069 64%);
}

.scene-garden .scene-world::before,
.scene-garden .scene-world::after {
  width: 24%;
  height: 9%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 45px 4px 0 -8px rgba(255, 255, 255, 0.82), 84px 0 0 -19px rgba(255, 255, 255, 0.82);
}

.scene-garden .scene-world::before { left: 8%; top: 14%; }
.scene-garden .scene-world::after { right: 22%; top: 28%; transform: scale(0.7); }

.scene-garden .shape-1,
.scene-garden .shape-2,
.scene-garden .shape-3,
.scene-garden .shape-4 {
  bottom: 8%;
  width: 24%;
  height: 14%;
  border-radius: 50%;
  background: repeating-linear-gradient(90deg, #76502e 0 14px, #8f653a 14px 27px);
  box-shadow: inset 0 12px rgba(80, 139, 62, 0.55);
}

.scene-garden .shape-1 { left: -4%; transform: rotate(4deg); }
.scene-garden .shape-2 { left: 24%; transform: rotate(-3deg); }
.scene-garden .shape-3 { right: 24%; transform: rotate(3deg); }
.scene-garden .shape-4 { right: -4%; transform: rotate(-4deg); }
.scene-garden .shape-5,
.scene-garden .shape-6,
.scene-garden .shape-7,
.scene-garden .shape-8 {
  bottom: 21%;
  width: 17px;
  height: 58px;
  border-radius: 80% 0;
  background: #3f9855;
}
.scene-garden .shape-5 { left: 9%; transform: rotate(-18deg); }
.scene-garden .shape-6 { left: 34%; transform: rotate(22deg); }
.scene-garden .shape-7 { right: 33%; transform: rotate(-15deg); }
.scene-garden .shape-8 { right: 8%; transform: rotate(18deg); }

/* Sathon, Bangkok */
.stage-panel.scene-sathon {
  background: linear-gradient(#f7b4a1 0 55%, #718d99 55% 100%);
}

.scene-sathon .scene-world {
  background:
    radial-gradient(circle at 79% 17%, #fff0ab 0 6%, transparent 6.5%),
    linear-gradient(#ef9f94, #f8cfad 58%, #879ca8 58%);
}

.scene-sathon .scene-world::before {
  left: 0;
  right: 0;
  top: 37%;
  height: 8px;
  background: #586c75;
  box-shadow: 0 12px 0 #d4e0e2, 0 20px 0 #586c75;
}

.scene-sathon .scene-world::after {
  left: 7%;
  top: 31%;
  width: 32%;
  height: 8%;
  border-radius: 9px;
  background:
    repeating-linear-gradient(90deg, #dbeff2 0 24px, #527b8b 24px 28px),
    #e8f5f6;
  border: 4px solid #47636d;
  box-shadow: 0 6px 12px rgba(25, 45, 53, 0.25);
}

.scene-sathon .shape-1,
.scene-sathon .shape-2,
.scene-sathon .shape-3,
.scene-sathon .shape-4,
.scene-sathon .shape-5,
.scene-sathon .shape-6,
.scene-sathon .shape-7,
.scene-sathon .shape-8 {
  bottom: 14%;
  width: 11%;
  border-radius: 6px 6px 0 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(255, 230, 139, 0.72) 15px 21px),
    repeating-linear-gradient(0deg, #526a78 0 17px, #425967 17px 23px);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08);
}
.scene-sathon .shape-1 { left: 2%; height: 31%; }
.scene-sathon .shape-2 { left: 14%; height: 22%; background-color: #6b7886; }
.scene-sathon .shape-3 { left: 27%; height: 39%; }
.scene-sathon .shape-4 { left: 40%; height: 26%; }
.scene-sathon .shape-5 { right: 38%; height: 35%; }
.scene-sathon .shape-6 { right: 25%; height: 25%; }
.scene-sathon .shape-7 { right: 12%; height: 43%; }
.scene-sathon .shape-8 { right: 0; height: 29%; }

/* New York */
.stage-panel.scene-newyork {
  background: linear-gradient(#68b9ee 0 54%, #65717c 54% 100%);
}

.scene-newyork .scene-world {
  background:
    radial-gradient(circle at 18% 15%, #fff0a1 0 6%, transparent 6.5%),
    linear-gradient(#5bb6ef, #c8e9fa 57%, #67737d 57%);
}

.scene-newyork .scene-world::before {
  left: 47%;
  bottom: 13%;
  width: 8%;
  height: 57%;
  clip-path: polygon(47% 0, 55% 0, 59% 17%, 72% 17%, 72% 25%, 100% 25%, 100% 100%, 0 100%, 0 25%, 38% 25%);
  background:
    repeating-linear-gradient(0deg, #526c82 0 14px, #f2d172 14px 18px),
    #526c82;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.scene-newyork .scene-world::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 14%;
  background:
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(255,255,255,0.55) 44px 50px),
    #4e5962;
  border-top: 8px solid #f0c956;
}

.scene-newyork .shape-1,
.scene-newyork .shape-2,
.scene-newyork .shape-3,
.scene-newyork .shape-4,
.scene-newyork .shape-5,
.scene-newyork .shape-6,
.scene-newyork .shape-7,
.scene-newyork .shape-8 {
  bottom: 13%;
  width: 10%;
  border-radius: 3px 3px 0 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(255, 221, 104, 0.8) 12px 17px),
    repeating-linear-gradient(0deg, #344c61 0 16px, #263c50 16px 22px);
}
.scene-newyork .shape-1 { left: 0; height: 35%; }
.scene-newyork .shape-2 { left: 11%; height: 48%; }
.scene-newyork .shape-3 { left: 23%; height: 29%; }
.scene-newyork .shape-4 { left: 35%; height: 41%; }
.scene-newyork .shape-5 { right: 34%; height: 34%; }
.scene-newyork .shape-6 { right: 22%; height: 46%; }
.scene-newyork .shape-7 { right: 11%; height: 31%; }
.scene-newyork .shape-8 { right: 0; height: 39%; }

/* Concert stage */
.stage-panel.scene-concert {
  background: linear-gradient(#251548 0 65%, #130d25 65%);
}

.scene-concert .scene-world {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 70, 190, 0.45), transparent 28%),
    linear-gradient(135deg, #25124d, #552467 55%, #17122f);
}

.scene-concert .scene-world::before {
  left: 8%;
  right: 8%;
  top: 6%;
  height: 12px;
  background: #17141e;
  box-shadow: 0 5px 0 #74637c;
}

.scene-concert .scene-world::after {
  left: 10%;
  right: 10%;
  bottom: 10%;
  height: 18%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(#332d40, #17131f);
  box-shadow: 0 -8px 0 #fc4fb7, 0 -14px 25px rgba(252, 79, 183, 0.6);
}

.scene-concert .shape-1,
.scene-concert .shape-2,
.scene-concert .shape-3,
.scene-concert .shape-4 {
  top: 8%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffda55;
  box-shadow: 0 0 25px 8px currentColor;
}
.scene-concert .shape-1 { left: 16%; color: #ffda55; }
.scene-concert .shape-2 { left: 37%; color: #55dbff; background: #55dbff; }
.scene-concert .shape-3 { right: 37%; color: #ff63c1; background: #ff63c1; }
.scene-concert .shape-4 { right: 16%; color: #74ef8f; background: #74ef8f; }
.scene-concert .shape-5,
.scene-concert .shape-6 {
  bottom: 25%;
  width: 13%;
  height: 22%;
  border-radius: 9px;
  background:
    radial-gradient(circle, #30303b 0 17%, #121218 18% 32%, transparent 33%) center 24% / 60% 60% no-repeat,
    #24232d;
  border: 4px solid #0e0d12;
}
.scene-concert .shape-5 { left: 4%; }
.scene-concert .shape-6 { right: 4%; }
.scene-concert .shape-7,
.scene-concert .shape-8 {
  bottom: 25%;
  width: 5px;
  height: 22%;
  background: #c6c0cc;
}
.scene-concert .shape-7 { left: 47%; transform: rotate(-12deg); }
.scene-concert .shape-8 { right: 47%; transform: rotate(12deg); }

/* Racing circuit */
.stage-panel.scene-racetrack {
  background: linear-gradient(#79c9ef 0 48%, #55a85a 48% 66%, #555a60 66%);
}

.scene-racetrack .scene-world {
  background:
    radial-gradient(circle at 82% 12%, #ffe06e 0 6%, transparent 6.5%),
    linear-gradient(#79c9ef 0 48%, #54a95c 48% 67%, #555a60 67%);
}

.scene-racetrack .scene-world::before {
  left: -8%;
  right: -8%;
  bottom: 4%;
  height: 29%;
  border: 9px solid #eef1f2;
  border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(255,255,255,0.75) 42px 72px),
    #454b50;
  transform: rotate(-3deg);
}

.scene-racetrack .scene-world::after {
  right: 8%;
  top: 20%;
  width: 21%;
  height: 24%;
  background:
    repeating-conic-gradient(#fff 0 25%, #151515 0 50%) 0 0 / 24px 24px;
  clip-path: polygon(0 0, 100% 0, 100% 48%, 8% 48%, 8% 100%, 0 100%);
}

.scene-racetrack .shape-1,
.scene-racetrack .shape-2,
.scene-racetrack .shape-3 {
  bottom: 22%;
  width: 16%;
  height: 7%;
  border-radius: 50% 60% 18% 18%;
  background: #ef4f4f;
  box-shadow: inset 0 -9px rgba(0,0,0,0.16), 18px 14px 0 -7px #222, -18px 14px 0 -7px #222;
}
.scene-racetrack .shape-1 { left: 5%; }
.scene-racetrack .shape-2 { left: 39%; background: #4d8dea; transform: scale(0.8); }
.scene-racetrack .shape-3 { right: 7%; background: #f4c342; transform: scale(0.7); }
.scene-racetrack .shape-4,
.scene-racetrack .shape-5,
.scene-racetrack .shape-6,
.scene-racetrack .shape-7,
.scene-racetrack .shape-8 { opacity: 0; }

/* Market */
.stage-panel.scene-market {
  background: linear-gradient(#ffd99b 0 58%, #d7a36b 58%);
}

.scene-market .scene-world {
  background: linear-gradient(#ffcf87 0 55%, #e4b273 55%);
}

.scene-market .scene-world::before {
  left: 3%;
  right: 3%;
  top: 10%;
  height: 24%;
  background: repeating-linear-gradient(90deg, #ef5b5b 0 42px, #fff1d8 42px 84px);
  clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
  filter: drop-shadow(0 9px 5px rgba(112, 66, 34, 0.18));
}

.scene-market .scene-world::after {
  left: 2%;
  right: 2%;
  bottom: 10%;
  height: 27%;
  background:
    linear-gradient(#f5c47d 0 18%, #a96d3f 18% 27%, #c48951 27%);
  border-radius: 10px;
}

.scene-market .shape-1,
.scene-market .shape-2,
.scene-market .shape-3,
.scene-market .shape-4,
.scene-market .shape-5,
.scene-market .shape-6,
.scene-market .shape-7,
.scene-market .shape-8 {
  bottom: 23%;
  width: 8%;
  height: 9%;
  border-radius: 50% 50% 14% 14%;
  background: #ed665c;
  box-shadow: 0 12px 0 #8b572f;
}
.scene-market .shape-1 { left: 6%; background: #f3a34a; }
.scene-market .shape-2 { left: 18%; background: #75a952; }
.scene-market .shape-3 { left: 30%; background: #d75b75; }
.scene-market .shape-4 { left: 42%; background: #f1d351; }
.scene-market .shape-5 { right: 42%; background: #69a765; }
.scene-market .shape-6 { right: 30%; background: #ee854c; }
.scene-market .shape-7 { right: 18%; background: #9d75bd; }
.scene-market .shape-8 { right: 6%; background: #ef665b; }

/* Shopping mall */
.stage-panel.scene-mall {
  background: linear-gradient(#dff2f5 0 68%, #d6d9dd 68%);
}

.scene-mall .scene-world {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.45) 1px, transparent 1px),
    linear-gradient(#dbf2f5, #f8fbfb 65%);
  background-size: 86px 100%, auto;
}

.scene-mall .scene-world::before {
  left: 8%;
  right: 8%;
  top: 7%;
  height: 17%;
  border-radius: 50% 50% 0 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 50px, rgba(73,128,144,0.3) 50px 55px),
    linear-gradient(#8ed2e5, #e7f6f8);
  border: 7px solid rgba(255,255,255,0.85);
}

.scene-mall .scene-world::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background:
    linear-gradient(100deg, transparent 48%, #f8f8f8 48% 52%, transparent 52%),
    repeating-linear-gradient(90deg, #d9dce0 0 80px, #cfd2d6 80px 82px);
  border-top: 6px solid #aeb6bd;
}

.scene-mall .shape-1,
.scene-mall .shape-2,
.scene-mall .shape-3,
.scene-mall .shape-4 {
  bottom: 22%;
  width: 19%;
  height: 32%;
  border-radius: 5px;
  background:
    linear-gradient(#f8cf67 0 16%, transparent 16%),
    linear-gradient(90deg, #83bbcf 0 45%, #e9f5f6 45% 55%, #83bbcf 55%);
  border: 5px solid #fff;
  box-shadow: 0 8px 18px rgba(50,81,88,0.15);
}
.scene-mall .shape-1 { left: 3%; }
.scene-mall .shape-2 { left: 27%; background-color: #e8a2b0; }
.scene-mall .shape-3 { right: 27%; background-color: #89b778; }
.scene-mall .shape-4 { right: 3%; background-color: #a68ac1; }
.scene-mall .shape-5,
.scene-mall .shape-6 {
  bottom: 20%;
  width: 5%;
  height: 27%;
  background: linear-gradient(65deg, transparent 45%, #89949c 46% 52%, transparent 53%);
}
.scene-mall .shape-5 { left: 44%; }
.scene-mall .shape-6 { right: 44%; transform: scaleX(-1); }
.scene-mall .shape-7,
.scene-mall .shape-8 { opacity: 0; }

/* Running track */
.stage-panel.scene-runningtrack {
  background: linear-gradient(#8dd7f1 0 48%, #6eb15e 48% 66%, #c7634e 66%);
}

.scene-runningtrack .scene-world {
  background:
    radial-gradient(circle at 80% 12%, #ffe270 0 6%, transparent 6.5%),
    linear-gradient(#8dd7f1 0 48%, #6eb15e 48% 67%, #c86550 67%);
}

.scene-runningtrack .scene-world::before {
  left: -16%;
  right: -16%;
  bottom: -16%;
  height: 52%;
  border: 5px solid #fff;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at center, transparent 0 25px, #fff 26px 29px, transparent 30px 55px),
    #bd5948;
}

.scene-runningtrack .scene-world::after {
  left: 8%;
  top: 28%;
  width: 12px;
  height: 33%;
  background: #eee;
  box-shadow: 18px 0 0 #eee;
}

.scene-runningtrack .shape-1,
.scene-runningtrack .shape-2,
.scene-runningtrack .shape-3,
.scene-runningtrack .shape-4 {
  top: 28%;
  width: 12%;
  height: 16%;
  background:
    repeating-linear-gradient(90deg, #54768b 0 8px, #d8e5e8 8px 15px);
  clip-path: polygon(0 100%, 12% 0, 88% 0, 100% 100%);
}
.scene-runningtrack .shape-1 { left: 24%; }
.scene-runningtrack .shape-2 { left: 38%; }
.scene-runningtrack .shape-3 { right: 38%; }
.scene-runningtrack .shape-4 { right: 24%; }
.scene-runningtrack .shape-5,
.scene-runningtrack .shape-6,
.scene-runningtrack .shape-7,
.scene-runningtrack .shape-8 { opacity: 0; }

/* Swimming pool */
.stage-panel.scene-pool {
  background: linear-gradient(#9ddff4 0 45%, #e9e0c6 45% 58%, #36aeda 58%);
}

.scene-pool .scene-world {
  background:
    radial-gradient(circle at 82% 12%, #ffe374 0 6%, transparent 6.5%),
    linear-gradient(#9ddff4 0 45%, #f1e7ca 45% 59%, #39b0db 59%);
}

.scene-pool .scene-world::before {
  left: 4%;
  right: 4%;
  bottom: 4%;
  height: 39%;
  border: 10px solid #f8f5e9;
  border-radius: 12px;
  background:
    repeating-linear-gradient(90deg, transparent 0 14%, rgba(255,255,255,0.7) 14% 14.6%),
    repeating-linear-gradient(0deg, #42b8df 0 24px, #67cae6 24px 48px);
  box-shadow: inset 0 0 0 5px #268bb8;
}

.scene-pool .scene-world::after {
  left: 8%;
  bottom: 43%;
  width: 34px;
  height: 22%;
  border: solid #e8edf0;
  border-width: 6px 6px 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 16px 0 0 -10px #6f7f86;
}

.scene-pool .shape-1,
.scene-pool .shape-2,
.scene-pool .shape-3 {
  bottom: 26%;
  width: 10%;
  height: 5%;
  border-radius: 50%;
  border: 8px solid #ffdc4d;
  background: transparent;
}
.scene-pool .shape-1 { left: 20%; }
.scene-pool .shape-2 { left: 46%; border-color: #f46b80; transform: scale(0.8); }
.scene-pool .shape-3 { right: 18%; border-color: #75e27f; transform: scale(1.1); }
.scene-pool .shape-4 {
  right: 7%;
  top: 22%;
  width: 11%;
  height: 19%;
  border-radius: 50% 50% 12px 12px;
  background: repeating-linear-gradient(90deg, #f66c67 0 18px, #fff 18px 36px);
}
.scene-pool .shape-5,
.scene-pool .shape-6,
.scene-pool .shape-7,
.scene-pool .shape-8 { opacity: 0; }

/* Football field */
.stage-panel.scene-football {
  background: linear-gradient(#8cd7f0 0 42%, #60ae58 42%);
}

.scene-football .scene-world {
  background:
    radial-gradient(circle at 84% 12%, #ffe16a 0 6%, transparent 6.5%),
    linear-gradient(#8cd7f0 0 42%, #60ae58 42%);
}

.scene-football .scene-world::before {
  left: 7%;
  right: 7%;
  bottom: 5%;
  height: 50%;
  border: 5px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(255,255,255,0.85) 49.6% 50.4%, transparent 50.4%),
    radial-gradient(circle at center, transparent 0 14%, rgba(255,255,255,0.88) 14.4% 15%, transparent 15.4%),
    repeating-linear-gradient(90deg, #5cac53 0 90px, #66b65a 90px 180px);
}

.scene-football .scene-world::after {
  right: 3%;
  bottom: 18%;
  width: 18%;
  height: 25%;
  border: 7px solid #fff;
  border-bottom: 0;
  background:
    linear-gradient(35deg, transparent 46%, rgba(255,255,255,0.55) 47% 51%, transparent 52%),
    linear-gradient(-35deg, transparent 46%, rgba(255,255,255,0.55) 47% 51%, transparent 52%);
  background-size: 24px 24px;
}

.scene-football .shape-1,
.scene-football .shape-2,
.scene-football .shape-3,
.scene-football .shape-4 {
  top: 32%;
  width: 18%;
  height: 11%;
  background: repeating-linear-gradient(90deg, #477a91 0 8px, #d8e6e9 8px 15px);
  clip-path: polygon(0 100%, 10% 0, 90% 0, 100% 100%);
}
.scene-football .shape-1 { left: 5%; }
.scene-football .shape-2 { left: 28%; }
.scene-football .shape-3 { right: 28%; }
.scene-football .shape-4 { right: 5%; }
.scene-football .shape-5,
.scene-football .shape-6,
.scene-football .shape-7,
.scene-football .shape-8 { opacity: 0; }

/* Cycling course */
.stage-panel.scene-cycling {
  background: linear-gradient(#8dd8f3 0 50%, #70ad59 50% 68%, #676d71 68%);
}

.scene-cycling .scene-world {
  background:
    radial-gradient(circle at 82% 13%, #ffe071 0 6%, transparent 6.5%),
    linear-gradient(#8dd8f3 0 50%, #72b05b 50% 69%, #676d71 69%);
}

.scene-cycling .scene-world::before {
  left: -12%;
  right: -12%;
  bottom: -9%;
  height: 39%;
  border: 8px solid #f2f2e8;
  border-radius: 50%;
  background:
    repeating-linear-gradient(90deg, transparent 0 55px, rgba(255,255,255,0.7) 55px 86px),
    #555d62;
  transform: rotate(2deg);
}

.scene-cycling .scene-world::after {
  left: 4%;
  right: 4%;
  top: 31%;
  height: 18%;
  background:
    radial-gradient(circle at 8% 100%, #4c8f4f 0 19%, transparent 20%),
    radial-gradient(circle at 28% 100%, #3f8548 0 20%, transparent 21%),
    radial-gradient(circle at 50% 100%, #569c53 0 22%, transparent 23%),
    radial-gradient(circle at 73% 100%, #438849 0 18%, transparent 19%),
    radial-gradient(circle at 94% 100%, #589e55 0 21%, transparent 22%);
}

.scene-cycling .shape-1,
.scene-cycling .shape-2,
.scene-cycling .shape-3,
.scene-cycling .shape-4 {
  top: 20%;
  width: 8px;
  height: 28%;
  background: #7a654b;
  box-shadow: 0 -20px 0 13px #4b9650;
}
.scene-cycling .shape-1 { left: 12%; }
.scene-cycling .shape-2 { left: 34%; }
.scene-cycling .shape-3 { right: 34%; }
.scene-cycling .shape-4 { right: 12%; }
.scene-cycling .shape-5,
.scene-cycling .shape-6,
.scene-cycling .shape-7,
.scene-cycling .shape-8 { opacity: 0; }

/* Basketball court */
.stage-panel.scene-basketball {
  background: linear-gradient(#d5ecf2 0 45%, #d39255 45%);
}

.scene-basketball .scene-world {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px),
    linear-gradient(#d5ecf2 0 45%, #d39255 45%);
  background-size: 90px 100%, auto;
}

.scene-basketball .scene-world::before {
  left: 5%;
  right: 5%;
  bottom: 5%;
  height: 50%;
  border: 5px solid rgba(255,255,255,0.88);
  background:
    radial-gradient(circle at center, transparent 0 13%, rgba(255,255,255,0.9) 13.5% 14.4%, transparent 15%),
    linear-gradient(90deg, transparent 49.6%, rgba(255,255,255,0.9) 49.6% 50.4%, transparent 50.4%),
    #ce884d;
}

.scene-basketball .scene-world::after {
  right: 6%;
  top: 27%;
  width: 14%;
  height: 19%;
  border: 8px solid #eef4f4;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255,255,255,0.5) 48% 52%, transparent 52%),
    linear-gradient(transparent 48%, rgba(255,255,255,0.5) 48% 52%, transparent 52%),
    #7db1c7;
}

.scene-basketball .shape-1 {
  right: 10%;
  top: 46%;
  width: 8%;
  height: 5px;
  border-radius: 50%;
  background: #e85b38;
  box-shadow: 0 5px 0 2px #fff;
}
.scene-basketball .shape-2 {
  right: 13.8%;
  top: 47%;
  width: 5px;
  height: 23%;
  background: #646f75;
}
.scene-basketball .shape-3,
.scene-basketball .shape-4,
.scene-basketball .shape-5,
.scene-basketball .shape-6,
.scene-basketball .shape-7,
.scene-basketball .shape-8 { opacity: 0; }

.stage-copy {
  position: relative;
  z-index: 4;
  max-width: 660px;
  text-align: center;
  transition: opacity 250ms ease, transform 250ms ease;
}

.stage-label {
  padding: 7px 12px;
  border-radius: 20px;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.62);
}

.stage-copy h2 {
  margin: 15px 0 12px;
  color: var(--ink);
  font: 700 clamp(42px, 5.3vw, 78px)/0.95 "Fredoka", sans-serif;
  letter-spacing: -0.045em;
}

.stage-copy h2 em {
  position: relative;
  color: var(--green);
  font-style: normal;
}

.stage-copy h2 em::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 2%;
  bottom: -5px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  transform: rotate(-1deg);
  opacity: 0.8;
}

.stage-copy p {
  margin: 0;
  color: #6d867c;
  font-size: 16px;
}

.stage-decoration {
  position: absolute;
  z-index: 1;
  border: 2px solid rgba(29, 124, 91, 0.17);
}

.decoration-one {
  top: 11%;
  right: 8%;
  width: 23px;
  height: 23px;
  border-color: rgba(242, 138, 69, 0.45);
  border-radius: 6px;
  transform: rotate(18deg);
}

.decoration-two {
  top: 34%;
  left: 10%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--yellow);
}

.decoration-three {
  top: 45%;
  right: 13%;
  width: 26px;
  height: 10px;
  border-width: 0 0 3px;
  border-radius: 50%;
  transform: rotate(-28deg);
}

.countdown {
  position: absolute;
  z-index: 8;
  top: 36%;
  display: none;
  width: 142px;
  height: 142px;
  place-items: center;
  border: 6px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  box-shadow: 0 20px 45px rgba(28, 99, 73, 0.3);
  font: 700 70px/1 "Fredoka", sans-serif;
}

.stage-panel.is-dancing .countdown {
  display: grid;
  animation: countdownPulse 1s ease-in-out infinite;
}

.stage-panel.is-dancing .stage-copy {
  opacity: 0.16;
  transform: scale(0.95);
}

.stage-panel.is-dancing .scene-world {
  filter: saturate(1.18) contrast(1.04);
}

.winner-card {
  position: absolute;
  z-index: 9;
  top: 17%;
  min-width: min(570px, 78%);
  padding: 28px 42px 31px;
  border: 3px solid #fff;
  border-radius: 28px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 25px 70px rgba(26, 79, 59, 0.22);
  text-align: center;
  animation: winnerPop 520ms cubic-bezier(0.19, 1.4, 0.38, 1);
}

.winner-card::before {
  content: "★";
  position: absolute;
  top: -31px;
  left: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #8a6100;
  background: var(--yellow);
  box-shadow: 0 10px 22px rgba(91, 68, 10, 0.22);
  font-size: 28px;
  transform: translateX(-50%) rotate(-8deg);
  animation: trophyPop 650ms cubic-bezier(0.2, 1.5, 0.4, 1);
}

.winner-kicker,
.winner-cheer {
  display: block;
}

.winner-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.winner-card strong {
  display: block;
  max-width: 100%;
  margin: 4px 0 1px;
  overflow: hidden;
  color: var(--ink);
  font: 700 clamp(42px, 6vw, 76px)/1.05 "Fredoka", sans-serif;
  letter-spacing: -0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winner-cheer {
  color: #738a81;
  font-size: 15px;
  font-weight: 700;
  animation: cheerWiggle 620ms 180ms cubic-bezier(0.2, 1.5, 0.4, 1) both;
}

.veggie-garden {
  position: relative;
  z-index: 5;
  width: min(900px, 96%);
  max-height: 380px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 36px 10px;
  align-items: end;
  overflow: auto;
  padding: 50px 14px 76px;
  scrollbar-color: rgba(29, 124, 91, 0.35) transparent;
}

.veggie-slot {
  --crowd-scale: 0.82;
  height: 145px;
  display: grid;
  place-items: end center;
}

.race-mode .veggie-garden {
  width: min(1040px, 96%);
  height: min(510px, 61vh);
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-evenly;
  gap: 0;
  overflow: hidden;
  padding: 45px 120px 66px 24px;
}

.race-mode .veggie-slot,
.race-mode .veggie-garden.crowd-medium .veggie-slot,
.race-mode .veggie-garden.crowd-large .veggie-slot,
.race-mode .veggie-garden.crowd-huge .veggie-slot {
  --crowd-scale: var(--race-scale);
  position: relative;
  width: 125px;
  height: max(30px, calc((min(510px, 61vh) - 112px) / var(--lane-count)));
  min-height: 0;
  flex: 1 1 0;
  place-items: center;
  transform: translateX(var(--race-x, 0px));
  transition: transform 230ms cubic-bezier(0.22, 0.72, 0.28, 1);
}

.race-mode .veggie {
  transform-origin: center;
}

.race-mode .veggie-name {
  top: -61px;
  min-width: 112px;
  max-width: 220px;
  padding: 11px 18px;
  border-width: 3px;
  border-radius: 18px;
  font-size: 20px;
  line-height: 1.05;
  box-shadow: 0 10px 25px rgba(24, 62, 49, 0.25);
  transform: translateX(-50%) scale(var(--label-scale));
  transform-origin: center bottom;
}

.race-mode .veggie-slot::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -20px;
  width: min(850px, 76vw);
  bottom: 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
}

.phase-ready .veggie-slot {
  transform: translateX(0);
}

.phase-ready .veggie {
  animation: readyBounce 0.32s var(--delay) ease-in-out infinite alternate !important;
}

.phase-ready .countdown {
  display: grid;
  width: 190px;
  height: 82px;
  border-radius: 24px;
  font-size: 30px;
  letter-spacing: 0.08em;
}

.race-mode .crowd-medium .veggie-name {
  min-width: 98px;
  padding: 9px 14px;
  font-size: 17px;
}

.race-mode .crowd-large .veggie-name,
.race-mode .crowd-huge .veggie-name {
  top: -55px;
  min-width: 86px;
  max-width: 165px;
  padding: 8px 11px;
  font-size: 15px;
}

.phase-racing .veggie-slot:nth-child(3n + 1) {
  transition-timing-function: cubic-bezier(0.16, 0.78, 0.22, 1);
}

.phase-racing .veggie-slot:nth-child(3n + 2) {
  transition-timing-function: cubic-bezier(0.33, 0.1, 0.32, 0.95);
}

.phase-finish .winner-slot {
  transform: translateX(var(--race-x));
  transition: transform 420ms cubic-bezier(0.1, 0.8, 0.2, 1);
}

.phase-finish .winner-slot .veggie-name {
  z-index: 25;
}

.veggie-garden.crowd-medium {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 30px 4px;
}

.veggie-garden.crowd-medium .veggie-slot {
  --crowd-scale: 0.66;
  height: 118px;
}

.veggie-garden.crowd-large {
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 24px 2px;
}

.veggie-garden.crowd-large .veggie-slot {
  --crowd-scale: 0.48;
  height: 88px;
}

.veggie-garden.crowd-huge {
  grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
}

.veggie-garden.crowd-huge .veggie-slot {
  --crowd-scale: 0.38;
  height: 72px;
}

.veggie {
  position: relative;
  width: 116px;
  height: 156px;
  transform: rotate(var(--tilt)) scale(var(--crowd-scale));
  transform-origin: center bottom;
  filter: drop-shadow(0 14px 8px rgba(36, 91, 67, 0.14));
}

.competition-prop {
  position: absolute;
  z-index: 7;
  display: none;
  pointer-events: none;
}

.finish-line,
.goal-zone {
  position: absolute;
  z-index: 4;
  display: none;
  pointer-events: none;
}

.scene-pool .finish-line,
.scene-runningtrack .finish-line,
.scene-cycling .finish-line {
  right: 3%;
  bottom: 76px;
  display: block;
  width: 22px;
  height: 39%;
  opacity: 0.82;
  background: repeating-conic-gradient(#fff 0 25%, #1d252a 0 50%) 0 0 / 16px 16px;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.55);
}

.scene-football .goal-zone {
  right: 4%;
  bottom: 75px;
  display: block;
  width: 18%;
  height: 26%;
  border: 7px solid rgba(255,255,255,0.9);
  border-bottom: 0;
  background:
    linear-gradient(35deg, transparent 46%, rgba(255,255,255,0.45) 47% 51%, transparent 52%),
    linear-gradient(-35deg, transparent 46%, rgba(255,255,255,0.45) 47% 51%, transparent 52%);
  background-size: 24px 24px;
}

.scene-basketball .goal-zone {
  right: 6%;
  top: 34%;
  display: block;
  width: 12%;
  height: 7px;
  border-radius: 50%;
  background: #e65c35;
  box-shadow: 0 8px 0 2px rgba(255,255,255,0.85);
}

.scene-concert .competition-prop {
  top: 74px;
  right: -3px;
  display: block;
  width: 7px;
  height: 44px;
  border-radius: 5px;
  background: #25252d;
  transform: rotate(-28deg);
}

.scene-concert .competition-prop::before {
  content: "";
  position: absolute;
  top: -9px;
  left: -4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #585966;
  box-shadow: inset -4px -3px rgba(0,0,0,0.2);
}

.scene-football .competition-prop,
.scene-basketball .competition-prop {
  right: -2px;
  bottom: 3px;
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.scene-football .competition-prop {
  background:
    radial-gradient(circle at 50% 45%, #222 0 18%, transparent 19%),
    conic-gradient(from 20deg, #fff 0 15%, #222 15% 22%, #fff 22% 42%, #222 42% 49%, #fff 49% 69%, #222 69% 76%, #fff 76%);
  box-shadow: 0 3px 5px rgba(0,0,0,0.25);
}

.scene-basketball .competition-prop {
  background:
    linear-gradient(90deg, transparent 46%, #713718 47% 53%, transparent 54%),
    linear-gradient(transparent 46%, #713718 47% 53%, transparent 54%),
    #ef8b34;
  border: 2px solid #713718;
}

.scene-cycling .competition-prop {
  left: 2px;
  bottom: -1px;
  display: block;
  width: 111px;
  height: 48px;
  background:
    radial-gradient(circle at 18% 66%, transparent 0 15px, #263b3b 16px 19px, transparent 20px),
    radial-gradient(circle at 82% 66%, transparent 0 15px, #263b3b 16px 19px, transparent 20px),
    linear-gradient(28deg, transparent 43%, #efc73d 44% 49%, transparent 50%) 25px 3px / 45px 37px no-repeat,
    linear-gradient(-28deg, transparent 43%, #efc73d 44% 49%, transparent 50%) 42px 3px / 45px 37px no-repeat;
}

.scene-pool .competition-prop {
  left: 2px;
  right: 2px;
  bottom: -4px;
  display: block;
  height: 20px;
  border-radius: 50%;
  border-top: 6px solid rgba(255,255,255,0.8);
  box-shadow: 24px -5px 0 -5px rgba(255,255,255,0.72), -20px -2px 0 -6px rgba(255,255,255,0.7);
}

.scene-runningtrack .competition-prop {
  left: 6px;
  bottom: -2px;
  display: block;
  width: 38px;
  height: 14px;
  border-radius: 50%;
  background: rgba(243, 222, 181, 0.72);
  filter: blur(2px);
}

.veggie-name {
  position: absolute;
  z-index: 10;
  top: -43px;
  left: 50%;
  min-width: 74px;
  max-width: 140px;
  padding: 8px 13px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(31, 76, 59, 0.16);
  font: 700 14px/1 "Fredoka", sans-serif;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%) rotate(calc(var(--tilt) * -1));
  transform-origin: center bottom;
}

.stage-panel.is-dancing .veggie-name {
  animation: fixedNameBounce 0.72s var(--name-delay) ease-in-out infinite alternate;
}

.veggie-name::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.veggie-name.is-switching {
  animation: nameSwitch 180ms cubic-bezier(0.2, 1.5, 0.4, 1);
}

.veggie.is-winner .veggie-name {
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 24px rgba(20, 94, 68, 0.3);
  animation: winningName 700ms cubic-bezier(0.19, 1.5, 0.38, 1) both;
}

.veggie.is-winner .veggie-name::after {
  border-color: var(--green);
}

.veggie-body {
  position: absolute;
  z-index: 3;
  box-shadow: inset -8px -10px 0 rgba(0, 0, 0, 0.055), inset 5px 7px 0 rgba(255, 255, 255, 0.12);
}

.eye {
  position: absolute;
  z-index: 4;
  width: 7px;
  height: 10px;
  border-radius: 50%;
  background: #17352d;
}

.eye::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
}

.smile {
  position: absolute;
  z-index: 4;
  width: 20px;
  height: 11px;
  border-bottom: 3px solid #17352d;
  border-radius: 0 0 50% 50%;
}

.arm,
.leg {
  position: absolute;
  z-index: 1;
  width: 25px;
  height: 3px;
  border-radius: 4px;
  background: #234c3f;
  transform-origin: 0 50%;
}

.arm::after,
.leg::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: inherit;
}

.arm-left {
  left: 14px;
  transform: rotate(145deg);
}

.arm-right {
  right: -9px;
  transform: rotate(35deg);
}

.leg {
  bottom: 4px;
  width: 28px;
}

.leg-left {
  left: 42px;
  transform: rotate(105deg);
}

.leg-right {
  right: 27px;
  transform: rotate(74deg);
}

.carrot {
  width: 100px;
  height: 165px;
}

.carrot .veggie-body {
  left: 18px;
  top: 37px;
  width: 68px;
  height: 112px;
  border-radius: 45% 48% 60% 62% / 28% 28% 76% 76%;
  background: #f28a45;
  transform: rotate(-4deg);
}

.carrot .eye {
  top: 41px;
}

.carrot .eye.left {
  left: 19px;
}

.carrot .eye.right {
  right: 19px;
}

.carrot .smile {
  top: 59px;
  left: 25px;
}

.carrot .arm {
  top: 86px;
}

.leaf-set {
  position: absolute;
  z-index: 2;
  top: 1px;
  left: 25px;
  width: 55px;
  height: 54px;
}

.leaf-set i {
  position: absolute;
  bottom: 0;
  width: 21px;
  height: 51px;
  border-radius: 100% 0 100% 0;
  background: #43985b;
  transform-origin: bottom;
}

.leaf-set i:nth-child(1) {
  left: 0;
  transform: rotate(-32deg);
}

.leaf-set i:nth-child(2) {
  left: 18px;
  height: 56px;
  transform: rotate(-4deg);
}

.leaf-set i:nth-child(3) {
  right: 0;
  transform: rotate(31deg);
}

.tomato {
  width: 135px;
  height: 145px;
}

.tomato .veggie-body {
  left: 10px;
  top: 24px;
  width: 116px;
  height: 109px;
  border-radius: 48% 52% 50% 50%;
  background: #ec665c;
}

.tomato .eye {
  top: 45px;
}

.tomato .eye.left {
  left: 36px;
}

.tomato .eye.right {
  right: 36px;
}

.tomato .smile {
  top: 65px;
  left: 48px;
}

.cheek {
  position: absolute;
  top: 61px;
  width: 13px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 190, 165, 0.7);
}

.left-cheek {
  left: 21px;
}

.right-cheek {
  right: 21px;
}

.tomato .arm {
  top: 82px;
}

.tomato .arm-left {
  left: 9px;
}

.tomato .arm-right {
  right: -5px;
}

.tomato-leaves {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 42px;
  width: 58px;
  height: 37px;
}

.tomato-leaves i {
  position: absolute;
  left: 23px;
  bottom: 0;
  width: 14px;
  height: 34px;
  border-radius: 100% 0;
  background: #37894f;
  transform-origin: bottom center;
}

.tomato-leaves i:nth-child(1) { transform: rotate(-75deg); }
.tomato-leaves i:nth-child(2) { transform: rotate(-38deg); }
.tomato-leaves i:nth-child(3) { transform: rotate(0deg); }
.tomato-leaves i:nth-child(4) { transform: rotate(38deg); }
.tomato-leaves i:nth-child(5) { transform: rotate(75deg); }

.broccoli {
  width: 140px;
  height: 166px;
}

.broccoli .veggie-body {
  left: 45px;
  top: 64px;
  width: 55px;
  height: 91px;
  border-radius: 28% 28% 44% 44%;
  background: #8ac65b;
}

.broccoli .veggie-body::before,
.broccoli .veggie-body::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 32px;
  height: 70px;
  border-radius: 50%;
  background: #8ac65b;
}

.broccoli .veggie-body::before {
  left: -16px;
  transform: rotate(18deg);
}

.broccoli .veggie-body::after {
  right: -16px;
  transform: rotate(-18deg);
}

.broccoli .eye {
  top: 38px;
}

.broccoli .eye.left {
  left: 14px;
}

.broccoli .eye.right {
  right: 14px;
}

.broccoli .smile {
  top: 57px;
  left: 18px;
}

.broccoli .arm {
  top: 104px;
}

.broccoli .arm-left {
  left: 30px;
}

.broccoli .arm-right {
  right: 15px;
}

.broccoli-crown {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 9px;
  width: 126px;
  height: 91px;
}

.broccoli-crown i {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 48%;
  background: #438f52;
  box-shadow: inset -7px -7px rgba(0, 0, 0, 0.05);
}

.broccoli-crown i:nth-child(1) { left: 0; top: 25px; }
.broccoli-crown i:nth-child(2) { left: 27px; top: 0; }
.broccoli-crown i:nth-child(3) { right: 0; top: 25px; }
.broccoli-crown i:nth-child(4) { left: 39px; top: 34px; background: #3f9653; }
.broccoli-crown i:nth-child(5) { left: 65px; top: 6px; width: 51px; height: 51px; }

.eggplant {
  width: 112px;
  height: 168px;
}

.eggplant .veggie-body {
  left: 18px;
  top: 36px;
  width: 82px;
  height: 121px;
  border-radius: 46% 51% 60% 42% / 36% 40% 65% 64%;
  background: #7650a5;
  transform: rotate(8deg);
}

.eggplant .eye {
  top: 44px;
}

.eggplant .eye.left {
  left: 23px;
}

.eggplant .eye.right {
  right: 22px;
}

.eggplant .smile {
  top: 63px;
  left: 31px;
}

.eggplant .arm {
  top: 94px;
}

.eggplant .arm-left {
  left: 12px;
}

.eggplant .arm-right {
  right: -4px;
}

.eggplant-leaf {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 27px;
  width: 70px;
  height: 50px;
  transform: rotate(6deg);
}

.eggplant-leaf i {
  position: absolute;
  left: 23px;
  bottom: 0;
  width: 28px;
  height: 45px;
  border-radius: 100% 0;
  background: #4a995c;
  transform-origin: bottom;
}

.eggplant-leaf i:nth-child(1) { transform: rotate(-53deg); }
.eggplant-leaf i:nth-child(2) { transform: rotate(-4deg); }
.eggplant-leaf i:nth-child(3) { transform: rotate(48deg); }

.pepper,
.corn,
.strawberry,
.orange,
.watermelon,
.onion {
  width: 118px;
  height: 160px;
}

.pepper .veggie-body,
.corn .veggie-body,
.strawberry .veggie-body,
.orange .veggie-body,
.watermelon .veggie-body,
.onion .veggie-body {
  left: 18px;
  top: 32px;
  width: 84px;
  height: 116px;
}

.pepper .eye,
.corn .eye,
.strawberry .eye,
.orange .eye,
.watermelon .eye,
.onion .eye {
  top: 44px;
}

.pepper .eye.left,
.corn .eye.left,
.strawberry .eye.left,
.orange .eye.left,
.watermelon .eye.left,
.onion .eye.left { left: 24px; }

.pepper .eye.right,
.corn .eye.right,
.strawberry .eye.right,
.orange .eye.right,
.watermelon .eye.right,
.onion .eye.right { right: 24px; }

.pepper .smile,
.corn .smile,
.strawberry .smile,
.orange .smile,
.watermelon .smile,
.onion .smile {
  top: 64px;
  left: 32px;
}

.pepper .arm,
.corn .arm,
.strawberry .arm,
.orange .arm,
.watermelon .arm,
.onion .arm { top: 92px; }

.pepper .veggie-body {
  border-radius: 42% 42% 55% 55% / 28% 28% 72% 72%;
  background: #f2c344;
}

.pepper .veggie-body::before,
.pepper .veggie-body::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 37px;
  height: 99px;
  border-radius: 48%;
  background: #f2c344;
}
.pepper .veggie-body::before { left: -10px; transform: rotate(8deg); }
.pepper .veggie-body::after { right: -10px; transform: rotate(-8deg); }

.simple-leaf,
.citrus-leaf {
  position: absolute;
  z-index: 5;
  top: 9px;
  left: 37px;
  width: 50px;
  height: 42px;
}
.simple-leaf i,
.citrus-leaf i {
  position: absolute;
  left: 15px;
  bottom: 0;
  width: 24px;
  height: 38px;
  border-radius: 100% 0;
  background: #3f8f53;
  transform-origin: bottom;
}
.simple-leaf i:first-child { transform: rotate(-43deg); }
.simple-leaf i:last-child { transform: rotate(34deg); }

.corn .veggie-body {
  left: 29px;
  top: 22px;
  width: 62px;
  height: 126px;
  border-radius: 45% 45% 38% 38%;
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(212, 144, 28, 0.28) 10px 12px),
    repeating-linear-gradient(0deg, #ffd654 0 10px, #eab843 10px 12px);
}
.corn .eye.left { left: 15px; }
.corn .eye.right { right: 15px; }
.corn .smile { left: 21px; }
.corn-husk i {
  position: absolute;
  z-index: 2;
  bottom: 6px;
  width: 56px;
  height: 116px;
  border-radius: 100% 0 70% 0;
  background: #67aa58;
}
.corn-husk i:first-child { left: 7px; transform: rotate(-13deg); }
.corn-husk i:last-child { right: 5px; transform: scaleX(-1) rotate(-13deg); }

.strawberry .veggie-body {
  top: 39px;
  height: 105px;
  border-radius: 48% 48% 65% 65% / 35% 35% 85% 85%;
  background: #ef5362;
}
.berry-leaf {
  position: absolute;
  z-index: 5;
  top: 19px;
  left: 31px;
  width: 62px;
  height: 42px;
}
.berry-leaf i {
  position: absolute;
  left: 22px;
  bottom: 0;
  width: 18px;
  height: 37px;
  border-radius: 100% 0;
  background: #3e9854;
  transform-origin: bottom;
}
.berry-leaf i:nth-child(1) { transform: rotate(-68deg); }
.berry-leaf i:nth-child(2) { transform: rotate(-25deg); }
.berry-leaf i:nth-child(3) { transform: rotate(25deg); }
.berry-leaf i:nth-child(4) { transform: rotate(68deg); }
.berry-seeds {
  position: absolute;
  z-index: 4;
  left: 37px;
  top: 74px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffe395;
  box-shadow: 37px 4px #ffe395, 18px 23px #ffe395, -7px 33px #ffe395, 43px 38px #ffe395, 15px 55px #ffe395;
}

.orange .veggie-body {
  top: 37px;
  width: 96px;
  height: 96px;
  left: 11px;
  border-radius: 50%;
  background: #f49a3f;
}
.orange .eye { top: 35px; }
.orange .eye.left { left: 28px; }
.orange .eye.right { right: 28px; }
.orange .smile { top: 55px; left: 38px; }
.orange .arm { top: 82px; }
.citrus-leaf { top: 8px; left: 44px; }
.citrus-leaf i { transform: rotate(42deg); }

.watermelon {
  width: 140px;
}
.watermelon .veggie-body {
  left: 8px;
  top: 48px;
  width: 126px;
  height: 84px;
  border-radius: 50%;
  background: #52a85f;
}
.watermelon .eye { top: 28px; }
.watermelon .eye.left { left: 37px; }
.watermelon .eye.right { right: 37px; }
.watermelon .smile { top: 48px; left: 53px; }
.watermelon .arm { top: 88px; }
.melon-stripes {
  position: absolute;
  z-index: 4;
  left: 28px;
  top: 59px;
  width: 84px;
  height: 58px;
  opacity: 0.42;
  background: repeating-linear-gradient(90deg, transparent 0 15px, #236f40 15px 22px);
  border-radius: 50%;
}

.onion .veggie-body {
  top: 45px;
  height: 103px;
  border-radius: 50% 50% 48% 48% / 60% 60% 40% 40%;
  background: #d99ac3;
}
.onion-sprout {
  position: absolute;
  z-index: 5;
  top: 2px;
  left: 34px;
  width: 60px;
  height: 58px;
}
.onion-sprout i {
  position: absolute;
  left: 20px;
  bottom: 0;
  width: 14px;
  height: 58px;
  border-radius: 100% 0;
  background: #5ca15f;
  transform-origin: bottom;
}
.onion-sprout i:nth-child(1) { transform: rotate(-35deg); }
.onion-sprout i:nth-child(2) { transform: rotate(0deg); height: 64px; }
.onion-sprout i:nth-child(3) { transform: rotate(35deg); }

.stage-floor {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: 94px;
  background: #dcecc3;
}

.stage-floor::before {
  content: "";
  position: absolute;
  top: -29px;
  left: -5%;
  width: 110%;
  height: 62px;
  border-radius: 50%;
  background: #dcecc3;
}

.scene-kitchen .stage-floor,
.scene-kitchen .stage-floor::before {
  background: rgba(192, 121, 73, 0.88);
}

.scene-garden .stage-floor,
.scene-garden .stage-floor::before {
  background: rgba(138, 194, 91, 0.9);
}

.scene-sathon .stage-floor,
.scene-sathon .stage-floor::before {
  background: rgba(73, 89, 99, 0.88);
}

.scene-newyork .stage-floor,
.scene-newyork .stage-floor::before {
  background: rgba(65, 73, 81, 0.9);
}

.scene-concert .stage-floor,
.scene-concert .stage-floor::before {
  background: rgba(24, 18, 35, 0.94);
}

.scene-racetrack .stage-floor,
.scene-racetrack .stage-floor::before {
  background: rgba(68, 74, 79, 0.92);
}

.scene-market .stage-floor,
.scene-market .stage-floor::before {
  background: rgba(190, 127, 72, 0.9);
}

.scene-mall .stage-floor,
.scene-mall .stage-floor::before {
  background: rgba(205, 210, 214, 0.94);
}

.scene-runningtrack .stage-floor,
.scene-runningtrack .stage-floor::before {
  background: rgba(184, 82, 67, 0.92);
}

.scene-pool .stage-floor,
.scene-pool .stage-floor::before {
  background: rgba(48, 163, 207, 0.94);
}

.scene-football .stage-floor,
.scene-football .stage-floor::before {
  background: rgba(74, 157, 70, 0.94);
}

.scene-cycling .stage-floor,
.scene-cycling .stage-floor::before {
  background: rgba(82, 89, 94, 0.94);
}

.scene-basketball .stage-floor,
.scene-basketball .stage-floor::before {
  background: rgba(194, 119, 61, 0.94);
}

.floor-dot {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: rgba(65, 133, 80, 0.22);
}

.dot-one { left: 18%; top: 18px; width: 7px; height: 7px; }
.dot-two { right: 23%; top: 35px; width: 10px; height: 10px; }
.dot-three { left: 49%; top: 57px; width: 5px; height: 5px; }

.floor-line {
  position: absolute;
  z-index: 2;
  width: 40px;
  height: 10px;
  border-top: 2px solid rgba(65, 133, 80, 0.2);
  border-radius: 50%;
}

.line-one { left: 8%; top: 45px; transform: rotate(10deg); }
.line-two { right: 7%; top: 18px; transform: rotate(-12deg); }

.stage-panel.is-dancing .veggie {
  animation: veggieDance 0.48s var(--delay) ease-in-out infinite alternate;
}

.stage-panel.is-dancing .veggie-name {
  box-shadow: 0 9px 24px rgba(31, 76, 59, 0.22);
}

.stage-panel.is-dancing .veggie-slot:nth-child(4n) .veggie {
  animation-name: veggieSpinDance;
  animation-duration: 0.64s;
}

.stage-panel.is-dancing .veggie-slot:nth-child(5n) .veggie {
  animation-name: veggieSideDance;
  animation-duration: 0.56s;
}

.stage-panel.is-dancing .veggie-slot:nth-child(2n) .veggie {
  animation-name: veggieDanceReverse;
  animation-duration: 0.42s;
}

.stage-panel.is-dancing .veggie-slot:nth-child(3n) .veggie {
  animation-duration: 0.53s;
}

.stage-panel.is-dancing .arm-left {
  animation: waveLeft 0.3s ease-in-out infinite alternate;
}

.stage-panel.is-dancing .arm-right {
  animation: waveRight 0.34s ease-in-out infinite alternate;
}

.stage-panel.is-dancing .leg-left {
  animation: kickLeft 0.28s ease-in-out infinite alternate;
}

.stage-panel.is-dancing .leg-right {
  animation: kickRight 0.31s ease-in-out infinite alternate-reverse;
}

.stage-panel.is-dancing .eye {
  animation: excitedBlink 0.9s var(--delay) ease-in-out infinite;
}

.stage-panel.is-dancing .smile {
  animation: happyMouth 0.42s var(--delay) ease-in-out infinite alternate;
}

.stage-panel.is-dancing .stage-decoration {
  border-color: #fff;
  background: var(--yellow);
  animation: confettiFly 1.15s ease-in-out infinite;
}

.stage-panel.is-dancing .decoration-two { animation-delay: -0.4s; background: #ef6f62; }
.stage-panel.is-dancing .decoration-three { animation-delay: -0.8s; background: #6ec6ef; }

.stage-panel.has-winner .veggie.is-winner {
  animation: winnerBounce 0.75s var(--delay) ease-in-out 3;
}

.scene-pool.is-dancing .veggie {
  animation: swimRace 0.58s var(--delay) ease-in-out infinite alternate;
}

.scene-runningtrack.is-dancing .veggie {
  animation: sprintRace 0.34s var(--delay) ease-in-out infinite alternate;
}

.scene-concert.is-dancing .veggie {
  animation: singContest 0.48s var(--delay) ease-in-out infinite alternate;
}

.scene-football.is-dancing .veggie {
  animation: footballDribble 0.5s var(--delay) ease-in-out infinite alternate;
}

.scene-cycling.is-dancing .veggie {
  animation: cyclingRace 0.42s var(--delay) linear infinite alternate;
}

.scene-basketball.is-dancing .veggie {
  animation: basketballBounce 0.55s var(--delay) ease-in-out infinite alternate;
}

.scene-concert.is-dancing .competition-prop {
  animation: microphoneMove 0.42s var(--delay) ease-in-out infinite alternate;
}

.scene-football.is-dancing .competition-prop {
  animation: footballRoll 0.5s var(--delay) linear infinite;
}

.scene-basketball.is-dancing .competition-prop {
  animation: ballBounce 0.45s var(--delay) ease-in infinite alternate;
}

.scene-cycling.is-dancing .competition-prop {
  animation: bikeBounce 0.32s var(--delay) ease-in-out infinite alternate;
}

.scene-pool.is-dancing .arm-left {
  animation: swimArmLeft 0.58s var(--delay) linear infinite;
}

.scene-pool.is-dancing .arm-right {
  animation: swimArmRight 0.58s var(--delay) linear infinite;
}

.scene-pool.is-dancing .leg-left,
.scene-pool.is-dancing .leg-right {
  animation: swimKick 0.24s var(--delay) ease-in-out infinite alternate;
}

.scene-runningtrack.is-dancing .arm-left,
.scene-runningtrack.is-dancing .leg-right {
  animation: runForward 0.25s var(--delay) ease-in-out infinite alternate;
}

.scene-runningtrack.is-dancing .arm-right,
.scene-runningtrack.is-dancing .leg-left {
  animation: runBackward 0.25s var(--delay) ease-in-out infinite alternate;
}

.scene-concert.is-dancing .arm-right {
  animation: holdMicrophone 0.4s var(--delay) ease-in-out infinite alternate;
}

.scene-concert.is-dancing .arm-left {
  animation: singerWave 0.55s var(--delay) ease-in-out infinite alternate;
}

.scene-football.is-dancing .leg-right {
  animation: footballKick 0.5s var(--delay) cubic-bezier(0.2, 0.8, 0.4, 1) infinite;
}

.scene-football.is-dancing .leg-left {
  animation: footballPlant 0.5s var(--delay) ease-in-out infinite;
}

.scene-cycling.is-dancing .leg-left,
.scene-cycling.is-dancing .leg-right {
  animation: pedalLeg 0.34s var(--delay) linear infinite;
}

.scene-cycling.is-dancing .arm-left,
.scene-cycling.is-dancing .arm-right {
  animation: holdHandlebar 0.34s var(--delay) ease-in-out infinite alternate;
}

.scene-basketball.is-dancing .arm-left {
  animation: basketGatherLeft 0.55s var(--delay) ease-in-out infinite;
}

.scene-basketball.is-dancing .arm-right {
  animation: basketGatherRight 0.55s var(--delay) ease-in-out infinite;
}

.competition-finished .veggie:not(.is-winner) {
  opacity: 0.38;
  filter: grayscale(0.25) drop-shadow(0 8px 5px rgba(36, 91, 67, 0.1));
  transition: opacity 350ms ease, filter 350ms ease;
}

.competition-finished .veggie.is-winner {
  z-index: 12;
}

.competition-finished .stage-decoration {
  border-color: #fff;
  animation: winnerConfetti 1.25s ease-out infinite;
}

.competition-finished .decoration-one { background: #ffcf45; }
.competition-finished .decoration-two { background: #f26767; animation-delay: -0.45s; }
.competition-finished .decoration-three { background: #5cc9ef; animation-delay: -0.8s; }

.competition-finished .veggie.is-winner::after {
  content: "WIN!";
  position: absolute;
  z-index: 20;
  top: -82px;
  left: 50%;
  padding: 7px 11px;
  border: 3px solid #fff;
  border-radius: 14px;
  color: #4f3b00;
  background: var(--yellow);
  box-shadow: 0 8px 20px rgba(33, 59, 49, 0.22);
  font: 700 18px/1 "Fredoka", sans-serif;
  transform: translateX(-50%) rotate(-4deg);
  animation: winnerFlag 620ms cubic-bezier(0.2, 1.5, 0.4, 1);
}

.scene-pool.competition-finished .veggie.is-winner {
  animation: swimWinner 1s ease-in-out 2;
}

.scene-runningtrack.competition-finished .veggie.is-winner,
.scene-cycling.competition-finished .veggie.is-winner {
  animation: raceWinner 900ms ease-in-out 2;
}

.scene-concert.competition-finished .veggie.is-winner {
  animation: singerWinner 720ms ease-in-out 3;
}

.scene-football.competition-finished .veggie.is-winner {
  animation: goalWinner 780ms ease-in-out 3;
}

.scene-basketball.competition-finished .veggie.is-winner {
  animation: basketWinner 780ms ease-in-out 3;
}

.help-dialog {
  width: min(460px, calc(100% - 34px));
  padding: 37px 40px 34px;
  border: 0;
  border-radius: 25px;
  color: var(--ink);
  background: #fffdf6;
  box-shadow: 0 24px 80px rgba(24, 61, 48, 0.28);
}

.help-dialog::backdrop {
  background: rgba(19, 52, 42, 0.48);
  backdrop-filter: blur(4px);
}

.help-dialog h2 {
  margin: 10px 0 12px;
  font: 700 30px/1 "Fredoka", sans-serif;
}

.help-dialog ol {
  margin: 0;
  padding-left: 22px;
  color: #587168;
  line-height: 1.55;
}

.help-dialog li + li {
  margin-top: 7px;
}

.help-dialog p {
  margin: 19px 0 0;
  padding: 13px 15px;
  border-radius: 12px;
  color: var(--green-dark);
  background: #eaf4ec;
  font-size: 13px;
}

.dialog-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font: 700 20px/1 "Fredoka", sans-serif;
}

.dialog-close {
  position: absolute;
  top: 15px;
  right: 17px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #6d8079;
  background: #eef2ef;
  font-size: 23px;
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 28px;
  padding: 10px 16px;
  border-radius: 22px;
  color: #fff;
  background: #183f34;
  box-shadow: 0 10px 30px rgba(20, 56, 45, 0.28);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 200ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes veggieDance {
  0% { transform: translateY(0) rotate(-8deg) scale(var(--crowd-scale)); }
  100% { transform: translateY(-25px) rotate(9deg) scale(calc(var(--crowd-scale) * 1.04), calc(var(--crowd-scale) * 0.97)); }
}

@keyframes veggieDanceReverse {
  0% { transform: translateY(-23px) rotate(8deg) scale(calc(var(--crowd-scale) * 1.03), calc(var(--crowd-scale) * 0.97)); }
  100% { transform: translateY(0) rotate(-8deg) scale(var(--crowd-scale)); }
}

@keyframes veggieSpinDance {
  0% { transform: translate(-8px, 0) rotate(-12deg) scale(var(--crowd-scale)); }
  55% { transform: translate(5px, -29px) rotate(13deg) scale(calc(var(--crowd-scale) * 1.08)); }
  100% { transform: translate(10px, -5px) rotate(-4deg) scale(var(--crowd-scale)); }
}

@keyframes veggieSideDance {
  0% { transform: translateX(-15px) translateY(-4px) rotate(-7deg) scale(var(--crowd-scale)); }
  100% { transform: translateX(15px) translateY(-20px) rotate(8deg) scale(var(--crowd-scale)); }
}

@keyframes swimRace {
  0% { transform: translate(-12px, 4px) rotate(-14deg) scale(var(--crowd-scale)); }
  50% { transform: translate(8px, -9px) rotate(4deg) scale(calc(var(--crowd-scale) * 1.04)); }
  100% { transform: translate(18px, 2px) rotate(12deg) scale(var(--crowd-scale)); }
}

@keyframes sprintRace {
  0% { transform: translate(-11px, 0) rotate(-8deg) scale(var(--crowd-scale)); }
  100% { transform: translate(17px, -18px) rotate(10deg) scale(calc(var(--crowd-scale) * 1.03)); }
}

@keyframes singContest {
  0% { transform: translateY(0) rotate(-7deg) scale(var(--crowd-scale)); }
  100% { transform: translateY(-23px) rotate(7deg) scale(calc(var(--crowd-scale) * 1.08)); }
}

@keyframes footballDribble {
  0% { transform: translate(-10px, 0) rotate(-8deg) scale(var(--crowd-scale)); }
  55% { transform: translate(5px, -18px) rotate(5deg) scale(calc(var(--crowd-scale) * 1.03)); }
  100% { transform: translate(14px, 0) rotate(9deg) scale(var(--crowd-scale)); }
}

@keyframes cyclingRace {
  0% { transform: translate(-13px, 0) rotate(-4deg) scale(var(--crowd-scale)); }
  100% { transform: translate(16px, -8px) rotate(5deg) scale(var(--crowd-scale)); }
}

@keyframes basketballBounce {
  0% { transform: translateY(0) rotate(-5deg) scale(var(--crowd-scale)); }
  100% { transform: translateY(-28px) rotate(6deg) scale(calc(var(--crowd-scale) * 1.04)); }
}

@keyframes microphoneMove {
  from { transform: rotate(-35deg) translateY(2px); }
  to { transform: rotate(-12deg) translateY(-7px); }
}

@keyframes footballRoll {
  from { transform: translateX(-12px) rotate(0); }
  to { transform: translateX(12px) rotate(360deg); }
}

@keyframes ballBounce {
  from { transform: translateY(5px) rotate(0); }
  to { transform: translateY(-32px) rotate(110deg); }
}

@keyframes bikeBounce {
  from { transform: translateY(2px); }
  to { transform: translateY(-5px); }
}

@keyframes readyBounce {
  from { transform: translateY(0) rotate(-5deg) scale(var(--crowd-scale)); }
  to { transform: translateY(-12px) rotate(5deg) scale(calc(var(--crowd-scale) * 1.06)); }
}

@keyframes fixedNameBounce {
  0% { transform: translateX(-50%) translateY(1px) rotate(-2deg) scale(calc(var(--label-scale) * 0.98)); }
  100% { transform: translateX(-50%) translateY(-8px) rotate(2deg) scale(calc(var(--label-scale) * 1.04)); }
}

@keyframes swimArmLeft {
  0% { transform: rotate(130deg); }
  50% { transform: rotate(245deg); }
  100% { transform: rotate(490deg); }
}

@keyframes swimArmRight {
  0% { transform: rotate(310deg); }
  50% { transform: rotate(425deg); }
  100% { transform: rotate(670deg); }
}

@keyframes swimKick {
  from { transform: rotate(68deg); }
  to { transform: rotate(118deg); }
}

@keyframes runForward {
  from { transform: rotate(45deg); }
  to { transform: rotate(145deg); }
}

@keyframes runBackward {
  from { transform: rotate(145deg); }
  to { transform: rotate(45deg); }
}

@keyframes holdMicrophone {
  from { transform: rotate(-12deg); }
  to { transform: rotate(8deg) translateY(-5px); }
}

@keyframes singerWave {
  from { transform: rotate(125deg); }
  to { transform: rotate(215deg); }
}

@keyframes footballKick {
  0%, 45%, 100% { transform: rotate(75deg); }
  60% { transform: rotate(18deg); }
}

@keyframes footballPlant {
  0%, 100% { transform: rotate(104deg); }
  50% { transform: rotate(122deg); }
}

@keyframes pedalLeg {
  0% { transform: rotate(45deg); }
  50% { transform: rotate(125deg); }
  100% { transform: rotate(405deg); }
}

@keyframes holdHandlebar {
  from { transform: rotate(18deg); }
  to { transform: rotate(34deg); }
}

@keyframes basketGatherLeft {
  0%, 100% { transform: rotate(145deg); }
  55% { transform: rotate(235deg) translateY(-8px); }
}

@keyframes basketGatherRight {
  0%, 100% { transform: rotate(35deg); }
  55% { transform: rotate(-55deg) translateY(-8px); }
}

@keyframes swimWinner {
  0%, 100% { transform: translateX(0) rotate(-8deg) scale(var(--crowd-scale)); }
  50% { transform: translateX(42px) translateY(-12px) rotate(8deg) scale(calc(var(--crowd-scale) * 1.18)); }
}

@keyframes raceWinner {
  0%, 100% { transform: translateX(0) scale(var(--crowd-scale)); }
  50% { transform: translateX(48px) translateY(-18px) rotate(6deg) scale(calc(var(--crowd-scale) * 1.18)); }
}

@keyframes singerWinner {
  0%, 100% { transform: translateY(0) rotate(-6deg) scale(var(--crowd-scale)); }
  50% { transform: translateY(-35px) rotate(9deg) scale(calc(var(--crowd-scale) * 1.2)); }
}

@keyframes goalWinner {
  0%, 100% { transform: translateX(0) rotate(-5deg) scale(var(--crowd-scale)); }
  50% { transform: translateX(35px) translateY(-26px) rotate(14deg) scale(calc(var(--crowd-scale) * 1.18)); }
}

@keyframes basketWinner {
  0%, 100% { transform: translateY(0) scale(var(--crowd-scale)); }
  50% { transform: translateY(-42px) rotate(10deg) scale(calc(var(--crowd-scale) * 1.18)); }
}

@keyframes winnerFlag {
  from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(0.4) rotate(-12deg); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1) rotate(-4deg); }
}

@keyframes trophyPop {
  from { opacity: 0; transform: translateX(-50%) translateY(18px) rotate(-25deg) scale(0.3); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) rotate(-8deg) scale(1); }
}

@keyframes winnerConfetti {
  0% { opacity: 0; transform: translateY(-40px) rotate(0) scale(0.6); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(260px) rotate(290deg) scale(1.2); }
}

@keyframes waveLeft {
  from { transform: rotate(160deg); }
  to { transform: rotate(205deg); }
}

@keyframes kickLeft {
  from { transform: rotate(105deg); }
  to { transform: rotate(142deg); }
}

@keyframes kickRight {
  from { transform: rotate(74deg); }
  to { transform: rotate(35deg); }
}

@keyframes excitedBlink {
  0%, 42%, 48%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(0.12); }
}

@keyframes happyMouth {
  from { transform: scaleX(0.78) translateY(0); }
  to { transform: scaleX(1.22) translateY(2px); }
}

@keyframes cheerWiggle {
  0% { opacity: 0; transform: translateY(10px) rotate(-3deg) scale(0.8); }
  65% { opacity: 1; transform: translateY(-3px) rotate(2deg) scale(1.08); }
  100% { transform: translateY(0) rotate(0) scale(1); }
}

@keyframes floatingName {
  0% { transform: translateX(calc(-50% - 7px)) translateY(2px) rotate(-5deg) scale(0.94); }
  100% { transform: translateX(calc(-50% + 7px)) translateY(-14px) rotate(5deg) scale(1.08); }
}

@keyframes spotlightSweep {
  from { transform: rotate(-18deg) translateX(-18px); opacity: 0.25; }
  to { transform: rotate(18deg) translateX(18px); opacity: 0.85; }
}

@keyframes sceneChipPop {
  0%, 100% { transform: translateX(-50%) scale(0.96); }
  50% { transform: translateX(-50%) scale(1.06); }
}

@keyframes confettiFly {
  0% { transform: translateY(-30px) rotate(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(160px) rotate(210deg); opacity: 0; }
}

@keyframes waveRight {
  from { transform: rotate(20deg); }
  to { transform: rotate(-25deg); }
}

@keyframes countdownPulse {
  0%, 100% { transform: scale(0.97); }
  50% { transform: scale(1.05); }
}

@keyframes winnerPop {
  from { opacity: 0; transform: translateY(25px) scale(0.8) rotate(-2deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes winnerBounce {
  0%, 100% { transform: translateY(0) rotate(var(--tilt)) scale(var(--crowd-scale)); }
  50% { transform: translateY(-24px) rotate(calc(var(--tilt) * -1)) scale(calc(var(--crowd-scale) * 1.15)); }
}

@keyframes nameSwitch {
  0% { opacity: 0.35; transform: translateX(-50%) translateY(7px) scale(0.72) rotate(-5deg); }
  65% { opacity: 1; transform: translateX(-50%) translateY(-5px) scale(1.12) rotate(3deg); }
  100% { transform: translateX(-50%) translateY(0) scale(1) rotate(calc(var(--tilt) * -1)); }
}

@keyframes winningName {
  0% { opacity: 0; transform: translateX(-50%) translateY(18px) scale(calc(var(--label-scale) * 0.5)) rotate(-8deg); }
  70% { opacity: 1; transform: translateX(-50%) translateY(-8px) scale(calc(var(--label-scale) * 1.2)) rotate(4deg); }
  100% { transform: translateX(-50%) translateY(0) scale(calc(var(--label-scale) * 1.08)) rotate(calc(var(--tilt) * -1)); }
}

@media (max-width: 1000px) {
  .portal-shell {
    grid-template-columns: 225px minmax(0, 1fr);
  }

  .portal-sidebar {
    padding-inline: 14px;
  }

  .portal-logo strong {
    font-size: 14px;
  }

  .portal-content {
    padding-inline: 28px;
  }

  .program-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .program-card.featured {
    grid-column: span 2;
  }

  .page-shell {
    padding: 0 20px 24px;
  }

  .app-layout {
    grid-template-columns: 360px 1fr;
  }

  .control-panel {
    padding: 40px 34px 30px;
  }

  .stage-panel {
    min-height: 650px;
    padding-inline: 18px;
  }

  .veggie-garden {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    position: fixed;
    left: 0;
    width: min(290px, 85vw);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .portal-sidebar.open {
    transform: translateX(0);
  }

  .portal-header {
    height: 65px;
    padding: 0 14px;
  }

  .mobile-menu-button {
    display: block;
  }

  .portal-breadcrumb > span,
  .portal-breadcrumb > b {
    display: none;
  }

  .portal-language {
    padding-inline: 8px;
  }

  .portal-content {
    padding: 22px 15px 50px;
  }

  .portal-hero {
    min-height: 425px;
    padding: 46px 25px 34px;
    box-shadow: 6px 7px 0 #d9f05b;
  }

  .portal-hero h1 {
    max-width: 95%;
    font-size: clamp(46px, 15vw, 68px);
  }

  .portal-hero::after {
    top: auto;
    right: 8%;
    bottom: 23%;
  }

  .hero-sticker {
    top: 14px;
    right: 12px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .program-section {
    padding-top: 52px;
  }

  .section-title-row {
    align-items: flex-start;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .program-card.featured {
    grid-column: auto;
    display: block;
  }

  .featured .card-art {
    min-height: 210px;
    border-right: 0;
    border-bottom: 2px solid #202824;
  }

  .portal-back-button b {
    display: none;
  }

  .portal-back-button {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  .page-shell {
    padding: 0;
  }

  .topbar {
    height: 75px;
    padding: 0 19px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .help-button {
    width: 42px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .help-button b {
    display: none;
  }

  .language-control select {
    width: 72px;
    padding-inline: 9px;
  }

  .app-layout {
    display: flex;
    flex-direction: column-reverse;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .setup-screen {
    display: block;
  }

  .setup-screen[hidden] {
    display: none;
  }

  .competition-screen {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .competition-screen .stage-panel {
    min-height: calc(100vh - 75px);
    padding-top: 122px;
  }

  .competition-toolbar {
    top: 10px;
    left: 9px;
    right: 9px;
    grid-template-columns: 42px 1fr 42px;
    gap: 6px;
  }

  .back-button,
  .again-button {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .back-button span {
    font-size: 22px;
  }

  .again-button::before {
    content: "↻";
    font-size: 22px;
  }

  .round-status {
    min-width: 0;
    padding-inline: 9px;
  }

  .round-status strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .competition-screen .scene-chip {
    top: 66px;
  }

  .leaderboard {
    top: 108px;
    right: 8px;
    width: 146px;
    padding: 7px;
  }

  .leaderboard-title {
    padding-bottom: 4px;
    font-size: 8px;
  }

  .leaderboard li {
    grid-template-columns: 21px 1fr;
    gap: 5px;
    padding: 3px 5px 3px 3px;
  }

  .leaderboard b {
    width: 21px;
    height: 21px;
    font-size: 10px;
  }

  .leaderboard strong {
    font-size: 11px;
  }

  .race-mode .veggie-name,
  .race-mode .crowd-medium .veggie-name,
  .race-mode .crowd-large .veggie-name,
  .race-mode .crowd-huge .veggie-name {
    top: -54px;
    min-width: 82px;
    max-width: 135px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .stage-panel {
    min-height: 490px;
    padding-top: 56px;
  }

  .stage-copy h2 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .stage-copy p {
    max-width: 290px;
    margin-inline: auto;
    font-size: 14px;
  }

  .veggie-garden {
    width: 100%;
    max-height: 245px;
    padding: 42px 5px 48px;
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  }

  .control-panel {
    padding: 40px 24px 42px;
  }

  .winner-card {
    top: 15%;
    min-width: 86%;
    padding: 23px 20px;
  }

  .winner-card strong {
    font-size: clamp(38px, 12vw, 60px);
  }

  .countdown {
    top: 31%;
    width: 115px;
    height: 115px;
    font-size: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
