* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: #f5f2ec;
  color: #322d28;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}
.page { max-width: 640px; margin: 0 auto; padding: 0 12px 44px; }

/* 顶部 */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px 14px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, #f3933f, #e04f2a); color: #fff;
  font-size: 23px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(224, 79, 42, .24);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-txt strong { font-size: 19px; letter-spacing: .5px; }
.brand-txt span { font-size: 12px; color: #9a8b7d; margin-top: 3px; }
.publish-top {
  border: 0; background: linear-gradient(135deg, #f3933f, #e0532a); color: #fff;
  font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 20px; min-height: 36px;
  box-shadow: 0 3px 10px rgba(224, 83, 42, .22);
}
.publish-top:active { opacity: .88; }

/* 警示 */
.warn {
  background: #fff5ec; border: 1px solid #f6d7bd; border-left: 4px solid #e2622c;
  border-radius: 10px; padding: 11px 13px; margin-bottom: 14px;
}
.warn-title { color: #c6471d; font-weight: 700; font-size: 14px; line-height: 1.5; }
.warn-ip { margin-top: 5px; font-size: 12.5px; color: #927460; word-break: break-all; }
.warn-ip span { color: #5b4b3d; font-weight: 600; }
.admin-panel {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #2f3b46; color: #ffe0c2; border-radius: 9px;
  padding: 9px 12px; font-size: 13px; margin-bottom: 14px;
}
.admin-panel-label { flex: 1; min-width: 110px; }
.admin-panel-btn {
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .1);
  color: #fff; border-radius: 7px; font-size: 12.5px; padding: 5px 11px; min-height: 30px;
}

/* 卡片 */
.card {
  background: #fff; border-radius: 14px; padding: 16px 15px 17px;
  box-shadow: 0 2px 14px rgba(90, 66, 42, .06); margin-bottom: 18px;
}
.card-h { font-size: 16px; margin: 0 0 11px; font-weight: 700; color: #322d28; }
.editor-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.editor-h h2 { font-size: 16px; margin: 0; font-weight: 700; }
.editor-close { border: 0; background: transparent; color: #a2927f; font-size: 13px; padding: 4px 2px; }
.publish-cta { text-align: center; padding: 10px 0 22px; }
.publish-cta-btn {
  width: 100%; max-width: 420px; height: 50px; border: 1px dashed #e6a271;
  background: #fff8f1; color: #d1592a; border-radius: 12px; font-size: 16px; font-weight: 700;
}
.publish-cta-btn:active { background: #fbe9d9; }
.publish-cta p { margin: 8px 0 0; font-size: 12px; color: #a99b89; }
textarea {
  width: 100%; border: 1px solid #ece5dc; background: #fbf9f6; border-radius: 10px;
  padding: 12px; font-size: 16px; line-height: 1.65; color: #322d28; resize: vertical;
  outline: none; font-family: inherit; min-height: 116px;
}
textarea:focus { border-color: #eaa678; background: #fff; }
textarea::placeholder { color: #b4a89b; }
.count { text-align: right; font-size: 12px; color: #a89b8c; margin: 5px 2px 10px; }

/* 图片上传 */
.uploads { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.thumb { position: relative; width: 76px; height: 76px; border-radius: 9px; overflow: hidden; background: #eee; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-del {
  position: absolute; top: 0; right: 0; width: 24px; height: 24px; border: 0;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 17px; line-height: 22px;
  border-radius: 0 0 0 9px; padding: 0;
}
.addpic {
  display: inline-flex; align-items: center; gap: 5px; border: 1px dashed #d9c9b7;
  background: #fdfaf6; color: #a8744a; border-radius: 9px; padding: 9px 14px;
  font-size: 14px; min-height: 42px;
}
.addpic .plus { font-size: 19px; line-height: 1; }
.addpic em { font-style: normal; color: #b6a595; font-size: 12px; }
.addpic:active { background: #f7efe5; }

/* 验证码 + 按钮 */
.captcha-row { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.captcha-row input {
  flex: 1; min-width: 0; height: 46px; border: 1px solid #ece5dc; background: #fbf9f6;
  border-radius: 9px; padding: 0 12px; font-size: 18px; outline: none;
  letter-spacing: 4px;
}
.captcha-row input:focus { border-color: #eaa678; background: #fff; }
.captcha-img { width: 124px; height: 46px; flex: none; border-radius: 8px; overflow: hidden; cursor: pointer; background: #f1f3f6; }
.captcha-img svg { display: block; width: 100%; height: 100%; }
.btn-primary {
  display: block; width: 100%; margin-top: 15px; height: 46px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #f0833c, #e0532a); color: #fff;
  font-size: 16px; font-weight: 700; letter-spacing: 2px;
}
.btn-primary:active { opacity: .88; }
.btn-primary:disabled { opacity: .6; }
.btn-ghost {
  height: 42px; padding: 0 18px; border: 1px solid #e2d8cc; background: #fff;
  color: #7d6f60; border-radius: 9px; font-size: 15px;
}

/* 列表 */
.feed { margin-top: 4px; }
.feed-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 10px; }
.feed-h strong { font-size: 16px; }
.feed-h span { font-size: 12px; color: #a2957f; }
.post {
  background: #fff; border-radius: 13px; padding: 14px 14px 15px; margin-bottom: 11px;
  box-shadow: 0 2px 12px rgba(90, 66, 42, .05);
}
.post-hd { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 34px; height: 34px; flex: none; border-radius: 50%; background: #f9e3d1;
  color: #d1592a; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.post-meta { flex: 1; min-width: 0; }
.post-name { font-size: 14px; font-weight: 700; color: #4a3b2e; line-height: 1.3; }
.post-time { font-size: 11.5px; color: #a99c8c; margin-top: 2px; }
.post-del {
  border: 1px solid #f0cdcd; background: #fff6f6; color: #c33b3b;
  border-radius: 7px; font-size: 12px; padding: 5px 11px; min-height: 30px;
}
.post-body {
  margin-top: 10px; font-size: 15px; line-height: 1.7; color: #322d28;
  white-space: pre-wrap; word-break: break-word;
}
.post-imgs { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.post-img {
  width: 84px; height: 84px; border-radius: 8px; object-fit: cover;
  background: #f0ece6; cursor: pointer; display: block;
}
.empty { text-align: center; color: #a2957f; font-size: 14px; padding: 36px 10px; }

.pager { display: flex; justify-content: center; align-items: center; gap: 7px; flex-wrap: wrap; margin: 16px 0 4px; }
.pg {
  min-width: 38px; height: 36px; padding: 0 9px; border: 1px solid #e6ddd1; background: #fff;
  color: #6d5f50; border-radius: 8px; font-size: 13px;
}
.pg.active { background: #e2622c; border-color: #e2622c; color: #fff; font-weight: 700; }
.pg:disabled { opacity: .42; }
.foot { text-align: center; color: #b1a495; font-size: 11.5px; line-height: 1.8; padding: 26px 0 8px; }

/* 大图 */
.lightbox {
  position: fixed; inset: 0; z-index: 90; background: rgba(16, 14, 12, .94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px;
}
.lightbox img { max-width: 100%; max-height: 72vh; object-fit: contain; border-radius: 4px; }
.lb-count { color: #fff; font-size: 13px; margin-bottom: 10px; opacity: .85; }
.lb-btns { display: flex; gap: 14px; margin-top: 16px; }
.lb-btns button {
  min-width: 92px; height: 38px; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .1); color: #fff; border-radius: 8px; font-size: 14px;
}
.lb-tip { color: rgba(255, 255, 255, .5); font-size: 12px; margin-top: 14px; }

/* 管理弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 95; background: rgba(30, 24, 18, .5);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-box { width: 100%; max-width: 340px; background: #fff; border-radius: 14px; padding: 20px; }
.modal-box h3 { margin: 0 0 7px; font-size: 17px; }
.modal-box p { margin: 0 0 14px; font-size: 13px; color: #948575; line-height: 1.6; }
.modal-box input {
  width: 100%; height: 44px; border: 1px solid #ece5dc; background: #fbf9f6;
  border-radius: 9px; padding: 0 12px; font-size: 16px; outline: none;
}
.modal-btns { display: flex; gap: 10px; margin-top: 16px; }
.modal-btns .btn-primary { margin: 0; flex: 1; height: 42px; }
.modal-btns .btn-ghost { flex: 1; }

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%) translateY(12px);
  z-index: 99; max-width: 82%; padding: 10px 16px; border-radius: 9px;
  background: rgba(44, 38, 32, .92); color: #fff; font-size: 14px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 641px) {
  .page { padding-left: 20px; padding-right: 20px; }
  .card { padding: 20px; }
}
