/* Kitty Tools 官网的公共样式（所有页面共用）。
   视觉照 App 的设计语言 Whisker：表面中性，品牌粉只给主按钮、链接和高亮；奶油是品牌底色；
   深浅色跟随系统；动效用弹簧缓动，系统开了「减弱动态效果」时全都不动。
   布局：内容最宽 1120，两侧留白至少 16 并避开手机的安全区；白底和奶油底分区交替。 */

:root {
  --bg: #ffffff;
  --bg-cream: #fff5f0;
  --surface: #ffffff;
  --fg: #1f1a1d;
  --muted: #6b6168;
  --faint: #978c93;
  --line: rgba(58, 37, 48, 0.1);
  --line-strong: rgba(58, 37, 48, 0.18);
  --fill-hover: rgba(58, 37, 48, 0.04);
  --fill-control: rgba(58, 37, 48, 0.06);
  --brand: #ff4d7e;
  --brand-ink: #d12a5f;
  --brand-soft: rgba(255, 77, 126, 0.1);
  --on-brand: #ffffff;
  --ink: #3a2530;
  --header: rgba(255, 255, 255, 0.78);
  --key-bg: #ffffff;
  --shadow-panel: 0 18px 40px rgba(58, 37, 48, 0.16), 0 2px 8px rgba(58, 37, 48, 0.08);
  --stage-wall: url("wallpaper-light.avif");
  --cat-rim: transparent;

  --blue: #007aff;
  --purple: #af52de;
  --pink: #ff2d55;
  --green: #28cd41;
  --yellow: #ffcc00;
  --mint: #00c7be;
  --cyan: #55bef0;
  --brown: #a2845e;
  --gray: #8e8e93;

  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI",
    "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 14px;
  --wrap: 1120px;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* 近似 Whisker 的「轻弹」：略过冲一点再回来 */
    --ease: linear(0, 0.06 2.4%, 0.23 5.6%, 0.48 10%, 0.7 15%, 0.86 20.5%, 0.96 27%, 1.01 34%,
        1.025 41%, 1.02 50%, 1.005 64%, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141012;
    --bg-cream: #2a1d22;
    --surface: #1d171a;
    --fg: #f3ecef;
    --muted: #b0a3aa;
    --faint: #85787f;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --fill-hover: rgba(255, 255, 255, 0.05);
    --fill-control: rgba(255, 255, 255, 0.08);
    --brand-ink: #ff8fab;
    --brand-soft: rgba(255, 77, 126, 0.16);
    --header: rgba(20, 16, 18, 0.72);
    --key-bg: #2a2226;
    --shadow-panel: 0 18px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
    --stage-wall: url("wallpaper-dark.avif");
    --cat-rim: rgba(255, 245, 240, 0.35);
    --blue: #0a84ff;
    --purple: #bf5af2;
    --pink: #ff375f;
    --green: #32d74b;
    --yellow: #ffd60a;
    --mint: #63e6e2;
    --cyan: #5ac8f5;
    --brown: #ac8e68;
    --gray: #98989d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141012;
  --bg-cream: #2a1d22;
  --surface: #1d171a;
  --fg: #f3ecef;
  --muted: #b0a3aa;
  --faint: #85787f;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --fill-hover: rgba(255, 255, 255, 0.05);
  --fill-control: rgba(255, 255, 255, 0.08);
  --brand-ink: #ff8fab;
  --brand-soft: rgba(255, 77, 126, 0.16);
  --header: rgba(20, 16, 18, 0.72);
  --key-bg: #2a2226;
  --shadow-panel: 0 18px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --stage-wall: url("wallpaper-dark.avif");
  --cat-rim: rgba(255, 245, 240, 0.35);
  --blue: #0a84ff;
  --purple: #bf5af2;
  --pink: #ff375f;
  --green: #32d74b;
  --yellow: #ffd60a;
  --mint: #63e6e2;
  --cyan: #5ac8f5;
  --brown: #ac8e68;
  --gray: #98989d;
  color-scheme: dark;
}

/* ---------- 基础 ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] {
  display: none !important;
}
img,
svg {
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: var(--brand-ink);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3 {
  line-height: 1.25;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
ul {
  margin: 0;
  padding: 0;
}
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--fill-control);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.45em;
  font: 600 0.82em/1 var(--sans);
  color: var(--fg);
  background: var(--key-bg);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  white-space: nowrap;
  vertical-align: 0.1em;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: max(16px, env(safe-area-inset-left, 0px));
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  z-index: 50;
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 8px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.band {
  padding-block: 88px;
}
.band.cream {
  background: var(--bg-cream);
}
.band.tight {
  padding-block: 56px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-ink);
  letter-spacing: 0.02em;
}
.section-head {
  max-width: 680px;
  display: grid;
  gap: 12px;
  margin-bottom: 40px;
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}
.lead {
  font-size: 18px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.nw {
  display: inline-block;
}
.small {
  font-size: 14px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font: 600 16px/1 var(--sans);
  color: var(--on-brand);
  background: var(--brand);
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), filter 0.15s;
  box-shadow: 0 6px 16px rgba(255, 77, 126, 0.28);
}
.btn:hover {
  text-decoration: none;
  filter: brightness(1.06);
}
.btn:active {
  transform: scale(0.97);
}
.btn.quiet {
  color: var(--fg);
  background: var(--fill-control);
  box-shadow: none;
}
.btn.quiet:hover {
  filter: none;
  background: var(--line-strong);
}
.btn.sm {
  height: 34px;
  padding: 0 16px;
  font-size: 14px;
  box-shadow: none;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.arrow-link {
  font-weight: 600;
}
.arrow-link::after {
  content: " →";
}

/* ---------- 页头 ---------- */

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--header);
}
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--header);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  height: 60px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--fg);
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
}
.nav {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.nav a {
  color: var(--muted);
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav a:hover {
  color: var(--fg);
  background: var(--fill-hover);
  text-decoration: none;
}
.nav a[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-link {
  display: inline-flex;
  color: var(--muted);
  padding: 6px;
  border-radius: 8px;
}
.icon-link:hover {
  color: var(--fg);
  background: var(--fill-hover);
}
.icon-link svg {
  width: 22px;
  height: 22px;
}
@media (max-width: 720px) {
  .top-in {
    height: auto;
    flex-wrap: wrap;
    gap: 0 12px;
    padding-block: 10px 0;
  }
  .brand {
    flex: 1;
  }
  .nav {
    order: 3;
    flex-basis: 100%;
    margin-inline: -12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: 4px 6px;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  html {
    scroll-padding-top: 112px;
  }
}

/* ---------- 首页主视觉 ---------- */

.hero {
  padding-block: 72px 88px;
  overflow: hidden;
}
.hero-in {
  display: grid;
  gap: 56px;
}
.hero-copy {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand-ink);
}
.hero .lead {
  max-width: 34em;
  text-wrap: balance;
}
.hero .btn-row,
.hero .dl-meta {
  justify-content: center;
}
.dl-meta {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.dl-meta span + span::before {
  content: "·";
  margin-right: 14px;
  color: var(--faint);
}
.for-win {
  display: none;
}
[data-os="windows"] .for-win {
  display: revert;
}
[data-os="windows"] .for-mac {
  display: none;
}
.for-phone {
  display: none;
}
[data-os="phone"] .for-phone {
  display: revert;
}
.dl-note {
  font-size: 14px;
  color: var(--muted);
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 34em;
}
@media (max-width: 900px) {
  .hero {
    padding-block: 40px 64px;
  }
  .hero-in {
    gap: 40px;
  }
}

/* 舞台：壁纸底 + 面板截图（截图对着同一张壁纸截的，毛玻璃对得上） */
.stage {
  position: relative;
  border-radius: 22px;
  background: var(--bg-cream) var(--stage-wall) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.shot {
  display: block;
  filter: drop-shadow(0 16px 28px rgba(40, 20, 30, 0.22)) drop-shadow(0 2px 6px rgba(40, 20, 30, 0.12));
}
.hero-stage {
  aspect-ratio: 16 / 10;
  overflow: visible;
}
.menubar {
  position: absolute;
  inset: 0 0 auto;
  height: 28px;
  border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.78);
}
:root[data-theme="dark"] .menubar {
  background: rgba(30, 20, 26, 0.5);
  color: rgba(255, 255, 255, 0.85);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .menubar {
    background: rgba(30, 20, 26, 0.5);
    color: rgba(255, 255, 255, 0.85);
  }
}
.menubar .mb-kitty {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 22px;
  border-radius: 6px;
  background: rgba(127, 127, 127, 0.28);
}
.menubar .mb-kitty i {
  width: 22px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("status-icon.png") center / contain no-repeat;
  mask: url("status-icon.png") center / contain no-repeat;
}
/* 主界面挂在菜单栏的猫下面；剪贴板在左边，两块不重叠 */
.hero-stage .home {
  position: absolute;
  right: 5%;
  top: 36px;
  width: 29%;
}
.hero-stage .clipbox {
  position: absolute;
  left: 7%;
  bottom: 8%;
  width: 56%;
}
/* 猫扒在面板上沿：SVG 里 y 614（原图标卡片的上沿）在 viewBox 高度的 88.66% 处，往下挪 11.34% 正好对齐 */
.peek {
  position: absolute;
  bottom: 100%;
  left: 10%;
  width: 24%;
  transform: translateY(11.34%);
  z-index: 1;
}
@media (max-width: 640px) {
  .hero-stage {
    aspect-ratio: 4 / 3.4;
  }
  .hero-stage .home {
    display: none;
  }
  .hero-stage .clipbox {
    left: 5%;
    width: 90%;
    bottom: 7%;
  }
}

/* ---------- 探头 ---------- */

.cat {
  display: block;
  overflow: visible;
  pointer-events: none;
}
.cat .halo {
  fill: var(--cat-rim);
  stroke: var(--cat-rim);
}
.cat .eye {
  transform-box: fill-box;
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .cat .head {
    animation: peek 0.9s var(--ease) 0.25s both;
  }
  .cat .paws {
    animation: paws 0.5s var(--ease) 0.75s both;
  }
  .cat .eye {
    animation: blink 6s ease-in-out 2s infinite;
  }
}
@keyframes peek {
  from {
    transform: translateY(260px);
  }
}
@keyframes paws {
  from {
    transform: translateY(-36px);
    opacity: 0;
  }
}
@keyframes blink {
  0%,
  46%,
  50%,
  100% {
    transform: scaleY(1);
  }
  48% {
    transform: scaleY(0.08);
  }
}

/* ---------- 功能格子 ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 14px;
  align-items: start;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg);
  transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.tile:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(58, 37, 48, 0.08);
}
.tile .ico {
  grid-row: span 2;
}
.tile b {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tile b kbd {
  font-size: 11px;
  font-weight: 600;
}
.tile span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
@media (max-width: 960px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .tiles {
    gap: 10px;
  }
  .tile {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }
  .tile .ico {
    grid-row: auto;
  }
  .tile > span:last-child {
    display: none;
  }
}

/* 功能图标：仓库里两个平台共用的 SVG，当遮罩用，底色是功能家族色 */
.ico {
  --c: var(--brand);
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--c);
  display: grid;
  place-items: center;
  flex: none;
}
.ico::before {
  content: "";
  width: 62%;
  height: 62%;
  background: var(--on, #fff);
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}
/* 图标的地址写在这份样式表里（写在页面的内联变量里，Chrome 会按样式表的位置去解析，找不到） */
.i-clipboard {
  --i: url("icons/kitty.clipboard.svg");
}
.i-dock-preview {
  --i: url("icons/kitty.dock.preview.svg");
}
.i-general {
  --i: url("icons/kitty.general.svg");
}
.i-home {
  --i: url("icons/kitty.home.svg");
}
.i-island {
  --i: url("icons/kitty.island.svg");
}
.i-launcher {
  --i: url("icons/kitty.launcher.svg");
}
.i-launchpad {
  --i: url("icons/kitty.launchpad.svg");
}
.i-notes {
  --i: url("icons/kitty.notes.svg");
}
.i-record {
  --i: url("icons/kitty.record.svg");
}
.i-screenshot {
  --i: url("icons/kitty.screenshot.svg");
}
.i-screenshot-history {
  --i: url("icons/kitty.screenshot.history.svg");
}
.i-screenshot-text {
  --i: url("icons/kitty.screenshot.text.svg");
}
.i-status-screen {
  --i: url("icons/kitty.status.screen.svg");
}
.i-translate {
  --i: url("icons/kitty.translate.svg");
}
.ico.lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.ico.sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.ico.yellow {
  --on: rgba(0, 0, 0, 0.85);
}

/* ---------- 图文交替的重点功能 ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
}
.feature + .feature {
  margin-top: 104px;
}
.feature.flip .feature-copy {
  order: 2;
}
.feature-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}
.feature-copy h2,
.feature-copy h3 {
  font-size: clamp(26px, 3.4vw, 34px);
}
.feature-copy p {
  color: var(--muted);
}
.points {
  list-style: none;
  display: grid;
  gap: 10px;
}
.points li {
  position: relative;
  padding-left: 22px;
}
.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.feature-stage {
  padding: 7% 6%;
  display: grid;
  place-items: center;
}
.feature-stage.full {
  padding: 0;
}
.feature-stage.full img {
  border-radius: 22px;
}
@media (max-width: 900px) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .feature.flip .feature-copy {
    order: 0;
  }
  .feature + .feature {
    margin-top: 72px;
  }
}

/* ---------- 为什么用它 ---------- */

.why {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.why div {
  display: grid;
  gap: 8px;
  align-content: start;
}
.why h3 {
  font-size: 18px;
}
.why p {
  color: var(--muted);
  font-size: 15px;
}
.why .num {
  font: 700 30px/1.1 var(--round);
  color: var(--brand-ink);
  letter-spacing: -0.02em;
}
@media (max-width: 900px) {
  .why {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .why {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 小卡 ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  color: var(--fg);
  transition: transform 0.25s var(--ease), box-shadow 0.2s;
}
a.card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(58, 37, 48, 0.1);
}
.card .stage {
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  padding: 6%;
}
.card .stage img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}
.card .stage.full {
  padding: 0;
}
.card .stage.full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  padding: 18px 20px 20px;
  display: grid;
  gap: 6px;
  align-content: start;
}
.card-body h3 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-body p {
  font-size: 15px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 平台标记 ---------- */

.plat {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}
.plat span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--fill-control);
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Windows 那一段、收尾下载 ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: center;
}
.split h2 {
  font-size: clamp(24px, 3vw, 30px);
}
@media (max-width: 760px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}
.cta {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.cta h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
}
.cta-card {
  position: relative;
  max-width: 780px;
  margin: 72px auto 0;
  background: var(--bg-cream);
  border-radius: 28px;
  padding: 56px 24px 48px;
}
.cta-card .peek {
  left: 50%;
  width: 190px;
  transform: translate(-50%, 11.34%);
}
.screen {
  display: block;
  width: 100%;
  border-radius: 22px;
}

/* ---------- 页脚 ---------- */

.foot {
  border-top: 1px solid var(--line);
  padding-block: 56px calc(40px + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  color: var(--muted);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.foot h2 {
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 12px;
}
.foot ul {
  list-style: none;
  display: grid;
  gap: 8px;
}
.foot a {
  color: var(--muted);
}
.foot a:hover {
  color: var(--fg);
}
.foot .brand {
  margin-bottom: 12px;
}
.foot-base {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}
@media (max-width: 900px) {
  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .foot-grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ---------- 子页通用 ---------- */

.page-head {
  padding-block: 64px 40px;
  display: grid;
  gap: 14px;
  justify-items: start;
}
.page-head > * {
  max-width: 760px;
}
.page-head h1 {
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 800;
}
.prose {
  max-width: 720px;
  display: grid;
  gap: 14px;
}
.prose h2 {
  font-size: 26px;
  margin-top: 28px;
}
.prose h3 {
  font-size: 19px;
  margin-top: 12px;
}
.prose ul,
.prose ol {
  padding-left: 1.3em;
  display: grid;
  gap: 6px;
}

/* 进入视口时淡入上移：起点不是全透明，不支持滚动驱动动画的浏览器直接显示 */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes rise {
  from {
    opacity: 0.35;
    transform: translateY(28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }
}

/* ---------- 功能页 ---------- */

.subnav {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 61px);
  z-index: 15;
  background: var(--header);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.subnav-in {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 8px;
}
.subnav-in::-webkit-scrollbar {
  display: none;
}
.subnav a {
  flex: none;
  font-size: 14px;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.subnav a:hover {
  color: var(--fg);
  background: var(--fill-hover);
  text-decoration: none;
}
.fsecs {
  padding-block: 24px 96px;
}
.fsecs > section {
  scroll-margin-top: 140px;
}
.fsec {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px 56px;
  align-items: center;
  padding-block: 72px;
  border-top: 1px solid var(--line);
}
.fsec:first-child {
  border-top: 0;
}
.fsec.wide {
  grid-template-columns: minmax(0, 1fr);
}
.fsec-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}
.fsec-head {
  display: flex;
  gap: 16px;
  align-items: center;
}
.fsec-head > div {
  display: grid;
  gap: 6px;
}
.fsec-head h2 {
  font-size: clamp(24px, 3vw, 30px);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.fsec-head h2 kbd {
  font-size: 14px;
}
.fsec-lead {
  font-size: 17px;
}
.points.cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 40px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.gallery figure {
  margin: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}
.gallery figcaption {
  font-size: 14px;
  color: var(--muted);
}
.island-stage {
  display: grid;
  gap: 20px;
  justify-items: center;
  background: var(--bg-cream) var(--stage-wall) center / cover no-repeat;
}
@media (max-width: 900px) {
  .fsec {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 56px;
  }
  .points.cols,
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .subnav {
    top: calc(env(safe-area-inset-top, 0px) + 97px);
  }
  .fsecs > section {
    scroll-margin-top: 170px;
  }
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.keys {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--surface);
}
.keys th,
.keys td {
  text-align: left;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
.keys thead th {
  border-top: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  background: var(--fill-hover);
}
.keys tbody th {
  font-weight: 500;
}
.fsec-table {
  padding-block: 72px 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
}
.fsec-table .section-head {
  margin-bottom: 8px;
}

/* ---------- 下载页 ---------- */

.dl-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 24px;
}
[data-os="windows"] #windows {
  order: -1;
}
.dl-card {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.dl-card:target {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.dl-card-head {
  display: flex;
  gap: 16px;
  align-items: center;
}
.dl-card-head h2 {
  font-size: 24px;
}
.req {
  list-style: none;
  display: grid;
  gap: 6px;
}
.req li::before {
  content: "✓";
  color: var(--brand-ink);
  font-weight: 700;
  margin-right: 10px;
}
.when-failed {
  display: none;
}
[data-releases="failed"] .when-failed {
  display: inline;
}
@media (max-width: 760px) {
  .dl-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 56px;
}
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px 56px;
  align-items: center;
}
.step-copy {
  display: grid;
  gap: 12px;
  align-content: start;
  position: relative;
  padding-left: 52px;
}
.step-copy::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 17px/1 var(--round);
  color: var(--on-brand);
  background: var(--brand);
}
.step-copy h3 {
  font-size: 21px;
}
@media (max-width: 900px) {
  .step {
    grid-template-columns: minmax(0, 1fr);
  }
}
.mac-window,
.settings-mock {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  border: 1px solid var(--line);
}
.mac-window img {
  display: block;
  width: 100%;
}
.mac-bar {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--fill-hover);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.mac-bar i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}
.mac-bar i:nth-child(2) {
  background: #febc2e;
}
.mac-bar i:nth-child(3) {
  background: #28c840;
}
.mac-bar span {
  flex: 1;
  text-align: center;
  margin-right: 52px;
}
.mock-body {
  display: grid;
  grid-template-columns: 34% 1fr;
  font-size: 13px;
  min-height: 250px;
}
.mock-side {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 12px 8px;
  background: var(--fill-hover);
  border-right: 1px solid var(--line);
  color: var(--muted);
}
.mock-side span {
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-side .on {
  background: var(--fill-control);
  color: var(--fg);
  font-weight: 600;
}
.mock-main {
  padding: 16px 18px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.mock-main b {
  font-size: 15px;
}
.mock-group {
  display: grid;
  gap: 6px;
}
.mock-group small {
  color: var(--muted);
  font-weight: 600;
}
.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--fill-hover);
  border: 1px solid var(--line);
}
.mock-row span:first-child {
  min-width: 0;
}
.mock-row.hl {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.mock-select {
  color: var(--muted);
  white-space: nowrap;
}
.mock-btn {
  flex: none;
  padding: 3px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-weight: 600;
  white-space: nowrap;
}
.settings-mock figcaption {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}
.alt summary {
  cursor: pointer;
  color: var(--brand-ink);
  font-weight: 600;
}
.alt[open] {
  display: grid;
  gap: 10px;
}
.cmd {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--fill-control);
  overflow-x: auto;
}
.cmd code {
  background: none;
  padding: 0;
  white-space: nowrap;
  overflow-wrap: normal;
  flex: 1;
}
.copy {
  flex: none;
  font: 600 13px/1 var(--sans);
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
}
.perms {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.perms div {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.perms dt {
  font-weight: 700;
  margin-bottom: 4px;
}
.perms dd {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 64px;
}
.two-col .prose h2:first-child {
  margin-top: 0;
}
@media (max-width: 760px) {
  .perms,
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 更新日志 ---------- */

.log-wrap {
  padding-bottom: 96px;
  display: grid;
  gap: 20px;
}
.log-wrap > * {
  max-width: 880px;
  width: 100%;
}
.log-wrap > .tabs {
  width: auto;
}
.tabs {
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--fill-control);
}
.tabs button {
  font: 600 15px/1 var(--sans);
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
}
.tabs button[aria-selected="true"] {
  color: var(--fg);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.log {
  display: grid;
  gap: 14px;
}
.log-status {
  color: var(--muted);
  padding: 24px 0;
}
.release {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  scroll-margin-top: 90px;
}
.release summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}
.release summary::-webkit-details-marker {
  display: none;
}
.release summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--faint);
  border-bottom: 2px solid var(--faint);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  margin-left: 4px;
}
.release[open] summary::after {
  transform: rotate(225deg);
}
.release-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.release-title b {
  font: 700 22px/1.2 var(--round);
}
.badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-ink);
  background: var(--brand-soft);
  padding: 3px 9px;
  border-radius: 999px;
}
.release-date {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.release-body {
  padding: 0 22px 22px;
  display: grid;
  gap: 18px;
}
.release-summary {
  color: var(--muted);
}
.change-group {
  display: grid;
  gap: 8px;
}
.change-group h3 {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.change-group h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c, var(--gray));
}
.type-feat {
  --c: var(--brand);
}
.type-ui {
  --c: var(--purple);
}
.type-perf {
  --c: var(--green);
}
.type-fix {
  --c: var(--blue);
}
.change-group ul {
  list-style: none;
  display: grid;
  gap: 8px;
}
.change-group li {
  font-size: 15px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}
.scope {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--fill-control);
  border-radius: 5px;
  padding: 2px 6px;
  margin-right: 8px;
  white-space: nowrap;
}

/* ---------- 常见问题 ---------- */

.faq > * {
  max-width: 820px;
}
.faq {
  padding-bottom: 96px;
  display: grid;
  gap: 48px;
}
.faq > section {
  display: grid;
  gap: 10px;
}
.faq h2 {
  font-size: 24px;
  margin-bottom: 6px;
}
.qa {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  scroll-margin-top: 90px;
}
.qa summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary::after {
  content: "+";
  color: var(--faint);
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
}
.qa[open] summary::after {
  content: "−";
}
.qa > div {
  padding: 0 20px 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}
.qa > div p {
  color: var(--muted);
}
.privacy {
  scroll-margin-top: 90px;
  padding: 32px;
  border-radius: 20px;
  background: var(--bg-cream);
}
.privacy .prose {
  gap: 10px;
}
.notes-gallery {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.notes-gallery figure {
  grid-template-rows: 1fr auto;
}
@media (max-width: 900px) {
  .notes-gallery {
    grid-template-columns: minmax(0, 1fr);
  }
  .notes-gallery .stage.full {
    max-width: 320px;
  }
}
