/* Consumer landing and shopping: content-led sizing, not device-model offsets. */
body.consumer:is([data-screen="home"],[data-screen="shop"]){-webkit-text-size-adjust:100%;text-size-adjust:100%;--ui-nav-height:76px}
body.consumer:is([data-screen="home"],[data-screen="shop"]) main{min-width:0;padding-bottom:calc(152px + env(safe-area-inset-bottom,0px))}
body.consumer:is([data-screen="home"],[data-screen="shop"]) #app>.nav{height:auto;min-height:76px;padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:content-box}
body.consumer:is([data-screen="home"],[data-screen="shop"]) #app>.nav a{min-height:64px;min-width:0}
body.consumer[data-screen="home"] .reference-home-hero{height:auto;aspect-ratio:auto;overflow:hidden}
body.consumer[data-screen="home"] .reference-home-hero img{position:static;display:block;width:100%;max-width:100%;height:auto;object-fit:contain}
body.consumer[data-screen="home"] .reference-home-content{position:relative;margin:-20px 0 0;padding:0 12px;min-width:0}
body.consumer[data-screen="home"] .reference-home .home-store{height:auto;min-height:0;margin:0 0 12px;padding:12px;border-radius:16px}
body.consumer[data-screen="home"] .reference-home .store-line{display:grid;grid-template-columns:42px minmax(0,1fr);height:auto;gap:8px 10px;align-items:center}
body.consumer[data-screen="home"] .reference-home .store-line>img{width:42px;height:48px;object-fit:contain}
body.consumer[data-screen="home"] .reference-home .store-line>div{min-width:0}
body.consumer[data-screen="home"] .reference-home .store-line h2{font:600 clamp(17px,4.8vw,22px)/1.45 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif;white-space:normal;overflow:visible;overflow-wrap:anywhere;margin:0}
body.consumer[data-screen="home"] .reference-home .store-line h2 em{display:inline-block;font-size:11px;line-height:1.5;vertical-align:middle;white-space:nowrap}
body.consumer[data-screen="home"] .reference-home .store-line p{font-size:13px;line-height:1.6;white-space:normal;overflow:visible;overflow-wrap:anywhere;margin:3px 0 0}
body.consumer[data-screen="home"] .reference-home .store-line .text-action{grid-column:1/-1;justify-self:end;font-size:13px;line-height:1.5;min-height:40px;padding:9px 14px;margin:0}
body.consumer[data-screen="home"] .reference-home .home-stats{height:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px;padding:12px 0 0;border-top:1px solid #f0dfcc}
body.consumer[data-screen="home"] .reference-home .home-stats>*{min-width:0;height:auto;min-height:64px;padding:0;display:flex;flex-direction:column;justify-content:center;gap:4px}
body.consumer[data-screen="home"] .reference-home .home-stats strong{font-size:22px;line-height:1.4;overflow-wrap:anywhere;white-space:normal}
body.consumer[data-screen="home"] .reference-home .home-stats small{font-size:13px;line-height:1.5}
body.consumer[data-screen="home"] .reference-home .home-core{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 12px}
body.consumer[data-screen="home"] .reference-home .core-tile{display:flex;flex-direction:column;height:auto;min-height:0;padding:14px 12px;gap:8px;overflow:hidden;border-radius:16px}
body.consumer[data-screen="home"] .reference-home .core-tile>span{position:static;width:100%;min-width:0;order:0}
body.consumer[data-screen="home"] .reference-home .core-tile b{display:block;font:600 clamp(17px,4.5vw,21px)/1.5 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif;white-space:normal;overflow-wrap:anywhere}
body.consumer[data-screen="home"] .reference-home .core-tile small{display:block;font-size:13px;line-height:1.6;margin:2px 0 0;white-space:normal}
body.consumer[data-screen="home"] .reference-home .core-tile i{display:none}
body.consumer[data-screen="home"] .reference-home .core-tile>img{position:static;order:1;align-self:center;width:100%;height:auto;max-height:106px;object-fit:contain;margin:0}
body.consumer[data-screen="home"] .reference-home .home-quick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));height:auto;gap:4px;margin:0 0 12px;padding:12px 6px}
body.consumer[data-screen="home"] .reference-home .home-quick>*{min-width:0;min-height:70px;height:auto;gap:5px;padding:0;display:flex;flex-direction:column}
body.consumer[data-screen="home"] .reference-home .home-quick img{width:40px;height:40px;object-fit:contain}
body.consumer[data-screen="home"] .reference-home .home-quick span{font-size:12px;line-height:1.5;white-space:normal;text-align:center}
body.consumer[data-screen="home"] .reference-home .reference-original-banner{height:auto;aspect-ratio:auto;margin:0;border-radius:14px}
body.consumer[data-screen="home"] .reference-home .reference-original-banner>img{height:auto;width:100%;object-fit:contain}
body.consumer[data-screen="shop"] #app .modao-shop-welcome{display:flex;flex-direction:column;height:auto;min-height:0;margin:0 0 12px;padding:12px 14px 0;position:relative}
body.consumer[data-screen="shop"] #app .modao-shop-welcome>div{position:static;width:100%;min-width:0}
body.consumer[data-screen="shop"] #app .modao-shop-welcome small{position:static;display:block;width:auto;height:auto;padding:0 32px;text-align:center;font-size:clamp(20px,5.5vw,28px);line-height:1.5;white-space:normal;overflow-wrap:anywhere;background:none}
body.consumer[data-screen="shop"] #app .modao-shop-welcome .shop-heading-back{top:12px;left:8px;width:40px;height:44px;line-height:44px;padding:0;text-align:center}
body.consumer[data-screen="shop"] #app .modao-shop-welcome h1{position:static;width:auto;text-align:left;font-size:20px;line-height:1.5;margin:16px 0 0}
body.consumer[data-screen="shop"] #app .modao-shop-welcome p{position:static;width:auto;font-size:14px;line-height:1.6;margin:2px 0 0}
body.consumer[data-screen="shop"] #app .modao-shop-welcome>img{position:static;display:block;width:100%;height:auto;max-height:260px;object-fit:contain;margin:4px 0 0}
body.consumer[data-screen="shop"] #app .modao-shop-section,
body.consumer[data-screen="shop"] #app .modao-shop-welcome+.modao-shop-section{height:auto;min-height:0;margin:0 12px 14px;padding:14px 10px;border-radius:16px;box-sizing:border-box}
body.consumer[data-screen="shop"] #app .modao-shop-heading{margin:0 0 12px}
body.consumer[data-screen="shop"] #app .modao-shop-heading h2{font-size:20px;line-height:1.5}
body.consumer[data-screen="shop"] #app .modao-shop-heading p{font-size:13px;line-height:1.6;white-space:normal}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-items:stretch}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-grid>.empty{grid-column:1/-1}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card,
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card:has(.quantity-control output){display:flex;flex-direction:column;gap:3px;height:auto;min-height:0;min-width:0;padding:5px;overflow:visible;border-radius:12px}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card .product-picture{width:100%;height:auto;min-height:0;aspect-ratio:1/1;flex:none;margin:0;padding:0;overflow:hidden;border-radius:8px}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-picture img{display:block;width:100%;height:100%;object-fit:contain}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card h3{display:block;height:auto;min-height:0;font-size:clamp(12px,3.2vw,14px);line-height:1.5;margin:0;white-space:normal;overflow:visible;overflow-wrap:anywhere}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card .price{height:auto;font-size:clamp(14px,3.7vw,16px)!important;line-height:1.5;margin:0;padding:0;white-space:normal;overflow:visible;overflow-wrap:anywhere;letter-spacing:0}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card .product-status{position:static;inset:auto;display:block;height:auto;min-height:0;font-size:clamp(10px,2.7vw,12px);line-height:1.5;white-space:normal;overflow:visible;overflow-wrap:anywhere;padding:0;margin:0}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card .quantity-control{position:static;display:flex;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:2px;min-height:32px;width:100%;margin: auto 0 0;padding:2px 0 0;box-shadow:none;background:transparent}
body.consumer[data-screen="shop"] #app .modao-shop-section .quantity-control button{flex:0 0 30px;width:30px;height:32px;min-width:0;min-height:32px;font-size:20px;line-height:1;margin:0;padding:0;border-radius:50%}
body.consumer[data-screen="shop"] #app .modao-shop-section .quantity-control output{min-width:0;max-width:100%;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
body.consumer[data-screen="shop"] #app .modao-shop-section .quantity-control button:disabled{width:auto;min-width:0;max-width:100%;flex-basis:auto;font-size:11px;padding:4px;border-radius:8px}
@media(min-width:600px){body.consumer[data-screen="shop"] #app .modao-shop-section .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

body.consumer[data-screen="shop"] #app .modao-shop-section .product-card .quantity-control:has(output){display:grid;grid-template-columns:minmax(0,1fr) minmax(16px,auto) minmax(0,1fr);gap:1px}
body.consumer[data-screen="shop"] #app .modao-shop-section .quantity-control:has(output) button{width:100%;max-width:32px;justify-self:center}
body.consumer[data-screen="shop"] #app .modao-shop-section .quantity-control output{text-align:center}

/* Keep the initial add button beside the price, with stock below. */
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card:not(:has(.quantity-control output)):not(:has(.quantity-control button:disabled)){display:grid;grid-template-columns:minmax(0,1fr) 26px;grid-template-rows:auto 1fr auto auto;column-gap:2px;row-gap:2px;align-items:start}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card:not(:has(.quantity-control output)):not(:has(.quantity-control button:disabled)) .product-picture{grid-column:1/-1;grid-row:1}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card:not(:has(.quantity-control output)):not(:has(.quantity-control button:disabled)) h3{grid-column:1/-1;grid-row:2}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card:not(:has(.quantity-control output)):not(:has(.quantity-control button:disabled)) .price{grid-column:1;grid-row:3;align-self:center;min-width:0}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card:not(:has(.quantity-control output)):not(:has(.quantity-control button:disabled)) .product-status{grid-column:1/-1;grid-row:4;min-width:0}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card:not(:has(.quantity-control output)):not(:has(.quantity-control button:disabled)) .quantity-control{grid-column:2;grid-row:3;align-self:center;margin:0;padding:0;min-height:26px;width:26px}
body.consumer[data-screen="shop"] #app .modao-shop-section .product-card:not(:has(.quantity-control output)):not(:has(.quantity-control button:disabled)) .quantity-control button{width:26px;height:26px;min-height:26px;flex-basis:26px;font-size:20px}
