:root {
  --ink: #172026;
  --muted: #5e6a72;
  --line: #d9e0e5;
  --paper: #ffffff;
  --soft: #f3f6f7;
  --blue: #245b83;
  --green: #2c6e5b;
  --gold: #b1842f;
  --red: #a84d4d;
  --shadow: 0 18px 45px rgba(23, 32, 38, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Arial, "Microsoft JhengHei", "PingFang TC", sans-serif;
  line-height: 1.62;
}

img {
  display: block;
  width: 100%;
}

button,
textarea {
  font: inherit;
}

.topbar {
  position: relative;
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  align-items: end;
  padding: 132px clamp(20px, 6vw, 88px) 56px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(17, 29, 37, 0.84), rgba(17, 29, 37, 0.48)),
    url("assets/rear-room-reference.jpg") center 46% / cover;
}

.quick-nav {
  position: fixed;
  top: 14px;
  left: clamp(20px, 6vw, 88px);
  right: auto;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(760px, calc(100vw - 260px));
  padding: 6px;
  border: 1px solid rgba(217, 224, 229, 0.8);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(23, 32, 38, 0.12);
  backdrop-filter: blur(10px);
}

.language-switcher {
  position: fixed;
  top: 14px;
  right: clamp(20px, 6vw, 88px);
  z-index: 22;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.language-switcher span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.language-toggle {
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  color: #111;
  background: #f7d36a;
  box-shadow: 0 10px 24px rgba(23, 32, 38, 0.18);
  font-weight: 800;
  cursor: pointer;
}

.language-toggle:hover {
  background: #ffe08a;
}

.quick-nav a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
}

.quick-nav a:hover {
  background: #eef4f8;
}

