:root {
  --ink: #403b55;
  --muted: #777086;
  --paper: #fff;
  --yellow: #ffdb66;
  --shadow: 0 9px 0 rgba(101, 80, 73, 0.07), 0 20px 45px rgba(101, 80, 73, 0.09);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 224, 116, 0.24) 0 4px, transparent 5px),
    radial-gradient(circle at 86% 30%, rgba(142, 208, 244, 0.2) 0 5px, transparent 6px),
    linear-gradient(180deg, #fff9e9 0%, #f7fbef 58%, #eef8f4 100%);
  color: var(--ink);
  font-family: "Avenir Next", "Nunito", "Trebuchet MS", system-ui, sans-serif;
}

a { color: inherit; }

.sky-decor { position: fixed; inset: 0; pointer-events: none; }
.cloud { position: absolute; width: 120px; height: 34px; border-radius: 999px; background: rgba(255,255,255,0.68); }
.cloud::before, .cloud::after { content: ""; position: absolute; bottom: 10px; border-radius: 50%; background: inherit; }
.cloud::before { left: 22px; width: 48px; height: 48px; }
.cloud::after { right: 18px; width: 58px; height: 58px; }
.cloud-one { top: 18%; left: -35px; transform: scale(0.8); }
.cloud-two { top: 12%; right: -28px; transform: scale(1.1); }
.index-star { position: absolute; color: #f4c957; opacity: 0.45; }
.star-one { top: 30%; left: 7%; font-size: 28px; transform: rotate(15deg); }
.star-two { top: 46%; right: 6%; font-size: 22px; transform: rotate(-12deg); }

.index-topbar {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
  padding-top: 25px;
}

.index-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.index-brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 19px;
  background: var(--yellow);
  box-shadow: 0 5px 0 rgba(145, 107, 40, 0.08);
  font-size: 29px;
  transform: rotate(-4deg);
}
.index-brand strong { display: block; font-size: 20px; font-weight: 950; }
.index-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: 0.06em; }

