.cv-open { overflow: hidden; scrollbar-gutter: stable; }
.cv-dialog {
  width: min(1360px, calc(100vw - 32px));
  height: min(940px, calc(100dvh - 32px));
  max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid #53778a;
  background: #08131e; color: #e8f5f8; box-shadow: 0 28px 90px #02080dcc;
  overflow: hidden;
}
.cv-dialog[open] { display: block; }
.cv-dialog::backdrop { background: rgb(2 9 15 / .83); }
.cv-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
.cv-head {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px clamp(16px, 2.4vw, 32px); border-bottom: 1px solid #34576b; background: #101f2d;
}
.cv-heading { min-width: 0; }
.cv-eyebrow { display: block; margin-bottom: 5px; color: #62d8e4; font: 700 10px/1.2 var(--body, Manrope, sans-serif); letter-spacing: .16em; }
.cv-title { margin: 0; color: #eef8fa; font: 600 clamp(20px, 2vw, 30px)/1 var(--display, 'Barlow Condensed', sans-serif); letter-spacing: -.01em; }
.cv-controls, .cv-size { display: flex; align-items: center; gap: 6px; }
.cv-controls { flex: none; }
.cv-dialog button {
  min-height: 44px; min-width: 44px; padding: 9px 14px; border: 1px solid #567789;
  background: transparent; color: #dcecf3; font: 700 12px/1.2 var(--body, Manrope, sans-serif);
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.cv-dialog button[aria-pressed='true'] { border-color: #50d7e6; background: #164453; color: #fff; }
.cv-dialog button:hover:not(:disabled) { border-color: #71e4ed; background: #245165; color: #fff; }
.cv-dialog button:disabled { opacity: .46; cursor: default; }
.cv-close { margin-left: 8px; }
.cv-stage {
  min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; position: relative;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background: #07111a; scrollbar-color: #5e91a2 #0e1f2b;
}
.cv-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 36px #0008; }
.cv-stage[data-size='actual'] { display: block; text-align: center; }
.cv-stage[data-size='actual'] .cv-image { max-width: none; max-height: none; margin-inline: auto; }
.cv-status { display: grid; justify-items: center; gap: 15px; max-width: 36ch; margin: auto; text-align: center; color: #c4dbe4; font: 600 14px/1.5 var(--body, Manrope, sans-serif); }
.cv-spinner { width: 34px; height: 34px; border: 2px solid #4d7789; border-top-color: #6de1ea; border-radius: 50%; animation: cv-spin 850ms linear infinite; }
.cv-original { min-height: 44px; display: inline-flex; align-items: center; color: #71e4ed; text-underline-offset: .25em; }
.cv-dialog [hidden] { display: none !important; }
@keyframes cv-spin { to { transform: rotate(360deg); } }
html[data-motion='paused'] .cv-spinner { animation: none; }
@media (prefers-reduced-motion: reduce) { .cv-dialog button { transition: none; } .cv-spinner { animation: none; } }
@media (max-width: 700px) {
  .cv-dialog { width: 100vw; height: 100dvh; border: 0; }
  .cv-head { min-height: 0; display: grid; gap: 12px; padding: max(13px, env(safe-area-inset-top)) 14px 12px; }
  .cv-eyebrow { font-size: 9px; }
  .cv-title { font-size: 24px; }
  .cv-controls { justify-content: space-between; }
  .cv-size { flex: 1; }
  .cv-size button { flex: 1; }
  .cv-close { margin-left: 0; }
  .cv-stage { padding: 9px; }
}
