/* OMNIFIT: le foto del check grandi (js/check-foto.js, 5/11/2026). Prefisso ckv-. A tutto schermo, sopra tutto; le foto
   su un fondo scuro in tutti e due i temi (si vedono meglio), il resto con i colori del tema. Da 320 px. */
#ckFotoDlg {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; box-sizing: border-box;
  background: var(--surface); color: var(--ink); overflow: hidden;
}
#ckFotoDlg::backdrop { background: rgb(12 10 8 / .7); }
.ckv {
  display: flex; flex-direction: column; gap: 8px; height: 100%; box-sizing: border-box; font-family: var(--f-body);
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.ckv-top { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; }
.ckv-back { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.ckv-back svg { width: 22px; height: 22px; }
.ckv-h { margin: 0; overflow: hidden; font: 700 19px/1.2 var(--f-body); white-space: nowrap; text-overflow: ellipsis; }

/* Fronte | Lato | Dietro */
.ckv-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ckv-seg button { min-height: 38px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 14.5px/1 var(--f-body); cursor: pointer; }
.ckv-seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

/* la settimana e «Confronta con» */
.ckv-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.ckv-pick label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ckv-pick span { font: 600 11px/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ckv-pick select {
  width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--ink); font: 600 14.5px/1.2 var(--f-body);
}

/* le foto: una, o due affiancate (la settimana più vecchia a sinistra) */
.ckv-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; touch-action: none; }
.ckv.is-two .ckv-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ckv-pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-radius: 14px; background: #161412; cursor: zoom-in; }
.ckv.is-zoom .ckv-pane { cursor: grab; }
.ckv-pane img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: center center;
  pointer-events: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.ckv-none { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 12px; text-align: center; font-size: 14px; color: #B9B2AA; }
.ckv-cap {
  position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 1px; max-width: calc(100% - 16px);
  padding: 5px 9px; border-radius: 9px; background: rgb(20 18 16 / .66); color: #fff; pointer-events: none;
}
.ckv-cap b { font-size: 13px; font-weight: 700; line-height: 1.2; }
.ckv-cap small { font-size: 12px; line-height: 1.2; color: #E4DED8; }

/* i tasti dello zoom */
.ckv-bot { display: flex; justify-content: center; gap: 10px; }
.ckv-zb {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 52px; min-height: 46px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 23px; background: var(--surface-2); color: var(--ink); font: 700 14px/1 var(--f-body); cursor: pointer;
}
.ckv-zb svg { width: 20px; height: 20px; }
.ckv-zb:hover { background: color-mix(in srgb, var(--ink) 6%, var(--surface-2)); }
.ckv-fit { min-width: 112px; }
.ckv-zl { font-variant-numeric: tabular-nums; }

@media (min-width: 821px) {
  .ckv { padding-inline: 20px; }
  .ckv-top, .ckv-seg, .ckv-pick { width: 100%; max-width: 760px; margin-inline: auto; }
  .ckv-cap b { font-size: 14px; }
}
@media (forced-colors: active) { .ckv-pane { border: 1px solid CanvasText; } }
