.polish-mini-btn {
  width: 34px;
  height: 34px;
  font-size: 12px;
  border-color: rgba(140, 164, 255, 0.45);
  background: linear-gradient(145deg, rgba(140, 164, 255, 0.24), rgba(158, 134, 255, 0.12));
}

.polish-layout {
  grid-template-columns: 1.05fr 0.95fr;
}

.polish-compare-panel {
  gap: 10px;
}

.polish-compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.polish-card-before {
  border-color: rgba(255, 255, 255, 0.22);
}

.polish-card-after {
  border-color: rgba(140, 164, 255, 0.5);
  box-shadow: 0 10px 30px rgba(94, 127, 255, 0.18);
}

.polish-toast {
  position: absolute;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 14px);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(140, 164, 255, 0.45);
  background: rgba(9, 13, 25, 0.88);
  color: #eaf0ff;
  font-size: 13px;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.polish-toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.polish-error-modal {
  position: absolute;
  inset: 0;
  z-index: 12;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.polish-error-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.polish-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 14, 0.72);
  backdrop-filter: blur(3px);
}

.polish-error-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 92vw);
  border: 1px solid rgba(255, 111, 157, 0.35);
  border-radius: 14px;
  background: rgba(11, 16, 30, 0.96);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.polish-error-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.polish-error-message {
  color: #ffd8e7;
  line-height: 1.6;
}

.polish-error-detail {
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #d6ddfb;
  font-size: 12px;
  line-height: 1.6;
  max-height: min(42vh, 360px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

body[data-theme="guofeng"] .polish-mini-btn {
  border-color: rgba(210, 163, 111, 0.6);
  background: linear-gradient(145deg, rgba(210, 163, 111, 0.24), rgba(173, 122, 79, 0.12));
}

body[data-theme="guofeng"] .polish-card-after {
  border-color: rgba(210, 163, 111, 0.58);
  box-shadow: 0 10px 30px rgba(190, 132, 80, 0.16);
}

body[data-theme="guofeng"] .polish-error-card {
  border-color: rgba(210, 163, 111, 0.35);
}

body[data-light-mode="on"] .polish-toast {
  background: rgba(245, 248, 255, 0.92);
  color: #415888;
  border-color: rgba(106, 128, 230, 0.35);
}

body[data-light-mode="on"] .polish-error-card {
  background: rgba(248, 251, 255, 0.98);
  border-color: rgba(214, 118, 153, 0.38);
}

body[data-light-mode="on"] .polish-error-message {
  color: #8c3358;
}

body[data-light-mode="on"] .polish-error-detail {
  color: #475a85;
  border-color: rgba(106, 128, 230, 0.2);
  background: rgba(106, 128, 230, 0.06);
}

@media (max-width: 980px) {
  .polish-layout {
    grid-template-columns: 1fr;
  }
}