:root {
  color-scheme: light;
  --ink: #292846;
  --muted: #89879b;
  --purple: #6a5bd1;
  --purple-dark: #5546bd;
  --lavender: #f0edff;
  --coral: #ff9879;
  --cream: #fffaf0;
  --line: #efedf4;
  --green: #398e71;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 2% 20%, rgba(255, 223, 185, .3), transparent 28rem),
    radial-gradient(ellipse at 100% 42%, rgba(224, 218, 255, .36), transparent 34rem),
    var(--cream);
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #f2ae45;
  outline-offset: 3px;
}

.page-shell {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(64, 56, 103, .08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  color: #5b529c;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-name {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.5px;
}

.brand-name span {
  color: var(--purple);
}

.topbar-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7e7995;
  font-size: 13px;
  font-weight: 600;
}

.sun-icon {
  color: #f1a94c;
  font-size: 18px;
}

.how-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #e8e4f2;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: #605c78;
  font-size: 12px;
  font-weight: 700;
  transition: border-color .2s, background .2s, transform .2s;
}

.how-button:hover {
  transform: translateY(-1px);
  border-color: #c9c1ef;
  background: white;
}

.help-icon {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lavender);
  color: var(--purple);
  font-size: 11px;
}

.welcome-row {
  position: relative;
  min-height: 236px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 44px 20px;
  margin: 18px 0 22px;
  overflow: hidden;
  border: 1px solid rgba(239, 218, 183, .6);
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 79% 100%, rgba(255, 215, 169, .58), transparent 32%),
    linear-gradient(110deg, #fff4e3, #fff6ec 53%, #fff0e2);
}

.welcome-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 11px;
  color: #a07a54;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.45px;
}

.sparkle {
  margin-right: 5px;
  color: #e6a650;
  font-size: 14px;
  vertical-align: -1px;
}

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

h1 {
  margin-bottom: 9px;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: clamp(32px, 4vw, 43px);
  font-weight: 600;
  letter-spacing: -.6px;
  line-height: 1.04;
}

h1 span {
  color: var(--purple);
}

.welcome-description {
  margin-bottom: 0;
  color: #777186;
  font-size: 13px;
}

.welcome-art {
  position: relative;
  width: 280px;
  height: 190px;
  flex: 0 0 280px;
}

.art-book {
  position: absolute;
  top: 28px;
  left: 79px;
  display: grid;
  width: 120px;
  height: 108px;
  place-items: center;
  border: 1px solid rgba(105, 88, 189, .12);
  border-radius: 23px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 16px 35px rgba(137, 108, 72, .12);
  font-size: 57px;
  transform: rotate(-7deg);
}

.art-sun {
  position: absolute;
  top: 12px;
  right: 28px;
  color: #efa94f;
  font-size: 44px;
}

.art-star {
  position: absolute;
  color: #a18be4;
}

.art-star-one {
  top: 40px;
  left: 36px;
  font-size: 23px;
}

.art-star-two {
  right: 44px;
  bottom: 34px;
  color: #e99075;
  font-size: 27px;
}

.art-pencil {
  position: absolute;
  right: 41px;
  bottom: 32px;
  color: #d98258;
  font-size: 56px;
  transform: rotate(20deg);
}

.art-caption {
  position: absolute;
  bottom: 7px;
  left: 56px;
  padding: 7px 12px;
  border: 1px solid rgba(238, 210, 170, .7);
  border-radius: 999px;
  background: #fffaf0;
  color: #a47d4f;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 13px;
  transform: rotate(-3deg);
}

.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  align-items: stretch;
  gap: 20px;
}

.practice-card,
.streak-card,
.coach-card {
  border: 1px solid #eeebf3;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 12px 35px rgba(62, 48, 101, .045);
}

