.app-header { height: 44px; min-height: 44px; display: flex; align-items: center; gap: 20px; padding: 0 16px; background: var(--chrome); border-bottom: 1px solid var(--line); }
main { padding: 0; max-width: none; }
.workspace { --rail-width: 368px; display: grid; grid-template-columns: clamp(280px, var(--rail-width), 560px) minmax(0, 1fr); min-height: calc(100dvh - 44px); gap: 0; align-items: stretch; }
.panel { border: 0; border-radius: 0; background: transparent; min-width: 0; }
.connection { background: var(--rail); border-right: 1px solid var(--line); padding: 16px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mode-tabs { margin: 10px 0 12px; }
.settings-group { margin: 10px 0; }
.network-settings { margin: 10px 0; border-top: 1px solid var(--line); }
.session { grid-column: 2; grid-row: 1; background: var(--canvas); display: flex; flex-direction: column; min-width: 0; }
.session > .panel { margin: 0; border-top: 1px solid var(--line); }
.session > .stage { border-top: 0; }
.stage { min-width: 0; container: stage / inline-size; }
.stage-viewport { width: 100%; position: relative; display: grid; place-items: center; z-index: 0; overflow: clip; min-width: 0;
  aspect-ratio: 16 / 9; background: var(--panel-raised); }
.stage-viewport:has(> video:not([hidden])), body:is([data-phase=streaming], [data-phase=draining]) .stage-viewport:has(> canvas:not([hidden])) { background: #000; }
.stage-viewport > canvas, .stage-viewport > video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; background: #000; overflow: hidden; }
.stage-viewport[data-fit=fill] > canvas, .stage-viewport[data-fit=fill] > video { object-fit: cover; }
.stage-overlay { grid-area: 1 / 1; width: 100%; min-width: 0; overflow-wrap: anywhere; text-align: center; padding: 0 16px; z-index: 2; pointer-events: none; }
.stage-overlay:has(~ .audio-prompt:not([hidden])) { display: none; }
body[data-phase=draining] .stage-viewport:has(> canvas:not([hidden]), > video:not([hidden])) .stage-overlay { grid-area: 1 / 1; width: auto; padding: 8px 12px; background: var(--canvas); }
.stage-toolbar, .stage-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 16px; border-top: 1px solid var(--line); }
.stage-toolbar:not(:has(button:not([hidden]))) { display: none; }
.stage-footer:not(:has(button:not([hidden]))):has(#audio-track-status:empty) { display: none; }
.stage-footer #disconnect { margin-left: auto; }
#source-match { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.button-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.input-action { display: flex; gap: 6px; align-items: center; }
.input-action button { flex: 0 0 auto; white-space: nowrap; }
.field-pair { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.field-pair label { font-weight: 500; margin: 4px 0 5px; }
.status-strip { font-weight: 400; padding: 8px 16px; color: var(--muted); overflow-wrap: anywhere; }
.status-strip:has(#status:empty) { display: none; }
body[data-phase=error] #status { color: var(--danger); }
.manual-exchange { padding: 12px 16px; }
.manual-exchange > .muted { margin-top: 8px; }
.exchange-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 8px 0; }
.exchange-columns textarea { font: 12px/1.5 var(--mono); }
.exchange-columns button { margin-top: 6px; }
#diagnostics-content { padding: 0 16px 16px; }
.metrics-grid:empty { display: none; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 8px 0 0; }
.metric:nth-child(3n+1) { border-left: 0; }
.metric:nth-child(n+4) { border-top: 1px solid var(--line); }
.instant-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 8px; border-top: 1px solid var(--line); }
.recovery-stack { display: grid; gap: 0; margin: 0; }
.graphs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 12px 0; }
.counters-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin-top: 12px; }
.tuning-heading h3 { font-weight: 600; }
.tuning-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 8px; }
.parameter-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 1.2fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: center; }
.parameter-controls { display: flex; gap: 5px; align-items: center; }
.parameter-controls input, .parameter-controls select, .parameter-controls button { padding: 6px; font-size: 12px; }
.parameter-controls .auto-select { width: 85px; flex: 0 0 85px; }
@media (max-width: 800px) {
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .session { grid-column: 1; grid-row: 2; }
  #rail-resizer { display: none; }
  .connection { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; }
  .app-header { gap: 12px; padding: 0 14px; }
  .stage .panel-heading, .stage-toolbar, .stage-footer, .manual-exchange, .status-strip { padding-left: 14px; padding-right: 14px; }
  .metrics-grid, .instant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3n+1):nth-child(even) { border-left: 1px solid var(--line); }
  .metric:nth-child(odd), .instant-card:nth-child(odd) { border-left: 0; }
  .metric:nth-child(n+3), .instant-card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .graphs-grid, .counters-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
  .exchange-columns, .parameter-row { grid-template-columns: minmax(0, 1fr); }
  .identity-popover { width: min(330px, calc(100vw - 32px)); }
  .tuning-heading { align-items: start; flex-direction: column; }
}
:fullscreen.stage { display: flex; flex-direction: column; border: 0; border-radius: 0; background: var(--canvas); }
:fullscreen.stage .stage-viewport { flex: 1; aspect-ratio: auto; min-height: 0; }

