:root{--red:#e5322d;--red-d:#c4241f;--ink:#1c2333;--muted:#5b6477;--line:#e3e7ef;--bg:#f5f7fb;--card:#fff;--blue:#1c64f2;--radius:12px}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.55;font-size:16px}
a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}
img,svg,canvas{max-width:100%}
h1,h2,h3{line-height:1.2;letter-spacing:-.01em}
.wrap{max-width:1180px;margin:0 auto;padding:0 20px}
.skip{position:absolute;left:-9999px}.skip:focus{left:10px;top:10px;background:#fff;padding:8px;z-index:99}
/* header */
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:40}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;height:64px}
.logo{display:flex;align-items:center;gap:9px;font-weight:800;font-size:21px;color:var(--ink)}
.logo:hover{text-decoration:none}
.logo b{color:var(--red)}
.logo-mark{width:32px;height:32px;border-radius:8px;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;letter-spacing:.3px}
.site-nav{display:flex;gap:4px;align-items:center}
.site-nav a{color:#3d4659;font-weight:500;font-size:15px;padding:8px 12px;border-radius:8px}
.site-nav a:hover{background:var(--bg);text-decoration:none}
.nav-toggle{display:none;background:none;border:1px solid var(--line);border-radius:8px;font-size:20px;padding:4px 10px;cursor:pointer}
@media(max-width:820px){.nav-toggle{display:block}.site-nav{display:none;position:absolute;top:64px;left:0;right:0;background:#fff;flex-direction:column;align-items:stretch;padding:10px;border-bottom:1px solid var(--line)}.site-nav.open{display:flex}}
/* ads */
.ad-slot{max-width:970px;margin:16px auto;min-height:0}
.ad-slot.filled{min-height:90px}
/* hero */
.hero{text-align:center;padding:40px 0 18px}
.hero h1{font-size:clamp(30px,5vw,46px);font-weight:800;margin:0}
.hero p.lead{font-size:clamp(16px,2.2vw,19px);color:var(--muted);max-width:760px;margin:14px auto 0}
.badges{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:18px}
.badge{background:#fff;border:1px solid var(--line);border-radius:30px;padding:6px 14px;font-size:14px;color:#3d4659}
.filter{display:block;max-width:420px;margin:24px auto 0;width:100%;padding:12px 16px;border:1px solid #d3d9e5;border-radius:10px;font-size:16px;background:#fff}
/* tool grid */
.cat-block{margin:30px 0 8px}
.cat-block h2{font-size:20px;margin:0 0 12px;color:#2a3245}
.tool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.tool-card{display:flex;gap:14px;align-items:flex-start;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;color:var(--ink);transition:.15s;box-shadow:0 1px 2px rgba(20,30,60,.04)}
.tool-card:hover{text-decoration:none;transform:translateY(-2px);box-shadow:0 8px 22px rgba(20,30,60,.08);border-color:#d0d6e2}
.ti{flex:0 0 44px;height:44px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:13px}
.tool-card h3{font-size:16px;margin:0 0 4px}
.tool-card p{margin:0;font-size:14px;color:var(--muted);line-height:1.45}
/* sections */
.section{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:30px;margin:30px 0}
.section h2{font-size:26px;margin-top:0}
.features{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px}
.features div h3{font-size:17px;margin:0 0 6px}
.features div p{margin:0;color:var(--muted);font-size:15px}
.steps{counter-reset:s;list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.steps li{counter-increment:s;background:var(--bg);border-radius:10px;padding:16px 16px 16px 56px;position:relative}
.steps li:before{content:counter(s);position:absolute;left:16px;top:14px;width:28px;height:28px;border-radius:50%;background:var(--red);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center}
.faq details{border-bottom:1px solid var(--line);padding:14px 0}
.faq summary{font-weight:600;cursor:pointer;font-size:17px}
.faq details p{margin:10px 0 0;color:#3d4659}
.article p,.article li{color:#3d4659}
.article h2{font-size:24px;margin:28px 0 10px}.article h2:first-child{margin-top:0}
.article h3{font-size:18px;margin:20px 0 6px}
/* tool page */
.crumbs{font-size:14px;color:var(--muted);padding-top:18px}
.crumbs a{color:var(--muted)}
.tool-hero{text-align:center;padding:16px 0 6px}
.tool-hero h1{font-size:clamp(28px,4.5vw,40px);margin:0;font-weight:800}
.tool-hero p{color:var(--muted);font-size:18px;margin:10px auto 0;max-width:720px}
.tool-app{margin:22px 0}
.drop{background:#fff;border:2px dashed #f0a4a1;border-radius:16px;padding:52px 20px;text-align:center;transition:.15s}
.drop.over{border-color:var(--red);background:#fff6f5}
.drop p{margin:14px 0 0;color:var(--muted)}
.drop .privacy{font-size:14px}
.btn{display:inline-flex;align-items:center;gap:8px;justify-content:center;border:0;border-radius:10px;font-weight:600;font-size:15px;padding:11px 18px;cursor:pointer;font-family:inherit;transition:.15s;text-decoration:none}
.btn:hover{text-decoration:none}
.btn-primary{background:var(--red);color:#fff;box-shadow:0 6px 16px rgba(229,50,45,.22)}.btn-primary:hover{background:var(--red-d)}
.btn-lg{font-size:19px;padding:16px 36px}
.btn-ghost{background:#fff;color:var(--ink);border:1px solid #d3d9e5}.btn-ghost:hover{background:var(--bg)}
.btn-sm{font-size:14px;padding:7px 12px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.link{background:none;border:0;color:var(--blue);cursor:pointer;font-size:14px;padding:4px}
.panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:16px}
.panel-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}.panel-head h3{margin:0}
.panel-head small,.hint{color:var(--muted);font-size:14px}
.file-head{display:flex;align-items:center;gap:12px;padding-bottom:14px;margin-bottom:16px;border-bottom:1px solid var(--line)}
.file-head div{flex:1;min-width:0}.file-head strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-head small{color:var(--muted)}
.file-ico{flex:0 0 auto;background:var(--red);color:#fff;font-size:10px;font-weight:800;border-radius:6px;padding:8px 6px}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0}.row.end{justify-content:flex-end}
.row input[type=text]{flex:1;min-width:180px}
.grid2,.grid3{display:grid;gap:14px;margin:12px 0}
.grid2{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.grid3{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.field{display:flex;flex-direction:column;gap:6px}
.field-label{font-weight:600;font-size:14px}
.field small{color:var(--muted);font-size:13px}
input[type=text],input[type=number],input[type=password],input[type=search],select,textarea{font:inherit;padding:10px 12px;border:1px solid #d3d9e5;border-radius:8px;background:#fff;color:var(--ink);width:100%}
input:focus,select:focus,textarea:focus{outline:2px solid #f6b8b5;border-color:var(--red)}
input[type=color]{width:52px;height:40px;padding:2px;border:1px solid #d3d9e5;border-radius:8px;background:#fff}
.check{display:inline-flex;gap:8px;align-items:center;font-size:15px;cursor:pointer}
.checks{display:flex;flex-wrap:wrap;gap:18px;margin:8px 0}
.radios{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:6px 0 14px}
.radio-card{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:10px;padding:14px;cursor:pointer}
.radio-card:has(input:checked){border:2px solid var(--red);padding:13px;background:#fff8f8}
.radio-card b{display:block}.radio-card small{color:var(--muted)}
.action-bar{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;align-items:center;padding:8px 0 4px}
.status{background:#fff;border:1px solid var(--line);border-radius:14px;padding:22px;text-align:center;margin:14px 0}
.status-msg{font-weight:600;margin-top:10px}
.spinner{width:34px;height:34px;border:4px solid #f3d0ce;border-top-color:var(--red);border-radius:50%;margin:0 auto;animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.bar{height:8px;background:#eef1f6;border-radius:8px;margin:14px auto 0;max-width:420px;overflow:hidden}.bar i{display:block;height:100%;background:var(--red);transition:width .2s}
.alert{background:#fff4e5;border:1px solid #ffd59e;color:#7a4b00;border-radius:10px;padding:12px 14px;margin:8px 0;text-align:left}
.status .spinner+.status-msg{display:block}
.status:has(.alert) .spinner{display:none}
.result{background:#fff;border:1px solid var(--line);border-radius:16px;padding:34px 20px;text-align:center}
.done-icon{width:62px;height:62px;border-radius:50%;background:#2f9e44;color:#fff;font-size:32px;display:flex;align-items:center;justify-content:center;margin:0 auto}
.result h2{margin:14px 0 6px}
.result .note{color:var(--muted);margin:0 0 6px}
.result-btns{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:18px}
.file-list{list-style:none;padding:0;max-width:560px;margin:20px auto 0;text-align:left;max-height:300px;overflow:auto}
.file-list li{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-bottom:1px solid var(--line);font-size:14px}
/* lists */
.sort-list{list-style:none;padding:0;margin:0}
.sort-list li{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:10px;margin-bottom:8px;background:#fff;cursor:grab}
.sort-list .grow{flex:1;min-width:0}.sort-list strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.sort-list small{color:var(--muted)}
.grip{color:#a0a8b8}
.icon-btn{background:#fff;border:1px solid var(--line);border-radius:8px;width:34px;height:34px;cursor:pointer;font-size:15px}
.icon-btn:hover{background:var(--bg)}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:14px;margin-top:14px}
.thumb{position:relative;border:2px solid transparent;border-radius:10px;padding:8px;background:var(--bg);cursor:pointer;text-align:center;user-select:none}
.thumb.sel{border-color:var(--red);background:#fff1f0}
.thumb.sel:after{content:'✓';position:absolute;top:6px;left:6px;background:var(--red);color:#fff;width:22px;height:22px;border-radius:50%;font-size:13px;display:flex;align-items:center;justify-content:center}
.thumb.dragging{opacity:.4}
.thumb-img{height:160px;display:flex;align-items:center;justify-content:center}
.thumb-img .rot{transition:transform .2s;display:flex}
.thumb canvas{box-shadow:0 1px 4px rgba(0,0,0,.18);background:#fff;max-height:150px;width:auto;max-width:110px}
.thumb-n{font-size:13px;color:var(--muted);margin-top:4px}
.thumb-actions{position:absolute;top:6px;right:6px;display:flex;gap:4px;opacity:.9}
.thumb-actions button{width:28px;height:28px;border-radius:6px;border:1px solid var(--line);background:#fff;cursor:pointer}
.sel-info{color:var(--muted);font-size:14px}
.img-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}
.img-card{position:relative;background:var(--bg);border-radius:10px;padding:8px;text-align:center;cursor:grab}
.img-card img,.img-card .ph{height:120px;width:100%;object-fit:contain;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:6px}
.img-card small{display:block;font-size:12px;color:var(--muted);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:4px}
.img-card .x{position:absolute;top:4px;right:4px;width:26px;height:26px;font-size:12px}
.split{display:grid;grid-template-columns:minmax(0,420px) 1fr;gap:24px;align-items:start}
@media(max-width:760px){.split{grid-template-columns:1fr}}
.crop-preview{position:relative;display:inline-block;box-shadow:0 2px 10px rgba(0,0,0,.15);line-height:0}
.crop-preview canvas{width:100%;height:auto}
.crop-box{position:absolute;border:2px solid var(--blue);box-shadow:0 0 0 9999px rgba(15,23,42,.45)}
.crop-preview{overflow:hidden}
.text-out,.text-in{width:100%;min-height:340px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14px}
.form-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
/* reader */
.reader-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}
.reader-bar input{max-width:320px}.reader-bar .grow{flex:1}
.zoom-l{min-width:48px;text-align:center;font-size:14px}
.search-results{max-height:220px;overflow:auto;margin-bottom:10px;font-size:14px}
.hit{display:block;width:100%;text-align:left;background:var(--bg);border:0;border-radius:8px;padding:8px 10px;margin-bottom:6px;cursor:pointer;font:inherit;font-size:14px}
.hit mark{background:#ffe600}
.reader-pages{background:#e9ecf2;border-radius:10px;padding:14px 10px;max-height:80vh;overflow:auto;text-align:center}
.rpage-wrap{margin:0 auto 14px}.rpage-wrap small{display:block;color:var(--muted);font-size:12px}
.rpage{background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.15)}
/* editor */
.ed-sticky{position:sticky;top:64px;z-index:20;background:#fff;padding:8px 0;border-bottom:1px solid var(--line);margin-bottom:12px}
.ed-bar{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ed-btn{display:flex;flex-direction:column;align-items:center;gap:2px;background:#fff;border:1px solid var(--line);border-radius:9px;padding:6px 9px;font-size:12px;cursor:pointer;min-width:62px;font-family:inherit;color:var(--ink)}
.ed-btn:hover{background:var(--bg)}.ed-btn.on{background:#fff1f0;border-color:var(--red);color:var(--red-d)}
.ed-btn.danger:disabled{opacity:.4}
.ed-ic{font-size:17px;line-height:1.1;font-weight:700}
.ed-sep{width:1px;height:36px;background:var(--line);margin:0 4px}
.ed-prop{display:flex;align-items:center;gap:6px;font-size:13px}
.ed-prop .size-in{width:70px;padding:7px}
.ed-hint{font-size:13px;color:var(--muted);margin-top:6px}
.ed-pages{background:#e9ecf2;border-radius:10px;padding:16px 12px;display:flex;flex-direction:column;align-items:center;gap:16px}
.ed-page{position:relative;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.18);max-width:100%}
.ed-canvas{display:block}
.ed-layer{position:absolute;inset:0;touch-action:pan-y}
.ed-pages.creating .ed-layer{cursor:crosshair;touch-action:none}
.ed-pn{position:absolute;right:-30px;bottom:0;font-size:12px;color:var(--muted)}
@media(max-width:700px){.ed-pn{display:none}.ed-btn{min-width:52px;padding:5px 6px}.ed-btn span:not(.ed-ic){font-size:11px}}
.ed-obj{position:absolute;touch-action:none;cursor:move}
.ed-obj.sel{outline:1.5px dashed var(--blue);outline-offset:2px}
.ed-handle{display:none;position:absolute;right:-7px;bottom:-7px;width:13px;height:13px;background:var(--blue);border:2px solid #fff;border-radius:3px;cursor:nwse-resize;z-index:2}
.ed-obj.sel .ed-handle{display:block}
.t-text{min-width:20px}
.ed-text{font-family:Helvetica,Arial,sans-serif;line-height:1.25;padding:2px 3px;white-space:pre;outline:none;min-width:12px;cursor:text}
.ed-text:empty:before{content:'Type here';color:#9aa3b5}
.t-image img{width:100%;height:100%;display:block;pointer-events:none;user-select:none}
.t-highlight{mix-blend-mode:multiply;opacity:.4}
.t-ellipse{border-radius:50%}
.t-draw svg{width:100%;height:100%;display:block;overflow:visible;pointer-events:none}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;z-index:100;padding:16px}
.modal-box{background:#fff;border-radius:16px;padding:22px;width:100%;max-width:640px}
.modal-box h3{margin:0 0 12px}
.sig-tabs{display:flex;gap:6px;margin-bottom:12px}
.sig-tabs button{flex:1;padding:9px;border:1px solid var(--line);background:#fff;border-radius:8px;cursor:pointer;font:inherit}
.sig-tabs button.on{border-color:var(--red);background:#fff1f0;color:var(--red-d);font-weight:600}
.sig-pad{width:100%;height:auto;aspect-ratio:600/220;border:1px dashed #c3cad8;border-radius:10px;background:#fcfcfd;touch-action:none;cursor:crosshair}
.sig-preview{font-family:"Dancing Script",cursive;font-size:56px;min-height:90px;border:1px dashed #c3cad8;border-radius:10px;margin-top:10px;padding:6px 14px;overflow:hidden;white-space:nowrap}
.sig-up-prev img{max-height:150px;margin-top:10px}
.sig-colors{display:flex;gap:8px;margin:12px 0}
.sig-colors button{width:28px;height:28px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #c3cad8;cursor:pointer}
@font-face{font-family:"Dancing Script";font-display:swap;src:url(/assets/fonts/dancing-script-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Dancing Script";font-display:swap;src:url(/assets/fonts/dancing-script-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}
/* related + footer */
.related{margin:30px 0}
.related h2{font-size:22px}
.site-footer{background:#141a28;color:#aab3c5;margin-top:50px;padding:40px 0 26px;font-size:14px}
.site-footer a{color:#d7dce6}
.foot-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:24px}
.foot-grid h4{color:#fff;margin:0 0 10px;font-size:15px}
.foot-grid ul{list-style:none;padding:0;margin:0}.foot-grid li{margin:5px 0}
.foot-bottom{border-top:1px solid #2a3245;margin-top:26px;padding-top:18px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px}
.page-text{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:32px;margin:26px 0}
.page-text h1{margin-top:0}
/* language switcher */
.lang-switch{position:relative;margin-left:6px}
.lang-switch summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:8px;padding:7px 11px;font-size:14px;color:#3d4659;white-space:nowrap}
.lang-switch summary::-webkit-details-marker{display:none}
.lang-switch>div{position:absolute;right:0;top:calc(100% + 6px);background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px rgba(20,30,60,.12);padding:6px;min-width:160px;z-index:50;display:flex;flex-direction:column}
.lang-switch>div a{padding:8px 12px;border-radius:6px;color:var(--ink);font-size:15px}
.lang-switch>div a:hover{background:var(--bg);text-decoration:none}
.lang-switch>div a[aria-current]{font-weight:700;color:var(--red-d)}
@media(max-width:820px){.lang-switch{margin:6px 0 0}.lang-switch>div{position:static;box-shadow:none;border:0;padding:0 0 0 8px}}
