/* post.css — 帖子详情页样式 */
body.post-page { background: #FAF7F1; }

.post-detail-app {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 5vw 80px;
}

.post-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  margin-bottom: 24px;
}

.post-detail-back {
  font-size: 13px;
  opacity: .7;
  text-decoration: none;
  color: #2C2620;
  letter-spacing: .05em;
}
.post-detail-back:hover { opacity: 1; }

.post-detail-title {
  font-family: var(--f-serif-cn, serif);
  font-size: 18px;
  letter-spacing: .25em;
  color: #2C2620;
}

.post-detail-loading,
.post-detail-empty {
  text-align: center;
  padding: 80px 20px;
  font-family: var(--f-serif-cn, serif);
  color: #9C9388;
  font-size: 14px;
  line-height: 2;
}
.post-detail-empty em {
  display: block;
  font-style: italic;
  font-size: 12.5px;
  color: #9C9388;
  margin-top: 8px;
  opacity: .7;
}

.post-detail-card {
  background: #FFF;
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 4px;
  padding: 28px 28px 22px;
  margin-bottom: 28px;
}

.post-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.post-detail-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.post-detail-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.post-detail-avatar svg {
  width: 44px;
  height: 44px;
}

.post-detail-author {
  flex: 1;
  min-width: 0;
}
.post-detail-name {
  font-size: 15px;
  color: #2C2620;
  font-weight: 500;
  margin-bottom: 2px;
}
.post-detail-time {
  font-size: 11.5px;
  color: #9C9388;
  letter-spacing: .04em;
}

.post-detail-cat {
  display: inline-block;
  padding: 2px 10px;
  font-family: var(--f-serif-cn, serif);
  font-size: 11px;
  letter-spacing: .15em;
  color: #7A7265;
  background: rgba(168, 137, 92, .12);
  border-radius: 3px;
}

.post-detail-loc {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: #9C9388;
  letter-spacing: .04em;
}
.post-detail-loc::before {
  content: "⛰ ";
  margin-right: 4px;
}

.post-detail-content {
  font-size: 16px;
  line-height: 2;
  color: #2C2620;
  margin: 18px 0 22px;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.post-detail-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11.5px;
  color: #7A7265;
  background: transparent;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 12px;
  text-decoration: none;
  letter-spacing: .04em;
  transition: all .15s;
}
.post-detail-tag:hover {
  color: #2C2620;
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.2);
}

.post-detail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px dotted rgba(0,0,0,.1);
  font-size: 12.5px;
  color: #7A7265;
  flex-wrap: wrap;
}

.post-detail-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #7A7265;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.post-detail-act:hover {
  color: #2C2620;
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.08);
}
.post-detail-act.on {
  color: #A8201A;
  border-color: rgba(168, 32, 26, .3);
  background: rgba(168, 32, 26, .04);
}
.post-detail-act.act-del {
  margin-left: auto;
  color: #A8201A;
}

.post-detail-act .ico {
  font-size: 14px;
}

