:root {
  color-scheme: light dark;
  --bg: #f5f8f6;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --line: rgba(28, 70, 48, 0.1);
  --text: #13231b;
  --muted: rgba(19, 35, 27, 0.62);
  --accent: #2f8f5b;
  --accent-strong: #1c6f46;
  --accent-soft: rgba(47, 143, 91, 0.12);
  --success: #198b58;
  --shadow: 0 18px 42px rgba(14, 28, 21, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07100d;
    --surface: rgba(10, 17, 14, 0.82);
    --surface-strong: rgba(12, 19, 16, 0.95);
    --line: rgba(167, 222, 192, 0.12);
    --text: #edf6f0;
    --muted: rgba(237, 246, 240, 0.64);
    --accent-soft: rgba(47, 143, 91, 0.18);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(47, 143, 91, 0.07), transparent 28%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 28px);
}

.watermark {
  position: fixed;
  inset: -18%;
  pointer-events: none;
  opacity: 0.035;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  grid-auto-rows: max-content;
  gap: 42px 64px;
  align-content: space-around;
  justify-content: space-around;
}

.watermark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, transparent 0 45%, rgba(47, 143, 91, 0.22) 45% 46%, transparent 46% 100%),
    linear-gradient(45deg, transparent 0 45%, rgba(47, 143, 91, 0.22) 45% 46%, transparent 46% 100%);
  background-size: 100px 100px;
  opacity: 0.18;
  transform: rotate(-18deg) scale(1.25);
}

.watermark::after {
  content: "Gyyy   Gyyy   Gyyy   Gyyy   Gyyy   Gyyy   Gyyy   Gyyy   Gyyy";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: rotate(-20deg);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 800;
  color: rgba(47, 143, 91, 0.16);
  white-space: pre-wrap;
}

.watermark span {
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 700;
  color: rgba(47, 143, 91, 0.24);
  transform: rotate(-20deg);
  white-space: nowrap;
}

.topbar {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 8px);
  z-index: 20;
  margin-bottom: 14px;
}

.topbar__card,
.category,
.contact-card,
.toast,
.modal {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar__card {
  padding: 18px;
}

.topbar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.topbar__copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(24px, 6.8vw, 32px);
  line-height: 1.14;
}

.subtitle {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  flex: 0 0 auto;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(47, 143, 91, 0.1);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79d19a, var(--accent));
  transition: width 0.28s ease;
}

.success-banner {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(47, 143, 91, 0.1);
  color: var(--success);
  font-weight: 700;
  line-height: 1.45;
}

.main {
  display: grid;
  gap: 16px;
}

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

.category {
  overflow: clip;
}

.category__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 15px;
  border: 0;
  background: transparent;
  text-align: left;
}

.category__head-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.category__icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(47, 143, 91, 0.18), rgba(47, 143, 91, 0.08));
  box-shadow: inset 0 0 0 1px rgba(47, 143, 91, 0.08);
  color: var(--accent-strong);
  font-weight: 700;
}

.category__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.category__desc {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.category__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  flex: 0 0 auto;
}

.category__count {
  font-size: 12px;
}

.category__chevron {
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.22s ease;
}

.category__body {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.category.is-collapsed .category__body {
  max-height: 0;
}

.category.is-collapsed .category__chevron {
  transform: rotate(-135deg);
}

.items {
  padding: 0 16px 16px;
  display: grid;
  gap: 10px;
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px rgba(47, 143, 91, 0.06);
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.item:active {
  transform: scale(0.99);
}

.check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.check input {
  position: absolute;
  inset: 0;
  appearance: none;
  margin: 0;
  border: 1.5px solid rgba(47, 143, 91, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.check input:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 143, 91, 0.12);
}

.check__mark {
  position: relative;
  width: 0;
  height: 0;
}

.check input:checked + .check__mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.item__text {
  min-width: 0;
  color: var(--text);
  line-height: 1.5;
  transition: color 0.18s ease, opacity 0.18s ease, text-decoration-color 0.18s ease;
}

.item.is-checked .item__text {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(47, 143, 91, 0.42);
  opacity: 0.82;
}

.item.is-checked {
  background: rgba(47, 143, 91, 0.06);
}

.contact-card {
  padding: 18px;
}

.contact-card__eyebrow {
  margin: 0;
  font-weight: 700;
  color: var(--accent);
}

.contact-card__text {
  margin: 10px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.contact-card__name {
  margin: 14px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.wechat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.wechat-label {
  color: var(--muted);
}

.wechat-id,
.wechat-copy,
.modal__btn {
  border: 0;
  border-radius: 14px;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.wechat-id {
  padding: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(47, 143, 91, 0.3);
  text-underline-offset: 3px;
}

.wechat-copy {
  margin-top: 14px;
  width: 100%;
  padding: 14px 16px;
  background: rgba(47, 143, 91, 0.1);
  color: var(--accent-strong);
  font-weight: 600;
}

.footer {
  padding: 4px 2px 0;
  color: var(--muted);
  text-align: center;
}

.footer p {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  z-index: 40;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 16, 13, 0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal {
  width: min(100%, 380px);
  padding: 18px;
}

.modal__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.modal__text {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.modal__btn {
  padding: 12px 14px;
  font-weight: 600;
}

.modal__btn--ghost {
  background: rgba(47, 143, 91, 0.09);
  color: var(--accent-strong);
}

.modal__btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px rgba(47, 143, 91, 0.24);
}

.icon-btn:hover,
.wechat-copy:hover,
.wechat-id:hover,
.modal__btn:hover,
.category__head:hover {
  cursor: pointer;
}

.icon-btn:active,
.wechat-copy:active,
.wechat-id:active,
.modal__btn:active,
.category__head:active {
  transform: scale(0.98);
}

@media (min-width: 700px) {
  .app {
    padding-inline: 20px;
  }
}
