:root {
  --bg-top: #0b4f6c;
  --bg-mid: #1a7a9c;
  --bg-bot: #2ec4b6;
  --sand: #e8c07d;
  --coral: #ff6b6b;
  --coral-deep: #e84855;
  --aqua: #4ecdc4;
  --gold: #ffd93d;
  --ink: #0a3d4a;
  --foam: #f0fbfc;
  --card: rgba(255, 255, 255, 0.94);
  --shadow: 0 10px 28px rgba(8, 40, 55, 0.28);
  --radius: 1.4rem;
  --font: "Nunito", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: #083344;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bot) 78%, var(--sand) 100%);
}

.sea {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.rays {
  position: absolute;
  inset: -20% -10% auto;
  height: 55%;
  background:
    linear-gradient(118deg, transparent 40%, rgba(255, 255, 255, 0.08) 42%, transparent 44%),
    linear-gradient(98deg, transparent 48%, rgba(255, 255, 255, 0.1) 50%, transparent 52%),
    linear-gradient(78deg, transparent 55%, rgba(255, 255, 255, 0.07) 57%, transparent 59%);
  animation: rays 12s ease-in-out infinite alternate;
}

@keyframes rays {
  from { transform: translateX(-4%) rotate(-2deg); opacity: 0.7; }
  to { transform: translateX(4%) rotate(2deg); opacity: 1; }
}

.bubbles span {
  position: absolute;
  bottom: -2rem;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: rise var(--d) linear infinite;
  animation-delay: var(--delay);
  left: var(--x);
  opacity: 0.55;
}

@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 0.55; }
  100% { transform: translateY(-110vh) scale(1.15); opacity: 0; }
}

.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding-bottom: 0.2rem;
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.12));
}

.weed { animation: sway 3.5s ease-in-out infinite; transform-origin: bottom center; }
.w2 { animation-duration: 4.2s; animation-delay: -1s; font-size: 1.4rem; }
.w3 { animation-duration: 3.8s; animation-delay: -0.5s; }
.coral { animation: sway 5s ease-in-out infinite; transform-origin: bottom center; }
.c2 { animation-delay: -2s; font-size: 1.5rem; }

@keyframes sway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(7deg); }
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  padding-top: max(0.7rem, env(safe-area-inset-top));
}

.spacer { flex: 1; }

.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}

.icon-btn[hidden] {
  display: none !important;
}

