@font-face {
  font-family: "KuaiLe";
  src: url("../assets/fonts/zcool-kuaile.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fredoka";
  src: url("../assets/fonts/fredoka-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #10283a;
  --ink-soft: #3d5d70;
  --deep: #083044;
  --cream: rgba(255, 252, 246, 0.96);
  --sea: #1487be;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--sea);
}

body {
  overflow: hidden;
  font-family: "KuaiLe", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button, input { font-family: inherit; }

.app {
  position: relative;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

.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;
}

.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(980px 420px at 8% -8%, rgba(255, 236, 179, 0.98), transparent 58%),
    radial-gradient(700px 320px at 96% 0%, rgba(255, 255, 255, 0.38), transparent 52%),
    linear-gradient(180deg, #ffe8c2 0%, #ffd3a4 10%, #9ae6f6 34%, #3ec0ea 60%, #127eae 100%);
}

.sun {
  position: absolute;
  top: 22px;
  left: 7%;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffef6 0%, #ffe066 42%, #ffc107 70%, rgba(255, 193, 7, 0) 72%);
  filter: drop-shadow(0 0 28px rgba(255, 196, 60, 0.75));
}

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 40px;
  opacity: 0.92;
  animation: drift 46s linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.c1 { top: 18%; left: -10%; width: 140px; height: 36px; }
.c1::before { width: 54px; height: 54px; left: 22px; top: -28px; }
.c1::after { width: 36px; height: 36px; left: 64px; top: -18px; }
.c2 { top: 8%; left: 42%; width: 180px; height: 40px; animation-duration: 62s; animation-delay: -20s; }
.c2::before { width: 64px; height: 64px; left: 28px; top: -34px; }
.c2::after { width: 42px; height: 42px; left: 84px; top: -20px; }
.c3 { top: 22%; left: 78%; width: 110px; height: 28px; animation-duration: 54s; animation-delay: -8s; }
.c3::before { width: 40px; height: 40px; left: 18px; top: -20px; }
.c3::after { width: 28px; height: 28px; left: 50px; top: -12px; }

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(55vw); }
}

.sea {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  overflow: hidden;
  pointer-events: none;
}

.wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 100%;
  animation: wave 16s linear infinite;
}

.w2 {
  height: 74%;
  animation-duration: 22s;
  animation-direction: reverse;
}

@keyframes wave {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  overflow: auto;
  padding:
    calc(12px + env(safe-area-inset-top))
    calc(12px + env(safe-area-inset-right))
    calc(12px + env(safe-area-inset-bottom))
    calc(12px + env(safe-area-inset-left));
}

.screen.on {
  display: flex;
  flex-direction: column;
}

.mute {
  position: fixed;
  z-index: 60;
  top: calc(10px + env(safe-area-inset-top));
  right: calc(10px + env(safe-area-inset-right));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(255, 252, 245, 0.95);
  color: #0d4e6e;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 0 rgba(10, 60, 90, 0.16);
  cursor: pointer;
  padding: 0;
}

.mute svg { width: 26px; height: 26px; display: block; }
.mute .icon-off { display: none; }
.mute.is-muted .icon-on { display: none; }
.mute.is-muted .icon-off { display: block; }
.mute:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(10, 60, 90, 0.16); }
.mute:focus-visible, .btn:focus-visible, .text-btn:focus-visible {
  outline: 4px solid #083044;
  outline-offset: 3px;
}

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

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

.dball {
  position: absolute;
  width: 78px;
  height: 92px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff 0 8%, transparent 18%),
    radial-gradient(circle at 50% 42%, #fff 0%, var(--c) 46%, var(--d) 100%);
  box-shadow: inset -8px -10px 12px rgba(0, 0, 0, 0.08), 0 10px 16px rgba(12, 50, 80, 0.12);
  animation: bobd 4.6s ease-in-out infinite;
}

.dball::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30px;
  width: 2px;
  height: 30px;
  background: rgba(255, 255, 255, 0.75);
}

.d1 { top: 8%; left: 5%; }
.d2 { top: 12%; right: 8%; width: 58px; height: 68px; animation-delay: -1.2s; }
.d3 { bottom: 16%; left: 7%; width: 64px; height: 76px; animation-delay: -2s; }
.d4 { top: 42%; right: 4%; animation-delay: -0.6s; }
.d5 { bottom: 20%; right: 12%; width: 48px; height: 58px; animation-delay: -2.6s; }

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

