:root{color-scheme:light;--ink:#142822;--muted:#4c6258;--green:#19664b;--border:#d4e0d8;--paper:#f4f8f4;--white:#fff;--radius:16px}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.5 system-ui,-apple-system,sans-serif}
.site-header{background:#122821;color:white}
.header-inner{max-width:1140px;margin:auto;padding:15px 28px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:inline-flex;align-items:center;gap:11px;color:inherit;text-decoration:none;font-size:20px;font-weight:760;letter-spacing:-.04em}
.brand-mark{display:flex;gap:2px;align-items:stretch;justify-content:center;width:29px;height:27px;padding:6px;background:#c8f6d8;border-radius:6px;color:#122821}
.brand-mark i{width:2px;background:currentColor}.brand-mark i:nth-child(2){width:4px}
.private{font-size:14px;color:#d8eadf;text-align:right}
main{max-width:1140px;margin:auto;padding:43px 28px 28px}
.intro{display:flex;align-items:end;justify-content:space-between;gap:26px;margin-bottom:30px}
h1,h2,p{margin:0}h1{font-size:clamp(2rem,5vw,3.65rem);line-height:1.02;font-weight:760;letter-spacing:-.065em}h2{font-size:21px;line-height:1.2;letter-spacing:-.035em}
.intro p{max-width:320px;color:var(--muted);padding-bottom:2px}
.workspace{display:grid;grid-template-columns:1fr 1fr;align-items:stretch;gap:18px}
.panel{display:flex;flex-direction:column;min-width:0;background:white;border:1px solid var(--border);border-radius:var(--radius);padding:20px;box-shadow:0 6px 20px #1d52350a}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:33px;margin-bottom:15px}
.size-tag{background:#e6f3e9;color:#265640;padding:4px 9px;border-radius:6px;font-size:14px;white-space:nowrap}
.drop{min-height:342px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;background:#f0f8f1;border:1px dashed #82ad92;border-radius:12px;cursor:pointer;padding:24px;text-align:center}
.drop:hover,.drop.drag-over{background:#e3f3e7;border-color:var(--green)}
.drop strong{font-weight:650;font-size:19px;letter-spacing:-.02em}
.file-symbol{position:relative;display:flex;align-items:end;justify-content:center;gap:3px;width:51px;height:60px;border:1.5px solid #7fa992;border-radius:8px;background:white;padding:0 0 12px;color:#347759}
.file-symbol i{width:2px;height:18px;background:currentColor}.file-symbol i:nth-of-type(3){width:4px}.file-symbol span{position:absolute;top:10px;left:10px;width:22px;height:3px;background:#dbece0}
button,select,.choose,.file-action{font:inherit;font-size:14px;font-weight:650;min-height:37px;border-radius:8px}
button,select,.file-action{background:white;border:1px solid #cbdcd0;color:var(--ink)}
button,.choose,.file-action{padding:7px 12px;cursor:pointer}
.choose,.download{background:var(--green);color:white;border:1px solid transparent}
.choose{display:inline-grid;place-items:center;min-height:39px}
button:hover:not(:disabled),.file-action:hover{background:#edf5ee}.download:hover:not(:disabled){background:#104a36}
button:disabled{opacity:.55;cursor:default}
:focus-visible,#file:focus-visible~.drop,#file:focus-visible~#source-tools{outline:3px solid #2e8f67;outline-offset:3px}
select{appearance:none;padding:5px 28px 5px 9px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%234c6258' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 9px center}
.preview-stage,.source-stage{display:grid;place-items:center;background:#eaf0eb;border:1px solid #e1eae3;border-radius:11px;min-height:270px;height:342px;padding:14px;overflow:hidden}
.source-stage{height:304px}.sheet{position:relative;box-shadow:0 4px 14px #182e2426;touch-action:none;cursor:crosshair;user-select:none}.sheet canvas{display:block;width:100%;height:100%;background:white}
.crop{position:absolute;outline:2px solid #168253;box-shadow:0 0 0 100vmax #152d2652;pointer-events:none}.sheet{overflow:hidden}
#preview{display:block;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 4px 14px #182e2426}
.placeholder{align-self:center;text-align:center;color:var(--muted);display:grid;justify-items:center;gap:17px;font-size:14px}
.illustration{width:110px;height:148px;background:#fff;padding:40px 18px 0;position:relative;box-shadow:0 4px 12px #182e241f;transform:rotate(-6deg);border-radius:3px}
.illustration i{position:absolute;height:14px;width:14px;border:2px solid #80a78d}.illustration i:nth-child(1){top:10px;left:10px;border-right:0;border-bottom:0}.illustration i:nth-child(2){top:10px;right:10px;border-left:0;border-bottom:0}.illustration i:nth-child(3){bottom:10px;left:10px;border-top:0;border-right:0}.illustration i:nth-child(4){bottom:10px;right:10px;border-top:0;border-left:0}
.sample-line{height:5px;background:#c8dbce;border-radius:2px;margin-bottom:7px}.sample-line.short{width:58%}.barcode{height:31px;margin-top:13px;background:repeating-linear-gradient(90deg,#62806d 0 2px,transparent 2px 4px,#62806d 4px 5px,transparent 5px 8px,#62806d 8px 12px,transparent 12px 14px)}
.file-row,.controls{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.file-row{justify-content:space-between;min-height:31px;margin:0 0 7px;color:var(--muted);font-size:14px}.file-row span{overflow-wrap:anywhere}.file-row label,.orientation{display:inline-flex;gap:7px;align-items:center;font-size:14px;color:var(--muted)}.file-row select{min-height:31px}
.controls{margin:12px 0 0}.output-tools{justify-content:space-between}.hint{margin-top:7px;color:var(--muted);font-size:14px}.download{width:100%;min-height:44px;margin-top:13px}
.status{min-height:24px;margin-top:13px;color:var(--muted);font-size:14px}.status.error{color:#a12622;font-weight:650}
.connection{margin-bottom:16px;border:1px solid var(--border);border-radius:10px;background:white;padding:10px 14px;color:var(--ink);font-size:14px}
.connection summary{cursor:pointer;font-weight:650}.connection p,.connection form{margin-top:7px}.connection a{color:var(--green)}
.connection output{display:block;margin-top:8px;font-family:monospace;overflow-wrap:anywhere}.connection button{margin-top:6px}
.connection input{font:inherit;border:1px solid var(--border);border-radius:8px;margin:6px 8px 0 0;padding:7px 9px;min-width:0;width:min(250px,100%)}
.print-actions{display:flex;gap:9px;margin-top:13px}.print-actions button{min-height:44px}.print-actions #print{flex:1;background:var(--green);color:white;border-color:transparent}.print-actions #print:hover:not(:disabled){background:#104a36}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:720px){main{padding:28px 16px 18px}.header-inner{padding:13px 16px}.intro{align-items:start;flex-direction:column;gap:13px;margin-bottom:21px}.intro p{max-width:480px}.workspace{grid-template-columns:1fr}.panel{padding:15px}.drop{min-height:226px}.preview-stage{height:302px}.source-stage{height:280px}}
