:root {
  --bg: #f7f8fc;
  --card: #ffffff;
  --ink: #1c2033;
  --ink2: #5b6178;
  --ink3: #8b91a7;
  --line: #e6e9f2;
  --brand: #5b5bd6;
  --brand2: #7f77dd;
  --ai: #2f9e8f;
  --wx: #22a35a;
  --pan: #e08b2f;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

.glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.glow-a { background: #b9b8f5; top: -160px; left: -120px; }
.glow-b { background: #a8e3da; top: -120px; right: -140px; }

.hero { position: relative; padding: 64px 0 40px; text-align: center; }
.hero .wrap { position: relative; z-index: 1; }

.logo { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.hero h1 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -0.5px; }
.sub { margin: 10px auto 0; max-width: 620px; color: var(--ink2); font-size: 15px; }

.entries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.entry:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(28, 32, 51, 0.09); border-color: transparent; }
.entry-ai:hover { border-color: var(--ai); }
.entry-wx:hover { border-color: var(--wx); }
.entry-pan:hover { border-color: var(--pan); }

.entry-ico {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px; font-size: 20px;
}
.entry-ai .entry-ico { background: #e2f5f1; }
.entry-wx .entry-ico { background: #e0f4e8; }
.entry-pan .entry-ico { background: #fbeddc; }

.entry-txt { display: flex; flex-direction: column; }
.entry-txt strong { font-size: 15px; font-weight: 600; }
.entry-txt em { font-style: normal; font-size: 12.5px; color: var(--ink3); }

.section { padding: 26px 0 60px; position: relative; z-index: 1; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.sec-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.sec-count { font-size: 13px; color: var(--ink3); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(28, 32, 51, 0.08); }

.card-cover {
  height: 116px;
  border-radius: 12px;
  background: linear-gradient(135deg, #edeefc, #e2f5f1);
  display: grid;
  place-items: center;
  font-size: 30px;
  overflow: hidden;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card h3 { margin: 0; font-size: 16.5px; font-weight: 600; }
.card p { margin: 0; font-size: 13.5px; color: var(--ink2); flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f0f1fa;
  color: var(--ink2);
}

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status { font-size: 12px; color: var(--ink3); display: flex; align-items: center; gap: 5px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink3); }
.status.on::before { background: var(--ai); }
.status.dev::before { background: var(--pan); }

.go {
  font-size: 13px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.go:hover { background: var(--brand2); }
.go.off { background: #eceefa; color: var(--ink3); pointer-events: none; }

.empty { color: var(--ink3); font-size: 14px; text-align: center; padding: 30px 0; }

.foot { border-top: 1px solid var(--line); padding: 22px 0; color: var(--ink3); font-size: 13px; text-align: center; }

.modal {
  position: fixed; inset: 0;
  background: rgba(20, 22, 38, 0.45);
  display: grid; place-items: center;
  z-index: 50;
  padding: 20px;
}
.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 26px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  position: relative;
}
.modal-box h3 { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.modal-close {
  position: absolute; right: 12px; top: 8px;
  border: none; background: none; font-size: 24px;
  color: var(--ink3); cursor: pointer; line-height: 1;
}
.modal-body-txt { font-size: 14px; color: var(--ink2); }
.modal-box img { width: 220px; height: 220px; object-fit: contain; }

@media (max-width: 720px) {
  .entries { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 30px; }
  .hero h1 { font-size: 27px; }
  .grid { grid-template-columns: 1fr; }
}

/* 修复：.modal 的 display:grid 会覆盖 HTML hidden 属性，导致弹窗常显遮住整页 */
.modal[hidden] { display: none; }

/* ===== 探索档案版式 ===== */
.section { padding-bottom: 34px; }
.tagline { max-width: 700px; margin: 14px auto 0; color: var(--ink3); font-size: 13.5px; line-height: 1.8; }
.sec-lead { margin: -4px 0 18px; color: var(--ink3); font-size: 13.5px; }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tl-item {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  padding: 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); font: inherit; color: inherit; cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.tl-item:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--brand2); box-shadow: 0 10px 26px rgba(28, 32, 51, 0.08); }
.tl-item.active { border-color: var(--brand); background: #f6f5ff; }
.tl-item.muted { opacity: 0.6; cursor: default; }
.tl-no { font-size: 22px; font-weight: 600; color: var(--brand2); line-height: 1; flex: none; }
.tl-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tl-body strong { font-size: 14.5px; font-weight: 600; }
.tl-period { font-size: 11.5px; color: var(--ink3); }
.tl-body em { font-style: normal; font-size: 12.5px; color: var(--ink2); line-height: 1.5; }
.tl-count { margin-top: 6px; font-size: 11.5px; color: var(--brand); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink2); font: inherit; font-size: 12.5px; cursor: pointer;
}
.chip span { margin-left: 6px; color: var(--ink3); font-size: 11px; }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.active span { color: #d9d8ff; }
.chip:hover:not(.active) { border-color: var(--brand2); }

.card-cover { text-decoration: none; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stage-badge { font-size: 11.5px; color: var(--brand); background: #f0effc; padding: 2px 9px; border-radius: 999px; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.pitfall {
  display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink2);
  background: #faf9ff; border-left: 2px solid var(--brand2); padding: 8px 10px;
  border-radius: 0 8px 8px 0; line-height: 1.55;
}
.pitfall b { flex: none; color: var(--brand); font-weight: 600; font-size: 11.5px; }
.card-foot { flex-wrap: wrap; }
.go.ghost { background: #eeeefb; color: var(--brand); }
.go.ghost:hover { background: #e2e1fa; }

.arc-list { display: flex; flex-direction: column; gap: 10px; }
.arc-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.arc-row:hover { border-color: var(--brand2); transform: translateX(3px); }
.arc-row-no { font-size: 18px; font-weight: 600; color: var(--brand2); flex: none; }
.arc-row-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.arc-row-main strong { font-size: 14.5px; font-weight: 600; }
.arc-row-main em { font-style: normal; font-size: 12.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arc-row-go { font-size: 12.5px; color: var(--brand); white-space: nowrap; }
.load-error { color: #a32d2d; font-size: 13.5px; text-align: center; padding: 20px; }

@media (max-width: 900px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .timeline { grid-template-columns: 1fr; }
  .tagline { font-size: 13px; }
  .arc-row { gap: 10px; padding: 12px; }
  .arc-row-go { display: none; }
}
