/* ==========================================================================
   AppShare 网页端发帖 / 应用点评页 — Bold Evolution V2 样式
   ========================================================================== */

.article-post-page .visually-hidden {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.article-post-page .post-tnum,
.article-post-page .post-char-counter,
.article-post-page .post-upload-progress-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* 顶部栏 */
.article-post-page .post-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.article-post-page .post-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-post-page .post-back-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-xs);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition);
}

.article-post-page .post-back-btn:hover {
  border-color: var(--md-primary-border);
  color: var(--md-primary);
  transform: translateX(-1px);
}

.article-post-page .post-page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 840;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}

/* 模式切换分段胶囊 */
.article-post-page .post-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-xs);
}

.article-post-page .post-mode-tab {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 720;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.article-post-page .post-mode-tab .material-icons-outlined {
  font-size: 17px;
}

.article-post-page .post-mode-tab:hover {
  color: var(--text-primary);
}

.article-post-page .post-mode-tab.is-active {
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

.article-post-page .post-mode-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 账号提示条 */
.article-post-page .post-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--md-primary-soft);
  border: 1px solid var(--md-primary-border);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
}

.article-post-page .post-callout[hidden] {
  display: none !important;
}

.article-post-page .post-callout.is-warn {
  background: var(--status-amber-soft);
  border-color: var(--status-amber-border);
}

.article-post-page .post-callout.is-danger {
  background: var(--status-red-soft);
  border-color: rgba(220, 38, 38, 0.28);
}

.article-post-page .post-callout-icon {
  font-size: 20px;
  color: var(--md-primary);
  flex-shrink: 0;
}

.article-post-page .post-callout.is-warn .post-callout-icon {
  color: var(--status-amber);
}

.article-post-page .post-callout.is-danger .post-callout-icon {
  color: var(--status-red);
}

.article-post-page .post-callout-body {
  flex: 1;
  min-width: 0;
}

.article-post-page .post-callout-action {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--md-brand-grad);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 740;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.article-post-page .post-callout-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--md-primary-rgb), 0.28);
}

/* 主副双栏 Bento 布局 */
.article-post-page .post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 340px);
  gap: 20px;
  align-items: start;
}

.article-post-page .post-main-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.article-post-page .post-card {
  padding: 20px 22px;
}

.article-post-page .post-card[hidden] {
  display: none !important;
}

/* 创作舱表单字段 */
.article-post-page .post-composer-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-post-page .post-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-post-page .post-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.article-post-page .post-field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 740;
  color: var(--text-secondary);
}

.article-post-page .post-field-label .material-icons-outlined {
  font-size: 16px;
}

.article-post-page .post-required-mark {
  color: var(--status-red);
}

.article-post-page .post-char-counter {
  font-size: 12px;
  font-weight: 660;
  color: var(--text-tertiary);
}

.article-post-page .post-char-counter.is-warn {
  color: var(--status-red);
}

.article-post-page .post-body-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.article-post-page .post-tool-chip {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.article-post-page .post-tool-chip .material-icons-outlined {
  font-size: 14px;
}

.article-post-page .post-tool-chip:hover {
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

.article-post-page .post-title-input,
.article-post-page .post-body-textarea,
.article-post-page .post-field-input {
  width: 100%;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: var(--bg-subtle);
  color: var(--text-primary);
  font: inherit;
  transition: all var(--transition);
}

.article-post-page .post-title-input {
  height: 46px;
  padding: 0 15px;
  font-size: 15.5px;
  font-weight: 720;
}

.article-post-page .post-body-textarea {
  min-height: 184px;
  padding: 14px 15px;
  font-size: 14.5px;
  line-height: 1.72;
  resize: vertical;
}

.article-post-page .post-field-input {
  height: 42px;
  padding: 0 13px;
  font-size: 13.5px;
}

.article-post-page .post-title-input::placeholder,
.article-post-page .post-body-textarea::placeholder,
.article-post-page .post-field-input::placeholder {
  color: var(--text-tertiary);
}

.article-post-page .post-title-input:focus-visible,
.article-post-page .post-body-textarea:focus-visible,
.article-post-page .post-field-input:focus-visible {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--md-primary);
  box-shadow: 0 0 0 3px rgba(var(--md-primary-rgb), 0.14);
}

/* 延迟校验：仅在交互失焦或提交后显示错误（:user-invalid + 兼容回退类） */
.article-post-page .post-field-error {
  display: none;
  font-size: 12.5px;
  font-weight: 660;
  color: var(--status-red);
  margin-top: 2px;
}

.article-post-page :is(.post-body-textarea, .post-field-input):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--status-red);
  background: var(--status-red-soft);
}

