/* ==========================================================================
   设计工作台 · Design Studio — product site
   Hand-written CSS, no framework. Dark (default) + light themes.
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --container: 1200px;
  --gutter: 24px;
  --header-h: 64px;

  --ease: cubic-bezier(.2, .7, .2, 1);

  /* product cursor colours (from the canvas) */
  --c-blue: #4d6bfe;
  --c-orange: #ec5b1e;
  --c-green: #12a37b;
}

/* ---------- Dark (default) ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b0f;
  --bg-alt: #0d0f14;
  --surface: #121419;
  --surface-2: #171a21;
  --surface-3: #1e222b;
  --border: rgba(255, 255, 255, .075);
  --border-strong: rgba(255, 255, 255, .13);
  --text: #eceef3;
  --text-2: #a4aab8;
  --text-3: #6e7584;
  --accent: #4d6bfe;
  --accent-ink: #8ea0ff;
  --accent-soft: rgba(77, 107, 254, .14);
  --cyan: #4fd6f2;
  --on-accent: #ffffff;
  --header-bg: rgba(10, 11, 15, .72);
  --dot: rgba(255, 255, 255, .085);
  --shadow-media: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 40px 100px -40px rgba(77, 107, 254, .42), 0 24px 60px -30px rgba(0, 0, 0, .8);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset;
  --code-bg: #0c0e13;
  --kbd-bg: #1b1f27;
}

/* ---------- Light ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg-alt: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f4;
  --border: rgba(12, 16, 28, .08);
  --border-strong: rgba(12, 16, 28, .14);
  --text: #0c0f16;
  --text-2: #4a5161;
  --text-3: #7a8191;
  --accent: #3f5cf5;
  --accent-ink: #3550e6;
  --accent-soft: rgba(63, 92, 245, .09);
  --cyan: #0e9bbd;
  --on-accent: #ffffff;
  --header-bg: rgba(246, 247, 249, .76);
  --dot: rgba(12, 16, 28, .09);
  --shadow-media: 0 30px 80px -36px rgba(30, 40, 90, .38), 0 10px 28px -16px rgba(12, 16, 28, .22);
  --shadow-card: 0 1px 2px rgba(12, 16, 28, .04);
  --code-bg: #f3f4f7;
  --kbd-bg: #ffffff;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

html.i18n-pending body { visibility: hidden; }
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--font-mono); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }

::selection { background: rgba(77, 107, 254, .35); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: .01em; white-space: nowrap; }

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.site-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-2);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.lang-label { font-size: 13px; font-weight: 600; letter-spacing: .02em; }

.i-sun { display: none; }
:root[data-theme="light"] .i-sun { display: block; }
:root[data-theme="light"] .i-moon { display: none; }

.gh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.gh-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.gh-star { color: #f5b544; font-size: 12px; }

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--text-2);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 8px 24px -10px rgba(77, 107, 254, .7);
}
.btn-primary:hover { background: #5b77ff; }
:root[data-theme="light"] .btn-primary:hover { background: #3550e6; }
.btn-ghost {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-3); }
.btn-count {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.btn-count > span:first-child { color: #f5b544; }

.chip-mono {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

kbd {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--kbd-bg);
  font-size: 12.5px;
  color: var(--text);
}

.cursor-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.cursor-tag::before {
  content: "";
  position: absolute;
  left: -7px;
  top: -9px;
  width: 12px;
  height: 14px;
  background: inherit;
  clip-path: polygon(0 0, 100% 62%, 52% 66%, 30% 100%);
}
.c-blue { background: var(--c-blue); }
.c-orange { background: var(--c-orange); }
.c-green { background: var(--c-green); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 64px;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 56px;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; }
.hero-title {
  font-size: clamp(2.3rem, 1.25rem + 3.1vw, 3.9rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}
:root[lang="en"] .hero-title { letter-spacing: -.03em; line-height: 1.06; }
.hero-lead {
  max-width: 34em;
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  color: var(--text-2);
  line-height: 1.75;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.install-pill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  max-width: 100%;
}
.pill-label { font-size: 13px; color: var(--text-3); }
.pill-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 4px 4px 14px;
  border-radius: 12px;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
}
.pill-code {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.copy-btn:hover { color: var(--text); background: var(--surface-3); }
.copy-btn .i-check { display: none; }
.copy-btn.is-copied { color: var(--c-green); }
.copy-btn.is-copied .i-copy { display: none; }
.copy-btn.is-copied .i-check { display: block; }

.hero-media { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.seg-btn {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.seg-btn:hover { color: var(--text); }
.seg-btn.is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset; }

.media-frame {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: #0d0e12;
  overflow: hidden;
  box-shadow: var(--shadow-media);
  aspect-ratio: 1080 / 1002;
  transition: aspect-ratio .35s var(--ease);
}
.media-frame[data-view="demo"] { aspect-ratio: 860 / 513; }
.media-frame::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 160, 255, .75), rgba(79, 214, 242, .6), transparent);
  pointer-events: none;
}
.media-shot,
.media-demo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.media-shot img,
.media-demo img { width: 100%; height: 100%; object-fit: contain; }
.media-demo { display: none; background: #0d0e12; }
.media-frame[data-view="demo"] .media-shot { display: none; }
.media-frame[data-view="demo"] .media-demo { display: block; }

.media-loading {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #a4aab8;
  font-size: 13px;
  background: #0d0e12;
}
.media-demo.is-loading .media-loading { display: flex; }
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .14);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* zoom triggers */
.zoom {
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  text-align: left;
}

