:root{--ink:#162723;--muted:#677771;--line:#e4eae7;--teal:#008577;--mint:#00b59d;--serif:Inter,system-ui,sans-serif;color:var(--ink);background:#f5f7f6;font-family:Inter,system-ui,sans-serif}
body{background:#f5f7f6;color:var(--ink)}[hidden]{display:none!important}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline-color:#009f88}
.li{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.85;stroke-linecap:round;stroke-linejoin:round;flex:none}
#appShell{max-width:830px;margin:auto;min-height:100dvh;padding-bottom:calc(96px + env(safe-area-inset-bottom));background:#f5f7f6}
#startScreen,#toolsScreen,#meScreen{padding-top:env(safe-area-inset-top)}.icon-only{padding:7px;width:44px;height:44px;min-height:44px;border:none;background:transparent}
#searchRow{padding:18px 18px 10px;display:flex;align-items:center;gap:8px;background:white}#searchRow>.icon-only{color:#009e89;background:#e7f8f3;border-radius:13px}
.searchbox{height:44px;min-width:0;display:flex;align-items:center;gap:9px;flex:1;background:#f1f4f3;color:#798984;border-radius:12px;padding:0 13px}
.searchbox input{border:0;outline:0;padding:0;background:transparent;width:100%;font:400 15px Inter,system-ui;color:var(--ink);box-shadow:none}.searchbox input:focus-visible{outline:0}.searchbox:focus-within{box-shadow:inset 0 0 0 2px var(--teal)}
.tile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 4px}
#homeShortcuts,#docShortcuts{background:#fff;padding:12px 12px 22px;margin:0 0 9px}.tile{--accent:#008e7d;--tint:#e3f8f2;border:0;padding:4px 1px;background:transparent;display:flex;flex-direction:column;justify-content:flex-start;gap:7px;text-align:center;font-size:13px;font-weight:550;line-height:1.3;color:#22332d}
.tile i,.personal>i{width:45px;height:45px;display:grid;place-items:center;background:var(--tint);color:var(--accent);border-radius:14px}.tile i .li{width:24px;height:24px;stroke-width:2.2}
.blue{--accent:#4479d7;--tint:#eaf0ff}.coral{--accent:#d86952;--tint:#ffede7}.amber{--accent:#ac7519;--tint:#fff4db}
#docShortcuts{grid-template-columns:repeat(4,minmax(0,1fr));background:#f5f7f6;padding:6px 14px 14px;gap:8px;margin:0}
#docShortcuts .tile{background:white;border-radius:13px;padding:13px 4px}
.list-panel,.tool-panel,.settings,.personal{background:white}.list-panel{padding:0 18px 25px;min-height:48vh;border-radius:17px 17px 0 0}
.section-bar,.sheetHead{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:68px}h1,.secondary>h1{font:700 clamp(23px,5.5vw,31px)/1.25 Inter,system-ui;letter-spacing:-.045em;margin:0}.section-bar h1{font:670 21px/1.3 Inter,system-ui;letter-spacing:-.035em;overflow-wrap:anywhere}
.link-action{border:0;font-size:13px;font-weight:500;color:#587269;background:transparent;padding:0 3px}.link-action .li{width:16px}.section-bar #listOptions{display:flex;align-items:center;margin-right:-8px}.section-bar .folder-back{width:36px}
.doc-row,.folder-row{border:none;border-radius:0;background:#fff;width:100%;padding:11px 0;gap:13px;justify-content:flex-start;text-align:left;min-height:78px}
.doc-row+.doc-row,.folder-row+.folder-row{border-top:1px solid #edf1ee}.doc-row img{width:49px;height:64px;object-fit:contain;border:1px solid #e1e7e3;border-radius:5px;background:#f7f9f7;flex:none}
.doc-row span,.folder-row span{min-width:0;flex:1}.doc-row b,.folder-row b{display:block;font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.doc-row small,.folder-row small{display:block;font-size:12px;font-weight:400;margin-top:5px;color:#697c72}.doc-row>.li,.folder-row>.li:last-child{width:16px;color:#87988f}
.folder-row>i{color:#00a38c;background:#e5f6ee;border-radius:10px;padding:10px;display:grid}.folder-row{min-height:64px}#docList.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.gallery .doc-row{display:block;background:#f5f8f6;border:0;border-radius:12px;padding:10px}.gallery img{width:100%;height:115px;margin-bottom:7px}.gallery .doc-row>.li{display:none}
#emptyList{padding:34px 10px 32px;text-align:center}.empty-symbol{width:67px;height:67px;margin:0 auto 16px;display:grid;place-items:center;border-radius:22px;color:#309884;background:#e9f7f2}.empty-symbol .li{width:31px;height:31px}
#emptyList strong{font-size:17px}#emptyList p{margin:8px 0 16px;color:var(--muted);font-size:14px}.start-scan,.ink{background:#008775;color:white;border-color:#008775;border-radius:12px}
#bottomNav,#editorDock{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,830px);background:#fff;display:flex;border-top:1px solid #e4ebe6;padding:5px 4px calc(5px + env(safe-area-inset-bottom));z-index:4}
#bottomNav button,#editorDock button{display:flex;flex:1;min-width:0;min-height:54px;border:0;background:transparent;color:#69776f;font-size:11px;font-weight:520;line-height:1.15;padding:3px 0;gap:4px;flex-direction:column;border-radius:8px}
#bottomNav button[aria-current="page"]{color:#007c69;font-weight:700}#bottomNav button[aria-current="page"] .li{background:#def6ee;box-sizing:content-box;padding:3px 12px;margin:-3px -12px;border-radius:12px}
#fab{position:fixed;bottom:calc(83px + env(safe-area-inset-bottom));right:max(18px,calc((100vw - 830px)/2 + 18px));height:58px;width:58px;border-radius:50%;border:0;background:#00a98f;color:white;box-shadow:0 5px 14px #007a6540;z-index:3}.li,.ic{pointer-events:none}#fab .li{width:27px;height:27px}
.secondary>h1{padding:22px 20px}.tool-panel{padding:18px 12px 30px;border-radius:16px}.tool-panel h2{margin:8px 6px 15px;font:650 17px Inter,system-ui}.tool-panel .tile-grid{margin-bottom:25px}.tool-panel .tile i{border-radius:50%}.personal{margin:0 16px 12px;padding:20px 14px;display:flex;gap:14px;align-items:center;border-radius:14px}.personal>i{color:#008b78;background:#ddf7ef}.personal h2,.sheetHead h2{font:650 19px Inter,system-ui}.personal p,.version{font-size:13px;color:var(--muted)}.personal p{margin:5px 0}.settings{margin:0 16px;padding:0 14px;border-radius:14px}.settings button,#chooserBody button{display:flex;width:100%;justify-content:flex-start;text-align:left;gap:12px;border:0;border-bottom:1px solid #edf0ee;background:white;border-radius:0;padding:14px 3px}.settings button{min-height:56px}.settings .li{color:#168a77}.version{margin:20px;text-align:center}
#workspace{padding:0 12px 12px}.edit-header{display:flex;align-items:center;gap:6px;background:white;border-bottom:1px solid var(--line);margin:0 -12px;padding:calc(5px + env(safe-area-inset-top)) 8px 5px;position:sticky;top:0;z-index:2}.edit-name{display:flex;align-items:center;min-width:0;flex:1}.edit-name input{width:100%;min-width:0;background:white;border:0;font:650 16px Inter,system-ui;padding:7px 2px}.edit-name .li{width:15px;color:#84938c}#desk{padding:0}#strip{padding:8px 0;margin:0}
#strip [aria-current=true]{border-color:#079b83;box-shadow:inset 0 0 0 1px #079b83;background:#e7faf4}
#preview{padding:10px;background:#ecf0ee}#preview img{max-height:56dvh}#quickPdf{margin:9px 12px}.controls,.view,dialog{background:#fff;border-color:var(--line)}.controls [role=tab][aria-selected=true]{color:#007f68;border-bottom-color:#00a98c}#editorDock button{color:#243d32}.controls,.view{border-radius:12px}.controls [role=tabpanel]{padding:15px}#message:not(:empty){position:fixed;bottom:calc(77px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:480px;width:max-content;max-width:min(90vw,480px);background:#203b32;color:white;padding:10px 15px;border-radius:12px;box-shadow:0 4px 16px #24322b26;z-index:5;font-size:13px}
#chooser{width:min(460px,calc(100vw - 20px));padding:10px 18px 18px}#chooserBody{max-height:63dvh;overflow:auto}#chooserBody input,#chooserBody select{width:100%;margin:8px 0}#chooserBody .li{color:#008b77}
#live[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:0;inset:0;margin:0 auto;width:100vw;max-width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;background:#060808;color:white;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);overflow:hidden}
.camTop,.camModes,.camBottom,.captureStyle{display:flex;align-items:center;justify-content:center}.camTop{padding:4px 10px;height:53px;gap:7px}.camSpacer{flex:1}#live button{color:#fff;background:transparent;border:0;font:550 14px Inter,system-ui;padding:6px 10px;border-radius:8px}#live #finish{background:#17332d;color:#98ead8}.camTop .li{width:24px}
#live .camera-frame{min-height:0;overflow:hidden;border-radius:0;margin:0;background:#111514}
#feed,#paperOutline{position:absolute;inset:0;width:100%;height:100%;max-height:none;min-height:0;object-fit:contain}
.cam-status{position:absolute;top:12px;left:50%;transform:translateX(-50%);width:max-content;max-width:92%;text-align:center}.cam-status p:not(:empty){font:500 13px/1.4 Inter,system-ui;background:#111a17bd;color:#fff;border-radius:12px;padding:7px 11px;margin:0}#live #native{background:white;color:#25332b;margin:7px}
.captureStyle{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);background:#141616bd;border-radius:28px;padding:3px;white-space:nowrap}#live .captureStyle button{min-height:36px;padding:6px 18px;border-radius:28px}#live .captureStyle button[aria-pressed=true]{background:#ffffff47}
.camModes{gap:8px;min-height:46px}#live .camModes button{position:relative;color:#cbd6d1;font-size:13px}#live .camModes button[aria-pressed=true]{color:#35dec2}#live .camModes button[aria-pressed=true]:before{content:"";position:absolute;top:0;left:32%;width:36%;height:3px;background:#14bca3;border-radius:0 0 5px 5px}
.camBottom{padding:4px 14px 14px;gap:18px}#live .camBottom button{display:flex;flex-direction:column;gap:4px;font-size:11px;min-width:74px}#live #snap{padding:0;height:67px;min-width:67px;width:67px;border-radius:50%;background:white;border:4px solid #00b8a0;box-shadow:inset 0 0 0 3px #101514}#live[data-saving] button{pointer-events:none}#torch[aria-pressed=true]{color:#ffe18a}
@media(min-width:740px){#appShell{box-shadow:0 0 35px #254c3810}.list-panel{padding:0 27px 25px}.tile-grid{gap:16px}.tile i{width:51px;height:51px}#searchRow{padding:23px 26px 12px}.secondary{padding-inline:12px}#live[open]{max-width:750px}.editor{grid-template-columns:minmax(0,1fr) minmax(285px,.78fr)}}
@media(max-width:740px){.editor{display:grid;grid-template-columns:minmax(0,1fr)}}

#feed{object-fit:cover}
#message:not(:empty){border-left:0;pointer-events:none}
#busy progress{accent-color:var(--teal)}
#camCount{border:0;background:none;padding:0;color:inherit}
.controls{scroll-margin-top:65px}
#appShell:has(#startScreen:not([hidden])){background:white}
