:root {
  --ink: #28323e;
  --ink-soft: #58636d;
  --cream: #fff8e8;
  --paper: #fffdf7;
  --white: #ffffff;
  --yellow: #ffcf53;
  --yellow-deep: #f0a91a;
  --coral: #ff7f6b;
  --coral-deep: #db5548;
  --mint: #91ddbd;
  --mint-deep: #2f9f77;
  --sky: #8bcdf4;
  --sky-deep: #398ec7;
  --lavender: #bca8e8;
  --line: rgba(40, 50, 62, 0.14);
  --shadow-sm: 0 5px 0 rgba(40, 50, 62, 0.08);
  --shadow-md: 0 12px 0 rgba(40, 50, 62, 0.08), 0 20px 40px rgba(61, 72, 83, 0.12);
  --shadow-button: 0 6px 0 var(--coral-deep), 0 10px 20px rgba(219, 85, 72, 0.2);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 36px;
  --content: 1240px;
  --display-font: "Arial Rounded MT Bold", "Trebuchet MS", "Apple SD Gothic Neo", sans-serif;
  --body-font: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--body-font);
  line-height: 1.5;
  overflow-x: hidden;
}

body.is-dialog-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:focus-visible,
[tabindex]:focus-visible,
a:focus-visible {
  outline: 4px solid #1f72b7;
  outline-offset: 4px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

#main-content:focus {
  outline: none;
}

body[data-view="game"] .app-header {
  display: none;
}

body[data-view="game"] .game-view {
  padding-bottom: 140px;
}

body[data-view="game"] .game-actions {
  position: fixed;
  z-index: 50;
  bottom: 16px;
  left: 50%;
  width: min(700px, calc(100% - 24px));
  margin: 0;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 7px 0 var(--ink), 0 18px 40px rgba(40, 50, 62, 0.2);
  transform: translateX(-50%);
}

button[hidden],
[hidden] {
  display: none !important;
}

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

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

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}

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

.screen-reader-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.storybook-sky {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 9%, rgba(255, 255, 255, 0.85) 0 2px, transparent 3px),
    radial-gradient(circle at 12% 28%, rgba(255, 255, 255, 0.75) 0 3px, transparent 4px),
    linear-gradient(180deg, #ddf3ff 0%, #eef9ff 38%, #fff8e8 76%);
}

.cloud {
  position: absolute;
  width: 150px;
  height: 45px;
  border: 2px solid rgba(40, 50, 62, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 28px -22px 0 5px rgba(255, 255, 255, 0.82), 74px -8px 0 2px rgba(255, 255, 255, 0.82);
}

.cloud-one {
  top: 150px;
  left: -52px;
}

.cloud-two {
  top: 110px;
  right: 6%;
  transform: scale(0.7);
}

.sun-shape {
  position: absolute;
  top: 125px;
  right: 16%;
  width: 72px;
  height: 72px;
  border: 3px solid rgba(40, 50, 62, 0.08);
  border-radius: 50%;
  background: rgba(255, 207, 83, 0.5);
}

.hill {
  position: absolute;
  bottom: -16vh;
  width: 72vw;
  height: 38vh;
  border-radius: 50% 50% 0 0;
}

.hill-back {
  right: -20vw;
  background: rgba(145, 221, 189, 0.28);
  transform: rotate(-6deg);
}

.hill-front {
  left: -20vw;
  background: rgba(145, 221, 189, 0.2);
  transform: rotate(7deg);
}

.app-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--content));
  min-height: 92px;
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 4px 8px 4px 2px;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--yellow);
  box-shadow: 0 4px 0 var(--ink);
  transform: rotate(-4deg);
}

.brand-star {
  color: var(--paper);
  font-size: 34px;
  line-height: 1;
  -webkit-text-stroke: 1.5px var(--ink);
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  font-family: var(--display-font);
  font-size: 22px;
  letter-spacing: -0.05em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.round-action,
.parent-action,
.icon-text-button {
  min-height: 48px;
  border: 2px solid var(--line);
  background: rgba(255, 253, 247, 0.76);
  box-shadow: 0 3px 0 rgba(40, 50, 62, 0.07);
}

.round-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 850;
}

.parent-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 17px;
  border-color: rgba(47, 159, 119, 0.25);
  border-radius: 17px;
  background: #eaf9f1;
  font-weight: 900;
}

.view {
  position: relative;
  width: min(calc(100% - 40px), var(--content));
  min-height: calc(100vh - 92px);
  margin: 0 auto;
  padding: 36px 0 80px;
}

.view:not(.is-active) {
  display: none;
}

.primary-button,
.secondary-button,
.text-button,
.back-link,
.danger-text-button,
.listen-button,
.reel-arrow,
.check-button,
.spin-button {
  -webkit-tap-highlight-color: transparent;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 17px;
  font-weight: 950;
}