/* ---------- Stats ---------- */
.stats {
  border-block: 1px solid var(--border);
  background: var(--bg-alt);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.stat {
  padding: 28px 24px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
  font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label { margin: 0; color: var(--text-2); font-size: 15px; }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 48px;
}
.section-head-left { align-items: flex-start; text-align: left; margin-bottom: 32px; }
.section-title {
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.6rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.section-lead { color: var(--text-2); font-size: 16px; max-width: 36em; }

/* ---------- Gallery ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.tab:hover { color: var(--text); border-color: var(--border-strong); }
.tab.is-active {
  color: var(--text);
  border-color: rgba(77, 107, 254, .55);
  background: var(--accent-soft);
}
.tab-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-3);
}
.tab.is-active .tab-count { color: var(--accent-ink); }

.panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
  gap: 48px;
  align-items: center;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 40px;
  box-shadow: var(--shadow-card);
}
.panel[hidden] { display: none; }
.panel.is-active { animation: panel-in .4s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel:focus-visible { outline-offset: 4px; border-radius: var(--radius-xl); }

.panel-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel-copy h3 { font-size: clamp(1.25rem, 1.05rem + .6vw, 1.55rem); line-height: 1.35; text-wrap: balance; }
.panel-copy p { color: var(--text-2); font-size: 15px; line-height: 1.75; }

.ticks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.6;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .5em;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg);
}

.panel-media {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #0d0e12;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .7);
}
.panel-media-light { background: #f1f0f4; }
.panel-media img {
  width: 100%;
  height: auto;
  transition: transform .5s var(--ease);
}
.panel-media:hover img { transform: scale(1.012); }
.zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(10, 11, 15, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  pointer-events: none;
}
.panel-media:hover .zoom-hint,
.panel-media:focus-visible .zoom-hint { opacity: 1; transform: none; }

/* ---------- Workflow ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  counter-reset: none;
  border-top: 1px solid var(--border-strong);
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 28px 8px 0;
}
.step + .step { padding-left: 28px; border-left: 1px solid var(--border); }
.step::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.step + .step::before { left: -4px; }
.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-ink);
  letter-spacing: .04em;
}
.step h3 { font-size: 18px; line-height: 1.4; }
.step p { color: var(--text-2); font-size: 14.5px; line-height: 1.75; }
.step-tags { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: auto; padding-top: 6px; }
.step-tags .cursor-tag { margin-left: 6px; margin-top: 6px; }

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color .2s var(--ease), transform .25s var(--ease);
}
.card:hover { border-color: var(--border-strong); }
.card-cursors,
.card-code { grid-column: span 3; }
.card-kinds { grid-column: span 4; justify-content: flex-start; }
.card-body { display: flex; flex-direction: column; gap: 8px; }
.card-visual {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  min-width: 0;
}
.card-kinds .card-visual { flex: 0 0 auto; }
.card h3 { font-size: 17px; line-height: 1.4; }
.card p { color: var(--text-2); font-size: 14.5px; line-height: 1.7; }

/* cursors card: a mini canvas */
.mini-canvas {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 22px 22px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--code-bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
.mini-phone {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  aspect-ratio: 9 / 15;
  padding: 18px 10px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}
.mini-phone::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 34%;
  height: 5px;
  border-radius: 4px;
  background: var(--border-strong);
  transform: translateX(-50%);
}
.mini-phone i {
  display: block;
  height: 7px;
  border-radius: 3px;
  background: var(--surface-3);
}
.mini-phone i.w60 { width: 60%; }
.mini-phone i.tall { height: 34%; border-radius: 6px; }
.mini-phone.is-live { border-color: rgba(77, 107, 254, .7); box-shadow: 0 0 0 3px var(--accent-soft); }
.mini-phone i.is-sel { outline: 1.5px solid var(--c-blue); outline-offset: 2px; }
.mini-phone i.is-paint { background: rgba(236, 91, 30, .5); outline: 1.5px dashed var(--c-orange); outline-offset: 2px; }
.mini-phone i.is-type { width: 72%; background: rgba(18, 163, 123, .45); }
.mini-phone .cursor-tag { position: absolute; height: 20px; font-size: 11px; padding: 0 6px 0 7px; }
.mc-1 { right: -16px; top: 30%; }
.mc-2 { left: 34%; top: 62%; }
.mc-3 { right: -10px; bottom: 8%; }

/* code card */
.code-targets { display: flex; flex-wrap: wrap; gap: 8px; }
.diff-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--code-bg);
}
.diff-label { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.diff-track { position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.diff-fill { position: absolute; inset: 0 auto 0 0; width: 97%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--cyan)); }
.diff-value { font-family: var(--font-mono); font-size: 13px; color: var(--c-green); font-weight: 600; }

