:root {
  --ink: #242321;
  --ink-2: #3d3a35;
  --paper: #f4f1e8;
  --paper-2: #eae5da;
  --line: #d7d0c2;
  --muted: #716c63;
  --red: #9a7738;
  --white: #fff;
  --shadow: 0 12px 36px rgba(20, 35, 56, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.masthead {
  height: 84px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(20, 35, 56, .18);
  background: rgba(243, 241, 235, .92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 64px; height: 62px; object-fit: contain; mix-blend-mode: multiply; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 17px; letter-spacing: .08em; }
.brand-copy small { margin-top: 6px; font-size: 9px; letter-spacing: .22em; color: var(--muted); }
.masthead-meta { font-size: 12px; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #3f7a58; box-shadow: 0 0 0 4px rgba(63,122,88,.12); }

main { max-width: 1240px; margin: 0 auto; padding: 0 24px 80px; }
.hero { min-height: 350px; padding: 72px 0 52px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 24px; font: 700 11px/1.2 Georgia, serif; letter-spacing: .22em; color: var(--red); }
h1 { margin: 0; max-width: 760px; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: clamp(44px, 6.5vw, 82px); line-height: 1.04; font-weight: 500; letter-spacing: -.035em; }
.intro { max-width: 600px; margin: 28px 0 0; color: var(--muted); font-size: 16px; line-height: 1.9; }
.hero-stat { text-align: right; padding-bottom: 9px; }
.hero-stat span { display: block; font: 500 58px/1 Georgia, serif; color: var(--red); }
.hero-stat small { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); }

.toolbar { padding: 28px 0; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.search { min-width: 320px; flex: 1; height: 50px; padding: 0 15px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #f8f7f3; }
.search:focus-within { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(38,57,81,.08); }
.search span { font-size: 25px; transform: translateY(-2px); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.search input::placeholder { color: #8b918d; }
kbd { padding: 4px 7px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); color: var(--muted); font: 11px/1 system-ui, sans-serif; }
.filters { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { white-space: nowrap; border: 1px solid var(--line); background: transparent; color: var(--ink-2); padding: 9px 13px; font: 13px/1 inherit; cursor: pointer; }
.filter:hover, .filter.active { background: var(--ink); border-color: var(--ink); color: white; }

.workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 52px; padding-top: 42px; }
.index-note { align-self: start; position: sticky; top: 112px; padding-top: 12px; border-top: 3px solid var(--ink); }
.index-note p { margin: 0 0 30px; font: 700 10px/1.2 Georgia, serif; letter-spacing: .18em; color: var(--red); }
.index-note strong { display: block; font: 500 26px/1.2 Georgia, "Noto Serif SC", serif; }
.index-note span { display: block; margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.group { margin-bottom: 46px; }
.group-head { display: flex; align-items: baseline; gap: 13px; padding-bottom: 13px; border-bottom: 2px solid var(--ink); }
.group-head h2 { margin: 0; font: 600 20px/1.2 Georgia, "Noto Serif SC", serif; }
.group-head span { color: var(--muted); font: 12px/1 Georgia, serif; }
.site-row { min-height: 112px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; border-bottom: 1px solid var(--line); transition: background .18s ease, padding .18s ease; position: relative; }
.site-row::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 28px; width: 2px; background: transparent; transition: background .18s ease; }
.site-row:hover { background: rgba(255,255,255,.56); padding: 0 12px; }
.site-row:hover::before { background: var(--red); }
.site-copy { min-width: 0; }
.site-title-line { display: flex; align-items: center; gap: 10px; }
.site-title { margin: 0; font-size: 16px; font-weight: 650; }
.badge { padding: 4px 7px; background: #e4ebe6; color: #376149; font-size: 10px; letter-spacing: .05em; }
.site-desc { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-actions { display: flex; align-items: center; gap: 8px; }
.favorite { width: 36px; height: 36px; border: 0; background: transparent; color: #858b87; font-size: 19px; cursor: pointer; }
.favorite.active { color: var(--red); }
.open-site { min-width: 84px; height: 38px; padding: 0 14px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; border: 1px solid var(--ink); font-size: 12px; font-weight: 650; }
.open-site:hover { background: var(--ink); color: white; }
.open-site span { font-size: 15px; }
.empty { margin: 48px 0; padding: 44px; text-align: center; border: 1px solid var(--line); background: #f8f7f3; }
.empty strong, .empty span { display: block; }
.empty span { margin-top: 9px; color: var(--muted); font-size: 13px; }

footer { max-width: 1240px; margin: 0 auto; padding: 28px 24px 38px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; letter-spacing: .05em; }

@media (max-width: 820px) {
  .masthead { height: 70px; padding: 0 18px; }
  .brand-logo { width: 50px; height: 50px; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy small { display: none; }
  main { padding: 0 18px 60px; }
  .hero { min-height: 300px; padding: 54px 0 38px; }
  .hero-stat { display: none; }
  h1 { font-size: clamp(42px, 13vw, 62px); }
  .intro { font-size: 14px; margin-top: 22px; }
  .toolbar { display: block; padding: 20px 0; }
  .search { min-width: 0; width: 100%; }
  kbd { display: none; }
  .filters { margin-top: 12px; }
  .workspace { display: block; padding-top: 26px; }
  .index-note { display: none; }
  .group { margin-bottom: 36px; }
  .site-row { min-height: 104px; grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
  .site-title { font-size: 15px; }
  .site-desc { max-width: 48vw; }
  .favorite { display: none; }
  .open-site { min-width: 46px; width: 46px; padding: 0; font-size: 0; }
  .open-site span { font-size: 17px; }
  footer { padding: 24px 18px 34px; display: grid; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
