@font-face {
  font-family: Outfit;
  src: url('/fonts/outfit.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --paper: #f5f4eb;
  --ink: #183d3c;
  --muted: #70817a;
  --line: #dce2d4;
  --green: #244e43;
  --lime: #d9f891;
  --coral: #f98263;
  --white: #fffef9;
  --radius: 24px;
  font-family: Outfit, 'Trebuchet MS', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-image: radial-gradient(#4c6a4321 0.65px, transparent 0.65px);
  background-size: 8px 8px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #e98257;
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  letter-spacing: -0.04em;
}
p {
  line-height: 1.6;
}
button {
  touch-action: manipulation;
}
svg {
  flex-shrink: 0;
}
canvas {
  display: block;
}
dialog {
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.big {
  width: 42px;
  height: 42px;
}
.site-header {
  height: 112px;
  max-width: 1300px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1.3px;
  line-height: 1;
}
.brand-mark {
  width: 45px;
  height: 45px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--lime);
  display: grid;
  place-items: center;
  transform: rotate(-7deg);
}
.brand-mark .icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
  stroke: none;
}
.brand-sub {
  display: block;
  margin-top: 7px;
  font-size: 8px;
  letter-spacing: 2.15px;
  font-weight: 550;
}
.top-nav {
  display: flex;
  gap: 5px;
  background: #e9ebdf;
  border: 1px solid #e2e5d8;
  border-radius: 40px;
  padding: 5px;
}
.nav-btn {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  padding: 12px 16px;
  border-radius: 30px;
  color: #758578;
  white-space: nowrap;
}
.nav-btn.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 4px #1f41220a;
}
.nav-btn .icon {
  width: 18px;
  height: 18px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.coin-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}