.practice-card {
  min-width: 0;
  padding: 22px 31px 0;
  border-radius: 21px;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lesson-label,
.word-counter {
  color: #89859a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.05px;
}

.lesson-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.lesson-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.word-counter {
  color: var(--purple);
  white-space: nowrap;
}

.word-counter span {
  color: #aaa6b7;
}

.progress-track {
  position: relative;
  height: 5px;
  margin: 14px 0 20px;
  border-radius: 999px;
  background: #f0eef5;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9d8ae8, #6e5ed0);
  transition: width .35s ease;
}

.progress-sparkle {
  position: absolute;
  top: 50%;
  left: 0;
  color: #6e5ed0;
  font-size: 13px;
  transform: translate(-50%, -50%);
  transition: left .35s ease;
}

.prompt-area {
  text-align: center;
}

.listen-orb {
  position: relative;
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  margin: 0 auto 9px;
  border: 1px solid #e9e3ff;
  border-radius: 18px;
  background: #f1eeff;
  color: #7164ce;
  transform: rotate(-4deg);
}

.listen-orb svg {
  width: 31px;
  height: 31px;
  transform: rotate(4deg);
}

.orb-sparkle {
  position: absolute;
  top: -7px;
  right: -7px;
  color: #efa951;
  font-size: 15px;
}

.prompt-area h2,
.help-dialog h2 {
  margin-bottom: 4px;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.2px;
}

.prompt-description {
  margin-bottom: 13px;
  color: #918da0;
  font-size: 11px;
}

.listen-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
}

.listen-button,
.sentence-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  transition: transform .18s, background .18s, box-shadow .18s;
}

.listen-button:hover,
.sentence-button:hover,
.hint-button:hover,
.check-button:hover {
  transform: translateY(-1px);
}

.listen-button {
  padding: 0 13px;
  border: 0;
  background: var(--purple);
  color: white;
  box-shadow: 0 4px 10px rgba(106, 91, 209, .2);
}

.listen-button:hover {
  background: var(--purple-dark);
}

.listen-button svg {
  width: 16px;
  height: 16px;
}

.sentence-button {
  padding: 0 10px;
  border: 1px solid #ece9f2;
  background: white;
  color: #77728b;
}

.sentence-button span {
  color: var(--purple);
  font-size: 14px;
}

.audio-notice {
  margin: 9px 0 0;
  color: #9a6d35;
  font-size: 10px;
}

.answer-form {
  max-width: 460px;
  margin: 19px auto 0;
}

.answer-form label {
  display: block;
  margin-bottom: 6px;
  color: #55516d;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 14px;
  border: 1px solid #e8e5ee;
  border-radius: 11px;
  background: #fdfcff;
  color: var(--ink);
  font-size: 12px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-wrap input::placeholder {
  color: #b7b3c2;
}

.input-wrap input:focus {
  border-color: #a59ae2;
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(106, 91, 209, .1);
}

.input-wrap input:disabled {
  background: #f8f7fb;
}

.input-decoration {
  position: absolute;
  top: 7px;
  right: 14px;
  color: #c2bce1;
  font-size: 22px;
  transform: rotate(-22deg);
  pointer-events: none;
}

.feedback {
  min-height: 15px;
  margin: 5px 0 0;
  color: #b86754;
  font-size: 10px;
  text-align: left;
}

.feedback.success {
  color: var(--green);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.hint-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #77728a;
  font-size: 10px;
  font-weight: 700;
  transition: transform .18s;
}

.hint-button span {
  color: #e6a44e;
  font-size: 14px;
}

.check-button {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--purple);
  color: white;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 5px 13px rgba(106, 91, 209, .18);
  transition: transform .18s, background .18s;
}

.check-button:hover {
  background: var(--purple-dark);
}

.check-button span {
  font-size: 15px;
  line-height: 1;
}

.next-button {
  background: var(--green);
  box-shadow: 0 5px 13px rgba(57, 142, 113, .16);
}

.next-button:hover {
  background: #2e795f;
}

[hidden] {
  display: none !important;
}

.card-footer {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  border-top: 1px solid #f1eff5;
  color: #aaa6b6;
  font-size: 9px;
}

.kind-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.kind-note span {
  font-size: 12px;
}

.keyboard-note {
  white-space: nowrap;
}

