:root {
  color-scheme: light;
  --cream-50: #fffdf5;
  --cream-100: #fff6df;
  --cream-200: #f7e7bd;
  --ink: #263d3a;
  --ink-soft: #526a63;
  --forest: #306b5b;
  --forest-dark: #215044;
  --fern: #72a96f;
  --mint: #bfe1c2;
  --aqua: #81c9c0;
  --coral: #ee806f;
  --coral-dark: #b24f47;
  --honey: #f1bd57;
  --plum: #6e5475;
  --cave: #4d405c;
  --sky: #c9e8df;
  --white: #fffefa;
  --shadow-sm: 0 5px 0 rgba(44, 74, 62, 0.09), 0 12px 30px rgba(59, 91, 77, 0.1);
  --shadow-lg: 0 12px 0 rgba(55, 83, 67, 0.08), 0 28px 70px rgba(54, 78, 66, 0.16);
  --radius-sm: 16px;
  --radius: 28px;
  --radius-lg: 44px;
  --page: min(1160px, calc(100vw - 40px));
  font-family: ui-rounded, "Avenir Next Rounded", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--cream-100);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 255, 255, 0.9) 0 4%, transparent 18%),
    linear-gradient(160deg, #fff9e8 0%, #f8edcb 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
  opacity: 0.54;
}

button:not(:disabled):active {
  transform: translateY(2px) scale(0.985);
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 4px solid #167d88;
  outline-offset: 4px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: -0.035em;
  line-height: 1.04;
}

h1:focus,
h2:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 12px 18px;
  color: white;
  background: var(--forest-dark);
  border-radius: 12px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--coral-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 60px;
  padding: 14px 24px;
  border-radius: 22px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--forest);
  box-shadow: 0 6px 0 var(--forest-dark), 0 14px 26px rgba(31, 82, 67, 0.2);
}

.primary-button:not(:disabled):hover {
  filter: brightness(1.07);
  box-shadow: 0 7px 0 var(--forest-dark), 0 17px 30px rgba(31, 82, 67, 0.23);
  transform: translateY(-2px);
}

.secondary-button {
  color: var(--forest-dark);
  background: var(--cream-100);
  box-shadow: inset 0 0 0 2px var(--cream-200), 0 5px 0 rgba(59, 83, 71, 0.12);
}

.danger-button {
  color: #fff;
  background: #9d514d;
  box-shadow: 0 5px 0 #713936;
}

.speaker-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex: 0 0 auto;
}

/* Top navigation */

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: var(--page);
  height: 86px;
  margin: 0 auto;
}

.round-button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 14px;
  color: var(--forest-dark);
  background: rgba(255, 254, 250, 0.8);
  border: 2px solid rgba(48, 107, 91, 0.12);
  border-radius: 50%;
  box-shadow: 0 4px 0 rgba(48, 74, 62, 0.1);
  backdrop-filter: blur(10px);
}

.round-button svg {
  width: 100%;
  fill: currentColor;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--forest-dark);
  font-size: 0.93rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-foot {
  position: relative;
  color: var(--coral);
  font-size: 0.75rem;
}

.brand-foot::before,
.brand-foot::after {
  position: absolute;
  top: -4px;
  width: 5px;
  height: 5px;
  content: '';
  background: currentColor;
  border-radius: 50%;
}

.brand-foot::before { left: -2px; }
.brand-foot::after { right: -2px; }

/* Welcome */

.welcome-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  overflow: hidden;
}

.grownup-link {
  position: absolute;
  z-index: 3;
  top: max(24px, env(safe-area-inset-top));
  right: max(26px, env(safe-area-inset-right));
  min-height: 46px;
  padding: 8px 16px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(38, 61, 58, 0.12);
  border-radius: 99px;
  font-weight: 700;
}

.hero-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(310px, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  width: min(1120px, 100%);
  min-height: min(690px, calc(100dvh - 100px));
  margin: auto;
  padding: clamp(34px, 6vw, 78px);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,250,233,0.77)),
    var(--cream-50);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: clamp(32px, 6vw, 70px) clamp(32px, 5vw, 58px) clamp(36px, 8vw, 84px) clamp(32px, 5vw, 52px);
  box-shadow: var(--shadow-lg);
}

.hero-card::after {
  position: absolute;
  right: 5%;
  bottom: 8%;
  left: 44%;
  height: 16%;
  content: '';
  background: #c5d994;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.62;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-copy h1 {
  margin-bottom: 24px;
  color: var(--forest-dark);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 850;
}

.hero-copy h1 em {
  position: relative;
  color: var(--coral-dark);
  font-style: normal;
}

.hero-copy h1 em::after {
  position: absolute;
  right: 2%;
  bottom: -6px;
  left: 2%;
  height: 6px;
  content: '';
  background: var(--honey);
  border-radius: 50%;
  transform: rotate(-1deg);
}

.hero-intro {
  max-width: 430px;
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.55;
}

.start-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 29px 14px 14px;
  border-radius: 26px;
  font-size: 1.16rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.practice-button { min-height: 58px; }

.play-disc {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding-left: 3px;
  color: var(--forest-dark);
  background: var(--honey);
  border-radius: 17px;
  font-size: 0.9rem;
}

.support-note {
  max-width: 420px;
  margin-top: 22px;
  padding: 12px 16px;
  color: #784743;
  background: #ffe5dc;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.hero-art {
  position: relative;
  z-index: 2;
  align-self: stretch;
  min-height: 410px;
}

.hero-art > img {
  position: absolute;
  z-index: 2;
  right: -1%;
  bottom: 2%;
  width: min(580px, 108%);
  max-height: 100%;
  filter: drop-shadow(0 18px 18px rgba(45, 75, 60, 0.18));
  animation: gentle-breathe 4.5s ease-in-out infinite;
}

.sun-halo {
  position: absolute;
  top: 5%;
  right: 1%;
  width: min(420px, 90%);
  aspect-ratio: 1;
  background: radial-gradient(circle, #ffe094 0 38%, rgba(255,224,148,0.4) 39% 53%, transparent 54%);
  border-radius: 50%;
  animation: slow-spin 24s linear infinite;
}

.floating-note {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--coral-dark);
  background: rgba(255, 254, 250, 0.9);
  border: 2px solid rgba(238, 128, 111, 0.18);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font-weight: 800;
  animation: note-float 3.8s ease-in-out infinite;
}

.note-one { top: 17%; left: 11%; width: 54px; height: 54px; font-size: 1.5rem; }
.note-two { top: 40%; right: 0; width: 35px; height: 35px; color: var(--honey); animation-delay: -1.2s; }
.note-three { top: 4%; right: 26%; width: 45px; height: 45px; color: var(--plum); animation-delay: -2.4s; }

.privacy-note {
  position: absolute;
  z-index: 3;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 650;
  transform: translateX(-50%);
  white-space: nowrap;
}

.sky-blob {
  position: absolute;
  background: rgba(129, 201, 192, 0.24);
  border-radius: 50%;
  filter: blur(1px);
}

.sky-blob-one { top: -11vw; left: -8vw; width: 35vw; height: 35vw; }
.sky-blob-two { right: -6vw; bottom: -14vw; width: 42vw; height: 42vw; background: rgba(241, 189, 87, 0.2); }

/* Start mode selection */

.mode-select {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, .66fr);
  grid-template-rows: auto minmax(310px, 1fr);
  gap: 20px;
  width: min(1080px, 100%);
  margin: auto;
  padding: clamp(24px, 4vw, 48px);
  background: rgba(255,253,245,.86);
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 52px 44px 60px 46px;
  box-shadow: var(--shadow-lg);
}

.mode-select-heading { grid-column: 1 / -1; text-align: center; }
.mode-select-heading h1 { margin-bottom: 8px; color: var(--forest-dark); font-size: clamp(2.4rem, 5vw, 4.6rem); }
.mode-select-heading > p:last-child { margin: 0; color: var(--ink-soft); font-weight: 650; }

.mode-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 145px;
  padding: 0;
  text-align: left;
  background: #f8edcf;
  border: 3px solid rgba(255,255,255,.85);
  border-radius: 34px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.mode-card:hover,
