:root {
  --ink: #21144e;
  --ink-soft: #51447a;
  --gold: #b98735;
  --gold-soft: #ead9aa;
  --paper: #fffaf2;
  --mist: #f7f1ff;
  --white: #fffdf8;
  --line: rgba(185, 135, 53, 0.28);
  --violet: #6b4aa1;
  --rose: #8d506d;
  --shadow: 0 18px 45px rgba(47, 28, 82, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body.viewer-open {
  overflow: hidden;
}

body.access-locked {
  overflow: hidden;
}

body.access-locked main,
body.access-locked .viewer {
  visibility: hidden;
  pointer-events: none;
}

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

button {
  font: inherit;
}

main {
  overflow: hidden;
  padding-bottom: 70px;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(247, 241, 255, 0.96) 42%, rgba(255, 250, 242, 0.98)),
    radial-gradient(circle at 8% 0%, rgba(229, 207, 154, 0.26), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(142, 95, 186, 0.16), transparent 30%);
}

.page-watermark {
  position: fixed;
  inset: 0;
  z-index: 1400;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.05;
}

.page-watermark span {
  position: absolute;
  color: #6f4c96;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.28);
  transform: translate3d(-8px, -6px, 0) rotate(-24deg);
  animation: watermarkDrift 18s ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}

@keyframes watermarkDrift {
  from {
    transform: translate3d(-8px, -6px, 0) rotate(-24deg);
  }

  to {
    transform: translate3d(24px, 18px, 0) rotate(-24deg);
  }
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.95), rgba(244, 236, 252, 0.96)),
    radial-gradient(circle at 16% 10%, rgba(185, 135, 53, 0.2), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(107, 74, 161, 0.2), transparent 32%);
}

body.access-locked .access-gate {
  display: grid;
}

.access-card {
  width: min(420px, 100%);
  border: 1px solid rgba(185, 135, 53, 0.3);
  border-radius: 8px;
  padding: 28px 22px 22px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 20px 58px rgba(47, 28, 82, 0.18);
}

.access-card h2 {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1.18;
}

.access-card p {
  margin-bottom: 18px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.gate-kicker {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.access-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 700;
}

.access-card input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 12px;
  border: 1px solid rgba(33, 20, 78, 0.22);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  letter-spacing: 0;
  -webkit-user-select: text;
  user-select: text;
}

.access-card input:focus {
  border-color: rgba(185, 135, 53, 0.72);
  outline: 3px solid rgba(185, 135, 53, 0.18);
}

.access-card .button {
  width: 100%;
}

.access-error {
  min-height: 22px;
  margin: 10px 0 8px;
  color: #9b2f45;
  font-weight: 700;
}

.access-card small {
  display: block;
  color: var(--ink-soft);
  line-height: 1.65;
}

.hero {
  min-height: 88svh;
  display: flex;
  align-items: flex-end;
  padding: 36px 20px 82px;
  background:
    linear-gradient(145deg, rgba(40, 24, 82, 0.94), rgba(92, 64, 132, 0.86)),
    linear-gradient(180deg, rgba(255, 250, 242, 0.14), transparent);
  color: #fffaf4;
}

.hero-inner,
.section-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.hero .eyebrow {
  color: #ffe3a4;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(46px, 12.5vw, 84px);
  line-height: 1.03;
  font-weight: 700;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 7vw, 48px);
  line-height: 1.14;
  font-weight: 700;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.3;
}

.subtitle {
  max-width: 560px;
  margin-bottom: 24px;
  font-size: clamp(18px, 4.8vw, 26px);
  line-height: 1.5;
  color: #fff0ca;
}

.progress-panel {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 10px;
  max-width: 720px;
  margin-bottom: 24px;
}

.progress-panel > div {
  min-height: 84px;
  padding: 16px;
  border: 1px solid rgba(255, 227, 164, 0.42);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 246, 222, 0.78);
  font-size: 13px;
}

.progress-panel strong {
  color: #fff8df;
  font-size: 18px;
  line-height: 1.4;
}

.hero-actions,
.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button,
.icon-button,
.item-button,
.preview-card,
.toolkit-card {
  border-radius: 8px;
  cursor: pointer;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(255, 227, 164, 0.64);
  font-weight: 700;
}

.button.primary {
  background: linear-gradient(135deg, #fff0b8, #b7832f);
  color: #261449;
  border: 0;
}

.button.ghost {
  color: #fffaf4;
  background: rgba(255, 255, 255, 0.12);
}

.button.primary-dark {
  border: 0;
  background: var(--ink);
  color: #fffaf4;
}

.button.ghost-dark {
  border-color: rgba(33, 20, 78, 0.22);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.band {
  padding: 68px 20px;
}

.notice-band,
.cards-band,
.checkin-band {
  background: rgba(255, 255, 255, 0.54);
}

.lead {
  max-width: 640px;
  margin-bottom: 22px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.72;
}

.lead.compact {
  max-width: 760px;
}

.plain-list,
.checkin-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li,
.checkin-list p {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--ink-soft);
  line-height: 1.72;
  border-left: 2px solid var(--gold-soft);
}

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

.notice-grid article,
.locked-item,
.pathway-item,
.item-button,
.preview-card,
.toolkit-card,
.self-check-note {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
}

.notice-grid article {
  padding: 22px;
}

.notice-grid span,
.locked-item span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--gold);
  font-weight: 700;
}

