/* Continuity Forum — editorial redesign */

:root {
  /* Surface — warm beige, light */
  --bg:        #f5f4f0;
  --bg-soft:   #efede7;
  --bg-deep:   #eae9e4;
  --bg-paper:  #fbfaf6;

  /* Ink — match spec */
  --ink-1: #1a1a1a;
  --ink-2: #6b6b6b;
  --ink-3: #a8a39a;
  --ink-4: #d2cec5;

  /* Hairline — softer */
  --rule:        rgba(0, 0, 0, 0.06);
  --rule-strong: rgba(0, 0, 0, 0.10);

  /* Accent — used VERY sparingly */
  --accent:      #c46a2c;
  --accent-soft: rgba(196, 106, 44, 0.10);
  --accent-ink:  #8a4a1c;

  /* Status — only the tiny dot is colored */
  --d-open:      #b3a994;
  --d-planned:   #7c95b8;
  --d-progress:  #c46a2c;
  --d-done:      #6f9a72;
  --d-declined:  #b8b3a8;
  --d-bug:       #b85541;

  /* Type stacks */
  --serif:    "EB Garamond", "Cormorant Garamond", "Source Serif Pro", Georgia, serif;
  --serif-cn: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans-cn:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
              "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--sans-cn);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; padding: 0; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }

/* ───── App shell ───── */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ───── Top bar ───── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 241, 236, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
}
.topbar::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--rule);
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex; align-items: center; gap: 28px;
  position: relative;
}
.topbar-inner.detail-mode { justify-content: space-between; }

/* ───── Section tabs (sticky beneath topbar) ───── */
.section-tabs {
  position: sticky;
  top: 64px;
  z-index: 25;
  margin-top: 12px;
  background: rgba(244, 241, 236, 0.92);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.section-tabs::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--rule);
  opacity: 0;
  transition: opacity 0.2s;
}
.section-tabs.stuck::after { opacity: 1; }
.section-tabs.stuck {
  box-shadow: 0 1px 0 rgba(43, 35, 28, 0.04);
}
.section-tabs-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.section-tabs .nav-tabs {
  grid-column: 2;
  justify-self: center;
  margin-left: 0;
}
.section-tabs .new-link {
  grid-column: 3;
  justify-self: end;
}

