:root {
  --auau-yolk-50: #fff8e1;
  --auau-yolk-100: #ffefb3;
  --auau-yolk-200: #ffe079;
  --auau-yolk-300: #ffd24a;
  --auau-yolk-400: #ffc01f;
  --auau-yolk-500: #f5a800;
  --auau-yolk-600: #c98300;
  --auau-peach-50: #fff2ee;
  --auau-peach-100: #ffe1d6;
  --auau-peach-300: #ffa17f;
  --auau-peach-400: #ff7e54;
  --auau-peach-500: #e85f33;
  --auau-sky-50: #e8f6ff;
  --auau-sky-100: #c9eaff;
  --auau-sky-300: #5dbbff;
  --auau-sky-400: #2e9df7;
  --auau-sky-500: #1a7dd1;
  --auau-mint-50: #e6fbef;
  --auau-mint-100: #c2f4d5;
  --auau-mint-300: #5ad68b;
  --auau-mint-400: #2ebe6a;
  --auau-mint-500: #1f9e55;
  --auau-lilac-50: #f4eeff;
  --auau-lilac-100: #e2d4ff;
  --auau-lilac-300: #a685ff;
  --auau-lilac-400: #8965e8;
  --auau-coral-50: #ffeded;
  --auau-coral-300: #ff7a7a;
  --auau-coral-400: #f25555;
  --auau-cream: #fff7ec;
  --auau-cream-2: #ffefd9;
  --auau-paper: #ffffff;
  --auau-ink-50: #f6efe0;
  --auau-ink-100: #ead9bd;
  --auau-ink-200: #c9b594;
  --auau-ink-300: #9a8568;
  --auau-ink-400: #6e5b40;
  --auau-ink-500: #4a3b27;
  --auau-ink-600: #2e2415;
  --shadow-sm: 0 2px 0 rgba(74, 59, 39, .08), 0 4px 12px -2px rgba(255, 168, 0, .12);
  --shadow-md: 0 4px 0 rgba(74, 59, 39, .10), 0 10px 24px -4px rgba(255, 168, 0, .18);
  --ledge-yolk: 0 5px 0 var(--auau-yolk-500);
  --ledge-peach: 0 5px 0 var(--auau-peach-500);
  --ledge-sky: 0 5px 0 var(--auau-sky-500);
  --ledge-mint: 0 5px 0 var(--auau-mint-500);
  --ledge-cream: 0 4px 0 var(--auau-ink-100);
  --font-body: ui-rounded, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: ui-rounded, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-english: ui-rounded, "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #eadcc5;
  color: var(--auau-ink-500);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--auau-cream);
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 0 1px rgba(74, 59, 39, .08);
}

@media (min-width: 520px) {
  body {
    padding: 22px 0;
  }

  .app-shell {
    min-height: calc(100vh - 44px);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(74, 59, 39, .35), 0 0 0 8px #2e2415;
  }
}

.screen {
  min-height: 100vh;
  padding: calc(14px + var(--safe-top)) 18px calc(98px + var(--safe-bottom));
  animation: fade-in .18s ease-out both;
}

@media (min-width: 520px) {
  .screen {
    min-height: calc(100vh - 44px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.025);
  }
}

