:root {
  color-scheme: light;
  --navy: #0B0D2E;
  --navy-elev: #141747;
  --navy-line: rgba(243, 238, 232, 0.16);
  --ivory: #F3EEE8;
  --bg: #F3EEE8;
  --bg-2: #FAF7F2;
  --card: #FFFFFF;
  --ink: #12142B;
  --ink-2: #2E3254;
  --ink-3: #52567A;
  --ink-4: #6D7194;
  --line-2: rgba(11, 13, 46, 0.13);
  --line-3: rgba(11, 13, 46, 0.08);
  --accent: #7D4DFF;
  --accent-ink: #5A2ED6;
  --accent-t1: rgba(125, 77, 255, 0.09);
  --accent-t2: rgba(125, 77, 255, 0.14);
  --pink: #FF3D80;
  --pink-ink: #C81E5D;
  --pink-t: rgba(255, 61, 128, 0.12);
  --cyan: #06E5D0;
  --cyan-ink: #007A6E;
  --cyan-t: rgba(6, 229, 208, 0.18);
  --amber-t: rgba(245, 158, 11, 0.15);
  --amber-ink: #9A3412;
  --hover-row: rgba(255, 255, 255, 0.72);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  --font-num: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --max-w: 1140px;
  --r-sm: 8px;
  --r-md: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }

:root[data-lang="en"] .zh-only { display: none !important; }
:root[data-lang="zh"] .en-only { display: none !important; }
[hidden] { display: none !important; }

.topline {
  height: 4px;
  background: linear-gradient(90deg, var(--pink) 0%, var(--accent) 52%, var(--cyan) 100%);
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 13, 46, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-line);
  color: var(--ivory);
}

.masthead .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mark {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.mark-home {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.mark-home img {
  height: 22px;
  width: auto;
  display: block;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 20px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  font-size: 14px;
  font-weight: 600;
  color: rgba(243, 238, 232, 0.72);
  padding: 6px 12px;
  margin-left: 4px;
  border-left: 1px solid rgba(243, 238, 232, 0.14);
  white-space: nowrap;
  transition: color .15s;
}
.tab:first-child { border-left: 0; margin-left: 0; }
.tab:hover { color: #ffffff; }
.tab.on { color: var(--cyan); font-weight: 700; }

.lang {
  display: inline-flex;
  border: 1px solid rgba(243, 238, 232, 0.24);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}
.lang button {
  border: 0;
  background: transparent;
  color: rgba(243, 238, 232, 0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
}
.lang button.is-active {
  background: var(--ivory);
  color: var(--navy);
}

.shell, .page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--ink-4);
}
.breadcrumb a { color: var(--ink-3); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent-ink); }
.breadcrumb strong { color: var(--navy); font-weight: 700; }

.brandline {
  padding: 36px 0 18px;
}
.brandline h1, .page > h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--navy);
}
.brandline p, .page > p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-3);
  max-width: 66ch;
}

.searchbar {
  margin-top: 22px;
}
.searchbar input {
  width: 100%;
  max-width: 540px;
  height: 46px;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
.searchbar input:focus {
  outline: 2px solid var(--accent-t2);
  border-color: var(--accent);
}

.section-title {
  margin: 34px 0 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.section-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  color: var(--navy);
}
.section-title > span {
  font-size: 13px;
  color: var(--ink-4);
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.area-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card.area-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 18px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card.area-card:hover {
  border-color: rgba(125, 77, 255, 0.42);
  box-shadow: 0 14px 32px rgba(11, 13, 46, 0.08);
  transform: translateY(-2px);
}
.area-card .bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent);
}
.area-card.demo .bar { background: linear-gradient(90deg, var(--pink), var(--accent), var(--cyan)); }
.area-card.draft .bar { background: #f59e0b; }
.area-card.live .bar { background: var(--cyan-ink); }
.area-card.public .bar { background: var(--pink); }

.area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.area-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  color: var(--navy);
}
.area-label {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-3);
}
.area-label.open { background: var(--cyan-t); color: var(--cyan-ink); }
.area-label.demo { background: var(--accent-t2); color: var(--accent-ink); }
.area-label.auth { background: var(--amber-t); color: var(--amber-ink); }

.area-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
  flex: 1;
}
.area-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-ink);
  padding-top: 4px;
}
.area-action .n {
  color: var(--ink-4);
  font-weight: 500;
}

.list {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
}

.nav-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-3);
  color: inherit;
}
.nav-item:last-child { border-bottom: 0; }
.nav-item:hover { background: var(--bg-2); }

.item-label {
  order: 0;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-2);
  color: var(--ink-3);
}
.nav-item.entry .item-label { background: var(--accent-t2); color: var(--accent-ink); }
.nav-item.public .item-label { background: var(--cyan-t); color: var(--cyan-ink); }
.nav-item.draft .item-label { background: var(--amber-t); color: var(--amber-ink); }

.item-title {
  order: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.title-en, .title-zh {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}
:root[data-lang="zh"] .title-en:has(+ .title-zh) { display: none; }
:root[data-lang="en"] .title-zh { display: none; }
.nav-item:hover .title-en, .nav-item:hover .title-zh { color: var(--accent-ink); }

.item-count {
  order: 2;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
}
:root[data-lang="zh"] .item-count::after { content: " 项"; font-weight: 400; color: var(--ink-4); }
:root[data-lang="en"] .item-count::after { content: " items"; font-weight: 400; color: var(--ink-4); }

.item-meta {
  order: 3;
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-3);
}
.item-meta-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-date {
  flex: none;
  font-family: var(--font-num);
  color: var(--ink-4);
}

.notice-box {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--card);
  font-size: 14px;
  color: var(--ink-2);
}
.notice-box strong {
  display: block;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 4px;
}
.notice-box a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.empty-state {
  margin-top: 20px;
  padding: 20px;
  background: var(--card);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--ink-3);
}

.sitefoot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--ink-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.sitefoot a {
  color: var(--accent-ink);
  font-weight: 600;
}

@media (max-width: 680px) {
  .area-grid.cols-2 { grid-template-columns: 1fr; }
  .masthead .inner {
    height: auto;
    padding: 10px 14px 8px;
    flex-wrap: wrap;
    gap: 8px 10px;
  }
  .mark { display: contents; }
  .mark-home { order: 1; }
  .lang { order: 2; }
  .tabs {
    order: 3;
    flex: 1 1 100%;
    margin: 2px 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(243, 238, 232, 0.14);
  }
  .shell, .page { padding: 0 14px 48px; }
  .tab { padding: 4px 10px; font-size: 13px; }
  .tab:first-child { padding-left: 0; }
  .brandline { padding-top: 24px; }
}
