:root {
  --ink: #15213a;
  --muted: #5e6c83;
  --line: #dce3ee;
  --blue: #29488f;
  --blue-2: #0b79b5;
  --cyan: #2fc9d7;
  --paper: #f6f8fb;
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(20, 39, 77, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(14, 31, 75, 0.48);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 36px rgba(4, 18, 45, 0.14);
  color: var(--white);
}

.brand,
.nav-links,
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  object-fit: cover;
}

.nav-links {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 650;
}

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

.language-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.language-switcher button {
  display: grid;
  min-width: 34px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.language-switcher button[aria-pressed="true"] {
  background: var(--white);
  color: var(--blue);
}

.hero {
  position: relative;
  display: grid;
  min-height: 92vh;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 570px);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  overflow: hidden;
  padding: 108px clamp(20px, 6vw, 88px) 64px;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.22), transparent 26%),
    linear-gradient(135deg, #253c8f 0%, #238bd0 52%, #2bd4cf 100%);
}

.hero::after {
  position: absolute;
  right: -8vw;
  bottom: -10vw;
  width: 42vw;
  height: 42vw;
  min-width: 360px;
  min-height: 360px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.hero-copy,
.phone-stage {
  position: relative;
  z-index: 1;
}

.app-icon {
  width: 96px;
  height: 96px;
  margin-bottom: 28px;
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(6, 25, 62, 0.25);
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-text {
  max-width: 610px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
}

.primary-button {
  background: var(--white);
  color: var(--blue);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: var(--white);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 42px 0 0;
}

.hero-stats div,
.hero-stats dt,
.hero-stats dd {
  margin: 0;
}

.hero-stats dt {
  font-size: 34px;
  font-weight: 900;
}

.hero-stats dd {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 700;
}

.phone-stage {
  min-height: 680px;
}

.phone {
  position: absolute;
  top: 30px;
  right: clamp(8px, 4vw, 78px);
  width: min(272px, 42vw);
  min-width: 246px;
  padding: 10px;
  border-radius: 32px;
  background: #10131a;
  box-shadow: var(--shadow);
}

.phone-back {
  top: 150px;
  right: min(270px, 35vw);
  transform: rotate(-5deg) scale(0.92);
  opacity: 0.92;
}

.phone-screen {
  overflow: hidden;
  height: 586px;
  border-radius: 24px;
  background: #f4f4f5;
  color: #222;
}

.status-bar {
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: #050505;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.app-top {
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(#506ca3, #153076);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 36px;
  height: 18px;
  padding-right: 3px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  font-size: 11px;
}

.segments {
  display: grid;
  height: 42px;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  background: #fff;
  color: #555;
  font-size: 10px;
  text-align: center;
}

.segments span {
  padding-bottom: 11px;
}

.segments .selected {
  color: #003b91;
  border-bottom: 1px solid #1f4fa2;
  font-weight: 800;
}

.kana-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 11px 6px;
  padding: 12px 6px 0;
}

.kana-grid span {
  display: grid;
  height: 57px;
  grid-template-rows: 1fr auto auto;
  align-items: center;
  padding: 6px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.kana-grid b {
  color: #013b91;
  font-size: 18px;
  line-height: 1;
}

.kana-grid em {
  color: #3f4652;
  font-size: 9px;
  font-style: normal;
}

.kana-grid small {
  color: #8d939c;
  font-size: 8px;
  text-align: center;
}

.tabbar {
  display: grid;
  height: 44px;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  margin-top: 7px;
  background: #fff;
  color: #7f858e;
  font-size: 13px;
  text-align: center;
}

.tabbar .active {
  color: #0675a6;
}

.tabbar small {
  display: block;
  margin-top: 1px;
  font-size: 7px;
}

.mini-screen .quiz-preview {
  padding: 16px 20px;
  color: #505864;
  font-size: 11px;
}

.score-line {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 24px 0 14px;
  color: #0da23d;
}

.score-line span:last-child {
  color: #d11a2a;
}

.kana-card {
  display: grid;
  width: 134px;
  height: 134px;
  place-items: center;
  margin: 0 auto 26px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.2);
  color: #1d1d1f;
  font-size: 58px;
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.answers span {
  display: grid;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  color: #202833;
}

.feature-band,
.split-section,
.language-section {
  padding: clamp(64px, 9vw, 116px) clamp(20px, 6vw, 88px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.feature-band .eyebrow,
.split-section .eyebrow {
  color: var(--blue-2);
}

h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
}

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

.feature-grid article,
.settings-card,
.quiz-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 40px rgba(42, 58, 89, 0.08);
}

.feature-grid article {
  padding: 26px;
}

.feature-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 8px;
  background: #e9f5fb;
  color: var(--blue);
  font-size: 28px;
  font-weight: 800;
}

h3 {
  margin: 22px 0 10px;
  font-size: 22px;
}

.feature-grid p,
.split-section p,
.settings-card p,
footer {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 460px);
  gap: clamp(26px, 6vw, 78px);
  align-items: center;
  background: #ffffff;
}

.split-section p {
  max-width: 630px;
  margin: 22px 0 0;
}

.quiz-card {
  padding: clamp(22px, 5vw, 42px);
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.quiz-card strong {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  margin: 28px auto;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px var(--line);
  color: #151515;
  font-size: 74px;
  font-weight: 500;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quiz-options button {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #263246;
  font: inherit;
  font-weight: 700;
}

.quiz-options .right {
  border-color: rgba(12, 157, 74, 0.25);
  background: #ecfaf2;
  color: #0b8d43;
}

.language-section {
  background:
    linear-gradient(90deg, rgba(41, 72, 143, 0.08), transparent 45%),
    #f6f8fb;
}

.settings-card {
  max-width: 820px;
  padding: clamp(24px, 5vw, 44px);
}

.language-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 20px;
}

.language-pills span {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #687386;
  font-size: 14px;
  font-weight: 800;
}

.language-pills .active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 26px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: #fff;
}

footer span:first-child {
  color: var(--ink);
  font-weight: 900;
}

.store-link {
  margin-left: 10px;
  color: var(--blue-2);
  font-weight: 800;
}

.store-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-page {
  background:
    linear-gradient(135deg, rgba(37, 60, 143, 0.08), rgba(43, 212, 207, 0.08)),
    var(--paper);
}

.privacy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 6vw, 88px);
  color: var(--ink);
}