/* Nav tabs (in section header) */
.nav-tabs {
  display: flex; align-items: stretch;
  gap: 4px;
  height: 100%;
  margin-left: 8px;
}
.nav-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 4px;
  height: 60px;
  background: transparent;
  border: 0;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  margin-right: 14px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: color 0.18s;
}
.nav-tab:hover { color: var(--ink-1); }
.nav-tab.active { color: var(--ink-1); }
.nav-tab.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 1.5px;
  background: var(--accent);
}
.nav-tab .nt-en {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.nav-tab.active .nt-en { color: var(--accent); }
.nav-tab .nt-count {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.mobile-tabs { display: none; }

@media (max-width: 760px) {
  .section-tabs { top: 56px; }
  .section-tabs-inner { padding: 0 18px; gap: 14px; height: auto; padding-top: 4px; padding-bottom: 4px; grid-template-columns: 1fr; }
  .section-tabs .nav-tabs { grid-column: 1; justify-self: stretch; flex: 1; gap: 0; min-width: 0; }
  .section-tabs .new-link { grid-column: 1; justify-self: center; }
  .section-tabs .nav-tab { flex: 1; justify-content: center; height: 52px; margin-right: 0; padding: 0 6px; font-size: 14px; }
  .section-tabs .nav-tab .nt-en { display: none; }
  .section-tabs .new-link { font-size: 13px; padding-top: 4px; padding-bottom: 4px; }
  .topbar-inner { gap: 12px; padding: 0 18px; flex-wrap: wrap; height: auto; align-items: center; padding-top: 12px; padding-bottom: 12px; }
  .topbar-inner > .brand, .topbar-inner > .back-link { padding-top: 0; }
  .topbar-inner > .top-actions { padding-top: 0; }
  .mobile-tabs {
    display: flex;
    width: 100%;
    margin-top: 4px;
    gap: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0 !important;
  }
  .mobile-tabs .nav-tab {
    flex: 1;
    justify-content: center;
    padding: 12px 4px !important;
    font-size: 13.5px;
  }
}
.mob .topbar { top: 0; }
.mob .topbar-inner { gap: 12px; padding: 0 18px; height: 52px; align-items: center; }
.mob .section-tabs { top: 52px; }
.mob .section-tabs-inner { padding: 0 18px; gap: 14px; height: auto; padding-top: 4px; padding-bottom: 4px; grid-template-columns: 1fr; }
.mob .section-tabs .nav-tabs { grid-column: 1; justify-self: stretch; flex: 1; gap: 0; min-width: 0; margin-left: 0; }
.mob .section-tabs .new-link { grid-column: 1; justify-self: center; }
.mob .section-tabs .nav-tab { flex: 1; justify-content: center; height: 50px; margin-right: 0; padding: 0 4px; font-size: 13.5px; }
.mob .section-tabs .nav-tab .nt-en { display: none; }
.mob .section-tabs .new-link { font-size: 13px; }

/* Byline name (replacing avatar) */
.byline-name {
  font-size: 13px;
  color: var(--ink-1);
  font-weight: 500;
  line-height: 1;
}
.byline-name.is-team { color: var(--accent-ink); }

.brand {
  display: inline-flex; align-items: baseline; gap: 10px;
  color: var(--ink-1);
}
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.25px solid var(--accent);
  position: relative;
  align-self: center;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}
.brand-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.005em;
  color: var(--ink-1);
}
.brand-divider {
  display: inline-block;
  width: 1px; height: 14px;
  background: var(--rule-strong);
  margin: 0 4px;
  align-self: center;
}
.brand-sub {
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

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

.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 4px;
  transition: color 0.18s;
}
.back-link:hover { color: var(--ink-1); }
.back-link .arrow { font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1; }

.top-link {
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 0;
  position: relative;
  transition: color 0.18s;
}
.top-link:hover { color: var(--ink-1); }
.top-link.primary { color: var(--ink-1); }
.top-link.primary::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 1px;
  height: 1px;
  background: var(--accent);
}

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 4px;
}
.user-name {
  font-size: 13px; color: var(--ink-1);
}
.user-name .credits {
  font-family: var(--serif); font-style: italic;
  color: var(--ink-2); margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

/* Avatar — pastel circles, single Chinese char */
.av {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,0.95);
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  font-family: var(--sans-cn);
}

/* ───── Page header (editorial) ───── */

.page-head {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  padding: 56px 32px 24px;
  position: relative;
}
.hero-ripple {
  position: absolute;
  top: 18px; right: 28px;
  pointer-events: none;
  opacity: 0.85;
}
.mob .hero-ripple { display: none; }
@media (max-width: 720px) { .hero-ripple { display: none; } }
.overline {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--ink-2);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.overline .sep { color: var(--ink-3); margin: 0 8px; font-style: normal; }
.page-title {
  font-family: var(--serif-cn);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.2;
  color: var(--ink-1);
  margin: 0 0 18px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}
.page-title .lead {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0.01em;
  margin-right: 4px;
}
.page-sub {
  font-family: var(--sans-cn, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif);
  font-size: 15px;
  color: var(--ink-2);
  margin: 0;
  max-width: 580px;
  line-height: 1.85;
  letter-spacing: 0.01em;
}
.page-sub p { margin: 0 0 0.6em; }
.page-sub p:last-child { margin-bottom: 0; margin-top: 0.4em; }

