/* Shared fluid typography for customer screens. Keep input text at 16px on phones to avoid focus zoom. */
:root{--ui-body:clamp(12px,calc(8px + 1.28vw),14px);--ui-small:clamp(11px,calc(7px + 1.28vw),13px);--ui-button:clamp(14px,calc(5px + 2.8vw),16px);--ui-title:clamp(20px,calc(12px + 2.5vw),25px);--ui-panel-title:clamp(18px,calc(12px + 1.9vw),21px)}
#form-title{font-size:var(--ui-title);line-height:1.35;overflow-wrap:anywhere}
#form-description,.information p{font-size:var(--ui-body);line-height:1.6}
#key-form button[type=submit],#iid-form>button.primary,#result>button.primary{font-size:var(--ui-button);white-space:normal;line-height:1.4}
:is(#shop,#help,#account,#chat,.legal-dialog) .service-dialog-header h2,#chat .chat-header h2{font-size:var(--ui-panel-title);min-width:0;overflow-wrap:anywhere}
:is(#shop,#help,#account,.legal-dialog) .service-dialog-body,:is(#shop,#help,#account,.legal-dialog) p,#chat .chat-message p{font-size:var(--ui-body);line-height:1.6;overflow-wrap:anywhere}
:is(#shop,#help,#account,#chat,.legal-dialog) .primary,#account .account-tabs button,#help .product-guides>details>summary,#shop .shop-option strong{font-size:var(--ui-body);line-height:1.5;white-space:normal;overflow-wrap:anywhere}
#shop .shop-option{min-width:0;grid-template-columns:auto minmax(0,1fr) auto}#shop .shop-option strong{min-width:0}#shop .shop-option b{font-size:var(--ui-body);white-space:nowrap}
#account .account-heading{flex-wrap:wrap}#account .account-heading strong{min-width:0;overflow-wrap:anywhere}#account .account-key code{white-space:normal;overflow-wrap:anywhere}
#account-form label,#account-cid-form label,#shop-selection,#help .dialog-note{font-size:var(--ui-small)}
:is(#shop,#help,#account,.legal-dialog) .service-dialog-header,#chat .chat-header{min-width:0} .dialog-close,#close-chat{flex-shrink:0}
#account .account-balance{flex-wrap:wrap}#account .account-iid-tools{flex-wrap:wrap}
#iid-form .iid-tools-row{gap:8px}#iid-form .iid-tools-row #iid-count,#iid-form .iid-tools-row .upload-button{font-size:var(--ui-small)}
@media(max-width:540px){
 .mobile-nav a,.mobile-nav button{font-size:clamp(9px,calc(4px + 1.55vw),12px);min-width:0;line-height:1.3;text-align:center}
 .mobile-nav button span{font-size:inherit;line-height:inherit;white-space:normal}
 #key-form button[type=submit]{font-size:var(--ui-button)}
 #key,#chat-text,#account input,#account textarea{font-size:16px}
 :is(#shop,#help,#account) .service-dialog-body{padding-left:clamp(12px,4vw,20px);padding-right:clamp(12px,4vw,20px)}
 #account section.account-issue{padding:clamp(10px,3vw,18px)}
 #iid-form .iid-tools-row .upload-button{padding-left:6px;padding-right:6px}
}

@media(max-width:540px){:root{--ui-body:clamp(13px,calc(3.86px + 2.86vw),15px);--ui-small:clamp(12px,calc(2.86px + 2.86vw),14px);--ui-button:clamp(15px,calc(5.86px + 2.86vw),17px);--ui-title:clamp(21px,calc(2.72px + 5.72vw),25px);--ui-panel-title:clamp(19px,calc(5.28px + 4.28vw),22px)}.mobile-nav a,.mobile-nav button{font-size:clamp(10px,calc(0.86px + 2.86vw),12px)}}

@media(max-width:540px){.help-links [data-open-chat],.help-links>span{display:none}}

#iid-form .iid-tools-row{display:flex;flex-wrap:nowrap;gap:8px}#iid-form .iid-tools-row #iid-count{flex:1 1 auto;white-space:nowrap;font-size:clamp(10px,3.2vw,14px)}#iid-form .iid-tools-row .upload-row{flex:0 0 auto;flex-wrap:nowrap}#iid-form .iid-tools-row .upload-button{white-space:nowrap;font-size:clamp(10px,3.2vw,14px);padding-left:4px;padding-right:4px}#iid-form .iid-tools-row #fill-iid{display:none}
/* Compact authentication card; profile keeps its own layout. */
#account[open]:has(#account-auth:not([hidden])){width:calc(100% - 24px);max-width:390px;height:auto;max-height:calc(var(--visible-height,100dvh) - 24px);border-radius:18px;background:#fff;overflow:hidden}
#account:has(#account-auth:not([hidden])) .service-dialog-header{padding:16px 20px 12px;min-height:0;border-bottom:0;background:#fff}
#account:has(#account-auth:not([hidden])) .service-dialog-header h2{font-size:19px;letter-spacing:-.35px}
#account:has(#account-auth:not([hidden])) .service-dialog-body{padding:0 20px 18px;overflow:auto;min-height:0;background:#fff;flex:0 1 auto}
#account #account-error:empty{display:none}
#account #account-error:not(:empty){font-size:13px;line-height:1.45;background:#fff2f1;border-radius:9px;padding:10px 12px;margin:0 0 12px}
#account #account-auth .account-tabs{padding:4px;gap:4px;background:#f0f4fa;border-radius:11px;margin:0 0 16px}
#account #account-auth .account-tabs button{min-height:36px;padding:7px 10px;font-size:13px;line-height:1.4;border-radius:8px;background:transparent;color:#73829a;font-weight:500}
#account #account-auth .account-tabs button[aria-pressed=true]{background:#fff;color:#2864e8;box-shadow:0 2px 6px #203c6010}
#account #account-form label{font-size:12px;line-height:1.4;margin:0 0 12px;color:#5f718c;font-weight:500}
#account #account-form input{box-sizing:border-box;width:100%;height:44px;min-height:44px;margin:6px 0 0;padding:10px 12px;font-family:inherit;font-size:16px;line-height:22px;border:1px solid #dfe7f2;border-radius:10px;background:#f8faff;color:#293b55;box-shadow:none}
#account #account-form input:focus{outline:0;border-color:#7aa2f2;box-shadow:0 0 0 3px #2864e812;background:white}
#account #account-submit{width:100%;min-height:44px;padding:10px 16px;margin:2px 0 0;font-size:14px;line-height:24px;border-radius:10px}
#account #account-auth .account-auth-actions{justify-content:center;margin:10px 0 0;gap:6px 12px}
#account #account-auth .account-auth-actions button{font-size:12px;line-height:1.5;padding:4px 0}
#account #account-auth .account-note{font-size:11px!important;line-height:1.5!important;margin:12px 0 0!important;color:#8793a6;text-align:center}
#account #account-auth .account-legal-links{font-size:10px;line-height:1.6;margin:10px 0 0;text-align:center;color:#8c99ac}
#account #account-auth .account-legal-links button{font-size:inherit;color:inherit;padding:0}
#account #account-captcha{margin:4px 0 12px}
#account #captcha-container{min-height:0;height: auto}
@media(max-width:360px){#account:has(#account-auth:not([hidden])) .service-dialog-header{padding:14px 14px 10px}#account:has(#account-auth:not([hidden])) .service-dialog-body{padding:0 14px 14px}}
#account[open]:has(#account-auth:not([hidden])){position:fixed;inset:auto;left:50%;top:calc(var(--visible-height,100dvh) / 2);transform:translate(-50%,-50%);margin:0;padding:0;min-height:0;height:fit-content;border:1px solid #dfe7f2;outline:none}

#account #captcha-container{zoom:.9}
/* Tighter authentication spacing. */
#account[open]:has(#account-auth:not([hidden])){max-width:370px}
#account:has(#account-auth:not([hidden])) .service-dialog-header{padding:12px 18px 10px}
#account:has(#account-auth:not([hidden])) .service-dialog-body{padding:0 18px 14px}
#account #account-auth .account-tabs{margin-bottom:12px}
#account #account-form label{margin-bottom:9px}
#account #account-form input{height:42px;min-height:42px;margin-top:4px;padding:9px 11px}
#account #captcha-container{zoom:.8}
#account #account-captcha{margin:2px 0 9px}
#account #account-auth .account-auth-actions{margin-top:6px}
#account #account-auth .account-legal-links{margin-top:6px}
/* Keep the native captcha width aligned with the form on narrow screens. */
#account #account-form input::placeholder{font-size:12px;letter-spacing:0}
#account #account-captcha{width:100%;max-width:100%;min-width:0}
#account #captcha-container{zoom:1;width:100%;max-width:100%;box-sizing:border-box}
#account #captcha-container{min-height:100px;height:100px}
#account #captcha-loading{font-size:12px;line-height:1.5;margin:6px 0;color:#73829a}
#account #captcha-loading button{color:#2864e8;font-size:12px;text-decoration:underline}

#account #account-auth-back{display:none!important}
.checkout-email{display:block;text-align:left;font-size:12px;color:#64748b;margin:10px 0}.checkout-email input{padding:10px 12px;font:16px/1.4 inherit;height:44px;margin-top:6px}.checkout-note{font-size:11px!important;line-height:1.5!important;color:#7c8ba0;margin:10px 0 0}#shop-payment-error{color:#b2433e;font-size:12px}#shop-payment-error:empty{display:none}

/* Checkout email: clear label and visible input on all screens. */
#shop .checkout-email{display:flex;flex-direction:column;gap:8px;text-align:left;color:#172b4d;font-size:16px;font-weight:600;width:100%;min-width:0}
#shop #shop-email{box-sizing:border-box;width:100%;min-width:0;min-height:48px;padding:12px 14px;border:2px solid #9aadd0;border-radius:12px;background:#fff;color:#172b4d;font-size:16px;font-weight:400;box-shadow:0 1px 3px #1638670d}
#shop #shop-email::placeholder{color:#64748b;opacity:1}
#shop #shop-email:focus{border-color:#2858ee;outline:3px solid #2858ee24;outline-offset:1px}

.checkout-quantity{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#172b4d;font-size:16px;font-weight:600;margin:8px 0 14px}.checkout-quantity[hidden]{display:none}.checkout-quantity input{box-sizing:border-box;width:88px;min-height:44px;padding:8px 12px;border:2px solid #9aadd0;border-radius:10px;background:#fff;color:#172b4d;font-size:16px}

/* Compact product cards with inline quantity controls. */
#shop #shop-description{display:none}
#shop .shop-option{position:relative;grid-template-columns:18px minmax(0,1fr) auto;gap:3px 9px;padding:10px 12px;text-align:left}
#shop .shop-item-select{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:inherit;background:transparent;cursor:pointer;z-index:1}
#shop .shop-item-select:focus-visible{outline:2px solid #2858ee;outline-offset:2px}
#shop .shop-option .option-mark{grid-column:1;grid-row:1/3}
#shop .shop-option strong{grid-column:2;grid-row:1;font-size:14px;line-height:1.3}
#shop .shop-option>span:not(.option-mark){grid-column:2;grid-row:2;font-size:12px;line-height:1.3}
#shop .shop-option>b{grid-column:3;grid-row:1;font-size:14px}
#shop .shop-item-quantity{grid-column:3;grid-row:2;display:flex;align-items:center;gap:0;position:relative;z-index:2;margin-top:3px;border:1px solid #c6d4ec;border-radius:8px;background:white}
#shop .shop-item-quantity button{width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:7px;background:transparent;color:#2858ee;font-size:21px;line-height:1;cursor:pointer}
#shop .shop-item-quantity button:disabled{color:#a0aec0;cursor:default}
#shop .shop-item-quantity output{min-width:24px;text-align:center;font-size:14px;color:#172b4d}
#shop .service-dialog-footer{padding:10px 16px max(10px,env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}
#shop #shop-selection{grid-column:1/-1;margin:0;font-weight:600}
#shop .checkout-email{grid-column:1;gap:4px;font-size:13px}
#shop #shop-email{min-height:42px;padding:8px 10px}
#shop #shop-chat{grid-column:2;align-self:end;min-height:42px;margin:0;padding:8px 12px;font-size:14px}
#shop #shop-payment-error{grid-column:1/-1;margin:0}
#shop #shop-payment-error:empty{display:none}
@media(max-width:360px){#shop .service-dialog-footer{gap:7px;padding-left:12px;padding-right:12px}#shop #shop-chat{font-size:13px;padding:8px}#shop .shop-option{padding:9px 8px;column-gap:6px}}
/* Aligned catalogue and collapsible mini cart. */
#shop .shop-product{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;min-width:0;border:1px solid #dfe7f3;border-radius:12px;background:#fff;text-align:left}
#shop .shop-product[data-selected=true]{border-color:#9bb9fa;background:#f5f8ff}
#shop .shop-product-info{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
#shop .shop-product-info strong{font-size:14px;line-height:1.4;color:#172b4d;overflow-wrap:anywhere}
#shop .shop-product-info small{font-size:12px;line-height:1.3;color:#718097}
#shop .shop-product-side{display:flex;flex-direction:column;align-items:flex-end;gap:7px;flex:0 0 100px}
#shop .shop-product-side>b{font-size:15px;color:#172b4d;line-height:1.2;white-space:nowrap}
#shop .product-stepper{display:flex;align-items:center;border:1px solid #d3def0;border-radius:9px;background:#fff;overflow:hidden}
#shop .product-stepper button{width:34px;height:34px;min-height:34px;padding:0;border:0;background:transparent;color:#2858ee;font-size:22px;line-height:1;cursor:pointer}
#shop .product-stepper button:disabled{color:#aeb9ca;cursor:default}
#shop .product-stepper output{width:28px;text-align:center;font-size:14px;color:#172b4d}
#shop .shop-package-select{padding:6px 12px;border:1px solid #d3def0;background:#fff;border-radius:8px;color:#2858ee;font-size:13px}
#shop .shop-cart{grid-column:1/-1;margin:0;border:0;background:#f2f6fc;border-radius:10px;padding:0 12px;min-width:0}
#shop .shop-cart summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;cursor:pointer;color:#172b4d;font-size:14px;list-style:none}
#shop .shop-cart summary::-webkit-details-marker{display:none}
#shop .shop-cart summary:after{content:'⌄';color:#6c7f9b}
#shop .shop-cart[open] summary:after{content:'⌃'}
#shop .shop-cart summary strong{margin-left:auto;white-space:nowrap;font-size:15px}
#shop #shop-cart-items{max-height:130px;overflow-y:auto;border-top:1px solid #dce5f1}
#shop .mini-cart-row{display:grid;grid-template-columns:minmax(0,1fr) auto 28px;align-items:center;gap:8px;padding:8px 0;color:#334155;font-size:12px}
#shop .mini-cart-row b{white-space:nowrap;font-weight:600}
#shop .mini-cart-row button{background:none;border:0;color:#718097;font-size:20px;padding:0;min-height:28px}
#shop .service-dialog-footer{column-gap:10px;row-gap:8px}
#shop .shop-options{gap:8px}
@media(max-width:360px){#shop .shop-product{padding:10px;gap:9px}#shop .shop-product-info strong{font-size:13px}#shop .shop-product-side{flex-basis:96px}}

#shop .service-dialog-footer .checkout-email{margin:0}

#chat .chat-header p{display:block;color:#52647d;font-size:13px;line-height:1.45;margin:4px 0 0;font-weight:500}#chat .chat-header>div:not(.chat-avatar){min-width:0}
