:root {
  --bg: #fffaf4;
  --ink: #3c2418;
  --ink-soft: #8d6f62;
  --nav: #6b4d40;
  --pink: #f6a3ae;
  --pink-deep: #e88996;
  --pink-pill: #fde6ea;
  --pink-text: #d97886;
  --cloud: #f8d5de;
  --white: #ffffff;
  --chinese: #ffe8eb;
  --english: #e3f5e8;
  --maths: #fff3c2;
  --humanities: #eee4fa;
  --science: #fde4ea;
  --putonghua: #e7f5ea;
  --arrow-pink: #e88996;
  --arrow-green: #4ea36a;
  --radius: 1.35rem;
  --shadow: 0 8px 22px rgba(60, 36, 24, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Nunito, "Noto Sans TC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.site-header {
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.85rem 0 0.7rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  flex: none;
}
.logo-mark { width: 2.7rem; height: 2.7rem; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text strong {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.logo-text small {
  font-size: 1rem;
  color: var(--ink-soft);
  font-weight: 700;
  white-space: nowrap;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  color: var(--nav);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
}
.nav a[aria-current="page"],
.nav a.is-active {
  background: var(--pink-pill);
  color: var(--pink-text);
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
}
.icon-btn {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  border: 1.5px solid #eadfd8;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--nav);
  text-decoration: none;
}
.avatar {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--nav);
  font-size: 0.7rem;
}
.avatar-flower {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: var(--pink-pill);
  display: grid;
  place-items: center;
  border: 1.5px solid #f4c9d0;
}
.menu-btn { display: none; }

.hero { padding: 0.35rem 0 1.25rem; }
.hero-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 0.4rem;
  background:
    radial-gradient(ellipse 40% 55% at 16% 18%, #ffffff 0%, transparent 70%),
    radial-gradient(ellipse 36% 44% at 88% 14%, #ffffff 0%, transparent 68%),
    radial-gradient(ellipse 52% 58% at 80% 94%, #e8f6ea 0%, transparent 72%),
    radial-gradient(ellipse 34% 40% at 22% 100%, #ffe8ee 0%, transparent 70%),
    linear-gradient(118deg, #fff8f3 0%, #fff2ee 46%, #f5f8f1 100%);
  border-radius: 2rem;
  padding: 1.7rem 0.7rem 0.7rem 2.1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 24.5rem;
}
.hero-copy { position: relative; z-index: 1; padding: 0.4rem 0 2.4rem; container-type: inline-size; }
.hero h1 {
  display: flex;
  flex-direction: column;
  font-weight: 800;
  font-size: clamp(2.4rem, 5.2vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.7rem;
}
.hero h1 .h1-line { white-space: nowrap; }
.hero .lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.32rem;
  font-weight: 700;
  max-width: 28rem;
  line-height: 1.45;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--pink);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.72rem 1.25rem;
  box-shadow: 0 6px 16px rgba(246, 163, 174, 0.35);
}
.btn:hover { background: var(--pink-deep); }
.hero-art {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  align-self: stretch;
  min-height: 22.5rem;
  margin: 0;
  overflow: hidden;
}
.hero-art img {
  width: auto;
  height: 100%;
  max-width: 100%;
  display: block;
  object-fit: contain;
  object-position: right bottom;
}

.subjects { padding: 0 0 2.8rem; }
.grid-subjects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.95rem;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 1;
  border-radius: var(--radius);
  padding: 1.15rem 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.tile .art {
  width: 78%;
  max-width: 12.5rem;
  height: auto;
  max-height: 58%;
  object-fit: contain;
  display: block;
  margin: 0 0 0.7rem;
}
.tile .label {
  display: block;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tile .sub {
  display: block;
  margin-top: 0.22rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.3;
}
.wide {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 6.4rem;
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.wide img {
  width: 4.4rem;
  height: 4.4rem;
  object-fit: contain;
  flex: none;
}
.wide .copy { flex: 1; }
.wide h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}
.wide p {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.92rem;
}
.wide .go {
  font-size: 1.35rem;
  font-weight: 800;
  flex: none;
}
.tile.chinese { background: var(--chinese); }
.tile.english { background: var(--english); }
.tile.maths { background: var(--maths); }
.tile.humanities { background: var(--humanities); }
.tile.science { background: var(--science); }
.tile.putonghua { background: var(--putonghua); }
.wide.science .go { color: var(--arrow-pink); }
.wide.putonghua .go { color: var(--arrow-green); }

.page-hero { padding: 0.6rem 0 1.2rem; position: relative; }
.crumb {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.page-hero h1 {
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.page-hero .blurb {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 1.08rem;
  max-width: 28rem;
}
.page-hero .subject-art {
  position: absolute;
  right: 0;
  bottom: 0.2rem;
  width: 7.5rem;
  height: 7.5rem;
  object-fit: contain;
}
.practice { padding: 0 0 2.6rem; }
.practice h2 {
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0 0 0.9rem;
}
.cards { display: grid; gap: 0.8rem; }
.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.05rem 1.15rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}
.card-index {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--pink-deep);
  margin-right: 0.8rem;
}
.card h3 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.card p { margin: 0.2rem 0 0; color: var(--ink-soft); font-weight: 700; }
.card .arrow { font-size: 1.5rem; color: var(--ink); }
.empty {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  padding: 2rem 1.3rem;
  text-align: center;
}
.empty h3 { margin: 0 0 0.35rem; font-weight: 800; }
.empty p { margin: 0; color: var(--ink-soft); font-weight: 700; }

.site-footer {
  margin-top: auto;
  padding: 1.1rem 0 1.3rem;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.88rem;
}

@media (max-width: 860px) {
  .hero-banner {
    grid-template-columns: 1fr 1.05fr;
    align-items: stretch;
    min-height: 22rem;
    padding: 1.35rem 0.45rem 0.55rem 1.4rem;
    border-radius: 1.6rem;
  }
  .hero-copy { padding: 0.35rem 0 1.6rem; }
  .hero-art { min-height: 20rem; margin: 0; overflow: hidden; }
  .hero-art img { width: auto; height: 100%; max-width: 100%; object-fit: contain; object-position: right bottom; transform: none; }
  .grid-subjects { grid-template-columns: 1fr 1fr; }
  .tile .label { font-size: 1.22rem; }
  .page-hero .subject-art { width: 5.4rem; height: 5.4rem; }
}
@media (max-width: 640px) {
  .hero-banner {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 20.5rem;
    padding: 1.15rem 0.15rem 0 1.1rem;
    border-radius: 1.4rem;
  }
  .hero-copy { padding: 0.1rem 0 0.4rem; }
  .hero h1 { font-size: clamp(1.36rem, 11.6cqi, 1.82rem); padding-right: 0; }
  .hero .lede { font-size: 1.02rem; max-width: 58%; padding-bottom: 5.8rem; }
  .hero-art {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 58%;
    height: 78%;
    min-height: 0;
    overflow: hidden;
  }
  .hero-art img { width: auto; height: 100%; max-width: none; transform: none; }
  .logo-mark { width: 2.3rem; height: 2.3rem; }
  .logo-text strong { font-size: 1.2rem; }
  .logo-text small { font-size: 0.8rem; }
  .tile .art { width: 74%; margin-bottom: 0.45rem; }
  .tile .label { font-size: 1.12rem; }
  .tile .sub { font-size: 0.8rem; }
}
@media (max-width: 420px) {
  .tile { padding: 0.7rem 0.55rem 0.75rem; }
}

.avatar-flower svg { width: 1.25rem; height: 1.25rem; }
.card > span:first-child {
  display: flex;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

@media (max-width: 860px) {
  .hero { padding-top: 0.2rem; }
  .header-inner { flex-wrap: wrap; gap: 0.45rem 0.8rem; }
  .nav {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
    gap: 0;
  }
  .nav a { font-size: 0.88rem; padding: 0.3rem 0.65rem; }
}
