:root {
  /* Calm utility palette — warm-tinted near-whites, near-black ink */
  --bg:        oklch(98.4% 0.004 95);
  --bg-2:      oklch(96.8% 0.005 95);
  --bg-3:      oklch(94.5% 0.006 95);
  --ink:       oklch(22% 0.01 95);
  --ink-2:     oklch(38% 0.01 95);
  --ink-3:     oklch(56% 0.008 95);
  --ink-4:     oklch(72% 0.006 95);
  --line:      oklch(90% 0.006 95);
  --line-2:    oklch(85% 0.008 95);
  --accent:    oklch(58% 0.13 155);   /* calm forest green */
  --accent-2:  oklch(52% 0.13 155);
  --accent-soft: oklch(94% 0.04 155);
  --warn:      oklch(60% 0.14 50);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 0 rgba(20,20,15,0.04), 0 1px 2px rgba(20,20,15,0.04);
  --shadow-md: 0 1px 0 rgba(20,20,15,0.04), 0 6px 20px -8px rgba(20,20,15,0.10);
  --row-h: 64px;
  --pad: 16px;
  --font-sans: "Inter", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
main { display: block; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
button { font-family: inherit; }
a { color: inherit; }

/* Tools dropdown (uses native <details>) */
.tools-dropdown { position: relative; }
.tools-dropdown > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
}
.tools-dropdown > summary::-webkit-details-marker { display: none; }
.tools-dropdown > summary:hover { color: var(--accent); }
.tools-dropdown[open] > summary { color: var(--accent); }

.tools-dropdown .dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 12px);
  min-width: 220px;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  z-index: 70;
}

.tools-dropdown .dropdown-section {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tools-dropdown .dropdown-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 8px;
}
.tools-dropdown .dropdown-menu a:hover { background: var(--bg-3); color: var(--ink); }
.tools-dropdown .dropdown-menu a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--bg-3); }

/* Desktop hover support for dropdowns */
@media (min-width: 768px) {
  .tools-dropdown:hover > summary { color: var(--accent); }
  .tools-dropdown:hover .dropdown-menu { display: flex; }
  .tools-dropdown:not([open]) .dropdown-menu { display: none; }
  .tools-dropdown:hover:not([open]) .dropdown-menu { display: flex; }
}

@media (max-width: 767px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .topnav { width: 100%; justify-content: space-between; gap: 12px; }
  .tools-dropdown .dropdown-menu { position: static; box-shadow: none; border: none; padding: 0 0 0 12px; min-width: 0; width: 100%; margin-top: 8px; }
}

.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.num  { font-variant-numeric: tabular-nums; }

/* ===== Tool Hub / Directory ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0 60px;
}
.tool-item {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.tool-item:hover {
  background: var(--bg-3);
  border-color: var(--line-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.tool-item.is-planned {
  color: var(--ink-3);
  cursor: default;
  opacity: 0.78;
}
.tool-item.is-planned:hover {
  background: var(--bg-2);
  border-color: var(--line);
  transform: none;
  box-shadow: none;
}
.tool-status {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.meta-preview-stack {
  display: grid;
  gap: 14px;
}
.meta-preview-card {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.google-preview h3 {
  margin: 4px 0;
  color: #1a0dab;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}
.google-preview p,
.meta-social-body p {
  margin: 0;
  color: var(--ink-2);
}
.meta-url-line,
.meta-social-body small,
.meta-social-body span {
  color: var(--accent-2);
  font-size: 13px;
}
.social-preview {
  display: grid;
  grid-template-columns: minmax(96px, 32%) 1fr;
  gap: 14px;
  align-items: stretch;
}
.meta-image-box {
  min-height: 112px;
  display: grid;
  place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-4);
  font-weight: 700;
}
.meta-image-box img {
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
  border-radius: 8px;
}
.meta-social-body h3 {
  margin: 4px 0;
  font-size: 16px;
  line-height: 1.3;
}
@media (max-width: 640px) {
  .social-preview { grid-template-columns: 1fr; }
}
.tool-item .icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--bg);
  display: grid; place-items: center;
  margin-bottom: 16px;
  color: var(--accent);
  border: 1px solid var(--line);
}
.tool-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.tool-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

.category-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 48px 0 16px;
}
.category-title:first-child { margin-top: 0; }

/* ===== Related Tools ===== */
.related-tools {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.related-tools h2 { font-size: 20px; font-weight: 700; margin-bottom: 24px; }
.related-tools .tool-grid { margin-bottom: 0; }

/* ===== App shell ===== */
.app {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 28px 80px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover .word { color: var(--ink-2); }
.brand .mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px;
  letter-spacing: 0;
}
.brand .mark::after { content: "CU"; }
.brand .word { color: var(--ink); }
.brand .word b { font-weight: 700; }
.brand .word span { color: var(--ink-3); font-weight: 500; }

.topnav {
  display: flex; gap: 22px; align-items: center;
  color: var(--ink-3); font-size: 13.5px;
}
.topnav a { text-decoration: none; }
.topnav a:hover { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  background: var(--accent-soft);
  color: var(--accent-2);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 25%, transparent);
}

