:root {
  color-scheme: light;
  --paper: #f5efe2;
  --paper-deep: #ece3d1;
  --card: #fbf7ec;
  --ink: #1f1b16;
  --ink-soft: #4b443a;
  --muted: #7d7466;
  --muted-2: #9b917f;
  --line: #ddd2bf;
  --line-soft: #e9e0cf;
  --red: #a83a2a;
  --red-deep: #862c1f;
  --red-soft: #f6e6de;
  --gold: #b58a3a;
  --ok: #2f6d4f;
  --font-sans: "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "SimSun", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 10% 4%, rgba(168, 58, 42, 0.075), transparent 42%),
    radial-gradient(ellipse at 92% 22%, rgba(181, 138, 58, 0.08), transparent 38%),
    repeating-linear-gradient(115deg, rgba(103, 83, 53, 0.022) 0 1px, transparent 1px 7px);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--red-deep);
}

code {
  font-family: var(--mono);
}

.page {
  display: flex;
  width: min(1200px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  flex-direction: column;
}

/* ---------- 顶栏 ---------- */

.site-header {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(221, 210, 191, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand__seal {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 9px;
  background: var(--red);
  color: #fff6e7;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 7px 16px rgba(134, 44, 31, 0.22);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__text strong {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand__text small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

/* ---------- 主区 ---------- */

.main {
  flex: 1;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(340px, 0.82fr);
  gap: clamp(34px, 6vw, 88px);
  align-items: start;
  padding: clamp(48px, 8vh, 92px) 0 clamp(54px, 8vh, 84px);
}

.hero__copy > * {
  animation: rise 680ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__copy > :nth-child(2) { animation-delay: 70ms; }
.hero__copy > :nth-child(3) { animation-delay: 130ms; }
.hero__copy > :nth-child(4) { animation-delay: 190ms; }
.hero__copy > :nth-child(5) { animation-delay: 250ms; }

.hero__title {
  margin: 0 0 26px;
  font-family: var(--font-serif);
  font-size: clamp(46px, 6.6vw, 86px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.hero__title em {
  color: var(--red);
  font-style: normal;
}

.hero__lede {
  max-width: 25em;
  margin: 0 0 38px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.9;
}

.hero__facts {
  display: flex;
  margin: 0 0 30px;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.hero__facts li {
  display: flex;
  flex: 1;
  padding: 16px 0;
  align-items: baseline;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.hero__facts b {
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero__entry {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.hero__entry code {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 253, 247, 0.65);
  color: var(--ink-soft);
}

/* ---------- 入场卡 ---------- */

.enter-card {
  position: relative;
  align-self: start;
  margin-top: 8px;
  padding: 14px 14px 20px;
  border: 1px solid rgba(210, 197, 174, 0.9);
  border-radius: 26px;
  background: rgba(251, 247, 236, 0.86);
  box-shadow:
    0 30px 70px rgba(67, 48, 28, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.75) inset;
  animation: rise 760ms 120ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.board-art {
  position: relative;
  height: 158px;
  overflow: hidden;
  border-radius: 17px;
  border: 1px solid rgba(108, 76, 37, 0.3);
  background-color: #d9b882;
  background-image:
    radial-gradient(circle at 22% 18%, rgba(255, 246, 222, 0.55), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 37px, rgba(74, 48, 20, 0.34) 37px 38px),
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(74, 48, 20, 0.34) 37px 38px);
  box-shadow: 0 12px 26px rgba(90, 61, 27, 0.18) inset;
}

.board-art::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(74, 48, 20, 0.22);
  border-radius: 11px;
  pointer-events: none;
}

.board-art__stone {
  position: absolute;
  z-index: 2;
  width: 27px;
  height: 27px;
  border-radius: 50%;
}

.board-art__stone--black {
  top: 47px;
  left: calc(50% - 54px);
  background: radial-gradient(circle at 34% 28%, #5d5a54, #171513 62%);
  box-shadow: 0 5px 8px rgba(45, 30, 12, 0.28);
}

.board-art__stone--white {
  top: 85px;
  left: calc(50% + 8px);
  background: radial-gradient(circle at 34% 28%, #ffffff, #ddd5c4 68%);
  border: 1px solid rgba(94, 70, 37, 0.24);
  box-shadow: 0 5px 8px rgba(45, 30, 12, 0.18);
}

.board-art__seal {
  position: absolute;
  right: 17px;
  bottom: 15px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: rgba(148, 47, 33, 0.92);
  color: #fff5e4;
  font-family: var(--font-serif);
  font-size: 22px;
  transform: rotate(-5deg);
  box-shadow: 0 7px 14px rgba(94, 31, 21, 0.25);
}

.enter-form {
  display: flex;
  padding: 20px 8px 2px;
  flex-direction: column;
  gap: 15px;
}

.start-button {
  display: flex;
  width: 100%;
  height: 61px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px;
  border: 1px solid rgba(117, 38, 27, 0.4);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #b14634, #913023);
  color: #fff8ec;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(134, 44, 31, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.start-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(134, 44, 31, 0.28);
}

.start-button:active {
  transform: translateY(0) scale(0.99);
}

.start-button:focus-visible {
  outline: 3px solid rgba(168, 58, 42, 0.38);
  outline-offset: 4px;
}

.start-button[aria-disabled="true"] {
  filter: saturate(0.72);
}

.start-button.is-busy {
  cursor: wait;
  filter: saturate(0.6);
}

.start-button__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-button__arrow {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 400;
  transition: transform 180ms ease;
}

.start-button:hover .start-button__arrow,
.start-button.is-ready .start-button__arrow {
  transform: translateX(4px);
}

.name-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.name-field__label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.name-field input {
  width: 100%;
  height: 51px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.name-field input::placeholder {
  color: #b0a694;
}

.name-field input:focus {
  border-color: var(--red);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(168, 58, 42, 0.11);
}

.name-field input[aria-invalid="true"] {
  border-color: var(--red);
  background: #fff9f5;
}

.name-field__hint {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}

.form-message {
  margin: 0;
  color: var(--red-deep);
  font-size: 12px;
  line-height: 1.6;
}

.form-message:empty {
  display: none;
}

.enter-card__note {
  margin: 6px 8px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.enter-card__note span {
  color: var(--red);
  font-family: var(--mono);
}

/* ---------- 功能入口 ---------- */

.doors {
  padding: 18px 0 64px;
}

.doors__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.doors__head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.doors__head .eyebrow {
  margin-bottom: 10px;
}

.doors__lede {
  max-width: 31em;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  text-align: right;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 15px;
}

.feature-card {
  position: relative;
  display: flex;
  min-height: 188px;
  padding: 22px;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255, 252, 245, 0.55);
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
  animation: rise 560ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 18px 36px rgba(67, 48, 28, 0.09);
}

.feature-card:focus-visible {
  outline: 3px solid rgba(168, 58, 42, 0.35);
  outline-offset: 3px;
}

.feature-card.is-primary {
  border-color: rgba(168, 58, 42, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 65%),
    rgba(251, 243, 226, 0.8);
}

.feature-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feature-card__glyph {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(168, 58, 42, 0.28);
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red-deep);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1;
}

.feature-card__badge {
  padding: 4px 7px;
  border: 1px solid rgba(168, 58, 42, 0.25);
  border-radius: 999px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.feature-card__name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.feature-card__foot {
  display: flex;
  margin-top: auto;
  padding-top: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 10.5px;
}

.feature-card__path {
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-card__state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--ok);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.feature-card__state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(47, 109, 79, 0.12);
}

.feature-card__state.is-down {
  color: var(--muted-2);
}

.feature-card__state.is-down::before {
  box-shadow: none;
}

.feature-card__arrow {
  color: var(--red);
  font-family: var(--mono);
  font-size: 16px;
}

.feature-card--loading {
  cursor: default;
  pointer-events: none;
}

.feature-card--empty {
  grid-column: 1 / -1;
  min-height: 132px;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  cursor: default;
}

.skeleton {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eee5d5 25%, #f7f0e3 50%, #eee5d5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton--title {
  width: 46%;
  height: 20px;
  margin: 2px 0 10px;
}

.skeleton--line {
  width: 86%;
}

.skeleton--short {
  width: 58%;
}

.noscript {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(221, 210, 191, 0.72);
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------- 响应式 ---------- */

@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 40px;
  }

  .enter-card {
    width: min(520px, 100%);
    margin-top: 0;
  }

  .doors__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .doors__lede {
    max-width: 36em;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .page {
    padding: 0 16px;
  }

  .site-header {
    min-height: 74px;
  }

  .brand__seal {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .brand__text strong {
    font-size: 17px;
  }

  .site-nav {
    gap: 16px;
    font-size: 11px;
  }

  .hero {
    padding: 30px 0 48px;
  }

  .hero__title {
    font-size: clamp(42px, 13vw, 58px);
    margin-bottom: 20px;
  }

  .hero__lede {
    margin-bottom: 28px;
    font-size: 14.5px;
  }

  .hero__facts li {
    padding: 13px 0;
    font-size: 11.5px;
  }

  .enter-card {
    padding: 11px 11px 17px;
    border-radius: 21px;
  }

  .board-art {
    height: 132px;
  }

  .enter-form {
    padding: 16px 6px 2px;
  }

  .start-button {
    height: 56px;
    font-size: 16px;
  }

  .doors {
    padding-bottom: 46px;
  }

  .site-footer {
    padding: 18px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
