/* Exported cards are self-contained SVG/PNG; only this dialog follows the page theme. */
.share-dialog {
  position:fixed; inset:0; width:min(760px,calc(100% - 48px)); max-width:none;
  max-height:calc(100dvh - 48px); margin:auto; padding:0; overflow:auto;
  color:var(--ink); background:var(--panel); border:1px solid var(--panel-border,var(--line));
  border-radius:24px; box-shadow:0 35px 140px #0008; overscroll-behavior:contain;
  font-family:inherit; -webkit-backdrop-filter:blur(30px); backdrop-filter:blur(30px);
}
.share-dialog::backdrop { background:#02070dd4; -webkit-backdrop-filter:blur(9px); backdrop-filter:blur(9px); }
.share-dialog [hidden] { display:none!important; }
.share-dialog-shell { padding:24px; }
.share-masthead { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.share-identity { display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-width:0; }
.share-brand { color:var(--ink); font-size:19px; font-weight:450; letter-spacing:-.075em; }
.share-eyebrow { border-left:1px solid var(--line); padding-left:12px; color:var(--subtle); font-size:10px; letter-spacing:.045em; line-height:1.5; }
.share-close { flex-shrink:0; width:36px; height:36px; padding:0; border:1px solid var(--line); border-radius:50%; color:var(--muted); font-size:24px; font-weight:300; line-height:1; }
.share-close:hover { background:var(--action-hover); }
.share-dialog .share-heading { position:static; display:block; padding:16px 0 22px; pointer-events:auto; background:none; }
.share-heading h2 { margin:0; color:var(--ink); font-weight:400; font-size:27px; letter-spacing:-.045em; line-height:1.2; }
.share-main { display:grid; grid-template-columns:minmax(0,1fr); gap:26px; align-items:start; }
.share-visual { min-width:0; padding:8px; border:1px solid var(--line); border-radius:17px; background:var(--input,var(--bg)); }
.share-card-preview { width:100%; min-width:0; display:grid; place-items:center; position:relative; border-radius:11px; overflow:hidden; background:radial-gradient(ellipse at 75% 10%,#114555,#080e19 70%); }
.share-card-preview[data-format="square"] { max-width:50dvh; margin:0 auto; }
.share-card-preview img { display:block; width:100%; height:100%; object-fit:contain; }
.share-preview-placeholder { padding:32px 16px; color:#b7d1dd; text-align:center; font-size:12px; }
.share-preview-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px 12px; padding:12px 5px 5px; }
.share-dimensions { font-variant-numeric:tabular-nums; font-size:9px; letter-spacing:.08em; color:var(--subtle); }
.share-ready-status { display:flex; align-items:center; gap:6px; font-size:10px; color:var(--muted); }
.share-ready-status:before { content:""; width:4px; height:4px; border-radius:50%; background:var(--muted); }
.share-dialog[data-share-ready="true"] .share-ready-status:before { background:#75d4ac; box-shadow:0 0 6px #75d4ac55; }
.share-controls { display:block; min-width:0; margin-top:20px; color:var(--muted); }
.share-controls > summary { cursor:pointer; font-size:12px; padding:10px 0; }
.share-controls[open] > :not(summary) { margin-top:16px; }
.share-fieldset { padding:0; margin:0; min-width:0; border:0; }
.share-fieldset legend { display:block; padding:0; margin:0 0 9px; color:var(--label); font-size:10px; line-height:1.5; }
.share-segmented { display:flex; width:100%; padding:3px; gap:3px; border:1px solid var(--line); border-radius:11px; background:var(--input,var(--bg)); }
.share-segmented button { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:43px; padding:9px 7px; border:1px solid transparent; border-radius:8px; color:var(--muted); font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
.share-segmented button[aria-pressed="true"] { border-color:var(--action-border); color:var(--selected-ink); background:var(--selected); }
.share-segmented button:hover:not(:disabled) { background:var(--action-hover); }
.share-segmented small { color:var(--subtle); font-size:8px; letter-spacing:.045em; font-variant-numeric:tabular-nums; }
.share-format-group button { min-height:57px; }
.share-note { margin:10px 2px 0; color:var(--subtle); font-size:10px; line-height:1.65; overflow-wrap:anywhere; }
.share-text-button { min-height:36px; margin-top:5px; padding:6px 2px; color:var(--panel-link,var(--ice)); text-align:start; font-size:11px; text-decoration:underline; text-decoration-color:var(--line); text-underline-offset:4px; }
.share-footer { display:flex; flex-wrap:wrap; gap:8px; margin-top:24px; padding-top:19px; border-top:1px solid var(--line); }
.share-action { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:11px 17px; border:1px solid var(--action-border); border-radius:11px; background:var(--action); color:var(--ink); font-size:12px; line-height:1.4; text-align:center; text-decoration:none; cursor:pointer; }
.share-action:hover:not(:disabled) { background:var(--action-hover); }
.share-action.share-primary { background:var(--primary); color:var(--primary-ink); border-color:var(--focus); }
.share-copy { margin-inline-start:auto; }
.share-dialog button:focus-visible,.share-dialog input:focus-visible,.share-dialog a:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
.share-dialog button:disabled,.share-dialog [aria-disabled="true"] { opacity:.4; cursor:default; }
.share-status { margin:12px 0 0; color:var(--muted); font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.share-status:empty { display:none; }
.share-fallback-link { display:block; width:100%; min-height:42px; margin-top:12px; padding:10px; background:var(--input); border:1px solid var(--line); border-radius:8px; font-size:12px; }
.share-dialog-backdrop[data-fallback="true"] { position:fixed; inset:0; z-index:50; display:grid; place-items:center; background:#02070dd4; }
.share-dialog-backdrop[data-fallback="true"] .share-dialog { position:relative; inset:auto; }
:root[data-theme="paper"] .share-dialog::backdrop { background:#27354088; }
@media(max-width:760px) {
  .share-dialog { width:calc(100% - 24px); max-height:calc(100dvh - 24px); border-radius:20px; }
  .share-dialog-shell { padding:19px; }
  .share-main { grid-template-columns:minmax(0,1fr); gap:19px; }
  .share-controls { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:17px; }
  .share-content-section { grid-column:1/-1; }
  .share-heading h2 { font-size:25px; }
  .share-dialog .share-heading { padding:14px 0 18px; }
  .share-card-preview[data-format="square"] { max-width:42dvh; }
  .share-footer { margin-top:19px; padding-top:17px; }
}
@media(max-width:420px) {
  .share-dialog { width:calc(100% - 16px); max-height:calc(100dvh - 16px); border-radius:17px; }
  .share-dialog-shell { padding:15px; }
  .share-eyebrow { font-size:9px; }
  .share-identity { gap:8px; }
  .share-eyebrow { padding-left:8px; max-width:133px; }
  .share-controls { grid-template-columns:minmax(0,1fr); gap:17px; }
  .share-fieldset legend { margin-bottom:7px; }
  .share-format-group button { min-height:49px; }
  .share-visual { padding:5px; border-radius:13px; }
  .share-preview-footer { padding:10px 4px 5px; }
  .share-card-preview { border-radius:9px; }
  .share-card-preview[data-format="square"] { max-width:100%; }
  .share-action { flex:1; padding:10px 11px; }
  .share-copy { margin-inline-start:0; }
}
