.card-share { color: var(--gold); }
.share-dialog { position: fixed; box-sizing: border-box; width: min(760px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 24px; color: var(--text); background: linear-gradient(180deg,#1b202b,#12161e); border: 1px solid var(--line-gold); border-radius: 18px; }
.share-dialog h2 { padding-right: 64px; }
.share-close { position: absolute; right: 14px; top: 14px; }
.share-preview { width: 100%; max-height: 60dvh; object-fit: contain; background: #0a0c11; border: 1px solid var(--line-2); border-radius: 10px; }
.share-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.share-format { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-download { padding: 8px; color: var(--gold); }
.share-dialog a { color: var(--gold); }
.share-copy-fallback { width: 100%; min-height: 100px; }
.share-export-host { position: fixed; inset: 0 auto auto 0; z-index: -1; opacity: 0; pointer-events: none; }
.share-landing { position: relative; max-width: 1100px; margin: 28px auto 48px; padding: 28px 24px; text-align: center; border: 1px solid var(--line-gold); border-radius: 20px; background: radial-gradient(ellipse 70% 60% at 50% 0,#d9b46c1f,transparent 70%),var(--panel-fill); box-shadow: var(--shadow-2); }
.share-landing h1 { margin: 12px 0 10px; }
.share-landing h1 span { color: var(--gold-hi); font-size: .6em; letter-spacing: .08em; vertical-align: middle; }
.share-landing .eyebrow { justify-content: center; }
.share-landing .eyebrow::after { content: ""; flex: none; width: 28px; height: 1px; background: linear-gradient(90deg,var(--gold),transparent); }
.share-landing img { display: block; width: min(100%,720px); height: auto; margin: 22px auto; border-radius: 12px; box-shadow: 0 30px 70px -30px #000; }
.share-landing a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin: 6px; padding: 12px 22px; border: 1px solid var(--line-gold); border-radius: 12px; color: var(--gold-hi); text-decoration: none; }
.share-landing a.primary { color: var(--gold-ink); border-color: #fff0c766; }
@media(max-width:600px) { .share-dialog { padding: 16px; } .share-controls,.share-format { gap: 8px; } .share-landing { margin: 16px 0; padding: 14px; } }

/* Share posters. The card is laid out at exactly the size the site shows it in
   pack results and the collection on a desktop page (227.2px wide), and the
   whole poster is rasterized at --scale, so the card keeps that shape, frame,
   name bar and portrait crop and is only ever scaled as a whole. Every other
   length is written in output pixels times --u. */
.share-poster { --u: calc(1px / var(--scale)); box-sizing: border-box; display: flex; flex-direction: column; color: #f4efe5; background: radial-gradient(ellipse at 20% 15%,#38301f 0,transparent 55%),#10121b; border: calc(8 * var(--u)) solid #b99959; font-family: system-ui,sans-serif; }
.share-poster--landscape { --scale: 1.5; position: relative; width: 800px; height: 450px; padding: calc(22 * var(--u)) calc(48 * var(--u)); }
.share-poster--portrait { --scale: 2; width: 540px; height: 675px; padding: calc(40 * var(--u)) calc(64 * var(--u)); }
.share-poster *, .share-poster *::before, .share-poster *::after { animation: none !important; transition: none !important; }
.share-poster .card-tilt,.share-poster .card-turn { transform: none !important; }
/* No turn is active in a flat export; native overflow/radius clips the portrait. */
.share-poster .card-portrait { -webkit-mask-image: none; }
.share-card-wrap { width: 227.2px; flex: none; }
.share-poster-brand { display: flex; align-items: center; justify-content: space-between; gap: calc(18 * var(--u)); padding: 0 0 calc(12 * var(--u)); margin: 0; width: 100%; min-height: 0; border-bottom: var(--u) solid #e7c88a66; color: #e7c88a; font-size: calc(19 * var(--u)); letter-spacing: .06em; }
.share-poster-body { display: flex; flex: 1; align-items: center; min-height: 0; gap: calc(52 * var(--u)); }
.share-poster-words { flex: 1; min-width: 0; }
.share-poster-kicker { margin: 0 0 calc(12 * var(--u)); font-size: calc(22 * var(--u)); color: #e7c88a; }
.share-poster .share-poster-name { margin: 0 0 calc(14 * var(--u)); color: #fff5df; font: 500 calc(42 * var(--u))/1.12 Georgia,serif; overflow-wrap: anywhere; letter-spacing: -.02em; }
.share-poster-slogan { margin: 0 0 calc(14 * var(--u)); font-size: calc(25 * var(--u)); color: #e7c88a; }
.share-poster-blurb { margin: 0 0 calc(18 * var(--u)); font-size: calc(20 * var(--u)); line-height: 1.45; color: #d4d1c8; }
.share-poster-stats { display: flex; gap: calc(9 * var(--u)); flex-wrap: wrap; font: 600 calc(20 * var(--u))/1.2 system-ui,sans-serif; }
.share-poster-stats span { border: var(--u) solid #e7c88a55; padding: calc(8 * var(--u)) calc(10 * var(--u)); }
.share-poster-footer { display: flex; align-items: center; gap: calc(20 * var(--u)); flex: none; width: 100%; padding: 0; margin: 0; border: 0; background: none; text-align: left; }
.share-poster-qr { flex: none; width: calc(130 * var(--u)); height: calc(130 * var(--u)); image-rendering: pixelated; border: calc(4 * var(--u)) solid #fff; border-radius: calc(2 * var(--u)); }
.share-poster-link { display: grid; gap: calc(9 * var(--u)); min-width: 0; }
.share-poster-link strong { font-size: calc(22 * var(--u)); color: #e7c88a; }
.share-poster-link span { font-size: calc(14 * var(--u)); line-height: 1.4; overflow-wrap: anywhere; color: #bcb9b1; }
.share-poster--landscape .share-poster-footer { position: absolute; left: calc(441 * var(--u)); bottom: calc(38 * var(--u)); width: calc(695 * var(--u)); }
.share-poster--landscape .share-poster-words { padding-bottom: calc(135 * var(--u)); }
.share-poster--portrait .share-poster-brand { font-size: calc(21 * var(--u)); }
.share-poster--portrait .share-poster-body { flex-direction: column; gap: calc(20 * var(--u)); justify-content: center; }
.share-poster--portrait .share-poster-words { flex: none; width: 100%; text-align: center; }
.share-poster--portrait .share-poster-kicker { margin-bottom: calc(10 * var(--u)); font-size: calc(26 * var(--u)); }
.share-poster--portrait .share-poster-slogan { margin-bottom: calc(12 * var(--u)); }
.share-poster--portrait .share-poster-blurb { margin-bottom: calc(14 * var(--u)); font-size: calc(24 * var(--u)); line-height: 1.4; }
.share-poster--portrait .share-poster-stats { justify-content: center; font-size: calc(24 * var(--u)); }
.share-poster--portrait .share-poster-footer { padding-top: calc(16 * var(--u)); border-top: var(--u) solid #e7c88a66; }
.share-poster--portrait .share-poster-qr { width: calc(170 * var(--u)); height: calc(170 * var(--u)); }
.share-poster--portrait .share-poster-link span { font-size: calc(17 * var(--u)); }
/* No portrait: a tier-patterned class emblem fills the formal 4:3 window. */
/* The plate keeps the formal border and hairline; WebKit paints the window's
   blurred inner shadows off-centre in an enlarged export, so the plate omits them. */
.share-poster .card-portrait.share-emblem { background: none; box-shadow: none; }
.share-poster .card-portrait.share-emblem::after { box-shadow: inset 0 0 0 2px #15192260; }
.share-emblem-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
