/* ============================================================
   樱语论坛 SakuraBBS · 樱花粉主题
   ============================================================ */
:root {
  --p50:  #fff3f8;
  --p100: #ffe3ef;
  --p200: #ffcfe3;
  --p300: #ffb0cf;
  --p400: #ff87b6;
  --p500: #ff5c9d;
  --p600: #ef3d84;
  --p700: #cb1f68;
  --ink:  #3f1d2c;
  --ink-2:#6d4055;
  --ink-3:#a3808f;
  --line: rgba(239,61,132,.12);
  --line-2: rgba(239,61,132,.22);
  --white:#fff;
  --sh-sm: 0 2px 10px rgba(203,31,104,.06);
  --sh-md: 0 12px 30px -16px rgba(203,31,104,.3);
  --sh-lg: 0 26px 60px -30px rgba(203,31,104,.45);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --grade: linear-gradient(135deg,#ff9ec6 0%,#ff5c9d 48%,#ef3d84 100%);
  --grade-soft: linear-gradient(135deg,#fff1f7,#ffe2ee);
  --ease: cubic-bezier(.22,.9,.32,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans SC",system-ui,-apple-system,sans-serif;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1000px 560px at 92% -6%, #ffe1ee 0%, rgba(255,225,238,0) 60%),
    radial-gradient(820px 460px at 2% 4%, #fff2f8 0%, rgba(255,242,248,0) 58%),
    linear-gradient(170deg,#fffafc 0%,#fff5fa 45%,#fdeaf3 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
a { color: var(--p600); text-decoration: none; }
a:hover { color: var(--p700); }
h1,h2,h3,h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.ico-sm { width: 15px; height: 15px; }

/* ============ 顶栏 ============ */
.topnav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,252,253,.86);
  backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 1px 0 rgba(239,61,132,.07), 0 14px 30px -28px rgba(203,31,104,.5);
}
.nav-inner {
  max-width: 1220px; margin: 0 auto; padding: 0 22px;
  height: 64px; display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: 0 0 auto; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 13px;
  background: var(--grade); display: grid; place-items: center;
  box-shadow: 0 10px 20px -12px rgba(239,61,132,.9), inset 0 1px 0 rgba(255,255,255,.45);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; letter-spacing: .08em; }
.brand-text small { font-size: 9px; letter-spacing: .2em; color: var(--ink-3); }

.nav-links { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.nav-links a, .side-head span, .board-mini-item > span, .hot-title { white-space: nowrap; }
.nav-links a {
  padding: 7px 12px; border-radius: 10px; font-size: 13.5px;
  color: var(--ink-2); font-weight: 500; transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--p50); color: var(--p700); }
.nav-links a.is-active { color: var(--p700); background: var(--p100); font-weight: 600; }

.nav-search {
  margin-left: auto; position: relative; width: 210px;
}
.nav-search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--p400); }
.nav-search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  border-radius: 11px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.9); font-family: inherit; font-size: 13px; color: var(--ink);
  transition: box-shadow .2s, border-color .2s;
}
.nav-search input:focus { outline: none; border-color: var(--p400); box-shadow: 0 0 0 4px rgba(255,135,182,.16); background: #fff; }

.nav-actions { display: flex; align-items: center; gap: 9px; }
.btn-post { box-shadow: 0 10px 22px -14px rgba(239,61,132,.95); }

.icon-btn {
  position: relative; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255,255,255,.9);
  color: var(--p600); cursor: pointer; transition: transform .18s var(--ease), box-shadow .2s;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); border-color: var(--p300); }
.icon-btn .dot, .icon-btn.has-dot .dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--p600); box-shadow: 0 0 0 2px #fff;
}

.user-menu { position: relative; }
.user-trigger {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 9px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.92);
  cursor: pointer; font-family: inherit; color: var(--ink);
}
.user-trigger-name { font-size: 12.5px; font-weight: 600; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-drop {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 188px; padding: 7px; border-radius: 15px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  display: none; z-index: 70;
}
.user-menu.is-open .user-drop { display: block; animation: drop .18s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.user-drop a, .user-drop button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 11px; border: none; background: none; border-radius: 10px;
  font-family: inherit; font-size: 13px; color: var(--ink-2); text-align: left; cursor: pointer;
}
.user-drop a .ico, .user-drop button .ico { width: 16px; height: 16px; color: var(--p500); }
.user-drop a:hover, .user-drop button:hover { background: var(--p50); color: var(--p700); }
.user-drop form { margin: 4px 0 0; border-top: 1px solid var(--line); padding-top: 4px; }

/* ============ 页面骨架 ============ */
.page-wrap { max-width: 1220px; margin: 0 auto; padding: 24px 22px 56px; }
.page-grid { display: grid; grid-template-columns: minmax(0,1fr) 296px; gap: 22px; align-items: start; }
.page-grid.is-wide { grid-template-columns: minmax(0,1fr); }
.page-main { min-width: 0; }
.page-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }

