:root {
  color-scheme: light;
  --page: #f6f8fb;
  --page-deep: #edf1f7;
  --surface: rgba(251, 252, 254, 0.74);
  --surface-solid: #fbfcfe;
  --surface-strong: rgba(242, 246, 251, 0.92);
  --text: #171b22;
  --text-soft: #59616d;
  --text-faint: #747d89;
  --line: rgba(79, 91, 108, 0.18);
  --line-strong: rgba(53, 68, 87, 0.28);
  --accent: #1266d8;
  --accent-strong: #0758c6;
  --accent-soft: rgba(18, 102, 216, 0.11);
  --warning: #9c6013;
  --warning-soft: rgba(156, 96, 19, 0.1);
  --shadow-soft: 0 24px 70px rgba(63, 78, 98, 0.13);
  --shadow-control: 0 10px 26px rgba(60, 77, 101, 0.12);
  --radius-surface: 18px;
  --radius-control: 12px;
  --header-height: 72px;
  --page-gutter: clamp(20px, 4vw, 64px);
  --content-width: 1320px;
  --display-font: ui-rounded, "SF Pro Rounded", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #11151b;
    --page-deep: #171d25;
    --surface: rgba(29, 36, 46, 0.76);
    --surface-solid: #1a2029;
    --surface-strong: rgba(34, 42, 53, 0.92);
    --text: #eef2f7;
    --text-soft: #b2bbc7;
    --text-faint: #929daa;
    --line: rgba(197, 212, 230, 0.16);
    --line-strong: rgba(204, 219, 237, 0.28);
    --accent: #6da9ff;
    --accent-strong: #91bdff;
    --accent-soft: rgba(109, 169, 255, 0.13);
    --warning: #efb65f;
    --warning-soft: rgba(239, 182, 95, 0.12);
    --shadow-soft: 0 28px 80px rgba(2, 7, 14, 0.38);
    --shadow-control: 0 12px 30px rgba(2, 7, 14, 0.28);
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --page: #f6f8fb;
  --page-deep: #edf1f7;
  --surface: rgba(251, 252, 254, 0.74);
  --surface-solid: #fbfcfe;
  --surface-strong: rgba(242, 246, 251, 0.92);
  --text: #171b22;
  --text-soft: #59616d;
  --text-faint: #747d89;
  --line: rgba(79, 91, 108, 0.18);
  --line-strong: rgba(53, 68, 87, 0.28);
  --accent: #1266d8;
  --accent-strong: #0758c6;
  --accent-soft: rgba(18, 102, 216, 0.11);
  --warning: #9c6013;
  --warning-soft: rgba(156, 96, 19, 0.1);
  --shadow-soft: 0 24px 70px rgba(63, 78, 98, 0.13);
  --shadow-control: 0 10px 26px rgba(60, 77, 101, 0.12);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #11151b;
  --page-deep: #171d25;
  --surface: rgba(29, 36, 46, 0.76);
  --surface-solid: #1a2029;
  --surface-strong: rgba(34, 42, 53, 0.92);
  --text: #eef2f7;
  --text-soft: #b2bbc7;
  --text-faint: #929daa;
  --line: rgba(197, 212, 230, 0.16);
  --line-strong: rgba(204, 219, 237, 0.28);
  --accent: #6da9ff;
  --accent-strong: #91bdff;
  --accent-soft: rgba(109, 169, 255, 0.13);
  --warning: #efb65f;
  --warning-soft: rgba(239, 182, 95, 0.12);
  --shadow-soft: 0 28px 80px rgba(2, 7, 14, 0.38);
  --shadow-control: 0 12px 30px rgba(2, 7, 14, 0.28);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  background: var(--page);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% 7%, var(--accent-soft), transparent 30%),
    linear-gradient(180deg, var(--page) 0%, var(--page-deep) 52%, var(--page) 100%);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
.button {
  font: 700 15px/1 var(--body-font);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--display-font);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.06;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.25;
}

p {
  color: var(--text-soft);
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--text);
  color: var(--page);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Web approximation of macOS glass. No Apple web material package exists. */
.site-header,
.glass-panel,
.download-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface) 72%, transparent)),
    var(--surface);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--text) 7%, transparent),
    var(--shadow-soft);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 var(--page-gutter);
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--text) 4%, transparent);
}

.brand {
  font-family: var(--display-font);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vw, 30px);
  min-width: 0;
}

.site-nav a {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: var(--text);
}