/* check list */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13.5px;
  color: var(--text);
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.d-red { background: #f0444b; box-shadow: 0 0 0 3px rgba(240, 68, 75, .18); }
.d-orange { background: #f59f2a; box-shadow: 0 0 0 3px rgba(245, 159, 42, .18); }
.d-blue { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* files */
.file-row { display: flex; flex-wrap: wrap; gap: 10px; }
.file {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 64px;
  padding-top: 14px;
  border-radius: 8px 14px 8px 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
}
.file::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 10px;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: .8;
}
.file-qr { padding-top: 0; color: var(--text); }
.file-qr::before { display: none; }

.kbd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.edit-demo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--code-bg);
}
.ed-line { display: block; height: 7px; border-radius: 4px; background: var(--surface-3); }
.ed-line.w70 { width: 70%; }
.ed-line.w45 { width: 45%; }
.ed-pen { position: relative; }
.ed-pen::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -16px;
  top: -9px;
  bottom: -9px;
  border: 2px solid var(--c-orange);
  border-radius: 50%;
  transform: rotate(-3deg);
}
.ed-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.ed-btn {
  position: relative;
  width: 92px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  outline: 1.5px solid var(--c-blue);
  outline-offset: 3px;
}
.ed-btn i {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border: 1.5px solid var(--c-blue);
  border-radius: 1px;
}
.ed-btn i:nth-child(1) { left: -7px; top: -7px; }
.ed-btn i:nth-child(2) { right: -7px; top: -7px; }
.ed-btn i:nth-child(3) { left: -7px; bottom: -7px; }
.ed-btn i:nth-child(4) { right: -7px; bottom: -7px; }
.ed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.mini-code {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--code-bg);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.tk-key { color: var(--accent-ink); }
.tk-str { color: var(--c-green); }
.tk-bool { color: var(--c-orange); }

.font-row { display: flex; align-items: baseline; gap: 14px; }
.font-big { font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.font-sample { font-family: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif; font-size: 30px; color: var(--text-2); }

.ds-row { display: flex; gap: 8px; }
.ds-swatch { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); }
.s1 { background: #4d6bfe; }
.s2 { background: #1f2430; }
.s3 { background: #c9a86a; }
.s4 { background: #556b3f; }
.s5 { background: #f3efe6; }
.lib-row { gap: 10px; }
.lib-num {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.kind-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kind-chips li {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13.5px;
  color: var(--text);
}

/* ---------- Install ---------- */
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.install-steps li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.is-num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}
.install-steps p { padding-top: 2px; font-size: 15px; line-height: 1.65; }
.install-steps code,
.faq code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  font-size: .88em;
  word-break: break-all;
}
.install-note { margin-top: 18px; color: var(--text-3); font-size: 14px; line-height: 1.7; }

.install-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-media);
}
.ic-label { font-size: 12.5px; font-family: var(--font-mono); color: var(--text-3); letter-spacing: .04em; margin-bottom: 10px; }
.ic-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--code-bg);
}
.ic-field code { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.copy-btn-solid { height: 36px; background: var(--accent); color: var(--on-accent); padding: 0 14px; }
.copy-btn-solid:hover { background: #5b77ff; color: #fff; }
.copy-btn-solid.is-copied { background: var(--c-green); color: #fff; }

.ic-links { list-style: none; margin: 20px 0 0; padding: 0; display: grid; }
.ic-links li + li { border-top: 1px solid var(--border); }
.ic-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 2px;
  font-size: 14.5px;
  font-weight: 600;
  transition: color .18s var(--ease);
}
.ic-links a::after {
  content: "↗";
  font-weight: 400;
  color: var(--text-3);
  margin-left: -8px;
  transition: transform .18s var(--ease), color .18s var(--ease);
}
.ic-links a:hover { color: var(--accent-ink); }
.ic-links a:hover::after { transform: translate(2px, -2px); color: var(--accent-ink); }
.ic-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: calc(820px + var(--gutter) * 2); }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  position: relative;
  display: block;
  padding: 22px 44px 22px 0;
  font-size: 16.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color .18s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-ink); }
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 1.8px;
  border-radius: 1px;
  background: var(--text-2);
  transition: transform .25s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { padding: 0 44px 24px 0; color: var(--text-2); font-size: 15px; line-height: 1.8; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 64px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-tag { color: var(--text-2); font-size: 14px; }
.footer-notice { color: var(--text-3); font-size: 13px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.footer-col h2 { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--text-3); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; transition: color .18s var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 20px;
  color: var(--text-3);
  font-size: 13px;
}
.footer-bottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--border);
}
.footer-bottom a:hover { color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6, 7, 10, .9);
  color: #eceef3;
  overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; grid-template-rows: 64px minmax(0, 1fr); animation: lb-in .22s var(--ease); }
