/* Wide layout for the image compressor and the WhatsApp preset page (class cimg-wide). */

body:has(.cimg-wide) .cimg-page {
  --ci-blue: #2563eb;
  --ci-blue-2: #1d4ed8;
  --ci-soft: #eff6ff;
  --ci-drop: #f7faff;
  --ci-green: #16a34a;
  --ci-card: #fff;
  --ci-field: #fff;
  --ci-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 18px rgba(15, 23, 42, 0.04);
}
.cimg-page .cimg-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Left aside ---------- */
@media (min-width: 1100px) {
  body:has(.cimg-wide) .cimg-page { --cv-aside: clamp(240px, 19vw, 300px); }
}
body:has(.cimg-wide) .cimg-page .conv-title {
  font-size: clamp(1.8rem, 2.9vw, 2.75rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
  hyphens: manual;
  word-break: normal;
  overflow-wrap: normal;
}
body:has(.cimg-wide) .article .cimg-page .conv-lede {
  margin-bottom: 22px;
  color: #4f63b8;
  font-size: 1.12rem;
  line-height: 1.38;
}
body:has(.cimg-wide) .article .cimg-page .conv-perks { gap: 18px; }
body:has(.cimg-wide) .article .cimg-page .conv-perks li { gap: 14px; font-size: 0.9rem; }
body:has(.cimg-wide) .cimg-page .conv-perks strong { color: #1d3fd8; font-size: 1.02rem; }
body:has(.cimg-wide) .cimg-page .conv-perk { width: 48px; height: 48px; background-size: 24px; }
body:has(.cimg-wide) .cimg-page .conv-perk.is-quality {
  background-color: #f3e8ff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='4' fill='%239333ea'/%3E%3Ccircle cx='9' cy='9' r='1.8' fill='%23fff'/%3E%3Cpath d='m6 17 4-4.5 3 3 2-2 3 3.5z' fill='%23fff'/%3E%3C/svg%3E");
}
body:has(.cimg-wide) .cimg-page .conv-perk.is-device {
  background-color: #e0f2fe;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='2' width='12' height='20' rx='3' fill='%230284c7'/%3E%3Crect x='8.5' y='5' width='7' height='11' rx='1' fill='%23fff'/%3E%3Ccircle cx='12' cy='18.8' r='1' fill='%23fff'/%3E%3C/svg%3E");
}
body:has(.cimg-wide) .article .cimg-page img.conv-art {
  max-width: 300px;
  margin-top: 26px;
}

/* ---------- Board ---------- */
body:has(.cimg-wide) .cimg-page .conv-board {
  grid-template-columns: minmax(0, 1.72fr) minmax(300px, 1fr);
  gap: 16px;
}
body:has(.cimg-wide) .cimg-page .conv-stack { gap: 16px; }
body:has(.cimg-wide) .cimg-page .conv-card,
body:has(.cimg-wide) .cimg-page .conv-steps {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--ci-card);
  box-shadow: var(--ci-shadow);
}
body:has(.cimg-wide) .cimg-page .cimg-app {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body:has(.cimg-wide) .cimg-page .cimg-app [hidden] { display: none !important; }
/* The result card already carries totals, download and next steps. */
body:has(.cimg-wide) .cimg-page .cimg-app > .itool-success { display: none !important; }
body:has(.cimg-wide) .cimg-page .cimg-side {
  display: block;
  width: auto;
  max-width: none;
  margin-top: 16px;
  padding: 0;
  background: transparent;
  border: 0;
}

/* "Recentes" spans the whole board here, not a narrow rail. */
body:has(.cimg-wide) .cimg-page .cimg-side .itool-hist-list {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
body:has(.cimg-wide) .cimg-page .cimg-side .itool-hist-thumb { aspect-ratio: 4 / 3; }

/* Steps */
body:has(.cimg-wide) .cimg-page .conv-steps { padding: 12px 18px; }
body:has(.cimg-wide) .cimg-page .conv-steps li { gap: 12px; }
body:has(.cimg-wide) .cimg-page .conv-steps li > span:first-child {
  width: 44px;
  height: 44px;
  background: #eef2f7;
  color: #1e3a8a;
  font-size: 1.1rem;
}
body:has(.cimg-wide) .cimg-page .conv-steps strong { color: #1d3fd8; font-size: 0.95rem; }
body:has(.cimg-wide) .cimg-page .conv-steps small { font-size: 0.76rem; }
body:has(.cimg-wide) .cimg-page .conv-steps .is-on > span:first-child { background: var(--ci-blue); color: #fff; }
body:has(.cimg-wide) .cimg-page .conv-steps .is-done > span:first-child { background: var(--ci-green); color: #fff; }

/* Card titles */
body:has(.cimg-wide) .article .cimg-page h2.conv-card-title {
  gap: 12px;
  margin: 0 0 14px;
  color: #1d3fd8;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
body:has(.cimg-wide) .cimg-page .conv-ico-title {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--ci-blue);
  color: #fff;
}

/* ---------- Upload ---------- */
body:has(.cimg-wide) .cimg-page .cimg-upload { padding: 14px; }
body:has(.cimg-wide) .cimg-page .cimg-dropwrap {
  padding: 10px;
  border: 1.5px dashed #7fa8f5;
  border-radius: 14px;
  background: var(--ci-drop);
}
body:has(.cimg-wide) .cimg-page .cimg-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 18px 12px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  text-align: center;
  cursor: pointer;
}
body:has(.cimg-wide) .cimg-page .cimg-drop.is-dragover { background: #e6efff; }
body:has(.cimg-wide) .cimg-page .conv-cloud { width: 72px; height: 72px; background-size: 44px; }
body:has(.cimg-wide) .cimg-page .cimg-drop-title {
  margin-top: 4px;
  color: var(--cv-ink);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
body:has(.cimg-wide) .cimg-page .cimg-drop-hint {
  max-width: none;
  color: var(--cv-muted);
  font-size: 0.84rem;
}
body:has(.cimg-wide) .cimg-page .cimg-drop-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
body:has(.cimg-wide) .cimg-page .cimg-drop-actions .cimg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 0.98rem;
  font-weight: 750;
}
body:has(.cimg-wide) .cimg-page .cimg-drop-cta {
  min-width: 230px;
  border: 1px solid var(--ci-blue) !important;
  background: var(--ci-blue) !important;
  color: #fff !important;
}
body:has(.cimg-wide) .cimg-page .cimg-drop-cta:hover { background: var(--ci-blue-2) !important; }
body:has(.cimg-wide) .cimg-page #cimg-btn-sample {
  border: 1px solid var(--cv-line);
  background: var(--ci-field);
  color: var(--cv-ink);
}
body:has(.cimg-wide) .cimg-page .cimg-drop-actions .cimg-btn-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Queue inside the dashed box (outside #cimg-drop so clicks do not reopen the picker) */
body:has(.cimg-wide) .cimg-page .cimg-files { display: none; margin-top: 6px; }
body:has(.cimg-wide) .cimg-page.has-files .cimg-files { display: block; }
body:has(.cimg-wide) .cimg-page .cimg-files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 8px;
}
body:has(.cimg-wide) .article .cimg-page .cimg-files-head h3 {
  margin: 0;
  color: var(--cv-ink);
  font-size: 0.86rem;
}
body:has(.cimg-wide) .cimg-page .cimg-files-head h3 span { color: var(--cv-muted); font-weight: 650; }
body:has(.cimg-wide) .cimg-page .cimg-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  scrollbar-width: thin;
}
body:has(.cimg-wide) .cimg-page .cimg-list-empty { display: none; }
body:has(.cimg-wide) .article .cimg-page .cimg-item {
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--cv-line);
  border-radius: 12px;
  background: var(--ci-card);
  box-shadow: none;
}
body:has(.cimg-wide) .article .cimg-page .cimg-item::before { content: none; }
body:has(.cimg-wide) .cimg-page .cimg-thumb {
  width: 96px;
  height: 58px;
  border: 0;
  border-radius: 6px;
  object-fit: cover;
}
body:has(.cimg-wide) .cimg-page .cimg-item-name { font-size: 0.95rem; font-weight: 650; }
body:has(.cimg-wide) .cimg-page .cimg-item-meta { font-size: 0.8rem; }
body:has(.cimg-wide) .cimg-page .cimg-item-actions { align-items: center; gap: 6px; }
body:has(.cimg-wide) .cimg-page .cimg-item-actions .cimg-btn {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.8rem;
}
body:has(.cimg-wide) .cimg-page .cimg-item-actions [data-action="remove"] {
  position: relative;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--cv-line);
  background: var(--ci-field);
  color: transparent;
  font-size: 0;
}
body:has(.cimg-wide) .cimg-page .cimg-item-actions [data-action="remove"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0f172a;
  -webkit-mask: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 20px no-repeat;
  mask: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 20px no-repeat;
}

/* ---------- Settings ---------- */
body:has(.cimg-wide) .cimg-page .cimg-opt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 22px;
  align-items: start;
}
body:has(.cimg-wide) .cimg-page .cimg-span-2 { grid-column: 1 / -1; }
body:has(.cimg-wide) .cimg-page .cimg-field { display: block; min-width: 0; margin: 0; }
body:has(.cimg-wide) .cimg-page .cimg-box {
  padding: 12px 16px 16px;
  border: 1px solid var(--cv-line);
  border-radius: 12px;
}
body:has(.cimg-wide) .cimg-page .cimg-label,
body:has(.cimg-wide) .cimg-page .cimg-qslider-label {
  display: block;
  margin: 0;
  color: var(--cv-ink);
  font-size: 0.9rem;
  font-weight: 700;
}
body:has(.cimg-wide) .cimg-page .cimg-input,
body:has(.cimg-wide) .cimg-page .cimg-select {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid #d5dde8;
  border-radius: 10px;
  background-color: var(--ci-field);
  color: var(--cv-ink);
  font: inherit;
  font-size: 1rem;
}
body:has(.cimg-wide) .cimg-page .cimg-input:disabled { opacity: 0.55; }
body:has(.cimg-wide) .cimg-page .cimg-input:focus,
body:has(.cimg-wide) .cimg-page .cimg-select:focus {
  border-color: var(--ci-blue);
  outline: 2px solid rgba(37, 99, 235, 0.18);
  outline-offset: 0;
}
body:has(.cimg-wide) .cimg-page .cimg-hint {
  display: block;
  margin-top: 8px;
  color: var(--cv-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

/* Quality chips */
body:has(.cimg-wide) .cimg-page .cimg-qchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
body:has(.cimg-wide) .cimg-page .cimg-qchip {
  min-width: 44px;
  height: 42px;
  padding: 0 8px;
  border: 1px solid #d5dde8;
  border-radius: 10px;
  background: var(--ci-field);
  color: var(--cv-ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
body:has(.cimg-wide) .cimg-page .cimg-qchip:hover { border-color: #93b4f5; }
body:has(.cimg-wide) .cimg-page .cimg-qchip.is-active {
  border-color: var(--ci-blue);
  background: var(--ci-blue);
  color: #fff;
}

/* Quality slider (converter-page.css blanks range backgrounds, so the track is drawn here) */
body:has(.cimg-wide) .cimg-page .cimg-qslider { padding-top: 12px; }
body:has(.cimg-wide) .cimg-page .cimg-qslider-label { color: var(--cv-muted); font-weight: 600; }
body:has(.cimg-wide) .cimg-page .cimg-qslider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}
body:has(.cimg-wide) .cimg-page input[type="range"].cimg-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
body:has(.cimg-wide) .cimg-page .cimg-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ci-blue) 0 var(--fill, 78%), #e3e9f2 var(--fill, 78%) 100%);
}
body:has(.cimg-wide) .cimg-page .cimg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ci-blue);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
}
body:has(.cimg-wide) .cimg-page .cimg-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #e3e9f2;
}
body:has(.cimg-wide) .cimg-page .cimg-slider::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--ci-blue);
}
body:has(.cimg-wide) .cimg-page .cimg-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ci-blue);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
}
body:has(.cimg-wide) .cimg-page .cimg-value {
  flex: none;
  min-width: 3.2em;
  color: var(--ci-blue);
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Resize checkbox */
body:has(.cimg-wide) .cimg-page .cimg-checks { padding-top: 34px; }
body:has(.cimg-wide) .cimg-page .cimg-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--cv-body);
  font-size: 0.92rem;
  cursor: pointer;
}
body:has(.cimg-wide) .cimg-page .cimg-check input {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--ci-blue);
}
body:has(.cimg-wide) .cimg-page .cimg-check small {
  display: block;
  margin-top: 2px;
  color: var(--cv-muted);
  font-size: 0.8rem;
}

