/* ==========================================================================
   拾页导航 · 设计系统
   暖纸白 + 墨色 + 低饱和绿。所有色值集中在 :root，深色模式只覆盖令牌。
   ========================================================================== */

:root {
  --paper: #f6f5f1;
  --surface: #fffefa;
  --ink: #1c2522;
  --muted: #78817c;
  --line: #e6e6df;
  --accent: #33705c;
  --accent-dark: #245442;
  --accent-soft: #e9f0e9;
  --sand: #ece8dc;
  --spark: #cf9568;
  --danger: #b4515c;
  --shadow: 0 12px 36px rgba(28, 37, 34, .055);
  --shadow-lift: 0 14px 40px rgba(28, 37, 34, .09);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

body.theme-dark {
  --paper: #171b19;
  --surface: #202623;
  --ink: #edf0eb;
  --muted: #9aa59e;
  --line: #343c37;
  --accent: #8dc6a7;
  --accent-dark: #b0ddc2;
  --accent-soft: #27382f;
  --sand: #30352e;
  --spark: #d7a273;
  --danger: #d98c95;
  --shadow: 0 12px 36px rgba(0, 0, 0, .16);
  --shadow-lift: 0 16px 44px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.skip-link:focus { left: 12px; }

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

.site-header {
  height: 72px;
  background: rgba(255, 254, 250, .9);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
}

.theme-dark .site-header { background: rgba(32, 38, 35, .9); }

.site-header__inner {
  max-width: 1240px;
  height: 100%;
  margin: auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  gap: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 750;
}

body.theme-dark .brand__mark { color: #161c19; }

.brand__name {
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -.04em;
}

.primary-nav { flex: 1; }

.primary-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 30px;
}

.primary-nav__list a {
  font-size: 13px;
  color: var(--muted);
  transition: color .18s;
}

.primary-nav__list a:hover,
.primary-nav__list a.is-current { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.theme-toggle, .menu-toggle {
  border: 0;
  background: none;
  padding: 7px;
  cursor: pointer;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  border-radius: 8px;
}

.theme-toggle:hover, .menu-toggle:hover { color: var(--accent); background: var(--accent-soft); }

.menu-toggle { display: none; }

.header-login {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

button.header-login {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.header-login:hover { color: var(--accent); }

/* ---------- 首页骨架 ---------- */

.home-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 30px 96px;
}

.hero {
  min-height: 378px;
  position: relative;
  margin: 0 -30px;
  padding: 68px 30px 40px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(112, 154, 126, .12), transparent 60%),
    linear-gradient(180deg, #f2f1e9 0%, var(--paper) 95%);
}

.theme-dark .hero {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(112, 154, 126, .13), transparent 60%),
    linear-gradient(180deg, #202923 0%, var(--paper) 95%);
}

.hero__eyebrow, .eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero__spark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--spark);
  box-shadow: 0 0 0 4px rgba(207, 149, 104, .13);
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.15;
  letter-spacing: -.065em;
  margin: 18px 0 10px;
  font-weight: 740;
}

.hero__subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

/* ---------- 搜索 ---------- */

.search-panel {
  max-width: 650px;
  margin: 30px auto 0;
  text-align: left;
}

.search-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 0 11px 10px;
}

.search-tab {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
}

.search-tab:hover, .search-tab.is-active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 650;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 8px 7px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(48, 64, 51, .06);
  transition: border-color .18s, box-shadow .18s;
}

.search-form:focus-within {
  border-color: rgba(51, 112, 92, .55);
  box-shadow: 0 10px 30px rgba(48, 64, 51, .1), 0 0 0 3px rgba(51, 112, 92, .1);
}

.search-form > .icon {
  color: var(--accent);
  width: 20px;
  height: 20px;
}

.search-form__input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  padding: 12px 0;
  font-size: 14px;
}

