.command-drawer[aria-hidden='true'] {
  visibility: hidden;
}

.preview-empty {
  display: grid;
  align-content: center;
  min-height: 100%;
  text-align: center;
}

.preview-empty-message {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 420px;
  margin: auto;
}

.preview-empty-message h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 5vw, 34px);
}

.preview-empty-message p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.preview-empty-message button {
  min-height: 44px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text);
  background: var(--selected);
  cursor: pointer;
}

.preview-empty-message button:hover,
.preview-empty-message button:focus-visible {
  outline: none;
  background: var(--selected-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

@media (max-width: 720px) {
  .command-toggle {
    top: 8px;
    left: 8px;
    width: 44px;
    height: 44px;
  }

  .command-drawer {
    top: 8px;
    left: 8px;
    width: min(286px, calc(100vw - 16px));
    max-height: calc(100dvh - 64px);
    padding-top: 56px;
  }

  .icon-grid button {
    width: 44px;
    min-height: 44px;
  }

  .icon-grid button.wide,
  .drawer-pill,
  .advice-tools button,
  .issue-actions button {
    min-height: 44px;
  }

  .cursor-swatch {
    width: 44px;
    min-height: 44px;
  }

  .color-picker {
    width: 44px;
    height: 44px;
  }

  .format-bar {
    height: auto;
    min-height: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .format-bar button {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .format-spacer {
    display: none;
  }

  .format-status {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .editor-frame,
  .preview {
    padding-bottom: 104px;
  }
}