body[data-phase=connecting] #screen, body[data-phase=connected] #screen { visibility: hidden; }

.capture-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.stream-controls { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.stream-controls > .field-pair { margin-top: 0; }
.stream-controls > details { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 4px; }
.stream-controls .button-row { margin-bottom: 0; }
#initial-door-field { margin-bottom: 0; }
#host { margin-top: 14px; }
#voucher-form { display: grid; gap: 10px; padding: 4px 0 12px; }
#voucher-form .capture-grid label { margin-top: 2px; }
#voucher-form .hint { margin-top: -4px; font-size: 12px; }
#voucher-mint { justify-self: start; margin: 0; background: var(--panel-raised); padding: 6px 12px; min-height: 36px; }
#voucher-mint:hover:not(:disabled) { background: var(--hover); }
.stream-controls .input-action input { min-width: 0; }
.stream-list { list-style: none; display: grid; gap: 8px; margin: 8px 0 4px; padding: 0; }
.stream-list li:not(.revoked-invites-row) { border: 0; border-radius: 6px; background: var(--panel-raised); padding: 10px 12px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.stream-list li:not(.revoked-invites-row) .button-row { margin: 6px 0 0; gap: 6px; }
.stream-list li:not(.revoked-invites-row) button { background: var(--surface); border: 1px solid var(--line); padding: 5px 10px; font-size: 12px; }
.stream-list li:not(.revoked-invites-row) button:hover:not(:disabled) { background: var(--hover); }
.stream-list .hint { font-variant-numeric: tabular-nums; }
#stream-qr { display: block; image-rendering: pixelated; width: min(100%, 160px); height: auto; margin: 8px auto; }

body[data-clean=true] { overflow: hidden; background: #000; }
body[data-clean=true] :is(.app-header, .skip-link, .connection, .status-strip, .diagnostics, #manual, #metric-popover,
  #rail-resizer, #source-overlay, #source-match, .stage-footer, #hud, #stage-start, #join, #fullscreen) { display: none; }
body[data-clean=true] .workspace { display: block; }
body[data-clean=true] .stage-viewport { width: 100vw; height: 100dvh; aspect-ratio: auto; background: #000; color: #fff; }
body[data-clean=true] #player-tools { position: fixed; z-index: 4; bottom: max(12px, env(safe-area-inset-bottom));
  right: max(12px, env(safe-area-inset-right)); gap: 6px; padding: 5px; border: 0; border-radius: 8px;
  background: rgba(0, 0, 0, .72); opacity: 0; pointer-events: none; transition: opacity 160ms ease; }
body[data-clean=true] #player-tools > .button-row:not(:has(> :not([hidden]))) { display: none; }
body[data-clean=true] #player-tools button { min-height: 40px; color: #fff; background: rgba(255, 255, 255, .08); }
body[data-clean=true] #player-tools button:hover { background: rgba(255, 255, 255, .18); }
body[data-clean=true] #player-tools:is([data-visible], :focus-within) { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) {
  body[data-clean=true] #player-tools, #rail-resizer::after,
  .identity > summary::after, .disclosure,
  details:not(.identity, .revoked-invites) > summary::after { transition: none; }
}

#rail-resizer {
  grid-column: 2; grid-row: 1; position: relative; justify-self: start; width: 12px; margin-left: -6px;
  z-index: 2; cursor: col-resize; touch-action: none;
}
#rail-resizer::after {
  content: ""; position: absolute; inset: 0 auto 0 50%; width: 2px; transform: translateX(-50%);
  background: transparent; transition: background-color 140ms ease;
}
#rail-resizer:is(:hover, [data-dragging])::after { background: var(--accent); }
#rail-resizer:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

.source-overlay {
  --source-backdrop-duration: 240ms;
  --source-ink: var(--text);
  --source-muted: var(--muted);
  --source-selected: var(--link);
  --source-live: var(--danger);
  --source-hover: var(--hover);
  position: relative; z-index: 4; grid-area: 1 / 1; place-self: stretch;
  display: grid; grid-template-rows: auto minmax(80px, 1fr) auto;
  padding: 12px; pointer-events: none;
}
.source-options, .source-toolbar { position: relative; pointer-events: auto; color: var(--source-ink); }
.source-options { grid-row: 1; justify-self: start; width: min(100%, 308px); }
.source-matrix, .source-tuning { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; }
.source-tuning { margin-top: 6px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--source-ink) 15%, transparent); }
.source-overlay :is(.picker-label, label, .hint) { color: var(--source-muted); }
.source-overlay :is(.picker-label, .source-tuning label) { margin: 0 0 2px; padding-left: 8px; font-size: 12px; }
.source-tuning > div { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.source-overlay .capture-options { display: flex; flex-direction: column; align-items: start; }
.source-overlay .capture-options button { min-width: 62px; text-align: left; }
.source-overlay :is(button, select, input[type=number], .check-label) {
  min-height: 32px; border: 0; background: transparent; border-radius: 5px; color: var(--source-ink);
}
.source-overlay :is(select, input[type=number]):hover:not(:disabled) {
  background: var(--source-hover);
}
.source-overlay :is(button, .check-label) { position: relative; isolation: isolate; }
.source-overlay :is(button, .check-label)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--source-hover); opacity: 0; pointer-events: none;
}
.source-overlay :is(button, .check-label):hover:not(:disabled):not(:has(:disabled))::before { opacity: 1; }
.source-overlay .capture-options button[aria-pressed=true] {
  color: var(--source-selected); font-weight: 600;
}
.source-options .hint { padding: 2px 8px 0; font-size: 12px; }
.source-toolbar {
  grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 0 8px; flex-wrap: wrap;
}
.source-toolbar .button-row { gap: 2px; }
.source-toolbar .button-row:last-child { margin-inline-start: auto; }
.source-toolbar .check-label { margin: 0; padding: 0 8px; cursor: pointer; }
.source-toolbar button, .source-toolbar .check-label { min-height: 40px; }
#source-state { padding: 0 8px; color: var(--source-muted); font-weight: 600; }
body[data-phase=streaming] #source-state, .source-overlay .source-toolbar .danger { color: var(--source-live); }

