:root{--ink:#10261c;--mute:rgba(16,38,28,.68);--line:rgba(16,38,28,.14);--accent:#0F9D6B;--card:#fff}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;color:var(--ink);font-family:Outfit,system-ui,sans-serif;background:#EAF7E6;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.bg{position:fixed;inset:0;z-index:-1;overflow:hidden;background:linear-gradient(135deg,#D3F5E1,#EEF7C9 58%,#FFE9C4)}
.bg i{position:absolute;border-radius:50%;filter:blur(60px);opacity:.55;animation:drift 16s ease-in-out infinite alternate}
.bg i:nth-child(1){width:26rem;height:26rem;background:#7BD88F;left:-6rem;top:-8rem}
.bg i:nth-child(2){width:22rem;height:22rem;background:#FFD27A;right:-5rem;top:30%;animation-delay:-5s}
.bg i:nth-child(3){width:24rem;height:24rem;background:#8FD3FF;left:30%;bottom:-10rem;animation-delay:-9s}
@keyframes drift{to{transform:translate(60px,40px) scale(1.15)}}
header{display:flex;justify-content:space-between;gap:.6rem;padding:1.1rem clamp(1.1rem,5vw,3rem)}
.pill{padding:.5rem 1rem;border-radius:999px;background:rgba(255,255,255,.7);backdrop-filter:blur(6px);font-size:.9rem;font-weight:500;border:1px solid var(--line)}
.pill:hover{background:#fff}.pill.right{margin-left:auto}.pill[hidden]{display:none}
main{max-width:72rem;margin:0 auto;padding:1rem clamp(1.1rem,5vw,3rem) 3rem}
footer{max-width:72rem;margin:0 auto;padding:0 clamp(1.1rem,5vw,3rem) 2.5rem;color:var(--mute);font-size:.8rem}
.hero h1{margin:1rem 0 0;font-size:clamp(3.5rem,13vw,9rem);line-height:.95;letter-spacing:-.05em;font-weight:800}
.hero h1 span{display:inline-block;animation:rise .8s cubic-bezier(.2,.9,.3,1.2) both;animation-delay:calc(var(--i)*70ms)}
.hero p{font-size:1.3rem;color:var(--mute);margin:1rem 0 2.5rem;max-width:34rem}
@keyframes rise{from{opacity:0;transform:translateY(.4em) rotate(4deg)}}
.grid{list-style:none;margin:0;padding:0;display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(16rem,1fr))}
.card{display:flex;flex-direction:column;height:100%;padding:1.2rem;border-radius:22px;background:var(--card);border:1px solid var(--line);box-shadow:0 10px 30px -20px rgba(16,38,28,.5);animation:pop .6s cubic-bezier(.2,.9,.3,1.2) both;animation-delay:calc(var(--i)*55ms);transition:transform .25s cubic-bezier(.2,.9,.3,1.4),box-shadow .25s}
@keyframes pop{from{opacity:0;transform:translateY(24px) scale(.95)}}
a.card:hover{transform:translateY(-6px);box-shadow:0 24px 40px -22px var(--a)}
.ico{display:grid;place-items:center;width:3.2rem;height:3.2rem;border-radius:16px;background:linear-gradient(135deg,var(--a),var(--b));color:#fff;flex:none}
.ico svg{width:1.7rem;height:1.7rem}
a.card:hover .ico svg{animation:wiggle .6s ease}
@keyframes wiggle{25%{transform:rotate(-12deg) scale(1.1)}60%{transform:rotate(10deg) scale(1.1)}}
.card b{font-size:1.3rem;margin:.9rem 0 .25rem;letter-spacing:-.02em}
.card .d{color:var(--mute);font-size:.93rem;line-height:1.45}
.card em{margin-top:auto;padding-top:1rem;font-style:normal;font-weight:600;font-size:.85rem;color:var(--accent)}
a.card em::after{content:" \2192"}
.card.soon{background:rgba(255,255,255,.5);box-shadow:none}.card.soon .ico{filter:saturate(.6);opacity:.8}.card.soon em{color:var(--mute)}

/* tool pages */
.thead{display:flex;gap:1rem;align-items:center;margin:.5rem 0 1.5rem}
.thead .ico{width:3.6rem;height:3.6rem}
.thead h1{margin:0;font-size:clamp(1.8rem,5vw,2.8rem);letter-spacing:-.03em;line-height:1.05}
.thead p{margin:.3rem 0 0;color:var(--mute)}
.split{display:grid;gap:1.2rem;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start}
@media (max-width:760px){.split{grid-template-columns:1fr}}
.panel{background:var(--card);border:1px solid var(--line);border-radius:22px;padding:1.2rem;box-shadow:0 10px 30px -22px rgba(16,38,28,.5)}
.panel h3{margin:0 0 .8rem}
label{display:block;font-size:.85rem;font-weight:500;color:var(--mute);margin:0 0 .8rem}
input[type=text],input[type=number],textarea,select{display:block;width:100%;margin-top:.3rem;padding:.65rem .8rem;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font:inherit;font-size:1rem}
textarea{min-height:5rem;resize:vertical}
input[type=color]{display:block;width:100%;height:2.6rem;margin-top:.3rem;border:1px solid var(--line);border-radius:12px;background:#fff;padding:.2rem;cursor:pointer}
input[type=range]{display:block;width:100%;margin-top:.5rem;accent-color:var(--accent)}
.chk{display:flex;align-items:center;gap:.5rem;color:var(--ink)}.chk input{width:1.1rem;height:1.1rem;accent-color:var(--accent)}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}
.btns{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.3rem}
.btn,button.b{display:inline-block;border:0;border-radius:12px;padding:.7rem 1.1rem;background:var(--ink);color:#fff;font:inherit;font-weight:600;font-size:.95rem;cursor:pointer;text-align:center}
.btn:hover,button.b:hover{background:var(--accent)}
.btn.ghost,button.b.ghost{background:transparent;color:var(--ink);border:1.5px solid var(--ink)}
.btn.ghost:hover,button.b.ghost:hover{background:var(--ink);color:#fff}
button:disabled{opacity:.4;cursor:default}
.preview{display:grid;justify-items:center;gap:1rem}
#qr canvas,#qr svg{max-width:100%;height:auto;border-radius:12px;border:1px solid var(--line)}
.note{color:var(--mute);font-size:.9rem;margin:.8rem 0 0}
.out{white-space:pre-wrap;word-break:break-all;background:#F3F8F1;border:1px solid var(--line);border-radius:12px;padding:.9rem;margin:0 0 .8rem;font:500 .95rem Outfit,sans-serif;min-height:4rem}
video{width:100%;border-radius:14px;background:#000;margin-top:.8rem}
.zone{display:grid;place-items:center;gap:.3rem;text-align:center;padding:2rem 1rem;border:2px dashed rgba(16,38,28,.3);border-radius:18px;background:rgba(255,255,255,.5);cursor:pointer;transition:background .2s,border-color .2s}
.zone:hover,.zone.over{background:#fff;border-color:var(--accent)}
.zone b{font-size:1.1rem}.zone span{color:var(--mute);font-size:.9rem}
.files{list-style:none;margin:1rem 0 0;padding:0;display:grid;gap:.5rem}
.files li{display:flex;align-items:center;gap:.6rem;padding:.6rem .8rem;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:.92rem}
.files .n{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.files .s{color:var(--mute);font-size:.82rem;white-space:nowrap}
.files button,.files a{border:1px solid var(--line);background:#fff;border-radius:9px;padding:.3rem .6rem;font:inherit;font-size:.82rem;cursor:pointer;color:var(--ink)}
.files button:hover,.files a:hover{background:var(--ink);color:#fff}
.msg{margin-top:.8rem;font-weight:500}.msg.err{color:#C0262D}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation:none !important;transition:none !important}}

/* ---- animated abstract layer ---- */
.bg{background:linear-gradient(120deg,#D3F5E1,#EEF7C9,#FFE9C4,#DDEBFF,#D3F5E1);background-size:300% 300%;animation:bgshift 22s ease-in-out infinite}
@keyframes bgshift{50%{background-position:100% 50%}}
.bg i.sh{position:absolute;display:block;filter:none;opacity:.8;animation:fly var(--t,12s) ease-in-out infinite alternate}
@keyframes fly{to{transform:translate(var(--x,40px),var(--y,-50px)) rotate(var(--r,90deg))}}
.sh.a{width:5rem;height:5rem;border-radius:50%;border:1rem solid #0F9D6B;left:8%;top:22%;opacity:.35}
.sh.b{width:3.4rem;height:3.4rem;border-radius:.9rem;background:linear-gradient(135deg,#FF6B6B,#FFB020);right:12%;top:16%;--t:10s;--r:180deg}
.sh.c{width:4rem;height:3.6rem;background:#8B5CF6;clip-path:polygon(50% 0,100% 100%,0 100%);left:12%;bottom:14%;opacity:.55;--t:14s}
.sh.d{width:3.2rem;height:3.2rem;background:#18A5D6;right:9%;bottom:20%;opacity:.6;--r:-120deg;clip-path:polygon(35% 0,65% 0,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%,0 35%,35% 35%)}
.sh.e{width:7rem;height:7rem;left:46%;top:8%;background:radial-gradient(circle,#10261c 2px,transparent 2.5px) 0 0/16px 16px;opacity:.22;--t:16s}
.sh.f{width:6rem;height:3rem;right:34%;bottom:6%;border-radius:6rem 6rem 0 0;background:#FFB020;opacity:.5;--t:9s;--r:20deg}
.hero{position:relative}
.heroart{position:absolute;right:0;top:-.5rem;width:21rem;height:21rem;pointer-events:none;z-index:-1}
.heroart .ring{position:absolute;inset:0;border-radius:50%;border:2px dashed rgba(16,38,28,.35);animation:spin 30s linear infinite}
.heroart .r2{inset:2.2rem;border-style:solid;border-color:rgba(15,157,107,.5);animation-duration:22s;animation-direction:reverse}
.heroart .orb{position:absolute;border-radius:50%;filter:blur(18px);animation:fly 9s ease-in-out infinite alternate}
.heroart .o1{width:7rem;height:7rem;background:#FFB020;left:0;bottom:2rem;opacity:.6}
.heroart .o2{width:6rem;height:6rem;background:#8B5CF6;right:1rem;top:1rem;opacity:.45;--x:-30px;--y:30px}
@keyframes spin{to{transform:rotate(360deg)}}
.mosaic{position:absolute;inset:4.6rem;display:grid;grid-template-columns:repeat(7,1fr);gap:4px;padding:.6rem;background:#fff;border-radius:1.1rem;box-shadow:0 30px 50px -25px rgba(16,38,28,.5);animation:fly 7s ease-in-out infinite alternate;--x:0px;--y:-12px;--r:0deg}
.mosaic b{border-radius:3px;background:#10261c;opacity:0;transition:opacity .35s}.mosaic b.on{opacity:1}.mosaic b.f{background:#0F9D6B}
@media (max-width:760px){.heroart{width:13rem;height:13rem;right:-2rem;top:-1rem;opacity:.55}.mosaic{inset:2.8rem}}
/* icons draw themselves */
.ico svg *{stroke-dasharray:1;stroke-dashoffset:0;animation:trace 5s ease-in-out infinite}
.ico svg *:nth-child(2){animation-delay:.2s}.ico svg *:nth-child(3){animation-delay:.4s}.ico svg *:nth-child(4){animation-delay:.6s}.ico svg *:nth-child(n+5){animation-delay:.8s}
@keyframes trace{0%{stroke-dashoffset:1}30%,78%{stroke-dashoffset:0}100%{stroke-dashoffset:-1}}
.card::after{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%);transform:translateX(-120%);pointer-events:none}
.card{position:relative;overflow:hidden}
a.card:hover::after{transform:translateX(120%);transition:transform .8s ease}

/* new tool UI */
.bar{width:100%;height:10px;border-radius:10px;background:rgba(16,38,28,.12);overflow:hidden}.bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#0F9D6B,#7BD88F);transition:width .2s}
.preview video{width:100%;margin:0 0 .6rem}.preview .msg{margin:0}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(7rem,1fr));gap:.6rem;margin-bottom:1rem}
.stats div{background:#F3F8F1;border-radius:14px;padding:.7rem .8rem}.stats b{display:block;font-size:1.5rem;letter-spacing:-.02em}.stats span{font-size:.8rem;color:var(--mute)}
textarea.big{min-height:14rem}textarea.mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.92rem}
.pw{font:600 1.3rem ui-monospace,Menlo,Consolas,monospace;min-height:5rem;display:flex;align-items:center}
.meter{height:10px;border-radius:10px;background:rgba(16,38,28,.12);overflow:hidden}.meter i{display:block;height:100%;width:0;transition:width .3s,background .3s}
iframe#pv{width:100%;height:24rem;border:1px solid var(--line);border-radius:14px;background:#fff;margin-top:.6rem}
.sh.c,.sh.d,.sh.e{border-radius:0}

/* ---- responsive fixes ---- */
html,body{max-width:100%;overflow-x:hidden}
.split{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.split>*,.panel{min-width:0}
@media (max-width:900px){.split{grid-template-columns:minmax(0,1fr)}}
.row2{grid-template-columns:repeat(auto-fit,minmax(min(11rem,100%),1fr))}
select{text-overflow:ellipsis}
.files{grid-template-columns:minmax(0,1fr)}
.files li{min-width:0;flex-wrap:wrap}
.files .n{flex:1 1 9rem}
.msg,.note,.out,.zone,.thead p,.card .d{overflow-wrap:anywhere}
iframe#pv{height:min(24rem,60vh)}
@media (max-width:600px){
  header{flex-wrap:wrap}
  .pill{font-size:.8rem;padding:.4rem .8rem}
  main{padding-top:.5rem}
  .panel{padding:.9rem;border-radius:18px}
  .hero p{font-size:1.1rem}
  .hero h1{margin-top:.5rem}
  .heroart{right:0}
  .thead{align-items:flex-start}
  .thead .ico{width:3rem;height:3rem}
  .btns>*{flex:1 1 9rem}
  .grid{grid-template-columns:1fr}
  .zone{padding:1.4rem .8rem}
  .stats{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:600px){.bg i.sh.e{display:none}.bg i.sh{opacity:.4}}
