:root{--bg:#f6f5f0;--ink:#203d37;--green:#16715d;--soft:#edf3e7;--muted:#77847f;--line:#e0e7e1;--reading:20px;--vh:100dvh;--top:0px;color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}body{margin:0;overscroll-behavior-y:none}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer;color:var(--green);border:0;background:none}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #509f8a;outline-offset:2px}button,nav a{min-height:44px}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;flex-shrink:0}h1{font-size:28px;line-height:1.2;margin:8px 0 16px}h2{font-size:19px;margin:0;line-height:1.4}p{line-height:1.55;overflow-wrap:anywhere}#app{position:fixed;left:0;right:0;top:var(--top);height:var(--vh);padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);display:flex;flex-direction:column;width:100%;overflow:hidden}.top{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;flex-shrink:0;min-height:64px}.logo{text-decoration:none;font-weight:850;font-size:31px;letter-spacing:-2px;color:#123e37}.logo span{color:#f06a48}.top-actions{display:flex;gap:4px;align-items:center}.pill{border:1px solid #a4b8a3;border-radius:30px;padding:0 16px}.icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;padding:8px;border-radius:12px;flex-shrink:0}.icon-button:hover,.text-button:hover{background:#deebe2}main{min-height:0;flex:1;display:flex}.screen{display:none;width:100%;min-height:0;padding:0 12px 8px;flex-direction:column;gap:10px}.screen.active{display:flex}.language-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid var(--line);border-radius:24px;background:white;padding:8px 14px;flex-wrap:wrap;font-size:15px;min-height:42px;flex-shrink:0}.language-bar>span:first-child{font-weight:600}.connection{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:4px}.connection::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}.connection.online{color:var(--green)}.panels{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}.panel{display:flex;flex-direction:column;min-height:0;flex:1;border:1px solid var(--line);background:white;border-radius:23px;overflow:hidden;padding:4px 10px 10px}.source{flex:1.15}.translation{background:var(--soft)}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:4px;flex-shrink:0;min-height:44px}.panel-head h2,.panel-head label{font-weight:600;font-size:12px;line-height:1.35}.panel-head>div{display:flex;flex-shrink:0}.panel-head .icon-button{min-width:38px;width:38px;padding:7px}.panel-head svg{width:21px;height:21px}#source{background:transparent;border:0;resize:none;outline:none;min-height:40px;flex:1;width:100%;padding:7px 3px;font-size:var(--reading);line-height:1.45;color:var(--ink);border-radius:0}#source::placeholder,.placeholder{color:#87918a}.reading{font-size:var(--reading);line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}#output{overflow-y:auto;min-height:0;flex:1;padding:6px 3px;-webkit-overflow-scrolling:touch}.voice-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;min-height:64px}.voice-row>span{font-size:11px;color:var(--muted);max-width:35%;line-height:1.4}.microphone{background:var(--green);color:white;border-radius:50%;width:56px;height:56px;min-width:56px}.microphone svg{width:28px;height:28px}.microphone.recording{background:#c34f38;box-shadow:0 0 0 5px #c34f3818}.text-button{padding:8px 10px;font-size:14px;font-weight:600}.message{color:#a44d38;font-size:13px;line-height:1.45;margin:0;overflow-wrap:anywhere;flex-shrink:0}.message>span{display:block}.message .text-button{display:block;margin-left:auto}.tabs{display:flex;flex-shrink:0;background:#fff;padding:5px 6px calc(5px + env(safe-area-inset-bottom));border-top:1px solid #eff0e9;gap:4px}.tabs a{color:var(--muted);text-decoration:none;display:flex;align-items:center;justify-content:center;gap:4px;flex-direction:column;width:25%;font-size:11px;min-height:58px;border-radius:18px;padding:6px 1px;font-weight:500}.tabs a.selected{background:#e5eedc;color:var(--green);font-weight:650}.tabs svg{width:24px;height:24px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-shrink:0}.section-heading h1{margin-bottom:5px}.section-heading p{color:var(--muted);font-size:13px;margin:0 0 4px}.section-heading>svg{width:27px;height:27px}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px 16px;gap:16px}.empty>span svg{width:42px;height:42px;color:var(--muted)}.empty h2{font-weight:500}.empty p{color:var(--muted);margin:0}.photo-stage{flex:1;min-height:100px;background:white;border:1px solid var(--line);border-radius:20px;overflow:auto;display:grid;place-items:center}.photo-stage>.empty{height:100%;width:100%}.photo-actions{display:flex;gap:8px;flex-shrink:0}.photo-actions button{flex:1;display:flex;align-items:center;justify-content:center;gap:8px}.outline{border:1px solid var(--line);border-radius:16px;padding:10px 14px;line-height:1.4}.primary{background:var(--green);color:white;border-radius:16px;padding:12px 16px;display:flex;gap:8px;justify-content:center;align-items:center;font-weight:600;line-height:1.4}.card{background:white;border-radius:23px;padding:20px;margin:0 0 8px}.card p:last-child{margin-bottom:0}.scroll-screen{overflow-y:auto;display:none;padding-bottom:24px}.help{font-size:13px;color:var(--muted);line-height:1.6;margin:2px 0 8px}.identity{display:flex;gap:16px;align-items:center}.identity p{margin:4px 0;color:var(--muted);font-size:13px}.avatar{width:60px;height:60px;background:var(--soft);border-radius:50%;display:grid;place-items:center;font-size:25px;font-weight:700;flex-shrink:0}form{display:flex;flex-direction:column;gap:12px;margin:16px 0}input[type=password],select{padding:14px 12px;min-height:48px;border:1px solid var(--line);border-radius:12px;width:100%;background:var(--bg);color:var(--ink);font-size:16px}input[type=range]{width:100%;margin:24px 0;accent-color:var(--green);min-height:36px}#profile>.outline{display:flex;justify-content:center;align-items:center;gap:10px}dialog{padding:0;border:1px solid var(--line);border-radius:24px;background:var(--bg);color:var(--ink);width:calc(100% - 20px);max-width:700px;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overscroll-behavior:contain}dialog[open]{display:flex;flex-direction:column}dialog::backdrop{background:#17382c66}.dialog-head{position:sticky;top:0;background:var(--bg);padding:14px 16px;display:flex;justify-content:space-between;align-items:center;flex-shrink:0;gap:10px}.dialog-head h1{font-size:23px;margin:0}.dialog-body{overflow:auto;min-height:0;padding:10px 14px 24px}.dialog-body>.card{margin-bottom:14px}.history-item{width:100%;text-align:left;display:block;color:var(--ink)}.history-item p{margin:8px 0}.history-item p:last-child{color:var(--green)}#large-output{font-size:28px}.photo-toolbar{display:flex;align-items:center;gap:5px;flex-shrink:0}.photo-toolbar>span{font-size:10px;color:var(--muted);margin-left:auto}.segments{display:flex;gap:4px;align-items:center;margin:12px 0;flex-shrink:0}.segment{border:1px solid var(--line);border-radius:12px;padding:8px 12px;font-size:14px}.segment.selected{background:#dfead8;color:#125b4d}#photo-canvas{position:relative;width:100%;flex-shrink:0}#photo-image{width:100%;height:auto;display:block}#photo-overlay{position:absolute;inset:0;pointer-events:none}.photo-block{position:absolute;background:#fffceded;color:#14291f;border:1px solid #cfcec5;border-radius:4px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.15;padding:2px;pointer-events:auto}.photo-block:focus{z-index:2;min-height:60px;height:auto!important}#document-text{font-family:inherit;margin:12px 0;white-space:pre-wrap}#document-name{overflow-wrap:anywhere}.document-result button{flex-shrink:0}#toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;border-radius:14px;padding:12px 18px;z-index:99;max-width:90%;text-align:center;font-size:14px}[hidden]{display:none!important}.keyboard .top,.keyboard .tabs{display:none}.keyboard #translate{padding-top:4px}.keyboard .voice-row{min-height:44px}.keyboard .voice-row .microphone{width:40px;height:40px;min-width:40px}.keyboard .voice-row>span{max-width:45%}.keyboard .panel{border-radius:16px}.keyboard .screen{gap:5px}.keyboard .panels{gap:5px}.keyboard .language-bar{min-height:30px;padding:4px 12px}.keyboard .connection{font-size:10px}#source,#output{scrollbar-width:thin}
@media(min-width:650px){.panels{flex-direction:row}.panel,.source{flex:1}.screen{padding-left:16px;padding-right:16px}.top{padding-left:20px;padding-right:20px}.tabs a{flex-direction:row;font-size:14px;gap:10px;min-height:52px}.photo-actions{justify-content:flex-end}.photo-actions button{flex:0 1 160px}.photo-toolbar{position:absolute;right:70px;top:12px}.photo-toolbar>span{display:none}#photo{position:relative}.photo-stage{border-radius:12px}.scroll-screen>.card{width:100%}}
@media(max-height:450px){.top{min-height:40px;padding-top:2px;padding-bottom:2px}.logo{font-size:25px}.tabs a{min-height:42px;flex-direction:row;font-size:10px}.tabs svg{width:20px;height:20px}.screen{gap:5px}.voice-row{min-height:42px}.voice-row .microphone{width:40px;height:40px;min-width:40px}.panel{border-radius:14px}.section-heading h1{font-size:22px;margin:0}.section-heading p{font-size:11px}.photo-stage{min-height:0}.empty{gap:6px;padding:8px}.empty>span svg{width:30px;height:30px}.empty h2{font-size:17px}.photo-actions button{padding:6px}.keyboard .panel-head{display:none}.keyboard .voice-row>span{display:none}.keyboard .voice-row{min-height:28px;height:28px}.keyboard .voice-row .microphone{width:28px;height:28px;min-height:28px;min-width:28px}.keyboard .voice-row svg{width:20px;height:20px}.keyboard .voice-row .text-button{min-height:28px;padding:2px 8px}.keyboard .language-bar{display:none}}
@media(prefers-reduced-motion:no-preference){button,a{transition:background .15s}}

.scroll-screen>*{flex-shrink:0}#price-list:empty{display:none}#price-list{border-top:1px solid var(--line);margin-top:12px;padding-top:4px;font-size:14px}#price-list p{margin:8px 0}
