:root {
  --ink: #26434b;
  --deep-blue: #1d6d7c;
  --aqua: #7bdad2;
  --cream: #fffaf0;
  --yellow: #ffd766;
  --coral: #f47568;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

body,
button {
  font-family: "Hakgyoansim Siganpyo", "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
}

button {
  color: inherit;
}

button:focus-visible {
  outline: 5px solid #1a6f82;
  outline-offset: 4px;
}

.appShell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 13%, rgba(255, 255, 255, 0.94) 0 4%, transparent 4.2%),
    radial-gradient(circle at 85% 22%, rgba(255, 255, 255, 0.72) 0 7%, transparent 7.2%),
    linear-gradient(145deg, #eefcf9 0%, #fffaf0 50%, #fff2d9 100%);
  isolation: isolate;
}

.summerGlow,
.bubble {
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.summerGlow {
  border-radius: 999px;
  filter: blur(1px);
}

.summerGlowOne {
  width: 42vw;
  height: 42vw;
  left: -16vw;
  bottom: -20vw;
  background: rgba(105, 210, 205, 0.24);
}

.summerGlowTwo {
  width: 34vw;
  height: 34vw;
  right: -11vw;
  top: -13vw;
  background: rgba(255, 211, 97, 0.25);
}

.bubble {
  width: 18px;
  height: 18px;
  border: 4px solid rgba(72, 176, 177, 0.24);
  border-radius: 50%;
}

.bubbleOne {
  left: 4vw;
  top: 26vh;
  box-shadow: 28px 38px 0 -3px rgba(72, 176, 177, 0.2);
}

.bubbleTwo {
  right: 7vw;
  bottom: 15vh;
  transform: scale(1.4);
  box-shadow: -31px -27px 0 -4px rgba(244, 117, 104, 0.18);
}

/* Start */
.startScreen {
  position: relative;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: clamp(44px, 6vw, 100px);
}

.gearButton {
  position: absolute;
  z-index: 10;
  top: clamp(22px, 3vw, 42px);
  right: clamp(22px, 3vw, 42px);
  display: grid;
  place-items: center;
  width: clamp(58px, 5vw, 76px);
  height: clamp(58px, 5vw, 76px);
  padding: 0;
  border: 2px solid rgba(44, 104, 114, 0.14);
  border-radius: 50%;
  color: #3c757c;
  font-size: clamp(27px, 2.4vw, 38px);
  line-height: 1;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(49, 112, 116, 0.12);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.gearButton:hover {
  transform: rotate(12deg) scale(1.05);
  background: white;
}

.startCopy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: clamp(14px, 2vh, 24px);
  padding: 10px 20px;
  border: 2px solid rgba(29, 109, 124, 0.12);
  border-radius: 999px;
  color: var(--deep-blue);
  font-size: clamp(17px, 1.4vw, 24px);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.65);
}

