/* One square contract for upload, preview and discovery. Gallery keeps originals. */
.art-link img{aspect-ratio:1!important}
.project-page .c-gallery .project-visual .c-media-stage img{aspect-ratio:auto!important;height:auto;max-height:none;object-fit:contain}
.project-page .project-visual img[data-cover]{aspect-ratio:1!important}
.c-thumbnails img{object-fit:contain}
.c-media-stage{min-height:0}
.drawn-form .upload-drop{aspect-ratio:1;min-height:0;max-width:420px}
.upload-drop img{object-fit:contain;inset:0}
.hero-image-note{font-size:.75rem;color:var(--muted);margin-top:8px}
.hero-crop-dialog{width:min(420px,calc(100vw - 32px));padding:18px;border:1px solid var(--line,#d5d5cc);border-radius:16px;background:var(--paper,#faf8f0);color:var(--ink,#222)}
.hero-crop-dialog::backdrop{background:#15181288}
.hero-crop-dialog header,.hero-crop-tools,.hero-crop-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.hero-crop-dialog header{margin-bottom:14px;font-size:.95rem}
.hero-crop-dialog button{font:inherit;cursor:pointer;border:1px solid var(--line,#ccc);background:transparent;border-radius:8px;padding:7px 12px;font-size:.8rem}
.hero-crop-dialog .hero-crop-close{border:0;font-size:22px;padding:0 5px}
.hero-crop-frame{position:relative;width:100%;aspect-ratio:1;overflow:hidden;border-radius:var(--media-radius-small,16px);background:#e9e8e1;touch-action:none;cursor:grab;outline-offset:3px}
.hero-crop-frame:active{cursor:grabbing}
.hero-crop-frame img{position:absolute;max-width:none;pointer-events:none;user-select:none}
.hero-crop-tools{margin-top:12px;color:var(--muted,#666);font-size:.75rem}
.hero-crop-tools label{display:flex;align-items:center;gap:7px}
.hero-crop-tools input{width:100px;accent-color:var(--ink,#222)}
.hero-crop-dialog footer{justify-content:flex-end;margin-top:16px}
.hero-crop-dialog button[type=submit]{background:#222;color:#fff;border-color:#222}

.hero-crop-dialog{max-height:calc(100dvh - 24px);overflow:auto}
.hero-crop-frame{max-width:min(100%,calc(100dvh - 210px));margin-inline:auto}
.hero-crop-frame:focus-visible{outline:2px solid var(--ink,#222)}