/* Status pill row */
.status-pills {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  background: transparent;
  transition: all 0.15s;
}
.status-pill:hover { color: var(--ink-1); border-color: var(--rule-strong); }
.status-pill.active {
  color: var(--ink-1);
  background: var(--bg-paper);
  border-color: var(--rule-strong);
}
.status-pill.active.star {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: rgba(196,106,44,0.3);
}
.status-pill .sp-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.status-pill .sp-check {
  font-size: 11px; color: var(--accent);
  font-weight: 600;
}
.status-pill.star { color: var(--accent-ink); }
.status-pill.star .sp-check { color: var(--accent); }

/* Resolved banner on detail */
.resolved-banner {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(111,154,114,0.10), rgba(111,154,114,0.04));
  border: 1px solid rgba(111,154,114,0.22);
  border-radius: 6px;
  margin: 0 0 28px;
}
.rb-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #6f9a72;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  flex-shrink: 0;
}
.rb-line {
  font-family: var(--serif-cn);
  font-weight: 500;
  font-size: 15.5px;
  color: #2f6234;
}
.rb-time {
  font-family: var(--serif); font-style: italic;
  font-weight: 400;
  color: var(--ink-3);
  font-size: 13px;
  margin-left: 6px;
}
.rb-sub {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 2px;
  font-family: var(--serif-cn);
}

/* Comments */
.comments {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.comments-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 20px;
}
.ch-en {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; letter-spacing: 0.22em;
  color: var(--ink-3); text-transform: uppercase;
}
.ch-zh {
  font-family: var(--serif-cn);
  font-size: 14px; color: var(--ink-2);
}
.ch-count {
  font-family: var(--serif); font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.comment-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0;
}
.comment {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.comment:first-child { border-top: 0; padding-top: 4px; }
.comment.is-admin { background: linear-gradient(90deg, rgba(196,106,44,0.04) 0%, transparent 100%); padding-left: 14px; padding-right: 14px; margin-left: -14px; margin-right: -14px; border-radius: 6px; border-top: 0; margin-top: 8px; }
.comment.is-admin + .comment { border-top: 0; margin-top: 8px; }
.comment-byline {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px; color: var(--ink-2);
  margin-bottom: 4px;
}
.c-name { font-size: 14px; color: var(--ink-1); font-weight: 500; }
.is-admin .c-name { color: var(--accent-ink); }
.c-team {
  font-family: var(--serif); font-style: italic;
  color: var(--accent); font-size: 12px;
}
.c-sep { color: var(--ink-3); }
.c-time {
  font-size: 12.5px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.comment-body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-1);
  margin: 0;
}
.comments-empty {
  font-family: var(--serif-cn);
  font-size: 14px;
  color: var(--ink-3);
  padding: 20px 0 8px;
  font-style: italic;
}

/* Compose */
.comment-compose {
  margin-top: 24px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 14px 16px;
  background: var(--bg-paper);
  transition: border-color 0.15s;
}
.comment-compose.focused { border-color: var(--rule-strong); }
.comment-compose.disabled { opacity: 0.7; }
.comment-input {
  width: 100%;
  border: 0;
  background: transparent;
  resize: none;
  font-family: var(--serif-cn);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-1);
  min-height: 22px;
  outline: none;
  padding: 0;
}
.comment-compose.focused .comment-input { min-height: 80px; }
.comment-input::placeholder { color: var(--ink-3); }
.comment-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--rule);
}
.comment-hint {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; color: var(--ink-3);
}

/* ───── Tabs ───── */

