:root {
  /* The outside of the Frezerka wordmark has a straight center and rounded ends. */
  --frezerka-capsule: 999px;
  --frezerka-card: min(46px, 20%) / min(46px, 50%);
  --frezerka-panel: min(56px, 14%) / min(56px, 24%);
  --frezerka-media: min(28px, 12%) / min(28px, 20%);
}

.legacy .machine-brands .machine-track .machine-brand,
body :is(.contact-messengers a, .album-nav a, .model-3d-link, .client-remove,
  .gallery-open, .gallery-controls button, .viewer-controls button, .admin-row-actions button) {
  border-radius: var(--frezerka-capsule);
}

.legacy .machine-brands .machine-track .machine-brand {
  padding-inline: 14px;
}

.machine-brand:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

body :is(.legacy .photo-card, .legacy .placeholder, .legacy .client-card,
  .legacy .model-card, .photo-card, .placeholder, .client-card, .model-card,
  .direction-grid > a, .new-photo, .legacy #materials .warehouse-photo,
  #works .work[data-category="review"], .card) {
  border-radius: var(--frezerka-card);
}

body :is(.quality-panel, .format-lead-times, .legacy .catalog-help, .catalog-help,
  .legacy .own-products#tablet-feeders, .own-products#tablet-feeders,
  .legacy .recycling-fact, .recycling-fact, .legacy .upload, .upload,
  .legacy .client-edit-tools, .client-edit-tools, .drawing-demo form,
  .admin-dialog, .admin-bar, .admin-upload, dialog, #project-dialog, #drop) {
  border-radius: var(--frezerka-panel);
}

body :is(.hero-video video, .legacy .hero-art, .hero-art, .project-img,
  .legacy .dialog-placeholder, .dialog-placeholder, .gallery-full,
  .viewer, .card img, .admin-photo > img, #project-image) {
  border-radius: var(--frezerka-media);
}

body :is(.legacy .catalog-tools input, .catalog-tools input,
  .drawing-demo input:not([type="file"]), .admin-dialog input:not([type="checkbox"]),
  .admin-dialog select, dialog input:not([type="checkbox"]):not([type="file"])) {
  border-radius: var(--frezerka-capsule);
}

body :is(.drawing-demo input[type="file"], .drawing-demo textarea, dialog textarea) {
  border-radius: var(--frezerka-media);
}

@media (max-width: 600px) {
  .legacy .machine-brands .machine-track .machine-brand {
    padding-inline: 12px;
  }

  .legacy .machine-brands .machine-track .machine-brand strong {
    font-size: clamp(16px, 4.6vw, 19px);
  }
}