.unit-index { position: relative; z-index: 1; width: min(1000px, calc(100% - 36px)); margin: 0 auto; padding: 45px 0 30px; }
.index-hero { max-width: 700px; margin: 0 auto 31px; text-align: center; }
.index-eyebrow { margin: 0 0 10px; color: #927049; font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.index-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 52px); font-weight: 950; letter-spacing: -0.035em; line-height: 1.12; }
.index-hero > p:last-child { max-width: 590px; margin: 15px auto 0; color: var(--muted); font-size: 16px; font-weight: 650; line-height: 1.65; }

.unit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; }
.unit-card {
  position: relative;
  display: flex;
  min-height: 465px;
  flex-direction: column;
  padding: 27px 29px 25px;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 34px;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.unit-card:hover { transform: translateY(-7px) rotate(-0.5deg); box-shadow: 0 13px 0 rgba(101,80,73,0.07), 0 26px 50px rgba(101,80,73,0.12); }
.unit-seven { background: linear-gradient(145deg, #e7f6ff, #fff4d9); }
.unit-eight { background: linear-gradient(145deg, #eee8ff, #e8f8ed); }
.unit-chinese { grid-column: 1 / -1; min-height: 405px; background: linear-gradient(145deg, #fff3cf, #e9f8ef 65%, #e5f4fb); }
.unit-arrow { position: absolute; top: 25px; right: 25px; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: rgba(255,255,255,0.8); font-size: 20px; font-weight: 900; }
.unit-art { display: flex; align-items: end; height: 96px; margin-bottom: 20px; gap: 7px; }
.unit-art span { display: inline-block; filter: drop-shadow(0 5px 3px rgba(70,60,80,0.08)); }
.unit-art span:nth-child(1) { font-size: 62px; transform: rotate(-7deg); }
.unit-art span:nth-child(2) { font-size: 48px; }
.unit-art span:nth-child(3) { font-size: 40px; transform: rotate(8deg); }
.unit-art span:nth-child(4) { margin-left: auto; font-size: 70px; }
.unit-label { margin: 0 0 5px; color: #86708e; font-size: 12px; font-weight: 950; letter-spacing: 0.14em; }
.unit-card h2 { margin: 0; font-size: 29px; font-weight: 950; letter-spacing: -0.02em; }
.unit-topic { margin: 5px 0 12px; color: #796b87; font-size: 16px; font-weight: 850; }
.unit-description { margin: 0 0 18px; color: var(--muted); font-size: 14px; font-weight: 650; line-height: 1.6; }
.unit-modes { display: flex; flex-wrap: wrap; gap: 7px; }
.unit-modes span { padding: 7px 10px; border: 2px solid rgba(255,255,255,0.75); border-radius: 999px; background: rgba(255,255,255,0.57); font-size: 11px; font-weight: 850; }
.unit-start { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 22px; font-size: 16px; font-weight: 950; }
.unit-start b { font-size: 22px; }
.index-note { margin: 24px 0 0; color: var(--muted); text-align: center; font-size: 13px; font-weight: 750; }
.index-footer { position: relative; z-index: 1; padding: 8px 20px 28px; color: var(--muted); text-align: center; font-size: 12px; font-weight: 700; }

@media (max-width: 720px) {
  .unit-index { padding-top: 35px; }
  .unit-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; gap: 18px; }
  .unit-card { min-height: 430px; }
  .unit-chinese { grid-column: auto; }
}

@media (max-width: 430px) {
  .index-topbar { width: calc(100% - 24px); padding-top: 16px; }
  .index-brand-mark { width: 48px; height: 48px; border-radius: 16px; font-size: 25px; }
  .index-brand strong { max-width: 240px; font-size: 16px; }
  .index-brand small { font-size: 9px; }
  .unit-index { width: calc(100% - 24px); padding-top: 29px; }
  .index-hero { margin-bottom: 23px; }
  .index-hero h1 { font-size: 34px; }
  .index-hero > p:last-child { font-size: 14px; }
  .unit-card { min-height: 415px; padding: 23px 21px; border-radius: 28px; }
  .unit-card h2 { font-size: 26px; }
  .unit-art { margin-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .unit-card { transition: none; }
}

/* ===== Alphabet Island 分区 ===== */
.abc-index { max-width: 1000px; margin: 0 auto 34px; text-align: center; }
.abc-index > h2 { margin: 6px 0 8px; font-size: clamp(26px, 3.4vw, 34px); font-weight: 950; letter-spacing: -0.03em; }
.abc-index > p { max-width: 620px; margin: 0 auto 20px; color: var(--muted); font-size: 15px; font-weight: 650; line-height: 1.6; }

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

.abc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px 18px;
  border: 4px solid #fff;
  border-radius: 26px;
  background: linear-gradient(160deg, #fff0e3, #ffe9d2);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.abc-card:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: 0 13px 0 rgba(101,80,73,0.07), 0 26px 50px rgba(101,80,73,0.12); }

.abc-glyph-pair {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 18px;
  background: #ffd66b;
  box-shadow: 0 4px 0 rgba(145, 107, 40, 0.14);
  font-size: 25px;
  font-weight: 950;
}

.abc-card h3 { margin: 2px 0 4px; font-size: 17px; font-weight: 950; letter-spacing: -0.01em; }
.abc-letters { margin: 0 0 12px; color: #8a705a; font-size: 13px; font-weight: 850; letter-spacing: 0.12em; }
.abc-card .unit-label { margin: 0; color: #86708e; font-size: 11px; font-weight: 950; letter-spacing: 0.14em; }
.abc-card .unit-start { margin-top: auto; color: #5c5040; font-size: 13px; font-weight: 950; }
.abc-card .unit-start b { font-size: 17px; }

.abc-card.locked { background: linear-gradient(160deg, #f6f4f0, #efece6); opacity: 0.72; }
.abc-card.locked .abc-glyph-pair { background: #e5e0d6; color: #a89f92; }
.abc-locked-note { margin-top: auto; color: #a89f92; font-size: 12px; font-weight: 900; letter-spacing: 0.06em; }

@media (max-width: 720px) {
  .abc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .abc-index { margin-bottom: 26px; }
  .abc-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
  .abc-glyph-pair { width: 50px; height: 50px; font-size: 21px; }
  .abc-card { padding: 16px 10px 14px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .abc-card { transition: none; }
}

/* Alphabet Island 各关卡配色 */
.abc-card.abc-two { background: linear-gradient(160deg, #eee8ff, #e3f4ff); }
.abc-card.abc-two .abc-glyph-pair { background: #b7a1ec; color: #fff; }
.abc-card.abc-three { background: linear-gradient(160deg, #e8f8ee, #eaf7d9); }
.abc-card.abc-three .abc-glyph-pair { background: #73d4be; color: #fff; }
.abc-card.abc-four { background: linear-gradient(160deg, #fff3cf, #ffe9d2); }
.abc-card.abc-four .abc-glyph-pair { background: #ffd66b; color: #7a5a1e; }
.abc-card.abc-five { background: linear-gradient(160deg, #ffeede, #ffe4ec); }
.abc-card.abc-five .abc-glyph-pair { background: #ff8c7d; color: #fff; }
