/* Concept Drive photo viewer: the original stays readable, controls stay within reach. */
.image-viewer {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(960px, calc(100vw - 48px));
  height: min(900px, calc(100dvh - 48px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffff1f;
  border-radius: 16px;
  background: var(--cd-canvas);
  color: var(--cd-ink);
  box-shadow: 0 24px 80px #0005;
  overscroll-behavior: contain;
}
.image-viewer::backdrop { background: #08090bba; backdrop-filter: blur(6px); }
.image-viewer[open] { animation: image-viewer-in 180ms var(--ease); }
.image-viewer__panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.image-viewer__header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 76px; padding: 12px 16px; background: var(--cd-black); color: #fff;
}
.image-viewer__heading { min-width: 0; padding-left: 11px; border-left: 3px solid var(--cd-red); }
.image-viewer__brand { display: block; font-size: 10px; line-height: 1.3; font-weight: 750; letter-spacing: .09em; color: #c9ced4; }
.image-viewer__heading h2 { margin: 4px 0 0; font-size: 17px; line-height: 1.25; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-viewer__close { flex: none; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 1px solid #ffffff26; border-radius: 8px; color: #fff; background: #ffffff0d; }
.image-viewer__close .ui-icon { width: 24px; height: 24px; }
.image-viewer__close:hover { background: #ffffff24; }
.image-viewer__close:focus-visible { outline-color: #fff; outline-offset: 3px; }
.image-viewer__stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #edf0f2; touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
.image-viewer__stage:focus-visible { outline-offset: -4px; }
.image-viewer__stage.is-zoomed { cursor: grab; }
.image-viewer__stage.is-zoomed:active { cursor: grabbing; }
.image-viewer__image { position: absolute; top: 50%; left: 50%; display: block; max-width: none; max-height: none; object-fit: contain; transform-origin: center; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
.image-viewer__image[hidden] { display: none; }
.image-viewer__placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; }
.image-viewer__placeholder[hidden] { display: none; }
.image-viewer__placeholder-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px; background: #fff; color: var(--cd-blue); }
.image-viewer__placeholder-icon .ui-icon { width: 30px; height: 30px; }
.image-viewer__placeholder strong { font-size: 16px; }
.image-viewer__placeholder p { margin: 0; max-width: 30ch; font-size: 13px; color: var(--cd-muted); }
.image-viewer__footer { padding: 12px 18px 14px; border-top: 1px solid var(--cd-line); background: #fff; }
.image-viewer__meta { margin: 0 0 8px; color: var(--cd-muted); font-size: 12px; line-height: 1.45; text-align: center; overflow-wrap: anywhere; }
.image-viewer__toolbar { display: flex; align-items: center; justify-content: center; gap: 6px; }
.image-viewer__toolbar button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--cd-line); border-radius: 8px; background: #fff; color: var(--cd-ink); }
.image-viewer__toolbar button:hover:not(:disabled) { background: var(--cd-blue-soft); border-color: var(--cd-blue); color: var(--cd-blue); }
.image-viewer__toolbar [data-viewer-plus] { background: var(--cd-red); border-color: var(--cd-red); color: #fff; }
.image-viewer__toolbar [data-viewer-plus]:hover:not(:disabled) { background: var(--cd-red-dark); border-color: var(--cd-red-dark); color: #fff; }
.image-viewer__zoom { display: block; min-width: 42px; text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.image-viewer__separator { flex: none; width: 1px; height: 24px; margin-inline: 4px; background: var(--cd-line); }
.image-viewer__hint { margin: 9px 0 0; color: var(--cd-muted); font-size: 12px; line-height: 1.4; text-align: center; }
body.image-viewer-open { overflow: hidden; }
.image-opener { position: relative; display: block; height: 100%; width: 100%; cursor: zoom-in; touch-action: manipulation; }
.home-car__visual { grid-template-rows:minmax(0, 1fr); }
.home-car__visual > .image-opener { min-width:0; min-height:0; }
.image-opener > img { display:block; }
.image-opener:focus-visible { outline-offset: -4px; }
.image-opener__cue { position: absolute; bottom: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; background: #08090bdb; border-radius: 6px; color: #fff; font-size: 11px; line-height: 1.4; pointer-events: none; }
.image-opener__cue .ui-icon { width: 15px; height: 15px; }
.home-car__visual .image-opener__cue { left:calc(var(--mobile-gutter) + 10px); }
.document-preview .image-opener { height: auto; }
.document-preview .image-opener__cue { bottom: 12px; left: 12px; }
@keyframes image-viewer-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .image-viewer { inset: 0; width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .image-viewer__header { min-height: calc(70px + env(safe-area-inset-top)); padding: calc(10px + env(safe-area-inset-top)) 14px 10px; }
  .image-viewer__footer { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); }
}
@media (max-height: 500px) {
  .image-viewer__header { min-height: 58px; padding-block: 6px; }
  .image-viewer__footer { padding-block: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .image-viewer__meta { margin-bottom: 4px; }
  .image-viewer__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .image-viewer[open] { animation: none; } }
/* Source viewer geometry: full-screen dark canvas; touch gestures remain handled in image-viewer.js. */
.image-viewer{inset:0;width:100%;height:100dvh;margin:0;border:0;border-radius:0;background:#0e0f12;color:#fff;box-shadow:none}.image-viewer::backdrop{background:#0e0f12;backdrop-filter:none}.image-viewer__panel{grid-template-rows:auto minmax(0,1fr) auto;background:#0e0f12}.image-viewer__header{min-height:calc(56px + env(safe-area-inset-top));padding:calc(4px + env(safe-area-inset-top)) 4px 4px;background:#0e0f12}.image-viewer__heading{border:0;padding-left:8px}.image-viewer__brand{display:none}.image-viewer__heading h2{margin:0;color:#fff;font-size:16px;line-height:22px}.image-viewer__close{width:48px;height:48px;border:0;border-radius:50%;background:rgba(255,255,255,.12)}.image-viewer__close .ui-icon{width:24px;height:24px}.image-viewer__stage{margin:0 16px 16px;border-radius:8px;background:#0e0f12}.image-viewer__footer{padding:12px 16px max(36px,env(safe-area-inset-bottom));border:0;background:#0e0f12;color:#fff}.image-viewer__meta{color:#c9ccd2}.image-viewer__toolbar button{border-color:rgba(255,255,255,.16);background:rgba(255,255,255,.12);color:#fff}.image-viewer__toolbar [data-viewer-plus]{border-color:rgba(255,255,255,.16);background:rgba(255,255,255,.12)}.image-viewer__separator{background:rgba(255,255,255,.2)}.image-viewer__hint{color:#c9ccd2;font-size:13px}.image-viewer--assist .image-viewer__heading,.image-viewer--assist .image-viewer__meta,.image-viewer--assist .image-viewer__toolbar{display:none}.image-viewer--assist .image-viewer__header{justify-content:flex-start}.image-viewer--assist .image-viewer__stage{margin-bottom:0}.image-viewer--assist .image-viewer__footer{padding-top:12px;text-align:center}
.image-viewer__header{min-height:calc(100px + env(safe-area-inset-top));padding:calc(48px + env(safe-area-inset-top)) 4px 4px}
/* CdDocs D02 source controls: one close action and two 48px zoom actions. */
.image-viewer__header{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:0;min-height:calc(100px + env(safe-area-inset-top));padding:calc(48px + env(safe-area-inset-top)) 6px 4px}
.image-viewer__heading{min-width:0;padding:0 8px;text-align:left}
.image-viewer__heading h2{font-size:16px;line-height:22px;font-weight:600}
.image-viewer__page{font-size:13px;line-height:18px;text-align:center;color:#c9ccd2;white-space:nowrap}
.image-viewer__stage{margin:0;padding:20px;background:#0e0f12;border-radius:0}
.image-viewer__footer{padding:12px 16px max(36px,env(safe-area-inset-bottom))}
.image-viewer__toolbar{gap:12px}
.image-viewer__toolbar button{width:48px;height:48px;border:0;border-radius:50%;background:rgba(255,255,255,.12);color:#fff}
.image-viewer__toolbar button .ui-icon{width:24px;height:24px}
.image-viewer__toolbar button:hover:not(:disabled),.image-viewer__toolbar [data-viewer-plus]:hover:not(:disabled){border:0;background:rgba(255,255,255,.2);color:#fff}
.image-viewer--assist .image-viewer__page{display:none}
/* Native browser chrome supplies the OS inset; do not draw its 44px placeholder. */
.cdx-shell-ready .image-viewer{width:min(480px,100vw);height:100dvh;max-height:none;margin:0 auto;background:#0e0f12}
.cdx-shell-ready .image-viewer__header{min-height:calc(56px + env(safe-area-inset-top));padding:calc(4px + env(safe-area-inset-top)) 12px 4px 4px}
