/* =========================================================================
   WebP Converter — application styles
   Layered on top of Bootstrap 5 utilities/grid.
   ========================================================================= */

:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --success: #16a34a;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --amber: #d97706;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --surface: #ffffff;
  --canvas: #f8fafc;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, .07), 0 10px 20px -8px rgba(15, 23, 42, .12);
  --shadow-lg: 0 20px 45px -20px rgba(15, 23, 42, .28);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.2; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

.container { max-width: 1140px; }
.container-narrow { max-width: 820px; }

/* Focus visibility everywhere -------------------------------------------- */
:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .55);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* Header ------------------------------------------------------------------ */
.site-header {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 60;
}
.site-header .container { min-height: 68px; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #6366f1);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.brand-text { font-size: 1.075rem; letter-spacing: -.01em; }

.header-nav { display: flex; gap: 1.5rem; }
.header-nav a { color: var(--ink-2); font-weight: 500; font-size: .94rem; }
.header-nav a:hover { color: var(--brand); text-decoration: none; }
@media (max-width: 767.98px) { .header-nav { display: none; } }

/* Hero -------------------------------------------------------------------- */
.hero {
  padding: 3.25rem 0 3rem;
  background:
    radial-gradient(1100px 380px at 50% -120px, rgba(37, 99, 235, .13), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--canvas) 100%);
}
.hero-copy { text-align: center; max-width: 760px; margin: 0 auto 2.25rem; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: .35rem .85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.95rem, 5.2vw, 3.05rem);
  letter-spacing: -.025em;
  margin-bottom: .85rem;
}
.hero .lead { font-size: clamp(1rem, 2.4vw, 1.175rem); color: var(--muted); margin-bottom: 1.25rem; }

.hero-badges {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
}
.hero-badges li {
  font-size: .84rem; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line);
  padding: .35rem .8rem; border-radius: 999px; box-shadow: var(--shadow-sm);
}
.hero-badges li::before { content: "✓"; color: var(--success); font-weight: 800; margin-right: .35rem; }

.server-alert { max-width: 900px; margin: 0 auto 1.5rem; border-radius: var(--radius); }

/* Converter card ---------------------------------------------------------- */
.converter-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1rem, 3vw, 1.75rem);
}

/* Dropzone ---------------------------------------------------------------- */
.dropzone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfdff, #f6f9ff);
  padding: clamp(1.75rem, 5vw, 3.25rem) 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: scale(1.005);
  box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .12);
}
.dropzone.is-compact { padding: 1.25rem; }

.upload-icon {
  display: grid; place-items: center;
  width: 84px; height: 84px; margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}
.dropzone.is-compact .upload-icon { width: 52px; height: 52px; }
.dropzone.is-compact .upload-icon svg { width: 30px; height: 30px; }

.dropzone-title { font-size: clamp(1.1rem, 3vw, 1.4rem); font-weight: 700; color: var(--ink); margin-bottom: .35rem; }
.dropzone-sub { color: var(--muted); margin-bottom: .85rem; font-size: .9rem; }
.dropzone-meta { color: var(--muted); font-size: .875rem; margin: 1rem 0 0; line-height: 1.7; }
.dropzone.is-compact .dropzone-title,
.dropzone.is-compact .dropzone-sub,
.dropzone.is-compact .dropzone-meta { display: none; }

/* Options ----------------------------------------------------------------- */
.options-panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.options-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.75rem;
}
@media (max-width: 767.98px) { .options-row { grid-template-columns: 1fr; gap: 1.25rem; } }

.preset-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.preset-group legend,
.quality-group .form-label > span:first-child {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); margin-bottom: .6rem; float: none;
}
.preset-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.preset-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  min-height: 42px;
  cursor: pointer;
  transition: all .16s ease;
}
.preset-btn:hover { border-color: var(--brand); color: var(--brand); }
.preset-btn.is-active {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .6);
}

.quality-badge {
  background: var(--brand-soft); color: var(--brand);
  font-weight: 800; font-size: .95rem;
  padding: .15rem .7rem; border-radius: 999px;
  min-width: 3.1rem; text-align: center;
}
.form-range { accent-color: var(--brand); }
.form-range::-webkit-slider-thumb { background: var(--brand); }
.form-range::-moz-range-thumb { background: var(--brand); }
.range-scale {
  display: flex; justify-content: space-between;
  font-size: .75rem; color: var(--muted); margin-top: .15rem;
}
.hint { font-size: .82rem; color: var(--muted); margin: .5rem 0 0; }

