/* Mobile layout shared by the calculator and its fullscreen editors. */
@media (max-width: 720px) {
  main { padding: 24px 14px 32px; }
  h1 { font-size: 30px; line-height: 1.18; }
  h2 { font-size: 19px; line-height: 1.35; margin-bottom: 16px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.5px; }
  .intro { font-size: 15px; line-height: 1.55; margin-bottom: 22px; }
  .layout { gap: 0; }
  .layout > div, .layout > aside, .card, .fields > label { min-width: 0; }
  .card { padding: 18px; border-radius: 15px; margin-bottom: 16px; }
  select, input[type=number], input[type=search] { font-size: 16px; min-height: 46px; padding: 11px; }
  .customer-type { max-width: none; }
  .fields { gap: 14px; }
  .color { padding: 12px; min-height: 48px; margin: 18px 0; }
  input[type=checkbox] { width: 22px; height: 22px; }
  .slider-group input { height: 36px; margin-top: 6px; }
  .place { min-height: 48px; padding: 11px 0; font-size: 15px; gap: 10px; flex-wrap: wrap; }
  .place input { margin-left: 0; }
  .place .tag { font-size: 11px; }
  #places details { padding: 0; }
  #places summary { padding: 15px 0; min-height: 48px; line-height: 1.4; }
  .view-switch button { min-height: 46px; font-size: 15px; }
  .selected button { max-width: 100%; min-height: 44px; padding: 9px 12px; text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
  .price-upload-box summary { font-size: 15px; padding: 15px; overflow-wrap: anywhere; }
  .price-upload-content { padding: 0 14px 16px; }
  .price-upload-content label { font-size: 13px; line-height: 1.5; }
  .price-upload-content input[type=file] { width: 100%; min-width: 0; font-size: 13px; }
  .price-upload-content input::file-selector-button { min-height: 44px; padding: 10px; margin-right: 6px; }
  #price-upload-remove, .price-crop-actions button { min-height: 44px; font-size: 14px; }
  .price-crop-actions { gap: 8px; }
  .price-crop-actions button { flex: 1 1 140px; }
  .price-crop-fullscreen { min-height: 44px; bottom: 8px; right: 8px; }
  .price-crop-handle::after { content: ''; position: absolute; inset: -10px; }
  .price-crop-handle.left, .price-crop-handle.right { width: 18px; height: 44px; }
  .price-crop-handle.left { left: -9px; }
  .price-crop-handle.right { right: -9px; }
  .price-crop-handle.top, .price-crop-handle.bottom { height: 18px; width: 44px; }
  .price-crop-handle.top { top: -9px; }
  .price-crop-handle.bottom { bottom: -9px; }
  .preview-stage { padding: 18px 14px; margin: 16px 0 12px; }
  .sheet { max-width: 280px; }
  .preview-key { gap: 12px; flex-wrap: wrap; line-height: 1.4; }
  .total { padding: 20px; border-radius: 15px; margin-bottom: 16px; }
  .total strong { font-size: clamp(28px, 8vw, 36px); overflow-wrap: anywhere; }
  .booking-link-panel a, .advice { min-height: 48px; padding: 14px; font-size: 15px; line-height: 1.5; }
  #map-dialog[open], #price-crop-dialog {
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .map-dialog-head { flex-wrap: wrap; gap: 8px; }
  .map-dialog-head h2 { flex: 1 1 calc(100% - 60px); font-size: 18px; }
  #map-fullscreen { order: 3; min-height: 44px; font-size: 14px; }
  #close-map { width: 44px; height: 44px; }
  .map-region-tabs { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
  .map-region-tabs button { flex: 0 0 auto; min-height: 44px; padding: 10px 14px; font-size: 13px; white-space: nowrap; }
  .map-controls button { width: 44px; height: 44px; }
  #map-dialog #confirm-map { width: 100%; min-width: 0; min-height: 48px; }
  .price-crop-dialog-head { gap: 10px; }
  .price-crop-dialog-head h2 { font-size: 18px; line-height: 1.3; }
  #price-crop-close { min-height: 44px; max-width: 60%; font-size: 13px; line-height: 1.35; }
  #price-crop-dialog .price-crop-actions { flex-wrap: nowrap; margin: 8px 0; }
  #price-crop-dialog .price-crop-actions button { flex: 1; padding: 9px; font-size: 12px; }
  #price-crop-dialog .price-crop-stage { min-height: 100px; }
  #price-crop-dialog .price-crop-stage > img { max-height: max(100px, calc(var(--visible-height, 100dvh) - 260px)); }
}
@media (max-width: 380px) {
  main { padding-left: 10px; padding-right: 10px; }
  .card { padding: 15px; }
  .fields { grid-template-columns: 1fr; gap: 16px; }
  .price-upload-content { padding-left: 11px; padding-right: 11px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #price-crop-dialog .price-crop > .hint:first-of-type { display: none; }
  #price-crop-dialog .price-crop-stage { min-height: 70px; margin: 6px 0; }
  #price-crop-dialog .price-crop-stage > img { max-height: max(70px, calc(var(--visible-height, 100dvh) - 180px)); }
  #price-crop-dialog { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .ad { transition: none; }
}
