/* ============================================================================================
   PHONE (≤ 760 px). Loaded last. Everything goes to one column, 16 px side gutter,
   no horizontal page scroll; long option rows scroll sideways inside themselves.
   ============================================================================================ */
@media (max-width: 760px) {
  :root { --pad: 16px; --sec: 56px; }
  html, body { overflow-x: clip; }
  .wrap, .wrap.fin, .wrap.why, .wrap.area, .wrap.faq, .wrap.final { grid-template-columns: minmax(0, 1fr) !important; gap: 24px !important; padding-left: 16px !important; padding-right: 16px !important; box-sizing: border-box; max-width: 100% !important; }
  .head { grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; margin-bottom: 24px !important; }
  .h2 { font-size: 30px !important; line-height: 1.12 !important; }

  /* ---------- what's included ---------- */
  .inc { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
  .inc-list li { padding: 10px 12px 10px 46px !important; }
  .mx-h { grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; max-width: none !important; padding: 0 16px; box-sizing: border-box; }
  .mx-me { width: 100%; box-sizing: border-box; }
  .mx-me .ps-parts { max-width: 100% !important; white-space: normal !important; }
  .mx-strip { height: 420px !important; }
  .mx-info p { font-size: 14px !important; }
  .pr2 { grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; padding: 16px !important; }
  .pr2 .cta-hot, .pr2 .cta-ghost { width: 100%; justify-content: center; box-sizing: border-box; }

  /* ---------- strips "your pool" ---------- */
  .back { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; padding: 14px 16px !important; }
  .back > * { min-width: 0; }
  .back-r { justify-content: flex-start !important; flex-wrap: wrap; }

  /* ---------- work gallery, steps, finance, why ---------- */
  .gal { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .gal > :first-child { grid-column: 1 / -1; }
  .tl2 { grid-template-columns: minmax(0, 1fr) !important; }
  .tl2-stops span, .tl2-stops button { font-size: 11px !important; }
  .calc { grid-template-columns: minmax(0, 1fr) !important; width: 100% !important; box-sizing: border-box; padding: 18px !important; }
  .calc-cfg-h { flex-wrap: wrap; gap: 6px; }
  .wrap.why > :first-child:empty, .wrap.why > figure:first-child { display: none; }
  .feats { grid-template-columns: minmax(0, 1fr) !important; }
  .why-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px !important; }

  /* ---------- reviews: cards fit the phone ---------- */
  .rv { width: min(300px, 80vw) !important; }

  /* ---------- map, faq, final form ---------- */
  .area .map, .map { aspect-ratio: 1 / 1 !important; border-radius: 20px !important; }
  .area .map iframe { height: 100% !important; }
  .faq-pic { display: none; }
  .faq summary { font-size: 15px !important; }
  .final .form, #leadForm { width: 100% !important; box-sizing: border-box; padding: 20px !important; }
  .mine { max-width: none; }
  .ways button { grid-template-columns: 36px 1fr 18px !important; padding: 12px !important; }
  .l3-nav { grid-template-columns: auto 1fr; }

  /* ---------- sticky bar: picture, monthly price and the button ---------- */
  .hook { left: 8px !important; right: 8px !important; width: auto !important; transform: translateY(150%) !important; gap: 8px !important; padding: 6px !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
  .hook .hook-g, .hook [data-top], .hook .ps-parts, .hook-t small, .hook-t span:not(:first-child) { display: none !important; }
  .hook-pic, .hook .mini { width: 64px !important; flex: none; }
  .hook .cta-hot { padding: 0 14px !important; font-size: 14px !important; white-space: nowrap; margin-left: auto; }
  .hook-t { min-width: 0; font-size: 14px !important; }
  .hook.on { transform: none !important; }
  .hook-t > b { white-space: nowrap; font-size: 14px !important; }

  /* ---------- popup: calculator on top, form below, whole thing scrolls ---------- */
  .modal { align-items: flex-start !important; padding: 0 !important; overflow-y: auto; }
  .modal-box { grid-template-columns: minmax(0, 1fr) !important; width: 100% !important; max-width: none !important; min-height: 100%; border-radius: 0 !important; max-height: none !important; }
  .modal-side { padding: 16px !important; }
  .modal-box > :not(.modal-side) { padding: 20px 16px 32px !important; }
  .modal-x { position: fixed !important; top: 10px !important; right: 10px !important; z-index: 5; }
  .pl-r { grid-template-columns: 52px minmax(0, 1fr) !important; }
  .pl .chips, .pl .sws { flex-wrap: wrap; }

  /* ---------- footer ---------- */
  .footer-content { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 28px 16px !important; padding: 0 16px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start !important; padding: 16px; }

  /* ---------- second pass: gallery, strips, timeline, faq, footer ---------- */
  .gal > * { aspect-ratio: 4 / 3; height: auto !important; grid-row: auto !important; min-height: 0 !important; }
  .gal > :first-child { aspect-ratio: 16 / 10; }
  .back-l { display: grid !important; grid-template-columns: 120px minmax(0, 1fr); gap: 12px !important; align-items: center; }
  .back-l .back-pic { width: 120px !important; }
  .back-l > div:not(.mini) { width: auto !important; min-width: 0; }
  .back-l b { white-space: normal !important; font-size: 10.5px !important; }
  .back-r { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
  .back-r > * { justify-content: center; min-width: 0; font-size: 13px !important; padding-left: 8px !important; padding-right: 8px !important; }
  .tl2-pic { height: auto !important; aspect-ratio: auto !important; max-height: none !important; min-height: 0 !important; padding-top: 75%; overflow: visible !important; background: none !important; }
  .tl2-pic > img { inset: 0 0 auto 0 !important; height: auto !important; aspect-ratio: 4 / 3; border-radius: 18px; object-fit: cover; }
  .tl2-pic .tl-play { top: 12px !important; right: 12px !important; bottom: auto !important; }
  .tl2-card, .tl2-card.pop { position: static !important; width: auto !important; transform: none !important; margin: 12px 0 0 !important; max-width: none !important; }
  .tl2-stops span { display: none !important; }
  .wrap.faq > :first-child, .wrap.why > :first-child { position: static !important; }
  .why-pic, .wrap.why figure { aspect-ratio: 4 / 3; height: auto !important; }
  .mine { grid-template-columns: minmax(0, 1fr) !important; padding: 12px !important; }
  .mine .mine-pic { grid-row: auto !important; grid-column: 1 !important; width: 100% !important; margin-bottom: 6px; }
  .mine > :not(.mine-pic) { grid-column: 1 !important; }
  .footer-content { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-bottom { display: flex !important; flex-direction: column; gap: 6px; padding: 16px !important; }
  .gal { grid-template-rows: none !important; grid-auto-rows: auto !important; }
  .tl2-track { position: relative !important; inset: auto !important; margin: 22px 13px 0 !important; width: auto !important; }
  .tl2 { display: block !important; }
  .tl2 > * { grid-area: auto !important; }
}

/* hero stacks on tablets too: the option panel is unreadable on the picture below ~1024 px */
@media (max-width: 1024px) {
  /* ---------- hero: picture strip, then text, options and price ---------- */
  .hero { height: auto !important; min-height: 0; padding-bottom: 24px; background: #FBFAF6; }
  .hero.night { background: #0B121C; }
  .wash, .tip, .draft { display: none !important; }
  .top { padding: 12px 16px !important; }
  .top .brand { font-size: 15px !important; }
  .top-r .tel, .top-r a[href^="tel"] { display: none !important; }
  .copy { width: auto !important; margin: 0 !important; padding: calc(var(--stage, 260px) + 24px) 16px 0 !important; gap: 14px !important; }
  .copy h1, .copy .h1 { font-size: 34px !important; line-height: 1.08 !important; }
  .copy .sub { font-size: 15px !important; max-width: none !important; }
  .copy .eyebrow, .copy .kick { font-size: 11px !important; }
  .hero .scene, #deckui { pointer-events: none; }

  /* option panel under the text: each group on its own line, chips scroll sideways */
  .copy .dui { position: static !important; width: auto !important; left: auto !important; top: auto !important; display: grid; gap: 8px; pointer-events: auto; }
  .copy .dui .r { display: contents; }
  .copy .dui .blk { height: auto !important; min-height: 46px; padding: 6px 6px 6px 12px !important; border-radius: 14px !important; overflow-x: auto; scrollbar-width: none; gap: 8px !important; }
  .copy .dui .blk::-webkit-scrollbar { display: none; }
  .copy .dui .cap { font-size: 10.5px !important; min-width: 48px; }
  .copy .dui .seg button { height: 34px !important; padding: 0 10px !important; font-size: 14px !important; }
  .copy .dui .chips { flex-wrap: nowrap; }
  .copy .dui .chips button { height: 34px !important; padding: 0 10px !important; font-size: 14px !important; white-space: nowrap; flex: none; }
  .copy .dui .sws button { width: 40px !important; height: 30px !important; flex: none; }
  .copy .dui .night-only { display: none !important; }
  .hero.night .copy .dui .night-only { display: flex !important; opacity: 1; visibility: visible; transform: none; }
  .quote { padding: 16px !important; }
  .q-top { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  .q-r { flex-direction: row !important; flex-wrap: wrap; justify-content: space-between; text-align: left !important; }

  .copy > * { max-width: 680px; }
}

/* touch screens: "tap" instead of "hover" in the hints */
.ptr-t { display: none; }
@media (hover: none) { .ptr-f { display: none; } .ptr-t { display: inline; } }

/* ---------- touch comfort: every control at least ~40 px tall, small caps not below 11 px ---------- */
@media (max-width: 1024px) {
  .lang button, .pill.lang button { min-width: 44px; min-height: 36px; padding: 0 10px !important; }
  .top .brand { white-space: nowrap; }
  .copy .dui .sws button { width: 46px !important; height: 38px !important; }
  .copy .dui .seg button, .copy .dui .chips button { height: 40px !important; }
  .copy .dui .cap { font-size: 11px !important; }
  .q-size .seg button, .q-down .seg button { min-width: 52px; height: 36px !important; padding: 0 12px !important; font-size: 14px !important; display: inline-flex; align-items: center; justify-content: center; }
  .q-l, .q-down > span, .q-size > span, .q-note, .kw { font-size: 11px !important; }
}
@media (max-width: 760px) {
  .inc-tabs button { height: 38px !important; min-height: 0 !important; padding: 0 14px !important; }
  .inc-pic { margin-bottom: 58px !important; overflow: visible !important; }
  .inc-pic > .inc-cut, .inc-pic > .live { border-radius: inherit; overflow: hidden; }
  .inc-list li.on .inc-x { max-height: 320px !important; }
  .inc-list li.on > span[lang] { max-height: 200px !important; }
  .inc-tabs { top: calc(100% + 10px) !important; left: 0 !important; right: auto !important; bottom: auto !important; }
  .inc .dot { width: 36px !important; height: 36px !important; margin: -18px 0 0 -18px !important; font-size: 13px !important; }
  .inc-add, .inc-x button { min-height: 36px !important; padding: 0 14px !important; }
  .tl2-knob { width: 32px !important; height: 32px !important; }
  .tl2-knob::after { content: ""; position: absolute; inset: -10px; }
  .calc-term button, #cTerm button { min-height: 40px !important; }
  .calc-cfg-h a, .back-r .cta-ghost { min-height: 40px; display: inline-flex; align-items: center; }
  .tel, .faq-tel, .mine-edit { display: inline-flex !important; align-items: center; min-height: 40px; }
  .footer-col a { display: block; padding: 6px 0; }
  .footer-col a + a { margin-top: 0 !important; }
  .back-l b, .back-l b span, .footer-col h4, .footer-col h4 span, .footer-brand .tagline, .footer-brand .tagline span { font-size: 11px !important; }
  .q-more, .q-note { font-size: 12px !important; }
}

/* ---------- narrow phones (≤ 380 px) ---------- */
@media (max-width: 760px) {
  .calc-term { gap: 8px !important; }
  .calc-term .seg, .calc-term > div { flex: 1; display: flex; }
  .calc-term button, #cTerm button { flex: 1; min-width: 0 !important; padding: 0 6px !important; }
  .why-stats { gap: 8px !important; }
  .why-stats .ws b, .why-stats .ws strong { font-size: 22px !important; }
  .mine .gc-t b { white-space: normal !important; }
  .mine .gc { max-width: 100%; box-sizing: border-box; } .mine .gc-t { min-width: 0; flex: 1; }
}
@media (max-width: 380px) {
  .hook-pic, .hook .mini { display: none !important; }
  .hook-t > b { font-size: 13px !important; }
  .hook .cta-hot { padding: 0 12px !important; font-size: 13px !important; }
  .why-stats .ws span, .why-stats .ws small { font-size: 11px !important; }
  .copy h1, .copy .h1 { font-size: 30px !important; }
  .top .brand { font-size: 13.5px !important; }
  .copy .dui .sws button { width: 40px !important; }
  .copy .dui .sws { gap: 5px !important; }
}

/* phone: the gift tag on the picture is drawn in scene pixels (scene is scaled ~0.21), so it gets scene-sized letters */
@media (max-width: 760px) {
  #gift { gap: 22px !important; padding: 22px 40px 22px 24px !important; border-radius: 40px !important; }
  #gift svg { width: 92px !important; height: 92px !important; padding: 19px !important; border-radius: 28px !important; }
  #gift b { font-size: 58px !important; }
  #gift small { font-size: 38px !important; margin-top: 8px !important; }
}
@media (max-width: 420px) {
  .pl .sws { flex-wrap: nowrap !important; gap: 5px !important; }
  .pl .sws button { width: 38px !important; height: 30px !important; flex: none; }
  .pl-r em[data-row="deckname"] { display: none; }
}

/* footer cities and the sticky bar on a phone, in every language */
@media (max-width: 760px) {
  .pool-footer .footer-cities { grid-column: 1 / -1; grid-template-columns: 1fr 1fr !important; }
  .hook-t > b { white-space: normal !important; line-height: 1.2 !important; font-size: 13.5px !important; }
  .hook .cta-hot { flex: none; }
  .pool-footer .footer-bottom .kz { margin-left: 0; order: 0; }
}