.notice-grid p {
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.68;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 360px);
  gap: 28px;
  align-items: center;
}

.preview-card {
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
}

.preview-art {
  display: block;
  aspect-ratio: 9 / 16;
  background-position: center;
  background-size: cover;
}

.guide-cover {
  background-image: linear-gradient(180deg, rgba(30, 16, 66, 0.02), rgba(30, 16, 66, 0.16)), url("assets/guide/doc-cover.jpg");
}

.preview-copy {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.preview-copy small {
  color: var(--ink-soft);
}

.section-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading.slim {
  margin: 30px 0 14px;
}

.section-heading.slim h3 {
  margin-bottom: 0;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid rgba(185, 135, 53, 0.38);
  padding: 7px 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 253, 248, 0.72);
}

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

.item-button {
  min-height: 98px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
}

.item-button:hover,
.item-button:focus-visible,
.preview-card:hover,
.preview-card:focus-visible,
.toolkit-card:hover,
.toolkit-card:focus-visible {
  border-color: rgba(185, 135, 53, 0.68);
  outline: 2px solid rgba(185, 135, 53, 0.24);
}

.item-button .index {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.item-button strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 1.36;
}

.item-button small {
  color: var(--ink-soft);
  line-height: 1.5;
}

.toolkit-band {
  background: linear-gradient(180deg, rgba(247, 241, 255, 0.82), rgba(255, 250, 242, 0.92));
}

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

.toolkit-card {
  display: grid;
  min-height: 162px;
  align-content: start;
  gap: 10px;
  padding: 20px;
  color: var(--ink);
  text-align: left;
}

.toolkit-card span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.toolkit-card strong {
  font-size: 20px;
  line-height: 1.35;
}

.toolkit-card small {
  color: var(--ink-soft);
  line-height: 1.62;
}

.toolkit-list-block {
  margin-top: 20px;
}

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

.self-check-note {
  margin-top: 14px;
  padding: 18px 20px;
  color: var(--ink-soft);
  line-height: 1.76;
}

.batch-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.locked-item {
  min-height: 136px;
  padding: 18px;
  opacity: 0.76;
}

.locked-item.open {
  opacity: 1;
  border-color: rgba(185, 135, 53, 0.54);
}

.locked-item strong {
  display: block;
  min-height: 54px;
  line-height: 1.42;
}

.locked-item small {
  color: var(--ink-soft);
}

.delivery-policy {
  margin-top: 18px;
  border: 1px solid var(--line);
  padding: 20px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow);
}

.delivery-policy h3 {
  margin-bottom: 10px;
  color: var(--ink);
}

.delivery-policy p {
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.pathway-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.pathway-item {
  min-height: 156px;
  padding: 20px;
}

.pathway-item span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--gold);
  font-weight: 700;
}

.pathway-item strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.38;
}

.pathway-item p,
.pathway-note {
  color: var(--ink-soft);
  line-height: 1.7;
}

.pathway-note {
  margin: 18px 0 0;
  border-left: 2px solid var(--gold-soft);
  padding-left: 18px;
}

.footer {
  padding: 46px 20px 88px;
  text-align: center;
  color: var(--ink-soft);
  background: #f3eafa;
}

.footer p {
  margin-bottom: 8px;
  line-height: 1.6;
}

.footer p:first-child {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 900;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 520px;
  margin: 0 auto;
  border: 1px solid rgba(185, 135, 53, 0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(47, 28, 82, 0.18);
}

.bottom-nav a {
  display: grid;
  min-height: 46px;
  place-items: center;
  color: #fffaf4;
  font-weight: 700;
  background: rgba(42, 25, 82, 0.94);
}

.bottom-nav a + a {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  padding: 14px;
  background: rgba(20, 12, 42, 0.72);
}

.viewer.active {
  display: grid;
  place-items: center;
}

.viewer-panel {
  width: min(860px, 100%);
  max-height: min(94svh, 980px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.viewer-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.viewer-head span {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

.viewer-head h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.icon-button {
  min-width: 58px;
  min-height: 40px;
  border: 1px solid rgba(33, 20, 78, 0.18);
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.canvas-wrap {
  position: relative;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #e9e1f1;
}

#contentCanvas {
  display: block;
  width: min(100%, 900px);
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(47, 28, 82, 0.16);
  pointer-events: none;
}

.canvas-loading {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 12px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.86);
}

.viewer-actions {
  justify-content: space-between;
  padding: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 840px) {
  .notice-grid,
  .item-grid,
  .pathway-grid,
  .batch-list,
  .toolkit-grid,
  .compact-grid,
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .status-pill {
    display: inline-flex;
    margin-top: 4px;
  }

  .preview-card {
    max-width: 360px;
  }
}

@media (max-width: 520px) {
  .page-watermark {
    opacity: 0.075;
  }

  .page-watermark span {
    font-size: 15px;
  }

  .hero {
    min-height: 82svh;
    padding: 28px 18px 76px;
  }

  .progress-panel {
    grid-template-columns: 1fr;
  }

  .band {
    padding: 54px 18px;
  }

  .notice-grid article,
  .item-button,
  .toolkit-card,
  .self-check-note,
  .pathway-item,
  .locked-item {
    padding: 16px;
  }

  .viewer {
    padding: 0;
  }

  .viewer-panel {
    width: 100%;
    height: 100svh;
    max-height: none;
    border-radius: 0;
  }

  .viewer-actions .button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 10px;
    font-size: 14px;
  }
}
