:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --ink: #1f2933;
  --muted: #6b7785;
  --line: #e3e8ef;
  --brand: #0b7285;
  --brand-soft: #e6f3f5;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

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

/* 临时访问门禁 */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
}
/* hidden 属性必须强制覆盖 .gate 的 display:grid，否则门禁密码框关不掉 */
.gate[hidden] { display: none !important; }
.gate-card {
  width: 320px;
  max-width: 90vw;
  background: var(--surface);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .25);
}
.gate-logo { font-size: 34px; }
.gate-card h2 { margin: 6px 0 2px; font-size: 20px; }
.gate-sub { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.gate-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  margin-bottom: 12px;
}
.gate-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.gate-btn {
  width: 100%;
  padding: 11px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.gate-btn:hover { background: #095c6b; }
.gate-err { color: #c0392b; font-size: 13px; margin: 10px 0 0; }
.gate-hint { color: #93a1b0; font-size: 11px; margin: 14px 0 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 32px; }
.topbar h1 { margin: 0; font-size: 20px; }
.sub { margin: 0; font-size: 13px; color: var(--muted); }

.badge {
  font-size: 13px;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #bfe3e8;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.container { max-width: 1080px; margin: 0 auto; padding: 28px; }

/* 搜索 + 分类筛选 */
.controls { margin-bottom: 18px; }
.search {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  transition: all .12s ease;
}
.chip:hover { border-color: #bfe3e8; color: var(--brand); }
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.intro { color: var(--muted); margin: 4px 0 24px; }
.intro strong { color: var(--ink); }

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

.card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: #bfe3e8;
  box-shadow: 0 6px 22px rgba(11, 114, 133, .14);
}

.card-icon {
  font-size: 26px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  border-radius: 12px;
  flex: 0 0 auto;
}
.card-body { min-width: 0; }
.card-title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-desc { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.card-go { font-size: 13px; color: var(--brand); font-weight: 600; }

.tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #bfe3e8;
  padding: 1px 8px;
  border-radius: 999px;
}

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

.footer {
  max-width: 1080px;
  margin: 12px auto 40px;
  padding: 0 28px;
  font-size: 13px;
  color: var(--muted);
}
.footer code {
  background: #eef2f6;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
}
.muted { color: #93a1b0; }