.article-post-page :is(.post-body-textarea, .post-field-input):is(:user-invalid, .user-invalid-fallback) + .post-field-error {
  display: block;
}

.article-post-page .post-field-error.is-visible {
  display: block;
}

/* 配图拖拽网格 */
.article-post-page .post-media-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--bg-subtle);
  border: 1.5px dashed transparent;
  transition: all var(--transition);
}

.article-post-page .post-media-block.is-dragover {
  border-color: var(--md-primary);
  background: var(--md-primary-soft);
}

.article-post-page .post-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.article-post-page .post-image-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  cursor: grab;
}

.article-post-page .post-image-tile.is-dragging {
  opacity: 0.55;
  transform: scale(0.96);
}

.article-post-page .post-image-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.article-post-page .post-image-state-mask {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.54);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
}

.article-post-page .post-image-state-mask.is-error {
  background: rgba(220, 38, 38, 0.72);
  cursor: pointer;
}

.article-post-page .post-image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.article-post-page .post-image-remove:hover {
  background: var(--status-red);
}

.article-post-page .post-image-remove .material-icons-outlined {
  font-size: 14px;
}

.article-post-page .post-image-add-tile {
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.article-post-page .post-image-add-tile:hover {
  border-color: var(--md-primary);
  color: var(--md-primary);
  background: var(--md-primary-soft);
}

.article-post-page .post-image-add-tile .material-icons-outlined {
  font-size: 24px;
}

/* 通用选项舱行 */
.article-post-page .post-option-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-post-page .post-option-header,
.article-post-page .post-review-app-row,
.article-post-page .post-annex-added-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.article-post-page .post-option-left,
.article-post-page .post-linked-app-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.article-post-page .post-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.article-post-page .post-option-icon.is-active {
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

.article-post-page .post-linked-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-subtle);
  box-shadow: var(--icon-ring);
  flex-shrink: 0;
}

.article-post-page .post-option-text {
  min-width: 0;
  flex: 1;
}

