/* ============================================================
   FreeSize — Design System
   Humanist & friendly · native desktop utility · light + dark
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* type */
  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* radius / spacing */
  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* light theme tokens */
  --bg: oklch(0.984 0.004 230);
  --bg-2: oklch(0.962 0.006 230);
  --surface: #ffffff;
  --surface-2: oklch(0.976 0.004 230);
  --surface-3: oklch(0.955 0.006 232);
  --hover: oklch(0.955 0.008 232);
  --border: oklch(0.916 0.006 235);
  --border-strong: oklch(0.862 0.008 235);
  --text: oklch(0.285 0.021 258);
  --text-2: oklch(0.445 0.018 258);
  --muted: oklch(0.575 0.015 258);
  --faint: oklch(0.71 0.012 258);

  --accent: oklch(0.575 0.108 220);
  --accent-2: oklch(0.515 0.118 222);
  --accent-ink: #ffffff;
  --accent-soft: oklch(0.952 0.028 215);
  --accent-soft-2: oklch(0.93 0.04 215);
  --accent-border: oklch(0.84 0.055 215);

  --success: oklch(0.59 0.13 156);
  --success-soft: oklch(0.95 0.045 156);
  --success-border: oklch(0.84 0.07 156);
  --danger: oklch(0.575 0.19 26);
  --danger-soft: oklch(0.955 0.035 26);
  --warning: oklch(0.72 0.15 70);

  --shadow-sm: 0 1px 2px oklch(0.4 0.02 255 / 0.06), 0 1px 1px oklch(0.4 0.02 255 / 0.04);
  --shadow-md: 0 4px 14px oklch(0.4 0.03 255 / 0.08), 0 1px 3px oklch(0.4 0.02 255 / 0.05);
  --shadow-lg: 0 18px 50px oklch(0.35 0.03 255 / 0.16), 0 4px 14px oklch(0.35 0.02 255 / 0.08);
  --shadow-pop: 0 12px 34px oklch(0.35 0.03 255 / 0.18), 0 2px 8px oklch(0.35 0.02 255 / 0.10);

  --backdrop-a: oklch(0.93 0.02 235);
  --backdrop-b: oklch(0.88 0.03 255);
  --appicon-bg-1: oklch(0.30 0.04 250);
  --appicon-bg-2: oklch(0.22 0.05 255);
}

[data-theme="dark"] {
  --bg: oklch(0.178 0.012 252);
  --bg-2: oklch(0.152 0.012 252);
  --surface: oklch(0.214 0.014 252);
  --surface-2: oklch(0.246 0.015 252);
  --surface-3: oklch(0.285 0.016 252);
  --hover: oklch(0.272 0.016 252);
  --border: oklch(0.318 0.014 252);
  --border-strong: oklch(0.40 0.017 252);
  --text: oklch(0.945 0.008 250);
  --text-2: oklch(0.78 0.013 250);
  --muted: oklch(0.645 0.014 250);
  --faint: oklch(0.50 0.014 250);

  --accent: oklch(0.72 0.115 212);
  --accent-2: oklch(0.78 0.115 210);
  --accent-ink: oklch(0.16 0.02 240);
  --accent-soft: oklch(0.31 0.055 218);
  --accent-soft-2: oklch(0.36 0.07 218);
  --accent-border: oklch(0.42 0.07 215);

  --success: oklch(0.74 0.15 156);
  --success-soft: oklch(0.32 0.07 156);
  --success-border: oklch(0.42 0.09 156);
  --danger: oklch(0.70 0.17 26);
  --danger-soft: oklch(0.32 0.08 26);
  --warning: oklch(0.78 0.14 75);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 18px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 22px 60px oklch(0 0 0 / 0.55);
  --shadow-pop: 0 14px 38px oklch(0 0 0 / 0.5);

  --backdrop-a: oklch(0.20 0.02 255);
  --backdrop-b: oklch(0.12 0.02 260);
  --appicon-bg-1: oklch(0.30 0.04 250);
  --appicon-bg-2: oklch(0.20 0.05 255);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(120% 120% at 12% -10%, var(--backdrop-a), var(--backdrop-b));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.45;
}
#root { height: 100%; }
::selection { background: var(--accent-soft-2); }
.appicon-bg { fill: url(#appiconGrad); }

/* ---------- Desktop stage + window frame ---------- */
.stage {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0px, 3vh, 34px) clamp(0px, 3vw, 40px);
}
.window {
  width: min(1280px, 100%);
  height: min(880px, 100%);
  background: var(--bg);
  border-radius: clamp(0px, 1.4vw, 16px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* generic, OS-neutral titlebar */
.titlebar {
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  -webkit-user-select: none;
  user-select: none;
}
.tb-dots { display: flex; gap: 7px; }
.tb-dots i {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--border-strong);
  display: block;
}
.tb-title {
  flex: 1; text-align: center;
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.01em;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.tb-ctl { display: flex; gap: 2px; }
.tb-ctl button {
  width: 28px; height: 24px; border: none; background: transparent;
  color: var(--faint); border-radius: 6px; cursor: pointer;
  display: grid; place-items: center;
}
.tb-ctl button:hover { background: var(--hover); color: var(--text-2); }

/* ---------- Top bar (client) ---------- */
.topbar {
  flex: none;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.brand-sub { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.02em; }

.tabs { display: flex; gap: 4px; margin-left: 8px; background: var(--surface-3); padding: 4px; border-radius: var(--r-md); }
.tab {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 15px;
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); font-family: var(--font); font-size: 13.5px; font-weight: 600;
  border-radius: 8px; transition: color .15s, background .15s;
}
.tab:hover { color: var(--text-2); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .tab.active { background: var(--surface-3); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; display: grid; place-items: center;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); border-color: var(--border-strong); }

/* ---------- generic controls ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.input, .select-btn {
  height: 38px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font);
  font-size: 13.5px; padding: 0 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus, .select-btn:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.mono { font-family: var(--mono); }

.btn {
  height: 38px; padding: 0 16px; border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 600; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: inline-flex; align-items: center; gap: 8px;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: var(--hover); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 1px 2px oklch(0.4 0.05 220 / .25);
}
.btn-primary:hover { background: var(--accent-2); border-color: transparent; }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); }

/* custom select */
.select { position: relative; }
.select-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer; text-align: left;
  height: 38px;
}
.select-btn .sb-main { flex: 1; min-width: 0; }
.select-btn .sb-vol { font-weight: 600; }
.select-btn .sb-cap { color: var(--muted); font-size: 12px; }
.select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); padding: 6px; overflow: hidden;
}
.select-opt {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; cursor: pointer;
}
.select-opt:hover { background: var(--hover); }
.select-opt.sel { background: var(--accent-soft); }
.vol-meter { width: 100%; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 5px; }
.vol-meter i { display: block; height: 100%; border-radius: 3px; }