.theme-toggle,
.nav-toggle {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.theme-toggle {
  min-width: 58px;
  padding: 0 12px;
}

.nav-toggle {
  display: none;
  padding: 0 14px;
}

.theme-toggle:hover,
.nav-toggle:hover {
  border-color: var(--line-strong);
}

.theme-toggle:active,
.nav-toggle:active,
.button:active,
.copy-button:active,
.demo-controls button:active {
  transform: translateY(1px) scale(0.985);
}

.section,
.hero {
  width: min(var(--content-width), calc(100% - (var(--page-gutter) * 2)));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  min-height: calc(100dvh - var(--header-height));
  padding: clamp(64px, 8vh, 92px) 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 790px;
}

.hero h1 {
  max-width: 13.5em;
  margin-bottom: 26px;
  font-size: clamp(52px, 6.2vw, 88px);
  font-weight: 840;
  line-height: 1.12;
}

.hero-copy > p {
  margin-bottom: 34px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

.hero-actions,
.download-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.button-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #edf5ff), var(--accent));
  color: #f7fbff;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 28%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.button-primary:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-strong) 86%, #edf5ff), var(--accent-strong));
  box-shadow: 0 15px 34px color-mix(in srgb, var(--accent) 34%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.button-secondary,
.copy-button {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-control);
}

.button-secondary:hover,
.copy-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-solid);
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
}

.ambient {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.62;
}

.ambient-one {
  width: 360px;
  height: 360px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translate(18%, -16%);
}

.ambient-two {
  width: 260px;
  height: 200px;
  background: color-mix(in srgb, var(--text-faint) 10%, transparent);
  transform: translate(-26%, 56%);
}

.live-ball {
  position: relative;
  z-index: 2;
  aspect-ratio: 1;
  user-select: none;
  -webkit-user-select: none;
}

.live-ball svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 22px 22px rgba(52, 59, 68, 0.12));
}

.hero-ball {
  width: min(32vw, 450px);
  min-width: 340px;
  cursor: default;
}

.ball-shadow {
  position: absolute;
  bottom: 78px;
  width: 50%;
  height: 32px;
  border-radius: 50%;
  background: rgba(39, 45, 54, 0.15);
  filter: blur(14px);
  transform: scaleX(0.92);
}

.section {
  padding: clamp(96px, 12vw, 168px) 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 64px;
}

.section-heading > p,
.download-intro > p,
.install-copy > p,
.privacy-title-block > p {
  max-width: 60ch;
  margin-bottom: 0;
  font-size: 18px;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: stretch;
}

.feature-list {
  display: grid;
  gap: 0;
}

.feature-list article {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 0.58fr);
  align-items: baseline;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.feature-list article:first-child {
  border-top: 1px solid var(--line);
}

.feature-list h3,
.feature-list p {
  margin-bottom: 0;
}

.demo-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  min-height: 560px;
  padding: 44px;
  border-radius: var(--radius-surface);
  overflow: hidden;
}

.demo-stage::after {
  content: "";
  position: absolute;
  inset: auto 12% 0;
  height: 42%;
  z-index: -1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  filter: blur(46px);
}

.speech-sample {
  position: relative;
  justify-self: start;
  margin-left: 8%;
  padding: 14px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-solid);
  color: var(--text);
  font-weight: 700;
  box-shadow: var(--shadow-control);
}

.speech-sample::after {
  content: "";
  position: absolute;
  left: 36px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-solid);
  transform: rotate(45deg);
}

.demo-ball {
  align-self: center;
  width: clamp(200px, 24vw, 310px);
}

.demo-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.demo-controls button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.demo-controls button:hover {
  border-color: var(--line-strong);
  background: var(--surface-solid);
}

.codex-section {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
}

.section-label {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.codex-lead {
  max-width: 54ch;
  margin-bottom: 36px;
  font-size: 18px;
}

.fact-list {
  display: grid;
  gap: 24px;
  margin: 0;
}

.fact-list > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
}

.fact-list dt {
  font-weight: 800;
}

.fact-list dd {
  margin: 0;
  color: var(--text-soft);
}

.quota-showcase {
  display: grid;
  gap: 24px;
  padding: clamp(28px, 5vw, 60px);
  border-radius: var(--radius-surface);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--page-deep)), var(--page-deep));
  box-shadow: inset 0 0 0 1px var(--line);
}

.quota-frame {
  margin: 0;
  padding: 22px;
  border-radius: var(--radius-surface);
  box-shadow: var(--shadow-soft);
}

.quota-frame-light {
  background: #eef2f7;
  color: #272d36;
}

.quota-frame-dark {
  background: #222831;
  color: #e8edf4;
}

.quota-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}

