:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1c1b19;
  --text-muted: #6b6862;
  --border: #e7e4de;
  --accent: #30b0c7;
  --accent-ink: #ffffff;
  --radius: 16px;
  --max-width: 980px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151513;
    --surface: #1e1e1c;
    --text: #f2f1ee;
    --text-muted: #a5a29b;
    --border: #322f2a;
    --accent: #5ac8d8;
    --accent-ink: #09252b;
  }
}

* { box-sizing: border-box; }

.zh { display: none; }
html.lang-zh .zh { display: inline; }
html.lang-zh .en { display: none; }
[data-block].zh { display: none; }
html.lang-zh [data-block].zh { display: block; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html, body {
    overflow-x: clip;
  }
}

html {
  scroll-behavior: smooth;
}

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

  .platform-toggle::before,
  .platform-toggle button {
    transition: none;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

header.site {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

nav.primary {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

nav.primary a {
  color: var(--text-muted);
}

nav.primary a.active,
nav.primary a:hover {
  color: var(--text);
  text-decoration: none;
}

.lang-toggle {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  border-radius: 1px;
  background: var(--text);
}

.nav-toggle span:nth-child(1) { width: 15px; }
.nav-toggle span:nth-child(2) { width: 20px; }
.nav-toggle span:nth-child(3) { width: 10px; }

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  nav.primary {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 4px 24px 16px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  nav.primary.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  nav.primary a {
    padding: 12px 0;
  }

}

main { display: block; }

.hero {
  padding: 72px 0 0;
  text-align: center;
}

.hero img.icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.platform-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 3px;
  margin: -2px 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--text-muted) 7%, var(--surface));
  position: relative;
}

.platform-toggle::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 48%, var(--border)), 0 1px 3px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-platform="ipados"] .platform-toggle::before {
  transform: translateX(100%);
}

.platform-toggle button {
  appearance: none;
  border: 0;
  border-radius: 7px;
  padding: 6px 14px;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.18s ease;
}

.platform-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.platform-toggle button.active {
  color: color-mix(in srgb, var(--accent) 82%, var(--text));
}

.platform-toggle button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.platform-copy {
  display: none;
}

html[data-platform="ios"] .platform-copy[data-platform="ios"],
html[data-platform="ipados"] .platform-copy[data-platform="ipados"] {
  display: inline;
}

.hero p.lead {
  color: var(--text-muted);
  font-size: 19px;
  max-width: 560px;
  margin: 0 auto 32px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-phones {
  position: relative;
  width: min(100vw, 1280px);
  height: clamp(455px, 53.8vw, 745px);
  margin: 70px 0 18px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-ipad {
  display: none;
  position: relative;
  width: min(112vw, 1300px);
  aspect-ratio: 2400 / 1835;
  margin: 40px 0 18px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-ipad img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.26)) drop-shadow(0 5px 8px rgba(0, 0, 0, 0.16));
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  will-change: transform;
}

html[data-platform="ipados"] .hero-phones {
  display: none;
}

html[data-platform="ipados"] .hero-ipad {
  display: block;
}

.hero-ipad.compact img {
  transform: translateX(-50%) scale(0.82);
}

.hero-phone {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(220px, 26vw, 360px);
  height: auto;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.26)) drop-shadow(0 5px 8px rgba(0, 0, 0, 0.16));
  transform-origin: 50% 100%;
  will-change: transform;
}

.hero-phone.home {
  z-index: 1;
  transform: translate(-150%, 8px);
}

.hero-phone.library {
  z-index: 3;
  transform: translate(-50%, 8px);
}

.hero-phone.poster {
  z-index: 2;
  transform: translate(50%, 8px);
}

.hero-phones.compact .hero-phone.home {
  transform: translate(-96%, 28px) scale(0.82);
}

.hero-phones.compact .hero-phone.library {
  transform: translate(-50%, 28px) scale(0.9);
}

.hero-phones.compact .hero-phone.poster {
  transform: translate(-4%, 28px) scale(0.82);
}

