/* Progressive, on-demand image preview. Shared tokens retain each locale's palette. */
.design-modern .download-preview-open {
  position: absolute; inset: 0; display: flex; justify-content: flex-end; align-items: flex-end;
  padding: 16px; width: 100%; color: var(--ink); border-radius: inherit; cursor: zoom-in;
}
.design-modern .download-preview-open[hidden] { display: none; }
.design-modern .download-preview-open > span {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 14px; border-radius: 24px;
  background: #fffffff2; box-shadow: 0 3px 16px #172f5312; font: 600 13px/1.5 var(--sans);
}
.design-modern .download-preview-open:hover > span { background: var(--surface); }
.design-modern .download-preview-open:focus-visible { outline-offset: -5px; }
.design-modern .download-art .download-preview-open .icon {
  width: 18px; height: 18px; padding: 0; border-radius: 0; box-shadow: none; filter: none; transform: none;
}
.design-modern .download-preview {
  width: min(1140px, calc(100% - 40px)); max-width: none; max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 0; border-radius: 22px;
  color: var(--ink); background: var(--surface); box-shadow: 0 30px 120px #10251d45; overflow: auto;
}
.design-modern .download-preview::backdrop { background: #10251da3; backdrop-filter: blur(6px); }
.design-modern .download-preview:not([open]) { display: none; }
.design-modern .download-preview-top {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 20px 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.design-modern .download-preview-position { margin: 0; min-width: 0; color: var(--muted); font: 500 13px/1.6 var(--sans); overflow-wrap: anywhere; }
.design-modern .download-preview-controls { display: flex; gap: 6px; flex: none; }
.design-modern .download-preview-controls button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 12px; border-radius: 50%;
  background: var(--surface-soft); transition: background .2s;
}
.design-modern .download-preview-controls .icon { width: 20px; height: 20px; }
.design-modern .download-preview-controls button:disabled { opacity: .35; cursor: default; }
.design-modern .download-preview-controls button:not(:disabled):hover { background: var(--line); }
.design-modern .download-preview-controls [data-download-preview-close] { margin-left: 8px; }
.design-modern .download-preview-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); }
.design-modern .download-preview-art {
  position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; padding: 28px;
  background-color: var(--surface-soft);
  background-image: linear-gradient(45deg, #152d3d04 25%, transparent 25%, transparent 75%, #152d3d04 75%), linear-gradient(45deg, #152d3d04 25%, transparent 25%, transparent 75%, #152d3d04 75%);
  background-size: 24px 24px; background-position: 0 0, 12px 12px;
}
.design-modern .download-preview-stage { display: grid; place-items: center; min-height: 360px; width: 100%; }
.design-modern .download-preview-stage img { width: 100%; height: min(65vh, 640px); object-fit: contain; }
.design-modern .download-preview-feedback { position: absolute; inset: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; pointer-events: none; text-align: center; }
.design-modern .download-preview-feedback p { margin: 0; max-width: 28em; color: var(--muted); font: 400 15px/1.8 var(--sans); overflow-wrap: anywhere; }
.design-modern .download-preview-feedback .button { pointer-events: auto; margin-top: 18px; background: var(--surface); }
.design-modern .download-preview-feedback [hidden] { display: none; }
.design-modern .download-preview-copy { min-width: 0; padding: 40px 32px; align-self: center; overflow-wrap: anywhere; }
.design-modern .download-preview-copy .eyebrow { color: var(--accent); font: 600 12px/1.7 var(--sans); letter-spacing: .07em; }
.design-modern .download-preview-copy h2 { font: 600 clamp(25px, 2.4vw, 34px)/1.35 var(--sans); letter-spacing: -.02em; margin: 0 0 18px; }
.design-modern .download-preview-description { font: 400 15px/1.9 var(--sans); color: var(--muted); margin-bottom: 20px; }
.design-modern .download-preview-meta { font: 500 13px/1.8 var(--sans); color: var(--accent); margin-bottom: 28px; }
.design-modern .download-preview-license { border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: 26px; }
.design-modern .download-preview-license h3 { font: 600 14px/1.6 var(--sans); margin: 0 0 8px; }
.design-modern .download-preview-license p { font: 400 13px/1.9 var(--sans); color: var(--muted); margin: 0; white-space: pre-line; }
.design-modern .download-preview-copy .button { width: 100%; gap: 15px; font-size: 14px; }
@media (max-width: 760px) {
  .design-modern .download-preview { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  .design-modern .download-preview-top { padding: 12px 16px; }
  .design-modern .download-preview-layout { grid-template-columns: minmax(0, 1fr); }
  .design-modern .download-preview-art { padding: 20px; }
  .design-modern .download-preview-stage { min-height: 240px; }
  .design-modern .download-preview-stage img { height: min(45vh, 420px); min-height: 200px; }
  .design-modern .download-preview-copy { padding: 26px 24px; }
  .design-modern .download-preview-copy h2 { font-size: 26px; }
}
@media (max-width: 380px) {
  .design-modern .download-preview-top { padding: 10px 12px; gap: 8px; }
  .design-modern .download-preview-controls { gap: 2px; }
  .design-modern .download-preview-controls [data-download-preview-close] { margin-left: 2px; }
  .design-modern .download-preview-copy { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .design-modern .download-preview-controls button { transition: none; }
}