/* Language switcher (uses native <details>) */
.lang-switcher { position: relative; }
.lang-switcher > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  user-select: none;
}
.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-switcher > summary:hover { color: var(--ink); border-color: var(--line-2); }
.lang-switcher[open] > summary { color: var(--ink); border-color: var(--line-2); }
.lang-switcher .lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 180px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  z-index: 60;
}
.lang-switcher .lang-menu a {
  display: block;
  padding: 7px 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 6px;
}
.lang-switcher .lang-menu a:hover { background: var(--bg-3); color: var(--ink); }
.lang-switcher .lang-menu a[aria-current="page"] { color: var(--ink); font-weight: 600; background: var(--bg-3); }

/* ===== Hero line ===== */
.hero {
  display: flex; align-items: baseline; gap: 14px;
  margin: 8px 0 22px;
  flex-wrap: wrap;
}
.hero .hero-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin: 0;
  color: var(--ink);
  line-height: 1.1;
}
.hero .sub,
.hero .hero-sub {
  margin: 0;
  color: var(--ink-3);
  font-size: 14.5px;
}
.hero .sub b,
.hero .hero-sub b { color: var(--ink); font-weight: 600; }

/* Brand wordmark (h1) reset */
.brand .word {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Anchor sections */
.section-block { margin-top: 28px; }
.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
}
.section-body {
  color: var(--ink-2);
  font-size: 14px;
  margin: 0 0 6px;
  max-width: 780px;
}
.section-body b { color: var(--ink); font-weight: 600; }

/* Article-style content sections */
.article {
  max-width: 780px;
  margin: 36px 0 0;
  scroll-margin-top: 24px;
}
.article h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.25;
}
.article h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 22px 0 6px;
  line-height: 1.3;
}
.article p {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 12px;
  max-width: 780px;
}
.article p b { color: var(--ink); font-weight: 600; }
.article a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.article a:hover { color: var(--accent); }
.article-wide {
  margin: 34px 0 0;
  scroll-margin-top: 24px;
}

/* ===== Layout: converter + rail ===== */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.grid.no-rail { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr; }
  .rail { order: 2; }
}

/* ===== Converter card ===== */
.converter {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ===== Simple background remover ===== */
.bg-tool {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.bg-tool-head {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.bg-tool-head h2 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin: 0 0 8px;
}
.bg-tool-head p:not(.section-eyebrow) {
  max-width: 760px;
  color: var(--ink-2);
  margin: 0;
}
.bg-badges {
  display: flex;
  align-content: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 180px;
}
.bg-badges span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklch, var(--accent) 25%, var(--line));
  border-radius: 999px;
  padding: 4px 8px;
}
.bg-workbench {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}
.bg-drop {
  min-height: 320px;
  border: 1.5px dashed var(--line-2);
  border-radius: 12px;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, color-mix(in oklch, var(--ink) 2%, transparent) 14px 15px);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  cursor: pointer;
  padding: 22px;
}
.bg-drop:hover,
.bg-drop.drag {
  border-color: var(--accent);
  background-color: var(--bg);
}
.bg-drop .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  margin: 0 auto 14px;
  color: var(--ink-2);
}
.bg-drop .title {
  font-size: 17px;
  font-weight: 600;
}
.bg-drop .hint {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 13px;
}
.bg-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bg-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.bg-preview-card {
  min-width: 0;
}
.bg-preview-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.bg-preview {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--ink-4);
  font-size: 13px;
}
.bg-preview.checker {
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, var(--bg-3) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-3) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-3) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-3) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.bg-preview img,
.bg-preview canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.bg-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.range-field {
  display: inline-grid;
  grid-template-columns: auto minmax(120px, 1fr) 32px;
  gap: 8px;
  align-items: center;
  color: var(--ink-3);
  font-size: 13px;
}
.range-field input {
  accent-color: var(--accent);
}
.bg-status {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}
@media (max-width: 760px) {
  .bg-tool-head,
  .bg-workbench,
  .bg-preview-grid {
    grid-template-columns: 1fr;
  }
  .bg-tool-head {
    flex-direction: column;
  }
  .bg-badges {
    justify-content: flex-start;
    min-width: 0;
  }
  .bg-drop {
    min-height: 220px;
  }
  .range-field {
    width: 100%;
  }
}

