/* A single, quiet action surface for section links and prepared posts. */
#share-dialog{max-width:520px;padding:18px 22px 24px;color:var(--pine);max-height:94dvh;overscroll-behavior:contain}
.share-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.share-head h2{font-size:28px;margin:0}
#share-dialog button{font:inherit;cursor:pointer;min-height:44px;padding:10px 14px;color:var(--pine);background:transparent;border:1px solid #a4b5a8;border-radius:3px}
#share-dialog .share-head button{border:0;font-size:24px;min-width:44px;padding:6px}
#share-title{margin:8px 0 18px;font-size:18px;line-height:1.35;font-weight:650}
.share-modes,.share-formats{display:flex;gap:8px;margin-bottom:16px}
.share-modes button{flex:1;font-weight:700!important}
#share-dialog [aria-pressed=true]{background:var(--pine);border-color:var(--pine);color:var(--paper)}
.share-formats{justify-content:center}
.share-formats button{font-size:15px!important}
.share-preview{margin:0 auto 16px;max-width:100%}
.share-preview img{display:block;width:100%;height:auto;background:#e2e8dc}
.share-preview.is-post{width:150px}
.share-preview.is-post.is-feed{width:200px}
#share-dialog figcaption{font-size:13px;line-height:1.4;margin-top:7px;color:var(--muted)}
#share-dialog label{font-size:15px;margin:12px 0 5px}
#share-dialog input,#share-dialog textarea{font-size:15px;line-height:1.45;background:#fffdf8;padding:11px;color:var(--pine)}
#share-dialog textarea{min-height:112px;max-height:200px}
.share-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
#share-dialog .share-actions .button{margin:0;background:var(--gold);border-color:var(--gold);color:var(--deep);width:auto;flex:1}
.share-direct{display:flex;gap:24px;margin-top:8px}
.share-direct a{display:inline-flex;align-items:center;min-height:44px;font-size:15px}
#share-dialog .share-help{font-size:14px;margin-top:12px;line-height:1.4}
#share-status{font-size:15px;line-height:1.4;margin-top:14px}
#share-status:empty{display:none}
#share-dialog button:disabled{opacity:.55;cursor:wait}
.share-unavailable{max-width:540px;margin:auto;min-height:100svh;padding:24px 14px;background:var(--paper)}
.share-unavailable>.wordmark{display:block;text-align:left;padding:10px 16px;margin-bottom:22px}
.share-unavailable .fallback{background:transparent}
.share-unavailable .text-link{display:flex;margin-top:20px}
.lost-wheel{display:block;font-size:64px;line-height:1.2;color:var(--pine);transform:rotate(-18deg);margin:0 0 28px 12px}

.share-unavailable .lost-wheel{display:block;width:72px;height:86px;line-height:72px;margin:0 0 24px;position:static;transform:none;float:none}
.share-unavailable h1{position:static;clear:both}

/* Keep the outer frame fixed while a new guarded preview is prepared. */
#share-dialog{height:min(92dvh,850px);max-height:92dvh;scrollbar-gutter:stable}
.share-preview-stage{min-height:310px;display:flex;align-items:center;justify-content:center;padding:8px 4px 16px}
.share-preview{width:100%;margin-bottom:0}
.share-preview img{border:1px solid #163f434d;box-shadow:0 5px 18px #0d303326}
#share-dialog[aria-busy=true] .share-preview-stage{background:#e2e8dc55}
#share-dialog[aria-busy=true] .share-direct{pointer-events:none}
#share-dialog .share-ai{font-size:14px;line-height:1.4;margin:0 0 12px}
.share-ai>span:first-child{display:inline-block;border:1px solid #a4b5a8;border-radius:3px;padding:2px 7px;font-weight:650;margin-right:6px}
#share-dialog .share-help{margin-bottom:0}
@media(max-height:650px){.share-preview-stage{min-height:250px}.share-preview.is-post{width:120px}.share-preview.is-post.is-feed{width:160px}}

.share-preview.is-post.is-saving{width:min(100%,300px)}
