/* Viewport layout affects screens only; thermal print styles remain independent. */
@media screen{
 html{height:100%;overflow:hidden}
 body{height:100vh;height:100dvh;overflow:hidden;display:flex;flex-direction:column}
 body>header{flex:0 0 60px;padding:10px clamp(16px,3vw,48px);min-height:0}
 body>main{flex:1;min-height:0;width:100%;max-width:1800px;margin:0 auto;padding:clamp(12px,2vh,24px) clamp(16px,3vw,48px) 12px;display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:10px}
 h1{font-size:clamp(24px,3vw,36px);margin:0 0 3px;line-height:1.1}
 h1+p{font-size:12px}.eyebrow{font-size:9px;letter-spacing:1.6px}
 .demo{margin:0;padding:7px 12px;font-size:9px;min-width:0}
 .workspace{min-height:0;grid-template-columns:minmax(0,1fr) clamp(290px,29vw,380px);gap:clamp(12px,2vw,28px)}
 .workspace>section{min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:10px}
 .sectionheading{margin:0;min-height:24px}
 .charges{min-height:0;gap:clamp(12px,2vw,24px)}
 .charge{min-height:0;padding:clamp(16px,2.4vw,32px) clamp(16px,2.4vw,32px) 0;justify-content:center}
 .charge svg{width:clamp(40px,7vh,74px);height:clamp(40px,7vh,74px);flex-shrink:0;margin:0 0 clamp(10px,2vh,24px)}
 .charge strong{font-size:clamp(25px,3.2vw,46px);line-height:1.1}
 .charge .price{font-size:clamp(36px,5vw,64px);margin:clamp(10px,2vh,24px) 0}
 .charge .price span{font-size:.6em}.charge .chargefoot{padding:clamp(10px,2vh,18px) 0;margin-top:auto}
 .men{background:#1763be}.women{background:#c5367b}
 .charge>span{color:#fff}.charge svg{opacity:1}
 .charge:disabled{opacity:.6}
 .workspace>section>.hint{margin:0;font-size:11px}
 #notice{font-size:12px;padding:10px 12px;min-height:38px;max-height:5.4em;overflow:auto;line-height:1.35}
 .workspace>aside{height:100%;min-height:0;align-self:stretch;display:flex;flex-direction:column;padding:clamp(12px,1.6vw,24px);gap:6px}
 aside .sectionheading{margin:0;flex-shrink:0}aside h2{font-size:15px}
 #operator{margin:0;font-size:11px;line-height:1.3;max-height:2.6em;overflow:auto;flex-shrink:0}
 .total{padding:clamp(5px,1.5vh,14px) 0;flex-shrink:0}.total strong{font-size:clamp(30px,4vw,50px);line-height:1.1;margin:6px 0}.total small{font-size:10px}
 .stat{flex:1;min-height:28px;padding:6px 0;align-items:center;font-size:12px;gap:10px}.stat strong{white-space:nowrap}
 #closing{margin:0;font-size:11px;line-height:1.3}#closing:empty{display:none}
 #shiftButton{flex-shrink:0;min-height:44px;padding:10px;font-weight:650;background:#103b55;color:white;border-color:#103b55}
 .workspace-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex-shrink:0}
 .workspace-actions button{min-height:44px;padding:8px;font-size:12px}
 footer{margin:0;padding:6px 0 0;min-height:20px;font-size:10px;gap:12px;line-height:1.3}
 .workspace-panel{width:min(620px,94vw);max-height:90vh;max-height:90dvh;overflow:auto;padding:20px}
 .panel-top{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;z-index:1;background:#fff;padding:12px 0;border-bottom:1px solid #e2e9ed}
 .panel-top button{min-height:44px;padding:8px 16px;background:#f3f6f8;border:1px solid #bdcdd5;border-radius:8px;color:#103b55}
 .history{margin-top:14px}.sales{max-height:none;overflow:visible}.sale{font-size:13px}.reprint{min-height:44px}
 #optionsDialog .thermal-options{border:0;margin:0}#optionsDialog button{min-height:44px}#optionsDialog select{min-height:44px;font-size:13px}
 #optionsDialog #install{width:100%;margin-top:12px}#installHelp{font-size:12px}
 dialog{max-height:92vh;max-height:92dvh;overflow:auto}
}
@media screen and (max-height:720px) and (min-width:701px){
 body>header{flex-basis:48px;padding-block:6px}.brand{font-size:16px}.brandmark{font-size:22px}
 body>main{gap:6px;padding-top:10px;padding-bottom:8px}h1{font-size:26px}.titlebar p{font-size:11px}
 .workspace>section{gap:6px}.workspace>aside{gap:3px;padding:12px}.total{padding:4px 0}.total strong{font-size:34px;margin:3px 0}.total small{display:none}
 .charge svg{width:38px;height:38px;margin-bottom:8px}.charge strong{font-size:30px}.charge .price{font-size:40px;margin:12px 0}.charge .chargefoot{padding:10px 0}
}
@media screen and (max-width:700px){
 body>header{flex-basis:50px;padding:8px 14px}.brand{font-size:15px;gap:8px}.brandmark{font-size:20px;padding-right:10px}.brand b{font-size:8px}.pill{font-size:10px;padding:6px 8px}
 header #network{max-width:150px;white-space:normal;font-size:9px;text-align:right}
 body>main{padding:10px 14px;gap:6px}h1{font-size:26px}.titlebar p{font-size:11px}.eyebrow{font-size:8px}
 .demo{font-size:8px;padding:5px 8px}.demo span{float:right;display:inline;margin:0;font-size:8px}
 .workspace{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:8px}
 .workspace>section{gap:5px;grid-template-rows:auto minmax(0,1fr) auto}.workspace>section>.hint{display:none}
 .charges{gap:10px}.charge{padding:12px 14px 0;border-radius:12px}.charge svg{width:32px;height:32px;margin-bottom:4px}.charge>span{font-size:11px}.charge strong{font-size:25px}.charge .price{font-size:34px;margin:6px 0}.charge .chargefoot{font-size:10px;padding:8px 0}
 #notice{padding:7px 10px;font-size:11px;min-height:30px}
 .workspace>aside{display:grid;grid-template-columns:1fr 1fr;gap:5px 14px;height:auto;padding:12px;border-radius:12px}
 aside .sectionheading{grid-column:1/-1}#operator{grid-column:1/-1;font-size:10px;max-height:1.3em}
 .total{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:4px 0;gap:10px}.total>span{font-size:9px;letter-spacing:.7px}.total strong{font-size:30px;margin:0}.total small{display:none}
 .stat{min-height:26px;padding:4px 0;font-size:11px}.stat b{margin-left:4px}#closing{grid-column:1/-1}
 #shiftButton{grid-column:1/-1}.workspace-actions{grid-column:1/-1}footer{font-size:8px;min-height:16px;padding-top:4px}footer span:first-child{display:none}
}
@media screen and (max-width:700px) and (max-height:760px){
 body>header{flex-basis:44px}body>main{padding:6px 10px;gap:4px}.titlebar h1{font-size:22px}.titlebar p{display:none}.workspace{gap:5px}.workspace>aside{padding:8px;gap:3px 10px}.charge svg{display:none}.charge strong{font-size:23px}.charge .price{font-size:30px;margin:4px 0}.charge .chargefoot{padding:6px 0}.sectionheading{min-height:20px}.total strong{font-size:26px}
}
@media screen and (max-height:520px) and (min-width:701px){
 body>header{flex-basis:40px;padding-block:4px}.brandmark{font-size:19px}.brand{font-size:14px}.brand b{font-size:8px}
 body>main{grid-template-rows:auto minmax(0,1fr) auto;padding:6px 12px;gap:5px}
 main>.eyebrow,main>.titlebar{display:none}.workspace{gap:10px;grid-template-columns:minmax(0,1fr) 300px}
 .workspace>section{grid-template-rows:auto minmax(0,1fr) auto;gap:5px}.workspace>section>.hint{display:none}
 .charge{padding:12px 14px 0}.charge svg{width:30px;height:30px;margin-bottom:4px}.charge strong{font-size:25px}.charge .price{font-size:34px;margin:6px 0}.charge .chargefoot{padding:8px 0}
 .workspace>aside{display:grid;grid-template-columns:1fr 1fr;gap:3px 10px;padding:8px}
 aside .sectionheading,#operator,.total,#closing,#shiftButton,.workspace-actions{grid-column:1/-1}
 #operator{max-height:1.3em;font-size:10px}.total{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:3px 0}.total>span{font-size:8px;letter-spacing:.4px}.total strong{font-size:28px;margin:0}.total small{display:none}
 .stat{font-size:10px;min-height:24px;padding:3px 0}.stat b{margin-left:3px}.stat span{white-space:nowrap}
 #notice{font-size:11px;padding:7px 10px;min-height:30px}footer{font-size:9px;padding-top:3px;min-height:16px}
}

@media screen{.brand{gap:12px;min-width:0}.brand .brand-logo{display:block;width:144px;height:36px;object-fit:contain}.brand .brand-product{font:600 9px system-ui;letter-spacing:1.5px;border-left:1px solid #ffffff50;padding-left:12px}@media(max-width:450px){.brand{gap:8px}.brand .brand-logo{width:112px;height:28px}.brand .brand-product{font-size:8px;padding-left:8px;letter-spacing:1px}}@media(max-height:520px){.brand .brand-logo{height:26px;width:112px}}}

@media screen{body>header{gap:12px}.logout{margin-left:auto;border:1px solid #ffffff70;border-radius:8px;padding:8px 12px;color:white;background:transparent;white-space:nowrap;min-height:32px;font:600 12px system-ui}@media(max-width:700px){#network{display:none}.logout{font-size:11px;padding:7px 9px}.brand .brand-product{display:none}}}
/* Compact touch cards: cap their size instead of stretching to the viewport. */
@media screen and (min-width:701px){
 .workspace>section{grid-template-rows:auto minmax(0,350px) auto auto;align-content:start}
 .charges{width:100%;max-width:800px}
 .charge{padding:18px 20px 0}
 .charge svg{width:40px;height:40px;margin-bottom:10px}
 .charge strong{font-size:30px}
 .charge .price{font-size:42px;margin:12px 0}
 .charge .chargefoot{padding:12px 0}
}
@media screen and (min-width:701px) and (max-height:520px){
 .workspace>section{grid-template-rows:auto minmax(0,230px) auto}
 .charge{padding:10px 14px 0}.charge svg{width:28px;height:28px;margin-bottom:4px}
 .charge strong{font-size:25px}.charge .price{font-size:34px;margin:6px 0}.charge .chargefoot{padding:8px 0}
}
@media screen and (max-width:700px){.charges{max-height:280px;align-self:start;height:100%}}

.core-sync{margin:16px 0;border-top:1px solid #ddd;padding-top:12px}.core-sync summary{cursor:pointer;font-weight:600}.core-sync textarea{width:100%;font-size:12px}.core-sync p{font-size:12px}