.primary-button {
  border: 2px solid var(--ink);
  color: #fff;
  background: var(--coral);
  box-shadow: 0 5px 0 var(--ink);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--ink);
}

.primary-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink);
}

.secondary-button {
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
}

.secondary-button:hover:not(:disabled) {
  background: #fff6d9;
}

.primary-button.small {
  min-width: 118px;
  min-height: 48px;
}

.primary-button.full {
  width: 100%;
}

.big-button {
  min-height: 64px;
  padding: 0 28px;
  border-radius: 20px;
  font-size: 18px;
}

.text-button,
.back-link,
.danger-text-button {
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: rgba(40, 50, 62, 0.25);
  text-underline-offset: 5px;
}

.danger-text-button {
  color: #a5443d;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  align-items: center;
  gap: clamp(32px, 5vw, 76px);
  min-height: 610px;
}

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

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1.5px solid rgba(40, 50, 62, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.82);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 2px 0 rgba(40, 50, 62, 0.06);
}

.hero-kicker,
.view-kicker {
  margin-bottom: 10px;
  color: var(--mint-deep);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.hero-copy h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-family: var(--display-font);
  font-size: clamp(46px, 5.4vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.075em;
}

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

.hero-copy h1 em::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  content: "";
  opacity: 0.7;
  transform: rotate(-1deg);
}

.hero-description {
  max-width: 650px;
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.8;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.trust-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 720;
}

.trust-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.trust-list li span {
  display: grid;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--mint-deep);
  font-size: 12px;
}

.hero-visual {
  position: relative;
  min-height: 535px;
  border: 3px solid var(--ink);
  border-radius: 48% 48% 36px 36px;
  background: linear-gradient(180deg, #c9efff 0%, #f0fbff 53%, #bcebcf 54%, #7dcc9e 100%);
  box-shadow: 12px 14px 0 var(--ink), 0 30px 70px rgba(40, 50, 62, 0.18);
  isolation: isolate;
  overflow: hidden;
  transform: rotate(1deg);
}

.hero-visual::before {
  position: absolute;
  z-index: -1;
  top: 18px;
  right: 23px;
  width: 94px;
  height: 94px;
  border: 2px solid rgba(40, 50, 62, 0.12);
  border-radius: 50%;
  background: rgba(255, 207, 83, 0.88);
  content: "";
}

.hero-visual::after {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 15px;
  border: 2px solid rgba(40, 50, 62, 0.3);
  border-radius: 50%;
  background: rgba(47, 159, 119, 0.3);
  content: "";
  filter: blur(1px);
}

.hero-art {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms ease;
}

.hero-art.is-loaded {
  opacity: 1;
}

.hero-art.is-loaded ~ .mascot-bubble {
  display: none;
}

.hero-art-fallback {
  position: absolute;
  inset: 0;
}

.fallback-star,
.fallback-elephant,
.fallback-rabbit {
  position: absolute;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 0 rgba(40, 50, 62, 0.13));
}

.fallback-star {
  top: 130px;
  left: 47%;
  color: var(--yellow);
  font-size: 140px;
  -webkit-text-stroke: 4px var(--ink);
  transform: translateX(-50%) rotate(-8deg);
}

.fallback-elephant {
  bottom: 40px;
  left: 46px;
  font-size: 112px;
}

.fallback-rabbit {
  right: 45px;
  bottom: 45px;
  font-size: 106px;
}

.floating-card {
  position: absolute;
  z-index: 5;
  display: grid;
  min-height: 64px;
  place-items: center;
  padding: 8px 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--ink);
  font-family: var(--display-font);
  font-weight: 900;
}

.card-picture {
  top: 70px;
  left: 28px;
  font-size: 38px;
  transform: rotate(-8deg);
}

.card-korean {
  top: 42px;
  left: 42%;
  font-size: 20px;
  transform: rotate(4deg);
}

.card-english {
  top: 112px;
  right: 25px;
  color: #287cad;
  font-size: 17px;
  transform: rotate(7deg);
}

.mascot-bubble {
  position: absolute;
  z-index: 6;
  top: 210px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 17px 17px 17px 5px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 4px 0 var(--ink);
  transform: translateX(-50%) rotate(-2deg);
}

.mascot-bubble p {
  min-width: 150px;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.routine-strip {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.35fr);
  gap: 36px;
  margin-top: 60px;
  padding: 32px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.9);
  box-shadow: 0 8px 0 var(--ink);
}

