/* Flowwish — shared styles for the homepage (en / zh), privacy pages and 404. */
:root {
  color-scheme: light dark;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --ink: #1b1c1f;
  --ink-2: #4a4a4a;
  --muted: #6b6b6b;
  --line: #e4e6ea;
  --line-strong: #d0d3d8;
  --accent: #d63f2a;
  --accent-ink: #b5341f;
  --accent-surface: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --accent-border: color-mix(in srgb, var(--accent) 26%, transparent);
  --btn-bg: #1b1c1f;
  --btn-ink: #ffffff;
  --btn-hover: #383a40;
  --feather-color: #f8f9fa;
  --scene-hi: #ffffff;
  --scene-shadow: .14;
  --grain-blend: multiply;
  --grain-opacity: .075;
  --card-sheen: rgba(255, 255, 255, 0.9);
  --icon-ring: rgba(27, 28, 31, 0.08);
  --shadow: 0 2px 3px rgba(0, 0, 0, .015), 0 10px 28px rgba(0, 0, 0, .03);
  --shadow-hover: 0 4px 8px rgba(0, 0, 0, .035), 0 18px 40px rgba(0, 0, 0, .07);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="pearl"]) {
    --bg: #0e1015;
    --surface: #161922;
    --ink: #f2efe8;
    --ink-2: #c8c5be;
    --muted: #9a9893;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --accent: #e8452c;
    --accent-ink: #f08a74;
    --accent-surface: color-mix(in srgb, var(--accent) 16%, var(--surface));
    --accent-border: color-mix(in srgb, var(--accent) 36%, transparent);
    --btn-bg: #f2efe8;
    --btn-ink: #12141a;
    --btn-hover: #ffffff;
    --feather-color: #0e1015;
    --scene-hi: #262c3a;
    --scene-shadow: .55;
    --grain-blend: screen;
    --grain-opacity: .045;
    --card-sheen: rgba(255, 255, 255, 0.22);
    --icon-ring: rgba(255, 255, 255, 0.12);
    --shadow: 0 16px 44px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-hover: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .22);
  }
}

:root[data-theme="pearl"] {
  color-scheme: light;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --ink: #1b1c1f;
  --ink-2: #4a4a4a;
  --muted: #6b6b6b;
  --line: #e4e6ea;
  --line-strong: #d0d3d8;
  --accent: #d63f2a;
  --accent-ink: #b5341f;
  --accent-surface: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --accent-border: color-mix(in srgb, var(--accent) 26%, transparent);
  --btn-bg: #1b1c1f;
  --btn-ink: #ffffff;
  --btn-hover: #383a40;
  --feather-color: #f8f9fa;
  --scene-hi: #ffffff;
  --scene-shadow: .14;
  --grain-blend: multiply;
  --grain-opacity: .075;
  --card-sheen: rgba(255, 255, 255, 0.9);
  --icon-ring: rgba(27, 28, 31, 0.08);
  --shadow: 0 2px 3px rgba(0, 0, 0, .015), 0 10px 28px rgba(0, 0, 0, .03);
  --shadow-hover: 0 4px 8px rgba(0, 0, 0, .035), 0 18px 40px rgba(0, 0, 0, .07);
}

:root[data-theme="cosmic"] {
  color-scheme: dark;
  --bg: #0e1015;
  --surface: #161922;
  --ink: #f2efe8;
  --ink-2: #c8c5be;
  --muted: #9a9893;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #e8452c;
  --accent-ink: #f08a74;
  --accent-surface: color-mix(in srgb, var(--accent) 16%, var(--surface));
  --accent-border: color-mix(in srgb, var(--accent) 36%, transparent);
  --btn-bg: #f2efe8;
  --btn-ink: #12141a;
  --btn-hover: #ffffff;
  --feather-color: #0e1015;
  --scene-hi: #262c3a;
  --scene-shadow: .55;
  --grain-blend: screen;
  --grain-opacity: .045;
  --card-sheen: rgba(255, 255, 255, 0.22);
  --icon-ring: rgba(255, 255, 255, 0.12);
  --shadow: 0 16px 44px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-hover: 0 24px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .5s ease, color .5s ease;
}
html:lang(zh) body { line-height: 1.7; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 28px; }

