.technical-spec-dialog {
  width: min(880px, calc(100vw - 32px));
  max-width: 880px;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #d8dce4;
  border-radius: 18px;
  color: #202631;
  background: #fff;
  box-shadow: 0 28px 90px #15234138;
}
.technical-spec-dialog::backdrop,
.technical-spec-unsaved-dialog::backdrop { background: #14203975; }
.technical-spec-shell { padding: 28px; }
.technical-spec-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.technical-spec-header h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; }
.technical-spec-header p { margin: 0; color: #697487; overflow-wrap: anywhere; }
.technical-spec-header > button { min-width: 38px; padding: 5px 10px; font-size: 24px; line-height: 1; }
.technical-spec-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.technical-spec-meta .technical-spec-field { margin: 0; min-width: 225px; }
.technical-spec-meta > strong { padding: 7px 12px; border-radius: 8px; color: #704f1a; background: #fff5d9; }
.technical-spec-meta > strong[data-status="approved"] { color: #256142; background: #e7f5ec; }
.technical-spec-meta > strong[data-status="review"] { color: #2d5b83; background: #e8f1fd; }
.technical-spec-warning { padding: 12px 14px; border: 1px solid #ead6a6; border-radius: 9px; background: #fff8e9; line-height: 1.45; }
.technical-spec-snapshot { margin: 16px 0; color: #697487; overflow-wrap: anywhere; }
.technical-spec-field { display: flex; flex-direction: column; gap: 7px; margin: 0 0 18px; font-weight: 500; }
.technical-spec-field > input,
.technical-spec-field > textarea,
.technical-spec-field > select { width: 100%; min-width: 0; box-sizing: border-box; padding: 10px 12px; border: 1px solid #ccd3de; border-radius: 8px; color: inherit; background: #fff; font: inherit; font-weight: 400; }
.technical-spec-field > textarea { resize: vertical; line-height: 1.55; }
.technical-spec-field > textarea[readonly],
.technical-spec-field > input[readonly] { background: #f5f7fa; color: #465263; }
.technical-spec-field > :focus-visible,
.technical-spec-actions > button:focus-visible,
.technical-spec-header > button:focus-visible { outline: 3px solid #438de1; outline-offset: 2px; }
.technical-spec-approval { margin: 22px 0; padding: 18px 18px 0; border: 1px solid #dce2e9; border-radius: 12px; }
.technical-spec-approval h3 { margin: 0 0 7px; font-size: 17px; }
.technical-spec-approval > p { margin: 0 0 18px; color: #697487; font-size: 13px; }
.technical-spec-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.technical-spec-actions > button { white-space: normal; }
.technical-spec-actions > button:disabled { cursor: not-allowed; opacity: .55; }
.technical-spec-error { color: #a32536; white-space: pre-wrap; overflow-wrap: anywhere; }
.technical-spec-message { color: #256142; }
.technical-spec-dialog [hidden],
.technical-spec-unsaved-dialog [hidden] { display: none !important; }
.technical-spec-unsaved-dialog { width: min(490px, calc(100vw - 32px)); box-sizing: border-box; padding: 24px; border: 1px solid #d8dce4; border-radius: 14px; color: #202631; background: #fff; box-shadow: 0 28px 90px #15234138; }
.technical-spec-unsaved-dialog h2 { margin: 0 0 12px; font-size: 21px; }
.technical-spec-unsaved-dialog p { line-height: 1.5; }
@media (max-width: 600px) {
  .technical-spec-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .technical-spec-shell { padding: 18px 14px; }
  .technical-spec-header h2 { font-size: 21px; }
  .technical-spec-meta { align-items: stretch; flex-direction: column; }
  .technical-spec-actions > button { flex: 1 1 180px; }
  .technical-spec-approval { padding: 14px 12px 0; }
}