.hero-fish {
  position: absolute;
  left: 6%;
  bottom: 78px;
  width: 110px;
  z-index: 0;
  pointer-events: none;
  animation: heroSwim 11s linear infinite;
}

@keyframes heroSwim {
  0% { transform: translateX(0) scaleX(1); }
  46% { transform: translateX(min(70vw, 820px)) scaleX(1); }
  50% { transform: translateX(min(70vw, 820px)) scaleX(-1); }
  96% { transform: translateX(0) scaleX(-1); }
  100% { transform: translateX(0) scaleX(1); }
}

#screen-start.on { align-items: center; padding-top: 72px; padding-bottom: 110px; }

.start-wrap {
  width: min(680px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.hero { text-align: center; }

.eyebrow {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.14em;
  color: #0b5678;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(48px, 8vw, 84px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--deep);
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.92), 0 0 18px rgba(255, 255, 255, 0.75);
}

.break { display: inline; }

.kid {
  display: inline-block;
  margin: 10px 0 0;
  padding: 4px 18px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0d4e6e;
  font-size: clamp(22px, 3vw, 30px);
  box-shadow: 0 6px 0 rgba(10, 60, 90, 0.08);
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 240, 0.95));
  border: 4px solid rgba(255, 255, 255, 0.98);
  border-radius: 32px;
  box-shadow: 0 16px 40px rgba(8, 50, 80, 0.16);
}

.start-panel, .reward-panel {
  width: min(740px, 100%);
  padding: 22px 22px 18px;
  text-align: center;
}

.howto {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.15em;
  margin: 0 0 16px;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.45;
  color: var(--deep);
}

.howto span { white-space: nowrap; }

.fineprint, .note, .summary, .hint {
  color: #245066;
  font-size: 18px;
  line-height: 1.4;
}

.fineprint { margin: 12px 0 0; }

.error {
  margin: 10px 0 0;
  color: #9c2f2f;
  font-size: 18px;
}

.btn {
  appearance: none;
  border: 3px solid #fff;
  border-radius: 999px;
  cursor: pointer;
  min-height: 56px;
  padding: 8px 22px;
  font-size: 22px;
  color: #3d2200;
}

.btn-primary {
  background: linear-gradient(#ffd25a, #ff9f1c);
  box-shadow: 0 7px 0 #d36b00, 0 12px 18px rgba(120, 60, 0, 0.16);
}

.btn-primary:active {
  transform: translateY(5px);
  box-shadow: 0 2px 0 #d36b00, 0 6px 12px rgba(120, 60, 0, 0.12);
}

.btn-ghost {
  background: #fff;
  color: #0b4f73;
  box-shadow: 0 6px 0 #c5d8e4;
}

.btn-ghost:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #c5d8e4;
}

.btn-xl {
  min-height: 76px;
  width: min(100%, 440px);
  font-size: clamp(28px, 4vw, 36px);
  padding: 8px 28px;
}

.text-btn {
  background: transparent;
  border: 0;
  color: var(--deep);
  font-size: 20px;
  text-decoration: underline;
  text-underline-offset: 5px;
  min-height: 48px;
  padding: 8px 14px;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

#screen-play.on {
  overflow: hidden;
  padding-top: calc(8px + env(safe-area-inset-top));
  padding-bottom: 0;
}

.hud {
  flex: 0 0 auto;
  width: min(920px, 100%);
  margin: 52px auto 0;
  padding: 12px 16px 14px;
  border-radius: 28px;
  background: var(--cream);
  box-shadow: 0 12px 30px rgba(8, 50, 80, 0.14);
  text-align: center;
}

.hud-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
}

.brand {
  margin: 0;
  font-size: 18px;
  color: #0b6e96;
}

.progress-label {
  margin: 0;
  font-size: 20px;
  background: #e6f7ff;
  color: #0b4f73;
  border-radius: 999px;
  padding: 4px 14px;
}

