/* ════════════════════════════════════════════════════════════
   redehy-modal —— 重新脱水弹窗 (工作台 + ItemModal 编辑界面共用)
   ════════════════════════════════════════════════════════════ */
.redehy-modal-mask {
  position: fixed; inset: 0;
  background: rgba(26, 25, 34, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  animation: redehyFadeIn .18s ease-out;
  padding: 24px;
}
@keyframes redehyFadeIn { from { opacity: 0; } to { opacity: 1; } }
.redehy-modal {
  width: 100%;
  max-width: 460px;
  background: var(--paper);
  border: 0.5px solid var(--line-2);
  border-radius: 16px;
  padding: 26px 28px 22px;
  box-shadow: 0 24px 60px -16px rgba(26,25,34,0.32);
  animation: redehyPop .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes redehyPop {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.redehy-modal-hd {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.redehy-modal-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent-3);
  color: var(--accent);
  font-size: 15px;
  font-style: normal;
}
.redehy-modal-title {
  font-family: var(--serif); font-style: italic;
  font-size: 19px;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.redehy-modal-target {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-2);
  margin: 6px 0 14px;
  padding: 8px 12px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
  word-break: break-all;
}
.redehy-modal-desc {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.redehy-modal-desc b { color: var(--ink); font-weight: 600; }
.redehy-opt {
  display: flex; gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 0.5px solid var(--line-2);
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 22px;
  background: var(--paper);
}
.redehy-opt:hover:not(.is-disabled) {
  border-color: var(--accent);
  background: var(--accent-3);
}
.redehy-opt input[type="checkbox"] {
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: var(--accent);
  width: 16px; height: 16px;
  cursor: pointer;
}
.redehy-opt.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.redehy-opt.is-disabled input { cursor: not-allowed; }
.redehy-opt-text { flex: 1; }
.redehy-opt-ttl {
  font: 600 13px var(--sans);
  color: var(--ink);
  margin-bottom: 3px;
}
.redehy-opt-sub {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.redehy-modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
}
.redehy-btn {
  appearance: none;
  border: 0.5px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  padding: 9px 22px;
  border-radius: 999px;
  font: 500 12.5px var(--sans);
  cursor: pointer;
  transition: all .15s;
}
.redehy-btn:hover:not(:disabled) {
  background: var(--bg-2);
  border-color: var(--ink-3);
}
.redehy-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.redehy-btn.is-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.redehy-btn.is-primary:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ── preview 阶段 — 双栏对比 ── */
.redehy-modal-mask-wide {
  padding: 16px;
}
.redehy-modal-preview {
  max-width: 920px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 22px 24px 18px;
}
.redehy-modal-preview .redehy-modal-hd {
  position: relative;
}
.redehy-preview-cost {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.redehy-diff-block {
  margin: 12px 0;
}
.redehy-diff-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.redehy-diff-col {
  display: flex; flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.redehy-diff-lbl {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 4px;
}
.redehy-diff-lbl-old { color: var(--ink-4); }
.redehy-diff-lbl-new { color: var(--accent); }
.redehy-diff-readonly {
  background: var(--bg-2);
  border: 0.5px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 360px;
  overflow-y: auto;
}
.redehy-diff-readonly.redehy-diff-line {
  font-family: var(--sans);
  font-size: 13px;
  padding: 8px 12px;
  max-height: none;
}
.redehy-diff-edit {
  background: var(--paper);
  border: 0.5px solid var(--accent);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  resize: vertical;
  min-height: 80px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: box-shadow .15s;
}
.redehy-diff-edit:focus {
  box-shadow: 0 0 0 2px var(--accent-3);
}
.redehy-diff-edit-line {
  font-family: var(--sans);
  font-size: 13px;
  min-height: 0;
  padding: 8px 12px;
}
.redehy-diff-empty {
  color: var(--ink-4);
  font-size: 11.5px;
  font-style: italic;
}
.redehy-diff-tags, .redehy-diff-tags-edit {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 0.5px solid var(--line);
  border-radius: 8px;
  min-height: 36px;
}
.redehy-diff-tags-edit {
  background: var(--paper);
  border-color: var(--accent);
}
.redehy-tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  background: var(--paper);
  border: 0.5px solid var(--line-2);
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-2);
}
.redehy-tag-chip.is-new {
  background: var(--accent-3);
  border-color: var(--accent);
  color: var(--ink);
}
.redehy-tag-chip .x {
  cursor: pointer;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1;
}
.redehy-tag-chip .x:hover { color: #b94a4a; }
.redehy-tag-input {
  appearance: none;
  border: 0;
  background: transparent;
  font: 500 11px var(--sans);
  color: var(--ink);
  outline: none;
  min-width: 80px;
  padding: 3px 4px;
}
.redehy-modal-foot-preview {
  margin-top: 18px;
  display: flex; align-items: center; gap: 10px;
}
