:root{
  --bg:#f5f7fb; --card:#fff; --line:#dbe3ee; --text:#16202a; --muted:#6a7888;
  --blue:#1d4ed8; --green:#15803d; --orange:#b45309; --red:#b91c1c;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
.wrap{max-width:1250px;margin:0 auto;padding:24px}
.hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}
.hero h1{margin:0 0 10px;font-size:34px}
.hero p{margin:0;max-width:760px;line-height:1.5;color:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(3,120px);gap:12px}
.stat{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:14px;text-align:center}
.stat span{display:block;font-size:30px;font-weight:700}
.stat small{color:var(--muted)}
.card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:20px;box-shadow:0 8px 24px rgba(0,0,0,.03);margin-bottom:20px}
h2{margin:0 0 12px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.mt{margin-top:12px}
label{display:block;margin-bottom:8px;font-weight:700}
input[type=file], input[type=range]{width:100%}
input[type=file]{padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff}
small{display:block;margin-top:8px;color:var(--muted);line-height:1.4}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end}
.wrap-actions{margin-bottom:12px}
.btn{border:none;border-radius:12px;padding:12px 16px;font-weight:700;background:var(--blue);color:#fff;cursor:pointer}
.btn-success{background:var(--green)}
.btn-warning{background:var(--orange)}
.btn-light{background:#e8eef7;color:#18314f}
.status{margin-top:12px;background:#eef3f9;border-radius:12px;padding:12px 14px;color:#29435c}
.status.ok{background:#e7f7ed;color:#166534}
.status.warn{background:#fff6e8;color:#9a5800}
.status.error{background:#fdecec;color:var(--red)}
.status.muted{background:#f8fafc;color:var(--muted)}
.progress{width:100%;height:14px;background:#edf2f7;border:1px solid var(--line);border-radius:999px;overflow:hidden;margin-top:14px}
.progress div{height:100%;width:0%;background:linear-gradient(90deg,#2563eb,#60a5fa)}
.progressText{margin-top:8px;color:var(--muted)}
.layout{display:grid;grid-template-columns:320px 1fr;gap:20px}
.preview{min-height:220px;border:2px dashed var(--line);border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden;color:var(--muted)}
.preview.empty{padding:16px}
.preview img{width:100%;max-height:300px;object-fit:contain;background:#fafcff}
.preview .cap{padding:10px}
.toolbar{display:flex;justify-content:space-between;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.results{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
.result{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff}
.result img{width:100%;height:180px;object-fit:cover;background:#eef2f7}
.result-body{padding:12px}
.result-title{font-weight:700;margin-bottom:6px}
.result-meta{font-size:13px;color:var(--muted);line-height:1.4;word-break:break-word}
.badge{display:inline-block;margin:10px 0 8px;padding:6px 10px;background:#eaf2ff;color:#1d4ed8;border-radius:999px;font-size:12px;font-weight:700}
.empty-box{border:2px dashed var(--line);padding:30px;border-radius:16px;text-align:center;color:var(--muted)}
code{background:#eef2f7;padding:2px 6px;border-radius:6px}
ul{margin:0;padding-left:20px;color:var(--muted);line-height:1.7}
@media (max-width: 980px){
  .hero,.layout,.grid2{grid-template-columns:1fr;display:grid}
  .hero{display:flex;flex-direction:column}
  .stats{grid-template-columns:repeat(3,1fr);width:100%}
}
