:root {
  font-family: ui-rounded, "Avenir Next", Avenir, system-ui, sans-serif;
  color: #30264d;
  background: #fcf9f2;
  font-synthesis: none;
  --purple: #5546ab;
  --lavender: #ece7fa;
  --yellow: #ffd66b;
  --muted: #746d83;
  --green: #226b57;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  min-height: 48px;
  border-radius: 16px;
  padding: 12px 22px;
  color: inherit;
  background: var(--lavender);
  font-weight: 750;
  touch-action: manipulation;
}
button:hover {
  filter: brightness(0.97);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #da8c25;
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
header {
  max-width: 1180px;
  margin: auto;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-size: 23px;
  font-weight: 850;
  color: var(--purple);
  text-decoration: none;
  letter-spacing: -0.7px;
}
.brand-star {
  color: #cb8b18;
  font-size: 32px;
  vertical-align: -2px;
}
.quiet {
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  padding: 10px;
}
.primary {
  background: var(--purple);
  color: white;
  box-shadow: 0 4px 0 #3b307a;
}
.secondary {
  background: #fff;
  border: 1px solid #e0daec;
}
.small {
  font-size: 14px;
  padding: 8px 14px;
  min-height: 44px;
}
main {
  max-width: 1080px;
  margin: 16px auto 70px;
  padding: 0 30px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 850;
  color: #85779d;
}
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 30px 24px 28px;
}
.hero h1 {
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -2px;
  margin: 18px 0;
}
.hero p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 440px;
}
.hero-art {
  height: 250px;
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(
    ellipse,
    #eae3fa 0%,
    #f4eef8 46%,
    transparent 70%
  );
  isolation: isolate;
}
.mascot {
  width: 185px;
  height: 185px;
  filter: drop-shadow(0 13px 0 #e7dded);
  transform: rotate(-7deg);
}
.float {
  position: absolute;
  font-size: 25px;
  color: #c39138;
}
.float.one {
  left: 8%;
  top: 15%;
  transform: rotate(-15deg);
}
.float.two {
  right: 7%;
  bottom: 12%;
  font-size: 40px;
}
.orbit {
  position: absolute;
  right: 4%;
  top: 14%;
  background: white;
  border-radius: 16px;
  padding: 12px;
  color: var(--purple);
  transform: rotate(12deg);
  font-weight: 850;
  box-shadow: 0 5px 15px #5546ab12;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 16px;
}
.section-title h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  margin: 0;
}
.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.profiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.profile {
  border: 2px solid #e9e3ef;
  border-radius: 24px;
  background: white;
  text-align: left;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 126px;
}
.profile:hover {
  border-color: #a99acc;
}
.avatar {
  display: grid;
  place-items: center;
  font-size: 36px;
  background: #fff2cb;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  flex-shrink: 0;
}
.profile:nth-child(2) .avatar {
  background: #e3f0eb;
}
.profile strong {
  display: block;
  font-size: 23px;
}
.profile .sub {
  color: var(--muted);
  font-size: 14px;
  display: block;
  margin-top: 8px;
}
.arrow {
  margin-left: auto;
  font-size: 24px;
  color: var(--purple);
}
.week-card {
  margin-top: 28px;
  background: #eeebf7;
  border-radius: 22px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.week-card .book {
  font-size: 30px;
}
.week-card h3 {
  margin: 3px 0 7px;
  font-size: 18px;
}
.week-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.pill {
  display: inline-block;
  border-radius: 20px;
  background: #fff5d7;
  color: #865e16;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 750;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.topline h1 {
  font-size: 29px;
  margin: 0;
  letter-spacing: -1px;
}
.games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.game {
  background: #fff;
  border: 1px solid #e6dfed;
  border-radius: 24px;
  padding: 26px;
  text-align: left;
  min-height: 205px;
}
.game .symbol {
  font-size: 35px;
  display: block;
  margin-bottom: 18px;
}
.game strong {
  font-size: 23px;
  display: block;
}
.game p {
  font-weight: 400;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0;
}
.game:nth-child(2) {
  background: #edf5ef;
}
.game:nth-child(3) {
  background: #fff2d6;
}
.game:nth-child(4) {
  background: #efecfa;
}
.play-card {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e6dfed;
  border-radius: 28px;
  padding: 30px;
  text-align: center;
}
.progress-track {
  height: 8px;
  background: #ede8f4;
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0 30px;
}
.progress-track span {
  display: block;
  height: 100%;
  background: #9684cd;
  transition: width 0.3s;
}
.listen {
  font-size: 20px;
  padding: 18px 30px;
  margin: 16px 0;
  background: #ece7fa;
}
.instruction {
  color: var(--muted);
  line-height: 1.6;
}
.answer {
  display: block;
  margin: 22px auto;
  width: min(100%, 480px);
  border: 2px solid #cfc4e0;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  font-size: 30px;
  color: var(--purple);
  letter-spacing: 4px;
  background: #fefcfa;
}
.keyboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin: 22px -12px;
}
.keyrow {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.key {
  padding: 0;
  width: 9%;
  max-width: 58px;
  min-width: 25px;
  font-size: 22px;
  min-height: 53px;
  border-radius: 10px;
  border-bottom: 3px solid #d4c9e6;
}
.key.wide {
  width: 110px;
  max-width: none;
  font-size: 14px;
}
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px auto;
  max-width: 540px;
}
.choice {
  font-size: 26px;
  background: #f3eff9;
  min-height: 78px;
}
.feedback {
  min-height: 36px;
  margin: 16px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--green);
}
.feedback.retry {
  color: #8c6017;
}
.gold-star {
  display: inline-block;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: #ad6500;
  clip-path: polygon(
    50% 0%,
    62% 34%,
    98% 36%,
    70% 59%,
    80% 96%,
    50% 75%,
    20% 96%,
    30% 59%,
    2% 36%,
    38% 34%
  );
}
.star-count {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 10px 14px;
  border: 2px solid #e3ae35;
  border-radius: 20px;
  background: #fff0b3;
  color: #633b00;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}
.profile .star-count {
  font-size: clamp(16px, 2.5vw, 22px);
}
.topline {
  flex-wrap: wrap;
}
.feedback.success-pop .gold-star {
  display: block;
  width: 76px;
  height: 76px;
  margin: 12px auto;
  background: #c47800;
}
.done-star {
  width: 120px;
  height: 120px;
  display: block;
  margin: 20px auto;
  background: #c47800;
}
@media (max-width: 600px) {
  .profile .star-count {
    padding: 8px;
    gap: 6px;
  }
  .profile .gold-star {
    width: 30px;
    height: 30px;
  }
}
.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.parent {
  max-width: 900px;
  margin: auto;
}
.panel {
  background: #fff;
  border: 1px solid #e6dfed;
  padding: 24px;
  border-radius: 22px;
  margin: 20px 0;
}
.panel h2 {
  margin-top: 0;
  font-size: 22px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
label {
  display: block;
  font-weight: 700;
  line-height: 1.6;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  border: 1px solid #cfc4e0;
  border-radius: 12px;
  padding: 12px;
  background: #fefdfb;
  color: inherit;
  margin: 7px 0 18px;
}
textarea {
  min-height: 150px;
  resize: vertical;
}
label small,
.help {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
}
.alert {
  padding: 14px 18px;
  background: #fff2d6;
  border-radius: 14px;
  color: #6c4e1f;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.word-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #eee8f3;
}
.word-row strong {
  min-width: 70px;
}
.word-row input {
  width: 210px;
  margin: 0;
  font-size: 12px;
}
.word-row span {
  font-size: 13px;
  color: var(--muted);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #eee8f3;
}
.table-wrap {
  overflow: auto;
}
.retry-label {
  color: #956314;
}
.empty {
  padding: 25px;
  background: #f3eff9;
  border-radius: 16px;
  color: var(--muted);
}
footer {
  max-width: 1080px;
  padding: 24px 30px;
  margin: auto;
  border-top: 1px solid #e8e2ed;
  color: #847b90;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
#notice:not(:empty) {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #30264d;
  color: white;
  padding: 16px 24px;
  border-radius: 16px;
  max-width: 90%;
  z-index: 10;
  box-shadow: 0 5px 25px #30264d44;
}
progress {
  width: 100%;
}
.success-pop {
  animation: pop 0.4s ease-out;
}
@keyframes pop {
  50% {
    transform: scale(1.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 650px) {
  header {
    padding: 18px;
  }
  .brand {
    font-size: 20px;
  }
  .quiet {
    font-size: 12px;
  }
  main {
    padding: 0 18px;
    margin-top: 0;
  }
  .hero {
    padding: 16px 0;
    gap: 0;
    grid-template-columns: 1fr 0.55fr;
  }
  .hero h1 {
    font-size: 37px;
    letter-spacing: -1.5px;
  }
  .hero p {
    font-size: 15px;
  }
  .hero-art {
    height: 180px;
  }
  .mascot {
    width: 115px;
    height: 115px;
  }
  .orbit {
    font-size: 12px;
    padding: 8px;
    right: 0;
  }
  .float.two {
    font-size: 24px;
  }
  .profiles {
    gap: 12px;
  }
  .profile {
    padding: 16px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    position: relative;
  }
  .profile strong {
    font-size: 19px;
  }
  .profile .sub {
    font-size: 12px;
  }
  .avatar {
    width: 52px;
    height: 52px;
    font-size: 27px;
    border-radius: 17px;
  }
  .arrow {
    position: absolute;
    right: 12px;
    top: 30px;
  }
  .section-title {
    align-items: flex-start;
  }
  .section-title p {
    text-align: right;
    font-size: 12px;
    max-width: 100px;
  }
  .week-card {
    padding: 18px;
    gap: 12px;
  }
  .games {
    gap: 12px;
  }
  .game {
    padding: 20px 16px;
    min-height: 190px;
  }
  .game strong {
    font-size: 20px;
  }
  .game p {
    font-size: 14px;
  }
  .topline h1 {
    font-size: 23px;
  }
  .play-card {
    padding: 24px 14px;
  }
  .fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .panel {
    padding: 20px 16px;
  }
  .keyrow {
    gap: 4px;
  }
  .key {
    font-size: 18px;
    min-height: 48px;
  }
  .keyboard {
    margin-left: -8px;
    margin-right: -8px;
  }
  footer {
    padding: 20px 18px;
  }
  footer span {
    display: none;
  }
  .choices {
    gap: 10px;
  }
  .choice {
    font-size: 23px;
  }
}

.word-tile {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  border: 3px solid #8a6fc4;
  background: #eee6ff;
  color: #443076;
  font-size: 36px;
  padding: 14px 34px;
  margin: 14px auto 22px;
  border-radius: 18px;
}
.word-tile.dragging,
.word-tile[aria-pressed="true"] {
  background: #ffe7a1;
  border-color: #a46d12;
  cursor: grabbing;
}
.picture-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 720px;
  margin: auto;
}
.picture-target {
  padding: 10px;
  border: 3px dashed #c8bbdb;
  background: white;
  border-radius: 22px;
  min-width: 0;
}
.picture-target img {
  width: 100%;
  display: block;
  pointer-events: none;
}
.picture-drop-hint {
  display: block;
  font-size: 16px;
  margin: 8px 0 2px;
  color: #645475;
}
.picture-target.drop-ready,
.picture-target:focus-visible {
  border-color: #95620a;
  background: #fff0b3;
}
@media (max-width: 600px) {
  .picture-choices {
    gap: 8px;
  }
  .picture-target {
    padding: 4px;
    border-radius: 14px;
  }
  .picture-drop-hint {
    font-size: 12px;
  }
}

.word-tile.dragging {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.picture-game h1 {
  margin: 12px 0;
  font-size: 30px;
}
.picture-game .instruction {
  margin: 10px 0;
}
.picture-game .progress-track {
  margin: 8px 0 12px;
}
.picture-game .listen {
  margin: 6px 0;
  padding: 12px 24px;
}
.picture-game .help {
  margin: 4px 0;
}
.picture-game .word-tile {
  margin: 8px auto 16px;
  padding: 10px 28px;
}
.picture-game .picture-target img {
  max-height: 170px;
  object-fit: contain;
}

/* Original ChatGPT-generated artwork; no emoji or font icon dependencies. */
.art-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: -0.35em;
  flex-shrink: 0;
  background-image: url("/art/app-icons.png");
  background-size: 500% 400%;
  background-repeat: no-repeat;
}
.art-orbit {
  background-position: 0% 0%;
}
.art-rocket {
  background-position: 25% 0%;
}
.art-book-open {
  background-position: 50% 0%;
}
.art-headphones {
  background-position: 75% 0%;
}
.art-scan-eye {
  background-position: 100% 0%;
}
.art-brain {
  background-position: 0% 33.333333%;
}
.art-sprout {
  background-position: 25% 33.333333%;
}
.art-images {
  background-position: 50% 33.333333%;
}
.art-volume-2 {
  background-position: 75% 33.333333%;
}
.art-settings {
  background-position: 100% 33.333333%;
}
.art-arrow-left {
  background-position: 0% 66.666667%;
}
.art-arrow-right {
  background-position: 25% 66.666667%;
}
.art-delete {
  background-position: 50% 66.666667%;
}
.art-play {
  background-position: 75% 66.666667%;
}
.art-mic {
  background-position: 100% 66.666667%;
}
.art-square {
  background-position: 0% 100%;
}
.art-star {
  background-position: 25% 100%;
}
.art-sparkles {
  background-position: 50% 100%;
}
.art-hero-star {
  background-position: 75% 100%;
}
.art-check {
  background-position: 100% 100%;
}

.brand-star .art-icon {
  width: 40px;
  height: 40px;
}
.avatar .art-icon {
  width: 68px;
  height: 68px;
}
.symbol .art-icon {
  width: 60px;
  height: 60px;
}
.book .art-icon {
  width: 52px;
  height: 52px;
}
.float .art-icon {
  width: 46px;
  height: 46px;
}
.arrow .art-icon {
  width: 32px;
  height: 32px;
}
.mascot.art-icon {
  width: 280px;
  height: 280px;
}
.gold-star,
.feedback.success-pop .gold-star,
.done-star {
  clip-path: none;
  background-color: transparent;
  background-image: url("/art/app-icons.png");
  background-size: 500% 400%;
  background-position: 25% 100%;
  background-repeat: no-repeat;
}
.star-count .gold-star {
  width: 48px;
  height: 48px;
}
.feedback.success-pop .gold-star {
  width: 96px;
  height: 96px;
}
.done-star {
  width: 140px;
  height: 140px;
}
@media (max-width: 600px) {
  .avatar .art-icon {
    width: 48px;
    height: 48px;
  }
  .mascot.art-icon {
    width: 120px;
    height: 120px;
  }
  .profile .star-count .gold-star {
    width: 36px;
    height: 36px;
  }
}