.tabs-rail {
  max-width: 920px;
  margin: 28px auto 0;
  width: 100%;
  padding: 0 32px;
  border-bottom: 1px solid var(--rule);
}
.tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 14px 0 14px;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  margin-bottom: -1px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s;
  letter-spacing: 0.005em;
}
.tab:hover { color: var(--ink-1); }
.tab.active {
  color: var(--ink-1);
  border-bottom-color: var(--accent);
}
.tab .tab-en {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.tab.active .tab-en { color: var(--accent); }
.tab .tab-count {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

/* ───── Filter bar ───── */

.filter-bar {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  padding: 22px 32px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-2);
}
.filter-group { display: flex; align-items: center; gap: 22px; }

.tx-select {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 6px;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color 0.18s;
}
.tx-select:hover { color: var(--ink-1); }
.tx-select .label { color: var(--ink-3); }
.tx-select .value { color: var(--ink-1); }
.tx-select .caret {
  font-size: 9px; color: var(--ink-3);
  margin-left: 2px;
  transform: translateY(-1px);
}
.tx-select.active .value { color: var(--accent-ink); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px); left: 0;
  z-index: 50;
  min-width: 180px;
  background: var(--bg-paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 6px 0;
  box-shadow: 0 12px 32px rgba(31,28,23,0.10);
  animation: ddIn 0.15s ease;
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 14px;
  text-align: left;
  font-size: 13.5px;
  color: var(--ink-1);
  transition: background 0.12s;
}
.dropdown-item:hover { background: var(--bg-soft); }
.dropdown-item .check { margin-left: auto; color: var(--accent); }

.sort-segments {
  display: inline-flex; gap: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}
.sort-seg {
  color: var(--ink-3);
  padding: 4px 2px;
  margin-left: 14px;
  position: relative;
  transition: color 0.18s;
}
.sort-seg:first-child { margin-left: 0; }
.sort-seg:hover { color: var(--ink-1); }
.sort-seg.active { color: var(--ink-1); }
.sort-seg.active::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: -2px;
  height: 1px;
  background: var(--accent);
}

/* ───── Posts list — borderless rows ───── */

.list {
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  padding: 16px 32px 120px;
}

.post-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 26px 8px 26px;
  border-top: 1px solid var(--rule);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}
.post-row:first-child { border-top: 0; }
.post-row:hover { background: rgba(31, 28, 23, 0.018); }
.post-row.is-pinned { background: linear-gradient(180deg, rgba(196,106,44,0.025) 0%, transparent 60%); }
.post-row.is-announcement {
  background: linear-gradient(180deg, rgba(196,106,44,0.035) 0%, rgba(196,106,44,0.008) 100%);
}

/* Vote — big italic serif numeral */
.vote {
  width: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 4px;
  user-select: none;
  cursor: pointer;
  color: var(--ink-2);
  transition: color 0.18s;
}
.vote:hover { color: var(--accent); }
.vote .arrow {
  font-size: 11px;
  line-height: 1;
  color: var(--ink-3);
  margin-bottom: 2px;
  transition: transform 0.18s, color 0.18s;
}
.vote:hover .arrow { color: var(--accent); transform: translateY(-1px); }
.vote .count {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink-1);
  letter-spacing: 0.005em;
}
.vote .count-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.vote.voted { color: var(--accent); }
.vote.voted .arrow { color: var(--accent); }
.vote.voted .count { color: var(--accent-ink); }
.vote.voted .count-label { color: var(--accent); }

.post-body { min-width: 0; }

.post-top-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
.post-corner-status {
  flex-shrink: 0;
}

