@font-face{font-family:Fredoka;src:url('/assets/fredoka.woff2') format('woff2');font-weight:300 700;font-display:swap}
@font-face{font-family:DM Sans;src:url('/assets/dm-sans.woff2') format('woff2');font-weight:100 1000;font-display:swap}

:root {
  color-scheme: dark;
  --space: #16122b;
  --ink: #fff9fc;
  --muted: #d1c6e6;
  --yellow: #ffc96c;
  --green: #a9efd9;
  --line: #61527d;
  --display: Fredoka, 'Trebuchet MS', sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--space);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100svh; background: radial-gradient(ellipse at 50% 62%, #231838 0, var(--space) 75%); }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 3px solid #fff2ad; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 600; }
h1:focus { outline: none; }
.page { width: min(1136px, calc(100% - 72px)); margin-inline: auto; padding-bottom: 30px; }
.topbar { min-height: 91px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .top-pill, .text-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.brand { border: 0; background: transparent; padding: 0; font: 600 clamp(1.25rem, 2.5vw, 1.7rem)/1 var(--display); white-space: nowrap; }
.brand-accent { color: #dbbef9; }
.brand-mark { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid #8c73ab; border-radius: 15px; background: #382852; transform: rotate(-8deg); flex: none; }
.brand-mark::before { content: ''; width: 20px; height: 20px; border-radius: 50%; box-shadow: -5px 4px 0 0 #ffd388; position: absolute; top: 8px; left: 13px; }
.brand-mark span, .tiny-star { background: #ffd388; width: 10px; height: 10px; clip-path: polygon(50% 0, 63% 38%, 100% 50%, 63% 62%, 50% 100%, 37% 62%, 0 50%, 37% 38%); display: inline-block; flex: none; }
.brand-mark span { position: absolute; top: 9px; left: 22px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-pill, .text-button { padding: 7px 13px; border: 1px solid #514465; border-radius: 15px; background: #261d3b; font-size: .94rem; font-weight: 700; }
.garden-total { color: var(--green); background: #36334e; border-radius: 8px; padding: 3px 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sound-button, .replay { min-width: 46px; padding-inline: 0; }
.sound-button[aria-pressed='false'] { color: #a398b9; }
.icon, .home-icon { position: relative; display: inline-block; width: 21px; height: 21px; flex: none; }
.sprout-icon { color: #a9efd9; background: linear-gradient(currentColor, currentColor) center bottom 2px / 2px 10px no-repeat; }
.sprout-icon::before, .sprout-icon::after { content: ''; position: absolute; width: 9px; height: 7px; background: currentColor; }
.sprout-icon::before { left: 1px; top: 7px; border-radius: 2px 7px; transform: rotate(13deg); }
.sprout-icon::after { right: 1px; top: 3px; border-radius: 7px 2px; transform: rotate(-18deg); }
.sound-icon::before, .sound-icon::after { content: ''; position: absolute; }
.sound-icon::before { inset: 3px 8px 3px 0; background: currentColor; clip-path: polygon(0 31%, 35% 31%, 83% 0, 100% 0, 100% 100%, 83% 100%, 35% 69%, 0 69%); }
.sound-icon::after { right: 0; top: 4px; width: 9px; height: 13px; border-right: 2px solid; border-radius: 50%; box-shadow: inset -3px 0 #261d3b, inset -5px 0 currentColor; }
.sound-button[aria-pressed='false'] .sound-icon::after { right: 2px; top: 5px; width: 2px; height: 12px; border: 0; border-radius: 1px; background: currentColor; box-shadow: none; transform: rotate(35deg); }
.home-icon { background: currentColor; width: 16px; height: 16px; clip-path: polygon(50% 0, 100% 43%, 88% 54%, 88% 100%, 60% 100%, 60% 65%, 40% 65%, 40% 100%, 12% 100%, 12% 54%, 0 43%); }

.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 440px; border: 1px solid #655180; border-radius: 32px; background: #251940; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 78%; height: 100%; object-fit: cover; object-position: center 54%; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #251940 13%, #251940 23%, #251940e8 32%, #2519406e 51%, transparent 70%); pointer-events: none; }
.hero-copy { max-width: 49%; padding: 40px 0 43px clamp(27px, 5vw, 60px); }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: #e7ccff; font-weight: 700; font-size: .86rem; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { font-size: clamp(3.2rem, 7vw, 6.2rem); line-height: .91; letter-spacing: -.045em; }
.hero h1 span { color: var(--yellow); }
.hero-description { max-width: 315px; margin: 19px 0 25px; color: #ebe0f6; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.52; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 57px; padding: 10px 25px; border: 1px solid #ffe4a7; border-radius: 16px; background: var(--yellow); color: #2e1d35; box-shadow: 0 5px 0 #b47943; font: 600 1.35rem/1.15 var(--display); transition: transform 140ms ease; }
.primary:active { transform: translateY(4px); }
.play-icon { display: inline-block; width: 13px; height: 15px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); flex: none; }

.missions { margin-top: 33px; }
.missions h2 { margin-bottom: 14px; font-size: clamp(1.65rem, 3vw, 2.08rem); }
.mission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mission { min-width: 0; min-height: 110px; display: flex; align-items: center; gap: 14px; padding: 13px; text-align: left; border: 1px solid var(--card-line); border-radius: 22px; background: var(--card); transition: transform 150ms ease, border-color 150ms ease; }
.colors { --card: #321f45; --card-line: #674c81; --accent: #e9baff; --tile: #4a2a65; }
.shapes { --card: #202a45; --card-line: #475c81; --accent: #bbe6ff; --tile: #2c4367; }
.counts { --card: #202d3c; --card-line: #486870; --accent: #a9efd9; --tile: #284654; }
.mission-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.mission-copy strong { font: 600 clamp(1.25rem, 2.5vw, 1.65rem)/1 var(--display); }
.mission-copy small { color: var(--muted); font-size: .88rem; line-height: 1.2; }
.mission-art { position: relative; display: block; width: 70px; height: 70px; flex: none; border: 1px solid var(--card-line); border-radius: 17px; background: var(--tile); }
.mission-art i { position: absolute; display: grid; place-items: center; font-style: normal; }
.orbs i { width: 25px; height: 25px; border: 1px solid #ffffff70; border-radius: 50%; box-shadow: 0 4px 0 #16122b65, inset 3px 4px #ffffff38; }
.orbs i:nth-child(1) { top: 15px; left: 15px; background: #f58ebd; }
.orbs i:nth-child(2) { top: 24px; left: 33px; background: #ab94f9; }
.orbs i:nth-child(3) { top: 33px; left: 12px; background: #ffc96c; }
.blocks i:nth-child(1) { width: 22px; height: 22px; left: 13px; top: 14px; border-radius: 5px; transform: rotate(-14deg); background: #b4a2f9; box-shadow: inset 2px 3px #ffffff4a; }
.blocks i:nth-child(2) { width: 24px; height: 24px; left: 35px; top: 20px; border-radius: 50%; background: #8fdcf2; box-shadow: inset 3px 3px #ffffff4a; }
.blocks i:nth-child(3) { width: 27px; height: 26px; left: 19px; top: 35px; transform: rotate(15deg); background: #ffd083; clip-path: polygon(50% 0, 100% 93%, 0 93%); }
.numbers i { width: 23px; height: 23px; border: 1px solid #ffffff73; border-radius: 50%; color: #1e283d; box-shadow: 0 3px #16122b85; font: 600 .94rem/1 var(--display); }
.numbers i:nth-child(1) { left: 10px; top: 15px; background: #a9efd9; transform: rotate(-14deg); }
.numbers i:nth-child(2) { left: 34px; top: 14px; background: #b9e5ff; transform: rotate(14deg); }
.numbers i:nth-child(3) { left: 23px; top: 38px; background: #ffd083; }
.mission-play { display: grid; place-items: center; width: 33px; height: 33px; flex: none; border-radius: 50%; background: var(--tile); color: var(--accent); }
.mission-play .play-icon { width: 8px; height: 10px; margin-left: 2px; }

.screen-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin-bottom: 10px; }
.screen-title { font: 600 clamp(1.15rem, 3.1vw, 1.5rem)/1 var(--display); }
.round-progress { display: flex; gap: 5px; }
.progress-seed { width: 12px; height: 12px; border: 1px solid #a692bd; border-radius: 50% 50% 50% 15%; transform: rotate(-25deg); background: #35274b; }
.progress-seed[data-state='planted'] { background: #a8efd3; border-color: #a8efd3; }
.progress-seed[data-state='current'] { border-color: var(--yellow); background: #6c4b59; }
.play-panel, .end-panel, .garden-panel { text-align: center; background: radial-gradient(ellipse at 50% 22%, #4c356a, #241b3a 70%); border: 1px solid #655180; border-radius: 30px; }
.play-panel { padding: clamp(18px, 3.5vw, 41px) 14px 18px; }
.prompt-row { display: flex; align-items: center; justify-content: center; gap: 12px; }
.prompt-row h1, .end-panel h1, .garden-panel h1 { font-size: clamp(2rem, 5.6vw, 3.8rem); line-height: 1; }
.replay { flex: none; }
.target { width: min(365px, 100%); margin: 19px auto 21px; min-height: clamp(105px, 22vh, 165px); border-radius: 24px; border: 1px dashed #9c81ba; background: #221833b0; display: flex; align-items: center; justify-content: center; gap: clamp(5px, 2vw, 14px); padding: 10px; }
.choices { display: flex; justify-content: center; gap: clamp(8px, 2vw, 20px); }
.choice { width: clamp(74px, 21vw, 145px); min-height: clamp(85px, 17vh, 125px); padding: 6px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 2px solid #84709d; border-radius: 20px; background: #443256; box-shadow: 0 5px 0 #191127; transition: transform 145ms ease, background-color 145ms, opacity 145ms; }
.choice:active { transform: translateY(3px); }
.choice[data-state='tried'] { opacity: .43; }
.choice[data-state='correct'], .choice[data-state='hint'] { border-color: #a9efd9; background: #2f5258; }
.choice[data-state='correct'] .symbol { animation: found 390ms ease both; }
.symbol { width: clamp(48px, 11vw, 80px); aspect-ratio: 1; display: block; flex: none; }
.target .symbol:not(.star) { width: clamp(73px, 15vw, 112px); }
.orb { border-radius: 50%; border: 2px solid #ffffff70; background: radial-gradient(circle at 31% 25%, #ffffffb8 0 6%, transparent 7%), radial-gradient(circle at 30% 24%, #ffffff69, transparent 54%), var(--symbol-color); box-shadow: inset -5px -9px #1c15343b, 0 5px 0 #1c153482; }
.shape { background: var(--symbol-color, #bba3ff); }
.shape[data-shape='circle'] { border-radius: 50%; }
.shape[data-shape='square'] { border-radius: 13%; }
.shape[data-shape='triangle'] { clip-path: polygon(50% 3%, 100% 93%, 0 93%); }
.shape[data-shape='diamond'] { clip-path: polygon(50% 1%, 97% 50%, 50% 99%, 3% 50%); }
.star { width: clamp(29px, 9.2vw, 53px); background: var(--yellow); clip-path: polygon(50% 1%, 65% 34%, 100% 38%, 74% 63%, 80% 98%, 50% 82%, 20% 98%, 26% 63%, 0 38%, 35% 34%); }
.digit { color: #ffe2a3; font: 600 clamp(2.5rem, 7vw, 4rem)/.9 var(--display); }
.dots { display: flex; justify-content: center; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #ffe2a3; }
.feedback-row { min-height: 86px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 17px; padding-top: 10px; }
.feedback { font-weight: 700; color: #e3d5ef; }
.feedback[data-state='correct'] { color: var(--green); }
.next-button { min-height: 47px; padding-inline: 16px; font-size: 1.15rem; }
.next-button .play-icon { width: 10px; height: 12px; }
.end-panel, .garden-panel { padding: 35px 16px 42px; }
.end-panel p, .garden-panel p { margin-top: 14px; color: var(--muted); font-size: 1.05rem; }
.end-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: 26px; }
.end-plant { --plant: #b9f7d9; width: 104px; height: 104px; position: relative; margin: 0 auto 19px; border: 1px solid #8a77a3; border-radius: 33px; background: radial-gradient(ellipse at center, #5b537b, #3c2a59); animation: found 390ms ease both; }
.end-plant::before, .plant::before { content: ''; position: absolute; inset: 15% 46% 17%; background: var(--plant); border-radius: 50% 50% 15% 15%; }
.end-plant::after, .plant::after { content: ''; position: absolute; width: 43%; height: 26%; top: 35%; left: 10%; border-radius: 3px 90% 4px 90%; background: var(--plant); transform: rotate(14deg); box-shadow: 38px -14px 0 -2px var(--plant); }
.garden-beds { display: grid; gap: 12px; width: min(700px, 100%); margin: 24px auto 0; }
.garden-bed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 15px; border: 1px solid var(--card-line); border-radius: 18px; background: var(--card); }
.garden-bed h2 { font-size: 1.35rem; }
.plant-row { display: flex; gap: clamp(5px, 2vw, 13px); }
.plant { --plant: var(--accent); width: clamp(33px, 9vw, 58px); aspect-ratio: 1; position: relative; border: 1px dashed var(--card-line); border-radius: 12px; background: var(--tile); }
.plant::before, .plant::after { content: none; }
.plant[data-grown] { border-style: solid; }
.plant[data-grown]::before, .plant[data-grown]::after { content: ''; }
.plant[data-grown]::after { box-shadow: none; width: 36%; left: 14%; height: 20%; filter: drop-shadow(clamp(11px, 3vw, 19px) -5px 0 var(--plant)); }
@keyframes found { 45% { transform: scale(1.13); } }

@media (hover: hover) {
  .top-pill:hover, .text-button:hover { border-color: #a990c6; }
  .primary:hover { background: #ffdc93; }
  .mission:hover { border-color: var(--accent); transform: translateY(-3px); }
  .choice:hover:not([aria-disabled='true']) { border-color: #dcc5f5; background: #56406e; }
}
@media (max-width: 970px) {
  .mission { gap: 9px; padding: 10px; }
  .mission-art { width: 65px; height: 65px; }
  .mission-play { display: none; }
}
@media (max-width: 680px) {
  .page { width: calc(100% - 32px); }
  .topbar { min-height: 72px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; }
  .brand-mark::before { top: 5px; left: 10px; }
  .brand-mark span { top: 6px; left: 19px; }
  .top-actions { gap: 6px; }
  .top-pill { padding-inline: 8px; min-height: 43px; }
  .sound-button, .replay { min-width: 43px; }
  .garden-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .hero { display: block; min-height: 0; border-radius: 24px; }
  .hero-art { width: 100%; height: 245px; object-position: 68% 53%; }
  .hero::after { background: linear-gradient(0deg, #251940 0, #251940 30%, #251940ee 43%, transparent 64%); }
  .hero-copy { max-width: none; padding: 155px 21px 23px; }
  .eyebrow { font-size: .76rem; margin-bottom: 10px; }
  .hero h1 { font-size: clamp(2.55rem, 10vw, 4.4rem); }
  .hero-description { margin: 13px 0 15px; }
  .primary { min-height: 52px; }
  .next-button { min-height: 46px; }
  .missions { margin-top: 24px; }
  .mission-grid { grid-template-columns: 1fr; gap: 9px; }
  .mission { min-height: 81px; gap: 13px; border-radius: 18px; }
  .mission-art { width: 60px; height: 60px; }
  .mission-art i { scale: .88; margin: -1px 0 0 -3px; }
  .mission-play { display: grid; }
  .screen-top { margin-bottom: 8px; }
  .garden-bed { justify-content: center; }
}
@media (max-width: 355px) {
  .brand { gap: 5px; font-size: 1.14rem; }
  .top-pill { gap: 4px; }
  .hero-copy { padding-inline: 16px; }
  .round-progress { gap: 3px; }
  .progress-seed { width: 9px; height: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
