/* Final phone layout layer. Desktop styling remains owned by the main stylesheets. */
.mobile-menu-language { display:none; }
@media (max-width:820px) {
  header .language-picker { display:none !important; }
  header .tabs .mobile-menu-language { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; gap:12px; margin-top:8px; padding:12px 8px 4px; border-top:1px solid rgba(24,65,143,.13); color:#174487; font-size:.82rem; font-weight:750; }
  .mobile-menu-language > div { display:flex; gap:6px; }
  .mobile-menu-language [data-language-option] { min-width:44px; min-height:40px; padding:7px 9px; border:1px solid rgba(37,99,235,.2); border-radius:9px; background:#fffdf9; color:#174487; font:inherit; }
  .mobile-menu-language [data-language-option]:is(:hover,:focus-visible,[aria-current="true"]) { background:#dceaff; border-color:#2563eb; }
  .mobile-menu-language [data-language-option]:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }
  .mobile-menu-language :is(.button-led-core,.button-led-halo) { display:none; }
  header .desktop-primary-nav { display:flex; flex:1 1 0; min-width:0; align-self:center; margin:0; }
  header .desktop-primary-nav .navtab { display:none; }
  header .desktop-primary-nav .navtab:is([data-view="shop"],[data-view="cart"]) {
    display:flex; flex:1; flex-direction:row; align-items:center; justify-content:center; gap:6px;
    width:100%; min-width:0; min-height:46px; padding:7px 5px;
    border:0; border-radius:11px; font-size:.85rem; line-height:1.1;
    color:#174487; background:rgba(235,243,255,.72);
  }
  header .desktop-primary-nav .navtab[data-view="shop"].active { background:#dceaff; }
  header .desktop-primary-nav .navtab[data-view="cart"] { display:none; position:relative; }
  body:has(#view-shop.active) header .desktop-primary-nav .navtab[data-view="shop"] { display:none; }
  body:has(#view-shop.active) header .desktop-primary-nav .navtab[data-view="cart"] { display:flex; }
  header .desktop-primary-nav .cart-badge { position:absolute; top:1px; right:2px; min-width:17px; height:17px; margin:0; padding:0 3px; font-size:.56rem; }
  header .desktop-primary-nav .topbar-icon { width:27px; height:27px; flex:0 0 27px; margin:0; }
}
@media (max-width:760px) {
  html { overflow-x:hidden; scroll-padding-top:76px; }
  body { width:100%; min-width:0; overflow-x:hidden; }
  img,video,svg { max-width:100%; }
  .shell { width:calc(100% - 24px); max-width:none; }
  .view,.content,.profile-workspace,.admin-workspace,.admin-section-content { min-width:0; }

  /* Keep the Shop/Cart shortcut and login label visible beside navigation. */
  header,header .nav { height:64px; }
  header .nav { width:calc(100% - 16px); display:grid; grid-template-columns:42px clamp(68px,22vw,122px) minmax(64px,1fr) 100px; gap:4px; }
  .mobile-menu-toggle { width:42px; height:42px; flex:0 0 42px; margin:0; }
  header .brand { min-width:0; width:100%; height:58px; overflow:hidden; }
  header .header-logo { width:100%; max-width:122px; height:58px; object-fit:contain; object-position:left center; }
  header .language-picker { display:none !important; }
  header .language-toggle { width:41px; min-width:41px; height:39px; padding:0 5px; }
  header .account-control { display:flex !important; visibility:visible; width:100px; height:46px; }
  header .account-btn { width:100px; min-width:0; height:46px; gap:3px; padding:5px 6px !important; }
  header .account-btn #accountLabel { display:block !important; min-width:0; max-width:65px; overflow:hidden; font-size:.68rem !important; text-overflow:ellipsis; white-space:nowrap; }
  header img.account-icon { width:24px; height:24px; flex:0 0 24px; }
  header .tabs { top:calc(100% + 6px); left:0; width:min(270px,calc(100vw - 24px)); min-width:0; max-height:calc(100dvh - 82px); }
  header .tabs .navtab { min-height:50px; }
  .global-account-badge { top:1px; left:0; }

  /* Consistent page spacing and typography. */
  .view > .subhero,.view > .commerce-heading,.profile-workspace > .commerce-heading { padding-top:10px; padding-bottom:12px; }
  .content { padding-bottom:54px; }
  .commerce-heading p { margin-bottom:0; font-size:.83rem; }
  .eyebrow { font-size:.65rem; letter-spacing:.12em; }
  h1 { font-size:clamp(2.35rem,13vw,4rem); }
  .btn { min-height:44px; }
  input,select,textarea { max-width:100%; font-size:16px !important; }
  .commerce-two,.commerce-three,.commerce-four { grid-template-columns:1fr; }

  /* Homepage product wheels and feature blocks. */
  .home-shopfront { width:100%; padding:16px 0 26px; }
  .home-shopfront-heading { display:grid; place-items:center; width:calc(100% - 24px); height:128px; margin:0 auto 10px; overflow:hidden; }
  .home-shopfront-heading .home-shopfront-logo { width:min(280px,84vw); margin:0 auto; transform:none; }
  .home-wheel { padding-inline:0; }
  .home-wheel h2 { margin:0 auto 8px; padding:9px 16px; font-size:1.45rem; gap:9px; }
  .home-wheel .home-wheel-title-icon { width:36px; height:36px; }
  .home-wheel-newest,.home-wheel-sale { margin-top:12px; }
  .home-product-grid { width:100%; height:calc(var(--home-carousel-card-height,360px) + 94px); margin-inline:0; overflow:hidden; }
  .home-product-card { top:14px; width:min(440px,calc(100% - 56px)); min-height:0; border-radius:21px; grid-template-columns:minmax(0,1fr); grid-template-rows:clamp(200px,65vw,285px) auto; }
  .home-product-open { min-width:0; min-height:0; height:100%; }
  .home-product-image { height:100%; min-height:0; aspect-ratio:auto; background:#fff; }
  .home-product-image img.home-product-photo { object-fit:cover; }
  .home-product-content { padding:15px 16px 16px; }
  .home-product-name { font-size:1.05rem; line-height:1.22; min-height:2.44em; }
  .home-product-info { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:7px 10px; margin-top:10px; }
  .home-product-price { font-size:1.1rem; }
  .home-product-availability { font-size:.7rem; }
  .home-product-actions { grid-template-columns:52px minmax(0,1fr); gap:8px; padding-top:12px; }
  .home-product-quantity { width:52px; min-height:44px; }
  .home-product-actions .btn { min-height:44px; padding:9px 10px; font-size:.8rem; }
  .home-product-card[data-carousel-position="active"] { transform:translateX(calc(-50% + var(--carousel-drag-x))); }
  .home-product-card[data-carousel-position="previous"] { transform:translateX(calc(-145% + var(--carousel-drag-x))) scale(.84); }
  .home-product-card[data-carousel-position="next"] { transform:translateX(calc(45% + var(--carousel-drag-x))) scale(.84); }
  .home-carousel-controls { bottom:14px; max-width:calc(100% - 24px); gap:14px; padding:5px 8px; border:1px solid rgba(37,99,235,.14); border-radius:999px; background:rgba(255,253,249,.96); box-shadow:0 5px 16px rgba(24,65,143,.09); }
  .home-carousel-arrow { width:36px; height:36px; box-shadow:none; }
  .home-carousel-cycle { bottom:5px; width:min(160px,40vw); }
  .home-shop-all { width:calc(100% - 32px); min-width:0; margin:8px 16px 14px; padding:16px 18px; font-size:1rem; }
  .home-shop-all-icon { width:38px; height:38px; }
  .home-trust { padding:22px 12px 6px; }
  .home-trust-grid { grid-template-columns:1fr; gap:9px; }
  .home-trust-item { min-height:68px; padding:11px 13px; }
  .home-cta .cta-panel { padding:28px 20px; }
  .home-cta .actions { display:grid; grid-template-columns:1fr; }
  .home-cta .actions .btn { width:100%; }

  /* Phone filters stay collapsed until requested; desktop filters stay visible. */
  #view-shop > .content { padding-top:0; }
  .shop-layout { grid-template-columns:1fr; gap:18px; }
  #view-shop .shop-heading-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
  #view-shop .shop-heading-row > .eyebrow { margin:0; }
  .shop-filters-toggle { display:flex; align-items:center; justify-content:flex-start; gap:9px; justify-self:start; min-width:130px; padding:10px 16px; }
  .shop-filters-chevron { margin-left:auto; transition:transform .2s ease; }
  .shop-filters-toggle[aria-expanded="true"] .shop-filters-chevron { transform:rotate(180deg); }
  .shop-sidebar { display:none; position:static; width:100%; max-height:none; padding:16px; border-radius:18px; }
  .shop-sidebar.is-open { display:block; }
  .shop-sidebar h3 { margin-bottom:14px; }
  .shop-sidebar fieldset { gap:5px; margin-bottom:14px; }
  .shop-filter { flex:1 1 auto; min-height:40px; justify-content:flex-start; padding:8px 9px; }
  .shop-reset { width:100%; min-height:42px; }
  .shop-toolbar { align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:15px; }
  .shop-toolbar > div { min-width:0; flex:1 1 150px; }
  #preorderInfo { flex:0 1 auto; max-width:none; white-space:nowrap; }
  .shop-layout .grid { grid-template-columns:1fr; gap:16px; }
  /* Compact product rows: artwork left, details and purchase controls right. */
  #view-shop .shop-card {
    display:grid;
    grid-template-columns:minmax(96px,34%) minmax(0,1fr);
    grid-template-rows:1fr auto;
    width:100%;
    min-height:184px;
    border-radius:18px;
  }
  #view-shop .shop-card > .product-card-open {
    grid-column:1;
    grid-row:1 / span 2;
    position:relative;
    min-width:0;
    min-height:0;
    height:100%;
    overflow:hidden;
    border-radius:17px 0 0 17px;
    border-right:1px solid rgba(24,65,143,.1);
    background:#fff;
  }
  #view-shop .shop-card .product-card-image {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    aspect-ratio:auto;
  }
  #view-shop .shop-card .shop-product-image { object-fit:contain; transform:none; background:#fff; }
  #view-shop .shop-card .card-body { grid-column:2; min-width:0; padding:13px 12px 8px; gap:8px; }
  #view-shop .shop-card .card-body h3 { font-size:.98rem; line-height:1.25; overflow-wrap:anywhere; }
  #view-shop .shop-card .shop-card-actions { grid-column:2; min-width:0; margin-top:0; padding:0 12px 12px; }
  #view-shop .shop-card-actions .btn { min-height:40px; padding:8px 10px; font-size:.72rem; white-space:normal; }
  #view-shop .shop-meta-labels,#view-shop .shop-value-row { min-width:0; gap:6px; }
  #view-shop .product-availability { min-width:0; font-size:.69rem; line-height:1.35; }
  #view-shop .shop-quantity-heading,#view-shop .shop-value-row .shop-quantity { width:54px; flex:0 0 54px; }
  #view-shop .shop-quantity-heading { font-size:.64rem; }
  #view-shop .shop-quantity { height:38px; padding:6px 4px; font-size:.85rem; }
  #view-shop .shop-value-row .product-price { min-width:0; flex:1 1 0; font-size:1rem; }
  #view-shop .sale-price-display { gap:4px 6px; }
  #view-shop .product-old-price { font-size:.75em; }
  #view-shop .product-sale-badge { top:8px; left:8px; padding:5px 7px; font-size:.65rem; }
  #view-shop .product-image-count { bottom:8px; right:8px; padding:4px 6px; font-size:.64rem; }

  /* Cart: compact rows without squeezing controls off-screen. */
  .commerce-cart { grid-template-columns:1fr; gap:18px; padding-bottom:54px; }
  #view-cart .cart-summary { position:static; inset:auto; min-width:0; max-width:100%; }
  .cart-line { grid-template-columns:72px minmax(0,1fr); gap:13px; padding:15px; border-radius:17px; }
  .cart-thumb { width:72px; height:72px; }
  .cart-line > strong { grid-column:2; justify-self:start; }
  .cart-controls { flex-wrap:wrap; align-items:end; margin-top:10px; }
  .cart-quantity { width:72px; }
  .cart-promo-panel,.cart-summary { padding:18px; border-radius:18px; }
  .promo-entry { grid-template-columns:1fr; }
  .promo-entry .btn { width:100%; }
  .applied-promo { align-items:flex-start; flex-direction:column; }
  .summary-row { gap:10px; }

  /* Profile navigation collapses into one menu button; admin stays stacked. */
  .profile-layout,.admin-layout { grid-template-columns:minmax(0,1fr); gap:15px; }
  .profile-content,.admin-content { min-width:0; max-width:100%; }
  #view-profile .profile-workspace { padding-bottom:62px; }
  #view-profile .commerce-heading { width:100%; }
  #view-profile .commerce-heading > div { min-width:0; width:100%; }
  .profile-heading-row { display:grid; grid-template-columns:minmax(0,1fr) 96px; align-items:center; width:100%; gap:10px; }
  .profile-heading-row #profileWelcome { min-width:0; margin:6px 0; font-size:1.35rem; line-height:1.15; }
  #view-profile .profile-email-line { gap:7px; }
  #view-profile #profileEmail { min-width:0; margin:0; font-size:.78rem; line-height:1.35; overflow-wrap:anywhere; }
  #view-profile .profile-email-verified { flex:0 0 auto; padding:4px 7px; }
  #profileStatus:empty { display:none; }
  .profile-menu-toggle {
    display:flex;
    position:fixed;
    top:76px;
    right:12px;
    z-index:110;
    flex-direction:row;
    align-items:center;
    flex:0 0 96px;
    width:96px;
    height:36px;
    min-height:36px;
    justify-content:center;
    gap:5px;
    margin-left:auto;
    padding:0 8px;
    border-color:rgba(37,99,235,.3);
    border-radius:11px;
    background:rgba(241,246,255,.94);
    color:#174487;
    box-shadow:0 4px 12px rgba(37,99,235,.08);
    font-size:.7rem;
    font-weight:850;
    line-height:1;
  }
  .profile-menu-toggle:is(:hover,:focus-visible) { background:#e7f0ff; color:#123b76; }
  .profile-menu-toggle-label { display:block; min-width:0; max-width:66px; overflow:hidden; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
  .profile-menu-toggle-chevron { display:block; flex:0 0 auto; margin:0; font-size:.85rem; line-height:1; transition:transform .2s ease; }
  .profile-menu-toggle[aria-expanded="true"] .profile-menu-toggle-chevron { transform:rotate(180deg); }
  #view-admin .admin-menu-toggle { width:132px; flex-basis:132px; }
  #view-admin .admin-menu-toggle .profile-menu-toggle-label { max-width:104px; }
  #view-admin > .admin-heading { padding-top:58px; }
  #adminNavigation .btn { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:10px; width:100%; min-height:42px; padding:8px 12px; text-align:left; font-size:.8rem; }
  #adminNavigation .profile-nav-icon { position:static; flex:0 0 21px; width:21px; height:21px; margin:0; transform:none; }
  .profile-navigation {
    display:none;
    grid-template-columns:1fr;
    gap:6px;
    width:min(218px,calc(100vw - 24px));
    padding:9px;
    margin:0;
    max-height:calc(100dvh - 130px);
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .profile-navigation.is-open {
    position:fixed;
    z-index:120;
    display:grid;
    border-radius:16px;
    background:rgba(255,250,242,.98);
    box-shadow:0 16px 42px rgba(72,51,40,.2),0 3px 12px rgba(37,99,235,.1);
    backdrop-filter:blur(16px);
  }
  #view-profile .profile-navigation .btn { width:100%; min-height:44px; justify-content:center; gap:0; padding:0 40px; font-size:.75rem; text-align:center; }
  #view-profile .profile-navigation img.profile-nav-icon { position:absolute; left:8px; top:50%; width:31px; height:31px; transform:translateY(-50%); }
  .profile-panel,.admin-section-content > .admin-security { padding:16px; border-radius:18px; }
  .profile-panel h3,.admin-section-content > .admin-security h3 { margin:12px 0 8px; font-size:1.28rem; line-height:1.2; }
  .profile-panel > p { margin:0 0 16px; line-height:1.55; }
  .profile-panel form { gap:14px; margin-top:20px; }
  .profile-panel form + form { margin-top:22px; padding-top:22px; }
  .profile-panel form > .btn,.profile-panel > .btn { width:100%; justify-self:stretch; justify-content:center; }
  .profile-danger-zone { margin-top:25px; padding-top:22px; }
  .profile-home-grid { grid-template-columns:1fr; gap:13px; }
  .profile-home-grid { margin-top:20px; }
  .profile-home-grid > div { padding:16px; }
  .profile-home-grid .btn { width:100%; justify-content:center; }
  .profile-orders,.profile-order,.profile-order-summary,.profile-order-identity {
    min-width:0;
    max-width:100%;
  }
  .profile-orders { gap:12px; margin-top:12px; }
  .profile-order { width:100%; padding:14px; overflow:hidden; }
  .profile-order-summary {
    grid-template-columns:minmax(0,1fr) auto 14px;
    grid-template-areas:"number number number" "date total open";
    gap:8px 10px;
  }
  .profile-order-identity { display:contents; }
  .profile-order-identity h4 { grid-area:number; margin:0; font-size:.78rem; line-height:1.3; letter-spacing:.01em; overflow-wrap:anywhere; }
  .profile-order-meta { grid-area:date; align-self:center; gap:5px 7px; }
  .profile-order-identity time { font-size:.72rem; }
  .profile-order-summary-total { grid-area:total; align-self:center; font-size:.82rem; }
  .profile-order-open { grid-area:open; align-self:center; }
  .customer-service-card { border-radius:16px; }
  .customer-service-summary { gap:5px; padding:15px 42px 15px 15px; }
  .customer-service-summary::after { right:15px; }
  .customer-service-content { padding:0 15px 15px; }
  .message-reply { margin:13px 10px 0 0; padding:11px 12px; }
  .message-reply.customer-reply { margin-left:10px; }
  .chat-reply-form { grid-template-columns:1fr; }
  .chat-reply-form button[type="submit"] { width:100%; }
  body:has(#view-profile.active) .lab-shortcut { display:none; }
  .admin-stats { grid-template-columns:1fr 1fr; }
  .admin-grid,.admin-layout .admin-grid { grid-template-columns:1fr; }
  .admin-catalogue,.admin-editor { padding:16px; border-radius:18px; }
  .admin-list-heading,.admin-editor-heading,.promo-list-heading,.promo-card-heading { align-items:flex-start; flex-direction:column; }
  .admin-list-heading .btn,.admin-editor-controls,.admin-editor-controls .btn { width:100%; }
  .admin-editor-controls { display:grid; gap:8px; }
  .admin-products { max-height:300px; }
  .admin-orders,.admin-order,.admin-order-summary,.admin-order-body,.admin-order-products {
    min-width:0;
    max-width:100%;
  }
  .admin-order { width:100%; }
  .admin-order-summary,.admin-order-body dl,.installation-card dl { grid-template-columns:minmax(0,1fr); }
  .admin-order-summary { padding:16px; }
  .admin-order-summary > * { min-width:0; max-width:100%; overflow-wrap:anywhere; word-break:break-word; }
  .admin-order-body { padding:4px 16px 16px; }
  .admin-order-body dd,.installation-card dd { margin:0 0 8px; }
  .admin-order-products { padding:14px; overflow-wrap:anywhere; word-break:break-word; }
  .category-manager { grid-template-columns:1fr; }

  /* Custom Lab and ordinary content pages. */
  .custom-lab-content { padding-bottom:54px; }
  .custom-lab-layout { grid-template-columns:1fr; gap:15px; }
  .custom-lab-process { order:2; }
  .custom-lab-form-panel { order:1; }
  #view-custom .custom-lab-process,#view-custom .custom-lab-form-panel { padding:18px; border-radius:20px; }
  .custom-panel-heading { align-items:flex-start; margin-bottom:18px; }
  #view-custom .custom-lab-process .step { grid-template-columns:38px minmax(0,1fr); gap:11px; padding:12px; }
  #view-custom .custom-lab-process .step-number { width:38px; height:38px; }
  .custom-file-control { align-items:stretch; flex-direction:column; }
  .custom-file-name { padding:9px 8px 4px; white-space:normal; overflow-wrap:anywhere; }
  #view-projects .grid { grid-template-columns:1fr; }
  .premium-construction { min-height:calc(100dvh - 64px); padding-block:28px 52px; }

  /* Every customer dialog fits within the visible phone viewport. */
  dialog,.auth-dialog,.product-dialog,.question-dialog,.preorder-dialog,.order-details-dialog,.cancel-order-dialog,.home-info-dialog {
    width:calc(100% - 16px);
    max-width:none;
    max-height:calc(100dvh - 16px);
    margin:auto;
    border-radius:19px;
  }
  .product-dialog,.question-dialog,.preorder-dialog,.order-details-dialog,.cancel-order-dialog,.home-info-dialog { padding:48px 18px 20px; }
  .product-detail-layout { grid-template-columns:1fr; gap:18px; }
  .product-gallery { width:100%; min-height:0; aspect-ratio:1; border-radius:15px; }
  #productDetails h2 { margin:13px 0; font-size:1.55rem; }
  #productDetails .product-price { margin:14px 0; }
  .product-detail-actions { display:grid; grid-template-columns:76px minmax(0,1fr); gap:9px; align-items:end; }
  .product-detail-actions .btn { min-width:0; padding-inline:10px; }
  .product-detail-actions .btn:last-of-type { grid-column:1/-1; }
  .product-detail-actions .commerce-status { grid-column:1/-1; }
  .fulfillment-choice,.embedded-checkout-layout,.checkout-payment-actions { grid-template-columns:1fr; }
  .checkout-delivery-form { padding:0; }
  .checkout-recap,.checkout-payment-panel { padding:20px 17px; }
  #checkoutDialog:has(#embeddedCheckoutWrap:not([hidden])) { width:calc(100% - 16px); padding:42px 8px 8px; }
  #checkoutDialog .checkout-recap { gap:12px; padding:14px; }
  #checkoutDialog .checkout-recap > img { display:none; }
  #checkoutDialog .checkout-payment-panel { padding:18px 14px; }
  #checkoutDialog .checkout-recap .checkout-back { min-height:36px; margin:0; padding:7px 10px; font-size:.74rem; }
  .checkout-recap { border-right:0; border-bottom:1px solid var(--line); }
  .checkout-pay,.checkout-back { width:100%; }
  .cancel-order-dialog-actions { flex-direction:column-reverse; }
  .cancel-order-dialog-actions .btn { width:100%; }
  .order-details-list,.order-details-products,.order-details-product { min-width:0; max-width:100%; }
  .order-details-list { grid-template-columns:minmax(0,1fr); padding:14px; }
  .order-details-list dd { min-width:0; margin-bottom:7px; overflow-wrap:anywhere; word-break:break-word; }
  .order-details-products { padding:14px; }
  .order-details-product { align-items:flex-start; gap:10px; padding:10px 8px; }
  .order-details-product span { min-width:0; overflow-wrap:anywhere; word-break:break-word; }
  .order-details-product strong { flex:0 0 auto; white-space:nowrap; }

  /* Login remains branded, but does not consume most of the viewport. */
  .auth-layout { grid-template-columns:1fr; }
  #accountModal > #closeModal { top:12px; right:12px; }
  .auth-story { min-height:0; padding:12px 20px; gap:4px; border-right:0; border-bottom:1px solid var(--line); }
  .auth-login-illustration { width:108px; }
  .auth-login-wordmark { width:150px; }
  .auth-content { padding:46px 20px 20px; }
  .auth-switch { margin-bottom:18px; }

  /* Legal pages and footer use the full available width. */
  #view-terms .legal-main,#view-privacy .legal-main { padding:18px 0 40px; }
  .legal-card { padding:22px 17px; border-radius:19px; }
  .legal-card h1 { font-size:1.4rem; }
  .legal-notice { padding:15px; }
  .legal-actions { align-items:flex-start; flex-direction:column; }
  footer .footer-grid { grid-template-columns:1fr; gap:19px; padding-block:21px 16px; }
  footer .footer-brand { width:210px; height:66px; }
  footer .footer-bottom { align-items:flex-start; flex-direction:column; gap:5px; }
  .lab-shortcut { right:10px; bottom:calc(10px + env(safe-area-inset-bottom)); max-width:165px; padding:10px 12px; border-radius:15px; }
}

/* Touch users can see availability around the entire card without hovering. */
@media (max-width:760px), (hover:none) {
  #view-home .home-product-card[data-availability] {
    --card-led-core:#a9c7ff;
    --card-led-rgb:37,99,235;
    --card-led-glow:0 0 20px rgba(var(--card-led-rgb),.34),0 0 38px rgba(var(--card-led-rgb),.2);
  }
  #view-home .home-product-card[data-availability="in-stock"] { --card-led-core:#a0ffbe; --card-led-rgb:35,235,108; }
  #view-home .home-product-card[data-availability="out-of-stock"] { --card-led-core:#ff897d; --card-led-rgb:255,35,58; }
  #view-shop .shop-card[data-availability],
  #view-home .home-product-card[data-availability] {
    border:1px solid var(--card-led-core);
    box-shadow:var(--card-led-glow);
  }
  /* Reuse the desktop hover LED layers, already fully lit and without a
     repeating sweep/blink that would be distracting on a whole product list. */
  #view-shop .shop-card[data-availability]::before,
  #view-shop .shop-card[data-availability]::after {
    --section-led-angle:180deg;
    opacity:1;
    animation:none;
    transition:none;
  }
  #view-shop .shop-card { cursor:pointer; animation:none; }
}

@media (max-width:390px) {
  .shell { width:calc(100% - 18px); }
  header .nav { width:calc(100% - 12px); }
  header .header-logo { width:100%; max-width:104px; }
  .mobile-menu-toggle { width:39px; height:39px; flex-basis:39px; }
  header .language-toggle { width:38px; min-width:38px; }
  header .nav { grid-template-columns:39px clamp(58px,18vw,76px) minmax(60px,1fr) 100px; gap:3px; }
  header .desktop-primary-nav .navtab:is([data-view="shop"],[data-view="cart"]) { gap:3px; padding-inline:3px; font-size:.78rem; }
  header .desktop-primary-nav .topbar-icon { width:24px; height:24px; flex-basis:24px; }
  header .account-control,header .account-btn { width:100px; min-width:0; }
  header .account-btn #accountLabel { max-width:65px; font-size:.65rem !important; }
  .home-product-content { padding:14px; }
  .home-product-actions { grid-template-columns:54px minmax(0,1fr); }
  .home-product-quantity { width:54px; }
  .shop-filter { flex:1 1 46%; }
  .shop-toolbar { align-items:stretch; flex-direction:column; }
  .shop-toolbar > div { flex:0 0 auto; width:100%; }
  #preorderInfo { width:100%; }
  .admin-stats { grid-template-columns:1fr; }
  .product-detail-actions { grid-template-columns:68px minmax(0,1fr); }
  .cart-line { grid-template-columns:62px minmax(0,1fr); padding:13px; }
  .cart-thumb { width:62px; height:62px; }
}

@media (max-width:350px) {
  header .desktop-primary-nav .navtab:is([data-view="shop"],[data-view="cart"]) { flex-direction:column; gap:0; padding:2px 3px; font-size:.7rem; }
}

@media (prefers-reduced-motion:reduce) {
  .profile-navigation { scroll-behavior:auto; }
}