.icon-btn:active { transform: scale(0.92); }
.icon-btn.album { background: linear-gradient(145deg, #ffe8a3, #ffc857); }
.icon-btn[aria-pressed="true"] { opacity: 0.55; }

.screen {
  position: relative;
  z-index: 2;
  height: calc(100% - 4.2rem);
  padding: 0 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
}

/* —— Home —— */
.home {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: fade-up 0.45s ease both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.mascot {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  margin-top: 0.35rem;
  animation: bob 2.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.mascot .body {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, #b8fff0 0%, #7dffd4 28%, #3dd6c3 55%, #2aa8b0 100%);
  box-shadow:
    inset -12px -16px 0 rgba(0, 70, 80, 0.1),
    inset 8px 10px 0 rgba(255, 255, 255, 0.28),
    0 14px 28px rgba(0, 40, 50, 0.28);
  position: relative;
  z-index: 1;
}

.mascot .eye {
  position: absolute;
  top: 28%;
  width: 1.7rem;
  height: 1.95rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.mascot .eye.l { left: 18%; }
.mascot .eye.r { right: 18%; }

.mascot .pupil {
  position: absolute;
  top: 38%;
  left: 28%;
  width: 0.78rem;
  height: 0.95rem;
  background: #1a2030;
  border-radius: 50%;
}

.mascot .shine {
  position: absolute;
  top: 18%;
  right: 16%;
  width: 0.45rem;
  height: 0.45rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: -0.35rem 0.4rem 0 0.08rem rgba(255, 255, 255, 0.7);
}

.mascot .cheek {
  position: absolute;
  top: 54%;
  width: 0.95rem;
  height: 0.55rem;
  background: #ff9eb5;
  border-radius: 50%;
  opacity: 0.9;
  filter: blur(0.5px);
}

.mascot .cheek.l { left: 10%; }
.mascot .cheek.r { right: 10%; }

.mascot .smile {
  position: absolute;
  left: 50%;
  top: 64%;
  width: 1.15rem;
  height: 0.7rem;
  border: 3px solid #1a3040;
  border-top: none;
  border-radius: 0 0 1.2rem 1.2rem;
  transform: translateX(-50%);
}

.mascot .brow {
  position: absolute;
  top: 24%;
  width: 0.7rem;
  height: 0.22rem;
  background: #1a3040;
  border-radius: 999px;
  opacity: 0.35;
}

.mascot .brow.l { left: 26%; transform: rotate(-12deg); }
.mascot .brow.r { right: 26%; transform: rotate(12deg); }

.mascot .tentacle {
  position: absolute;
  bottom: -0.45rem;
  width: 0.95rem;
  height: 1.75rem;
  background: linear-gradient(#5fe0d0, #2aa8b0);
  border-radius: 999px;
  transform-origin: top center;
  animation: tentacle 2.2s ease-in-out infinite;
  box-shadow: inset -3px 0 0 rgba(0, 60, 70, 0.12);
}

.mascot .t1 { left: 16%; animation-delay: 0s; }
.mascot .t2 { left: 34%; animation-delay: 0.2s; height: 2rem; }
.mascot .t3 { right: 34%; left: auto; animation-delay: 0.35s; height: 2rem; }
.mascot .t4 { right: 16%; left: auto; animation-delay: 0.1s; }

@keyframes tentacle {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}

.mascot .bubble-hat {
  position: absolute;
  top: -0.55rem;
  right: 0.35rem;
  font-size: 1.4rem;
  animation: floaty 2s ease-in-out infinite;
  z-index: 2;
}

.mascot .spark {
  position: absolute;
  color: #ffd93d;
  font-size: 0.85rem;
  animation: sparkle 1.8s ease-in-out infinite;
  z-index: 3;
  text-shadow: 0 0 6px rgba(255, 217, 61, 0.7);
}

.mascot .spark.s1 { top: 8%; left: 4%; }
.mascot .spark.s2 { top: 18%; right: -0.2rem; color: #ff8fab; animation-delay: 0.4s; }
.mascot .spark.s3 { bottom: 22%; left: -0.3rem; animation-delay: 0.8s; font-size: 0.7rem; }

@keyframes sparkle {
  0%, 100% { opacity: 0.35; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(12deg); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.05rem;
  margin: 0.15rem 0 0.2rem;
  line-height: 1;
}

.title .word > span {
  font-weight: 900;
  font-size: clamp(1.55rem, 7vw, 2.35rem);
  letter-spacing: -0.02em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
  animation: letter-pop 0.55s ease both;
  animation-delay: calc(var(--i) * 0.05s);
}

.title span.space {
  width: 0.35em;
}

.title .word {
  display: inline-flex;
  opacity: 1;
}

@keyframes letter-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.7); }
  to { opacity: 1; transform: none; }
}

.hello {
  margin: 0;
  text-align: center;
  color: var(--foam);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0, 40, 50, 0.35);
  max-width: 22rem;
}

.stages {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.4rem;
}

.credits {
  width: 100%;
  margin: 0.85rem 0 1.6rem;
  text-align: center;
}

.credits-by {
  margin: 0;
  color: var(--foam);
  font-weight: 800;
  font-size: 0.82rem;
  text-shadow: 0 1px 8px rgba(0, 40, 50, 0.35);
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.55rem 0 0.4rem;
}

.social-link {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.social-link svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.social-link:hover,
.social-link:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.social-link.instagram { color: #e1306c; }
.social-link.tiktok { color: #111827; }
.social-link.facebook { color: #1877f2; }
.social-link.x { color: #111827; }
.social-link.youtube { color: #ff0000; }
.social-link.web { color: #0284c7; }

.credits-web {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 40, 50, 0.35);
}

.credits-web:hover,
.credits-web:focus-visible {
  text-decoration: underline;
}

.stage-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 5.6rem;
  padding: 0.55rem 0.4rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow), 0 0 0 3px var(--ring, transparent);
  transition: transform 0.15s ease;
  animation: pop-in 0.45s cubic-bezier(0.2, 1.2, 0.4, 1) both;
  animation-delay: var(--d, 0s);
}

.stage-btn:active { transform: scale(0.96); }

.stage-btn .art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 1.45rem;
}

.stage-btn .name {
  font-weight: 800;
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.15;
}

.home .mascot {
  width: 5.8rem;
  height: 5.8rem;
}

.home .title .word > span {
  font-size: clamp(1.35rem, 5.6vw, 1.85rem);
}

.home .hello {
  font-size: 0.9rem;
}

.rules {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.rules-label,
.rules-hint {
  margin: 0;
  text-align: center;
  color: var(--foam);
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0, 40, 50, 0.35);
}

.rules-label { font-size: 0.82rem; }

.rules-hint {
  font-size: 0.68rem;
  font-weight: 700;
  max-width: 22rem;
  line-height: 1.25;
}

.rules-switch {
  display: flex;
  gap: 0.35rem;
}

.rules-opt {
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
}

.rules-opt[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.mini-syls {
  display: flex;
  gap: 0.2rem;
}

.syl {
  display: inline-grid;
  place-items: center;
  min-width: 3.15rem;
  height: 3.15rem;
  padding: 0 0.55rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, var(--sc, #4ecdc4), var(--sd, #1a8f9c));
  color: #fff;
  font-weight: 900;
  font-size: 1.55rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.stage-btn .syl {
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.3rem;
  border-radius: 0.55rem;
  font-size: 0.75rem;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}

.syl.say {
  animation: syl-bounce 0.45s ease;
}

.syl.slot {
  background: rgba(255, 255, 255, 0.35);
  border: 3px dashed rgba(10, 61, 74, 0.35);
  color: transparent;
  box-shadow: none;
}

.syl.ghost {
  opacity: 0.35;
  filter: grayscale(0.3);
}

.syl.filled {
  animation: fill-pop 0.4s ease;
}

@keyframes syl-bounce {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.25) translateY(-6px); }
}

@keyframes fill-pop {
  from { transform: scale(0.6); }
  to { transform: scale(1); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.7) translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* —— Play —— */
.play {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  animation: fade-up 0.35s ease both;
}

.progress {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.progress i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.progress i.on {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.35);
}

.prompt {
  margin: 0;
  text-align: center;
  color: var(--foam);
  font-weight: 800;
  font-size: 1.05rem;
  text-shadow: 0 1px 6px rgba(0, 30, 40, 0.4);
  min-height: 2.6rem;
}

.board {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding-bottom: 0.5rem;
}

.pick {
  border-radius: 1.25rem;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 0.7rem 0.9rem;
  min-width: 5.5rem;
  transition: transform 0.12s ease;
  animation: pop-in 0.4s cubic-bezier(0.2, 1.2, 0.4, 1) both;
  animation-delay: var(--d, 0s);
}

.pick:active { transform: scale(0.95); }
.pick.bare { background: transparent; box-shadow: none; padding: 0.2rem; }
.pick.dim,
.pq-dim { opacity: 0.35; pointer-events: none; filter: grayscale(0.4); }
.pick.wrong { animation: shake 0.4s ease; }
.pick.hit .bob { animation: hit-drum 0.25s ease; }
.pick.on {
  box-shadow: 0 0 0 5px rgba(255, 217, 61, 0.7), var(--shadow);
  transform: scale(1.04);
}
.word.shown-force { opacity: 1; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

@keyframes hit-drum {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(0.88) translateY(4px); }
}

.bob { display: grid; place-items: center; }
.emo { font-size: 3.2rem; line-height: 1; display: block; }
.word {
  display: block;
  margin-top: 0.35rem;
  font-weight: 900;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.pick.shown .word { opacity: 1; }

.picture .emo { font-size: 4rem; }
.ear { font-size: 3rem; }

.syls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.3rem;
}

.choices,
.pics,
.pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
}

.pics.grid4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: min(100%, 20rem);
}

.pics.grid4 .pick {
  width: 100%;
  min-width: 0;
}

.mem-progress {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  min-height: 0.9rem;
}

.mem-progress i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
}

.mem-progress i.on {
  background: #7dffd4;
  transform: scale(1.2);
}

.mem-progress i.fill {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 217, 61, 0.4);
}

.mem-row .emo {
  font-size: 2.6rem;
}

.order-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3.4rem;
  width: 100%;
}

.order-slot {
  display: grid;
  place-items: center;
  min-width: 3.15rem;
  height: 3.15rem;
  padding: 0 0.45rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.22);
  border: 3px dashed rgba(255, 255, 255, 0.55);
  box-sizing: border-box;
}

.order-slot .ghost-num {
  font-weight: 900;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.55);
}

.order-slot.filled {
  border-style: solid;
  border-color: transparent;
  background: transparent;
  padding: 0;
}

.bubble-dock {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.6rem;
  width: min(100%, 22rem);
  padding: 0.4rem 0.5rem;
  margin: -0.15rem 0 0.15rem;
}

.dock-bubble,
.bubble-fly {
  display: block;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 28%,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.55) 40%,
    rgba(255, 255, 255, 0.22) 70%,
    rgba(255, 255, 255, 0.12) 100%
  );
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    inset -3px -4px 0 rgba(255, 255, 255, 0.25),
    inset 4px 5px 8px rgba(255, 255, 255, 0.45),
    0 0 0 2px rgba(255, 255, 255, 0.35),
    0 6px 14px rgba(0, 20, 30, 0.2);
  backdrop-filter: blur(2px);
}