.quota-frame figcaption {
  margin-top: 13px;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.gallery-section {
  width: min(1480px, calc(100% - (var(--page-gutter) * 2)));
}

.gallery-heading {
  margin-left: clamp(0px, 7vw, 100px);
}

.gallery-showcase {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.gallery-stage {
  position: relative;
  min-height: clamp(430px, 44vw, 560px);
  overflow: hidden;
  border-radius: var(--radius-surface);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--surface);
}

.gallery-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 24px;
  margin: 0;
  padding: clamp(28px, 5vw, 58px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(0.99);
  transition: opacity 420ms cubic-bezier(0.16, 1, 0.3, 1), transform 420ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 420ms;
}

.gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.gallery-media {
  display: grid;
  min-height: 0;
  place-items: center;
}

.gallery-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-media-character img {
  width: min(100%, 340px);
}

.gallery-media-bubble img {
  width: min(100%, 448px);
}

.gallery-media-petting img {
  width: min(60%, 160px);
  image-rendering: auto;
}

.gallery-slide figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 14px;
}

.gallery-slide figcaption strong {
  flex: none;
  color: var(--text);
  font-size: 16px;
}

.gallery-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(760px, 100%);
  margin: 16px auto 0;
}

.gallery-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gallery-tabs button,
.gallery-playback {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-soft);
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.gallery-tabs button:hover,
.gallery-playback:hover {
  color: var(--text);
  background: var(--surface);
}

.gallery-tabs button.is-active {
  border-color: var(--line);
  background: var(--surface-solid);
  color: var(--accent);
  box-shadow: var(--shadow-control);
}

.gallery-playback {
  border-color: var(--line);
}

.gallery-tabs button:active,
.gallery-playback:active {
  transform: scale(0.98);
}

.download-section {
  width: min(1440px, calc(100% - (var(--page-gutter) * 2)));
}

.download-intro {
  max-width: 760px;
  margin-bottom: 58px;
}

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.download-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(28px, 4vw, 46px);
  border-radius: var(--radius-surface);
}

.download-card-primary {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 7%, transparent), 0 26px 80px color-mix(in srgb, var(--accent) 12%, transparent);
}

.download-card-candidate {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--warning-soft) 46%, var(--surface)), var(--surface)),
    var(--surface);
}

.download-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.download-card h3 {
  margin-bottom: 0;
  font-size: clamp(28px, 3.4vw, 42px);
}

.download-status {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.download-card-candidate .download-status {
  color: var(--warning);
}

.architecture {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  color: var(--text-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  white-space: nowrap;
}

.download-card > p {
  min-height: 3.3em;
  margin-bottom: 28px;
}

.release-data {
  display: grid;
  gap: 15px;
  margin: 0 0 34px;
}

.release-data > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
}

.release-data dt {
  color: var(--text-faint);
  font-size: 14px;
}

.release-data dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  text-align: right;
}

.download-actions {
  margin-top: auto;
}

.download-actions .button {
  flex: 1;
}

.copy-button {
  min-height: 52px;
}

.privacy-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: start;
}

.privacy-title-block {
  position: sticky;
  top: calc(var(--header-height) + 42px);
}

.privacy-points {
  display: grid;
  gap: 0;
}

.privacy-points article {
  padding: 30px 0 36px;
  border-bottom: 1px solid var(--line);
}

.privacy-points article:first-child {
  border-top: 1px solid var(--line);
}

.privacy-points p {
  margin-bottom: 0;
}

.install-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: start;
}