.lightbox::backdrop { background: rgba(6, 7, 10, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lb-top {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 24px;
}
.lb-count { font-family: var(--font-mono); font-size: 13px; color: #a4aab8; }
.lb-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  cursor: pointer;
  transition: background-color .18s var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, .14); }
.lb-nav { grid-row: 2; align-self: center; justify-self: center; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-figure {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-bottom: 24px;
}
.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 64px - 80px);
  max-height: calc(100dvh - 64px - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
.lb-caption { max-width: 60em; text-align: center; font-size: 14px; color: #a4aab8; line-height: 1.6; padding-inline: 8px; }
.lightbox.is-single .lb-nav { visibility: hidden; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .site-nav a { padding: 6px 9px; }
}

@media (max-width: 1024px) {
  .hero { padding: 56px 0 56px; }
  .hero-inner { gap: 40px; }
  .panel { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 32px; }
  .panel-copy { max-width: 46em; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; gap: 0; }
  .step { border-top: 1px solid var(--border-strong); padding: 28px 28px 32px 0; }
  .step + .step { padding-left: 0; border-left: 0; }
  .step:nth-child(even) { padding-left: 28px; border-left: 1px solid var(--border); }
  .step + .step::before { left: 0; }
  .step:nth-child(even)::before { left: -4px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card,
  .card-cursors,
  .card-code { grid-column: span 1; }
  .card-cursors,
  .card-code,
  .card-kinds { grid-column: 1 / -1; }
  .install-grid { gap: 40px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-media { align-items: stretch; }
  .seg { align-self: flex-start; }
  .install-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 58px; }
  .header-inner { gap: 12px; }
  .brand-name { font-size: 14px; }
  .header-actions { gap: 6px; }
  .icon-btn { min-width: 34px; height: 34px; }
  .gh-btn { height: 34px; padding: 0 10px; }
  .gh-btn > svg { display: none; }

  .hero { padding: 40px 0 44px; }
  .hero-copy { gap: 18px; }
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .install-pill { flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
  .pill-field { width: 100%; justify-content: space-between; }

  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 20px 0 20px 16px; gap: 6px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .stat-label { font-size: 14px; }

  .section { padding: 72px 0; }
  .section-head { margin-bottom: 32px; }
  .tabs { gap: 6px; }
  .tab { height: 36px; padding: 0 11px; font-size: 13.5px; }
  .panel { padding: 18px; border-radius: var(--radius-lg); gap: 22px; }
  .panel .panel-media { order: -1; }
  .zoom-hint { display: none; }

  .steps { grid-template-columns: minmax(0, 1fr); }
  .step,
  .step:nth-child(even) { padding: 24px 0 28px; border-left: 0; }
  .step:nth-child(even)::before { left: 0; }

  .bento { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .card { padding: 22px; }
  .mini-canvas { gap: 10px; padding: 16px 14px 14px; }
  .mini-phone { padding: 14px 7px 8px; gap: 5px; border-radius: 11px; }
  .mini-phone i { height: 5px; }
  .mini-phone .cursor-tag { height: 18px; font-size: 10px; padding: 0 5px 0 6px; }
  .mc-1 { right: -8px; }
  .mc-3 { right: -4px; }

  .install-card { padding: 20px; }
  .ic-meta { display: none; }

  .faq summary { font-size: 15.5px; padding: 18px 36px 18px 0; }
  .faq details p { padding-right: 0; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }

  .lightbox[open] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 56px minmax(0, 1fr) 72px; }
  .lb-figure { grid-column: 1 / -1; grid-row: 2; padding: 0 12px 8px; }
  .lb-img { max-height: calc(100vh - 56px - 72px - 56px); max-height: calc(100dvh - 56px - 72px - 56px); }
  .lb-nav { grid-row: 3; }
  .lb-prev { grid-column: 1; justify-self: end; margin-right: 8px; }
  .lb-next { grid-column: 2; justify-self: start; margin-left: 8px; }
  .lb-top { padding: 0 12px 0 16px; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
