/* Стили виджета «compress» (сжать фото) — общие детали в w-imgkit.css */
.prose .cz p { margin: 0; }
.prose .cz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prose .cz-list:empty { display: none; }
.prose .cz-row { margin: 0; }
.cz-row { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cz-row:hover { border-color: var(--green-line); }
.cz-row.is-selected { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.cz-row.is-work { border-color: var(--green-line); }
.cz-thumb { padding: 0; cursor: pointer; font: inherit; color: inherit; }
.cz-thumb:focus-visible, .cz .ik-seg button:focus-visible, .cz .chip:focus-visible, .cz-link:focus-visible, .cz-zoom-btn:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}
.prose .cz .ik-thumb img, .cz .ik-thumb img { width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: cover; }
.cz .ik-presets .chip { cursor: pointer; font: inherit; font-size: 14px; }
.cz .ik-seg { justify-self: start; }
.cz-mode { display: grid; gap: 10px; margin-top: 4px; }
.cz-sub { display: grid; gap: 10px; padding-left: 27px; }
.cz-sub--flat { padding-left: 0; }
@media (min-width: 560px) {
  .cz-sub { grid-template-columns: minmax(140px, 200px) 1fr; align-items: end; }
}
.cz-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.cz-badges .ik-badge { font-weight: 500; white-space: normal; line-height: 1.35; }
.cz-muted { color: var(--muted); font-size: 14px; }
.cz-tip { padding: 10px 12px; border-radius: 10px; background: var(--green-soft); border: 1px solid var(--green-line); font-size: 14px; line-height: 1.5; color: var(--text); }
.cz-link {
  padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--green); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--green-line); text-underline-offset: 3px;
}
.cz-link:hover { text-decoration-color: currentColor; }
.cz-meta { line-height: 1.5; }

/* Сравнение «до / после» */
.cz-view { display: grid; gap: 12px; padding: 12px; }
.cz-view-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.cz-view-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; color: var(--text-strong); }
.cz-zoom-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 14px; }
.cz-zoom-btn[aria-pressed="true"] { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.cz-stage { position: relative; border-radius: var(--radius-sm); }
.cz-stage .ik-cmp { max-width: 100%; }
.cz-stage .ik-cmp__img { margin: 0; }
.cz-stage:not(.is-zoom) .ik-cmp__after { max-height: 72vh; object-fit: contain; }
.cz-stage.is-zoom {
  overflow: auto; max-height: min(72vh, 680px); border: 1px solid var(--border); background: var(--surface-2);
  overscroll-behavior: contain; cursor: grab;
}
.cz-stage.is-zoom.is-panning { cursor: grabbing; }
.cz-stage.is-zoom .ik-cmp { max-width: none; margin: 0 auto; border: 0; border-radius: 0; touch-action: none; cursor: inherit; }
.cz-stage.is-zoom .ik-cmp__after { max-height: none; }
.cz-stage.is-zoom .ik-cmp__line { cursor: ew-resize; }
.cz-stage-wait {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 120px;
  border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bg-2) 70%, transparent); color: var(--text-strong); font-size: 15px;
  backdrop-filter: blur(2px);
}
.cz-stage:has(.ik-cmp__after:not([src])) { min-height: 160px; }
.cz-stage .ik-cmp:has(.ik-cmp__after:not([src])) { display: none; }
.cz-zoom-hint { line-height: 1.5; }
.cz-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cz-stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.cz-stat-k { font-size: 12.5px; color: var(--muted); }
.cz-stat-v { font-size: 20px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.cz-stat-v.is-good { color: var(--green); }
.cz-stat-v.is-bad { color: var(--warn); }
.cz-stat .ik-dim { overflow-wrap: anywhere; }
.cz-stat--save { background: var(--green-soft); border-color: var(--green-line); }
.cz-progress .ik-progress { height: 4px; }
.cz-spin {
  display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--green);
  animation: cz-spin .8s linear infinite;
}
@keyframes cz-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cz-spin { animation-duration: 2.4s; } }
@media (max-width: 640px) {
  .cz-sub { padding-left: 0; }
  .cz .ik-seg { display: flex; justify-self: stretch; }
  .cz .ik-seg button { flex: 1; padding: 10px 6px; }
  .cz .ik-actions .btn { flex: 1; justify-content: center; }
  .cz-view { padding: 10px; }
  .cz-stats { grid-template-columns: 1fr 1fr; }
  .cz-stat--save { grid-column: 1 / -1; }
  .cz-stat-v { font-size: 17px; }
  .cz .ik-dl { padding: 9px 16px; }
}
