/* The opening screen is a single task surface; order totals stay in the editor. */
body[data-interface="customer"][data-step="1"] .prototype,
body[data-interface="customer"][data-step="1"] aside{display:none}
body[data-interface="customer"][data-step="1"] .layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.home-screen{display:grid;gap:18px;min-width:0}
.home-heading h1{color:var(--ink);font-size:clamp(1.7rem,2.6vw,2.5rem);letter-spacing:-.035em;line-height:1.1;margin:0 0 6px}
.home-heading p{font-size:1rem;line-height:1.35;margin:0;color:var(--muted)}
#step1 .welcome-start{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,26%);gap:20px;align-items:stretch}
#step1 .file-start{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;min-width:0}
.home-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(84px,1fr));gap:12px;min-width:0}
#step1 .home-source-grid .home-source{position:relative;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:14px;min-width:0;min-height:84px;width:100%;margin:0;padding:18px;text-align:left;border:1px solid var(--border);border-radius:16px;background:var(--panel);color:var(--ink);box-shadow:0 2px 8px #30263f06;overflow:hidden;cursor:pointer}
#step1 .home-source-grid #drop{background:var(--bluebg);border:2px solid var(--cyan)}
#step1 .home-source-grid .home-source:hover{background:var(--bluebg);border-color:var(--cyan);box-shadow:0 4px 16px #45479518;transform:none}
#step1 .home-source-grid .home-source:focus-visible,#step1 .home-source-grid .home-source:focus-within{outline:3px solid var(--cyan);outline-offset:3px}
#step1 .home-source-grid #drop.drag{border-style:dashed;background:var(--soft)}
#step1 .home-source-grid .source-icon{width:36px;height:36px;margin:0;flex-shrink:0;color:var(--cyan)}
.home-source-text{display:block;flex:1;min-width:0}
#step1 .home-source-text strong{display:block;margin:0;color:var(--ink);font-size:1.125rem;font-weight:700;line-height:1.25}
#step1 .home-source-text small{display:block;margin:5px 0 0;text-align:left;color:var(--muted);font-size:.875rem;font-weight:400;line-height:1.3}
.source-arrow{margin-left:auto;font-size:1.15rem;color:var(--muted);flex-shrink:0}
#step1 .home-formats{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;font-size:.8rem;line-height:1.35;color:var(--muted)}
.home-limit{white-space:nowrap}
.home-formats [data-tip]{cursor:help;text-decoration:underline dotted;text-underline-offset:4px}
.collection-entry{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:24px;border-radius:18px;background:linear-gradient(135deg,#454795,#65438e);color:#fff;min-width:0}
.collection-icon{width:48px;height:48px;margin-bottom:14px;color:#fff;flex-shrink:0}
.collection-entry h2{font-size:1.35rem;line-height:1.2;letter-spacing:-.02em;color:#fff;margin:0 0 10px}
.collection-entry p{color:#ffffffdf;font-size:.9rem;line-height:1.4;margin:0 0 18px}
.collection-entry .welcomeactions{display:block;width:100%;margin:0}
.collection-entry .collectbutton{width:100%;min-height:48px;white-space:normal;line-height:1.3;font-size:.875rem;background:#fff;color:#343677;border-color:#fff;padding:12px}
.collection-entry .collectbutton:hover{background:#f0edf8}
html[data-theme="contrast"] .collection-entry{background:var(--panel);border:2px solid var(--border)}
html[data-theme="contrast"] .collection-entry .collectbutton{color:#000;background:var(--cyan);border-color:var(--cyan)}
.home-order-dock{display:grid;gap:10px;min-width:0}
#step1 #uploadBusy{min-height:44px;font-size:.875rem;line-height:1.35;margin:0;padding:10px 12px}
#step1 #uploadBusy .loadspinner{width:22px;height:22px}
#step1 #fileList{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px;max-height:120px;overflow:auto;overscroll-behavior:contain;padding:2px;min-width:0;scrollbar-width:thin}
#step1 #fileList:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
#step1 .fileitem{padding:6px 8px;border:1px solid var(--line);border-radius:10px;gap:8px;min-width:0;background:var(--bluebg)}
#step1 .fileicon{font-size:.65rem;padding:5px;background:var(--panel)}
#step1 .filedesc strong{font-size:.85rem;line-height:1.3;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#step1 .filedesc small{font-size:.75rem;line-height:1.3}
#step1 .filedesc .convertednote{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.7rem}
#step1 .remove{font-size:1.25rem;min-width:36px;min-height:40px;padding:3px;flex-shrink:0}
.home-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:1px solid var(--line);padding-top:12px;min-width:0}
.home-meta{min-width:0}
.home-rates{display:flex;flex-wrap:wrap;align-items:center;gap:5px 16px;font-size:.875rem;line-height:1.35;color:var(--muted)}
.home-rates span:last-child{font-weight:650;color:var(--ink)}
.home-tools{display:flex;align-items:center;flex-wrap:wrap;gap:10px;color:var(--muted);margin-top:2px}
.home-tools .textbtn{font-size:.85rem;min-height:40px;padding:5px 0}
.home-next{display:flex;align-items:center;gap:14px;flex-shrink:0}
#homeOrderInfo{font-size:.875rem;font-weight:650;line-height:1.35;text-align:right;margin:0;color:var(--ink)}
#toSettings{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;line-height:1.25;max-width:290px;padding:12px 20px;white-space:normal}
/* Kiosk-sized screens use available height, without hiding page content. */
@media(min-width:800px) and (min-height:600px){
 body[data-interface="customer"][data-step="1"]{height:100dvh;min-height:600px;display:flex;flex-direction:column}
 body[data-interface="customer"][data-step="1"]>header{min-height:64px;padding:8px 20px;gap:12px;flex-wrap:nowrap;flex-shrink:0}
 body[data-interface="customer"][data-step="1"] .brand img{width:auto;height:42px;max-width:145px;object-fit:contain}
 body[data-interface="customer"][data-step="1"] .location{display:none}
 body[data-interface="customer"][data-step="1"] header .quiet{min-height:44px;font-size:.875rem;padding:8px 12px;white-space:nowrap}
 body[data-interface="customer"][data-step="1"] .brand{margin-right:auto}
 body[data-interface="customer"][data-step="1"] #displayBtn{margin-left:0}
 body[data-interface="customer"][data-step="1"]>main{flex:1;width:100%;max-width:1440px;min-height:0;display:grid;grid-template-rows:46px minmax(0,1fr);gap:12px;padding:10px 20px 16px}
 body[data-interface="customer"][data-step="1"] .quickguide{height:46px;margin:0;gap:10px}
 body[data-interface="customer"][data-step="1"] .quickguide>button{min-height:44px;padding:7px 12px;gap:10px}
 body[data-interface="customer"][data-step="1"] .quickguide small{display:none}
 body[data-interface="customer"][data-step="1"] .quickguide strong{font-size:.875rem;line-height:1.2}
 body[data-interface="customer"][data-step="1"] .quickguide .guideicon{width:26px;height:26px;border-radius:7px;flex-shrink:0}
 body[data-interface="customer"][data-step="1"] .quickguide .guideicon svg{width:20px;height:20px}
 body[data-interface="customer"][data-step="1"] .quickguide .stepnumber{width:16px;height:16px;font-size:.6rem;right:-4px;bottom:-4px}
 body[data-interface="customer"][data-step="1"] .layout{height:100%;min-height:0;align-items:stretch}
 body[data-interface="customer"][data-step="1"] #workspace{min-height:0;display:flex;flex-direction:column;padding:20px 24px;border-radius:18px}
 body[data-interface="customer"][data-step="1"] #step1{flex:1;min-height:0;grid-template-rows:auto minmax(0,1fr) auto;gap:16px}
 body[data-interface="customer"][data-step="1"] .welcome-start{min-height:0}
 body[data-interface="customer"][data-step="1"] .home-source-grid{grid-template-rows:repeat(2,minmax(84px,1fr))}
 body[data-interface="customer"][data-step="1"] #error{max-height:72px;overflow:auto;flex-shrink:0;font-size:.875rem;line-height:1.35;margin:8px 0 0;padding:8px 12px}
 body[data-interface="customer"][data-step="1"] #status{display:none}
 html[data-size="large"] body[data-interface="customer"][data-step="1"]{height:auto;min-height:100dvh}
 html[data-size="large"] body[data-interface="customer"][data-step="1"]>header{flex-wrap:wrap}
 html[data-size="large"] body[data-interface="customer"][data-step="1"]>main{display:block}
 html[data-size="large"] body[data-interface="customer"][data-step="1"] .quickguide{height:auto;margin-bottom:16px}
 html[data-size="large"] body[data-interface="customer"][data-step="1"] #step1{grid-template-rows:auto auto auto}
}
@media(min-width:800px) and (min-height:600px) and (max-height:740px){
 body[data-interface="customer"][data-step="1"]>header{min-height:58px;padding-block:5px}
 body[data-interface="customer"][data-step="1"]>main{padding:8px 16px 12px;gap:10px}
 body[data-interface="customer"][data-step="1"] #workspace{padding:16px 20px}
 body[data-interface="customer"][data-step="1"] #step1{gap:8px}
 #step1 .home-heading h1{font-size:1.8rem;margin-bottom:4px}
 #step1 .home-heading p{font-size:.9rem}
 #step1 .welcome-start{gap:16px}
 #step1 .file-start{gap:4px}
 #step1 .home-source-grid{gap:8px}
 #step1 .home-source-grid .home-source{padding:12px 14px;gap:10px}
 #step1 .home-source-grid .source-icon{width:28px;height:28px}
 #step1 .home-source-text strong{font-size:1rem}
 #step1 .home-source-text small{font-size:.8rem;margin-top:4px}
 .collection-entry{display:grid;grid-template-columns:32px minmax(0,1fr);gap:6px 10px;align-content:center;padding:14px}
 .collection-icon{width:32px;height:32px;margin:0;align-self:center}
 .collection-entry h2{font-size:1.1rem;margin:0;align-self:center}
 .collection-entry p{grid-column:1/-1;font-size:.85rem;margin:4px 0 6px}
 .collection-entry .welcomeactions{grid-column:1/-1}
 #step1 #fileList{max-height:80px}
 .home-footer{padding-top:8px;gap:12px}
 .home-order-dock{gap:8px}
 .home-next{gap:10px}
 #homeOrderInfo{font-size:.8rem;max-width:100px}
 #toSettings{font-size:.875rem;max-width:240px;padding:10px 14px}
}
@media(max-width:950px){.home-next{flex-direction:column;align-items:flex-end;gap:5px}.home-rates{font-size:.8rem;gap:4px 10px}#step1 .home-source-grid .source-arrow{display:none}}
@media(max-width:799px), (max-height:599px){
 .home-screen{gap:18px}
 #step1 .welcome-start{grid-template-columns:1fr;gap:16px}
 #step1 .collection-entry{display:grid;grid-template-columns:40px minmax(0,1fr);gap:4px 12px;padding:18px}
 .collection-entry .collection-icon{grid-row:1/3;width:36px;height:36px;margin:0}
 .collection-entry h2{font-size:1.1rem;margin:0}
 .collection-entry p{margin:0;font-size:.875rem}
 .collection-entry .welcomeactions{grid-column:1/-1;margin-top:10px}
 #step1 .home-formats{flex-wrap:wrap}
 .home-footer{align-items:stretch;flex-direction:column;gap:12px}
 .home-next{align-items:center;flex-direction:row;justify-content:space-between}
 #toSettings{flex:1;max-width:none}
 .home-source-grid{gap:8px}
 #step1 .home-source-grid .home-source{flex-direction:column;align-items:flex-start;gap:10px;padding:16px;min-height:138px}
 #step1 .home-source-grid .source-icon{width:28px;height:28px}
 #step1 .home-source-text strong{font-size:1rem}
 #step1 .home-source-text small{font-size:.8rem}
 #step1 .home-source-grid .source-arrow{display:none}
}
