.np-products-dialog {
  width: min(940px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid #d9e1e9;
  border-radius: 20px;
  color: #20354a;
  overflow: auto;
  overscroll-behavior: contain;
}
.np-products-dialog::backdrop {
  background: rgb(16 35 54 / 50%);
}
.np-products-dialog-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}
.np-products-dialog-header h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.35;
}
.np-products-dialog-header button {
  flex-shrink: 0;
  margin: 0;
  min-height: 44px;
}
.np-products-intro {
  color: #506476;
  margin-top: 0;
}
.np-products-current {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 12px 16px;
  margin: 16px 0;
  background: #f2f6fa;
  border-radius: 12px;
  font-size: 0.9rem;
}
.np-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.np-product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #dae2ea;
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
  background: #fff;
}
.np-product-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}
.np-product-card p {
  margin: 4px 0 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.np-product-card .np-product-price {
  font-weight: 750;
  font-size: 1.25rem;
  color: #193e5d;
}
.np-product-card button {
  min-height: 44px;
  margin: 8px 0 0;
  width: 100%;
  overflow-wrap: anywhere;
}
.np-product-card .primary {
  margin-top: auto;
}
.np-product-acceptance {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 20px 0 14px;
  min-height: 44px;
  font-size: 0.95rem;
}
.np-product-acceptance input {
  width: 20px;
  height: 20px;
  margin: 0 6px 0 0;
  flex: none;
  accent-color: #1a405e;
}
.np-product-details {
  padding: 14px 16px;
  background: #f4f7fa;
  border-radius: 12px;
}
.np-product-details summary {
  cursor: pointer;
  min-height: 32px;
  font-weight: 600;
}
.np-product-details p {
  margin: 12px 0;
  font-size: 0.9rem;
}
.np-action-weights,
.np-product-preview-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  margin: 12px 0;
  font-size: 0.9rem;
}
.np-action-weights dt,
.np-action-weights dd,
.np-product-preview-result dt,
.np-product-preview-result dd {
  margin: 0;
}
.np-products-notice {
  min-height: 24px;
  margin: 16px 0 0;
  line-height: 1.5;
  color: #17415d;
}
.np-page-credit {
  white-space: normal;
  font-size: 0.8rem;
  color: #4d6374;
}
@media (min-width: 521px) and (max-width: 900px) {
  .case-bar { flex-wrap: wrap; }
  .case-bar #case-title { flex-basis: 100%; }
}
.np-admin-products .np-product-settings fieldset {
  min-width: 0;
  border: 1px solid #dbe3e9;
  border-radius: 14px;
  margin: 20px 0;
  padding: 18px;
  background: #fff;
}
.np-admin-products legend {
  padding: 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
}
.np-admin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}
.np-admin-fields label,
.np-product-settings label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 0.9rem;
}
.np-admin-fields input,
.np-admin-fields select,
.np-product-settings textarea {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #bdcad5;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  font: inherit;
  color: inherit;
}
.np-admin-fields input[readonly] {
  background: #eef2f6;
  color: #506376;
}
.np-admin-hint {
  color: #5a6b79;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 6px 0 14px;
}
.np-admin-status {
  background: #eef5f9;
  padding: 12px 16px;
  border-radius: 10px;
}
.np-product-preview {
  border-top: 1px solid #dbe3e9;
  padding-top: 24px;
  margin-top: 28px;
}
.np-product-preview form > button {
  margin-top: 16px;
  min-height: 44px;
}
.workspace-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.workspace-dialog-header h2 {
  margin: 0 0 16px;
}
.workspace-dialog-header button {
  margin: 0;
  min-height: 44px;
  flex-shrink: 0;
}
.workspace-dialog .workspace-fieldset {
  min-width: 0;
  border: 1px solid #d6e1e9;
  border-radius: 10px;
  padding: 12px;
  margin: 8px 0;
}
.workspace-fieldset legend {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 5px;
}
.workspace-date-row,
.workspace-amendment {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid #e0e7ed;
}
.workspace-date-row label,
.workspace-amendment label {
  min-width: 0;
}
.workspace-dialog .workspace-attachment {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0;
  font-size: 0.875rem;
}
.workspace-dialog .workspace-attachment input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin: 2px 0;
  padding: 0;
  accent-color: #1b405c;
}
.workspace-dialog .workspace-attachment span {
  overflow-wrap: anywhere;
}
.workspace-facts {
  font-size: 0.875rem;
  margin: 12px 0;
}
.workspace-facts summary {
  cursor: pointer;
  min-height: 36px;
}
.workspace-fact {
  padding: 10px 0;
  border-top: 1px solid #e1e8ef;
}
.workspace-fact p {
  white-space: pre-wrap;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.workspace-fact small {
  display: block;
  color: #5b6f7f;
  line-height: 1.5;
}
.workspace-fact button {
  min-height: 40px;
  margin-top: 8px;
}
.workspace-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.workspace-template-card {
  padding: 12px;
  border: 1px solid #d5e1e9;
  border-radius: 10px;
}
.workspace-template-card button {
  width: 100%;
  min-height: 44px;
  text-align: left;
  margin: 0 0 8px;
}
.workspace-template-card small {
  color: #596f7f;
  line-height: 1.5;
}
.workspace-draft-paper {
  padding: 16px 4px;
  color: #202a34;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}
.workspace-draft-paper h3 {
  text-align: center;
  margin: 24px 0 16px;
}
.workspace-draft-paper h4 {
  margin: 16px 0 8px;
}
.workspace-draft-paper p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 9px 0;
}
.workspace-draft-paper .workspace-draft-header {
  text-align: right;
}
.workspace-draft-signature {
  margin-top: 16px !important;
}
.workspace-draft-warning,
.workspace-draft-checklist {
  color: #70511c;
  padding: 12px;
  background: #fff7e6;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.workspace-dialog :focus-visible {
  outline: 3px solid #287bac;
  outline-offset: 3px;
}
@media (max-width: 520px) {
  .workspace-template-grid {
    grid-template-columns: 1fr;
  }
  .workspace-dialog-header {
    gap: 8px;
  }
  .workspace-dialog-header h2 {
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }
  .case-bar {
    flex-wrap: wrap;
  }
  .case-bar #case-title {
    flex-basis: 100%;
  }
  .workspace-dialog button {
    min-height: 44px;
  }
}
.np-products-dialog :focus-visible,
.np-admin-products :focus-visible {
  outline: 3px solid #2179af;
  outline-offset: 3px;
}
@media (max-width: 760px) {
  .np-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .np-products-dialog {
    padding: 18px;
  }
}
@media (max-width: 520px) {
  .np-product-grid,
  .np-admin-fields {
    grid-template-columns: 1fr;
  }
  .np-products-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
    border-radius: 16px;
  }
  .np-products-dialog-header h2 {
    font-size: 1.22rem;
  }
  .np-products-dialog-header {
    gap: 8px;
  }
  .np-product-card {
    padding: 14px;
  }
  .np-action-weights,
  .np-product-preview-result {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .np-admin-products .np-product-settings fieldset {
    padding: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .np-products-dialog *,
  .np-admin-products * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.np-product-operations {
  margin-top: 1.5rem;
}
.np-report-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
}
.np-report-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
.np-report-table-wrap caption {
  text-align: left;
  font-weight: 700;
  margin: 0.5rem 0;
}
.np-report-table-wrap th,
.np-report-table-wrap td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--line, #dce5ed);
  vertical-align: top;
}
.np-report-table-wrap:focus-visible {
  outline: 3px solid #195c96;
  outline-offset: 2px;
}
.np-product-support {
  margin: 1.5rem 0;
}
.np-product-support form {
  margin: 1rem 0;
}
.np-owner-confirm {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.8rem 0;
}
.np-owner-confirm input {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
}
.np-products-dialog textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.np-prompt-draft,
.np-prompt-version {
  margin: 1.2rem 0;
  padding: 1rem;
  border: 1px solid var(--line, #dce5ed);
  border-radius: 1rem;
}
.np-prompt-draft label {
  display: block;
  margin: 0.75rem 0;
}
.np-prompt-draft input,
.np-prompt-draft textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.np-prompt-answer {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.np-prompt-check {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line, #dce5ed);
}
.np-prompt-selected {
  outline: 2px solid #195c96;
}
