/* =========================
   RESPONSIVE
========================= */

@media (max-width: 760px) {
  .recipe-hero {
    flex-direction: column;
  }

  .recipe-hero-image {
    flex: none;
    width: 100%;
    justify-content: center;
  }

  .recipe-hero-image img {
    width: 100%;
    max-width: 430px;
    height: auto;
    object-fit: contain;
  }

  .recipe-sections {
    grid-template-columns: 1fr;
  }

  .recipe-instructions-scroll-toggle {
    display: none;
  }

  .recipe-instructions-scroll-region {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .edit-page-layout {
    display: block;
  }

  .floating-edit-actions {
    position: sticky;
    top: calc(var(--site-header-height, 90px) + 8px);
    z-index: 900;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 16px;
    padding: 10px 0;
    background: var(--bg);
  }
}

@media (max-width: 720px) {
  .app-shell {
    flex-direction: column;
    overflow-y: auto;
  }

  .sidebar {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    max-height: none;
    overflow-y: visible;
    scrollbar-gutter: auto;
    padding: 18px 12px 12px;
  }

  .main-panel {
    padding: 18px;
  }

  .contact-card {
    padding: 22px;
  }

  .nutrition-grid,
  .category-picker,
  .category-picker-group-items,
  .instruction-image-dropzone {
    grid-template-columns: 1fr;
  }

  .category-picker-tools {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .category-picker-selected-toggle {
    min-height: 0;
  }

  .category-picker-actions .secondary-button {
    flex: 1 1 140px;
  }

  .instruction-image-step-text,
  .instruction-image-file-name {
    white-space: normal;
  }

  .footer-row {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-left {
    min-width: 0;
  }

  .footer-center {
    text-align: center;
    transform: none;
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 18px 14px 24px;
  }

  .recipe-meta-table {
    grid-template-columns: 1fr;
  }

  .meta-cell,
  .meta-cell:nth-child(3n),
  .meta-cell:nth-child(2n) {
    border-right: none;
  }

  .meta-cell:nth-last-child(-n + 2),
  .meta-cell:nth-last-child(-n + 3) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .meta-cell:last-child {
    border-bottom: none;
  }

  .contact-card {
    padding: 18px;
  }

  .contact-card h1 {
    font-size: 1.65rem;
  }
}

