.lc-pair { display: grid; gap: 24px; align-items: center; }
@media (min-width: 720px) { .lc-pair { grid-template-columns: 300px 1fr; } }

.lc-qr { aspect-ratio: 1; width: 100%; max-width: 300px; margin: 0 auto; border-radius: 24px; background: #fff; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.lc-qr:empty { background: var(--surface-2); }
.lc-qr canvas, .lc-qr svg { width: 100% !important; height: auto !important; display: block; }

/* Connecting: the QR blurs and a phone → computer animation sits on top. */
.lc-qr-wrap { position: relative; width: 100%; max-width: 300px; margin: 0 auto; }
.lc-qr { transition: filter .3s, opacity .3s; }
.lc-linking { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px; border-radius: 24px; background: rgba(255,255,255,.82); color: #1c1c1e; opacity: 0; visibility: hidden; transform: scale(.96); transition: opacity .25s, transform .25s, visibility .25s; }
.lc-qr-wrap.is-linking .lc-qr { filter: blur(6px); opacity: .5; }
.lc-qr-wrap.is-linking .lc-linking { opacity: 1; visibility: visible; transform: none; }
.lc-link-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.lc-node { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.lc-node-phone { background: #e2f87f; }
.lc-node svg { width: 24px; height: 24px; }
.lc-flow { display: flex; gap: 6px; }
.lc-flow i { width: 7px; height: 7px; border-radius: 50%; background: #1c1c1e; opacity: .15; animation: lc-flow 1.1s linear infinite; }
.lc-flow i:nth-child(2) { animation-delay: .15s; }
.lc-flow i:nth-child(3) { animation-delay: .3s; }
.lc-flow i:nth-child(4) { animation-delay: .45s; }
.lc-flow i:nth-child(5) { animation-delay: .6s; }
@keyframes lc-flow { 0%, 60%, 100% { opacity: .15; transform: none; } 30% { opacity: 1; transform: scale(1.5); } }
.lc-link-step { font-size: .88rem; color: #6b6b70; }
@media (prefers-reduced-motion: reduce) { .lc-flow i { animation: none; opacity: .6; } }

.lc-state { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: .92rem; }
.lc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.lc-state[data-kind="wait"] .lc-dot { background: #7bc043; animation: lc-pulse 1.6s ease-in-out infinite; }
.lc-state[data-kind="busy"] .lc-dot { background: #e0a800; animation: lc-pulse .8s ease-in-out infinite; }
.lc-state[data-kind="error"] .lc-dot { background: #d64545; }
@keyframes lc-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .lc-dot { animation: none !important; } }

.lc-steps { margin: 0 0 10px; padding-left: 1.3em; line-height: 1.9; }

.lc-stage { position: relative; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.lc-screen { position: relative; background: #000; overflow: hidden; }
.lc-video { display: block; width: 100%; max-height: 75vh; aspect-ratio: 16 / 9; object-fit: contain; background: #000; transition: transform .25s; }
.lc-screen:fullscreen .lc-video { max-height: none; height: 100%; aspect-ratio: auto; }

/* Overlays on the video */
.lc-stats { position: absolute; left: 10px; top: 10px; margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.7); color: #e8e8ea; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre; pointer-events: none; }
.lc-rec-badge { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,.7); color: #fff; font: 600 13px system-ui, sans-serif; }
.lc-rec-badge i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; animation: lc-pulse 1s ease-in-out infinite; }
.lc-audio-only { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; background: #1c1c1e; color: #e2f87f; font-weight: 600; }

/* Controls: a call-style dock floating on the video (like Meet or Zoom) */
.lc-dock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; max-width: calc(100% - 20px);
  padding: 7px; border-radius: 999px; background: rgba(20, 20, 22, .62); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 8px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); transition: opacity .25s, transform .25s; overflow-x: auto; scrollbar-width: none; }
.lc-dock::-webkit-scrollbar { display: none; }
.lc-dock-group { display: flex; align-items: center; gap: 6px; }
.lc-dock-group + .lc-dock-group { padding-left: 8px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.14); }
.lc-screen.is-idle .lc-dock { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }
.lc-screen.is-idle { cursor: none; }

/* Round icon buttons */
.lc-ic { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .15s, transform .1s, color .15s; text-decoration: none; }
.lc-ic svg { width: 22px; height: 22px; fill: currentColor; }
.lc-ic:hover { background: rgba(255,255,255,.22); }
.lc-ic:active { transform: scale(.94); }
.lc-ic:focus-visible { outline: 2px solid #e2f87f; outline-offset: 2px; }
.lc-ic[aria-pressed="true"], .lc-ic.is-open { background: #e2f87f; color: #1c1c1e; }
.lc-ic:disabled { opacity: .35; cursor: not-allowed; }
.lc-ic-rec svg { fill: #ff453a; }
.lc-ic-rec[aria-pressed="true"] { background: #ff453a; color: #fff; }
.lc-ic-rec[aria-pressed="true"] svg { fill: #fff; animation: lc-pulse 1s ease-in-out infinite; }
.lc-ic-end { background: #ff453a; width: 52px; border-radius: 22px; }
.lc-ic-end:hover { background: #ff6259; }
/* Tooltip with the button's name */
.lc-ic[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px); padding: 5px 9px;
  border-radius: 8px; background: #1c1c1e; color: #fff; font: 600 12px/1.2 system-ui, sans-serif; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.lc-ic[data-tip]:hover::after, .lc-ic[data-tip]:focus-visible::after { opacity: 1; transform: translateX(-50%); }
.lc-dock .lc-ic[data-tip]::after { display: none; } /* the dock scrolls on small screens; its titles show in the bar below */
@media (hover: hover) { .lc-dock { overflow: visible; } .lc-dock .lc-ic[data-tip]::after { display: block; } }
.lc-ic-flat { width: 36px; height: 36px; background: transparent; color: var(--muted); }
.lc-ic-flat:hover { background: var(--surface-2); color: var(--fg); }
.lc-ic-flat[data-tip]::after { bottom: auto; top: calc(100% + 6px); }

.lc-stage [hidden] { display: none !important; }

/* Phone controls appear once TrivxCam 1.1+ reports its settings */
.lc-stage:not(.has-phone) .lc-phone { display: none !important; }

/* Popovers above the dock */
.lc-pop { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 2; padding: 14px; border-radius: 18px; background: rgba(28, 28, 30, .92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #fff; box-shadow: 0 12px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); }
.lc-pop-zoom { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 999px; }
.lc-pop-zoom input { width: 180px; accent-color: #e2f87f; }
.lc-pop-zoom output { min-width: 3.2em; font: 600 13px system-ui, sans-serif; font-variant-numeric: tabular-nums; color: #e2f87f; }
.lc-pop-more { width: min(360px, calc(100% - 20px)); max-height: calc(100% - 96px); overflow-y: auto; }
.lc-pop-title { margin: 0 0 8px; font: 700 11px system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.lc-pop-title:not(:first-child), .lc-phone + .lc-pop-title, [data-obs] .lc-pop-title { margin-top: 14px; }
/* Segmented choices (720p | 1080p ...) */
.lc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font: 600 13px system-ui, sans-serif; color: rgba(255,255,255,.85); }
.lc-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.1); }
.lc-seg button { min-width: 38px; min-height: 30px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: rgba(255,255,255,.75);
  font: 600 12.5px system-ui, sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.lc-seg button:hover { color: #fff; }
.lc-seg button[aria-pressed="true"] { background: #e2f87f; color: #1c1c1e; }
.lc-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; }
.lc-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 6px 4px; border: 0; border-radius: 12px;
  background: rgba(255,255,255,.1); color: #fff; font: 600 11.5px system-ui, sans-serif; cursor: pointer; }
.lc-chip-wide { flex-direction: row; gap: 8px; min-height: 38px; margin-top: 8px; font-size: 13px; }
.lc-chip svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.lc-chip:hover { background: rgba(255,255,255,.18); }
.lc-chip[aria-pressed="true"] { background: #e2f87f; color: #1c1c1e; }
.lc-chip-wide { width: 100%; }
.lc-pop-more { padding: 12px 14px; }
.lc-pop-more .lc-row { margin-bottom: 4px; }
.lc-pop-help { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: rgba(255,255,255,.7); font: 600 12px system-ui, sans-serif; text-decoration: none; }
.lc-pop-help svg { width: 16px; height: 16px; fill: currentColor; }
.lc-pop-help:hover { color: #e2f87f; }

/* "Turn on sound" in the bar under the video */
.lc-sound { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--fg); font: 600 .85rem system-ui, sans-serif; cursor: pointer; }
.lc-sound svg { width: 18px; height: 18px; fill: currentColor; }
.lc-sound[aria-pressed="true"] { background: #e2f87f; border-color: #e2f87f; color: #1c1c1e; }

/* Small screens: the video is too small to cover, so the dock sits under it, centred on up to two rows. */
@media (max-width: 640px) {
  .lc-dock { position: static; transform: none; flex-wrap: wrap; justify-content: center; max-width: none; margin: 0; padding: 10px 8px 12px;
    border-radius: 0; background: #111113; box-shadow: none; overflow: visible; row-gap: 8px; }
  .lc-screen.is-idle .lc-dock { opacity: 1; transform: none; pointer-events: auto; }
  .lc-screen.is-idle { cursor: auto; }
  .lc-dock-group + .lc-dock-group { border-left: 0; padding-left: 0; margin-left: 4px; }
  .lc-ic { width: 42px; height: 42px; }
  .lc-ic svg { width: 20px; height: 20px; }
  .lc-ic-end { width: 50px; }
  /* Panels open in place, between the video and the dock, instead of covering them */
  .lc-pop { position: static; transform: none; width: auto; max-height: none; overflow: visible; border-radius: 0; box-shadow: none;
    background: #161618; backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 1px solid rgba(255,255,255,.06); }
  .lc-pop-zoom { justify-content: center; }
  .lc-pop-zoom input { flex: 1; max-width: 260px; }
  .lc-chips { grid-template-columns: repeat(4, 1fr); }
}
.lc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--line); }
.lc-live { font-size: .75rem; font-weight: 700; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; background: #e2f87f; color: #1c1c1e; }
.lc-info { color: var(--muted); font-size: .9rem; }
.lc-hint { color: var(--muted); font-size: .82rem; }

/* Live sound level from the phone, shown whether or not sound is turned on here. */
.lc-meter { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); }
.lc-meter i { display: block; width: 3px; height: 18px; border-radius: 2px; background: #9bc22e; transform: scaleY(.12); transform-origin: center; transition: transform .09s linear; }
.lc-meter.is-quiet i { background: var(--faint); }
.lc-grow { flex: 1; }

.lc-onphone { text-align: center; padding: 20px 10px; }
.lc-onphone h3 { margin: 10px 0 6px; }
.lc-onphone-icon svg { width: 40px; height: 40px; }

.lc-app { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; padding: 16px; border-radius: 18px; border: 1px dashed var(--line-strong); }
.lc-app > div { flex: 1 1 240px; min-width: 0; }
.lc-app p { font-size: .88rem; margin-top: 2px; }
.lc-app-icon { display: block; width: 46px; height: 46px; border-radius: 14px; flex: none; }
.lc-app .play-btn { margin-top: 0; }
.lc-soon { font-size: .8rem; font-weight: 600; padding: 7px 12px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
