/* ==========================================================================
   RemoteFlow 官网 · Apple 产品页风格 + SwiftUI 原生界面 1:1 还原
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f5f5f7;
  --muted: #86868b;
  --muted-2: #a1a1a6;
  --accent: #006AFF;
  --accent-2: #3d8bff;
  --accent-hover: #0a5ee0;
  --accent-text: #5aa0ff;
  --glow: rgba(0, 106, 255, 0.35);
  --surface: #0c0c0e;
  --surface-2: #151517;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --radius: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  /* SwiftUI .spring(response: 0.38, dampingFraction: 0.86) */
  --spring: cubic-bezier(0.22, 1.04, 0.32, 1);
  --ease-collapse: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 220ms;
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 72px; }
.nowrap { white-space: nowrap; }

.wrap { width: min(calc(100% - 48px), 1120px); margin-inline: auto; }
.wrap-wide { width: min(calc(100% - 48px), 1240px); margin-inline: auto; }
/* 1358pt 真实主窗口宽度 */
.wrap-app { width: min(calc(100% - 36px), 1358px); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 80; padding: 10px 16px; border-radius: 999px; background: var(--surface-2); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px; font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 28px rgba(0, 106, 255, 0.35); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 12px 36px rgba(0, 106, 255, 0.45); }
.btn-ghost { color: var(--accent-text); padding-inline: 14px; }
.btn-ghost:hover { color: #8dbcff; }
.btn-ghost span { transition: transform var(--dur) var(--ease); }
.btn-ghost:hover span { transform: translateX(3px); }
.btn-glass { border-color: var(--line-2); background: rgba(20, 20, 22, 0.7); color: var(--fg); backdrop-filter: blur(20px); }
.btn-glass:hover { background: rgba(40, 40, 44, 0.8); }
.btn-small { min-height: 32px; padding: 0 16px; font-size: 13px; box-shadow: none; }
.btn-small:hover { box-shadow: none; }
.btn-large { min-height: 56px; padding: 0 34px; font-size: 17px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid transparent; background: rgba(0, 0, 0, 0.55); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.nav.scrolled { border-bottom-color: var(--line); background: rgba(10, 10, 12, 0.72); }
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; width: min(calc(100% - 48px), 1120px); height: 56px; margin-inline: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; width: fit-content; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; text-decoration: none; }
.nav nav { display: flex; gap: 30px; }
.nav nav a { color: #c7c7cc; font-size: 13px; text-decoration: none; transition: color var(--dur) var(--ease); }
.nav nav a:hover { color: #fff; }
.nav .btn { justify-self: end; }
.nav-actions { display: flex; align-items: center; justify-self: end; gap: clamp(10px, 2vw, 20px); white-space: nowrap; }
.nav-store-link { padding-block: 8px; color: #c7c7cc; font-size: 13px; text-decoration: none; }
.nav-store-link:hover { color: #fff; }

/* ---------- section scaffolding ---------- */
.section { padding-block: 140px; }
.section-tight { padding-block: 100px; }
.section-head { max-width: 820px; margin-bottom: 64px; text-align: center; }
.kicker { margin-bottom: 14px; color: var(--accent-text); font-size: 17px; font-weight: 600; }
.section-head h2, .privacy h2, .faq-head h2 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
.section-head > p:last-child { max-width: 640px; margin: 22px auto 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.6; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, #111113, #0a0a0b); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; padding-top: clamp(72px, 10vw, 120px); overflow: hidden; text-align: center; }
.hero::before { position: absolute; z-index: -2; inset: 0; content: ""; background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(0, 106, 255, 0.28), transparent 70%), radial-gradient(ellipse 40% 30% at 50% 0%, rgba(0, 106, 255, 0.10), transparent 70%); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 13px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, 0.04); color: #d2d2d7; font-size: 13px; font-weight: 500; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.6); animation: live 2.4s var(--ease) infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(48, 209, 88, 0); } }
.hero h1 { margin-top: 28px; font-size: clamp(48px, 8vw, 104px); font-weight: 700; line-height: 1.04; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #4f9bff 0%, #006AFF 45%, #7cb6ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 620px; margin: 28px auto 0; color: var(--muted-2); font-size: clamp(17px, 1.7vw, 21px); line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-top: 36px; }

.hero-stage { position: relative; height: clamp(440px, 52vw, 620px); margin-top: 56px; }
.hero-remote { position: absolute; left: 50%; bottom: 0; width: auto; height: 100%; transform: translateX(-50%); filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.8)); -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
.hero-rings { position: absolute; left: 50%; top: 9%; width: 0; height: 0; }
.hero-rings i { position: absolute; left: 0; top: 0; width: 120px; height: 120px; border: 1px solid rgba(90, 160, 255, 0.45); border-radius: 50%; transform: translate(-50%, -50%) scale(0.6); opacity: 0; animation: ring 3.6s var(--ease) infinite; }
.hero-rings i:nth-child(2) { animation-delay: 1.2s; }
.hero-rings i:nth-child(3) { animation-delay: 2.4s; }
@keyframes ring { 0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(4.2); opacity: 0; } }

/* CSS 气泡（不烧进图片） */
.bubble { position: absolute; display: flex; align-items: center; gap: 12px; padding: 14px 18px 14px 14px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 22px; background: rgba(28, 28, 32, 0.62); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); text-align: left; animation: float 7s ease-in-out infinite; }
.bubble small { display: block; color: var(--muted-2); font-size: 12px; line-height: 1.3; }
.bubble strong { display: block; margin-top: 3px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.bubble-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; }
.bubble-icon svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bubble-icon.mic { background: linear-gradient(160deg, #3d8bff, #0050d0); }
.bubble-icon.key { background: linear-gradient(160deg, #3a3a3e, #1f1f22); border: 1px solid var(--line-2); }
.wave { display: flex; align-items: center; gap: 3px; height: 22px; margin-left: 4px; }
.wave i { width: 3px; height: 30%; border-radius: 3px; background: var(--accent-text); animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -0.9s; } .wave i:nth-child(3) { animation-delay: -0.6s; } .wave i:nth-child(4) { animation-delay: -0.3s; } .wave i:nth-child(5) { animation-delay: -0.75s; }
@keyframes wave { 50% { height: 100%; } }
@keyframes float { 50% { transform: translateY(-10px); } }
.bubble-voice { top: 8%; right: calc(50% + 150px); }
.bubble-key { top: 58%; right: calc(50% + 170px); animation-delay: -3s; }
.bubble-chain { top: 24%; left: calc(50% + 150px); display: block; width: 280px; padding: 16px 18px; animation-delay: -1.5s; }
.bubble-chain ol { display: grid; gap: 8px; margin-top: 12px; }
.bubble-chain li { display: grid; grid-template-columns: 22px auto 1fr; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.bubble-chain li b { display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--accent); border-radius: 50%; font-size: 11px; }
.bubble-chain li span { overflow: hidden; color: var(--muted-2); font-weight: 400; font-size: 13px; text-align: right; white-space: nowrap; text-overflow: ellipsis; }
.bubble-chain li.done b { border-color: #30d158; background: rgba(48, 209, 88, 0.14); color: #30d158; }
.bubble-chain li.running b { box-shadow: 0 0 0 4px rgba(0, 106, 255, 0.25); animation: pulse-b 1.6s ease-in-out infinite; }
@keyframes pulse-b { 50% { box-shadow: 0 0 0 7px rgba(0, 106, 255, 0.05); } }

/* ---------- stats ---------- */
.stats { position: relative; padding-block: 0; }
.stats dl { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.stats dl > div { padding: 36px 12px; text-align: center; }
.stats dl > div + div { border-left: 1px solid var(--line); }
.stats dt { color: var(--muted); font-size: 14px; }
.stats dd { margin-top: 8px; font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stats dd span { margin-left: 4px; color: var(--muted-2); font-size: 0.45em; font-weight: 600; letter-spacing: 0; }

/* ---------- keys ---------- */
.keys-figure { position: relative; }
.keys-photo { position: relative; padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 56px) 0; border-radius: var(--radius) var(--radius) 0 0; background: radial-gradient(ellipse 70% 80% at 60% 60%, rgba(0, 106, 255, 0.22), transparent 70%); }
.keys-photo img { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.7)); }
.keys-legend { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); }
.keys-legend li { display: grid; gap: 6px; padding: 28px 20px 0; }
.keys-legend li + li { border-left: 1px solid var(--line); }
.keys-legend b { font-size: 17px; font-weight: 650; }
.keys-legend span { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding: 40px 34px 38px; overflow: hidden; }
.step::after { position: absolute; top: -60px; right: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 106, 255, 0.18), transparent 70%); content: ""; }
.step-no { display: block; background: linear-gradient(180deg, #fff, #555); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; }
.step h3 { margin-top: 40px; font-size: 24px; font-weight: 650; letter-spacing: -0.01em; }
.step p { margin-top: 12px; color: var(--muted); font-size: 16px; line-height: 1.65; }

/* ==========================================================================
   DEMO WINDOW · 严格对齐 SwiftUI / Figma (DesignTokens + RootView)
   Window: 1358pt · Sidebar 200pt · Events 305pt · Automation 515pt · Inspector 278pt
   ========================================================================== */
.demo { position: relative; }
.demo::before { position: absolute; z-index: -1; inset: 12% 10% -4%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 106, 255, 0.24), transparent 68%); filter: blur(44px); content: ""; }

.native-window {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #000000;
  color: #ffffff;
  box-shadow: 0 44px 110px rgba(0, 0, 0, 0.78), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* macOS traffic lights at top-left, header height 100pt aligned to bottom */
.traffic-lights {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 2;
}
.traffic-lights i { display: block; width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.traffic-lights i:nth-child(2) { background: #febc2e; }
.traffic-lights i:nth-child(3) { background: #28c840; }

.native-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 100px;
  padding: 0 15px 5px;
}
.native-brand { display: flex; align-items: center; gap: 10px; }
.native-brand img { width: 50px; height: 50px; border-radius: 11px; object-fit: contain; }
.native-title-line { display: flex; align-items: baseline; gap: 10px; line-height: 1.15; }
.native-title-line strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.native-title-line span { font-size: 24px; font-weight: 200; color: #808080; letter-spacing: -0.01em; }
.native-brand p { margin-top: 2px; color: #b3b3b3; font-size: 12px; font-weight: 400; line-height: 1.25; }

.native-toolbar { display: flex; align-items: center; gap: 0; }
.native-toolbar button,
.native-tool-link {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  text-decoration: none;
  transition: background-color 150ms var(--ease);
}
.native-toolbar button:hover,
.native-tool-link:hover { background: rgba(255, 255, 255, 0.08); }
.native-toolbar button svg,
.native-tool-link svg { width: 22px; height: 22px; display: block; }
.native-connection {
  display: flex;
  align-items: center;
  height: 50px;
  border-radius: 20px;
  background: #1a1a1a;
  margin-right: 2px;
}
.native-connection button { border-radius: 20px; }
.native-conn-sep { width: 1px; height: 16px; background: #4d4d4d; flex: none; }

/* 4-column workspace: 200pt | (305pt + 515pt, clip 20pt) | 278pt, gap 15pt, padding 15pt */
.native-layout {
  display: grid;
  grid-template-columns: minmax(168px, 200fr) minmax(0, 820fr) minmax(220px, 278fr);
  column-gap: 15px;
  padding: 15px;
  min-height: 670px;
}
.native-center {
  display: grid;
  grid-template-columns: minmax(210px, 305fr) minmax(0, 515fr);
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
}

.native-scopes,
.native-events,
.native-automation,
.native-inspector {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.native-scopes { padding-block: 15px; background: #000000; }
.native-events { padding: 15px; background: #262626; }
.native-automation { padding: 15px 16px; background: #1a1a1a; }
.native-inspector { padding: 15px; background: #000000; }

.native-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.native-caption h2 { color: #b3b3b3; font-size: 12px; font-weight: 400; }
.native-caption span { color: #808080; font: 12px var(--mono); }

.native-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 30px;
}
.native-heading-auto { margin-bottom: 40px; }
.native-heading-insp { margin-bottom: 30px; }
.native-heading > div { min-width: 0; }
.native-heading h2 { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
.native-heading p { margin-top: 5px; overflow: hidden; color: #ffffff; font-size: 14px; font-weight: 300; white-space: nowrap; text-overflow: ellipsis; }
.native-heading > span { color: #b3b3b3; font: 12px var(--mono); margin-top: 2px; }

.native-scroll {
  min-height: 0;
  max-height: 492px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.native-scopes .native-scroll,
.native-events .native-scroll {
  display: grid;
  align-content: start;
  gap: 10px;
}

.native-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 26px;
  margin-top: auto;
  padding-top: 15px;
  box-sizing: content-box;
}

/* ScopeRow (height 62pt, radius 20pt, icon 42×42 radius 10pt) & EventRow (height 62pt, radius 15pt, icon 32×32 radius 10pt) */
.native-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 62px;
  padding: 0 10px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #fff;
  text-align: left;
  transition: background-color 150ms var(--ease);
}
.native-scopes .native-row {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border-radius: 20px;
}
.native-row:hover { background: #2a2a2a; }
.native-row[aria-pressed="true"] { background: #006AFF; }

.native-row-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #2a2a2a;
  color: #fff;
  overflow: hidden;
  flex: none;
}
.native-row[aria-pressed="true"] .native-row-icon { background: rgba(42, 42, 42, 0.88); }
.native-row-icon svg { width: 17px; height: 17px; display: block; }

.native-scopes .native-row-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #2a2a2a;
}
.native-scopes .native-row-icon.app-tile {
  padding: 2px;
  background: #ffffff;
}
.native-scopes .native-row-icon.global-tile {
  background: #2a2a2a;
}
.native-scopes .native-row-icon.global-tile svg { width: 23px; height: 23px; }
.native-row-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

.native-row strong,
.native-row small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.native-row strong { font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.native-row small { margin-top: 5px; color: #b3b3b3; font-size: 12px; font-weight: 300; line-height: 1.2; }
.native-row[aria-pressed="true"] small { color: #ffffff; }

.native-bolt { display: grid; place-items: center; width: 18px; height: 18px; color: #00FF80; }
.native-bolt[data-inactive="true"] { color: #4d4d4d; }
.native-bolt svg { width: 18px; height: 18px; display: block; }

/* DesignAddLabel (26×26 #006AFF radius 5 + 14pt text, spacing 10) */
.native-add,
.native-select-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}
.native-select-button b { font-weight: 400; }
.icon-add-box { width: 26px; height: 26px; flex: none; display: block; transition: filter 150ms var(--ease); }
.native-add:hover .icon-add-box,
.native-select-button:hover .icon-add-box { filter: brightness(1.12); }
.native-select-button select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.native-select-button:focus-within { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 5px; }

.native-run {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: #006AFF;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  transition: background-color 150ms var(--ease);
}
.native-run svg { width: 15px; height: 15px; flex: none; }
.native-run:hover:not(:disabled) { background: var(--accent-hover); }
.native-run:disabled { opacity: 0.45; }

.native-trash {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #ffffff;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.native-trash svg { width: 18px; height: 18px; display: block; }
.native-trash:hover:not(:disabled) { background: rgba(255, 75, 89, 0.16); color: #FF4B59; }
.native-trash:disabled { color: rgba(179, 179, 179, 0.42); }

/* DesignActivationStyle: HStack(spacing: 15), 53×30 rounded 10, thumb 22×22 rounded 6, padding 4 */
.native-switch {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
  color: #b3b3b3;
  font-size: 12px;
  cursor: pointer;
}
.native-switch input {
  appearance: none;
  position: relative;
  width: 53px;
  height: 30px;
  margin: 0;
  border-radius: 10px;
  background: #2a2a2a;
  cursor: pointer;
  transition: background-color 180ms var(--ease);
}
.native-switch input:checked { background: #006AFF; }
.native-switch input::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #ffffff;
  content: "";
  transition: transform 200ms var(--spring);
}
.native-switch input:checked::after { transform: translateX(23px); }

/* ActionStepRow: 24pt circle 1.5pt #006AFF stroke + 1.5pt connector + card (#262626 radius 10, padding 15, 56×56 icon tile) */
.chain { display: grid; align-content: start; gap: 10px; padding: 2px; list-style: none; }
.chain-step {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
}
.chain-step:not(:last-child)::after {
  position: absolute;
  top: 34px;
  bottom: 0;
  left: 11.25px;
  width: 1.5px;
  background: #006AFF;
  content: "";
}
.step-number {
  display: grid;
  place-items: center;
  align-self: start;
  width: 24px;
  height: 24px;
  border: 1.5px solid #006AFF;
  border-radius: 50%;
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  transition: border-color 180ms, color 180ms, background-color 180ms;
}
.step-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: start;
  gap: 15px;
  padding: 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #262626;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.chain-step[data-state="active"] .step-card {
  border-color: #3d8bff;
  box-shadow: 0 0 0 3px rgba(0, 106, 255, 0.25);
}
.chain-step[data-state="done"] .step-number {
  border-color: #00CA48;
  background: rgba(0, 202, 72, 0.15);
  color: #00FF80;
}
/* DesignTokens.accentLight = #0062FF @ 50% over #262626, 56×56 radius 5 */
.step-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 5px;
  background: rgba(0, 98, 255, 0.5);
  color: #fff;
}
.step-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.step-info {
  min-width: 0;
  display: grid;
  gap: 20px;
}
.step-divider { height: 1px; background: #1a1a1a; }

/* Select with custom Figma chevron */
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap::after {
  position: absolute;
  right: 10px;
  width: 13px;
  height: 13px;
  pointer-events: none;
  content: "";
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M14.7 5.59c.38 0 .66.29.66.67 0 .19-.07.35-.2.47L9.5 12.53c-.13.15-.31.22-.5.22-.19 0-.35-.07-.49-.21L2.84 6.73a.66.66 0 0 1-.2-.47c0-.38.29-.67.67-.67.19 0 .35.08.48.19L9 11.11l5.21-5.33c.13-.11.3-.19.49-.19Z' fill='white'/%3E%3C/svg%3E");
}
.select-wrap select,
.field input,
.step-inset input {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  border: 0;
  border-radius: 5px;
  background: #0e0e0e;
  color: #ffffff;
  font-size: 14px;
  font-weight: 300;
}
.select-wrap select { padding-right: 30px; cursor: pointer; }

.step-inset {
  color: #b3b3b3;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.step-inset-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 5px;
  background: #000000;
  color: #b3b3b3;
  font-size: 12px;
  line-height: 1.45;
}
.step-inset-box svg { width: 16px; height: 16px; flex: none; color: #b3b3b3; }
.step-app-picker {
  display: grid;
  gap: 5px;
}
.step-app-picker > span,
.step-inset label > span {
  color: #808080;
  font-size: 12px;
  font-weight: 300;
}
.step-app-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 5px;
  background: #0e0e0e;
}
.step-app-row input {
  background: transparent;
  min-height: 24px;
  padding: 0;
  font-size: 14px;
}
.step-app-folder { width: 16px; height: 16px; flex: none; color: #b3b3b3; }
.step-inset label { display: grid; gap: 5px; }
.step-wait-row { display: flex; align-items: center; gap: 10px; }
.step-wait-row input { font-family: var(--mono); font-size: 12px; }
.step-wait-row em { font-style: normal; color: #b3b3b3; font-size: 12px; white-space: nowrap; }
.empty-chain { padding: 24px 12px; color: #808080; font-size: 13px; text-align: center; }

/* InspectorSection: title 12pt #b3b3b3, card #1a1a1a radius 20, padding 15, spacing 20 */
.inspector-group + .inspector-group { margin-top: 20px; }
.inspector-group > p { margin-bottom: 10px; color: #b3b3b3; font-size: 12px; font-weight: 400; }
.inspector-box {
  display: grid;
  gap: 20px;
  padding: 15px;
  border-radius: 20px;
  background: #1a1a1a;
}
.field { display: grid; gap: 8px; }
.field > span { color: #808080; font-size: 12px; font-weight: 300; }
.field-hint { color: #808080; font-size: 10px; font-weight: 300; line-height: 1.45; }

/* DesignSegments: #0e0e0e radius 5, active #006AFF radius 5 */
.native-segments {
  display: flex;
  border-radius: 5px;
  background: #0e0e0e;
}
.native-segments button {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 300;
  white-space: nowrap;
  transition: background-color 150ms var(--ease);
}
.native-segments button svg { width: 15px; height: 15px; flex: none; }
.native-segments button[aria-pressed="true"] { background: #006AFF; font-weight: 500; }
.native-segments.single-seg button { cursor: default; }

.native-check { display: flex; align-items: center; gap: 7px; color: #ffffff; font-size: 12px; line-height: 1.4; cursor: pointer; }
.native-check input { width: 14px; height: 14px; margin: 0; accent-color: #006AFF; }
.noscript { padding: 12px; }

.demo-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin-top: 28px; color: var(--muted-2); font-size: 14px; text-align: center; }
.demo-badge { padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font-size: 12px; }
#run-message { color: #e5e5ea; }
.demo-status a { color: var(--accent-text); text-decoration: none; font-weight: 600; }
.demo-status a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- catalog ---------- */
.catalog-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; width: fit-content; max-width: 100%; margin: 0 auto 40px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.catalog-tabs button { min-height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted-2); font-size: 14px; font-weight: 500; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
.catalog-tabs button:hover:not(:disabled) { color: #fff; }
.catalog-tabs button[aria-pressed="true"] { background: #fff; color: #000; font-weight: 600; }
.catalog-tabs button:disabled { opacity: 0.5; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.action-card { display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, #111113, #0a0a0b); transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); animation: card-in 380ms var(--ease) both; }
.action-card:hover { border-color: rgba(0, 106, 255, 0.5); transform: translateY(-3px); }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); } }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.catalog-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(160deg, rgba(0, 106, 255, 0.35), rgba(0, 106, 255, 0.08)); border: 1px solid rgba(0, 106, 255, 0.3); }
.catalog-icon svg { width: 22px; height: 22px; fill: none; stroke: #cfe1ff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-tag { color: var(--muted); font-size: 12px; }
.action-card > strong { font-size: 17px; font-weight: 650; }
.action-card > p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.legacy-note { margin-top: 28px; color: #6e6e73; font-size: 12px; line-height: 1.7; text-align: center; }

/* ==========================================================================
   ISLAND · 1:1 FloatingMenuView + 物理刘海生长/收起弹簧动画 + 轮播边缘渐隐
   真实面板几何：867 × 276 pt (topInset 40 + 12 + 180 + 12 + 32 footer)
   底部圆角：32 pt (收起为刘海 180 × 28 pt 时底部圆角 9 pt)
   画布卡片：0=[0..320], 1=[332..512], 2=[524..784], 3..6=[796..1000] (共 1000pt 宽, 视口 843pt)
   ========================================================================== */
.section-island { background: linear-gradient(180deg, transparent, #050508 30%, #050508 70%, transparent); }
.island-demo { max-width: 1120px; }
.island-screen {
  --pt: 0.05306cqw;
  position: relative;
  overflow: hidden;
  container-type: inline-size;
}
.island-machine { display: block; width: 100%; height: auto; }
.island-wallpaper {
  position: absolute;
  top: 5.5%;
  left: 9.9%;
  width: 80.3%;
  height: 82.3%;
  object-fit: cover;
  pointer-events: none;
}

/* macOS 顶部菜单栏，增强刘海真实感 */
.mac-menubar {
  position: absolute;
  top: 5.5%;
  left: 9.9%;
  width: 80.3%;
  height: calc(28 * var(--pt));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(16 * var(--pt));
  background: rgba(12, 24, 48, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.92);
  font-size: calc(11.5 * var(--pt));
  font-weight: 500;
  pointer-events: none;
  z-index: 2;
}
.mac-mb-left, .mac-mb-right { display: flex; align-items: center; gap: calc(14 * var(--pt)); }
.mac-mb-left strong { font-weight: 700; }
.apple-logo { width: calc(11 * var(--pt)); height: calc(13 * var(--pt)); }

/* 物理刘海本体（常驻顶部中央，收起后留在屏幕顶部，点击可呼出） */
.mac-notch {
  position: absolute;
  top: 5.45%;
  left: 50%;
  transform: translateX(-50%);
  width: calc(184 * var(--pt));
  height: calc(29 * var(--pt));
  padding: 0;
  border: 0;
  border-radius: 0 0 calc(10 * var(--pt)) calc(10 * var(--pt));
  background: #000;
  display: grid;
  place-items: center;
  z-index: 6;
  cursor: pointer;
}
.notch-cam {
  width: calc(8 * var(--pt));
  height: calc(8 * var(--pt));
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #1d2b44 0%, #090d16 55%, #040507 100%);
  box-shadow: 0 0 0 calc(1 * var(--pt)) rgba(255, 255, 255, 0.06);
}

/* 灵动岛主面板：匹配 SwiftUI UnevenRoundedRectangle(bottomRadius: isExpanded ? 32 : 8) + spring(0.38, 0.86) */
.island-menu {
  position: absolute;
  top: 5.45%;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: top center;
  width: calc(867 * var(--pt));
  height: calc(276 * var(--pt));
  background: #000000;
  color: #fff;
  border-radius: 0 0 calc(32 * var(--pt)) calc(32 * var(--pt));
  box-shadow:
    0 calc(26 * var(--pt)) calc(68 * var(--pt)) rgba(0, 0, 0, 0.62),
    0 calc(6 * var(--pt)) calc(20 * var(--pt)) rgba(0, 0, 0, 0.45);
  overflow: hidden;
  z-index: 5;
  transition:
    width 440ms var(--spring),
    height 440ms var(--spring),
    border-radius 420ms var(--spring),
    box-shadow 360ms var(--ease);
  will-change: width, height, border-radius;
}
.island-menu:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.45); outline-offset: 2px; }

.island-body {
  position: relative;
  width: 100%;
  height: 100%;
  opacity: 1;
  transform: translateY(0) scale(1);
  transform-origin: top center;
  transition:
    opacity 260ms var(--ease) 70ms,
    transform 420ms var(--spring);
}

/* 收起态：严格对应 FloatingMenuController.hide() 缩回物理刘海 184×29pt, 圆角 10pt, 内容上移 8pt 渐隐 */
.island-menu[data-state="collapsed"] {
  width: calc(184 * var(--pt));
  height: calc(29 * var(--pt));
  border-radius: 0 0 calc(10 * var(--pt)) calc(10 * var(--pt));
  box-shadow: 0 calc(2 * var(--pt)) calc(6 * var(--pt)) rgba(0, 0, 0, 0.25);
  pointer-events: none;
  transition:
    width 280ms var(--ease-collapse),
    height 260ms var(--ease-collapse),
    border-radius 260ms var(--ease-collapse),
    box-shadow 220ms var(--ease-collapse);
}
.island-menu[data-state="collapsed"] .island-body {
  opacity: 0;
  transform: translateY(calc(-8 * var(--pt))) scale(0.92);
  transition:
    opacity 130ms ease-out,
    transform 240ms var(--ease-collapse);
}

/* 声音输出替换模式：系统快控组 (4张小卡) 原地合并替换为 204×172pt 列表，媒体卡片保持在左侧 (1:1 对齐 PluginCardLayout.replacingGroupAt) */
.island-menu.output-mode .island-grid {
  opacity: 0;
  pointer-events: none;
}

/* NativeCardViewport: 843pt 宽 × 180pt 高，位于 left 12pt, top 52pt，带左右 20pt 切卡渐隐遮罩 */
.island-viewport {
  position: absolute;
  left: calc(12 * var(--pt));
  top: calc(52 * var(--pt));
  width: calc(843 * var(--pt));
  height: calc(180 * var(--pt));
  overflow: hidden;
  transition: opacity 200ms var(--ease), transform 260ms var(--spring);
}
.island-viewport[data-fade-left="true"][data-fade-right="false"] {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 calc(22 * var(--pt)), #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 calc(22 * var(--pt)), #000 100%);
}
.island-viewport[data-fade-left="false"][data-fade-right="true"] {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22 * var(--pt)), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22 * var(--pt)), transparent 100%);
}
.island-viewport[data-fade-left="true"][data-fade-right="true"] {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 calc(22 * var(--pt)), #000 calc(100% - 22 * var(--pt)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 calc(22 * var(--pt)), #000 calc(100% - 22 * var(--pt)), transparent 100%);
}

/* 1000pt 画布轨道，匹配 .easeInOut(duration: 0.22) + 轻弹簧滑动 */
.island-track {
  position: relative;
  width: calc(1000 * var(--pt));
  height: calc(180 * var(--pt));
  transform: translateX(calc(var(--carousel-x, -157) * var(--pt)));
  transition: transform 320ms var(--spring);
  will-change: transform;
}

/* PluginCardSurface: RoundedRectangle(cornerRadius: 22), strokeBorder white.opacity(0.45), lineWidth: 2 */
.icard {
  position: absolute;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: calc(22 * var(--pt));
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  font: inherit;
  transition: transform 140ms var(--ease), box-shadow 200ms var(--ease);
}
.icard::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: calc(2 * var(--pt)) solid transparent;
  pointer-events: none;
  content: "";
  transition: border-color 180ms var(--ease);
}
.icard[aria-pressed="true"]::after {
  border-color: rgba(255, 255, 255, 0.55);
}
.icard:active { transform: scale(0.96); }

.icard.media { top: 0; height: calc(180 * var(--pt)); overflow: hidden; }
.icard.media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* 0: 320×180 @ x=0 | 1: 180×180 @ x=332 | 2: 260×180 @ x=524 | grid: 204×172 @ x=796, y=4 */
.icard.video { left: 0; width: calc(320 * var(--pt)); }
.icard.music { left: calc(332 * var(--pt)); width: calc(180 * var(--pt)); }
.icard.bangumi { left: calc(524 * var(--pt)); width: calc(260 * var(--pt)); background: #0c0e12; }

.island-grid {
  position: absolute;
  left: calc(796 * var(--pt));
  top: calc(4 * var(--pt));
  width: calc(204 * var(--pt));
  height: calc(172 * var(--pt));
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: calc(12 * var(--pt));
}
.icard.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(5 * var(--pt));
  padding: calc(6 * var(--pt));
  text-align: center;
  border-radius: calc(22 * var(--pt));
  background: #1a1a1a;
}
.icard.tile svg {
  width: calc(22 * var(--pt));
  height: calc(22 * var(--pt));
  flex: none;
  color: rgba(255, 255, 255, 0.72);
}
.icard.tile .t { font-size: calc(11 * var(--pt)); font-weight: 600; line-height: 1.25; }
.icard.tile .d { font: calc(9 * var(--pt))/1.25 var(--mono); color: rgba(255, 255, 255, 0.68); }

/* ControlsView.outputMenu: 原地替换右侧 204×172pt 系统快控 2×2 网格 (left: 12 + 796 - 157 = 651pt, top: 56pt) */
.island-list {
  position: absolute;
  left: calc(651 * var(--pt));
  top: calc(56 * var(--pt));
  width: calc(204 * var(--pt));
  height: calc(172 * var(--pt));
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--pt));
  padding: calc(12 * var(--pt));
  background: #1a1a1a;
  border: calc(2 * var(--pt)) solid rgba(255, 255, 255, 0.9);
  border-radius: calc(22 * var(--pt));
  text-align: left;
  animation: list-pop 240ms var(--spring);
}
@keyframes list-pop {
  from { opacity: 0; transform: scale(0.93); }
  to { opacity: 1; transform: scale(1); }
}
.island-list > strong { font-size: calc(14 * var(--pt)); font-weight: 600; line-height: 1.2; }
.island-list-rows { display: flex; flex-direction: column; gap: calc(4 * var(--pt)); flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.island-list-rows::-webkit-scrollbar { display: none; }
.island-list .row {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--pt));
  height: calc(36 * var(--pt));
  flex: none;
  padding: 0 calc(10 * var(--pt));
  border: 0;
  border-radius: calc(8 * var(--pt));
  background: #1a1a1a;
  color: #fff;
  font-size: calc(11.5 * var(--pt));
  line-height: 1;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms var(--ease);
}
.island-list .row.focused { background: rgba(255, 255, 255, 0.16); font-weight: 600; }
.island-list .row svg { width: calc(17 * var(--pt)); height: calc(17 * var(--pt)); flex: none; color: rgba(255, 255, 255, 0.72); }
.island-list .row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.island-list .row .check { width: calc(13 * var(--pt)); height: calc(13 * var(--pt)); color: #fff; visibility: hidden; }
.island-list .row.current .check { visibility: visible; }

/* FloatingMenuView.footer: height 32pt, padding horizontal 24pt (narrow 16pt), bottom 8pt */
.island-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(32 * var(--pt));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(8 * var(--pt));
  padding: 0 calc(24 * var(--pt)) calc(6 * var(--pt));
  font-size: calc(10 * var(--pt));
  font-weight: 500;
  line-height: 1;
  color: rgba(255, 255, 255, 0.48);
}
.island-menu.output-mode .island-footer {
  padding-inline: calc(16 * var(--pt));
}
#island-counter { font-family: var(--mono); flex: none; letter-spacing: 0.02em; }
.island-foot-right {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--pt));
  min-width: 0;
}
.island-menu.output-mode .island-foot-right { gap: calc(8 * var(--pt)); }
.island-foot-hint { display: inline-flex; align-items: center; gap: calc(4 * var(--pt)); flex: none; }
.island-foot-hint .dpad { width: calc(11 * var(--pt)); height: calc(11 * var(--pt)); flex: none; }
#island-card-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#island-card-hint:empty { display: none; }
.island-back {
  display: inline-flex;
  align-items: center;
  gap: calc(4 * var(--pt));
  flex: none;
  padding: calc(4 * var(--pt)) 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.48);
  font-size: calc(10 * var(--pt));
  font-weight: 500;
  cursor: pointer;
  transition: color 140ms var(--ease);
}
.island-back svg { width: calc(11 * var(--pt)); height: calc(11 * var(--pt)); }
.island-back:hover { color: rgba(255, 255, 255, 0.9); }

/* 灵动岛下方的浮动文字提示：悬浮在 MacBook 桌面中央，带毛玻璃键帽提示与平滑过渡 */
.island-float-guide {
  position: absolute;
  top: calc(6.2% + 294 * var(--pt));
  left: 50%;
  transform: translateX(-50%);
  width: min(74%, 640px);
  display: grid;
  justify-items: center;
  gap: calc(11 * var(--pt));
  padding: calc(14 * var(--pt)) calc(22 * var(--pt));
  border-radius: calc(20 * var(--pt));
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 12, 26, 0.52);
  box-shadow: 0 calc(16 * var(--pt)) calc(44 * var(--pt)) rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  text-align: center;
  z-index: 4;
  transition:
    top 440ms var(--spring),
    background-color 260ms var(--ease),
    border-color 260ms var(--ease),
    transform 420ms var(--spring);
  animation: guide-breathe 5.6s ease-in-out infinite;
}
/* 灵动岛收起时，浮动提示自然上移靠近顶部刘海 */
.island-menu[data-state="collapsed"] ~ .island-float-guide {
  top: 23%;
  background: rgba(8, 15, 32, 0.68);
  border-color: rgba(255, 255, 255, 0.26);
}
@keyframes guide-breathe {
  50% { transform: translate(-50%, -4px); }
}

.island-float-status {
  color: #ffffff;
  font-size: clamp(12px, calc(14.5 * var(--pt)), 16px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.island-float-keys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(10px, calc(11.5 * var(--pt)), 12.5px);
  font-weight: 500;
}
.island-float-keys > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.island-float-keys > span[hidden] { display: none !important; }
.island-float-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  transition: transform 110ms var(--ease), background-color 140ms var(--ease), border-color 140ms var(--ease);
}
.island-float-keys kbd.pressed {
  transform: translateY(1px) scale(0.94);
  background: var(--accent);
  border-color: var(--accent-2);
}

/* ---------- privacy ---------- */
.privacy { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; padding: clamp(40px, 6vw, 80px); overflow: hidden; border: 1px solid var(--line); border-radius: 36px; background: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(0, 106, 255, 0.2), transparent 70%), linear-gradient(180deg, #0f0f12, #08080a); }
.privacy h2 { font-size: clamp(32px, 4vw, 52px); }
.privacy-copy > p:last-child { margin-top: 22px; color: var(--muted-2); font-size: 18px; line-height: 1.65; }
.privacy-flow { display: grid; gap: 0; justify-items: center; }
.privacy-flow > li:not(.pf-link) { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; width: min(100%, 300px); padding: 16px 18px; border: 1px solid var(--line-2); border-radius: 20px; background: rgba(255, 255, 255, 0.03); }
.privacy-flow b { font-size: 17px; font-weight: 650; }
.privacy-flow small { grid-column: 2; color: var(--muted); font-size: 13px; }
.pf-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(160deg, #3d8bff, #0050d0); }
.pf-icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pf-mac { background: linear-gradient(160deg, #f5f5f7, #b8b8bd); }
.pf-mac svg { stroke: #111; }
.pf-off { opacity: 0.5; }
.pf-off .pf-icon { background: #2a2a2e; }
.pf-off b { text-decoration: line-through; text-decoration-color: #ff453a; }
.pf-link { position: relative; display: grid; place-items: center; width: 2px; height: 48px; background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.pf-link span { position: absolute; left: 14px; color: var(--accent-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pf-cut { background: repeating-linear-gradient(180deg, #555 0 4px, transparent 4px 8px); }
.pf-cut span { left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ff453a; color: #fff; font-size: 11px; }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 64px; align-items: start; }
.faq-head { position: sticky; top: 100px; }
.faq-head > p:last-child { margin-top: 18px; color: var(--muted); font-size: 18px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; padding-block: 16px; list-style: none; font-size: 19px; font-weight: 600; cursor: pointer; transition: color var(--dur) var(--ease); }
.faq-item summary:hover { color: var(--accent-text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: #1c1c1f; color: var(--muted-2); font-size: 18px; font-weight: 400; line-height: 1; content: "+"; transition: transform var(--dur) var(--ease), background-color var(--dur); }
.faq-item[open] summary::after { transform: rotate(45deg); background: var(--accent); color: #fff; }
.faq-item p { max-width: 620px; padding: 0 44px 26px 0; color: var(--muted-2); font-size: 16px; line-height: 1.75; }

/* ---------- download ---------- */
.download-section { padding-block: 40px 120px; }
.download { position: relative; display: grid; justify-items: center; gap: 18px; padding: clamp(56px, 8vw, 110px) 24px; overflow: hidden; border: 1px solid rgba(0, 106, 255, 0.3); border-radius: 40px; background: radial-gradient(ellipse 80% 70% at 50% 110%, rgba(0, 106, 255, 0.55), transparent 70%), radial-gradient(ellipse 50% 40% at 50% 0%, rgba(0, 106, 255, 0.15), transparent 70%), #05060a; text-align: center; }
.download-icon { width: 96px; height: 96px; margin-bottom: 10px; filter: drop-shadow(0 20px 40px rgba(0, 106, 255, 0.5)); }
.download h2 { font-size: clamp(36px, 5.6vw, 68px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.download p { color: var(--muted-2); font-size: 18px; }
.download .btn { margin-top: 14px; }
.download small { color: var(--muted); font-size: 13px; }

/* ---------- footer ---------- */
.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer .wordmark { color: var(--fg); font-size: 14px; }
.to-top { color: var(--muted-2); text-decoration: none; }
.to-top:hover { color: #fff; }

/* ---------- dialogs ---------- */
.dialog { width: min(calc(100% - 32px), 420px); max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--line-2); border-radius: 24px; background: #141416; color: var(--fg); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); }
.dialog form { position: relative; display: grid; justify-items: start; padding: 32px; }
.dialog h2 { margin-top: 14px; font-size: 26px; letter-spacing: -0.02em; }
.dialog p { margin-block: 10px 22px; color: var(--muted-2); font-size: 15px; line-height: 1.7; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: #2a2a2e; color: var(--fg); font-size: 20px; line-height: 1; }
.dialog-close:hover { background: #3a3a3f; }
.scope-field { display: grid; gap: 8px; width: 100%; margin-block: 18px; font-size: 14px; }
.scope-field select { min-height: 40px; padding-inline: 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #000; color: #fff; }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
html { scroll-behavior: smooth; }
body { overflow-x: clip; }

@media (max-width: 1180px) {
  .native-layout { column-gap: 10px; padding: 12px; grid-template-columns: minmax(150px, 185fr) minmax(0, 800fr) minmax(205px, 260fr); }
  .native-events, .native-automation, .native-inspector { padding-inline: 12px; }
  .native-row strong { font-size: 14px; }
  .step-card { grid-template-columns: 46px minmax(0, 1fr) auto; padding: 12px; gap: 12px; }
  .step-icon { width: 46px; height: 46px; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bubble-voice { right: calc(50% + 120px); }
  .bubble-key { right: calc(50% + 130px); }
  .bubble-chain { left: calc(50% + 120px); }
}
@media (max-width: 960px) {
  .nav nav { display: none; }
  .nav-inner { grid-template-columns: 1fr auto; }
  .section { padding-block: 100px; }
  .section-tight { padding-block: 72px; }
  .section-head { margin-bottom: 44px; }
  .steps { grid-template-columns: 1fr; }
  .step h3 { margin-top: 24px; }
  .keys-legend { grid-template-columns: repeat(3, 1fr); row-gap: 24px; }
  .keys-legend li:nth-child(4) { border-left: 0; }
  .native-layout { grid-template-columns: 1fr 1fr; row-gap: 12px; min-height: 0; }
  .native-center { grid-column: 1 / -1; grid-row: 1; }
  .native-scroll { max-height: 320px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; gap: 32px; }
  .faq-head { position: static; }
  .bubble-voice { top: 4%; right: auto; left: 4%; }
  .bubble-key { top: auto; bottom: 14%; right: auto; left: 4%; }
  .bubble-chain { top: 34%; left: auto; right: 4%; width: 250px; }
}
@media (max-width: 640px) {
  .wrap, .wrap-wide, .wrap-app, .nav-inner { width: calc(100% - 28px); min-width: 0; }
  .section { padding-block: 76px; }
  .section-tight { padding-block: 56px; }
  .hero h1 { font-size: clamp(34px, 9.6vw, 48px); }
  .hero h1 .nowrap { white-space: normal; }
  .hero-stage { height: 480px; margin-top: 36px; }
  .hero-remote { height: 90%; }
  .bubble { padding: 9px 12px 9px 9px; gap: 8px; border-radius: 16px; }
  .bubble strong { font-size: 13px; }
  .bubble small { font-size: 10.5px; }
  .bubble-icon { width: 30px; height: 30px; border-radius: 9px; }
  .bubble-icon svg { width: 15px; height: 15px; }
  .bubble-voice { top: 2%; left: 10px; }
  .bubble-key { bottom: 8%; left: 10px; }
  .bubble-chain { top: 36%; right: 10px; width: 176px; padding: 11px 12px; }
  .bubble-chain li { grid-template-columns: 18px 1fr; gap: 6px; font-size: 11.5px; }
  .bubble-chain li b { width: 18px; height: 18px; font-size: 10px; }
  .bubble-chain li span { display: none; }
  .stats dl { grid-template-columns: repeat(2, 1fr); }
  .stats dl > div:nth-child(3) { border-left: 0; }
  .stats dl > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stats dl > div { padding: 26px 8px; }
  .keys-legend { grid-template-columns: 1fr 1fr; }
  .keys-legend li { padding: 18px 14px 0; }
  .keys-legend li:nth-child(odd) { border-left: 0; }
  .keys-legend li:nth-child(4) { border-left: 1px solid var(--line); }
  .keys-legend li:nth-child(5) { grid-column: 1 / -1; }
  .step { padding: 30px 26px; }
  .step-no { font-size: 48px; }
  .traffic-lights { top: 10px; left: 12px; gap: 6px; }
  .traffic-lights i { width: 9px; height: 9px; }
  .native-header { height: 76px; padding: 0 12px 6px; gap: 6px; }
  .native-brand img { width: 36px; height: 36px; }
  .native-title-line { gap: 6px; }
  .native-title-line strong, .native-title-line span { font-size: 17px; }
  .native-brand p { font-size: 10px; }
  .native-toolbar button,
  .native-tool-link { width: 34px; height: 34px; }
  .native-toolbar button svg,
  .native-tool-link svg { width: 17px; height: 17px; }
  .native-connection { height: 36px; border-radius: 14px; }
  .native-layout { grid-template-columns: 1fr; padding: 10px; row-gap: 10px; }
  .native-center { display: contents; }
  .native-events, .native-automation { border-radius: 16px; }
  .native-heading, .native-heading-auto, .native-heading-insp { margin-bottom: 18px; }
  .native-heading h2 { font-size: 20px; }
  .native-scroll { max-height: 250px; }
  .native-row { height: 52px; }
  .catalog-tabs { border-radius: 20px; }
  .catalog-grid { grid-template-columns: 1fr; gap: 12px; }
  .action-card { padding: 20px; }
  .card-top { margin-bottom: 6px; }
  /* 移动端屏幕较小：浮动按键提示置于 MacBook 下方清晰展示，避免遮挡灵动岛 */
  .island-float-guide {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #0f1014;
    border-color: var(--line-2);
    animation: none;
  }
  .island-menu[data-state="collapsed"] ~ .island-float-guide {
    top: auto;
    background: #0f1014;
  }
  .island-float-status { font-size: 13px; }
  .island-float-keys { font-size: 11.5px; gap: 6px 10px; }
  .island-float-keys kbd { min-width: 19px; height: 19px; font-size: 10px; }
  .privacy { padding: 32px 22px; border-radius: 28px; }
  .faq-item summary { font-size: 17px; min-height: 64px; }
  .faq-item p { padding-right: 0; font-size: 15px; }
  .download { border-radius: 28px; }
  .download-icon { width: 76px; height: 76px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
  .hero-rings { display: none; }
}
