:root {
  --bg: #eceae4;
  --ink: #152028;
  --muted: #5d6a73;
  --card: #f7f5f0;
  --accent: #c45c26;
  --accent-deep: #9a4318;
  --steel: #1c2830;
  --display: "Barlow Condensed", "Noto Sans SC", sans-serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 100% 0%, rgba(196,92,38,0.12), transparent 55%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes kenburns {
  from { transform: scale(1.05); }
  to { transform: scale(1.12) translate(-1%, -1%); }
}

.hero {
  position: relative;
  min-height: 56vh;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -5%;
  background: center/cover no-repeat;
  background-image: var(--hero);
  z-index: -2;
  animation: kenburns 20s ease-in-out alternate infinite;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(21,32,40,0.35), rgba(21,32,40,0.88)),
    linear-gradient(90deg, rgba(196,92,38,0.25), transparent 45%);
  z-index: -1;
}
.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: calc(36px + env(safe-area-inset-top)) 20px 40px;
  min-height: 56vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: rise 0.7s ease both;
}
.brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 12vw, 4.6rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 0.95;
}
.brand::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 12px;
  background: var(--accent);
}
.tagline {
  margin: 14px 0 0;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.wrap {
  max-width: 980px;
  margin: -22px auto 0;
  padding: 0 16px 48px;
  position: relative;
  z-index: 2;
}
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(247,245,240,0.96);
  box-shadow: 0 10px 28px rgba(21,32,40,0.12);
  margin-bottom: 22px;
}
.jump a {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(21,32,40,0.05);
}
.jump a:hover { background: var(--steel); color: #fff; }

.section {
  margin-bottom: 28px;
  animation: rise 0.55s ease both;
}
.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
}
.section-head p {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.card {
  display: block;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(21,32,40,0.06);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(196,92,38,0.35);
}
.card .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(196,92,38,0.12);
  color: var(--accent-deep);
}
.card h3 {
  margin: 10px 0 6px;
  font-size: 1.08rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.card .meta {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--steel);
  font-weight: 700;
  word-break: break-all;
}

.board-box {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(21,32,40,0.08);
}
.board-frame {
  width: 100%;
  height: 520px;
  border: 0;
  display: block;
  background: #fff;
}

.code {
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 14px;
  background: #1c2830;
  color: #f4efe8;
  font-size: 0.82rem;
  line-height: 1.55;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.hint { color: var(--muted); font-size: 0.88rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 12px;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(165deg, var(--accent), var(--accent-deep));
  color: #fff;
}
.btn.ghost {
  background: rgba(255,255,255,0.16);
  color: #fff;
  backdrop-filter: blur(6px);
}

.foot {
  text-align: center;
  padding: 18px 16px 36px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* —— 首页：仅一个菜单 —— */
.home-only { min-height: 100dvh; }
.home-shell {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.home-bg {
  position: absolute;
  inset: -5%;
  background: center/cover no-repeat;
  background-image: var(--hero);
  z-index: -2;
  animation: kenburns 20s ease-in-out alternate infinite;
}
.home-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(21,32,40,0.42), rgba(21,32,40,0.9)),
    linear-gradient(90deg, rgba(196,92,38,0.28), transparent 48%);
  z-index: -1;
}
.home-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: calc(22px + env(safe-area-inset-top)) 20px 0;
}
.home-brand {
  margin: 0;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.home-nav-only {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  backdrop-filter: blur(8px);
}
.home-nav-only:hover {
  background: rgba(255,255,255,0.22);
}
.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 20px 40px;
  animation: rise 0.7s ease both;
}
.home-eyebrow {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,220,190,0.92);
}
.home-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 9vw, 4rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.05;
  max-width: 12em;
}
.home-lead {
  margin: 16px 0 0;
  max-width: 28em;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.86);
  line-height: 1.55;
}
.home-cta {
  align-self: flex-start;
  margin-top: 26px;
}
.home-foot {
  text-align: center;
  padding: 16px 20px 28px;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.55);
}

/* —— 二级：网站简介 —— */
.site-top {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(236,234,228,0.92);
  border-bottom: 1px solid rgba(21,32,40,0.06);
}
.site-top-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 16px 0;
}
.site-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.site-brand {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}
.site-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}
.site-back {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding-top: 4px;
}
.site-back:hover { color: var(--accent-deep); }
.site-wrap {
  margin-top: 22px;
}
.about-card {
  padding: 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(21,32,40,0.06);
}
.about-card > p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}
.about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.about-list li {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(196,92,38,0.06);
  border: 1px solid rgba(196,92,38,0.12);
}
.about-list strong {
  font-size: 0.95rem;
}
.about-list span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .board-frame { height: 620px; }
}
