@font-face {
  font-family: "Inter";
  src: url("vendor/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f9fbfe;
  --ink: #14213d;
  --ink-2: #43516c;
  --muted: #7a879e;
  --faint: #a5afc0;
  --line: #e5eaf2;
  --line-strong: #d5ddea;
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: #eef4ff;
  --brand-softer: #f5f8ff;
  --ok: #07865b;
  --ok-soft: #e9f8f1;
  --warn: #b36b00;
  --warn-soft: #fff6e6;
  --bad: #d14343;
  --bad-soft: #fff0f0;
  --navy: #101b33;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, .04), 0 4px 12px rgba(20, 33, 61, .035);
  --shadow-md: 0 2px 4px rgba(20, 33, 61, .035), 0 14px 36px rgba(20, 33, 61, .06);
  --shadow-brand: 0 8px 20px rgba(37, 99, 235, .22), 0 2px 5px rgba(37, 99, 235, .14);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -15%, rgba(219, 232, 255, .7), transparent 35%),
    var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }
::selection { color: #fff; background: var(--brand); }

.page-glow { position: fixed; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(2px); }
.page-glow-one { width: 440px; height: 440px; top: 70px; left: -260px; background: radial-gradient(circle, rgba(191, 219, 255, .36), transparent 68%); }
.page-glow-two { width: 520px; height: 520px; top: 180px; right: -320px; background: radial-gradient(circle, rgba(214, 225, 255, .42), transparent 68%); }

.app { width: min(1220px, calc(100% - 64px)); margin: 0 auto; padding-bottom: 34px; }

/* Header */
.site-header { height: 82px; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.brand-mark { width: 38px; height: 38px; filter: drop-shadow(0 5px 10px rgba(37, 99, 235, .2)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-size: 18px; font-weight: 760; letter-spacing: -.55px; }
.brand-name span { color: var(--brand); }
.header-nav { display: flex; align-items: center; gap: 28px; margin-left: 34px; }
.header-nav a { position: relative; color: var(--ink-2); font-size: 13px; font-weight: 560; text-decoration: none; transition: color .18s ease; }
.header-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; border-radius: 2px; background: var(--brand); transition: right .2s ease; }
.header-nav a:hover { color: var(--brand); }
.header-nav a:hover::after { right: 0; }
.header-right { margin-left: auto; }
.privacy-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; color: #087454; background: rgba(235, 248, 241, .85); border: 1px solid #d6efe2; border-radius: 999px; font-size: 12px; font-weight: 650; }
.privacy-pill svg { width: 16px; height: 16px; }

/* Hero */
.hero { max-width: 780px; margin: 34px auto 30px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; color: #36547f; background: rgba(255, 255, 255, .76); border: 1px solid #dfe7f3; border-radius: 999px; box-shadow: 0 2px 6px rgba(20, 33, 61, .025); font-size: 11.5px; font-weight: 650; letter-spacing: .1px; backdrop-filter: blur(10px); }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, .1); }
.hero h1 { margin: 20px 0 14px; font-size: clamp(38px, 4.2vw, 58px); line-height: 1.1; font-weight: 780; letter-spacing: -2.4px; }
.hero h1 span { color: var(--brand); background: linear-gradient(105deg, #2563eb 10%, #4f46e5 90%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero > p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.75; letter-spacing: -.12px; }
.hero-points { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 20px; color: var(--muted); font-size: 12px; font-weight: 560; }
.hero-points span { display: inline-flex; align-items: center; gap: 6px; }
.hero-points svg { width: 15px; height: 15px; color: var(--ok); }
.mobile-break { display: none; }

/* Shared */
.card { background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 18px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 680; letter-spacing: -.1px; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.btn svg { width: 18px; height: 18px; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-primary { color: #fff; background: linear-gradient(180deg, #3272f4, #2563eb); border-color: #1f5de0; box-shadow: var(--shadow-brand); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #2868e9, #1d4ed8); box-shadow: 0 10px 24px rgba(37, 99, 235, .26); }
.btn-ghost { color: var(--brand); background: #fff; border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--brand-soft); border-color: #b9cdf8; }
.btn-lg { min-height: 50px; padding: 12px 23px; border-radius: 12px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .26); outline-offset: 3px; }
.muted { color: var(--muted); }

/* Upload */
.import-shell { position: relative; margin: 0 auto; overflow: hidden; border: 1px solid #dce5f3; border-radius: var(--radius-xl); background: rgba(255, 255, 255, .88); box-shadow: 0 18px 55px rgba(43, 72, 120, .08), 0 2px 6px rgba(20, 33, 61, .025); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; backdrop-filter: blur(14px); }
.import-shell::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(239, 245, 255, .65), transparent 38%, rgba(248, 250, 255, .55)); }
.import-shell.is-hover { border-color: #7aa5ff; background: #f3f7ff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .09), 0 20px 60px rgba(43, 72, 120, .11); }
.import-empty { position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: center; min-height: 238px; padding: 30px 54px 30px 42px; }
.upload-visual { position: relative; width: 190px; height: 166px; display: grid; place-items: center; }
.upload-orbit { position: absolute; border: 1px solid #dbe7fb; border-radius: 50%; }
.orbit-one { width: 152px; height: 152px; background: radial-gradient(circle, rgba(226, 236, 255, .58), rgba(246, 249, 255, .2) 68%); }
.orbit-two { width: 112px; height: 112px; border-style: dashed; border-color: #c8d9f7; animation: orbit 28s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.upload-icon { position: relative; z-index: 2; width: 70px; height: 70px; display: grid; place-items: center; color: var(--brand); border: 1px solid #cfe0ff; border-radius: 21px; background: linear-gradient(145deg, #fff, #edf4ff); box-shadow: 0 12px 25px rgba(37, 99, 235, .14), inset 0 1px 0 #fff; }
.upload-icon svg { width: 32px; height: 32px; }
.floating-file { position: absolute; z-index: 3; display: grid; place-items: center; width: 44px; height: 38px; border: 1px solid #dbe5f5; border-radius: 9px; background: rgba(255, 255, 255, .94); box-shadow: 0 7px 16px rgba(20, 33, 61, .09); font-size: 9px; font-weight: 800; letter-spacing: .5px; }
.file-png { top: 22px; right: 9px; color: #2563eb; transform: rotate(8deg); }
.file-jpg { left: 4px; bottom: 24px; color: #7c3aed; transform: rotate(-8deg); }
.upload-copy { position: relative; padding-left: 28px; border-left: 1px solid var(--line); }
.upload-copy h2 { margin: 0 0 4px; font-size: 23px; line-height: 1.3; font-weight: 740; letter-spacing: -.7px; }
.upload-copy > p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.upload-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; color: var(--faint); font-size: 10.5px; font-weight: 560; }
.upload-meta i { width: 3px; height: 3px; border-radius: 50%; background: #c8d1df; }
.import-compact { position: relative; display: flex; align-items: center; gap: 18px; min-height: 84px; padding: 17px 22px; }
.compact-copy { display: flex; flex-direction: column; line-height: 1.45; }
.compact-copy strong { font-size: 13px; font-weight: 680; }
.compact-copy span { color: var(--muted); font-size: 11.5px; }
.local-note { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: var(--muted); font-size: 11.5px; }
.local-note svg { width: 16px; height: 16px; color: var(--ok); }

/* Steps */
.steps { display: grid; grid-template-columns: 1fr 50px 1fr 50px 1fr; align-items: center; gap: 12px; max-width: 980px; margin: 28px auto 34px; padding: 0 14px; }
.step { display: flex; align-items: flex-start; gap: 11px; }
.step-number { display: grid; place-items: center; flex: none; width: 29px; height: 29px; margin-top: 1px; color: var(--brand); background: #edf3ff; border: 1px solid #dbe7ff; border-radius: 9px; font-size: 10px; font-weight: 780; }
.step strong { display: block; color: var(--ink); font-size: 12px; font-weight: 680; line-height: 1.45; }
.step p { margin: 2px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.step-line { height: 1px; background: linear-gradient(90deg, #dbe3ef, #e9edf4); }

/* Settings */
.settings { padding: 23px 24px 20px; margin-bottom: 20px; box-shadow: var(--shadow-md); }
.settings-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-title { display: flex; flex-direction: column; gap: 2px; }
.section-kicker { color: var(--brand); font-size: 9.5px; font-weight: 780; letter-spacing: 1.1px; text-transform: uppercase; }
.section-title h2 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 720; letter-spacing: -.35px; }
.last-level { padding: 5px 10px; color: #52709e; background: #f2f6fc; border: 1px solid #e2eaf6; border-radius: 999px; font-size: 10.5px; font-weight: 620; }
.levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.level-card { position: relative; min-width: 0; min-height: 130px; padding: 14px 13px 12px; overflow: hidden; color: var(--ink); text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 13px; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.level-card:hover { transform: translateY(-2px); border-color: #c6d6f1; box-shadow: 0 7px 18px rgba(20, 33, 61, .06); }
.level-card.active { border-color: #7fa8ff; background: linear-gradient(155deg, #f7faff, #edf4ff); box-shadow: 0 0 0 2px rgba(37, 99, 235, .1), 0 8px 20px rgba(37, 99, 235, .08); }
.level-card.active::after { content: ""; position: absolute; top: 10px; right: 10px; width: 15px; height: 15px; border-radius: 50%; background: var(--brand); box-shadow: 0 2px 5px rgba(37, 99, 235, .25); }
.level-card.active::before { content: ""; position: absolute; z-index: 2; top: 14px; right: 14px; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.lv-top { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; padding-right: 13px; }
.lv-num { display: grid; place-items: center; flex: none; width: 21px; height: 21px; color: var(--ink-2); background: #f0f3f8; border-radius: 6px; font-size: 10px; font-weight: 760; }
.level-card.active .lv-num { color: #fff; background: var(--brand); }
.lv-name { min-width: 0; font-size: 11.5px; font-weight: 720; line-height: 1.3; letter-spacing: -.1px; }
.lv-desc { min-height: 46px; color: var(--muted); font-size: 10.5px; line-height: 1.48; }
.lv-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.lv-meter { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.lv-meter i { display: block; width: 3px; border-radius: 2px; background: #dce4f0; }
.lv-meter i:nth-child(1) { height: 4px; }
.lv-meter i:nth-child(2) { height: 6px; }
.lv-meter i:nth-child(3) { height: 8px; }
.lv-meter i:nth-child(4) { height: 10px; }
.lv-meter i.on { background: #86a9ed; }
.level-card.active .lv-meter i.on { background: var(--brand); }
.lv-default { color: var(--brand); font-size: 9px; font-weight: 740; }
.settings-foot { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; cursor: pointer; flex: none; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-box { position: relative; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 5px; background: #fff; transition: .16s ease; }
.toggle input:checked + .toggle-box { background: var(--brand); border-color: var(--brand); box-shadow: 0 2px 5px rgba(37, 99, 235, .2); }
.toggle input:checked + .toggle-box::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 9px; border: solid #fff; border-width: 0 1.7px 1.7px 0; transform: rotate(42deg); }
.toggle input:focus-visible + .toggle-box { outline: 3px solid rgba(37, 99, 235, .24); outline-offset: 2px; }
.toggle-label { color: var(--ink-2); font-size: 11.5px; font-weight: 620; }
.field-hint { flex: 1; margin: 0; color: var(--faint); font-size: 10.5px; line-height: 1.45; }
.settings-actions { display: flex; gap: 8px; margin-left: auto; }

/* Workspace */
.workspace { display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); gap: 20px; align-items: stretch; }
.results, .compare-panel { min-width: 0; padding: 21px; }
.results { display: flex; flex-direction: column; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.result-count { color: var(--muted); font-size: 11px; font-weight: 560; }
.file-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.file-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.file-item:hover { border-color: #cdd9ec; box-shadow: 0 5px 14px rgba(20, 33, 61, .045); }
.file-item.is-active { border-color: #9dbdff; box-shadow: 0 0 0 2px rgba(37, 99, 235, .08); }
.file-item.is-failed { border-color: #f1c9c9; background: #fffafa; }
.thumb { width: 56px; height: 56px; flex: none; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; background: repeating-conic-gradient(#eef2f8 0% 25%, #fff 0% 50%) 50% / 12px 12px; cursor: zoom-in; }
.item-body { flex: 1; min-width: 0; }
.item-name { overflow: hidden; color: var(--ink); font-size: 11.5px; font-weight: 680; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { overflow: hidden; margin-top: 1px; color: var(--faint); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.item-sizes { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.size-from { color: var(--faint); font-size: 10.5px; text-decoration: line-through; }
.size-arrow { color: #b7c1d0; font-size: 10px; }
.size-to { color: var(--ink); font-size: 12px; font-weight: 760; font-variant-numeric: tabular-nums; }
.size-save { padding: 1px 5px; color: var(--ok); background: var(--ok-soft); border-radius: 4px; font-size: 9.5px; font-weight: 720; }
.size-save.zero { color: var(--muted); background: #f1f4f8; }
.item-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 9.5px; font-weight: 620; line-height: 1.4; }
.item-status .dot { width: 5px; height: 5px; flex: none; border-radius: 50%; background: currentColor; }
.st-wait { color: var(--muted); }
.st-busy { color: var(--warn); }
.st-done { color: var(--ok); }
.st-kept { color: var(--ink-2); }
.st-fail { color: var(--bad); }
.progress { height: 3px; margin-top: 6px; overflow: hidden; background: #edf1f7; border-radius: 99px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #60a5fa, var(--brand)); border-radius: inherit; transition: width .18s ease; }
.item-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.mini-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 9px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; font-weight: 640; transition: .15s ease; }
.mini-btn:hover:not(:disabled) { color: var(--brand); background: var(--brand-softer); border-color: #c5d7fa; }
.mini-btn.danger { width: 34px; padding: 0; color: #9aa6b8; }
.mini-btn.danger:hover:not(:disabled) { color: var(--bad); background: var(--bad-soft); border-color: #f2cccc; }
.mini-btn:disabled { opacity: .35; cursor: not-allowed; }
.demo-badge { display: inline-block; margin-left: 5px; padding: 1px 5px; color: var(--warn); background: var(--warn-soft); border-radius: 4px; font-size: 8px; font-weight: 720; vertical-align: 1px; }
.results-empty { padding: 36px 0; text-align: center; font-size: 12px; }

/* Comparison */
.compare-panel { display: flex; flex-direction: column; background: #fff; }
.compare-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.compare-side { display: flex; flex-direction: column; min-width: 0; }
.compare-side.right { text-align: right; }
.side-label { color: var(--ink-2); font-size: 10.5px; font-weight: 680; }
.side-size { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.compare-meta { padding: 4px 9px; color: #5374aa; background: #f0f5fd; border: 1px solid #e0e9f8; border-radius: 999px; font-size: 9px; font-weight: 650; white-space: nowrap; }
.compare-viewport { position: relative; flex: 1; min-height: 300px; overflow: hidden; border: 1px solid #25314a; border-radius: 13px; background-color: #111a2d; background-image: radial-gradient(circle at 50% 35%, rgba(74, 99, 145, .22), transparent 65%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); --split: 50%; --tx: 0px; --ty: 0px; --scale: 1; touch-action: none; cursor: grab; }
.compare-viewport.bg-checker { background-color: #fff; background-image: linear-gradient(45deg, #dbe2ec 25%, transparent 25%, transparent 75%, #dbe2ec 75%), linear-gradient(45deg, #dbe2ec 25%, transparent 25%, transparent 75%, #dbe2ec 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.compare-viewport.bg-dark { background-color: #111a2d; background-image: radial-gradient(circle at 50% 35%, rgba(74, 99, 145, .22), transparent 65%); }
.compare-viewport.bg-light { background-color: #f2f5fa; background-image: none; }
.layer { position: absolute; inset: 0; overflow: hidden; }
.layer-compressed { clip-path: inset(0 0 0 var(--split)); }
.compare-viewport.mode-original .layer-compressed,
.compare-viewport.mode-compressed .layer-original,
.compare-viewport.mode-original .compare-divider,
.compare-viewport.mode-compressed .compare-divider { display: none; }
.compare-canvas { position: absolute; inset: 0; transform: translate(var(--tx), var(--ty)) scale(var(--scale)); transform-origin: center; will-change: transform; }
.compare-canvas img { position: absolute; top: 50%; left: 50%; max-width: none; max-height: none; transform: translate(-50%, -50%); user-select: none; pointer-events: none; border-radius: 2px; box-shadow: 0 10px 30px rgba(0, 0, 0, .16); }
.compare-divider { position: absolute; z-index: 4; top: 0; bottom: 0; left: var(--split); width: 2px; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(15, 23, 42, .16), 0 0 14px rgba(0, 0, 0, .2); cursor: ew-resize; touch-action: none; }
.compare-divider .handle { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 34px; height: 34px; color: var(--brand); background: #fff; border: 1px solid rgba(255, 255, 255, .8); border-radius: 50%; box-shadow: 0 5px 16px rgba(0, 0, 0, .24); transform: translate(-50%, -50%); }
.compare-divider .handle svg { width: 18px; height: 18px; }
.compare-placeholder { position: absolute; z-index: 5; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #71809c; font-size: 11px; pointer-events: none; }
.compare-placeholder svg { width: 34px; height: 34px; color: #536684; }
.compare-toolbar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: #f0f3f8; border: 1px solid #e8edf5; border-radius: 9px; }
.seg-btn { min-height: 31px; padding: 5px 10px; color: var(--muted); background: transparent; border: 0; border-radius: 6px; font-size: 10px; font-weight: 640; transition: .15s ease; }
.seg-btn.active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(20, 33, 61, .1); }
.tool-right { display: flex; gap: 5px; margin-left: auto; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 32px; padding: 0 9px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; font-weight: 620; transition: .15s ease; }
.tool-btn svg { width: 15px; height: 15px; }
.tool-btn:hover, .tool-btn.active { color: var(--brand); background: var(--brand-softer); border-color: #c8d9f8; }
.tool-btn.icon-only { width: 34px; padding: 0; }
.compare-tip { margin: 9px 0 0; color: var(--faint); font-size: 9.5px; line-height: 1.5; }

/* Batch download */
.batch { position: relative; display: flex; align-items: center; gap: 26px; margin-top: 20px; padding: 20px 22px; overflow: hidden; color: #fff; background: linear-gradient(115deg, #14213d 0%, #182b50 58%, #1d3768 100%); border: 1px solid #1b2c4d; border-radius: var(--radius-lg); box-shadow: 0 14px 34px rgba(20, 33, 61, .16); }
.batch::after { content: ""; position: absolute; width: 300px; height: 300px; top: -190px; right: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(96, 165, 250, .24), transparent 68%); pointer-events: none; }
.batch-intro { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.batch-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; color: #8ff0c4; background: rgba(52, 211, 153, .12); border: 1px solid rgba(110, 231, 183, .18); border-radius: 11px; }
.batch-icon svg { width: 19px; height: 19px; }
.batch-intro div { display: flex; flex-direction: column; }
.batch-intro strong { font-size: 12px; font-weight: 680; }
.batch-intro span { color: #93a4c2; font-size: 9.5px; }
.batch-stats { display: flex; align-items: center; gap: 28px; }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat-k { color: #8fa1c1; font-size: 9px; }
.stat-v { color: #fff; font-size: 15px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.25px; }
.stat.accent .stat-v { color: #78e4b5; }
.batch-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.failed-note { margin: 0; color: #ffb4b4; font-size: 10px; font-weight: 600; }
.btn-download { color: #14213d; background: #fff; border-color: #fff; box-shadow: 0 5px 16px rgba(0, 0, 0, .16); white-space: nowrap; }
.btn-download:hover:not(:disabled) { background: #eef4ff; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }

/* Footer */
.site-footer { display: flex; align-items: center; gap: 18px; margin-top: 34px; padding-top: 20px; color: var(--faint); border-top: 1px solid var(--line); font-size: 10.5px; }
.footer-brand { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 680; }
.footer-logo { display: grid; place-items: center; width: 20px; height: 20px; color: #fff; background: var(--brand); border-radius: 6px; font-size: 10px; font-weight: 800; }
.site-footer p { margin: 0; }
.demo-switch { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.demo-switch > span { margin-right: 3px; color: var(--faint); font-size: 9px; }
.demo-switch button { padding: 4px 8px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 9px; }
.demo-switch button.active { color: var(--brand); background: var(--brand-soft); border-color: #c7d9fb; }

/* Toast */
.toast { position: fixed; z-index: 80; bottom: 26px; left: 50%; max-width: calc(100vw - 32px); padding: 11px 17px; color: #fff; background: rgba(20, 33, 61, .96); border: 1px solid rgba(255, 255, 255, .1); border-radius: 11px; box-shadow: 0 12px 30px rgba(20, 33, 61, .24); font-size: 12px; font-weight: 560; transform: translateX(-50%); animation: toast-in .2s ease; backdrop-filter: blur(10px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Fullscreen comparison */
.compare-overlay { position: fixed; z-index: 60; inset: 0; display: flex; flex-direction: column; background: #f4f7fb; animation: overlay-in .18s ease; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.overlay-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; padding: 12px 24px; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.overlay-heading { display: flex; align-items: center; gap: 11px; }
.overlay-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: linear-gradient(145deg, #3b82f6, #1d4ed8); border-radius: 10px; box-shadow: 0 5px 12px rgba(37, 99, 235, .2); font-size: 14px; font-weight: 800; }
.overlay-heading div { display: flex; flex-direction: column; }
.overlay-heading strong { font-size: 13px; font-weight: 700; }
.overlay-heading span { color: var(--muted); font-size: 10px; }
.overlay-close { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink-2); background: #f1f4f8; border: 1px solid var(--line); border-radius: 10px; transition: .15s ease; }
.overlay-close:hover { color: var(--bad); background: var(--bad-soft); border-color: #f0cccc; }
.overlay-close svg { width: 18px; height: 18px; }
.overlay-host { display: flex; flex: 1; min-height: 0; padding: 20px; }
.overlay-host .compare-panel { flex: 1; min-height: 0; padding: 20px; box-shadow: var(--shadow-md); }
.overlay-host .compare-viewport { min-height: 0; }

/* Focused workspace after images are added */
body.has-files .hero,
body.has-files .steps,
body.has-files .section-kicker { display: none; }
body.has-files .site-header { height: 68px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
body.has-files .import-shell { margin-bottom: 16px; box-shadow: var(--shadow-sm); }
body.has-files .import-compact { min-height: 70px; padding: 13px 18px; }
body.has-files .app { padding-bottom: 26px; }
.studio { overflow: hidden; background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.studio .settings { margin: 0; padding: 18px 20px 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; backdrop-filter: none; }
.studio .settings-head { margin-bottom: 12px; }
.studio .level-card { min-height: 108px; padding: 12px; }
.studio .lv-desc { min-height: 31px; font-size: 10px; }
.studio .settings-foot { margin-top: 13px; padding-top: 13px; }
.studio .workspace { gap: 0; padding: 20px; }
.studio .results { padding: 0 20px 0 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; }
.studio .compare-panel { padding: 0 0 0 20px; background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; backdrop-filter: none; }
.studio .batch { margin: 0 20px 20px; border-radius: 14px; }
.studio .site-footer { margin-top: 24px; }

@media (max-width: 1080px) {
  body.has-files .site-header { margin-bottom: 14px; }
  .studio .workspace { padding: 18px; }
  .studio .results { padding: 0 0 18px; }
  .studio .compare-panel { padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .studio .batch { margin: 0 18px 18px; }
}

/* Responsive */
@media (max-width: 1080px) {
  .app { width: min(100% - 44px, 980px); }
  .workspace { grid-template-columns: 1fr; }
  .compare-panel { min-height: 520px; }
  .compare-viewport { min-height: 350px; }
  .levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .level-card { min-height: 120px; }
  .lv-desc { min-height: 32px; }
  .batch { flex-wrap: wrap; }
  .batch-stats { order: 3; width: 100%; justify-content: space-between; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .batch-actions { margin-left: auto; }
}

@media (max-width: 760px) {
  .app { width: calc(100% - 32px); }
  .site-header { height: 70px; gap: 16px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 16px; }
  .header-nav { display: none; }
  .hero { margin-top: 24px; }
  .hero h1 { font-size: clamp(34px, 8.8vw, 46px); letter-spacing: -1.7px; }
  .hero > p { font-size: 14px; }
  .desktop-break { display: none; }
  .hero-points { gap: 15px; font-size: 10.5px; }
  .import-empty { grid-template-columns: 1fr; min-height: 0; padding: 26px 24px 28px; text-align: center; }
  .upload-visual { width: 150px; height: 130px; margin: 0 auto 10px; }
  .orbit-one { width: 122px; height: 122px; }
  .orbit-two { width: 90px; height: 90px; }
  .upload-icon { width: 58px; height: 58px; border-radius: 17px; }
  .upload-icon svg { width: 27px; height: 27px; }
  .floating-file { width: 38px; height: 33px; font-size: 8px; }
  .file-png { right: 0; }
  .file-jpg { left: 0; bottom: 13px; }
  .upload-copy { padding: 0; border: 0; }
  .upload-copy h2 { font-size: 21px; }
  .upload-copy > p { font-size: 12px; margin-bottom: 16px; }
  .upload-meta { justify-content: center; gap: 7px; font-size: 9px; }
  .steps { grid-template-columns: 1fr; gap: 14px; margin: 24px auto 28px; padding: 0 8px; }
  .step-line { display: none; }
  .step { align-items: center; }
  .step p { margin-top: 0; }
  .settings { padding: 18px 16px 16px; }
  body.has-files .site-header { height: 62px; margin-bottom: 12px; }
  body.has-files .import-shell { margin-bottom: 12px; }
  body.has-files .import-compact { min-height: 64px; padding: 12px 14px; }
  .studio { border-radius: 18px; }
  .studio .settings { padding: 16px 14px 14px; }
  .studio .levels { display: flex; gap: 8px; margin: 0 -14px; padding: 0 14px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .studio .levels::-webkit-scrollbar { display: none; }
  .studio .level-card { display: block; flex: 0 0 188px; min-height: 106px; padding: 11px 12px; scroll-snap-align: start; }
  .studio .lv-top { display: flex; margin-bottom: 6px; padding-right: 16px; }
  .studio .lv-desc { min-height: 31px; font-size: 9.5px; }
  .studio .lv-bottom { display: flex; margin-top: 7px; }
  .studio .lv-default { display: inline; }
  .studio .settings-foot { margin-top: 11px; padding-top: 11px; }
  .studio .workspace { padding: 16px 14px; }
  .studio .results { padding: 0 0 16px; }
  .studio .compare-panel { padding: 16px 0 0; }
  .studio .batch { margin: 0 14px 14px; }
  .settings-head { align-items: flex-start; }
  .last-level { max-width: 46%; text-align: right; }
  .levels { grid-template-columns: 1fr; gap: 8px; }
  .level-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; padding: 12px 13px; }
  .level-card.active::after { top: 50%; transform: translateY(-50%); }
  .level-card.active::before { top: calc(50% - 4px); right: 14px; }
  .lv-top { grid-column: 1; margin-bottom: 3px; padding-right: 22px; }
  .lv-desc { grid-column: 1; min-height: 0; font-size: 10px; }
  .lv-bottom { grid-column: 2; grid-row: 1 / 3; align-self: center; margin: 0 22px 0 10px; }
  .lv-default { display: none; }
  .settings-foot { align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; }
  .field-hint { flex-basis: 100%; }
  .settings-actions { width: 100%; margin: 6px 0 0; }
  .settings-actions .btn { flex: 1; }
  .results, .compare-panel { padding: 17px 15px; }
  .compare-panel { min-height: 440px; }
  .compare-viewport { min-height: 270px; }
  .file-item { flex-wrap: wrap; gap: 10px; }
  .thumb { width: 50px; height: 50px; }
  .item-body { flex-basis: calc(100% - 62px); }
  .item-actions { width: 100%; padding-left: 60px; }
  .mini-btn { flex: 1; height: 38px; }
  .mini-btn.danger { flex: 0 0 38px; }
  .compare-toolbar { flex-wrap: wrap; }
  .tool-right { width: 100%; margin: 0; }
  .tool-btn { flex: 1; }
  .seg { width: 100%; }
  .seg-btn { flex: 1; }
  .compare-meta { order: 3; width: 100%; text-align: center; }
  .batch { gap: 16px; padding: 18px 16px; }
  .batch-intro { min-width: 0; }
  .batch-actions { width: 100%; margin: 0; }
  .batch-actions .btn { width: 100%; }
  .batch-stats { gap: 12px; }
  .stat-v { font-size: 13px; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .demo-switch { margin: 6px 0 0; }
  .overlay-bar { min-height: 64px; padding: 10px 14px; }
  .overlay-heading span { display: none; }
  .overlay-host { padding: 10px; }
  .overlay-host .compare-panel { padding: 14px 12px; }
}

@media (max-width: 420px) {
  .privacy-pill { padding: 6px 9px; font-size: 10px; }
  .privacy-pill svg { width: 14px; height: 14px; }
  .hero h1 { font-size: 34px; }
  .mobile-break { display: block; }
  .hero-points { gap: 11px; font-size: 9.5px; }
  .hero-points svg { width: 13px; height: 13px; }
  .upload-meta span:last-child, .upload-meta i:last-of-type { display: none; }
  .import-compact { flex-wrap: wrap; gap: 12px; padding: 15px; }
  .local-note { width: 100%; margin: 0; padding-left: 2px; }
  .batch-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
