.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; }
}
/* Report gallery: small real exports, with full artwork loaded only on selection. */
.prediction-share-dialog { width: min(1120px, calc(100% - 1.5rem)); }
.prediction-share-subtitle { margin: .35rem 0 .9rem; color: var(--text-muted); font-size: .85rem; }
.prediction-report-styles, .prediction-report-variants { min-width: 0; border: 0; padding: 0; margin: 1rem 0; }
.prediction-report-styles legend, .prediction-report-variants legend { font-size: .85rem; font-weight: 700; margin-bottom: .65rem; }
.prediction-report-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
.prediction-report-theme { min-width: 0; padding: .3rem; border: 2px solid var(--border); border-radius: .75rem; background: var(--surface-hover); color: var(--text); cursor: pointer; text-align: left; font: inherit; transition: transform .15s, border-color .15s; }
.prediction-report-theme img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: .4rem; filter: none; }
.prediction-report-theme span { display: block; padding: .5rem .2rem .25rem; font-size: .73rem; line-height: 1.3; }
.prediction-report-theme[aria-pressed='true'], .prediction-report-art[aria-pressed='true'] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.prediction-report-theme:hover { transform: translateY(-2px); }
.prediction-report-art-grid { display: flex; overflow-x: auto; gap: .55rem; padding: .5rem 2px; }
.prediction-report-art { position: relative; flex: 0 0 105px; padding: .25rem; border: 2px solid var(--border); border-radius: .7rem; background: var(--surface-hover); color: var(--text); cursor: pointer; }
.prediction-report-art img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .4rem; filter: none; }
.prediction-report-art span { position: absolute; bottom: .5rem; left: .5rem; background: #071d27df; color: #fff; padding: .1rem .4rem; border-radius: .3rem; font-size: .7rem; }
.prediction-report-variants p { font-size: .8rem; color: var(--text-muted); }
.prediction-share-preview.prediction-report-zoomed { overflow: auto; max-height: 75dvh; }
.prediction-share-preview.prediction-report-zoomed img[data-share-image] { max-height: none; max-width: none; width: min(1122px, 180vw); margin: 0; }
.prediction-report-pages { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: .6rem 0; }
@media (max-width: 760px) { .prediction-report-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 480px) {
 .prediction-report-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .45rem; }
 .prediction-report-theme span { font-size: .66rem; }
 .prediction-share-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; box-sizing: border-box; }
 .prediction-share-actions { bottom: -1rem; padding-bottom: max(.5rem,env(safe-area-inset-bottom)); }
 .prediction-share-actions > * { flex: 1 1 42%; }
 .prediction-share-page { padding: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .prediction-report-theme { transition: none; } }

@font-face { font-family: ReportSans; src: url('../fonts/reports/manrope.ttf?v=20261020') format('truetype'); font-weight: 200 800; font-style: normal; font-display: block; }
@font-face { font-family: ReportDisplay; src: url('../fonts/reports/oswald.ttf?v=20261020') format('truetype'); font-weight: 200 700; font-style: normal; font-display: block; }

/* R2: named style buttons are server-rendered, even before the renderer loads. */
.prediction-report-styles { margin: 1rem 0; }
.prediction-report-hint { margin: 0 0 .7rem; font-size: .83rem; color: var(--text-muted); }
.prediction-report-current { margin: .7rem 0 0; font-size: .85rem; color: var(--text-muted); }
.prediction-report-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: .6rem; }
.prediction-report-grid .prediction-report-theme { display: flex; align-items: center; justify-content: flex-start; gap: .65rem; width: 100%; min-height: 76px; padding: .5rem .65rem; text-align: left; white-space: normal; box-sizing: border-box; }
.prediction-report-grid .prediction-report-theme img { flex: 0 0 46px; width: 46px; height: 58px; aspect-ratio: auto; object-fit: cover; }
.prediction-report-grid .prediction-report-theme span { min-width: 0; padding: 0; font-size: .82rem; line-height: 1.3; font-weight: 700; }
.prediction-report-grid .prediction-report-theme[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
@media (max-width: 900px) { .prediction-report-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 520px) {
 .prediction-report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
 .prediction-report-grid .prediction-report-theme { gap: .45rem; padding: .4rem; min-height: 72px; }
 .prediction-report-grid .prediction-report-theme img { flex-basis: 36px; width: 36px; height: 48px; }
 .prediction-report-grid .prediction-report-theme span { font-size: .73rem; }
}

@media (max-width: 360px) {
 .prediction-report-grid .prediction-report-theme img { flex-basis: 28px; width: 28px; height: 36px; }
 .prediction-report-grid .prediction-report-theme span { font-size: .7rem; word-break: normal; overflow-wrap: normal; }
}

.prediction-share-panel .prediction-report-grid button.prediction-report-theme[aria-pressed='true'],
.prediction-share-panel .prediction-report-grid button.prediction-report-theme[aria-pressed='true']:not(:disabled):hover {
 border-color: var(--accent); background: var(--accent-soft); color: var(--text);
 box-shadow: 0 0 0 1px var(--accent);
}
.prediction-share-panel .prediction-report-grid button.prediction-report-theme[aria-pressed='true']::after {
 content: '✓'; position: absolute; top: 2px; right: 5px; color: var(--accent); font-size: 12px; line-height: 1;
}

.prediction-report-grid .prediction-report-theme { position: relative; transition: transform .15s; box-shadow: 0 2px 6px var(--shadow); }
.prediction-report-grid .prediction-report-theme[aria-pressed='true'] { box-shadow: 0 0 0 1px var(--accent); }

/* Preserve the selected choice when the global interaction reset clears focused borders. */
@layer interaction-reset {
 .prediction-share-panel button.prediction-report-theme[aria-pressed='true']:is(:focus, :focus-visible, :active) {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent) !important;
 }
}
