.player-share { margin-left: auto; }
.share-launch, .share-dialog button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--control-border); border-radius: 7px; background: var(--paper); color: var(--accent); font-weight: 650; }
.share-launch { display: inline-flex; gap: 8px; align-items: center; }
.share-launch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.share-launch:hover, .share-dialog button:hover { background: var(--surface-tint); }
.share-dialog { width: min(920px, calc(100% - 40px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 100px #24211d40; }
.share-dialog::backdrop { background: #24211d99; backdrop-filter: blur(4px); }
.share-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.share-heading h2 { font: 600 28px/1.2 Georgia, serif; letter-spacing: -.035em; }
.share-dialog .share-close { display: grid; place-items: center; padding: 0; width: 44px; border: 0; background: transparent; border-radius: 50%; }
.share-dialog .share-close:hover { background: var(--background); }
.share-dialog button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.share-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.share-stage { padding: 28px 32px 16px; background: #e9e5dd; min-width: 0; }
.share-preview { position: relative; display: grid; place-items: center; height: min(54dvh, 500px); }
.share-preview canvas { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; filter: drop-shadow(0 8px 12px #24211d26); }
.share-rendering { position: absolute; padding: 10px 16px; border-radius: 20px; background: var(--paper); color: var(--muted); box-shadow: 0 2px 12px #24211d20; font-size: 13px; }
.share-size { margin-top: 16px; text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.share-controls { padding: 28px 24px; display: flex; flex-direction: column; gap: 28px; }
.share-controls fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.share-controls legend { padding: 0; margin-bottom: 12px; font-size: 13px; font-weight: 650; }
.share-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-options label { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; font-size: 13px; }
.share-options label:hover:not(:has(:disabled)) { background: var(--background); border-color: var(--control-border); }
.share-options label:has(:checked), .share-options label:has(:checked):hover { background: #edf0f5; border-color: var(--accent); color: var(--accent); }
.share-options label:has(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.share-options label:has(:disabled) { opacity: .5; cursor: default; }
.share-swatches { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.share-swatches label { background: transparent; border-color: transparent; padding: 6px; }
.share-swatches label:hover:not(:has(:disabled)) { background: transparent; }
.share-swatches label:has(:checked) { color: var(--ink); }
.share-swatches .share-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #24211d2e; }
.share-dot.dot-navy { background: #243f68; }
.share-dot.dot-forest { background: #2f5d3f; }
.share-dot.dot-wine { background: #713646; }
.share-dot.dot-charcoal { background: #3b3833; }
.share-dot.dot-teal { background: #2f5e66; }
.share-swatches label:has(:checked) .share-dot { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); }
.share-options .share-format { flex-direction: column; gap: 8px; padding: 16px 10px; text-align: center; }
.share-format small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.share-format-icon { display: grid; place-items: center; height: 40px; }
.share-format-icon svg { width: 32px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.share-single { grid-template-columns: 1fr; }
.share-toggle { justify-content: flex-start; }
.share-check { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--control-border); border-radius: 4px; }
.share-check::after { content: ''; display: block; width: 9px; height: 5px; margin: 4px auto 0; border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper); transform: rotate(-45deg); opacity: 0; }
.share-options label:has(:checked) .share-check { background: var(--accent); border-color: var(--accent); }
.share-options label:has(:checked) .share-check::after { opacity: 1; }
.share-status { font-size: 12px; line-height: 1.5; color: var(--muted); }
.share-actions { display: grid; gap: 8px; margin-top: auto; }
.share-dialog .share-native { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; font-size: 14px; }
.share-dialog .share-primary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; background: var(--accent); color: var(--paper); border-color: var(--accent); font-size: 14px; }
.share-dialog .share-primary:hover { background: #192e4e; }
.share-dialog .share-secondary { background: var(--paper); color: var(--accent); }
.share-dialog .share-secondary:hover { background: var(--surface-tint); }
.share-status:empty { display: none; }
@media (max-width: 640px) {
  .share-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .share-heading { padding: 8px 16px; }
  .share-heading h2 { font-size: 24px; }
  .share-body { grid-template-columns: 1fr; }
  .share-stage { padding: 20px 24px 12px; }
  .share-preview { height: min(39dvh, 340px); }
  .share-size { margin-top: 12px; }
  .share-controls { display: grid; grid-template-columns: 1fr 1fr; padding: 16px; gap: 16px 12px; }
  .share-controls legend { margin-bottom: 8px; }
  .share-stat-field { grid-column: 1 / -1; }
  .share-highlight-field { grid-column: 1 / -1; }
  .share-swatches .share-dot { width: 22px; height: 22px; }
  .share-options .share-format { flex-direction: row; gap: 6px; min-height: 48px; padding: 6px; }
  .share-format-icon, .share-format-icon svg { width: 20px; height: 28px; }
  .share-format small { display: none; }
  .share-actions { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .share-format-icon { display: none; }
}