.search-form__input::placeholder { color: #a4aaa5; }
.theme-dark .search-form__input::placeholder { color: #6f7a73; }

.search-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 11px 15px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s, transform .18s;
}

body.theme-dark .search-form__submit { color: #14201a; }

.search-form__submit:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.search-form__submit .icon { width: 15px; height: 15px; }

.search-hints {
  padding: 12px 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  flex-wrap: wrap;
}

.search-hint {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  padding: 3px 9px;
  cursor: pointer;
}

.search-hint:hover { color: var(--accent); border-color: var(--accent); }

.search-hints kbd {
  margin-left: auto;
  font-size: 10px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--muted);
}

.hero__note {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.hero__note .icon { width: 14px; height: 14px; }

/* ---------- 快捷入口 ---------- */

.quick-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: -2px auto 44px;
  position: relative;
  flex-wrap: wrap;
}

.quick-link {
  min-width: 132px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}

.quick-link:hover {
  transform: translateY(-3px);
  border-color: rgba(51, 112, 92, .35);
  box-shadow: var(--shadow);
}

.quick-link > .icon {
  width: 12px;
  height: 12px;
  margin-left: auto;
  color: #a0a7a2;
}

.quick-link__icon {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 750;
}

.quick-link__icon--blue { background: #e8edf9; color: #375baf; }
.quick-link__icon--multi { background: #f3eee6; color: #5d8c69; }
.quick-link__icon--dark { background: #252b29; color: #fff; font-size: 9px; }
.quick-link__icon--pink { background: #f8e8ed; color: #c34b68; }

.theme-dark .quick-link__icon--blue { background: #23304a; color: #9db6e8; }
.theme-dark .quick-link__icon--multi { background: #2c342c; color: #a8c8a9; }
.theme-dark .quick-link__icon--dark { background: #10140f; color: #d8e0d8; }
.theme-dark .quick-link__icon--pink { background: #3a2a30; color: #e0a3b2; }

/* ---------- 分类侧栏 + 内容区 ---------- */

.directory-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 42px;
}

.category-sidebar {
  align-self: start;
  position: sticky;
  top: 100px;
  padding: 0 0 20px;
}

.category-sidebar__label {
  color: #a0a7a1;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .14em;
  margin: 0 0 13px 12px;
}

.category-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  transition: background .18s, color .18s;
  cursor: pointer;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
}

.category-link:hover, .category-link.is-current {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.category-link__dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #bbc2ba;
  flex: 0 0 auto;
}

.category-link.is-current .category-link__dot { background: var(--accent); }

.category-link__count {
  margin-left: auto;
  font-size: 10px;
  color: #a0a7a1;
}

.category-link > .icon { width: 15px; height: 15px; }

.category-sidebar__bottom {
  margin-top: 26px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.directory-content { min-width: 0; }

.directory-section {
  margin-bottom: 48px;
  scroll-margin-top: 96px;
}

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

.section-heading .eyebrow { margin: 0 0 4px; font-size: 9px; }

.section-heading h2 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.045em;
  margin: 0;
  font-weight: 700;
}

.section-heading__sub {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  padding-bottom: 3px;
}

.text-link:hover { color: var(--accent); }
.text-link .icon { width: 13px; height: 13px; }

/* ---------- 站点卡片 ---------- */

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

.site-card {
  min-width: 0;
  padding: 16px 16px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.site-card:hover {
  transform: translateY(-2px);
  border-color: rgba(51, 112, 92, .32);
  box-shadow: var(--shadow);
}

.site-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-card__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.site-card__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
}

.site-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-card__monogram {
  font-size: 15px;
  font-weight: 750;
  color: var(--accent);
}

.site-card__heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.site-card__title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-card__verified { color: var(--accent); font-size: 11px; }

.favorite-button {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: #9ba49d;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  transition: color .18s, border-color .18s, background .18s;
}

.favorite-button:hover, .favorite-button.is-favorite {
  color: #bc6570;
  border-color: #e8c7ca;
  background: #fbf1f1;
}

.theme-dark .favorite-button:hover,
.theme-dark .favorite-button.is-favorite {
  color: #e6a4ac;
  border-color: #4a3336;
  background: #2a2022;
}

.favorite-button .icon { width: 14px; height: 14px; }

.site-card__description {
  height: 36px;
  overflow: hidden;
  margin: 11px 0 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: auto;
  gap: 8px;
}

.site-card__tags {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.site-card__tags a,
.site-card__tags span {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 7px;
  background: var(--paper);
  border-radius: 4px;
  color: var(--muted);
  font-size: 9px;
}

.site-card__tags a:hover { color: var(--accent); }

.site-card__visit {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 6px;
  flex: 0 0 auto;
}

.site-card__visit:hover { background: var(--accent-soft); color: var(--accent); }
.site-card__visit .icon { width: 14px; height: 14px; }

/* ---------- 空状态 / 骨架 / 提示 ---------- */

.empty-state, .submission-panel {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.empty-state h2, .submission-panel h2 {
  margin: 0 0 7px;
  font-size: 20px;
  letter-spacing: -.03em;
}

.empty-state p, .submission-panel p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 6px;
}

.empty-state__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.empty-state__steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.empty-state__steps li {
  counter-increment: step;
  display: flex;
  gap: 11px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.empty-state__steps li::before {
  content: counter(step);
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.empty-state__steps code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}

.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.skeleton-card {
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(100deg, var(--surface) 30%, var(--paper) 50%, var(--surface) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s infinite linear;
}

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

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.7;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  margin-bottom: 16px;
}

.notice--success { background: var(--accent-soft); border-color: transparent; color: var(--accent-dark); }
.notice--warn { background: var(--sand); border-color: transparent; color: #7a5a2e; }
.notice--error { background: #fbf1f1; border-color: transparent; color: var(--danger); }

.theme-dark .notice--warn { color: #d7b183; }
.theme-dark .notice--error { background: #2a2022; }

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-lift);
  animation: toast-in .22s ease-out;
}

.toast--error { background: var(--danger); color: #fff; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 内页通用 ---------- */

.content-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 52px 30px 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 48px;
}

.content-shell--wide { grid-template-columns: minmax(0, 1fr); }
.content-shell--narrow { max-width: 760px; grid-template-columns: minmax(0, 1fr); }
.content-column { min-width: 0; }

.archive-heading { margin-bottom: 28px; }
.archive-heading .eyebrow { margin: 0 0 9px; }

.archive-heading h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -.055em;
  margin: 0 0 8px;
}

.archive-heading > p, .archive-description {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.archive-heading .search-form { margin-top: 19px; }

.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-panel, .sidebar-promo {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.sidebar-panel .eyebrow { margin: 0 0 5px; }
.sidebar-panel h2 { font-size: 18px; letter-spacing: -.03em; margin: 0 0 14px; }

.sidebar-category-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-category-list a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 1px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}

.sidebar-category-list a:last-child { border: 0; }
.sidebar-category-list a:hover { color: var(--accent); }
.sidebar-category-list span { color: #a3aaa4; }

.sidebar-promo { background: var(--accent-soft); border-color: transparent; }

.sidebar-promo__badge {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid rgba(51, 112, 92, .2);
  border-radius: 5px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
}

.sidebar-promo h2 { font-size: 18px; line-height: 1.3; letter-spacing: -.035em; margin: 14px 0 7px; }
.sidebar-promo p { margin: 0; color: var(--muted); font-size: 11px; }

.sidebar-promo > a {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 17px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.sidebar-promo > a .icon { width: 14px; height: 14px; }

/* ---------- 站点详情 ---------- */

.single-site {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.single-site__breadcrumb {
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.single-site__breadcrumb a:hover { color: var(--accent); }
.single-site__breadcrumb span { margin: 0 8px; color: #b4b9b4; }

.single-site__header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 30px 30px 24px;
}

.single-site__icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  font-size: 24px;
  color: var(--accent);
  font-weight: 750;
}

.single-site__icon img { width: 100%; height: 100%; object-fit: cover; }
.single-site__header .eyebrow { margin: 0 0 3px; }

.single-site__header h1 {
  font-size: 27px;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -.04em;
}

.verified-label { font-size: 10px; color: var(--accent); }
.single-site__body { padding: 0 30px 30px; }

.single-site__description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
  margin: 0 0 23px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.single-site__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-meta {
  display: flex;
  gap: 48px;
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.site-meta dt { font-size: 10px; color: var(--muted); }
.site-meta dd { margin: 3px 0 0; font-size: 12px; overflow-wrap: anywhere; }

.single-site__tags { display: flex; gap: 8px; margin-top: 23px; flex-wrap: wrap; }
.single-site__tags a { color: var(--accent); font-size: 11px; }

/* ---------- 按钮 / 表单 ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .18s;
}

.button:hover { border-color: rgba(51, 112, 92, .35); }

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

body.theme-dark .button--primary { color: #14201a; }

.button--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
body.theme-dark .button--primary:hover { color: #0f1712; }

.button--ghost { background: transparent; }
.button--danger { color: var(--danger); border-color: #e8c7ca; }
.button--danger:hover { background: #fbf1f1; border-color: var(--danger); }
.theme-dark .button--danger { border-color: #4a3336; }
.theme-dark .button--danger:hover { background: #2a2022; }
.button--sm { padding: 6px 10px; font-size: 11px; border-radius: 7px; }
.button .icon { width: 15px; height: 15px; }
.button:disabled { opacity: .55; cursor: not-allowed; }

.favorite-button--large {
  width: auto;
  height: 39px;
  padding: 0 12px;
  font-size: 12px;
  gap: 6px;
  display: inline-flex;
  align-items: center;
}

.submission-form {
  display: grid;
  gap: 16px;
  max-width: 680px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.submission-form label, .field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
}

.submission-form input,
.submission-form textarea,
.submission-form select,
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
}

.submission-form textarea, .field textarea { resize: vertical; min-height: 88px; }

.submission-form input:focus,
.submission-form textarea:focus,
.submission-form select:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(51, 112, 92, .25);
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-hint { margin: 0; color: var(--muted); font-size: 11px; font-weight: 400; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.checkbox input { width: auto; }

/* ---------- 分页 ---------- */

.pagination {
  margin-top: 28px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination button, .pagination span {
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  cursor: pointer;
}

.pagination button:disabled { opacity: .45; cursor: not-allowed; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
body.theme-dark .pagination .current { color: #14201a; }

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer__inner {
  max-width: 1240px;
  margin: auto;
  padding: 34px 30px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 25px;
}

.footer-brand p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.footer-widgets { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-widget__title { font-size: 12px; font-weight: 650; margin: 0 0 8px; }

.footer-widget a {
  display: block;
  color: var(--muted);
  font-size: 11px;
  padding: 2px 0;
}

.footer-widget a:hover { color: var(--accent); }

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  flex-wrap: wrap;
}

/* ---------- 后台控制台 ---------- */

.admin-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 30px 90px;
}

.admin-login {
  max-width: 420px;
  margin: 72px auto 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-login h1 { font-size: 22px; letter-spacing: -.04em; margin: 0 0 6px; }
.admin-login p { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.admin-login .field { margin-bottom: 14px; }

.admin-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.admin-nav {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav__label {
  color: #a0a7a1;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .14em;
  margin: 0 0 11px 12px;
}

.admin-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background .18s, color .18s;
}

.admin-tab:hover { color: var(--accent-dark); background: var(--accent-soft); }

.admin-tab.is-current {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 650;
}

.admin-tab .icon { width: 15px; height: 15px; }

.admin-tab__count {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--spark);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.theme-dark .admin-tab__count { color: #1b1209; }

.admin-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.admin-panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.admin-panel__head h2 { font-size: 18px; letter-spacing: -.03em; margin: 0; }
.admin-panel__head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.admin-panel__body { padding: 20px 22px 24px; }
.admin-panel__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.admin-stat {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.admin-stat dt { font-size: 10px; color: var(--muted); }
.admin-stat dd { margin: 4px 0 0; font-size: 20px; font-weight: 720; letter-spacing: -.03em; }
.admin-stat--alert dd { color: var(--spark); }

.admin-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.admin-search input {
  border: 0;
  background: transparent;
  outline: none;
  color: var(--ink);
  font-size: 12px;
  width: 150px;
}

.admin-search .icon { width: 14px; height: 14px; color: var(--muted); }

.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--paper); }
.data-table tr.is-pending { background: rgba(207, 149, 104, .07); }

.cell-site { display: flex; align-items: center; gap: 10px; min-width: 210px; }

.cell-site__icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  color: var(--accent);
}

.cell-site__icon img { width: 100%; height: 100%; object-fit: cover; }
.cell-site__title { font-weight: 650; }
.cell-site__url {
  color: var(--muted);
  font-size: 10px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 650;
  background: var(--paper);
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge--published { background: var(--accent-soft); color: var(--accent-dark); border-color: transparent; }
.badge--pending { background: rgba(207, 149, 104, .16); color: #8a6136; border-color: transparent; }
.badge--rejected { background: #fbf1f1; color: var(--danger); border-color: transparent; }
.theme-dark .badge--pending { color: #d7b183; }
.theme-dark .badge--rejected { background: #2a2022; }

.admin-form {
  display: grid;
  gap: 14px;
  padding: 20px 22px 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.admin-form h3 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.admin-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.admin-form__grid .span-2 { grid-column: 1 / -1; }

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

.admin-empty strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 6px; }

.inline-list { display: flex; flex-direction: column; gap: 8px; }

.inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  font-size: 12px;
}

.inline-row__main { min-width: 0; flex: 1; }
.inline-row__title { font-weight: 650; }
.inline-row__meta { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }

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

@media (min-width: 1320px) {
  .hero { border-radius: 0 0 20px 20px; }
}

@media (max-width: 900px) {
  .site-header__inner { gap: 22px; }
  .directory-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 25px; }
  .content-shell { grid-template-columns: minmax(0, 1fr) 230px; gap: 24px; }
  .quick-link { min-width: 118px; }
  .site-grid { gap: 10px; }
  .admin-layout { grid-template-columns: 164px minmax(0, 1fr); gap: 22px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .site-header { height: 62px; }
  .site-header__inner { padding: 0 18px; gap: 13px; }
  .brand__mark { width: 31px; height: 31px; }
  .brand__name { font-size: 15px; }
  .menu-toggle { display: grid; place-items: center; margin-left: auto; }
  .header-actions { gap: 9px; }
  .header-login { font-size: 12px; }

  .primary-nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 56px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .primary-nav.is-open { display: block; }

  .primary-nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .primary-nav__list a { display: block; padding: 10px; }

  .home-shell { padding: 0 18px 65px; }
  .hero { min-height: 352px; margin: 0 -18px; padding: 56px 18px 35px; }
  .hero h1 { font-size: 36px; }
  .search-panel { margin-top: 25px; }
  .search-form { gap: 9px; padding-left: 13px; }
  .search-form__submit { padding: 10px 11px; }
  .search-form__submit span { font-size: 11px; }

  .quick-links {
    justify-content: flex-start;
    overflow: auto;
    flex-wrap: nowrap;
    margin: 0 -18px 33px;
    padding: 0 18px 4px;
    scrollbar-width: none;
  }

  .quick-links::-webkit-scrollbar { display: none; }
  .quick-link { min-width: 128px; }

  .directory-layout { display: block; }

  .category-sidebar {
    position: static;
    display: flex;
    gap: 8px;
    overflow: auto;
    margin: 0 -18px 25px;
    padding: 0 18px 7px;
    scrollbar-width: none;
  }

  .category-sidebar::-webkit-scrollbar { display: none; }
  .category-sidebar__label, .category-sidebar__bottom { display: none; }
  #categoryList { display: flex; gap: 8px; }

  .category-link {
    min-width: max-content;
    min-height: 33px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 11px;
  }

  .category-link.is-current { border-color: transparent; }
  .category-link__count { margin-left: 0; }
  .directory-section { margin-bottom: 36px; }
  .section-heading { align-items: flex-end; }
  .section-heading h2 { font-size: 20px; }
  .site-grid { grid-template-columns: 1fr; }
  .site-card { padding: 15px; }
  .site-card__description { height: auto; min-height: 18px; }

  .content-shell { display: block; padding: 35px 18px 65px; }
  .content-sidebar { margin-top: 30px; }
  .archive-heading h1 { font-size: 29px; }
  .single-site__header { padding: 23px 20px 18px; gap: 14px; }
  .single-site__icon { width: 58px; height: 58px; }
  .single-site__header h1 { font-size: 23px; }
  .single-site__body { padding: 0 20px 23px; }
  .site-meta { gap: 25px; }
  .submission-form { padding: 18px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }

  .site-footer__inner { padding: 28px 18px 20px; grid-template-columns: 1fr; }
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 8px; }

  .admin-shell { padding: 22px 18px 70px; }
  .admin-login { margin-top: 40px; padding: 22px; }
  .admin-layout { display: block; }

  .admin-nav {
    position: static;
    flex-direction: row;
    overflow: auto;
    gap: 7px;
    margin: 0 -18px 18px;
    padding: 0 18px 6px;
    scrollbar-width: none;
  }

  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav__label { display: none; }

  .admin-tab {
    min-width: max-content;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 8px 11px;
  }

  .admin-panel__head { padding: 16px 16px; }
  .admin-panel__body { padding: 16px; }
  .admin-form { padding: 16px; }
  .admin-form__grid { grid-template-columns: minmax(0, 1fr); }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-search input { width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