@keyframes pop {
  0% {
    transform: scale(.55);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes float-up {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-24px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(680px) rotate(380deg);
    opacity: 0;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo {
  width: 118px;
  height: auto;
  display: block;
}

.back-btn,
.icon-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 16px;
  background: var(--auau-paper);
  color: var(--auau-ink-600);
  box-shadow: var(--shadow-sm);
  font-weight: 900;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.title-block {
  min-width: 0;
}

.screen-title {
  margin: 0;
  color: var(--auau-ink-600);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
}

.screen-subtitle {
  margin-top: 4px;
  color: var(--auau-ink-400);
  font-size: 13px;
  line-height: 1.35;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.card {
  background: var(--auau-paper);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 18px;
}

.card.yolk {
  background: linear-gradient(180deg, var(--auau-yolk-50), #fff);
}

.card.sky {
  background: linear-gradient(180deg, var(--auau-sky-50), #fff);
}

.card.peach {
  background: linear-gradient(180deg, var(--auau-peach-50), #fff);
}

.card.mint {
  background: linear-gradient(180deg, var(--auau-mint-50), #fff);
}

.card.lilac {
  background: linear-gradient(180deg, var(--auau-lilac-50), #fff);
}

.mascot {
  width: 96px;
  height: auto;
  animation: breathe 2.6s ease-in-out infinite;
  transform-origin: center bottom;
}

.mascot.small {
  width: 58px;
}

.mascot.big {
  width: 142px;
}

.chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--auau-paper);
  color: var(--auau-ink-500);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.chip img {
  width: 22px;
  height: 22px;
}

.chip.yolk {
  background: var(--auau-yolk-50);
  color: var(--auau-yolk-600);
}

.chip.peach {
  background: var(--auau-peach-50);
  color: var(--auau-peach-500);
}

.chip.sky {
  background: var(--auau-sky-50);
  color: var(--auau-sky-500);
}

.chip.mint {
  background: var(--auau-mint-50);
  color: var(--auau-mint-500);
}

.chip.lilac {
  background: var(--auau-lilac-50);
  color: var(--auau-lilac-400);
}

.btn {
  min-height: 56px;
  border: 0;
  border-radius: 20px;
  padding: 0 18px;
  color: var(--auau-ink-600);
  background: var(--auau-paper);
  box-shadow: var(--ledge-cream);
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: transform .14s cubic-bezier(.34, 1.56, .64, 1), box-shadow .14s, opacity .14s;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: none;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.btn.block {
  width: 100%;
}

.btn.large {
  min-height: 66px;
  border-radius: 24px;
  font-size: 18px;
}

.btn.small {
  min-height: 42px;
  border-radius: 15px;
  padding: 0 12px;
  font-size: 13px;
}

.btn.primary {
  background: var(--auau-yolk-300);
  box-shadow: var(--ledge-yolk);
}

.btn.peach {
  background: var(--auau-peach-400);
  color: #fff;
  box-shadow: var(--ledge-peach);
}

.btn.sky {
  background: var(--auau-sky-400);
  color: #fff;
  box-shadow: var(--ledge-sky);
}

.btn.mint {
  background: var(--auau-mint-400);
  color: #fff;
  box-shadow: var(--ledge-mint);
}

.btn.ghost {
  background: var(--auau-paper);
  color: var(--auau-ink-500);
}

.bottom-actions {
  position: sticky;
  bottom: calc(82px + var(--safe-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
  z-index: 20;
}

.bottom-actions.single {
  grid-template-columns: 1fr;
}

.bottom-actions.triple {
  grid-template-columns: .88fr 1fr 1fr;
}

.nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  width: min(calc(100vw - 24px), 406px);
  transform: translateX(-50%);
  z-index: 50;
}

.nav-inner {
  height: 72px;
  border-radius: 28px;
  background: rgba(255, 247, 236, .94);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 7px;
}

.nav button {
  border: 0;
  background: transparent;
  color: var(--auau-ink-400);
  border-radius: 18px;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.nav .nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.nav button.active {
  color: var(--auau-yolk-600);
}

.nav button.active .nav-icon {
  background: var(--auau-yolk-200);
  box-shadow: 0 3px 0 var(--auau-yolk-500);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--auau-ink-400);
  font-size: 12px;
  font-weight: 800;
}

.progress {
  height: 12px;
  border-radius: 999px;
  background: var(--auau-ink-50);
  box-shadow: inset 0 2px 4px rgba(74, 59, 39, .08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  width: 0;
  background: linear-gradient(90deg, var(--auau-yolk-300), var(--auau-yolk-400));
  transition: width .25s ease-out;
}

.progress-fill.sky {
  background: linear-gradient(90deg, var(--auau-sky-300), var(--auau-sky-400));
}

.progress-fill.peach {
  background: linear-gradient(90deg, var(--auau-peach-300), var(--auau-peach-400));
}

.progress-fill.mint {
  background: linear-gradient(90deg, var(--auau-mint-300), var(--auau-mint-400));
}

.progress-fill.lilac {
  background: linear-gradient(90deg, var(--auau-lilac-100), var(--auau-lilac-400));
}

.module {
  min-height: 104px;
  border: 0;
  border-radius: 24px;
  padding: 14px;
  text-align: left;
  color: var(--auau-ink-600);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.module .icon {
  width: 38px;
  height: 38px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .7);
  font-size: 22px;
}

.module .name {
  margin-top: 8px;
  font-size: 17px;
  font-weight: 900;
}

.module .meta {
  margin-top: 2px;
  color: var(--auau-ink-400);
  font-size: 12px;
  font-weight: 700;
}

.module.yolk {
  background: var(--auau-yolk-50);
}

.module.sky {
  background: var(--auau-sky-50);
}

.module.peach {
  background: var(--auau-peach-50);
}

.module.mint {
  background: var(--auau-mint-50);
}

.module.lilac {
  background: var(--auau-lilac-50);
}

.word-card {
  text-align: center;
  padding: 24px 18px;
}

.word-en {
  margin: 6px 0 2px;
  color: var(--auau-ink-600);
  font-family: var(--font-english);
  font-size: clamp(38px, 13vw, 58px);
  line-height: 1.04;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.word-cn {
  color: var(--auau-peach-500);
  font-size: 22px;
  font-weight: 900;
}

.word-meta {
  color: var(--auau-ink-400);
  font-size: 13px;
  font-weight: 800;
}

.speaker {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  margin: 12px auto;
  background: var(--auau-sky-400);
  color: #fff;
  box-shadow: var(--ledge-sky), 0 12px 24px -4px rgba(46, 157, 247, .38);
  font-size: 34px;
  cursor: pointer;
}

.speaker.large {
  width: 104px;
  height: 104px;
  font-size: 44px;
}

.input,
.textarea {
  width: 100%;
  border: 3px solid transparent;
  border-radius: 20px;
  background: var(--auau-cream-2);
  color: var(--auau-ink-600);
  box-shadow: inset 0 2px 4px rgba(74, 59, 39, .08);
  outline: 0;
}

.input {
  min-height: 68px;
  padding: 10px 14px;
  text-align: center;
  font-family: var(--font-english);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.textarea {
  min-height: 168px;
  padding: 14px;
  resize: vertical;
  text-align: left;
  font-size: 15px;
  line-height: 1.45;
}

.select {
  width: 100%;
  min-height: 52px;
  border: 3px solid transparent;
  border-radius: 18px;
  background: var(--auau-paper);
  color: var(--auau-ink-600);
  box-shadow: inset 0 2px 4px rgba(74, 59, 39, .08), var(--shadow-sm);
  padding: 0 12px;
  outline: 0;
  font-weight: 800;
}

.range {
  width: 100%;
  accent-color: var(--auau-yolk-500);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--auau-yolk-300);
  background: #fff;
}

.input.miss {
  border-color: var(--auau-coral-300);
  background: var(--auau-coral-50);
}

.input.ok {
  border-color: var(--auau-mint-300);
  background: var(--auau-mint-50);
}

.soft-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: var(--auau-peach-50);
  color: var(--auau-ink-500);
  font-size: 13px;
  line-height: 1.45;
}

.soft-note.mint {
  background: var(--auau-mint-50);
}

.soft-note.sky {
  background: var(--auau-sky-50);
}

.soft-note.lilac {
  background: var(--auau-lilac-50);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.word-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: var(--auau-paper);
  box-shadow: var(--shadow-sm);
}

.word-row-main {
  min-width: 0;
  flex: 1;
}

.word-row .en {
  color: var(--auau-ink-600);
  font-family: var(--font-english);
  font-size: 18px;
  font-weight: 900;
}

.word-row .cn {
  color: var(--auau-ink-400);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 15px;
  background: var(--auau-paper);
  color: var(--auau-ink-400);
  box-shadow: var(--shadow-sm);
  font-weight: 900;
}

.tabs button.active {
  background: var(--auau-yolk-300);
  color: var(--auau-ink-600);
  box-shadow: var(--ledge-yolk);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  min-height: 92px;
  border-radius: 22px;
  padding: 14px;
  background: var(--auau-paper);
  box-shadow: var(--shadow-sm);
}

.stat .num {
  color: var(--auau-ink-600);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.stat .label {
  margin-top: 6px;
  color: var(--auau-ink-400);
  font-size: 12px;
  font-weight: 800;
}

.empty {
  text-align: center;
  padding: 28px 18px;
}

.empty .mascot {
  margin-bottom: 10px;
}

.reward {
  text-align: center;
  animation: pop .42s cubic-bezier(.68, -.55, .27, 1.55) both;
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
}

.confetti i {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  animation: confetti-fall 1.3s ease-in forwards;
}

.wave {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 40px;
}

.wave i {
  display: block;
  width: 9px;
  border-radius: 7px;
  background: var(--auau-peach-400);
  animation: wave .78s ease-in-out infinite alternate;
}

@keyframes wave {
  from {
    height: 9px;
  }
  to {
    height: 34px;
  }
}

.island-img {
  display: block;
  width: 100%;
  max-width: 310px;
  margin: 0 auto;
}

.tiny {
  font-size: 12px;
  color: var(--auau-ink-400);
  line-height: 1.45;
  font-weight: 700;
}

.danger-zone {
  border: 2px dashed var(--auau-coral-300);
  background: var(--auau-coral-50);
}

.hide {
  display: none !important;
}
