.prediction-share-button { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.prediction-card .prediction-share-button { position: relative; z-index: 3; padding: .45rem .6rem; font-size: .72rem; }
.prediction-card-title-link { color: inherit; }
.prediction-card-title-link::after { position: absolute; inset: 0; z-index: 1; content: ''; }
.prediction-card:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.prediction-card .prediction-card-top-ai { flex-wrap: wrap; }
.prediction-detail-hero > .prediction-share-button { margin-top: 1.2rem; }
.prediction-share-dialog { width: min(900px, calc(100% - 1.5rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 1.5rem; border: 1px solid var(--border); border-radius: 1.25rem; background: var(--surface); color: var(--text); box-shadow: 0 24px 90px #0005; overflow-y: auto; }
.prediction-share-dialog::backdrop { background: #081810aa; backdrop-filter: blur(5px); }
body:has(.prediction-share-dialog[open]) { overflow: hidden; }
.prediction-share-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.prediction-share-heading h2 { margin: .25rem 0; font-size: 1.35rem; }
.prediction-share-heading .eyebrow { margin: 0; }
.prediction-share-close { flex-shrink: 0; font-size: 1.5rem; width: 42px; height: 42px; padding: 0; }
.prediction-share-message { min-height: 1.5em; margin: 1rem 0; color: var(--text-muted); font-size: .85rem; }
.prediction-share-message:empty { display: none; }
.prediction-share-preview { border-radius: .85rem; overflow: hidden; background: var(--surface-hover); }
.prediction-share-preview img[data-share-image] { display: block; width: auto; max-width: 100%; height: auto; max-height: clamp(160px, calc(100dvh - 330px), 600px); margin-inline: auto; object-fit: contain; filter: none; }
.prediction-share-preview img[hidden], .prediction-share-panel [hidden] { display: none; }
.prediction-share-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem 0 .25rem; position: sticky; bottom: -1.5rem; background: var(--surface); }
.prediction-share-actions > * { flex: 1 1 auto; justify-content: center; text-align: center; font-size: .85rem; }
.prediction-share-actions [aria-disabled='true'], .prediction-share-actions :disabled { opacity: .5; pointer-events: none; }
.prediction-share-fallback { margin-top: 1rem; font-size: .85rem; }
.prediction-share-fallback input { width: 100%; margin-top: .4rem; padding: .7rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); color: var(--text); }
.prediction-share-body .site-layout { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.prediction-share-body .page-content { grid-column: 1; }
.prediction-share-page { width: 100%; max-width: 900px; margin: auto; padding: 1.5rem; }
.prediction-share-backgrounds { min-width: 0; margin: .65rem 0; padding: .4rem .5rem; border: 1px solid var(--border); border-radius: .85rem; }
.prediction-share-background-grid { display: flex; gap: .5rem; overflow-x: auto; padding: 3px; }
.prediction-share-random { margin: .2rem 0 .5rem; font-size: .8rem; }
.prediction-share-background-option { flex: 0 0 88px; min-width: 0; display: flex; padding: .25rem; border: 2px solid var(--border); border-radius: .6rem; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: .7rem; }
.prediction-share-background-option[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); }
.prediction-share-background-option img, .prediction-share-background-default { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .3rem; filter: none; }
.prediction-share-background-default { background: linear-gradient(135deg, #187348, #18222d); }
.free-history-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0; }
@media (max-width: 480px) {
  .prediction-share-dialog { padding: 1rem; }
  .prediction-share-actions { bottom: -1rem; }
  .prediction-share-heading h2 { font-size: 1.15rem; }
}
