:root #download{width:min(500px,calc(100vw - 24px));padding:30px 26px 24px;border:1px solid var(--rim);border-radius:30px;background:var(--surface);box-shadow:var(--surface-shadow),0 16px 60px #142c3826;backdrop-filter:var(--refraction);-webkit-backdrop-filter:var(--refraction)}
#download h2{font:450 clamp(27px,5.8vw,34px)/1.08 var(--heading);letter-spacing:-.035em;margin:10px 40px 20px 0}
.share-summary{display:flex;align-items:center;gap:16px;text-align:left}
#download #export-preview{display:block;flex:none;width:64px;height:104px;object-fit:contain;margin:0;border:1px solid var(--rim);border-radius:12px;box-shadow:0 4px 14px #10283212}
.share-summary p{font-size:16px;line-height:1.4;margin:0;color:var(--ink)}
#transfer{margin-top:22px;text-align:center}
#share-placeholder{display:grid;place-items:center;position:relative;height:170px;color:var(--muted)}
#share-placeholder>svg{width:64px;height:64px;opacity:.7}
#share-loading{position:absolute;width:108px;height:108px;border:1px solid var(--rim);border-top:2px solid var(--accent);border-radius:50%;animation:qr-wait 1.1s linear infinite}
#share-code{display:block;width:248px;max-width:100%;height:auto;margin:0 auto 12px;image-rendering:pixelated;border:1px solid #fff;border-radius:14px;box-shadow:0 8px 24px #10283212}
#share-time{display:block;font-variant-numeric:tabular-nums;font-size:14px;color:var(--muted);margin:0 0 10px}
#share-status{font-size:16px;line-height:1.45;color:var(--ink);margin:12px 0}
#share-explanation{font-size:13px;line-height:1.45;color:var(--muted);margin:18px 0 10px}
#create-qr{width:100%;min-height:52px;padding:14px 20px;border-radius:28px;font-size:17px;font-family:inherit;font-weight:500;background:var(--cta);color:var(--cta-ink);border:1px solid var(--surface-edge);box-shadow:var(--surface-shadow);cursor:pointer}
#create-qr:disabled{opacity:.65;cursor:wait}
#share-received{display:grid;place-items:center;width:96px;height:96px;margin:26px auto 20px;border:1px solid var(--rim);border-radius:50%;color:var(--accent);background:var(--surface);box-shadow:var(--surface-shadow);backdrop-filter:var(--refraction);-webkit-backdrop-filter:var(--refraction)}
#share-received svg{width:64px;height:64px}
#share-finish{width:100%;min-height:56px;margin:8px 0 4px;justify-content:center;gap:12px}
#download[data-state=received] #create-qr{margin-top:8px;min-height:48px;background:var(--surface);color:var(--ink);font-size:15px}
#download[data-state=received] #share-explanation{display:none}
#download .dialog-note{font-size:12px!important;color:var(--muted);line-height:1.4;margin:12px 0 0;text-align:center}
#download [hidden]{display:none!important}
#download{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
#share-consent{text-align:left;color:var(--ink)}
#share-consent>p{font-size:17px;line-height:1.5;margin:0 0 10px}
#share-consent details{font-size:14px;line-height:1.5;color:var(--muted)}
#share-consent summary{min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;color:var(--ink);text-decoration:underline;text-underline-offset:4px}
#share-consent summary::after{content:'+';font-size:24px}#share-consent details[open] summary::after{content:'−'}
#share-consent details p{margin:8px 0 12px}
.share-consent-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:12px;margin-top:18px}
#download .share-consent-actions button{min-height:56px;padding:12px 14px;margin:0;justify-content:center;font:inherit;font-weight:500;font-size:16px;line-height:1.2;color:var(--ink);background:var(--surface);border:1px solid var(--surface-edge);border-radius:30px;box-shadow:var(--surface-shadow);backdrop-filter:var(--refraction);-webkit-backdrop-filter:var(--refraction);cursor:pointer}
#download #share-consent-accept{background:var(--cta);color:var(--cta-ink)}
#download[data-state=consent] #share-explanation{display:none}
#download[data-state=consent] #share-status{font-size:13px;color:var(--muted);margin-top:16px}
#share-consent button:focus-visible,#share-consent summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
:root[data-effects=light] #download{background:var(--panel);backdrop-filter:none;-webkit-backdrop-filter:none}
@keyframes qr-wait{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#share-loading{animation:none;border-color:var(--accent)}}
@media(prefers-reduced-transparency:reduce){:root #download{background:var(--panel);backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(max-height:700px){:root #download{padding:20px 22px}#download h2{margin-top:6px;margin-bottom:12px}.share-summary{gap:12px}#download #export-preview{width:44px;height:72px}#transfer{margin-top:12px}#share-code{width:220px}#share-placeholder{height:110px}#share-explanation{margin-top:12px}}
