:root {
  color-scheme: light;
  --cream: #fff7e8;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #3c3442;
  --muted: #716875;
  --water: #72cbd0;
  --water-deep: #39aebd;
  --coral: #f06a76;
  --coral-dark: #d84863;
  --yellow: #ffd46b;
  --line: rgba(71, 77, 102, 0.16);
  font-family: "Nunito", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 214, 136, 0.32), transparent 27rem),
    radial-gradient(circle at 86% 19%, rgba(157, 226, 221, 0.36), transparent 26rem),
    var(--cream);
}

button { font: inherit; }

.app-shell {
  width: min(100% - 28px, 850px);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) 0 40px;
}

.page-header { padding: 0 8px 20px; }
.eyebrow, .scene-kicker {
  margin: 0 0 8px;
  color: #a76453;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1, h2, p { margin-top: 0; }
h1 {
  max-width: 12em;
  margin-bottom: 9px;
  font-size: clamp(2rem, 7vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.lead { margin-bottom: 0; color: var(--muted); font-size: clamp(1rem, 2.5vw, 1.15rem); }

.play-card {
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 20px 52px rgba(97, 75, 68, 0.12);
  backdrop-filter: blur(10px);
}

.scene-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.scene-heading h2 { margin-bottom: 0; font-size: clamp(1.4rem, 4vw, 2rem); letter-spacing: -0.03em; }

.sound-button, .secondary-button, .primary-button, .next-button, .nav-button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.sound-button:focus-visible, .secondary-button:focus-visible, .primary-button:focus-visible, .next-button:focus-visible, .nav-button:focus-visible, .fish-button:focus-visible {
  outline: 4px solid rgba(240, 106, 118, 0.34);
  outline-offset: 4px;
}
.sound-button:hover, .secondary-button:hover, .primary-button:hover, .next-button:hover, .nav-button:hover { transform: translateY(-2px); }

.sound-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  color: #5e4c42;
  background: #fff1ca;
  box-shadow: 0 7px 15px rgba(189, 141, 76, 0.12);
  white-space: nowrap;
}
.sound-button.is-muted { background: #f0edf0; color: #817781; }
.sound-label { font-size: 0.86rem; font-weight: 800; }

.bowl-scene {
  position: relative;
  width: 100%;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(105, 87, 74, 0.22);
  background: #fff;
  box-shadow: 0 10px 0 rgba(168, 130, 91, 0.18), 0 18px 28px rgba(97, 75, 68, 0.12);
}
.scene-raster { position: relative; z-index: 1; display: block; width: 100%; height: auto; transition: opacity 180ms ease; }
.scene-video { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
.bowl-scene.is-found .scene-raster { opacity: 0; }
.bowl-scene.is-found .scene-video { opacity: 1; }
.fish-hotspot {
  position: absolute;
  z-index: 3;
  top: var(--hotspot-top, 56%);
  left: var(--hotspot-left, 59%);
  width: var(--hotspot-width, 25%);
  height: var(--hotspot-height, 29%);
  padding: 0;
  border: 3px solid transparent;
  border-radius: 48%;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 420ms cubic-bezier(.2,.8,.25,1), border-color 220ms ease, box-shadow 220ms ease;
}
.fish-hotspot:hover { border-color: rgba(255,255,255,.42); }
.fish-hotspot:active { transform: translate(-50%, -50%) scale(.95); }
.hotspot-label { position: absolute; right: -8px; bottom: -2px; padding: 5px 9px; color: #8a4651; font-size: .72rem; font-weight: 900; background: rgba(255,247,232,.84); border-radius: 999px; opacity: .88; }
.fish-hotspot.is-found { transform: translate(-50%, -50%) rotate(-2deg) scale(1.02); border-color: transparent; box-shadow: none; }
.fish-hotspot.is-found .hotspot-label { display: none; }

.message-panel { min-height: 82px; padding: 20px 4px 12px; text-align: center; }
.message { margin-bottom: 7px; font-size: clamp(1.22rem, 3vw, 1.55rem); font-weight: 900; }
.message-detail { margin-bottom: 0; color: var(--muted); font-size: .95rem; }

.scene-navigation { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 15px; }
.scene-progress { min-width: 82px; color: #897a83; font-size: .86rem; font-weight: 800; text-align: center; }
.nav-button { min-width: 92px; padding: 0 15px; color: #594f5b; background: #f4eef2; font-size: .9rem; font-weight: 900; }
.nav-button:disabled { cursor: default; opacity: .42; transform: none; }

.action-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.secondary-button, .primary-button, .next-button { min-width: 132px; padding: 0 20px; font-weight: 900; }
.secondary-button { color: #594f5b; background: #f4eef2; }
.primary-button { color: #fff; background: var(--coral-dark); box-shadow: 0 9px 18px rgba(216, 72, 99, .2); }
.next-button { color: #fff; background: var(--water-deep); box-shadow: 0 9px 18px rgba(57, 174, 189, .2); }
.parent-note { max-width: 40em; margin: 17px auto 0; color: #897a83; font-size: .86rem; line-height: 1.55; text-align: center; }

@media (max-width: 520px) {
  .app-shell { width: min(100% - 18px, 850px); padding-top: 23px; }
  .play-card { padding: 14px; border-radius: 23px; }
  .scene-heading { align-items: center; }
  .sound-button { min-height: 42px; padding: 0 11px; }
  .sound-label { display: none; }
  .bowl-scene { margin-top: 14px; }
}

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