body.sharing-active::before { background: #091218; }
body.sharing-active .onboarding.container-fluid { height: var(--setup-viewport-height, 100dvh); }
body.sharing-active .onboarding-header { padding: max(10px, env(safe-area-inset-top)) 20px 8px; }
body.sharing-active .onboarding-brand { font-size: 26px; }
.onboarding .activation-screen.share-screen { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto minmax(0,1fr); align-items: stretch; justify-content: stretch; text-align: left; max-width: 920px; gap: 12px; padding: 10px 20px max(16px, env(safe-area-inset-bottom)); }
.onboarding .share-heading h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 36px); }
.share-screen .share-heading p { color: #b6c6cf; font-size: 14px; line-height: 1.4; }
.share-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 4px; background: #13242e; border-radius: 12px; }
.share-tabs button { padding: 10px 4px; border: 0; border-radius: 9px; color: #b6c6cf; background: transparent; font-size: 13px; line-height: 1.2; }
.share-tabs button[aria-selected=true] { background: #7fffd4; color: #10231c; font-weight: 650; }
.share-panel { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px; border: 1px solid #304551; border-radius: 16px; background: #101f29; overscroll-behavior: contain; }
.share-panel h2 { font-size: 20px; font-weight: 650; margin: 0 0 8px; }
.share-screen .share-caption { margin: 0 0 16px; color: #b6c6cf; font-size: 13px; line-height: 1.5; }
.share-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.share-section-heading h2 { margin: 0; }
.signature-styles { display: flex; gap: 4px; }
.signature-styles button, .share-portrait { padding: 6px 9px; font-size: 12px; border: 1px solid #476271; border-radius: 8px; background: transparent; color: #b6c6cf; }
.signature-styles button[aria-pressed=true] { border-color: #7fffd4; color: #7fffd4; }
#signature-portrait { margin-left: 4px; }
.share-portrait:disabled { opacity: .45; cursor: default; }
.signature-preview { background: #fff; color: #1b2e3a; padding: 20px; border-radius: 10px; overflow: auto; margin: 14px 0; color-scheme: light; overflow-wrap: anywhere; }
.signature-preview table { max-width: 100%; }
.signature-preview img { max-width: 100%; }
.signature-combined { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; margin: 14px 0; }
.signature-combined .signature-preview { min-width: 0; margin: 0; }
.signature-code { min-width: 0; padding: 16px; border-radius: 10px; background: #fff; color: #1b2e3a; color-scheme: light; }
.signature-code-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.signature-code .share-text-button { color: #147d65; }
.signature-code .signature-source { margin: 8px 0 0; max-height: 80px; overflow-y: auto; }
@media (min-width: 760px) {
 .signature-combined { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .signature-code .signature-source { max-height: 240px; }
}
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.share-card-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 660px; }
.share-card-actions a { min-width: 0; min-height: 44px; padding: 10px 6px; white-space: nowrap; }
.share-card-actions svg { width: 16px; height: 16px; flex: none; }
.share-primary, .share-secondary { display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.4; text-decoration: none; }
.share-primary { background: #7fffd4; color: #10231c; border: 1px solid #7fffd4; font-weight: 650; }
.share-secondary { background: transparent; color: #d9e6ed; border: 1px solid #536d7b; }
.share-primary:hover { color: #10231c; background: #a1ffe1; }
.share-secondary:hover { color: #fff; border-color: #7fffd4; }
.share-text-button { padding: 4px 0; border: 0; background: transparent; color: #7fffd4; font-size: 12px; line-height: 1.5; text-decoration: none; }
.share-text-button:hover { text-decoration: underline; }
.signature-guide { font-size: 13px; color: #b6c6cf; line-height: 1.5; border-top: 1px solid #304551; padding-top: 12px; }
.signature-guide summary { color: #d9e6ed; cursor: pointer; }
.share-screen .signature-guide p { margin: 10px 0 0; }
.share-card-preview { display: block; width: 100%; max-width: 660px; height: auto; border-radius: 10px; border: 1px solid #304551; }
.share-link label, .share-code label { display: block; font-size: 12px; color: #b6c6cf; margin-bottom: 6px; }
.share-link input, .share-code input { width: 100%; min-width: 0; padding: 10px; border-radius: 8px; border: 1px solid #536d7b; background: #091820; color: #edf6fa; font-size: 16px; }
.share-codes { margin-top: 20px; }
.share-code { margin: 0 0 12px; }
.share-code-field { display: flex; gap: 8px; }
.share-code-field input { flex: 1; }
.share-code-field button { flex: none; }
.share-screen .share-status { margin-top: 12px; color: #7fffd4; font-size: 12px; line-height: 1.5; }
.share-status:empty { display: none; }
@media (max-width: 420px) {
 .share-card-actions { gap: 6px; }
 .share-card-actions a { padding-inline: 4px; gap: 4px; font-size: 12px; }
 .onboarding .activation-screen.share-screen { padding-left: 12px; padding-right: 12px; }
 .share-panel { padding: 12px; }
 .share-tabs button { font-size: 12px; }
 .signature-preview { padding: 16px 12px; }
 .share-primary, .share-secondary { padding: 10px; font-size: 12px; min-height: 42px; }
}
@media (max-height: 550px) {
 .onboarding .activation-screen.share-screen { gap: 8px; padding-top: 2px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
 .share-tabs button { padding-top: 7px; padding-bottom: 7px; }
}

.signature-format { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 12px 0; }
.signature-format label { margin: 0; }
.share-panel .signature-format select { flex: 1; min-width: 0; max-width: 230px; }
.signature-format button { flex: none; }
.signature-preview a { cursor: default; }
.card-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 660px; margin: 0 0 12px; }
.card-gallery button { min-width: 0; padding: 4px; border: 1px solid #536d7b; border-radius: 8px; background: transparent; color: #d9e6ed; font-size: 12px; }
.card-gallery button[aria-pressed=true] { border-color: #7fffd4; color: #7fffd4; box-shadow: 0 0 0 1px #7fffd4; }
.card-gallery img { display: block; width: 100%; aspect-ratio: 1200 / 686; border-radius: 4px; }
.card-gallery span { display: block; padding: 6px 0 2px; }
.share-panel select { max-width: 100%; padding: 8px 10px; border: 1px solid #536d7b; border-radius: 8px; background: #091820; color: #edf6fa; font-size: 16px; }
@media (max-width: 420px) {
 .signature-format select { font-size: 13px; padding: 8px 6px; min-height: 42px; }
 .signature-format label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
.share-codes summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: #c7d7d1; font-size: 14px; }
.share-codes summary::before { content: '›'; margin-right: 10px; font-size: 22px; }
.share-codes[open] summary::before { transform: rotate(90deg); }
.share-codes .share-code { margin-top: 12px; }

.signature-source { background: #fff; color: #1b2e3a; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; max-height: 200px; }
