:root{font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#192e26;background:#f3f5f3}*{box-sizing:border-box}body{margin:0}header{background:#163e30;color:white;display:flex;justify-content:space-between;align-items:center;padding:20px max(20px,env(safe-area-inset-left))}h1{font-size:24px;margin:4px 0}small{letter-spacing:.15em}main{max-width:760px;margin:auto;padding:16px 16px calc(24px + env(safe-area-inset-bottom))}section{background:white;border:1px solid #d5ddd8;border-radius:12px;padding:18px;margin-bottom:16px}h2{font-size:19px;margin-top:0}label{display:block;margin:12px 0 6px}input,select,button,.button{font:inherit;min-height:48px;border:1px solid #bccbc2;border-radius:8px;padding:10px}input,select{width:100%;background:white;color:#192e26}button,.button{background:#1e7f5c;color:white;font-weight:600;cursor:pointer;text-decoration:none}button:disabled{opacity:.45;cursor:default}.row{display:flex;gap:8px;margin:10px 0}.row input{min-width:0;flex:1}.row button{flex-shrink:0}p{line-height:1.5;color:#4b6155}#status{padding:12px;background:#e2ebe5;overflow-wrap:anywhere}dl{display:grid;grid-template-columns:1fr auto;gap:12px}dd{margin:0;font-weight:700}#total{font-size:28px;color:#1e7f5c}.item{padding:12px 0;border-bottom:1px solid #e3e9e5}.item span{display:block;overflow-wrap:anywhere}.item .row{align-items:center}.item input{width:90px}.confirmation{display:flex;align-items:center;gap:10px}.confirmation input{width:24px;min-height:24px}#checkout{width:100%}video{width:100%;max-height:280px;background:#14271e}nav{display:flex;flex-wrap:wrap;gap:20px;margin:20px 0}a{color:#17684b}:focus-visible{outline:3px solid #c28019;outline-offset:3px}[hidden]{display:none!important}@media(min-width:680px){#workspace{display:grid;grid-template-columns:1fr 1fr;gap:16px}#workspace>section:first-child,#workspace>nav,#workspace>p{grid-column:1/-1}section{margin:0}}
textarea{width:100%;min-height:88px;border:1px solid #bccbc2;border-radius:8px;padding:10px;font:inherit}pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px ui-monospace,monospace}section button{margin:4px 2px}small{display:block}.receipt-terms{white-space:pre-line;font-size:12px}.row{flex-wrap:wrap}#receiptView{border-top:1px dashed #bccbc2;margin-top:15px}@media print{body>header,#status,#workspace>section,#workspace>nav,#workspace>p{display:none!important}#workspace{display:block!important}#workspace>#receiptSection{display:block!important;border:0}#receiptSection>h2,#receiptSection>button,#receiptTools,#receiptSection>.row,#shareLink{display:none!important}}
.photo-preview{display:block;max-width:100%;max-height:360px;object-fit:contain;margin:12px 0}#signatureCanvas{width:100%;height:auto;background:white;border:1px solid #9cafaa;touch-action:none;border-radius:8px}pre{white-space:pre-wrap;overflow-wrap:anywhere}#fileQueue>div{border-top:1px solid #dce5df;padding:12px 0}input[type=file]{width:100%;max-width:100%}[hidden]{display:none!important}
/* One business at a time, without overriding permission-controlled hidden. */
@media screen{#workspace{display:block}[data-view-inactive="true"]{display:none!important}#moduleToolbar{display:flex;align-items:center;gap:8px;margin:0 0 16px}#moduleToolbar strong{flex:1;text-align:center;font-size:17px}#moduleToolbar button{font-size:14px;padding:8px;min-height:44px}#moduleTabs{display:flex;gap:8px;flex-wrap:nowrap;overflow-x:auto;margin:0 0 16px;padding-bottom:4px}#moduleTabs button{flex-shrink:0;background:white;color:#17684b;border-color:#d5ddd8;font-size:14px}#moduleTabs [aria-current=page]{background:#163e30;color:white}#moduleHome{padding:20px}.module-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.module-card{background:#f5f8f6;color:#163e30;border-color:#d5ddd8;padding:20px 12px;text-align:left;margin:0!important;min-height:116px}.module-card strong{display:block;font-size:20px}.module-card span{display:block;font-size:13px;font-weight:400;line-height:1.5;margin-top:8px;color:#4b6155}#workspace>section{margin-bottom:16px}body>header{padding:14px 16px}body>header h1{font-size:20px}body>header button{font-size:13px;min-height:40px;padding:8px}main{padding:12px 12px calc(24px + env(safe-area-inset-bottom))}#status:empty{display:none}#workspace>nav[data-module-view]{font-size:13px}#workspace>p[data-module-view]{font-size:12px}}
@media print{#moduleToolbar,#moduleHome,#moduleTabs{display:none!important}}
.module-next{margin-top:20px;border-top:1px solid #d5ddd8;padding-top:12px}.module-next button{width:100%}
@media print{.module-next{display:none!important}}
/* Glass surfaces keep solid text and an opaque fallback for older browsers. */
@media screen{
:root{color:#183c37;background:#eaf1f3}body{min-height:100vh;background:radial-gradient(ellipse at 5% 10%,#cdece3 0,transparent 50%),radial-gradient(ellipse at 100% 30%,#dce6f8 0,transparent 55%),linear-gradient(155deg,#edf5f1,#eaf0f9);background-attachment:fixed}
body>header{background:rgba(244,250,248,.86);color:#183c37;border-bottom:1px solid rgba(255,255,255,.95);box-shadow:0 4px 24px #31554a08;-webkit-backdrop-filter:blur(22px) saturate(150%);backdrop-filter:blur(22px) saturate(150%);padding-top:calc(14px + env(safe-area-inset-top))}body>header small{font-size:10px;letter-spacing:.2em;color:#50736a}body>header h1{font-size:21px;letter-spacing:-.03em}body>header button{background:rgba(255,255,255,.6);border:1px solid white;color:#264f47;box-shadow:0 2px 8px #31554a08}
section{background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.96);border-radius:24px;box-shadow:0 10px 35px #31554a09,inset 0 1px 0 white;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}#moduleHome{background:transparent;border:0;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;padding:8px 0}#moduleHome>h2{font-size:26px;letter-spacing:-.04em;margin:10px 4px 6px}#moduleHome>p{font-size:14px;margin:0 4px 20px}
#moduleToolbar{background:rgba(255,255,255,.65);border:1px solid white;border-radius:20px;padding:6px;box-shadow:0 6px 18px #31554a07;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}#moduleToolbar button{background:rgba(255,255,255,.72);color:#1e574a;border:1px solid white;border-radius:14px;box-shadow:0 2px 8px #31554a08;min-width:64px}#moduleToolbar strong{font-size:16px;min-width:0}#moduleTabs{scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:3px 2px 8px;gap:8px}#moduleTabs::-webkit-scrollbar{display:none}#moduleTabs button{scroll-snap-align:start;background:rgba(255,255,255,.68);border:1px solid white;border-radius:16px;box-shadow:0 3px 10px #31554a06;padding:10px 16px}#moduleTabs [aria-current=page]{background:#245e50;color:white;border-color:#245e50}
.module-grid{gap:12px}.module-card{position:relative;background:linear-gradient(145deg,rgba(255,255,255,.92),rgba(255,255,255,.46));border:1px solid white;border-radius:24px;box-shadow:0 8px 24px #31554a09,inset 0 1px 1px white;min-height:168px;padding:18px;color:#1e4b42;overflow:hidden;-webkit-backdrop-filter:blur(20px) saturate(130%);backdrop-filter:blur(20px) saturate(130%)}.module-card:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(120deg,#ffffff40,transparent 55%)}.module-card strong{font-size:21px;letter-spacing:-.035em;line-height:1.2}.module-card>span:not(.module-icon){margin-top:9px;font-size:12px;line-height:1.45;color:#526f67}.module-icon{display:flex!important;align-items:center;justify-content:center;width:40px;height:40px;background:rgba(220,237,230,.75);border:1px solid rgba(255,255,255,.9);border-radius:13px;margin:0 0 15px!important;color:#286854!important}.module-icon svg{width:23px;height:23px}.module-card:nth-child(2) .module-icon{background:#e5eaff;color:#555f9c!important}.module-card:nth-child(3) .module-icon{background:#f4eadb;color:#8c6840!important}.module-card:nth-child(4) .module-icon{background:#e2eaf5;color:#44698a!important}
button,.button{border-radius:14px;transition:transform 180ms ease,box-shadow 180ms ease,background 180ms ease}button:active:not(:disabled),.button:active{transform:scale(.97)}#moduleHome>.row{gap:8px;margin-top:20px}#moduleHome>.row button{background:rgba(255,255,255,.65);border:1px solid white;color:#345e53;font-size:13px;font-weight:500;padding:10px 14px;margin:0;box-shadow:0 3px 12px #31554a06}#status{background:rgba(230,242,235,.68);border:1px solid #ffffffb3;border-radius:16px;font-size:13px;line-height:1.6;color:#48665c;margin:12px 0}input,select,textarea{background:rgba(255,255,255,.85);border-color:#cbdcd5;border-radius:12px}input:focus,select:focus,textarea:focus{border-color:#548878}#workspace>section:not(#moduleHome){padding:20px}h2{letter-spacing:-.025em}.row{align-items:center}#workspace>nav[data-module-view]{padding:12px 4px;gap:16px}#workspace>p[data-module-view]{padding:0 4px;color:#677c75}
.bilingual-label{display:inline-flex;flex-direction:column;vertical-align:middle;line-height:1.3;max-width:100%}.label-primary{display:block}.label-zh{display:block;font-size:11px;font-weight:400;line-height:1.4;letter-spacing:0;margin-top:4px;opacity:.78}.module-card strong .label-zh{font-size:12px;letter-spacing:0}.module-card>span .label-zh{font-size:10px;margin-top:3px}#moduleToolbar .label-zh,#moduleTabs .label-zh{font-size:10px}label>.bilingual-label{margin-bottom:3px}.confirmation .bilingual-label{flex:1;min-width:0}.module-card .label-primary{overflow-wrap:anywhere}
.view-enter{animation:glass-slide-in 360ms cubic-bezier(.2,.8,.2,1) both}@keyframes glass-slide-in{from{opacity:0;transform:translate3d(20px,6px,0)}to{opacity:1;transform:translate3d(0,0,0)}}
@media(hover:hover){.module-card:hover{transform:translateY(-3px);box-shadow:0 15px 30px #31554a14}button:hover:not(:disabled){filter:brightness(1.03)}}
@media(prefers-reduced-motion:reduce){.view-enter{animation:none}button,.button{transition:none}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){section,.module-card,#moduleToolbar,body>header{background:#f8fbfa}}
}
@media print{.label-zh{display:none!important}.bilingual-label{display:inline}.view-enter{animation:none!important}}
@media screen{.module-card .bilingual-label,.module-card .label-primary{font:inherit;margin:0;color:inherit}.module-card strong .label-primary{font-size:21px}.module-card strong .label-zh{font-size:12px;margin-top:5px}}
@media screen and (prefers-reduced-transparency:reduce){section,.module-card,#moduleToolbar,body>header{background:#f8fbfa;-webkit-backdrop-filter:none;backdrop-filter:none}}

/* Jelly colours for business screens: readable dark ink on light translucent fills. */
@media screen{
#workspace{--jelly-top:#eaf3ff;--jelly-bottom:#ccdefa;--jelly-edge:#b7ccef;--jelly-ink:#304f7b;--jelly-wash:#f3f7ff}
#workspace[data-active-view=repair],#workspace[data-active-view=service]{--jelly-top:#f2edff;--jelly-bottom:#dfd3fa;--jelly-edge:#cbbbe9;--jelly-ink:#554078;--jelly-wash:#faf7ff}
#workspace[data-active-view=buyin]{--jelly-top:#fff0e7;--jelly-bottom:#f8d9c7;--jelly-edge:#e6c0aa;--jelly-ink:#78503b;--jelly-wash:#fff8f3}
#workspace[data-active-view=customers]{--jelly-top:#e5f8f3;--jelly-bottom:#c6e9df;--jelly-edge:#abd7cb;--jelly-ink:#315e55;--jelly-wash:#f3fbf8}
#workspace[data-active-view=files],#workspace[data-active-view=history]{--jelly-top:#f8ecf6;--jelly-bottom:#edd0e8;--jelly-edge:#d8b7d3;--jelly-ink:#70466a;--jelly-wash:#fff7fd}
#workspace[data-active-view=refund]{--jelly-top:#fff0ef;--jelly-bottom:#f6d5d7;--jelly-edge:#e6babe;--jelly-ink:#7a4149;--jelly-wash:#fff8f8}
#workspace>section:not(#moduleHome){background:linear-gradient(150deg,rgba(255,255,255,.9),var(--jelly-wash));color:#34425b;border-color:#ffffff;box-shadow:0 12px 32px #5262820b,inset 0 1px 0 white}
#workspace>section:not(#moduleHome) button,#workspace>section:not(#moduleHome) .button{background:linear-gradient(155deg,var(--jelly-top),var(--jelly-bottom));color:var(--jelly-ink);border:1px solid var(--jelly-edge);box-shadow:inset 0 1px 0 #ffffffed,inset 0 -1px 2px #ffffff55,0 4px 10px #6174980b;text-shadow:0 1px 0 #ffffff65}
#moduleTabs [aria-current=page]{background:linear-gradient(145deg,var(--jelly-top),var(--jelly-bottom));color:var(--jelly-ink);border-color:var(--jelly-edge);box-shadow:inset 0 1px 0 white,0 3px 12px #65739414}
#workspace[data-active-view]:not([data-active-view=home]) #moduleToolbar button{background:linear-gradient(145deg,#ffffffd9,var(--jelly-top));color:var(--jelly-ink)}
#workspace>section:not(#moduleHome) h2,#total{color:var(--jelly-ink)}
#workspace>section:not(#moduleHome) p{color:#596579}#workspace>section:not(#moduleHome) input,#workspace>section:not(#moduleHome) select,#workspace>section:not(#moduleHome) textarea{border-color:#d2d9e6;color:#34425b}#workspace>section:not(#moduleHome) input:focus,#workspace>section:not(#moduleHome) select:focus,#workspace>section:not(#moduleHome) textarea:focus{border-color:var(--jelly-edge)}
#checkout,.module-next button{font-weight:700;border-width:1px!important;box-shadow:inset 0 2px 0 #ffffffd9,0 6px 16px #60749b14!important}
#workspace>section:not(#moduleHome) input[type=checkbox]{accent-color:var(--jelly-ink)}
}
@media screen and (prefers-reduced-transparency:reduce){#workspace>section:not(#moduleHome){background:var(--jelly-wash)}}
@media screen{#workspace[data-active-view]:not([data-active-view=home]) #moduleTabs button:not([aria-current=page]){color:#52627c}#workspace[data-active-view]:not([data-active-view=home]) #moduleToolbar strong{color:#3d4d65}}
/* Native top-layer scanner: never hidden below forms or transformed glass panels. */
#scannerDialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));border:0;background:#f0f5fc;color:#34425b;overflow:auto}
#scannerDialog::backdrop{background:#18243680}#scannerDialog h2{font-size:20px;margin:0 0 12px}#scanFeedback{min-height:76px;padding:14px;border:1px solid #c3d5ef;border-radius:18px;background:#e0ebfc;white-space:pre-line;overflow-wrap:anywhere;font-size:19px;font-weight:600;line-height:1.5}
#scannerDialog video{display:block;width:100%;height:42vh;height:42dvh;max-height:none;border-radius:20px;object-fit:contain;background:#192235}#scannerDialog p{font-size:13px;line-height:1.5}#scannerDialog button{background:linear-gradient(145deg,#eef4ff,#ccdefa);color:#304f7b;border-color:#b7ccef;margin:6px 3px}#stopScan{width:100%;margin:12px 0!important}#lastScan{background:#e2edf9;color:#304f7b;border:1px solid #c3d5ef;border-radius:14px;padding:12px;font-weight:600;overflow-wrap:anywhere}body:has(#scannerDialog[open]){overflow:hidden}
@media print{#scannerDialog,#lastScan{display:none!important}}
.scanner-header{display:flex;align-items:center;gap:12px;margin-bottom:12px}.scanner-header h2{flex:1;margin:0!important}.scanner-header #stopScan{width:auto;margin:0!important;flex-shrink:0;font-size:14px}#scannerDialog .confirmation{font-size:14px;line-height:1.4}#scannerDialog #video{margin-top:12px}
#shortcutPanel{margin:0 0 20px;padding-bottom:18px;border-bottom:1px solid #dbe3f0}.shortcut-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.shortcut-heading h3{margin:0;font-size:17px;color:#3b5478}.shortcut-heading button{font-size:12px;min-height:40px;margin:0!important}#shortcutStatus{font-size:12px!important;margin:8px 0 12px}#shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:270px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.shortcut-key{text-align:left;min-height:84px;margin:0!important;padding:10px;border-radius:16px!important;min-width:0}.shortcut-number{display:block;font-size:10px;opacity:.7;letter-spacing:.05em;margin-bottom:7px}.shortcut-name{display:block;font-size:13px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}#workspace>section .shortcut-key:nth-child(4n+2){background:linear-gradient(145deg,#f1edff,#ded5f7);color:#554078;border-color:#cbbbe9}#workspace>section .shortcut-key:nth-child(4n+3){background:linear-gradient(145deg,#fff0e7,#f8dfd1);color:#78503b;border-color:#e6c0aa}#workspace>section .shortcut-key:nth-child(4n+4){background:linear-gradient(145deg,#e9f8f3,#d0eae2);color:#315e55;border-color:#abd7cb}
#shortcuts{display:flex;gap:12px;max-height:none;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;padding-bottom:4px}#shortcuts::-webkit-scrollbar{display:none}.shortcut-page{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:84px;gap:8px;flex:0 0 100%;min-width:0;scroll-snap-align:start}
#scanHub{margin:16px 0 22px;padding:16px;border:1px solid white;border-radius:24px;background:#ffffffb3;box-shadow:0 8px 20px #52628208}#hubScan{width:100%;background:linear-gradient(145deg,#edf2ff,#d3ddf8);color:#304f7b;border-color:#b7ccef}#hubForm{display:flex;align-items:end;gap:8px;margin-top:10px}#hubForm label{flex:1;min-width:0;margin:0;font-size:12px}#hubForm input{margin-top:6px}#hubForm button{font-size:12px;margin:0;max-width:100px;background:#e7edfc;color:#304f7b;border-color:#c5d3ee}#hubStatus{font-size:13px;overflow-wrap:anywhere}.scan-match{font-size:13px;padding:10px;background:#edf3fc;border-radius:12px}#hubActions button{background:#e4ebfa;color:#304f7b;border-color:#c5d3ee;font-size:13px}
.shortcut-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* Compact landscape viewfinder; no screen rotation required. */
#scannerDialog{inset:0;margin:auto;width:calc(100% - 24px);max-width:640px;height:fit-content;max-height:calc(100dvh - 24px);padding:16px;border:1px solid white;border-radius:24px;box-shadow:0 24px 70px #17263b33;overflow:auto}
#scannerDialog #video{width:100%;height:auto;aspect-ratio:16/9;max-height:38dvh;object-fit:contain;margin:0;border-radius:16px}#scanFeedback{min-height:0;padding:10px 12px;font-size:15px;margin:10px 0}#scannerDialog>p{font-size:12px;margin:8px 0}#scannerDialog .scanner-header h2{font-size:16px}#scannerDialog .scanner-header{margin-bottom:8px}#scannerDialog .confirmation{font-size:12px;margin:8px 0}#scannerDialog #resetScan{font-size:12px;min-height:36px;padding:6px 10px}#scannerDialog #camera{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px}#scannerDialog #video{flex-basis:100%}#scannerDialog #scanSound{min-height:20px;width:20px}
.code-field{display:flex;align-items:center;gap:8px;width:100%;min-width:0}.code-field input{flex:1;min-width:0}.field-scan{flex-shrink:0;font-size:12px;min-height:44px;white-space:nowrap;padding:8px!important;margin:0!important}#searchForm .row>.code-field{flex:1}#codeEntryDialog{width:calc(100% - 24px);max-width:480px;padding:20px;border:1px solid white;border-radius:24px;background:#f2f5fc;color:#34425b}#codeEntryDialog::backdrop{background:#18243666}#codeEntryDialog button{background:#e4ebfa;color:#304f7b;border-color:#c5d3ee}#hubForm>label{min-width:0}#hubForm{flex-wrap:wrap}#hubForm>label{flex-basis:100%}
@media(orientation:landscape) and (max-height:500px){#scannerDialog{max-width:780px;padding:10px 14px}#scannerDialog #video{max-height:46dvh;flex-basis:60%;width:60%}#scannerDialog #camera{justify-content:space-between}#scannerDialog>p{display:none}}
@media print{.field-scan,#codeEntryDialog{display:none!important}}
.field-scan span{display:block}.field-scan small{font-size:10px;letter-spacing:0;font-weight:400;opacity:.8;margin-top:3px}
/* Live sale workspace: one cart DOM and the original server quote, always visible. */
@media screen {
main{max-width:1100px}
#actionFeedback{position:fixed;z-index:1000;top:calc(8px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);padding:12px 18px;background:#233954;color:white;border:1px solid #ffffff60;border-radius:16px;box-shadow:0 8px 28px #18263833;font-size:14px;line-height:1.4;pointer-events:none;overflow-wrap:anywhere}
#cartSound{font-size:12px;white-space:nowrap}
#workspace:is([data-active-view=sale],[data-active-view=payment],[data-active-view=quick],[data-active-view=service]){display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
#workspace:is([data-active-view=sale],[data-active-view=payment],[data-active-view=quick],[data-active-view=service])>#moduleToolbar,#workspace:is([data-active-view=sale],[data-active-view=payment],[data-active-view=quick],[data-active-view=service])>#moduleTabs{margin:0;min-width:0}
#workspace #liveCart{padding:12px;margin:0;min-width:0;display:flex;flex-direction:column;gap:8px;box-shadow:0 -4px 24px #52628212}
.live-cart-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.live-cart-head h2{margin:0;font-size:16px}.live-cart-head #clear{font-size:12px;min-height:36px;padding:6px 12px;margin:0}
#cart{overflow-y:auto;min-height:58px;max-height:24dvh;overscroll-behavior:contain;scrollbar-gutter:stable}
#cart>.item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;padding:8px 0;align-items:center}#cart>.item>span{font-size:14px;font-weight:600;line-height:1.4}#cart .cart-quantity{display:flex;align-items:center;gap:3px}#cart .cart-quantity button{width:40px;min-height:40px;padding:4px;font-size:20px;margin:0}#cart .cart-quantity input{width:46px;min-height:40px;padding:4px;text-align:center;font-size:16px}#cart .cart-item-options{grid-column:1/-1;font-size:12px}#cart .cart-item-options small{letter-spacing:0;line-height:1.5;margin-top:6px}#cart .cart-item-options button{font-size:12px;min-height:38px}.cart-empty{font-size:13px;margin:10px 0}
#cartSettings{font-size:12px}#cartSettings summary{min-height:30px;padding:6px 0;cursor:pointer;color:#52627c}#cartSettings[open]{max-height:22dvh;overflow:auto}#cartSettings dl{margin:8px 0;gap:8px}#cartSettings button{font-size:12px;min-height:38px}
.live-cart-footer{display:flex;align-items:center;gap:14px;border-top:1px solid #d7dfec;padding-top:8px}.live-cart-amount{flex:1;min-width:0}.live-cart-amount dt{font-size:11px;color:#596579}.live-cart-amount #total{font-size:26px}.live-cart-footer>button{min-height:48px;padding:10px 22px;margin:0!important}
#workspace[data-active-view=sale]{height:calc(100dvh - var(--sale-top,126px) - 16px - env(safe-area-inset-bottom));min-height:420px;grid-template-rows:auto auto minmax(120px,1fr) auto}
#workspace[data-active-view=sale] #saleCatalog{margin:0;padding:12px;min-height:0;overflow:auto;overscroll-behavior:contain}
#workspace[data-active-view=sale] #liveCart{max-height:42dvh;min-height:170px}
#workspace[data-active-view=sale] #saleCatalog>h2{display:none}#saleCatalog #searchForm>label{font-size:12px;margin:0}#saleCatalog #searchForm .row{margin:6px 0}#saleCatalog #shortcutPanel{margin:10px 0;padding-bottom:10px}#saleCatalog #shortcutStatus{margin:4px 0;font-size:11px!important}.shortcut-page{grid-auto-rows:60px}.shortcut-key{min-height:60px;padding:8px}.shortcut-number{margin-bottom:3px}#saleCatalog .sale-tools{margin:8px 0;font-size:12px}#saleCatalog .sale-tools summary{padding:8px 0;cursor:pointer}#saleCatalog #results>.item{padding:12px;font-size:14px;text-align:left}
#workspace:is([data-active-view=payment],[data-active-view=quick],[data-active-view=service]) #liveCart{position:sticky;bottom:calc(6px + env(safe-area-inset-bottom));z-index:5}
#workspace[data-active-view=payment] .live-cart-footer>button{display:none}
body:has(#workspace[data-active-view=sale]) #status{position:absolute;width:1px;height:1px;overflow:hidden;padding:0;border:0;margin:0;clip-path:inset(50%)}
body:has(#workspace[data-active-view=sale]) main{padding-bottom:calc(8px + env(safe-area-inset-bottom))}
@media(min-width:760px){#workspace:is([data-active-view=sale],[data-active-view=payment],[data-active-view=quick],[data-active-view=service]){grid-template-columns:minmax(0,1fr) minmax(310px,.75fr);align-items:start}#workspace #moduleToolbar,#workspace #moduleTabs{grid-column:1/-1}#workspace[data-active-view=sale]{grid-template-rows:auto auto minmax(0,1fr);height:calc(100dvh - var(--sale-top,126px) - 16px - env(safe-area-inset-bottom))}#workspace[data-active-view=sale] #saleCatalog{height:100%}#workspace #liveCart{grid-column:2;grid-row:3;position:sticky;top:12px;max-height:70dvh!important}#cart{max-height:43dvh}}
@media(max-height:600px) and (max-width:759px){#workspace[data-active-view=sale]{height:auto;min-height:0;grid-template-rows:auto auto auto auto}#workspace[data-active-view=sale] #saleCatalog{max-height:45dvh}#workspace[data-active-view=sale] #liveCart{max-height:none;position:sticky;bottom:0}#cart{max-height:120px}}
@media(prefers-reduced-transparency:reduce){#liveCart{background:#f3f7ff!important}}
}
@media print{#actionFeedback,#cartSound{display:none!important}}

@media screen{.cart-line-total{letter-spacing:0;font-size:12px;color:#52627c;margin-top:3px}body:has(#workspace[data-active-view=sale]) main>p:first-child{font-size:11px;line-height:1.3;padding:6px 10px!important;margin:0 0 8px}}
@media screen{#workspace #liveCart{order:10}.live-cart-amount dd{margin:0}#cart .cart-line-total{font-weight:500}.cart-item-options summary{cursor:pointer;min-height:26px}#moduleTabs button{min-height:44px}.sale-tools summary{min-height:36px}}
@media screen{#workspace[data-active-view] #liveCart{padding:12px!important;overflow:hidden}.live-cart-head,.live-cart-footer{flex-shrink:0}#cart{flex:1 1 auto}#cartSettings{flex:0 1 auto;min-height:30px}#cartSettings[open]{max-height:14dvh;overflow:auto}#cart .cart-quantity button,#cart .cart-quantity input{min-height:44px}#cart .cart-quantity button{width:44px}}
@media screen and (min-width:760px) and (max-height:500px){
body>header{padding:6px 12px}body>header h1{font-size:16px}body>header small:not(.label-zh){display:none}body>header button{min-height:34px;padding:6px 10px}main{padding-top:6px}#workspace[data-active-view=sale]{min-height:0;gap:6px}#moduleToolbar,#moduleTabs{padding:3px!important}#moduleToolbar button,#moduleTabs button{min-height:36px;padding:6px 10px;font-size:12px}#workspace[data-active-view=sale] #liveCart{height:100%;min-height:0;max-height:100%!important;padding:8px!important;gap:4px}#workspace[data-active-view=sale] #cart{min-height:0;max-height:none}#cartSettings summary{min-height:24px;padding:3px 0}#cartSettings{min-height:24px}#cartSettings[open]{max-height:60px}.live-cart-head h2{font-size:13px}.live-cart-footer{padding-top:4px}.live-cart-footer button{min-height:40px;padding:6px 12px}.live-cart-amount #total{font-size:22px}
}
@media screen and (min-width:760px) and (max-height:500px){#moduleToolbar .label-zh,#moduleTabs .label-zh,#liveCart .label-zh{font-size:8px;line-height:1;margin-top:1px}#liveCart .live-cart-head #clear{min-height:30px;padding:4px 8px}#liveCart .live-cart-footer{gap:8px}#liveCart .live-cart-amount dt{font-size:10px;line-height:1.2}#liveCart .live-cart-footer>button{font-size:13px;min-height:40px;padding:4px 10px}#liveCart #cartSettings{font-size:11px}#liveCart .live-cart-head h2{font-size:12px}#liveCart #cart{min-height:0}}

/* Reuse the original category values with touch-friendly segmented buttons. */
@media screen { #entryCategoryButtons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border:0;padding:0;margin:14px 0}#entryCategoryButtons legend{font-size:13px;margin-bottom:8px}#entryCategoryButtons button{min-width:0;margin:0;font-size:12px;min-height:48px;padding:10px 6px}#entryCategoryButtons button[aria-pressed=true]{background:linear-gradient(145deg,#e2ecff,#c2d4f3);border-color:#a6bcdf;color:#304f7b;box-shadow:inset 0 1px 0 white,0 3px 12px #65739414} }
