/* Public mobile layouts. Desktop artwork and application styles stay independent. */
@media (max-width: 991px) {
  .marketing-homepage { overflow-x:visible; }
  /* Keep primary content readable without waiting for scroll-triggered reveals. */
  .marketing-homepage .wow { visibility: visible !important; animation: none !important; }
  .marketing-homepage .header h1 { font-size:clamp(30px,8vw,46px); line-height:1.2; overflow-wrap:anywhere; }
  .marketing-homepage h2 { font-size:clamp(28px,8vw,36px); line-height:1.3; overflow-wrap:anywhere; }
  .marketing-homepage h3 { font-size:clamp(22px,6.5vw,28px); line-height:1.35; overflow-wrap:anywhere; }
  /* Viewport-height image sizing can exceed a narrow phone's width. */
  .marketing-homepage .promo .col {
    flex: 0 1 360px;
    width: calc(100% - 32px);
    min-width: 0;
    max-width: calc(100% - 32px);
    margin: 20px 16px;
  }

  .marketing-homepage .promo img.kickstarter {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: auto 662 / 200;
    margin: 0 auto;
  }

  .marketing-homepage .app-img-wrapper {
    padding-right: 16px;
    padding-left: 16px;
  }

  .marketing-homepage .app-img-wrapper picture {
    display: block;
    width: 100%;
    max-width: 354px;
    margin: 0 auto;
  }

  .marketing-homepage .app-img-wrapper img {
    display: block;
    width: 100%;
    max-width: 354px;
    height: auto;
    aspect-ratio: auto 354 / 650;
    margin: 0 auto;
  }

  .marketing-homepage .probes img {
    display: block;
    float: none;
    width: calc(100% - 32px);
    max-width: 380px;
    height: auto;
    aspect-ratio: auto 532 / 882;
    margin: 0 auto;
  }

  /* Size long translated headings from the available width, not phone height. */
  .marketing-homepage .comp-title,
  .marketing-homepage .growtent-column h2,
  .marketing-homepage .dev-feat h2,
  .marketing-homepage .outside h2,
  .marketing-homepage .main-app h2,
  .marketing-homepage #technical h2 {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .marketing-homepage .comp-title {
    margin-right: 16px;
    margin-left: 16px;
  }

  .marketing-homepage .comp-title img {
    width: 140px;
    max-width: 100%;
    height: auto;
  }

  .marketing-homepage .outside {
    width: calc(100% - 32px);
    max-width: 360px;
    margin-right: 16px;
    margin-left: 16px;
  }

  .marketing-homepage .outside h2 {
    float: none;
    max-width: 100%;
  }

  /* Replace the legacy 50px insets and percentage floats with usable columns. */
  .marketing-homepage .technical-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
    clear: both;
    float: none;
    width: 100%;
    margin: 24px auto;
    padding: 0 16px 24px;
  }

  .marketing-homepage .technical-row h3 {
    grid-column: 1 / -1;
    margin: 0;
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .marketing-homepage .technical-column {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
  }

  .marketing-homepage .technical-column h4,
  .marketing-homepage .technical-column p {
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
}

/* The existing homepage keeps its stacked layout through tablet widths. */
@media (min-width:768px) and (max-width:991px) {
  .marketing-homepage .container > .row { margin-left:0; margin-right:0; }
  .marketing-homepage .technical-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

@media (max-width: 767px) {
  /* Let translated shop copy determine the panel height. */
  .shop-page .main-item-text { height:auto; min-height:400px; padding:24px 16px; }
  .shop-page .main-item-text h2 { margin:0 0 20px; padding:0; font-size:clamp(24px,6.2vw,30px); line-height:1.35; }
  .shop-page .main-item-text p { font-size:18px; line-height:1.5; margin-bottom:12px; }
  .shop-page .accessories-selector { display:flex; align-items:center; gap:12px; padding:16px 12px; }
  .shop-page .accessories-selector h3 { flex:1; min-width:0; margin:0; padding:0; font-size:20px; line-height:1.4; overflow-wrap:anywhere; }
  .shop-page .accessories-selector > i { flex:none; margin:0; padding:0; font-size:22px; }
  /* Expanded categories must also fit after rotation or late image/font loading. */
  .shop-page .accessories-selector.active + .acc-content { max-height:none !important; }
  .shop-page .add-item, .shop-page .rem-item { width:44px; height:44px; }
  .shop-page input.quantity { min-height:44px; }
  .shop-page select { font-size:16px; }

  /* Keep the cart as a readable table, including unit prices and totals. */
  .shop-page .item-list .desc { width:30%; }
  .shop-page .item-list .unit-price { width:30%; }
  .shop-page .item-list .price { width:27%; }
  .shop-page .item-list .qty { width:13%; }
  .shop-page .item-list th, .shop-page .item-list td { padding:12px 5px; line-height:1.45; }
  .shop-page .item-list th { font-size:12px; }
  .shop-page .item-list td { font-size:13px; }
  .shop-page .item-list .qty { text-align:center; }
  .shop-page .item-list .smallimg { margin:0 0 8px; }
  .shop-page .cart-button { width:100%; padding:10px 4px; margin:0; font-size:12px; line-height:1.5; }
  .shop-page .shipping { min-width:0; width:100%; }

  /* Tutorial content remains in its original language, but fits its dialog. */
  [data-support-content-root] .modal-body img { max-width:100%; height:auto; }
  [data-support-content-root] .tut-video { width:100%; height:auto; aspect-ratio:16 / 9; }
  [data-support-content-root] .modal-body p { text-align:left; line-height:1.5; overflow-wrap:anywhere; }
  [data-support-content-root] .support-link,
  [data-support-content-root] a.modal-support-link { min-height:44px; padding:10px 0; }
  .shop-page .modal-header, [data-support-content-root] .modal-header { position:relative; padding:16px 44px 16px 16px; }
  .shop-page .modal-title, [data-support-content-root] .modal-title { font-size:20px; line-height:1.4; overflow-wrap:anywhere; }
  .shop-page .modal-header .close, [data-support-content-root] .modal-header .close { position:absolute; top:4px; right:4px; width:40px; height:40px; margin:0; }
  .shop-page .modal-body, [data-support-content-root] .modal-body { padding:16px; }
  .shop-page .modal-body ul, [data-support-content-root] .modal-body ul { padding-left:22px; }
}

@media (max-width:359px) {
  .shop-page .head .top-selector-div { flex-basis:100%; }
}
