.share-sheet {
  width: min(560px, calc(100vw - 32px));
  max-height: min(92dvh, 900px);
  margin: auto;
  padding: 22px;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 60px rgba(20, 20, 20, .16);
  font-family: var(--sans, 'Instrument Sans', sans-serif);
}
.share-sheet::backdrop { background: rgba(22, 22, 26, .5); }
.share-sheet-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.share-sheet-header h2 { margin: 0; font: 600 16px/1.3 var(--sans, 'Instrument Sans', sans-serif); letter-spacing: 0; }
.share-sheet-close { margin-left: auto; padding: 0 4px; border: 0; background: none; color: var(--faint); font-size: 26px; line-height: 1; cursor: pointer; }
.share-sheet-close:hover { color: var(--ink); }
.share-sheet-preview { position: relative; width: 100%; min-height: 180px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--soft); }
.share-sheet-preview[data-format='wide'] { aspect-ratio: 1200 / 630; }
.share-sheet-preview[data-format='tall'] { aspect-ratio: 1080 / 1350; width: min(100%, 432px, 43.2dvh); margin: 0 auto; }
.share-sheet-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.share-sheet-preview-status { max-width: 28ch; margin: 0; padding: 16px; color: var(--muted); font-size: 13px; text-align: center; }
.share-sheet-format-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 18px; }
.share-sheet-formats { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--soft); }
.share-sheet-formats button { padding: 7px 14px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--muted); font: 500 13px var(--sans, 'Instrument Sans', sans-serif); cursor: pointer; }
.share-sheet-formats button[aria-pressed='true'] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 2px 6px rgba(0, 0, 0, .06); }
.share-sheet-size { color: var(--meta); font: 500 12px var(--mono, 'JetBrains Mono', monospace); }
.share-sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.share-sheet-download, .share-sheet-copy { min-width: 0; flex: 1; display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 12px; border: 1.5px solid var(--ink); border-radius: var(--radius-pill); font: 600 15px var(--sans, 'Instrument Sans', sans-serif); text-decoration: none; cursor: pointer; }
.share-sheet-download { background: var(--ink); color: var(--surface); }
.share-sheet-copy { background: var(--surface); color: var(--ink); }
.share-sheet-download[aria-disabled='true'], .share-sheet-copy:disabled { opacity: .45; cursor: wait; }
.share-sheet-link { display: block; margin: 16px auto 0; padding: 3px 8px; border: 0; background: none; color: var(--muted); font: 500 13px var(--sans, 'Instrument Sans', sans-serif); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.share-sheet-feedback { min-height: 1em; margin: 8px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
@media (max-width: 480px) {
  .share-sheet { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 18px; border-radius: var(--radius-panel); }
  .share-sheet-preview[data-format='tall'] { width: min(100%, 38.4dvh); }
  .share-sheet-actions { flex-direction: column; }
}

.share-sheet :is(button, a):focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
