:root {
  --ink: #17201c;
  --muted: #5f6b63;
  --line: #d8ddd6;
  --paper: #fffdf8;
  --wash: #f3f7ef;
  --leaf: #2f6b4f;
  --leaf-dark: #1f4b38;
  --rose: #b85f52;
  --gold: #b8872f;
  --white: #ffffff;
  --shadow: 0 14px 34px rgba(23, 32, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.bar,
.section-inner,
.hero-inner,
.form-shell,
.admin-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.bar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

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

.hero {
  min-height: calc(100svh - 64px);
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.94) 0%, rgba(255, 253, 248, 0.86) 48%, rgba(255, 253, 248, 0.48) 100%),
    linear-gradient(135deg, #eef5e8 0%, #f9efe6 52%, #e8f1f4 100%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  padding: 56px 0 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(260px, 0.72fr);
  gap: 48px;
  align-items: center;
}

.hero-copy h1,
.page-title {
  margin: 0 0 18px;
  font-size: clamp(2.35rem, 7vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  font-size: 1.15rem;
  color: #38453d;
}

.hero-card {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-portrait {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.portrait-placeholder {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 1px dashed #aeb8ad;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--leaf);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background: var(--leaf-dark);
}

.btn.secondary {
  background: transparent;
  color: var(--leaf-dark);
  border-color: var(--leaf);
}

.btn.ghost {
  background: var(--white);
  color: var(--leaf-dark);
  border-color: var(--line);
}

.text-link {
  color: var(--leaf-dark);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.fine-print {
  max-width: 760px;
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.section.alt {
  background: var(--wash);
}

.section h2 {
  margin: 0 0 22px;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.section h3 {
  margin: 0 0 10px;
  font-size: 1.24rem;
  line-height: 1.25;
}

.pain-list,
.plain-list {
  padding-left: 1.2rem;
}

.pain-list li,
.plain-list li {
  margin: 10px 0;
}

.cards,
.offers,
.steps,
.curriculum-grid,
.faq-list {
  display: grid;
  gap: 18px;
}

.cards,
.offers,
.curriculum-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.offer,
.curriculum-card,
.step,
.faq-item,
.form-panel,
.login-panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 22px;
}

.card strong,
.offer strong {
  color: var(--leaf-dark);
}

.curriculum-section {
  padding: 56px 0;
}

.curriculum-section h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
}

.curriculum-section .lede {
  max-width: 820px;
}

.curriculum-section h3 {
  font-size: 1.12rem;
}

.offers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  counter-reset: step;
}

.step {
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-weight: 800;
}

.about-copy {
  max-width: 850px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  gap: 46px;
  align-items: center;
}

.teaching-gallery {
  display: grid;
  grid-template-columns: minmax(140px, 0.72fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: center;
}

.teaching-stack {
  display: grid;
  gap: 14px;
}

.teaching-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.teaching-shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.teaching-shot-main {
  aspect-ratio: 0.72;
}

.teaching-stack .teaching-shot:first-child {
  aspect-ratio: 2.9;
}

.teaching-stack .teaching-shot:last-child {
  aspect-ratio: 2.15;
}

.faq-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer {
  border-top: 0;
  padding: 28px 0;
  color: var(--muted);
}

.form-page,
.admin-page,
.wizard-page {
  background: var(--wash);
  min-height: 100svh;
}

.form-shell,
.admin-shell,
.wizard-shell {
  padding: 44px 0 72px;
}

.wizard-shell {
  min-height: calc(100svh - 64px);
  display: grid;
  place-items: center;
}

.wizard-card {
  width: min(720px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 28px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 800;
}

.wizard-card h1 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.progress-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.progress-dots span {
  width: 32px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.progress-dots span.active {
  background: var(--leaf);
}

.wizard-options {
  display: grid;
  gap: 12px;
}

.wizard-option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 16px;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.wizard-option:hover,
.wizard-option:focus-visible {
  border-color: var(--leaf);
  outline: none;
  background: var(--wash);
}

.wizard-result {
  display: grid;
  gap: 16px;
}

.form-panel form,
.login-panel form {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d0c8;
  border-radius: 8px;
  background: var(--white);
  padding: 11px 12px;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.hp {
  display: none;
}

.status {
  min-height: 28px;
  color: var(--leaf-dark);
  font-weight: 700;
}

.status.error {
  color: #9b2f25;
}

.admin-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.filters {
  display: grid;
  gap: 10px;
}

.lead-list {
  display: grid;
  gap: 12px;
}

.lead-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--white);
  display: grid;
  gap: 12px;
}

.lead-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.lead-meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .bar {
    min-height: 58px;
  }

  .top-actions .btn.secondary {
    display: none;
  }

  .hero-inner,
  .about-layout,
  .teaching-gallery,
  .cards,
  .curriculum-grid,
  .offers,
  .steps,
  .faq-list,
  .field-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-card {
    min-height: 260px;
  }

  .hero-portrait {
    min-height: 220px;
  }

  .about-layout {
    gap: 28px;
  }

  .teaching-shot-main {
    aspect-ratio: 1.15;
  }

  .portrait-placeholder {
    min-height: 220px;
  }

  .section {
    padding: 52px 0;
  }

  .cta-row .btn {
    width: 100%;
  }
}
