/* Home · Edit on phones (≤ 600 px), layered on edit/css/edit.css (the new one-block Edit section).
   Option C "Swipe the two modes" (picked 2026-11-16 from the proposals page, since deleted): Light & Color and Geometry
   side by side as cards you swipe. Since 2026-11-17 (user) the cards have no titles and no Edited / Before-After
   band: one copy of the app's selector, above the row and shared by both cards, names them (built by
   mobile/js/edit-mobile.js; tap a side to swipe, swiping moves it). Two controls per card: Temperature + Exposure;
   Straighten + Aspect Ratio (one scrolling row). Both cards are the same height, photo and panel alike, and have no
   Replay button (2026-11-17).
   Phone rules only, so the desktop section is untouched. "html body" wins over edit.css. */

.edm-seg { display: none; }

@media (max-width: 600px) {
  /* ---------- Opener: as the phone's Stacking opener; no list under the title ---------- */
  html body .edx .edx-points { display: none; }
  html body .edx .edx-word { font-size: 17.6vw; }     /* one size for all four section titles */
  html body .edx .edx-lede { margin-top: 12px; font-size: 16px; }
  html body .edx .edx-open { margin-bottom: var(--m-open-gap); }
  html body .edx .cx__more { margin-top: 28px; }

  /* ---------- The shared selector, then the two modes as a row of cards, edge to edge, snapping ---------- */
  html body .edx .edx-block { gap: 0; }   /* the hidden text column left edit.css's 28 px gap above the row */
  html body .edx .edm-seg { display: grid; width: min(300px, 82vw); margin: 0 auto 20px; }
  html body .edx .edx-panel [data-edx-seg],
  html body .edx .eda__band { display: none; }
  html body .edx .edx-text { display: none; }
  html body .edx [data-mode-pane] { display: flex !important; }   /* both shown; a column (below) */
  html body .edx .edx-visual {
    display: flex; align-items: flex-start; gap: 12px;
    margin-inline: calc(var(--gutter) * -2); padding: 0 calc(var(--gutter) * 2) 8px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: calc(var(--gutter) * 2);
    scrollbar-width: none;
  }
  html body .edx .edx-visual::-webkit-scrollbar { display: none; }
  html body .edx .edx-visual { align-items: stretch; }
  html body .edx .edx-mode { flex: 0 0 min(300px, 82vw); scroll-snap-align: start; display: flex; flex-direction: column; }
  /* The same height for both: the Geometry stage takes the photo's shape (edit-chapters.js lays the crop frame out
     to whatever size it is), and each panel fills what is left of its card. */
  html body .edx .eda__stage--geo { aspect-ratio: 1600 / 1067; }
  html body .edx .edx-mode > .edx-panel { flex: 1 0 auto; }
  /* Light & Color has less to show than Geometry: its two sliders share the panel's height evenly. */
  html body .edx .edx-mode--color > .edx-panel { display: flex; flex-direction: column; justify-content: space-evenly; }
  html body .edx .eda__replay { display: none; }

  /* ---------- Two controls per card ---------- */
  html body .edx .edx-mode--color .eda__ghead,
  html body .edx .edx-mode--color .eda__pad { display: none; }
  html body .edx .edx-mode--color .eda__group { margin: 0; padding: 0; border: 0; }
  html body .edx .edx-mode--color .eda__rows { display: block; }
  html body .edx .edx-mode--color .eda__row { display: none; }
  html body .edx .eda__row:has(#eda-temp),
  html body .edx .eda__row:has(#eda-ev) { display: grid; }
  html body .edx .eda__card--overlay { display: none; }

  /* Aspect Ratio: one row that scrolls sideways (its own scroll, never the cards'). */
  html body .edx .edx-panel .eda__ratios {
    display: flex; gap: 6px;
    margin-inline: -10px; padding: 0 10px;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 16px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 16px), transparent);
  }
  html body .edx .edx-panel .eda__ratios::-webkit-scrollbar { display: none; }
  html body .edx .edx-panel .eda__ratio { flex: 0 0 auto; min-width: 52px; padding-inline: 9px; }
  html body .edx .edx-mode,
  html body .edx .edx-mode > *,
  html body .edx .edx-panel > * { min-width: 0; }      /* or the row's full width widens the card */
}