/* Settings strip */
.settings {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.seg button {
  appearance: none; border: 0; background: transparent;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.field {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.field label { color: var(--ink-3); }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5l3 3 3-3' stroke='%23999' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.field select:hover { border-color: var(--line-2); }
.field.disabled { opacity: 0.4; pointer-events: none; }
.spacer { flex: 1; }

/* Dropzone */
.dropzone {
  position: relative;
  margin: 18px;
  min-height: 280px;
  border: 1.5px dashed var(--line-2);
  border-radius: 12px;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, color-mix(in oklch, var(--ink) 2%, transparent) 14px 15px);
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s;
  padding: 28px;
}
.dropzone:hover { border-color: var(--accent); background-color: var(--bg); }
.dropzone.drag {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  transform: scale(1.005);
}
.dropzone .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  margin: 0 auto 14px;
  color: var(--ink-2);
}
.dropzone .title {
  font-size: 18px; font-weight: 600; color: var(--ink);
  margin-bottom: 4px;
}
.dropzone .hint { color: var(--ink-3); font-size: 13.5px; }
.dropzone .types {
  margin-top: 16px;
  display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.dropzone .types span {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-3);
}
.dropzone .note {
  margin: 14px auto 0;
  max-width: 420px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.55;
}

/* Privacy strip */
.privacy {
  display: flex; align-items: center; justify-content: center;
  gap: 24px;
  padding: 10px 18px 18px;
  color: var(--ink-3);
  font-size: 12.5px;
  flex-wrap: wrap;
}
.privacy .item { display: inline-flex; align-items: center; gap: 7px; }
.privacy .item svg { color: var(--accent); }

/* Action bar (after files added) */
.actionbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  flex-wrap: wrap;
}
.summary {
  display: flex; align-items: baseline; gap: 12px;
  color: var(--ink-2);
  font-size: 13px;
}
.summary .count {
  font-weight: 600; color: var(--ink); font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.summary .savings {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 12.5px;
}
.btn {
  appearance: none; border: 0;
  padding: 9px 14px;
  font: inherit; font-size: 13.5px; font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .12s, color .12s, border-color .12s, transform .05s;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--ink-2); }
.btn-primary:disabled { background: var(--ink-4); cursor: not-allowed; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover:not(:disabled) { background: var(--accent-2); }
.btn-accent:disabled { background: var(--ink-4); cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--line-2); }
.btn-text { background: transparent; color: var(--ink-3); padding: 9px 8px; }
.btn-text:hover { color: var(--warn); }

