/* JRSY v30: mobile & small-tablet layout repairs. Desktop storefront remains unchanged. */
html { max-width:100%; }
/* Critical intrinsic-size guards: prevent long merchant copy and spec fields from forcing a horizontal viewport. */
#storefront, #storefront section, #storefront section > div, .store-footer,
#collection #productGrid, #studio .grid, #craft .grid, #modalBox .grid,
#studio .grid > div, #craft .grid > div, .luxury-white-card, .product-card-info,
#studio #labDesc, #studio #labFit, #studio #labMaterial { min-width:0; max-width:100%; }
#storefront p, #storefront h1, #storefront h2, #storefront h3, #storefront h4,
#storefront h5, .product-card-info *, #modalBox p, .cart-line,
#labFit { overflow-wrap:break-word; }
#labFit { white-space:normal; }
#productGrid .luxury-white-card { max-width:100%; }
.product-card-info .product-price { white-space:normal; overflow-wrap:anywhere; }
#modalBox, #drawerPanel { max-width:100vw; }
#modalBox img, .product-photo img { max-width:100%; }
@media (max-width: 767px) {
  html, body { width:100%; max-width:100%; margin:0; }
  body { font-size:14px; }
  /* Navigation: never allow JRSY + three actions to run past the phone edge. */
  html { scroll-padding-top:76px; }
  #mainNavbar { height:58px !important; min-height:58px; padding:0; }
  #mainNavbar.nav-hidden { transform:none !important; opacity:1 !important; }
  #mainNavbar > div { width:100%; min-width:0; padding-left:14px !important; padding-right:14px !important; gap:8px; }
  #mainNavbar .header-brand { min-width:0; flex:0 1 auto; }
  #mainNavbar .header-brand .brand-frame { max-width:88px; }
  #mainNavbar > div > div:last-child { min-width:0; flex-shrink:0; gap:7px; }
  #mainNavbar button { flex-shrink:0; }
  #mainNavbar [data-action="open-cart"] { min-height:35px; padding:7px 10px; border-radius:999px; font-size:10px; white-space:nowrap; }
  #mainNavbar [data-action="open-cart"] svg { height:15px; width:15px; }
  .mobile-menu-button { min-width:36px; min-height:36px; width:36px; height:36px; }
  #soundBtn { width:34px; height:34px; }
  .mobile-menu { top:58px; max-height:calc(100dvh - 58px); overflow-y:auto; }
  #storeNotice { padding:9px 14px; line-height:1.5; font-size:11px; }
  .hero-container { padding:90px 20px 35px !important; min-height:560px; height:100svh; gap:22px; }
  .hero-container > div.relative { width:100%; min-width:0; }
  .hero-container h1 { font-size:clamp(25px,8vw,36px); }
  .hero-container p { font-size:13px; line-height:1.6; max-width:30ch; }
  .hero-container .luxury-btn { padding:12px 19px; font-size:10px; }
  .jrsy-delivery-band { padding:14px 18px; }
  .jrsy-delivery-band p { font-size:12px; line-height:1.6; }
  .marquee-track { font-size:10px; }
  /* Uniform rhythm throughout storefront, no 6rem blank spaces on mobile. */
  #collection, #studio, #craft, #sizeguide, #archive { padding:48px 18px !important; }
  #collection > div:first-child { margin-bottom:24px; padding-bottom:22px; gap:10px; }
  #collection h3, #studio h3, #archive h3, #craft h3, #sizeguide h2 {
    font-size:clamp(25px,7.5vw,34px) !important;
    line-height:1.17 !important; letter-spacing:.015em; overflow-wrap:normal; word-break:normal;
  }
  #collection p, #studio p, #craft p, #sizeguide p, #archive p { line-height:1.65; }
  #productGrid { gap:18px; grid-template-columns:minmax(0,1fr); }
  #productGrid .luxury-white-card { padding:16px; border-radius:21px; }
  #productGrid .luxury-white-card:hover { transform:none; }
  #productGrid .product-photo { aspect-ratio:5/5.4; }
  #productGrid .product-card-info { padding-top:12px; }
  #productGrid .product-card-info h3 { font-size:clamp(16px,4.8vw,19px); line-height:1.35; margin:5px 0; }
  #productGrid .product-price { font-size:14px; line-height:1.5; margin:7px 0; letter-spacing:0; }
  #productGrid .product-view { padding-top:12px; margin-top:12px; }
  #studio > div:first-child { gap:18px; margin-bottom:25px; }
  #studio > div:first-child > div:last-child { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; width:100%; border-radius:17px; }
  #studio [data-color] { width:100%; min-width:0; min-height:40px; padding:8px 9px; font-size:11px; }
  #studio > div:nth-child(2) { display:grid; grid-template-columns:minmax(0,1fr); gap:19px; padding:17px !important; border-radius:22px; }
  #studio > div:nth-child(2) > div { min-width:0; }
  #studio > div:nth-child(2) > div:first-child { padding:12px !important; border-radius:16px; }
  #labImg { width:100%; height:auto; max-height:310px; object-fit:contain; }
  #studio #labBadge { display:inline-block; padding:6px 9px; line-height:1.35; white-space:normal; font-size:10px; }
  #studio #labTitle { font-size:clamp(22px,6.4vw,30px) !important; min-height:0; line-height:1.2 !important; margin-top:10px; word-break:normal; overflow-wrap:anywhere; }
  #studio #labDesc { font-size:13px; line-height:1.6; margin-top:11px; overflow-wrap:anywhere; }
  /* Two small facts and a full-width fit note: long owner-verification copy must never clip. */
  #studio .grid-cols-3 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) !important; column-gap:12px; row-gap:14px; padding:16px 0; }
  #studio .grid-cols-3 > div { min-width:0; padding:0 2px; }
  #studio .grid-cols-3 > div:last-child { grid-column:1 / -1; padding-top:12px; border-top:1px solid #e4e4e7; }
  #studio #labWeight { font-size:26px; line-height:1.2; }
  #studio #labMaterial { font-size:16px; line-height:1.45; overflow-wrap:anywhere; }
  #studio #labFit { font-family:Montserrat,Arial,sans-serif; font-size:13px !important; line-height:1.5 !important;
    letter-spacing:0; font-weight:650; overflow-wrap:anywhere; word-break:normal; hyphens:auto; }
  #studio .grid-cols-3 span:last-child { font-size:10px; }
  #studio #labOrderBtn { min-height:48px; font-size:11px; padding:13px 12px; }
  #craft > .grid { gap:24px; grid-template-columns:minmax(0,1fr); }
  #craft > .grid > div { min-width:0; }
  #craft .space-y-6 { row-gap:12px; }
  #craft .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top:14px; }
  #craft .space-y-4 { padding-top:0; }
  #craft .space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top:10px; }
  #craft .space-y-4 > div { padding:15px; border-radius:14px; gap:10px; }
  #craft .space-y-4 > div svg { flex:0 0 16px; margin-top:3px; }
  #craft .space-y-4 > div > div { min-width:0; }
  #craft .space-y-4 h5 { font-size:14px; line-height:1.4; }
  #craft .space-y-4 p { font-size:12px; line-height:1.55; margin-top:4px; }
  #craft > .grid > div:last-child { padding:18px !important; border-radius:20px; }
  #craft img { width:100%; max-height:320px; object-fit:contain; }
  #sizeguide .measurement-layout { margin-top:20px; gap:18px; }
  #sizeguide .measurement-layout img { width:100%; height:auto; max-height:340px; object-fit:contain; }
  #sizeguide .measurement-layout p { margin-bottom:12px; font-size:13px; }
  #archive > div:first-child { margin-bottom:24px; }
  #archive h3 { max-width:100%; text-align:center; overflow-wrap:break-word; }
  #archive .store-faq { margin-top:18px; }
  #archive .store-faq details { padding:18px 16px; margin:10px 0; background:#17191f; border:1px solid rgba(255,255,255,.15); border-radius:15px; }
  #archive .store-faq summary { font-size:14px; line-height:1.55; }
  #archive .store-faq p { font-size:12px; line-height:1.6; }
  #storefront > section:not([id]):last-child { padding:50px 18px !important; }
  #newsletterForm { max-width:100%; }
  #newsletterForm input { min-width:0; height:46px; font-size:16px; }
  #newsletterForm button { min-height:46px; }
  #storefront .newsletter-consent { text-align:left; }
  footer { padding:42px 20px !important; }
  .store-footer { gap:22px; }
  .store-footer a, .store-footer p { overflow-wrap:anywhere; }
  .footer-brand-row { flex-wrap:wrap; gap:10px; }
  .footer-links { gap:12px 18px; }
  /* Modals & cart: all interactive items remain reachable by touch and keyboard. */
  #modalBox { width:100%; padding:22px 16px; max-height:calc(100dvh - 20px); }
  #modalBox > .grid { gap:16px; }
  #modalBox > .grid > div { min-width:0; }
  #modalBox > .grid > div:first-child { min-height:0; height:auto; max-height:245px; padding:14px; }
  #modalBox #mImg { max-height:210px; width:100%; object-fit:contain; }
  #mTitle { font-size:clamp(20px,6vw,26px); line-height:1.2; margin-top:12px; }
  #modalBox .grid-cols-3 { min-width:0; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; }
  #modalBox .grid-cols-3 > div { padding:9px 5px; min-width:0; }
  #mWeight, #mMaterial, #mFit { display:block; font-size:11px !important; line-height:1.4; overflow-wrap:anywhere; font-family:Montserrat,Arial,sans-serif; }
  #modalBox #sizeOptions { flex-wrap:wrap; }
  #drawerPanel { width:100%; max-width:min(100vw,420px); padding:20px 17px max(20px,env(safe-area-inset-bottom)); }
  .cart-line { grid-template-columns:60px minmax(0,1fr); gap:12px; }
  .cart-line > div { min-width:0; }
  .cart-line h5 { overflow-wrap:anywhere; }
  .cart-controls { flex-wrap:wrap; gap:8px; }
  .document-page, .document-card { min-width:0; }
}
@media (max-width: 359px) {
  #mainNavbar .brand-word { font-size:20px; }
  #mainNavbar [data-action="open-cart"] { padding:7px 7px; }
  #mainNavbar > div { padding-left:9px !important; padding-right:9px !important; gap:4px; }
  #mainNavbar > div > div:last-child { gap:4px; }
  #collection, #studio, #craft, #sizeguide, #archive { padding-left:14px !important; padding-right:14px !important; }
  #studio > div:nth-child(2) { padding:13px !important; }
}
@media (min-width:768px) and (max-width:1023px) {
  #studio .grid-cols-3 > div, #modalBox .grid-cols-3 > div { min-width:0; }
  #studio #labFit { font-size:clamp(12px,1.5vw,16px); line-height:1.5; overflow-wrap:anywhere; }
  #productGrid .product-card-info { min-width:0; }
}
