/* Shared article share dialog, using current theme tokens. */
.site-share-sheet{box-sizing:border-box;width:min(440px,calc(100% - 24px));max-height:90dvh;overflow:auto;padding:24px;margin:auto;border:1px solid var(--journal-line);border-radius:20px;background:var(--journal-panel);color:var(--journal-ink);font:16px/1.6 Manrope,system-ui,sans-serif;box-shadow:0 16px 60px #0003}
.site-share-sheet::backdrop{background:#0006}.site-share-sheet *{box-sizing:border-box;min-width:0}.site-share-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.site-share-heading h2{margin:0;font-size:1.25rem;color:inherit}.site-share-sheet button{font:inherit;min-height:44px;border:1px solid var(--journal-line);border-radius:10px;padding:10px 14px;background:var(--journal-soft);color:var(--journal-accent);cursor:pointer}.site-share-heading button{font-size:1.5rem}.site-share-sheet input{width:100%;font:inherit;padding:12px;background:var(--journal-soft);color:var(--journal-ink);border:1px solid var(--journal-line);border-radius:10px}.site-share-actions,.site-share-scope{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.site-share-actions button{flex:1;display:flex;align-items:center;justify-content:center;gap:8px}.site-share-scope button[aria-pressed=true]{border-color:var(--journal-accent)}.site-share-feedback{color:var(--journal-muted);font-size:.9rem}.site-share-sheet :focus-visible{outline:2px solid var(--journal-accent);outline-offset:3px}
/* Persistent app share control, including standalone mobile/PWA mode. */
.site-share-button{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:44px;min-height:44px;padding:9px;border:1px solid var(--line,#d6dfe6);border-radius:12px;color:var(--ink,#182735);background:var(--panel,#fff);cursor:pointer}
.workspace-active .workspace-topbar .site-share-button{display:inline-flex;min-width:44px;min-height:44px}
.share-card-editor{border-top:1px solid var(--journal-line);margin-top:20px;padding-top:16px}.share-card-editor h3{font-size:18px;margin:0}.share-card-editor p{font-size:14px;line-height:1.6}.share-card-preview{display:flex;justify-content:center}.share-card-preview img{display:block;max-height:350px;width:auto;max-width:100%;border-radius:12px;border:1px solid var(--journal-line)}.site-share-sheet button:disabled{opacity:.5;cursor:default}.share-card-help{color:var(--journal-muted)}
@media(max-width:640px){.workspace-active .workspace-topbar{flex-wrap:wrap}.workspace-active .workspace-topbar .top-actions{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}.site-share-sheet{padding:18px;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.site-share-scope button{flex:1;font-size:14px}}
.workspace-active .workspace-topbar .site-share-button{border-radius:50%;background:transparent;color:var(--muted);border-color:transparent;box-shadow:none}
.workspace-active .workspace-topbar .site-share-button:hover{background:var(--soft);color:var(--ink)}
.workspace-active .workspace-topbar .site-share-button svg{width:20px;height:20px}
/* Scoped above the legacy .workspace-active dialog rule. Header and footer never scroll. */
html body dialog.site-share-sheet:has(.site-share-body){
 --share-safe-top:env(safe-area-inset-top,0px);--share-safe-bottom:env(safe-area-inset-bottom,0px);
 position:fixed;inset:calc(var(--share-offset,0px) + var(--share-safe-top) + 12px) 12px auto;
 width:min(440px,calc(100% - 24px));max-width:calc(100% - 24px);height:auto;
 max-height:calc(var(--share-vh,100dvh) - var(--share-safe-top) - var(--share-safe-bottom) - 24px);
 margin:0 auto;padding:0;border:1px solid var(--journal-line);border-radius:20px;
 background:var(--journal-panel);color:var(--journal-ink);overflow:hidden;
 font:400 16px/1.5 Manrope,system-ui,sans-serif;box-sizing:border-box;
}
html body dialog.site-share-sheet:has(.site-share-body)[open]{display:flex;flex-direction:column}
html body dialog.site-share-sheet:has(.site-share-body) .site-share-heading{flex:none;gap:12px;padding:12px 16px;border-bottom:1px solid var(--journal-line);background:var(--journal-panel)}
html body dialog.site-share-sheet:has(.site-share-body) .site-share-heading h2{font:700 18px/1.25 Manrope,system-ui,sans-serif;margin:0;min-width:0;color:var(--journal-ink);overflow-wrap:anywhere}
html body dialog.site-share-sheet:has(.site-share-body) [data-share-close]{flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;display:grid;place-items:center;font-size:26px;line-height:1;border-radius:50%;background:var(--journal-soft);color:var(--journal-ink);box-shadow:none}
html body dialog.site-share-sheet:has(.site-share-body) .site-share-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:16px}
html body dialog.site-share-sheet:has(.site-share-body) .site-share-footer{flex:none;padding:10px 16px;border-top:1px solid var(--journal-line);background:var(--journal-panel)}
html body dialog.site-share-sheet:has(.site-share-body) [data-share-done]{width:100%;min-height:44px;font-weight:700;color:var(--journal-ink);background:var(--journal-soft)}
html body dialog.site-share-sheet:has(.site-share-body) :is(p,label){color:var(--journal-muted);font-size:14px;line-height:1.55}
html body dialog.site-share-sheet:has(.site-share-body) .site-share-description{color:var(--journal-ink);font-weight:600;margin:12px 0}
html body dialog.site-share-sheet:has(.site-share-body) label{display:block;margin:0 0 6px}
html body dialog.site-share-sheet:has(.site-share-body) input{font-size:16px;min-height:44px;padding:10px 12px;background:var(--journal-soft);color:var(--journal-ink);border-color:var(--journal-line)}
html body dialog.site-share-sheet:has(.site-share-body) .site-share-scope{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 16px}
html body dialog.site-share-sheet:has(.site-share-body) .site-share-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0 0}
html body dialog.site-share-sheet:has(.site-share-body) button{font-size:14px;line-height:1.3;white-space:normal;overflow-wrap:anywhere;min-height:44px;padding:10px;color:var(--journal-accent);background:var(--journal-soft);box-shadow:none}
html body dialog.site-share-sheet:has(.site-share-body) button[aria-pressed=true]{background:var(--journal-soft)!important;color:var(--journal-accent)!important;border-color:var(--journal-accent)!important;box-shadow:inset 0 0 0 1px var(--journal-accent)!important}
html body dialog.site-share-sheet:has(.site-share-body) .site-share-feedback:empty{display:none}
html body dialog.site-share-sheet:has(.site-share-body) .share-card-editor{margin:18px 0 0;padding:0;border:1px solid var(--journal-line);border-radius:12px;background:var(--journal-panel)}
html body dialog.site-share-sheet:has(.site-share-body) .share-card-editor>summary{cursor:pointer;min-height:48px;padding:13px 12px;font-size:14px;line-height:1.5;font-weight:700;color:var(--journal-ink);background:var(--journal-soft);border-radius:12px}
html body dialog.site-share-sheet:has(.site-share-body) .share-card-editor>:not(summary){margin:12px}
html body dialog.site-share-sheet:has(.site-share-body) .share-card-preview img{max-height:min(240px,30dvh);max-width:100%;width:auto;object-fit:contain}
html body dialog.site-share-sheet:has(.site-share-body) .share-card-status{font-size:12px;text-align:center;margin:8px 12px}
html body dialog.site-share-sheet:has(.site-share-body) .share-card-help{font-size:13px}
@media(display-mode:standalone){html body dialog.site-share-sheet:has(.site-share-body){--share-safe-top:max(48px,env(safe-area-inset-top,0px));--share-safe-bottom:max(20px,env(safe-area-inset-bottom,0px))}}
@media(min-width:641px){html body dialog.site-share-sheet:has(.site-share-body){inset:0;margin:auto;max-height:min(820px,calc(var(--share-vh,100dvh) - 48px))}}
