:root {
  color-scheme: light;
  --bg: #f4f7f2;
  --ink: #1d2b2f;
  --muted: #637176;
  --line: #d8e0dd;
  --panel: #ffffff;
  --soft: #eef7f3;
  --mint: #2f6f73;
  --mint-dark: #1f555a;
  --coral: #d45b45;
  --sun: #f5b83d;
  --blue: #3f6fa7;
  --shadow: 0 18px 50px rgba(41, 69, 73, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(245, 184, 61, 0.28), transparent 28%),
    linear-gradient(160deg, #f8fbf6 0%, #e7f1ee 52%, #f7f0e6 100%);
}

button,
input {
  font: inherit;
}

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

.app-shell {
  width: min(460px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 18px;
}

.eyebrow,
.unit,
.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: 2.45rem;
  line-height: 1;
  letter-spacing: 0;
}

.subtitle {
  max-width: 230px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mascot {
  display: grid;
  place-items: center;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border: 4px solid #fff5d9;
  border-radius: 28px;
  color: white;
  background: linear-gradient(145deg, var(--coral), var(--sun));
  box-shadow: var(--shadow);
  transform: rotate(4deg);
}

.mascot span {
  font-size: 2rem;
  font-weight: 900;
}

.today-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.today-bar div {
  min-height: 76px;
  padding: 12px 10px;
  border: 1px solid rgba(47, 111, 115, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(41, 69, 73, 0.08);
}

.today-bar strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
  line-height: 1;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid rgba(47, 111, 115, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.tab {
  min-height: 42px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.tab.active {
  color: white;
  background: var(--mint);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.word-card,
.practice-card,
.daily-sentence {
  border: 1px solid rgba(47, 111, 115, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.word-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  min-height: 268px;
  padding: 16px;
}

.word-art {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 232px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(160deg, var(--blue), var(--mint));
  font-size: 4rem;
}

.word-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.word-copy h2,
.practice-card h2 {
  margin: 10px 0 4px;
  overflow-wrap: anywhere;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: 0;
}

.phonics {
  margin-bottom: 12px;
  color: var(--coral);
  font-size: 1.05rem;
  font-weight: 800;
}

.meaning {
  margin-bottom: 12px;
  font-size: 1.35rem;
  font-weight: 900;
}

.sentence {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.card-actions,
.spell-actions {
  display: grid;
  grid-template-columns: 48px 1fr 1.2fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

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

.icon-button,
.primary-button,
.ghost-button,
.choices button {
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.icon-button {
  color: white;
  background: var(--coral);
  font-size: 1.25rem;
}

.primary-button {
  color: white;
  background: var(--mint);
}

.primary-button:active,
.tab.active:active {
  background: var(--mint-dark);
}

.ghost-button {
  color: var(--mint-dark);
  background: #e6f2ef;
}

.ghost-button:disabled {
  cursor: not-allowed;
  color: #8a9aa0;
  background: #eef2f1;
  opacity: 0.72;
}

.practice-card {
  padding: 18px;
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.choices button {
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #f8fbfa;
  text-align: left;
}

.choices button.correct {
  border-color: rgba(47, 111, 115, 0.42);
  color: var(--mint-dark);
  background: #dff3ec;
}

.choices button.wrong {
  border-color: rgba(212, 91, 69, 0.45);
  color: #8f2d20;
  background: #fff0ed;
}

.hint,
.feedback {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.feedback {
  font-weight: 900;
}

input {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #fbfdfc;
  font-size: 1.1rem;
}

input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px rgba(47, 111, 115, 0.14);
}

.daily-sentence {
  margin-top: 14px;
  padding: 14px;
  background: rgba(255, 250, 237, 0.92);
  box-shadow: 0 8px 24px rgba(41, 69, 73, 0.08);
}

.daily-sentence h2 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.daily-sentence p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.daily-english {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
}

.daily-meaning {
  margin-top: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 380px) {
  .word-card {
    grid-template-columns: 1fr;
  }

  .word-art {
    min-height: 138px;
  }

  .card-actions {
    grid-template-columns: 48px 1fr;
  }

  .primary-button {
    grid-column: span 2;
  }
}