.privacy-header .brand-mark {
  border-color: rgba(21, 33, 58, 0.12);
}

.privacy-home-link {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.policy-shell {
  padding: 20px clamp(20px, 6vw, 88px) 88px;
}

.policy-card {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 60px rgba(42, 58, 89, 0.1);
}

.policy-kicker {
  margin: 0 0 12px;
  color: var(--blue-2);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.policy-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.policy-updated {
  margin: 18px 0 34px;
  color: var(--muted);
  font-weight: 800;
}

.policy-card h2 {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: clamp(26px, 3vw, 36px);
}

.policy-card h3 {
  margin-top: 32px;
  color: var(--ink);
  font-size: 22px;
}

.policy-card h4 {
  margin: 26px 0 10px;
  color: #263246;
  font-size: 18px;
}

.policy-card p,
.policy-card li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.policy-card ul {
  padding-left: 22px;
}

.policy-card li {
  margin: 10px 0;
}

.policy-card a {
  color: var(--blue-2);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 920px) {
  .site-header {
    position: absolute;
  }

  .nav-links {
    display: none;
  }

  .language-switcher button {
    min-width: 30px;
    height: 28px;
    font-size: 11px;
  }

  .hero,
  .split-section,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 96px;
  }

  .phone-stage {
    min-height: 620px;
  }

  .phone {
    right: 3vw;
  }

  .phone-back {
    right: auto;
    left: 0;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-inline: 18px;
  }

  .site-header {
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    max-width: 150px;
    gap: 8px;
    font-size: 13px;
  }

  .language-switcher {
    max-width: 180px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .app-icon {
    width: 78px;
    height: 78px;
    border-radius: 18px;
    font-size: 58px;
  }

  .hero-actions a {
    width: 100%;
  }

  .hero-stats {
    gap: 20px;
  }

  .phone-stage {
    min-height: 552px;
  }

  .phone {
    top: 0;
    right: 50%;
    width: 238px;
    min-width: 238px;
    transform: translateX(54%);
  }

  .phone-back {
    display: none;
  }

  .phone-screen {
    height: 512px;
  }

  .kana-grid {
    gap: 7px 5px;
  }

  .kana-grid span {
    height: 50px;
  }

  .feature-grid article,
  .settings-card,
  .quiz-card,
  .policy-card {
    padding: 22px;
  }

  .privacy-header {
    align-items: flex-start;
    gap: 16px;
  }
}
