:root{color-scheme:light dark;--bg:var(--tg-theme-bg-color,#f3f6f7);--paper:var(--tg-theme-secondary-bg-color,#fff);--ink:var(--tg-theme-text-color,#132c36);--muted:var(--tg-theme-hint-color,#627780);--accent:var(--tg-theme-button-color,#147b73);--accent-text:var(--tg-theme-button-text-color,#fff)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 system-ui,sans-serif}main{max-width:1150px;margin:auto;padding:28px 22px 110px}header{margin-bottom:24px}h1{font-size:clamp(26px,4vw,38px);line-height:1.2;margin:12px 0}h2{font-size:20px;margin:0 0 12px}.eyebrow{font-size:11px;letter-spacing:.12em;font-weight:700;color:var(--accent)}p{margin:8px 0 16px}.muted,.status{color:var(--muted);font-size:13px}.upload,#review,#summary,.form,.photo{background:var(--paper);border:1px solid #879ca633;border-radius:18px;padding:22px;margin-bottom:18px}.upload{border-style:dashed}.upload.drag{border:2px solid var(--accent)}.actions{display:flex;gap:10px;flex-wrap:wrap}button,.button{border:0;border-radius:10px;padding:12px 16px;background:var(--accent);color:var(--accent-text);font:inherit;font-weight:600;cursor:pointer}button.secondary,.button.secondary{background:var(--paper);color:var(--ink);border:1px solid #879ca64d}button:disabled{opacity:.45;cursor:default}.button input{position:absolute;width:1px;height:1px;opacity:0}.layout{display:grid;grid-template-columns:200px 1fr;gap:18px;margin-top:20px}nav button{display:block;text-align:left;width:100%;margin-bottom:8px;background:var(--paper);color:var(--ink);border:1px solid #879ca64d}nav button.selected{border:2px solid var(--accent)}.editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.photo img{width:100%;max-height:580px;object-fit:contain;cursor:zoom-in}.form label{display:block;font-size:14px;font-weight:600;margin:10px 0 5px}input:not([type=file]):not([type=checkbox]),textarea,select{width:100%;background:var(--bg);color:var(--ink);border:1px solid #879ca666;border-radius:8px;padding:10px;font:inherit}textarea{min-height:150px;resize:vertical}label.check{display:flex;align-items:flex-start;gap:8px;font-weight:400}input[type=checkbox]{margin-top:6px;min-width:18px;min-height:18px}.toolbar{position:sticky;bottom:0;display:flex;gap:8px;flex-wrap:wrap;padding:14px;background:var(--bg);border-top:1px solid #879ca64d}progress{width:100%;height:14px}#message{background:var(--paper);padding:12px 16px;border-radius:10px}dialog{max-width:95vw;max-height:95vh;background:var(--paper);color:var(--ink);border:0;border-radius:14px}dialog img{display:block;max-width:85vw;max-height:80vh;object-fit:contain}dialog::backdrop{background:#05191dd9}details{font-size:13px;white-space:pre-wrap}.result-row{padding:12px;border-bottom:1px solid #879ca633}body[data-busy=true] input[type=file]{pointer-events:none}@media(max-width:800px){main{padding:18px 14px 80px}.layout{grid-template-columns:1fr}nav{display:flex;overflow:auto;gap:8px}nav button{min-width:140px}.editor-grid{grid-template-columns:1fr}.photo img{max-height:330px}.upload,.form,.photo{padding:16px}.toolbar button{flex:1;font-size:14px}}

#camera-video{display:block;width:min(80vw,640px);max-height:65vh;object-fit:contain;background:#111;border-radius:10px}

#crop-canvas{display:block;max-width:80vw;max-height:60vh;touch-action:none;cursor:crosshair}#crop-dialog{max-width:95vw}

#camera-dialog{width:min(94vw,680px);max-height:94dvh;padding:14px;overflow:hidden}#camera-dialog h2{font-size:18px;margin-bottom:10px}.camera-view{position:relative;background:#111;border-radius:12px;overflow:hidden}#camera-video{width:100%;height:calc(94dvh - 155px);max-height:70dvh;object-fit:contain}#camera-shoot{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);width:68px;height:68px;border-radius:50%;border:4px solid #fff;background:#ffffffed;color:#172d35;font-size:30px;padding:0;box-shadow:0 2px 12px #0008;display:grid;place-items:center}#camera-shoot:disabled{opacity:.5}#camera-close{position:absolute;top:10px;right:10px;width:42px;height:42px;padding:0;border-radius:50%;background:#0009;color:#fff;font-size:23px}#camera-message{font-size:13px;line-height:1.35;margin:10px 0 0;max-height:54px;overflow:auto}

[hidden]{display:none!important}.editor-tabs{display:flex;gap:6px;margin:8px 0;position:sticky;top:0;background:var(--bg);z-index:2;padding:6px 0}.editor-tabs button{padding:9px;font-size:13px;flex:1}.form,.photo{padding:14px}.form h2{font-size:16px}.form label{margin-top:6px}.form button{padding:8px 12px;font-size:13px}header{margin-bottom:10px}header h1{font-size:25px}header>p{font-size:13px;margin-bottom:8px}.upload{padding:12px;margin-bottom:8px}.upload h2{display:none}.upload p{font-size:12px;margin:4px 0}.upload button,.upload .button{padding:8px 10px;font-size:13px}#message{font-size:12px;padding:7px 10px;margin:6px 0}.toolbar{position:fixed;bottom:0;left:0;right:0;z-index:3;padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom));justify-content:center}.toolbar button{font-size:12px;padding:9px}.editor-grid[data-tab=photo] .form{display:none}.editor-grid[data-tab=photo]{grid-template-columns:1fr}.editor-grid[data-tab=photo] .photo img{max-height:70dvh}#camera-dialog{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;padding:0;background:#000;color:#fff}#camera-dialog h2{display:none}#camera-dialog .camera-view{width:100%;height:100%;border-radius:0}#camera-video{width:100%;height:100%;max-height:none;object-fit:contain;border-radius:0}#camera-message{position:absolute;bottom:100px;left:12px;right:12px;text-align:center;background:#0009;color:#fff;border-radius:8px;padding:6px;max-height:70px}#camera-shoot{bottom:calc(18px + env(safe-area-inset-bottom))}#camera-close{top:calc(12px + env(safe-area-inset-top))}#zoom{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;background:#111;color:#fff;border-radius:0;padding:0;overflow:hidden}.zoom-toolbar{height:60px;display:flex;align-items:center;justify-content:center;gap:8px}.zoom-toolbar button{padding:8px 12px}#zoom-viewport{height:calc(100% - 60px);width:100%;overflow:hidden;touch-action:none;display:grid;place-items:center}#zoom-image{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;transform-origin:center;user-select:none}
@media(max-width:800px){.editor-grid:not([data-tab=photo]) .photo{display:none}main{padding:10px 10px 90px}.layout{margin-top:8px;gap:4px}nav button{padding:8px;font-size:12px;min-width:110px}.editor-grid{gap:0}.form{margin-bottom:0}.toolbar #back{flex:0}.editor-tabs{top:0}}

.zoom-toolbar{position:absolute;bottom:0;left:0;right:0;height:calc(66px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#111e;z-index:2}#zoom-viewport{height:100%;padding-top:max(54px,var(--tg-content-safe-area-inset-top,0px));padding-bottom:calc(72px + env(safe-area-inset-bottom))}#close-zoom{min-width:80px}textarea{min-height:330px;height:48dvh;max-height:70dvh;font-size:17px;line-height:1.55;padding:14px}.editor-grid[data-tab=description] .form{min-width:0}@media(min-width:801px){textarea{min-height:420px}}#camera-close{top:max(70px,var(--tg-content-safe-area-inset-top,0px))}

#window-size{float:right;padding:7px 10px;font-size:12px}#capture-toast{position:fixed;top:70px;left:50%;transform:translateX(-50%);z-index:20;background:#126a43;color:white;padding:14px 18px;border-radius:12px;box-shadow:0 4px 20px #0006;max-width:90vw;text-align:center;font-weight:600}@media(max-width:800px){#window-size{display:none}}

.toolbar #window-size{display:block;float:none;flex:0 0 auto;white-space:nowrap;order:-1}@media(max-width:480px){.toolbar #window-size{font-size:11px;padding:8px}}