.startCopy h1 {
  margin: 0;
  color: #28505a;
  font-size: clamp(58px, 6vw, 112px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.startCopy h1 strong {
  display: block;
  margin-top: 0.08em;
  color: var(--coral);
  font-size: 0.85em;
  text-shadow: 0 5px 0 rgba(255, 255, 255, 0.85);
}

.startCopy p {
  max-width: 720px;
  margin: clamp(20px, 3vh, 38px) 0 clamp(24px, 3.3vh, 42px);
  color: #486e75;
  font-size: clamp(23px, 2vw, 36px);
  font-weight: 800;
  line-height: 1.45;
  word-break: keep-all;
}

.startButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: clamp(280px, 28vw, 430px);
  padding: clamp(20px, 2.2vh, 30px) clamp(34px, 4vw, 62px);
  border: 0;
  border-radius: 999px;
  color: white;
  font-size: clamp(30px, 2.6vw, 46px);
  font-weight: 900;
  background: linear-gradient(135deg, #f4766a, #ef594f);
  box-shadow: 0 16px 0 #d94b43, 0 24px 42px rgba(217, 75, 67, 0.26);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.startButton:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 0 #d94b43, 0 28px 48px rgba(217, 75, 67, 0.28);
}

.startButton:active {
  transform: translateY(8px);
  box-shadow: 0 8px 0 #d94b43, 0 14px 30px rgba(217, 75, 67, 0.2);
}

.settingSummary {
  margin-top: 34px;
  color: #6c8588;
  font-size: clamp(15px, 1.2vw, 21px);
  font-weight: 800;
  word-break: keep-all;
}

.startVisual {
  position: relative;
  align-self: stretch;
  min-width: 0;
}

.startVisual::before {
  content: "";
  position: absolute;
  width: min(44vw, 760px);
  aspect-ratio: 1;
  top: 50%;
  left: 52%;
  border: 4px dashed rgba(73, 172, 172, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.44);
  transform: translate(-50%, -50%);
}

.startBowl {
  position: absolute;
  z-index: 2;
  width: min(44vw, 780px);
  left: 50%;
  bottom: 5%;
  filter: drop-shadow(0 28px 24px rgba(58, 119, 128, 0.2));
  transform: translateX(-50%);
}

.previewFruit {
  position: absolute;
  z-index: 3;
  object-fit: contain;
  filter: drop-shadow(0 14px 12px rgba(43, 70, 77, 0.16));
  animation: gentleFloat 3.6s ease-in-out infinite;
}

.previewOne {
  width: min(20vw, 330px);
  left: 4%;
  top: 12%;
  transform: rotate(-10deg);
}

.previewTwo {
  width: min(15vw, 250px);
  right: 2%;
  top: 21%;
  animation-delay: -1.4s;
  transform: rotate(10deg);
}

.previewThree {
  width: min(13vw, 210px);
  right: 12%;
  bottom: 10%;
  animation-delay: -2.2s;
  transform: rotate(-9deg);
}

.sunBadge {
  position: absolute;
  z-index: 4;
  top: 8%;
  right: 22%;
  display: grid;
  place-items: center;
  width: clamp(100px, 8vw, 145px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #8a5a00;
  font-size: clamp(21px, 1.7vw, 30px);
  font-weight: 900;
  background: var(--yellow);
  box-shadow: 0 11px 0 #efb832;
  transform: rotate(8deg);
}

@keyframes gentleFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

/* Countdown */
.countdownScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
}

.countdownScreen p {
  margin: 0 0 2vh;
  color: #356772;
  font-size: clamp(30px, 3vw, 54px);
  font-weight: 900;
}

.countdownNumber {
  display: grid;
  place-items: center;
  width: clamp(230px, 24vw, 390px);
  aspect-ratio: 1;
  border: 12px solid white;
  border-radius: 50%;
  color: white;
  font-size: clamp(140px, 17vw, 300px);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(145deg, #79d9d2, #36aeb1);
  box-shadow: 0 20px 0 #238f99, 0 36px 60px rgba(38, 115, 124, 0.24);
  animation: countdownPop 850ms cubic-bezier(0.2, 0.9, 0.25, 1);
}

.countdownScreen > span {
  margin-top: 4vh;
  color: #f06a60;
  font-size: clamp(22px, 2vw, 36px);
  font-weight: 900;
}

@keyframes countdownPop {
  0% { opacity: 0; transform: scale(0.46) rotate(-9deg); }
  35% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* Play */
.playScreen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(50, 142, 149, 0.08) 49.7% 50.3%, transparent 50.3%),
    radial-gradient(circle at 50% 80%, var(--fruit-pale) 0 19%, transparent 38%);
}

.playTopBar {
  position: absolute;
  z-index: 20;
  top: clamp(18px, 2.5vh, 34px);
  left: clamp(22px, 3vw, 50px);
  right: clamp(22px, 3vw, 50px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.timerPill,
.instructionPill,
.quitButton {
  border: 2px solid rgba(55, 118, 127, 0.1);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(61, 124, 128, 0.1);
  backdrop-filter: blur(10px);
}

.timerPill {
  justify-self: start;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 19px;
  border-radius: 18px;
}

.timerPill span {
  color: #638085;
  font-size: clamp(13px, 1vw, 17px);
  font-weight: 800;
}

.timerPill strong {
  color: #285b65;
  font-size: clamp(22px, 1.8vw, 31px);
}

.instructionPill {
  padding: 13px 28px;
  border-radius: 999px;
  color: #3c6a72;
  font-size: clamp(17px, 1.4vw, 24px);
  font-weight: 900;
}

.quitButton {
  justify-self: end;
  padding: 12px 18px;
  border-radius: 15px;
  color: #55757a;
  font-size: clamp(14px, 1vw, 17px);
  font-weight: 800;
  cursor: pointer;
}

.progressTrack {
  position: absolute;
  z-index: 18;
  top: clamp(86px, 10.5vh, 118px);
  left: 4vw;
  right: 4vw;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(60, 129, 135, 0.12);
}

.progressFill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fruit-color), #ffd45d);
  transition: width 250ms linear;
}

.fruitNameCard {
  position: absolute;
  z-index: 15;
  top: clamp(116px, 13vh, 148px);
  left: 50%;
  width: min(58vw, 830px);
  text-align: center;
  transform: translateX(-50%);
}

.fruitNameCard span {
  display: inline-block;
  margin-bottom: 4px;
  color: #628086;
  font-size: clamp(15px, 1.2vw, 21px);
  font-weight: 900;
}

.fruitNameCard h2 {
  margin: 0;
  color: var(--fruit-color);
  font-size: clamp(74px, 8.4vw, 154px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow:
    0 7px 0 white,
    0 13px 22px rgba(53, 91, 98, 0.13);
  animation: nameBounce 550ms cubic-bezier(0.2, 0.95, 0.3, 1);
}

@keyframes nameBounce {
  0% { opacity: 0; transform: translateY(-20px) scale(0.82); }
  65% { opacity: 1; transform: translateY(4px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.dropZone {
  position: absolute;
  inset: clamp(105px, 12vh, 140px) 0 0;
}

.dropGuide {
  position: absolute;
  top: 32%;
  bottom: 18%;
  left: 50%;
  width: min(28vw, 460px);
  border-left: 4px dashed rgba(54, 139, 146, 0.11);
  border-right: 4px dashed rgba(54, 139, 146, 0.11);
  border-radius: 40%;
  transform: translateX(-50%);
}

.fallingFruit {
  position: absolute;
  z-index: 8;
  top: 23%;
  left: 50%;
  width: clamp(210px, 23vw, 420px);
  height: clamp(190px, 26vh, 340px);
  object-fit: contain;
  filter: drop-shadow(0 20px 18px rgba(40, 79, 88, 0.2));
  animation: fruitDrop var(--drop-duration) linear forwards;
  will-change: transform, opacity;
}

@keyframes fruitDrop {
  0% { opacity: 0; transform: translate(-50%, -9vh) scale(0.86); }
  7% { opacity: 1; transform: translate(-50%, -5vh) scale(0.94); }
  72% { opacity: 1; transform: translate(-50%, 39vh) scale(1.02); }
  88% { opacity: 1; transform: translate(-50%, 47vh) scale(0.96); }
  94% { opacity: 1; transform: translate(-50%, 45vh) scale(1.03); }
  100% { opacity: 0; transform: translate(-50%, 47vh) scale(0.72); }
}

.playBowl {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: -3.5vh;
  width: min(43vw, 690px);
  max-height: 34vh;
  object-fit: contain;
  filter: drop-shadow(0 22px 20px rgba(39, 102, 117, 0.2));
  transform: translateX(-50%);
}

.landingSparkles {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: 25%;
  width: min(32vw, 520px);
  height: 120px;
  transform: translateX(-50%);
  pointer-events: none;
}

.landingSparkles span {
  position: absolute;
  color: #ffc83d;
  font-size: clamp(28px, 3vw, 52px);
  opacity: 0;
  animation: sparkleAtLanding var(--drop-duration) linear infinite;
}

.landingSparkles span:nth-child(1) { left: 10%; top: 30%; }
.landingSparkles span:nth-child(2) { left: 48%; top: 0; animation-delay: 80ms; }
.landingSparkles span:nth-child(3) { right: 8%; top: 38%; animation-delay: 150ms; }

@keyframes sparkleAtLanding {
  0%, 78% { opacity: 0; transform: scale(0.4) rotate(0); }
  88% { opacity: 1; transform: scale(1.12) rotate(18deg); }
  100% { opacity: 0; transform: scale(0.75) rotate(35deg); }
}

/* Finish */
.finishScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 4vh 5vw 3vh;
  text-align: center;
  background:
    radial-gradient(circle at 50% 60%, rgba(255, 222, 114, 0.26), transparent 38%),
    linear-gradient(150deg, rgba(241, 255, 251, 0.65), rgba(255, 248, 224, 0.8));
}

.praiseBurst {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 999px;
  color: #8b5900;
  font-size: clamp(21px, 1.8vw, 31px);
  font-weight: 900;
  background: #ffd45b;
  box-shadow: 0 9px 0 #eeb63c;
  animation: praisePop 650ms cubic-bezier(0.17, 0.88, 0.31, 1.34);
}

.finishScreen h2 {
  margin: clamp(20px, 2.3vh, 30px) 0 6px;
  color: #ef6258;
  font-size: clamp(48px, 5.2vw, 92px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.04;
  text-shadow: 0 5px 0 white;
}

.finishScreen > p {
  margin: 0;
  color: #4e757c;
  font-size: clamp(21px, 1.9vw, 34px);
  font-weight: 900;
}

.completeBowl {
  position: relative;
  width: min(66vw, 980px);
  height: min(51vh, 560px);
  margin-top: -1vh;
}

.finishedBowlImage {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  width: min(55vw, 800px);
  max-height: 39vh;
  object-fit: contain;
  filter: drop-shadow(0 27px 20px rgba(49, 108, 121, 0.2));
  transform: translateX(-50%);
}

.finishedTopping {
  position: absolute;
  z-index: 4;
  width: min(16vw, 230px);
  height: min(17vh, 190px);
  object-fit: contain;
  filter: drop-shadow(0 10px 9px rgba(51, 75, 78, 0.16));
  animation: toppingPop 700ms cubic-bezier(0.2, 0.9, 0.2, 1.25) both;
}

.finishedTopping:nth-child(2) { animation-delay: 110ms; }
.finishedTopping:nth-child(3) { animation-delay: 220ms; }
.finishedTopping:nth-child(4) { animation-delay: 330ms; }

.finishStar {
  position: absolute;
  z-index: 6;
  color: #ffd24d;
  font-size: clamp(34px, 4vw, 70px);
  text-shadow: 0 4px 0 #ecae2a;
  animation: starTwinkle 1.15s ease-in-out infinite alternate;
}

.starOne { left: 8%; top: 25%; transform: rotate(-18deg); }
.starTwo { right: 10%; top: 16%; animation-delay: -0.4s; transform: rotate(16deg); }
.starThree { right: 4%; bottom: 24%; animation-delay: -0.8s; transform: rotate(-8deg) scale(0.7); }

.finishActions {
  display: flex;
  gap: 18px;
  margin-top: -1vh;
}

.finishActions button {
  padding: 15px 34px;
  border-radius: 999px;
  font-size: clamp(19px, 1.5vw, 27px);
  font-weight: 900;
  cursor: pointer;
}

.againButton {
  border: 0;
  color: white;
  background: #f06a60;
  box-shadow: 0 8px 0 #d64f48;
}

.homeButton {
  border: 3px solid #b8dbd8;
  color: #3c7079;
  background: white;
}

@keyframes praisePop {
  0% { opacity: 0; transform: scale(0.45) rotate(-8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes toppingPop {
  0% { opacity: 0; translate: 0 -70px; scale: 0.4; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes starTwinkle {
  from { opacity: 0.55; scale: 0.78; }
  to { opacity: 1; scale: 1.1; }
}

/* Settings */
.settingsBackdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(27, 71, 78, 0.42);
  backdrop-filter: blur(8px);
  animation: fadeIn 180ms ease;
}

.settingsPanel {
  width: min(760px, 92vw);
  max-height: 92vh;
  overflow: auto;
  padding: clamp(24px, 3vw, 40px);
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 34px;
  background: #fffdf7;
  box-shadow: 0 34px 80px rgba(19, 63, 72, 0.27);
  animation: panelUp 260ms cubic-bezier(0.2, 0.9, 0.24, 1);
}

.settingsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.settingsHeader span {
  display: block;
  margin-bottom: 3px;
  color: #6a9297;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.settingsHeader h2 {
  margin: 0;
  color: #315f68;
  font-size: clamp(31px, 3vw, 46px);
  font-weight: 900;
}

.closeSettings {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0 0 5px;
  border: 0;
  border-radius: 50%;
  color: #56787e;
  font-size: 39px;
  line-height: 1;
  background: #edf7f5;
  cursor: pointer;
}

.settingsGroup {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.settingsGroup legend {
  margin-bottom: 10px;
  color: #3e676e;
  font-size: 20px;
  font-weight: 900;
}

.settingsHint {
  margin: -3px 0 12px;
  color: #819496;
  font-size: 14px;
  font-weight: 700;
}

.segmentedOptions {
  display: grid;
  gap: 10px;
}

.threeColumns {
  grid-template-columns: repeat(3, 1fr);
}

.segmentedOptions button {
  padding: 15px;
  border: 2px solid #d4e8e5;
  border-radius: 17px;
  color: #55777b;
  font-size: 19px;
  font-weight: 900;
  background: white;
  cursor: pointer;
}

.segmentedOptions button.selected {
  border-color: #4bb9b4;
  color: #236f75;
  background: #dcf8f4;
  box-shadow: inset 0 0 0 2px rgba(75, 185, 180, 0.15);
}

.fruitOptions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.fruitOption {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  min-height: 150px;
  padding: 13px 8px 12px;
  overflow: hidden;
  border: 2px solid #deebe9;
  border-radius: 20px;
  color: #57757a;
  background: white;
  cursor: pointer;
}

.fruitOption.selected {
  border-color: #f28a7d;
  color: #8b4b45;
  background: #fff1ed;
  box-shadow: inset 0 0 0 2px rgba(242, 138, 125, 0.13);
}

.fruitOption img {
  width: 88px;
  height: 86px;
  object-fit: contain;
}

.fruitOption strong {
  margin-top: 3px;
  font-size: 18px;
}

.checkMark {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 2px solid #d6e4e3;
  border-radius: 50%;
  color: white;
  font-size: 17px;
  background: white;
}

.fruitOption.selected .checkMark {
  border-color: #ed7267;
  background: #ed7267;
}

.saveSettings {
  width: 100%;
  padding: 18px;
  border: 0;
  border-radius: 19px;
  color: white;
  font-size: 22px;
  font-weight: 900;
  background: #3facaa;
  box-shadow: 0 8px 0 #268e8d;
  cursor: pointer;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes panelUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  .startScreen {
    grid-template-columns: 1fr;
    align-content: center;
    text-align: center;
  }

  .startCopy {
    z-index: 5;
    justify-self: center;
  }

  .startVisual {
    position: absolute;
    inset: 0;
    opacity: 0.2;
  }

  .settingSummary {
    max-width: 80vw;
  }

  .playTopBar {
    grid-template-columns: auto 1fr auto;
  }

  .instructionPill {
    text-align: center;
  }
}

@media (max-height: 760px) {
  .startScreen { padding-top: 36px; padding-bottom: 36px; }
  .startCopy h1 { font-size: clamp(52px, 5.3vw, 84px); }
  .startCopy p { margin: 14px 0 22px; font-size: clamp(19px, 1.8vw, 28px); }
  .settingSummary { margin-top: 24px; }
  .fruitNameCard h2 { font-size: clamp(64px, 7vw, 112px); }
  .finishedBowlImage { max-height: 34vh; }
  .completeBowl { height: 43vh; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

/* Bright tropical revision */
.appShell {
  background:
    linear-gradient(180deg,
      #139ff3 0%,
      #29baf8 48%,
      #09aee5 48.3%,
      #0ac7ec 58%,
      #77e4ef 63%,
      #f7dea0 63.2%,
      #f2cb7e 82%,
      #bd7d43 82.2%,
      #8f542e 100%);
}

.appShell::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 31%, rgba(255,255,255,.96) 0 4%, transparent 4.4%),
    radial-gradient(ellipse at 17% 29%, rgba(255,255,255,.93) 0 6%, transparent 6.4%),
    radial-gradient(ellipse at 23% 32%, rgba(255,255,255,.92) 0 5%, transparent 5.4%),
    radial-gradient(ellipse at 77% 31%, rgba(255,255,255,.95) 0 5%, transparent 5.4%),
    radial-gradient(ellipse at 84% 28%, rgba(255,255,255,.93) 0 7%, transparent 7.4%),
    radial-gradient(ellipse at 92% 33%, rgba(255,255,255,.91) 0 5%, transparent 5.4%),
    repeating-linear-gradient(0deg, transparent 0 42px, rgba(255,255,255,.08) 43px 45px);
  opacity: .92;
}

.appShell::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 17.5%;
  height: 5px;
  background: rgba(255,255,255,.76);
  box-shadow:
    0 -18px 0 rgba(255,255,255,.44),
    0 -35px 0 rgba(255,255,255,.27),
    0 8px 20px rgba(75,116,122,.2);
}

.beachDecor {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.summerSun {
  position: absolute;
  top: 8%;
  right: 22%;
  width: clamp(70px, 7vw, 130px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: white;
  box-shadow:
    0 0 24px 12px rgba(255,255,255,.8),
    0 0 70px 28px rgba(255,245,150,.62);
}

.palm,
.surfboard,
.beachBall {
  position: absolute;
  filter: drop-shadow(0 10px 7px rgba(28,83,82,.22));
}

.palm {
  top: -10%;
  font-size: clamp(150px, 19vw, 330px);
}

.palmLeft { left: -7%; transform: rotate(16deg) scaleX(-1); }
.palmRight { right: -7%; transform: rotate(-16deg); }
.surfboard { left: 1.5%; bottom: 7%; font-size: clamp(70px, 8vw, 145px); transform: rotate(-8deg); }
.beachBall { right: 1.2%; bottom: 4%; font-size: clamp(72px, 8vw, 145px); transform: rotate(8deg); }

.startScreen,
.rulesScreen,
.countdownScreen,
.playScreen,
.finishScreen {
  z-index: 2;
}

.startScreen {
  padding-top: clamp(54px, 7vw, 110px);
  text-shadow: 0 3px 0 rgba(255,255,255,.6);
}

.eyebrow {
  border-color: white;
  color: #084a8a;
  background: rgba(255,255,255,.92);
  box-shadow: 0 7px 0 rgba(5,93,168,.3);
}

.startCopy h1 {
  line-height: .94;
}

.rainbowTitle {
  display: block;
  color: #fff;
  font-size: .82em;
  letter-spacing: -.07em;
  -webkit-text-stroke: 10px white;
  paint-order: stroke fill;
  background: linear-gradient(90deg, #1774ed 0 27%, #f63c89 27% 56%, #51b819 56% 78%, #159de7 78%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 12px 0 #0768c9) drop-shadow(0 16px 8px rgba(4,62,125,.25));
}

.ddrTitle {
  display: flex !important;
  gap: .04em;
  justify-content: flex-start;
  margin-top: .22em !important;
  font-size: 1.06em !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

.ddrTitle i {
  display: inline-grid;
  place-items: center;
  width: .93em;
  height: .92em;
  border: 9px solid white;
  border-radius: .22em;
  color: white;
  font-style: normal;
  line-height: 1;
  box-shadow: 0 10px 0 #146dbd, 0 18px 16px rgba(7,67,114,.28);
}

.ddrTitle i:nth-child(1) { background: #f32e29; }
.ddrTitle i:nth-child(2) { background: #ffae17; }
.ddrTitle i:nth-child(3) { background: #43ae17; }

.startCopy p {
  max-width: 650px;
  padding: 15px 22px;
  border-radius: 24px;
  color: #173f4d;
  background: rgba(255,255,255,.9);
  box-shadow: 0 9px 0 rgba(0,111,183,.22);
}

.settingSummary {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  color: #0b4c65;
  background: rgba(255,255,255,.88);
}

.startVisual::before {
  border-color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.26);
}

.startBowl {
  filter: drop-shadow(0 30px 18px rgba(20,70,70,.33));
}

.sunBadge {
  color: #a24b00;
  background: #ffe149;
  box-shadow: 0 10px 0 #f0a913;
}

.gearButton {
  border: 4px solid white;
  color: #07588f;
  background: #fff;
  box-shadow: 0 8px 0 #1589ce, 0 14px 25px rgba(0,67,126,.26);
}

/* Game rules */
.rulesScreen {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 5vh 8vw;
}

.rulesCard {
  width: min(1050px, 80vw);
  padding: clamp(32px, 4vw, 62px) clamp(40px, 5vw, 78px);
  border: 10px solid #087de2;
  border-radius: 56px;
  color: #35201c;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 0 #045fb8, 0 34px 55px rgba(0,50,105,.27), inset 0 0 0 5px #bce8ff;
}

.rulesCard h2 {
  margin: 0 0 30px;
  text-align: center;
  font-size: clamp(56px, 6vw, 104px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1;
}

.rulesCard h2 span,
.rulesCard h2 strong {
  -webkit-text-stroke: 7px white;
  paint-order: stroke fill;
  filter: drop-shadow(0 7px 0 #b8dfff);
}

.rulesCard h2 span { color: #075be4; }
.rulesCard h2 strong { color: #f51c60; }

.ruleRow {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 28px;
}

.ruleIcon {
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  font-size: 62px;
  background: #ff3e83;
  box-shadow: 0 8px 0 #cf1f60;
}

.ruleRow p {
  margin: 0;
  font-size: clamp(25px, 2.5vw, 42px);
  font-weight: 900;
  line-height: 1.55;
  word-break: keep-all;
}

.ruleRow em {
  color: #f21d5a;
  font-style: normal;
}

.ruleDivider {
  height: 4px;
  margin: 24px 0;
  background: repeating-linear-gradient(90deg, #55aee6 0 12px, transparent 12px 23px);
}

.cautionIcon {
  font-family: Arial, sans-serif;
  font-weight: 900;
  background: #f0292e;
  box-shadow: 0 8px 0 #ba191d;
}

.ruleStartButton {
  display: block;
  min-width: 280px;
  margin: 34px auto 0;
  padding: 18px 42px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-size: clamp(25px, 2vw, 34px);
  font-weight: 900;
  background: linear-gradient(135deg, #ff725d, #f03d52);
  box-shadow: 0 10px 0 #c92f3c;
  cursor: pointer;
}

.countdownScreen p,
.countdownScreen > span {
  padding: 10px 25px;
  border-radius: 999px;
  color: #083d6f;
  background: rgba(255,255,255,.92);
  text-shadow: none;
}

/* Gameplay */
.playScreen {
  background: transparent;
}

.playTopBar {
  top: 18px;
}

.progressTrack {
  top: clamp(78px, 9vh, 100px);
  height: 9px;
  background: rgba(255,255,255,.5);
}

.fruitLegend {
  position: absolute;
  z-index: 18;
  top: clamp(92px, 11vh, 124px);
  left: 50%;
  display: flex;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 26px);
  width: min(94vw, 1360px);
  transform: translateX(-50%);
}

.legendItem {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: clamp(150px, 15vw, 230px);
  padding: 8px 17px;
  border: 5px solid white;
  border-radius: 999px;
  color: #17282c;
  font-size: clamp(19px, 1.5vw, 28px);
  background: rgba(255,255,255,.93);
  box-shadow: 0 7px 0 rgba(0,80,141,.25);
  transition: transform .2s ease, background .2s ease;
}

.legendItem.active {
  color: #7a302b;
  background: #ffc4b6;
  transform: translateY(5px) scale(1.05);
}

.legendItem img {
  width: 48px;
  height: 42px;
  object-fit: contain;
}

.dropZone {
  inset: clamp(118px, 14vh, 155px) 0 0;
}

.dropGuide {
  top: 18%;
  bottom: 24%;
  border-color: rgba(255,255,255,.36);
}

.fallingFruit {
  top: 15%;
  width: clamp(210px, 23vw, 400px);
  height: clamp(190px, 25vh, 330px);
  animation: fruitDrop var(--fall-duration) cubic-bezier(.25,.55,.28,1) forwards;
}

@keyframes fruitDrop {
  0% { opacity: 0; transform: translate(-50%, -13vh) scale(.76) rotate(-4deg); }
  8% { opacity: 1; transform: translate(-50%, -10vh) scale(.88) rotate(-2deg); }
  82% { opacity: 1; transform: translate(-50%, 27vh) scale(1.03) rotate(1deg); }
  92% { opacity: 1; transform: translate(-50%, 29vh) scale(.92) rotate(0); }
  100% { opacity: 1; transform: translate(-50%, 27vh) scale(.98) rotate(0); }
}

.fallingFruit.landed {
  filter: drop-shadow(0 12px 10px rgba(40,79,88,.22)) saturate(1.08);
}

.playBowl {
  bottom: -4.2vh;
  width: min(47vw, 760px);
  max-height: 39vh;
}

.fruitNameCard {
  z-index: 16;
  top: auto;
  bottom: 2.2%;
  width: min(48vw, 720px);
}

.fruitNameCard h2 {
  color: #111;
  font-size: clamp(62px, 6.5vw, 120px);
  -webkit-text-stroke: 12px white;
  paint-order: stroke fill;
  text-shadow: 0 8px 0 rgba(8,55,72,.27);
}

.landingSparkles {
  bottom: 31%;
}

.landingSparkles span {
  opacity: 0;
  animation: none;
}

.landingSparkles.visible span {
  animation: landedSparkle .8s ease-out both;
}

.landingSparkles.visible span:nth-child(2) { animation-delay: 90ms; }
.landingSparkles.visible span:nth-child(3) { animation-delay: 170ms; }

@keyframes landedSparkle {
  0% { opacity: 0; transform: translateY(18px) scale(.25) rotate(0); }
  45% { opacity: 1; transform: translateY(-8px) scale(1.2) rotate(20deg); }
  100% { opacity: 0; transform: translateY(-28px) scale(.72) rotate(40deg); }
}

.finishScreen {
  background: transparent;
}

.finishScreen > p {
  padding: 10px 28px;
  border-radius: 999px;
  color: #e63343;
  font-size: clamp(28px, 2.4vw, 44px);
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 0 rgba(0,101,170,.25);
}

@media (max-width: 980px) {
  .rulesCard { width: 92vw; }
  .ruleRow { grid-template-columns: 100px 1fr; }
  .ruleIcon { width: 86px; font-size: 46px; }
  .legendItem { min-width: 0; padding: 6px 10px; }
  .legendItem img { width: 36px; height: 34px; }
}

@media (max-height: 760px) {
  .rulesCard { padding-top: 26px; padding-bottom: 30px; }
  .rulesCard h2 { margin-bottom: 18px; }
  .ruleDivider { margin: 16px 0; }
  .ruleStartButton { margin-top: 22px; padding-block: 13px; }
  .fruitLegend { top: 88px; }
  .dropZone { top: 110px; }
  .fruitNameCard { bottom: 1%; }
}

/* User-provided completed bingsu artwork */
.completeBowl {
  z-index: 4;
  width: min(94vw, 1600px);
  height: min(64vh, 780px);
  margin-top: -4vh;
}

.finishedCompleteImage {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 26px 18px rgba(28, 83, 101, .24));
  animation: praisePop 700ms cubic-bezier(.2, .9, .25, 1.15) both;
}

@media (max-height: 760px) {
  .completeBowl {
    width: min(92vw, 1400px);
    height: min(58vh, 590px);
    margin-top: -5vh;
  }
}

.celebrationFireworks {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.firework {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  color: #ff5570;
  background: currentColor;
  box-shadow:
    0 -92px 0 currentColor,
    65px -65px 0 currentColor,
    92px 0 0 currentColor,
    65px 65px 0 currentColor,
    0 92px 0 currentColor,
    -65px 65px 0 currentColor,
    -92px 0 0 currentColor,
    -65px -65px 0 currentColor,
    0 -48px 0 -2px currentColor,
    34px -34px 0 -2px currentColor,
    48px 0 0 -2px currentColor,
    34px 34px 0 -2px currentColor,
    0 48px 0 -2px currentColor,
    -34px 34px 0 -2px currentColor,
    -48px 0 0 -2px currentColor,
    -34px -34px 0 -2px currentColor;
  opacity: 0;
  animation: fireworkBurst 2.2s ease-out infinite;
}

.fireworkOne { left: 13%; top: 31%; color: #ff4f6f; }
.fireworkTwo { right: 14%; top: 25%; color: #17aee8; animation-delay: .45s; }
.fireworkThree { left: 24%; top: 63%; color: #ffc62e; animation-delay: .9s; }
.fireworkFour { right: 23%; top: 58%; color: #7f55dc; animation-delay: 1.35s; }

@keyframes fireworkBurst {
  0%, 8% { opacity: 0; transform: scale(.05) rotate(0deg); }
  18% { opacity: 1; }
  48% { opacity: .95; transform: scale(1) rotate(16deg); }
  72%, 100% { opacity: 0; transform: scale(1.25) rotate(24deg); }
}

/* School timetable font and TV-scale activity images */
.mainBingsu {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  width: min(46vw, 820px);
  height: min(78vh, 850px);
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 28px 20px rgba(20, 70, 88, .28));
  transform: translateX(-50%);
}

.fallingFruit {
  top: 3%;
  width: min(58vw, 1050px);
  height: min(55vh, 650px);
  max-width: none;
  max-height: none;
}

@keyframes fruitDrop {
  0% { opacity: 0; transform: translate(-50%, -12vh) scale(.8) rotate(-4deg); }
  8% { opacity: 1; transform: translate(-50%, -9vh) scale(.9) rotate(-2deg); }
  82% { opacity: 1; transform: translate(-50%, 15vh) scale(1.03) rotate(1deg); }
  92% { opacity: 1; transform: translate(-50%, 17vh) scale(.94) rotate(0); }
  100% { opacity: 1; transform: translate(-50%, 15vh) scale(1) rotate(0); }
}

.playBowl {
  left: 53.5%;
  bottom: 0;
  width: min(200vw, 3000px);
  max-width: none;
  max-height: 160vh;
  transform: translate(-50%, 60vh);
}

.startCopy .imageTitle {
  width: min(49vw, 900px);
  margin: 0;
  line-height: 1;
}

.imageTitle img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 7px solid rgba(255, 255, 255, .98);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 14px 0 rgba(15, 105, 195, .42), 0 24px 34px rgba(2, 69, 132, .24);
}

.landingSparkles {
  bottom: 28%;
  width: min(58vw, 920px);
}

.fruitNameCard {
  bottom: 1%;
}

@media (max-height: 760px) {
  .mainBingsu {
    width: min(45vw, 650px);
    height: min(72vh, 620px);
  }

  .fallingFruit {
    width: min(58vw, 850px);
    height: min(55vh, 520px);
  }

  .playBowl {
    width: min(350vw, 2400px);
    max-height: 156vh;
  }

  .startCopy .imageTitle {
    width: min(44vw, 740px);
  }
}

@media (max-width: 980px) {
  .startCopy .imageTitle {
    width: min(82vw, 900px);
  }
}

/* Full-artwork main screen */
.imageStartScreen {
  position: relative;
  z-index: 20;
  isolation: isolate;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #33b7ec;
}

.mainScreenArtwork {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.imageStartScreen .gearButton {
  z-index: 4;
}

.imageStartScreen .mainStartButton {
  position: absolute;
  z-index: 4;
  left: 29%;
  bottom: 5.5%;
  margin: 0;
  transform: translateX(-50%);
  box-shadow: 0 11px 0 #c94a40, 0 18px 30px rgba(50, 73, 90, .32);
}

@media (max-width: 980px) {
  .imageStartScreen .mainStartButton {
    left: 28%;
    bottom: 4%;
    padding: 15px 28px;
  }
}
