/* Keep the existing storefront layout; account for standalone device insets. */
.keyscraft-native body{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
@media(display-mode:standalone){body{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}}
.pwaNotice{position:fixed;bottom:max(16px,env(safe-area-inset-bottom));left:16px;right:16px;z-index:100000;max-width:560px;margin:auto;display:flex;gap:12px;align-items:center;background:#fff;border:1px solid #d7d7d7;box-shadow:0 6px 28px #0002;border-radius:16px;padding:12px 16px;color:#171717;font:16px/1.4 system-ui,sans-serif}
.pwaNotice span{flex:1}.pwaNotice button{min-width:44px;min-height:44px;border:0;border-radius:24px;background:#111;color:#fff;padding:8px 14px;font:inherit;cursor:pointer}.pwaNotice button:focus-visible{outline:3px solid #c59c00;outline-offset:3px}
@media(max-width:600px){
  #checkoutModal{padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))}
  #checkoutModal .modalBox{padding:24px 20px;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  #checkoutModal .checkoutSummary li{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
  #checkoutModal .checkoutSummary li span{min-width:0;overflow-wrap:anywhere}
  #checkoutModal .checkoutSummary li span:last-child{white-space:normal;color:#555}
  #checkoutModal .modalBox .close{min-width:44px;min-height:44px;right:8px;top:8px}
  #checkoutModal .modalBox h2{padding-right:34px;font-size:26px}
}
@media(max-width:600px){
  #checkoutModal .checkoutConsent{display:block;position:relative;padding-left:28px;min-height:44px}
  #checkoutModal .checkoutConsent input{position:absolute;left:0;top:2px;width:18px;height:18px;min-height:18px;max-height:18px;padding:0;margin:0}
  #checkoutModal .checkoutConsent a{display:inline}
}
@media(max-width:600px){
  .accountTabs{flex-wrap:wrap}
  .accountTabs .accountTab{flex:1 1 auto;padding:11px 12px!important;min-height:44px}
  .accountTabs [data-account-tab="admin"]{flex-basis:100%}
}
.productGalleryMain{cursor:zoom-in}
.modal.productPhotoViewer{position:fixed;inset:0;z-index:100001;background:#fff;display:flex;align-items:center;justify-content:center;padding:64px 16px 24px;box-sizing:border-box}
.productPhotoViewer>img{width:100%;height:100%;object-fit:contain;min-height:0}
.productPhotoViewer>.close{position:absolute;right:12px;top:max(12px,env(safe-area-inset-top));width:48px;height:48px;padding:0;border:0;border-radius:50%;background:#111;color:#fff;font:32px/1 system-ui;cursor:pointer}

/* Consent is one text flow at every width, not anonymous flex columns. */
.accountPage .accountConsent{display:block;position:relative;padding-left:28px;min-height:44px}
.accountPage .accountConsent input{position:absolute;left:0;top:2px;width:18px;height:18px;min-height:18px;max-height:18px;padding:0;margin:0}
.accountPage .accountConsent a{display:inline}

/* Shared contact action; leave room for cart feedback and device safe areas. */
a.supportChat{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:calc(80px + env(safe-area-inset-bottom));z-index:900;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 18px;border:1px solid #111;border-radius:999px;background:#111;color:#fff!important;text-decoration:none;font:500 16px/1.2 Jost,Arial,sans-serif;box-shadow:0 4px 16px #0002}
a.supportChat:hover{background:#333;color:#fff}
a.supportChat:active{background:#444}
a.supportChat:focus-visible{outline:3px solid #d3a900;outline-offset:4px}
/* The legacy arrow uses !important; override it here as part of the same stack. */
body .toTop{right:max(20px,env(safe-area-inset-right))!important;bottom:calc(16px + env(safe-area-inset-bottom))!important;width:48px!important;height:48px!important;z-index:900!important}
body:has(.header.mobile-menu-open) :is(.supportChat,.toTop),body:has(.productPhotoViewer) :is(.supportChat,.toTop),body:has(#checkoutModal) :is(.supportChat,.toTop),body:has(.adminPage) :is(.supportChat,.toTop){display:none!important}
@media(max-width:600px){body .toTop{right:max(16px,env(safe-area-inset-right))!important}a.supportChat{right:max(16px,env(safe-area-inset-right));bottom:calc(80px + env(safe-area-inset-bottom));min-height:48px;width:48px;padding:0}a.supportChat span{display:none}.cartToast{bottom:calc(144px + env(safe-area-inset-bottom))}}
@media print{a.supportChat,body .toTop{display:none!important}}

/* Installation help lives in navigation, never in another floating badge. */
[data-pwa-install-entry][hidden]{display:none!important}
.pwaInstallMenu button{background:none;border:0;padding:0;cursor:pointer;text-align:left;font:inherit;color:inherit}
.pwaInstallFooter{text-align:center;margin:28px auto 12px;padding:0 20px}
.pwaInstallFooter button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 16px;background:#f5f5f5;border:1px solid #e7e7e7;border-radius:24px;color:#171717;font:500 15px/1.3 Jost,Arial,sans-serif;cursor:pointer}
.pwaInstallFooter p{margin:6px 0 0;color:#666;font:14px/1.4 Jost,Arial,sans-serif}
.pwaInstallDialog{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,500px);max-width:none;max-height:92dvh;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;padding:12px 24px max(24px,env(safe-area-inset-bottom));border:0;border-radius:26px 26px 0 0;background:#fff;color:#171717;box-shadow:0 -8px 40px #0002;font:16px/1.45 Jost,Arial,sans-serif}
.pwaInstallDialog::backdrop{background:rgba(0,0,0,.42)}
.pwaInstallDialog .pwaInstallHandle{width:36px;height:4px;border-radius:4px;background:#d9d9d9;margin:0 auto 12px}
.pwaInstallDialog .pwaInstallClose{position:absolute;top:20px;right:12px;width:44px;height:44px;min-height:44px;border:0;border-radius:50%;background:#f3f3f3;color:#333;font:28px/1 Arial,sans-serif;padding:0;cursor:pointer}
.pwaInstallDialog .pwaInstallBrand{display:flex;align-items:center;gap:12px;padding-right:40px}
.pwaInstallDialog .pwaInstallBrand img{width:44px;height:44px;object-fit:contain;border:1px solid #eee;border-radius:11px}
.pwaInstallDialog .pwaInstallBrand span{font-size:11px;font-weight:600;letter-spacing:1.1px;color:#666}
.pwaInstallDialog h2{font:700 24px/1.12 Jost,Arial,sans-serif;letter-spacing:-.4px;margin:14px 0 8px}
.pwaInstallDialog .pwaInstallIntro{margin:0 0 20px;color:#666;font-size:16px}
.pwaInstallDialog .pwaInstallSteps{list-style:none;margin:0;padding:0;display:grid;gap:16px}
.pwaInstallDialog .pwaInstallStepHead,.pwaInstallDialog .pwaInstallSafari{display:flex;align-items:flex-start;gap:12px}
.pwaInstallDialog .pwaInstallSafari{margin:20px 0}
.pwaInstallDialog .pwaInstallNumber{display:inline-flex;flex:0 0 28px;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#f5cf27;color:#171717;font-size:14px;font-weight:700}
.pwaInstallDialog h3{font:600 17px/1.3 Jost,Arial,sans-serif;margin:2px 0 5px}
.pwaInstallDialog .pwaInstallStepHead p,.pwaInstallDialog .pwaInstallSafari p{font:15px/1.45 Jost,Arial,sans-serif;margin:0;color:#666}
.pwaInstallDialog .pwaInstallStepHead p svg{display:inline-block;width:18px;height:18px;vertical-align:-3px;color:#171717}
.pwaInstallDialog .pwaInstallExample{margin:12px 0 0 40px;display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 12px;border:1px solid #e7e7e7;border-radius:12px;background:#f8f8f8;color:#171717;font-size:14px}
.pwaInstallDialog .pwaInstallAddress{flex:1;text-align:center;color:#555}
.pwaInstallDialog .pwaInstallHighlight{display:flex;color:#171717;background:#fff3b8;border-radius:8px;padding:5px}
.pwaInstallDialog .pwaInstallChevron{margin-left:auto;font-size:24px;color:#888}
.pwaInstallDialog .pwaInstallFinal{background:#fff}
.pwaInstallDialog .pwaInstallFinal img{width:32px;height:32px;object-fit:contain;border:1px solid #eee;border-radius:8px}
.pwaInstallDialog .pwaInstallAdd{margin-left:auto;font-weight:600;color:#171717;background:#fff3b8;border-radius:7px;padding:6px 8px;font-size:13px}
.pwaInstallDialog .pwaInstallHelp{margin:20px 0 0;color:#666;font-size:13px;line-height:1.45}
.pwaInstallDialog .pwaInstallLinkLabel{display:block;margin:20px 0 6px;font-size:14px;font-weight:500}
.pwaInstallDialog .pwaInstallLink{display:block;width:100%;min-height:48px;padding:10px 12px;border:1px solid #ddd;border-radius:10px;background:#f8f8f8;color:#171717;font:16px/1.3 Jost,Arial,sans-serif}
.pwaInstallDialog .pwaInstallStatus{margin:12px 0 0;min-height:0;color:#555;font-size:14px}
.pwaInstallDialog .pwaInstallStatus:empty{display:none}
.pwaInstallDialog .pwaInstallPrimary{display:block;width:100%;min-height:48px;margin:20px 0 0;padding:12px 20px;border:0;border-radius:26px;background:#111;color:#fff;font:500 16px/1.3 Jost,Arial,sans-serif;cursor:pointer}
.pwaInstallDialog button:focus-visible,.pwaInstallDialog input:focus-visible,[data-pwa-install]:focus-visible{outline:3px solid #b58d00;outline-offset:3px}
body:has(.pwaInstallDialog[open]) :is(.supportChat,.toTop){display:none!important}
@media(min-width:601px){.pwaInstallDialog{inset:0;margin:auto;height:fit-content;border-radius:24px}}
@media print{.pwaInstallDialog,.pwaInstallFooter,.pwaInstallMenu{display:none!important}}

/* Application installation page */
.installPage{max-width:1100px;margin:0 auto;padding:44px 20px 80px}.installIntro{max-width:700px;margin-bottom:36px}.installEyebrow{font-size:12px;font-weight:700;letter-spacing:.1em;color:#786000}.installIntro h1{font-size:clamp(32px,5vw,52px);line-height:1.1;margin:12px 0}.installIntro p{font-size:18px;line-height:1.5;color:#666}.installGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.installCard{border:1px solid #e6e6e6;border-radius:20px;padding:28px;background:#fff}.installCard h2{font-size:25px;line-height:1.2;margin:0 0 10px}.installCard p,.installCard li{font-size:16px;line-height:1.5;color:#555}.installCard ol{padding-left:22px;margin:24px 0;min-height:135px}.installCard li+li{margin-top:10px}.installButton,.installSecondary{display:inline-flex;align-items:center;justify-content:center;gap:14px;min-height:48px;padding:10px 22px;border-radius:28px;text-decoration:none;font-weight:600}.installButton{color:#fff;background:#111}.installSecondary{color:#111;background:#f1f1f1}.installNote{font-size:13px!important;color:#777!important;margin:14px 0 0}.installButton:focus-visible,.installSecondary:focus-visible{outline:3px solid #b58d00;outline-offset:3px}@media(max-width:700px){.installPage{padding:24px 16px 52px}.installIntro{margin-bottom:24px}.installGrid{grid-template-columns:1fr}.installCard{padding:22px}.installCard ol{min-height:0}.installButton,.installSecondary{width:100%;box-sizing:border-box}}
