:root {
  --ink: #102f2a;
  --muted: #687e75;
  --paper: #f5f7f1;
  --card: #fff;
  --line: #e3eae0;
  --green: #2f6f60;
  --gold: #c49a5a;
  --soft: #eaf3ec;
  font-family: "MiSans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px clamp(22px, 5vw, 68px);
  background: rgba(245, 247, 241, .94);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #f4e5c5; font-weight: 800; }
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; font-size: 8px; letter-spacing: 2px; color: #91a098; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 26px; color: #5d746a; font-size: 13px; }
.nav a:hover { color: var(--green); }
.nav-cta { padding: 9px 14px; border-radius: 9px; background: var(--ink); color: #fff !important; font-size: 12px; }

main { max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 54px) clamp(20px, 5vw, 68px) 60px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.eyebrow { font-size: 10px; letter-spacing: 2.4px; color: var(--gold); font-weight: 750; }
.hero h1 { font-size: clamp(38px, 5vw, 58px); letter-spacing: -2px; margin: 10px 0 10px; }
.hero p { max-width: 590px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.hero-stats { display: flex; align-items: baseline; gap: 6px; padding: 12px 18px; border: 1px solid var(--line); background: #fff; border-radius: 14px; white-space: nowrap; }
.hero-stats strong { font-size: 28px; color: var(--green); }
.hero-stats span { font-size: 11px; color: #8b9b93; }

.layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .85fr); gap: 24px; align-items: start; }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; color: #61776c; padding: 9px 16px; border-radius: 999px; font-size: 12px; cursor: pointer; }
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.feed-hint { font-size: 10px; color: #96a49c; white-space: nowrap; }
.feed-list { display: flex; flex-direction: column; gap: 14px; }
.post { display: flex; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.post-images { display: grid; gap: 5px; flex: 0 0 150px; align-self: flex-start; }
.post-images.count-1 { flex-basis: 230px; grid-template-columns: 1fr; }
.post-images.count-2,
.post-images.count-3,
.post-images.count-4 { grid-template-columns: 1fr 1fr; }
.post-image { width: 100%; height: 68px; object-fit: cover; border-radius: 9px; background: #edf3ec; }
.post-images.count-1 .post-image { height: 158px; border-radius: 12px; }
.post-images.count-2 .post-image,
.post-images.count-4 .post-image { height: 82px; }
.post-images.count-3 .post-image:first-child { grid-row: span 2; height: 169px; }
.post-images.count-3 .post-image:not(:first-child) { height: 82px; }
.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-head { display: flex; align-items: center; gap: 9px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--green); font-size: 12px; font-weight: 700; }
.author { display: flex; flex-direction: column; gap: 1px; }
.author strong { font-size: 12px; }
.author small { font-size: 9px; color: #94a39a; }
.post-badge { margin-left: auto; font-size: 9px; color: #2f6f60; background: var(--soft); padding: 4px 8px; border-radius: 999px; }
.post-content { margin: 13px 0 12px; font-size: 13px; line-height: 1.8; color: #3e574d; white-space: pre-wrap; }
.post-foot { display: flex; align-items: center; gap: 18px; color: #94a39a; font-size: 10px; margin-top: auto; }
.post-actions { margin-left: auto; display: flex; gap: 8px; }
.share-btn { border: 1px solid var(--line); background: #fff; color: #5c7469; border-radius: 7px; padding: 6px 11px; font-size: 10px; cursor: pointer; }
.share-btn:hover { border-color: #bdd2c2; color: var(--green); }
.loading, .empty { padding: 60px 20px; text-align: center; color: #96a49c; font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.mobile-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; border-radius: 16px; padding: 18px 20px; background: #123d35; color: #fff; }
.mobile-cta div { display: flex; flex-direction: column; gap: 4px; }
.mobile-cta strong { font-size: 13px; }
.mobile-cta span { font-size: 10px; color: #b9d0c4; }
.mobile-cta a { background: #f4e5c5; color: #183b33; padding: 10px 14px; border-radius: 8px; font-size: 11px; white-space: nowrap; }

.ranking-column { position: sticky; top: 86px; }
.ranking-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 18px 40px rgba(18, 61, 53, .05); }
.ranking-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ranking-head h2 { font-size: 25px; margin: 3px 0 0; letter-spacing: -.6px; }
.top-badge { font-size: 9px; color: #94621d; background: #f6ead5; padding: 5px 9px; border-radius: 999px; font-weight: 700; }
.ranking-note { color: #93a29a; font-size: 10px; margin: 9px 0 14px; }
.ranking-list { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 9px; padding: 11px 2px; border-top: 1px solid #f0f4ed; }
.rank-no { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: grid; place-items: center; background: #eff5ee; color: #7f9488; font-size: 11px; font-weight: 750; }
.rank-no.r1 { background: #d7b36a; color: #fff; }
.rank-no.r2 { background: #b8c4c0; color: #fff; }
.rank-no.r3 { background: #c79875; color: #fff; }
.rank-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--green); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.rank-user { display: flex; flex-direction: column; gap: 1px; }
.rank-user b { font-size: 11px; }
.rank-user small { font-size: 9px; color: #96a49c; }
.rank-weight { margin-left: auto; color: #94621d; font-size: 13px; font-weight: 750; white-space: nowrap; }
.ranking-foot { color: #9aa9a1; font-size: 9px; text-align: center; padding-top: 14px; }
.ranking-loading { color: #96a49c; font-size: 12px; padding: 26px 0; text-align: center; }

.footer { max-width: 1200px; margin: 0 auto; padding: 24px clamp(20px, 5vw, 68px) 34px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #8b9b93; font-size: 10px; }
.footer div { display: flex; gap: 20px; }
.footer a:hover { color: var(--green); }

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(8, 22, 18, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 50px;
}
.lightbox.hidden { display: none; }
.lightbox img { max-width: min(900px, 82vw); max-height: 80vh; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.lightbox-close { position: absolute; top: 22px; right: 28px; border: 0; background: transparent; color: #fff; font-size: 34px; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 42px; line-height: 1; cursor: pointer; }
.lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-nav.prev { left: 24px; }
.lightbox-nav.next { right: 24px; }
.lightbox-count { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); color: #d7e4dd; font-size: 12px; letter-spacing: 1px; }
.post-image { cursor: zoom-in; }

@media (max-width: 980px) {
  .nav { gap: 14px; }
  .layout { grid-template-columns: 1fr; }
  .ranking-column { position: static; }
}
@media (max-width: 700px) {
  .nav a:not(.nav-cta) { display: none; }
  .nav-cta { padding: 8px 12px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .feed-hint { display: none; }
  .post { flex-direction: column; }
  .post-images { flex: none; }
  .post-image { width: 100%; height: 190px; }
  .post-image.small { width: calc(50% - 3px); height: 110px; }
  .mobile-cta { flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}