/* ===== Results: list ===== */
.results { padding: 0; }
.row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.4fr) 88px 20px 88px 80px 110px minmax(150px, auto);
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  min-height: var(--row-h);
}
.row.head {
  padding-top: 8px; padding-bottom: 8px;
  background: var(--bg-3);
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 0;
}
.row .thumb {
  width: 40px; height: 40px;
  border-radius: 6px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
}
.row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .thumb .ext {
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  text-transform: uppercase;
}
.row .name {
  min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.row .name .fn {
  font-size: 13.5px; color: var(--ink); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row .name .meta {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
}
.row .size {
  font-family: var(--font-mono); font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.row .size.before { color: var(--ink-3); }
.row .size.after { color: var(--ink); font-weight: 500; }
.row .arrow { color: var(--ink-4); }
.row .save {
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.row .save.zero { color: var(--ink-4); font-weight: 500; }
.row .status {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 6px;
}
.row .status .stdot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4);
}
.row .status.ready .stdot { background: var(--ink-4); }
.row .status.busy .stdot {
  background: var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
}
.row .status.done .stdot { background: var(--accent); }
.row .status.err .stdot { background: var(--warn); }
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
.row .actions {
  display: inline-flex; gap: 6px; justify-content: flex-end;
}
.row .actions .iconbtn {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .12s, color .12s, border-color .12s;
}
.row .actions .iconbtn:hover { color: var(--ink); border-color: var(--line-2); }
.row .actions .iconbtn.danger:hover { color: var(--warn); border-color: var(--warn); }
.row .actions .dlbtn {
  padding: 7px 10px; border-radius: 6px;
  background: var(--accent); color: white;
  border: 0; font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.row .actions .dlbtn:hover:not(:disabled) { background: var(--accent-2); }
.row .actions .dlbtn:disabled { cursor: default; }
.row .actions .dlbtn.done { background: var(--bg-3); color: var(--ink-3); cursor: default; }

/* ===== Grid view ===== */
.gridview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding: 16px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.card .imgwrap {
  aspect-ratio: 4/3;
  background: var(--bg-3);
  display: grid; place-items: center;
  overflow: hidden;
  color: var(--ink-4);
}
.card .imgwrap img { width: 100%; height: 100%; object-fit: cover; }
.card .info {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.card .info .fn {
  font-size: 13px; color: var(--ink); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .info .meta {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3);
  display: flex; justify-content: space-between; align-items: center;
}
.card .info .meta .save { color: var(--accent-2); font-weight: 600; }
.card .info .actions { display: flex; gap: 6px; margin-top: 8px; }
.card .info .actions .dlbtn {
  flex: 1; padding: 7px; border-radius: 6px;
  background: var(--accent); color: white;
  border: 0; font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.card .info .actions .dlbtn:hover:not(:disabled) { background: var(--accent-2); }
.card .info .actions .dlbtn:disabled { cursor: default; opacity: .9; }
.card .info .actions .dlbtn.done { background: var(--bg-3); color: var(--ink-3); cursor: default; }
.card .remove {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: white; border: 0;
  cursor: pointer; opacity: 0; transition: opacity .15s;
  font-size: 14px; line-height: 1;
}
.card:hover .remove { opacity: 1; }

/* ===== Right rail ===== */
.rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.rail-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.rail-card h3 {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 10px;
}
.rail-card .stat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
}
.rail-card .stat:last-child { border-bottom: 0; }
.rail-card .stat .k { color: var(--ink-3); }
.rail-card .stat .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.rail-card .stat .v.green { color: var(--accent-2); font-weight: 600; }

.ad-slot {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  position: relative;
}
.ad-slot .ad-label {
  position: absolute; top: 8px; right: 12px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ad-slot .ad-body {
  min-height: 240px;
  border-radius: 8px;
  background: var(--bg-3);
  display: grid; place-items: center;
  overflow: hidden;
}
.ad-slot .ad-body ins.adsbygoogle {
  display: block;
  width: 100%;
  min-height: 240px;
}
.ad-slot .ad-foot {
  margin-top: 8px;
  font-size: 11px; color: var(--ink-4);
  display: flex; justify-content: space-between; align-items: center;
}
.ad-slot .ad-foot a { color: var(--ink-3); text-decoration: none; }
.ad-slot .ad-foot a:hover { color: var(--ink); }

/* In-content + footer banner ad units */
.banner-ad,
.footer-ad {
  position: relative;
  margin: 16px;
  padding: 14px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 110px;
  display: grid;
  place-items: center;
}
.banner-ad .ad-label,
.footer-ad .ad-label {
  position: absolute; top: 6px; right: 10px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.banner-ad ins.adsbygoogle,
.footer-ad ins.adsbygoogle {
  display: block; width: 100%; min-height: 90px;
}
.footer-ad {
  margin: 28px 0 0;
}

/* trust card */
.trust .item {
  display: flex; gap: 10px; padding: 8px 0;
  align-items: flex-start;
  font-size: 13px;
  color: var(--ink-2);
}
.trust .item:first-child { padding-top: 0; }
.trust .item:last-child { padding-bottom: 0; }
.trust .item svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.trust .item b { color: var(--ink); font-weight: 600; }

/* ===== Footer ===== */
.footer {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--ink-3);
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer .links { display: flex; gap: 14px 18px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* drag overlay */
.drag-overlay {
  position: fixed; inset: 0;
  background: color-mix(in oklch, var(--accent) 25%, transparent);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  z-index: 9999;
  pointer-events: none;
  opacity: 0; transition: opacity .15s;
}
.drag-overlay.active { opacity: 1; }
.drag-overlay .box {
  padding: 36px 56px;
  background: var(--bg);
  border: 2px dashed var(--accent);
  border-radius: 16px;
  font-size: 22px; font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-md);
}
.drag-overlay .box .sub {
  display: block; margin-top: 6px;
  font-size: 13px; color: var(--ink-3); font-weight: 400;
}

.hidden { display: none !important; }

/* ===== Guide Content Styles ===== */
.guide-content { max-width: 800px; margin: 0 auto; line-height: 1.6; }
.comparison-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.comparison-table th, .comparison-table td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.comparison-table th { background: var(--paper); font-weight: 600; }
.pros-cons-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin: 24px 0; }
.pc-block { background: var(--paper); padding: 20px; border-radius: 12px; border: 1px solid var(--line); }
.pc-block h3 { margin-top: 0; font-size: 16px; margin-bottom: 12px; }
.pc-block ul { list-style: none; padding: 0; margin: 0; }
.pc-block li { margin-bottom: 8px; font-size: 14px; }
.CTA { background: color-mix(in oklch, var(--accent) 5%, var(--paper)); padding: 24px; border-radius: 12px; border: 1px solid var(--accent); margin-top: 40px; }
.CTA p { margin-bottom: 0; font-weight: 500; }