kbd {
  padding: 2px 5px;
  border: 1px solid #eae8ef;
  border-radius: 4px;
  background: #faf9fc;
  color: #8d889d;
  font-family: inherit;
  font-size: 8px;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.streak-card {
  padding: 17px 18px 14px;
  border-radius: 18px;
  background: linear-gradient(150deg, #fff, #fffcf8);
}

.streak-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak-icon {
  font-size: 17px;
}

.streak-label {
  color: #9691a4;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
}

.streak-number {
  margin: 8px 0 0;
  color: #403764;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 35px;
  font-weight: 600;
  line-height: 1;
}

.streak-total {
  color: #bab5c5;
  font-size: 17px;
}

.streak-caption {
  margin: 3px 0 11px;
  color: #9994a7;
  font-size: 9px;
}

.score-dots {
  display: flex;
  gap: 6px;
}

.score-dots span {
  width: 19px;
  height: 19px;
  display: grid;
  flex: 1 1 0;
  place-items: center;
  border: 1px solid #efedf4;
  border-radius: 7px;
  background: #faf9fc;
  transition: background .2s, border-color .2s, transform .2s;
}

.score-dots span.filled {
  border-color: #f6e2b9;
  background: #fff3d4;
}

.score-dots span.filled::after {
  content: "★";
  color: #eaa63c;
  font-size: 11px;
}

.streak-message {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f8f5ff;
  color: #77708d;
  font-size: 9px;
}

.streak-message span {
  margin-right: 4px;
}

.coach-card {
  position: relative;
  min-height: 138px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-content: center;
  column-gap: 12px;
  padding: 16px;
  overflow: hidden;
  border-color: #e9e4fa;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(223, 215, 255, .6), transparent 50%),
    #f6f3ff;
}

.coach-face {
  position: relative;
  width: 48px;
  height: 48px;
  grid-row: span 2;
  align-self: center;
  border: 1px solid rgba(109, 94, 195, .13);
  border-radius: 17px;
  background: #e5ddff;
  transform: rotate(-5deg);
}

.coach-eye {
  position: absolute;
  top: 20px;
  width: 4px;
  height: 5px;
  border-radius: 50%;
  background: #544883;
}

.eye-left {
  left: 15px;
}

.eye-right {
  right: 14px;
}

.coach-smile {
  position: absolute;
  left: 18px;
  bottom: 12px;
  width: 12px;
  height: 6px;
  border-bottom: 2px solid #8a6291;
  border-radius: 50%;
}

.coach-cheek {
  position: absolute;
  top: 28px;
  width: 6px;
  height: 4px;
  border-radius: 50%;
  background: #eda4ab;
}

.cheek-left {
  left: 8px;
}

.coach-leaf {
  position: absolute;
  top: -9px;
  right: 2px;
  color: #e5a84c;
  font-size: 16px;
}

.coach-quote {
  align-self: end;
  margin: 0;
  color: #5f587d;
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  font-size: 14px;
  line-height: 1.32;
}

.coach-signature {
  margin-top: 6px;
  color: #9690aa;
  font-size: 9px;
}

.tiny-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px dashed #e9ddc9;
  border-radius: 14px;
  background: rgba(255, 252, 245, .8);
}

.tip-icon {
  font-size: 22px;
}

.tiny-tip p {
  margin: 0;
  color: #999080;
  font-size: 9px;
  line-height: 1.55;
}

.tiny-tip strong {
  color: #776d58;
  font-size: 10px;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 4px 22px;
  color: #aaa5b3;
  font-size: 9px;
}

.page-footer span span {
  color: #e99e8d;
}

.help-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 30px;
  border: 1px solid #e9e4f2;
  border-radius: 22px;
  background: #fffdfa;
  color: var(--ink);
  box-shadow: 0 25px 80px rgba(42, 34, 76, .2);
}

.help-dialog::backdrop {
  background: rgba(43, 38, 65, .35);
  backdrop-filter: blur(3px);
}

.help-dialog form {
  position: relative;
}

.dialog-close {
  position: absolute;
  top: -16px;
  right: -12px;
  width: 31px;
  height: 31px;
  border: 1px solid #efedf3;
  border-radius: 50%;
  background: white;
  color: #89849a;
  font-size: 22px;
  line-height: 1;
}

.dialog-icon {
  display: block;
  margin-bottom: 10px;
  font-size: 31px;
}

.help-dialog .eyebrow {
  margin-bottom: 5px;
  color: #a18ab7;
}

.help-dialog h2 {
  margin-bottom: 17px;
  font-size: 28px;
}

.help-dialog ol {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0 0 20px;
  list-style: none;
}

.help-dialog li {
  display: grid;
  grid-template-columns: 25px 1fr;
  align-items: start;
  gap: 9px;
  color: #777286;
  font-size: 12px;
  line-height: 1.5;
}

.help-dialog li span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--lavender);
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
}

.help-dialog li strong {
  color: #514a6d;
}

.dialog-got-it {
  width: 100%;
}

.trophy-icon {
  font-size: 30px;
}