.routine-heading {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.section-number {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-family: var(--display-font);
  font-size: 14px;
  font-weight: 950;
  transform: rotate(-6deg);
}

.routine-heading h2 {
  margin-bottom: 8px;
  font-family: var(--display-font);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.routine-heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
  word-break: keep-all;
}

.routine-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.routine-steps li {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 96px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.step-visual {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: #fff3c7;
  font-family: var(--display-font);
  font-size: 24px;
  font-weight: 950;
}

.routine-steps li:nth-child(2) .step-visual {
  background: #dff6eb;
}

.routine-steps li:nth-child(3) .step-visual {
  background: #dff2ff;
}

.routine-steps strong,
.routine-steps small {
  display: block;
}

.routine-steps strong {
  margin-bottom: 3px;
  font-size: 15px;
}

.routine-steps small {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
}

.map-view {
  padding-top: 26px;
}

.map-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.map-topline h1,
.game-heading h1,
.summary-card h1 {
  margin-bottom: 8px;
  font-family: var(--display-font);
  letter-spacing: -0.055em;
}

.map-topline h1 {
  font-size: clamp(34px, 4.5vw, 52px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.garden-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 290px;
  padding: 17px 20px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 5px 0 var(--ink);
}

.progress-plant {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: #def5e8;
  font-size: 28px;
}

.garden-progress strong,
.garden-progress small {
  display: block;
}

.garden-progress small {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
}

.mini-progress,
.parent-progress-track {
  overflow: hidden;
  height: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #edf0e8;
}

.mini-progress {
  width: 165px;
  margin-top: 6px;
}

.mini-progress span,
.parent-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
  transition: width 500ms ease;
}

.stage-road-wrap {
  position: relative;
  padding: 28px;
  border: 2px dashed rgba(40, 50, 62, 0.2);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.5);
}

.road-doodle {
  position: absolute;
  inset: 80px 60px;
  border-top: 6px dotted rgba(47, 159, 119, 0.25);
  border-bottom: 6px dotted rgba(47, 159, 119, 0.2);
  border-radius: 50%;
  transform: rotate(-3deg);
}

.stage-road {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}

.stage-card {
  position: relative;
  display: grid;
  min-height: 218px;
  align-content: space-between;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--stage-color, var(--paper));
  box-shadow: 0 6px 0 var(--ink);
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.stage-card:nth-child(even) {
  transform: translateY(22px) rotate(1deg);
}

.stage-card:nth-child(odd) {
  transform: rotate(-1deg);
}

.stage-card:hover:not(:disabled),
.stage-card:focus-visible {
  transform: translateY(-5px) rotate(0deg);
  box-shadow: 0 11px 0 var(--ink), 0 20px 30px rgba(40, 50, 62, 0.12);
}

.stage-card.is-locked {
  border-style: dashed;
  filter: saturate(0.5);
}

.stage-card.is-complete::after {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: #fff;
  background: var(--mint-deep);
  content: "✓";
  font-weight: 950;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  font-family: var(--display-font);
  font-size: 14px;
  font-weight: 950;
}

.stage-icon {
  font-size: 38px;
  filter: drop-shadow(0 4px 0 rgba(40, 50, 62, 0.12));
}

.stage-card h2 {
  margin: 13px 0 6px;
  font-family: var(--display-font);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.stage-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 900;
}

.stage-status {
  padding: 5px 8px;
  border: 1.5px solid rgba(40, 50, 62, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.today-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-top: 54px;
  padding: 22px 28px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: #fff1ba;
  box-shadow: 0 6px 0 var(--ink);
}

.today-mascot,
.summary-mascot {
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  color: var(--yellow);
  background: #fffdf7;
  -webkit-text-stroke: 2px var(--ink);
}

.today-mascot {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  font-size: 48px;
  transform: rotate(-7deg);
}

.today-copy h2 {
  margin-bottom: 6px;
  font-family: var(--display-font);
  font-size: 20px;
}

.today-copy p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.game-view {
  width: min(calc(100% - 32px), 1120px);
  padding-top: 12px;
}

.game-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.icon-text-button {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-width: 48px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 900;
}

.icon-text-button.compact {
  justify-self: end;
}

.round-progress-wrap {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 210px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.8);
  font-size: 12px;
  font-weight: 900;
}

.round-dots {
  display: flex;
  gap: 7px;
}

.round-dot {
  width: 26px;
  height: 9px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}

.round-dot.is-current {
  background: var(--yellow);
}

.round-dot.is-complete {
  background: var(--mint);
}

.game-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.level-badge {
  display: grid;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 22px;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 5px 0 var(--ink);
  font-family: var(--display-font);
  font-size: 26px;
  font-weight: 950;
  transform: rotate(-4deg);
}

.game-heading h1 {
  font-size: 30px;
}

.game-heading p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.roulette-card {
  position: relative;
  padding: 46px 30px 30px;
  border: 3px solid var(--ink);
  border-radius: 34px;
  background: #fffdf7;
  box-shadow: 0 10px 0 var(--ink), 0 30px 60px rgba(40, 50, 62, 0.14);
  transition: background-color 250ms ease, border-color 250ms ease;
}

.roulette-card.is-correct {
  background: #effcf5;
}

.roulette-card.is-waiting {
  background: #fffaf0;
}

.roulette-caps {
  position: absolute;
  top: -10px;
  left: 50%;
  display: flex;
  gap: 44px;
  transform: translateX(-50%);
}

.roulette-caps span {
  width: 28px;
  height: 20px;
  border: 3px solid var(--ink);
  border-radius: 7px 7px 3px 3px;
  background: var(--coral);
}

.instruction-pill {
  position: absolute;
  z-index: 5;
  top: -27px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 0 4px 0 var(--ink);
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
}

.instruction-icon {
  font-size: 21px;
}

.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.reel-column {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(250px, 1fr) auto auto;
  align-items: center;
  min-width: 0;
  padding: 16px 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: #f4fbff;
  box-shadow: 0 6px 0 rgba(40, 50, 62, 0.13);
}

.reel-column.korean-column {
  background: #fff8dd;
}

.reel-column.english-column {
  background: #f1ecff;
}

.reel-column > header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 5px 10px;
}