/* ---------- Merged app bar (brand + controls + tabs on one row) ---------- */
.appbar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.appbar .brand { flex: none; }
.appbar-spacer { flex: 1; min-width: 0; }
/* scan bar = grid so the path field (1fr) can shrink instead of pushing tabs off-screen */
.appbar.scanbar {
  display: grid; gap: 10px; align-items: center;
  grid-template-columns: auto auto minmax(90px, 1fr) auto auto auto;
}
.appbar .input, .appbar .btn, .appbar .select-btn { height: 36px; }
.tb-vol { width: 208px; }
.tb-vol .select-btn { width: 100%; }
.tb-path { min-width: 0; }
.tb-min { position: relative; display: flex; align-items: center; }
.tb-min .input { width: 80px; padding-right: 34px; text-align: left; }
.tb-min .unit { position: absolute; right: 11px; color: var(--muted); font-size: 11.5px; font-weight: 600; pointer-events: none; }
.btn.btn-icon { width: 36px; padding: 0; justify-content: center; flex: none; }
.tb-go { white-space: nowrap; }
/* icon-only tabs inside the app bar */
.appbar .tabs { margin-left: 2px; flex: none; }
.appbar .tab { width: 38px; padding: 0; gap: 0; justify-content: center; height: 32px; }

/* ---------- Scan view ---------- */
.scan { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.path-wrap { position: relative; display: flex; }
.path-wrap .input { flex: 1; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.path-wrap .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }

.statusline {
  flex: none; display: flex; align-items: center; gap: 16px; padding: 11px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 13px;
  min-height: 46px;
}
.status-state { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.status-state.done { color: var(--success); }
.spinner {
  width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--accent-soft-2);
  border-top-color: var(--accent); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-counts { display: flex; align-items: center; gap: 7px; color: var(--text-2); }
.status-counts b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.status-counts .dot { color: var(--faint); }
.status-err {
  display: inline-flex; align-items: center; gap: 6px; color: var(--danger); flex: none;
  background: var(--danger-soft); padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.status-path { margin-left: auto; color: var(--muted); font-family: var(--mono); font-size: 11.5px;
  max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }

/* split: tree + visual panel */
.scan-body { flex: 1; min-height: 0; display: flex; }
.tree-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tree-head {
  flex: none; display: grid; grid-template-columns: 1fr 168px 96px 40px;
  gap: 10px; padding: 9px 20px 9px 18px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--border);
}
.tree-head .th-r { text-align: right; }
.tree-scroll { flex: 1; min-height: 0; overflow: auto; padding: 6px 8px 18px; }

/* tree rows */
.row {
  display: grid; grid-template-columns: 1fr 168px 96px 40px; gap: 10px; align-items: center;
  height: var(--row-h, 34px); padding: 0 10px 0 0; border-radius: 8px; cursor: default;
  position: relative;
}
.row:hover { background: var(--hover); }
.row.sel { background: var(--accent-soft); }
.row-name { display: flex; align-items: center; min-width: 0; gap: 2px; }
.caret {
  width: 22px; height: 22px; flex: none; border: none; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--faint); border-radius: 5px;
}
.caret:hover { background: oklch(0.5 0.02 255 / 0.10); color: var(--text-2); }
.caret svg { transition: transform .16s ease; }
.caret.open svg { transform: rotate(90deg); }
.caret.leaf { visibility: hidden; }
.row-ico { flex: none; display: grid; place-items: center; width: 22px; color: var(--muted); }
.row-ico.dir { color: var(--accent); }
.row-label { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; flex: 0 1 auto; min-width: 0; }
.row.is-dir .row-label { font-weight: 600; }
.row-meta { font-size: 11px; color: var(--faint); margin-left: 8px; flex: none; white-space: nowrap; }

.bar-cell { display: flex; align-items: center; }
.bar {
  width: 100%; height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; position: relative;
}
[data-theme="dark"] .bar { background: oklch(0.30 0.012 252); }
.bar i { display: block; height: 100%; border-radius: 5px; transition: width .5s cubic-bezier(.2,.7,.3,1); }
.bar.file i { opacity: 0.78; }

.size-cell { text-align: right; font-family: var(--mono); font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.size-cell .u { color: var(--muted); font-size: 11px; margin-left: 2px; }
.pct-cell { text-align: right; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.reveal {
  width: 30px; height: 28px; border: none; background: transparent; color: var(--faint);
  border-radius: 6px; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .12s;
}
.row:hover .reveal { opacity: 1; }
.reveal:hover { background: var(--surface-3); color: var(--accent); }

.row-appear { animation: rowin .35s ease both; }
@keyframes rowin { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* ---------- Visual panel (treemap) ---------- */
.viz-pane {
  flex: none; width: 420px; border-left: 1px solid var(--border); background: var(--surface-2);
  display: flex; flex-direction: column; min-height: 0;
}
.viz-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 13px 16px 10px; }
.viz-title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; }
.viz-title small { color: var(--muted); font-weight: 500; margin-left: 6px; font-family: var(--mono); }
.viz-toggle { display: flex; gap: 2px; background: var(--surface-3); border-radius: 8px; padding: 3px; }
.viz-toggle button {
  border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 5px 9px;
  border-radius: 6px; display: grid; place-items: center;
}
.viz-toggle button.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .viz-toggle button.on { background: var(--surface-2); }

.treemap-wrap { flex: 1; min-height: 0; padding: 4px 14px 12px; display: flex; }
.treemap { position: relative; flex: 1; border-radius: var(--r-md); overflow: hidden; background: var(--surface-3); }
.tm-tile {
  position: absolute; border-radius: 5px; cursor: pointer; overflow: hidden;
  border: 1.5px solid var(--surface-2); transition: filter .15s, outline .12s;
}
.tm-tile:hover { filter: brightness(1.06) saturate(1.05); z-index: 5; }
.tm-tile.active { outline: 2.5px solid var(--text); outline-offset: -2px; z-index: 6; }
.tm-label { position: absolute; left: 7px; top: 5px; right: 7px; font-size: 11px; font-weight: 700;
  color: oklch(0.22 0.03 255); text-shadow: 0 1px 0 oklch(1 0 0 / .25); pointer-events: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-sub { position: absolute; left: 7px; top: 19px; font-size: 10px; font-weight: 600; font-family: var(--mono);
  color: oklch(0.28 0.03 255 / .9); pointer-events: none; }

/* ---------- Visual panel (sunburst) ---------- */
.sunburst { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.sunburst svg { display: block; }
.sb-slice { cursor: default; stroke: var(--surface-2); stroke-width: 1; transition: filter .15s, opacity .15s; }
.sb-slice.drill { cursor: pointer; }
.sb-slice:hover { filter: brightness(1.07) saturate(1.05); }
.sb-slice.active { stroke: var(--text); stroke-width: 2; }
.sb-center { fill: var(--surface-2); }
.sb-c-name { fill: var(--text); font-size: 12px; font-weight: 700; font-family: var(--font); }
.sb-c-size { fill: var(--muted); font-size: 11px; font-family: var(--mono); }

.viz-foot { flex: none; padding: 10px 16px 14px; border-top: 1px solid var(--border); }
.legend { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--muted); }
.legend .grad { flex: 1; height: 8px; border-radius: 5px;
  background: linear-gradient(90deg,
    oklch(0.72 0.09 224), oklch(0.76 0.12 192), oklch(0.81 0.14 142),
    oklch(0.85 0.15 96), oklch(0.77 0.17 58), oklch(0.66 0.21 28)); }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 11.5px; margin-bottom: 9px; }
.crumb { color: var(--accent); cursor: pointer; font-weight: 600; font-family: var(--mono); padding: 2px 5px; border-radius: 5px; }
.crumb:hover { background: var(--accent-soft); }
.crumb.cur { color: var(--text-2); cursor: default; }
.crumb-sep { color: var(--faint); }

/* ---------- Empty / scanning placeholder ---------- */
.empty { flex: 1; display: grid; place-items: center; padding: 40px; }
.empty-inner { text-align: center; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty-glyph { width: 92px; height: 92px; display: grid; place-items: center; border-radius: var(--r-xl);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--accent); box-shadow: var(--shadow-sm); }
.empty h3 { margin: 4px 0 0; font-size: 17px; font-weight: 700; white-space: nowrap; }
.empty p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- Settings ---------- */
.settings-scroll { height: 100%; overflow: auto; padding: 28px 24px 60px; }
.settings { max-width: 768px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.settings-h { display: flex; align-items: baseline; gap: 12px; margin: 4px 2px 2px; flex-wrap: wrap; }
.settings-h h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.settings-h p { color: var(--muted); font-size: 13.5px; margin: 0; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-h { display: flex; align-items: center; gap: 11px; padding: 16px 20px 0; }
.card-h .ci { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; flex: none; }
.card-h h2 { font-size: 15px; font-weight: 700; margin: 0; }
.card-h p { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.card-b { padding: 16px 20px 20px; }
.card.muted { background: var(--surface-2); box-shadow: none; }

.row-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--border); }
.row-line:first-child { border-top: none; }
.row-line .rl-main { min-width: 0; }
.row-line .rl-title { font-size: 13.5px; font-weight: 600; }
.row-line .rl-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.row-line .rl-val { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }

.pill {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px; border-radius: 30px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.pill.ok { background: var(--success-soft); color: var(--success); border: 1px solid var(--success-border); }
.pill.warn { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }

/* license activated banner */
.lic-active {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-md);
  background: linear-gradient(120deg, var(--success-soft), transparent);
  border: 1px solid var(--success-border);
}
.lic-active .lic-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--success); color: #fff;
  display: grid; place-items: center; flex: none; }
.lic-active .lic-t { font-weight: 700; font-size: 14.5px; }
.lic-active .lic-s { font-size: 12.5px; color: var(--text-2); }

/* pro upsell */
.upsell { display: flex; gap: 16px; align-items: stretch; }
.upsell .up-main { flex: 1; }
.upsell .up-key { display: flex; gap: 8px; margin-top: 12px; }
.upsell .up-key .input { flex: 1; font-family: var(--mono); }
.feat { display: flex; flex-direction: column; gap: 9px; margin: 14px 0 2px; }
.feat li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); list-style: none; }
.feat li .fk { color: var(--success); display: grid; place-items: center; }
.feat { padding: 0; }
.pro-aside {
  width: 184px; flex: none; border-radius: var(--r-md); padding: 18px; color: #fff;
  background: linear-gradient(155deg, var(--accent), var(--accent-2));
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.pro-aside .pa-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: .85; }
.pro-aside .pa-price { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.pro-aside .pa-price small { font-size: 13px; font-weight: 600; opacity: .85; }

.checkrow { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.check {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong);
  display: grid; place-items: center; cursor: pointer; flex: none; color: transparent; background: var(--surface);
  transition: background .12s, border-color .12s;
}
.check.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vol-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.vol-row:first-child { border-top: none; }
.vol-row .vr-name { font-weight: 600; font-family: var(--mono); font-size: 13px; }
.vol-row .vr-size { color: var(--muted); font-size: 12.5px; margin-left: auto; font-family: var(--mono); }

.save-bar { display: flex; align-items: center; gap: 12px; }
.saved-msg { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 13px; font-weight: 600;
  opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.saved-msg.show { opacity: 1; transform: none; }

/* scrollbars */
.tree-scroll::-webkit-scrollbar, .settings-scroll::-webkit-scrollbar, .select-menu::-webkit-scrollbar { width: 11px; height: 11px; }
.tree-scroll::-webkit-scrollbar-thumb, .settings-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
.tree-scroll::-webkit-scrollbar-thumb:hover, .settings-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; }

/* responsive — the visualization panel must NEVER auto-hide; it only narrows */
@media (max-width: 1100px) {
  .viz-pane { width: 340px; }
  .tb-vol { width: 168px; }
}
@media (max-width: 920px) {
  .viz-pane { width: 290px; }
  .appbar.scanbar .tb-vol { display: none; }
}