.resize-panel {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  background: var(--line-soft);
}
.resize-panel summary { font-weight: 600; color: var(--ink); cursor: pointer; }
.optional-tag {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  background: #fff; border: 1px solid var(--line); color: var(--muted);
  padding: .1rem .45rem; border-radius: 999px; margin-left: .4rem;
}
.resize-grid {
  display: grid; gap: 1rem; margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.resize-checks { display: flex; flex-direction: column; justify-content: flex-end; gap: .25rem; }

.actions-row {
  display: flex; flex-wrap: wrap; gap: .75rem;
  align-items: center; margin-top: 1.5rem;
}
.btn { border-radius: var(--radius-sm); font-weight: 600; }
.btn-lg { min-height: 50px; padding-inline: 1.5rem; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-convert { flex: 1 1 240px; box-shadow: 0 8px 20px -10px rgba(37, 99, 235, .9); }
.btn-clear { color: var(--muted); }
.btn-clear:hover { color: var(--danger); }
@media (max-width: 575.98px) {
  .actions-row .btn { width: 100%; }
  .btn-convert { flex: 1 1 100%; }
}

/* Batch summary ----------------------------------------------------------- */
.batch-summary {
  margin-top: 1.5rem;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, var(--success-soft), #fff);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  align-items: center; justify-content: space-between;
  animation: pop-in .35s ease;
}
.summary-stats {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  flex: 1 1 420px;
}
.summary-stat { text-align: center; }
.summary-stat .stat-value { display: block; font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.summary-stat .stat-label { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.summary-stat.is-highlight .stat-value { color: var(--success); font-size: 1.6rem; }
.summary-actions { flex: 0 0 auto; }
@media (max-width: 575.98px) { .summary-actions, .summary-actions .btn { width: 100%; } }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.global-error { margin-top: 1.25rem; border-radius: var(--radius-sm); }

/* Queue cards ------------------------------------------------------------- */
.queue { display: grid; gap: 1rem; margin-top: 1.5rem; }

.file-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  animation: pop-in .3s ease;
}
.file-card.is-done { border-color: #bbf7d0; }
.file-card.is-error { border-color: #fecaca; background: var(--danger-soft); }

.thumb {
  width: 96px; height: 96px;
  border-radius: 12px; overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  position: relative;
  /* Checkerboard so PNG transparency is visible */
  background-image:
    linear-gradient(45deg, #e9eef5 25%, transparent 25%),
    linear-gradient(-45deg, #e9eef5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e9eef5 75%),
    linear-gradient(-45deg, transparent 75%, #e9eef5 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb button {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; background: transparent; cursor: zoom-in; padding: 0;
}
.thumb .zoom-hint {
  position: absolute; inset: auto 0 0 0;
  background: rgba(15, 23, 42, .72); color: #fff;
  font-size: .68rem; padding: .15rem; text-align: center;
  opacity: 0; transition: opacity .15s ease;
}
.thumb:hover .zoom-hint, .thumb button:focus-visible + .zoom-hint { opacity: 1; }

.file-body { min-width: 0; }
.file-name {
  font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: .2rem;
}
.file-meta { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .35rem .75rem; }
.file-meta .chip {
  background: var(--line-soft); border-radius: 6px; padding: .05rem .45rem; font-weight: 600; color: var(--ink-2);
}

.size-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem;
  margin-top: .6rem; font-size: .95rem;
}
.size-orig { color: var(--muted); text-decoration: line-through; }
.size-arrow { color: var(--muted); }
.size-new { font-weight: 800; color: var(--ink); }
.reduction {
  font-weight: 800; font-size: .82rem;
  background: var(--success-soft); color: var(--success);
  border: 1px solid #bbf7d0; padding: .1rem .55rem; border-radius: 999px;
}
.reduction.is-negative { background: #fff7ed; color: var(--amber); border-color: #fed7aa; }

.progress-wrap { margin-top: .65rem; }
.progress { height: 6px; border-radius: 999px; background: var(--line-soft); }
.progress-bar { background: var(--brand); transition: width .25s ease; }

.status {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: #fff;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.is-waiting { color: var(--muted); }
.status.is-processing { color: var(--brand); border-color: #bfdbfe; background: var(--brand-soft); }
.status.is-processing::before { animation: pulse 1s ease-in-out infinite; }
.status.is-completed { color: var(--success); border-color: #bbf7d0; background: var(--success-soft); }
.status.is-failed { color: var(--danger); border-color: #fecaca; background: var(--danger-soft); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.file-actions { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
.file-actions .btn { white-space: nowrap; font-size: .85rem; }

.file-error { color: var(--danger); font-size: .85rem; margin-top: .4rem; font-weight: 600; }

@media (max-width: 767.98px) {
  .file-card { grid-template-columns: 72px minmax(0, 1fr); }
  .thumb { width: 72px; height: 72px; }
  .file-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .file-actions .btn { flex: 1 1 auto; min-height: 44px; }
}

/* Sections ---------------------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 4.75rem) 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(2rem, 4vw, 2.75rem); }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); letter-spacing: -.02em; margin-bottom: .6rem; }
.section-head p { color: var(--muted); margin: 0; }

.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step;
}
.steps li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.25rem; box-shadow: var(--shadow-sm); position: relative;
}
.section-alt .steps li { background: var(--canvas); }
.step-num {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand); color: #fff;
  font-weight: 800; margin-bottom: .9rem;
}
.steps h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.steps p { margin: 0; font-size: .9rem; color: var(--muted); }

.benefit-grid, .feature-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.benefit {
  border-left: 3px solid var(--brand);
  padding: .25rem 0 .25rem 1.1rem;
}
.benefit h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.benefit p { margin: 0; font-size: .92rem; color: var(--muted); }

.feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.25rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-card h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.feature-card p { margin: 0; font-size: .9rem; color: var(--muted); }
.feature-icon {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  margin-bottom: .9rem; font-size: 1.35rem; line-height: 1;
}
.feature-icon[data-icon="gift"]::before     { content: "🎁"; }
.feature-icon[data-icon="layers"]::before   { content: "🗂️"; }
.feature-icon[data-icon="compress"]::before { content: "📉"; }
.feature-icon[data-icon="sliders"]::before  { content: "🎚️"; }
.feature-icon[data-icon="bolt"]::before     { content: "⚡"; }
.feature-icon[data-icon="shield"]::before   { content: "🛡️"; }
.feature-icon[data-icon="trash"]::before    { content: "🧹"; }
.feature-icon[data-icon="mobile"]::before   { content: "📱"; }

/* FAQ --------------------------------------------------------------------- */
.accordion-item { border: 1px solid var(--line); border-radius: var(--radius-sm) !important; margin-bottom: .75rem; overflow: hidden; }
.accordion-button { font-weight: 600; color: var(--ink); background: #fff; }
.accordion-button:not(.collapsed) { background: var(--brand-soft); color: var(--brand-dark); box-shadow: none; }
.accordion-button:focus { box-shadow: none; }
.accordion-body { color: var(--muted); font-size: .95rem; }

/* Ads --------------------------------------------------------------------- */
.ad-slot { margin: 1.5rem auto; text-align: center; min-height: 0; }
.ad-slot:empty { display: none; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 3rem 0 1.75rem; }
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  margin-bottom: 2rem;
}
@media (max-width: 767.98px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.1rem; margin-bottom: .5rem; }
.footer-note { font-size: .9rem; color: #94a3b8; max-width: 40ch; margin: 0; }
.footer-heading { font-weight: 700; color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; }
.site-footer nav a { display: block; color: #cbd5e1; font-size: .9rem; padding: .2rem 0; }
.site-footer nav a:hover { color: #fff; }
.footer-legal { border-top: 1px solid #1e293b; padding-top: 1.25rem; margin: 0; font-size: .84rem; color: #94a3b8; }

/* Preview modal ----------------------------------------------------------- */
.preview-modal { position: fixed; inset: 0; z-index: 1080; display: grid; place-items: center; padding: 1rem; }
.preview-modal[hidden] { display: none; }
.preview-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .72); backdrop-filter: blur(2px); }
.preview-dialog {
  position: relative; z-index: 1;
  background: #fff; border-radius: var(--radius-lg);
  width: min(960px, 100%); max-height: 92vh; overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: pop-in .22s ease;
}
.preview-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.preview-title { font-size: 1.05rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-close {
  border: 0; background: var(--line-soft); color: var(--ink);
  width: 38px; height: 38px; border-radius: 10px; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.preview-close:hover { background: var(--line); }
.preview-body { padding: 1.25rem; }

.compare {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  background-image:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  user-select: none; touch-action: pan-y;
}
/* Both images occupy exactly the same box and letterbox identically, so the
   two halves line up at any split position and at any zoom level. */
.compare img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
  transform-origin: center center;
}
.compare-after {
  position: absolute; inset: 0; overflow: hidden;
  /* Clipping (rather than resizing) keeps the inner image at full size. */
  clip-path: inset(0 50% 0 0);
}
.compare-after img { width: 100%; height: 100%; }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 40px; margin-left: -20px; cursor: ew-resize;
  display: grid; place-items: center;
}
.compare-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px; background: #fff;
  box-shadow: 0 0 4px rgba(15, 23, 42, .45);
}
.compare-handle span {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 10px rgba(15, 23, 42, .35);
  display: grid; place-items: center;
}
.compare-handle span::before { content: "⇔"; color: var(--brand); font-weight: 800; }
.compare-tag {
  position: absolute; top: .6rem;
  background: rgba(15, 23, 42, .72); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  padding: .18rem .6rem; border-radius: 999px; pointer-events: none;
}
.compare-tag-left { left: .6rem; }
.compare-tag-right { right: .6rem; }

.preview-zoom { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.preview-zoom label { font-weight: 600; font-size: .85rem; color: var(--muted); margin: 0; }
.preview-zoom .form-range { flex: 1 1 160px; width: auto; }
.preview-zoom output { font-weight: 700; min-width: 3.5rem; }

.preview-stats {
  display: grid; gap: .75rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 1.25rem 0 0; padding: 1rem;
  background: var(--line-soft); border-radius: var(--radius-sm);
}
.preview-stats dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.preview-stats dd { margin: 0; font-weight: 700; color: var(--ink); }
.preview-stats dd.is-good { color: var(--success); }

body.modal-locked { overflow: hidden; }
