:root {
  color-scheme: light;
  --bg: #f7efe4;
  --panel: #fffaf3;
  --panel-soft: #f2e3d2;
  --text: #3b2b22;
  --muted: #806a5d;
  --line: #d8cab5;
  --accent: #c96f4a;
  --accent-2: #805637;
  --accent-3: #d8a64d;
  --olive: #6b7a52;
  --graphite: #3b2b22;
  --shadow: 0 18px 48px rgba(59, 43, 34, 0.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1614;
  --panel: #231e1a;
  --panel-soft: #2e2620;
  --text: #f6eadc;
  --muted: #c4b5a5;
  --line: #4a3d32;
  --accent: #e39a73;
  --accent-2: #d4bfa8;
  --accent-3: #f0c66a;
  --olive: #a9b78f;
  --graphite: #f2e8dc;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.home-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.compact-shell {
  width: min(840px, calc(100% - 32px));
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-2);
  color: var(--panel);
  font-size: 0.82rem;
  font-weight: 800;
}

:root[data-theme="dark"] .brand-mark {
  color: #1a1614;
}

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

.brand strong {
  font-size: 1.03rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.header-actions,
.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  min-width: 0;
  margin-left: auto;
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.site-nav a,
.button,
.all-notes-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 750;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"],
.button:hover,
.button:focus-visible,
.all-notes-link:hover,
.all-notes-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent-2);
}

.theme-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent-2);
}

.hero {
  position: relative;
  min-height: clamp(260px, 36vh, 380px);
  display: grid;
  align-items: end;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(59, 43, 34, 0.72), rgba(59, 43, 34, 0.3) 58%, rgba(59, 43, 34, 0.08));
  content: "";
}

:root[data-theme="dark"] .hero::before {
  background: linear-gradient(90deg, rgba(26, 22, 20, 0.8), rgba(26, 22, 20, 0.5) 58%, rgba(26, 22, 20, 0.18));
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
  padding: clamp(24px, 4vw, 44px);
  color: #fffaf3;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--accent-3);
}

.hero h1,
.section-heading h2,
.message-panel h1 {
  margin: 0;
  line-height: 1.12;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero p {
  width: min(650px, 100%);
  margin: 18px 0 0;
  color: #f7efe4;
  font-size: 1.08rem;
  line-height: 1.85;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.primary-button {
  border-color: var(--accent-2);
  background: var(--accent-2);
  color: var(--panel);
}

:root[data-theme="dark"] .primary-button {
  color: #1a1614;
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: var(--accent-3);
  color: var(--panel);
}

.service-band,
.notes-band {
  margin-top: 56px;
}

.section-heading {
  display: block;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin-top: 4px;
  font-size: 1.6rem;
}

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

.service-card {
  position: relative;
  display: grid;
  grid-template-rows: 130px minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.service-card img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  padding: 14px;
  background: var(--panel-soft);
}

.service-card.primary-card {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  box-shadow: var(--shadow);
}

.service-card:not(.primary-card) {
  box-shadow: none;
  border-color: color-mix(in srgb, var(--line) 60%, transparent);
}

.quiet-card {
  background: color-mix(in srgb, var(--panel) 78%, var(--graphite) 6%);
}

.status-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 850;
}

.status-pill.active {
  border-color: color-mix(in srgb, var(--olive) 48%, var(--line));
  color: var(--olive);
}

.status-pill.private {
  color: var(--graphite);
}

.service-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 16px;
}

.service-body strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  line-height: 1.35;
}

.service-body span {
  min-width: 0;
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.note-list {
  display: grid;
  gap: 10px;
}

.note-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 13px 14px;
  color: var(--text);
  text-decoration: none;
}

.note-row:hover,
.note-row:focus-visible {
  border-color: var(--accent);
}

.note-row span,
.note-row em {
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 750;
}

.note-row strong {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.all-notes-link {
  justify-self: start;
  margin-top: 2px;
}

.message-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.message-panel {
  margin-top: 44px;
}

.message-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 980px) {
  .note-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

}

@media (max-width: 680px) {
  .home-shell,
  .compact-shell {
    width: 100%;
    padding: 16px 20px 40px;
    overflow-x: hidden;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
  }

  .site-nav {
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  .hero {
    min-height: 320px;
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(59, 43, 34, 0.78), rgba(59, 43, 34, 0.38));
  }

  :root[data-theme="dark"] .hero::before {
    background: linear-gradient(180deg, rgba(26, 22, 20, 0.82), rgba(26, 22, 20, 0.42));
  }

  .hero-copy {
    padding: 22px;
  }

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

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

  .message-panel {
    padding: 18px;
  }
}
