/* Base controls and responsive geometry. Later sections layer the approved
   galaxy/card treatment and production shell integration over these defaults. */
#merchant-live{color-scheme:dark;font-family:Electrolize,'Segoe UI',sans-serif;color:#cee9f7;background:#030b14;--line:#286d88;--gold:#eac260;--muted:#9fbfce}
#merchant-live *{box-sizing:border-box}
#merchant-live body{margin:0}
#merchant-live button,#merchant-live input,#merchant-live select{font:inherit}
#merchant-live button{border:1px solid var(--line);border-radius:3px;background:#071a29;color:#c5ebfc;min-height:40px;padding:8px 13px;cursor:pointer}
#merchant-live button:hover:not(:disabled):not([aria-pressed=true]):not(.gold){border-color:#67dbfc;background:#123044}
#merchant-live button:focus-visible,#merchant-live input:focus-visible{outline:2px solid #ffe49c;outline-offset:2px}
#merchant-live button:disabled{color:#a4afba;background:#10202c;border-color:#334655;cursor:default}
#merchant-live button.gold,#merchant-live button[aria-pressed=true]{color:#ffe6a5;border-color:var(--gold);background:linear-gradient(#57471caa,#211b10)}
#merchant-live [hidden]{display:none!important}
#merchant-live h1,#merchant-live h2,#merchant-live h3,#merchant-live p{margin:0}
#merchant-live h2{font-size:20px}
#merchant-live small,#merchant-live .muted{color:var(--muted)}
#merchant-live #mp-merchant-view{height:100vh;height:100dvh;display:flex;flex-direction:column;gap:12px;padding:max(16px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:linear-gradient(#02070d66,#02070d99),url('../images/ui/fleet-command/fleet-command-background-mobile-dark-clean.png') center/cover}
#merchant-live .masthead{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none}
#merchant-live .brand{min-width:0}
#merchant-live .eyebrow{font-size:10px;letter-spacing:.2em;color:#8fb7ca}
#merchant-live h1{font-size:26px;letter-spacing:.06em;text-transform:uppercase;line-height:1.2}
#merchant-live .wallet{display:flex;gap:18px;font:15px 'Share Tech Mono',Consolas,monospace;white-space:nowrap}
#merchant-live .wallet b{font-weight:500}
#merchant-live .store-tabs{display:flex;align-items:center;gap:8px;flex:none}
#merchant-live .store-tabs button{min-width:136px;text-transform:uppercase;letter-spacing:.04em}
#merchant-live .store-tabs>span{margin-left:auto;color:#9ebfd1;font:12px Consolas,monospace}
#merchant-live .workspace{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(290px,1fr);gap:12px;flex:1;min-height:0}
#merchant-live .collection{display:flex;flex-direction:column;gap:12px;padding:14px;border:1px solid var(--line);background:#03101ac9;min-width:0;min-height:0}
#merchant-live .collection-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}
#merchant-live .collection-head button{font-size:14px}
#merchant-live .collection-head>span{font:12px Consolas,monospace;color:#a9cbdc;white-space:nowrap}
#merchant-live #mp-products{flex:1;min-height:0;display:grid;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}
#merchant-live .product{display:flex;flex-direction:column;gap:7px;padding:14px;border:1px solid var(--line);border-radius:3px;background:linear-gradient(135deg,#102a39dd,#020911ee);min-width:0;min-height:0}
#merchant-live .product.selected{border-color:var(--gold);background:linear-gradient(135deg,#3b3524ee,#07111aee)}
#merchant-live .product-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font:11px Consolas,monospace;color:#d3b4ef}
#merchant-live .product-top span:last-child{color:#e5c786}
#merchant-live .art{display:grid;place-items:center;flex:1;min-height:52px;font-size:56px;line-height:1.1;background:radial-gradient(ellipse,#21718c38,transparent 67%)}
#merchant-live .art img{width:100%;height:100%;max-height:120px;object-fit:contain}
#merchant-live .copy{display:flex;flex-direction:column;gap:6px}
#merchant-live .copy h3{font-size:16px;line-height:1.25;overflow-wrap:break-word}
#merchant-live .price{color:#f1d591;font:14px Consolas,monospace;line-height:1.35}
#merchant-live .price span{display:block}
#merchant-live .stock{font-size:12px;line-height:1.3;color:#b8d1df}
#merchant-live .stock.blocked{color:#f3b9a9}
#merchant-live .card-actions{display:flex;gap:7px;margin-top:auto}
#merchant-live .card-actions button{font-size:13px;padding:7px 9px;flex:1}
#merchant-live .card-actions button:first-child{flex:0 0 auto}
#merchant-live .pager{display:flex;align-items:center;justify-content:center;gap:18px;flex:none;font:13px Consolas,monospace}
#merchant-live .pager button{min-width:44px;min-height:34px;padding:5px 10px}
#merchant-live #mp-detail{padding:20px;display:flex;flex-direction:column;gap:18px;border:1px solid var(--line);border-top:2px solid var(--gold);background:#030d17e8;min-height:0;min-width:0}
#merchant-live #mp-detail .detail-art{font-size:80px;min-height:100px;flex:1;max-height:170px;display:grid;place-items:center}
#merchant-live #mp-detail .detail-art img{max-width:100%;height:130px;object-fit:contain}
#merchant-live .detail-name{font-size:22px;line-height:1.25}
#merchant-live .detail-section{display:flex;flex-direction:column;gap:10px}
#merchant-live .detail-label{color:#eac260;font:11px Consolas,monospace;letter-spacing:.14em;text-transform:uppercase}
#merchant-live .description{font-size:14px;line-height:1.6;overflow-wrap:break-word}
#merchant-live .detail-meta{font-size:13px;color:#aacbd9;line-height:1.5}
#merchant-live .detail-controls{display:flex;gap:7px;align-items:center;justify-content:space-between}
#merchant-live .detail-controls button{min-height:32px;padding:4px 10px}
#merchant-live .detail-controls span{font:12px Consolas,monospace}
#merchant-live .detail-buy{margin-top:auto;width:100%}
#merchant-live .bottom{display:flex;gap:8px;align-items:center;flex:none;min-width:0}
#merchant-live .bottom>button{font-size:12px}
#merchant-live .bottom>span{font-size:12px;color:#bed0db;flex:1}
#merchant-live .bottom #mp-cart{margin-left:auto}
#merchant-live #mp-overlay{position:fixed;inset:0;background:#000b;display:flex;align-items:center;justify-content:center;padding:12px;z-index:20}
#merchant-live #mp-dialog{width:min(580px,100%);display:flex;flex-direction:column;gap:14px;padding:18px;border:1px solid #4ac8ea;border-top:2px solid var(--gold);border-radius:4px;background:linear-gradient(#051321ed,#020810f5),url('../images/ui/fleet-command/fleet-command-background-mobile-dark-clean.png') center/cover;box-shadow:0 12px 60px #000b}
#merchant-live #mp-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px}
#merchant-live #mp-dialog>header h2{font-size:19px;line-height:1.2}
#merchant-live #mp-close{padding:0;min-width:36px;min-height:36px;font-size:23px}
#merchant-live #mp-dialog-body{display:flex;flex-direction:column;gap:12px;min-width:0}
#merchant-live #mp-dialog-actions{display:flex;justify-content:flex-end;gap:8px}
#merchant-live #mp-dialog-actions button{font-size:13px}
#merchant-live .choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#merchant-live .choice-grid button{font-size:13px;text-align:left}
#merchant-live .dialog-product{display:flex;align-items:center;gap:14px}
#merchant-live .dialog-art{font-size:42px;flex:none;width:68px;text-align:center}
#merchant-live .dialog-art img{width:68px;height:68px;object-fit:contain}
#merchant-live .dialog-product h3{font-size:17px;line-height:1.25}
#merchant-live .dialog-product small{display:block;margin-top:5px;line-height:1.4}
#merchant-live .stepper{display:flex;align-items:center;gap:12px;justify-content:space-between}
#merchant-live .stepper>div{display:flex;align-items:center;gap:12px}
#merchant-live .stepper button{min-width:40px;padding:6px}
#merchant-live .stepper output{font:17px Consolas,monospace;min-width:24px;text-align:center}
#merchant-live .stepper label{font-size:13px}
#merchant-live input[type=range]{width:100%;accent-color:var(--gold);height:26px;margin:0}
#merchant-live .cost-box{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px 0;display:grid;gap:7px}
#merchant-live .cost-row{display:flex;justify-content:space-between;gap:12px;font:13px Consolas,monospace}
#merchant-live .cost-row strong{text-align:right;color:#f3d791;font-weight:400}
#merchant-live .dialog-note{font-size:13px;line-height:1.45;color:#aac8d8}
#merchant-live .notice{color:#ffe4ac}
#merchant-live .details-layout{display:flex;flex-direction:column;gap:12px}
#merchant-live .preview-options{display:grid;grid-template-columns:1fr 1fr;gap:9px}
#merchant-live .preview-options label{font-size:13px;display:flex;gap:8px;align-items:center;min-height:32px}
#merchant-live .preview-options input{accent-color:var(--gold)}
#merchant-live .smallprint{font-size:12px;color:#a8c2d1;line-height:1.45}
@media(max-width:1100px){#merchant-live .wallet{flex-direction:column;gap:3px;font-size:13px}
#merchant-live h1{font-size:22px}
#merchant-live .workspace{grid-template-columns:minmax(0,1.7fr) minmax(275px,1fr)}
#merchant-live #mp-detail{padding:15px;gap:12px}
}
@media(max-width:899px),(max-height:640px){#merchant-live #mp-merchant-view{padding:12px;gap:8px}
#merchant-live .workspace{grid-template-columns:1fr}
#merchant-live #mp-detail{display:none}
#merchant-live .collection{padding:10px;gap:8px}
#merchant-live .store-tabs>span{font-size:11px}
#merchant-live .product{padding:12px;gap:6px}
#merchant-live .copy h3{font-size:15px}
#merchant-live .bottom #mp-feedback{font-size:11px}
#merchant-live .art{font-size:54px}
}
@media(max-width:540px){#merchant-live .masthead{align-items:flex-start;flex-direction:column;gap:8px}
#merchant-live .eyebrow{display:none}
#merchant-live h1{font-size:21px}
#merchant-live .wallet{width:100%;flex-direction:row;justify-content:space-between;gap:6px;font-size:12px}
#merchant-live .store-tabs button{min-width:0;flex:1;font-size:12px}
#merchant-live .store-tabs>span{display:none}
#merchant-live .collection-head button{font-size:12px;padding:7px 9px}
#merchant-live .collection-head>span{font-size:11px}
#merchant-live .bottom{flex-wrap:wrap}
#merchant-live .bottom #mp-feedback{order:5;flex:1 1 100%;min-height:13px}
#merchant-live .bottom #mp-cart{font-size:12px;padding:8px}
#merchant-live .bottom>button{padding:7px 9px}
#merchant-live .product-top{font-size:11px}
#merchant-live .art{font-size:64px}
#merchant-live .price{font-size:14px}
#merchant-live #mp-dialog{padding:14px;gap:12px}
#merchant-live #mp-dialog>header h2{font-size:18px}
#merchant-live .dialog-product h3{font-size:16px}
#merchant-live .dialog-art{width:46px;font-size:34px}
#merchant-live .dialog-art img{width:46px;height:56px}
#merchant-live .cost-row{font-size:12px}
#merchant-live .description{font-size:14px;line-height:1.5}
}
@media(max-height:450px){#merchant-live #mp-merchant-view{padding:8px 12px;gap:6px}
#merchant-live .masthead{min-height:31px;gap:12px}
#merchant-live .eyebrow{display:none}
#merchant-live h1{font-size:19px}
#merchant-live .wallet{flex-direction:row;font-size:12px;gap:12px}
#merchant-live .store-tabs button{min-height:32px;padding:5px 12px;font-size:12px}
#merchant-live .store-tabs>span{font-size:10px}
#merchant-live .collection{padding:7px;gap:5px}
#merchant-live .collection-head button{min-height:30px;padding:4px 9px;font-size:12px}
#merchant-live .collection-head>span{font-size:11px}
#merchant-live .pager{gap:12px;font-size:11px}
#merchant-live .pager button{min-height:28px;padding:2px 9px}
#merchant-live .bottom>button{min-height:32px;padding:5px 9px}
#merchant-live .bottom #mp-feedback{font-size:10px}
#merchant-live .product{display:grid;grid-template-columns:54px minmax(0,1fr);grid-template-rows:auto 1fr auto;gap:4px 9px;padding:8px}
#merchant-live .product-top{grid-column:1/-1;font-size:10px}
#merchant-live .art{grid-column:1;grid-row:2;min-height:0;font-size:36px}
#merchant-live .art img{max-height:62px}
#merchant-live .copy{grid-column:2;grid-row:2;gap:3px;justify-content:center}
#merchant-live .copy h3{font-size:12px;line-height:1.2}
#merchant-live .price{font-size:12px;line-height:1.2}
#merchant-live .stock{font-size:10px}
#merchant-live .card-actions{grid-column:1/-1;grid-row:3;gap:6px}
#merchant-live .card-actions button{min-height:28px;padding:3px 9px;font-size:11px}
#merchant-live .bottom{min-height:32px}
#merchant-live #mp-dialog{width:min(700px,100%);gap:8px;padding:10px 14px}
#merchant-live #mp-dialog>header h2{font-size:17px}
#merchant-live #mp-close{min-height:28px;min-width:30px}
#merchant-live #mp-dialog-body{gap:8px}
#merchant-live #mp-dialog-actions button{min-height:32px;padding:5px 10px}
#merchant-live .details-layout{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px}
#merchant-live .details-layout .dialog-product{grid-column:1}
#merchant-live .details-layout .detail-section{grid-column:2;grid-row:1/3}
#merchant-live .details-layout .detail-meta{grid-column:1}
#merchant-live .description{font-size:13px;line-height:1.4}
#merchant-live .dialog-product h3{font-size:15px}
#merchant-live .dialog-product small{font-size:11px}
#merchant-live .dialog-art{font-size:32px;width:44px}
#merchant-live .dialog-art img{width:44px;height:54px}
#merchant-live .cost-box{padding:6px 0;gap:4px}
#merchant-live .cost-row{font-size:12px}
#merchant-live .dialog-note,#merchant-live .detail-meta{font-size:12px;line-height:1.4}
#merchant-live .stepper button{min-height:30px}
#merchant-live .choice-grid button{min-height:34px;padding:6px 10px}
#merchant-live .preview-options{gap:4px}
#merchant-live .preview-options label{min-height:25px;font-size:12px}
#merchant-live .smallprint{font-size:11px}
}
#merchant-live .art{position:relative;line-height:1.4}
#merchant-live .art>span{white-space:nowrap}
#merchant-live .art img{position:absolute;inset:0;margin:auto;max-height:min(120px,100%)}
#merchant-live #mp-detail .detail-art{position:relative;font-size:64px;line-height:1.4}
#merchant-live #mp-detail .detail-art>span{white-space:nowrap}
#merchant-live #mp-detail .detail-art img{position:absolute;inset:0;margin:auto;max-height:100%;height:130px}
#merchant-live button.gold:disabled{color:#8fa1ad;border-color:#42515c;background:#15202a}
@media(max-height:450px){#merchant-live .collection{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr)}
#merchant-live .collection-head{grid-column:1;grid-row:1;justify-content:flex-start}
#merchant-live .pager{grid-column:2;grid-row:1}
#merchant-live .pager button{min-width:32px}
#merchant-live .pager{gap:7px}
#merchant-live #mp-products{grid-column:1/-1;grid-row:2}
#merchant-live .art{font-size:30px}
#merchant-live .art img{max-height:min(60px,100%)}
#merchant-live #mp-dialog[data-kind=confirm] #mp-dialog-body,#merchant-live #mp-dialog[data-kind=cart] #mp-dialog-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:20px}
#merchant-live #mp-dialog[data-kind=confirm] .dialog-product,#merchant-live #mp-dialog[data-kind=cart] .dialog-product{grid-column:1;grid-row:1}
#merchant-live #mp-dialog[data-kind=confirm] .stepper,#merchant-live #mp-dialog[data-kind=cart] .stepper{grid-column:1;grid-row:2}
#merchant-live #mp-dialog[data-kind=confirm] input[type=range]{grid-column:1;grid-row:3}
#merchant-live #mp-dialog[data-kind=confirm] .cost-box,#merchant-live #mp-dialog[data-kind=cart] .cost-box{grid-column:2;grid-row:1/4;align-content:center}
#merchant-live #mp-dialog[data-kind=confirm] .dialog-note,#merchant-live #mp-dialog[data-kind=cart] .dialog-note{grid-column:1/-1}
#merchant-live #mp-dialog[data-kind=cart] .stepper{gap:8px;flex-wrap:wrap}
#merchant-live #mp-dialog[data-kind=cart] .stepper>div{gap:5px}
#merchant-live .dialog-product{gap:8px}
#merchant-live .dialog-product h3{font-size:14px}
#merchant-live .dialog-product small{font-size:11px}
#merchant-live .cost-row{flex-wrap:wrap;gap:3px}
#merchant-live .cost-row strong{margin-left:auto}
}
#merchant-live .art{container-type:size}
#merchant-live .art>span{font-size:32px;font-size:min(56px,65cqh,65cqw)}
@media(prefers-reduced-motion:reduce){#merchant-live *{scroll-behavior:auto!important}
}
/* Approved visual treatment: preserve the base geometry while increasing
   galaxy visibility and card contrast. */