.mode-card:focus-visible { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.instrument-mode-card { grid-template-columns: minmax(270px, 1.15fr) minmax(220px, .85fr); grid-row: 2; min-height: 340px; background: #d9ebcf; }
.mode-secondary-grid { display: grid; grid-row: 2; gap: 18px; }
.mode-secondary-grid .mode-card { grid-template-columns: 42% 1fr; }
.mode-picture { position: relative; display: block; min-height: 150px; overflow: hidden; }
.mode-picture > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.mode-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 24px; }
.mode-copy small { margin-bottom: 7px; color: var(--coral-dark); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mode-copy strong { color: var(--forest-dark); font-size: clamp(1.35rem, 3vw, 2.45rem); line-height: 1.02; }
.mode-secondary-grid .mode-copy strong { font-size: clamp(1.15rem, 1.8vw, 1.55rem); overflow-wrap: anywhere; }
.mode-copy > span { margin-top: 6px; color: var(--ink-soft); font-weight: 750; }
.mode-play { position: absolute; right: 22px; bottom: 20px; display: grid; place-items: center; width: 49px; height: 49px; padding-left: 3px; color: #fff; background: var(--forest); border-radius: 18px; }
.mode-symbols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: center; padding: 20px; background: #e6e0ec; }
.mode-symbols i { display: grid; place-items: center; aspect-ratio: 1; color: #fff; background: var(--plum); border-radius: 18px; font-size: 1.4rem; font-style: normal; font-weight: 850; }
.mode-symbols i:nth-child(2) { background: var(--coral-dark); }
.mode-symbols i:nth-child(3) { background: var(--forest); }
.mode-symbols i:nth-child(4) { color: var(--ink); background: var(--honey); }

.nel-papa-picture { position: relative; background: #bde5df; overflow: hidden; }
.nel-papa-picture .mode-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nel-papa-picture .mode-papa { position: absolute; z-index: 2; right: 3%; bottom: -11%; width: 46%; height: 88%; object-fit: contain; }
.nel-papa-picture .mode-nel { position: absolute; z-index: 3; right: 36%; bottom: -7%; width: 34%; height: 69%; object-fit: contain; }

/* Map */

.map-screen {
  min-height: calc(100dvh - 86px);
  padding: 18px max(20px, env(safe-area-inset-right)) max(42px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 80%, rgba(131,178,107,0.25), transparent 42%),
    linear-gradient(#edf5dd 0 22%, #dae6b4 66%, #cbd9a0 100%);
}

.instrument-spotlight {
  display: grid;
  grid-template-columns: minmax(350px, 1.2fr) minmax(340px, .8fr);
  width: min(1080px, calc(100vw - 40px));
  min-height: 330px;
  margin: 0 auto 28px;
  background: linear-gradient(135deg, #d9eddf, #fff0c9);
  border: 3px solid rgba(255,255,255,.86);
  border-radius: 48px 40px 58px 42px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.instrument-spotlight-art { min-height: 330px; }
.instrument-spotlight-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px, 4vw, 48px); }
.instrument-spotlight-copy h2 { margin-bottom: 12px; color: var(--forest-dark); font-size: clamp(2rem, 4vw, 3.15rem); }
.instrument-spotlight-copy > p:not(.eyebrow) { color: var(--ink-soft); font-weight: 650; line-height: 1.5; }

/* Nel and Papa interactive story instrument */

.instrument-screen {
  min-height: calc(100dvh - 86px);
  padding: 3px max(20px, env(safe-area-inset-right)) max(38px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: linear-gradient(180deg, #e6f1dc, #cbdba2);
}

.instrument-shell { width: min(1120px, 100%); margin: 0 auto; }
.instrument-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.instrument-heading h1 { margin: 0; color: var(--forest-dark); font-size: clamp(2rem, 4.2vw, 3.35rem); }
.instrument-options { position: relative; z-index: 12; }
.instrument-options > summary { display: grid; place-items: center; min-width: 76px; min-height: 58px; padding: 7px 12px; color: var(--forest-dark); background: rgba(255,254,248,.82); border: 2px solid rgba(48,107,91,.12); border-radius: 19px; box-shadow: 0 4px 0 rgba(48,74,62,.09); cursor: pointer; list-style: none; }
.instrument-options > summary::-webkit-details-marker { display: none; }
.instrument-options > summary span { letter-spacing: .1em; line-height: .6; }
.instrument-options > summary strong { margin-top: 5px; font-size: .68rem; }
.instrument-options[open] > summary { background: #f8dda0; border-color: #e2b95e; }
.instrument-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.instrument-options .instrument-tools { position: absolute; top: calc(100% + 9px); right: 0; width: max-content; max-width: min(520px, calc(100vw - 40px)); padding: 9px; background: rgba(255,253,245,.97); border: 2px solid rgba(48,107,91,.12); border-radius: 23px; box-shadow: var(--shadow-lg); }
.tool-toggle { display: grid; place-items: center; min-width: 66px; min-height: 58px; padding: 7px 10px; color: var(--ink-soft); background: rgba(255,254,248,.76); border: 2px solid rgba(48,107,91,.12); border-radius: 19px; box-shadow: 0 4px 0 rgba(48,74,62,.09); }
.tool-toggle > span:first-child,
.tool-toggle > strong { color: var(--forest-dark); font-size: 1.05rem; line-height: 1; }
.tool-toggle > span:last-child { margin-top: 4px; font-size: .66rem; font-weight: 750; }
.tool-toggle.is-on { color: var(--forest-dark); background: #f8dda0; border-color: #e2b95e; }

.instrument-stage {
  position: relative;
  height: clamp(300px, 45vh, 500px);
  min-height: 300px;
  background: #bde5df;
  border: 3px solid rgba(255,255,255,.8);
  border-radius: 42px 38px 48px 40px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.instrument-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.instrument-papa,
.instrument-nel { position: absolute; z-index: 3; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(30,68,57,.2)); transition: left 420ms ease, right 420ms ease, bottom 420ms ease, transform 420ms ease; }
.instrument-papa { right: 10%; bottom: -10%; width: 34%; height: 90%; }
.instrument-nel { left: 27%; bottom: -8%; width: 24%; height: 72%; }
.instrument-screen[data-story-moment="homecoming"] .instrument-papa { right: 20%; transform: rotate(-2deg); }
.instrument-screen[data-story-moment="homecoming"] .instrument-nel { left: 34%; transform: translateX(20px) rotate(3deg); }
.instrument-screen[data-story-moment="path"] .instrument-nel,
.instrument-screen[data-story-moment="path-dawn"] .instrument-nel { left: 51%; transform: rotate(4deg); }
.instrument-screen[data-story-moment="question"] .instrument-nel,
.instrument-screen[data-story-moment="gate-open"] .instrument-nel { left: 40%; bottom: -2%; }
.instrument-screen[data-story-moment="moon"] .instrument-nel,
.instrument-screen[data-story-moment="moonrise"] .instrument-nel { left: 22%; transform: rotate(-3deg); }
.instrument-screen[data-story-moment="whirlwind"] .instrument-nel,
.instrument-screen[data-story-moment="hidden-door"] .instrument-nel { left: 48%; bottom: 1%; transform: rotate(7deg); }
.instrument-screen[data-story-moment="echo"] .instrument-nel { transform: translateY(-7px); }

.moment-badge { position: absolute; z-index: 5; top: 18px; left: 20px; display: grid; place-items: center; width: 70px; height: 70px; color: var(--forest-dark); background: rgba(255,244,183,.92); border: 4px solid rgba(255,255,255,.74); border-radius: 50%; box-shadow: var(--shadow-sm); }
.moment-badge span { font-size: 2rem; font-weight: 850; }
.moment-copy { position: absolute; z-index: 5; right: 20px; bottom: 18px; max-width: 330px; padding: 12px 17px; color: #fff; background: rgba(28,70,59,.84); border: 1px solid rgba(255,255,255,.28); border-radius: 18px; backdrop-filter: blur(8px); }
.moment-copy strong { display: block; font-size: 1.05rem; }
.moment-copy span { display: block; margin-top: 3px; font-size: .78rem; font-weight: 650; }
.story-ripples { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.story-ripples i { position: absolute; left: 43%; top: 44%; width: 70px; height: 70px; border: 8px solid rgba(255,239,142,.78); border-radius: 50%; opacity: 0; }
.instrument-screen[data-story-moment="echo"] .story-ripples i { animation: instrument-ripple 1.05s ease-out; }
.instrument-screen[data-story-moment="echo"] .story-ripples i:nth-child(2) { animation-delay: .16s; }
.instrument-screen[data-story-moment="echo"] .story-ripples i:nth-child(3) { animation-delay: .32s; }

.instrument-tutorial { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin: 12px 0 0; padding: 10px 12px; background: rgba(255,254,246,.92); border: 2px solid rgba(48,107,91,.12); border-radius: 21px; box-shadow: var(--shadow-sm); }
.tutorial-symbol { display: grid; place-items: center; width: 45px; height: 45px; color: var(--forest-dark); background: var(--honey); border-radius: 15px; font-size: 1.35rem; font-weight: 850; }
.instrument-tutorial strong,
.instrument-tutorial small { display: block; }
.instrument-tutorial small { margin-top: 2px; color: var(--ink-soft); font-size: .74rem; font-weight: 650; }
.instrument-tutorial button { min-height: 43px; padding: 8px 13px; color: var(--ink-soft); background: var(--cream-100); border-radius: 14px; font-size: .76rem; font-weight: 750; }
.creative-goal { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; margin: 12px 0 0; padding: 11px 13px; color: var(--forest-dark); background: linear-gradient(135deg,rgba(255,250,218,.96),rgba(220,239,221,.96)); border: 2px solid rgba(48,107,91,.14); border-radius: 21px; box-shadow: var(--shadow-sm); }
.creative-goal.achieved { background: linear-gradient(135deg,#e2f2d8,#fff0b7); }
.creative-goal-symbol { display: grid; place-items: center; min-width: 47px; height: 47px; padding: 0 6px; color: #fff; background: var(--forest); border-radius: 16px; font-size: 1.05rem; font-weight: 900; }
.creative-goal strong, .creative-goal small { display: block; }
.creative-goal small { margin-top: 2px; color: var(--ink-soft); font-size: .72rem; font-weight: 650; }
.creative-goal button { min-height: 43px; padding: 8px 13px; color: var(--ink-soft); background: #fffaf0; border-radius: 14px; font-size: .74rem; font-weight: 800; }

.chord-surface { display: grid; gap: 10px; margin-top: 12px; }
.chord-surface.mode-4 { grid-template-columns: repeat(4, 1fr); }
.chord-surface.mode-7 { grid-template-columns: repeat(7, 1fr); }
.chord-pad { position: relative; display: grid; place-items: center; min-width: 0; min-height: 116px; padding: 11px 7px; color: var(--forest-dark); background: #fff7dd; border: 3px solid rgba(255,255,255,.9); border-radius: 24px; box-shadow: inset 0 -8px 0 rgba(69,89,72,.08), 0 6px 0 rgba(44,76,61,.12); transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease; }
.chord-pad:nth-child(2n) { background: #d9eee3; }
.chord-pad:nth-child(3n) { background: #f5d9d1; }
.chord-pad:hover,
.chord-pad:focus-visible { z-index: 3; filter: brightness(1.03); transform: translateY(-3px); }
.chord-pad.is-current { border-color: var(--coral-dark); box-shadow: inset 0 -8px 0 rgba(69,89,72,.08), 0 6px 0 rgba(44,76,61,.12), 0 0 0 3px #fff, 0 0 0 7px var(--coral-dark); }
.chord-pad.is-recommended::after { position: absolute; inset: -7px; content: ''; border: 4px solid var(--honey); border-radius: 29px; box-shadow: 0 0 0 3px rgba(255,255,255,.75); pointer-events: none; animation: guidance-breathe 2.3s ease-in-out infinite; }
.chord-pad.is-sounding .chord-symbol { animation: chord-pop 480ms ease-out; }
.chord-symbol { display: grid; place-items: center; width: 50px; height: 50px; color: #fff; background: var(--forest); border-radius: 17px; font-size: 1.45rem; font-weight: 850; }
.chord-4 .chord-symbol { background: var(--coral-dark); }
.chord-5 .chord-symbol { background: var(--plum); }
.chord-6 .chord-symbol { background: #486c91; }
.chord-7 .chord-symbol { background: #7e5c7d; }
.chord-pad strong { margin-top: 7px; font-size: clamp(.82rem, 1.35vw, 1rem); }
.chord-pad small { margin-top: 2px; color: var(--ink-soft); font-size: .68rem; font-weight: 750; }
.instrument-gentle-note { margin: 11px 0 0; color: var(--ink-soft); font-size: .75rem; font-weight: 700; text-align: center; }

.quick-paths {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 16px;
  width: min(1080px, calc(100vw - 40px));
  margin: 0 auto 24px;
}

.quick-path {
  position: relative;
  display: grid;
  grid-template-rows: minmax(190px, 1fr) auto;
  min-width: 0;
  min-height: 290px;
  padding: 0;
  text-align: left;
  background: var(--cream-50);
  border: 3px solid rgba(255,255,255,.9);
  border-radius: 34px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.quick-path:hover,
.quick-path:focus-visible { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.quick-picture { display: block; min-height: 190px; overflow: hidden; }
.quick-picture img { width: 100%; height: 100%; object-fit: cover; }
.quick-copy { display: grid; gap: 4px; padding: 17px 62px 20px 19px; }
.quick-copy small { color: var(--coral-dark); font-size: .72rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.quick-copy strong { color: var(--forest-dark); font-size: clamp(1.25rem, 2.3vw, 1.9rem); line-height: 1.05; }
.quick-play { position: absolute; right: 17px; bottom: 18px; display: grid; place-items: center; width: 45px; height: 45px; padding-left: 3px; color: #fff; background: var(--forest); border-radius: 16px; }
.quick-instrument { background: #dcefdc; }
.quick-story { background: #fff0c9; }
.quick-meadow { background: #e5eed1; }

.discover-section {
  width: min(1080px, calc(100vw - 40px));
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px);
  background: rgba(255,253,245,.78);
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 38px;
  box-shadow: var(--shadow-sm);
}

.discover-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; }
.discover-heading p { margin-bottom: 3px; }
.discover-heading h2 { margin: 0; color: var(--forest-dark); font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
.discover-symbol { display: grid; place-items: center; width: 55px; height: 55px; color: #fff; background: var(--coral-dark); border-radius: 19px; font-size: 1.45rem; font-weight: 900; }
.learning-group { margin-top: 10px; border-radius: 24px; }
.learning-group > summary { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 14px; min-height: 78px; padding: 10px 15px 10px 10px; color: var(--forest-dark); background: #edf3dd; border: 2px solid rgba(48,107,91,.1); border-radius: 24px; cursor: pointer; list-style: none; }
.learning-group > summary::-webkit-details-marker { display: none; }
.learning-group > summary > span:nth-child(2) { display: grid; gap: 2px; }
.learning-group > summary strong { font-size: 1.12rem; }
.learning-group > summary small { color: var(--ink-soft); font-size: .76rem; font-weight: 650; }
.learning-group > summary > i { display: grid; place-items: center; width: 42px; height: 42px; background: rgba(255,255,255,.78); border-radius: 14px; font-size: 1.35rem; font-style: normal; transition: transform 180ms ease; }
.learning-group[open] > summary > i { transform: rotate(45deg); }
.group-symbol { display: grid; place-items: center; width: 58px; height: 58px; color: #fff; background: var(--forest); border-radius: 19px; font-size: 1.5rem; font-weight: 900; }
.group-symbol.imitate { background: var(--coral-dark); }
.group-symbol.understand { background: var(--plum); }
.learning-group > .learning-grid { padding: 14px 2px 4px; }
.learning-grid.one-grid { grid-template-columns: minmax(280px, 1fr); }
.learning-grid.one-grid .map-place { max-width: 520px; }

.map-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: var(--page);
  margin: 0 auto 22px;
}

.map-heading h1,
.activity-heading h1 {
  margin-bottom: 9px;
  color: var(--forest-dark);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
}

.map-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 600;
}

.journey-leaves {
  display: grid;
  grid-template-columns: 44px auto;
  grid-template-rows: auto auto;
  align-items: center;
  min-width: 156px;
  padding: 10px 16px 10px 10px;
  background: rgba(255, 254, 250, 0.82);
  border: 1px solid rgba(48,107,91,0.11);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.leaf-badge {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--forest);
  background: var(--mint);
  border-radius: 14px;
}

.leaf-badge svg,
.place-journeys svg,
.celebration-leaf svg {
  width: 25px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: currentColor;
}

.journey-leaves strong { font-size: 1.25rem; line-height: 1; }
.journey-leaves > span:last-child { color: var(--ink-soft); font-size: 0.72rem; font-weight: 700; }

.adventure-spotlight {
  display: grid;
  grid-template-columns: minmax(320px, .92fr) minmax(360px, 1.08fr);
  width: min(1080px, calc(100vw - 40px));
  min-height: 300px;
  margin: 0 auto 28px;
  background: linear-gradient(135deg, rgba(255,253,245,.98), rgba(246,232,190,.92));
  border: 2px solid rgba(255,255,255,.84);
  border-radius: 44px 38px 52px 40px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.adventure-spotlight-art {
  min-height: 300px;
  background: #cee4d3;
  overflow: hidden;
}

.adventure-spotlight-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adventure-spotlight-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(27px, 4vw, 50px);
}

.adventure-spotlight-copy h2 {
  margin-bottom: 13px;
  color: var(--forest-dark);
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.adventure-spotlight-copy > p:not(.eyebrow) {
  max-width: 470px;
  margin-bottom: 19px;
  color: var(--ink-soft);
  font-weight: 650;
  line-height: 1.48;
}

.adventure-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  color: var(--ink-soft);
  font-size: .8rem;
}

.adventure-meta > span { display: flex; gap: 5px; }
.adventure-meta i { width: 10px; height: 10px; background: #d4d8c4; border-radius: 50%; }
.adventure-meta i.filled { background: var(--coral); }

.practice-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: min(1080px, calc(100vw - 40px));
  margin: 0 auto 14px;
}

.practice-heading h2 { margin-bottom: 0; color: var(--forest-dark); font-size: clamp(1.55rem, 3vw, 2.3rem); }
.practice-heading > p { max-width: 390px; margin-bottom: 2px; color: var(--ink-soft); font-size: .88rem; font-weight: 650; text-align: right; }

.learning-zone {
  width: min(1080px, calc(100vw - 40px));
  margin: 0 auto 30px;
  padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(140deg, rgba(255,254,248,.92), rgba(214,236,218,.9));
  border: 2px solid rgba(255,255,255,.84);
  border-radius: 44px 38px 52px 40px;
  box-shadow: var(--shadow-lg);
}

.learning-zone-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 18px; }
.learning-zone-heading h2 { margin: 0; color: var(--forest-dark); font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
.learning-zone-heading > p { max-width: 380px; margin: 0; color: var(--ink-soft); font-size: .88rem; font-weight: 650; line-height: 1.45; text-align: right; }
.learning-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.learning-grid.three-grid { grid-template-columns: repeat(3, 1fr); }
.response-zone { background: linear-gradient(140deg, rgba(255,250,227,.94), rgba(209,233,222,.92)); }
.rhythm-zone { background: linear-gradient(140deg, rgba(244,231,196,.94), rgba(211,228,213,.92)); }
.familiar-zone { background: linear-gradient(140deg, rgba(238,244,220,.94), rgba(255,247,224,.92)); }
.learning-grid .map-place { position: relative; inset: auto; width: 100%; min-width: 0; }
.learning-grid .place-picture { background: #d9eee3; }
.learning-grid .place-mode .place-picture { background: #eee1d1; }
.learning-grid .place-interval .place-picture { background: #d9ebdf; }
.learning-grid .place-rhythm .place-picture { background: #e5e0ca; }
.familiar-heading { margin-top: 4px; }

.world-map {
  position: relative;
  width: min(1080px, calc(100vw - 40px));
  height: min(620px, calc(100vh - 250px));
  min-height: 520px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at 77% 82%, rgba(71, 141, 122, 0.35) 0 10%, transparent 10.5%),
    radial-gradient(ellipse at 21% 19%, rgba(255, 255, 255, 0.55) 0 14%, transparent 14.5%),
    radial-gradient(ellipse at center, rgba(255,255,255,0.2), transparent 70%);
  border: 2px solid rgba(61, 108, 77, 0.13);
  border-radius: 52px 45px 68px 48px;
  box-shadow: inset 0 0 70px rgba(71, 112, 74, 0.12), var(--shadow-lg);
  overflow: hidden;
}

.world-map::before,
.world-map::after {
  position: absolute;
  content: '';
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
}

.world-map::before { top: -70px; left: 35%; width: 230px; height: 170px; }
.world-map::after { right: -80px; bottom: -50px; width: 270px; height: 190px; }

.map-path {
  position: absolute;
  z-index: 1;
  top: 47%;
  left: 18%;
  width: 65%;
  height: 22%;
  border: 9px solid rgba(246, 226, 170, 0.8);
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(-8deg);
}

.map-path i {
  position: absolute;
  width: 11px;
  height: 15px;
  background: rgba(92, 113, 75, 0.34);
  border-radius: 60% 50%;
  transform: rotate(30deg);
}

.map-path i:nth-child(1) { top: 92%; left: 6%; }
.map-path i:nth-child(2) { top: 101%; left: 28%; }
.map-path i:nth-child(3) { top: 91%; left: 51%; }
.map-path i:nth-child(4) { top: 65%; left: 72%; }
.map-path i:nth-child(5) { top: 27%; left: 89%; }

.map-place {
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-columns: 104px 1fr auto;
  align-items: center;
  width: min(330px, 31%);
  min-width: 280px;
  min-height: 142px;
  padding: 10px 14px 10px 10px;
  text-align: left;
  background: rgba(255, 254, 247, 0.94);
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 28px 33px 25px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.map-place:not(:disabled):hover,
.map-place:focus-visible {
  z-index: 7;
  box-shadow: 0 9px 0 rgba(50,85,67,0.1), 0 20px 38px rgba(44,73,59,0.18);
  transform: translateY(-5px) rotate(-0.5deg);
}

.place-mountain { top: 5%; left: 5%; }
.place-cave { top: 7%; right: 5%; }
.place-home { right: 8%; bottom: 8%; }
.place-meadow { bottom: 8%; left: 7%; }

.place-picture {
  display: grid;
  place-items: center;
  width: 94px;
  height: 118px;
  background: linear-gradient(145deg, var(--cream-100), #e7efd1);
  border-radius: 22px;
  overflow: hidden;
}

.place-picture img {
  width: 112%;
  height: 112%;
  object-fit: contain;
}

.place-copy {
  display: grid;
  gap: 5px;
  padding-left: 13px;
}

.place-copy strong {
  color: var(--forest-dark);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

.place-copy small {
  max-width: 130px;
  color: var(--ink-soft);
  font-size: 0.77rem;
  font-weight: 650;
  line-height: 1.32;
}

.place-level {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  align-self: end;
  padding-bottom: 4px;
}

.place-level i {
  width: 7px;
  height: 7px;
  background: #d5ddca;
  border-radius: 50%;
}

.place-level i.filled { background: var(--coral); }
.free-mark { color: var(--coral-dark); font-size: 1.5rem; font-weight: 800; }

.place-journeys {
  position: absolute;
  top: -9px;
  right: -8px;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 42px;
  padding: 6px 9px;
  color: var(--forest-dark);
  background: var(--honey);
  border: 3px solid var(--cream-50);
  border-radius: 99px;
  font-size: 0.77rem;
  font-weight: 850;
}

.place-journeys svg { width: 15px; }

.map-muri {
  position: absolute;
  z-index: 3;
  top: 27%;
  left: 38%;
  width: 25%;
  height: 49%;
  pointer-events: none;
}

.map-muri img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 9px 8px rgba(44,74,58,0.16)); }

.map-gentle-note {
  width: var(--page);
  margin: 18px auto 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 650;
  text-align: center;
}

/* Narrative harmony adventure */

.story-screen {
  min-height: calc(100dvh - 86px);
  padding: 4px max(20px, env(safe-area-inset-right)) max(42px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: linear-gradient(180deg, #e8f2dd, #d0dea9);
}

.story-home { background: linear-gradient(180deg, #e4f1df, #f1dfac); }
.story-fork { background: linear-gradient(135deg, #dae9c6 0 50%, #ddd4e6 50% 100%); }
.story-forest { background: linear-gradient(180deg, #dbeac2, #aeca88); }
.story-river { background: linear-gradient(180deg, #635577, #393a59); }
.story-ridge { background: linear-gradient(180deg, #595a7e, #8d7bbf); }
.story-detour { background: linear-gradient(180deg, #a8dadc, #f9dfb2); }
.story-return { background: linear-gradient(180deg, #5e5c83, #f2b082); }

.story-shell { width: min(1080px, 100%); margin: 0 auto; }

.story-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 12px;
}

.story-heading h1 { margin: 0; color: var(--forest-dark); font-size: clamp(2rem, 4.6vw, 3.55rem); }
.story-river .story-heading h1,
.story-ridge .story-heading h1,
.story-return .story-heading h1 { color: #fff8e8; }
.story-river .story-heading .eyebrow,
.story-ridge .story-heading .eyebrow,
.story-return .story-heading .eyebrow { color: #ffd481; }

.story-progress {
  display: flex;
  gap: 7px;
  padding: 11px 14px;
  background: rgba(255,255,255,.58);
  border-radius: 99px;
}

.story-progress i { width: 13px; height: 13px; background: rgba(47,83,66,.2); border: 2px solid rgba(255,255,255,.7); border-radius: 50%; }
.story-progress i.done { background: var(--forest); }
.story-progress i.active { background: var(--coral); transform: scale(1.15); }

.story-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  min-height: min(620px, calc(100dvh - 205px));
  background: rgba(255,253,245,.94);
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 42px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.story-art {
  position: relative;
  min-height: 490px;
  background: var(--sky);
  overflow: hidden;
}

.story-art img { width: 100%; height: 100%; object-fit: cover; }

.story-chord-pulse {
  position: absolute;
  z-index: 3;
  top: 11%;
  right: 10%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: var(--forest-dark);
  background: rgba(255,223,143,.94);
  border: 5px solid rgba(255,255,255,.68);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(241,189,87,.36);
  font-size: 1.55rem;
}

.story-chord-pulse.is-sounding { animation: story-chord 720ms ease-out; }

.story-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 4vw, 48px);
}

.story-text {
  margin-bottom: 26px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  font-weight: 650;
  line-height: 1.55;
}

.story-controls { display: grid; gap: 18px; }
.story-main-action { justify-self: start; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.story-action-row { display: flex; align-items: stretch; gap: 11px; flex-wrap: wrap; }
.story-action-row > button { flex: 1 1 145px; }

.story-feedback {
  min-height: 46px;
  margin: 24px 0 0;
  color: var(--forest-dark);
  font-size: .88rem;
  font-weight: 760;
  line-height: 1.4;
}

.story-branches,
.story-paths { display: flex; gap: 12px; }

.story-branch,
.story-path {
  display: grid;
  flex: 1 1 0;
  place-items: center;
  min-width: 0;
  min-height: 158px;
  padding: 13px 9px;
  background: #e5efd8;
  border: 3px solid transparent;
  border-radius: 27px;
  box-shadow: inset 0 -8px 0 rgba(57,83,65,.08), 0 6px 0 rgba(47,76,61,.1);
  transition: transform 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.story-branch.river { background: #e6e0ed; }
.story-branch:not(:disabled):hover,
.story-path:not(:disabled):hover { transform: translateY(-4px); filter: brightness(1.03); }
.story-branch.selected,
.story-path.selected {
  border-color: var(--coral-dark);
  box-shadow: inset 0 -8px 0 rgba(57,83,65,.08), 0 6px 0 rgba(47,76,61,.1), 0 0 0 3px var(--cream-50), 0 0 0 6px var(--coral-dark);
  transform: translateY(-4px);
}
.story-branch strong,
.story-path strong { margin-top: 6px; font-size: 1rem; }
.story-branch small,
.story-path small { color: var(--ink-soft); font-size: .72rem; font-weight: 700; }

.branch-symbol,
.path-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: white;
  background: var(--forest);
  border-radius: 48% 52% 44% 56%;
  font-size: 1.9rem;
  font-weight: 850;
}

.story-branch.river .branch-symbol { background: var(--plum); }
.story-path:nth-child(2) .path-mark { background: var(--coral-dark); border-radius: 50%; }
.story-path:nth-child(3) .path-mark { color: var(--ink); background: var(--honey); border-radius: 38% 62% 46% 54%; }
.story-completion-card { background: linear-gradient(145deg, #fffef8, #f8e8bd); }
.completion-card.story-completion-card h1 { font-size: clamp(2.25rem, 4.4vw, 3rem); }
.theory-whisper { font-size: .78rem !important; }

/* Shared activities */

.activity-screen,
.completion-screen,
.meadow-screen {
  min-height: calc(100dvh - 86px);
  padding: 8px max(20px, env(safe-area-inset-right)) max(50px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.activity-pitch { background: linear-gradient(180deg, #eff4df 0%, #dbe8b8 100%); }
.activity-echo { color: #f9f1df; background: linear-gradient(180deg, #665573 0%, #43394f 100%); }
.activity-home { background: linear-gradient(180deg, #d9eee1 0%, #c3dba9 100%); }
.activity-contour { background: linear-gradient(180deg, #d7eee1 0%, #bdd9a6 100%); }
.activity-mode { background: linear-gradient(125deg, #f6dda0 0 50%, #7f77a7 50% 100%); }
.activity-interval { background: linear-gradient(180deg, #d8eee5 0%, #a9d0c7 100%); }
.activity-rhythm { background: linear-gradient(180deg, #f3e1ad 0%, #8fc2a8 100%); }
.activity-call-response { background: linear-gradient(180deg, #d5eee3 0%, #e6d995 100%); }
.activity-missing-tone { background: linear-gradient(180deg, #5d668a 0%, #6f9b83 100%); color: #fffaf0; }
.activity-sound-memory { background: linear-gradient(180deg, #d9eee4 0%, #a9c989 100%); }
.activity-chord-paths { background: linear-gradient(180deg, #e4eddb 0%, #efce91 100%); }
.activity-missing-tone .activity-heading h1 { color: #fffaf0; }
.activity-missing-tone .eyebrow { color: #ffe099; }
.activity-missing-tone .activity-instruction { color: #f3edf5; }

.activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1000px, 100%);
  margin: 0 auto 10px;
}

.activity-heading h1 { margin: 0; }
.activity-echo .activity-heading h1 { color: #fff9e9; }
.activity-echo .eyebrow { color: #ffd183; }

.activity-instruction {
  width: min(1000px, 100%);
  margin: 0 auto 18px;
  color: var(--ink-soft);
  font-size: clamp(0.96rem, 2vw, 1.08rem);
  font-weight: 650;
  line-height: 1.45;
}

.activity-echo .activity-instruction { color: #e4dced; }

.round-progress {
  display: flex;
  gap: 7px;
  padding: 11px 14px;
  background: rgba(255,255,255,0.54);
  border-radius: 99px;
}

.round-progress i {
  width: 13px;
  height: 13px;
  background: rgba(71, 96, 77, 0.2);
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: 50%;
}

.round-progress i.active { background: var(--coral); transform: scale(1.12); }
.round-progress i.done { background: var(--forest); }
.activity-echo .round-progress { background: rgba(255,255,255,0.12); }
.activity-echo .round-progress i { background: rgba(255,255,255,0.19); }
.activity-echo .round-progress i.active { background: var(--honey); }
.activity-echo .round-progress i.done { background: var(--aqua); }

.game-card {
  position: relative;
  width: min(1000px, 100%);
  min-height: 530px;
  margin: 0 auto;
  padding: 20px clamp(18px, 4vw, 40px) 25px;
  background: rgba(255, 254, 248, 0.91);
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 38px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.listen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  padding: 11px 17px;
  color: var(--forest-dark);
  background: var(--cream-100);
  border: 2px solid rgba(48,107,91,0.13);
  border-radius: 17px;
  box-shadow: 0 4px 0 rgba(45,82,65,0.09);
  font-size: 0.91rem;
  font-weight: 800;
}

.feedback-line {
  min-height: 25px;
  margin: 17px auto 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

.feedback-line.showing {
  color: var(--forest-dark);
  animation: feedback-in 260ms ease-out;
}

/* Ear training expansion */

.ear-game { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(420px, 1.28fr); grid-template-rows: auto 1fr auto auto; align-items: center; gap: 13px 28px; }
.ear-scene { position: relative; grid-row: 1 / -1; align-self: stretch; min-height: 450px; background: var(--sky); border-radius: 29px; overflow: hidden; }
.ear-scene img { width: 100%; height: 100%; object-fit: cover; }
.ear-listen-pulse { position: absolute; top: 13%; right: 11%; display: grid; place-items: center; width: 62px; height: 62px; color: var(--forest-dark); background: rgba(255,245,187,.94); border: 5px solid rgba(255,255,255,.76); border-radius: 50%; box-shadow: 0 0 0 0 rgba(241,189,87,.38); font-size: 1.5rem; font-weight: 850; }
.ear-listen-pulse.is-sounding { animation: story-chord 620ms ease-out; }
.ear-listen-row { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }
.compare-mode > span:first-child { color: var(--plum); font-weight: 900; }
.ear-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; width: 100%; }
.ear-choice { display: grid; place-items: center; min-width: 0; min-height: 150px; padding: 12px 9px; background: #fff7dc; border: 3px solid rgba(255,255,255,.9); border-radius: 25px; box-shadow: inset 0 -8px 0 rgba(55,84,69,.08), 0 6px 0 rgba(46,77,62,.12); transition: transform 160ms ease, filter 160ms ease; }
.ear-choice:not(:disabled):hover { filter: brightness(1.03); transform: translateY(-4px); }
.ear-choice strong { font-size: .96rem; }
.ear-choice small { margin-top: 3px; color: var(--ink-soft); font-size: .69rem; font-weight: 700; text-align: center; }
.ear-choice em { margin-top: 7px; padding: 3px 7px; color: var(--forest-dark); background: rgba(255,255,255,.75); border-radius: 8px; font-size: .66rem; font-style: normal; font-weight: 850; }
.contour-grid { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
.contour-grid:has(.contour-choice:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
.contour-choice svg { width: 100%; overflow: visible; }
.contour-choice polyline { fill: none; stroke: var(--forest); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.contour-choice circle { fill: var(--coral); stroke: #fff; stroke-width: 2.5; }
.mode-choice-grid { grid-template-columns: 1fr 1fr; }
.mode-choice > span { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 8px; color: #fff; background: var(--coral-dark); border-radius: 50%; font-size: 2rem; }
.mode-choice.minor { background: #e2ddeb; }
.mode-choice.minor > span { background: var(--plum); }
.interval-choice-grid { grid-template-columns: repeat(4, 1fr); }
.interval-choice-grid:has(.interval-choice:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
.interval-choice-grid:has(.interval-choice:nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
.interval-picture { position: relative; width: 92px; height: 62px; margin-bottom: 5px; }
.interval-picture::before { position: absolute; left: 7px; bottom: 11px; width: 78px; height: 5px; content: ''; background: rgba(48,107,91,.18); border-radius: 9px; }
.interval-picture i,
.interval-picture b { position: absolute; bottom: 6px; width: 18px; height: 18px; background: var(--coral); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 0 rgba(44,76,61,.12); }
.interval-picture i { left: 7px; }
.interval-picture b { left: calc(7px + var(--jump)); background: var(--plum); }
.ear-theory { grid-column: 2; display: flex; align-items: center; justify-self: center; gap: 8px; margin: 0; padding: 7px 11px; color: var(--ink-soft); background: rgba(255,255,255,.7); border-radius: 13px; font-size: .74rem; font-weight: 750; }
.ear-theory span { display: grid; place-items: center; width: 22px; height: 22px; color: white; background: var(--forest); border-radius: 50%; }
.ear-game > .feedback-line { grid-column: 2; }

.rhythm-mode-card { width: min(1000px, 100%); margin: 0 auto; padding: 20px; background: rgba(255,254,248,.92); border: 2px solid rgba(255,255,255,.8); border-radius: 38px; box-shadow: var(--shadow-lg); }
.rhythm-mode-card > img { width: 100%; height: 250px; object-fit: cover; border-radius: 27px; }
.rhythm-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 15px; }
.rhythm-mode-grid button { display: grid; place-items: center; min-height: 170px; padding: 18px; background: #fff0bd; border: 3px solid rgba(255,255,255,.9); border-radius: 27px; box-shadow: inset 0 -8px 0 rgba(55,84,69,.08), 0 6px 0 rgba(46,77,62,.12); }
.rhythm-mode-grid button:nth-child(2) { background: #d9ebe1; }
.rhythm-mode-grid span { color: var(--coral-dark); font-size: 1.3rem; font-weight: 900; letter-spacing: .18em; }
.rhythm-mode-grid strong { margin-top: 7px; font-size: 1.15rem; }
.rhythm-mode-grid small { max-width: 260px; margin-top: 4px; color: var(--ink-soft); font-weight: 650; text-align: center; }
.rhythm-mode-grid em { margin-top: 9px; color: var(--forest-dark); font-size: .74rem; font-style: normal; font-weight: 850; }
.rhythm-distinction { margin: 17px 4px 1px; color: var(--ink-soft); font-size: .82rem; text-align: center; }
.rhythm-game { grid-template-rows: auto 1fr auto auto; }
.rhythm-toolbar { display: flex; align-items: center; justify-content: center; gap: 15px; flex-wrap: wrap; }
.rhythm-toolbar > strong { color: var(--ink-soft); font-size: .8rem; }
.rhythm-tap-pad { display: grid; place-items: center; justify-self: center; width: min(280px, 90%); min-height: 210px; padding: 20px; color: #fff; background: var(--coral-dark); border: 7px solid #fff5cf; border-radius: 50% 48% 52% 47%; box-shadow: inset 0 -15px 0 rgba(95,42,39,.17), 0 9px 0 rgba(59,85,68,.14), 0 20px 36px rgba(56,84,69,.16); }
.rhythm-tap-pad > span { font-size: 3rem; line-height: 1; }
.rhythm-tap-pad strong { font-size: 1.25rem; }
.rhythm-tap-pad small { margin-top: 2px; color: #ffeccd; font-size: .7rem; font-weight: 700; }
.rhythm-tap-pad.is-sounding { animation: chord-pop 220ms ease-out; }
.rhythm-tap-progress { display: flex; justify-content: center; gap: 8px; min-height: 20px; }
.rhythm-tap-progress span { width: 17px; height: 17px; background: #d6decf; border: 2px solid #fff; border-radius: 50%; }
.rhythm-tap-progress span.filled { background: var(--forest); }
.rhythm-game > .feedback-line { grid-column: 2; }

/* v1.4 connected learning */

.expansion-game { display: grid; grid-template-columns: minmax(260px,.72fr) minmax(420px,1.28fr); grid-template-rows: auto 1fr auto auto; align-items: center; gap: 14px 28px; }
.expansion-scene { position: relative; grid-row: 1 / -1; align-self: stretch; min-height: 450px; background: #d9eee3; border-radius: 29px; overflow: hidden; }
.expansion-scene img { width: 100%; height: 100%; object-fit: cover; }
.expansion-listen-pulse { position: absolute; top: 13%; right: 10%; display: grid; place-items: center; width: 62px; height: 62px; color: var(--forest-dark); background: rgba(255,245,187,.95); border: 5px solid rgba(255,255,255,.78); border-radius: 50%; box-shadow: 0 0 0 0 rgba(241,189,87,.38); font-size: 1.5rem; font-weight: 850; }
.expansion-listen-pulse.is-sounding { animation: story-chord 620ms ease-out; }
.expansion-toolbar { display: flex; align-items: center; justify-content: center; gap: 11px; flex-wrap: wrap; }
.sound-invitation { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 12px; color: var(--forest-dark); background: rgba(255,255,255,.75); border-radius: 17px; font-size: .78rem; }
.sound-invitation span { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--forest); border-radius: 12px; font-size: 1rem; }
.response-choice-grid, .missing-choice-grid, .chord-path-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; width: 100%; }
.response-choice-grid:has(.response-choice:nth-child(2):last-child) { grid-template-columns: repeat(2,1fr); }
.response-choice, .missing-choice, .chord-path-choice, .memory-card { position: relative; display: grid; place-items: center; min-width: 0; min-height: 145px; padding: 12px 8px; background: #fff5cf; border: 3px solid rgba(255,255,255,.92); border-radius: 24px; box-shadow: inset 0 -8px 0 rgba(55,84,69,.08), 0 6px 0 rgba(46,77,62,.12); transition: transform 160ms ease, filter 160ms ease; }
.response-choice:not(:disabled):hover, .missing-choice:not(:disabled):hover, .chord-path-choice:not(:disabled):hover, .memory-card:not(:disabled):hover { filter: brightness(1.03); transform: translateY(-4px); }
.response-choice.selected, .chord-path-choice.selected, .memory-card.selected { outline: 5px solid var(--aqua); outline-offset: -6px; }
.response-choice > span, .chord-path-choice > span { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 5px; color: white; background: var(--coral-dark); border-radius: 20px; font-size: 1.35rem; font-weight: 900; }
.response-choice small, .chord-path-choice small { margin-top: 3px; color: var(--ink-soft); font-size: .69rem; font-weight: 700; }
.expansion-confirm { justify-self: center; min-width: 230px; }
.expansion-game > .feedback-line { grid-column: 2; }
.gap-meter { display: grid; place-items: center; min-height: 48px; padding: 7px 12px; background: rgba(255,255,255,.75); border-radius: 16px; }
.gap-meter > span { display: flex; align-items: center; gap: 7px; }
.gap-meter i { color: var(--forest); font-size: .72rem; font-style: normal; }
.gap-meter i.gap { display: grid; place-items: center; width: 25px; height: 25px; color: #fff; background: var(--plum); border-radius: 50%; font-size: .75rem; }
.missing-choice-grid { grid-template-columns: repeat(4,1fr); }
.missing-choice-grid:has(.missing-choice:nth-child(3):last-child) { grid-template-columns: repeat(3,1fr); }
.missing-choice-grid:has(.missing-choice:nth-child(2):last-child) { grid-template-columns: repeat(2,1fr); }
.star-track { position: relative; width: 60px; height: 88px; background: linear-gradient(90deg, transparent 47%, rgba(48,107,91,.2) 47% 53%, transparent 53%); border-radius: 18px; }
.star-track i { position: absolute; right: 0; bottom: var(--tone-height); left: 0; color: #e99b42; font-size: 2.2rem; font-style: normal; line-height: 1; transform: translateY(50%); }
.missing-choice > strong { display: grid; place-items: center; width: 29px; height: 29px; color: #fff; background: var(--forest); border-radius: 50%; font-size: .78rem; }
.memory-status { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--forest-dark); }
.memory-status > span { display: flex; gap: 7px; }
.memory-status i { display: grid; place-items: center; width: 28px; height: 28px; color: #799b7d; background: #edf2d4; border-radius: 50%; font-size: .72rem; font-style: normal; }
.memory-status i.done { color: #fff; background: var(--forest); }
.memory-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; width: 100%; }
.memory-grid.cards-4 { grid-template-columns: repeat(2,1fr); }
.memory-card { min-height: 125px; background: linear-gradient(145deg,#fff5cb,#dcebc8); }
.memory-card > span { display: grid; place-items: center; width: 58px; height: 58px; color: #fff; background: var(--forest); border-radius: 68% 32% 63% 37%; font-size: 1.45rem; transform: rotate(-10deg); }
.memory-card > strong { margin-top: 4px; font-size: .75rem; }
.memory-card.matched { opacity: .82; }
.memory-card.matched > span { background: var(--aqua-dark); transform: rotate(8deg); }
.chord-path-grid { grid-template-columns: repeat(4,1fr); }
.chord-path-grid:has(.chord-path-choice:nth-child(3):last-child) { grid-template-columns: repeat(3,1fr); }
.chord-path-choice { min-height: 160px; background: #fff4d2; }
.chord-path-choice:nth-child(2) { background: #ddefdf; }
.chord-path-choice:nth-child(3) { background: #e5e0ed; }
.chord-path-choice:nth-child(4) { background: #f5dfb3; }
.chord-path-choice > span { background: var(--forest); }
.chord-path-choice em { margin-top: 7px; padding: 3px 7px; color: var(--forest-dark); background: rgba(255,255,255,.72); border-radius: 8px; font-size: .65rem; font-style: normal; font-weight: 850; }
.all-paths-note { margin: -3px 0 0; color: var(--ink-soft); font-size: .74rem; font-weight: 750; text-align: center; }

/* Pitch game */

.pitch-game {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(430px, 1.28fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 12px 30px;
}

.pitch-scene {
  position: relative;
  grid-row: 1 / 4;
  align-self: stretch;
  min-height: 450px;
  background: linear-gradient(175deg, #d9eee1 0%, #e9efc9 100%);
  border-radius: 29px;
  overflow: hidden;
}

.pitch-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listening-orb {
  position: absolute;
  top: 19%;
  right: 15%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: var(--forest-dark);
  background: rgba(255, 224, 148, 0.92);
  border: 5px solid rgba(255,255,255,0.65);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(241,189,87,0.35);
  font-size: 1.5rem;
  transition: transform 150ms ease;
}

.is-sounding.listening-orb,
.listening-orb.is-sounding { transform: scale(1.18); box-shadow: 0 0 0 18px rgba(241,189,87,0); }

.pitch-game > .listen-button { justify-self: center; }

.pitch-choices {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
}

.direction-card {
  display: grid;
  flex: 1 1 0;
  place-items: center;
  min-width: 112px;
  min-height: 175px;
  padding: 15px 10px;
  background: #fff9e8;
  border: 3px solid rgba(48,107,91,0.1);
  border-radius: 25px;
  box-shadow: 0 6px 0 rgba(48, 75, 61, 0.1);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.direction-card:not(:disabled):hover { border-color: var(--forest); transform: translateY(-4px); }
.direction-card.up { background: #e1f1dc; }
.direction-card.same { background: #fff0c9; }
.direction-card.down { background: #e4e1eb; }

.direction-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  color: #fff;
  background: var(--forest);
  border-radius: 26px 28px 22px 28px;
  font-size: 2.3rem;
  line-height: 1;
}

.direction-card.same .direction-icon { color: var(--ink); background: var(--honey); }
.direction-card.down .direction-icon { background: var(--plum); }
.direction-card strong { font-size: 1.08rem; }
.direction-card small { color: var(--ink-soft); font-size: 0.72rem; font-weight: 650; }

/* Echo */

.echo-game {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(430px, 1.2fr);
  grid-template-rows: auto 1fr auto;
  gap: 18px 28px;
  color: var(--ink);
  background: rgba(250,245,229,0.96);
}

.echo-scene {
  position: relative;
  grid-row: 1 / 4;
  min-height: 480px;
  background: #665573;
  border-radius: 28px;
  overflow: hidden;
}

.echo-scene > img { width: 100%; height: 100%; object-fit: cover; }

.echo-mouth {
  position: absolute;
  top: 31%;
  left: 50%;
  width: 120px;
  height: 100px;
  transform: translateX(-50%);
}

.echo-mouth i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(30px + var(--ring, 0) * 23px);
  height: calc(30px + var(--ring, 0) * 23px);
  border: 4px solid rgba(255, 211, 133, calc(.72 - var(--ring, 0) * .16));
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 220ms ease, height 220ms ease, opacity 220ms ease;
}

.echo-mouth i:nth-child(1) { --ring: 0; }
.echo-mouth i:nth-child(2) { --ring: 1; }
.echo-mouth i:nth-child(3) { --ring: 2; }
.echo-mouth.is-sounding i { animation: echo-ring 500ms ease-out; }
.echo-mouth.is-sounding i:nth-child(2) { animation-delay: 50ms; }
.echo-mouth.is-sounding i:nth-child(3) { animation-delay: 100ms; }

.echo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.echo-input {
  display: flex;
  gap: 8px;
  min-height: 36px;
  padding: 9px 12px;
  background: #eee7d9;
  border-radius: 99px;
}

.echo-bead {
  width: 17px;
  height: 17px;
  background: #c9c5b9;
  border: 2px solid #fff;
  border-radius: 50%;
}

.echo-bead.filled { background: var(--coral); box-shadow: 0 0 0 2px rgba(238,128,111,0.18); }

.echo-game[data-game-state="reflecting"] .echo-input {
  box-shadow: 0 0 0 5px rgba(241, 189, 87, 0.22);
}

.sound-stones {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 15px);
  min-height: 260px;
  padding: 24px 14px;
  background: linear-gradient(180deg, #efe8d7, #e1d9c8);
  border-radius: 28px;
}

.sound-stone {
  display: grid;
  flex: 1 1 0;
  place-items: center;
  min-width: 62px;
  max-width: 95px;
  height: calc(105px + var(--stone-index) * 18px);
  color: #fff;
  background: var(--stone-color);
  border: 4px solid rgba(255,255,255,0.58);
  border-radius: 45% 55% 42% 58% / 56% 42% 58% 44%;
  box-shadow: inset 0 -10px 0 rgba(42,54,48,0.12), 0 7px 0 rgba(56,68,61,0.14);
  font-size: 1.05rem;
  font-weight: 850;
  transition: transform 130ms ease, filter 130ms ease;
}

.sound-stone:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-5px); }
.sound-stone.is-sounding { transform: translateY(-12px) scale(1.04); filter: brightness(1.16); }
.sound-stone.is-reflecting { transform: translateY(-8px) scale(1.035); filter: brightness(1.12); box-shadow: inset 0 -10px 0 rgba(42,54,48,0.12), 0 0 0 9px rgba(241,189,87,0.2); }
.stone-1 { --stone-index: 0; --stone-color: #54776f; }
.stone-2 { --stone-index: 1; --stone-color: #638f78; }
.stone-3 { --stone-index: 2; --stone-color: #be7568; }
.stone-4 { --stone-index: 3; --stone-color: #ae8b51; }
.stone-5 { --stone-index: 4; --stone-color: #715f83; }

/* Home */

.home-game {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(430px, 1.2fr);
  grid-template-rows: auto auto auto auto;
  align-items: center;
  gap: 15px 30px;
}

.home-scene {
  position: relative;
  grid-row: 1 / 5;
  min-height: 480px;
  background: linear-gradient(#d9ece2, #bcd49e);
  border-radius: 28px;
  overflow: hidden;
}

.home-scene img { width: 100%; height: 100%; object-fit: cover; }

.home-path-dot {
  position: absolute;
  top: 60%;
  left: 35%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--forest-dark);
  background: var(--honey);
  border: 3px solid #fff9dc;
  border-radius: 50%;
  transition: transform 140ms ease;
}

.home-path-dot.is-sounding { transform: scale(1.25); }
.home-game > .listen-button { justify-self: center; }

.home-choices {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.home-choice {
  display: grid;
  flex: 1;
  place-items: center;
  min-width: 108px;
  min-height: 145px;
  padding: 13px 9px;
  background: var(--cream-100);
  border: 3px solid transparent;
  border-radius: 48% 52% 26px 26px;
  box-shadow: inset 0 -8px 0 rgba(74,84,61,0.08), 0 6px 0 rgba(46,77,62,0.1);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.home-choice:not(:disabled):hover { transform: translateY(-4px); }
.home-choice.selected { background: #fff0bd; border-color: var(--coral); transform: translateY(-5px); }
.home-choice.is-sounding { box-shadow: 0 0 0 8px rgba(241,189,87,0.25), 0 7px 0 rgba(46,77,62,0.1); }
.path-style-2 { background: #e5f0de; }
.path-style-3 { background: #e9e3ed; }

.path-stone {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: #fff;
  background: var(--forest);
  border-radius: 50% 44% 52% 43%;
}

.path-style-2 .path-stone { background: var(--coral-dark); }
.path-style-3 .path-stone { background: var(--plum); }
.home-choice strong { font-size: 1rem; }
.home-choice small { color: var(--ink-soft); font-size: 0.72rem; font-weight: 700; }
.take-path { justify-self: center; min-width: 230px; }

/* Meadow */

.meadow-screen {
  color: var(--ink);
  background: linear-gradient(180deg, #d9eee6 0%, #c7dda3 100%);
  transition: background 500ms ease;
}

.meadow-screen.mood-moon {
  color: #f9f1df;
  background: linear-gradient(180deg, #454a69 0%, #636082 47%, #435f59 100%);
}

.mood-moon .activity-heading h1 { color: #fff8e9; }
.mood-moon .eyebrow { color: #ffd487; }
.mood-moon .activity-instruction { color: #e8e1ee; }

.mood-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 8px 15px;
  color: var(--forest-dark);
  background: rgba(255,254,245,0.78);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  box-shadow: 0 4px 0 rgba(45,76,63,0.1);
}

.mood-toggle span { font-family: Georgia, serif; font-size: 1.5rem; }

.meadow-stage {
  position: relative;
  width: min(1000px, 100%);
  height: clamp(410px, 54vh, 570px);
  margin: 0 auto;
  background:
    radial-gradient(ellipse at 35% 97%, rgba(84,134,82,0.65) 0 25%, transparent 25.5%),
    radial-gradient(ellipse at 75% 107%, rgba(108,161,95,0.7) 0 34%, transparent 34.5%),
    linear-gradient(#cce9df 0 52%, #a8cb84 52% 100%);
  border: 3px solid rgba(255,255,255,0.5);
  border-radius: 40px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: background 500ms ease;
}

.mood-moon .meadow-stage {
  background:
    radial-gradient(ellipse at 35% 97%, rgba(39,83,71,0.75) 0 25%, transparent 25.5%),
    radial-gradient(ellipse at 75% 107%, rgba(52,99,80,0.78) 0 34%, transparent 34.5%),
    radial-gradient(circle at 82% 13%, #ffe8a4 0 5%, rgba(255,232,164,0.18) 5.5% 13%, transparent 13.5%),
    linear-gradient(#3f4569 0 52%, #466b5e 52% 100%);
}

.meadow-sky i {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  opacity: 0;
}

.mood-moon .meadow-sky i { opacity: 1; }
.meadow-sky i:nth-child(1) { top: 13%; left: 16%; }
.meadow-sky i:nth-child(2) { top: 23%; left: 43%; width: 5px; height: 5px; }
.meadow-sky i:nth-child(3) { top: 10%; left: 63%; width: 6px; height: 6px; }

.flower-pads {
  position: absolute;
  z-index: 3;
  right: 4%;
  bottom: 9%;
  left: 5%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: clamp(10px, 3vw, 34px);
}

.flower-pad {
  display: grid;
  width: clamp(65px, 10vw, 110px);
  height: calc(92px + var(--flower-index) * 13px);
  padding: 0;
  background: transparent;
  place-items: start center;
  transition: transform 130ms ease;
}

.flower-pad::after {
  width: 8px;
  height: 100%;
  content: '';
  background: var(--forest);
  border-radius: 99px;
}

.petals {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(62px, 8vw, 90px);
  aspect-ratio: 1;
  transition: transform 150ms ease;
}

.petals i {
  position: absolute;
  width: 54%;
  height: 54%;
  background: var(--flower-color);
  border: 3px solid rgba(255,255,255,0.48);
  border-radius: 60% 40% 55% 45%;
}

.petals i:nth-child(1) { transform: translateY(-38%); }
.petals i:nth-child(2) { transform: translateX(38%) rotate(90deg); }
.petals i:nth-child(3) { transform: translateY(38%) rotate(180deg); }
.petals i:nth-child(4) { transform: translateX(-38%) rotate(270deg); }
.petals b {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38%;
  aspect-ratio: 1;
  color: var(--ink);
  background: var(--honey);
  border-radius: 50%;
  font-size: 0.88rem;
}

.flower-pad:not(:disabled):hover .petals { transform: scale(1.08) rotate(4deg); }
.flower-pad.is-sounding .petals { transform: scale(1.22) rotate(12deg); filter: brightness(1.08); }
.flower-1 { --flower-index: 0; --flower-color: #ec8978; }
.flower-2 { --flower-index: 1; --flower-color: #74b69b; }
.flower-3 { --flower-index: 2; --flower-color: #d69b62; }
.flower-4 { --flower-index: 3; --flower-color: #9880aa; }
.flower-5 { --flower-index: 4; --flower-color: #e46f78; }

.rhythm-nest {
  position: absolute;
  z-index: 5;
  bottom: 4%;
  left: 3%;
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(255,248,222,0.78);
  border-radius: 22px;
  backdrop-filter: blur(5px);
}

.rhythm-nest button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
  min-height: 50px;
  padding: 7px 11px;
  color: var(--ink);
  background: #fff9e8;
  border: 2px solid rgba(77,81,59,0.1);
  border-radius: 15px;
  font-size: 0.72rem;
}

.rhythm-nest button > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: var(--plum);
  border-radius: 50%;
}

.rhythm-nest button + button > span { color: var(--ink); background: var(--honey); }
.rhythm-nest button.is-sounding { transform: scale(1.06); background: #ffe8b0; }

.meadow-muri {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 14%;
  width: 30%;
  max-height: 72%;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(29,65,53,0.2));
  pointer-events: none;
  transform: scaleX(-1);
}

.pattern-tray {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1000px, 100%);
  min-height: 82px;
  margin: 16px auto 0;
  padding: 12px 14px 12px 20px;
  color: var(--ink);
  background: rgba(255,254,248,0.89);
  border: 2px solid rgba(255,255,255,0.52);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.mini-label { margin-bottom: 6px; color: var(--ink-soft); font-size: 0.7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.pattern-beads { display: flex; align-items: center; gap: 7px; min-height: 21px; }
.pattern-bead { width: 19px; height: 19px; background: var(--bead); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 0 rgba(43,65,55,.15); }
.pattern-bead.color-1 { --bead: #ec8978; }
.pattern-bead.color-2 { --bead: #74b69b; }
.pattern-bead.color-3 { --bead: #d69b62; }
.pattern-bead.color-4 { --bead: #9880aa; }
.pattern-bead.color-5 { --bead: #e46f78; }
.empty-pattern { color: var(--ink-soft); font-size: 0.8rem; font-weight: 600; }
.pattern-actions { display: flex; align-items: center; gap: 8px; }
.tiny-button { min-width: 50px; min-height: 50px; padding: 8px 12px; color: var(--forest-dark); background: #e7eed5; border-radius: 16px; font-size: .82rem; font-weight: 800; }

/* Completion */

.completion-screen {
  display: grid;
  place-items: center;
  background: linear-gradient(165deg, #e5f1d5, #f9e8bb);
}

.completion-card {
  position: relative;
  width: min(720px, 100%);
  padding: 30px clamp(25px, 6vw, 60px) 42px;
  text-align: center;
  background: rgba(255,254,248,.94);
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 46px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.completion-art {
  width: min(360px, 72%);
  height: 230px;
  margin: -10px auto 12px;
  object-fit: contain;
  animation: celebration-pop 600ms cubic-bezier(.2,.8,.2,1);
}

.celebration-leaf {
  position: absolute;
  z-index: 2;
  top: 27px;
  right: 28px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: var(--forest);
  background: var(--honey);
  border: 5px solid #fff9e3;
  border-radius: 50%;
  box-shadow: 0 7px 0 rgba(50,80,62,.12);
}

.completion-card h1 { margin-bottom: 12px; color: var(--forest-dark); font-size: clamp(2.25rem, 6vw, 4.2rem); }
.completion-card > p:not(.eyebrow) { max-width: 520px; margin-right: auto; margin-left: auto; color: var(--ink-soft); font-size: 1rem; font-weight: 620; line-height: 1.5; }
.level-whisper { padding: 10px 15px; background: var(--cream-100); border-radius: 16px; }
.completion-actions { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

/* Dialogs */

.dialog-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(27, 47, 43, 0.56);
  backdrop-filter: blur(9px);
  animation: backdrop-in 180ms ease-out;
}

.dialog-card {
  position: relative;
  width: min(540px, 100%);
  max-height: min(750px, calc(100dvh - 40px));
  padding: clamp(28px, 5vw, 42px);
  background: var(--cream-50);
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 34px;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  animation: dialog-in 220ms cubic-bezier(.2,.8,.2,1);
}

.dialog-card h2 { margin-bottom: 17px; color: var(--forest-dark); font-size: clamp(1.8rem, 5vw, 2.7rem); }
.dialog-card > p:not(.eyebrow) { color: var(--ink-soft); font-weight: 600; line-height: 1.55; }
.dialog-close { position: absolute; top: 15px; right: 15px; width: 48px; height: 48px; color: var(--ink-soft); background: var(--cream-100); border-radius: 50%; font-size: 1.7rem; line-height: 1; }
.range-label { display: flex; justify-content: space-between; margin-top: 25px; font-weight: 800; }
.range-label span { display: flex; gap: 8px; align-items: center; }
.range-label output { color: var(--ink-soft); }

input[type="range"] {
  width: 100%;
  height: 50px;
  margin: 4px 0 12px;
  accent-color: var(--forest);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 20px;
  padding: 15px;
  background: var(--cream-100);
  border-radius: 18px;
}

.switch-row span { display: grid; gap: 3px; }
.switch-row small { color: var(--ink-soft); }
.switch-row input { width: 30px; height: 30px; accent-color: var(--forest); }
.settings-divider { display: flex; align-items: center; gap: 10px; margin: 24px 0 12px; color: var(--coral-dark); font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.settings-divider::before,
.settings-divider::after { height: 2px; content: ''; background: var(--cream-200); flex: 1; }
.chord-mode-setting { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0 0 20px; padding: 0; border: 0; }
.chord-mode-setting legend { grid-column: 1 / -1; margin-bottom: 7px; font-weight: 800; }
.chord-mode-setting label { position: relative; }
.chord-mode-setting input { position: absolute; opacity: 0; }
.chord-mode-setting span { display: grid; place-items: center; min-height: 51px; background: var(--cream-100); border: 3px solid transparent; border-radius: 16px; font-weight: 800; }
.chord-mode-setting input:checked + span { color: var(--forest-dark); border-color: var(--forest); background: #e2efdc; }
.chord-mode-setting input:focus-visible + span { outline: 4px solid #167d88; outline-offset: 3px; }
.text-button { min-height: 48px; padding: 8px; background: transparent; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.danger-soft { color: #854844; }
.grownup-list { display: grid; gap: 10px; padding-left: 22px; color: var(--ink-soft); font-weight: 600; line-height: 1.45; }
.local-data-note { padding: 14px 16px; background: #e7f0df; border-radius: 16px; font-size: .88rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }

.audio-notice {
  position: fixed;
  z-index: 90;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(470px, calc(100vw - 40px));
  padding: 12px 12px 12px 18px;
  color: var(--ink);
  background: #fff7df;
  border: 2px solid rgba(133, 72, 68, 0.22);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.audio-notice span {
  display: grid;
  gap: 2px;
}

.audio-notice small {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 650;
}

.audio-notice button {
  min-height: 48px;
  padding: 9px 14px;
  color: #fff;
  background: var(--forest);
  border-radius: 15px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Animation and responsive */

@keyframes gentle-breathe { 0%,100% { transform: translateY(0) rotate(-.5deg); } 50% { transform: translateY(-7px) rotate(.5deg); } }
@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes note-float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
@keyframes echo-ring { from { transform: translate(-50%,-50%) scale(.72); opacity: 1; } to { transform: translate(-50%,-50%) scale(1.35); opacity: .1; } }
@keyframes story-chord { from { transform: scale(.86); box-shadow: 0 0 0 0 rgba(241,189,87,.4); } 55% { transform: scale(1.16); } to { transform: scale(1); box-shadow: 0 0 0 26px rgba(241,189,87,0); } }
@keyframes chord-pop { 0% { transform: scale(.8) rotate(-5deg); } 55% { transform: scale(1.2) rotate(4deg); } 100% { transform: scale(1); } }
@keyframes guidance-breathe { 0%,100% { opacity: .65; transform: scale(.985); } 50% { opacity: 1; transform: scale(1.015); } }
@keyframes instrument-ripple { from { opacity: .9; transform: scale(.5); } to { opacity: 0; transform: scale(3.2); } }
@keyframes feedback-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes celebration-pop { from { opacity: 0; transform: scale(.82) rotate(-2deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(15px) scale(.97); } }

@media (max-width: 900px) {
  :root { --page: min(100% - 30px, 760px); }
  .hero-card { grid-template-columns: .9fr 1.1fr; padding: 40px; }
  .world-map { height: auto; min-height: 0; padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .map-place { position: relative; inset: auto; width: 100%; min-width: 0; grid-template-columns: 92px 1fr auto; }
  .map-path, .map-muri { display: none; }
  .pitch-game, .echo-game, .home-game { grid-template-columns: minmax(220px,.7fr) minmax(360px,1.3fr); }
  .direction-card { min-width: 90px; }
  .meadow-muri { width: 34%; }
  .adventure-spotlight { grid-template-columns: minmax(280px, .9fr) minmax(330px, 1.1fr); }
  .adventure-spotlight-copy { padding: 28px; }
  .mode-select { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .instrument-mode-card { grid-row: auto; }
  .mode-secondary-grid { grid-row: auto; grid-template-columns: 1fr 1fr; }
  .mode-secondary-grid .mode-card { grid-template-columns: 38% 1fr; }
  .instrument-spotlight { grid-template-columns: minmax(280px, 1fr) minmax(310px, .9fr); }
  .ear-game { grid-template-columns: minmax(220px,.7fr) minmax(360px,1.3fr); }
  .expansion-game { grid-template-columns: minmax(220px,.7fr) minmax(360px,1.3fr); }
  .chord-surface.mode-7 { grid-template-columns: repeat(4, 1fr); }
  .quick-paths { grid-template-columns: repeat(3, 1fr); }
  .quick-path { grid-template-rows: 170px auto; min-height: 260px; }
  .quick-picture { min-height: 170px; }
}

@media (min-width: 701px) and (max-width: 900px) and (orientation: portrait) {
  .story-card { display: flex; flex-direction: column; min-height: 0; }
  .story-art { width: 100%; min-height: 0; height: clamp(360px, 52vw, 430px); }
  .story-panel { padding: 30px 36px 34px; }
}

@media (min-width: 701px) and (max-height: 600px) {
  .mode-select-screen { padding: 10px 18px; }
  .mode-select { grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); grid-template-rows: auto minmax(250px, 1fr); gap: 10px; width: min(920px, 100%); padding: 13px; border-radius: 30px; }
  .mode-select-heading { display: flex; align-items: baseline; justify-content: center; gap: 16px; }
  .mode-select-heading .eyebrow { margin: 0; }
  .mode-select-heading h1 { margin: 0; font-size: 2.1rem; }
  .mode-select-heading > p:last-child { display: none; }
  .instrument-mode-card { grid-row: 2; min-height: 250px; border-radius: 25px; }
  .mode-secondary-grid { grid-row: 2; grid-template-columns: 1fr; gap: 10px; }
  .mode-secondary-grid .mode-card { grid-template-columns: 38% 1fr; min-height: 120px; border-radius: 23px; }
  .mode-secondary-grid .mode-picture,
  .mode-symbols { min-height: 120px; height: 120px; }
  .mode-copy { padding: 13px; }
  .mode-play { right: 12px; bottom: 12px; width: 42px; height: 42px; }
  .story-heading { margin-bottom: 7px; }
  .story-heading h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
  .story-card { min-height: 0; }
  .story-art { min-height: 290px; }
  .story-panel { padding: 20px 24px; }
  .story-text { margin-bottom: 14px; font-size: .9rem; line-height: 1.4; }
  .story-branch, .story-path { min-height: 118px; }
  .story-feedback { min-height: 28px; margin-top: 12px; }
  .instrument-stage { height: 210px; min-height: 210px; }
  .instrument-papa { width: 29%; }
  .instrument-nel { width: 20%; }
  .chord-surface.mode-7 { grid-template-columns: repeat(7, 1fr); }
  .chord-pad { min-height: 94px; }
}

@media (min-width: 701px) and (max-height: 780px) {
  .hero-card {
    min-height: calc(100dvh - 70px);
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 6vw, 4.7rem);
  }

  .hero-art {
    min-height: 350px;
  }

  .world-map {
    height: 460px;
    min-height: 460px;
  }
}

@media (max-width: 700px) {
  :root { --page: calc(100vw - 24px); }
  .topbar { height: 72px; }
  .round-button { width: 48px; height: 48px; padding: 13px; }
  .brand-mark span:last-child { display: none; }
  .hero-card { display: flex; flex-direction: column-reverse; justify-content: center; min-height: calc(100dvh - 82px); padding: 30px 24px 34px; text-align: center; }
  .hero-copy { display: grid; justify-items: center; }
  .hero-copy h1 { margin-bottom: 15px; font-size: clamp(2.6rem, 13vw, 4.3rem); }
  .hero-intro { margin-bottom: 22px; font-size: .96rem; }
  .hero-art { width: 100%; min-height: 240px; max-height: 33vh; }
  .hero-art > img { right: 50%; width: min(360px, 94%); transform: translateX(50%); animation: mobile-breathe 4.5s ease-in-out infinite; }
  .sun-halo { right: 50%; width: min(270px, 72%); transform: translateX(50%); animation: none; }
  .floating-note { transform: scale(.82); }
  .note-one { left: 8%; }
  .note-three { right: 9%; }
  .grownup-link { top: 14px; right: 14px; min-height: 42px; }
  .privacy-note { bottom: 8px; font-size: .68rem; }
  .map-screen, .activity-screen, .completion-screen, .meadow-screen, .story-screen, .instrument-screen { min-height: calc(100dvh - 72px); padding: 5px 12px 34px; }
  .mode-select-screen { align-items: start; padding: 66px 12px 38px; overflow: auto; }
  .mode-select { display: grid; gap: 12px; margin: 0 auto; padding: 18px 12px; border-radius: 30px; }
  .mode-select-heading h1 { font-size: 2.25rem; }
  .mode-select-heading > p:last-child { font-size: .78rem; }
  .instrument-mode-card { grid-template-columns: 48% 1fr; min-height: 210px; border-radius: 25px; }
  .mode-secondary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mode-secondary-grid .mode-card { display: flex; flex-direction: column; min-height: 185px; border-radius: 23px; }
  .mode-secondary-grid .mode-picture,
  .mode-symbols { width: 100%; min-height: 98px; height: 98px; }
  .mode-symbols { grid-template-columns: repeat(3,1fr); padding: 10px; }
  .mode-copy { padding: 14px 12px; }
  .mode-copy strong { font-size: 1.18rem; }
  .mode-copy small { font-size: .61rem; }
  .mode-play { right: 12px; bottom: 12px; width: 42px; height: 42px; }
  .map-heading, .activity-heading, .story-heading { align-items: flex-start; margin-bottom: 12px; }
  .map-heading h1, .activity-heading h1, .story-heading h1 { font-size: clamp(1.8rem, 8.5vw, 2.7rem); }
  .map-heading p:not(.eyebrow) { font-size: .86rem; }
  .journey-leaves { grid-template-columns: 34px auto; min-width: 112px; padding: 8px; border-radius: 17px; }
  .leaf-badge { width: 31px; height: 31px; border-radius: 11px; }
  .journey-leaves > span:last-child { display: none; }
  .world-map { width: 100%; padding: 12px; gap: 12px; border-radius: 30px; }
  .map-place { display: flex; flex-direction: column; min-height: 210px; padding: 9px; text-align: center; border-radius: 23px; }
  .place-picture { width: 100%; height: 119px; border-radius: 18px; }
  .place-copy { gap: 2px; padding: 5px 2px 0; }
  .place-copy small { font-size: .69rem; }
  .place-level { position: absolute; right: 9px; bottom: 9px; flex-direction: row; padding: 0; }
  .free-mark { font-size: 1.3rem; }
  .map-gentle-note { width: 100%; font-size: .74rem; }
  .hero-actions { width: 100%; flex-direction: column; }
  .hero-actions > button { width: 100%; }
  .adventure-spotlight { grid-template-columns: 1fr; width: 100%; min-height: 0; margin-bottom: 22px; border-radius: 30px; }
  .adventure-spotlight-art { min-height: 0; height: 230px; }
  .adventure-spotlight-copy { align-items: stretch; padding: 23px; }
  .adventure-spotlight-copy h2 { font-size: 2rem; }
  .adventure-spotlight-copy .primary-button { width: 100%; }
  .instrument-spotlight { grid-template-columns: 1fr; width: 100%; min-height: 0; border-radius: 30px; }
  .instrument-spotlight-art { min-height: 0; height: 230px; }
  .instrument-spotlight-copy { align-items: stretch; padding: 23px; }
  .instrument-spotlight-copy h2 { font-size: 2rem; }
  .quick-paths { grid-template-columns: 1fr 1fr; width: 100%; gap: 10px; }
  .quick-path { grid-template-rows: 126px auto; min-height: 214px; border-radius: 25px; }
  .quick-path:first-child { grid-column: 1 / -1; grid-template-columns: 48% 1fr; grid-template-rows: 196px; }
  .quick-picture { min-height: 126px; }
  .quick-path:first-child .quick-picture { min-height: 196px; }
  .quick-copy { padding: 13px 48px 15px 13px; }
  .quick-path:first-child .quick-copy { align-content: center; padding: 18px 58px 18px 18px; }
  .quick-copy small { font-size: .62rem; }
  .quick-copy strong { font-size: 1.05rem; }
  .quick-path:first-child .quick-copy strong { font-size: 1.45rem; }
  .quick-play { right: 11px; bottom: 12px; width: 39px; height: 39px; border-radius: 14px; }
  .discover-section { width: 100%; padding: 14px 10px; border-radius: 29px; }
  .discover-heading { padding: 0 4px; }
  .learning-group > summary { grid-template-columns: 52px 1fr auto; min-height: 72px; gap: 10px; padding: 9px; border-radius: 21px; }
  .group-symbol { width: 52px; height: 52px; border-radius: 17px; }
  .learning-group > summary > i { width: 40px; height: 40px; }
  .learning-group > .learning-grid { padding-top: 10px; }
  .discover-section .place-copy small { display: none; }
  .discover-section .learning-grid .map-place { min-height: 176px; }
  .discover-section .place-picture { height: 100px; }
  .instrument-heading { position: relative; align-items: flex-start; flex-direction: column; gap: 9px; }
  .instrument-heading h1 { font-size: 2.15rem; }
  .instrument-options { position: absolute; top: 0; right: 0; }
  .instrument-options .instrument-tools { width: min(330px, calc(100vw - 24px)); max-width: none; }
  .tool-toggle { flex: 1; min-width: 0; min-height: 49px; padding: 5px; border-radius: 15px; }
  .tool-toggle > span:last-child { font-size: .6rem; }
  .instrument-stage { height: clamp(245px, 39vh, 330px); min-height: 245px; border-radius: 29px; }
  .instrument-papa { right: 2%; width: 45%; }
  .instrument-nel { left: 21%; width: 31%; }
  .moment-badge { top: 10px; left: 10px; width: 52px; height: 52px; border-width: 3px; }
  .moment-badge span { font-size: 1.4rem; }
  .moment-copy { right: 10px; bottom: 9px; max-width: 64%; padding: 8px 11px; }
  .moment-copy span { font-size: .66rem; }
  .instrument-tutorial { grid-template-columns: auto 1fr; gap: 8px; }
  .instrument-tutorial button { grid-column: 1 / -1; min-height: 38px; }
  .creative-goal { grid-template-columns: auto 1fr; gap: 8px; }
  .creative-goal button { grid-column: 1 / -1; min-height: 42px; }
  .chord-surface { gap: 8px; }
  .chord-surface.mode-4 { grid-template-columns: repeat(2, 1fr); }
  .chord-surface.mode-7 { grid-template-columns: repeat(4, 1fr); }
  .chord-pad { min-height: 92px; padding: 8px 4px; border-radius: 19px; }
  .chord-symbol { width: 40px; height: 40px; border-radius: 13px; font-size: 1.15rem; }
  .chord-pad strong { margin-top: 4px; font-size: .76rem; }
  .chord-pad small { font-size: .57rem; }
  .chord-pad.is-recommended::after { inset: -5px; border-width: 3px; border-radius: 23px; }
  .practice-heading { align-items: flex-end; width: 100%; gap: 12px; }
  .practice-heading > p { max-width: 48%; font-size: .72rem; }
  .learning-zone { width: 100%; margin-bottom: 23px; padding: 15px 12px; border-radius: 30px; }
  .learning-zone-heading { align-items: start; flex-direction: column; gap: 6px; }
  .learning-zone-heading > p { text-align: left; font-size: .75rem; }
  .learning-grid { gap: 10px; }
  .learning-grid.three-grid { grid-template-columns: repeat(3,1fr); }
  .learning-grid .map-place { min-height: 205px; }
  .story-card { display: flex; flex-direction: column; min-height: 0; border-radius: 29px; }
  .story-art { width: 100%; min-height: 0; height: clamp(230px, 34vh, 330px); }
  .story-panel { padding: 21px 18px 18px; }
  .story-text { margin-bottom: 17px; font-size: .92rem; line-height: 1.45; }
  .story-progress { gap: 4px; padding: 8px 9px; }
  .story-progress i { width: 10px; height: 10px; border-width: 1px; }
  .story-chord-pulse { width: 52px; height: 52px; border-width: 4px; font-size: 1.25rem; }
  .story-branches, .story-paths { gap: 8px; }
  .story-branch, .story-path { min-height: 125px; padding: 9px 5px; border-width: 2px; border-radius: 21px; }
  .branch-symbol, .path-mark { width: 48px; height: 48px; font-size: 1.45rem; }
  .story-branch small, .story-path small { display: none; }
  .story-action-row { gap: 8px; }
  .story-main-action { width: 100%; }
  .story-feedback { min-height: 32px; margin-top: 13px; font-size: .78rem; }
  .activity-heading .eyebrow { margin-bottom: 5px; font-size: .67rem; }
  .activity-instruction { margin-bottom: 11px; padding: 0 3px; font-size: .85rem; }
  .round-progress { gap: 4px; padding: 8px 9px; }
  .round-progress i { width: 10px; height: 10px; border-width: 1px; }
  .game-card { min-height: 0; padding: 12px 12px 17px; border-radius: 28px; }
  .pitch-game, .echo-game, .home-game { display: flex; flex-direction: column; gap: 10px; }
  .ear-game { display: flex; flex-direction: column; gap: 10px; }
  .expansion-game { display: flex; flex-direction: column; gap: 10px; }
  .pitch-scene, .echo-scene, .home-scene { width: 100%; min-height: 0; height: clamp(150px, 26vh, 220px); border-radius: 22px; }
  .ear-scene { order: -2; width: 100%; min-height: 0; height: clamp(160px, 27vh, 225px); border-radius: 22px; }
  .expansion-scene { order: -2; width: 100%; min-height: 0; height: clamp(160px,27vh,225px); border-radius: 22px; }
  .expansion-listen-pulse { width: 50px; height: 50px; border-width: 4px; font-size: 1.15rem; }
  .expansion-toolbar { order: -1; gap: 7px; }
  .sound-invitation { min-height: 48px; font-size: .68rem; }
  .response-choice-grid, .missing-choice-grid, .chord-path-grid, .memory-grid { gap: 7px; }
  .response-choice, .missing-choice, .chord-path-choice, .memory-card { min-height: 124px; padding: 8px 5px; border-width: 2px; border-radius: 19px; }
  .response-choice > span, .chord-path-choice > span, .memory-card > span { width: 48px; height: 48px; font-size: 1.1rem; }
  .response-choice strong, .chord-path-choice strong { font-size: .76rem; }
  .response-choice small, .chord-path-choice small { display: none; }
  .star-track { height: 68px; }
  .chord-path-grid { grid-template-columns: repeat(2,1fr); }
  .expansion-confirm { width: 100%; min-width: 0; }
  .expansion-game > .feedback-line { width: 100%; }
  .ear-listen-row { order: -1; align-self: center; }
  .ear-listen-pulse { width: 50px; height: 50px; border-width: 4px; font-size: 1.15rem; }
  .ear-choice-grid { gap: 7px; }
  .ear-choice { min-height: 125px; padding: 8px 5px; border-width: 2px; border-radius: 19px; }
  .ear-choice strong { font-size: .78rem; }
  .ear-choice small { display: none; }
  .ear-choice em { font-size: .57rem; }
  .contour-choice svg { min-height: 72px; }
  .mode-choice > span { width: 49px; height: 49px; font-size: 1.45rem; }
  .interval-picture { width: 76px; transform: scale(.78); }
  .interval-picture::before { width: 74px; }
  .ear-theory { align-self: center; font-size: .68rem; }
  .rhythm-mode-card { padding: 12px; border-radius: 28px; }
  .rhythm-mode-card > img { height: 190px; border-radius: 21px; }
  .rhythm-mode-grid { gap: 9px; margin-top: 10px; }
  .rhythm-mode-grid button { min-height: 160px; padding: 10px 7px; border-width: 2px; border-radius: 21px; }
  .rhythm-mode-grid span { font-size: .95rem; }
  .rhythm-mode-grid strong { font-size: .92rem; }
  .rhythm-mode-grid small { font-size: .68rem; }
  .rhythm-distinction { font-size: .7rem; }
  .rhythm-toolbar { gap: 7px; }
  .rhythm-toolbar > strong { font-size: .7rem; }
  .rhythm-tap-pad { width: min(220px, 80%); min-height: 170px; }
  .rhythm-game > .feedback-line,
  .ear-game > .feedback-line { width: 100%; }
  .pitch-game > .listen-button, .home-game > .listen-button { align-self: center; }
  .pitch-choices { width: 100%; gap: 7px; }
  .direction-card { min-width: 0; min-height: 132px; padding: 8px 5px; border-width: 2px; border-radius: 19px; }
  .direction-icon { width: 50px; height: 50px; border-radius: 18px; font-size: 1.75rem; }
  .direction-card strong { font-size: .9rem; }
  .direction-card small { display: none; }
  .feedback-line { min-height: 20px; margin-top: 4px; font-size: .78rem; }
  .echo-toolbar { width: 100%; }
  .sound-stones { width: 100%; min-height: 190px; padding: 14px 9px; border-radius: 21px; }
  .sound-stone { min-width: 45px; height: calc(82px + var(--stone-index) * 12px); border-width: 3px; }
  .home-choices { width: 100%; gap: 7px; }
  .home-choice { min-width: 0; min-height: 118px; padding: 8px 4px; border-width: 2px; }
  .path-stone { width: 48px; height: 48px; }
  .home-choice small { display: none; }
  .take-path { min-width: 210px; min-height: 54px; }
  .meadow-stage { height: clamp(350px, 51vh, 440px); border-radius: 28px; }
  .flower-pads { right: 2%; bottom: 8%; left: 2%; gap: 2px; }
  .flower-pad { width: 19%; height: calc(82px + var(--flower-index) * 9px); }
  .petals { width: min(15vw, 74px); }
  .rhythm-nest { top: 12px; bottom: auto; left: 12px; grid-template-columns: 1fr 1fr; }
  .rhythm-nest button { min-width: 0; min-height: 45px; }
  .rhythm-nest button strong { display: none; }
  .meadow-muri { right: 5%; bottom: 22%; width: 46%; max-height: 52%; }
  .pattern-tray { align-items: stretch; padding: 10px 11px; border-radius: 20px; }
  .pattern-tray > div:first-child { min-width: 0; }
  .pattern-beads { gap: 4px; flex-wrap: wrap; }
  .pattern-bead { width: 15px; height: 15px; }
  .pattern-actions .listen-button span { display: none; }
  .pattern-actions .listen-button { width: 52px; padding: 10px; }
  .completion-card { padding-top: 20px; border-radius: 32px; }
  .completion-art { height: 190px; }
  .celebration-leaf { top: 18px; right: 18px; width: 51px; height: 51px; }
  .completion-actions { flex-direction: column-reverse; }
  .dialog-card { padding: 33px 23px 25px; border-radius: 26px; }
  .dialog-actions { flex-direction: column; }
  .audio-notice { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; max-width: none; }
}

@media (max-width: 390px) {
  .hero-art { min-height: 205px; }
  .hero-copy h1 { font-size: 2.65rem; }
  .start-button { min-height: 63px; font-size: 1rem; }
  .map-place { min-height: 192px; }
  .place-picture { height: 105px; }
  .place-copy strong { font-size: .91rem; }
  .activity-instruction { line-height: 1.3; }
  .echo-input { gap: 4px; padding: 7px 8px; }
  .echo-bead { width: 13px; height: 13px; }
  .listen-button { min-height: 48px; padding: 9px 12px; font-size: .8rem; }
  .sound-stones { min-height: 165px; }
  .sound-stone { height: calc(67px + var(--stone-index) * 10px); }
  .meadow-stage { height: 360px; }
  .pattern-tray { gap: 8px; }
  .adventure-spotlight-art { height: 205px; }
  .story-art { height: 215px; }
  .story-panel { padding: 17px 14px 15px; }
  .story-branch, .story-path { min-height: 112px; }
  .branch-symbol, .path-mark { width: 43px; height: 43px; }
  .mode-select-heading h1 { font-size: 1.95rem; }
  .instrument-mode-card { min-height: 185px; }
  .mode-secondary-grid .mode-card { min-height: 168px; }
  .mode-secondary-grid .mode-picture,
  .mode-symbols { height: 82px; min-height: 82px; }
  .instrument-stage { height: 230px; min-height: 230px; }
  .chord-surface.mode-7 { grid-template-columns: repeat(3, 1fr); }
  .learning-grid .map-place { min-height: 186px; }
  .learning-grid.three-grid { grid-template-columns: 1fr 1fr; }
  .learning-grid .place-picture { height: 99px; }
  .interval-choice-grid { grid-template-columns: repeat(2, 1fr); }
  .rhythm-mode-grid button { min-height: 148px; }
}

@media (max-width: 700px) and (orientation: landscape) {
  .instrument-heading { flex-direction: row; }
  .instrument-stage { height: 250px; min-height: 250px; }
  .chord-surface.mode-4 { grid-template-columns: repeat(4, 1fr); }
  .chord-surface.mode-7 { grid-template-columns: repeat(7, 1fr); }
  .chord-pad { min-height: 84px; }
}

@keyframes mobile-breathe {
  0%,100% { transform: translateX(50%) translateY(0); }
  50% { transform: translateX(50%) translateY(-5px); }
}

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

.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

@media (forced-colors: active) {
  button { border: 2px solid ButtonText; }
  .round-progress i, .echo-bead, .pattern-bead, .place-level i { border: 2px solid CanvasText; }
  .story-progress i, .story-branch, .story-path { border: 2px solid CanvasText; }
  .chord-pad, .tool-toggle, .mode-card { border: 2px solid ButtonText; }
  .ear-choice, .rhythm-mode-grid button, .rhythm-tap-pad, .response-choice, .missing-choice, .memory-card, .chord-path-choice { border: 2px solid ButtonText; }
}

@media (min-width: 1200px) and (min-height: 850px) {
  .game-card { min-height: 590px; }
  .pitch-scene, .echo-scene, .home-scene { min-height: 530px; }
  .ear-scene { min-height: 530px; }
  .expansion-scene { min-height: 530px; }
}
