
:root{
  --bg:#0b0e14; --bg2:#121620; --card:#161b27; --card2:#1c2331;
  --border:#262d3d; --txt:#e6e9ef; --muted:#8a93a6; --accent:#5b8cff;
  --accent2:#22d3ee; --good:#34d399; --bad:#f87171; --warn:#fbbf24;
  --radius:14px; --shadow:0 8px 30px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:radial-gradient(1200px 600px at 80% -10%,#16203a 0%,transparent 60%),var(--bg);
  color:var(--txt); font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  min-height:100vh;
}
a{color:var(--accent)}
.app{display:grid; grid-template-columns:240px 1fr; min-height:100vh}
.side{
  position:sticky; top:0; align-self:start; height:100vh; overflow:auto;
  background:linear-gradient(180deg,var(--bg2),var(--bg)); border-right:1px solid var(--border); padding:20px 14px;
}
.brand{display:flex; align-items:center; gap:10px; font-weight:800; font-size:20px; padding:6px 8px 18px}
.brand .dot{width:26px;height:26px;border-radius:8px;background:linear-gradient(135deg,var(--accent),var(--accent2));display:inline-block;box-shadow:0 0 18px rgba(91,140,255,.6)}
.cat{display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:none; border:0; color:var(--muted);
  padding:10px 12px; border-radius:10px; cursor:pointer; font-size:14px; font-weight:600; transition:.15s}
.cat:hover{background:var(--card); color:var(--txt)}
.cat.active{background:var(--card2); color:var(--txt)}
.cat .ic{font-size:16px;width:20px;text-align:center}
.cat .ct{margin-left:auto; font-size:11px; color:var(--muted); background:#0d1119; padding:2px 8px; border-radius:20px}
.side .foot{margin-top:18px; padding:12px 8px; color:var(--muted); font-size:11px; line-height:1.6; border-top:1px solid var(--border)}
.main{padding:28px 34px 60px; max-width:1200px}
.topbar{display:flex; gap:16px; align-items:center; margin-bottom:8px; flex-wrap:wrap}
.hero h1{margin:0; font-size:30px; letter-spacing:-.5px}
.hero p{margin:6px 0 0; color:var(--muted)}
.search{flex:1; min-width:260px; position:relative}
.search input{width:100%; background:var(--card); border:1px solid var(--border); color:var(--txt);
  padding:14px 16px 14px 44px; border-radius:12px; font-size:15px; outline:none}
.search input:focus{border-color:var(--accent); box-shadow:0 0 0 3px rgba(91,140,255,.15)}
.search .si{position:absolute; left:15px; top:13px; color:var(--muted)}
.sectiontitle{margin:26px 0 14px; font-size:14px; text-transform:uppercase; letter-spacing:1.5px; color:var(--muted)}
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px}
.tool{
  background:linear-gradient(180deg,var(--card),var(--card2)); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px; cursor:pointer; transition:.18s; position:relative; overflow:hidden
}
.tool:hover{transform:translateY(-3px); border-color:var(--accent); box-shadow:var(--shadow)}
.tool .emoji{font-size:24px}
.tool h3{margin:10px 0 4px; font-size:15px}
.tool p{margin:0; color:var(--muted); font-size:12.5px; line-height:1.5}
.tool .tag{position:absolute; top:12px; right:12px; font-size:10px; color:var(--muted); background:#0d1119; padding:3px 8px; border-radius:20px}
.empty{color:var(--muted); padding:40px; text-align:center}
.sitefoot{margin-top:50px; padding-top:22px; border-top:1px solid var(--border); color:var(--muted); font-size:13px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px}
.sitefoot a{color:var(--accent); text-decoration:none}
.overlay{position:fixed; inset:0; background:rgba(4,6,11,.72); backdrop-filter:blur(4px); display:none; align-items:flex-start; justify-content:center; padding:40px 16px; z-index:50; overflow:auto}
.overlay.open{display:flex}
.modal{background:var(--bg2); border:1px solid var(--border); border-radius:18px; width:100%; max-width:720px; box-shadow:var(--shadow); animation:pop .18s ease}
@keyframes pop{from{transform:scale(.97);opacity:0}to{transform:scale(1);opacity:1}}
.modal .mhead{display:flex; align-items:center; gap:12px; padding:18px 20px; border-bottom:1px solid var(--border)}
.modal .mhead .emoji{font-size:22px}
.modal .mhead h2{margin:0; font-size:18px; flex:1}
.modal .mhead p{margin:2px 0 0; font-size:12px; color:var(--muted)}
.modal .close{background:var(--card); border:1px solid var(--border); color:var(--txt); width:34px; height:34px; border-radius:9px; cursor:pointer; font-size:16px}
.modal .mbody{padding:20px}
label{display:block; font-size:13px; color:var(--muted); margin:12px 0 6px; font-weight:600}
input[type=text],input[type=number],textarea,select{
  width:100%; background:var(--card); border:1px solid var(--border); color:var(--txt);
  padding:11px 13px; border-radius:10px; font-size:14px; outline:none; font-family:inherit
}
input:focus,textarea:focus,select:focus{border-color:var(--accent)}
textarea{min-height:110px; resize:vertical; font-family:ui-monospace,Menlo,Consolas,monospace}
.row{display:flex; gap:12px; flex-wrap:wrap}
.row>*{flex:1; min-width:120px}
button.btn{background:linear-gradient(135deg,var(--accent),#3f6fe0); border:0; color:#fff; padding:11px 18px; border-radius:10px; font-weight:700; cursor:pointer; font-size:14px; margin-top:14px}
button.btn:hover{filter:brightness(1.08)}
button.btn.sec{background:var(--card2); border:1px solid var(--border)}
.out{margin-top:16px; background:#0c0f17; border:1px solid var(--border); border-radius:10px; padding:14px; font-family:ui-monospace,Menlo,Consolas,monospace; font-size:13px; white-space:pre-wrap; word-break:break-word; min-height:20px}
.out.big{font-size:20px; font-weight:700}
.chips{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.chip{background:var(--card); border:1px solid var(--border); padding:8px 12px; border-radius:20px; font-size:13px}
.chip b{color:var(--accent)}
.note{font-size:12px; color:var(--muted); margin-top:10px}
.dropzone{border:2px dashed var(--border); border-radius:12px; padding:26px; text-align:center; color:var(--muted); cursor:pointer; transition:.15s}
.dropzone:hover,.dropzone.drag{border-color:var(--accent); color:var(--txt); background:var(--card)}
.previewwrap{display:flex; gap:16px; flex-wrap:wrap; margin-top:14px; align-items:flex-start}
.previewwrap img{max-width:240px; max-height:200px; border-radius:10px; border:1px solid var(--border)}
.swatch{height:90px; border-radius:10px; border:1px solid var(--border)}
canvas{max-width:100%}
.toast{position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:var(--good); color:#04210f; padding:10px 18px; border-radius:10px; font-weight:700; opacity:0; transition:.2s; z-index:99}
.toast.show{opacity:1}
@media(max-width:760px){.app{grid-template-columns:1fr}.side{position:static;height:auto}}

/* multi-page additions */
.tool{text-decoration:none;color:var(--txt);display:block}
.tp{max-width:920px;margin:0 auto;padding:26px 20px 70px}
.tp-head{display:flex;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--border);margin-bottom:24px;flex-wrap:wrap}
.tp-head .brand{font-size:18px;padding:0}
.tp-head a{color:var(--muted);text-decoration:none;font-size:14px;font-weight:600}
.tp-head a:hover{color:var(--txt)}
.tp h1{font-size:30px;margin:6px 0 8px}
.tp .lead{color:var(--muted);font-size:16px;line-height:1.6;margin:0 0 22px;max-width:680px}
.toolpanel{background:linear-gradient(180deg,var(--card),var(--card2));border:1px solid var(--border);border-radius:16px;padding:22px;box-shadow:var(--shadow)}
.seo{margin-top:40px}
.seo h2{font-size:20px;margin:28px 0 10px}
.seo p{color:var(--muted);line-height:1.7;max-width:720px}
.seo ol{color:var(--muted);line-height:1.8;max-width:720px}
.related{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.related a{background:var(--card);border:1px solid var(--border);padding:8px 12px;border-radius:20px;font-size:13px;color:var(--txt);text-decoration:none}
.related a:hover{border-color:var(--accent)}
.crumb{font-size:13px;color:var(--muted);margin-bottom:8px}
.crumb a{color:var(--accent);text-decoration:none}
