/* Breakpoints follow Website/CreatorTool/Styles/responsive.css: 1100px drops the action divider
   and condenses the status, 900px is the phone layout (one column, preview below the form, the
   status collapses to its icon and count, 44px touch targets). */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: var(--space-9) 32px;
  }
  .topbar-divider-actions {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar {
    gap: var(--space-4);
    padding: 0 var(--space-4) 0 var(--space-7);
  }
  .brand-mark {
    width: 26px;
    height: 26px;
  }
  .brand-name,
  .topbar-divider {
    display: none;
  }
  .page-title {
    font-size: var(--font-size-xl);
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--space-8) var(--space-7) 96px;
  }
  .preview-pane {
    position: static;
  }
  .preview-card {
    padding: var(--space-7);
  }
  .json-preview {
    max-height: none;
    min-height: 0;
  }
  .diagnostics-button {
    position: relative;
    justify-content: center;
    width: var(--touch-target);
    height: var(--touch-target);
    padding: 0;
    border: 0;
  }
  .diagnostics-button .icon {
    width: 20px;
    height: 20px;
  }
  .diagnostics-text {
    display: none;
  }
  .diagnostics-count {
    position: absolute;
    top: 4px;
    right: 2px;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-fill);
    color: var(--color-on-accent);
    font: 700 var(--font-size-2xs)/1 var(--font-mono);
  }
  .segmented.theme-switch > button {
    height: 36px;
    padding: 0 var(--space-5);
  }
  .secondary-button,
  .primary-button,
  .tag-entry .small-button,
  input[type="text"] {
    min-height: var(--touch-target);
  }
  .tag-remove {
    width: 32px;
    height: 32px;
  }
  .tag {
    height: 36px;
  }
}

@media (max-width: 420px) {
  .page-title {
    font-size: var(--font-size-md);
  }
  .pane-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .segmented.theme-switch > button {
    padding: 0 var(--space-4);
  }
}
