/* ShadeBox tools: one stylesheet in the website look. White, dotted #ccc lines, text #666, titles #333, blue #09f, 3px corners, flat. */
@font-face{font-family:"Open Sans";font-weight:400;src:local("Open Sans"),local("OpenSans-Regular"),url("../fonts/OpenSans-Regular.woff2") format("woff2")}
@font-face{font-family:"Open Sans";font-weight:700 800;src:local("Open Sans Bold"),local("OpenSans-Bold"),url("../fonts/OpenSans-Bold.woff2") format("woff2")}
:root{--bg:#fff;--bg-soft:#fff;--ink:#333;--ink-2:#666;--ink-3:#999;--rule:#ccc;--rule-soft:#ccc;--brand:#09f;--games:#14b8a6;--sans:'Open Sans','Segoe UI',Arial,sans-serif;--mono:Consolas,'Courier New',monospace;color-scheme:light}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{background:#fff}
body{margin:0;background:#fff;color:#666;font:400 15px/1.55 var(--sans);min-height:100vh;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none;transition:color .3s ease}
img{max-width:100%;display:block}
::selection{background:#09f;color:#fff}
.wrap{width:100%;max-width:1280px;margin:0 auto;padding:0 20px}
h1,h2,h3{margin:0;font-family:inherit;font-weight:400;line-height:1.3;color:#333}
h1{font-size:2.4rem;color:#09f}
h2{font-size:15px}
h3{font-size:20px}
.btn{display:inline-flex;align-items:center;gap:8px;font:600 14px/1 var(--sans);padding:11px 18px;border:1px solid #09f;background:#09f;color:#fff;cursor:pointer;white-space:nowrap}
.btn:hover{background:#fff;color:#09f}
.btn.ghost{background:#fff;color:#666;border:1px dotted #ccc}
.btn.ghost:hover{border-color:#09f;color:#09f}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn svg{width:16px;height:16px}
.tag{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#666;white-space:nowrap}
.tag::before{content:"";width:8px;height:8px;background:var(--c,#09f)}
.site-foot{border-top:1px dotted #ccc;font-size:14px;color:#999}
.site-foot .wrap{display:flex;gap:16px;flex-wrap:wrap;justify-content:space-between;padding-top:22px;padding-bottom:28px}
.site-foot a{color:#666}.site-foot a:hover{color:#09f}
.prose{max-width:70ch}

/* Shared styles for every tool page. Loaded after ../../style.css. */

.tool-main { flex: 1; padding: 36px 0 72px; }
.tool-main > .wrap { max-width: 1280px; }

.tool-intro { margin-bottom: 28px; }
.tool-intro h1 { font-size: clamp(30px, 4vw, 44px); }
.tool-intro .tag { margin-bottom: 12px; }
.tool-intro p { color: var(--ink-2); margin: 10px 0 0; font-size: 17px; max-width: 60ch; }
.private { font-size: 13px; color: var(--ink-3); display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; }
.private svg { width: 14px; height: 14px; }

/* ---------- app layout ---------- */

.app {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}
.app.wide-side { grid-template-columns: minmax(0, 1fr) 380px; }
.app.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.stage {
    position: relative;
    background: var(--bg-soft);
    border-radius: 16px;
    min-height: 420px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 24px;
}
.checker {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #e9e9e9 25%, transparent 25%),
        linear-gradient(-45deg, #e9e9e9 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e9e9e9 75%),
        linear-gradient(-45deg, transparent 75%, #e9e9e9 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.stage canvas, .stage img { max-width: 100%; max-height: 70vh; display: block; }

.side {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--rule-soft);
    border-radius: 16px;
    position: sticky;
    top: 16px;
}
.side h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.side hr { border: 0; border-top: 1px solid var(--rule-soft); margin: 0; width: 100%; }
.side .btn { justify-content: center; width: 100%; }

/* ---------- controls ---------- */

.field { display: grid; gap: 6px; font-size: 14px; }
.field > span { color: var(--ink-2); font-weight: 500; display: flex; justify-content: space-between; }
.field > span output { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.row { display: flex; gap: 10px; align-items: end; }
.row > * { flex: 1; min-width: 0; }

.input, .select, .area {
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--rule-soft);
    border-radius: 10px;
    padding: 9px 12px;
    width: 100%;
}
.input:focus, .select:focus, .area:focus { outline: none; border-color: var(--ink); }
.input.mono, .area.mono { font-family: var(--mono); font-size: 14px; }
.area { min-height: 260px; resize: vertical; line-height: 1.55; tab-size: 2; }
.area.tall { min-height: 420px; }

input[type="range"] { width: 100%; accent-color: var(--c, var(--brand)); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--c, var(--brand)); width: 16px; height: 16px; }
input[type="color"] { width: 44px; height: 38px; border: 1px solid var(--rule-soft); border-radius: 10px; padding: 3px; background: var(--bg); cursor: pointer; }

.check { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }

.seg {
    display: flex;
    background: var(--bg-soft);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
    flex-wrap: wrap;
}
.seg button {
    flex: 1;
    font: 500 13px var(--sans);
    color: var(--ink-2);
    background: none;
    border: 0;
    border-radius: 8px;
    padding: 7px 8px;
    cursor: pointer;
    white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }

.mini {
    font: 500 13px var(--sans);
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--rule-soft);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
}
.mini:hover { border-color: var(--ink); }
.mini[aria-pressed="true"] { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); color: #fff; }
.mini svg { width: 15px; height: 15px; }
.minis { display: flex; flex-wrap: wrap; gap: 6px; }

.lock {
    width: 38px;
    height: 38px;
    flex: none !important;
    display: grid;
    place-items: center;
    border: 1px solid var(--rule-soft);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink-3);
    cursor: pointer;
}
.lock[aria-pressed="true"] { color: var(--c); border-color: var(--c); }
.lock svg { width: 16px; height: 16px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font: 600 17px var(--sans); letter-spacing: -.01em; }
.stat span { font-size: 12px; color: var(--ink-3); }
.good { color: var(--games); }
.bad { color: #dc2626; }

/* ---------- drop zone ---------- */

.drop {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 10px;
    min-height: 340px;
    border: 2px dashed var(--rule-soft);
    border-radius: 16px;
    padding: 32px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--c, var(--brand)); background: var(--bg-soft); }
.drop .big { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.drop .small { color: var(--ink-3); font-size: 14px; }
.drop svg { width: 44px; height: 44px; color: var(--c, var(--brand)); }
.drop input { display: none; }

/* ---------- toast ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: var(--bg);
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
    .app, .app.wide-side, .app.even { grid-template-columns: minmax(0, 1fr); }
    .side { position: static; }
    .stage { min-height: 280px; padding: 14px; }
}
@media (max-width: 560px) {
    .drop { min-height: 240px; }
}


/* Full-screen editor apps (Photo Studio, Video Studio). No guide text, just the app. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body.appmode{height:100dvh;overflow:hidden;display:flex;flex-direction:column;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}
body.appmode .app-main{flex:1;min-height:0;position:relative;display:flex}
body.appmode .toast{z-index:200}
body.appmode ins.adsbygoogle{display:none!important}

.studio{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--bg-soft);color:var(--ink);font-size:14px;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.studio button,.studio select,.studio input{font:inherit;color:inherit}
.studio input[type=text],.studio input[type=number],.studio select,.studio textarea{background:var(--bg);border:1px solid var(--rule-soft);border-radius:6px;padding:6px 8px;min-width:0;max-width:100%;user-select:text;-webkit-user-select:text}
.studio textarea{width:100%;box-sizing:border-box;resize:vertical}
.studio input[type=range]{width:100%;accent-color:var(--ink);margin:0}
.studio input[type=color]{width:34px;height:30px;padding:0;border:1px solid var(--rule-soft);border-radius:6px;background:none;cursor:pointer}
.st-top{display:flex;align-items:center;gap:4px;padding:4px 6px;border-bottom:1px solid var(--rule-soft);background:var(--bg);flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.st-top::-webkit-scrollbar{display:none}
.st-top .sp{flex:1;min-width:6px}
.ib{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:36px;height:36px;padding:0 8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;flex:none;white-space:nowrap}
.ib svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ib:hover{background:var(--bg-soft)}
.ib[aria-pressed=true],.ib.on{background:var(--ink);color:var(--bg)}
.ib:disabled{opacity:.35;cursor:default}
.ib.pri{background:var(--ink);color:var(--bg)}
.ib small{font-size:12px}
.st-sep{width:1px;height:22px;background:var(--rule-soft);margin:0 3px;flex:none}
.st-row{display:flex;gap:8px;align-items:center}
.st-f{display:flex;flex-direction:column;gap:3px;margin:0 0 9px}
.st-f>span,.st-f>label{font-size:12px;color:var(--ink-2);display:flex;justify-content:space-between;gap:8px}
.st-f>span b{color:var(--ink);font-weight:600}
.st-h{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);margin:12px 0 6px;font-weight:700}
.st-chips{display:flex;gap:6px;flex-wrap:wrap}
.st-chip{border:1px solid var(--rule-soft);background:var(--bg);border-radius:999px;padding:5px 11px;cursor:pointer;font-size:13px}
.st-chip[aria-pressed=true]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.st-btn{border:1px solid var(--ink);background:var(--bg);border-radius:8px;padding:8px 12px;cursor:pointer;font-weight:600}
.st-btn.pri{background:var(--ink);color:var(--bg)}
.st-btn:disabled{opacity:.4}

/* start screen */
.st-start{position:absolute;inset:0;z-index:60;background:var(--bg-soft);overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:18px 12px 40px}
.st-start[hidden]{display:none}
.st-start-in{width:100%;max-width:760px}
.st-start h2{margin:6px 0 4px;font-size:clamp(24px,5vw,34px)}
.st-start p{margin:0 0 16px;color:var(--ink-2)}
.st-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin-bottom:18px}
.st-card{border:1.5px solid var(--ink);border-radius:12px;background:var(--bg);padding:14px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:6px;min-height:92px}
.st-card svg{width:28px;height:28px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.st-card b{font-size:16px}
.st-card span{font-size:12.5px;color:var(--ink-2)}
.st-card:hover{transform:translate(-1px,-1px);box-shadow:3px 3px 0 var(--ink)}
.st-presets{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
.st-pre{border:1px solid var(--rule-soft);border-radius:10px;background:var(--bg);padding:10px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:2px}
.st-pre b{font-size:13px}.st-pre span{font-size:11.5px;color:var(--ink-3)}
.st-pre i{display:block;border:1.5px solid var(--ink);margin-bottom:6px;max-width:100%;background:var(--bg-soft)}
.st-pre:hover{border-color:var(--ink)}
.st-drop{border:2px dashed var(--ink-3);border-radius:12px;padding:16px;text-align:center;color:var(--ink-2);margin-bottom:14px}
.st-drop.over{border-color:var(--ink);background:var(--bg)}

/* sheets / dialogs */
.st-dlg{position:fixed;inset:0;z-index:120;background:#0006;display:flex;align-items:center;justify-content:center;padding:12px}
.st-dlg[hidden]{display:none}
.st-dlg-in{background:var(--bg);border:1.5px solid var(--ink);border-radius:14px;padding:14px;width:100%;max-width:420px;max-height:90dvh;overflow:auto;box-shadow:5px 5px 0 var(--ink)}
.st-dlg-in h3{margin:0 0 10px;font-size:18px}
.st-dlg-in .st-row{margin-top:10px;justify-content:flex-end}
.st-grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.st-hint{font-size:12px;color:var(--ink-3)}

/* ShadeBox tool pages in the home page's style: white, dotted #ccc lines, text #666, titles #333, blue #09f, 3px corners, flat. Loaded last. */

body{font-family:'Open Sans','Segoe UI',Arial,sans-serif;font-size:15px;background:#fff;color:#666}
h1,h2,h3{font-family:inherit;font-weight:400;letter-spacing:0;line-height:1.3;color:#333;background:none}
h1{font-size:2.4rem;color:#09f}
a{text-decoration:none;transition:color .3s ease}
body :where(button,input,select,textarea,div,span,i,label,a,section,aside,article,li,img,b){border-radius:3px!important}
body :where(input[type=range],.ve-ph,.ve-ph:before){border-radius:0!important}
.nvbar{overflow:visible}
/* flat: white, dotted lines, no shadows */
.studio,.st-start,.ve{background:#fff}
.st-top,.ve-ctl,.ve-bar,.ve-tlw,.ve-sh-h,.ve-sheet,.pe-side{background:#fff;border-color:#ccc;border-style:dotted}
.st-top{border-width:0 0 1px}.ve-bar{border-width:1px 0 0}
.st-card,.st-pre,.ve-prog-in,.ve-dlg,.stage,.side,.ve-mrow,.ve-fb,.st-drop,.drop{background:#fff;border:1px dotted #ccc;box-shadow:none;transform:none}
.st-card:hover,.st-pre:hover,.drop:hover,.drop.over,.st-drop.over{transform:none;box-shadow:none;border-color:#09f}
.st-card b,.st-h,.st-pre b{color:#333;font-weight:400;text-transform:uppercase}
.st-h{font-size:12px;letter-spacing:.04em;color:#999}
.st-card:hover b{color:#09f}
.st-pre i{border:1px dotted #ccc;background:#fff}
.st-chip,.ib,.st-btn,.mini,.ve-tb,.seg button,.chip{box-shadow:none}
.st-chip,.mini{border:1px dotted #ccc;background:#fff}.st-chip:hover,.mini:hover{border-color:#09f;color:#09f}
.st-btn{border:1px dotted #ccc;color:#666;background:#fff}.st-btn:hover{border-color:#09f;color:#09f;background:#fff}
.ib:hover,.ve-tb:hover{background:#fff;color:#09f}
.ib[aria-pressed=true],.ib.on,.ib.pri,.st-btn.pri,.st-chip[aria-pressed=true],.st-chip.pri,.pe-l .mk.on,.pe-fb[aria-pressed=true],.ve-fb[aria-pressed=true],.ve-play,.ve-busy b,.ve-bar2 i,.mini[aria-pressed="true"]{background:#09f!important;color:#fff!important;border-color:#09f;border-style:solid}
.ib.on:hover,.ib.pri:hover,.st-btn.pri:hover{background:#0070c0!important}
.pe-l.on{border-color:#09f;background:#fff}
.st-sep{background:#ccc}
.ve-play{width:44px;height:40px}
.ve-it.ov{background:#09f}.ve-it.au{background:#14b8a6}.ve-it.sel{outline:2px solid #fff;box-shadow:0 0 0 3px #09f}
.ve-ph{background:#09f}.ve-ph:before{background:none;border-top-color:#09f}
.ve-rec{color:#14b8a6}.ve-rec svg{fill:#14b8a6}
.ve-dlg{box-shadow:0 8px 24px rgba(0,0,0,.15)}
input[type=range],.studio input[type=range]{accent-color:#09f}
.studio input[type=text],.studio input[type=number],.studio select,.studio textarea,.input,.select,.area{background:#fff;border:1px solid #ccc}
.studio input:focus,.studio select:focus,.studio textarea:focus,.input:focus,.select:focus,.area:focus{outline:2px solid #09f;outline-offset:-1px;border-color:#09f}
.btn{background:#09f;color:#fff;border:0;box-shadow:none;transform:none;padding:10px 25px}.btn:hover{background:#0070c0;transform:none;box-shadow:none}
.btn.ghost{background:#fff;color:#666;border:1px dotted #ccc}.btn.ghost:hover{color:#09f;border-color:#09f;background:#fff}
.toast{background:#333;color:#fff;box-shadow:none}
.tag,.tool-intro .tag{color:#09f;background:none}.tag::before{background:#09f!important;border-color:#09f}
.tool-main{background:#fff;padding:40px 40px 60px}
.tool-main>.wrap{padding:0;max-width:none}
.tool-intro{background:none;border:0;padding:0;margin-bottom:30px;box-shadow:none}
.tool-intro p{color:#666;max-width:70ch}.private{color:#999}
.tool-intro .author,.author{display:none}
.drop svg,.drop .ic{color:#09f}
.side,.stage{border-top:1px dotted #ccc}
.audio-tool input[type=range]{background:transparent}
footer.site-foot{background:#fff;border-top:1px dotted #ccc;color:#666;text-align:right;padding:24px 40px}
footer.site-foot a{color:#666}footer.site-foot a:hover{color:#09f}
.tool-main>.wrap{max-width:1040px}
.tool-intro h1{font-size:2rem;font-weight:400}
.tool-intro .tag{display:none}
input[type=range]{-webkit-appearance:none;appearance:none;height:4px;background:#ddd;border-radius:3px;outline:none}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;background:#09f;border-radius:50%;cursor:pointer}
input[type=range]::-moz-range-thumb{width:14px;height:14px;background:#09f;border:0;border-radius:50%;cursor:pointer}
.stage{min-height:0}
.st-dlg-in{border:1px dotted #ccc;border-radius:3px;box-shadow:0 8px 24px rgba(0,0,0,.18);display:grid;gap:12px}
.st-dlg-in.wide{max-width:520px}
.pe-cp-grid{display:flex;flex-wrap:wrap;gap:6px}
.pe-cp-grid .mini{flex-direction:column;align-items:flex-start;gap:0;padding:6px 10px}
.pe-cp-grid small{font-size:11px;color:#999}
.pe-cp-grid .mini[aria-pressed="true"] small{color:#fff}
.st-dlg-in .st-row{display:flex;gap:8px;justify-content:flex-end}
.st-dlg{z-index:2000}
.tool-intro,.tool-main .app{margin-left:auto;margin-right:auto}
.tool-main .tool-intro{text-align:center}.tool-intro p{margin-left:auto;margin-right:auto}.private{justify-content:center;display:flex}
.swatch{height:140px;border:1px dotted #ccc;border-radius:3px;background:#09f}
.area{background:#fff;color:#333}.input,.area,.select{border:1px solid #ccc;border-radius:3px}
.input:focus,.area:focus{border-color:#09f;outline:none}
.side h2{font-weight:400}
/* start screens: one clear "select file" button */
.sel-box{background:#fff;border:1px solid #ddd;border-radius:3px;padding:34px 20px;text-align:center;margin:0 0 22px}
.sel-btn{display:inline-flex;align-items:center;gap:10px;background:#09f;color:#fff;border:0;border-radius:3px;padding:15px 34px;font:600 18px var(--sans);cursor:pointer}
.sel-btn:hover{background:#0070c0}
.sel-box p{margin:12px 0 0;color:#777;font-size:14px}
.st-start.over .sel-box{border-color:#09f;background:#f5fbff}
.sel-btn,.st-start .sel-btn{color:#fff!important;background:#09f!important;border:1px solid #0070c0!important;font-weight:600}
.st-start .sel-btn:hover{background:#0070c0!important}
.st-card[data-pick]{display:none}
.site-foot a,footer a{margin-left:18px}.site-foot span a:first-of-type{margin-left:8px}
html{color-scheme:light}