#merchant-live #mp-merchant-view{background:linear-gradient(#02070d33,#02070d55),url('../images/ui/fleet-command/fleet-command-background-mobile-dark-clean.png') center/cover}
#merchant-live .collection{border:0;background:transparent;padding:0;gap:12px}
#merchant-live #mp-products{align-content:start}
#merchant-live .product{background:linear-gradient(135deg,#031019bb,#01050bd9);border-color:#34758b}
#merchant-live .product.selected{background:linear-gradient(135deg,#302911cc,#01050bd9);border-color:#eac260}
#merchant-live .product .art{background:transparent}
#merchant-live .collection-head{border-bottom:1px solid #286d8866;padding-bottom:8px}
#merchant-live #mp-detail{align-self:start;height:auto;padding:16px;gap:12px;background:linear-gradient(#01060c44,#01060c88)}
#merchant-live #mp-detail .detail-art{flex:none;height:64px;min-height:64px;max-height:64px;font-size:40px}
#merchant-live #mp-detail .detail-art img{height:64px}
#merchant-live #mp-detail .detail-name{font-size:20px}
#merchant-live #mp-detail .description{font-size:13px;line-height:1.5}
#merchant-live #mp-detail .detail-section{gap:8px}
#merchant-live #mp-detail .detail-buy{margin-top:4px}
#merchant-live #mp-dialog{background:linear-gradient(#01060cc9,#01060ce0),url('../images/ui/fleet-command/fleet-command-background-mobile-dark-clean.png') center/cover}
#merchant-live #mp-dialog[data-kind=categories]{max-width:480px;border:1px solid #48dfff;padding:14px 16px;gap:12px}
#merchant-live #mp-dialog[data-kind=categories]>header{border-bottom:1px solid #286d8866;padding-bottom:10px}
#merchant-live #mp-dialog[data-kind=categories] #mp-dialog-actions{display:none}
#merchant-live .selection-list{display:grid;grid-template-columns:1fr;gap:7px}
#merchant-live .selection-list button{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;padding:9px 12px;border:1px solid #286d88;border-radius:4px;background:#04142188;color:#cee9f7;font-size:13px;text-align:left}
#merchant-live .selection-list button[aria-pressed=true]{border-color:#eac260;background:linear-gradient(#57471c66,#201b0c88);color:#ffe49c}
#merchant-live .selection-check{color:#eac260;min-width:16px}
@media(max-height:640px),(max-width:899px){#merchant-live .collection{padding:0;gap:8px}
}
@media(max-height:500px){#merchant-live .selection-list{grid-template-columns:1fr 1fr}
}
@media(max-height:450px){#merchant-live .collection{gap:5px}
#merchant-live .collection-head{padding-bottom:0;border:0}
#merchant-live #mp-products{align-content:stretch}
}
#merchant-live .product{position:relative}
#merchant-live .product>.card-hit{position:absolute;inset:0;width:100%;height:100%;min-height:0;border:0;border-radius:3px;padding:0;background:transparent;z-index:0;color:transparent}
#merchant-live .product>.card-hit:hover{background:#c6edff08}
#merchant-live .product>.card-hit:focus-visible{outline:2px solid #ffe49c;outline-offset:-3px}
#merchant-live .product>.product-top,#merchant-live .product>.art,#merchant-live .product>.copy{pointer-events:none;position:relative}
#merchant-live .product>.card-actions{position:relative;z-index:1}
/* All sizes use paginated cards and an on-demand detail drawer. */
@media(min-width:1000px) and (min-height:680px),(min-width:768px) and (min-height:800px){
#merchant-live .detail-identity{display:flex;flex-direction:column;gap:7px}
#merchant-live .detail-checkout{display:flex;flex-direction:column;gap:10px;align-items:stretch}
}
#merchant-live .workspace{display:flex;flex-direction:column}
#merchant-live #mp-detail{display:none!important}
#merchant-live .collection{flex:1}
#merchant-live #mp-overlay[data-kind=detail],#merchant-live #mp-overlay[data-kind=categories]{align-items:flex-end}
#merchant-live #mp-dialog[data-kind=detail],#merchant-live #mp-dialog[data-kind=categories]{position:relative;padding-top:24px;border-radius:8px 8px 4px 4px}
#merchant-live #mp-dialog[data-kind=detail]::before,#merchant-live #mp-dialog[data-kind=categories]::before{content:'';position:absolute;top:8px;left:calc(50% - 20px);width:40px;height:3px;border-radius:2px;background:#6a93a5}