/* Target size chips + more options */
body:has(.cimg-wide) .cimg-page .cimg-size-chips { margin-top: 10px; gap: 8px; }
body:has(.cimg-wide) .cimg-page .cimg-size-chip {
  padding: 8px 14px;
  border-color: #d5dde8;
  background: var(--ci-field);
  color: var(--cv-body);
  font-size: 0.84rem;
}
body:has(.cimg-wide) .cimg-page .cimg-size-chip.is-active {
  border-color: #93b4f5;
  background: var(--ci-soft);
  color: var(--ci-blue);
  box-shadow: none;
}
body:has(.cimg-wide) .cimg-page .cimg-more {
  border-top: 1px solid var(--cv-line);
  padding-top: 12px;
}
body:has(.cimg-wide) .cimg-page .cimg-more summary {
  width: max-content;
  color: var(--ci-blue);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
body:has(.cimg-wide) .cimg-page .cimg-more-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 22px;
  margin-top: 12px;
}

/* Progress + status + main button */
body:has(.cimg-wide) .cimg-page .cimg-go-slot:not(:empty) { margin-top: 14px; }
body:has(.cimg-wide) .cimg-page .cimg-go-slot .itool-progress-wrap,
body:has(.cimg-wide) .cimg-page .cimg-go-slot .itool-busy-banner {
  margin: 0;
  border-radius: 10px;
}
body:has(.cimg-wide) .article .cimg-page .cimg-status {
  margin: 14px 0 0;
  color: var(--cv-muted);
  font-size: 0.84rem;
  text-align: left;
}
body:has(.cimg-wide) .article .cimg-page .cimg-status:empty { display: none; }
body:has(.cimg-wide) .cimg-page .cimg-status.is-ok { color: #15803d; }
body:has(.cimg-wide) .cimg-page .cimg-status.is-error { color: #b91c1c; }
body:has(.cimg-wide) .cimg-page .cimg-status.is-loading { color: var(--ci-blue); }
body:has(.cimg-wide) .cimg-page #cimg-btn-process.conv-go {
  gap: 12px;
  min-height: 56px;
  margin-top: 16px;
  border: 0 !important;
  border-radius: 10px;
  background: #fcc419 !important;
  color: #111827 !important;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 0 rgba(180, 120, 0, 0.25);
}
body:has(.cimg-wide) .cimg-page #cimg-btn-process.conv-go:not(:disabled):hover { background: #f5b400 !important; }
body:has(.cimg-wide) .cimg-page #cimg-btn-process.conv-go:disabled { opacity: 0.6; }
body:has(.cimg-wide) .cimg-page .cimg-go-ico { width: 24px; height: 24px; flex: none; }

/* ---------- Compare ---------- */
body:has(.cimg-wide) .cimg-page .cimg-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
body:has(.cimg-wide) .article .cimg-page .cimg-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--cv-line);
  border-radius: 12px;
  background: var(--ci-card);
}
body:has(.cimg-wide) .cimg-page .cimg-pane figcaption {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
  text-align: center;
}
body:has(.cimg-wide) .cimg-page .cimg-pane figcaption strong { color: var(--cv-ink); font-size: 0.88rem; }
body:has(.cimg-wide) .cimg-page .cimg-pane figcaption b {
  color: #334155;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
body:has(.cimg-wide) .cimg-page .cimg-pane.is-out figcaption b { color: var(--ci-green); }
body:has(.cimg-wide) .cimg-page .cimg-pane.is-out figcaption b.is-bigger { color: #c2410c; }
body:has(.cimg-wide) .cimg-page .cimg-pane figcaption small {
  overflow: hidden;
  color: var(--cv-muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body:has(.cimg-wide) .cimg-page .cimg-pane-img {
  position: relative;
  aspect-ratio: 1 / 0.9;
  overflow: hidden;
  border-radius: 8px;
  background:
    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%) #f8fafc;
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
body:has(.cimg-wide) .cimg-page .cimg-pane-img:has(img[hidden])::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2.5'/%3E%3Ccircle cx='9' cy='10' r='1.8'/%3E%3Cpath d='m4 18 5-5.5 4 4 2.5-2.5L20 18'/%3E%3C/svg%3E") center / 40px no-repeat;
}
body:has(.cimg-wide) .article .cimg-page .cimg-pane-img img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}
/* Slider mode: the core before/after replaces the two panes. */
body:has(.cimg-wide) .cimg-page .cimg-cmp-card:not(.is-slider) #cimg-compare { display: none !important; }
body:has(.cimg-wide) .cimg-page .cimg-cmp-card.is-slider .cimg-pair { display: none; }
body:has(.cimg-wide) .cimg-page .cimg-compare {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
body:has(.cimg-wide) .cimg-page .cimg-compare-title { color: var(--cv-muted); font-size: 0.84rem; }
body:has(.cimg-wide) .article .cimg-page .cimg-ba-meta { text-align: left; }
body:has(.cimg-wide) .cimg-page .cimg-ba-frame { aspect-ratio: 3 / 2; border-radius: 10px; }
body:has(.cimg-wide) .cimg-page input[type="range"].cimg-ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

/* ---------- Result ---------- */
body:has(.cimg-wide) .article .cimg-page .cimg-sum {
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--cv-line);
  border-radius: 12px;
}
body:has(.cimg-wide) .cimg-page .cimg-sum > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--cv-line);
  font-size: 0.9rem;
}
body:has(.cimg-wide) .cimg-page .cimg-sum > div:last-child { border-bottom: 0; }
body:has(.cimg-wide) .article .cimg-page .cimg-sum dt {
  flex: none;
  margin: 0;
  color: var(--cv-muted);
  font-weight: 500;
}
body:has(.cimg-wide) .article .cimg-page .cimg-sum dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--cv-ink);
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body:has(.cimg-wide) .article .cimg-page .cimg-sum dd.cimg-stat-value { font-weight: 700; }
body:has(.cimg-wide) .article .cimg-page .cimg-sum dd.is-muted { color: var(--cv-muted); font-weight: 500; }
body:has(.cimg-wide) .article .cimg-page #cimg-stat-new:not(.is-muted),
body:has(.cimg-wide) .article .cimg-page .cimg-sum dd.is-good { color: var(--ci-green); }
body:has(.cimg-wide) .article .cimg-page .cimg-sum dd.is-warn { color: #c2410c; }

body:has(.cimg-wide) .cimg-page .cimg-dl-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border: 0 !important;
  border-radius: 10px;
  background: var(--ci-blue) !important;
  color: #fff !important;
  font-size: 1.08rem;
  font-weight: 750;
}
body:has(.cimg-wide) .cimg-page .cimg-dl-big:not(:disabled):hover { background: var(--ci-blue-2) !important; }
body:has(.cimg-wide) .cimg-page .cimg-dl-big:disabled { opacity: 0.5; cursor: not-allowed; }
body:has(.cimg-wide) .cimg-page .cimg-dl-big svg { width: 26px; height: 26px; flex: none; }
body:has(.cimg-wide) .cimg-page .cimg-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
body:has(.cimg-wide) .cimg-page .cimg-result-actions .cimg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--cv-line);
  border-radius: 10px;
  background: var(--ci-card);
  color: #1d3fd8;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}
