/* Share composer dialog (2026-11-22, package 2 of the reader corrections). Uses only the reader's theme tokens, so every design (Dark, Bright,
   Terminal, Press, Magazine ...) styles it; radii follow the design tokens: --r-pop for the panel and boxes, --r-ctl for controls, --r-chip for chips. One column below 760 px, full screen on phones. */
:root.share-composer-open{overflow:hidden}
.share-composer{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:var(--ink);overflow:hidden}
.share-composer:not([open]){display:none}
.share-composer[open]{display:grid;place-items:center}
.share-composer::backdrop{background:rgba(0,0,0,.46);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}
.sc-panel{display:flex;flex-direction:column;width:min(940px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:var(--r-pop,16px);box-shadow:var(--shadow-hover,0 24px 70px rgba(0,0,0,.35));overflow:hidden;font-size:13px;line-height:1.5}
.sc-head{display:flex;align-items:flex-start;gap:12px;padding:16px 18px 14px;border-bottom:1px solid var(--line)}
.sc-brand{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:var(--r-ctl,9px);background:var(--tint);color:var(--accent-text,var(--accent))}
.sc-brand svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.sc-brand .sc-brand-icon{fill:currentColor;stroke:none}
.sc-head-text{flex:1 1 auto;min-width:0}
.sc-head h2{margin:0;font-size:17px;line-height:1.25;color:var(--heading-ink,var(--ink))}
.sc-head p{margin:3px 0 0;color:var(--muted);font-size:12px}
.sc-close{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;padding:0;border:1px solid transparent;border-radius:var(--r-ctl,8px);background:transparent;color:var(--muted);cursor:pointer}
.sc-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.sc-close:hover,.sc-close:focus-visible{color:var(--ink);background:var(--surface-2);border-color:var(--line)}
.sc-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:20px;align-items:start;min-height:0;padding:16px 18px;overflow:auto;overscroll-behavior:contain}
.sc-options{display:grid;gap:14px;min-width:0}
.sc-group{display:grid;gap:8px;min-width:0;margin:0;padding:0;border:0}
.sc-group legend{padding:0;margin:0 0 8px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.sc-hint{margin:0;color:var(--muted);font-size:11px;line-height:1.55}
.sc-hint:empty{display:none}
.sc-facts{margin:0;padding-top:12px;border-top:1px solid var(--line);color:var(--muted);font-size:11px}
.sc-facts:empty{display:none}
.sc-segment{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:3px;padding:3px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-ctl,9px)}
.sc-segment button{min-width:0;min-height:36px;padding:6px 8px;border:1px solid transparent;border-radius:var(--r-ctl,7px);background:transparent;color:var(--ink);font:inherit;font-size:12px;font-weight:600;line-height:1.2;cursor:pointer;overflow-wrap:anywhere}
.sc-segment button:hover{background:var(--surface)}
.sc-segment button[aria-checked=true]{background:var(--surface);border-color:var(--accent-text,var(--accent));color:var(--accent-text,var(--accent));box-shadow:0 1px 3px rgba(0,0,0,.12)}
.sc-thumbs{display:flex;flex-wrap:wrap;gap:8px}
.sc-thumb{position:relative;display:grid;place-items:center;width:76px;height:56px;padding:0;border:1px solid var(--line);border-radius:var(--r-pop,8px);background:var(--surface-2);color:var(--muted);overflow:hidden;cursor:pointer}
.sc-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.sc-thumb[aria-checked=true]{border-color:var(--accent-text,var(--accent));box-shadow:0 0 0 2px var(--accent-text,var(--accent))}
.sc-thumb-none{gap:2px;font:inherit;font-size:10px}
.sc-thumb-none svg,.sc-thumb-empty svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.sc-thumb-empty{display:grid;place-items:center;width:100%;height:100%}
.sc-thumb-badge{position:absolute;inset:auto auto 4px 4px;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,.62);color:#fff}
.sc-thumb-badge svg{width:11px;height:11px;fill:currentColor;stroke:none}
.sc-chips{display:flex;flex-wrap:wrap;gap:6px}
.sc-chips[hidden]{display:none}
.sc-chip{min-height:30px;padding:4px 10px;border:1px solid var(--line);border-radius:var(--r-chip,999px);background:transparent;color:var(--ink);font:inherit;font-size:12px;cursor:pointer}
.sc-chip[aria-pressed=true],.sc-chip[aria-checked=true]{background:var(--tint);border-color:var(--accent-text,var(--accent));color:var(--accent-text,var(--accent));font-weight:600}
.sc-chip:hover{background:var(--surface-2)}
.sc-switch{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:34px;margin:0;cursor:pointer;font-weight:600;font-size:12px}
.sc-switch input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.sc-tags{gap:8px}
.sc-input{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-ctl,8px);background:var(--bg);color:var(--ink);font:inherit;font-size:12px}
.sc-input[aria-invalid=true]{border-color:var(--ink);outline:2px solid var(--ink)}
.sc-preview{position:sticky;top:0;display:grid;gap:8px;min-width:0}
.sc-preview-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.sc-preview-head strong{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.sc-count{font-size:11px;font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap}
.sc-count[data-state=cut]{color:var(--accent-text,var(--accent))}
.sc-count[data-state=over]{color:var(--danger,#d64545);font-weight:700}
.sc-meter{height:3px;border-radius:3px;background:var(--surface-2);overflow:hidden}
.sc-meter[hidden]{display:none}
.sc-meter span{display:block;height:100%;width:0;background:var(--muted);transition:width .15s}
.sc-meter span[data-state=cut]{background:var(--accent-text,var(--accent))}
.sc-meter span[data-state=over]{background:var(--danger,#d64545)}
.sc-post{display:grid;gap:10px;padding:14px;border:1px solid var(--line);border-radius:var(--r-pop,12px);background:var(--bg);min-width:0}
.sc-post-head{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700}
.sc-avatar{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--accent-fill,var(--accent));color:var(--accent-ink,#fff);font-size:13px;font-weight:800}
.sc-post-name{color:var(--muted);font-weight:600}
.sc-post-title{margin:0;font-weight:700;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.sc-post-text{font-size:13px;line-height:1.55;overflow-wrap:anywhere;white-space:normal}
.sc-post-text:empty{display:none}
.sc-tag,.sc-url{color:var(--accent-text,var(--accent))}
.sc-post-tags{margin:0;display:flex;flex-wrap:wrap;gap:4px 8px;font-size:12px}
.sc-url{word-break:break-all}
.sc-post-link{margin:0;font-size:11px;color:var(--accent-text,var(--accent));word-break:break-all}
.sc-post-media{position:relative;margin:0;border-radius:var(--r-pop,8px);overflow:hidden;border:1px solid var(--line);background:var(--surface-2);aspect-ratio:16/9;display:grid;place-items:center}
.sc-post-media img{width:100%;height:100%;object-fit:cover;display:block}
.sc-post-media .sc-thumb-badge{inset:auto auto 8px 8px;width:30px;height:30px}
.sc-post-media .sc-thumb-badge svg{width:14px;height:14px}
.sc-card{display:grid;border:1px solid var(--line);border-radius:var(--r-pop,8px);overflow:hidden;background:var(--surface)}
.sc-card img{width:100%;aspect-ratio:1.91/1;object-fit:cover;display:block}
.sc-card div{display:grid;gap:2px;padding:8px 10px}
.sc-card strong{font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.sc-card span{font-size:10px;color:var(--muted)}
.sc-editor{width:100%;box-sizing:border-box;min-height:140px;max-height:360px;padding:10px;border:1px solid var(--accent-text,var(--accent));border-radius:var(--r-pop,8px);background:var(--surface);color:var(--ink);font:inherit;font-size:13px;line-height:1.55;resize:vertical}
.sc-edit-row{display:flex;flex-wrap:wrap;gap:6px 14px}
.sc-link-button{display:inline-flex;align-items:center;gap:6px;width:max-content;min-height:30px;padding:4px 2px;border:0;background:transparent;color:var(--accent-text,var(--accent));font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.sc-link-button[hidden]{display:none}
.sc-link-button svg,.sc-primary svg,.sc-secondary svg{width:15px;height:15px;flex:0 0 15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sc-link-button[aria-pressed=true]{text-decoration:underline;text-underline-offset:3px}
.sc-note{margin:0;font-size:11px;color:var(--muted)}
.sc-note:empty{display:none}
.sc-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-top:1px solid var(--line);background:var(--surface)}
.sc-status{flex:1 1 auto;min-width:0;margin:0;font-size:11px;color:var(--muted)}
.sc-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.sc-primary,.sc-secondary{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 16px;border-radius:var(--r-ctl,9px);font:inherit;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.sc-primary{border:1px solid transparent;background:var(--accent-fill,var(--accent));color:var(--accent-ink,#fff)}
.sc-primary:hover{filter:brightness(1.06)}
.sc-primary:disabled{opacity:.45;cursor:not-allowed;filter:none}
.sc-secondary{border:1px solid var(--line);background:transparent;color:var(--ink)}
.sc-secondary:hover{background:var(--surface-2)}
.sc-secondary[hidden]{display:none}
.share-composer :is(button,input,textarea):focus-visible{outline:2px solid var(--accent-text,var(--accent));outline-offset:2px}
@media(max-width:760px){
 .share-composer[open]{place-items:stretch}
 .sc-panel{width:100%;height:100%;max-height:100dvh;border:0;border-radius:0}
 .sc-body{grid-template-columns:minmax(0,1fr);gap:16px;padding:14px 16px}
 .sc-preview{position:static}
 .sc-head{padding:12px 16px}
 .sc-foot{flex-direction:column;align-items:stretch;gap:8px;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}
 .sc-actions{display:flex;flex-wrap:wrap;gap:8px}
 .sc-actions>button{flex:1 1 140px}
 .sc-actions>.sc-primary{flex-basis:100%;order:-1}
 .sc-primary,.sc-secondary{white-space:normal;text-align:center;padding:6px 12px}
}
@media(prefers-reduced-motion:reduce){.sc-meter span{transition:none}}
@media(forced-colors:active){.sc-panel{border-color:CanvasText}.sc-segment button[aria-checked=true],.sc-thumb[aria-checked=true],.sc-chip[aria-pressed=true],.sc-chip[aria-checked=true]{outline:2px solid Highlight}}
