/* Phone refinements. Loaded only at widths up to 820px. */
@media(max-width:820px){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea{font-size:16px!important}
  button,a,input,select,textarea,summary{-webkit-tap-highlight-color:#ff658230}
  :where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #ff91b3;outline-offset:4px}
  footer .legal-meta{font-size:11px;line-height:1.7;gap:8px 14px}
  footer .legal-meta a{display:inline-flex;align-items:center;min-height:44px;margin:0;overflow-wrap:anywhere}
  footer>a:not(.brand),footer nav a,.foot a,.footer-right a{display:inline-flex;align-items:center;min-height:44px}
  .privacy-banner{bottom:max(12px,env(safe-area-inset-bottom));max-height:70dvh;overflow-y:auto}
  .privacy-player-placeholder p{font-size:12px!important}
  .privacy-preferences{min-height:44px;font-size:12px}
  .legal-document{font-size:14px;line-height:1.85}
  .legal-document header{flex-wrap:wrap}
  .legal-document nav{gap:8px 18px;font-size:12px}
  .legal-document nav a{display:inline-flex;align-items:center;min-height:44px}
  .legal-document .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .legal-document table{font-size:12px}
  .withdrawal-card button{min-height:44px}
  .withdrawal-main>p>a{display:inline-block;padding-block:12px;overflow-wrap:anywhere}

  /* Main navigation, studio choices and information links. */
  .native-home .burger{min-width:44px;min-height:44px;justify-content:center}
  .native-home .nav-links.open{max-height:calc(100dvh - 70px);overflow-y:auto;overscroll-behavior:contain;gap:8px}
  .native-home .nav-links.open a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 18px}
  .native-home .service-lab-selector{flex-wrap:wrap}
  .native-home .service-lab-selector button{min-height:44px}
  .native-home .studio-action{display:inline-flex;align-items:center;min-height:44px}
  .native-home .studio-caption h3{overflow-wrap:anywhere;min-width:0}
  .native-home .beat-studio-foot a{display:inline-flex;align-items:center;min-height:44px;padding-block:8px}
  .native-home .beat-studio-close,.native-home #beat-studio-close{min-width:44px;min-height:44px}
  .native-home .beat-studio-options article>p,.native-home .beat-studio-heading>p,.native-home .beat-studio-foot{font-size:12px;line-height:1.8}
  .native-home .sound-stage-copy>p,.native-home .studio-description{font-size:13px;line-height:1.8}
  .native-home .merch-drop-lock a{display:inline-flex;align-items:center;min-height:44px}
  .native-home .community-link{min-height:44px;display:inline-flex;align-items:center}
  .native-home .home-footer nav{display:flex;flex-wrap:wrap;gap:4px 18px}
  .native-home .home-footer nav a{font-size:12px}
  .native-home .footer-right>p>a{min-height:44px;display:inline-flex;align-items:center}
  .native-home .dm-close,.native-home .album-popup-close{min-width:44px;min-height:44px;display:grid;place-items:center}
  .native-home .time-popup{max-height:calc(100dvh - 28px);overflow-y:auto;overscroll-behavior:contain}
  .native-home .time-popup .close-btn{min-width:44px;min-height:44px}
  .native-home .public-beat-player .close-btn{width:44px;height:44px;min-width:44px;min-height:44px;z-index:5}
  .native-home .public-beat-player .progress-bar{height:24px;border-block:9px solid transparent;box-sizing:border-box;background-clip:padding-box;cursor:pointer}
  #site-audio-toggle{min-height:44px}

  /* Plugin navigation, features and interface viewer. */
  body:has(#products)>header nav{flex-wrap:wrap;gap:4px 16px}
  body:has(#products)>header nav a{display:inline-flex;align-items:center;min-height:44px}
  .rack .feature-pins button,.rack .expand-interface{min-height:44px}
  .rack .lab-control input{min-height:44px}
  .rack .rack-info .product p{font-size:14px;line-height:1.75}
  .rack .feature-description,.rack .visual-caption{font-size:12px;line-height:1.8}
  .rack .visual-note,.rack .rack-bottom{font-size:10px}
  .interface-dialog{box-sizing:border-box;max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);overflow:auto;overscroll-behavior:contain;padding-top:64px}
  .interface-dialog .close-interface{min-height:44px;top:10px;right:10px}
  #plugin-purchase-info summary,.plugin-purchase-info summary{min-height:44px;align-content:center}

  /* Contact and licence calls to action. */
  .contact-page .contact-form-card{min-width:0}
  .contact-page .contact-form-card label{font-size:12px}
  .contact-page .contact-form-card button[type=submit]{min-height:48px}
  .contact-page .contact-form-card .form-intro{font-size:13px;line-height:1.75}
  .contact-aside .studio-public-rates dl{grid-template-columns:minmax(0,1fr)}
  .contact-aside .studio-public-rates dt{border-bottom:0;padding-bottom:5px;font-size:12px}
  .contact-aside .studio-public-rates dd{justify-content:flex-start;text-align:left;padding-top:0;overflow-wrap:anywhere}
  .licences-page .studio-note a,.licences-page .plugin-terms a{display:inline-flex;align-items:center;min-height:44px}
  .licences-page .route-content p,.licences-page .hero-intro{font-size:12px;line-height:1.8}

  /* Checkout dialogs and standalone checkout; no payment behavior changes. */
  .checkout-close,.checkout-keep,.cart-remove,.store-buy-beat{min-height:44px;min-width:44px}
  .store-checkout-dialog:not(.home-beat-cart){box-sizing:border-box;max-height:calc(100dvh - 20px);max-width:calc(100vw - 20px);overflow:auto;overscroll-behavior:contain}
  .store-checkout-dialog .checkout-close{z-index:5}
  .home-beat-cart .cart-masthead{padding-top:max(16px,env(safe-area-inset-top))}
  .home-beat-cart .cart-footer{padding-bottom:max(18px,env(safe-area-inset-bottom))}
  .home-beat-cart .cart-track-info{min-width:0}
  .home-beat-cart .cart-track-info strong{overflow-wrap:anywhere}
  body:has(#checkout) .back,body:has(#checkout) .details summary{display:inline-flex;align-items:center;min-height:44px}
  body:has(#checkout) .payment{min-width:0}

  /* Vault: every destination stays visible, above a fully reachable studio scene. */
  body:has(.rooms-m) .top{grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;padding:10px 16px}
  body:has(.rooms-m) .top .brand{grid-column:1;grid-row:1;min-width:0;width:max-content}
  body:has(.rooms-m) .top .brand img{width:64px;height:44px;object-fit:contain}
  body:has(.rooms-m) .top .brand small{display:none}
  body:has(.rooms-m) .mv-btn{grid-column:2;grid-row:1;min-height:44px}
  body:has(.rooms-m) .nav{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;min-width:0;width:100%;overflow:visible}
  body:has(.rooms-m) .nav a{display:flex;align-items:center;justify-content:center;min-height:44px;font-size:10px;letter-spacing:.04em;padding:8px 0}
  body:has(.rooms-m) .scene{margin-top:0}
  body:has(.rooms-m) .hs-dot{flex-basis:44px;height:44px}
  body:has(.rooms-m) .rooms-m span{font-size:10px;line-height:1.6}
  body:has(.rooms-m) .dr-close,body:has(.rooms-m) .ib,body:has(.rooms-m) .modal .x{min-width:44px;min-height:44px}
  body:has(.rooms-m) .drawer{height:84dvh;max-height:calc(100dvh - env(safe-area-inset-top));padding-bottom:env(safe-area-inset-bottom)}
  body:has(.rooms-m).drawer-open{overflow:hidden}
  body:has(.rooms-m) .dr-list{overscroll-behavior:contain}
  body:has(.rooms-m) .modal{box-sizing:border-box;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
}
@media(max-width:480px){
  .native-home .service-lab-selector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0 6%}
  .native-home .service-lab-selector button{min-width:0;width:100%;padding:10px 8px}
  .native-home .studio-caption h3{font-size:clamp(34px,9vw,43px)}
  .native-home .studio-description{min-height:0}
  .contact-aside .studio-public-rates dd{font-size:24px;line-height:1.3}
  .licences-page .plugin-terms>div{flex-wrap:wrap}
}
@media(max-width:820px){
 .native-home .masthead{gap:8px;padding-inline:14px}
 .native-home .masthead .wordmark{min-width:0;flex-shrink:1;gap:8px;font-size:14px;line-height:1.1;white-space:normal}
 .native-home .masthead .wordmark>span:last-child{max-width:105px}
 .native-home .masthead .donut-mark{width:34px;height:34px;flex-shrink:0}
 .native-home .dm-modal:not(.show),.native-home .dm-overlay:not(.show){visibility:hidden}
 .native-home .dm-modal{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
 .site-audio-toggle{min-height:44px}
}
@media(max-height:500px) and (pointer:coarse){
 input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea{font-size:16px!important}
 .time-popup,.interface-dialog,.store-checkout-dialog:not(.home-beat-cart){max-height:calc(100dvh - 20px);overflow-y:auto;overscroll-behavior:contain}
 .privacy-banner{max-height:70dvh;overflow-y:auto}
}
@media(max-width:820px){
 body:has(.rooms-m) .modal:not(.show),body:has(.rooms-m) .drawer[aria-hidden=true]{visibility:hidden}
 .purchase-info summary{min-height:44px;align-content:center}
 .purchase-info-links a,.purchase-info-heading a{display:inline-flex;align-items:center;min-height:44px}
}
@media(max-width:620px){
 .native-home .time-popup.public-beat-player .volume-control{display:none!important}
 body:has(.public-beat-player.show) .site-audio-toggle,body:has(dialog[open]) .site-audio-toggle{visibility:hidden}
}