.article-post-page .post-option-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 760;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-post-page .post-option-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 按钮体系 */
.article-post-page .post-pill-btn,
.post-dialog .post-pill-btn {
  height: 36px;
  padding: 0 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 720;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.article-post-page .post-pill-btn .material-icons-outlined,
.post-dialog .post-pill-btn .material-icons-outlined {
  font-size: 16px;
}

.article-post-page .post-pill-btn:hover:not(:disabled),
.post-dialog .post-pill-btn:hover:not(:disabled) {
  border-color: var(--md-primary-border);
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

.article-post-page .post-pill-btn.is-primary,
.post-dialog .post-pill-btn.is-primary {
  border-color: transparent;
  background: var(--md-brand-grad);
  color: #ffffff;
}

.article-post-page .post-pill-btn.is-danger,
.post-dialog .post-pill-btn.is-danger {
  border-color: transparent;
  background: var(--status-red);
  color: #ffffff;
}

.article-post-page .post-pill-btn:disabled,
.post-dialog .post-pill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.article-post-page .post-mini-btn,
.post-dialog .post-mini-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 720;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.article-post-page .post-mini-btn:hover,
.post-dialog .post-mini-btn:hover {
  border-color: var(--md-primary-border);
  color: var(--md-primary);
}

.article-post-page .post-mini-btn.is-primary,
.post-dialog .post-mini-btn.is-primary {
  border-color: transparent;
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

.article-post-page .post-mini-btn.is-primary:hover,
.post-dialog .post-mini-btn.is-primary:hover {
  background: var(--md-primary);
  color: #ffffff;
}

.article-post-page .post-icon-round-btn,
.post-dialog .post-icon-round-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.article-post-page .post-icon-round-btn:hover,
.post-dialog .post-icon-round-btn:hover {
  background: var(--bg-subtle-hover);
  color: var(--text-primary);
}

.article-post-page .post-icon-round-btn .material-icons-outlined,
.post-dialog .post-icon-round-btn .material-icons-outlined {
  font-size: 17px;
}

/* 应用点评态度双选 */
.article-post-page .post-review-pod {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-post-page .post-existing-review-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--status-amber-soft);
  border: 1px solid var(--status-amber-border);
}

.article-post-page .post-existing-review-bar[hidden] {
  display: none !important;
}

.article-post-page .post-existing-review-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 660;
  color: var(--text-primary);
}

.article-post-page .post-existing-review-info .material-icons-outlined {
  font-size: 18px;
  color: var(--status-amber);
}

.article-post-page .post-existing-review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-post-page .post-attitude-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-post-page .post-field-legend {
  font-size: 13px;
  font-weight: 740;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.article-post-page .post-attitude-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.article-post-page .post-attitude-option {
  cursor: pointer;
}

.article-post-page .post-attitude-face {
  height: 46px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1.5px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 760;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

.article-post-page .post-attitude-face .material-icons-outlined {
  font-size: 19px;
}

.article-post-page .post-attitude-option:hover .post-attitude-face {
  background: var(--bg-subtle-hover);
  color: var(--text-primary);
}

.article-post-page .post-attitude-option.is-good input:checked + .post-attitude-face {
  background: var(--status-green-soft);
  border-color: var(--status-green);
  color: var(--status-green);
}

.article-post-page .post-attitude-option.is-bad input:checked + .post-attitude-face {
  background: var(--status-red-soft);
  border-color: var(--status-red);
  color: var(--status-red);
}

.article-post-page .post-attitude-option input:focus-visible + .post-attitude-face {
  outline: 2px solid var(--md-primary);
  outline-offset: 2px;
}

/* 话题标签列表 */
.article-post-page .post-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-post-page .post-selected-tags[hidden] {
  display: none !important;
}

.article-post-page .post-tag-chip {
  height: 32px;
  padding: 0 8px 0 12px;
  border-radius: var(--radius-full);
  background: var(--md-primary-soft);
  color: var(--md-primary);
  font-size: 13px;
  font-weight: 720;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-post-page .post-tag-chip-remove {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--md-primary-rgb), 0.14);
  color: var(--md-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.article-post-page .post-tag-chip-remove:hover {
  background: var(--md-primary);
  color: #ffffff;
}

.article-post-page .post-tag-chip-remove .material-icons-outlined {
  font-size: 13px;
}

.article-post-page .post-hot-tags-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}

.article-post-page .post-hot-tags-strip[hidden] {
  display: none !important;
}

.article-post-page .post-quick-tag-btn {
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 660;
  cursor: pointer;
  transition: all var(--transition);
}

.article-post-page .post-quick-tag-btn:hover {
  border-color: var(--md-primary-border);
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

.article-post-page .post-quick-tag-btn.is-selected {
  border-color: var(--md-primary-border);
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

/* 附件工作舱 */
.article-post-page .post-annex-head-right,
.article-post-page .post-annex-added-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.article-post-page .post-annex-added-bar[hidden],
.article-post-page .post-annex-studio[hidden],
.article-post-page .post-annex-permission-tip[hidden] {
  display: none !important;
}

.article-post-page .post-annex-studio {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
}

.article-post-page .post-annex-permission-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--status-amber-soft);
  color: var(--status-amber);
  font-size: 12.5px;
  font-weight: 700;
}

.article-post-page .post-annex-upload-pod {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-post-page .post-annex-upload-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.article-post-page .post-annex-upload-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.article-post-page .post-upload-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--md-primary-soft);
  color: var(--md-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.article-post-page .post-upload-badge-icon.is-done {
  background: var(--status-green-soft);
  color: var(--status-green);
}

.article-post-page .post-upload-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-post-page .post-upload-progress-wrap[hidden] {
  display: none !important;
}

.article-post-page .post-upload-progress-track {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  overflow: hidden;
}

.article-post-page .post-upload-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--md-brand-grad);
  transition: width 0.16s ease;
}

.article-post-page .post-upload-progress-num {
  font-size: 12px;
  font-weight: 740;
  color: var(--md-primary);
  min-width: 36px;
  text-align: right;
}

.article-post-page .post-annex-row-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(130px, 0.7fr);
  gap: 10px;
}

.article-post-page .post-annex-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.article-post-page .post-inline-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.article-post-page .post-sub-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.article-post-page .post-currency-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.article-post-page .post-currency-segment {
  height: 42px;
  padding: 4px;
  border-radius: 14px;
  background: var(--bg-subtle);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.article-post-page .post-seg-option {
  cursor: pointer;
}

.article-post-page .post-seg-option span {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 720;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.article-post-page .post-seg-option input:checked + span {
  background: var(--md-primary);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.article-post-page .post-seg-option input:focus-visible + span {
  outline: 2px solid var(--md-primary);
  outline-offset: 2px;
}

.article-post-page .post-annex-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.article-post-page .post-submit-annex-btn {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--md-brand-grad);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 760;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.article-post-page .post-submit-annex-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(var(--md-primary-rgb), 0.3);
}

.article-post-page .post-submit-annex-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 右侧粘性操作与实时摘要栏 */
.article-post-page .post-side-col {
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-post-page .post-side-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-post-page .post-publish-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--md-brand-grad);
  color: #ffffff;
  font-size: 15px;
  font-weight: 780;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(var(--md-primary-rgb), 0.28);
  transition: all var(--transition);
}

.article-post-page .post-publish-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(var(--md-primary-rgb), 0.36);
}

.article-post-page .post-publish-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.article-post-page .post-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-subtle);
}