.post-overline {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.post-overline .pin {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
}
.post-overline .pin::before { content: "·"; margin-right: 8px; color: var(--ink-3); font-style: normal; }

.post-title {
  font-family: var(--serif-cn);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.003em;
  line-height: 1.45;
  color: var(--ink-1);
  margin: 0 0 8px;
}
.post-row:hover .post-title { color: #000; }

.post-preview {
  font-size: 14px;
  color: var(--ink-2);
  margin: 6px 0 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 640px;
}

.post-meta {
  display: flex; align-items: baseline; flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
}
.post-meta .meta-right {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.post-meta > * {
  display: inline-flex;
  align-items: baseline;
}
.post-meta .meta-time {
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.post-meta .author {
  display: inline-flex; align-items: center; gap: 8px;
}
.post-meta .author-name { color: var(--ink-1); }
.post-meta .author-tag {
  font-family: var(--serif); font-style: italic;
  color: var(--accent); font-size: 11.5px;
  margin-left: 4px;
}
.meta-sep { color: var(--ink-3); margin: 0 10px; }

/* Status — tiny dot + word, all sans, baseline-aligned */
.status {
  display: inline-flex; align-items: baseline; gap: 6px;
  color: var(--ink-2);
}
.status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
  align-self: center;
  transform: translateY(-1px);
}
.status .word {
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.status[data-s="completed"] .word { color: var(--d-done); }
.status[data-s="in_progress"] .word { color: var(--accent-ink); }
.status[data-s="planned"] .word { color: var(--d-planned); }
.status[data-s="declined"] .word { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 0.5px; }

.type-tag {
  display: inline-flex; align-items: center;
  font-family: var(--serif); font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.type-tag[data-t="bug"] { color: var(--d-bug); }
.type-tag[data-t="announcement"] { color: var(--accent); }

/* Team-replied indicator in overline */
.post-overline .team-mark {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: none;
  position: relative;
  padding-left: 12px;
}
.post-overline .team-mark::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 4px; height: 1px; background: var(--ink-4);
}
.post-overline .team-mark .tm-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 106, 44, 0.14);
  animation: tmPulse 2.4s ease-in-out infinite;
}
@keyframes tmPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(196, 106, 44, 0.14); }
  50%      { box-shadow: 0 0 0 5px rgba(196, 106, 44, 0.06); }
}

/* Reply count chip in meta row — baseline-aligned, all sans */
.post-meta .reply-count {
  display: inline-flex; align-items: baseline; gap: 6px;
  color: var(--ink-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transition: color 0.18s;
}
.post-meta .reply-count.has { color: var(--ink-2); }
.post-row:hover .reply-count.has { color: var(--ink-1); }
.post-meta .reply-count .rc-ico {
  color: currentColor;
  flex-shrink: 0;
  opacity: 0.7;
  align-self: center;
  transform: translateY(-1px);
}
.post-meta .reply-count.has .rc-ico { opacity: 1; }
.post-meta .reply-count .rc-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-1);
  letter-spacing: 0.01em;
}
.post-meta .reply-count:not(.has) .rc-num { color: var(--ink-3); font-weight: 400; }
.post-meta .reply-count .rc-label {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

/* Subtle right-side hover affordance */
.post-row::after {
  content: "→";
  position: absolute;
  top: 30px; right: 8px;
  font-family: var(--serif); font-style: italic;
  color: var(--accent);
  font-size: 18px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.22s, transform 0.22s;
  pointer-events: none;
}
.post-row:hover::after { opacity: 0.8; transform: translateX(0); }
.mob .post-row::after { display: none; }

/* Empty */
.empty {
  text-align: center;
  padding: 80px 20px 60px;
  color: var(--ink-3);
}
.empty-mark {
  font-family: var(--serif); font-style: italic;
  font-size: 56px; line-height: 1;
  color: var(--ink-4);
  margin-bottom: 14px;
}
.empty-text {
  font-family: var(--serif-cn);
  font-size: 15px;
  color: var(--ink-2);
}

/* ───── Detail page ───── */

.detail {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 56px 32px 140px;
}

.detail-overline {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-style: italic;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 22px;
}
.detail-overline .sep { color: var(--ink-4); }
.detail-overline .pin { color: var(--accent); }

.detail-title {
  font-family: var(--serif-cn);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: 0.002em;
  line-height: 1.3;
  color: var(--ink-1);
  margin: 0 0 24px;
  text-wrap: pretty;
}

.detail-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 36px;
  font-size: 13px;
  color: var(--ink-2);
}
.detail-byline .author { display: flex; align-items: center; gap: 10px; }
.detail-byline .author-name {
  font-size: 14px; color: var(--ink-1);
}
.detail-byline .author-tag {
  font-family: var(--serif); font-style: italic;
  color: var(--accent); margin-left: 6px; font-size: 12.5px;
}
.detail-byline .meta-time {
  font-size: 13px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.detail-byline .meta-time .num { font-variant-numeric: tabular-nums; }

.detail-actions { margin-left: auto; display: flex; gap: 4px; }
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  transition: all 0.15s;
  font-size: 13px;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink-1); }