.coin-pill .icon {
  color: #b17b36;
  fill: #fbd491;
  stroke-width: 1;
}
.profile-button {
  padding: 0;
  border: 1px solid #d5dfc5;
  background: #e9eddb;
  border-radius: 50%;
  width: 43px;
  height: 43px;
  overflow: hidden;
}
.profile-button canvas {
  width: 43px;
  height: 43px;
}
main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 12px 0 0;
}
.page {
  animation: reveal 0.35s ease-out;
}
.section-eyebrow {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 650;
  margin: 6px 0 20px;
  color: #71806c;
}
.online-note {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 9px;
  letter-spacing: 1.3px;
}
.online-note i,
.label-world i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #72a376;
}
.hero-card {
  display: grid;
  grid-template-columns: 47% 53%;
  min-height: 448px;
  background: var(--white);
  border: 1px solid #e1e5d7;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}
.hero-copy {
  padding: 48px 0 42px 48px;
  z-index: 1;
}
.chapter-label {
  font-size: 9px;
  letter-spacing: 1.3px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
}
.mini-star {
  color: #d99053;
  font-size: 20px;
}
.hero-copy h1 {
  font-size: clamp(50px, 5.5vw, 76px);
  line-height: 1.03;
  font-weight: 680;
  letter-spacing: -4px;
  margin: 20px 0 20px;
}
.hero-copy h1 span {
  color: #5d8561;
}
.hero-copy p {
  font-size: 15px;
  color: #7a8576;
  line-height: 1.7;
  margin-bottom: 26px;
}
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition:
    transform 0.15s,
    background 0.15s;
  line-height: 1.2;
}
.button:hover {
  transform: translateY(-2px);
}
.button:active {
  transform: translateY(1px);
}
.button:disabled {
  transform: none;
  opacity: 0.55;
}
.button.primary {
  background: var(--ink);
  color: #f4f7d8;
  box-shadow: 0 4px 0 #102a28;
}
.button.primary:hover {
  background: #28594e;
}
.button.secondary {
  background: #e9edde;
  color: var(--ink);
}
.button.large {
  min-width: 237px;
  padding: 17px 23px;
}
.hero-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #8d9685;
  margin-top: 17px;
}
.keycap {
  font-size: 15px;
  color: #9ba98b;
}
.hero-art {
  position: relative;
  isolation: isolate;
  background: radial-gradient(ellipse at 53% 44%, #e1eed157, transparent 65%);
}
.hero-art canvas {
  position: absolute;
  top: 3%;
  left: -22%;
  width: 136%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}
.orbit {
  border: 1px solid #e6eadb;
  position: absolute;
  top: 5%;
  left: 5%;
  width: 88%;
  height: 89%;
  border-radius: 50%;
  transform: rotate(-25deg);
}
.orbit-two {
  top: 13%;
  left: 14%;
  width: 70%;
  height: 71%;
}
.art-label {
  position: absolute;
  z-index: 2;
  background: var(--white);
  border: 1px solid #e4e6d8;
  box-shadow: 0 7px 22px #253f2510;
  border-radius: 12px;
}
.label-question {
  top: 40px;
  left: 18%;
  font-size: 20px;
  font-weight: 600;
  padding: 13px 22px;
  transform: rotate(-7deg);
  animation: float 6s ease-in-out infinite;
}
.label-question b {
  color: #73a269;
}
.label-world {
  bottom: 47px;
  right: 30px;
  padding: 13px 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  max-width: 177px;
  transform: rotate(5deg);
}
.label-world small {
  width: 100%;
  font-size: 8px;
  font-weight: 400;
  padding-left: 13px;
  color: #94a086;
  letter-spacing: 1px;
}
.art-sticker {
  position: absolute;
  right: 15px;
  top: 61px;
  width: 86px;
  height: 86px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: #ededa4;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 1px;
  text-align: center;
  font-weight: 650;
  transform: rotate(13deg);
  border: 4px double #babe7370;
}
.pilot-strip {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 25px 31px;
  margin: 18px 0 44px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #eef0e4b0;
}
.pilot-level {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 126px;
}
.pilot-level > span {
  font-size: 26px;
  font-weight: 700;
  width: 46px;
  height: 46px;
  background: #e2e9d4;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.pilot-level small {
  font-size: 8px;
  letter-spacing: 1.7px;
  color: #778c6c;
}
.pilot-level strong {
  display: block;
  font-size: 16px;
  margin-top: 3px;
}
.xp-area {
  flex: 1;
  max-width: 400px;
}
.xp-area > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  margin-bottom: 9px;
}
.xp-area > div:first-child span:last-child {
  color: #89967a;
}
.progress-track {
  height: 6px;
  border-radius: 20px;
  background: #dce3cf;
  overflow: hidden;
}
.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  background: #7c9f65;
  border-radius: 20px;
  transition: width 0.4s;
}
.stat-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.stat-mini .icon {
  color: #8ca174;
}
.stat-mini b {
  font-size: 13px;
  font-weight: 550;
  display: block;
}
.stat-mini small {
  font-size: 9px;
  color: #8a957e;
  display: block;
  margin-top: 4px;
}
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  font-weight: 650;
  color: #839174;
}
.section-title h2 {
  font-size: 30px;
  font-weight: 550;
  margin-top: 7px;
}
.section-title h1 {
  font-size: 45px;
  font-weight: 600;
  margin-top: 9px;
}
.section-title > p {
  font-size: 11px;
  color: #899580;
  margin-bottom: 4px;
}
.world-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.world-card {
  position: relative;
  background: #fffef8;
  border: 1px solid #dee5d4;
  border-radius: 20px;
  overflow: hidden;
}
.world-cover {
  height: 147px;
  position: relative;
  overflow: hidden;
  background: #dfeccc;
}
.world-cover.ice {
  background: #dce9eb;
}
.world-cover.sun {
  background: #f2dfcf;
}
.world-number {
  position: absolute;
  z-index: 2;
  top: 17px;
  left: 18px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #537751;
}
.world-cover.ice .world-number {
  color: #547984;
}
.world-cover.sun .world-number {
  color: #a07956;
}
.planet {
  width: 121px;
  height: 121px;
  position: absolute;
  border-radius: 50%;
  top: 32px;
  left: 50%;
  transform: translateX(-50%) rotate(-22deg);
  background: radial-gradient(circle at 30% 25%, #c7df9d 1%, #8fb16e 48%, #628557);
  box-shadow:
    inset -13px -14px 0 #38553915,
    0 10px 0 #3f533110;
}
.planet::before {
  content: '';
  position: absolute;
  width: 38px;
  height: 25px;
  border-radius: 50%;
  background: #31533526;
  top: 25px;
  left: 25px;
  box-shadow:
    46px 25px 0 -4px #31533520,
    3px 60px 0 -3px #31533520;
}
.planet::after {
  content: '✦';
  position: absolute;
  color: #fff5cf;
  font-size: 28px;
  left: -25px;
  top: 7px;
  text-shadow:
    166px 49px 0 #edf5cd,
    145px -16px 0 #94aa7750;
}
.ice .planet {
  background: radial-gradient(circle at 30% 25%, #c5e7e5, #87b9c6 55%, #648eae);
}
.sun .planet {
  background: radial-gradient(circle at 30% 25%, #f8d98a, #dda071 55%, #b77e6b);
}
.world-cover .lock-bubble {
  position: absolute;
  z-index: 3;
  right: 14px;
  top: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #fffffb99;
  color: #708077;
}
.lock-bubble .icon {
  width: 13px;
  height: 13px;
}
.world-content {
  padding: 20px;
}
.world-content h3 {
  font-size: 21px;
  font-weight: 600;
}
.world-content > p {
  font-size: 11px;
  color: #8b9680;
  margin-top: 3px;
}
.stage-path {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin: 22px 0 13px;
  gap: 8px;
}
.stage-path::before {
  content: '';
  height: 2px;
  border-top: 2px dashed #dce3d3;
  position: absolute;
  left: 20px;
  right: 20px;
  top: 20px;
}
.stage-node {
  position: relative;
  background: #edf0e4;
  border: 2px solid #e4e8db;
  width: 41px;
  height: 41px;
  border-radius: 50%;
  font-weight: 600;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.stage-node .icon {
  width: 17px;
  height: 17px;
}
.stage-node.next {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
  box-shadow: 0 0 0 4px #e9eedc;
}
.stage-node.done {
  background: #dcedba;
  border-color: #b7ce95;
  color: #507840;
}
.stage-node:disabled {
  color: #b6bfaa;
  background: #f2f3eb;
}
.stage-stars {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0;
  color: #9da878;
  white-space: nowrap;
}
.world-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: #8c987e;
  margin-top: 25px;
}
.world-status .icon {
  width: 14px;
  height: 14px;
}
.world-status .ready {
  color: #56824c;
  display: flex;
  align-items: center;
  gap: 5px;
}
.home-note {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 32px 0 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.home-note > .icon {
  width: 28px;
  height: 28px;
  color: #90a573;
}
.home-note p {
  font-size: 12px;
}
.home-note p span {
  font-size: 10px;
  color: #8d977f;
}
.text-button {
  background: transparent;
  padding: 5px 0;
  font-size: 11px;
  font-weight: 550;
  color: #56774e;
}
.text-button span {
  margin-left: 14px;
}
.home-note .text-button {
  margin-left: auto;
}
.site-footer {
  max-width: 1220px;
  margin: 10px auto 0;
  border-top: 1px solid var(--line);
  padding: 23px 0 34px;
  font-size: 9px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  color: #949e89;
}
.site-footer i {
  font-style: normal;
  margin: 0 8px;
  color: #b2bb9b;
}
.page:not(#page-map) {
  padding-top: 34px;
  min-height: 65vh;
}
.wardrobe-layout {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 25px;
}
.character-card {
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 40%, #eff6d6, #e2e9d4);
  padding: 30px 20px;
  text-align: center;
  border: 1px solid #d7e0c9;
}
.character-card canvas {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}
.character-card h2 {
  font-size: 29px;
}
.character-card p {
  color: #708463;
  font-size: 13px;
  margin: 7px 0 20px;
}
.soft-tag {
  background: #faffee91;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 10px;
  color: #6c8160;
}
.item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.item-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 22px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: start;
}
.item-card.equipped {
  border: 2px solid #72965f;
  padding: 21px;
}
.item-card canvas {
  height: 110px;
  width: 100%;
  object-fit: contain;
}
.item-card h3 {
  font-size: 17px;
  margin: 10px 0 6px;
  letter-spacing: -0.02em;
}
.item-card p {
  font-size: 11px;
  color: #8a967e;
  flex: 1;
}
.item-card button {
  font-size: 11px;
  width: 100%;
  min-height: 40px;
  margin-top: 16px;
  background: #ebefdd;
  border-radius: 9px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}
.item-card button:disabled {
  color: #88947d;
  background: #f2f3eb;
}
.item-card button .icon {
  width: 15px;
  height: 15px;
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.badge-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: center;
  padding: 28px 20px;
}
.badge-medal {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  background: #e7e9dd;
  border: 5px double #c6ceba;
  border-radius: 50%;
  color: #a7b19b;
  margin: 0 auto 20px;
}
.badge-medal .icon {
  width: 35px;
  height: 35px;
}
.badge-card.earned .badge-medal {
  background: #f1e5b4;
  border-color: #c9aa59;
  color: #8f712e;
  box-shadow: 0 6px 22px #e1cd8d33;
}
.badge-card h3 {
  font-size: 18px;
  letter-spacing: -0.02em;
}
.badge-card p {
  font-size: 11px;
  color: #8c9682;
  margin-top: 8px;
  min-height: 35px;
}
.badge-card > span {
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 20px;
  display: block;
  color: #919e82;
}
.badge-card.earned > span {
  color: #628149;
}
.practice-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 26px;
}
.practice-card,
.learning-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  padding: 34px;
}
.practice-card h2,
.learning-card h2 {
  font-size: 24px;
  font-weight: 600;
}
.mode-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0;
}
.mode-button {
  background: #f0f2e7;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.mode-button b {
  font-size: 22px;
}
.mode-button.selected {
  background: #e0edc6;
  border-color: #819b69;
}
.field-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 27px 0 14px;
}
.field-title h3 {
  font-size: 15px;
  letter-spacing: 0;
}
.table-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.table-toggle {
  width: 45px;
  height: 45px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f4f4ed;
  font-size: 15px;
}
.table-toggle.selected {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
}
.muted {
  font-size: 12px;
  color: #8b987f;
  margin: 22px 0;
}
.learning-card {
  background: #e6ecd9;
}
.learning-card > .icon {
  color: #718f59;
  margin-bottom: 22px;
}
.learning-card > p {
  font-size: 13px;
  color: #728364;
  margin-top: 12px;
}
.learning-card .small {
  font-size: 11px;
}
.learning-numbers {
  display: flex;
  gap: 30px;
  margin: 26px 0;
  border-top: 1px solid #cfd9bf;
  border-bottom: 1px solid #cfd9bf;
  padding: 20px 0;
}
.learning-numbers b {
  display: block;
  font-size: 28px;
  font-weight: 600;
}
.learning-numbers span {
  font-size: 10px;
  color: #81916d;
}
.mastery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 18px;
}
.mastery-cell {
  height: 42px;
  border-radius: 9px;
  background: #d7dfca;
  font-size: 11px;
}
.mastery-cell.warming {
  background: #efda99;
}
.mastery-cell.mastered {
  background: #93ba7b;
}
.mastery-cell:focus-visible {
  outline-offset: 1px;
}
.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ffffff12;
  display: grid;
  place-items: center;
}
.icon-button .icon {
  width: 20px;
  height: 20px;
}
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: #183d3c;
  color: #f3f7e6;
  box-shadow: 0 6px 30px #142f3c33;
  border-radius: 14px;
  padding: 15px 25px;
  font-size: 13px;
  max-width: 90vw;
  text-align: center;
}

