@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;500;600;700;800;900&display=swap");
:root {
  --ink: #173e35;
  --muted: #5d746b;
  --green: #0e584a;
  --mint: #e1f1df;
  --paper: #f5f7f2;
  --yellow: #ffe393;
  --line: #dce4da;
  --shadow: 0 6px 0 #d2ddd2;
  --font: "Nunito", ui-rounded, system-ui, sans-serif;
  --display: "Fredoka", ui-rounded, system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 600 16px/1.5 var(--font);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #167eaa;
  outline-offset: 4px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.15;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.035em;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.35rem;
}
small {
  font-size: 0.875rem;
}
a {
  color: var(--green);
}
button {
  border: 0;
}
.app-header {
  height: 90px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  padding: 0;
  text-align: left;
}
.brand img {
  height: 44px;
  width: 44px;
}
.brand-name {
  font: 500 1.6rem var(--display);
  letter-spacing: -0.025em;
}
.brand-name small {
  display: block;
  font: 800 0.68rem var(--font);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1px;
}
.header-right,
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.coin-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid #e8d996;
  border-radius: 30px;
  background: #fff6d6;
  font-weight: 900;
}
.coin {
  color: #95670a;
  font-size: 1.3rem;
}
.icon-button {
  width: 45px;
  height: 45px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #f0f4ed;
  font-size: 1.25rem;
}
.parent-button {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 10px 17px;
  background: #fff;
  font-weight: 800;
}
.layout {
  max-width: 1440px;
  margin: auto;
  padding: 30px 4vw 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
}
.welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 23px;
  gap: 14px;
}
.eyebrow {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #527465;
  margin-bottom: 9px;
}
.welcome p {
  color: var(--muted);
  margin-top: 10px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e7efe3;
  border: 1px solid #d5e1ce;
  border-radius: 20px;
  padding: 7px 13px;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 900;
}
.map {
  width: 100%;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #6dcccf;
  aspect-ratio: 1.68;
  min-height: 340px;
  border: 1px solid #9bd3cf;
  isolation: isolate;
}
.map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: -1;
}
.island-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
.motion-toggle {
  position: absolute;
  top: 18px;
  right: 16px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 22px;
  background: #fffffff0;
  box-shadow: 0 3px 12px #174e4720;
  font-size: 0.75rem;
  font-weight: 900;
}
.water-stream {
  stroke: #efffff;
  stroke-width: 4;
  stroke-dasharray: 12 35 25 55;
  opacity: 0.6;
  animation: waterfall-flow var(--speed, 1.6s) linear var(--delay, 0s) infinite;
}
.distant-water {
  animation: waterfall-flow 2.8s linear infinite;
}
.mist-puff {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.15;
  animation: waterfall-mist 3.6s ease-out var(--delay, 0s) infinite;
}
.sea-ripple {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.2;
  animation: sea-shimmer 6s ease-out var(--delay, 0s) infinite;
}
.garden-glint {
  animation: garden-glow 6s ease-in-out var(--delay, 0s) infinite;
}
.pip-flight {
  transform: translate(660px, 300px);
  animation: pip-explore 22s ease-in-out infinite;
}
.pip-hover {
  animation: pip-bob 2.2s ease-in-out infinite;
}
.pip-facing {
  transform: scale(1);
  animation: pip-turn 22s linear infinite;
}
.pip-tails {
  transform-origin: 0 0;
  animation: pip-propeller 0.24s linear infinite;
}
.rotor-smear {
  filter: blur(2px);
}
.rotor-air {
  transform-origin: 0 0;
  animation: pip-propeller 0.55s linear infinite;
}
.rotor-air-outer {
  animation-duration: 0.9s;
  animation-direction: reverse;
}
.pip-downwash path {
  opacity: 0;
  animation: pip-downwash 1.2s ease-out var(--delay, 0s) infinite;
}
.map[data-motion="paused"]
  :is(.rotor-smear, .rotor-air, .rotor-haze, .pip-downwash) {
  visibility: hidden;
}
.pip-portrait {
  width: 96px;
  height: 112px;
  object-fit: contain;
  flex-shrink: 0;
  margin: -12px -8px -12px -15px;
}
.map[data-motion="paused"] .island-scene * {
  animation-play-state: paused !important;
}
@keyframes waterfall-flow {
  to {
    stroke-dashoffset: -127;
  }
}
@keyframes waterfall-mist {
  0% {
    transform: translateY(5px) scale(0.6);
    opacity: 0;
  }
  30% {
    opacity: 0.38;
  }
  100% {
    transform: translateY(-20px) scale(1.6);
    opacity: 0;
  }
}
@keyframes sea-shimmer {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  45% {
    opacity: 0.4;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}
@keyframes garden-glow {
  0%,
  100% {
    opacity: 0.15;
    transform: translateY(0);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-12px);
  }
}
@keyframes pip-explore {
  0%,
  100% {
    transform: translate(660px, 300px);
  }
  25% {
    transform: translate(1000px, 390px);
  }
  50% {
    transform: translate(805px, 540px);
  }
  75% {
    transform: translate(540px, 405px);
  }
}
@keyframes pip-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-12px) rotate(3deg);
  }
}
@keyframes pip-turn {
  0%,
  23%,
  98%,
  100% {
    transform: scale(1, 1);
  }
  28%,
  73% {
    transform: scale(-1, 1);
  }
  78%,
  97% {
    transform: scale(1, 1);
  }
}
@keyframes pip-propeller {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pip-downwash {
  0% {
    transform: translateY(-6px);
    opacity: 0;
  }
  25% {
    opacity: 0.45;
  }
  100% {
    transform: translateY(34px);
    opacity: 0;
  }
}
@media (max-width: 500px) {
  .motion-toggle {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: auto;
    font-size: 0.65rem;
    padding: 6px 9px;
  }
}
.map-caption {
  position: absolute;
  left: 20px;
  top: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fffffff0;
  border-radius: 14px;
  padding: 8px 13px;
  box-shadow: 0 4px 14px #18473912;
  font-size: 0.85rem;
}
.map-caption span:first-child {
  font-size: 1.5rem;
}
.map-pin {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  background: white;
  border: 2px solid #fff;
  border-radius: 14px;
  padding: 9px 14px;
  box-shadow: 0 5px 0 #174e4738;
  font-size: 0.9rem;
  font-weight: 900;
  transition: transform 0.15s;
}
.map-pin:hover {
  transform: translateY(-4px);
}
.map-pin::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 22px;
  width: 13px;
  height: 13px;
  background: #fff;
  transform: rotate(45deg);
  z-index: -1;
}
.pin-letter {
  top: 44%;
  left: 7%;
}
.pin-verse {
  top: 37%;
  right: 5%;
}
.pin-build {
  bottom: 16%;
  left: 34%;
}
.map-footnote {
  position: absolute;
  bottom: 13px;
  right: 16px;
  color: #1d6557;
  background: #e6faf0dd;
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 900;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 27px 0 16px;
  gap: 12px;
}
.section-title h2 {
  font-size: 1.45rem;
}
.section-title small {
  color: var(--muted);
}
.days {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.day {
  min-height: 115px;
  text-align: left;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 15px;
  box-shadow: 0 3px 0 #e0e6db;
  transition: transform 0.15s;
}
.day:hover {
  transform: translateY(-2px);
}
.day.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
  box-shadow: 0 4px 0 #063c31;
}
.day-top {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
  display: flex;
  justify-content: space-between;
}
.day-title {
  display: block;
  font: 500 1.25rem var(--display);
  margin: 7px 0;
}
.day small {
  font-size: 0.77rem;
  opacity: 0.85;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 19px;
}
.quest-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 23px;
  box-shadow: var(--shadow);
}
.quest-card h2 {
  font-size: 1.75rem;
  margin: 4px 0 8px;
}
.quest-card p {
  color: var(--muted);
  font-size: 0.9rem;
}
.quest-list {
  margin: 20px 0 24px;
  display: grid;
  gap: 15px;
}
.quest-item {
  display: flex;
  gap: 12px;
  align-items: center;
}
.quest-icon {
  height: 40px;
  width: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e7efde;
  font-size: 1.25rem;
  flex: none;
}
.quest-item:nth-child(2) .quest-icon {
  background: #e3ecfb;
}
.quest-item:nth-child(3) .quest-icon {
  background: #f3e5f2;
}
.quest-item strong {
  display: block;
  font-size: 0.9rem;
}
.quest-item small {
  color: var(--muted);
  font-size: 0.78rem;
}
.primary,
.secondary,
.soft,
.danger {
  border-radius: 13px;
  min-height: 48px;
  padding: 11px 20px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition:
    filter 0.15s,
    transform 0.15s;
}
.primary {
  color: white;
  background: var(--green);
  box-shadow: 0 4px 0 #073e33;
}
.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.primary.yellow {
  background: var(--yellow);
  color: #50411e;
  box-shadow: 0 4px 0 #ddbd64;
}
.secondary {
  background: #fff;
  border: 1px solid #cfdbce;
  box-shadow: 0 3px 0 #e0e7dd;
}
.soft {
  background: #e9efe5;
}
.danger {
  background: #ffe7e5;
  color: #962a24;
}
.full {
  width: 100%;
}
.quest-bottom {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 0.73rem;
  margin-top: 13px;
}
.pet-card {
  background: #e7eedc;
  border: 1px solid #d4dec9;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.pet {
  font-size: 3.2rem;
  line-height: 1;
}
.pet-card h3 {
  font-size: 1.15rem;
}
.pet-card p {
  font-size: 0.83rem;
  margin-top: 4px;
  color: #557052;
}
.reward-card {
  border: 1px solid #e7d7a5;
  background: #fff7dd;
  border-radius: 20px;
  padding: 20px;
}
.reward-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.reward-card h3 {
  font-size: 1.2rem;
}
.reward-card p {
  font-size: 0.82rem;
  color: #7e6d3d;
  margin: 10px 0;
}
.progress-track {
  height: 9px;
  border-radius: 20px;
  background: #e5dac0;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 20px;
  background: #c39432;
  transition: width 0.3s;
}
.reward-detail {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-top: 8px;
  color: #766536;
}
.word-strip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 19px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 23px;
}
.word-strip-title {
  white-space: nowrap;
  font-size: 0.85rem;
}
.word-strip-title small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
}
.word-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.word-chip {
  background: #f0f4eb;
  border-radius: 8px;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 0.85rem;
}
.word-chip.mastered {
  background: #d5ebce;
  color: #346c37;
}
.footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 4vw 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #647969;
  font-size: 0.75rem;
}
.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
  color: inherit;
  font-size: inherit;
}
.screen {
  max-width: 1150px;
  margin: 0 auto;
  padding: 25px 4vw 50px;
}
.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 26px;
}
.screen-head h1 {
  font-size: 2.2rem;
}
.screen-head .eyebrow {
  margin: 0 0 4px;
}
.back {
  width: 45px;
  height: 45px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  font-size: 1.3rem;
  flex: none;
}
.activity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 23px;
}
.activity-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 25px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.activity-card h2 {
  font-size: 1.7rem;
}
.activity-card > .muted {
  margin: 8px 0 20px;
}
.muted {
  color: var(--muted);
}
.activity-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.activity-side .quest-card {
  padding: 19px;
}
.mode-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.mode-tab {
  border-radius: 10px;
  background: #eef2ea;
  padding: 9px 13px;
  font-size: 0.85rem;
  min-height: 44px;
}
.mode-tab.active {
  background: var(--green);
  color: white;
}
.letter-picker {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.letter-button {
  height: 45px;
  min-width: 44px;
  border: 1px solid #d2dfcf;
  background: white;
  border-radius: 10px;
  font: 500 1.6rem var(--display);
}
.letter-button.active {
  background: var(--yellow);
  border-color: #d6ba65;
}
.canvas-wrap {
  position: relative;
  border: 2px solid #d7e3d3;
  background: #fbfdf8;
  border-radius: 18px;
  overflow: hidden;
  margin: 14px 0;
  touch-action: none;
}
.canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 340px;
  touch-action: none;
  cursor: crosshair;
}
.canvas-wrap.free canvas {
  height: 370px;
}
.canvas-note {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 0.7rem;
  color: #72816a;
  pointer-events: none;
}
.feedback {
  background: #edf4e6;
  border-radius: 13px;
  padding: 13px 16px;
  min-height: 51px;
  font-weight: 800;
  margin: 14px 0;
  color: #395b32;
}
.feedback.celebrate {
  background: #fff0bd;
  color: #6a5515;
}
.toolbar {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 15px;
}
.toolbar .primary {
  margin-left: auto;
}
.mini-progress {
  display: flex;
  gap: 5px;
  align-items: center;
}
.mini-progress span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #dce7d6;
}
.mini-progress span.done {
  background: #408a58;
}
.instruction {
  font-size: 1rem;
  margin-top: 12px;
}
.hint-box {
  padding: 15px;
  background: #fff6d9;
  border-radius: 14px;
  margin-top: 15px;
}
.hint-box strong {
  display: block;
  margin-bottom: 5px;
}
.hint-box p {
  font-size: 0.88rem;
}
.letter-tile {
  min-width: 49px;
  height: 58px;
  background: #fff;
  border: 2px solid #d9e1d3;
  box-shadow: 0 4px 0 #cad4c3;
  border-radius: 12px;
  font: 500 1.8rem var(--display);
  padding: 4px 10px;
}
.letter-tile.selected {
  opacity: 0.35;
}
.answer-slots {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  margin: 28px 0 24px;
  min-height: 65px;
}
.answer-slot {
  width: 48px;
  height: 60px;
  background: #eef4e8;
  border: 2px dashed #bfceba;
  border-radius: 11px;
  font: 500 1.8rem var(--display);
  display: grid;
  place-items: center;
}
.answer-slot.filled {
  background: #fff2b8;
  border-style: solid;
  border-color: #d9bc60;
}
.tiles {
  display: flex;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.listen-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 25px 0;
}
.listen-hero button {
  font-size: 1.1rem;
  padding: 15px 24px;
}
.big-word {
  font: 500 3rem var(--display);
  letter-spacing: 0.08em;
  text-align: center;
  margin: 15px 0;
}
.center {
  text-align: center;
}
.verse-text {
  font: 500 clamp(1.5rem, 3.4vw, 2.4rem)/1.7 var(--display);
  margin: 24px 0;
  text-align: center;
  white-space: pre-wrap;
}
.verse-word {
  background: transparent;
  padding: 3px 5px;
  font: inherit;
  border-radius: 6px;
}
.verse-word.hidden-word {
  background: #e4ecdf;
  color: transparent;
  text-decoration: underline;
  text-decoration-color: #789574;
  min-width: 40px;
}
.verse-reference {
  font-weight: 900;
  color: var(--muted);
  text-align: center;
}
.phrase-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}
.phrase {
  padding: 15px 20px;
  background: #f1f5eb;
  border-radius: 13px;
  text-align: left;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.phrase.active {
  background: #e1efda;
  border: 2px solid #87b177;
}
.big-symbol {
  font-size: 5rem;
  margin: 10px 0;
  display: block;
}
.timer {
  font: 500 3.5rem var(--display);
  margin: 18px 0;
}
.color-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 4px solid white;
  outline: 1px solid #bac8b5;
}
.color-button.active {
  outline: 3px solid #496344;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}
.shop-item {
  padding: 20px;
  border-radius: 18px;
  background: #f0f5e9;
  border: 1px solid #dce5d4;
}
.shop-item .item-icon {
  font-size: 3rem;
}
.shop-item p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 9px 0 16px;
}
.owned-decoration {
  position: absolute;
  font-size: 2.2rem;
  filter: drop-shadow(0 3px 1px #0003);
  pointer-events: none;
}
.shop-count {
  font-weight: 900;
  color: #8a691b;
}
.session-banner {
  background: #e2eeda;
  padding: 12px 18px;
  display: flex;
  gap: 15px;
  align-items: center;
  border-radius: 14px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}
.session-banner .progress-track {
  flex: 1;
  min-width: 30px;
  background: #cadfc0;
}
.session-banner .progress-fill {
  background: #438853;
}
.session-banner button {
  margin-left: auto;
  flex: none;
}
.milestones {
  display: grid;
  gap: 12px;
  margin: 25px 0;
}
.milestone {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  background: #f0f5e9;
  border-radius: 13px;
  align-items: center;
}
.milestone .symbol {
  font-size: 1.5rem;
}
.milestone strong {
  display: block;
}
.milestone small {
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: #143f34;
  color: white;
  padding: 14px 24px;
  border-radius: 15px;
  box-shadow: 0 8px 30px #0002;
  z-index: 1000;
  max-width: 90vw;
  text-align: center;
  display: none;
  font-weight: 800;
}
dialog {
  border: 1px solid #d1ddcd;
  border-radius: 24px;
  box-shadow: 0 20px 90px #12392c44;
  padding: 28px;
  background: var(--paper);
  color: var(--ink);
  width: min(720px, 94vw);
  max-height: 90dvh;
}
dialog::backdrop {
  background: #173d3460;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.modal-head h2 {
  font-size: 1.8rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
label {
  display: block;
  font-weight: 900;
  font-size: 0.88rem;
}
input,
textarea,
select {
  display: block;
  border: 1px solid #c9d8c4;
  border-radius: 10px;
  background: #fff;
  padding: 11px 12px;
  width: 100%;
  color: var(--ink);
  margin-top: 6px;
  min-height: 45px;
}
textarea {
  resize: vertical;
  min-height: 92px;
}
.form-full {
  grid-column: 1/-1;
}
.help {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 5px;
}
.settings-section {
  border-top: 1px solid #d5e0d1;
  padding-top: 20px;
  margin-top: 24px;
}
.settings-section h3 {
  margin-bottom: 12px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.stat {
  background: #e6efde;
  border-radius: 13px;
  padding: 14px;
  text-align: center;
}
.stat strong {
  font: 500 1.6rem var(--display);
  display: block;
}
.stat small {
  font-size: 0.75rem;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 0.8rem;
}
.data-table th,
.data-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-row input {
  width: 21px;
  min-height: 21px;
  margin: 0;
}
.badge {
  display: inline-block;
  padding: 4px 9px;
  background: #dcecd4;
  border-radius: 20px;
  font-size: 0.75rem;
}
.error {
  color: #9f2c25;
  background: #ffe9e4;
  padding: 12px;
  border-radius: 10px;
  margin: 12px 0;
}
.empty {
  padding: 40px;
  text-align: center;
}
.celebration {
  padding: 35px 15px;
  text-align: center;
}
.celebration h2 {
  font-size: 2.8rem;
  margin: 20px 0 12px;
}
.celebration p {
  max-width: 470px;
  margin: 0 auto 25px;
  color: var(--muted);
}
.step-list {
  display: grid;
  gap: 13px;
  padding: 0;
  list-style: none;
}
.step-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
}
.step-list .step-number {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #eef2e6;
  flex: none;
}
.step-list li.current {
  font-weight: 900;
  color: var(--green);
}
.step-list li.current .step-number {
  background: var(--green);
  color: white;
}
.step-list li.completed {
  color: #708766;
}
.drawing-preview {
  max-width: 100%;
  border-radius: 15px;
  border: 1px solid var(--line);
}
.notice {
  background: #fff1cd;
  border: 1px solid #e1cd94;
  border-radius: 13px;
  padding: 12px 15px;
  font-size: 0.82rem;
  margin-bottom: 16px;
}
.storage-warning {
  padding: 12px 4vw;
  background: #ffe9da;
  color: #863d1b;
  text-align: center;
}
.recording {
  color: #a13632;
}
.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  background: white;
  padding: 10px;
  z-index: 999;
}
.skip-link:focus {
  top: 10px;
}
@media (min-width: 1400px) {
  .layout {
    padding-top: 40px;
  }
  .map {
    aspect-ratio: 1.65;
  }
  .quest-card {
    padding: 27px;
  }
  .sidebar {
    gap: 25px;
  }
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
    padding-left: 25px;
    padding-right: 25px;
  }
  .quest-card {
    padding: 20px;
  }
  .welcome {
    display: block;
  }
  .welcome .tag {
    margin-top: 12px;
  }
  .map {
    min-height: 350px;
  }
  .map-pin {
    font-size: 0.78rem;
    padding: 8px 10px;
  }
  .pin-letter {
    left: 4%;
  }
  .pin-verse {
    right: 3%;
    top: 30%;
  }
  .pin-build {
    left: 28%;
    bottom: 13%;
  }
  .day {
    padding: 12px;
  }
  .day-title {
    font-size: 1.1rem;
  }
  .activity-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
  }
}
@media (max-width: 760px) {
  .app-header {
    height: 76px;
    padding: 0 18px;
  }
  .brand-name {
    font-size: 1.3rem;
  }
  .brand-name small {
    font-size: 0.6rem;
  }
  .brand img {
    width: 38px;
    height: 38px;
  }
  .header-right {
    gap: 7px;
  }
  .parent-button {
    padding: 9px 12px;
    font-size: 0.78rem;
  }
  .coin-pill {
    padding: 7px 12px;
  }
  .layout {
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    gap: 24px;
  }
  .welcome {
    display: flex;
    align-items: flex-start;
  }
  .welcome .tag {
    font-size: 0.65rem;
    margin-top: 5px;
  }
  .welcome h1 {
    font-size: 2.2rem;
  }
  .welcome p {
    font-size: 0.9rem;
  }
  .map {
    min-height: 320px;
    aspect-ratio: 1.4;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .quest-card {
    grid-column: 1/-1;
  }
  .quest-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .quest-item {
    display: block;
  }
  .quest-icon {
    margin-bottom: 8px;
  }
  .pet-card {
    display: block;
  }
  .pet {
    font-size: 2.5rem;
    margin-bottom: 8px;
  }
  .reward-card {
    padding: 16px;
  }
  .word-strip {
    flex-direction: column;
    gap: 12px;
  }
  .word-strip-title small {
    display: inline;
    margin-left: 8px;
  }
  .days {
    gap: 8px;
  }
  .day {
    min-height: 107px;
    padding: 10px;
  }
  .day-top {
    font-size: 0.65rem;
  }
  .day-title {
    font-size: 1rem;
  }
  .day small {
    font-size: 0.67rem;
  }
  .footer {
    padding: 0 18px 22px;
    flex-wrap: wrap;
  }
  .activity-layout {
    display: flex;
    flex-direction: column;
  }
  .activity-side .quest-card {
    display: none;
  }
  .screen {
    padding: 20px 17px;
  }
  .screen-head h1 {
    font-size: 1.8rem;
  }
  .activity-card {
    padding: 18px;
  }
  .canvas-wrap canvas {
    height: 330px;
  }
  .toolbar .primary {
    margin-left: 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-full {
    grid-column: auto;
  }
  .session-banner {
    flex-wrap: wrap;
  }
  .session-banner .progress-track {
    min-width: 50px;
  }
  .shop-grid {
    gap: 10px;
  }
  .shop-item {
    padding: 15px;
  }
  .map-caption {
    font-size: 0.75rem;
    padding: 7px 10px;
  }
  .map-footnote {
    font-size: 0.65rem;
  }
  .stat strong {
    font-size: 1.3rem;
  }
  dialog {
    padding: 22px;
  }
}
@media (max-width: 390px) {
  .brand-name small {
    display: none;
  }
  .header-right .icon-button {
    display: none;
  }
  .coin-pill {
    font-size: 0.8rem;
  }
  .welcome {
    display: block;
  }
  .day-title {
    font-size: 0.92rem;
  }
  .map-pin {
    font-size: 0.7rem;
  }
  .pin-build {
    left: 25%;
  }
  .letter-tile {
    min-width: 42px;
  }
  .answer-slot {
    width: 41px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
.mobile-start {
  display: none;
}
@media (min-width: 761px) and (max-width: 900px) {
  .layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .sidebar > .quest-card {
    grid-column: 1/-1;
  }
  .quest-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .quest-item {
    display: block;
  }
  .quest-icon {
    margin-bottom: 8px;
  }
  .activity-layout {
    display: flex;
    flex-direction: column;
  }
  .activity-side > .quest-card {
    display: none;
  }
}
@media (max-width: 900px) {
  .mobile-start {
    display: flex;
    width: 100%;
    margin: 0 0 20px;
  }
}
