/* Share image dialog (share-card.js): story / square preview with share, save and copy-link.
   Its own palette, so it looks the same on the goblin finder, the birth card page and the home page. */
.share-card-dialog{--sc-bg:#141936;--sc-ink:#f4ead2;--sc-soft:#c9c2d8;--sc-gold:#d9c48f;--sc-line:rgba(217,196,143,.35);--sc-panel:rgba(0,0,0,.25);
  width:min(92vw,460px);max-height:92vh;overflow:auto;padding:18px 18px 16px;border:1px solid var(--sc-line);border-radius:20px;background:var(--sc-bg);color:var(--sc-ink);box-sizing:border-box;font-family:inherit}
html.theme-light .share-card-dialog{--sc-bg:#fffaf0;--sc-ink:#2a2140;--sc-soft:#5d5672;--sc-gold:#9a7a2e;--sc-line:rgba(154,122,46,.35);--sc-panel:rgba(154,122,46,.08)}
.share-card-dialog::backdrop{background:rgba(0,0,0,.7)}
.share-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}
.share-card-head h2{margin:0;font-size:18px;line-height:1.3;color:var(--sc-ink);word-break:keep-all}
.share-card-close{flex:none;width:40px;height:40px;border-radius:50%;border:1px solid var(--sc-line);background:transparent;color:var(--sc-ink);font-size:18px;cursor:pointer}
.share-card-close::before{content:'✕'}
.share-card-formats{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;border-radius:12px;background:var(--sc-panel);margin:0 0 12px}
.share-card-formats [role=tab]{min-height:40px;border:0;border-radius:9px;background:transparent;color:var(--sc-soft);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.share-card-formats [role=tab][aria-selected=true]{background:var(--sc-gold);color:#1b1630}
html.theme-light .share-card-formats [role=tab][aria-selected=true]{color:#fffaf0}
.share-card-named{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 10px;font-size:13.5px;font-weight:700;color:var(--sc-soft);cursor:pointer}
.share-card-named[hidden]{display:none}
.share-card-named input{width:18px;height:18px;margin:0;accent-color:var(--sc-gold)}
.share-card-preview{position:relative;display:flex;justify-content:center;align-items:center;min-height:220px}
.share-card-preview img{display:block;width:auto;max-width:100%;max-height:52vh;height:auto;border-radius:12px;border:1px solid var(--sc-line);background:#0b0e20}
.share-card-preview img:not([src]){display:none}
.share-card-size{position:absolute;right:8px;bottom:8px;padding:3px 8px;border-radius:999px;background:rgba(0,0,0,.6);color:#fff;font-size:11px;font-variant-numeric:tabular-nums}
.share-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 0}
.share-card-actions button{min-height:46px;padding:0 10px;border-radius:12px;border:1px solid var(--sc-line);background:transparent;color:var(--sc-ink);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.share-card-actions .share-card-primary{grid-column:1/-1;border:0;background:linear-gradient(180deg,#e6cf8f,#c9a85a);color:#1b1630;font-size:16px;font-weight:800}
.share-card-actions button:focus-visible,.share-card-formats [role=tab]:focus-visible,.share-card-close:focus-visible{outline:3px solid var(--sc-gold);outline-offset:2px}
.share-card-status{min-height:1.3em;margin:10px 0 0;text-align:center;font-size:13.5px;line-height:1.5;color:var(--sc-gold);word-break:break-all}
.share-card-hint{margin:4px 0 0;text-align:center;font-size:12px;line-height:1.5;color:var(--sc-soft);word-break:keep-all}
body.share-card-open{overflow:hidden}
@media (max-width:420px){.share-card-dialog{padding:14px 12px 12px}}
