:root {
  --ink: #4b4036;
  --ink-soft: #6d5c4d;
  --paper: #fff9f2;
  --brown: #3f342c;
  --blush: #ffb6c1;
  --gold: #ffd59a;
  --line: #eadbc8;
  --card: #fffdf8;
  --sans: "Noto Sans TC", "PingFang TC", "Segoe UI", sans-serif;
  --display: "Noto Sans TC", "PingFang TC", "Segoe UI", sans-serif;
  --shadow: 0 16px 30px rgba(63, 52, 44, 0.1);
  --max: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.75;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 28rem 22rem at -4% -6%, rgba(255, 213, 154, 0.7), transparent 70%),
    radial-gradient(ellipse 22rem 18rem at 104% 18%, rgba(235, 201, 164, 0.55), transparent 70%),
    radial-gradient(ellipse 18rem 16rem at 8% 92%, rgba(166, 124, 82, 0.16), transparent 70%),
    radial-gradient(ellipse 16rem 14rem at 92% 88%, rgba(255, 182, 193, 0.28), transparent 72%),
    linear-gradient(160deg, #fff9f2 0%, #fffdf8 48%, #f8f5ec 100%);
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--brown);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(var(--max), calc(100% - 2.4rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.25rem;
  width: min(1120px, calc(100% - 2rem));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  color: var(--ink);
}

.mark {
  width: 2.15rem;
  height: 2.15rem;
  display: block;
}

.nav {
  display: none;
  position: fixed;
  inset: 4.25rem 0 0 0;
  z-index: 20;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  padding: 2rem max(8vw, 1.5rem) 4rem;
  background:
    radial-gradient(ellipse 24rem 18rem at 0% 0%, rgba(255, 213, 154, 0.55), transparent 70%),
    radial-gradient(ellipse 18rem 16rem at 100% 100%, rgba(255, 182, 193, 0.28), transparent 70%),
    #fff9f2;
  border-top: 1px solid var(--line);
}

.nav.open {
  display: flex;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.nav a[aria-current="page"] {
  color: #a67c52;
}

.nav .btn {
  margin-top: 1.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.menu-toggle:hover {
  background: rgba(255, 213, 154, 0.35);
}

.bars {
  display: grid;
  gap: 5px;
}

.bars span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body.menu-open {
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.55rem 1.45rem;
  border: 0;
  border-radius: 999px;
  background: var(--brown);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 16px 30px rgba(63, 52, 44, 0.22);
  cursor: pointer;
}

.btn.blush {
  background: linear-gradient(90deg, #ffb6c1, #ffd59a);
  color: #fff;
  box-shadow: 0 16px 30px rgba(255, 150, 170, 0.35);
}

.btn.secondary {
  background: #fff;
  color: #5b4b3e;
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 6.5rem 0 5rem;
}

.hero h1 {
  margin: 0.2rem 0 0.7rem;
  font-size: clamp(3.6rem, 9vw, 6.6rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1.02;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 0.8rem;
  padding: 0.32rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #5b4b3e;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lede {
  margin: 0 auto;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  font-weight: 500;
  line-height: 1.6;
}

.en {
  margin: 0.75rem 0 0;
  color: #a67c52;
  font-style: italic;
}

.lede .line {
  display: inline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  margin: 0;
  color: #c4b09a;
  letter-spacing: 0.28em;
  font-size: 0.75rem;
  font-weight: 600;
}

.section {
  padding: 4.5rem 0 1rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-head a {
  color: #a67c52;
  text-decoration: none;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: -0.04em;
  line-height: 1.2;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 900;
  color: var(--ink);
}

.course-list,
.steps,
.detail-list {
  display: grid;
  gap: 0.9rem;
}

.steps {
  grid-template-columns: repeat(3, 1fr);
}

.course-row,
.step,
.detail,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 10px 28px rgba(75, 64, 54, 0.05);
}

.course-row {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1rem;
  align-items: center;
  text-decoration: none;
}

.course-row:hover,
.step:hover,
.detail:hover,
.panel:hover {
  border-color: #e2c9a4;
}

.course-row strong,
.step strong {
  font-size: 1.15rem;
  font-weight: 800;
}

.age {
  color: #a67c52;
  font-weight: 700;
}

.page-hero {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 8rem 0 1.5rem;
}

.page-hero h1 {
  margin: 0;
  max-width: 14em;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--ink);
}

.page-hero p {
  max-width: 40rem;
  color: var(--ink-soft);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

.form {
  display: grid;
  gap: 1rem;
}

.note {
  color: var(--ink-soft);
}

.success {
  display: none;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff3e4;
  color: var(--ink);
  padding: 1rem;
}

.success.show {
  display: block;
}

.site-footer {
  margin-top: 4rem;
  background: var(--ink);
  color: #fffdf8;
  padding: 2.4rem 0 1.6rem;
}

.footer-inner,
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: block;
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-footer a {
  color: #fff3e4;
  text-decoration: none;
}

.site-footer p {
  margin: 0.2rem 0;
}

.load-error {
  margin: 0;
  padding: 0.8rem 1rem;
  background: var(--brown);
  color: white;
}

.fine {
  width: min(var(--max), calc(100% - 2.4rem));
  margin: 1.4rem auto 0;
  color: rgba(255, 243, 228, 0.72);
  font-size: 0.92rem;
}

:focus-visible {
  outline: 2px solid #a67c52;
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .lede .line {
    display: block;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .page-hero {
    min-height: 0;
    padding-top: 6.5rem;
  }

  .steps,
  .course-row,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:hover {
    transform: none;
  }
}