.reel-column > header div {
  display: grid;
}

.reel-column > header strong {
  font-family: var(--display-font);
  font-size: 18px;
}

.reel-column > header small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.reel-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: #fff;
  font-family: var(--display-font);
  font-size: 11px;
  font-weight: 950;
}

.reel-machine {
  position: relative;
  grid-row: 3;
  width: 100%;
  height: 270px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 9px 18px rgba(40, 50, 62, 0.1), inset 0 -9px 18px rgba(40, 50, 62, 0.1);
}

.reel-machine::before,
.reel-machine::after {
  position: absolute;
  z-index: 6;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  content: "";
  transform: translateY(-50%);
}

.reel-machine::before {
  left: 5px;
}

.reel-machine::after {
  right: 5px;
}

.reel-content {
  position: absolute;
  inset: 0;
  transition: transform 160ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reel-item {
  position: absolute;
  right: 14px;
  left: 14px;
  display: grid;
  height: 33.333%;
  place-items: center;
  padding: 6px;
  text-align: center;
  transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
}

.reel-item.is-prev {
  top: 0;
}

.reel-item.is-current {
  top: 33.333%;
  z-index: 3;
  transform: scale(1.05);
}

.reel-item.is-next {
  top: 66.666%;
}

.reel-item:not(.is-current) {
  opacity: 0.38;
  filter: saturate(0.4);
  transform: scale(0.78);
}

.reel-focus {
  position: absolute;
  z-index: 4;
  top: 33.333%;
  right: 8px;
  left: 8px;
  height: 33.333%;
  border: 3px solid var(--coral);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(255, 127, 107, 0.11);
  pointer-events: none;
}

.korean-column .reel-focus {
  border-color: var(--yellow-deep);
  box-shadow: 0 0 0 4px rgba(240, 169, 26, 0.11);
}

.english-column .reel-focus {
  border-color: #8068c3;
  box-shadow: 0 0 0 4px rgba(128, 104, 195, 0.11);
}

.reel-shade {
  position: absolute;
  z-index: 5;
  right: 0;
  left: 0;
  height: 26%;
  pointer-events: none;
}

.top-shade {
  top: 0;
  background: linear-gradient(180deg, rgba(40, 50, 62, 0.11), transparent);
}

.bottom-shade {
  bottom: 0;
  background: linear-gradient(0deg, rgba(40, 50, 62, 0.11), transparent);
}

.picture-art {
  position: relative;
  display: grid;
  width: 82px;
  height: 72px;
  place-items: center;
  border-radius: 24px;
  background: var(--art-bg, #e7f6ff);
  box-shadow: inset 0 -5px 0 rgba(40, 50, 62, 0.06);
  font-size: 54px;
  line-height: 1;
}

.picture-art::after {
  position: absolute;
  right: 10px;
  bottom: 6px;
  left: 10px;
  height: 5px;
  border-radius: 50%;
  background: rgba(40, 50, 62, 0.09);
  content: "";
  filter: blur(2px);
}

.picture-art .emoji {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 0 rgba(40, 50, 62, 0.08));
  transform: scale(var(--emoji-scale, 1));
}

.picture-art.color-art {
  background: #fff;
}

.color-swatch {
  width: 58px;
  height: 58px;
  border: 3px solid var(--ink);
  border-radius: var(--swatch-radius, 50%);
  background: var(--swatch-color);
  box-shadow: inset -6px -6px 0 rgba(40, 50, 62, 0.1);
}

.pair-art .emoji:first-child {
  font-size: 50px;
  transform: scale(var(--pair-a, 1));
}

.pair-art .emoji:last-child {
  position: absolute;
  right: 5px;
  bottom: 10px;
  font-size: 28px;
  transform: scale(var(--pair-b, 1));
}

.table-picture .table-top {
  position: absolute;
  z-index: 2;
  top: 21px;
  width: 66px;
  height: 17px;
  border: 3px solid var(--ink);
  border-radius: 9px 9px 5px 5px;
  background: #bb7b48;
  box-shadow: inset 0 -5px 0 rgba(73, 43, 24, 0.16);
}

.table-picture .table-leg {
  position: absolute;
  z-index: 1;
  top: 34px;
  width: 9px;
  height: 29px;
  border: 3px solid var(--ink);
  border-top: 0;
  background: #d39963;
}

.table-picture .table-leg.left {
  left: 16px;
  transform: rotate(3deg);
}

.table-picture .table-leg.right {
  right: 16px;
  transform: rotate(-3deg);
}

.word-card {
  display: grid;
  justify-items: center;
  min-width: 0;
  line-height: 1.1;
}

.word-main {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--display-font);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.english-column .word-main {
  color: #5c49a5;
  font-size: clamp(17px, 2vw, 27px);
  letter-spacing: -0.02em;
}

.letter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
  padding: 3px 7px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  color: var(--ink);
  background: var(--yellow);
  font-family: var(--display-font);
  font-size: 11px;
  font-weight: 950;
}