.detail-body-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 28px;
  align-items: start;
}
.detail-vote { position: sticky; top: 96px; align-self: start; }
.detail-vote .vote .count { font-size: 32px; }

/* Markdown body — editorial */
.md {
  font-family: var(--serif-cn);
  font-size: 16px;
  line-height: 1.85;
  color: #2a2722;
  max-width: 620px;
}
.md h1, .md h2, .md h3 {
  font-family: var(--serif-cn);
  font-weight: 600;
  margin: 1.8em 0 0.6em;
  line-height: 1.3;
  letter-spacing: 0;
}
.md h1 { font-size: 22px; }
.md h2 { font-size: 19px; }
.md h3 { font-size: 16px; color: var(--ink-1); }
.md p { margin: 0 0 1.2em; }
.md ul, .md ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.md li { margin: 0.3em 0; }
.md li::marker { color: var(--ink-3); }
.md strong { color: var(--ink-1); font-weight: 600; }
.md em { font-style: italic; color: var(--ink-1); }
.md a {
  color: var(--ink-1);
  border-bottom: 1px solid var(--accent);
  transition: color 0.18s;
}
.md a:hover { color: var(--accent); }
.md code {
  font-family: ui-monospace, "SF Mono", monospace;
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 13.5px;
  color: var(--accent-ink);
}
.md pre {
  background: var(--bg-soft);
  padding: 16px 18px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.4em 0;
  font-size: 13px;
  line-height: 1.65;
  border: 1px solid var(--rule);
}
.md pre code { background: none; padding: 0; color: var(--ink-1); }
.md blockquote {
  border-left: 1px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 1.4em 0;
  color: var(--ink-2);
  font-style: italic;
}
.md hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2em 0; }

/* Admin panel */
.admin-panel {
  margin-top: 56px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-2);
}
.admin-panel .admin-tag {
  font-family: var(--serif); font-style: italic;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.admin-select {
  padding: 5px 10px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--ink-1);
  border-radius: 6px;
  font-size: 13px;
}
.admin-pin {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-size: 13px;
}
.admin-pin input { accent-color: var(--accent); }

/* ───── Modal ───── */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(28, 24, 18, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  animation: bdIn 0.2s ease;
}
@keyframes bdIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-paper);
  border-radius: 6px;
  width: 100%;
  max-width: 580px;
  max-height: calc(100vh - 56px);
  display: flex; flex-direction: column;
  box-shadow: 0 28px 80px rgba(20, 16, 8, 0.22), 0 4px 16px rgba(20,16,8,0.08);
  animation: mdIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
  overflow: hidden;
  border: 1px solid var(--rule);
}
@keyframes mdIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  padding: 24px 28px 18px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.modal-eyebrow {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; letter-spacing: 0.2em;
  color: var(--ink-3); text-transform: uppercase;
}
.modal-title {
  font-family: var(--serif-cn);
  font-weight: 500;
  font-size: 22px;
  color: var(--ink-1);
  margin-top: 4px;
  letter-spacing: 0.005em;
}
.modal-close {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  font-size: 16px;
  border-radius: 6px;
  align-self: flex-start;
  margin-top: 6px;
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink-1); }

.modal-body {
  padding: 8px 28px 8px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 22px;
}

.field { display: flex; flex-direction: column; gap: 10px; }
.field-label {
  font-family: var(--serif); font-style: italic;
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: 0.06em;
}
.field-label .hint {
  margin-left: 8px;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0;
}