/* The game has its own viewport so touch controls never require scrolling. */
body.playing {
  overflow: hidden;
  background: #123b38;
}
#game-screen {
  height: 100dvh;
  min-height: 0;
  padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  background: radial-gradient(ellipse at 70% 20%, #285747, #112d30);
  color: #e5f1d9;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 65px;
}
.game-layout {
  width: min(100%, 480px);
  height: 100%;
  max-height: 980px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  position: relative;
  background: #153d3b;
  border-left: 1px solid #ffffff0c;
  border-right: 1px solid #ffffff0c;
  padding-top: env(safe-area-inset-top);
}
.game-header {
  height: 66px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 17px;
}
.game-stage {
  flex: 1;
  min-width: 0;
}
.game-stage small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #a0b598;
  margin-bottom: 4px;
}
.game-stage strong {
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.hearts {
  display: flex;
  gap: 3px;
  color: #f3ab91;
}
.hearts .icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}
.hearts .lost {
  color: #ffffff20;
}
.game-gems {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  margin-left: 7px;
  color: #ffda86;
}
.game-gems .icon {
  width: 16px;
  height: 16px;
}
.question-panel {
  margin: 0 17px;
  padding: 11px 15px 13px;
  background: #f1f5df;
  color: #193e3d;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.question-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: #849471;
}
.question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.question-row > strong {
  font-size: 30px;
  letter-spacing: -0.5px;
  font-weight: 700;
  white-space: nowrap;
}
.think-button {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  background: #e1e8cc;
  border-radius: 9px;
  padding: 8px;
  min-height: 38px;
  white-space: nowrap;
}
.think-button .icon {
  width: 14px;
  height: 14px;
}
.question-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #dce5c5;
}
.question-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: #83af71;
  transition: width 0.3s;
}
.arena-wrap {
  position: relative;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
}
#arena {
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}
.combo-label {
  position: absolute;
  right: 24px;
  top: 15px;
  background: #e3f7a1;
  color: #2d5541;
  border: 1px solid #f7ffcb;
  font-size: 10px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 20px;
  transform: rotate(5deg);
  pointer-events: none;
}
.game-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 24px calc(15px + env(safe-area-inset-bottom));
  gap: 10px;
  min-height: 105px;
  background: linear-gradient(transparent, #0d303355);
}
.joystick {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #d5edb90d;
  border: 1px solid #bdd89e22;
  display: grid;
  place-items: center;
  touch-action: none;
  user-select: none;
  flex-shrink: 0;
}
.joystick-ring {
  position: absolute;
  inset: 9px;
  border: 1px dashed #b7d69d33;
  border-radius: 50%;
}
.joystick-knob {
  position: relative;
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(#638876, #3f675b);
  box-shadow:
    0 5px 0 #082f2b,
    0 7px 15px #00171255;
  border: 1px solid #8fa78a;
  pointer-events: none;
}
.joystick-knob svg {
  width: 28px;
  height: 28px;
  fill: #cbdeba;
}
.controls-caption {
  color: #a0b393;
  text-align: center;
  font-size: 8px;
  letter-spacing: 1px;
  line-height: 1.7;
}
.controls-caption small {
  display: block;
  font-size: 8px;
  letter-spacing: 0.2px;
  color: #6e9385;
}
.dash-button {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #deedaa;
  box-shadow:
    0 5px 0 #81945d,
    0 8px 15px #071e2855;
  color: #294e3d;
  border: 2px solid #edf8c5;
  touch-action: none;
}
.dash-button .icon {
  width: 25px;
  height: 25px;
  fill: currentColor;
  stroke: none;
}
.dash-button > span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}
.dash-button small {
  font-size: 8px;
  margin-top: 3px;
  color: #65824c;
}
.dash-button.cooling {
  background: #78947b;
  border-color: #96ac87;
  box-shadow: 0 3px 0 #486e5a;
}
.dash-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #81945d;
}
.desktop-game-note {
  width: 290px;
  font-size: 13px;
  line-height: 2;
  color: #96b39e;
}
.desktop-game-note .brand-mark {
  background: #254e43;
  margin-bottom: 35px;
}
.desktop-game-note h2 {
  font-size: 30px;
  line-height: 1.15;
  color: #d6e7c3;
  font-weight: 500;
  margin-bottom: 25px;
}
.desktop-game-note p {
  margin: 20px 0;
  font-size: 12px;
}
.desktop-game-note kbd {
  display: inline-block;
  font:
    10px Outfit,
    sans-serif;
  background: #ffffff0d;
  border: 1px solid #ffffff14;
  border-radius: 5px;
  padding: 1px 7px;
  margin: 5px 0;
  color: #c2d7b7;
}
.think-overlay {
  position: absolute;
  inset: 10px 17px;
  border-radius: 22px;
  background: #153e3bed;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 13px;
}
.think-overlay > .icon {
  width: 38px;
  height: 38px;
  color: #deefa4;
}
.think-overlay h2 {
  font-size: 29px;
  font-weight: 500;
}
.think-overlay p {
  font-size: 13px;
  color: #b8c8a9;
}
.think-overlay #think-question {
  font-size: 35px;
  font-weight: 650;
  color: #edffc5;
}
.think-overlay .button {
  margin-top: 10px;
  background: #deefa4;
  color: #24483b;
}

