:root {
  color-scheme: light;
  --ink: #294942;
  --muted: #6f807a;
  --paper: #fffdf7;
  --line: #dfe0ca;
  --green: #4d8a6c;
  --gold: #e2b955;
  font-family: Inter, ui-rounded, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #edf6e9; overflow-x: hidden; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 8%, #f7ecc7 0 13%, transparent 13.3%), radial-gradient(circle at 96% 45%, #ddecf3 0 12%, transparent 12.3%), #edf6e9; overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 4px solid #efbd4e; outline-offset: 3px; }
img { display: block; max-width: 100%; }
.app { width: min(1120px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; padding: 22px 0 72px; }

.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.brand { min-height: 60px; border: 0; background: transparent; display: flex; align-items: center; gap: 13px; padding: 4px; cursor: pointer; text-align: left; }
.brand-mark { position: relative; width: 62px; height: 54px; display: grid; place-items: center; }
.brand-mark i { position: absolute; inset: 0 17px 14px 0; display: grid; place-items: center; color: white; background: #6c91b5; border: 4px solid white; border-radius: 15px; transform: rotate(-7deg); box-shadow: 0 7px 13px #476b7b2f; font-style: normal; font-weight: 900; }
.brand-mark b { position: absolute; right: 0; bottom: 0; width: 35px; height: 36px; display: grid; place-items: center; background: var(--gold); border: 4px solid white; border-radius: 13px; font-size: 17px; transform: rotate(5deg); }
.brand > span:last-child { display: grid; }
.brand strong { font: 800 27px/1 Georgia, serif; letter-spacing: .01em; }
.brand small { margin-top: 4px; color: #71827b; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.spark { color: #e5b844; font-size: 27px; }
.privacy-pill { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border: 2px solid #d8d9c6; border-radius: 18px; background: #fffdf6cc; font-size: 13px; font-weight: 800; }
.privacy-pill span { color: #d97d71; }
.back-button { width: 50px; height: 50px; border: 2px solid #d8d9c6; border-radius: 16px; background: var(--paper); cursor: pointer; font-size: 24px; }

.hero { min-height: 610px; display: grid; grid-template-columns: 1.06fr .94fr; overflow: hidden; border: 5px solid #dfd8ba; border-radius: 60px; background: var(--paper); box-shadow: 0 22px 40px #475e4820; }
.hero-copy { align-self: center; padding: 68px 36px 64px 78px; position: relative; z-index: 2; }
.eyebrow { margin: 0 0 18px; color: #4f876c; font: 800 14px/1.2 Georgia, serif; letter-spacing: .15em; text-transform: uppercase; }
.hero h1 { max-width: 590px; margin: 0; font: 800 clamp(48px, 6vw, 79px)/.98 Georgia, serif; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 570px; margin: 27px 0 32px; color: var(--muted); font-size: 20px; font-weight: 650; line-height: 1.5; }
.primary-button, .secondary-button { min-height: 58px; border-radius: 19px; padding: 0 27px; border: 0; cursor: pointer; font-weight: 900; }
.primary-button { color: white; background: #3f7c5e; box-shadow: 0 8px 0 #2e654b; }
.primary-button:hover { transform: translateY(-1px); }
.primary-button.compact { min-height: 48px; margin-left: auto; padding-inline: 19px; }
.secondary-button { border: 2px solid #d7d7c5; background: white; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 38px; color: #77827d; font-weight: 800; }
.hero-facts span { display: flex; align-items: baseline; gap: 7px; }
.hero-facts strong { color: var(--ink); font: 800 35px/1 Georgia, serif; }
.hero-studio { position: relative; min-height: 610px; display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(180deg, #e7f3eb 0 54%, #d8c28e 54% 56%, #b58459 56%); overflow: hidden; }
.hero-studio::before { content: ""; position: absolute; width: 330px; height: 330px; top: 42px; border-radius: 50%; background: radial-gradient(circle, #fff 0 34%, #f4efd1 35% 57%, transparent 58%); opacity: .82; }
.hero-studio img { position: relative; z-index: 2; width: 390px; max-height: 450px; object-fit: contain; filter: drop-shadow(0 15px 8px #433c2733); }
.speech-card { position: absolute; z-index: 3; top: 50px; left: 28px; display: grid; gap: 6px; padding: 20px 24px; border: 4px solid #b9afd0; border-radius: 25px; background: #fff; box-shadow: 0 10px 0 #516a5122; transform: rotate(-3deg); }
.speech-card b { font: 800 31px/1 Georgia, serif; }
.speech-card small { color: #708079; font-weight: 800; }
.studio-mic { position: absolute; z-index: 4; right: 52px; bottom: 50px; width: 74px; height: 74px; display: grid; place-items: center; border: 5px solid white; border-radius: 50%; background: #d8786a; font-size: 34px; box-shadow: 0 8px 0 #a95249; }
.sound-wave { position: absolute; z-index: 1; display: flex; align-items: center; gap: 8px; }
.sound-wave.left { left: 20px; bottom: 160px; }
.sound-wave.right { right: 20px; top: 190px; }
.sound-wave i { width: 7px; height: 28px; border-radius: 9px; background: #78a58f; }
.sound-wave i:nth-child(2) { height: 58px; }
.sound-wave i:nth-child(3) { height: 42px; }
.sound-wave i:nth-child(4) { height: 72px; }

.how-section, .levels-section { padding: 78px 0 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 31px; }
.section-heading h2 { margin: 0; font: 800 clamp(35px, 5vw, 58px)/1 Georgia, serif; letter-spacing: -.035em; }
.section-heading > p { max-width: 390px; margin: 0; color: var(--muted); font-weight: 700; line-height: 1.5; }
.steps-grid, .levels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps-grid article { min-height: 128px; display: flex; align-items: center; gap: 18px; padding: 24px; border: 2px solid #dfdfcd; border-radius: 28px; background: #fffdf8; }
.steps-grid b { flex: 0 0 53px; height: 53px; display: grid; place-items: center; border-radius: 16px; background: #e9f3e9; font: 800 24px/1 Georgia, serif; }
.steps-grid span { display: grid; gap: 6px; }
.steps-grid strong { font-size: 18px; }
.steps-grid small { color: var(--muted); line-height: 1.35; }
.level-card { position: relative; min-height: 350px; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; padding: 24px; overflow: hidden; border: 3px solid #dedcc8; border-radius: 34px; background: #fffdf8; text-align: left; cursor: pointer; box-shadow: 0 10px 0 #6d6a4d12; }
.level-card::after { content: ""; position: absolute; width: 185px; height: 185px; top: -53px; right: -45px; border-radius: 50%; background: color-mix(in srgb, var(--level), white 68%); }
.level-number { position: relative; z-index: 1; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; color: white; background: var(--level); font: 800 24px/1 Georgia, serif; }
.level-icon { position: absolute; z-index: 1; top: 24px; right: 29px; font: 800 36px/1 Georgia, serif; transform: rotate(5deg); }
.level-copy { align-self: end; display: grid; gap: 9px; }
.level-copy small { color: var(--level); font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.level-copy strong { font: 800 29px/1.08 Georgia, serif; }
.level-copy span { color: var(--muted); line-height: 1.45; }
.level-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 2px dashed #dddac5; }
.level-footer em { color: var(--muted); font-style: normal; font-size: 13px; font-weight: 800; }
.level-footer b { color: var(--level); font-size: 13px; }
.adult-note { min-height: 150px; display: flex; align-items: center; gap: 26px; margin-top: 64px; padding: 18px 35px; border: 3px solid #d8d4ba; border-radius: 34px; background: #fff8dd; }
.adult-note img { width: 116px; height: 116px; object-fit: contain; }
.adult-note p { display: grid; gap: 7px; margin: 0; }
.adult-note strong { font: 800 23px/1 Georgia, serif; }
.adult-note small { color: var(--muted); font-size: 15px; line-height: 1.5; }

.game-head { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin: 18px 0 18px; }
.game-head h1 { margin: 0; font: 800 clamp(42px, 6vw, 67px)/1 Georgia, serif; letter-spacing: -.04em; }
.game-head p:last-child { margin: 12px 0 0; color: var(--muted); font-weight: 700; }
.round-badge { flex: 0 0 92px; height: 86px; display: grid; place-items: center; align-content: center; border: 3px solid #d9d4b8; border-radius: 27px; background: var(--paper); }
.round-badge strong { font: 800 30px/1 Georgia, serif; }
.round-badge span { color: var(--muted); font-size: 12px; font-weight: 800; }
.progress-track { position: relative; height: 17px; margin-bottom: 18px; overflow: hidden; border-radius: 20px; background: #dcdccf; }
.progress-track > i { position: absolute; inset: 0 auto 0 0; background: var(--level); transition: width .25s ease; }
.progress-track > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-around; }
.progress-track span span { width: 8px; height: 8px; border: 2px solid white; border-radius: 50%; background: transparent; }
.progress-track span .done, .progress-track span .current { background: white; }
.studio-workspace { display: grid; grid-template-columns: .92fr 1.08fr; gap: 19px; }
.character-stage, .speech-panel { min-width: 0; min-height: 650px; border: 3px solid #dcd7bb; border-radius: 40px; background: var(--paper); box-shadow: 0 15px 28px #43513a18; }
.character-stage { position: relative; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; background: linear-gradient(180deg, #e7f3ef 0 65%, #bd8e5f 65%); }
.character-stage::before { content: ""; position: absolute; width: 360px; height: 360px; top: 148px; border-radius: 50%; background: #f6efc9; }
.stage-label { position: absolute; top: 24px; left: 27px; color: #658574; font: 800 12px/1 Georgia, serif; letter-spacing: .15em; }
.phrase-bubble { position: absolute; z-index: 3; top: 62px; left: 24px; right: 24px; display: grid; gap: 7px; padding: 20px 23px; border: 4px solid #b9afd0; border-radius: 26px; background: white; }
.phrase-bubble small { color: #79847e; font-weight: 800; }
.phrase-bubble strong { font: 800 clamp(28px, 4vw, 41px)/1.08 Georgia, serif; }
.phrase-bubble span { color: #668071; font-size: 13px; font-weight: 700; }
.character-stage > img { position: relative; z-index: 2; width: 390px; height: 430px; object-fit: contain; filter: drop-shadow(0 14px 8px #473b2e35); }
.floor-shadow { position: absolute; z-index: 1; bottom: 45px; width: 320px; height: 45px; border-radius: 50%; background: #4b392734; filter: blur(5px); }
.listen-button { position: absolute; z-index: 4; right: 23px; bottom: 22px; min-width: 150px; min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 4px solid white; border-radius: 20px; background: #e8b84e; box-shadow: 0 7px 0 #b3862e; cursor: pointer; }
.listen-button span { font-size: 24px; }
.speech-panel { padding: 28px; }
.panel-heading { display: flex; justify-content: space-between; gap: 18px; }
.panel-heading h2 { margin: 0; font: 800 clamp(29px, 4vw, 43px)/1.08 Georgia, serif; }
.panel-heading > span { font-size: 42px; }
.record-button { width: 100%; min-height: 138px; display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 18px; margin-top: 24px; padding: 20px; border: 3px solid #d6d3bd; border-radius: 29px; background: #f7f3e6; cursor: pointer; text-align: left; }
.record-button > span { grid-row: 1 / 3; width: 72px; height: 72px; display: grid; place-items: center; border: 5px solid white; border-radius: 50%; color: white; background: #cf7167; box-shadow: 0 6px 0 #a95049; font-size: 29px; }
.record-button strong { align-self: end; font: 800 28px/1 Georgia, serif; }
.record-button small { align-self: start; margin-top: 7px; color: var(--muted); font-weight: 700; }
.record-button.listening { border-color: #ce7468; background: #fff0ed; }
.wave-meter { height: 38px; display: flex; justify-content: center; align-items: center; gap: 7px; margin: 10px 0 3px; }
.wave-meter i { width: 6px; height: 10px; border-radius: 8px; background: #8a9b94; }
.wave-meter.active i { animation: wave .7s ease-in-out infinite alternate; animation-delay: calc(var(--i) * 45ms); background: #ce7167; }
@keyframes wave { to { height: 34px; } }
.text-mode-button, .hint-button { min-height: 48px; border: 0; border-radius: 16px; cursor: pointer; font-weight: 900; }
.text-mode-button { width: 100%; color: #5f736b; background: #e9efea; }
.manual-form { display: grid; gap: 8px; margin-top: 12px; }
.manual-form label { font-size: 13px; font-weight: 900; }
.manual-form > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.manual-form input { min-width: 0; min-height: 52px; padding: 0 16px; border: 2px solid #cfcebb; border-radius: 15px; background: white; }
.manual-form button { min-height: 52px; padding: 0 16px; border: 0; border-radius: 15px; color: white; background: #506f92; cursor: pointer; font-weight: 900; }
.hint-button { margin-top: 13px; padding: 0 18px; color: #6c5a29; background: #fff0bd; }
.word-hint { min-height: 28px; margin: 10px 0; color: #79847f; font-size: 13px; }
.word-hint.visible { color: #506f65; }
.feedback { min-height: 86px; display: flex; align-items: center; gap: 13px; margin-top: 10px; padding: 13px 15px; border: 2px solid #d8d7c3; border-radius: 21px; background: #f4f2e8; }
.feedback > span { flex: 0 0 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: white; font-size: 23px; font-weight: 900; }
.feedback p { display: grid; gap: 5px; margin: 0; }
.feedback strong { font-size: 15px; }
.feedback small { color: var(--muted); line-height: 1.35; }
.feedback.good { border-color: #83ad91; background: #e9f5e9; }
.feedback.retry { border-color: #d7a493; background: #fff1ec; }
.privacy-note { margin: 13px 0 0; color: #7d8984; font-size: 12px; font-weight: 700; }
.privacy-note span { color: #cf7167; }

.result-card { display: grid; grid-template-columns: .83fr 1.17fr; gap: 38px; padding: 55px; border: 4px solid #dcd5b8; border-radius: 48px; background: var(--paper); box-shadow: 0 18px 34px #4755421b; }
.result-art { position: relative; min-height: 650px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 34px; background: linear-gradient(180deg, #eaf4e8, #fff3c9); }
.result-art img { width: 380px; height: 500px; object-fit: contain; }
.result-bubble { position: absolute; z-index: 2; top: 38px; left: 30px; right: 30px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 22px; border: 4px solid #b9afd0; border-radius: 25px; background: white; }
.result-bubble b { font: 800 28px/1 Georgia, serif; }
.result-bubble i { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: white; background: #5a9b73; font-style: normal; }
.result-copy { align-self: center; min-width: 0; }
.result-copy h1 { margin: 0; font: 800 clamp(46px, 6vw, 70px)/.95 Georgia, serif; letter-spacing: -.045em; }
.result-copy > p:not(.eyebrow) { color: var(--muted); font-weight: 700; line-height: 1.45; }
.result-list { display: grid; gap: 7px; margin: 22px 0; }
.result-list span { display: grid; gap: 2px; padding: 9px 12px; border: 2px solid #dfddcd; border-radius: 13px; background: #f7f5ed; }
.result-list strong { font-size: 14px; }
.result-list small { color: var(--muted); }
.result-stars { color: #e6b73e; font-size: 35px; letter-spacing: 5px; }
.result-stars span { color: #dcd9c8; }
.result-stats { display: flex; gap: 14px; margin: 20px 0; }
.result-stats > span { min-width: 95px; display: grid; gap: 3px; padding: 12px; border-radius: 16px; background: #eef3e9; text-align: center; }
.result-stats strong { font: 800 27px/1 Georgia, serif; }
.result-stats small { color: var(--muted); font-weight: 800; }
.result-actions { display: flex; gap: 10px; }

.error-card { min-height: 420px; display: grid; place-items: center; align-content: center; gap: 18px; border-radius: 40px; background: white; }
.error-card span { font-size: 70px; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 55px; }
  .hero-studio { min-height: 510px; }
  .steps-grid { grid-template-columns: 1fr; }
  .levels-grid { grid-template-columns: 1fr 1fr; }
  .studio-workspace { grid-template-columns: 1fr; }
  .character-stage, .speech-panel { min-height: 590px; }
  .result-card { grid-template-columns: 1fr; }
  .result-art { min-height: 520px; }
}

@media (max-width: 700px) {
  .app { width: min(1120px, calc(100% - 20px)); padding-top: 10px; }
  .topbar { min-height: 64px; margin-bottom: 14px; }
  .brand-mark { width: 49px; height: 45px; }
  .brand strong { font-size: 19px; }
  .brand small { display: none; }
  .privacy-pill { display: none; }
  .hero { border-width: 3px; border-radius: 37px; }
  .hero-copy { padding: 38px 24px 32px; }
  .hero h1 { font-size: clamp(43px, 14vw, 65px); }
  .hero-copy > p:not(.eyebrow) { font-size: 17px; }
  .hero-studio { min-height: 430px; }
  .hero-studio img { width: 310px; height: 350px; }
  .speech-card { top: 22px; left: 18px; }
  .studio-mic { right: 22px; }
  .how-section, .levels-section { padding-top: 57px; }
  .section-heading { display: grid; }
  .levels-grid { grid-template-columns: 1fr; }
  .adult-note { align-items: flex-start; padding: 16px; }
  .adult-note img { width: 78px; height: 78px; }
  .game-head { align-items: start; }
  .game-head h1 { font-size: 43px; }
  .round-badge { flex-basis: 76px; height: 74px; }
  .character-stage, .speech-panel { min-height: 550px; border-radius: 30px; }
  .phrase-bubble { left: 13px; right: 13px; padding: 17px; }
  .character-stage > img { width: 320px; height: 380px; }
  .speech-panel { min-height: 0; padding: 21px 14px; }
  .panel-heading h2 { font-size: 31px; }
  .record-button { grid-template-columns: 58px 1fr; min-height: 122px; padding: 15px; }
  .record-button > span { width: 58px; height: 58px; }
  .record-button strong { font-size: 23px; }
  .manual-form > div { grid-template-columns: 1fr; }
  .manual-form button { width: 100%; }
  .feedback { align-items: flex-start; flex-wrap: wrap; }
  .feedback .primary-button { width: 100%; margin-left: 0; }
  .result-card { padding: 16px 13px 28px; border-radius: 34px; }
  .result-art { min-height: 455px; }
  .result-art img { height: 390px; }
  .result-copy h1 { font-size: 47px; }
  .result-stats { flex-wrap: wrap; }
  .result-stats > span { flex: 1; }
  .result-actions { display: grid; }
  .result-actions button { width: 100%; }
}

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