/* Share-sheet helpers: the application owns its modal and Web Share actions. */
.rank-share-sheet{display:grid;gap:16px;min-width:0}
.rank-share-card{width:min(100%,324px);margin:0 auto;aspect-ratio:3/4;background:var(--paper,#f5efdf);border:1px solid var(--line,#d6cfbc);box-shadow:0 8px 24px #24272012;overflow:hidden}
.rank-share-card img{display:block;width:100%;height:auto;max-width:100%;-webkit-touch-callout:default;user-select:auto}
.rank-share-loading{min-height:220px;display:grid;place-items:center;padding:28px;text-align:center;font-size:12px;color:var(--muted,#77786b)}
.rank-share-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rank-share-actions .btn{min-width:0;padding:11px 12px;font-size:12px;gap:8px}
.rank-share-help{margin:0;text-align:center;font-size:11px;line-height:1.65;color:var(--muted,#77786b)}
.rank-share-help strong{font-weight:500;color:var(--ink,#242720)}
.rank-share-error{margin:0;padding:14px 0;font-size:12px;line-height:1.7;color:var(--pink,#c42b77);text-align:center}
@media(max-width:380px){.rank-share-card{max-width:278px}.rank-share-actions{gap:9px}.rank-share-actions .btn{font-size:11px;padding:10px}}
@media(max-height:750px){.rank-share-card{max-width:255px}.rank-share-sheet{gap:12px}}

.share-result{max-width:470px;margin:0 auto;padding:12px 12px calc(18px + var(--nav-height,0px))}
.result-links,.receipt-strip{display:flex;align-items:center;justify-content:space-between;gap:10px}
.result-links{font-size:11px;color:#655d52}
.solved-poster{display:grid;place-items:center;width:min(100%,max(246px,calc((100dvh - var(--header-height,60px) - var(--nav-height,0px) - 85px)*.75)),445px);aspect-ratio:3/4;margin:0 auto;box-shadow:0 4px 12px #382b2824;background:#f4e6ce}
.solved-poster img{width:100%;display:block;-webkit-touch-callout:default}
.poster-actions{display:grid;grid-template-columns:1.25fr 1fr;gap:8px;margin:12px 0}
.poster-actions .btn{min-width:0;padding:9px 8px;font-size:13px;min-height:40px}
.receipt-strip{justify-content:flex-start;border:1px solid #c2b38f;border-radius:5px;padding:10px 12px;background:#f2e9d8;min-height:59px}
.receipt-strip.recorded{border-color:#243c3a;color:#f5e8c8;background:linear-gradient(110deg,#1b3333,#304747)}
.receipt-mark{font:32px/1 Georgia,serif;color:#8c7040}
.recorded .receipt-mark{color:#e9c983}
.receipt-copy{flex:1;min-width:0}
.receipt-copy strong,.receipt-copy small{display:block;line-height:1.45}
.receipt-copy strong{font-size:15px}.receipt-copy small{font-size:11px}
.recorded .receipt-copy small{color:#d0c6a9}
.receipt-action{background:#f5e7c6;color:#262c25;border:1px solid #bca981;border-radius:24px;padding:7px 10px;font-size:12px}
.receipt-refresh{background:transparent;color:inherit;text-decoration:underline;padding:0;font-size:11px}
.result-links{margin:11px 0 0}.result-links .text-link{font-size:inherit}
.result-links [hidden]{display:none}
@media(max-height:650px){.share-result{padding-top:8px}}

/* Match the printed stock and two ink colors of the illustrated cards. */
.solved-poster{background:#f6ead1;box-shadow:0 2px 3px #32222122,0 7px 18px #32222126}
.receipt-strip.recorded{color:#f6ead1;background:#211a1e;border-color:#211a1e;border-left:4px solid #ef2765}
.recorded .receipt-mark{color:#ff5583}
.recorded .receipt-copy small{color:#ddcbc7}
.recorded .receipt-action{background:#f6ead1;color:#30202a;border-color:transparent}

.share-result .case-solution {text-align:center;font-size:13px;margin:9px 0 0}
.card-action-image {display:block;margin:0 auto;width:auto;height:auto;max-height:48dvh;max-width:100%;object-fit:contain;user-select:auto;-webkit-touch-callout:default}
.card-destinations {display:flex;gap:4px;margin-top:16px;border-bottom:1px solid var(--line)}
.card-destinations button {flex:1;min-height:42px;border:0;border-bottom:2px solid transparent;background:transparent;font-weight:600;color:var(--muted)}
.card-destinations button[aria-pressed=true] {color:var(--pink);border-color:currentColor}
.card-action-hint {margin:12px 0;text-align:center;font-size:13px;color:var(--ink)}
.card-file-action[hidden],.rank-card-tip:empty {display:none}

.poster-actions:has(button:disabled) {visibility:hidden}