@media (min-width: 1280px) {
  .page-shell {
    width: min(1120px, calc(100% - 100px));
  }

  .welcome-row {
    margin-top: 22px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 36px, 620px);
  }

  .topbar {
    min-height: 70px;
  }

  .topbar-note {
    display: none;
  }

  .welcome-row {
    min-height: 196px;
    padding: 24px 24px 20px;
    margin-top: 14px;
  }

  h1 {
    font-size: clamp(30px, 6vw, 39px);
  }

  .welcome-art {
    width: 180px;
    height: 150px;
    flex-basis: 180px;
    margin-right: -15px;
    transform: scale(.82);
    transform-origin: center right;
  }

  .practice-layout {
    grid-template-columns: minmax(0, 1fr) 238px;
    gap: 13px;
  }

  .practice-card {
    padding-right: 21px;
    padding-left: 21px;
  }

  .streak-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .score-dots {
    gap: 4px;
  }

  .coach-card {
    grid-template-columns: 39px 1fr;
    column-gap: 8px;
    padding: 13px;
  }

  .coach-face {
    width: 39px;
    height: 42px;
  }

  .coach-quote {
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 28px, 440px);
  }

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

  .brand-name {
    font-size: 18px;
  }

  .how-button {
    padding: 8px 11px;
    font-size: 11px;
  }

  .welcome-row {
    min-height: 0;
    padding: 22px 20px;
    margin: 13px 0 14px;
    border-radius: 20px;
  }

  .welcome-copy {
    max-width: 100%;
  }

  .welcome-copy .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }

  h1 {
    font-size: clamp(29px, 8vw, 36px);
  }

  .welcome-description {
    max-width: 265px;
    font-size: 11px;
    line-height: 1.5;
  }

  .welcome-art {
    position: absolute;
    width: 120px;
    height: 130px;
    flex: none;
    right: 0;
    margin: 0;
    opacity: .46;
    transform: scale(.67);
    transform-origin: right center;
  }

  .practice-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .practice-card {
    padding: 19px 18px 0;
    border-radius: 18px;
  }

  .lesson-label,
  .word-counter {
    font-size: 8px;
    letter-spacing: .75px;
  }

  .progress-track {
    margin-top: 12px;
    margin-bottom: 17px;
  }

  .listen-actions {
    gap: 7px;
  }

  .listen-button,
  .sentence-button {
    font-size: 9px;
  }

  .sentence-button {
    padding-right: 8px;
    padding-left: 8px;
  }

  .answer-form {
    margin-top: 16px;
  }

  .card-footer {
    font-size: 8px;
  }

  .side-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .streak-card {
    padding: 13px;
    border-radius: 15px;
  }

  .streak-label {
    font-size: 8px;
    letter-spacing: .7px;
  }

  .score-dots {
    gap: 3px;
  }

  .score-dots span {
    min-width: 12px;
    height: 16px;
    border-radius: 5px;
  }

  .score-dots span.filled::after {
    font-size: 9px;
  }

  .streak-message {
    padding: 8px 7px;
    font-size: 8px;
    line-height: 1.4;
  }

  .coach-card {
    min-height: auto;
    grid-template-columns: 33px 1fr;
    padding: 12px 10px;
    border-radius: 15px;
  }

  .coach-face {
    width: 33px;
    height: 36px;
  }

  .coach-eye {
    top: 15px;
  }

  .eye-left {
    left: 9px;
  }

  .eye-right {
    right: 8px;
  }

  .coach-smile {
    left: 11px;
    bottom: 8px;
  }

  .coach-cheek {
    top: 23px;
  }

  .coach-quote {
    font-size: 11px;
  }

  .coach-signature {
    font-size: 8px;
  }

  .tiny-tip {
    grid-column: 1 / -1;
    padding: 8px 11px;
  }

  .page-footer {
    padding-top: 13px;
  }
}

@media (max-width: 360px) {
  .page-shell {
    width: calc(100% - 22px);
  }

  .brand {
    gap: 6px;
  }

  .brand-name {
    font-size: 16px;
  }

  .how-button {
    gap: 5px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .practice-card {
    padding-right: 13px;
    padding-left: 13px;
  }

  .listen-button,
  .sentence-button {
    gap: 4px;
    font-size: 8px;
  }

  .form-actions {
    gap: 4px;
  }

  .hint-button {
    gap: 3px;
    font-size: 9px;
  }

  .check-button {
    gap: 7px;
    padding: 0 11px;
    font-size: 9px;
  }
}

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