.install-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.install-list li {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: baseline;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.install-list li:first-child {
  border-top: 1px solid var(--line);
}

.install-action {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
}

.install-list p {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  margin-left: clamp(0px, 12vw, 170px);
}

.timeline article {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline article:first-child {
  border-top: 1px solid var(--line);
}

.timeline time {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
}

.timeline h3 {
  margin-bottom: 6px;
}

.timeline p {
  margin-bottom: 0;
}

.updates-section {
  padding-bottom: clamp(48px, 6vw, 80px);
}

.license-note {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  margin-bottom: 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.license-note p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 14px;
}

.license-note strong {
  color: var(--text);
  font-weight: 800;
}

.license-links {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.license-links a {
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: min(var(--content-width), calc(100% - (var(--page-gutter) * 2)));
  margin-inline: auto;
  padding: 32px 0 42px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.back-to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  color: var(--accent);
  font-weight: 750;
  box-shadow: var(--shadow-control);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.back-to-top span {
  font-size: 17px;
  line-height: 1;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  border-color: var(--accent);
  background: var(--surface-solid);
  transform: translateY(-2px) scale(1);
}

.back-to-top:active {
  transform: translateY(0) scale(0.98);
}

.copy-toast {
  position: fixed;
  right: 20px;
  bottom: 82px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 17px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.live-ball.is-reacting svg {
  transform-origin: 50% 75%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: hero-enter 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-stage {
    animation: hero-enter 820ms 100ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-ball svg {
    animation: quiet-float 5.8s ease-in-out infinite;
  }

  .live-ball.is-reacting svg {
    animation: ball-react 680ms cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes quiet-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes ball-react {
  0%, 100% { transform: translateY(0) scale(1); }
  42% { transform: translateY(-12px) scale(1.035, 0.97); }
  72% { transform: translateY(2px) scale(0.985, 1.015); }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: auto auto 1fr auto;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: calc(var(--header-height) - 1px);
    left: var(--page-gutter);
    right: var(--page-gutter);
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius-surface) var(--radius-surface);
    background: var(--surface-solid);
    box-shadow: var(--shadow-soft);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    padding: 9px 10px;
  }

  .theme-toggle {
    justify-self: end;
  }

  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(310px, 0.9fr);
  }

  .hero h1 {
    font-size: clamp(48px, 6.4vw, 72px);
  }

}

@media (max-width: 900px) {
  :root {
    --header-height: 64px;
  }

  .section,
  .hero,
  .gallery-section,
  .download-section {
    width: min(100% - 32px, var(--content-width));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 70px 0 78px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero h1 {
    max-width: 12em;
  }

  .hero-stage {
    min-height: 440px;
    margin-top: 28px;
  }

  .hero-ball {
    width: min(68vw, 410px);
    min-width: 270px;
  }

  .ball-shadow {
    bottom: 52px;
  }

  .feature-layout,
  .codex-section,
  .privacy-section,
  .install-section {
    grid-template-columns: 1fr;
  }

  .feature-layout,
  .codex-section,
  .privacy-section,
  .install-section {
    gap: 46px;
  }

  .privacy-title-block {
    position: static;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-card > p {
    min-height: auto;
  }

  .timeline {
    margin-left: 0;
  }

}

@media (max-width: 680px) {
  :root {
    --page-gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  .site-header {
    grid-template-columns: 1fr auto auto;
    padding-inline: 16px;
  }

  .brand {
    font-size: 18px;
  }

  .site-nav {
    left: 10px;
    right: 10px;
    grid-template-columns: 1fr 1fr;
  }

  .theme-toggle,
  .nav-toggle {
    min-height: 38px;
    min-width: 50px;
    padding: 0 10px;
    font-size: 13px;
  }

  .hero {
    padding: 54px 0 58px;
  }

  .hero h1 {
    margin-bottom: 22px;
    font-size: clamp(42px, 12vw, 56px);
    line-height: 1.15;
  }

  .hero-copy > p {
    margin-bottom: 28px;
    font-size: 18px;
  }

  .hero-actions,
  .download-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .download-actions .button,
  .download-actions .copy-button {
    width: 100%;
  }

  .hero-stage {
    min-height: 350px;
    margin-top: 18px;
  }

  .hero-ball {
    width: min(80vw, 330px);
    min-width: 230px;
  }

  .ball-shadow {
    bottom: 36px;
    width: 62%;
  }

  .section {
    padding: 86px 0;
  }

  h2 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .section-heading {
    margin-bottom: 42px;
  }

  .feature-list article,
  .install-list li,
  .timeline article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .demo-stage {
    min-height: 480px;
    padding: 30px 18px;
  }

  .speech-sample {
    justify-self: center;
    margin-left: 0;
  }

  .demo-controls {
    gap: 6px;
  }

  .demo-controls button {
    flex: 1;
    padding-inline: 10px;
  }

  .fact-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .quota-showcase {
    padding: 16px;
  }

  .quota-frame {
    padding: 14px;
  }

  .gallery-stage {
    min-height: 410px;
  }

  .gallery-slide {
    gap: 20px;
    padding: 24px;
  }

  .gallery-slide figcaption {
    display: grid;
    gap: 4px;
  }

  .gallery-toolbar {
    grid-template-columns: 1fr;
  }

  .gallery-playback {
    justify-self: end;
    min-height: 40px;
  }

  .download-card {
    padding: 26px 20px;
  }

  .download-card-head {
    align-items: flex-start;
  }

  .release-data > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .release-data dd {
    text-align: left;
  }

  .timeline time {
    margin-bottom: 3px;
  }

  .license-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 18px 0;
  }

  .site-footer {
    align-items: center;
    flex-direction: column;
    gap: 12px;
    width: calc(100% - 32px);
  }

  .back-to-top {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .copy-toast {
    right: 16px;
    bottom: 76px;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header,
  .glass-panel,
  .download-card,
  .back-to-top {
    background: var(--surface-solid);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .glass-panel,
  .download-card,
  .back-to-top {
    background: var(--surface-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