.reel-arrow {
  position: relative;
  z-index: 8;
  display: grid;
  width: 100%;
  min-height: 50px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 4px 0 var(--ink);
  font-family: var(--display-font);
  font-size: 24px;
  font-weight: 950;
}

.reel-arrow.up {
  grid-row: 2;
  margin-bottom: 10px;
}

.reel-arrow.down {
  grid-row: 4;
  margin-top: 10px;
}

.reel-arrow:hover:not(:disabled) {
  color: var(--coral-deep);
  background: #fff8dc;
}

.reel-arrow:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.listen-button {
  grid-row: 5;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 900;
}

.picture-column {
  grid-template-rows: auto 50px minmax(250px, 1fr) 60px auto;
}

.target-lock {
  grid-row: 4 / span 2;
  align-self: center;
  justify-self: center;
  padding: 8px 12px;
  border: 1.5px dashed var(--sky-deep);
  border-radius: 999px;
  color: #2677a5;
  background: #e4f5ff;
  font-size: 12px;
  font-weight: 900;
}

.reel-column.is-wrong .reel-machine {
  animation: gentle-no 360ms ease;
}

.reel-column.is-right .reel-machine {
  box-shadow: 0 0 0 5px rgba(47, 159, 119, 0.25), inset 0 9px 18px rgba(40, 50, 62, 0.08);
}

.reel-machine.is-spinning .reel-content {
  animation: reel-rumble 260ms linear infinite;
  filter: blur(1.4px);
}

.hint-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 2px dashed var(--yellow-deep);
  border-radius: 18px;
  background: #fff5ca;
}

.hint-mascot {
  color: var(--yellow);
  font-size: 33px;
  -webkit-text-stroke: 1.5px var(--ink);
}

.hint-box p {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.game-actions {
  display: grid;
  grid-template-columns: minmax(150px, 0.6fr) minmax(270px, 1.4fr);
  justify-content: center;
  gap: 16px;
  max-width: 700px;
  margin: 24px auto 0;
}

.spin-button,
.check-button {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 66px;
  padding: 0 28px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  color: #fff;
  box-shadow: 0 6px 0 var(--ink);
  font-family: var(--display-font);
  font-size: 19px;
  font-weight: 950;
}

.spin-button {
  background: var(--coral);
}

.check-button {
  background: var(--mint-deep);
}

.spin-button:active:not(:disabled),
.check-button:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--ink);
}

.spin-icon {
  color: var(--yellow);
  font-size: 20px;
}

.hint-button {
  grid-column: 1;
  grid-row: 1;
  min-height: 66px;
}

.word-tray {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 12px 16px;
  border: 1.5px solid rgba(40, 50, 62, 0.13);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.74);
}

.tray-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 950;
}

.word-seeds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.word-seed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.word-seed.is-learned {
  border-color: rgba(47, 159, 119, 0.42);
  color: #267f60;
  background: #eaf9f1;
}

.summary-view {
  display: grid;
  width: min(calc(100% - 32px), 920px);
  place-items: center;
  padding-top: 30px;
}

.summary-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 52px 54px 44px;
  border: 3px solid var(--ink);
  border-radius: 42px;
  background: var(--paper);
  box-shadow: 0 10px 0 var(--ink), 0 30px 70px rgba(40, 50, 62, 0.17);
  text-align: center;
}

.summary-rays {
  position: absolute;
  top: -180px;
  left: 50%;
  width: 530px;
  height: 530px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 207, 83, 0.23) 0 9deg, transparent 9deg 18deg);
  transform: translateX(-50%);
}

.summary-mascot {
  position: relative;
  z-index: 2;
  width: 110px;
  height: 110px;
  margin: 0 auto 20px;
  border-radius: 34px;
  font-size: 72px;
  transform: rotate(-6deg);
}

.summary-card h1 {
  position: relative;
  z-index: 2;
  font-size: 42px;
}