dialog {
  border: 1px solid #dce2ce;
  border-radius: 24px;
  padding: 0;
  max-width: min(460px, calc(100vw - 28px));
  width: 460px;
  max-height: calc(100dvh - 32px);
  background: var(--white);
  box-shadow: 0 25px 90px #102e3e55;
}
dialog::backdrop {
  background: #092e35a3;
  backdrop-filter: blur(6px);
}
.modal-inner {
  padding: 31px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #edf0e4;
  color: #6b805c;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}
.modal-close .icon {
  width: 16px;
  height: 16px;
}
.modal-eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #7f946c;
  display: block;
  margin-bottom: 13px;
}
.modal-inner h2 {
  font-size: 31px;
  line-height: 1.12;
  font-weight: 600;
  margin-bottom: 12px;
}
.modal-inner > p {
  font-size: 13px;
  color: #7e8e70;
}
.modal-inner .button {
  width: 100%;
  margin-top: 12px;
}
.modal-inner .button + .button {
  margin-top: 10px;
}
.brief-world {
  height: 106px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin: 16px 0;
  background: #e0ebcc;
}
.brief-world .planet {
  width: 115px;
  height: 115px;
  top: 10px;
}
.brief-details {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.brief-details span {
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 20px;
  background: #eef1e3;
  color: #698258;
}
.help-steps {
  display: grid;
  gap: 15px;
  margin: 24px 0;
}
.help-step {
  display: flex;
  gap: 15px;
  align-items: center;
}
.help-step > span {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: #e7efcf;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #587345;
}
.help-step b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}
.help-step p {
  font-size: 11px;
  color: #879478;
}
.form-field {
  display: block;
  margin: 20px 0;
  font-size: 12px;
  font-weight: 500;
}
.form-field input,
.form-field select {
  display: block;
  width: 100%;
  margin-top: 8px;
  min-height: 43px;
  border: 1px solid #d7dec9;
  border-radius: 10px;
  padding: 10px 13px;
  background: #f6f7ef;
  color: var(--ink);
}
.check-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  font-size: 12px;
  border-bottom: 1px solid #e9eddf;
}
.check-field input {
  accent-color: #56734d;
  width: 20px;
  height: 20px;
}
.settings-help {
  font-size: 10px !important;
  margin-top: 7px;
}
.result-inner {
  text-align: center;
}
.result-stars {
  font-size: 48px;
  letter-spacing: 8px;
  color: #ecc25f;
  filter: drop-shadow(0 3px 0 #a9804420);
  margin: 12px 0;
}
.result-star.empty {
  color: #d9decb;
}
.result-rewards {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 21px 0;
}
.result-rewards span {
  background: #edf3dc;
  border-radius: 12px;
  padding: 15px 18px;
  font-size: 12px;
}
.result-rewards b {
  font-size: 21px;
  display: block;
  margin-bottom: 3px;
}
.result-stats {
  display: flex;
  justify-content: space-around;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 17px;
}
.result-stats b {
  font-size: 18px;
  display: block;
}
.result-stats span {
  font-size: 10px;
  color: #87977a;
}
.new-unlock {
  background: #e7efcc;
  color: #52763f;
  font-size: 11px;
  border-radius: 10px;
  margin: 8px 0;
  padding: 10px;
}
.correction-equation {
  font-size: 35px;
  font-weight: 650;
  padding: 22px 0;
  color: #597f4c;
}
.correction-tip {
  padding: 17px;
  border-radius: 12px;
  background: #eef1df;
  font-size: 14px !important;
  color: #60794b !important;
}
.result-review {
  margin: 15px 0;
  padding: 13px;
  text-align: left;
  font-size: 12px;
  border-radius: 12px;
  background: #f0f2e6;
  color: #6a7e5b;
}
.result-review summary {
  cursor: pointer;
  font-weight: 550;
  min-height: 30px;
  display: flex;
  align-items: center;
}
.result-review p {
  font-size: 12px;
  margin: 10px 0;
}
.noscript {
  padding: 40px;
  text-align: center;
}
.result-star {
  display: inline-block;
  animation: star-pop 0.45s backwards cubic-bezier(0.2, 0.8, 0.3, 1.3);
}
.result-star:nth-child(2) {
  animation-delay: 0.12s;
}
.result-star:nth-child(3) {
  animation-delay: 0.24s;
}
@keyframes star-pop {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-25deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-7deg);
  }
  50% {
    transform: translateY(-7px) rotate(-5deg);
  }
}
@media (min-width: 1500px) {
  main,
  .site-footer {
    max-width: 1280px;
  }
  .site-header {
    max-width: 1360px;
  }
  .hero-card {
    min-height: 476px;
  }
  .hero-copy {
    padding-top: 55px;
  }
  .hero-copy h1 {
    font-size: 82px;
  }
}
@media (max-width: 1320px) {
  main,
  .site-footer {
    margin-left: 40px;
    margin-right: 40px;
  }
}
@media (max-width: 1000px) {
  .site-header {
    padding: 0 25px;
    height: 94px;
  }
  .brand {
    font-size: 24px;
  }
  .nav-btn {
    padding: 11px 12px;
  }
  .top-nav {
    gap: 1px;
  }
  .header-actions {
    gap: 9px;
  }
  main,
  .site-footer {
    margin-left: 25px;
    margin-right: 25px;
  }
  .hero-copy {
    padding: 34px 0 32px 33px;
  }
  .hero-copy h1 {
    font-size: 62px;
  }
  .hero-card {
    min-height: 407px;
  }
  .art-sticker {
    right: 7px;
    top: 75px;
    width: 67px;
    height: 67px;
    font-size: 7px;
  }
  .label-world {
    right: 13px;
    bottom: 34px;
  }
  .pilot-strip {
    gap: 22px;
    padding: 22px;
  }
  .world-grid {
    gap: 14px;
  }
  .world-content {
    padding: 17px;
  }
  .stage-node {
    width: 35px;
    height: 35px;
  }
  .stage-path::before {
    top: 17px;
  }
  .badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wardrobe-layout {
    grid-template-columns: 1fr 1.5fr;
  }
  .item-card {
    padding: 15px;
  }
  .item-card.equipped {
    padding: 14px;
  }
  .practice-layout {
    grid-template-columns: 1.2fr 1fr;
  }
  .practice-card,
  .learning-card {
    padding: 24px;
  }
  .desktop-game-note {
    width: 220px;
  }
  #game-screen {
    gap: 32px;
  }
  .stat-mini {
    gap: 7px;
  }
}
@media (max-width: 760px) {
  .site-header {
    height: 85px;
    padding: 0 20px;
  }
  .brand {
    font-size: 25px;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }
  .brand-sub {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .header-actions {
    gap: 14px;
  }
  .top-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 19px 19px 0 0;
    background: #fcfcf3f5;
    backdrop-filter: blur(16px);
    border: 1px solid #dce3d1;
    border-bottom: none;
    z-index: 10;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    justify-content: space-around;
    box-shadow: 0 -4px 25px #28382008;
  }
  .nav-btn {
    flex-direction: column;
    gap: 5px;
    font-size: 9px;
    padding: 6px 20px;
    border-radius: 12px;
  }
  .nav-btn .icon {
    width: 21px;
    height: 21px;
  }
  .nav-btn.active {
    background: #e7edd6;
    box-shadow: none;
  }
  .site-footer {
    margin-bottom: 91px;
    padding: 20px 0;
    font-size: 8px;
    flex-direction: column;
    gap: 9px;
  }
  main,
  .site-footer {
    margin-left: 20px;
    margin-right: 20px;
  }
  main {
    padding-top: 4px;
  }
  .section-eyebrow {
    font-size: 8px;
    letter-spacing: 1.4px;
    margin: 2px 0 13px;
  }
  .online-note {
    font-size: 7px;
    letter-spacing: 0.5px;
    gap: 4px;
  }
  .online-note i {
    width: 4px;
    height: 4px;
  }
  .hero-card {
    grid-template-columns: 1fr;
    min-height: 0;
    border-radius: 22px;
  }
  .hero-copy {
    padding: 29px 28px 8px;
  }
  .chapter-label {
    font-size: 7px;
    letter-spacing: 0.9px;
  }
  .mini-star {
    font-size: 15px;
  }
  .hero-copy h1 {
    font-size: 60px;
    letter-spacing: -3px;
    margin: 14px 0 14px;
    line-height: 1.01;
  }
  .hero-copy p {
    font-size: 13px;
    margin-bottom: 20px;
  }
  .button.large {
    min-width: 215px;
    min-height: 49px;
    font-size: 13px;
    padding: 15px 20px;
  }
  .hero-foot {
    font-size: 8px;
    margin-top: 13px;
  }
  .hero-art {
    height: 260px;
    margin-top: -13px;
    pointer-events: none;
  }
  .hero-art canvas {
    width: 110%;
    height: 117%;
    left: -5%;
    top: -12%;
  }
  .orbit {
    width: 78%;
    height: 98%;
    left: 10%;
    top: -1%;
  }
  .orbit-two {
    width: 60%;
    height: 75%;
    left: 20%;
    top: 10%;
  }
  .label-question {
    font-size: 16px;
    top: 22px;
    left: 13%;
    padding: 9px 16px;
  }
  .label-world {
    font-size: 8px;
    max-width: 153px;
    padding: 10px 12px;
    right: 19px;
    bottom: 21px;
  }
  .label-world small {
    font-size: 6px;
  }
  .art-sticker {
    width: 65px;
    height: 65px;
    font-size: 7px;
    right: 13px;
    top: 17px;
  }
  .pilot-strip {
    gap: 16px;
    flex-wrap: wrap;
    margin: 13px 0 29px;
    padding: 18px 19px;
    border-radius: 16px;
  }
  .pilot-level {
    min-width: 103px;
    gap: 9px;
  }
  .pilot-level > span {
    width: 39px;
    height: 39px;
    font-size: 22px;
  }
  .pilot-level small {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
  .pilot-level strong {
    font-size: 14px;
  }
  .xp-area {
    max-width: none;
    min-width: 100px;
  }
  .xp-area > div:first-child {
    font-size: 9px;
  }
  .stat-mini {
    margin-left: 0;
    flex: 1;
    gap: 8px;
    border-top: 1px solid #dce3cf;
    padding-top: 13px;
  }
  .stat-mini b {
    font-size: 12px;
  }
  .stat-mini small {
    font-size: 8px;
    margin-top: 2px;
  }
  .stat-mini .icon {
    width: 18px;
    height: 18px;
  }
  .section-title {
    align-items: start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 19px;
  }
  .section-title h2 {
    font-size: 27px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .section-title > p {
    font-size: 10px;
  }
  .world-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .world-card {
    display: grid;
    grid-template-columns: 103px 1fr;
    border-radius: 17px;
  }
  .world-cover {
    height: 100%;
    min-height: 195px;
  }
  .world-number {
    font-size: 7px;
    left: 11px;
    top: 15px;
  }
  .world-cover .planet {
    width: 107px;
    height: 107px;
    left: 29%;
    top: 63px;
  }
  .world-cover .lock-bubble {
    top: auto;
    bottom: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
  }
  .world-content {
    padding: 19px;
  }
  .world-content h3 {
    font-size: 21px;
  }
  .world-content > p {
    font-size: 10px;
  }
  .stage-path {
    margin: 20px 0 13px;
    gap: 6px;
  }
  .stage-node {
    width: 34px;
    height: 34px;
  }
  .world-status {
    font-size: 8px;
    margin-top: 23px;
  }
  .home-note {
    margin: 25px 0 0;
    gap: 10px;
    flex-wrap: wrap;
  }
  .home-note p {
    font-size: 10px;
  }
  .home-note p span {
    font-size: 9px;
  }
  .home-note > .icon {
    width: 22px;
    height: 22px;
  }
  .home-note .text-button {
    font-size: 10px;
    margin-left: 32px;
    margin-top: 0;
  }
  .page:not(#page-map) {
    padding-top: 15px;
  }
  .section-title h1 {
    font-size: 36px;
  }
  .wardrobe-layout {
    grid-template-columns: 1fr;
  }
  .character-card {
    padding: 23px;
  }
  .character-card canvas {
    max-height: 225px;
  }
  .character-card h2 {
    font-size: 25px;
  }
  .item-grid {
    gap: 12px;
  }
  .item-card {
    padding: 15px;
  }
  .item-card.equipped {
    padding: 14px;
  }
  .item-card h3 {
    font-size: 14px;
  }
  .item-card p {
    font-size: 10px;
  }
  .item-card button {
    font-size: 10px;
  }
  .item-card canvas {
    height: 99px;
  }
  .badge-grid {
    gap: 12px;
  }
  .badge-card {
    padding: 23px 13px;
  }
  .badge-card h3 {
    font-size: 16px;
  }
  .badge-card p {
    font-size: 10px;
  }
  .badge-medal {
    width: 65px;
    height: 65px;
    margin-bottom: 15px;
  }
  .badge-medal .icon {
    width: 29px;
    height: 29px;
  }
  .practice-layout {
    grid-template-columns: 1fr;
  }
  .practice-card,
  .learning-card {
    padding: 23px;
  }
  .practice-card h2,
  .learning-card h2 {
    font-size: 22px;
  }
  .mode-button {
    padding: 10px 12px;
    font-size: 12px;
  }
  .desktop-game-note {
    display: none;
  }
  .game-layout {
    max-width: 480px;
    width: 100%;
    border: none;
  }
  .toast {
    bottom: 100px;
    width: max-content;
  }
  .playing .toast {
    bottom: 20px;
  }
  .modal-inner {
    padding: 28px 25px;
  }
  .modal-inner h2 {
    font-size: 28px;
  }
  .modal-inner > p {
    font-size: 12px;
  }
}
@media (max-width: 370px) {
  main,
  .site-footer {
    margin-left: 13px;
    margin-right: 13px;
  }
  .site-header {
    padding: 0 14px;
  }
  .hero-copy {
    padding-left: 24px;
  }
  .hero-copy h1 {
    font-size: 53px;
  }
  .world-card {
    grid-template-columns: 82px 1fr;
  }
  .world-content {
    padding: 16px;
  }
  .world-cover .planet {
    left: 14%;
  }
  .nav-btn {
    padding: 6px 16px;
  }
  .game-header {
    padding: 8px 12px;
    gap: 7px;
  }
  .game-gems {
    margin-left: 0;
  }
  .hearts .icon {
    width: 13px;
    height: 13px;
  }
  .question-row > strong {
    font-size: 26px;
  }
  .think-button {
    font-size: 9px;
    padding: 6px;
  }
  .question-meta {
    font-size: 7px;
  }
  .game-controls {
    padding-left: 20px;
    padding-right: 20px;
  }
  .controls-caption {
    font-size: 7px;
  }
  .stage-node {
    width: 32px;
    height: 32px;
  }
}
@media (max-height: 700px) {
  .game-header {
    height: 54px;
  }
  .question-panel {
    padding-top: 8px;
    padding-bottom: 9px;
  }
  .question-row > strong {
    font-size: 25px;
  }
  .game-controls {
    min-height: 86px;
    padding-top: 3px;
    padding-bottom: calc(9px + env(safe-area-inset-bottom));
  }
  .joystick {
    width: 72px;
    height: 72px;
  }
  .joystick-knob {
    width: 43px;
    height: 43px;
  }
  .dash-button {
    width: 65px;
    height: 65px;
  }
  .question-meta {
    font-size: 7px;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .game-layout {
    max-width: 750px;
    width: 100%;
    padding-left: 96px;
    padding-right: 96px;
    grid-template-rows: 47px 70px minmax(0, 1fr);
  }
  .game-header {
    height: 47px;
    padding: 6px;
  }
  .question-panel {
    margin: 0 6px;
  }
  .question-row {
    margin-top: 1px;
  }
  .question-row > strong {
    font-size: 23px;
  }
  .question-panel {
    padding: 7px 12px;
  }
  .game-controls {
    position: absolute;
    inset: 47px 0 0;
    pointer-events: none;
    padding: 0 12px;
    align-items: center;
  }
  .joystick,
  .dash-button {
    pointer-events: auto;
  }
  .controls-caption {
    display: none;
  }
  .desktop-game-note {
    display: none;
  }
  .arena-wrap {
    padding: 0;
  }
  #game-screen {
    gap: 0;
  }
  .think-overlay {
    inset: 4px;
  }
  .think-overlay h2 {
    font-size: 20px;
  }
  .think-overlay p {
    display: none;
  }
  .think-overlay #think-question {
    display: block;
    font-size: 23px;
  }
  .think-overlay > .icon {
    display: none;
  }
  .think-overlay {
    gap: 4px;
  }
  .think-overlay .button {
    margin-top: 4px;
    min-height: 35px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation: none !important;
  transition: none !important;
}