/* Fluid Canvas & Edge Feather Frame */
.fw-water-canvas {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -2;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.fw-water-canvas.is-ready { opacity: 1; }

.fw-water-frame {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transition: background .5s ease;
  background:
    linear-gradient(to right,  var(--feather-color) 0%, color-mix(in srgb, var(--feather-color) 97%, transparent) 1.5%, color-mix(in srgb, var(--feather-color) 86%, transparent) 3.5%, color-mix(in srgb, var(--feather-color) 62%, transparent) 6%, color-mix(in srgb, var(--feather-color) 34%, transparent) 9%, color-mix(in srgb, var(--feather-color) 12%, transparent) 13%, transparent 18%),
    linear-gradient(to left,   var(--feather-color) 0%, color-mix(in srgb, var(--feather-color) 97%, transparent) 1.5%, color-mix(in srgb, var(--feather-color) 86%, transparent) 3.5%, color-mix(in srgb, var(--feather-color) 62%, transparent) 6%, color-mix(in srgb, var(--feather-color) 34%, transparent) 9%, color-mix(in srgb, var(--feather-color) 12%, transparent) 13%, transparent 18%),
    linear-gradient(to bottom, var(--feather-color) 0%, color-mix(in srgb, var(--feather-color) 96%, transparent) 1%,   color-mix(in srgb, var(--feather-color) 82%, transparent) 2.6%, color-mix(in srgb, var(--feather-color) 55%, transparent) 4.6%, color-mix(in srgb, var(--feather-color) 28%, transparent) 7%,  color-mix(in srgb, var(--feather-color) 9%, transparent) 10%, transparent 14%),
    linear-gradient(to top,    var(--feather-color) 0%, color-mix(in srgb, var(--feather-color) 96%, transparent) 1%,   color-mix(in srgb, var(--feather-color) 82%, transparent) 2.4%, color-mix(in srgb, var(--feather-color) 55%, transparent) 4.2%, color-mix(in srgb, var(--feather-color) 28%, transparent) 6.4%, color-mix(in srgb, var(--feather-color) 9%, transparent) 9%, transparent 12.5%);
}

/* Logo: shooting star + outlined EB Garamond Italic wordmark, written by brand/generate.py. */
.wordmark { line-height: 1; white-space: nowrap; color: var(--ink); }
.wm { display: inline-block; width: auto; height: 1.033em; vertical-align: -.307em; }
.wm .star { fill: var(--accent); }
.wm-stack { height: 2.12em; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.topbar .mini { font-size: 30px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.theme-segments {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color .2s, background .4s;
}
.theme-seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s cubic-bezier(0.16, 1, 0.3, 1), color .2s ease;
}
.theme-seg-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.theme-seg-btn.is-active { background: var(--ink); color: var(--bg); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16); }
.theme-seg-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
  transition: border-color .2s, color .2s, background .4s;
}
.lang-switch:hover { border-color: var(--line-strong); color: var(--ink); }
.lang-switch svg { width: 15px; height: 15px; }