@media (max-width: 640px) {
  .hero-phones {
    width: 100%;
    height: min(113.8vw, 517px);
    margin-top: 58px;
    margin-bottom: 15px;
  }

  .hero-ipad {
    width: min(140vw, 720px);
    margin-top: 58px;
    margin-bottom: 15px;
  }

  .hero-phone {
    width: min(55vw, 250px);
  }

  .hero-phone.home {
    transform: translate(-150%, 8px);
  }

  .hero-phone.library {
    transform: translate(-50%, 8px);
  }

  .hero-phone.poster {
    transform: translate(50%, 8px);
  }

  .hero-phones.compact .hero-phone.home {
    transform: translate(-96%, 26px) scale(0.82);
  }

  .hero-phones.compact .hero-phone.library {
    transform: translate(-50%, 26px) scale(0.9);
  }

  .hero-phones.compact .hero-phone.poster {
    transform: translate(-4%, 26px) scale(0.82);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
}

.badge.coming-soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

section {
  padding: 56px 0;
}

section[id] {
  scroll-margin-top: 72px;
}

section h2 {
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  text-align: center;
}

.section-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  text-align: center;
  text-transform: uppercase;
}

section p.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.plan.highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.plan h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.plan .price {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 4px;
}

.plan .price small {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.price-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 4px;
}

.price-intro {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.price-intro strong {
  font-weight: 700;
}

.price-intro-placeholder {
  visibility: hidden;
}

.price-option {
  position: relative;
  min-height: 99px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.price-option.yearly {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.price-options.lifetime-options {
  grid-template-columns: minmax(0, 1fr);
}

.price-option.lifetime .price-label {
  color: var(--text);
  font-weight: 700;
}

.price-label {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.price-amount {
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 3px;
  white-space: nowrap;
}

.price-amount small {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Keep RMB numerals consistent across the Chinese monthly, yearly, and lifetime plans while
   leaving their smaller period labels at the base `small` size. */
html.lang-zh .price-amount > .zh {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.save-badge {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.plan .note {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 20px;
}

.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}

.plan ul li {
  position: relative;
  padding-left: 25px;
}

.plan ul li::before {
  content: "\2713";
  position: absolute;
  top: 0.35em;
  left: 0;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.plan ul li.limited {
  color: var(--text-muted);
}

.plan ul li.limited::before {
  content: "—";
  border-color: var(--text-muted);
  color: var(--text-muted);
  font-size: 11px;
}

.plan ul li.unavailable {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: currentColor;
}

.plan ul li.unavailable::before {
  content: "";
  border-color: var(--text-muted);
}

.price-section {
  margin-top: 24px;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16px;
}

.prose h2 {
  text-align: left;
  font-size: 22px;
  margin-top: 40px;
}

.prose h1 {
  font-size: 34px;
  margin-bottom: 4px;
}

.prose .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

.contact-block {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 520px;
  margin: 0 auto 48px;
}

.contact-block a.email {
  font-size: 20px;
  font-weight: 600;
}

.faq-item {
  max-width: 720px;
  margin: 0 auto 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child { border-bottom: none; }

.faq-item h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

footer.site {
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

footer.site .wrap {
  padding: 40px 24px 48px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

footer.site .cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

footer.site .col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

footer.site .col a {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 8px;
}

footer.site .copyright {
  color: var(--text-muted);
  font-size: 13px;
}

footer.site .trademark-credit {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

footer.site .footer-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

footer.site .footer-bottom .lang-toggle {
  flex-shrink: 0;
}

.updates-hero {
  padding-top: 72px;
  padding-bottom: 56px;
}

.updates-hero h1 {
  max-width: 720px;
}

.updates-hero .lead {
  max-width: 650px;
}

.updates-hero .section-kicker,
.updates-heading .section-kicker {
  text-align: left;
}

.development-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.updates-content {
  padding-top: 24px;
}

.updates-heading {
  max-width: 610px;
  margin-bottom: 32px;
}

.updates-heading h2,
.updates-note h2 {
  margin: 0 0 10px;
  font-size: clamp(25px, 4vw, 36px);
  letter-spacing: -0.025em;
}

.updates-heading h2 {
  text-align: left;
}

.updates-heading p:not(.section-kicker),
.updates-note p {
  margin: 0;
  color: var(--text-muted);
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.update-feature {
  min-height: 170px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.update-feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.update-feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.updates-note {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .updates-hero {
    padding-top: 52px;
    padding-bottom: 40px;
  }

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

  .update-feature {
    min-height: 0;
    padding: 22px;
  }

  .updates-note {
    margin-top: 40px;
  }
}
