/* 详情交互与帖子标签：保持独立覆盖，避免修改压缩后的站点主样式。 */
.post-card .pill-row {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: hidden;
}

.post-card .pill,
.post-detail__tags .pill {
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-detail__tags {
  align-items: center;
  row-gap: 10px;
}

@media (min-width: 768px) and (max-width: 1180px) {
  .recommendation-blocks .post-grid,
  .search-results .post-grid,
  .tag-detail-extra .post-grid {
    grid-template-columns: 1fr;
  }
}

.sjp-toast-region {
  position: fixed;
  z-index: 5000;
  right: 16px;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 16px;
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.sjp-toast {
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(28, 28, 28, 0.96);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38);
  color: #f4f4f4;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sjp-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sjp-toast--success {
  border-color: rgba(88, 214, 141, 0.35);
}

.sjp-toast--error {
  border-color: rgba(255, 107, 87, 0.45);
  color: #ffb0a4;
}

/* 新版详情页复用账号弹窗，只在该弹窗内补齐旧主题的视觉结构。 */
#login_modal .auth-flip-stage {
  position: fixed;
  top: 50% !important;
  left: 50%;
  width: min(370px, calc(100vw - 32px));
  margin: 0;
  transform: translate(-50%, -50%) !important;
  perspective: 1000px;
}

#login_modal .auth-flip-card {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

#login_modal .auth-flip-card.is-register {
  transform: rotateY(180deg);
}

#login_modal .auth-flip-face {
  width: 100%;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: #171717;
  backface-visibility: hidden;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.5);
}

#login_modal .auth-flip-face:not(.dx-tab-content--active) {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#login_modal .auth-flip-back {
  transform: rotateY(180deg);
}

#login_modal .auth-dialog-header {
  position: relative;
  margin-bottom: 12px;
  text-align: center;
}

#login_modal .modal-header-title {
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

#login_modal .dialog-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: #aaa;
}

#login_modal .auth-dialog-subtitle {
  margin: 0 0 18px;
  color: #888;
  font-size: 13px;
  text-align: center;
}

#login_modal .auth-dialog-field,
#login_modal .auth-dialog-label {
  display: block;
}

#login_modal .auth-dialog-field + .auth-dialog-field {
  margin-top: 12px;
}

#login_modal .auth-dialog-label {
  margin-bottom: 5px;
  color: #ddd;
  font-size: 13px;
}

#login_modal .form-control {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #353535;
  border-radius: 6px;
  outline: 0;
  background: #222;
  color: #fff;
}

#login_modal .form-control:focus {
  border-color: var(--orange);
}

#login_modal .btn-login-submit {
  width: 100%;
  height: 44px;
  margin-top: 20px;
  border: 0;
  border-radius: 7px;
  background: var(--orange);
  color: #111;
  font-weight: 700;
}

#login_modal .auth-dialog-alt {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
  color: #888;
  font-size: 13px;
}

#login_modal .auth-dialog-alt-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--orange);
}

#login_modal .auth-dialog-error {
  margin-top: 10px;
  color: #ff8e7d;
  font-size: 13px;
}

@media (max-width: 767px) {
  .post-detail__tags-label {
    flex: 0 0 100%;
  }

  .sjp-toast-region {
    bottom: max(18px, env(safe-area-inset-bottom));
  }

  #login_modal .auth-flip-face {
    padding: 20px;
  }
}
