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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: color-mix(in oklch, var(--link), var(--fg) 18%);
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

/* —— 顶栏 —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in oklch, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(var(--max), calc(100% - 48px));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: 0.01em;
  min-height: var(--tap);
}

.brand:hover {
  color: var(--fg);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-cta);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
}

.btn-fill {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-fill:hover {
  background: var(--accent-press);
  color: var(--on-accent);
}

.btn-ghost {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: color-mix(in oklch, var(--surface), var(--fg) 6%);
  color: var(--fg);
}

/* —— Hero —— */
.hero {
  padding: 72px 0 40px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 64px;
  align-items: center;
}

.kicker {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 400;
}

.lede {
  margin: 0 0 28px;
  max-width: 36ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 18px 8px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.store-btn:hover {
  border-color: color-mix(in oklch, var(--border), var(--fg) 18%);
  color: var(--fg);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.store-btn small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.store-btn strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

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

/* —— 手机框 —— */
.phone {
  width: 280px;
  height: 580px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 36px;
  background: linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 28px 60px -12px color-mix(in oklch, var(--fg) 28%, transparent);
}

.phone--sm {
  width: 248px;
  height: 520px;
}

.phone-screen {
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-bottom) 100%);
  color: var(--fg);
  font-size: 12px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
}

.phone-screen--dark {
  background: oklch(16% 0.018 162.3);
  color: oklch(98% 0.004 162.3);
}

.status {
  flex: 0 0 28px;
  padding: 8px 16px 0;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
}

.mock-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 4px 12px 8px;
}

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.mock-head .page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
}

.continue {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 14px color-mix(in oklch, var(--fg) 6%, transparent);
}

.continue img {
  width: 72px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 72px;
}

.continue .ttl {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.continue .meta {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.bar {
  margin-top: 6px;
  height: 4px;
  background: var(--slate);
  border-radius: 99px;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 64%;
  background: var(--fg);
}

.chips {
  display: flex;
  gap: 6px;
  margin: 10px 0 6px;
  overflow: hidden;
}

.chip {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--slate);
  color: var(--fg);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
}

.chip.on {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.chip.solid {
  background: var(--fg);
  color: var(--surface);
}

.hint {
  margin: 8px 0;
  color: var(--muted);
  font-size: 11px;
}

.vcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.vcard .cover {
  position: relative;
}

.vcard img {
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.badge {
  position: absolute;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--on-accent);
  display: inline-flex;
  align-items: center;
}

.badge.time {
  left: 6px;
  bottom: 6px;
  background: var(--fg);
  color: var(--surface);
}

.badge.a1 {
  right: 6px;
  top: 6px;
  background: var(--cefr-a1);
}

.badge.a2 {
  right: 6px;
  top: 6px;
  background: var(--cefr-a2);
}

.badge.static {
  position: static;
  background: var(--cefr-a2);
}

.vcard .cap {
  padding: 8px 10px 10px;
}

.vcard .cap strong {
  display: block;
  font-size: 12px;
}

.vcard .cap span {
  color: var(--muted);
  font-size: 11px;
}

.tabbar {
  flex: 0 0 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  background: color-mix(in oklch, var(--surface) 92%, transparent);
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  align-items: center;
}

.tabbar span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tabbar .on {
  color: var(--accent);
}

.tabbar i {
  width: 40px;
  height: 20px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-style: normal;
}

.tabbar i svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.tabbar .on i {
  background: var(--accent-soft);
}

/* 播放器稿 */
.player-stage {
  position: relative;
}

.player-stage img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.sub {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.6);
}

.sub em {
  color: var(--accent);
  font-style: normal;
}

.sheet {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  color: var(--fg);
  border-radius: 18px 18px 0 0;
  padding: 12px 14px 8px;
}

.sheet-kicker {
  font-size: 13px;
  font-weight: 600;
}

.sheet p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.word-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.word-row span {
  color: var(--muted);
  font-size: 12px;
}

.mock-cta {
  margin-top: 8px;
  height: 36px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
}

/* 单词稿 */
.search-ph {
  height: 32px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 11px;
  margin-bottom: 8px;
}

.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}

.tip {
  background: var(--slate);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  margin-bottom: 8px;
}

.plan h3 {
  margin: 0 0 6px;
  font-size: 12px;
}

.plan .meta {
  color: var(--muted);
  font-size: 11px;
}

.quota {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0;
}

.quota div {
  background: var(--slate);
  border-radius: 8px;
  padding: 6px 8px;
}

.quota small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.quota b {
  font-family: var(--font-mono);
  font-size: 16px;
}

/* —— 能力区 —— */
.features {
  padding: 24px 0 8px;
}

.feature {
  padding: 56px 0;
}

.feature .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
  align-items: center;
}

.feature.reverse .wrap {
  grid-template-columns: 280px minmax(0, 1fr);
}

.feature.reverse .copy {
  order: 2;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.feature h2,
.flow h2,
.download h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.copy p {
  margin: 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: 16px;
}

/* —— 怎么学 —— */
.flow {
  padding: 48px 0 72px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 36px;
  padding-top: 8px;
}

.steps article {
  min-width: 0;
}

.steps .n {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}

.steps h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

/* —— 下载 —— */
.download {
  padding: 72px 0;
  background: color-mix(in oklch, var(--accent-soft) 55%, var(--bg));
  border-block: 1px solid var(--border);
  text-align: center;
}

.download .lede {
  margin-inline: auto;
  margin-bottom: 24px;
}

.download .store-row {
  justify-content: center;
}

/* —— 页脚 —— */
.foot {
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

.foot .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  max-width: 720px;
}

.beian {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
}

.beian-gongan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 40;
  padding: 12px 18px;
  background: var(--fg);
  color: var(--on-accent);
  border-radius: 14px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

@media (max-width: 900px) {
  .hero .wrap,
  .feature .wrap,
  .feature.reverse .wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature.reverse .copy {
    order: 0;
  }

  .hero {
    padding-top: 40px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .wrap,
  .nav .wrap {
    width: calc(100% - 32px);
  }

  .nav .wrap {
    gap: 8px;
  }

  .nav-links a {
    padding: 0 8px;
  }

  .btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }

  .brand span {
    display: none;
  }

  .hero h1 {
    font-size: 36px;
  }

  .lede {
    font-size: 16px;
  }
}

/* —— 协议正文 —— */
.legal {
  width: min(760px, calc(100% - 48px));
  margin: 48px auto 96px;
}

.legal h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.legal .meta {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.legal h2 {
  margin: 36px 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.legal p,
.legal li {
  margin: 0 0 10px;
  color: var(--fg);
}

.legal ul,
.legal ol {
  margin: 0 0 12px;
  padding-left: 1.35em;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
}

.legal th,
.legal td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: var(--slate);
  font-weight: 600;
}

.legal .table-wrap {
  overflow-x: auto;
  margin: 0 0 16px;
}

.legal .ver {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 640px) {
  .legal {
    width: calc(100% - 32px);
    margin-top: 28px;
  }
}

/* App 内 WebView：UA 含 AikaikouApp，只留协议正文，站点头尾由原生 AppBar 承担 */
html.app-embed .skip,
html.app-embed header.nav,
html.app-embed footer.foot {
  display: none !important;
}

html.app-embed .legal {
  margin: 12px auto 32px;
}

@media (max-width: 640px) {
  html.app-embed .legal {
    width: calc(100% - 24px);
    margin-top: 8px;
    margin-bottom: 24px;
  }
}
