/* All styles are local to the optional media-share controls and sheet. */
.media-share-sheet [hidden] { display: none !important; }
.media-share-sheet button:focus-visible, .media-share-sheet input:focus-visible { outline: 2px solid #7983ff; outline-offset: 3px; }
dialog.media-share-sheet {
  position: fixed; inset: auto 0 0; box-sizing: border-box;
  width: min(100%, 540px); max-width: 100%; max-height: calc(100dvh - 16px);
  margin: auto auto 0; padding: 0; border: 1px solid #d3cdc2; border-bottom: 0;
  border-radius: 18px 18px 0 0; background: #f2efe8; color: #141414;
  box-shadow: 0 -8px 42px #0002; overflow-x: hidden; overflow-y: auto;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif);
  text-align: left; overscroll-behavior: contain;
}
.media-share-sheet::backdrop { background: rgba(5,5,12,.38); }
.media-share-sheet__body { padding: 18px 20px max(18px, env(safe-area-inset-bottom)); }
.media-share-sheet__heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 12px; }
.media-share-sheet__heading h2 { margin: 0; font: 700 17px/1.5 var(--font-sans, sans-serif); letter-spacing: 0; }
.media-share-sheet__heading button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; color: #141414; background: transparent; cursor: pointer; }
.media-share-sheet__media { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.media-share-sheet__media img { width: 96px; height: 60px; object-fit: contain; background: #e3e0d9; border-radius: 5px; flex: 0 0 auto; }
.media-share-sheet__media > div { min-width: 0; }
.media-share-sheet__media small { font-size: 10px; line-height: 1.5; letter-spacing: .08em; color: #68645d; }
.media-share-sheet__media h3 { margin: 4px 0 0; font: 600 15px/1.5 var(--font-sans, sans-serif); overflow-wrap: break-word; text-wrap: pretty; }
.media-share-sheet__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.media-share-sheet__actions button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 52px; padding: 10px 12px; border: 1px solid #d3cdc2; border-radius: 8px; background: #fffdf8; color: #141414; font: 500 13px/1.4 var(--font-sans, sans-serif); cursor: pointer; }
.media-share-icon { display: block; width: 22px; height: 22px; flex: 0 0 22px; color: #141414; pointer-events: none; }
.media-share-sheet__heading .media-share-icon { width: 24px; height: 24px; }
.media-share-sheet__actions button:disabled { opacity: .55; cursor: wait; }
.media-share-sheet__status { margin: 16px 0 0; min-height: 1.5em; color: #484640; font: 400 12px/1.6 var(--font-sans, sans-serif); }
.media-share-sheet__link { display: block; margin-top: 12px; font-size: 12px; }
.media-share-sheet__link input { box-sizing: border-box; display: block; width: 100%; margin-top: 6px; padding: 10px; min-height: 44px; border: 1px solid #b5b0a9; border-radius: 5px; background: #fffdf8; color: #141414; font: 13px/1.4 monospace; user-select: text; -webkit-user-select: text; }
.media-share-sheet__hint { margin: 12px 0; color: #68645d; font-size: 11px; line-height: 1.5; }
.media-share-sheet__cancel { width: 100%; min-height: 46px; border: 0; border-top: 1px solid #d3cdc2; padding: 12px 0 0; background: transparent; color: #141414; font: 500 14px/1.4 var(--font-sans, sans-serif); cursor: pointer; }
@media (max-height: 500px) { .media-share-sheet__body { padding-top: 8px; } .media-share-sheet__media { margin-bottom: 10px; } }
