:root {
  --ink: #1a1714;
  --muted: #6b645c;
  --paper: #f7f3ec;
  --paper-2: #efe8dc;
  --accent: #0e7c66;
  --accent-2: #c45c26;
  --line: rgba(26, 23, 20, 0.12);
  --card: rgba(255, 252, 247, 0.82);
  --shadow: 0 18px 50px rgba(26, 23, 20, 0.08);
  --radius: 18px;
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  line-height: 1.65;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(14, 124, 102, 0.18), transparent 60%),
    radial-gradient(700px 420px at 90% 0%, rgba(196, 92, 38, 0.14), transparent 55%),
    linear-gradient(180deg, #fbf8f2 0%, #f3eee4 45%, #ebe4d7 100%);
}

.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(247, 243, 236, 0.75);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), #146b5a);
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  box-shadow: 0 8px 24px rgba(14, 124, 102, 0.28);
}
.brand-text { display: flex; flex-direction: column; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.brand-text small { color: var(--muted); font-size: 0.75rem; }

.nav { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav a.on, .nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.main { padding: 28px 0 64px; }

.hero {
  padding: 28px 0 18px;
  animation: rise 0.7s ease both;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.hero p { margin: 0; color: var(--muted); max-width: 36em; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 18px;
}
.cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.45);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}
.chip.on, .chip:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(14,124,102,.25); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-warn { background: var(--accent-2); }
.btn-sm { padding: 7px 12px; font-size: 0.88rem; border-radius: 10px; }

.idea-list { display: grid; gap: 14px; }
.idea-card {
  display: block;
  padding: 18px 18px 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, border-color .18s ease;
  animation: rise 0.55s ease both;
}
.idea-card:hover { transform: translateY(-2px); border-color: rgba(14,124,102,.35); }
.idea-content {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 12px;
  line-height: 1.5;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.86rem;
}
.meta .tag {
  color: var(--accent);
  font-weight: 600;
}
.rate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-2);
  font-weight: 600;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 16px; }
.panel h2 {
  font-family: var(--font-display);
  margin: 0 0 14px;
  font-size: 1.25rem;
}

.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.9rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: rgba(255,255,255,0.7);
  color: var(--ink);
}
.form-row textarea { min-height: 110px; resize: vertical; }

.vote-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}
.vote-bar .pulse {
  animation: pulse 0.8s ease;
}
.child-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.child-item:first-child { border-top: 0; }

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  animation: rise .4s ease both;
}
.flash-ok { background: rgba(14,124,102,.12); color: #0a5c4b; }
.flash-err { background: rgba(196,92,38,.12); color: #8a3a12; }

.auth-box { max-width: 420px; margin: 20px auto; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }

.comment { padding: 10px 0; border-top: 1px dashed var(--line); }
.comment .who { font-weight: 600; margin-right: 8px; }
.hint { color: var(--muted); font-size: 0.85rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(14,124,102,.15); }
  100% { transform: scale(1); }
}

@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .idea-content { font-size: 1.08rem; }
}