.pips {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.pip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(10, 50, 70, 0.14);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.pip.now {
  transform: scale(1.28);
  background: #ffd43b;
}

.pip.got { box-shadow: none; }
.pip.got.tier-common { background: #8ec9de; }
.pip.got.tier-rare { background: #1c7ed6; }
.pip.got.tier-fine { background: #be4bdb; }
.pip.got.tier-legend { background: #f59f00; }
.pip.got.tier-rainbow { background: linear-gradient(135deg, #ff6b6b, #ffd43b, #69db7c, #4dabf7, #b197fc); }

.meaning {
  margin: 6px 0 0;
  font-size: clamp(46px, 8vw, 80px);
  font-weight: 400;
  line-height: 1.05;
  color: #0d3144;
  overflow-wrap: anywhere;
}

.hint { margin: 4px 0 0; }

.slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  min-height: 60px;
}

.slot {
  width: clamp(46px, 11vw, 68px);
  height: clamp(54px, 12vw, 76px);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 3px dashed rgba(8, 48, 70, 0.42);
  display: grid;
  place-items: center;
  color: var(--ink);
}

.slot b {
  font-family: Fredoka, "Arial Rounded MT Bold", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1;
}

.slot.filled {
  background: #fff;
  border-style: solid;
  border-color: var(--slot, #1c7ed6);
  box-shadow: 0 6px 0 rgba(12, 60, 90, 0.1);
  animation: slotin 0.35s ease;
}

@keyframes slotin {
  0% { transform: scale(0.55); }
  65% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.coach {
  display: inline-block;
  margin: 10px 0 0;
  background: #e7f6ff;
  color: #0b4f73;
  border-radius: 999px;
  padding: 4px 14px 6px;
  font-size: 20px;
}

.balloon-layer {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  touch-action: none;
}

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

.bubbles i {
  position: absolute;
  bottom: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.16);
  animation: rise 9s linear infinite;
}

.bubbles i:nth-child(1) { left: 8%; animation-duration: 8s; }
.bubbles i:nth-child(2) { left: 22%; width: 8px; height: 8px; animation-delay: -2s; animation-duration: 11s; }
.bubbles i:nth-child(3) { left: 38%; animation-delay: -4s; }
.bubbles i:nth-child(4) { left: 54%; width: 16px; height: 16px; animation-delay: -1s; animation-duration: 12s; }
.bubbles i:nth-child(5) { left: 68%; animation-delay: -6s; }
.bubbles i:nth-child(6) { left: 80%; width: 9px; height: 9px; animation-delay: -3s; }
.bubbles i:nth-child(7) { left: 92%; animation-delay: -5s; animation-duration: 10s; }

@keyframes rise {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 0.85; }
  100% { transform: translateY(-68vh); opacity: 0; }
}

.balloon {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: var(--size);
  height: calc(var(--size) * 1.58);
  animation: appear 0.4s ease both;
}

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

.balloon-hit {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: none;
  color: inherit;
}

.body {
  position: relative;
  width: 100%;
  height: calc(var(--size) * 1.12);
  border-radius: 50% 50% 48% 48% / 46% 46% 54% 54%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.96) 0 7%, rgba(255, 255, 255, 0) 18%),
    radial-gradient(circle at 50% 40%, var(--shine) 0%, var(--body) 46%, var(--shade) 100%);
  box-shadow:
    inset -10px -12px 16px rgba(0, 0, 0, 0.12),
    inset 0 0 0 3px rgba(255, 255, 255, 0.28),
    0 12px 16px rgba(12, 40, 60, 0.16);
}

.letter {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  place-items: center;
  font-family: Fredoka, "Arial Rounded MT Bold", Arial, sans-serif;
  font-weight: 700;
  font-size: calc(var(--size) * 0.36);
  color: #10283a;
  box-shadow: 0 2px 0 rgba(16, 40, 58, 0.06);
}

.knot {
  width: calc(var(--size) * 0.12);
  height: calc(var(--size) * 0.09);
  margin-top: -1px;
  background: var(--shade);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.string {
  width: 2px;
  height: calc(var(--size) * 0.32);
  border-radius: 2px;
  background: linear-gradient(#fff, rgba(255, 255, 255, 0.15));
  transform-origin: top center;
  animation: swaystring 2.8s ease-in-out infinite;
}

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

@media (hover: hover) {
  .balloon-hit:hover .body { filter: brightness(1.06); }
}

.balloon-hit:focus-visible .body {
  outline: 4px solid #fff;
  outline-offset: 4px;
}

.balloon-hit.shake .body { animation: wiggle 0.42s ease; }

@keyframes wiggle {
  0% { transform: scale(1) rotate(0); }
  20% { transform: scale(1.08, 0.92) rotate(-7deg); }
  40% { transform: scale(0.96, 1.06) rotate(6deg); }
  60% { transform: scale(1.04, 0.96) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}

.balloon-hit.pop .body { animation: burst 0.32s ease forwards; }
.balloon-hit.pop .knot,
.balloon-hit.pop .string { animation: fadeout 0.18s ease forwards; }

@keyframes burst {
  0% { transform: scale(1); filter: brightness(1); }
  35% { transform: scale(1.28); filter: brightness(1.35); }
  100% { transform: scale(1.6); opacity: 0; filter: brightness(1.6); }
}

@keyframes fadeout {
  to { opacity: 0; }
}

.bit, .ring, .confetti, .flyer { position: fixed; pointer-events: none; }

.bit {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  animation: bit 0.6s ease-out forwards;
}

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

.ring {
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 4px solid #fff;
  border-radius: 50%;
  animation: ring 0.45s ease-out forwards;
}

@keyframes ring {
  to { transform: scale(4.2); opacity: 0; }
}

.confetti {
  top: -16px;
  animation-name: fall;
  animation-timing-function: ease-in;
}

@keyframes fall {
  to { transform: translateY(105vh) rotate(220deg); opacity: 0.2; }
}

.flyer {
  z-index: 45;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-family: Fredoka, Arial, sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: #10283a;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(8, 40, 70, 0.18);
}

#screen-reward.on { align-items: center; padding-top: 72px; padding-bottom: 100px; }
.reward-panel { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; }

.cheer {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 400;
  color: #e8590c;
}

.reward-fish { width: min(230px, 62vw); margin: 2px auto 0; }
.reward-fish svg { width: 100%; height: auto; display: block; }
.reward-fish.fancy { filter: drop-shadow(0 8px 12px rgba(180, 120, 0, 0.25)); }

.species {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--deep);
}

.stars {
  margin: 0;
  color: #e67700;
  letter-spacing: 0.14em;
  font-size: 24px;
  text-shadow: none;
}

.stars.sm { font-size: 20px; letter-spacing: 0.1em; margin: 2px 0; }
.stars.rainbow {
  color: #e67700;
  background: none;
}

.tier-badge {
  display: inline-block;
  margin: 2px 0;
  padding: 3px 14px 5px;
  border-radius: 999px;
  border: 3px solid #fff;
  font-size: 20px;
}

.tier-common { background: #d7eef5; color: #24566a; }
.tier-rare { background: #d0ebff; color: #0b4f8a; }
.tier-fine { background: #f3d9fa; color: #6b2178; }
.tier-legend { background: #fff3bf; color: #8a5800; }
.tier-rainbow {
  background: linear-gradient(90deg, #ffd8e2, #fff3bf, #d3f9d8, #d0ebff, #e5dbff);
  color: #3b2764;
}

.note { margin: 2px 0 4px; }

.reveal-word {
  margin: 2px 0 0;
  font-family: Fredoka, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 8vw, 64px);
  letter-spacing: 0.12em;
  color: #10283a;
  line-height: 1;
}

.reveal-zh { margin: 0 0 8px; font-size: 22px; color: #2c5366; }

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
  width: 100%;
}

#screen-end.on { align-items: center; padding-top: 64px; }

.end-wrap {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 8px 4px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.end-actions {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-bottom: 8px;
}

.end-title {
  margin: 0;
  text-align: center;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;
  color: var(--deep);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.85), 0 0 16px rgba(255, 255, 255, 0.8);
}

.summary { margin: 0; text-align: center; font-size: 20px; }

.tank {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  height: clamp(210px, 34vh, 280px);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #c8f1ff 0%, #4dabf7 40%, #1c7ed6 72%, #1864ab 100%);
  border: 5px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.25),
    inset 0 -24px 36px rgba(0, 40, 80, 0.18),
    0 14px 0 rgba(10, 60, 90, 0.16);
}

.tank::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.38), transparent 26%, transparent 62%, rgba(255, 255, 255, 0.12));
}

.caustic {
  position: absolute;
  inset: -20% 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0 14px, transparent 14px 36px);
  animation: rays 7s linear infinite;
  opacity: 0.55;
  pointer-events: none;
}

@keyframes rays {
  from { transform: translateX(0); }
  to { transform: translateX(40px); }
}

.seaweed {
  position: absolute;
  bottom: 28px;
  width: 16px;
  height: 78px;
  border-radius: 20px 20px 8px 8px;
  background: linear-gradient(#b2f2bb, #2f9e44);
  transform-origin: bottom center;
  z-index: 2;
  animation: sway 3.2s ease-in-out infinite;
}

.seaweed::before,
.seaweed::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 14px;
  border-radius: 20px;
  background: linear-gradient(#8ce99a, #2b8a3e);
}

.seaweed::before { left: -12px; height: 50px; transform: rotate(-16deg); transform-origin: bottom center; }
.seaweed::after { left: 12px; height: 64px; transform: rotate(18deg); transform-origin: bottom center; }
.s1 { left: 8%; }
.s2 { left: 68%; height: 96px; animation-delay: -1s; }
.s3.front { left: 88%; z-index: 5; height: 70px; animation-delay: -1.6s; }

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

.tank-bubbles { z-index: 3; }
.tank-bubbles i { animation-duration: 5.5s; }

#swimmers { position: absolute; inset: 0; z-index: 3; }

.swimmer {
  position: absolute;
  left: 0;
  animation-name: travel;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.face {
  animation-name: face;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: inherit;
  animation-delay: inherit;
}

.bob { animation: bob 2.4s ease-in-out infinite; }
.fish-svg { width: 100%; height: auto; display: block; overflow: visible; }

@keyframes travel {
  0% { transform: translateX(-35%); }
  50% { transform: translateX(calc(var(--tank, 640px) - 100%)); }
  100% { transform: translateX(-35%); }
}

@keyframes face {
  0%, 49.9% { transform: scaleX(1); }
  50%, 100% { transform: scaleX(-1); }
}

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

.sparkle { animation: twinkle 1.15s ease-in-out infinite; }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.sand {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -12px;
  height: 52px;
  z-index: 4;
  background: linear-gradient(#ffe8a3, #f4c150);
  border-radius: 50% 50% 0 0;
}

.pebble {
  position: absolute;
  bottom: 16px;
  width: 14px;
  height: 10px;
  border-radius: 50%;
  background: #e39b4a;
  display: block;
}
.pebble:nth-child(1) { left: 12%; }
.pebble:nth-child(2) { left: 28%; width: 10px; background: #c9844a; }
.pebble:nth-child(3) { left: 46%; background: #f0a35a; }
.pebble:nth-child(4) { left: 63%; width: 18px; background: #d98a62; }
.pebble:nth-child(5) { left: 80%; }

.collect-title {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 400;
  color: var(--deep);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.cards {
  width: 100%;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.card {
  background: rgba(255, 252, 246, 0.96);
  border-radius: 22px;
  padding: 8px 10px 12px;
  text-align: center;
  border: 3px solid #fff;
  box-shadow: 0 10px 22px rgba(8, 40, 70, 0.12);
}

.card .idx { margin: 0; font-size: 18px; color: #5c7c8c; }
.card .mini { height: 74px; display: grid; place-items: center; }
.card .mini svg { width: min(120px, 100%); }
.card .en {
  margin: 2px 0 0;
  font-family: Fredoka, Arial, sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.06em;
  color: #10283a;
}
.card .zh { margin: 0; font-size: 18px; color: #2c5366; }
.card.tier-rainbow { background: linear-gradient(180deg, #fff, #f7f0ff 55%, #fff); }
.card.tier-legend { background: linear-gradient(180deg, #fff, #fff8e1 60%, #fff); }

.noscript {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 80;
  margin: 0;
  padding: 12px 16px;
  background: #fff;
  border-radius: 16px;
  font-size: 18px;
}

@media (max-width: 760px) {
  .deco, .hero-fish { display: none; }
  .break { display: block; }
  .sun { width: 78px; height: 78px; top: 6px; left: -8px; }
  .row-actions { flex-direction: column; }
  #btn-next { order: -1; }
  .btn { width: 100%; }
  .tank { height: 188px; }
  #screen-end.on { overflow: hidden; }
  .end-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; width: 100%; }
  .end-actions {
    flex: none;
    width: 100%;
    padding-top: 4px;
    background: linear-gradient(transparent, rgba(62, 192, 234, 0.2) 12px, rgba(20, 140, 186, 0.55));
  }
}

@media (max-height: 760px) {
  .meaning { font-size: clamp(36px, 7vh, 60px); }
  .hud { padding: 8px 12px 10px; }
  .reward-fish { width: min(180px, 42vh); }
  h1 { font-size: clamp(40px, 7vw, 64px); }
}

@media (max-height: 560px) {
  .brand, .hint { display: none; }
  .meaning { font-size: 32px; }
  .hud { margin-top: 48px; }
  .slot { width: 42px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .wave, .dball, .bubbles i, .string, .seaweed, .swimmer, .face, .bob, .caustic, .hero-fish, .sparkle {
    animation: none !important;
  }
  .swimmer { left: var(--rest, 8%); }
}
