#screenShareDialog {
  width: min(860px, calc(100vw - 32px));
  height: min(690px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ui-divider);
  border-radius: 14px;
  background: var(--theme-surface);
  color: var(--theme-ink);
}
#screenShareDialog[open] {
  display: flex;
  flex-direction: column;
}
.share-dialog-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--ui-divider);
  flex-shrink: 0;
}
.share-dialog-header > div {
  flex: 1;
  min-width: 0;
}
#screenShareTitle {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
#sharePhase {
  display: block;
  margin-top: 3px;
  color: var(--theme-quiet);
  font-size: 11px;
}
#sharePhase[data-live='true'] {
  color: var(--theme-ok);
}
#closeScreenShare {
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: 0;
}
.share-dialog-body {
  flex: 1;
  min-height: 0;
  padding: 16px 20px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.share-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.share-presets button {
  min-width: 0;
  text-align: left;
  border: 1px solid var(--ui-divider);
  background: var(--theme-card);
  color: var(--theme-ink);
  padding: 12px;
  border-radius: 10px;
}
.share-presets button[aria-pressed='true'] {
  background: var(--theme-selected);
  border-color: var(--theme-accent);
  box-shadow: inset 0 0 0 1px var(--theme-accent);
}
.share-presets strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.share-presets small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px;
  color: var(--theme-quiet);
}
.share-dialog-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.share-preview {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #0c1320;
  color: #cbd5e5;
  border: 1px solid var(--ui-divider);
}
.share-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
#chooseShareSource {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
}
#chooseShareSource:not(:disabled):is(:hover, :focus-visible) {
  box-shadow: inset 0 0 0 2px var(--theme-accent);
}
#chooseShareSource:disabled {
  cursor: default;
}
#sharePreviewEmpty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  text-align: center;
  gap: 8px;
}
#sharePreviewMark .ui-icon {
  width: 30px;
  height: 30px;
  color: #93abc9;
  margin-bottom: 4px;
}
#sharePreviewEmpty strong {
  font-size: 13px;
}
#sharePreviewEmpty p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  max-width: 240px;
  color: #93abc9;
}
.share-source-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 46px;
}
#shareCaptureSize {
  font-size: 12px;
  color: var(--theme-quiet);
  font-variant-numeric: tabular-nums;
}
#changeShareSource {
  font-size: 12px;
  padding: 6px 10px;
}
#shareAudioHint {
  margin: 6px 0 0;
  font-size: 12px;
}
.share-quality-panel > label,
.share-field-pair label,
.share-advanced > label {
  display: block;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
}
.share-field-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
#screenShareDialog :is(select, input[type='number']) {
  display: block;
  width: 100%;
  min-height: 40px;
  margin-top: 7px;
  padding: 8px 10px;
  border: 1px solid var(--ui-divider);
  border-radius: 7px;
  color: var(--theme-ink);
  background: var(--ui-control);
  font-size: 13px;
}
.share-unit {
  float: right;
  color: var(--theme-quiet);
  font-weight: 400;
}
#shareUploadHint {
  min-height: 40px;
  margin: -6px 0 18px;
  font-size: 11px;
}
#screenShareDialog .share-check {
  display: flex;
  align-items: start;
  gap: 8px;
  line-height: 1.5;
  font-weight: 400;
}
.share-check input {
  margin: 2px 0 0;
  width: 16px;
  height: 16px;
  accent-color: var(--theme-accent);
}
.share-advanced {
  border-top: 1px solid var(--ui-divider);
  padding-top: 14px;
}
.share-advanced summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--theme-quiet);
  margin-bottom: 14px;
}
.share-advanced .field-help {
  margin: 0;
  font-size: 11px;
}
.share-dialog-footer {
  flex-shrink: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--ui-divider);
}
#shareFeedback {
  height: 36px;
  overflow: auto;
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--theme-quiet);
}
#shareFeedback[data-error='true'] {
  color: var(--theme-bad);
}
.share-dialog-footer > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
#stopScreenShare {
  margin-right: auto;
}
#startScreenShare,
#stopScreenShare {
  width: 138px;
  min-width: 0;
  white-space: nowrap;
}
#screenShareDialog :is(button, select, input):focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  #screenShareDialog {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    border-radius: 12px;
  }
  .share-dialog-header {
    gap: 8px;
    padding: 16px;
  }
  #screenShareTitle {
    font-size: 18px;
  }
  #sharePhase {
    font-size: 10px;
  }
  .share-dialog-body {
    padding: 16px;
  }
  .share-presets {
    gap: 6px;
    margin-bottom: 20px;
  }
  .share-presets button {
    padding: 10px 8px;
  }
  .share-presets small {
    font-size: 10px;
  }
  .share-dialog-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .share-dialog-footer {
    padding: 10px 16px 14px;
  }
  #screenShareDialog :is(button, select, input[type='number']) {
    min-height: 44px;
  }
  #screenShareDialog :is(select, input[type='number']) {
    font-size: 16px;
  }
}
.share-metrics {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  margin: 24px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--ui-divider);
  font-size: 11px;
}
.share-metrics dt {
  color: var(--theme-quiet);
}
.share-metrics dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
#shareHealthHint {
  font-size: 11px;
  margin: 0;
  min-height: 48px;
}
#shareCaptureSize {
  margin-right: auto;
}
#muteShareAudio {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 6px;
  background: transparent;
  border: 0;
}
#muteShareAudio[aria-pressed='true'] {
  color: var(--theme-bad);
}
