@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-preview {
    min-height: 460px;
  }

  .mock-phone {
    inset: 16px 50% auto auto;
    transform: translateX(50%);
  }

  .format-grid {
    grid-template-columns: 1fr;
  }

  .template-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .controls-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-buttons,
  .controls-panel > .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 66px;
  }

  .header-shell {
    gap: 12px;
  }

  .brand-logo,
  .footer-logo,
  .logo-fallback {
    min-width: 124px;
  }

  .site-header .button {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 0.76rem;
  }

  .hero-grid {
    padding-block: 44px 34px;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-actions p {
    max-width: none;
  }

  .hero-preview {
    min-height: 390px;
  }

  .mock-phone {
    width: min(250px, 66vw);
  }

  .floating-card {
    width: 138px;
    padding: 14px;
  }

  .floating-card strong {
    margin-top: 20px;
    font-size: 1rem;
  }

  .stepper {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .stepper-item {
    min-width: 108px;
  }

  .creator-panel {
    border-radius: var(--radius-md);
  }

  .template-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .editor-header {
    align-items: start;
    flex-direction: column;
  }

  .controls-panel {
    grid-template-columns: 1fr;
  }

  [data-editor-canvas] {
    max-height: 60vh;
  }

  .footer-shell {
    display: grid;
  }
}

@media (max-width: 430px) {
  .shell {
    width: min(100% - 20px, 100%);
  }

  .hero {
    min-height: auto;
  }

  .hero-preview {
    min-height: 342px;
  }

  .card-profile {
    left: 0;
    top: 12%;
  }

  .card-feed {
    right: 0;
    top: 58%;
  }

  .card-stories {
    display: none;
  }

  .mock-number {
    font-size: 2.5rem;
  }

  .template-gallery {
    gap: 10px;
  }

  .step-actions .button,
  .result-actions .button,
  .photo-actions .button,
  .control-buttons .button,
  .camera-controls .button {
    width: 100%;
  }
}
