html.front-share-open { overflow: hidden; }
.front-share-overlay { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: flex-end; justify-content: center; padding: 24px 12px max(12px, env(safe-area-inset-bottom)); background: rgba(0,0,0,.6); box-sizing: border-box; }
.front-share-sheet { position: relative; display: flex; flex-direction: column; width: min(430px,100%); max-height: calc(100dvh - 48px); overflow: visible; border: 0; border-radius: 9px; background: var(--bg-card, #fff); color: var(--text-primary, #333); box-shadow: none; outline: 0; animation: front-share-enter .22s ease-out both; }
.front-share-handle { position: absolute; width: 40px; height: 4px; left: calc(50% - 20px); top: -10px; border-radius: 9px; background: rgba(255,255,255,.45); }
.front-share-heading { position: relative; display: grid; justify-items: center; gap: 12px; padding: 26px 44px 22px; overflow: hidden; border-radius: 9px 9px 0 0; background: #f6dfb6; color: #8a6426; }
.front-share-heading::before, .front-share-heading::after { position: absolute; z-index: 0; content: ''; width: 320px; height: 180px; border-radius: 50%; pointer-events: none; background: rgba(205,151,65,.12); }
.front-share-heading::before { top: -145px; left: -45px; transform: rotate(-15deg); }
.front-share-heading::after { right: -230px; top: -20px; transform: rotate(40deg); }
.front-share-heading > svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.front-share-heading > img { display: block; width: 34px; height: 34px; filter: var(--icon-theme-filter, none); }
.front-share-heading h2 { margin: 0; color: inherit; font: 700 16px/1.4 var(--front-font-family, sans-serif); }
.front-share-close { position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; color: inherit; opacity: .65; font: 25px/1 sans-serif; cursor: pointer; }
.front-share-options { display: grid; grid-template-columns: repeat(var(--share-columns, 5), minmax(0, 1fr)); gap: 12px 4px; padding: 22px 10px 18px; }
.front-share-option { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text-primary, #333); text-decoration: none; white-space: nowrap; font: 500 11px/1.5 var(--front-font-family, sans-serif); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.front-share-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-secondary, #f5f5f5); }
.front-share-icon img { display: block; width: 28px; height: 28px; filter: none !important; }
.front-share-option:hover { opacity: .75; }
.front-share-option:focus-visible, .front-share-copy:focus-visible, .front-share-close:focus-visible { text-decoration: underline; text-underline-offset: 4px; outline: 0; }
.front-share-copy { display: block; width: calc(100% - 32px); margin: 0 16px 16px; padding: 8px; border: 0; outline: 0; border-radius: 999px; background: transparent; color: var(--text-secondary, #666); font: 500 12px/1.5 var(--front-font-family, sans-serif); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.front-share-heading, .front-share-options, .front-share-copy { flex-shrink: 0; }
.front-share-assist { min-height: 0; overflow-y: auto; padding: 0 18px 12px; overscroll-behavior: contain; }
.front-share-assist[hidden] { display: none; }
.front-share-copy[hidden] { display: none; }
.front-share-preview { display: block; flex-shrink: 1; min-height: 0; width: min(230px, 68vw); max-height: 32dvh; object-fit: contain; margin: 14px auto 0; border-radius: 8px; }
.front-share-with-preview .front-share-heading { gap: 7px; padding-top: 17px; padding-bottom: 14px; }
.front-share-with-preview .front-share-options { width: min(270px, 100%); box-sizing: border-box; margin-inline: auto; }
.front-share-with-note .front-share-options { width: min(270px, 100%); box-sizing: border-box; margin-inline: auto; padding-bottom: 12px; }
.front-share-note { flex-shrink: 0; margin: 0; padding: 0 14px 20px; color: var(--text-primary, #333); text-align: center; font: 500 13px/1.6 var(--front-font-family, sans-serif); overflow-wrap: anywhere; }
.front-share-assist p { margin: 0 0 12px; color: var(--text-secondary, #666); font-size: 12px; line-height: 1.7; }
.front-share-assist textarea { box-sizing: border-box; display: block; width: 100%; min-height: 88px; max-height: 150px; padding: 10px; border: 1px solid var(--border-color, #ddd); border-radius: 8px; background: transparent; color: var(--text-primary, #333); font: 12px/1.7 var(--front-font-family, sans-serif); resize: none; }
.front-share-assist textarea[hidden] { display: none; }
.front-share-option[aria-busy="true"] { opacity: .5; cursor: wait; }
.front-share-qr:not(:empty) { width: 132px; margin: 0 auto 14px; padding: 8px; background: #fff; }
.front-share-qr canvas { display: block; width: 132px; height: 132px; }
@keyframes front-share-enter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .front-share-sheet { animation: none; } }
@media (max-height: 500px) { .front-share-heading { gap: 4px; padding: 12px 40px; } .front-share-heading > :is(svg, img) { width: 24px; height: 24px; } .front-share-options { padding-top: 12px; padding-bottom: 10px; } .front-share-copy { margin-bottom: 8px; padding: 4px; } }

/* 点击、弹窗恢复焦点时不出现外框，键盘焦点用文字下划线提示。 */
body.front-frame-page :is(#shareProductBtn, #productSupportShareBtn, #shopShareBtn, #followShopCardBtn, #publicShopFollow),
body.front-frame-page :is(#shareProductBtn, #productSupportShareBtn, #shopShareBtn, #followShopCardBtn, #publicShopFollow):is(:focus, :focus-visible, :active),
body .front-share-overlay :is(button, a, .front-share-sheet),
body .front-share-overlay :is(button, a, .front-share-sheet):is(:focus, :focus-visible, :active) { outline: 0 !important; box-shadow: none !important; -webkit-tap-highlight-color: transparent; }
body.front-frame-page :is(#followShopCardBtn, #publicShopFollow) { border: 0 !important; }
body.front-frame-page :is(#shareProductBtn, #productSupportShareBtn, #shopShareBtn, #followShopCardBtn, #publicShopFollow):focus-visible { text-decoration: underline; text-underline-offset: 3px; }