.type-row { display: flex; gap: 0; }
.type-opt {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  background: transparent;
  display: flex; flex-direction: column;
  gap: 4px;
  text-align: left;
  transition: all 0.15s;
  margin-left: -1px;
}
.type-opt:first-child { margin-left: 0; border-radius: 6px 0 0 6px; }
.type-opt:last-child { border-radius: 0 6px 6px 0; }
.type-opt:hover { background: var(--bg-soft); }
.type-opt.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  z-index: 1;
}
.type-opt .type-en {
  font-family: var(--serif); font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.type-opt.selected .type-en { color: var(--accent); }
.type-opt .type-name {
  font-family: var(--serif-cn);
  font-size: 15px;
  color: var(--ink-1);
  font-weight: 500;
}

.input-text, .input-area {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  padding: 8px 2px;
  font-size: 16px;
  color: var(--ink-1);
  font-family: var(--serif-cn);
  transition: border-color 0.15s;
  resize: none;
}
.input-text::placeholder, .input-area::placeholder { color: var(--ink-3); }
.input-text:focus, .input-area:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.input-area {
  min-height: 160px;
  font-size: 15px;
  line-height: 1.75;
  border: 1px solid var(--rule);
  padding: 14px 16px;
  border-radius: 6px;
}
.input-area:focus { border-color: var(--accent); border-bottom-color: var(--accent); }

.field-foot {
  display: flex; justify-content: space-between;
  font-family: var(--serif); font-style: italic;
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: -2px;
}
.field-foot .num { font-variant-numeric: tabular-nums; }

.modal-foot {
  padding: 18px 28px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--rule);
  margin-top: 6px;
}
.modal-hint {
  font-family: var(--serif); font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
}

.btn {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  font-family: var(--serif); font-style: italic;
  font-size: 14px;
  padding: 9px 20px;
  border-radius: 6px;
}
.btn-primary:hover { background: #b35e22; }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost {
  color: var(--ink-2);
  padding: 9px 14px;
}
.btn-ghost:hover { color: var(--ink-1); }

/* Login toast */
.toast {
  position: fixed;
  left: 50%; bottom: 36px;
  transform: translateX(-50%);
  background: #2a2620;
  color: var(--bg-paper);
  padding: 14px 18px 14px 22px;
  border-radius: 6px;
  font-size: 13.5px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
  animation: tIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
  z-index: 200;
}
@keyframes tIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.toast .word {
  font-family: var(--serif-cn);
}
.toast-link {
  font-family: var(--serif); font-style: italic;
  color: #f3c79b;
  border-bottom: 1px solid rgba(243, 199, 155, 0.4);
  padding-bottom: 1px;
}

/* Image attachment grid (modal) */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.image-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--rule);
}
.image-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.image-thumb-x {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(43, 35, 28, 0.78);
  color: #fff;
  font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.image-thumb-x:hover { background: var(--ink-1); }
.image-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  border: 1px dashed var(--rule-strong);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--serif-cn);
  padding: 8px;
}
.image-add:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.img-add-plus {
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
  font-weight: 300;
}
.img-add-label { font-size: 13px; }
.img-add-count {
  font-family: var(--serif); font-style: italic;
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* New post entry — text link, not button */
.section-tabs .new-link { flex-shrink: 0; }
.new-link {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--serif); font-style: italic;
  font-size: 14.5px;
  color: var(--ink-1);
  padding: 6px 0;
  position: relative;
}
.new-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 1px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
  transition: opacity 0.18s;
}
.new-link:hover::after { opacity: 1; }
.new-link .plus {
  color: var(--accent);
  font-size: 16px;
  font-style: normal;
}

/* Floating + (mobile) */
.fab {
  position: fixed;
  right: 22px; bottom: 26px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 300;
  z-index: 25;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transition: transform 0.15s, background 0.2s;
}
.fab:hover { transform: translateY(-2px); background: var(--accent); }
.fab:active { transform: translateY(0); }