/* 评论区 */
.post-detail-comments-head {
  font-family: var(--f-serif-cn, serif);
  font-size: 14px;
  letter-spacing: .2em;
  color: #2C2620;
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.post-detail-comments-head em {
  font-style: normal;
  color: #9C9388;
  font-size: 12px;
  margin-left: 6px;
  letter-spacing: .08em;
}

.post-detail-comment {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px dotted rgba(0,0,0,.08);
}
.post-detail-comment:last-child { border-bottom: 0; }

.post-comment-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.post-comment-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.post-comment-avatar svg {
  width: 32px;
  height: 32px;
}

.post-comment-body { flex: 1; min-width: 0; }
.post-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12.5px;
}
.post-comment-name {
  color: #2C2620;
  font-weight: 500;
}
.post-comment-time {
  color: #9C9388;
  font-size: 11.5px;
}
.post-comment-del {
  margin-left: auto;
  font-size: 11.5px;
  color: #9C9388;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0 4px;
}
.post-comment-del:hover { color: #A8201A; }

.post-comment-content {
  font-size: 14px;
  line-height: 1.85;
  color: #2C2620;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 写评论 */
.post-detail-write {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,.06);
}
.post-detail-write textarea {
  flex: 1;
  min-height: 44px;
  max-height: 160px;
  padding: 10px 12px;
  font-family: var(--f-serif-cn, serif);
  font-size: 14px;
  line-height: 1.7;
  color: #2C2620;
  background: #FFF;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 3px;
  resize: vertical;
}
.post-detail-write textarea:focus {
  outline: none;
  border-color: #2C2620;
}
.post-detail-write button {
  align-self: flex-end;
  padding: 10px 22px;
  background: #2C2620;
  color: #F8F6F2;
  font-family: var(--f-serif-cn, serif);
  font-size: 13px;
  letter-spacing: .15em;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.post-detail-write button:hover { background: #A8201A; }
.post-detail-write button:disabled { background: #9C9388; cursor: not-allowed; }

/* 礼物弹窗 */
.gift-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.gift-modal-inner {
  background: #FAF7F1;
  border-radius: 4px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  font-family: var(--f-serif-cn, serif);
}
.gift-modal-title {
  font-size: 18px;
  letter-spacing: .15em;
  margin: 0 0 18px;
  text-align: center;
  color: #2C2620;
}
.gift-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.gift-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 4px;
  background: #FFF;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 3px;
  cursor: pointer;
  transition: all .15s;
}
.gift-option:hover {
  border-color: #A8201A;
  background: #FFF5F3;
}
.gift-option-emoji { font-size: 28px; line-height: 1; }
.gift-option-name { font-size: 13px; color: #2C2620; letter-spacing: .1em; }
.gift-option-coin { font-size: 11px; color: #9C9388; }
.gift-modal-close {
  display: block;
  margin: 0 auto;
  padding: 8px 32px;
  background: transparent;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 3px;
  cursor: pointer;
  color: #2C2620;
  font-size: 12.5px;
}
.gift-modal-close:hover { background: rgba(0,0,0,.04); }

.post-detail-foot {
  text-align: center;
  margin-top: 60px;
  font-size: 12px;
  color: #9C9388;
  letter-spacing: .08em;
}
.post-detail-foot a {
  color: #6E665C;
  margin: 0 4px;
  text-decoration: none;
}
.post-detail-foot a:hover { color: #A8201A; }

/* 暗黑模式 */
[data-theme="dark"] body.post-page { background: #1A1816; }
[data-theme="dark"] .post-detail-card { background: #2A2620; border-color: rgba(255,255,255,.06); }
[data-theme="dark"] .post-detail-title,
[data-theme="dark"] .post-detail-name,
[data-theme="dark"] .post-detail-content,
[data-theme="dark"] .post-detail-comments-head,
[data-theme="dark"] .post-comment-name,
[data-theme="dark"] .post-comment-content { color: #F0EBE3; }
[data-theme="dark"] .post-detail-write textarea { background: #2A2620; color: #F0EBE3; border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .post-detail-act,
[data-theme="dark"] .post-detail-act:hover { color: #C5BFB6; }
[data-theme="dark"] .gift-modal-inner { background: #2A2620; }
[data-theme="dark"] .gift-option { background: #1A1816; border-color: rgba(255,255,255,.06); }
[data-theme="dark"] .gift-option:hover { background: #3A2624; }
[data-theme="dark"] .gift-option-name { color: #F0EBE3; }

/* 移动端 */
@media (max-width: 768px) {
  .post-detail-app { padding: 0 4vw 60px; }
  .post-detail-card { padding: 20px 16px 18px; }
  .post-detail-content { font-size: 15px; }
  .post-detail-write { flex-direction: column; }
  .post-detail-write button { align-self: stretch; }
  .gift-options { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .gift-option { padding: 10px 2px; }
  .gift-option-emoji { font-size: 24px; }
}