.article-post-page .post-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.article-post-page .post-summary-row[hidden] {
  display: none !important;
}

.article-post-page .post-summary-row strong {
  color: var(--text-primary);
  font-weight: 740;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-post-page .post-side-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.article-post-page .post-side-actions[hidden] {
  display: none !important;
}

.article-post-page .post-text-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.article-post-page .post-text-btn:hover {
  color: var(--status-red);
  background: var(--status-red-soft);
}

.article-post-page .post-retract-btn {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--status-red-soft);
  color: var(--status-red);
  font-size: 13.5px;
  font-weight: 740;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.article-post-page .post-retract-btn[hidden] {
  display: none !important;
}

.article-post-page .post-retract-btn:hover {
  background: var(--status-red);
  color: #ffffff;
}

/* 原生 <dialog> 样式（严格遵守 dialog[open] 与 overscroll-behavior: contain） */
dialog.post-dialog {
  margin: auto;
  padding: 0;
  width: min(560px, calc(100vw - 28px));
  max-height: min(82vh, 680px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

dialog.post-dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog.post-dialog.post-dialog-sm {
  width: min(440px, calc(100vw - 28px));
}

dialog.post-dialog:modal {
  overscroll-behavior: contain;
}

dialog.post-dialog::backdrop {
  background: rgba(9, 13, 22, 0.54);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  overscroll-behavior: contain;
}

dialog.post-dialog.post-dialog-lightbox {
  width: auto;
  max-width: min(92vw, 1080px);
  max-height: 90vh;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.post-dialog .post-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.post-dialog .post-lightbox-img {
  max-width: min(92vw, 1040px);
  max-height: 86vh;
  border-radius: 16px;
  object-fit: contain;
  display: block;
}

.post-dialog .post-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.post-dialog .post-dialog-title {
  margin: 0;
  font-size: 17px;
  font-weight: 820;
  color: var(--text-primary);
}

.post-dialog .post-dialog-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
}

.post-dialog .post-dialog-search .material-icons-outlined {
  font-size: 18px;
  color: var(--text-tertiary);
}

.post-dialog .post-dialog-search-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.post-dialog .post-dialog-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-dialog .post-dialog-body > * {
  flex-shrink: 0;
}

.post-dialog .post-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border-hairline);
}

.post-dialog .post-dialog-group-title {
  font-size: 12px;
  font-weight: 760;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-dialog .post-dialog-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-dialog .post-picker-topic-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 680;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.post-dialog .post-picker-topic-btn:hover,
.post-dialog .post-picker-topic-btn.is-selected {
  border-color: var(--md-primary-border);
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

.post-dialog .post-picker-topic-btn img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.post-dialog .post-app-item {
  flex-shrink: 0;
  border-radius: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  overflow: hidden;
}

.post-dialog .post-app-item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.post-dialog .post-app-item-head:hover {
  background: var(--bg-subtle-hover);
}

.post-dialog .post-app-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-surface);
  flex-shrink: 0;
}

.post-dialog .post-app-item-meta {
  flex: 1;
  min-width: 0;
}

.post-dialog .post-app-item-name {
  font-size: 14.5px;
  font-weight: 760;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-dialog .post-app-item-pkg {
  font-size: 12px;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-dialog .post-app-versions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-surface);
}

.post-dialog .post-ver-pick-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
}

.post-dialog .post-ver-pick-btn:hover {
  border-color: var(--md-primary-border);
  background: var(--md-primary-soft);
  color: var(--md-primary);
}

.post-dialog .post-dialog-empty {
  padding: 36px 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-tertiary);
}

.post-dialog .post-rule-prose {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.post-dialog .post-confirm-msg {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  .article-post-page .post-layout {
    grid-template-columns: 1fr;
  }

  .article-post-page .post-side-col {
    position: static;
  }
}

@media (max-width: 600px) {
  .article-post-page .post-card {
    padding: 16px;
  }

  .article-post-page .post-title-input,
  .article-post-page .post-body-textarea,
  .article-post-page .post-field-input,
  .post-dialog .post-dialog-search-input {
    font-size: max(1rem, 1em);
  }

  .article-post-page .post-annex-row-2,
  .article-post-page .post-annex-price-row {
    grid-template-columns: 1fr;
  }
}