/* Production shell integration overrides shared legacy UI defaults. */
#merchant-store.merchant-modern {padding:0!important;max-width:none!important;width:100%;height:100vh;height:100dvh;min-height:0;overflow:visible!important;background:none;}
#merchant-live {width:100%;font-family:Electrolize,Segoe UI,sans-serif;line-height:1.3;text-align:left;}
#merchant-live button {box-shadow:none;text-shadow:none;letter-spacing:normal;transform:none;}
#merchant-live h1,#merchant-live h2,#merchant-live h3 {font-family:Electrolize,Segoe UI,sans-serif;text-shadow:none;color:#cee9f7;text-align:left;}
#merchant-live #mp-overlay {z-index:10002;}
body.merchant-modern-mounted #premium-cart-sticky-bar {display:none!important;}
#merchant-live .confirmation-copy {white-space:pre-line;}
#merchant-live #mp-categories {display:flex;flex-wrap:wrap;gap:6px;min-width:0;}
#merchant-live #mp-categories button {font-size:12px;min-height:36px;padding:6px 10px;}
@media(max-width:600px){
  #merchant-live .collection-head {align-items:flex-start;}
  #merchant-live #mp-categories {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:1;}
  #merchant-live #mp-categories button {font-size:11px;padding:5px 6px;min-height:32px;}
  #merchant-live #mp-count {font-size:10px;padding-top:9px;}
}
@media(min-width:500px) and (max-width:600px) and (max-height:450px){
  #merchant-live #mp-categories {grid-template-columns:repeat(4,minmax(0,1fr));}
  #merchant-live #mp-categories button {font-size:10px;padding:4px;}
}