/* ───── Mobile preview frame ───── */

.app.mobile-frame {
  background: #2a2620;
  align-items: center;
  padding: 0;
}
.app.mobile-frame .mobile-viewport {
  width: 390px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 80px rgba(0,0,0,0.4);
  overflow: hidden;
}

/* Mobile shrinks */
.mob .topbar-inner, .mob .page-head, .mob .section-tabs-inner, .mob .filter-bar, .mob .list, .mob .detail, .mob .tabs-rail {
  padding-left: 18px; padding-right: 18px; max-width: none;
}
.mob .tabs-rail { margin-top: 18px; }
.mob .topbar-inner { height: 52px; }
.mob .page-head { padding-top: 38px; padding-bottom: 18px; }
.mob .page-title { font-size: 30px; }
.mob .page-title .lead { font-size: 32px; }
.mob .page-sub { font-size: 14px; }
.mob .post-row { grid-template-columns: 52px 1fr; gap: 16px; padding: 22px 4px; }
.mob .vote { width: 52px; }
.mob .vote .count { font-size: 22px; }
.mob .post-title { font-size: 16.5px; }
.mob .post-preview { font-size: 13.5px; }
.mob .detail { padding: 32px 18px 120px; }
.mob .detail-title { font-size: 26px; }
.mob .detail-body-row { grid-template-columns: 1fr; gap: 16px; }
.mob .detail-vote { position: static; }
.mob .detail-vote .vote { flex-direction: row; align-items: baseline; gap: 10px; width: auto; padding: 0; }
.mob .detail-vote .vote .arrow { margin: 0; transform: translateY(-2px); }
.mob .detail-vote .vote .count-label { margin-top: 0; margin-left: 4px; }

.mob .filter-bar { padding-top: 18px; flex-wrap: wrap; gap: 10px; }
.mob .filter-group { gap: 14px; }
.mob .modal { max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; }

/* Real responsive */
@media (max-width: 720px) {
  .topbar-inner, .page-head, .section-tabs-inner, .filter-bar, .list, .detail, .tabs-rail {
    padding-left: 18px; padding-right: 18px;
  }
  .topbar-inner { height: 56px; }
  .page-head { padding-top: 38px; padding-bottom: 18px; }
  .page-title { font-size: 30px; }
  .page-title .lead { font-size: 32px; }
  .post-row { grid-template-columns: 52px 1fr; gap: 16px; padding: 22px 4px; }
  .vote { width: 52px; }
  .vote .count { font-size: 22px; }
  .post-title { font-size: 16.5px; }
  .detail { padding: 32px 18px 120px; }
  .detail-title { font-size: 26px; }
  .detail-body-row { grid-template-columns: 1fr; gap: 16px; }
  .detail-vote { position: static; }
  .detail-vote .vote { flex-direction: row; align-items: baseline; gap: 10px; width: auto; padding: 0; }

  .modal { max-width: 100%; height: 100vh; max-height: 100vh; border-radius: 0; }
}

/* fade in */
.fade-in { animation: fadeIn 0.28s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ───── Tonal correction: Chinese should be sans by default ───── */
/* Reserve serif italic ONLY for English wordmarks, timestamps, hairline labels. */
.modal-title,
.field-label,
.input-text, .input-area,
.type-name, .type-en,
.comment-input,
.toast .word,
.rb-line, .rb-sub,
.ch-zh,
.modal-hint,
.comments-empty,
.list .post-title,
.list .post-snip,
.detail .detail-title,
.md, .md p, .md li, .md blockquote,
.field-foot,
.image-add, .img-add-label,
.brand-sub,
.user-name,
.btn,
.status-pill {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", "Segoe UI", sans-serif !important;
  font-style: normal !important;
}
/* but keep numerals/EN bits italic */
.field-foot .num,
.user-name .credits,
.modal-hint .key { font-family: var(--serif), Georgia, serif !important; font-style: italic !important; }