.stage-viewport:has(> video:not([hidden])) .source-overlay {
  --source-ink: #f1f5f9;
  --source-muted: #d1d9e5;
  --source-selected: #9dccff;
  --source-live: #ff9090;
  --source-hover: rgb(255 255 255 / .13);
  color-scheme: dark; text-shadow: 0 1px 3px #000, 0 0 8px #000b;
}
.stage-viewport:has(> video:not([hidden])) .source-overlay :is(button, input, select) { text-shadow: inherit; }
.stage-viewport:has(> video:not([hidden])) .source-overlay select option { background: #141619; }
.source-backdrop { display: none; position: absolute; pointer-events: none; }
.stage-viewport:has(> video:not([hidden])) .source-backdrop { display: block; }
.source-backdrop-side { --direction: to right; inset: 0 auto 0 0; width: min(420px, 100%); }
.source-backdrop-bottom { --direction: to top; inset: auto 0 0; height: 108px; }
.source-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-color: rgb(6 8 13 / .24);
  -webkit-mask-image: linear-gradient(var(--direction), #000, rgb(0 0 0 / .417) 60%, transparent);
  mask-image: linear-gradient(var(--direction), #000, rgb(0 0 0 / .417) 60%, transparent);
}
.source-backdrop i {
  --idle-filter: blur(0px);
  --filter: var(--active-filter);
  position: absolute; inset: 0;
  -webkit-backdrop-filter: var(--filter);
  backdrop-filter: var(--filter);
  -webkit-mask-image: linear-gradient(var(--direction), var(--mask-stops));
  mask-image: linear-gradient(var(--direction), var(--mask-stops));
}

/* Sampled cubic Bézier (0.5, 0, 0.75, 1). Stronger layers fade out sooner. */
.source-backdrop i:nth-child(1) {
  --idle-filter: saturate(1);
  --active-filter: saturate(.666);
  --mask-stops: #000, rgb(0 0 0 / 0.979) 12.5%, rgb(0 0 0 / 0.912) 25%, rgb(0 0 0 / 0.800) 37.5%, rgb(0 0 0 / 0.642) 50%, rgb(0 0 0 / 0.449) 62.5%, rgb(0 0 0 / 0.245) 75%, rgb(0 0 0 / 0.073) 87.5%, transparent;
}
.source-backdrop i:nth-child(2) {
  --active-filter: blur(0.25px);
  --mask-stops: #000, rgb(0 0 0 / 0.985) 12.5%, rgb(0 0 0 / 0.938) 25%, rgb(0 0 0 / 0.855) 37.5%, rgb(0 0 0 / 0.734) 50%, rgb(0 0 0 / 0.571) 62.5%, rgb(0 0 0 / 0.373) 75%, rgb(0 0 0 / 0.160) 87.5%, transparent;
}
.source-backdrop i:nth-child(3) {
  --active-filter: blur(0.65px);
  --mask-stops: #000, rgb(0 0 0 / 0.980) 12.5%, rgb(0 0 0 / 0.917) 25%, rgb(0 0 0 / 0.809) 37.5%, rgb(0 0 0 / 0.657) 50%, rgb(0 0 0 / 0.468) 62.5%, rgb(0 0 0 / 0.262) 75%, rgb(0 0 0 / 0.083) 87.5%, transparent;
}
.source-backdrop i:nth-child(4) {
  --active-filter: blur(1.25px);
  --mask-stops: #000, rgb(0 0 0 / 0.973) 12.5%, rgb(0 0 0 / 0.892) 25%, rgb(0 0 0 / 0.756) 37.5%, rgb(0 0 0 / 0.575) 50%, rgb(0 0 0 / 0.368) 62.5%, rgb(0 0 0 / 0.172) 75%, rgb(0 0 0 / 0.038) 87.5%, transparent;
}
.source-backdrop i:nth-child(5) {
  --active-filter: blur(2.2px);
  --mask-stops: #000, rgb(0 0 0 / 0.966) 12.5%, rgb(0 0 0 / 0.864) 25%, rgb(0 0 0 / 0.699) 37.5%, rgb(0 0 0 / 0.493) 50%, rgb(0 0 0 / 0.278) 62.5%, rgb(0 0 0 / 0.105) 75%, rgb(0 0 0 / 0.015) 87.5%, transparent;
}
.source-backdrop i:nth-child(6) {
  --active-filter: blur(3.1px);
  --mask-stops: #000, rgb(0 0 0 / 0.958) 12.5%, rgb(0 0 0 / 0.833) 25%, rgb(0 0 0 / 0.640) 37.5%, rgb(0 0 0 / 0.413) 50%, rgb(0 0 0 / 0.202) 62.5%, rgb(0 0 0 / 0.060) 75%, rgb(0 0 0 / 0.005) 87.5%, transparent;
}
.source-backdrop i:nth-child(7) {
  --active-filter: blur(4px);
  --mask-stops: #000, rgb(0 0 0 / 0.947) 12.5%, rgb(0 0 0 / 0.795) 25%, rgb(0 0 0 / 0.572) 37.5%, rgb(0 0 0 / 0.331) 50%, rgb(0 0 0 / 0.135) 62.5%, rgb(0 0 0 / 0.030) 75%, rgb(0 0 0 / 0.001) 87.5%, transparent;
}

@media (hover: hover) {
  .stage-viewport:has(> video:not([hidden])):not(:hover, :focus-within) .source-backdrop { visibility: hidden; }
  .stage-viewport:has(> video:not([hidden])):not(:hover, :focus-within) .source-backdrop::after { background-color: transparent; }
  .stage-viewport:has(> video:not([hidden])):not(:hover, :focus-within) .source-backdrop i { --filter: var(--idle-filter); }
  .stage-viewport:has(> video:not([hidden])):not(:hover, :focus-within) :is(.source-options, .source-toolbar) {
    opacity: 0; pointer-events: none;
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* Fade only the controls. The backdrop layers must keep sampling the video. */
  .source-options, .source-toolbar { transition: opacity 180ms ease; }
  .source-backdrop { transition: visibility 0s; }
  .stage-viewport:has(> video:not([hidden])):not(:hover, :focus-within) .source-backdrop {
    transition-delay: var(--source-backdrop-duration);
  }
  .source-backdrop::after { transition: background-color var(--source-backdrop-duration) ease; }
  .source-backdrop i {
    transition: -webkit-backdrop-filter var(--source-backdrop-duration) ease, backdrop-filter var(--source-backdrop-duration) ease;
  }
}
.source-overlay:not([hidden]) ~ .hud {
  top: 10px; bottom: auto; left: auto; right: 10px; z-index: 5; transform: none; pointer-events: none;
}
.source-overlay:not([hidden]) ~ .audio-prompt { z-index: 6; }
@container stage (width < 540px) {
  .source-overlay:not([hidden]) ~ .hud { top: auto; bottom: 96px; max-width: calc(100% - 20px); }
}
.connection .exchange-columns { grid-template-columns: minmax(0, 1fr); }
.connection .manual-exchange { padding: 12px 0; }
.target-inputs { display: grid; gap: 6px; margin-top: 4px; }
.target-inputs:has(#channel-slot:not([hidden])) { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.handles-panel { max-width: 680px; margin: 32px auto; padding: 0 16px; }
.handles-panel > section { margin-top: 24px; }
.handles-panel > section .panel-heading { margin-bottom: 8px; }
.handles-panel button, .target-inputs > *, #manage-handles { min-height: 40px; }
#handles-refresh { background: var(--panel-raised); padding: 6px 12px; }
#handles-refresh:hover:not(:disabled) { background: var(--hover); }
.input-action button.icon-button { width: 34px; height: 34px; min-height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--panel-raised); }
.input-action button.icon-button:hover:not(:disabled),
.input-action button.icon-button[aria-expanded=true] { color: var(--text); background: var(--hover); }
.input-action button.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
#trusted-handles-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stream-list .revoked-invites-row { border: 0; padding: 2px 0; }
.revoked-invites > summary { display: flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 400; color: var(--muted); }
.revoked-invites > summary::before, .revoked-invites > summary::after {
  content: ""; flex: 1; height: 1px; background: var(--control-line);
}
.revoked-invites[open] > summary { color: var(--text); }
.revoked-invites .stream-list { margin-top: 6px; }
.handle-combobox { position: relative; }
.handle-control {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 36px; padding: 4px 6px;
  border: 1px solid var(--control-line); border-radius: 4px; background: var(--surface); cursor: text;
}
.handle-control:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.handle-combobox[data-disabled=true] .handle-control,
#setup[disabled] .handle-control { opacity: .55; cursor: not-allowed; }
.handle-chips { display: contents; }
.handle-control input { flex: 1 1 48px; min-width: 48px; width: auto; border: 0; padding: 2px 4px; background: transparent; }
.handle-control input:focus-visible { outline: none; }
.handle-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 4px 2px 8px;
  border: 1px solid var(--control-line); border-radius: 4px; background: var(--panel-raised);
  color: var(--text); font-size: 12px; font-weight: 500;
}
.handle-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handle-chip-remove {
  display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  padding: 0; border-radius: 3px; color: var(--muted);
}
.handle-chip-remove:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.handle-chip-remove svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.handle-menu {
  position: absolute; z-index: 7; top: calc(100% + 4px); left: 0; right: 0; display: grid; gap: 2px;
  padding: 6px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--surface);
  box-shadow: 0 4px 16px #0002; max-height: 220px; overflow-y: auto;
}
.handle-menu-all {
  width: 100%; padding: 7px 9px; border-radius: 5px; background: var(--panel-raised);
  color: var(--muted); font-weight: 500; text-align: left;
}
.handle-menu-all:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.handle-options { display: grid; gap: 2px; }
.handle-option, .handle-menu-add {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border-radius: 5px;
  text-align: left; font-weight: 500; color: var(--text);
}
.handle-option:hover:not(:disabled), .handle-menu-add:hover:not(:disabled) { background: var(--hover); }
.handle-check {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 18px; height: 18px; border: 1.5px solid var(--control-line); border-radius: 5px; color: var(--canvas);
}
.handle-check svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.handle-option[aria-selected=true] .handle-check { background: var(--text); border-color: var(--text); }
.handle-option[aria-selected=true] .handle-check svg { opacity: 1; }
.handle-option-slug { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handle-option-tag { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--muted); }
.handle-menu-add { color: var(--link); }
.handle-menu-empty { padding: 6px 8px; margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .handles-panel button { transition: scale 120ms ease; }
  .handles-panel button:active:not(:disabled) { scale: .96; }
  .source-overlay :is(button, .check-label)::before { transition: opacity 120ms ease; }
}
