dialog {
  width: min(560px, 90vw);
  padding: 24px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(16, 32, 31, .35);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.dialog-head h2 {
  margin: 0;
}

.dialog-head button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: #fff;
  font-size: var(--fs-5);
  cursor: pointer;
}

#dialog-copy {
  /* U-6: this is the confirmation dialog's actual message (e.g. "정말
   * 삭제하시겠습니까?") -- the one sentence a modal exists to show. */
  color: var(--text);
  font-size: var(--fs-3);
  line-height: var(--lh-base);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 5px;
}

.form-actions button {
  padding: 12px;
  border-radius: var(--control-radius);
  cursor: pointer;
}

.cancel {
  color: var(--muted-strong);
  border: 1px solid var(--line);
  background: var(--surface-muted);
}

/* U-10: was 1024px (docs/plans/ROADMAP.md §2.1) -- snapped to the console's
 * ≤1180px tier, the same one dashboard.css's own "nav/grid goes compact"
 * breakpoint already uses, so the nav chrome and the page grids it sits above
 * now fold at the same width instead of two steps apart. */
@media (max-width: 1180px) {
  .nav {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }
  .workspace-mode-switcher,
  .workspace-account-switcher,
  .steps,
  .header-actions {
    grid-column: 1;
  }
  .workspace-mode-switcher {
    padding-right: 0;
    border-right: 0;
  }
  .workspace-mode-toggle {
    width: 100%;
    min-height: 40px;
  }
  .workspace-mode-toggle .brand-copy {
    min-width: 0;
  }
  .workspace-account-switcher {
    min-width: 0;
    width: 100%;
  }
  .workspace-account-menu {
    width: min(100%, 340px);
  }
  .steps {
    display: flex;
    width: 100%;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: thin;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .steps button {
    min-width: 0;
    flex: 0 0 auto;
    justify-content: center;
    min-height: 36px;
    padding: 8px 11px;
    font-size: var(--fs-2);
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }
  .settings-subnav {
    width: 100%;
  }
  .settings-subnav a {
    flex: 1 1 120px;
  }
  .header-actions {
    justify-self: stretch;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-top: 1px;
    padding-left: 0;
    border-left: 0;
  }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* .tracking-schedule-fields is auto-fit (monitoring.css) -- it folds columns on its own, no fixed count needed here. */
  .tracking-schedule-form button { min-height: 42px; }
  .notification-row { grid-template-columns: 1fr; align-items: stretch; }
  .tracking-schedule-row { grid-template-columns: 1fr; align-items: stretch; }
  .tracking-schedule-actions { justify-content: flex-start; }
  .test-summary,
  .ops-module-summary { grid-template-columns: repeat(2, 1fr); }
  .report-grid.two { grid-template-columns: 1fr; }
  .analysis-history-row { grid-template-columns: 1fr; }
  .analysis-result-handoff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staged-query-row,
  .staged-query-fields,
  .staged-query-add {
    grid-template-columns: 1fr;
  }
  .staged-query-actions {
    justify-content: flex-start;
  }
  .staged-query-actions span {
    text-align: left;
  }
  .history-actions { justify-content: flex-start; }
  .project-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-series-row { grid-template-columns: 1fr; }
  .strategy-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-report-shell {
    --report-scroll-offset: 248px;
    grid-template-columns: 1fr;
  }
  .report-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .report-nav button { min-width: 0; }
  .report-nav span { min-width: 0; }
  .provider-grid,
  .split { grid-template-columns: 1fr; }
  .title { align-items: start; flex-direction: column; gap: 12px; padding: 34px 0 18px; }
  .trial-panel { align-items: flex-start; flex-direction: column; }
  .trial-actions { grid-template-columns: 1fr; }
  .account-overview {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-grid { grid-template-columns: 1fr; }
}

/* U-10: was 600px, with a further 420px step below it for one rule -- both
 * collapsed onto the console's ≤760px tier (docs/plans/ROADMAP.md §2.1); the
 * 420px rule is folded into .steps button below instead of kept as a fourth
 * breakpoint. */
@media (max-width: 760px) {
  main { padding: 0 18px; }
  /* .auth 계열 크기는 clamp()가 스스로 줄인다(layout.css) -- 여기에 중단점을
     하나 더 두면 두 곳에서 같은 값을 다투게 된다. */
  .title h1 { font-size: var(--fs-6); }
  .title p { margin: 0; }
  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }
  .steps button {
    width: 100%;
    min-width: 0;
    white-space: normal;
    /* Folded in from the old 420px-only step. */
    min-height: 40px;
    padding: 9px 6px;
    font-size: var(--fs-2);
  }
  .grid,
  .overview-metrics,
  .test-summary,
  .ops-module-summary,
  .test-control-grid,
  .tracking-schedule-fields,
  .score-grid,
  .strategy-score-grid,
  .comparison-grid,
  .trend-summary-strip,
  .project-fact-grid,
  .module-grid,
  .module-summary { grid-template-columns: 1fr; }
  .monitoring-question-list { grid-template-columns: 1fr; }
  .monitoring-question-list .prism-domain-group { grid-template-columns: 1fr; }
  .analysis-result-handoff-grid { grid-template-columns: 1fr; }
  .test-console {
    padding: 14px;
  }
  .staged-query-add textarea,
  .staged-query-add select,
  .staged-query-add button {
    width: 100%;
  }
  .response-head,
  .provider-head,
  .row {
    align-items: flex-start;
    flex-direction: column;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .question-actions,
  .member-controls,
  .member-controls .role-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .member-controls form {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .member-controls .test-control-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .member-controls button[type="submit"] {
    width: 100%;
  }
  .response-head > span,
  .provider-head > span {
    flex: initial;
  }
  .form-actions { grid-template-columns: 1fr; }
  .empty { padding: 44px 20px; }
  .overview-project,
  .overview-detail-head,
  .overview-detail-row,
  .overview-projects-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .project-container-pills span,
  .test-container-map span {
    width: 100%;
  }
  .overview-detail-row b,
  .overview-detail-row small {
    white-space: normal;
  }
  .workspace-switch-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }
  .overview-project b,
  .overview-project small {
    white-space: normal;
  }
  .tracking-schedule-row strong,
  .tracking-schedule-row small,
  .tracking-schedule-row code,
  .tracking-schedule-row .schedule-detail,
  .notification-row strong,
  .notification-row small,
  .notification-row span {
    white-space: normal;
  }
  .tracking-schedule-actions {
    flex-wrap: wrap;
  }
  .report-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-feature-list {
    grid-template-columns: 1fr;
  }
  .report-timeline-point b,
  .report-timeline-point small {
    white-space: normal;
  }
  .deep-report-request-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .deep-report-request-panel button {
    width: 100%;
  }
}
