:root {
  --primary: #19c8b9;
  --text: #794f27;
  --body: #725d42;
  --muted: #8a7b66;
  --paper: rgb(247, 243, 223);
  --cream: #f8f8f0;
  --border: #c4b89e;
  --border-strong: #9f927d;
  --shadow: rgba(61, 52, 40, 0.14);
  --orange: #e59266;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--body);
  background:
    radial-gradient(circle, rgba(25, 200, 185, 0.12) 1.5px, transparent 1.5px) 0 0/28px 28px,
    radial-gradient(circle, rgba(255, 204, 0, 0.10) 1px, transparent 1px) 7px 7px/14px 14px,
    var(--cream);
  font-family: Nunito, "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.75;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 248, 240, 0.92);
  border-bottom: 2px solid rgba(196, 184, 158, 0.55);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(960px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff9e3;
  background: var(--primary);
  border: 2px solid #0ea99d;
  border-radius: 12px;
  box-shadow: 0 4px 0 #0ea99d;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-4deg);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a {
  padding: 8px 12px;
  color: var(--text);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff9e3;
  background: var(--primary);
  box-shadow: 0 3px 0 #0ea99d;
}

.menu-button {
  display: none;
  padding: 8px 14px;
  color: var(--text);
  background: #fffdf3;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  font-weight: 900;
}

.page {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.page-stack { display: grid; gap: 28px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.ribbon {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 16px;
  padding: 0 22px;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 4px 0 rgba(121, 79, 39, 0.18);
}

.lead {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 800;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff9e3;
  background: var(--primary);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 4px 0 #0ea99d;
  font-weight: 900;
  cursor: pointer;
}

.button.secondary {
  color: var(--text);
  background: #fffdf3;
  box-shadow: 0 4px 0 #bdaea0;
}

.button:disabled { opacity: 0.7; cursor: wait; }

.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(61, 52, 40, 0.45);
}
.notice-overlay.open { display: flex; }
.notice-modal {
  width: min(380px, 100%);
  padding: 28px 24px 22px;
  text-align: center;
  background: var(--cream);
  border: 2px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 12px 0 rgba(121, 79, 39, 0.14);
}
.notice-modal h2 { margin: 0 0 14px; color: var(--text); font-size: 24px; font-weight: 900; }
.notice-modal p { margin: 0 0 8px; color: var(--body); font-size: 16px; font-weight: 700; line-height: 1.7; }
.notice-modal .button { margin-top: 14px; }
.notice-modal .hero-actions { margin-top: 4px; }
.notice-modal #download-status:empty { display: none; }

.hero-visual { display: grid; justify-items: center; gap: 12px; }
.hero-icon { width: min(180px, 46vw); height: auto; border-radius: 36px; }

.hero-claim {
  text-align: center;
  color: var(--text);
}
.hero-claim strong { display: block; font-size: 22px; font-weight: 900; }
.hero-claim span { color: var(--muted); font-size: 14px; font-weight: 800; }
.hero-mini-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: var(--body);
  font-size: 13px;
  font-weight: 800;
}

.divider {
  width: 100%;
  height: 12px;
  background: url("divider-line-brown.svg") center/contain no-repeat;
}

.section h2,
.prose h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.2;
}

.prose { display: grid; gap: 12px; }
.prose p { margin: 0; color: var(--body); font-size: 16px; line-height: 1.85; }

.doc {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-weight: 400;
}
.doc-head { margin-bottom: 8px; text-align: center; }
.doc-head h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.3;
}
.doc p, .doc li { margin: 0 0 16px; color: #333; font-size: 16px; font-weight: 400; line-height: 1.75; }
.doc.island-card > h2 {
  margin: 40px 0 16px;
  padding-bottom: 8px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}
.doc.island-card > h3 { margin: 28px 0 12px; color: var(--text); font-size: 20px; font-weight: 700; }
.doc .muted { margin-bottom: 28px; color: var(--muted); font-size: 15px; font-weight: 500; }
.doc ul { margin: 0 0 16px; padding-left: 0; list-style: none; }
.doc li { position: relative; padding-left: 1.25rem; }
.doc li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--primary);
  font-size: 22px;
  line-height: 1.75;
}
.doc strong { font-weight: 700; }
.doc a { color: #0b8f86; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.doc-section h2 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 32px;
  font-weight: 900;
}

.algorithm-field { display: flex; flex-wrap: wrap; gap: 10px; }
.algorithm-field .island-pill { min-height: 38px; padding: 0 15px; }
.algorithm-field .island-pill:nth-child(6n + 1) { background: #889df0; color: #fff; }
.algorithm-field .island-pill:nth-child(6n + 2) { background: #82d5bb; color: #fff; }
.algorithm-field .island-pill:nth-child(6n + 3) { background: #f7cd67; color: #725d42; }
.algorithm-field .island-pill:nth-child(6n + 4) { background: #f8a6b2; color: #fff; }
.algorithm-field .island-pill:nth-child(6n + 5) { background: #8ac68a; color: #fff; }
.algorithm-field .island-pill:nth-child(6n + 6) { background: #e59266; color: #fff; }

.ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.ledger-row {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
  background: rgba(255, 253, 243, 0.42);
  border: 1px dashed rgba(159, 146, 125, 0.4);
  border-radius: 16px;
  text-align: center;
}

.ledger-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(247, 205, 103, 0.3);
  border-radius: 14px;
}
.ledger-icon img { width: 28px; height: 28px; }
.ledger-term { color: var(--text); font-size: 18px; font-weight: 900; }
.ledger-desc { color: var(--body); font-size: 14px; font-weight: 700; }

.doc-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.doc-row img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 19px;
  box-shadow: 0 5px 0 rgba(121, 79, 39, 0.18);
}
.doc-row h3 { margin: 0 0 4px; color: var(--text); font-size: 22px; font-weight: 900; }
.doc-row p { margin: 0; color: var(--body); font-weight: 600; }
.doc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.doc-actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--text);
  background: #fffdf3;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.footer { color: #fff8de; background: #6e8f5b; }
.footer-inner {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
  display: grid;
  gap: 12px;
}
.footer a, .footer p { color: #fff8de; }
.footer strong { font-size: 18px; }
.beian { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.theme-credit { color: rgba(255, 248, 222, 0.86); font-size: 13px; }
.theme-credit a { text-decoration: underline; text-underline-offset: 3px; }
.download-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; font-weight: 700; }

.guide-steps { display: grid; gap: 36px; margin-top: 28px; }
.guide-steps h2 { margin: 0 0 14px; color: var(--text); font-size: 28px; font-weight: 900; line-height: 1.35; }
.guide-steps img {
  width: 100%;
  border-radius: 18px;
  border: 2px solid var(--border);
}

@media (max-width: 760px) {
  .menu-button { display: inline-flex; }
  .nav-links {
    position: absolute;
    inset: 70px 12px auto;
    display: none;
    padding: 12px;
    background: var(--paper);
    border: 2px solid var(--border);
    border-radius: 20px;
  }
  .nav-links.open { display: grid; }
  .hero-grid, .doc-row { grid-template-columns: 1fr; }
  .hero-visual { justify-self: center; }
  .doc-actions { justify-content: flex-start; }
}