#merchant-live .ia-premium-pair .ia-cache-icon,#merchant-live .ia-premium-pair .ia-boost-icon{width:48px;height:48px}
#merchant-live .ia-premium-pair img{width:100%;height:100%;object-fit:contain}
#merchant-live .ia-premium-pair strong{font-size:24px;line-height:1.4;flex:none}
#merchant-live .art .ia-premium-pair:has(strong){flex-direction:row}
@media(max-height:450px){
 #merchant-live .art .ia-premium-pair:has(strong){flex-direction:column}
 #merchant-live .art .ia-premium-pair strong{font-size:16px}
}
#merchant-live .mp-ia-contents{font-size:11px;line-height:1.25;color:#c4e9f3}
@media(max-height:450px){#merchant-live .art .ia-premium-pair{flex-direction:column;gap:0}#merchant-live .art .ia-premium-plus{font-size:10px}#merchant-live .art .ia-premium-pair .ia-cache-icon,#merchant-live .art .ia-premium-pair .ia-boost-icon{width:30px;height:30px}#merchant-live .art .ia-premium-pair .ia-cache-icon{--cache-scale:.16}#merchant-live .mp-ia-contents{font-size:9px}}
/* Bundle pairs need their own column; the single-icon slot is only 44–68px. */
#merchant-live .dialog-product:has(.ia-premium-pair){display:grid;grid-template-columns:116px minmax(0,1fr);gap:12px}
#merchant-live .dialog-art:has(.ia-premium-pair){width:116px;min-width:0;line-height:1}
#merchant-live .dialog-product:has(.ia-premium-pair)>div:last-child{min-width:0}
#merchant-live .dialog-art .ia-premium-pair{width:100%;gap:4px}
#merchant-live .dialog-art .ia-premium-plus{font-size:14px;flex:none}
@media(max-height:450px){
 #merchant-live .dialog-product:has(.ia-premium-pair){grid-template-columns:92px minmax(0,1fr);gap:10px}
 #merchant-live .dialog-art:has(.ia-premium-pair){width:92px}
 #merchant-live .dialog-art .ia-premium-pair .ia-cache-icon,#merchant-live .dialog-art .ia-premium-pair .ia-boost-icon{width:36px;height:36px;flex:none}
 #merchant-live .dialog-art .ia-premium-pair .ia-cache-icon{--cache-scale:.19}
}

#merchant-live #mp-dialog-actions .mp-cart-remove{margin-right:auto;border-color:#a57579;color:#ffd5d5;background:#3c172333}
@media(max-width:600px) and (max-height:450px){
 #merchant-live #mp-dialog[data-kind=cart]{padding:10px 12px;gap:8px}
 #merchant-live #mp-dialog[data-kind=cart] #mp-dialog-body{gap:8px}
 #merchant-live #mp-dialog[data-kind=cart]>header h2{font-size:16px}
 #merchant-live #mp-dialog[data-kind=cart] .dialog-product h3{font-size:14px}
 #merchant-live #mp-dialog[data-kind=cart] .dialog-product small,#merchant-live #mp-dialog[data-kind=cart] .dialog-note{font-size:11px;line-height:1.3}
 #merchant-live #mp-dialog[data-kind=cart] .cost-box{padding:4px 0;gap:3px}
 #merchant-live #mp-dialog[data-kind=cart] .cost-row{font-size:12px}
 #merchant-live #mp-dialog[data-kind=cart] button{min-height:28px;padding:5px 8px;font-size:11px}
}

/* Sale ribbons stay in the header row, clear of artwork and touch targets. */
#merchant-live .mp-sale-ribbon{display:inline-flex;align-items:center;justify-content:center;flex:none;white-space:nowrap;padding:5px 15px 5px 9px;background:linear-gradient(110deg,#ff4d62,#cb1538 70%,#a50e2b);clip-path:polygon(0 0,100% 0,calc(100% - 7px) 50%,100% 100%,0 100%);color:#fff;font-size:11px;font-weight:900;letter-spacing:.5px;line-height:1.2;text-shadow:0 1px 2px #600b20;filter:drop-shadow(0 2px 3px #0008)}
#merchant-live .product-top{flex-wrap:wrap;row-gap:4px}
#merchant-live .mp-bundle-value{color:#9df6c6;font-size:12px;line-height:1.3;margin:4px 0;font-weight:700}
#merchant-live .mp-bundle-value small{font-size:10px;color:#c6dce6;font-weight:400}
#merchant-live .art img.mp-celebration-art{display:block;width:100%;height:100%;max-width:260px;max-height:150px;object-fit:contain}
#merchant-live .dialog-art:has(.mp-celebration-art){width:130px;min-width:0}
#merchant-live .dialog-art .mp-celebration-art{display:block;width:100%;height:auto}
@media(max-height:560px){#merchant-live .mp-bundle-value{font-size:11px}#merchant-live .mp-sale-ribbon{padding:3px 12px 3px 7px;font-size:10px;letter-spacing:.2px}}

/* Match the shared screen navigation: Back at upper left, wallet at right. */
#merchant-live .masthead{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px}
#merchant-live #mp-back{background:transparent;border-color:transparent;color:#8be9fa;white-space:nowrap;padding:8px 4px;min-height:40px;font-size:13px}
#merchant-live .masthead .brand{text-align:center}
@media(max-width:540px){#merchant-live .masthead{grid-template-columns:auto minmax(0,1fr);gap:4px 10px}#merchant-live .masthead .brand{text-align:right}#merchant-live .masthead .wallet{grid-column:1/-1;justify-content:flex-end;font-size:12px}}

/* Product navigation belongs beside the categories, before the cards. */
#merchant-live .collection{display:flex;flex-direction:column}
#merchant-live .collection-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 14px;padding-bottom:8px;border-bottom:1px solid #45859c}
#merchant-live .collection-head .pager{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-left:auto;padding:5px 7px;border:1px solid #3e8198;border-radius:5px;background:#041622f2;font:600 13px 'Segoe UI',sans-serif}
#merchant-live .collection-head .pager button{min-width:98px;min-height:44px;padding:7px 12px;font-size:13px;font-weight:700;white-space:nowrap}
#merchant-live .collection-head #mp-next:not(:disabled){color:#c9fbff;background:#073647;border:2px solid #58e8ff;box-shadow:0 0 12px #32d6f82b}
#merchant-live .collection-head .pager button:disabled{opacity:.55}
#merchant-live .mp-page-status{text-align:center;white-space:nowrap;color:#e8f9ff;line-height:1.35}
#merchant-live #mp-swipe-hint{display:none;color:#91ddeb;font-size:10px;font-weight:400}
#merchant-live #mp-products{touch-action:pan-y pinch-zoom}
@media(pointer:coarse){#merchant-live #mp-swipe-hint:not([hidden]){display:block}}
@media(max-width:700px){#merchant-live .collection-head .pager{width:100%;margin-left:0}#merchant-live .collection-head .pager button{min-width:90px;padding:6px 9px;font-size:12px}}
@media(max-height:450px){#merchant-live .collection-head{gap:4px 10px;padding-bottom:4px}#merchant-live .collection-head .pager{gap:7px;padding:3px 5px}#merchant-live .collection-head .pager button{min-height:36px}}

@media(max-width:380px){#merchant-live .collection-head .pager{display:grid;grid-template-columns:1fr 1fr}#merchant-live .mp-page-status{grid-column:1/-1;grid-row:1}#merchant-live .collection-head .pager button{grid-row:2;min-width:0;width:100%}#merchant-live #mp-prev{grid-column:1}#merchant-live #mp-next{grid-column:2}}

/* Reserve card space on short phones while keeping both browsing controls visible. */
@media(max-width:380px) and (min-height:451px){#merchant-live .product .art{min-height:44px}#merchant-live .product{gap:4px;padding:10px}}
@media(max-height:450px){
 #merchant-live .collection-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
 #merchant-live #mp-categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
 #merchant-live #mp-categories button{font-size:9px;padding:3px 2px;min-height:36px}
 #merchant-live .collection-head .pager{width:auto;margin:0;gap:5px;padding:3px}
 #merchant-live .collection-head .pager button{min-width:78px;padding:5px 6px;font-size:11px}
 #merchant-live .mp-page-status{font-size:11px}
 #merchant-live #mp-back{min-height:32px;padding-block:4px}
 #merchant-live .mp-bundle-value small{display:none}
}

@media(max-height:450px){
 #merchant-live .product{padding:6px;grid-template-columns:40px minmax(0,1fr);column-gap:6px}
 #merchant-live .mp-ia-contents small{display:none}
}

@media(max-height:450px){#merchant-live #mp-categories:not(:has(>button:nth-child(3))){grid-template-columns:repeat(2,minmax(0,1fr))}}

#merchant-live #mp-products.compact-row .product{grid-template-columns:40px minmax(0,1fr) 100px;grid-template-rows:auto 1fr}
#merchant-live #mp-products.compact-row .card-actions{grid-column:3;grid-row:2;flex-direction:column;margin-top:0;align-self:center}

#merchant-live #mp-products{grid-auto-rows:minmax(0,1fr)}

@media(max-width:360px) and (max-height:650px){
 #merchant-live .product>.art{display:none}
 #merchant-live .product{gap:4px;padding:8px}
 #merchant-live .product>.copy{flex:1;min-height:0}
 #merchant-live .card-actions button{min-height:30px;padding:4px 7px}
}

@media(min-height:451px){
 #merchant-live .product{padding:10px;gap:5px}
 #merchant-live .copy{gap:4px}
}
@media(min-height:451px) and (max-height:600px){#merchant-live .art{min-height:32px;font-size:36px;line-height:1}}
