:root {
  --bg: #eef2ef;
  --bg-accent: #ddebe6;
  --surface: #ffffff;
  --surface-soft: #f7f9f8;
  --text: #162026;
  --muted: #5d6a70;
  --heading: #14364a;
  --line: #d9e2de;
  --shadow: 0 18px 44px rgba(19, 37, 31, 0.09);
  --radius: 18px;
  --primary: #1b6f58;
  --primary-soft: #e4f3ec;
  --secondary: #245c8a;
  --secondary-soft: #e6f0fb;
  --warm: #f8f0d8;
  --warm-line: #e1c980;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(90, 163, 134, 0.14), transparent 22%),
    radial-gradient(circle at 88% 0%, rgba(52, 97, 157, 0.10), transparent 24%),
    linear-gradient(180deg, #f7faf8 0%, var(--bg) 100%);
  font-family: Arial, "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  line-height: 1.8;
}

img {
  max-width: 100%;
}

a {
  color: var(--secondary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(100% - 24px, 1180px);
  margin: 0 auto;
}

.hero {
  padding: 64px 0 42px;
}

.hero-panel {
  padding: 28px 28px 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #bfd7ce;
  background: #fff;
  color: #315e51;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 14px 0 8px;
  color: var(--heading);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.hero .lead {
  max-width: 900px;
  margin: 20px 0 0;
  color: #324046;
  font-size: 18px;
}

.hero-actions,
.pills,
.card-grid,
.feature-grid,
.check-grid,
.figure-grid {
  display: grid;
  gap: 14px;
}

.hero-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #bfd0cb;
  background: #fff;
  color: #21363d;
  font-weight: 800;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.button:hover {
  text-decoration: none;
  filter: brightness(0.98);
}

.pills {
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #32515b;
  font-size: 13px;
  font-weight: 700;
}

.layout {
  width: min(100% - 24px, 1220px);
  margin: 0 auto 72px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.sidebar .title {
  margin: 0 0 10px;
  color: #213943;
  font-size: 14px;
  font-weight: 800;
}

.sidebar a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #4a5960;
  font-size: 14px;
}

.sidebar a:hover,
.sidebar a.active {
  background: var(--primary-soft);
  color: #145340;
  text-decoration: none;
}

.content {
  min-width: 0;
}

.section {
  margin: 0 0 22px;
  padding: 32px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  scroll-margin-top: 20px;
}

.section h2 {
  margin: 0 0 14px;
  color: var(--heading);
  font-size: 28px;
  line-height: 1.32;
}

.section h3 {
  margin: 24px 0 8px;
  color: #253d47;
  font-size: 18px;
}

.section p {
  margin: 0 0 14px;
}

.note,
.good,
.warn,
.danger,
.highlight {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 14px;
}

.note {
  border: 1px solid #c9dbea;
  background: var(--secondary-soft);
  color: #314866;
}

.good {
  border: 1px solid #c4e7d8;
  background: var(--primary-soft);
  color: #245144;
}

.warn {
  border: 1px solid var(--warm-line);
  background: var(--warm);
  color: #66521a;
}

.danger {
  border: 1px solid #ebc2c2;
  background: #fff1f1;
  color: #7c3a3a;
}

.highlight {
  border: 1px solid #d7ddd9;
  background: linear-gradient(180deg, #fbfcfb 0%, #f7faf8 100%);
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.feature,
.step-card,
.gallery-card,
.meta-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.card strong,
.feature strong,
.step-card strong,
.meta-card strong {
  display: block;
  margin-bottom: 6px;
  color: #29404a;
}

.card p,
.feature p,
.step-card p,
.meta-card p {
  margin: 0;
  color: #617077;
  font-size: 14px;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.check-item {
  position: relative;
  padding: 15px 16px 15px 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfb;
}

.check-item::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  line-height: 22px;
}

.check-item strong {
  display: block;
  margin-bottom: 4px;
  color: #28424c;
}

.check-item span {
  color: #617077;
  font-size: 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.step-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ecf6f2;
  color: #1b6f58;
  font-weight: 900;
  margin-bottom: 10px;
}

.figure-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.figure-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(19, 37, 31, 0.06);
}

.figure-card button {
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: #edf2ef;
  cursor: zoom-in;
}

.figure-card img {
  display: block;
  width: 100%;
  height: auto;
}

.figure-caption {
  padding: 13px 15px;
  border-top: 1px solid var(--line);
}

.figure-caption strong {
  display: block;
  margin-bottom: 2px;
  color: #27414b;
}

.figure-caption span {
  color: #66757b;
  font-size: 13px;
}

.note-strip {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.note-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4b5c63;
  font-size: 12px;
  font-weight: 700;
}

.footer {
  padding: 0 20px 44px;
  text-align: center;
  color: #738187;
  font-size: 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.gallery-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid .figure-card {
  box-shadow: none;
}

.dialog {
  width: min(96vw, 1600px);
  max-height: 96vh;
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.dialog::backdrop {
  background: rgba(11, 18, 20, 0.74);
}

.dialog-wrap {
  position: relative;
  max-height: 96vh;
  overflow: auto;
  background: #f1f5f3;
}

.dialog-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.dialog-close {
  position: sticky;
  top: 12px;
  z-index: 2;
  float: right;
  margin: 12px 12px -48px 0;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid #c8d4cf;
  background: rgba(255, 255, 255, 0.96);
  color: #2a3d43;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
  }

  .card-grid,
  .feature-grid,
  .check-grid,
  .steps,
  .figure-grid,
  .gallery-grid,
  .gallery-grid.three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 42px;
  }

  .hero-panel,
  .section,
  .sidebar {
    border-radius: 16px;
  }

  .hero-panel,
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero .lead {
    font-size: 16px;
  }

  .section h2 {
    font-size: 23px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .dialog-close {
    display: none !important;
  }

  .layout {
    width: 100%;
    margin: 0;
    display: block;
  }

  .section,
  .hero-panel,
  .figure-card {
    box-shadow: none;
  }
}
