/* Mobile ordering: keep the working area clear of overlapping fixed panels. */
.mobile-calendar-preview { display: none; }
@media (max-width: 700px) {
  .mobile-order-page .site-header {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    height: auto;
    min-height: 0;
    padding: 6px 12px;
    backdrop-filter: none;
  }
  .mobile-order-page .header-actions { display: contents; }
  .mobile-order-page .brand { grid-column: 1; grid-row: 1; gap: 7px; min-width: 0; min-height: 44px; }
  .mobile-order-page .brand > span:last-child { min-width: 0; }
  .mobile-order-page .brand strong { font-size: 13px; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-order-page .brand small { display: none; }
  .mobile-order-page .brand-mark { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; }
  .mobile-order-page .brand-mark svg { width: 22px; }
  .mobile-order-page .pk-language { grid-column: 2; grid-row: 1; margin: 0; }
  .mobile-order-page .pk-language > span { display: none; }
  .mobile-order-page .pk-language-picker summary { min-height: 44px; padding: 6px; gap: 5px; font-size: 12px; }
  .mobile-order-page .header-actions > a { grid-row: 2; min-height: 44px; display: inline-flex; align-items: center; justify-self: start; font-size: 12px; padding: 7px 10px; }
  .mobile-order-page .header-actions > a:nth-child(2) { grid-column: 2; justify-self: end; }

  .photo-order-page .shell { margin-top: 10px; padding: 0 10px; }
  .photo-order-page .steps { margin-bottom: 10px; }
  .photo-order-page .step { min-height: 44px; padding: 5px; }
  .photo-order-page .panel { padding: 16px 12px; }
  .photo-order-page .section-head { gap: 8px; margin-bottom: 14px; }
  .photo-order-page .section-head h2 { font-size: 1.4rem; }
  .photo-order-page #cancel-photos { min-height: 44px; padding: 9px 14px; font-size: 13px; }
  .photo-order-page .upload-mobile-guidance { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 0 0 14px; }
  .photo-order-page .sticky-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 7px 10px;
    bottom: 0;
    z-index: 25;
    margin-top: 16px;
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom, 0px));
    border-radius: 14px 14px 0 0;
    background: #fff;
    backdrop-filter: none;
  }
  .photo-order-page .sticky-summary > div:first-child { min-width: 0; }
  .photo-order-page .sticky-summary > div:first-child > span { font-size: 11px; }
  .photo-order-page #review-total { display: block; font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
  .photo-order-page #add-photos-to-cart { min-height: 44px; width: 100%; padding: 9px 8px; border-radius: 12px; }
  .photo-order-page #add-photos-to-cart span { font-size: 13px; line-height: 1.25; }
  .photo-order-page .sticky-summary .background-upload {
    position: static;
    grid-column: 1 / -1;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 7px 0 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
  .photo-order-page .sticky-summary .background-upload-head { gap: 8px; }
  .photo-order-page .sticky-summary .background-upload-head strong { font-size: 12px; line-height: 1.3; }
  .photo-order-page .sticky-summary .background-upload-head > span { font-size: 12px; white-space: nowrap; }
  .photo-order-page .sticky-summary .background-upload-track { height: 4px; margin: 5px 0 0; }
  .photo-order-page .sticky-summary .background-upload small { display: none; }
  .photo-order-page .sticky-summary .background-upload.failed small { display: block; margin-top: 5px; font-size: 12px; white-space: normal; }
  .photo-order-page .selection-overlay { padding: 12px; }
  .photo-order-page .selection-progress { padding: 20px 18px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; border-radius: 20px; }
  .photo-order-page .selection-spinner,
  .photo-order-page .selection-progress.done .selection-spinner:after { width: 36px; height: 36px; font-size: 24px; }
  .photo-order-page .selection-spinner { margin: 0 auto 12px; }
  .photo-order-page .selection-progress h2 { font-size: 22px; line-height: 1.2; }
  .photo-order-page .selection-progress p { margin: 9px 0 12px; font-size: 14px; }
  .photo-order-page .selection-progress > strong { font-size: 14px; }
  .photo-order-page .selection-actions { margin-top: 16px; gap: 8px; }
  .photo-order-page .selection-progress .button { min-height: 44px; padding: 10px 14px; font-size: 14px; }
  .photo-order-page #selection-cancel { margin-top: 8px; }

  .single-order-page .single-preview-card { position: static; top: auto; z-index: auto; padding: 10px; }
  .single-order-page .single-canvas-wrap canvas { width: min(100%, 230px); }
  .single-order-page .single-preview-card strong { font-size: 15px; }
  .single-order-page .single-preview-card small { font-size: 12px; }
  .single-order-page .single-main { padding: 0 10px; }
  .single-order-page .single-section { padding: 18px 12px; }
  .single-order-page .single-title-field input,
  .single-order-page .product-note textarea { font-size: 16px; min-height: 44px; scroll-margin-block: 16px; }
  .single-order-page .single-font-picker button,
  .single-order-page .single-themes button { min-height: 44px; }
  .single-order-page .mobile-calendar-preview { display: block; grid-column: 1 / -1; min-height: 44px; padding: 10px 14px; font-size: 14px; }
}
