@layer components {
  /* Below 768px the box is dialog.css's bottom sheet; from 768 to 1099px its centred 560px box. The cards follow the box, not the screen. */
  .new-channel-dialog { container-type: inline-size; gap: 16px; }
  .new-channel-title { margin: 0; font-size: 18px; font-weight: 600; }
  .new-channel-intro { margin: -8px 0 0; color: var(--muted-foreground); line-height: 1.45; }
  .new-channel-form, .new-channel-page .new-channel-form { display: flex; flex-direction: column; gap: 14px; }
  .new-channel-form .field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
  .new-channel-form .hint { margin: 0; }
  .new-channel-kinds { min-width: 0; padding: 0; border: 0; }
  .new-channel-kinds > legend { padding: 0; margin-bottom: 6px; }
  /* Project access: one row per choice, the state shown by the radio and the border, not by colour alone. */
  .access-choices { min-width: 0; padding: 0; margin: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
  .access-choices > legend { padding: 0; margin-bottom: 2px; }
  .access-choice {
    display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-md); font-size: 13px; cursor: pointer;
  }
  .access-choice input { margin: 2px 0 0; flex: none; accent-color: var(--primary); }
  .access-choice:has(input:checked) { border-color: var(--jx-accent-line); background: var(--jx-accent-soft); }
  .access-choice:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--jx-accent); }
  .access-choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .access-choice-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
  .access-choice-hint { color: var(--muted-foreground); line-height: 1.45; }
  .project-access-sub { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
  .project-access-sub[hidden], .choice-warn[hidden] { display: none; }
  .choice-warn { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; color: var(--foreground); font-size: 13px; }
  .choice-warn svg { flex: none; margin-top: 2px; color: var(--muted-foreground); }
  .new-channel-form .alert[hidden] { display: none; }
  .new-channel-actions { display: flex; justify-content: flex-start; gap: 8px; }
  /* In a narrow box the cards lose their side room before their text does. */
  @container (max-width: 380px) {
    .new-channel-dialog .settings-card { padding: 8px 10px; gap: 8px; }
  }
  @media (max-width: 767px) {
    .new-channel-form .input { min-height: var(--tap); }
  }
}
