.post-images {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.post-images img {
  width: 92px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 8px;
  cursor: zoom-in;
  object-fit: cover;
}

.post {
  display: block;
  padding: 17px;
}

.post-content {
  min-width: 0;
}

.post-content > p,
.dialog-post #detailBody {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.post h3 {
  margin-top: 0;
  font-size: 15px;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

.post-author {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.post .avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  font-size: 12px;
}

.post-author-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.post-author-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: #111416;
  font-size: 11px;
  font-weight: 600;
}

.post-ip-location {
  margin-left: 4px;
  color: var(--muted);
  font-size: .92em;
  font-weight: 400;
  white-space: nowrap;
}

.post-author-time {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .post-author-name {
  color: #f7fafb;
}

.post .stats {
  grid-column: auto;
  flex: 0 0 auto;
  padding-top: 0;
}

.modal-top-actions {
  justify-content: flex-end;
  margin-bottom: 8px;
}

#detail .modal-box {
  display: flex;
  width: min(100%, 800px);
  height: min(90vh, 780px);
  max-height: calc(100dvh - 40px);
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

#detail .modal-top {
  flex: 0 0 auto;
  margin-bottom: 0;
  padding: 18px 22px 8px;
}

.detail-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 26px 18px;
  scrollbar-color: var(--blue) transparent;
  scrollbar-width: thin;
}

.detail-scroll::-webkit-scrollbar {
  width: 10px;
}

.detail-scroll::-webkit-scrollbar-track {
  margin: 8px 0;
  background: transparent;
}

.detail-scroll::-webkit-scrollbar-thumb {
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--blue);
  background-clip: padding-box;
}

.detail-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--blue-dark);
  background-clip: padding-box;
}

#detail .reply-form {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 26px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -10px 24px rgba(41, 53, 61, .06);
}

#postUploadStatus.error {
  background: #f3e9e5;
  color: #885d50;
}

#postImages {
  padding: 8px;
}

.field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.profile-avatar-link {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
}

.profile-avatar-link:hover {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.profile-avatar-link img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.reply-with-profile {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

#replyList > .reply-thread > .reply-descendants {
  margin-left: 36px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

#replyList > .reply-thread > .reply-descendants:empty {
  display: none;
}

.reply-content {
  min-width: 0;
  flex: 1;
}

.reply-author-line {
  color: #111416;
  line-height: 1.45;
}

.reply-author-line strong {
  color: inherit;
}

.reply-body {
  margin-top: 4px;
  color: #111416;
  font-size: 15.6px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

html[data-theme="dark"] .reply-author-line,
html[data-theme="dark"] .reply-body {
  color: #f7fafb;
}

.reply-addressed {
  color: var(--blue-dark);
  font-weight: 500;
}

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

.reply-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 11px;
}

.reply-with-icon { display: inline-flex; align-items: center; gap: 4px; }
.reply-with-icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.expand-replies { display: block; margin: 5px 0 8px 36px; border: 0; background: transparent; color: var(--blue-dark); padding: 2px 0; font-size: 11px; font-weight: 600; }
.expand-replies::before { content: ''; display: inline-block; width: 22px; margin-right: 7px; border-top: 1px solid currentColor; vertical-align: middle; opacity: .55; }

.reply-action:hover {
  color: var(--blue-dark);
}

.reply-delete-action {
  margin-left: auto;
}

.reply-target-indicator {
  grid-column: 1 / -1;
  color: var(--blue-dark);
  font-size: 11px;
}

.reply-target-indicator button {
  margin-left: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.post-reply-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
}

.stats {
  align-items: center;
}

.post-reply-count svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reply-avatar {
  width: 28px;
  height: 28px;
  overflow: hidden;
  flex: 0 0 28px;
  border-radius: 9px;
  font-size: 11px;
}

.reply-profile-name {
  color: inherit;
  text-decoration: none;
}

.reply-profile-name:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

#detail .dialog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-author {
  color: #111416;
  font-weight: 600;
}

.detail-time,
#detail .post-ip-location {
  color: var(--muted);
  font-weight: 400;
}

.detail-post-like {
  display: inline-flex;
  margin-left: 3px;
}

html[data-theme="dark"] .detail-author {
  color: #f7fafb;
}

@media (min-width: 761px) {
  body[data-community-section="forum"] .post,
  body[data-community-section="forum"] .post-content {
    min-width: 0;
    max-width: 100%;
  }

  body[data-community-section="forum"] .post {
    overflow: hidden;
  }

  body[data-community-section="forum"] :is(.post, #detail):not(.is-help-post) .post-images {
    width: 100%;
    max-width: 100%;
    max-height: 420px;
    flex-direction: column;
    align-items: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-color: var(--blue) transparent;
    scrollbar-width: thin;
  }

  body[data-community-section="forum"] #detail:not(.is-help-post) .post-images {
    max-height: 520px;
  }

  body[data-community-section="forum"] :is(.post, #detail):not(.is-help-post) .post-images::-webkit-scrollbar {
    width: 8px;
    height: 0;
  }

  body[data-community-section="forum"] :is(.post, #detail):not(.is-help-post) .post-images::-webkit-scrollbar-track {
    background: transparent;
  }

  body[data-community-section="forum"] :is(.post, #detail):not(.is-help-post) .post-images::-webkit-scrollbar-thumb {
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: var(--blue);
    background-clip: padding-box;
  }

  .post-images img,
  .dialog-post .post-images img {
    width: auto;
    height: auto;
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
    object-position: left top;
  }

  body[data-community-section="forum"] :is(.post, #detail):not(.is-help-post) .post-images img,
  body[data-community-section="forum"] .dialog-post .post-images img {
    max-width: min(400px, 100%);
  }

  .post h3 {
    font-size: 19.5px;
  }

  .post-content > p {
    color: #111416;
    font-size: 18px;
  }

  .dialog-post h3 {
    font-size: 23.4px;
  }

  .dialog-post #detailBody {
    color: #111416;
    font-size: 19.5px;
  }

  html[data-theme="dark"] .post-content > p,
  html[data-theme="dark"] .dialog-post #detailBody {
    color: #f7fafb;
  }
}

@media (max-width: 520px) {
  .post-footer {
    align-items: flex-end;
  }

  .post .stats {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  #replyList > .reply-thread > .reply-descendants {
    margin-left: 20px;
    padding-left: 7px;
  }

  #detail .modal-top {
    padding: 15px 18px 7px;
  }

  .detail-scroll {
    padding: 0 18px 14px;
  }

  #detail .reply-form {
    padding: 12px 18px 16px;
  }
}

.post-category-label { display: block; margin-bottom: 7px; font-size: 13px; }
.post-category-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.post-category-options button { min-height: 42px; padding: 8px 5px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.post-category-options button.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }
.post-category-options button:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 2px; }
.detail-author a:hover { text-decoration: underline; }
#postLogField[hidden], #postSolutionNote[hidden] { display: none; }
