@import './product-theme.css';

:root {
  color-scheme: light;
  /* Compatibility aliases: the Web surface now resolves through the shared
     product tokens instead of maintaining a second visual language. */
  --bg: var(--ui-bg);
  --bg-deep: var(--ui-bg-elevated);
  --surface: var(--ui-surface);
  --surface-solid: var(--ui-surface-solid);
  --surface-muted: var(--ui-surface-muted);
  --line: var(--ui-line);
  --line-strong: var(--ui-line-strong);
  --text: var(--ui-text);
  --text-dim: var(--ui-text-secondary);
  --text-faint: var(--ui-text-tertiary);
  --accent: var(--ui-accent);
  --accent-strong: var(--ui-accent-hover);
  --accent-soft: var(--ui-accent-soft);
  --green: var(--ui-positive);
  --orange: var(--ui-warning);
  --red: var(--ui-danger);
  --shadow-sm: var(--ui-shadow-sm);
  --shadow-md: var(--ui-shadow-md);
  --shadow-lg: 0 34px 90px rgba(0, 0, 0, .16);
  --content: 1180px;
  --bar-h: 72px;
  --tool-h: 70px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; background: var(--bg); }
html[data-theme='dark'] {
  color-scheme: dark;
  --bg: var(--ui-bg);
  --bg-deep: var(--ui-bg-elevated);
  --surface: var(--ui-surface);
  --surface-solid: var(--ui-surface-solid);
  --surface-muted: var(--ui-surface-muted);
  --line: var(--ui-line);
  --line-strong: var(--ui-line-strong);
  --text: var(--ui-text);
  --text-dim: var(--ui-text-secondary);
  --text-faint: var(--ui-text-tertiary);
  --accent: var(--ui-accent);
  --accent-strong: var(--ui-accent-hover);
  --accent-soft: var(--ui-accent-soft);
  --green: var(--ui-positive);
  --orange: var(--ui-warning);
  --red: var(--ui-danger);
  --shadow-sm: var(--ui-shadow-sm);
  --shadow-md: var(--ui-shadow-md);
  --shadow-lg: 0 40px 110px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  display: block; overflow-x: hidden; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overscroll-behavior-x: none;
}
body.in-session { height: 100dvh; overflow: hidden; display: flex; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-appearance: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.view { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Shared chrome */
.topbar, .sessbar {
  position: relative; z-index: 30; min-height: var(--bar-h); flex: 0 0 var(--bar-h);
  display: flex; align-items: center; gap: 14px; padding: 0 max(28px, env(safe-area-inset-right)) 0 max(28px, env(safe-area-inset-left));
}
.topbar { position: sticky; top: 0; background: color-mix(in srgb, var(--surface-solid) 82%, transparent); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; color: var(--text); font-size: 14px; font-weight: 720; letter-spacing: -.02em; }
.brand-icon { width: 27px; height: 27px; display: block; flex: 0 0 27px; }
.logo { width: 100%; height: 100%; display: block; border-radius: 8px; box-shadow: 0 5px 14px rgba(15, 24, 40, .17); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: clamp(22px, 4vw, 64px); }
.site-nav a, .site-footer nav a { padding: 9px 12px; color: var(--text-dim); border-radius: 10px; font-size: 12px; transition: color .18s ease, background .18s ease; }
.site-nav a:hover, .site-footer nav a:hover { color: var(--text); background: var(--accent-soft); }
.topbar-tools { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: 9px; }
.topbar-state, .panel-badge, .path-badge, .quality-badge, .traffic-badge { display: inline-flex; align-items: center; gap: 7px; min-width: 0; white-space: nowrap; }
.topbar-state { padding: 7px 10px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface-solid) 58%, transparent); font-size: 11px; }
.state-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--ui-positive-soft); }
.state-dot.neutral { background: var(--ui-neutral); box-shadow: 0 0 0 4px var(--ui-neutral-soft); }
.state-dot.warn { background: var(--orange); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 12%, transparent); }
.state-dot.error { background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent); }
.theme-toggle { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; padding: 0; color: var(--text-dim); border: 1px solid var(--line); border-radius: 50%; background: var(--surface-muted); transition: transform .14s ease, color .18s ease, background .18s ease; }
.theme-toggle:hover { color: var(--text); background: var(--surface); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-icon-sun { display: none; }
html[data-theme='dark'] .theme-icon-moon { display: none; }
html[data-theme='dark'] .theme-icon-sun { display: block; }

/* Official homepage */
#view-connect { min-height: 100dvh; overflow: visible; isolation: isolate; background: radial-gradient(circle at 5% 10%, rgba(103, 203, 255, .15), transparent 25%), radial-gradient(circle at 92% 16%, rgba(255, 177, 118, .12), transparent 24%), var(--bg); }
html[data-theme='dark'] #view-connect { background: radial-gradient(circle at 7% 8%, rgba(42, 124, 255, .18), transparent 28%), radial-gradient(circle at 92% 14%, rgba(229, 91, 168, .12), transparent 25%), var(--bg); }
.site-main { width: min(var(--content), calc(100% - 64px)); margin: 0 auto; }
.landing-hero { min-height: 640px; display: grid; grid-template-columns: minmax(0, .86fr) minmax(480px, 1.14fr); align-items: center; gap: clamp(40px, 6vw, 100px); padding: clamp(74px, 10vw, 132px) 0 92px; }
.landing-copy { position: relative; z-index: 1; max-width: 590px; }
.hero-kicker, .panel-kicker, .section-kicker, .sidepanel-kicker { margin: 0; color: var(--accent); font-size: 10px; font-weight: 780; letter-spacing: .16em; line-height: 1.3; }
.signal-pulse { display: inline-block; width: 7px; height: 7px; margin-right: 7px; vertical-align: 1px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--ui-positive-soft); }
.landing-copy h1 { max-width: 610px; margin: 20px 0 23px; font-size: clamp(48px, 6.2vw, 82px); font-weight: 760; line-height: .99; letter-spacing: -.068em; text-wrap: balance; }
.landing-copy h1 span { display: block; color: transparent; background: linear-gradient(100deg, var(--accent) 6%, #6e63ed 48%, #d460a8 94%); -webkit-background-clip: text; background-clip: text; }
.hero-copy { max-width: 525px; margin: 0; color: var(--text-dim); font-size: 17px; line-height: 1.68; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 31px; }
.hero-actions .btn { min-width: 124px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; color: var(--text-dim); font-size: 11px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.meta-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.meta-dot.green { background: var(--green); }
.meta-dot.orange { background: var(--orange); }

.hero-console { position: relative; min-width: 0; min-height: 470px; display: grid; place-items: center; }
.console-glow { position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(83, 153, 255, .34), rgba(142, 107, 237, .13) 42%, transparent 72%); filter: blur(13px); transform: translate(10%, -4%); }
.console-window { position: relative; z-index: 1; width: min(100%, 640px); overflow: hidden; border: 1px solid rgba(255, 255, 255, .9); border-radius: 25px; background: rgba(240, 245, 252, .78); box-shadow: var(--shadow-lg), 0 0 0 8px rgba(255, 255, 255, .22); transform: rotate(1.2deg); }
html[data-theme='dark'] .console-window { border-color: rgba(255, 255, 255, .12); background: rgba(24, 31, 44, .86); box-shadow: var(--shadow-lg), 0 0 0 8px rgba(255, 255, 255, .03); }
.console-chrome { height: 46px; display: flex; align-items: center; gap: 7px; padding: 0 17px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .32); }
.console-chrome > span { width: 8px; height: 8px; border-radius: 50%; background: #ff6d67; }
.console-chrome > span:nth-child(2) { background: #ffc44d; }
.console-chrome > span:nth-child(3) { background: #4dd47a; }
.console-chrome small { margin-left: 12px; color: var(--text-faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: .08em; }
.console-chrome b { margin-left: auto; color: var(--text-faint); font-size: 16px; font-weight: 500; letter-spacing: 3px; }
.console-body { display: grid; grid-template-columns: 54px 1fr; min-height: 370px; }
.console-sidebar { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 19px 0; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .26); }
.console-mark { width: 26px; height: 26px; display: grid; place-items: center; margin-bottom: 11px; color: #fff; background: linear-gradient(145deg, #1489f5, #6d5be9); border-radius: 8px; font-size: 12px; font-weight: 800; }
.console-side-line { width: 16px; height: 16px; border: 1px solid var(--text-faint); border-radius: 5px; opacity: .55; }
.console-side-line.active { border-color: var(--accent); background: var(--accent-soft); opacity: 1; }
.console-side-line.bottom { width: 13px; height: 13px; margin-top: auto; border-radius: 50%; }
.console-content { min-width: 0; padding: 25px 26px 23px; }
.console-content-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.console-content-head small, .console-stats small { display: block; color: var(--text-faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; letter-spacing: .1em; }
.console-content-head strong { display: block; margin-top: 6px; font-size: 21px; letter-spacing: -.04em; }
.console-content-head em { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 20%, var(--line)); border-radius: 999px; background: var(--ui-positive-soft); font-size: 9px; font-style: normal; white-space: nowrap; }
.console-content-head em i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.console-screen { position: relative; min-height: 220px; margin-top: 25px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .65); border-radius: 17px; background: linear-gradient(135deg, #dbefff, #f7f4ff 52%, #fff1ec); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); }
html[data-theme='dark'] .console-screen { border-color: rgba(255, 255, 255, .12); background: linear-gradient(135deg, #20354d, #2c2947 54%, #493246); }
.screen-topline { position: absolute; top: 18px; left: 20px; width: 29%; height: 7px; border-radius: 8px; background: rgba(77, 111, 163, .28); }
.screen-card { position: absolute; border-radius: 11px; background: rgba(255, 255, 255, .65); box-shadow: 0 10px 22px rgba(81, 100, 145, .11); }
html[data-theme='dark'] .screen-card { background: rgba(255, 255, 255, .11); box-shadow: none; }
.screen-card.one { top: 54px; left: 20px; width: 43%; height: 96px; }
.screen-card.two { top: 54px; right: 20px; width: 39%; height: 52px; }
.screen-card.two::after { content: ""; position: absolute; right: 0; bottom: -59px; left: 0; height: 47px; border-radius: 11px; background: inherit; }
.screen-cursor { position: absolute; top: 123px; left: 52%; width: 15px; height: 21px; background: #fff; clip-path: polygon(0 0, 100% 72%, 59% 69%, 43% 100%); filter: drop-shadow(0 2px 2px rgba(20, 36, 72, .28)); transform: rotate(-15deg); }
.screen-status { position: absolute; right: 16px; bottom: 13px; color: var(--text-dim); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.screen-status span { margin-left: 8px; color: var(--green); }
.console-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.console-stats strong { display: block; margin-top: 5px; font-size: 15px; font-variant-numeric: tabular-nums; }
.console-stats strong span { margin-left: 3px; color: var(--text-faint); font-size: 9px; font-weight: 550; }
.floating-chip { position: absolute; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 10px 13px 10px 10px; border: 1px solid rgba(255, 255, 255, .78); border-radius: 15px; background: rgba(255, 255, 255, .75); box-shadow: 0 16px 35px rgba(37, 55, 94, .13), inset 0 1px 0 rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
html[data-theme='dark'] .floating-chip { border-color: rgba(255, 255, 255, .12); background: rgba(28, 36, 49, .82); box-shadow: 0 18px 42px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06); }
.floating-chip small, .floating-chip strong { display: block; }
.floating-chip small { color: var(--text-faint); font-size: 9px; }
.floating-chip strong { margin-top: 3px; color: var(--text); font-size: 11px; }
.chip-quality { top: 11%; left: -4%; }
.chip-device { right: -3%; bottom: 10%; }
.chip-icon, .chip-avatar { width: 29px; height: 29px; display: grid; place-items: center; color: #fff; border-radius: 9px; background: linear-gradient(145deg, #168bf4, #6d5be8); font-size: 14px; font-weight: 760; }
.chip-avatar { background: linear-gradient(145deg, #f29b5a, #df5f9f); }
.chip-device > i { width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--ui-positive-soft); }

.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 23px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-strip > div { display: flex; gap: 14px; min-width: 0; padding: 5px clamp(12px, 2.4vw, 30px); border-right: 1px solid var(--line); }
.trust-strip > div:first-child { padding-left: 0; }
.trust-strip > div:last-child { border-right: 0; }
.trust-strip strong { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 600; }
.trust-strip b, .trust-strip small { display: block; }
.trust-strip b { font-size: 12px; }
.trust-strip small { margin-top: 4px; color: var(--text-dim); font-size: 10px; line-height: 1.4; }

.workspace-section, .feature-section, .downloads-section { padding: 112px 0 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 29px; }
.section-heading h2 { margin: 9px 0 0; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; letter-spacing: -.055em; }
.section-heading > p { max-width: 280px; margin: 0 0 4px; color: var(--text-dim); font-size: 12px; line-height: 1.55; text-align: right; }
.section-heading.compact { align-items: flex-start; }
.connect-layout { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(430px, 1fr); gap: 24px; align-items: stretch; }
.workspace-intro { display: flex; flex-direction: column; justify-content: flex-start; min-width: 0; padding: 32px 25px; border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(150deg, rgba(236, 246, 255, .82), rgba(255, 247, 240, .62)); box-shadow: var(--shadow-sm); }
html[data-theme='dark'] .workspace-intro { background: linear-gradient(150deg, rgba(26, 54, 82, .78), rgba(63, 39, 57, .55)); }
.intro-number { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: .1em; }
.workspace-intro h3 { margin: 50px 0 15px; font-size: clamp(27px, 3vw, 40px); line-height: 1.08; letter-spacing: -.06em; }
.workspace-intro h3 em { color: var(--accent); font-style: normal; }
.workspace-intro > p { max-width: 290px; margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.65; }
.intro-list { display: grid; gap: 0; margin-top: 34px; border-top: 1px solid var(--line); }
.intro-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.intro-list span { font-size: 12px; font-weight: 680; }
.intro-list small { color: var(--text-dim); font-size: 10px; text-align: right; }
.text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 29px; color: var(--accent); font-size: 12px; font-weight: 650; }
.text-link span { font-size: 17px; transition: transform .18s ease; }
.text-link:hover span { transform: translateX(3px); }

.connect-panel { min-width: 0; padding: 30px; border: 1px solid var(--line); border-radius: 25px; background: var(--surface); box-shadow: var(--shadow-md); -webkit-backdrop-filter: blur(26px) saturate(135%); backdrop-filter: blur(26px) saturate(135%); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-heading h2 { margin: 8px 0 0; font-size: 27px; line-height: 1.1; letter-spacing: -.045em; }
.panel-badge { padding: 7px 10px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 999px; background: var(--surface-muted); font-size: 10px; }
.tabs { display: flex; gap: 5px; margin-top: 25px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--surface-muted) 88%, transparent); }
.tab { flex: 1; min-height: 42px; padding: 9px 14px; color: var(--text-dim); border: 0; border-radius: 999px; background: transparent; font-size: 12px; font-weight: 650; transition: color .18s ease, background .18s ease, transform .12s ease; }
.tab.active { color: var(--text); background: var(--surface-solid); box-shadow: 0 4px 12px rgba(31, 44, 65, .10); }
.tabpane { display: flex; flex-direction: column; gap: 13px; padding-top: 22px; }
.auth-intro { display: flex; flex-direction: column; gap: 7px; margin-bottom: 3px; }
.auth-intro h3, .device-heading h3 { margin: 0; font-size: 20px; line-height: 1.2; letter-spacing: -.035em; }
.auth-intro p { margin: 0 0 4px; color: var(--text-dim); font-size: 12px; line-height: 1.55; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { color: var(--text-dim); font-size: 11px; }
.field > span small { color: var(--text-faint); font-size: 10px; }
.field input, .kbd-text, .text-card textarea { width: 100%; min-height: 48px; padding: 0 15px; color: var(--text); outline: none; border: 1px solid var(--line-strong); border-radius: 13px; background: color-mix(in srgb, var(--surface-solid) 66%, transparent); font-size: 15px; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.field input:focus, .kbd-text:focus, .text-card textarea:focus, .stream-setting-row select:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; color: var(--text); border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); font-size: 13px; font-weight: 680; transition: transform .14s ease, color .18s ease, border-color .18s ease, box-shadow .2s ease, background .2s ease; }
.btn.primary { color: var(--ui-accent-foreground); border-color: transparent; background: var(--accent); box-shadow: 0 9px 21px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn.ghost { background: var(--surface-muted); }
.btn.danger { color: var(--ui-on-danger); border-color: transparent; background: var(--red); box-shadow: 0 8px 18px rgba(217, 54, 79, .18); }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 86%, #000); }
.btn.small { min-height: 38px; align-self: flex-start; padding: 8px 12px; font-size: 11px; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn:active, .tab:active, .dev-item:active, .toolbtn:active, .iconbtn:active { transform: scale(.98); }
.status { min-height: 16px; margin: 0; color: var(--text-dim); font-size: 11px; line-height: 1.45; }
.status.err, .stream-settings-note.error { color: var(--red); }
.status.ok, .stream-settings-note.ok { color: var(--green); }
.status.warn, .stream-settings-note.warn { color: var(--orange); }
.hint, .privacy-note { margin: 0; color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.privacy-note { margin-top: 3px; }
.auth-actions, .account-actions { display: grid; grid-template-columns: 1.35fr .85fr; gap: 9px; }
.account-toolbar { min-width: 0; max-width: 410px; display: flex; align-items: center; gap: 8px; padding: 4px 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.account-summary { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0; }
.account-avatar { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; color: var(--ui-accent-foreground); border-radius: 9px; background: var(--accent); font-size: 12px; font-weight: 800; }
.account-summary-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.account-summary-copy .section-kicker { display: none; }
.account-summary-copy strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.account-state-badge { margin-left: 2px; padding: 4px 7px; color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 20%, var(--line)); border-radius: 999px; background: var(--ui-positive-soft); font-size: 9px; }
.account-state-badge.warn { color: var(--orange); border-color: color-mix(in srgb, var(--orange) 22%, var(--line)); background: var(--ui-warning-soft); }
.account-actions { display: flex; gap: 4px; margin: 0; }
.account-actions .btn { min-height: 29px; padding: 6px 9px; border-radius: 9px; font-size: 10px; white-space: nowrap; }
#account-session-msg { display: none; }
.auth-sessions-panel { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-sessions-heading, .auth-sessions-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.auth-sessions-heading strong { display: block; margin-top: 3px; font-size: 15px; }
.auth-sessions-heading .btn { min-height: 31px; }
.auth-sessions-panel > .hint { margin-top: 7px; }
.auth-sessions-list { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.auth-session-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); }
.auth-session-mark { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; color: var(--accent); border-radius: 8px; background: var(--accent-soft); }
.auth-session-mark .ic { width: 14px; height: 14px; }
.auth-session-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.auth-session-copy strong { overflow: hidden; font-size: 10px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.auth-session-copy span { overflow: hidden; color: var(--text-dim); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.auth-session-current { flex: 0 0 auto; padding: 3px 6px; color: var(--green); border-radius: 999px; background: var(--ui-positive-soft); font-size: 8px; white-space: nowrap; }
.auth-session-revoke { width: auto; min-height: 27px; margin: 0; padding: 5px 7px; color: var(--red); border: 0; border-radius: 7px; background: transparent; font-size: 9px; cursor: pointer; }
.auth-session-revoke:hover { background: var(--ui-danger-soft); }
.auth-session-revoke:disabled { opacity: .5; cursor: wait; }
.auth-sessions-footer { align-items: flex-start; margin-top: 9px; }
.auth-sessions-footer .status { min-height: 14px; }
.auth-sessions-footer .btn { min-height: 31px; flex: 0 0 auto; }
.security-activity-panel { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.security-activity-panel > .hint { margin-top: 7px; }
.security-activity-list { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.security-activity-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); }
.security-activity-mark { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; color: var(--accent); border-radius: 8px; background: var(--accent-soft); }
.security-activity-mark .ic { width: 14px; height: 14px; }
.security-activity-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
.security-activity-copy strong { overflow: hidden; font-size: 10px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.security-activity-copy span { overflow: hidden; color: var(--text-dim); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-danger-zone { margin-top: 18px; padding: 14px; border: 1px solid color-mix(in srgb, var(--red) 24%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--red) 5%, var(--surface-muted)); }
.account-danger-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-danger-heading strong { display: block; margin-top: 3px; color: var(--red); font-size: 13px; }
.account-danger-heading .section-kicker { color: var(--red); }
.account-danger-mark { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ui-on-danger); border-radius: 50%; background: var(--red); }
.account-danger-mark .ic { width: 14px; height: 14px; }
.account-danger-zone > p { margin: 8px 0 12px; color: var(--text-dim); font-size: 10px; line-height: 1.55; }
.account-danger-zone .field { margin-top: 10px; }
.account-danger-zone .btn { width: 100%; margin-top: 3px; }
.account-danger-zone .status { min-height: 14px; margin: 8px 0 0; }
.devices-pane { margin-top: 21px; padding-top: 19px; border-top: 1px solid var(--line); }
.device-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.device-heading h3 { margin-top: 6px; font-size: 17px; }
.devices-count, .device-heading-note { color: var(--text-dim); font-size: 10px; font-weight: 500; }
.device-heading-note { max-width: 190px; text-align: right; }
.dev-list { display: flex; flex-direction: column; gap: 8px; }
.dev-item { min-height: 72px; padding: 14px 15px; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-muted); transition: transform .2s cubic-bezier(.16, 1, .3, 1), border-color .2s ease, box-shadow .2s ease; }
.dev-item .name { font-size: 13px; font-weight: 680; }
.dev-item .meta { margin-top: 5px; color: var(--text-dim); font-size: 10px; }
.dev-item .tag { float: right; padding: 4px 8px; border-radius: 999px; font-size: 9px; }
.dev-item .tag.on { color: var(--green); background: var(--ui-positive-soft); }
.dev-item .tag.off { color: var(--text-dim); background: var(--ui-neutral-soft); }
.dev-item .tag.local { color: var(--accent); background: var(--accent-soft); }
.dev-item.off { opacity: .64; }
.dev-item.local { opacity: .86; cursor: not-allowed; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--surface-muted); }
.empty-mark { color: var(--accent); font-size: 24px; }
.empty-mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.empty-state strong { font-size: 13px; }
.empty-state p { max-width: 300px; margin: 0; color: var(--text-dim); font-size: 11px; line-height: 1.55; }
.history { display: flex; flex-direction: column; gap: 7px; }
.hist-item { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-muted); }
.hist-fill { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; color: var(--text); text-align: left; border: 0; background: transparent; }
.hist-addr { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.hist-pass { color: var(--text-dim); font-size: 10px; }
.hist-del { width: 44px; display: grid; place-items: center; color: var(--text-dim); border: 0; border-left: 1px solid var(--line); background: transparent; }
.hist-del .site-icon { width: 15px; height: 15px; }

/* Feature and downloads */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature-card { min-height: 330px; display: flex; flex-direction: column; padding: 23px; border: 1px solid var(--line); border-radius: 23px; background: var(--surface); box-shadow: var(--shadow-sm); }
.feature-card-dark { color: #f6f8fd; border-color: rgba(255, 255, 255, .08); background: #111822; box-shadow: 0 25px 55px rgba(16, 24, 39, .22); }
.feature-index { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.feature-card-dark .feature-index { color: #6bb5ff; }
.feature-card h3 { margin: auto 0 9px; font-size: 20px; letter-spacing: -.04em; }
.feature-card p { max-width: 290px; margin: 0; color: var(--text-dim); font-size: 12px; line-height: 1.6; }
.feature-card-dark p { color: rgba(237, 243, 255, .62); }
.feature-visual { position: relative; height: 150px; margin: 20px 0 25px; overflow: hidden; border-radius: 17px; background: var(--surface-muted); }
.feature-card-dark .feature-visual { background: linear-gradient(145deg, #1c3853, #1b2435 68%, #332441); }
.latency-visual i { position: absolute; right: 24px; left: 24px; height: 1px; background: rgba(119, 183, 255, .23); }
.latency-visual i:nth-child(1) { top: 39px; transform: rotate(-10deg); }.latency-visual i:nth-child(2) { top: 76px; transform: rotate(11deg); }.latency-visual i:nth-child(3) { top: 112px; transform: rotate(-7deg); }
.latency-visual b { position: absolute; top: 51px; left: 39%; color: #fff; font-size: 38px; letter-spacing: -.08em; }.latency-visual b::before { content: ""; position: absolute; top: 9px; left: -35px; width: 9px; height: 9px; border-radius: 50%; background: #54d9ff; box-shadow: 0 0 0 7px rgba(84, 217, 255, .13), 0 0 27px #54d9ff; }.latency-visual b small { margin-left: 4px; color: #79c1ff; font-size: 11px; letter-spacing: 0; }
.clarity-visual > span { position: absolute; top: 21px; left: 22px; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 48px; font-weight: 750; letter-spacing: -.12em; }.clarity-visual::after { content: "px"; position: absolute; top: 84px; left: 25px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }.clarity-visual i { position: absolute; right: 25px; width: 43%; height: 5px; border-radius: 5px; background: var(--accent); opacity: .8; }.clarity-visual i:nth-of-type(1) { top: 45px; }.clarity-visual i:nth-of-type(2) { top: 64px; width: 30%; opacity: .46; }.clarity-visual i:nth-of-type(3) { top: 83px; width: 36%; opacity: .25; }
.route-visual > span { position: absolute; top: 31px; left: 22px; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: .12em; }.route-visual i { position: absolute; top: 86px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }.route-visual i:nth-of-type(1) { left: 26px; }.route-visual i:nth-of-type(2) { left: 50%; background: var(--orange); box-shadow: 0 0 0 6px var(--ui-warning-soft); }.route-visual i:nth-of-type(3) { right: 26px; background: var(--green); box-shadow: 0 0 0 6px var(--ui-positive-soft); }.route-visual b { position: absolute; top: 89px; right: 32px; left: 32px; height: 1px; background: linear-gradient(90deg, var(--accent), var(--orange), var(--green)); }
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.download-card { position: relative; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s cubic-bezier(.16, 1, .3, 1), border-color .2s ease, box-shadow .2s ease; }
.download-card.featured { border-color: rgba(8, 127, 245, .33); background: linear-gradient(140deg, rgba(222, 241, 255, .82), rgba(255, 255, 255, .72)); }.download-card:hover { border-color: rgba(8, 127, 245, .42); box-shadow: var(--shadow-md); transform: translateY(-3px); }.download-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 13px; font-size: 22px; font-weight: 600; }
.download-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }.mac-icon { color: #fff; background: #171b23; }.windows-icon { color: #fff; background: linear-gradient(145deg, #11a4f5, #405fe8); }.linux-icon { color: #fff; background: linear-gradient(145deg, #f4a63c, #d66d60); }.download-copy { min-width: 0; }.download-copy strong, .download-copy span, .download-copy small { display: block; }.download-copy strong { font-size: 15px; letter-spacing: -.03em; }.download-copy span { margin-top: 4px; color: var(--text-dim); font-size: 10px; }.download-copy small { margin-top: 7px; color: var(--accent); font-size: 10px; }.download-arrow { align-self: flex-start; margin-left: auto; color: var(--accent); font-size: 20px; }.download-badge { position: absolute; top: 11px; right: 12px; padding: 4px 6px; color: var(--accent); border-radius: 999px; background: var(--accent-soft); font-size: 8px; font-weight: 750; }.download-footnote { margin: 18px 0 0; color: var(--text-faint); font-size: 10px; line-height: 1.5; }.download-footnote a { color: var(--accent); }
.docs-callout { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 112px 0 0; padding: 35px 38px; border: 1px solid var(--line); border-radius: 23px; background: linear-gradient(115deg, rgba(223, 242, 255, .73), rgba(255, 239, 232, .65)); box-shadow: var(--shadow-sm); }.docs-callout h2 { max-width: 570px; margin: 9px 0 9px; font-size: clamp(24px, 3.5vw, 39px); line-height: 1.07; letter-spacing: -.055em; }.docs-callout p:not(.section-kicker) { margin: 0; color: var(--text-dim); font-size: 12px; line-height: 1.5; }.docs-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }.docs-actions .btn { white-space: nowrap; }
html[data-theme='dark'] .download-card.featured, html[data-theme='dark'] .docs-callout { background: linear-gradient(115deg, rgba(24, 54, 83, .76), rgba(69, 40, 55, .62)); }
.site-footer { width: min(var(--content), calc(100% - 64px)); display: flex; align-items: center; gap: 20px; margin: 88px auto 0; padding: 24px 0 max(29px, env(safe-area-inset-bottom)); color: var(--text-faint); border-top: 1px solid var(--line); font-size: 10px; }.footer-brand { color: var(--text); font-size: 12px; }.footer-brand .logo { width: 21px; height: 21px; border-radius: 6px; }.site-footer nav { display: flex; gap: 2px; margin-left: auto; }.site-footer nav a { padding: 6px 8px; font-size: 10px; }

/* Remote session */
#view-session { width: 100%; height: 100dvh; overflow: hidden; color: #f5f7fb; background: #080b10; }
#view-session .sessbar { color: #f5f7fb; background: rgba(18, 22, 29, .83); border-bottom: 1px solid rgba(255, 255, 255, .09); -webkit-backdrop-filter: blur(22px) saturate(145%); backdrop-filter: blur(22px) saturate(145%); }
.iconbtn { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; padding: 0; color: inherit; border: 1px solid rgba(255, 255, 255, .11); border-radius: 50%; background: rgba(255, 255, 255, .075); transition: transform .14s ease, background .18s ease, border-color .18s ease; }.iconbtn:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .20); }.iconbtn svg { width: 19px; height: 19px; }
.sess-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }.session-kicker { color: #69d4ff; font-size: 9px; font-weight: 760; letter-spacing: .14em; }.sess-peer { overflow: hidden; color: #fff; font-size: 13px; font-weight: 660; text-overflow: ellipsis; white-space: nowrap; }.sess-status { overflow: hidden; color: rgba(235, 239, 248, .59); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.sess-status[data-phase='recovering'], .sess-status[data-phase='stalled'] { color: #ffcb55; }.sess-status[data-phase='failed'] { color: #ff746c; }.sess-status[data-phase='connected'] { color: #8fe6a2; }
.path-badge { max-width: 135px; overflow: hidden; padding: 6px 9px; color: rgba(235, 239, 248, .62); border: 1px solid rgba(255, 255, 255, .11); border-radius: 999px; background: rgba(255, 255, 255, .055); font-size: 10px; text-overflow: ellipsis; }.path-badge::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }.path-badge[data-path='direct'] { color: #36dc83; }.path-badge[data-path='stun'] { color: #69d4ff; }.path-badge[data-path='turn'] { color: #ffcb55; }.quality-badge, .traffic-badge { max-width: 175px; overflow: hidden; color: rgba(235, 239, 248, .57); font-size: 10px; text-overflow: ellipsis; }.quality-badge[data-quality='warn'] { color: #ffcb55; }.traffic-badge { max-width: 185px; color: rgba(235, 239, 248, .68); font-variant-numeric: tabular-nums; }.traffic-badge[data-traffic='active'] { color: #36dc83; }.session-desktop-hint { color: rgba(235, 239, 248, .55); font-size: 10px; white-space: nowrap; }.session-controls-toggle svg { transition: transform .18s ease; }#view-session.controls-hidden .session-controls-toggle svg { transform: rotate(180deg); }#view-session.controls-hidden .toolbar, #view-session.controls-hidden .file-transfer-panel { display: none !important; }
.session-workspace { flex: 1; min-width: 0; min-height: 0; display: flex; gap: 13px; padding: 14px 18px 0; }.stage { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .11); border-radius: 21px; background: #000; box-shadow: 0 23px 66px rgba(0, 0, 0, .40); }.stage.file-drop-active { border-color: rgba(105, 212, 255, .88); box-shadow: 0 0 0 3px rgba(105, 212, 255, .18), 0 23px 66px rgba(0, 0, 0, .48); }.session-video { width: 100%; height: 100%; display: block; outline: none; border-radius: 20px; background: #000; object-fit: contain; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; }.optimistic-cursor { display: none !important; }
.session-sidepanel { width: 242px; flex: 0 0 242px; padding: 22px 18px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 21px; background: rgba(33, 38, 47, .68); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }.session-sidepanel h2 { margin: 12px 0 9px; color: #fff; font-size: 17px; line-height: 1.15; letter-spacing: -.035em; }.sidepanel-copy { margin: 0; color: rgba(235, 239, 248, .60); font-size: 11px; line-height: 1.55; }.shortcut-list { display: grid; gap: 4px; margin-top: 27px; }.shortcut-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }.shortcut-row kbd { padding: 4px 6px; color: rgba(235, 239, 248, .80); border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px; background: rgba(255, 255, 255, .06); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }.shortcut-row span { color: rgba(235, 239, 248, .54); font-size: 9px; }.sidepanel-note { display: flex; align-items: center; gap: 7px; margin-top: 24px; color: rgba(235, 239, 248, .50); font-size: 9px; }
.file-drop-overlay { position: absolute; z-index: 9; inset: 14px; display: grid; place-content: center; justify-items: center; gap: 8px; color: #fff; border: 1.5px dashed rgba(105, 212, 255, .84); border-radius: 17px; background: rgba(10, 18, 30, .68); text-align: center; pointer-events: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }.file-drop-overlay svg { width: 34px; height: 34px; color: #69d4ff; }.file-drop-overlay strong { font-size: 15px; }.file-drop-overlay span { color: rgba(235, 239, 248, .68); font-size: 11px; }
.toolbar { min-height: var(--tool-h); display: flex; align-items: center; justify-content: center; gap: 5px; width: min(920px, calc(100% - 36px)); flex: 0 0 auto; margin: 10px auto max(10px, env(safe-area-inset-bottom)); padding: 8px 10px; color: rgba(235, 239, 248, .74); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; background: rgba(30, 35, 43, .82); box-shadow: 0 16px 42px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(23px) saturate(150%); backdrop-filter: blur(23px) saturate(150%); }.control-hint { margin-right: auto; padding: 0 11px; color: rgba(235, 239, 248, .50); font-size: 10px; white-space: nowrap; }.toolbtn { min-width: 56px; min-height: 49px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 8px; color: rgba(235, 239, 248, .68); border: 1px solid transparent; border-radius: 11px; background: transparent; font-size: 9px; transition: transform .14s ease, color .18s ease, background .18s ease; }.toolbtn svg { width: 19px; height: 19px; }.toolbtn.active { color: #fff; border-color: rgba(105, 212, 255, .23); background: rgba(105, 212, 255, .13); }.mobile-only-control { display: none; }.file-input-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.kbd-layer { position: absolute; z-index: 8; right: 18px; bottom: 18px; width: min(520px, calc(100% - 36px)); display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 21px; background: rgba(28, 31, 37, .92); box-shadow: 0 20px 60px rgba(0, 0, 0, .48); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }.kbd-row { display: flex; justify-content: center; gap: 7px; }.kbd-key, .kbd-mod { min-width: 58px; min-height: 44px; padding: 9px; color: #fff; border: 1px solid rgba(255, 255, 255, .1); border-radius: 11px; background: rgba(255, 255, 255, .09); }.kbd-mod.active { background: #0a84ff; }.kbd-text { color: #fff; border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .08); }
.stream-settings-layer, .text-layer { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(0, 0, 0, .48); }.stream-settings-card, .text-card { width: min(430px, 100%); padding: 23px; color: #f5f7fb; border: 1px solid rgba(255, 255, 255, .13); border-radius: 22px; background: rgba(31, 36, 44, .94); box-shadow: 0 26px 70px rgba(0, 0, 0, .48); -webkit-backdrop-filter: blur(25px) saturate(145%); backdrop-filter: blur(25px) saturate(145%); }.stream-settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }.stream-settings-head h2 { margin: 7px 0 0; color: #fff; font-size: 24px; letter-spacing: -.05em; }.stream-settings-card .iconbtn { width: 34px; height: 34px; flex-basis: 34px; }.stream-setting-row { display: grid; grid-template-columns: 1fr 175px; align-items: center; gap: 18px; margin-top: 22px; }.stream-setting-row label span, .stream-setting-row label small { display: block; }.stream-setting-row label span { color: #fff; font-size: 13px; font-weight: 650; }.stream-setting-row label small { margin-top: 5px; color: rgba(235, 239, 248, .52); font-size: 10px; line-height: 1.4; }.stream-setting-row select { width: 100%; min-height: 43px; padding: 0 10px; color: #fff; outline: none; border: 1px solid rgba(255, 255, 255, .14); border-radius: 11px; background: rgba(255, 255, 255, .08); font-size: 11px; }.stream-settings-note { min-height: 31px; margin: 19px 0 0; color: rgba(235, 239, 248, .60); font-size: 10px; line-height: 1.55; }.stream-settings-actions { display: flex; gap: 8px; margin-top: 9px; }.stream-settings-actions .btn { flex: 1; }.text-card { display: flex; flex-direction: column; gap: 11px; }.text-title { margin: 0; font-weight: 650; }.text-card .hint { color: rgba(235, 239, 248, .60); }.text-card textarea { min-height: 120px; padding: 12px; resize: none; color: #fff; border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .08); }.text-actions { display: flex; gap: 9px; }.text-actions .btn { flex: 1; }
.reconnect { position: absolute; z-index: 6; top: 12px; left: 50%; padding: 7px 13px; color: #ffcb55; border: 1px solid rgba(255, 203, 85, .28); border-radius: 999px; background: rgba(42, 34, 0, .74); font-size: 11px; transform: translateX(-50%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
#stage:fullscreen { position: fixed; inset: 0; z-index: 100; width: 100vw; height: 100dvh; margin: 0; border: 0; border-radius: 0; background: #000; }#stage:fullscreen #session-video { width: 100%; height: 100%; border-radius: 0; }

/* Static guide / privacy pages */
.doc-body { min-height: 100dvh; overflow: auto; background: var(--bg); }.doc-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 84%, transparent); -webkit-backdrop-filter: blur(22px) saturate(145%); backdrop-filter: blur(22px) saturate(145%); }.doc-header .brand { font-size: 13px; }.doc-header .brand .logo { width: 26px; height: 26px; }.doc-header nav { display: flex; align-items: center; gap: 5px; }.doc-header nav a { padding: 9px 11px; color: var(--text-dim); border-radius: 9px; font-size: 11px; }.doc-header nav a:hover { color: var(--text); background: var(--accent-soft); }.doc-header nav a.active { color: var(--accent); background: var(--accent-soft); }.doc-wrap { width: min(920px, calc(100% - 48px)); margin: 0 auto; }.doc-hero { padding: 86px 0 51px; border-bottom: 1px solid var(--line); }.doc-hero h1 { margin: 13px 0 14px; font-size: clamp(40px, 6vw, 68px); line-height: .98; letter-spacing: -.07em; }.doc-hero p { max-width: 620px; margin: 0; color: var(--text-dim); font-size: 15px; line-height: 1.7; }.doc-meta { margin-top: 19px; color: var(--text-faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }.doc-content { display: grid; grid-template-columns: 185px minmax(0, 1fr); gap: 60px; padding: 51px 0 90px; }.doc-toc { position: sticky; top: 105px; align-self: start; display: flex; flex-direction: column; gap: 5px; }.doc-toc a { padding: 6px 0; color: var(--text-dim); font-size: 10px; }.doc-toc a:hover { color: var(--accent); }.doc-toc a:focus-visible { outline-offset: 4px; }.doc-prose h2 { margin: 0 0 12px; padding-top: 3px; font-size: 22px; letter-spacing: -.045em; }.doc-prose h2:not(:first-child) { margin-top: 50px; }.doc-prose h3 { margin: 26px 0 8px; font-size: 14px; }.doc-prose p, .doc-prose li { color: var(--text-dim); font-size: 13px; line-height: 1.8; }.doc-prose p { margin: 0 0 14px; }.doc-prose ul, .doc-prose ol { margin: 0 0 17px; padding-left: 20px; }.doc-prose strong { color: var(--text); font-weight: 680; }.doc-note { margin: 21px 0; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--surface-muted); }.doc-note p { margin: 0; font-size: 12px; }.doc-footer { width: min(920px, calc(100% - 48px)); display: flex; align-items: center; gap: 16px; margin: 0 auto; padding: 22px 0 max(30px, env(safe-area-inset-bottom)); color: var(--text-faint); border-top: 1px solid var(--line); font-size: 10px; }.doc-footer a { color: var(--accent); }

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) { .btn:hover, .dev-item:hover, .iconbtn:hover { transform: translateY(-2px); }.btn.primary:hover { background: var(--accent-strong); box-shadow: 0 12px 27px rgba(8, 127, 245, .27); }.dev-item:hover:not(.off):not(.local) { border-color: rgba(8, 127, 245, .32); box-shadow: var(--shadow-sm); }.toolbtn:hover { color: #fff; background: rgba(255, 255, 255, .09); } }
@media (max-width: 1050px) { .site-main, .site-footer { width: min(100% - 40px, var(--content)); }.landing-hero { grid-template-columns: minmax(0, .9fr) minmax(390px, 1.1fr); gap: 35px; }.landing-copy h1 { font-size: clamp(45px, 6vw, 69px); }.session-sidepanel { display: none; }.session-workspace { padding-right: 14px; padding-left: 14px; } }
@media (max-width: 820px) { :root { --bar-h: 62px; }.topbar { padding-right: 18px; padding-left: 18px; }.site-nav { gap: 0; margin-left: 18px; }.site-nav a { padding-right: 8px; padding-left: 8px; font-size: 11px; }.landing-hero { min-height: auto; grid-template-columns: 1fr; padding: 76px 0 67px; }.landing-copy { max-width: 680px; }.landing-copy h1 { max-width: 680px; font-size: clamp(52px, 10vw, 76px); }.hero-console { width: min(680px, 100%); min-height: 420px; margin: 10px auto 0; }.trust-strip { grid-template-columns: repeat(2, 1fr); gap: 0; }.trust-strip > div, .trust-strip > div:first-child { padding: 14px 16px; border-bottom: 1px solid var(--line); }.trust-strip > div:nth-child(2) { border-right: 0; }.trust-strip > div:nth-last-child(-n + 2) { border-bottom: 0; }.connect-layout { grid-template-columns: 1fr; }.workspace-intro { min-height: 235px; }.workspace-intro h3 { margin-top: 32px; }.text-link { margin-top: 24px; }.feature-grid, .download-grid { grid-template-columns: 1fr; }.feature-card { min-height: 290px; }.feature-visual { height: 128px; }.docs-callout { align-items: flex-start; flex-direction: column; }.site-footer { flex-wrap: wrap; }.site-footer nav { order: 3; width: 100%; margin-left: 0; }.mobile-only-control { display: flex; }.control-hint { display: none; }.toolbar { width: calc(100% - 28px); justify-content: flex-start; overflow-x: auto; }.toolbtn { flex: 0 0 64px; min-width: 64px; }.sessbar { gap: 8px; padding-right: 11px; padding-left: 11px; }.session-desktop-hint { display: none; }.quality-badge { display: none; }.traffic-badge { max-width: 135px; font-size: 9px; }.path-badge { max-width: 105px; }.doc-content { grid-template-columns: 1fr; gap: 24px; }.doc-toc { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }.doc-hero { padding-top: 66px; } }
@media (max-width: 620px) { .site-nav { display: none; }.topbar-tools { gap: 5px; }.account-toolbar { max-width: 154px; padding: 4px; }.account-toolbar .account-summary-copy, .account-toolbar .account-state-badge { display: none; }.account-toolbar .account-actions .btn { min-height: 28px; padding: 6px 7px; font-size: 9px; }.topbar-state { max-width: 76px; overflow: hidden; text-overflow: ellipsis; }.site-main, .site-footer { width: calc(100% - 30px); }.landing-hero { padding-top: 61px; }.landing-copy h1 { font-size: clamp(46px, 14vw, 67px); }.hero-copy { font-size: 15px; }.hero-meta { gap: 11px; }.hero-meta span { font-size: 10px; }.hero-console { min-height: 302px; margin-top: 20px; }.console-window { border-radius: 18px; }.console-chrome { height: 34px; padding: 0 11px; }.console-chrome > span { width: 6px; height: 6px; }.console-chrome small { margin-left: 6px; font-size: 7px; }.console-body { grid-template-columns: 35px 1fr; min-height: 245px; }.console-sidebar { gap: 11px; padding: 12px 0; }.console-mark { width: 20px; height: 20px; margin-bottom: 4px; border-radius: 6px; font-size: 9px; }.console-side-line { width: 12px; height: 12px; }.console-content { padding: 17px 13px; }.console-content-head strong { margin-top: 4px; font-size: 14px; }.console-content-head small { font-size: 6px; }.console-content-head em { padding: 4px 6px; font-size: 7px; }.console-screen { min-height: 135px; margin-top: 14px; border-radius: 11px; }.screen-topline { top: 11px; left: 12px; height: 4px; }.screen-card.one { top: 35px; left: 12px; height: 58px; border-radius: 7px; }.screen-card.two { top: 35px; right: 12px; height: 32px; border-radius: 7px; }.screen-card.two::after { bottom: -39px; height: 32px; border-radius: 7px; }.screen-cursor { top: 76px; width: 10px; height: 15px; }.screen-status { right: 10px; bottom: 8px; font-size: 6px; }.console-stats { gap: 5px; margin-top: 12px; }.console-stats small { font-size: 6px; }.console-stats strong { margin-top: 3px; font-size: 10px; }.console-stats strong span { font-size: 6px; }.floating-chip { gap: 6px; padding: 7px 8px 7px 6px; border-radius: 10px; }.floating-chip small { font-size: 6px; }.floating-chip strong { margin-top: 2px; font-size: 8px; }.chip-icon, .chip-avatar { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; }.chip-quality { top: 0; left: -2%; }.chip-device { right: -2%; bottom: 2%; }.trust-strip { margin: 0 -15px; }.trust-strip > div, .trust-strip > div:first-child { gap: 9px; padding: 12px 14px; }.trust-strip b { font-size: 11px; }.trust-strip small { font-size: 9px; }.workspace-section, .feature-section, .downloads-section { padding-top: 79px; }.section-heading { align-items: flex-start; flex-direction: column; gap: 9px; margin-bottom: 22px; }.section-heading > p { max-width: 100%; text-align: left; }.section-heading h2 { font-size: 31px; }.connect-panel { padding: 20px 16px; border-radius: 20px; }.panel-heading h2 { font-size: 24px; }.workspace-intro { padding: 24px 20px; border-radius: 20px; }.workspace-intro h3 { margin: 29px 0 12px; font-size: 29px; }.intro-list { margin-top: 23px; }.intro-list > div { padding: 10px 0; }.intro-list small { font-size: 9px; }.feature-card { min-height: 285px; padding: 19px; border-radius: 19px; }.feature-visual { margin: 15px 0 19px; }.download-card { padding: 16px; }.docs-callout { margin-top: 79px; padding: 25px 20px; border-radius: 19px; }.docs-actions { width: 100%; flex-direction: column; }.docs-actions .btn { width: 100%; }.site-footer { margin-top: 62px; }.sessbar { min-height: 54px; flex-basis: 54px; }.sessbar > .iconbtn { width: 36px; height: 36px; flex-basis: 36px; }.sessbar > .iconbtn svg { width: 17px; height: 17px; }.sess-peer { font-size: 11px; }.sess-status { font-size: 9px; }.traffic-badge { display: none; }.session-workspace { padding: 0; }.stage, .session-video { border-radius: 0; border-right: 0; border-left: 0; }.toolbar { width: calc(100% - 18px); min-height: 62px; margin: 7px 9px max(7px, env(safe-area-inset-bottom)); padding: 5px 6px; border-radius: 17px; }.toolbtn { min-height: 50px; flex-basis: 59px; min-width: 59px; }.stream-settings-card { align-self: end; margin-bottom: max(0px, env(safe-area-inset-bottom)); border-radius: 21px 21px 17px 17px; }.stream-setting-row { grid-template-columns: 1fr; gap: 9px; margin-top: 18px; }.stream-setting-row select { min-height: 46px; }.kbd-layer { right: 8px; bottom: 8px; left: 8px; width: auto; padding: 12px; }.kbd-row { gap: 5px; }.kbd-key, .kbd-mod { min-width: 50px; padding: 7px 5px; }.doc-wrap, .doc-footer { width: calc(100% - 30px); }.doc-header { min-height: 60px; padding-right: 15px; padding-left: 15px; }.doc-header nav a { padding: 7px; font-size: 10px; }.doc-hero { padding: 54px 0 39px; }.doc-hero h1 { font-size: 44px; }.doc-hero p { font-size: 13px; }.doc-content { padding: 35px 0 65px; }.doc-prose h2:not(:first-child) { margin-top: 38px; }.doc-prose h2 { font-size: 20px; }.doc-prose p, .doc-prose li { font-size: 12px; }.doc-footer { flex-wrap: wrap; } }
@media (pointer: coarse) {
  .btn, .tab, .iconbtn, .toolbtn, .hist-del { min-height: 44px; }
  .iconbtn { min-width: 44px; }
  .theme-toggle { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .account-actions .btn { min-height: 44px; }
  .hist-fill { min-height: 44px; }
  .session-mode-segment { min-height: 44px; }
  .session-mode-segment button,
  .session-mode-picker.compact .session-mode-segment button { min-height: 44px; }
}
@media (max-height: 520px) and (orientation: landscape) { :root { --bar-h: 48px; --tool-h: 58px; }.hero-console, .landing-hero { min-height: auto; }.file-transfer-panel { position: absolute; z-index: 13; right: 10px; bottom: 70px; left: 10px; width: auto; margin: 0; }.toolbar { position: absolute; z-index: 12; right: 10px; bottom: 8px; width: auto; min-height: 54px; margin: 0; }.toolbtn { min-height: 44px; }.toolbtn span { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; } }
@media (prefers-reduced-transparency: reduce) { .topbar, .connect-panel, .workspace-intro, .floating-chip, .doc-header { background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } #view-session .sessbar, .toolbar, .session-sidepanel, .kbd-layer, .stream-settings-card, .text-card { background: #1f242c; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@supports not (backdrop-filter: blur(1px)) { .topbar, .connect-panel, .workspace-intro, .floating-chip, .doc-header { background: var(--surface-solid); } #view-session .sessbar, .toolbar, .session-sidepanel, .kbd-layer, .stream-settings-card, .text-card { background: #1f242c; } }

/* The remote screen has an app-owned full-screen action; keep browser media
   controls such as Picture-in-Picture out of the control surface. */
#session-video::-webkit-media-controls-picture-in-picture-button { display: none !important; }

/* Floating transfer center: it must never become another row in the session layout. */
#view-session { position: relative; }
#view-session.controls-hidden .file-transfer-panel { display: flex !important; }
.file-transfer-center { position: absolute; z-index: 18; inset: 0; pointer-events: none; }
.file-transfer-center[hidden] { display: none !important; }
.transfer-launcher { position: absolute; top: calc(var(--bar-h) + 14px); right: 18px; display: inline-flex; align-items: center; gap: 9px; min-width: 142px; max-width: min(230px, calc(100% - 36px)); padding: 7px 9px 7px 8px; color: #fff; border: 1px solid rgba(255, 255, 255, .15); border-radius: 15px; background: rgba(28, 34, 42, .86); box-shadow: 0 13px 34px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(20px) saturate(145%); backdrop-filter: blur(20px) saturate(145%); pointer-events: auto; transition: opacity .18s ease, transform .18s ease, border-color .18s ease, background .18s ease; }
.transfer-launcher:hover { border-color: rgba(105, 212, 255, .42); background: rgba(37, 45, 56, .94); }
.transfer-launcher:focus-visible { outline: 2px solid #69d4ff; outline-offset: 3px; }
.file-transfer-center[data-state='settled'] .transfer-launcher { border-color: rgba(48, 209, 88, .30); }
.file-transfer-center[data-state='failed'] .transfer-launcher { border-color: rgba(255, 69, 58, .42); }
.transfer-launcher-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; color: #69d4ff; border-radius: 10px; background: rgba(105, 212, 255, .13); }
.file-transfer-center[data-state='settled'] .transfer-launcher-icon { color: #30d158; background: rgba(48, 209, 88, .13); }
.file-transfer-center[data-state='failed'] .transfer-launcher-icon { color: #ff6961; background: rgba(255, 69, 58, .14); }
.transfer-launcher-icon svg { width: 17px; height: 17px; }
.transfer-launcher-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.transfer-launcher-copy strong { color: #fff; font-size: 11px; font-weight: 700; }
.transfer-launcher-copy span { max-width: 135px; overflow: hidden; color: rgba(235, 239, 248, .60); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.transfer-launcher-count { min-width: 22px; height: 22px; display: grid; place-items: center; margin-left: auto; padding: 0 5px; color: #dff6ff; border: 1px solid rgba(105, 212, 255, .25); border-radius: 999px; background: rgba(105, 212, 255, .15); font-size: 10px; font-variant-numeric: tabular-nums; }
.file-transfer-center[data-state='settled'] .transfer-launcher-count { color: #dfffe8; border-color: rgba(48, 209, 88, .25); background: rgba(48, 209, 88, .14); }
.file-transfer-center[data-state='failed'] .transfer-launcher-count { color: #ffe5e2; border-color: rgba(255, 69, 58, .30); background: rgba(255, 69, 58, .15); }
.file-transfer-center[data-open='true'] .transfer-launcher { visibility: hidden; opacity: 0; transform: scale(.94); pointer-events: none; }
.file-transfer-panel { position: absolute; top: calc(var(--bar-h) + 14px); right: 18px; width: min(430px, calc(100% - 36px)); max-height: min(66dvh, 560px); display: flex; flex-direction: column; margin: 0; padding: 17px 16px 13px; overflow: hidden; color: #f5f7fb; border: 1px solid rgba(255, 255, 255, .16); border-radius: 20px; background: rgba(27, 33, 41, .94); box-shadow: 0 25px 70px rgba(0, 0, 0, .47), inset 0 1px 0 rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(25px) saturate(150%); backdrop-filter: blur(25px) saturate(150%); visibility: hidden; opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.file-transfer-panel.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
.file-transfer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 0 0 16px; }
.file-transfer-heading-copy { min-width: 0; display: grid; gap: 4px; }
.file-transfer-eyebrow { color: #69d4ff; font-size: 8px; font-weight: 760; letter-spacing: .16em; }
.file-transfer-heading-copy strong { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: -.03em; }
.file-transfer-overview { color: rgba(235, 239, 248, .56); font-size: 10px; }
.file-transfer-heading-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.file-transfer-clear { min-height: 30px; padding: 5px 8px; color: rgba(235, 239, 248, .68); border: 1px solid rgba(255, 255, 255, .10); border-radius: 8px; background: rgba(255, 255, 255, .06); font-size: 10px; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.file-transfer-clear:hover:not(:disabled) { color: #fff; border-color: rgba(105, 212, 255, .30); background: rgba(105, 212, 255, .12); }
.file-transfer-clear:disabled { opacity: .34; cursor: default; }
.file-transfer-close.iconbtn { width: 31px; height: 31px; flex-basis: 31px; border-radius: 9px; }
.file-transfer-close.iconbtn svg { width: 15px; height: 15px; }
.file-transfer-list-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: rgba(235, 239, 248, .48); font-size: 9px; letter-spacing: .02em; }
.file-transfer-list-header span:last-child { color: rgba(235, 239, 248, .38); font-variant-numeric: tabular-nums; }
.file-transfer-list { min-height: 0; display: grid; gap: 8px; max-height: min(43dvh, 350px); margin: 0; padding: 0 3px 0 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; list-style: none; }
.file-transfer-item { padding: 11px 11px 10px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 13px; background: rgba(255, 255, 255, .055); transition: border-color .16s ease, background .16s ease; }
.file-transfer-item[data-state='transferring'] { border-color: rgba(105, 212, 255, .20); background: rgba(105, 212, 255, .065); }
.file-transfer-item[data-state='completed'] { border-color: rgba(48, 209, 88, .20); }
.file-transfer-item[data-state='failed'] { border-color: rgba(255, 69, 58, .28); background: rgba(255, 69, 58, .06); }
.file-transfer-item-main { display: grid; grid-template-columns: 29px minmax(0, 1fr); align-items: start; gap: 9px; }
.file-transfer-state-icon { width: 29px; height: 29px; display: grid; place-items: center; color: #69d4ff; border-radius: 9px; background: rgba(105, 212, 255, .13); }
.file-transfer-state-icon .ic { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.file-transfer-item[data-state='completed'] .file-transfer-state-icon { color: #30d158; background: rgba(48, 209, 88, .13); }
.file-transfer-item[data-state='failed'] .file-transfer-state-icon { color: #ff6961; background: rgba(255, 69, 58, .14); }
.file-transfer-item-copy { min-width: 0; }
.file-transfer-row, .file-transfer-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.file-transfer-name { min-width: 0; overflow: hidden; color: #fff; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.file-transfer-direction { flex: 0 0 auto; padding: 3px 6px; color: rgba(235, 239, 248, .54); border: 1px solid rgba(255, 255, 255, .09); border-radius: 6px; font-size: 8px; white-space: nowrap; }
.file-transfer-meta { margin-top: 7px; color: rgba(235, 239, 248, .57); font-size: 9px; line-height: 1.3; }
.file-transfer-meta > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-transfer-rate { flex: 0 0 auto; color: rgba(235, 239, 248, .68); font-variant-numeric: tabular-nums; }
.file-transfer-progress { width: 100%; height: 5px; display: block; margin: 8px 0 0; overflow: hidden; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .10); }
.file-transfer-progress::-webkit-progress-bar { background: rgba(255, 255, 255, .10); border-radius: 99px; }
.file-transfer-progress::-webkit-progress-value { background: #69d4ff; border-radius: 99px; transition: width .16s ease; }
.file-transfer-progress::-moz-progress-bar { background: #69d4ff; border-radius: 99px; }
.file-transfer-item[data-state='completed'] .file-transfer-progress::-webkit-progress-value, .file-transfer-item[data-state='completed'] .file-transfer-progress::-moz-progress-bar { background: #30d158; }
.file-transfer-item[data-state='failed'] .file-transfer-progress::-webkit-progress-value, .file-transfer-item[data-state='failed'] .file-transfer-progress::-moz-progress-bar { background: #ff453a; }
.file-transfer-meta-secondary { margin-top: 6px; color: rgba(235, 239, 248, .40); }
.file-transfer-error { min-width: 0; max-width: 55%; overflow: hidden; color: #ff6961; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
  .transfer-launcher { top: calc(var(--bar-h) + 10px); right: 12px; }
  .file-transfer-panel { top: calc(var(--bar-h) + 10px); right: 12px; width: min(430px, calc(100% - 24px)); }
}
@media (max-width: 620px) {
  .transfer-launcher { top: auto; right: 14px; bottom: calc(var(--tool-h) + 20px); max-width: calc(100% - 28px); }
  .file-transfer-panel { top: auto; right: 8px; bottom: calc(var(--tool-h) + 17px); left: 8px; width: auto; max-height: min(68dvh, 520px); padding: 16px 13px 12px; border-radius: 20px; transform-origin: bottom right; }
  .file-transfer-list { max-height: min(49dvh, 355px); }
  .file-transfer-heading { margin-bottom: 14px; }
  .file-transfer-heading-copy strong { font-size: 16px; }
  .file-transfer-clear { min-height: 32px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .transfer-launcher { top: calc(var(--bar-h) + 8px); right: 10px; bottom: auto; }
  .file-transfer-panel { top: 8px; right: 10px; bottom: 8px; left: auto; width: min(410px, calc(100% - 20px)); max-height: none; }
  .file-transfer-list { max-height: none; }
}

/* ===== Product refinement: quiet, content-first interface ===== */
:root {
  --bg: var(--ui-bg);
  --bg-deep: var(--ui-bg-elevated);
  --surface: var(--ui-surface);
  --surface-solid: var(--ui-surface-solid);
  --surface-muted: var(--ui-surface-muted);
  --line: var(--ui-line);
  --line-strong: var(--ui-line-strong);
  --text: var(--ui-text);
  --text-dim: var(--ui-text-secondary);
  --text-faint: var(--ui-text-tertiary);
  --accent: var(--ui-accent);
  --accent-strong: var(--ui-accent-hover);
  --accent-soft: var(--ui-accent-soft);
  --green: var(--ui-positive);
  --orange: var(--ui-warning);
  --red: var(--ui-danger);
  --shadow-sm: var(--ui-shadow-sm);
  --shadow-md: var(--ui-shadow-md);
  --shadow-lg: var(--ui-shadow-md);
  --content: var(--ui-content);
  --bar-h: 64px;
}

html[data-theme='dark'] {
  --bg: var(--ui-bg);
  --bg-deep: var(--ui-bg-elevated);
  --surface: var(--ui-surface);
  --surface-solid: var(--ui-surface-solid);
  --surface-muted: var(--ui-surface-muted);
  --line: var(--ui-line);
  --line-strong: var(--ui-line-strong);
  --text: var(--ui-text);
  --text-dim: var(--ui-text-secondary);
  --text-faint: var(--ui-text-tertiary);
  --accent: var(--ui-accent);
  --accent-strong: var(--ui-accent-hover);
  --accent-soft: var(--ui-accent-soft);
  --green: var(--ui-positive);
  --orange: var(--ui-warning);
  --red: var(--ui-danger);
  --shadow-sm: var(--ui-shadow-sm);
  --shadow-md: var(--ui-shadow-md);
  --shadow-lg: var(--ui-shadow-md);
}

body { letter-spacing: -0.005em; }

.topbar {
  padding-right: max(24px, env(safe-area-inset-right));
  padding-left: max(24px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--ui-bg-elevated) 84%, transparent);
  border-bottom-color: var(--ui-line);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
}
.brand { font-size: 13px; font-weight: 650; }
.brand-icon { width: 28px; height: 28px; flex-basis: 28px; }
.logo { border-radius: 8px; box-shadow: none; }
.site-nav { margin-left: clamp(22px, 4vw, 52px); }
.site-nav a { padding: 8px 11px; border-radius: 9px; font-size: 11px; }
.site-nav a:hover { background: var(--ui-surface-muted); }
.topbar-state { border-color: transparent; background: var(--ui-surface-muted); }
.theme-toggle { border-color: transparent; background: var(--ui-surface-muted); }

#view-connect,
html[data-theme='dark'] #view-connect { background: var(--ui-bg); }
.site-main { width: min(var(--ui-content), calc(100% - 64px)); }

.landing-hero {
  min-height: 560px;
  grid-template-columns: minmax(0, 0.92fr) minmax(430px, 1.08fr);
  gap: clamp(42px, 6vw, 82px);
  padding: clamp(68px, 8vw, 98px) 0 74px;
}
.landing-copy { max-width: 560px; }
.hero-kicker, .panel-kicker, .section-kicker, .sidepanel-kicker {
  color: var(--ui-text-tertiary);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
}
.landing-copy h1 {
  max-width: 600px;
  margin: 18px 0 21px;
  font-size: clamp(52px, 5.8vw, 72px);
  font-weight: 720;
  line-height: 1.02;
  letter-spacing: -0.06em;
}
.landing-copy h1 span { display: block; color: var(--ui-text); background: none; -webkit-text-fill-color: initial; }
.hero-copy { max-width: 510px; color: var(--ui-text-secondary); font-size: 16px; line-height: 1.68; }
.hero-actions { margin-top: 28px; }
.hero-meta { gap: 18px; margin-top: 28px; color: var(--ui-text-tertiary); }
.hero-meta span { font-size: 10px; }

.btn {
  min-height: 42px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 620;
  box-shadow: none;
}
.btn.primary { border-color: var(--ui-accent); background: var(--ui-accent); box-shadow: none; }
.btn.primary:hover { border-color: var(--ui-accent-hover); background: var(--ui-accent-hover); box-shadow: none; }
.btn.ghost { border-color: var(--ui-line-strong); background: var(--ui-surface-solid); }

.hero-console { min-height: 420px; }
.console-glow, .floating-chip { display: none; }
.console-window,
html[data-theme='dark'] .console-window {
  width: min(100%, 610px);
  border: 1px solid var(--ui-line-strong);
  border-radius: 21px;
  background: var(--ui-surface-solid);
  box-shadow: var(--ui-shadow-md);
  transform: none;
}
.console-chrome { height: 43px; border-bottom-color: var(--ui-line); background: var(--ui-bg-elevated); }
.console-chrome small { color: var(--ui-text-tertiary); font-family: inherit; letter-spacing: 0; }
.console-body { grid-template-columns: 50px 1fr; min-height: 340px; }
.console-sidebar { border-right-color: var(--ui-line); background: var(--ui-bg-elevated); }
.console-mark { background: var(--ui-accent); }
.console-content { padding: 23px 24px 20px; }
.console-content-head small, .console-stats small { color: var(--ui-text-tertiary); font-family: inherit; letter-spacing: 0; }
.console-content-head em { color: var(--ui-positive); border-color: transparent; background: var(--ui-positive-soft); }
.console-screen,
html[data-theme='dark'] .console-screen {
  min-height: 202px;
  border-color: var(--ui-line);
  background: var(--ui-surface-muted);
  box-shadow: none;
}
.screen-card, html[data-theme='dark'] .screen-card { background: var(--ui-surface-solid); box-shadow: var(--ui-shadow-sm); }
.screen-status { color: var(--ui-text-tertiary); font-family: inherit; }
.console-stats { padding-top: 16px; border-top: 1px solid var(--ui-line); }
.console-stats strong { font-size: 13px; }

.trust-strip { padding: 20px 0; border-color: var(--ui-line); }
.trust-strip > div { border-right-color: var(--ui-line); }
.trust-strip strong { color: var(--ui-text-tertiary); font-family: inherit; }
.trust-strip b { font-size: 11px; }

.workspace-section, .feature-section, .downloads-section { padding-top: 100px; }
.section-heading { margin-bottom: 25px; }
.section-heading h2 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -0.05em; }
.section-heading > p { color: var(--ui-text-secondary); }

.connect-layout { grid-template-columns: minmax(250px, 0.68fr) minmax(430px, 1fr); gap: 18px; }
.workspace-intro,
html[data-theme='dark'] .workspace-intro {
  padding: 30px 26px;
  border-color: var(--ui-line);
  border-radius: 20px;
  background: var(--ui-bg-elevated);
  box-shadow: none;
}
.intro-number { color: var(--ui-text-tertiary); font-family: inherit; letter-spacing: 0; }
.workspace-intro h3 { margin-top: 44px; font-size: clamp(27px, 3vw, 38px); }
.workspace-intro h3 em { color: var(--ui-text); }
.intro-list > div { border-color: var(--ui-line); }
.connect-panel {
  padding: 28px;
  border: 1px solid var(--ui-line);
  border-radius: 20px;
  background: var(--ui-surface-solid);
  box-shadow: var(--ui-shadow-sm);
}
.panel-heading { margin-bottom: 20px; }
.panel-heading h2 { font-size: 27px; }
.tabs { padding: 3px; border-radius: 12px; background: var(--ui-surface-muted); }
.tab { min-height: 36px; border-radius: 9px; }
.tab.active { background: var(--ui-surface-solid); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.field input, .field select, .field textarea { border-radius: 11px; background: var(--ui-bg-elevated); }

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ui-line);
  border-bottom: 1px solid var(--ui-line);
}
.feature-card,
.feature-card-dark {
  min-height: 310px;
  padding: 25px 24px;
  color: var(--ui-text);
  border: 0;
  border-right: 1px solid var(--ui-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.feature-card:last-child { border-right: 0; }
.feature-visual { height: 118px; margin: 18px 0 23px; border-color: var(--ui-line); background: var(--ui-bg-elevated); }
.feature-card h3 { font-size: 17px; }
.feature-card p { color: var(--ui-text-secondary); }
.feature-index { color: var(--ui-text-tertiary); }

.download-grid { gap: 12px; }
.download-card,
.download-card.featured {
  min-height: 108px;
  padding: 18px;
  border-color: var(--ui-line);
  border-radius: 17px;
  background: var(--ui-surface-solid);
  box-shadow: none;
}
.download-card:hover { border-color: var(--ui-line-strong); box-shadow: var(--ui-shadow-sm); transform: translateY(-1px); }
.download-icon { border-radius: 12px; }
.download-badge { color: var(--ui-accent); background: var(--ui-accent-soft); }

.docs-callout {
  margin-top: 100px;
  padding: 32px;
  border-color: var(--ui-line);
  border-radius: 20px;
  background: var(--ui-bg-elevated);
  box-shadow: none;
}
.docs-callout h2 { font-size: clamp(26px, 3vw, 38px); }
.site-footer { border-color: var(--ui-line); }

/* Device rows share the same visual language as the desktop app. */
.dev-list { gap: 0; }
.device-row { display: flex; align-items: stretch; border-top: 1px solid var(--ui-line); }
.device-row:first-child { border-top: 0; }
.device-row .dev-item { flex: 1; min-width: 0; border-top: 0; }
.dev-disconnect { align-self: center; flex: 0 0 auto; margin: 0 8px 0 4px; padding: 6px 9px; color: var(--ui-text-secondary); border: 1px solid var(--ui-line-strong); border-radius: 8px; background: var(--ui-bg-elevated); font: inherit; font-size: 10px; cursor: pointer; }
.dev-disconnect:disabled { opacity: .55; cursor: wait; }
.dev-unbind { align-self: center; flex: 0 0 auto; margin: 0 8px 0 2px; padding: 6px 8px; color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 24%, var(--line)); border-radius: 8px; background: transparent; font: inherit; font-size: 10px; cursor: pointer; }
.dev-unbind:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 8%, transparent); }
.dev-unbind:disabled { opacity: .55; cursor: wait; }
.dev-favorite { width: 32px; height: 32px; flex: 0 0 32px; align-self: center; margin: 0 3px; padding: 0; color: var(--ui-text-tertiary); border: 1px solid transparent; border-radius: 9px; background: transparent; font: inherit; line-height: 1; cursor: pointer; transition: color 150ms ease, background 150ms ease, transform 120ms ease; }
.dev-favorite .favorite-icon { width: 17px; height: 17px; }
.dev-favorite[aria-pressed='true'] .favorite-icon { fill: currentColor; }
.dev-favorite:hover { color: var(--ui-accent); background: var(--ui-surface-muted); }
.dev-favorite[aria-pressed='true'] { color: var(--ui-accent); }
.dev-favorite:active { transform: scale(.92); }
.dev-favorite:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 2px; }
.dev-item.busy { opacity: .78; }
.dev-item {
  min-height: 70px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  grid-template-areas: 'icon name tag arrow' 'icon meta tag arrow';
  align-items: center;
  column-gap: 12px;
  padding: 12px 8px;
  border: 0;
  border-top: 1px solid var(--ui-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.dev-item:first-child { border-top: 0; }
.dev-item:hover:not(:disabled) { background: var(--ui-surface-muted); transform: none; }
.dev-platform-icon { grid-area: icon; width: 38px; height: 38px; display: grid; place-items: center; color: var(--ui-text-secondary); border-radius: 12px; background: var(--ui-surface-muted); font-size: 13px; font-weight: 680; }
.dev-platform-icon .ic { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dev-item:not(:disabled) .dev-platform-icon { color: var(--ui-accent); background: var(--ui-accent-soft); }
.dev-item .name { grid-area: name; }
.dev-item .meta { grid-area: meta; margin-top: 4px; color: var(--ui-text-tertiary); }
.dev-item .tag { grid-area: tag; float: none; }
.dev-item .tag.busy { color: var(--ui-warning); background: var(--ui-warning-soft); }
.dev-chevron { grid-area: arrow; display: grid; place-items: center; color: var(--ui-text-tertiary); }
.dev-chevron .ic { width: 16px; height: 16px; }
.dev-item:disabled .dev-chevron { visibility: hidden; }

/* Session */
#view-session { position: relative; overflow: hidden; background: #050506; }
#view-session .sessbar {
  position: absolute;
  z-index: 30;
  top: 12px;
  right: 12px;
  left: 12px;
  min-height: 50px;
  height: auto;
  padding: 7px 9px;
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background: rgba(28, 28, 30, 0.78);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
}
.sess-info { min-width: 0; }
.session-kicker { color: rgba(245, 245, 247, 0.42); font-size: 8px; letter-spacing: 0; }
.path-badge { color: rgba(245, 245, 247, 0.68); background: rgba(255, 255, 255, 0.08); }
.path-badge[data-path='direct'], .path-badge[data-path='stun'] { color: #58dd78; background: rgba(48, 209, 88, 0.12); }
.path-badge[data-path='turn'] { color: #ffd05a; background: rgba(255, 159, 10, 0.12); }
.traffic-badge { display: none; }
.session-workspace { height: 100%; padding: 0; }
.stage { width: 100%; height: 100%; border: 0; border-radius: 0; background: #000; }
.session-video { border-radius: 0; }
.session-sidepanel { display: none; }
.toolbar {
  position: absolute;
  z-index: 22;
  right: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: auto;
  max-width: calc(100% - 24px);
  min-height: 58px;
  margin: 0;
  padding: 6px 7px;
  overflow-x: auto;
  justify-content: center;
  border-radius: 16px;
  background: rgba(28, 28, 30, 0.78);
  transform: translateX(50%);
}
.control-hint { display: none; }
.toolbtn { min-width: 54px; min-height: 46px; }
#view-session.controls-hidden .toolbar { display: none !important; }
.stream-settings-card { border-radius: 20px; background: rgba(29, 29, 32, 0.96); }

@media (max-width: 820px) {
  .site-main, .site-footer { width: min(100% - 40px, var(--ui-content)); }
  .landing-hero { grid-template-columns: 1fr; gap: 34px; padding: 66px 0 62px; }
  .landing-copy { max-width: 650px; }
  .landing-copy h1 { max-width: 650px; font-size: clamp(48px, 9vw, 66px); }
  .hero-console { width: min(640px, 100%); min-height: 390px; margin: 0 auto; }
  .connect-layout { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 230px; border-right: 0; border-bottom: 1px solid var(--ui-line); }
  .feature-card:last-child { border-bottom: 0; }
  .feature-visual { height: 94px; }
  .mobile-only-control { display: flex; }
  .toolbar { justify-content: flex-start; }
}

@media (max-width: 620px) {
  :root { --bar-h: 58px; }
  .topbar { padding-right: 14px; padding-left: 14px; }
  .site-main, .site-footer { width: calc(100% - 28px); }
  .landing-hero { gap: 28px; padding: 46px 0 50px; }
  .landing-copy h1 { margin: 15px 0 18px; font-size: clamp(42px, 12vw, 54px); line-height: 1.01; }
  .hero-copy { font-size: 14px; line-height: 1.65; }
  .hero-actions { margin-top: 23px; }
  .hero-meta { gap: 10px 14px; margin-top: 22px; }
  .hero-console { min-height: 270px; margin-top: 2px; }
  .console-window { border-radius: 16px; }
  .console-body { min-height: 224px; }
  .console-content { padding: 15px 12px; }
  .console-screen { min-height: 122px; }
  .trust-strip { margin: 0; grid-template-columns: 1fr 1fr; }
  .workspace-section, .feature-section, .downloads-section { padding-top: 76px; }
  .connect-panel, .workspace-intro { padding: 20px 17px; border-radius: 17px; }
  .workspace-intro { min-height: 220px; }
  .workspace-intro h3 { margin-top: 28px; }
  .feature-card { padding: 20px 8px; }
  .docs-callout { margin-top: 76px; padding: 23px 19px; border-radius: 17px; }
  #view-session .sessbar { top: 8px; right: 8px; left: 8px; min-height: 46px; padding: 5px 7px; }
  .quality-badge, .session-desktop-hint { display: none; }
  .toolbar { right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); left: 8px; width: auto; max-width: none; min-height: 58px; transform: none; }
  .toolbtn { flex: 0 0 56px; min-width: 56px; }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar, .console-window, .connect-panel, .workspace-intro { background: var(--ui-surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  #view-session .sessbar, .toolbar { background: #1c1c1e; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Session chrome: keep the remote screen unobstructed until the user approaches an edge. */
#view-session .sessbar,
#view-session .toolbar {
  transition: transform 180ms ease-out, opacity 180ms ease-out, visibility 180ms ease;
}

.session-edge-reveal {
  position: absolute;
  z-index: 36;
  left: 50%;
  width: 78px;
  height: 8px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  opacity: .16;
  transform: translateX(-50%);
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
}
.session-edge-reveal::before {
  content: '';
  width: 64px;
  height: 2px;
  border-radius: 999px;
  background: rgba(245, 247, 251, .92);
  box-shadow: 0 1px 10px rgba(0, 0, 0, .58);
}
.session-edge-reveal-top { top: 0; }
.session-edge-reveal-bottom { bottom: max(0px, env(safe-area-inset-bottom)); }
.session-edge-reveal { pointer-events: none; }
.session-edge-reveal:focus-visible { pointer-events: auto; }
.session-edge-reveal:focus-visible,
#view-session.session-chrome-hidden .session-edge-reveal { opacity: .92; pointer-events: auto; }
.session-edge-reveal:hover,
.session-edge-reveal:focus-visible,
#view-session.session-chrome-hidden .session-edge-reveal { opacity: .92; }
.session-edge-reveal:focus-visible { outline: 2px solid #69d4ff; outline-offset: -3px; }

#view-session.session-chrome-hidden .sessbar {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(-100% - 20px));
}
#view-session.session-chrome-hidden .toolbar {
  display: flex !important;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

#view-session.session-stalled .session-edge-reveal::before {
  background: #ffbd62;
  box-shadow: 0 1px 10px rgba(255, 189, 98, .54);
}

@media (min-width: 621px) {
  #view-session.session-chrome-hidden .toolbar {
    transform: translateX(50%) translateY(calc(100% + 20px));
  }
}

@media (max-width: 620px) {
  .session-edge-reveal { width: 72px; height: 10px; }
  .session-edge-reveal::before { width: 58px; height: 2px; }
  #view-session.session-chrome-hidden .toolbar {
    transform: translateY(calc(100% + 20px));
  }
}

@media (pointer: coarse) {
  /* 触摸没有 hover，保留一条略宽的可点线，但不扩展成整条边缘热区。 */
  .session-edge-reveal { height: 16px; }
}

@media (hover: none) {
  #view-session.session-chrome-hidden .session-edge-reveal { opacity: .52; }
}

@media (prefers-reduced-motion: reduce) {
  #view-session .sessbar,
  #view-session .toolbar,
  .session-edge-reveal { transition-duration: .01ms; }
}

/* Live connection information: compact in the toolbar, optional when the
   controls are tucked away. It never captures pointer events meant for the
   remote screen. */
.session-toolbar-stats {
  flex: 0 0 auto;
  max-width: 260px;
  overflow: hidden;
  padding: 0 10px;
  color: rgba(235, 239, 248, .62);
  border-left: 1px solid rgba(255, 255, 255, .1);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.session-stats-overlay {
  position: absolute;
  z-index: 17;
  top: 19px;
  left: 50%;
  max-width: min(90vw, 360px);
  padding: 7px 11px;
  overflow: hidden;
  color: rgba(245, 247, 251, .78);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(24, 28, 35, .76);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -5px);
  transition: opacity 180ms ease-out, transform 180ms ease-out, visibility 180ms ease;
  pointer-events: none;
}
#view-session.session-chrome-hidden .session-stats-overlay[data-enabled='true'] {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.session-stats-overlay span { display: block; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 620px) {
  .session-toolbar-stats { max-width: 185px; padding: 0 7px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .session-stats-overlay { transition-duration: .01ms; }
}

.stream-setting-toggle-row { grid-template-columns: 1fr auto; margin-top: 18px; }
.stream-setting-copy span, .stream-setting-copy small { display: block; }
.stream-setting-copy span { color: #fff; font-size: 13px; font-weight: 650; }
.stream-setting-copy small { margin-top: 5px; color: rgba(235, 239, 248, .52); font-size: 10px; line-height: 1.4; }
.stream-setting-toggle { position: relative; width: 44px; height: 26px; flex: 0 0 44px; display: block; cursor: pointer; }
.stream-setting-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.stream-setting-switch { position: absolute; inset: 0; display: block; border-radius: 999px; background: rgba(255, 255, 255, .14); transition: background 160ms ease; }
.stream-setting-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .28); transition: transform 160ms ease; }
.stream-setting-toggle input:checked + .stream-setting-switch { background: #0a84ff; }
.stream-setting-toggle input:checked + .stream-setting-switch::after { transform: translateX(18px); }
.stream-setting-toggle input:focus-visible + .stream-setting-switch { outline: 2px solid #69d4ff; outline-offset: 3px; }

@media (max-width: 620px) {
  .stream-setting-toggle-row { grid-template-columns: 1fr auto; }
}

/* v0.4 home: one primary task; account, downloads and help live in the toolbar. */
#view-connect .compact-site-header { width:100%; max-width:none; min-height:76px; padding:16px max(24px,calc((100vw - 1120px)/2)); gap:24px; border-radius:0; position:sticky; top:0; z-index:30; background:color-mix(in srgb,var(--surface-solid) 90%,transparent); }
.site-toolbar { display:flex; align-items:center; gap:10px; margin-left:auto; }
.site-toolbar > button:not(.theme-toggle), .site-help summary { color:var(--text); background:none; border:0; font-size:14px; padding:10px 14px; border-radius:10px; cursor:pointer; white-space:nowrap; min-height:44px; }
.site-toolbar > button:hover, .site-help summary:hover { background:var(--surface-muted); }
.site-help { position:relative; }
.site-help summary { list-style:none; }
.site-help summary::-webkit-details-marker { display:none; }
.site-help > div { position:absolute; top:100%; right:0; width:160px; padding:8px; border:1px solid var(--line); background:var(--surface-solid); border-radius:14px; box-shadow:var(--shadow-md); }
.site-help a { display:block; color:var(--text); padding:12px; text-decoration:none; border-radius:8px; }
.site-help a:hover { background:var(--surface-muted); }
#view-connect .product-home { width:100%; max-width:1120px; padding:0 24px; margin:auto; }
.connection-hero { display:grid; grid-template-columns:1fr 430px; align-items:center; gap:72px; padding:84px 0 72px; }
.connection-story .section-kicker { color:var(--text-dim); font-size:13px; font-weight:550; letter-spacing:.05em; margin:0 0 26px; }
.connection-story h1 { font-size:clamp(42px,5vw,64px); font-weight:620; line-height:1.22; letter-spacing:-.055em; margin:0 0 26px; color:var(--text); }
.connection-story h1 span { color:var(--text-dim); }
.connection-description { font-size:18px; line-height:1.85; color:var(--text-dim); margin:0 0 32px; }
.connection-note { font-size:13px; color:var(--text-dim); }
.guest-card { border:1px solid var(--line); border-radius:24px; padding:32px; background:var(--surface-solid); box-shadow:0 16px 48px rgba(0,0,0,.04); }
.guest-card-heading { display:flex; gap:14px; align-items:center; margin-bottom:28px; }
.guest-mark { display:grid; place-items:center; width:42px; height:42px; border:1px solid var(--line); border-radius:12px; font-size:24px; flex-shrink:0; }
.guest-card h2 { margin:0 0 5px; font-size:21px; letter-spacing:-.03em; font-weight:620; }
.guest-card-heading p { margin:0; font-size:13px; color:var(--text-dim); }
.guest-card .field { margin:18px 0 0; }
.guest-card .field > span { font-size:13px; margin-bottom:9px; }
.guest-card .field input { min-width:0; width:100%; height:48px; border-radius:10px; background:var(--surface-muted); border:1px solid transparent; }
.guest-card .field input:focus { background:var(--surface-solid); border-color:var(--accent); }
.guest-card #guest-code { font-size:25px; letter-spacing:.15em; font-variant-numeric:tabular-nums; height:60px; }
.guest-card #guest-code::placeholder { color:var(--text-dim); opacity:.6; }
.guest-card .hint { margin:9px 0 0; font-size:12px; }
.guest-card .status:empty { min-height:14px; margin:0; }
.guest-card .btn.primary { width:100%; min-height:48px; display:flex; justify-content:space-between; border-radius:11px; box-shadow:none; }
.guest-trust-note { color:var(--text-dim); font-size:11px; line-height:1.8; border-top:1px solid var(--line); padding-top:18px; margin:20px 0 0; }
.connection-steps { display:grid; grid-template-columns:repeat(3,1fr); gap:28px; padding:32px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.connection-steps article { display:flex; gap:15px; }
.connection-steps article > span { font-size:12px; padding-top:4px; color:var(--text-dim); font-variant-numeric:tabular-nums; }
.connection-steps h2 { margin:0 0 8px; font-size:15px; font-weight:600; }
.connection-steps p { margin:0; font-size:12px; line-height:1.7; color:var(--text-dim); }
.home-product-note { color:var(--text-dim); font-size:12px; line-height:1.9; margin:26px 0 38px; }
#view-connect .compact-footer { max-width:1120px; width:100%; margin:auto; padding:20px 24px 30px; display:flex; align-items:center; justify-content:space-between; border:0; font-size:12px; color:var(--text-dim); }
.site-dialog { margin:auto; padding:28px; width:min(580px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); color:var(--text); background:var(--surface-solid); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow-lg); overflow:auto; }
.site-dialog::backdrop { background:rgba(0,0,0,.32); }
.site-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }
.site-dialog-heading h2 { font-size:22px; font-weight:620; margin:0; }
.site-dialog-heading button { display:grid; place-items:center; border:0; background:var(--surface-muted); color:var(--text); width:36px; height:36px; border-radius:50%; flex-shrink:0; }
.site-dialog-heading button .site-icon { width:16px; height:16px; }
.site-dialog .tabs { margin-bottom:24px; }
.site-dialog .tabpane { padding:0; }
.site-dialog #account-session { display:block; width:100%; max-width:none; padding:0 0 20px; border:0; background:none; }
.site-dialog #account-session.hidden { display:none; }
.site-dialog .account-actions { margin-top:16px; display:flex; gap:10px; }
.site-dialog .device-heading { display:flex; flex-wrap:wrap; }
.site-dialog .devices-pane { max-height:none; }
.site-dialog .download-grid { display:grid; grid-template-columns:1fr; gap:12px; }
.site-dialog .downloads-section { padding:0; margin:0; border:0; }
.site-dialog .section-heading { display:block; margin-bottom:22px; }
.site-dialog .section-heading h2 { font-size:24px; }
.site-dialog .section-heading > p { margin-top:14px; }
.site-dialog .download-card { min-height:100px; padding:20px; }
.site-dialog .download-badge { display:none; }
.site-dialog .download-copy { min-width:0; }
.site-dialog .download-copy span { white-space:normal; }
.site-toolbar :focus-visible, .site-dialog :focus-visible, .guest-card :focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:760px) {
  #view-connect .compact-site-header { padding:12px 18px; min-height:64px; gap:8px; flex-wrap:wrap; }
  .compact-site-header .brand { gap:8px; font-size:15px; }
  .site-toolbar { gap:0; }
  .site-toolbar > button:not(.theme-toggle), .site-help summary { padding:8px; font-size:12px; }
  .site-toolbar .theme-toggle { width:36px; height:36px; }
  #view-connect .product-home { padding:0 20px; }
  .connection-hero { grid-template-columns:1fr; gap:30px; padding:38px 0 32px; }
  .connection-story h1 { font-size:40px; margin-bottom:14px; }
  .connection-story h1 br { display:initial; }
  .connection-story .section-kicker { margin-bottom:16px; font-size:11px; }
  .connection-description { font-size:15px; margin-bottom:0; }
  .connection-note, .desktop-break { display:none; }
  .guest-card { padding:24px; border-radius:20px; }
  .guest-card-heading { margin-bottom:20px; }
  .connection-steps { grid-template-columns:1fr; gap:22px; padding:28px 0; }
  .home-product-note { margin:24px 0; }
  .site-dialog { padding:22px; }
}
@media(max-width:390px) {
  .compact-site-header .brand span { display:none; }
  .connection-story h1 { font-size:36px; }
}
@media(prefers-reduced-transparency:reduce) { #view-connect .compact-site-header { background:var(--surface-solid); backdrop-filter:none; } }
@media(prefers-reduced-motion:reduce) { .site-dialog, .guest-card, .site-toolbar * { transition:none; } }

/* Static documentation pages share the product theme, including an explicit
   theme control for users who arrive directly from a bookmark or search. */
.doc-header nav .doc-theme-toggle { width:34px; height:34px; min-width:34px; min-height:34px; margin-left:4px; padding:0; color:var(--text-dim); border:1px solid var(--line); border-radius:50%; background:var(--surface-muted); }
.doc-header nav .doc-theme-toggle:hover { color:var(--text); background:var(--surface-hover); }
.doc-header nav .doc-theme-toggle:active { transform:scale(.94); }
@media(max-width:620px) { .doc-header nav .doc-theme-toggle { width:34px; height:34px; min-width:34px; min-height:34px; } }

/* Connection intent and view-only presentation. */
.session-mode-picker { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 11px 12px; color: var(--text); border: 1px solid var(--line); border-radius: 13px; background: var(--surface-solid); }
.session-mode-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.session-mode-copy strong { font-size: 11px; font-weight: 650; }
.session-mode-copy small { color: var(--text-dim); font-size: 9px; line-height: 1.4; }
.session-mode-segment { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-muted); }
.session-mode-segment button { min-height: 28px; padding: 5px 10px; color: var(--text-dim); border: 0; border-radius: 7px; background: transparent; font-size: 10px; cursor: pointer; transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease; }
.session-mode-segment button:hover { color: var(--text); }
.session-mode-segment button.active { color: var(--text); background: var(--surface-solid); box-shadow: 0 2px 7px rgba(0, 0, 0, .12); }
.session-mode-picker.compact { margin: 0; padding: 0; border: 0; background: transparent; }
.session-mode-picker.compact .session-mode-segment button { min-height: 24px; padding: 4px 8px; font-size: 9px; }
#view-session[data-mode='view'] #tb-kbd,
#view-session[data-mode='view'] #tb-right,
#view-session[data-mode='view'] #tb-drag,
#view-session[data-mode='view'] #tb-copy,
#view-session[data-mode='view'] #tb-paste,
#view-session[data-mode='view'] #tb-file,
#view-session[data-mode='view'] #tb-shortcut,
#view-session[data-mode='view'] #file-transfer-center,
#view-session[data-mode='view'] #kbd-layer { display: none !important; }

.guest-waiting { position:absolute; z-index:120; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; text-align:center; padding:max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); color:#f5f5f7; background:#151517; }
.guest-waiting h2 { font-size:24px; letter-spacing:-.02em; font-weight:550; margin:0; }
.guest-waiting p { font-size:15px; line-height:1.8; margin:0; max-width:440px; }
.guest-waiting small { color:#aaaab0; font-size:12px; }
.guest-waiting button { min-height:44px; padding:10px 24px; color:#f5f5f7; background:#303033; border:1px solid #55555b; border-radius:10px; cursor:pointer; font:inherit; }
.guest-waiting button.retry { color:var(--ui-accent-foreground); border-color:transparent; background:var(--accent); }
.guest-waiting button:focus-visible { outline:2px solid #63b1ff; outline-offset:4px; }

.file-transfer-cancel { flex:0 0 auto; min-height:24px; padding:3px 8px; color:#ffb3ad; border:1px solid rgba(255,69,58,.30); border-radius:7px; background:rgba(255,69,58,.10); font:inherit; font-size:9px; cursor:pointer; transition:color .16s ease, background .16s ease, border-color .16s ease; }
.file-transfer-cancel:hover { color:#fff; border-color:rgba(255,105,97,.58); background:rgba(255,69,58,.22); }
.file-transfer-cancel:focus-visible { outline:2px solid #69d4ff; outline-offset:2px; }
.file-transfer-retry { flex:0 0 auto; min-height:24px; padding:3px 8px; color:#bfe8ff; border:1px solid rgba(105,212,255,.30); border-radius:7px; background:rgba(105,212,255,.10); font:inherit; font-size:9px; cursor:pointer; transition:color .16s ease, background .16s ease, border-color .16s ease; }
.file-transfer-retry:hover { color:#fff; border-color:rgba(105,212,255,.62); background:rgba(105,212,255,.22); }
.file-transfer-retry:focus-visible { outline:2px solid #69d4ff; outline-offset:2px; }
.file-transfer-item[data-state='cancelled'] { border-color:rgba(255,193,7,.24); background:rgba(255,193,7,.045); }
.file-transfer-item[data-state='cancelled'] .file-transfer-state-icon { color:#ffd166; background:rgba(255,193,7,.12); }

/* Keep the documentation header usable on narrow phones. Navigation labels
   stay on one line and scroll as a compact strip instead of wrapping into
   unreadable two-line buttons. */
@media (max-width: 420px) {
  .doc-header { gap: 8px; }
  .doc-header nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .doc-header nav::-webkit-scrollbar { display: none; }
  .doc-header nav a { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 360px) {
  .doc-header .brand span { display: none; }
}