body:has(.cimg-wide) .cimg-page .cimg-result-actions .cimg-btn:disabled { opacity: 0.5; cursor: not-allowed; }
body:has(.cimg-wide) .cimg-page .cimg-result-actions .cimg-btn[aria-pressed="true"] {
  border-color: #93b4f5;
  background: var(--ci-soft);
}
body:has(.cimg-wide) .cimg-page .cimg-result-actions svg { width: 20px; height: 20px; flex: none; }
body:has(.cimg-wide) .article .cimg-page .cimg-dl-note { margin: 10px 0 0; }
body:has(.cimg-wide) .cimg-page:not(.has-result) .cimg-next-slot { display: none; }
body:has(.cimg-wide) .cimg-page .cimg-next-slot .itool-next {
  margin: 10px 0 0;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--cv-line);
  background: transparent;
}

/* ---------- Tips ---------- */
body:has(.cimg-wide) .cimg-page .cimg-tips {
  padding: 16px 18px;
  border-color: #fdecb2;
  border-radius: 18px;
  background: #fffaeb;
}
body:has(.cimg-wide) .article .cimg-page .cimg-tips h2 {
  gap: 12px;
  margin: 0 0 12px;
  color: #1e293b;
  font-size: 1.1rem;
}
body:has(.cimg-wide) .cimg-page .cimg-tips-ico {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: #fcc419 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7V17a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-2.3A7 7 0 0 0 12 2zM9 20h6v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E") center / 22px no-repeat;
}
body:has(.cimg-wide) .article .cimg-page .cimg-tips ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body:has(.cimg-wide) .article .cimg-page .cimg-tips li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  color: #5b6475;
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: left;
}
body:has(.cimg-wide) .article .cimg-page .cimg-tips li::before {
  content: "";
  position: static;
  width: 22px;
  height: 22px;
  flex: none;
  margin: 0;
  border-radius: 50%;
  background: #fcc419 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  body:has(.cimg-wide) .cimg-page .conv-board { grid-template-columns: minmax(0, 1fr); }
  body:has(.cimg-wide) .cimg-page .cimg-pane-img { aspect-ratio: 16 / 10; }
}
@media (max-width: 720px) {
  body:has(.cimg-wide) .cimg-page .cimg-opt-grid,
  body:has(.cimg-wide) .cimg-page .cimg-more-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  body:has(.cimg-wide) .cimg-page .cimg-span-2 { grid-column: auto; }
  body:has(.cimg-wide) .cimg-page .cimg-checks { padding-top: 0; }
  body:has(.cimg-wide) .cimg-page .conv-steps { gap: 10px; }
  body:has(.cimg-wide) .cimg-page .conv-steps li > span:first-child { width: 34px; height: 34px; font-size: 0.95rem; }
  body:has(.cimg-wide) .cimg-page .conv-card { padding: 14px; }
  body:has(.cimg-wide) .cimg-page .cimg-drop-actions .cimg-btn { flex: 1 1 100%; min-width: 0; }
  body:has(.cimg-wide) .article .cimg-page .cimg-item { grid-template-columns: 72px minmax(0, 1fr); }
  body:has(.cimg-wide) .cimg-page .cimg-thumb { width: 72px; height: 50px; }
  body:has(.cimg-wide) .cimg-page .cimg-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  body:has(.cimg-wide) .cimg-page .cimg-item-actions [data-action="remove"] { margin-left: auto; }
}