.summary-message {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 0 auto 24px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.learning-badges {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
}

.learning-badges div {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 17px 10px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: #fff4c6;
  box-shadow: 0 4px 0 var(--ink);
  font-size: 13px;
}

.learning-badges div:nth-child(2) {
  background: #e6f7ef;
}

.learning-badges div:nth-child(3) {
  background: #e7f4ff;
}

.learning-badges span {
  font-size: 30px;
}

.summary-words {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.summary-word {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
}

.summary-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 15px;
}

.app-dialog {
  width: min(calc(100% - 28px), 900px);
  max-height: min(88vh, 860px);
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 16px 0 rgba(40, 50, 62, 0.35), 0 40px 100px rgba(40, 50, 62, 0.35);
}

.app-dialog::backdrop {
  background: rgba(28, 37, 47, 0.58);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  display: flex;
  max-height: min(88vh, 860px);
  flex-direction: column;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 28px 18px;
}

.dialog-header h2 {
  margin-bottom: 0;
  font-family: var(--display-font);
  font-size: 28px;
  letter-spacing: -0.05em;
}

.dialog-close {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 0 var(--ink);
  font-family: var(--display-font);
  font-size: 28px;
  line-height: 1;
}

.dialog-tabs {
  display: flex;
  gap: 4px;
  padding: 0 28px;
  border-bottom: 2px solid var(--line);
}

.dialog-tabs button {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-bottom: 4px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 900;
}

.dialog-tabs button.is-active {
  border-bottom-color: var(--coral);
  color: var(--ink);
}

.dialog-panel {
  padding: 24px 28px;
  overflow-y: auto;
}

.parent-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.parent-stats > div {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.parent-stats span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.parent-stats strong {
  font-family: var(--display-font);
  font-size: 30px;
}

.parent-stats small {
  margin-left: 4px;
  color: var(--ink-soft);
  font-size: 12px;
}

.parent-chart-card,
.review-card {
  margin-top: 16px;
  padding: 20px;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.chart-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.chart-heading span,
.chart-heading strong {
  display: block;
}

.chart-heading span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.chart-heading strong {
  font-family: var(--display-font);
  font-size: 28px;
}

.chart-heading p {
  max-width: 440px;
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: right;
}

.parent-progress-track {
  height: 15px;
}

.review-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}

.card-icon {
  display: grid;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 15px;
  background: #fff4c6;
  font-size: 27px;
}

.review-card h3 {
  margin-bottom: 3px;
  font-size: 15px;
}

.review-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.review-words {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.review-words span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f5f6;
  font-size: 12px;
  font-weight: 800;
}

.privacy-note,
.evidence-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--ink-soft);
  background: #eff8f3;
  font-size: 11px;
  line-height: 1.6;
}

.curriculum-list {
  display: grid;
  gap: 10px;
}

.curriculum-row {
  display: grid;
  grid-template-columns: 48px minmax(160px, 0.6fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.curriculum-row .curriculum-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--row-color, #fff4c6);
  font-family: var(--display-font);
  font-weight: 950;
}

.curriculum-row h3 {
  margin: 0 0 3px;
  font-size: 14px;
}

.curriculum-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.curriculum-words {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.curriculum-words span {
  padding: 4px 7px;
  border-radius: 8px;
  background: #f3f5f6;
  font-size: 10px;
  font-weight: 750;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.principle-grid article {
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.principle-grid article > span {
  font-size: 28px;
}

.principle-grid h3 {
  margin: 8px 0 5px;
  font-size: 15px;
}

.principle-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.parent-script {
  margin-top: 15px;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #fff8dd;
}

.parent-script h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.parent-script blockquote {
  margin: 8px 0;
  padding-left: 14px;
  border-left: 4px solid var(--yellow);
  color: var(--ink-soft);
  font-size: 12px;
}

.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px 22px;
  border-top: 2px solid var(--line);
  background: var(--paper);
}

.compact-dialog {
  padding-bottom: 24px;
}

.how-dialog {
  width: min(calc(100% - 28px), 680px);
}

.how-list {
  display: grid;
  gap: 12px;
  padding: 0 28px;
  margin: 5px 0 18px;
  list-style: none;
}

.how-list li {
  display: grid;
  grid-template-columns: 34px 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.how-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--coral);
  font-family: var(--display-font);
  font-size: 12px;
  font-weight: 950;
}

.how-art {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: #fff3c7;
  font-family: var(--display-font);
  font-size: 26px;
}

.how-list strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.how-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.how-tip {
  display: flex;
  gap: 11px;
  margin: 0 28px 18px;
  padding: 14px;
  border-radius: 17px;
  background: #eaf9f1;
}

.how-tip > span {
  font-size: 28px;
}

.how-tip p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.compact-dialog > .primary-button {
  width: calc(100% - 56px);
  margin: 0 auto;
}

.toast {
  position: fixed;
  z-index: 3000;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100% - 40px));
  padding: 14px 18px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 7px 0 rgba(40, 50, 62, 0.22);
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.celebration-layer {
  position: fixed;
  z-index: 2500;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 18px;
  border: 2px solid rgba(40, 50, 62, 0.22);
  border-radius: 4px;
  background: var(--confetti-color);
  animation: confetti-fall var(--duration) cubic-bezier(0.18, 0.82, 0.32, 1) forwards;
  transform: translateX(var(--start-x)) rotate(var(--rotate));
}

.noscript-message {
  position: fixed;
  z-index: 9999;
  inset: 20px;
  display: grid;
  place-items: center;
  padding: 30px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  font-weight: 900;
  text-align: center;
}

@keyframes reel-rumble {
  0% { transform: translateY(-3px); }
  50% { transform: translateY(4px); }
  100% { transform: translateY(-3px); }
}

@keyframes gentle-no {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-6px); }
  60% { transform: translateX(6px); }
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(var(--start-x), -20px, 0) rotate(0); }
  100% { opacity: 0; transform: translate3d(calc(var(--start-x) + var(--drift)), 105vh, 0) rotate(var(--rotate)); }
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
    gap: 38px;
  }

  .hero-visual {
    min-height: 470px;
  }

  .routine-strip {
    grid-template-columns: 1fr;
  }

  .stage-road {
    grid-template-columns: repeat(3, 1fr);
  }

  .stage-card:nth-child(even),
  .stage-card:nth-child(odd) {
    transform: none;
  }

  .stage-card:nth-child(3n + 2) {
    transform: translateY(14px);
  }

  .reel-machine {
    height: 245px;
  }

  .picture-art {
    width: 72px;
    height: 66px;
    font-size: 48px;
  }
}