.side-card {
  background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.95);
  border-radius: var(--r); box-shadow: var(--sh-md); padding: 16px 17px;
}
.side-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
  letter-spacing: .04em; margin-bottom: 11px;
}
.side-head .ico { width: 15px; height: 15px; color: var(--p500); }
.side-more { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.side-more:hover { color: var(--p600); }

.ann-card { background: linear-gradient(160deg,#fff,#fff1f8 70%,#ffe6f1); }
.ann-item { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.ann-item:last-child { border-bottom: none; padding-bottom: 0; }
.ann-item strong { display: block; font-size: 12.8px; line-height: 1.5; }
.ann-item p { font-size: 11.8px; color: var(--ink-3); margin-top: 3px; line-height: 1.55; }

.board-mini { display: flex; flex-direction: column; }
.board-mini-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 2px; font-size: 13px; color: var(--ink-2);
  border-bottom: 1px dashed rgba(239,61,132,.09);
}
.board-mini-item:last-child { border-bottom: none; }
.board-mini-item:hover { color: var(--p700); }
.board-mini-item small { margin-left: auto; color: var(--ink-3); font-size: 11px; }
.board-dot { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 8px; }

.hot-list { display: flex; flex-direction: column; gap: 2px; }
.hot-item { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.8px; color: var(--ink-2); }
.hot-item:hover { color: var(--p700); }
.hot-rank {
  width: 18px; height: 18px; border-radius: 6px; flex: 0 0 18px;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700;
  background: var(--p50); color: var(--ink-3);
}
.hot-rank.is-top { background: var(--grade); color: #fff; }
.hot-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-item small { color: var(--ink-3); font-size: 10.5px; flex: 0 0 auto; }

.active-list { display: flex; flex-direction: column; gap: 8px; }
.active-item { display: flex; align-items: center; gap: 9px; }
.active-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.active-meta strong { font-size: 12.6px; }
.active-meta small { font-size: 10.5px; color: var(--ink-3); }

.side-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; text-align: center; }
.side-stats strong { display: block; font-size: 17px; color: var(--p700); }
.side-stats small { font-size: 10.5px; color: var(--ink-3); }

.site-foot { padding: 20px 22px 34px; color: var(--ink-3); font-size: 11.5px; }
.foot-inner { max-width: 1220px; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ============ 基础组件 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 11px; border: 1px solid transparent;
  background: var(--grade); color: #fff; font-family: inherit;
  font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .2s, filter .2s;
  box-shadow: 0 12px 24px -16px rgba(239,61,132,.95);
}
.btn:hover { transform: translateY(-1px); color: #fff; filter: saturate(1.05); }
.btn:active { transform: translateY(0) scale(.995); }
.btn .ico { width: 16px; height: 16px; }
.btn-ghost { background: rgba(255,255,255,.92); color: var(--p700); border-color: var(--line-2); box-shadow: none; }
.btn-ghost:hover { background: #fff; color: var(--p700); border-color: var(--p300); }
.btn-soft { background: var(--p100); color: var(--p700); box-shadow: none; }
.btn-soft:hover { background: var(--p200); color: var(--p700); }
.btn-danger { background: linear-gradient(135deg,#ff8f9f,#e8355f); }
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: 10px; }
.btn-xs { padding: 4px 10px; font-size: 11.5px; border-radius: 9px; }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.7; white-space: nowrap;
}
.badge-ok { background: #e8f9ef; color: #1a8f5a; }
.badge-warn { background: #fff4e0; color: #b57108; }
.badge-danger { background: #ffe9ee; color: #d51f4c; }
.badge-info { background: #eaf1ff; color: #3d6ed1; }
.badge-muted { background: #f3eef1; color: #8b7480; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--p100); color: var(--p700); font-size: 11.5px; font-weight: 600; }
.pill-soft { background: rgba(255,255,255,.8); color: var(--ink-2); border: 1px solid var(--line); }

.tag {
  display: inline-flex; align-items: center; padding: 2px 9px;
  border-radius: 7px; background: var(--p50); color: var(--p600);
  font-size: 11.5px; border: 1px solid rgba(255,197,220,.6);
}
.tag:hover { background: var(--p100); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  font-weight: 600; font-size: 13.5px; flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.avatar-rose   { background: linear-gradient(135deg,#ff9ec6,#f2427f); }
.avatar-pink   { background: linear-gradient(135deg,#ffb4d4,#ff5f9e); }
.avatar-plum   { background: linear-gradient(135deg,#e79bc0,#a63f6f); }
.avatar-coral  { background: linear-gradient(135deg,#ffb3a7,#f2647f); }
.avatar-lilac  { background: linear-gradient(135deg,#d5b4ff,#9a63d8); }
.avatar-blush  { background: linear-gradient(135deg,#ffc9d8,#f0749a); }
.avatar-sky    { background: linear-gradient(135deg,#a8d8ff,#4f95d8); }
.avatar-mint   { background: linear-gradient(135deg,#a8e6dd,#3aa79b); }
img.avatar { display: block; object-fit: cover; background: var(--p50); }
img.avatar:hover { filter: brightness(1.02); }

.avatar-editor { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.avatar-preview { flex: 0 0 auto; }
.avatar-form { flex: 1; min-width: 240px; }
.avatar-form .upload-drop { margin-bottom: 10px; }

.alert {
  padding: 11px 15px; border-radius: 12px; margin-bottom: 14px;
  background: var(--p50); border: 1px solid var(--p200); color: var(--p700);
  font-size: 13px; animation: slide-in .3s var(--ease);
}
.alert-ok { background: #eafaf1; border-color: #bfe9d2; color: #157f4f; }
.alert-warn { background: #fff7e8; border-color: #f6dfb4; color: #a76a05; }
.alert-error { background: #ffeef1; border-color: #ffc9d5; color: #c2184a; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.card {
  background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.95);
  border-radius: var(--r-lg); box-shadow: var(--sh-md); padding: 20px 22px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.card-head h2 { font-size: 15.5px; }
.card-head p { font-size: 12px; color: var(--ink-3); }
.card-head .spacer { flex: 1; }
.card-title-ico {
  width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px;
  background: var(--grade-soft); color: var(--p600);
  display: grid; place-items: center;
}
.card-title-ico .ico { width: 17px; height: 17px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.split { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 18px; }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 44px 18px; color: var(--ink-2); }
.empty-ico { width: 52px; height: 52px; border-radius: 17px; background: var(--grade-soft); color: var(--p500); display: grid; place-items: center; margin-bottom: 11px; }
.empty-ico .ico { width: 25px; height: 25px; }
.empty-state strong { font-size: 14.5px; }
.empty-state p { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; max-width: 320px; }
.empty-state .btn { margin-top: 14px; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.92);
  font-size: 12.5px; color: var(--ink-2);
}
.pager a:hover { border-color: var(--p300); color: var(--p700); }
.pager .is-current { background: var(--grade); color: #fff; border-color: transparent; font-weight: 600; }
.pager .is-disabled { opacity: .45; pointer-events: none; }

/* ============ 帖子卡片 ============ */
.feed-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.feed-tabs { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 13px; }
.feed-tabs a { padding: 6px 14px; border-radius: 9px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.feed-tabs a.is-active { background: #fff; color: var(--p700); box-shadow: var(--sh-sm); font-weight: 600; }
.feed-count { margin-left: auto; font-size: 12px; color: var(--ink-3); }

.post-card {
  display: flex; gap: 14px;
  background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.96);
  border-radius: var(--r); padding: 17px 18px;
  box-shadow: var(--sh-sm);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), border-color .2s;
  position: relative; overflow: hidden;
}
.post-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grade); opacity: 0; transition: opacity .2s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--p200); }
.post-card:hover::before { opacity: 1; }
.post-card + .post-card { margin-top: 10px; }
.post-card.is-pinned { background: linear-gradient(100deg,#fff,#fff5fa 70%); border-color: var(--p200); }

.post-avatar { flex: 0 0 auto; }
.post-main { flex: 1; min-width: 0; }
.post-board-line { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.post-board {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--p700);
  background: var(--p50); padding: 2px 9px; border-radius: 7px;
}
.post-board i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.post-title { font-size: 15.5px; font-weight: 650; line-height: 1.5; display: block; color: var(--ink); }
.post-title:hover { color: var(--p700); }
.post-excerpt { font-size: 12.8px; color: var(--ink-3); margin-top: 5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: 12px; margin-top: 9px; font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap; }
.post-meta strong { color: var(--ink-2); font-weight: 600; }
.post-stats { display: flex; align-items: center; gap: 13px; font-size: 11.8px; color: var(--ink-3); margin-top: 9px; }
.post-stats span { display: inline-flex; align-items: center; gap: 4px; }
.post-stats .ico { width: 14px; height: 14px; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ============ 帖子详情 ============ */
.detail-card { background: rgba(255,255,255,.96); border-radius: var(--r-lg); box-shadow: var(--sh-md); border: 1px solid rgba(255,255,255,.96); overflow: hidden; }
.detail-head { padding: 24px 26px 0; }
.detail-title { font-size: 23px; line-height: 1.45; letter-spacing: -.01em; }
.detail-sub { display: flex; align-items: center; gap: 11px; margin-top: 14px; flex-wrap: wrap; }
.detail-sub .who { display: flex; align-items: center; gap: 9px; }
.detail-sub .who strong { font-size: 13.5px; }
.detail-sub .who small { color: var(--ink-3); font-size: 11.5px; display: block; }
.detail-body { padding: 20px 26px 8px; font-size: 15.5px; line-height: 1.95; color: #40202f; }
.detail-body p { margin: 0 0 12px; }
.detail-foot { padding: 12px 26px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--line); margin-top: 8px; }

.action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 11px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink-2); font-family: inherit; font-size: 12.8px;
  cursor: pointer; transition: all .18s var(--ease);
}
.action-btn:hover { border-color: var(--p300); color: var(--p700); transform: translateY(-1px); }
.action-btn.is-on { background: var(--p100); border-color: var(--p300); color: var(--p700); font-weight: 600; }
.action-btn .ico { width: 15px; height: 15px; }

.author-box {
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  padding: 16px; border-radius: var(--r);
  background: linear-gradient(160deg,#fff,#fff4f9);
  border: 1px solid var(--p100);
}
.author-box .avatar { width: 46px; height: 46px; font-size: 18px; }
.author-box strong { font-size: 15px; }
.author-box .author-bio { font-size: 12.3px; color: var(--ink-3); margin-top: 3px; line-height: 1.6; }
.author-stats { display: flex; gap: 16px; margin-top: 9px; font-size: 11.5px; color: var(--ink-3); }
.author-stats b { color: var(--p700); font-size: 13px; display: block; }

.reply-head { display: flex; align-items: center; gap: 9px; margin: 22px 4px 12px; }
.reply-head h3 { font-size: 15px; }
.reply-head span { font-size: 12px; color: var(--ink-3); }
.reply-list { display: flex; flex-direction: column; gap: 10px; }
.reply-item {
  display: flex; gap: 12px; padding: 15px 17px;
  background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.96);
  border-radius: var(--r); box-shadow: var(--sh-sm);
}
.reply-item.is-op { background: linear-gradient(100deg,#fff,#fff6fa); border-color: var(--p200); }
.reply-main { flex: 1; min-width: 0; }
.reply-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reply-top strong { font-size: 13px; }
.reply-top small { font-size: 11px; color: var(--ink-3); }
.floor-badge { margin-left: auto; font-size: 11px; color: var(--ink-3); font-family: ui-monospace, monospace; }
.reply-body { font-size: 13.8px; line-height: 1.85; margin-top: 6px; color: #43212f; }
.reply-actions { display: flex; gap: 12px; margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }
.reply-actions button, .reply-actions a { background: none; border: none; padding: 0; font-family: inherit; font-size: 11.5px; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.reply-actions button:hover, .reply-actions a:hover { color: var(--p600); }
.reply-actions .ico { width: 13px; height: 13px; }

.editor-card { margin-top: 16px; padding: 18px 20px; background: rgba(255,255,255,.96); border-radius: var(--r-lg); box-shadow: var(--sh-md); border: 1px solid rgba(255,255,255,.96); }
.editor { width: 100%; min-height: 118px; border-radius: 13px; border: 1px solid var(--line-2); padding: 13px 15px; font-family: inherit; font-size: 13.8px; line-height: 1.8; color: var(--ink); background: #fff; resize: vertical; transition: box-shadow .2s, border-color .2s; }
.editor:focus { outline: none; border-color: var(--p400); box-shadow: 0 0 0 4px rgba(255,135,182,.16); }
.editor-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.editor-bar .hint { font-size: 11.5px; color: var(--ink-3); }

/* ============ 表单 ============ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--ink-3); }
.form-grid { display: grid; gap: 15px; }
.form-grid.cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
input[type=text], input[type=password], input[type=search], input[type=email], input[type=number],
input[type=tel], select, textarea {
  width: 100%; padding: 10px 13px; border-radius: 11px;
  border: 1px solid var(--line-2); background: #fff;
  font-family: inherit; font-size: 13.5px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: #cba9b9; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--p400); box-shadow: 0 0 0 4px rgba(255,135,182,.16); }
textarea { line-height: 1.75; resize: vertical; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d35a8d' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 12.8px; color: var(--ink-2); }
input[type=checkbox] { accent-color: var(--p500); width: 15px; height: 15px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.search-box { position: relative; min-width: 190px; }
.search-box .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--p400); }
.search-box input { padding-left: 33px; }

/* ============ 表格（后台） ============ */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 600px; }
table.data th { text-align: left; padding: 9px 11px; font-size: 11.5px; letter-spacing: .05em; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px 11px; border-bottom: 1px solid rgba(239,61,132,.07); vertical-align: middle; }
table.data tbody tr:hover { background: rgba(255,244,249,.85); }
table.data tbody tr:last-child td { border-bottom: none; }
.td-strong { font-weight: 600; }
.td-muted { color: var(--ink-3); font-size: 12px; }
.td-actions { text-align: right; white-space: nowrap; }
.td-actions form { display: inline; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; }
.user-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-cell .avatar { width: 30px; height: 30px; font-size: 12px; }
.user-cell strong { display: block; font-size: 12.8px; }
.user-cell small { color: var(--ink-3); font-size: 10.8px; }

.dl { display: grid; grid-template-columns: 92px 1fr; gap: 9px 14px; font-size: 12.8px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: linear-gradient(180deg,var(--p300),rgba(255,176,207,0)); }
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item::before { content: ""; position: absolute; left: -19px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--p400); }
.tl-item.is-done::before { background: var(--p500); }
.tl-title { font-size: 12.8px; font-weight: 600; }
.tl-meta { font-size: 11.5px; color: var(--ink-3); }

.progress { height: 7px; border-radius: 999px; background: var(--p100); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--grade); }

/* ============ 后台 ============ */
.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  width: 244px; flex: 0 0 244px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 22px 14px 16px;
  background: rgba(255,255,255,.72);
  border-right: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 1px 0 0 rgba(239,61,132,.06);
  z-index: 40;
}
.sidebar .brand { padding: 4px 8px 18px; }
.nav { flex: 1; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 0; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 3px; border-radius: 12px;
  color: var(--ink-2); font-weight: 500; font-size: 13.2px;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav-item .ico { color: var(--p500); opacity: .85; width: 18px; height: 18px; }
.nav-item:hover { background: rgba(255,255,255,.9); color: var(--p700); transform: translateX(2px); }
.nav-item.is-active { background: var(--grade); color: #fff; font-weight: 600; box-shadow: 0 12px 22px -14px rgba(239,61,132,.95); }
.nav-item.is-active .ico { color: #fff; opacity: 1; }
.nav-count {
  margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--p600); color: #fff; display: inline-grid; place-items: center;
}
.nav-item.is-active .nav-count { background: rgba(255,255,255,.28); }
.sidebar-foot { margin-top: 12px; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 15px 30px;
  background: linear-gradient(180deg,rgba(255,250,252,.95),rgba(255,250,252,.7));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.85);
}
.topbar-title h1 { font-size: 19px; }
.topbar-title p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 5px; border-radius: 999px; background: rgba(255,255,255,.92); border: 1px solid var(--line); }
.user-chip-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip-meta strong { font-size: 12.5px; }
.user-chip-meta small { font-size: 10px; color: var(--ink-3); }
.content { flex: 1; padding: 22px 30px 36px; width: 100%; max-width: 1380px; margin: 0 auto; }
.page-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 30px 22px; font-size: 11.5px; color: var(--ink-3); max-width: 1380px; width: 100%; margin: 0 auto; }
.sidebar-toggle, .sidebar-mask { display: none; }

.stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.95);
  box-shadow: var(--sh-md);
}
.stat-ico { width: 44px; height: 44px; border-radius: 14px; flex: 0 0 44px; display: grid; place-items: center; background: var(--grade-soft); color: var(--p600); }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 11.5px; color: var(--ink-3); }
.stat-value { font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.stat-hint { font-size: 11px; color: var(--ink-3); }
.tone-plum .stat-ico { background: linear-gradient(135deg,#f6e8f0,#e9cfe0); color: #a03d70; }
.tone-ok .stat-ico { background: #eafaf1; color: #1a8f5a; }
.tone-warn .stat-ico { background: #fff6e6; color: #b57108; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 8px 2px 0; }
.bar-slot { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.bar-stack { width: 100%; max-width: 26px; height: 100%; display: flex; align-items: flex-end; }
.bar { display: block; width: 100%; border-radius: 6px 6px 3px 3px; min-height: 3px; transition: height .5s var(--ease), filter .2s; }
.bar-down { background: linear-gradient(180deg,#ff9dc6,#f2467f); }
.bar-slot:hover .bar-down { filter: brightness(1.06); }
.bar-label { font-size: 9.5px; color: var(--ink-3); white-space: nowrap; }

/* ============ 首页 hero ============ */
.hero {
  position: relative; overflow: hidden;
  padding: 30px 32px; border-radius: 26px;
  background: var(--grade); color: #fff;
  box-shadow: 0 28px 56px -30px rgba(239,61,132,.8);
  margin-bottom: 20px;
}
.hero::before { content: ""; position: absolute; width: 320px; height: 320px; right: -80px; top: -140px; border-radius: 50%; background: radial-gradient(circle,rgba(255,255,255,.32),rgba(255,255,255,0) 68%); }
.hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: 120px; bottom: -150px; border-radius: 50%; background: radial-gradient(circle,rgba(255,255,255,.18),rgba(255,255,255,0) 68%); }
.hero-inner { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 30px; line-height: 1.35; letter-spacing: -.02em; }
.hero p { font-size: 13.5px; opacity: .9; margin-top: 9px; max-width: 440px; line-height: 1.8; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-soft { background: rgba(255,255,255,.94); color: var(--p700); }
.hero .btn-ghost { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.26); color: #fff; }
.hero-stats { display: flex; gap: 28px; margin-top: 22px; position: relative; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 21px; font-weight: 700; }
.hero-stats small { font-size: 11px; opacity: .82; letter-spacing: .05em; }

/* 板块宫格 */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(232px,1fr)); gap: 12px; }
.board-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 15px; border-radius: var(--r);
  background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.96);
  box-shadow: var(--sh-sm); color: var(--ink);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease);
}
.board-tile:hover { transform: translateY(-2px); box-shadow: var(--sh-md); color: var(--ink); }
.board-tile-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 38px; color: #fff; }
.board-tile-meta { min-width: 0; flex: 1; }
.board-tile-meta strong { display: block; font-size: 13.8px; }
.board-tile-meta small { font-size: 11.2px; color: var(--ink-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-tile-count { font-size: 11px; color: var(--ink-3); flex: 0 0 auto; }

/* 发帖页 */
.compose { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 18px; align-items: start; }
.compose-side { display: flex; flex-direction: column; gap: 14px; }
.tips-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.tips-list li { display: flex; gap: 8px; font-size: 12.3px; color: var(--ink-2); line-height: 1.6; }
.tips-list .dot-i { width: 16px; height: 16px; border-radius: 50%; background: var(--p100); color: var(--p600); display: grid; place-items: center; font-size: 9px; flex: 0 0 16px; margin-top: 2px; }

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .page-grid { grid-template-columns: minmax(0,1fr); }
  .page-side { position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .nav-search { width: 160px; }
  .nav-links a:nth-child(n+4) { display: none; }
  .compose { grid-template-columns: minmax(0,1fr); }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .nav-inner { height: 58px; padding: 0 14px; gap: 10px; }
  .nav-links, .nav-search { display: none; }
  .brand-text small { display: none; }
  .nav-actions { margin-left: auto; }
  .btn-post { padding: 6px 11px; }
  .page-wrap { padding: 16px 14px 40px; }
  .page-side { grid-template-columns: minmax(0,1fr); }
  .page-side .side-card:nth-child(n+4) { display: none; }
  .hero { padding: 22px 20px; border-radius: 20px; }
  .hero h1 { font-size: 23px; }
  .post-card { padding: 14px; gap: 10px; }
  .post-card .post-avatar { display: none; }
  .detail-head, .detail-body, .detail-foot { padding-left: 16px; padding-right: 16px; }
  .detail-title { font-size: 19px; }
  .detail-body { font-size: 14.8px; }
  .grid-2, .grid-3, .grid-4, .form-grid.cols-2, .split { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-104%); transition: transform .3s var(--ease); width: 256px; flex-basis: 256px; background: rgba(255,252,253,.99); box-shadow: 26px 0 60px -30px rgba(203,31,104,.55); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-mask { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(63,29,44,.34); backdrop-filter: blur(2px); }
  .sidebar-toggle { display: grid; }
  .sidebar-toggle span { display: block; width: 16px; height: 1.8px; border-radius: 2px; background: currentColor; margin: 2.2px 0; }
  .topbar { padding: 12px 14px; }
  .topbar-title h1 { font-size: 16.5px; }
  .topbar-title p { display: none; }
  .user-chip-meta { display: none; }
  .content { padding: 16px 14px 28px; }
  .page-foot { padding: 12px 14px 20px; }
  .card { padding: 16px 14px; border-radius: 18px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
}

/* ============ 评论组件 ============ */
.reply-quote {
  margin-top: 7px; padding: 6px 10px;
  font-size: 12px; color: var(--ink-3);
  background: var(--p50); border-left: 3px solid var(--p200);
  border-radius: 8px;
}
.reply-quote b { color: var(--p600); font-weight: 600; }

.reply-like, .reply-reply {
  display: inline-flex; align-items: center; gap: 4px;
  border: none; background: none; padding: 0;
  font-family: inherit; font-size: 11.5px; color: var(--ink-3);
  cursor: pointer; transition: color .18s;
}
.reply-like:hover, .reply-reply:hover { color: var(--p600); }
.reply-like .ico, .reply-reply .ico { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.reply-like.is-on { color: var(--p600); font-weight: 600; }
.reply-like.is-on .ico { fill: rgba(255,92,157,.18); }
.reply-like.just-liked .ico { animation: like-pop .34s var(--ease); }
@keyframes like-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4) rotate(-8deg); }
  100% { transform: scale(1); }
}
.like-count { font-variant-numeric: tabular-nums; }

.reply-del { display: inline; margin: 0; }
.reply-del-btn {
  border: none; background: none; padding: 0;
  font-family: inherit; font-size: 11.5px; color: var(--ink-3);
  cursor: pointer; transition: color .18s;
}
.reply-del-btn:hover { color: #d51f4c; }

.reply-to-tip {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 11px; margin-bottom: 9px;
  font-size: 12px; color: var(--p700);
  background: var(--p50); border: 1px dashed var(--p200); border-radius: 9px;
}
.reply-to-tip button {
  margin-left: auto; border: none; background: none;
  color: var(--ink-3); font-family: inherit; font-size: 11.5px; cursor: pointer;
}
.reply-to-tip button:hover { color: var(--p700); }

/* ============ 平板 ============ */
@media (min-width: 769px) and (max-width: 1024px) {
  .page-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .page-side { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; position: static; }
  .nav-links a { padding: 6px 9px; font-size: 12.8px; white-space: nowrap; }
  .nav-search { width: 148px; }
  .user-trigger-name { display: none; }
  .compose { grid-template-columns: minmax(0,1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero { padding: 26px 24px; }
  .hero h1 { font-size: 26px; }
}

/* ============ 手机 ============ */
@media (max-width: 640px) {
  .page-wrap { padding: 14px 12px 36px; }
  .nav-inner { padding: 0 12px; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .brand-text strong { font-size: 15.5px; letter-spacing: .04em; }
  .brand-text small { display: none; }
  .icon-btn { width: 34px; height: 34px; }
  .btn-post { padding: 6px 10px; font-size: 12.5px; }

  .hero { padding: 20px 18px; border-radius: 20px; }
  .hero h1 { font-size: 21px; }
  .hero p { font-size: 12.6px; }
  .hero-stats { gap: 16px; margin-top: 16px; }
  .hero-stats strong { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  .board-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .board-tile { padding: 12px 13px; }

  .post-card { padding: 13px; border-radius: 14px; }
  .post-title { font-size: 14.8px; }
  .post-excerpt { font-size: 12.4px; -webkit-line-clamp: 2; }
  .post-meta { gap: 8px; font-size: 11px; }
  .post-stats { gap: 10px; }

  .detail-head { padding: 18px 14px 0; }
  .detail-title { font-size: 18.5px; line-height: 1.45; }
  .detail-body { padding: 14px 14px 6px; font-size: 14.6px; line-height: 1.9; }
  .detail-foot { padding: 12px 14px 16px; gap: 8px; }
  .detail-foot .action-btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .detail-foot > span:last-child { flex: 1 0 100%; text-align: right; }

  .reply-head { margin: 18px 2px 10px; }
  .reply-head h3 { font-size: 14.5px; }
  .reply-item { padding: 12px; gap: 9px; border-radius: 14px; }
  .reply-item .avatar { width: 30px; height: 30px; font-size: 12px; }
  .reply-body { font-size: 13.6px; }
  .reply-actions { gap: 14px; }

  .editor-card { padding: 14px; border-radius: 16px; }
  .editor { min-height: 96px; font-size: 16px; }
  .editor-bar .hint { font-size: 11px; }
  .editor-bar .btn { flex: 1 1 auto; justify-content: center; }

  .card { padding: 15px 13px; border-radius: 16px; }
  .card-head h2 { font-size: 14.5px; }
  .grid-2, .grid-3, .grid-4, .form-grid.cols-2, .split, .compose { grid-template-columns: minmax(0,1fr); }
  .grid-4 { gap: 10px; }

  .page-side { gap: 12px; }
  .side-card { padding: 14px; }

  .pager a, .pager span { min-width: 32px; height: 32px; font-size: 12px; }

  /* 触控友好 */
  .action-btn { min-height: 38px; }
  .reply-like, .reply-reply, .reply-del-btn { min-height: 30px; }
  .feed-tabs a { padding: 7px 12px; }

  /* 输入框 16px：避免 iOS 聚焦自动放大 */
  input[type=text], input[type=password], input[type=search], input[type=email],
  input[type=number], input[type=tel], select, textarea { font-size: 16px; }
}

@media (max-width: 520px) {
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 10px; }
  .hero h1 { font-size: 19px; }
  .detail-title { font-size: 17.5px; }
  .grid-3, .grid-4 { grid-template-columns: minmax(0,1fr); }
  .detail-foot .action-btn { flex: 1 1 100%; }
  .hero { padding: 18px 15px; }
  .hero-stats strong { font-size: 16px; }
  .hero-stats small { font-size: 10.5px; }
}

/* 表格可横向滚动时的视觉提示 */
.table-wrap.is-scrollable {
  background-image: linear-gradient(to right, rgba(255,255,255,0), #fff 92%);
  background-repeat: no-repeat;
  background-size: 28px 100%;
  background-position: right;
}

/* 安全区（刘海屏 / 手势条） */
@supports (padding: env(safe-area-inset-bottom)) {
  body.site { padding-bottom: env(safe-area-inset-bottom); }
  .site-foot { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ============ 图片上传与展示 ============ */
.upload-drop {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border: 1.5px dashed var(--p200); border-radius: 14px;
  background: var(--p50); cursor: pointer; transition: border-color .2s, background .2s;
}
.upload-drop:hover { border-color: var(--p400); background: #fff2f8; }
.upload-drop input[type=file] { display: none; }
.upload-ico {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px;
  background: #fff; display: grid; place-items: center; color: var(--p600);
  box-shadow: var(--sh-sm);
}
.upload-ico .ico { width: 18px; height: 18px; }
.upload-text b { display: block; font-size: 13px; color: var(--p700); font-weight: 600; }
.upload-text small { font-size: 11.5px; color: var(--ink-3); }

.upload-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.upload-preview:empty { display: none; }
.upload-preview-item { width: 86px; text-align: center; font-size: 10.5px; color: var(--ink-3); }
.upload-preview-item img {
  width: 86px; height: 86px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); display: block; margin-bottom: 3px;
}
.upload-preview-item { position: relative; cursor: grab; }
.upload-preview-item.dragging { opacity: .45; }
.upload-preview-item:active { cursor: grabbing; }
.preview-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: #f2427f; color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0;
  box-shadow: 0 4px 10px -4px rgba(242,66,127,.9);
}
.preview-cap { display: block; font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.preview-note { width: 100%; font-size: 11px; color: var(--p700); margin-top: 2px; }
.preview-warn { width: 100%; font-size: 11px; color: #b57108; margin-top: 2px; }
.upload-drop.is-drag { border-color: var(--p500); background: #ffeef6; }

.post-gallery { display: grid; gap: 6px; margin-top: 10px; }
.post-gallery.count-1 { grid-template-columns: minmax(0,1fr); max-width: 520px; }
.post-gallery.count-2 { grid-template-columns: repeat(2, minmax(0,1fr)); max-width: 620px; }
.post-gallery.count-3, .post-gallery.count-4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.gallery-item { display: block; border-radius: 12px; overflow: hidden; background: var(--p50); }
.gallery-item img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  aspect-ratio: 4 / 3; transition: transform .35s var(--ease);
}
.gallery-item:hover img { transform: scale(1.03); }
.post-gallery.is-small { max-width: 300px; gap: 5px; margin-top: 8px; }
.post-gallery.is-small .gallery-item img { aspect-ratio: 1 / 1; }

.detail-gallery { padding: 0 26px 12px; }

.post-thumb {
  position: relative; flex: 0 0 auto; width: 88px; height: 88px;
  border-radius: 12px; overflow: hidden; margin-left: 10px; align-self: flex-start;
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb-count {
  position: absolute; right: 4px; bottom: 4px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 10px;
  padding: 1px 6px; border-radius: 6px;
}

.image-manage { display: flex; gap: 8px; flex-wrap: wrap; }
.image-manage-item { width: 92px; cursor: pointer; }
.image-manage-item img {
  width: 92px; height: 92px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); display: block;
}
.image-manage-item span {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink-3); margin-top: 4px;
}
.image-manage-item input[type=checkbox] { accent-color: #d51f4c; width: 13px; height: 13px; }

.reply-upload { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.upload-mini {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 10px;
  border: 1px dashed var(--p200); background: var(--p50);
  color: var(--p700); font-size: 12.5px; cursor: pointer; font-weight: 500;
}
.upload-mini .ico { width: 15px; height: 15px; }
.upload-mini input[type=file] { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(40,15,28,.86);
  backdrop-filter: blur(4px); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 96vw; max-height: 92vh; border-radius: 12px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}

@media (max-width: 640px) {
  .post-thumb { width: 62px; height: 62px; border-radius: 10px; margin-left: 8px; }
  .post-gallery.count-3, .post-gallery.count-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-gallery { padding: 0 14px 10px; }
  .upload-preview-item, .upload-preview-item img { width: 70px; }
  .upload-preview-item img { height: 70px; }
  .image-manage-item, .image-manage-item img { width: 76px; }
  .image-manage-item img { height: 76px; }
  .upload-drop { padding: 11px 12px; }
  .upload-text small { display: block; line-height: 1.5; }
}

