/* The Dashboard's dialog shell (the share dialog, assets/share-card.js, and Current focus's choices, assets/focus-choices.js):
   a Journal modal — header with one hairline, borderless close, closes on a
   click outside — with the card preview on the left and its choices on the right; one column on a phone. */
:is(dialog.tsb-share, dialog.tsb-dialog) { width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 0; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-card, 12px); background: var(--ui-page); color: var(--ui-ink); overflow: auto; box-shadow: 0 24px 64px rgb(0 0 0 / .18); font-family: var(--ui-font); }
:is(dialog.tsb-share, dialog.tsb-dialog)::backdrop { background: var(--app-modal-backdrop, rgb(38 39 40 / .2)); backdrop-filter: var(--app-modal-backdrop-filter, blur(5px)); }
:is(.tsb-share-head, .tsb-dialog-head) { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--ui-line); }
:is(.tsb-share-head, .tsb-dialog-head) h2:focus { outline: none; }
:is(.tsb-share-head, .tsb-dialog-head) h2 { margin: 0; font: 600 var(--ui-type-title-m, 24px/32px) var(--ui-font); letter-spacing: -.01em; }
:is(.tsb-share-close, .tsb-dialog-close) { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -4px -8px -4px 0; padding: 0; border: 0; border-radius: var(--ui-radius-control); background: none; color: var(--ui-ink-2); cursor: pointer; }
:is(.tsb-share-close, .tsb-dialog-close):hover { background: var(--ui-hover); color: var(--ui-ink); }
:is(.tsb-share-close, .tsb-dialog-close) svg { width: 20px; height: 20px; }
.tsb-share-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; padding: 24px; }
.tsb-share-preview { display: grid; place-items: center; min-height: 0; }
.tsb-share-preview canvas { display: block; width: auto; max-width: 100%; height: auto; max-height: min(62vh, 600px); border-radius: 6px; box-shadow: 0 0 0 1px var(--ui-line); }
.tsb-share-preview canvas[data-format="link"] { width: 100%; max-height: none; }
.tsb-share-side { display: grid; gap: 12px; align-content: start; justify-items: start; }
.tsb-share-lede { margin: 0; color: var(--ui-ink-2); font: var(--ui-type-body, 14px/20px) var(--ui-font); }
.tsb-share-note { margin: -4px 0 0; color: var(--ui-ink-3); font: var(--ui-type-caption, 12px/16px) var(--ui-font); }
.tsb-share-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font: var(--ui-type-body, 14px/20px) var(--ui-font); cursor: pointer; }
.tsb-share-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--ui-accent); }
.tsb-share-side .app-action-btn { width: 100%; justify-content: center; margin-top: 8px; }
/* Share or Copy leads; Download sits right under it as the second way out, 8 px apart. */
.tsb-share-side .app-action-btn:not([hidden]) ~ .app-action-btn { margin-top: -4px; }
/* The format toggle carries a picture per format (feed, story, link), drawn like Journal's view toggle: 18 px, 8 px gap. */
.tsb-share .app-view-toggle-btn { gap: 8px; }
.tsb-share .app-view-toggle-btn svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 720px) {
    .tsb-share-body { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
    :is(.tsb-share-head, .tsb-dialog-head) { padding: 16px; }
    .tsb-share-preview canvas { max-height: 48vh; }
    .tsb-share-side { justify-items: stretch; }
    /* The look and format toggles keep their own width, as on a computer: a stretched frame left its buttons at one end.
       Journal's phone calendar narrows its own view toggles to 2 px sides (journal-workspace.css); the dialog keeps its own. */
    .tsb-share-side .app-view-toggle { justify-self: start; }
    html dialog.tsb-share .app-view-toggle .app-view-toggle-btn { min-width: 40px; padding-inline: 10px; }
    /* …and hides their icons; the format's picture is what tells it from the look toggle, so it stays. */
    html dialog.tsb-share .app-view-toggle .app-view-toggle-btn svg { display: block; }
}