@media (max-width: 820px) {
  .app-header,
  .view {
    width: min(calc(100% - 28px), var(--content));
  }

  .app-header {
    min-height: 78px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .round-action .action-label {
    display: none;
  }

  .round-action {
    width: 48px;
    justify-content: center;
    padding: 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    width: min(100%, 580px);
    min-height: 500px;
    margin: 0 auto;
  }

  .routine-steps {
    grid-template-columns: 1fr;
  }

  .routine-steps li {
    min-height: 78px;
  }

  .map-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .garden-progress {
    width: 100%;
  }

  .stage-road {
    grid-template-columns: repeat(2, 1fr);
  }

  .stage-card:nth-child(3n + 2) {
    transform: none;
  }

  .stage-card:nth-child(even) {
    transform: translateY(12px);
  }

  .today-card {
    grid-template-columns: auto 1fr;
  }

  .today-card .secondary-button {
    grid-column: 1 / -1;
  }

  .roulette-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .reels-grid {
    gap: 9px;
  }

  .reel-column {
    padding: 10px 8px 12px;
    border-radius: 22px;
  }

  .reel-number {
    display: none;
  }

  .reel-column > header {
    justify-content: center;
    text-align: center;
  }

  .reel-machine {
    height: 225px;
  }

  .listen-button {
    font-size: 0;
  }

  .listen-button span {
    font-size: 18px;
  }

  .target-lock {
    font-size: 10px;
  }

  .parent-stats,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .curriculum-row {
    grid-template-columns: 44px 1fr;
  }

  .curriculum-words {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .app-header {
    width: calc(100% - 20px);
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    max-width: 78px;
    line-height: 1.05;
  }

  .header-actions {
    gap: 5px;
  }

  .parent-action {
    width: 48px;
    justify-content: center;
    padding: 0;
  }

  .parent-action span:last-child {
    display: none;
  }

  .view {
    width: calc(100% - 24px);
    padding-top: 22px;
  }

  .hero-copy h1 {
    font-size: clamp(39px, 12vw, 54px);
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-visual {
    min-height: 420px;
    border-radius: 42% 42% 28px 28px;
    box-shadow: 7px 9px 0 var(--ink);
  }

  .fallback-star {
    font-size: 112px;
  }

  .fallback-elephant,
  .fallback-rabbit {
    font-size: 82px;
  }

  .mascot-bubble {
    top: 180px;
  }

  .routine-strip {
    padding: 20px;
    border-radius: 28px;
  }

  .routine-heading {
    flex-direction: column;
  }

  .stage-road-wrap {
    padding: 12px;
  }

  .stage-road {
    gap: 12px;
  }

  .stage-card {
    min-height: 190px;
    padding: 15px;
    border-radius: 22px;
  }

  .stage-card h2 {
    font-size: 17px;
  }

  .today-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .today-mascot {
    width: 58px;
    height: 58px;
    font-size: 35px;
  }

  .game-view {
    width: calc(100% - 12px);
    padding-top: 4px;
  }

  .game-topbar {
    grid-template-columns: 48px 1fr 48px;
    gap: 5px;
  }

  .icon-text-button {
    width: 48px;
    justify-content: center;
    padding: 0;
  }

  .icon-text-button span:last-child {
    display: none;
  }

  .round-progress-wrap {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .round-dot {
    width: 18px;
  }

  .game-heading {
    margin: 4px 8px 17px;
  }

  .level-badge {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 17px;
    font-size: 21px;
  }

  .game-heading h1 {
    font-size: 22px;
  }

  .game-heading p:last-child {
    display: none;
  }

  .roulette-card {
    padding: 42px 6px 16px;
    border-radius: 26px;
    box-shadow: 0 7px 0 var(--ink), 0 20px 40px rgba(40, 50, 62, 0.12);
  }

  .instruction-pill {
    max-width: calc(100% - 20px);
    min-height: 48px;
    padding: 8px 13px;
    font-size: 12px;
    white-space: normal;
  }

  .instruction-icon {
    display: none;
  }

  .reels-grid {
    gap: 5px;
  }

  .reel-column {
    grid-template-rows: auto auto minmax(185px, 1fr) auto auto;
    padding: 7px 4px 8px;
    border-width: 1.5px;
    border-radius: 17px;
  }

  .picture-column {
    grid-template-rows: auto 48px minmax(185px, 1fr) 56px auto;
  }

  .reel-column > header {
    min-height: 42px;
    padding-bottom: 5px;
  }

  .reel-column > header strong {
    font-size: 14px;
  }

  .reel-column > header small {
    font-size: 7px;
  }

  .reel-arrow {
    min-height: 48px;
    border-radius: 11px;
    font-size: 20px;
  }

  .reel-machine {
    height: 190px;
    border-width: 2px;
    border-radius: 14px;
  }

  .reel-focus {
    right: 3px;
    left: 3px;
    border-width: 2px;
    border-radius: 10px;
  }

  .reel-item {
    right: 4px;
    left: 4px;
  }

  .picture-art {
    width: 58px;
    height: 53px;
    border-radius: 16px;
    font-size: 39px;
  }

  .color-swatch {
    width: 44px;
    height: 44px;
  }

  .word-main,
  .english-column .word-main {
    font-size: clamp(14px, 4.2vw, 19px);
    letter-spacing: -0.04em;
  }

  .letter-chip {
    padding: 2px 5px;
    font-size: 8px;
  }

  .target-lock {
    padding: 6px 5px;
    font-size: 8px;
  }

  .listen-button {
    min-height: 48px;
    margin-top: 8px;
  }

  .hint-box {
    margin: 12px 5px 0;
    padding: 8px 10px;
  }

  .hint-box p {
    font-size: 12px;
  }

  .game-actions {
    grid-template-columns: minmax(112px, 0.75fr) minmax(0, 1.25fr);
    gap: 7px;
    margin: 14px 5px 0;
  }

  .spin-button,
  .check-button,
  .hint-button {
    min-height: 58px;
    padding: 0 10px;
    border-radius: 17px;
    font-size: 14px;
  }

  .spin-icon {
    display: none;
  }

  .word-tray {
    align-items: flex-start;
    flex-direction: column;
    margin: 17px 6px 0;
  }

  .summary-card {
    padding: 38px 16px 30px;
    border-radius: 30px;
  }

  .summary-card h1 {
    font-size: 30px;
  }

  .summary-mascot {
    width: 86px;
    height: 86px;
    font-size: 55px;
  }

  .learning-badges {
    gap: 6px;
  }

  .learning-badges div {
    padding: 12px 5px;
    font-size: 10px;
  }

  .summary-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .app-dialog,
  .dialog-shell {
    max-height: 92vh;
  }

  .dialog-header {
    padding: 18px 18px 12px;
  }

  .dialog-header h2 {
    font-size: 22px;
  }

  .dialog-tabs {
    padding: 0 12px;
    overflow-x: auto;
  }

  .dialog-tabs button {
    flex: 0 0 auto;
    padding: 0 10px;
    font-size: 12px;
  }

  .dialog-panel {
    padding: 18px;
  }

  .dialog-footer {
    align-items: stretch;
    flex-direction: column-reverse;
    padding: 13px 18px 18px;
  }

  .chart-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-heading p {
    text-align: left;
  }

  .how-list,
  .how-tip {
    margin-right: 18px;
    margin-left: 18px;
  }

  .how-list {
    padding: 0;
  }

  .how-list li {
    grid-template-columns: 28px 46px 1fr;
    gap: 8px;
    padding: 10px;
  }

  .how-art {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .compact-dialog > .primary-button {
    width: calc(100% - 36px);
  }
}

@media (max-width: 380px) {
  .brand-copy {
    display: none;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .stage-road {
    grid-template-columns: 1fr;
  }

  .stage-card:nth-child(even) {
    transform: none;
  }

  .reel-column > header small {
    display: none;
  }

  .word-main,
  .english-column .word-main {
    font-size: 14px;
  }
}

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