.section-band {
  scroll-margin-top: 88px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.status-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.status-label,
.status-note {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.status-panel strong {
  display: block;
  margin: 7px 0;
  font-size: 1.25rem;
}

.section-band {
  padding: 64px clamp(18px, 5vw, 72px);
  background: var(--paper);
}

.section-band.muted {
  background: var(--soft);
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-inner > h2,
.two-col h2 {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-intro {
  max-width: 880px;
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 36px;
  align-items: center;
}

.hero-media,
.photo-strip figure {
  margin: 0;
}

.hero-media {
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  box-shadow: var(--shadow);
}

.hero-media img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #111;
}

figcaption {
  padding: 10px 12px;
  color: var(--muted);
  background: #fff;
  font-size: 0.86rem;
}

.insight {
  display: grid;
  gap: 6px;
  margin-top: 22px;
  padding: 18px;
  border-left: 5px solid var(--gold);
  background: #fff7e8;
}

.comparison,
.congregation-grid,
.diagram-grid,
.copy-grid {
  display: grid;
  gap: 20px;
}

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

.comparison-column,
.congregation-card,
.diagram-panel,
.copy-card,
.callout,
.layout-notes {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.comparison-column {
  padding: 24px;
}

.comparison-column.accent {
  border-color: rgba(44, 110, 91, 0.32);
  background: #eff8f4;
}

.comparison-column h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.comparison-column ul,
.diagram-list {
  margin: 0;
  padding-left: 20px;
}

.split-section {
  background: #fbfcfd;
}

.congregation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.congregation-card {
  overflow: hidden;
  scroll-margin-top: 138px;
}

.card-top {
  display: grid;
  gap: 8px;
  padding: 22px;
  color: #fff;
}

.english .card-top {
  background: var(--blue);
}

.chinese .card-top {
  background: var(--green);
}

.purchase-note {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(177, 132, 47, 0.38);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  background: #fff9ea;
}

.purchase-note strong {
  display: block;
  margin-bottom: 4px;
}

.purchase-note p {
  margin: 0;
  color: var(--muted);
}

.badge {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
}

.issue-list {
  padding: 18px 22px 22px;
}

.issue-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.issue-row:last-child {
  border-bottom: 0;
}

.issue-row > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-weight: 700;
}

.issue-row h3 {
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.issue-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

.room-map {
  position: relative;
  min-height: 760px;
  aspect-ratio: 10 / 14;
  padding: 18px;
  border: 3px solid #51616b;
  border-radius: 8px;
  background:
    linear-gradient(#e7edf0 1px, transparent 1px),
    linear-gradient(90deg, #e7edf0 1px, transparent 1px),
    #fff;
  background-size: 34px 34px;
}

.room-zone {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  font-weight: 700;
}

.stage {
  top: 22px;
  left: 28%;
  right: 28%;
  height: 62px;
  border-color: rgba(168, 77, 77, 0.45);
  background: #fff1f1;
}

.pulpit {
  top: 112px;
  left: 50%;
  width: 18%;
  min-height: 60px;
  transform: translateX(-50%);
  border-color: rgba(36, 91, 131, 0.45);
  background: #f4f8fb;
}

.speaker-front-left {
  top: 108px;
  left: 4%;
  width: 16%;
  min-height: 68px;
  border-color: rgba(168, 77, 77, 0.45);
  background: #fff7f7;
  font-size: 0.9rem;
}

.stage-box {
  top: 108px;
  right: 4%;
  width: 18%;
  min-height: 68px;
  border-color: rgba(177, 132, 47, 0.48);
  background: #fff8e7;
}

.piano {
  top: 210px;
  left: 5%;
  width: 18%;
  min-height: 82px;
  border-color: rgba(44, 110, 91, 0.42);
  background: #eff8f4;
}

.drum {
  top: 210px;
  left: 25%;
  width: 20%;
  min-height: 82px;
  border-color: rgba(36, 91, 131, 0.42);
  background: #f4f8fb;
}

.screen-monitor {
  top: 280px;
  left: 38%;
  width: 18%;
  min-height: 42px;
  border-color: rgba(36, 91, 131, 0.48);
  background: #eef4f8;
  font-size: 0.86rem;
}

.speaker-front-right {
  top: 210px;
  right: 5%;
  width: 22%;
  min-height: 82px;
  border-color: rgba(168, 77, 77, 0.45);
  background: #fff7f7;
}

.seats {
  top: 330px;
  left: 6%;
  right: 6%;
  bottom: 198px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(36, 91, 131, 0.06) 0,
      rgba(36, 91, 131, 0.06) 24px,
      rgba(36, 91, 131, 0.14) 25px,
      rgba(36, 91, 131, 0.14) 27px
    ),
    rgba(36, 91, 131, 0.08);
}

.rear {
  left: 34%;
  width: 42%;
  bottom: 76px;
  height: 90px;
  border-color: rgba(44, 110, 91, 0.48);
  background: #eff8f4;
  padding: 10px 14px;
}

.curtain {
  left: 5%;
  right: 5%;
  bottom: 22px;
  height: 34px;
  border-color: rgba(36, 91, 131, 0.3);
  background: #eef4f8;
  font-size: 0.9rem;
}

.room-marker {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 58px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px dashed #60727c;
  border-radius: 6px;
  color: #40525d;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.cable-precheck {
  top: 18px;
  left: 4%;
  width: 18%;
}

.network-front {
  top: 18px;
  right: 4%;
  width: 16%;
}

.port-front {
  top: 288px;
  right: 2%;
  width: 12%;
}

.port-rear {
  right: 2%;
  bottom: 122px;
  width: 12%;
}

.network-rear {
  right: 4%;
  bottom: 58px;
  width: 16%;
}

.power-rear {
  left: 4%;
  bottom: 58px;
  width: 12%;
}

.audio-line {
  left: 46%;
  top: 118px;
  bottom: 116px;
  width: 160px;
  border-style: dashed;
  border-color: #7f8d95;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.layout-notes {
  padding: 24px;
}

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

.confirm-card {
  display: grid;
  grid-template-columns: 34px 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.confirm-card.done {
  opacity: 0.7;
}

.confirm-card.done .confirm-text {
  color: var(--muted);
  text-decoration: line-through;
}

.confirm-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.confirm-text {
  margin: 0;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.photo-strip figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.photo-strip img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

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

.diagram-panel {
  padding: 22px;
}

.diagram-panel.wide {
  grid-column: 1 / -1;
}

.diagram-title {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.diagram-number {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}

.diagram-title h3 {
  margin-bottom: 0;
}

.flow-diagram {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  padding: 18px;
  border-radius: 8px;
  background: #f7fafb;
}

.flow-inputs {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.flow-node {
  display: grid;
  place-items: center;
  min-height: 84px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  font-weight: 700;
}

.flow-node span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
}

.flow-arrow {
  width: 3px;
  height: 34px;
  margin: 0 auto;
  background: var(--muted);
}

.flow-arrow::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 25px 0 0 -6px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid var(--muted);
  border-bottom: 0;
}

.flow-output-label {
  width: max-content;
  max-width: 100%;
  margin: 2px auto -2px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eef5f8;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.flow-branch {
  display: grid;
  gap: 10px;
}

.snake-node {
  border-color: rgba(177, 132, 47, 0.48);
}

.mixer-node {
  border-color: rgba(36, 91, 131, 0.48);
}

.room-mic {
  border-color: rgba(48, 126, 103, 0.48);
}

.stream {
  border-color: rgba(168, 77, 77, 0.48);
}

.diagram-caption {
  margin: 14px 0 0;
  color: var(--muted);
}

.video-panel {
  display: flex;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
}

.video-panel video {
  display: block;
  width: min(100%, 420px);
  max-height: 72vh;
  object-fit: contain;
  background: #101820;
}

.mini-floor {
  display: grid;
  grid-template-rows: 70px 70px 140px 76px;
  gap: 10px;
  padding: 12px;
  border: 2px solid #60727c;
  border-radius: 8px;
  background: #f7fafb;
}

.mini-floor > div,
.split-root,
.split-card {
  display: grid;
  place-items: center;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
}

.mini-stage {
  background: #fff1f1;
}

.mini-snake {
  margin-left: auto;
  width: 48%;
  background: #fff8e7;
}

.mini-seats {
  background: #eef4f8;
}

.mini-rear {
  width: 52%;
  justify-self: center;
  background: #eff8f4;
}

.diagram-list {
  margin-top: 16px;
}

.split-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.split-root {
  grid-column: 1 / -1;
  min-height: 58px;
  color: #fff;
  background: var(--ink);
}

.split-lines {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  height: 26px;
}

.split-lines div {
  border-left: 3px solid var(--muted);
  border-bottom: 3px solid var(--muted);
}

.split-card {
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8fafb;
}

.split-card span {
  color: var(--muted);
  font-weight: 400;
}

.task-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
}

.tool-button,
.copy-button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.tool-button:hover,
.copy-button:hover {
  border-color: var(--blue);
}

.task-list {
  display: grid;
  gap: 14px;
}

.task-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-card.done {
  opacity: 0.72;
}

.task-card.done .task-title {
  color: var(--muted);
  text-decoration: line-through;
}

.task-check {
  width: 22px;
  height: 22px;
  margin-top: 5px;
}

.task-title {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.task-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4f8;
  color: var(--blue);
  font-size: 0.78rem;
}

.task-body {
  color: var(--muted);
}

.note-label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 700;
}

.task-note {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mini-action {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.mini-action.primary {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.mini-action:hover {
  border-color: var(--blue);
}

.mini-action.primary:hover {
  background: #1d4d70;
}

.steps {
  margin: 0;
  padding-left: 22px;
}

.callout {
  padding: 24px;
  background: #fff8e7;
  border-color: rgba(177, 132, 47, 0.35);
}

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

.copy-card {
  padding: 20px;
}

.copy-head {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.copy-head h3 {
  margin-bottom: 0;
  font-size: 1.06rem;
}

.copy-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 24px clamp(18px, 5vw, 72px);
  color: #dce7ec;
  background: #172026;
  font-size: 0.9rem;
}

.footer-nav {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-nav a {
  padding: 8px 12px;
  border: 1px solid rgba(220, 231, 236, 0.28);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 800;
}

.footer-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.copy-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  box-shadow: var(--shadow);
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 24;
  min-width: 58px;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  color: #111;
  background: #f7d36a;
  box-shadow: 0 12px 30px rgba(23, 32, 38, 0.2);
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #ffe08a;
}

@media (max-width: 880px) {
  .topbar,
  .two-col,
  .comparison,
  .congregation-grid,
  .layout-grid,
  .diagram-grid,
  .copy-grid,
  .photo-strip {
    grid-template-columns: 1fr;
  }

  .topbar {
    min-height: 82vh;
    align-items: end;
    padding-top: 164px;
  }

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

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

  .flow-arrow {
    width: 3px;
    height: 32px;
    margin: 0 auto;
  }

  .flow-arrow::after {
    margin: 24px 0 0 -6px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid var(--muted);
    border-bottom: 0;
  }

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

  .room-map {
    min-height: 780px;
  }

  .seats {
    left: 6%;
    right: 6%;
    top: 330px;
    bottom: 198px;
  }

  .speaker-front-right {
    top: 210px;
    width: 22%;
  }

  .audio-line {
    display: none;
  }

  .quick-nav {
    left: 12px;
    top: 12px;
    max-width: calc(100vw - 148px);
  }

  .language-switcher {
    top: 12px;
    right: 12px;
  }

  .language-switcher span {
    display: none;
  }
}

@media (max-width: 560px) {
  .quick-nav {
    top: 12px;
    max-width: calc(100vw - 138px);
  }

  .language-toggle {
    left: auto;
    min-height: 40px;
    padding: 7px 14px;
  }

  .quick-nav a {
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .section-band {
    padding-top: 44px;
    padding-bottom: 44px;
  }

  .status-panel {
    padding: 18px;
  }

  .task-card {
    grid-template-columns: 28px 1fr;
    padding: 14px;
  }

  .copy-head {
    display: grid;
  }
}
