:root {
  --ink: #17211b;
  --muted: #68746c;
  --paper: #f4f7f2;
  --card: #fff;
  --green: #176b4a;
  --green2: #0f5138;
  --line: #dce5dd;
  --orange: #ff835c;
  --shadow: 0 18px 50px rgba(22, 55, 38, .09)
}

* {
  box-sizing: border-box
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif
}

button,
input,
select,
textarea {
  font: inherit
}

button {
  cursor: pointer
}

.hidden {
  display: none !important
}

.topbar {
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1180px)/2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 247, 242, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--green);
  color: white;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(23, 107, 74, .22)
}

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

.text-button,
.icon-button,
.switch-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 9px 12px
}

.icon-button {
  font-size: 20px;
  position: relative
}

.badge {
  position: absolute;
  right: 1px;
  top: 0;
  min-width: 18px;
  height: 18px;
  border-radius: 20px;
  background: #e94747;
  color: #fff;
  font: 700 11px/18px system-ui
}

.primary-button {
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  padding: 11px 18px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(23, 107, 74, .15)
}

.primary-button:hover {
  background: var(--green2)
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px
}

.intro {
  padding: 20px 4px 28px
}

.eyebrow,
.card-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--green)
}

h1 {
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.12;
  margin: 7px 0 12px;
  letter-spacing: -.04em
}

.intro>p:last-child {
  color: var(--muted);
  margin: 0
}

.filters {
  display: flex;
  gap: 9px;
  overflow: auto;
  padding: 2px 0 18px
}

.filter {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px
}

.filter.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink)
}

.post-list {
  display: grid;
  gap: 14px
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 18px rgba(24, 55, 38, .035);
  transition: .2s;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow)
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word
}

.type-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: #e9f4ed;
  color: var(--green);
  font-weight: 700
}

.post-card h2 {
  font-size: 21px;
  line-height: 1.35;
  margin: 12px 0 7px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word
}

.post-card p {
  color: #48534c;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word
}

.post-card img,
.post-card video,
.post-card table,
.side-card img,
.side-card table {
  max-width: 100% !important;
  height: auto !important;
  display: block
}

.post-card table,
.side-card table {
  display: block;
  overflow-x: auto;
  white-space: nowrap
}

.status-card,
.empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 18px
}

.load-more {
  display: block;
  margin: 20px auto;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 20px
}

.side-column {
  display: grid;
  align-content: start;
  gap: 16px;
  position: sticky;
  top: 96px;
  height: max-content
}

.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word
}

.side-card p,
.side-card li {
  color: #aebbb3;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word
}

.side-card:not(.notice-card) li {
  color: var(--muted)
}

.side-card ul {
  padding-left: 20px;
  margin-bottom: 0
}

.notice-card {
  background: var(--ink);
  color: white;
  border: 0;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word
}

.notice-card .card-kicker {
  color: #8ce0b8
}

.side-card h2 {
  font-size: 22px;
  line-height: 1.35
}

.dialog {
  width: min(440px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .25);
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word
}

.dialog::backdrop {
  background: rgba(8, 20, 13, .58);
  backdrop-filter: blur(3px)
}

.dialog-wide {
  width: min(700px, calc(100% - 28px))
}

.dialog-close {
  position: absolute;
  right: 18px;
  top: 14px;
  border: 0;
  background: transparent;
  font-size: 26px;
  color: var(--muted)
}

.dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px
}

.dialog-head h2 {
  margin: 0
}

.dialog label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  font-weight: 700;
  font-size: 14px
}

.dialog input,
.dialog select,
.dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfa;
  padding: 12px 14px;
  outline: 0
}

.dialog input:focus,
.dialog select:focus,
.dialog textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 107, 74, .1)
}

.wide {
  width: 100%;
  margin-top: 6px
}

.switch-button {
  color: var(--green);
  font-weight: 700
}

.check-label {
  display: flex !important;
  align-items: center
}

.check-label input {
  width: auto
}

.form-error {
  color: #c83535;
  min-height: 24px;
  font-size: 14px
}

.form-tip,
.reply-hint {
  font-size: 13px;
  color: var(--muted)
}

.detail-dialog {
  max-height: 88vh;
  overflow: auto
}

.detail-body {
  white-space: pre-wrap
}

.comments-section {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px
}

.comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--line)
}

.comment-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted)
}

.comment p {
  margin: 5px 0
}

.reply-button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 0
}

.notification {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 16px 4px
}

.notification.unread {
  font-weight: 700
}

.notification.unread:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #e94747;
  border-radius: 50%;
  margin-right: 8px
}

.notification small {
  display: block;
  color: var(--muted);
  font-weight: 400
}

.row-between {
  justify-content: space-between
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: white;
  border-radius: 12px;
  padding: 11px 18px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 30
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0)
}

/* ===== 平板适配 ===== */
@media(max-width:820px) {
  .layout {
    grid-template-columns: 1fr;
    padding-top: 22px
  }
  .side-column {
    position: static;
    grid-row: 1
  }
  .side-card:not(.notice-card) {
    display: none
  }
  .intro {
    padding-top: 8px
  }
  .user-name {
    display: none !important
  }
  .topbar {
    padding: 0 16px
  }
}

/* ===== 手机适配 ===== */
@media(max-width:600px) {
  .filters {
    flex-wrap: wrap;
    overflow: visible;
    gap: 6px
  }
  .filter {
    padding: 6px 12px;
    font-size: 13px
  }
}

@media(max-width:520px) {
  .topbar {
    height: 64px;
    padding: 0 14px
  }
  .brand>span:last-child {
    display: none
  }
  .top-actions {
    gap: 3px
  }
  .text-button {
    padding: 8px
  }
  .primary-button {
    padding: 10px 13px
  }
  .layout {
    padding-left: 14px;
    padding-right: 14px
  }
  .dialog {
    padding: 23px 18px
  }
  .post-card {
    padding: 18px
  }
}

/* ===== 极小屏适配 ===== */
@media(max-width:480px) {
  .layout {
    padding: 16px 12px 60px
  }
  .post-card {
    padding: 16px 14px;
    border-radius: 14px
  }
  .side-card {
    padding: 16px 14px
  }
  .dialog {
    padding: 20px 16px
  }
}