/* ---------- Dark ---------- */
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page {
  --ci-card: #1e293b;
  --ci-field: #0f172a;
  --ci-drop: #0f1b33;
  --ci-soft: #172554;
  --ci-shadow: none;
}
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .conv-lede { color: #a5b4fc; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .conv-perks strong,
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .conv-steps strong,
html[data-theme="dark"] body:has(.cimg-wide) .article .cimg-page h2.conv-card-title,
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-result-actions .cimg-btn { color: #93b4ff; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .conv-steps li > span:first-child { background: #334155; color: #e2e8f0; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .conv-steps .is-on > span:first-child { background: var(--ci-blue); color: #fff; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .conv-steps .is-done > span:first-child { background: var(--ci-green); color: #fff; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-dropwrap { border-color: #3b5b99; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-drop.is-dragover { background: #172554; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .conv-cloud { background-color: #1e293b; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-input,
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-select,
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-qchip,
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-size-chip { border-color: #334155; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-qchip.is-active { border-color: var(--ci-blue); }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-size-chip.is-active { border-color: #3b5b99; color: #93b4ff; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-slider::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--ci-blue) 0 var(--fill, 78%), #334155 var(--fill, 78%) 100%);
}
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-slider::-moz-range-track { background: #334155; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-slider::-webkit-slider-thumb { border-color: #1e293b; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-value,
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-more summary { color: #93b4ff; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-pane figcaption b { color: #e2e8f0; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-pane.is-out figcaption b { color: #4ade80; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-pane-img {
  background:
    linear-gradient(45deg, #1b2536 25%, transparent 25%),
    linear-gradient(-45deg, #1b2536 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1b2536 75%),
    linear-gradient(-45deg, transparent 75%, #1b2536 75%) #111a2b;
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}
html[data-theme="dark"] body:has(.cimg-wide) .article .cimg-page #cimg-stat-new:not(.is-muted),
html[data-theme="dark"] body:has(.cimg-wide) .article .cimg-page .cimg-sum dd.is-good { color: #4ade80; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-item-actions [data-action="remove"]::before { background: #e2e8f0; }
html[data-theme="dark"] body:has(.cimg-wide) .cimg-page .cimg-tips { background: #2b2410; border-color: #6b5210; }
html[data-theme="dark"] body:has(.cimg-wide) .article .cimg-page .cimg-tips h2 { color: #fde68a; }
html[data-theme="dark"] body:has(.cimg-wide) .article .cimg-page .cimg-tips li { color: #e5d9b6; }

/* WhatsApp preset: the H1 has a long word, so keep it a step smaller than the generic compressor. */
body.page-comprimir-imagem-para-whatsapp .cimg-page .conv-title {
  font-size: clamp(1.7rem, 2.15vw, 2.2rem);
  line-height: 1.08;
}
body.page-comprimir-imagem-para-whatsapp .article .cimg-page .conv-lede,
body.page-comprimir-imagem-para-whatsapp .article .cimg-page .conv-perks li,
body.page-comprimir-imagem-para-whatsapp .article .cimg-page h2,
body.page-comprimir-imagem-para-whatsapp .article .cimg-page .cimg-tips li,
body.page-comprimir-imagem-para-whatsapp .cimg-page button {
  hyphens: manual;
  word-break: normal;
  overflow-wrap: normal;
}