.dock-bubble.landed {
  animation: bubble-land 0.35s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

.bubble-fly {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  opacity: 0.95;
  transition: transform 0.48s cubic-bezier(0.2, 0.75, 0.2, 1), opacity 0.48s ease;
}

.bubble-dock.pop .dock-bubble {
  animation: bubble-pop 0.55s ease forwards;
}

.bubble-dock.win .dock-bubble {
  animation: bubble-glow 0.7s ease infinite alternate;
}

@keyframes bubble-land {
  from { transform: scale(0.5); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes bubble-pop {
  to { transform: translateY(28px) scale(0.2); opacity: 0; }
}

@keyframes bubble-glow {
  from { filter: brightness(1); transform: scale(1); }
  to { filter: brightness(1.15); transform: scale(1.08); }
}

.pick.crab {
  background: transparent;
  box-shadow: none;
  padding: 0.4rem;
  margin-top: 0.2rem;
}

.crab-anim {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 7.2rem;
  height: 5.6rem;
  animation: crab-idle 1.8s ease-in-out infinite;
  transform-origin: center bottom;
}

.kawaii-crab .crab-body {
  position: relative;
  width: 4.4rem;
  height: 3.5rem;
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 35% 28%, #ffd0b8 0%, #ff9b7a 35%, #ff6b57 70%, #e84855 100%);
  box-shadow:
    inset -8px -10px 0 rgba(140, 30, 40, 0.12),
    inset 6px 8px 0 rgba(255, 255, 255, 0.28),
    0 8px 16px rgba(0, 30, 40, 0.22);
  z-index: 1;
  transform-origin: center bottom;
}

.kawaii-crab .eye {
  position: absolute;
  top: 22%;
  width: 1.35rem;
  height: 1.55rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.kawaii-crab .eye.l { left: 14%; }
.kawaii-crab .eye.r { right: 14%; }

.kawaii-crab .pupil {
  position: absolute;
  top: 36%;
  left: 28%;
  width: 0.62rem;
  height: 0.78rem;
  background: #1a2030;
  border-radius: 50%;
}

.kawaii-crab .shine {
  position: absolute;
  top: 16%;
  right: 14%;
  width: 0.38rem;
  height: 0.38rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: -0.28rem 0.32rem 0 0.06rem rgba(255, 255, 255, 0.75);
}

.kawaii-crab .blush {
  position: absolute;
  top: 58%;
  width: 0.75rem;
  height: 0.42rem;
  background: #ff8fab;
  border-radius: 50%;
  opacity: 0.9;
  filter: blur(0.4px);
}

.kawaii-crab .blush.l { left: 8%; }
.kawaii-crab .blush.r { right: 8%; }

.kawaii-crab .mouth {
  position: absolute;
  left: 50%;
  top: 68%;
  width: 0.85rem;
  height: 0.5rem;
  border: 2.5px solid #1a3040;
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  transform: translateX(-50%);
}

.kawaii-crab .leg {
  position: absolute;
  bottom: -0.35rem;
  width: 0.45rem;
  height: 0.85rem;
  background: #ff7a62;
  border-radius: 999px;
  z-index: 0;
}

.kawaii-crab .leg.a { left: 18%; transform: rotate(18deg); }
.kawaii-crab .leg.b { left: 34%; transform: rotate(6deg); }
.kawaii-crab .leg.c { right: 34%; left: auto; transform: rotate(-6deg); }
.kawaii-crab .leg.d { right: 18%; left: auto; transform: rotate(-18deg); }

.kawaii-crab .claw {
  position: absolute;
  bottom: 1.35rem;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffc4a8, #ff7a62 55%, #e84855);
  box-shadow: inset -3px -3px 0 rgba(120, 20, 30, 0.12);
  animation: claw-wave 1.8s ease-in-out infinite;
  z-index: 2;
}

.kawaii-crab .claw.left {
  left: -0.1rem;
  transform-origin: 80% 60%;
}

.kawaii-crab .claw.right {
  right: -0.1rem;
  transform-origin: 20% 60%;
  animation-delay: -0.9s;
}

.kawaii-crab .claw i {
  position: absolute;
  top: -0.4rem;
  left: 0.28rem;
  width: 1rem;
  height: 0.85rem;
  border: 3.5px solid #ff7a62;
  border-bottom: none;
  border-radius: 1rem 1rem 0 0;
  background: transparent;
}

.kawaii-crab .claw.right i {
  left: auto;
  right: 0.28rem;
}

.kawaii-crab .spark {
  position: absolute;
  color: #ffd93d;
  font-size: 0.85rem;
  animation: sparkle 1.6s ease-in-out infinite;
  z-index: 4;
}

.kawaii-crab .spark.s1 { top: 0; left: 0.4rem; }
.kawaii-crab .spark.s2 { top: 0.4rem; right: 0.2rem; color: #ff8fab; animation-delay: 0.5s; }

@keyframes crab-idle {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

@keyframes claw-wave {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(16deg); }
}

.pick.crab.toss .crab-anim {
  animation: crab-toss 0.55s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.pick.crab.toss .crab-body {
  animation: crab-shell-toss 0.55s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.pick.crab.toss .claw.left {
  animation: claw-toss-l 0.55s ease;
}

.pick.crab.toss .claw.right {
  animation: claw-toss-r 0.55s ease;
}

@keyframes crab-toss {
  0% { transform: translateY(0) rotate(0); }
  18% { transform: translateY(10px) rotate(-8deg); }
  42% { transform: translateY(-22px) rotate(10deg); }
  62% { transform: translateY(-6px) rotate(-4deg); }
  80% { transform: translateY(-16px) rotate(6deg); }
  100% { transform: translateY(0) rotate(0); }
}

@keyframes crab-shell-toss {
  0% { transform: scale(1, 1) rotate(0); }
  18% { transform: scale(1.22, 0.72) rotate(-8deg); }
  42% { transform: scale(0.82, 1.28) rotate(12deg); }
  62% { transform: scale(1.12, 0.88) rotate(-6deg); }
  80% { transform: scale(0.94, 1.12) rotate(5deg); }
  100% { transform: scale(1, 1) rotate(0); }
}

@keyframes claw-toss-l {
  0% { transform: rotate(-18deg); }
  20% { transform: rotate(8deg); }
  45% { transform: rotate(-70deg) translateY(-10px); }
  100% { transform: rotate(-18deg); }
}

@keyframes claw-toss-r {
  0% { transform: rotate(16deg); }
  20% { transform: rotate(-8deg); }
  45% { transform: rotate(70deg) translateY(-10px); }
  100% { transform: rotate(16deg); }
}

/* —— Mascotas kawaii por modo + minis del menú —— */
.kawaii-buddy {
  padding: 0.2rem !important;
}

.kawaii-mascot {
  position: relative;
  display: block;
  width: 4.8rem;
  height: 3.8rem;
  margin: 0 auto;
  animation: bob 2.4s ease-in-out infinite;
}

.kawaii-mascot > .body,
.kawaii-mascot > i.body {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  box-shadow:
    inset -5px -7px 0 rgba(0, 40, 50, 0.1),
    inset 4px 5px 0 rgba(255, 255, 255, 0.28),
    0 6px 12px rgba(0, 30, 40, 0.18);
}

.kawaii-mascot .eye {
  position: absolute;
  top: 28%;
  width: 0.95rem;
  height: 1.1rem;
  background: #fff;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.kawaii-mascot .eye.l { left: 18%; }
.kawaii-mascot .eye.r { right: 18%; left: auto; }

.kawaii-mascot .pupil {
  position: absolute;
  top: 36%;
  left: 28%;
  width: 0.42rem;
  height: 0.52rem;
  background: #1a2030;
  border-radius: 50%;
}

.kawaii-mascot .shine {
  position: absolute;
  top: 14%;
  right: 14%;
  width: 0.28rem;
  height: 0.28rem;
  background: #fff;
  border-radius: 50%;
}

.kawaii-mascot .blush {
  position: absolute;
  top: 58%;
  width: 0.55rem;
  height: 0.3rem;
  background: #ff8fab;
  border-radius: 50%;
  opacity: 0.9;
  z-index: 2;
  filter: blur(0.3px);
}

.kawaii-mascot .blush.l { left: 10%; }
.kawaii-mascot .blush.r { right: 10%; left: auto; }

.kawaii-mascot .smile {
  position: absolute;
  left: 50%;
  top: 68%;
  width: 0.55rem;
  height: 0.35rem;
  border: 2px solid #1a3040;
  border-top: none;
  border-radius: 0 0 0.6rem 0.6rem;
  transform: translateX(-50%);
  z-index: 2;
}

.kawaii-mascot .spark {
  position: absolute;
  top: 0;
  right: 0.1rem;
  color: #ffd93d;
  font-size: 0.75rem;
  animation: sparkle 1.6s ease-in-out infinite;
  z-index: 4;
}

/* Pez */
.km-fish .body {
  left: 0.45rem;
  top: 0.55rem;
  width: 2.7rem;
  height: 2.1rem;
  background: radial-gradient(circle at 35% 30%, #c8f7ff, #3ea2ff 70%, #2b7fd4);
}
.km-fish .tail {
  position: absolute;
  right: 0;
  top: 0.85rem;
  border-top: 0.75rem solid transparent;
  border-bottom: 0.75rem solid transparent;
  border-left: 1rem solid #3ea2ff;
  animation: fin-wag 1.4s ease-in-out infinite;
  transform-origin: left center;
}
.km-fish .fin {
  position: absolute;
  left: 1.4rem;
  top: 0.25rem;
  width: 0.75rem;
  height: 0.6rem;
  background: #7dd8ff;
  border-radius: 50% 50% 10% 10%;
  transform: rotate(-18deg);
  animation: fin-wag 1.6s ease-in-out infinite reverse;
}

/* Caballito */
.km-seahorse .body {
  left: 1.1rem;
  top: 0.35rem;
  width: 2.1rem;
  height: 2.8rem;
  border-radius: 55% 55% 45% 45%;
  background: radial-gradient(circle at 40% 25%, #ffe08a, #ffb703 55%, #fb8500);
}
.km-seahorse .snout {
  position: absolute;
  left: 0.35rem;
  top: 0.85rem;
  width: 1rem;
  height: 0.45rem;
  background: #ffb703;
  border-radius: 999px;
  z-index: 0;
}
.km-seahorse .crest {
  position: absolute;
  left: 1.55rem;
  top: 0.1rem;
  width: 0.9rem;
  height: 0.55rem;
  background: #ffd93d;
  border-radius: 50% 50% 20% 20%;
  z-index: 0;
}
.km-seahorse .belly {
  position: absolute;
  left: 22%;
  top: 45%;
  width: 56%;
  height: 40%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

/* Pulpo */
.km-octo .body {
  left: 0.85rem;
  top: 0.2rem;
  width: 3.1rem;
  height: 2.6rem;
  background: radial-gradient(circle at 35% 28%, #b8fff0, #2ec4b6 60%, #1a8f9c);
}
.km-octo .t {
  position: absolute;
  bottom: 0;
  width: 0.55rem;
  height: 1.1rem;
  background: #2ec4b6;
  border-radius: 999px;
  transform-origin: top center;
  animation: tentacle 2s ease-in-out infinite;
}
.km-octo .t1 { left: 1.05rem; }
.km-octo .t2 { left: 1.7rem; height: 1.25rem; animation-delay: 0.15s; }
.km-octo .t3 { left: 2.35rem; height: 1.25rem; animation-delay: 0.3s; }
.km-octo .t4 { left: 3rem; animation-delay: 0.1s; }

/* Estrella */
.km-star {
  height: 4.2rem;
}
.km-star .body {
  left: 1.15rem;
  top: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background: radial-gradient(circle at 35% 30%, #fff3a8, #ffd93d 55%, #f4b942);
  z-index: 2;
}
.km-star .arm {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  background: #ffd93d;
  border-radius: 40%;
  z-index: 0;
}
.km-star .a1 { left: 1.85rem; top: 0.15rem; }
.km-star .a2 { right: 0.35rem; top: 1.2rem; }
.km-star .a3 { right: 0.7rem; bottom: 0.2rem; }
.km-star .a4 { left: 0.7rem; bottom: 0.2rem; }
.km-star .a5 { left: 0.35rem; top: 1.2rem; }

/* Tortuga */
.km-turtle .shell {
  position: absolute;
  left: 0.85rem;
  top: 0.55rem;
  width: 3.1rem;
  height: 2.3rem;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #b7e4c7, #52b788 55%, #2d6a4f);
  box-shadow: inset -4px -5px 0 rgba(0, 40, 20, 0.15);
  z-index: 0;
}
.km-turtle .body {
  left: 1.35rem;
  top: 0.95rem;
  width: 2.1rem;
  height: 1.7rem;
  background: radial-gradient(circle at 35% 30%, #d8f3dc, #95d5b2);
  z-index: 1;
}
.km-turtle .flipper {
  position: absolute;
  bottom: 0.35rem;
  width: 0.9rem;
  height: 0.55rem;
  background: #74c69d;
  border-radius: 50%;
  z-index: 0;
}
.km-turtle .flipper.l { left: 0.45rem; transform: rotate(20deg); }
.km-turtle .flipper.r { right: 0.45rem; left: auto; transform: rotate(-20deg); }

/* Delfín */
.km-dolphin .body {
  left: 0.4rem;
  top: 0.7rem;
  width: 3rem;
  height: 2rem;
  background: radial-gradient(circle at 35% 30%, #e0f2fe, #7dd3fc 50%, #0ea5e9);
}
.km-dolphin .tail {
  position: absolute;
  right: 0;
  top: 0.7rem;
  border-top: 0.7rem solid transparent;
  border-bottom: 0.7rem solid transparent;
  border-left: 1.05rem solid #0ea5e9;
  animation: fin-wag 1.3s ease-in-out infinite;
}
.km-dolphin .fin {
  position: absolute;
  left: 1.5rem;
  top: 0.25rem;
  width: 0.8rem;
  height: 0.7rem;
  background: #38bdf8;
  border-radius: 50% 50% 10% 40%;
  transform: rotate(-25deg);
}

/* Ballena */
.km-whale .body {
  left: 0.35rem;
  top: 0.85rem;
  width: 3.3rem;
  height: 2.15rem;
  background: radial-gradient(circle at 35% 30%, #c7d2fe, #818cf8 55%, #6366f1);
}
.km-whale .tail {
  position: absolute;
  right: -0.05rem;
  top: 0.85rem;
  border-top: 0.75rem solid transparent;
  border-bottom: 0.75rem solid transparent;
  border-left: 1rem solid #6366f1;
}
.km-whale .spot {
  position: absolute;
  left: 55%;
  top: 55%;
  width: 35%;
  height: 30%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}
.km-whale .spout {
  position: absolute;
  left: 1.1rem;
  top: 0.05rem;
  font-size: 0.9rem;
  animation: floaty 1.5s ease-in-out infinite;
  z-index: 3;
}

/* Medusa */
.km-jelly .body {
  left: 0.95rem;
  top: 0.15rem;
  width: 2.9rem;
  height: 2.2rem;
  border-radius: 50% 50% 42% 42%;
  background: radial-gradient(circle at 40% 30%, #f5d0fe, #e879f9 50%, #c026d3);
}
.km-jelly .tend {
  position: absolute;
  top: 2.1rem;
  width: 0.35rem;
  height: 1.35rem;
  background: linear-gradient(#e879f9, transparent);
  border-radius: 999px;
  animation: tentacle 1.8s ease-in-out infinite;
}
.km-jelly .tend.t1 { left: 1.25rem; }
.km-jelly .tend.t2 { left: 1.9rem; animation-delay: 0.2s; height: 1.55rem; }
.km-jelly .tend.t3 { left: 2.55rem; animation-delay: 0.35s; height: 1.55rem; }
.km-jelly .tend.t4 { left: 3.2rem; animation-delay: 0.1s; }

/* Foca */
.km-seal .body {
  left: 0.7rem;
  top: 0.55rem;
  width: 3.2rem;
  height: 2.5rem;
  background: radial-gradient(circle at 35% 30%, #f1f5f9, #94a3b8 55%, #64748b);
}
.km-seal .nose {
  position: absolute;
  left: 18%;
  top: 55%;
  width: 0.45rem;
  height: 0.35rem;
  background: #1a2030;
  border-radius: 50%;
  z-index: 3;
}
.km-seal .flip {
  position: absolute;
  bottom: 0.25rem;
  width: 1rem;
  height: 0.6rem;
  background: #78879a;
  border-radius: 50%;
}
.km-seal .flip.l { left: 0.85rem; transform: rotate(25deg); }
.km-seal .flip.r { right: 0.85rem; left: auto; transform: rotate(-25deg); }

/* Mini cangrejo (solo menú; en juego usa el cangrejo grande) */
.km-crab .body {
  left: 1rem;
  top: 0.55rem;
  width: 2.7rem;
  height: 2.2rem;
  background: radial-gradient(circle at 35% 28%, #ffd0b8, #ff6b57 65%, #e84855);
}
.km-crab .claw {
  position: absolute;
  top: 0.85rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffc4a8, #ff7a62);
  z-index: 2;
}
.km-crab .claw.l { left: 0.15rem; }
.km-crab .claw.r { right: 0.15rem; left: auto; }
.km-crab .claw > i {
  position: absolute;
  top: -0.3rem;
  left: 0.2rem;
  width: 0.7rem;
  height: 0.55rem;
  border: 3px solid #ff7a62;
  border-bottom: none;
  border-radius: 0.7rem 0.7rem 0 0;
}
.km-crab .claw.r > i { left: auto; right: 0.2rem; }

.mini-char {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.2rem;
  vertical-align: middle;
  overflow: visible;
}

.mini-char .kawaii-mascot {
  transform: scale(0.48);
  transform-origin: center center;
  animation: none;
  width: 4.8rem;
  height: 3.8rem;
  margin: 0;
}

.kawaii-buddy.wiggle .kawaii-mascot {
  animation: buddy-wiggle 0.45s ease;
}

@keyframes fin-wag {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}

@keyframes buddy-wiggle {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-8px) rotate(-8deg); }
  50% { transform: translateY(2px) rotate(8deg); }
  75% { transform: translateY(-6px) rotate(-4deg); }
}

.actions {
  display: flex;
  gap: 0.6rem;
  margin-top: auto;
  padding-bottom: 0.3rem;
}

.btn {
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-weight: 800;
  background: var(--card);
  box-shadow: var(--shadow);
}

.btn.primary {
  background: linear-gradient(180deg, #ffd93d, #f4b942);
  color: var(--ink);
}

.btn.speak {
  background: linear-gradient(180deg, #7dffd4, #2ec4b6);
  color: #054;
}

/* —— Win / sticker —— */
.win-screen {
  text-align: center;
  color: var(--foam);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  animation: fade-up 0.4s ease both;
}

.win-screen h2 {
  margin: 0;
  font-size: 1.7rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.sticker-prize {
  width: 7rem;
  height: 7rem;
  border-radius: 1.5rem;
  background: var(--card);
  display: grid;
  place-items: center;
  font-size: 3.5rem;
  box-shadow: var(--shadow);
  animation: prize 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

@keyframes prize {
  from { transform: scale(0) rotate(-20deg); }
  to { transform: scale(1) rotate(0); }
}

.burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}

.burst i {
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--c);
  left: var(--x);
  top: var(--y);
  animation: confetti 0.9s ease-out forwards;
}

@keyframes confetti {
  to {
    transform: translate(var(--dx), var(--dy)) scale(0);
    opacity: 0;
  }
}

/* —— Modal / album —— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 30, 40, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-card {
  width: min(100%, 24rem);
  max-height: 85vh;
  overflow: auto;
  background: var(--card);
  border-radius: 1.5rem;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.modal-card h2 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.album-item {
  aspect-ratio: 1;
  border-radius: 1rem;
  background: #e8f7f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-size: 1.8rem;
  opacity: 0.35;
  filter: grayscale(1);
}

.album-item.got {
  opacity: 1;
  filter: none;
  background: linear-gradient(160deg, #fff8dc, #ffe8a3);
}

.album-item small {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.hint-pulse {
  animation: hint 1.2s ease-in-out infinite;
}

@keyframes hint {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: 0 0 0 6px rgba(255, 217, 61, 0.55), var(--shadow); }
}

@media (min-width: 700px) {
  #app {
    border-radius: 1.5rem;
    margin-top: 1vh;
    height: 98vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  }
}