/* Hero */
.hero { padding-top: 22px; padding-bottom: 52px; text-align: center; }
.hero .wordmark { font-size: clamp(60px, 17vw, 88px); }
.hero .meteor, .hero .tail { transform-box: view-box; transform-origin: 0 0; }
.hero .meteor { animation: meteor-in 1.2s linear .15s both; }
.hero .tail { animation: tail-in 1.2s linear .15s both; }
/* meteor keyframes: written by brand/generate.py */
@keyframes meteor-in {
  0% { transform: translate(-1018.9px, 397.3px); opacity: 0; }
  8.3% { transform: translate(-818.5px, 237.1px); opacity: 0.3; }
  16.7% { transform: translate(-629.3px, 136.5px); opacity: 0.7; }
  25% { transform: translate(-464.7px, 75.8px); opacity: 1; }
  33.3% { transform: translate(-328.7px, 40.6px); }
  41.7% { transform: translate(-221.1px, 20.6px); }
  50% { transform: translate(-139.4px, 10px); }
  58.3% { transform: translate(-80.8px, 4.5px); }
  66.7% { transform: translate(-41.5px, 1.8px); }
  75% { transform: translate(-17.5px, 0.8px); }
  83.3% { transform: translate(-5.2px, 0.2px); }
  91.7% { transform: translate(-0.6px, 0px); }
  100% { transform: translate(0px, 0px); }
}
@keyframes tail-in {
  0% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.15) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  8.3% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.345) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  16.7% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.508) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  25% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.641) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  33.3% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.748) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  41.7% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.831) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  50% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.894) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  58.3% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.939) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  66.7% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.969) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  75% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.987) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  83.3% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(0.996) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  91.7% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(1) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
  100% { transform: translate(1924.5px, -1526.2px) rotate(-38.5deg) scaleX(1) rotate(38.5deg) translate(-1924.5px, 1526.2px); }
}
/* end meteor keyframes */
.statement { max-width: 30em; margin: 22px auto 0; color: var(--ink-2); font-size: clamp(18px, 2.1vw, 21px); line-height: 1.45; letter-spacing: -.012em; text-wrap: balance; }
.byline { margin-top: 10px; color: var(--muted); font-size: 14px; }
:lang(zh) .statement { letter-spacing: 0; }
.epigraph { margin: 24px 0 0; text-wrap: balance; }
.epigraph blockquote { margin: 0; color: var(--ink-2); font: italic 16.5px/1.58 var(--serif); hanging-punctuation: first last; }
.epigraph span { display: block; }
.epigraph figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* App groups */
.group + .group { margin-top: 64px; }
.group-head { margin-bottom: 22px; }
.group-head h2 { font-family: var(--display); font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.group-head p { margin-top: 6px; color: var(--muted); font-size: 15px; }
:lang(zh) .group-head h2 { letter-spacing: 0; }
.grid { display: grid; gap: 24px; }
.grid + .grid { margin-top: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* App card — the whole card follows its primary action (stretched link). */
.app {
  --fade: to bottom;
  --scene-soft: var(--soft, #f6f6f6);
  --scene-tint: var(--tint, #e8e8e8);
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow .35s ease,
              border-color .35s ease,
              background .5s ease;
}
.app::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--card-sheen) 35%, var(--card-sheen) 65%, transparent 100%);
  pointer-events: none;
  z-index: 5;
  opacity: .8;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="pearl"]) .app {
    --scene-soft: color-mix(in srgb, var(--soft, #f6f6f6) 9%, var(--surface));
    --scene-tint: color-mix(in srgb, var(--tint, #e8e8e8) 17%, var(--surface));
  }
}
:root[data-theme="cosmic"] .app {
  --scene-soft: color-mix(in srgb, var(--soft, #f6f6f6) 9%, var(--surface));
  --scene-tint: color-mix(in srgb, var(--tint, #e8e8e8) 17%, var(--surface));
}
:root[data-theme="pearl"] .app {
  --scene-soft: var(--soft, #f6f6f6);
  --scene-tint: var(--tint, #e8e8e8);
}

.app-visual {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  height: 228px;
  overflow: hidden;
  background:
    linear-gradient(var(--fade), transparent 30%, var(--surface) 100%),
    radial-gradient(ellipse at 26% 3%, var(--scene-hi) 0%, var(--scene-soft) 45%, var(--scene-tint) 100%);
  transition: background .5s ease;
}
.app-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: url("paper-grain.svg");
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  -webkit-mask-image: linear-gradient(var(--fade), #000 50%, transparent 100%);
  mask-image: linear-gradient(var(--fade), #000 50%, transparent 100%);
}
.scene-shadow {
  position: absolute;
  left: 50%;
  top: calc(50% + 66px);
  width: 142px;
  height: 20px;
  border-radius: 50%;
  background: #000;
  filter: blur(16px);
  opacity: var(--scene-shadow);
  transform: translateX(-50%);
  transition: transform .45s ease, opacity .45s ease;
}
.icon-float { position: relative; z-index: 2; width: 152px; height: 152px; flex-shrink: 0; }
.icon-shell { position: relative; width: 100%; height: 100%; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.app-icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 22%;
  object-fit: cover;
  filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .105)) drop-shadow(0 2px 1px rgba(0, 0, 0, .12));
  transition: filter .45s ease;
}
/* Crisp subtle edge definition for light-background full-bleed icons */
.app-icon.icon-framed { box-shadow: inset 0 0 0 1px var(--icon-ring); }
/* Icons that already include Apple's squircle mask with transparent corners */
.app-icon.icon-squircle { border-radius: 0; }
/* macOS icons ship with transparent padding; scale them to match the iOS icons. */
.app-icon.pad-124 { position: absolute; width: 124.2718%; height: 124.2718%; left: -12.1359%; top: -12.1359%; border-radius: 0; }
.app-icon.pad-116 { position: absolute; width: 116.3636%; height: 116.3636%; left: -8.1818%; top: -9.0909%; border-radius: 0; }

/* Theme-switched app icon variants (e.g. Lull 2.0 Light & Dark) */
.app-icon.icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="pearl"]) .app-icon.icon-light { display: none; }
  :root:not([data-theme="pearl"]) .app-icon.icon-dark { display: block; }
}
:root[data-theme="cosmic"] .app-icon.icon-light { display: none; }
:root[data-theme="cosmic"] .app-icon.icon-dark { display: block; }
:root[data-theme="pearl"] .app-icon.icon-light { display: block; }
:root[data-theme="pearl"] .app-icon.icon-dark { display: none; }

.app-body { flex: 1; display: flex; flex-direction: column; padding: 20px 26px 24px; }
.app-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.app-name { font-family: var(--display); font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
.app-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 4%, var(--surface));
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .01em;
}
.app-badge-accent {
  border-color: var(--accent-border);
  background: var(--accent-surface);
  color: var(--accent-ink);
  font-weight: 600;
}
.app-platforms { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.nw { white-space: nowrap; }
.app-description { margin-top: 12px; color: var(--ink-2); font-size: 15px; line-height: 1.62; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-top: auto; padding-top: 22px; }
.app-links { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; }
.app-links a { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; }
.app-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.app-links svg { width: 14px; height: 14px; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 25px; }
.stretched:focus-visible { outline: none; }
.stretched:focus-visible::after { outline: 2px solid var(--ink); outline-offset: -3px; }

.store-button { display: block; border-radius: 9px; }
.store-badge { display: block; width: 120px; height: 40px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="pearl"]) .store-button { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
}
:root[data-theme="cosmic"] .store-button { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font: 500 14px/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); border: 1px solid var(--btn-bg); }
.btn-outline { background: color-mix(in srgb, var(--surface) 92%, var(--ink) 4%); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn-outline:hover { border-color: var(--muted); background: color-mix(in srgb, var(--surface) 88%, var(--ink) 8%); }

/* Refined editorial feature pills (no system emoji) */
.app-feature-pills { display: flex; flex-wrap: wrap; gap: 7px 8px; margin-top: 14px; }
.feature-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 4.5%, var(--surface));
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: -.01em;
}
:lang(zh) .feature-pill { letter-spacing: 0; }

@media (hover: hover) and (pointer: fine) {
  .app:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
  .app:hover .icon-shell { transform: translateY(-7px) scale(1.025); }
  .app:hover .app-icon { filter: drop-shadow(0 24px 16px rgba(0, 0, 0, .13)) drop-shadow(0 2px 1px rgba(0, 0, 0, .1)); }
  .app:hover .scene-shadow { transform: translateX(-50%) scale(1.08); opacity: calc(var(--scene-shadow) * .72); }
  .app:hover .btn-primary { background: var(--btn-hover); border-color: var(--btn-hover); }
  .app:hover .btn-outline { border-color: var(--muted); }
}

/* Horizontal cards: hero, 2-col desktop cards, single-item full-width card, and odd tablet tail cards. */
@media (min-width: 941px) {
  .grid-2 .app,
  .grid-3 .app.app-hero {
    --fade: to right;
    flex-direction: row;
  }
  .grid-2 .app-visual { flex: 0 0 40%; height: auto; min-height: 296px; }
  .grid-2 .app-body { justify-content: center; padding: 30px 32px 28px 8px; }
  .grid-2 .app:only-child { grid-column: 1 / -1; }
  .grid-2 .app:only-child .app-visual { flex: 0 0 34%; min-height: 268px; }
  .grid-2 .app:only-child .app-body { padding: 34px 42px 32px 16px; max-width: 680px; }
  .grid-2 .app.app-hero,
  .grid-3 .app.app-hero { grid-column: 1 / -1; }
  .grid-2 .app.app-hero .app-visual,
  .grid-3 .app.app-hero .app-visual { flex: 0 0 34%; height: auto; min-height: 320px; }
  .grid-2 .app.app-hero .app-body,
  .grid-3 .app.app-hero .app-body { justify-content: center; padding: 34px 42px 32px 16px; }
  .grid-2 .app.app-hero .app-name,
  .grid-3 .app.app-hero .app-name { font-size: 26px; }
}

@media (min-width: 651px) and (max-width: 940px) {
  .grid-2, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 .app.app-hero,
  .grid-3 .app.app-hero,
  .grid-2 .app:only-child,
  .grid-3 .app.app-hero ~ .app:last-child:nth-child(even),
  .grid-3 > .app:not(.app-hero):last-child:nth-child(odd) {
    --fade: to right;
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .grid-2 .app.app-hero .app-visual,
  .grid-3 .app.app-hero .app-visual,
  .grid-2 .app:only-child .app-visual,
  .grid-3 .app.app-hero ~ .app:last-child:nth-child(even) .app-visual,
  .grid-3 > .app:not(.app-hero):last-child:nth-child(odd) .app-visual {
    flex: 0 0 38%;
    height: auto;
    min-height: 264px;
  }
  .grid-2 .app.app-hero .app-body,
  .grid-3 .app.app-hero .app-body,
  .grid-2 .app:only-child .app-body,
  .grid-3 .app.app-hero ~ .app:last-child:nth-child(even) .app-body,
  .grid-3 > .app:not(.app-hero):last-child:nth-child(odd) .app-body {
    justify-content: center;
    padding: 28px 30px 26px 8px;
  }
}

/* Footer */
.site-footer { margin-top: 88px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; padding-top: 28px; padding-bottom: 44px; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  transition: border-color .2s, color .2s;
}
.pill:hover { border-color: var(--line-strong); color: var(--ink); }
.pill svg { width: 15px; height: 15px; flex-shrink: 0; }
.colophon { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--muted); font-size: 13px; }
.colophon a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Waitlist dialog */
body.waitlist-open { overflow: hidden; }
.waitlist {
  position: fixed;
  width: min(400px, calc(100% - 40px));
  max-height: calc(100svh - 40px);
  margin: auto;
  padding: 30px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
}
.waitlist::backdrop { background: rgba(0, 0, 0, .34); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.waitlist [hidden] { display: none !important; }
.waitlist-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.waitlist-close:hover { background: var(--bg); color: var(--ink); }
.waitlist-close svg { width: 16px; height: 16px; }
.waitlist-title { padding-right: 18px; font-family: var(--display); font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.025em; }
:lang(zh) .waitlist-title { letter-spacing: 0; }
.waitlist-title:focus { outline: none; }
.waitlist-copy { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.waitlist-form { margin-top: 22px; }
.waitlist-label { display: block; margin-bottom: 8px; color: var(--ink-2); font-size: 13px; }
.waitlist-email { display: block; width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 16px var(--sans); }
.waitlist-email:focus { border-color: var(--ink); outline: 3px solid color-mix(in srgb, var(--ink) 10%, transparent); outline-offset: 1px; }
.waitlist-email[aria-invalid="true"] { border-color: var(--accent-ink); }
.waitlist-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.waitlist-feedback { margin-top: 10px; color: var(--accent-ink); font-size: 13px; line-height: 1.6; }
.waitlist-submit { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; margin-top: 18px; padding: 10px 16px; border: 1px solid var(--btn-bg); border-radius: 10px; background: var(--btn-bg); color: var(--btn-ink); font: 500 15px var(--sans); cursor: pointer; transition: background .2s; }
.waitlist-submit:hover { background: var(--btn-hover); }
.waitlist-submit:disabled { opacity: .65; cursor: wait; }
.waitlist-privacy { margin-top: 16px; color: var(--muted); font-size: 12px; text-align: center; }
.waitlist-privacy a { text-decoration: underline; text-underline-offset: 3px; }
.waitlist-privacy a:hover { color: var(--ink); }

/* Document pages (privacy, 404) */
.narrow { width: min(720px, 100%); margin: 0 auto; padding: 0 24px; }
.doc { width: min(720px, 100%); margin: 0 auto; padding: 8px 24px 0; }
.doc-card { padding: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.doc-card h1 { font-family: var(--display); font-size: clamp(28px, 5vw, 36px); line-height: 1.15; font-weight: 600; letter-spacing: -.03em; }
.doc-card h2 { margin-top: 32px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.doc-card p { margin-top: 10px; color: var(--ink-2); font-size: 15px; line-height: 1.75; }
.doc-card p a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-card .updated { margin-top: 12px; color: var(--muted); font-size: 13px; }
:lang(zh) .doc-card h1, :lang(zh) .doc-card h2 { letter-spacing: 0; }
.doc-foot { width: min(720px, 100%); margin: 0 auto; padding: 24px 24px 48px; color: var(--muted); font-size: 13px; }
.doc-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-card .note { margin-top: 6px; color: var(--muted); font-size: 13px; }
.notfound { padding-top: 64px; padding-bottom: 64px; text-align: center; }
.notfound .code { color: var(--accent-ink); font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: .08em; }
.notfound h1 { margin-top: 10px; }
.notfound .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }

/* Phones: compact list cards with subtle per-app ambient tint. */
@media (max-width: 650px) {
  .wrap { padding: 0 18px; }
  .topbar { min-height: 60px; }
  .hero { padding-top: 18px; padding-bottom: 42px; }
  .statement { margin-top: 18px; }
  .epigraph { margin-top: 22px; }
  .epigraph blockquote { font-size: 15.5px; }
  .epigraph span { display: inline; }
  .group + .group { margin-top: 48px; }
  .group-head { margin-bottom: 16px; }
  .group-head h2 { font-size: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .grid + .grid { margin-top: 14px; }
  .app {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    column-gap: 16px;
    padding: 18px 18px 16px;
    border-radius: 22px;
    background:
      radial-gradient(ellipse 140% 95% at 14% 0%, var(--scene-tint) 0%, transparent 62%),
      var(--surface);
  }
  .app-visual, .app-body { display: contents; }
  .app-visual::before, .scene-shadow { display: none; }
  .icon-float { z-index: 0; grid-column: 1; grid-row: 1; width: 74px; height: 74px; }
  .app-icon { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .09)) drop-shadow(0 1px 1px rgba(0, 0, 0, .08)); }
  .app-head { grid-column: 2; grid-row: 1; }
  .app-name { font-size: 20px; }
  .app-description { grid-column: 1 / -1; margin-top: 14px; }
  .app-feature-pills { grid-column: 1 / -1; margin-top: 12px; gap: 6px; }
  .feature-pill { font-size: 12px; padding: 3px 9px; }
  .app-actions { grid-column: 1 / -1; padding-top: 16px; }
  .stretched::after { border-radius: 21px; }
  .site-footer { margin-top: 68px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .doc, .narrow { padding: 0 16px; }
  .notfound { padding-top: 44px; padding-bottom: 44px; }
  .doc-card { padding: 30px 22px; border-radius: 20px; }
  .doc-foot { padding: 20px 16px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .app:hover { transform: none; }
  .app:hover .icon-shell { transform: none; }
  .app:hover .scene-shadow { transform: translateX(-50%); }
}
