:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #60716d;
  --line: #d6e3df;
  --surface: #ffffff;
  --soft: #f4f8f7;
  --tint: #e8f2ef;
  --brand: #075e50;
  --brand-dark: #06483d;
  --blue: #0b6f8f;
  --accent: #e86a1c;
  --accent-dark: #c84c0b;
  --gold: #dba54a;
  --shadow: 0 18px 46px rgba(20, 39, 34, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #edf3f1;
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
}

body.is-embedded {
  background: #edf3f1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.manual-hero {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(6, 72, 61, 0.98), rgba(7, 94, 80, 0.96), rgba(11, 111, 143, 0.96)),
    linear-gradient(90deg, transparent 0 23px, rgba(255, 255, 255, 0.08) 23px 24px);
  border-bottom: 5px solid var(--gold);
}

.topbar,
.hero-content,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--brand);
  background: #fff;
  border-radius: 8px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
}

.manual-link {
  flex: 0 0 auto;
  padding: 11px 14px;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  font-weight: 900;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 36px;
  align-items: end;
  padding: 44px 0 54px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.manual-hero .eyebrow {
  color: #ffd99b;
}

h1,
h2,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-panel {
  display: grid;
  gap: 10px;
  padding: 22px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel span,
.tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--brand-dark);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.hero-panel strong {
  color: var(--accent-dark);
  font-size: 28px;
}

.hero-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

main {
  display: grid;
  gap: 26px;
  padding: 28px 0 56px;
}

body.is-embedded .manual-hero {
  display: none;
}

body.is-embedded main {
  width: min(100% - 28px, 980px);
  padding: 18px 0 24px;
}

.quick-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.map-card,
.example-card,
.flow-step,
.tip-grid article,
.command-card,
.notice-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(20, 39, 34, 0.06);
}

.map-card {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 18px;
}

.map-card:hover {
  border-color: var(--brand);
  background: #fbfdfc;
}

.step-dot,
.flow-step span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  font-weight: 900;
}

.map-card strong {
  font-size: 19px;
}

.map-card small {
  color: var(--muted);
  line-height: 1.6;
}

.section-grid,
.flow-section,
.viewer-section,
.notice-section {
  padding: 26px;
}

.section-grid,
.flow-section,
.viewer-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 26px;
  align-items: start;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.8;
}

.example-board,
.maintenance-list {
  display: grid;
  gap: 12px;
}

.example-card,
.command-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.example-card code {
  display: block;
  padding: 14px;
  color: var(--brand-dark);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
}

.example-card p,
.command-card p,
.tip-grid p,
.flow-step p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.example-card.is-strong {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 106, 28, 0.13);
}

.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.flow-step {
  display: grid;
  align-content: start;
  min-height: 220px;
  gap: 14px;
  padding: 20px;
}

.flow-step strong {
  font-size: 21px;
}

.viewer-section {
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
}

.viewer-demo {
  overflow: hidden;
  background: #dfe8e5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fake-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.fake-toolbar button {
  min-width: 72px;
  height: 38px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.fake-plan {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 54px;
  gap: 8px;
  min-height: 320px;
  padding: 28px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.36) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.36) 1px, transparent 1px),
    #dfe8e5;
  background-size: 28px 28px;
}

.room {
  background: #fff;
  border: 2px solid #25332f;
}

.r1 {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.r2 {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
}

.r3 {
  grid-column: 5 / 7;
  grid-row: 1 / 4;
}

.r4 {
  grid-column: 2 / 5;
  grid-row: 3 / 5;
}

.marker {
  position: absolute;
  left: 72px;
  top: 92px;
  padding: 10px 14px;
  color: #fff;
  background: var(--accent-dark);
  border: 8px solid var(--accent);
  border-radius: 999px;
  box-shadow:
    0 0 0 12px rgba(232, 106, 28, 0.16),
    0 16px 30px rgba(74, 30, 11, 0.24);
  font-size: 22px;
  font-weight: 900;
}

.tip-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tip-grid article {
  padding: 18px;
}

.tip-grid strong,
.command-card strong {
  font-size: 19px;
}

pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  color: #fff;
  background: #18302b;
  border-radius: 8px;
}

code {
  font-family: Consolas, "Courier New", monospace;
}

.notice-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 24px;
  border-left: 6px solid var(--accent);
}

.notice-section ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 980px) {
  .hero-content,
  .section-grid,
  .flow-section,
  .viewer-section,
  .notice-section {
    grid-template-columns: 1fr;
  }

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

  .flow {
    grid-template-columns: 1fr;
  }

  .flow-step {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .topbar,
  .hero-content,
  main {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-link {
    text-align: center;
  }

  .hero-content {
    padding: 26px 0 34px;
  }

  .hero-panel strong {
    font-size: 24px;
  }

  h1 {
    font-size: 32px;
    line-height: 1.25;
  }

  .hero-copy {
    font-size: 16px;
  }

  .quick-map,
  .tip-grid {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .flow-section,
  .viewer-section,
  .notice-section {
    padding: 18px;
  }

  .fake-plan {
    min-height: 260px;
    padding: 18px;
  }

  .marker {
    left: 42px;
    top: 86px;
    font-size: 18px;
  }
}
