:root {
  --bg: #f3f6fb;
  --bg-grid: rgba(58, 91, 138, 0.08);
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --border: #d8e2ef;
  --text: #162033;
  --muted: #56657d;
  --accent: #2457a6;
  --accent-soft: #e8f0ff;
  --accent-strong: #173d79;
  --shadow: 0 18px 40px rgba(25, 56, 103, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(180deg, #f7faff 0%, #eef3fa 100%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
  font-family: "Helvetica Neue", Arial, "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
}

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

a:hover {
  text-decoration: underline;
}

code {
  padding: 0.16rem 0.4rem;
  border-radius: 6px;
  background: #edf3fb;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero,
.section {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 28px;
  padding: 28px 30px 22px;
  align-items: start;
}

.hero-kicker,
.section-kicker,
.scene-id {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-main h1,
.section-heading h2,
.scene-card h3,
.overview-card h3,
.audio-card h4 {
  margin: 0;
}

.hero-main h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 12ch;
}

.hero-text,
.scene-goal,
.audio-card p {
  color: var(--muted);
  line-height: 1.68;
}

.hero-text {
  max-width: 62ch;
  margin: 14px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #1d4a91, #2a66c4);
  color: #fff;
}

.hero-side {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: end;
}

.lang-switch {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-soft);
}

.lang-toggle {
  min-width: 88px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.lang-toggle.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 4px 14px rgba(28, 67, 127, 0.12);
}

.logo {
  width: min(100%, 230px);
}

.stat-card,
.audio-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
}

.hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 2px;
}

.stat-card {
  padding: 16px;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section {
  padding: 26px;
}

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

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.scene-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.scene-card + .scene-card {
  margin-top: 16px;
}

.scene-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.scene-text {
  margin: 8px 0 0;
}

.scene-goal {
  max-width: 420px;
  margin: 0;
}

.audio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.audio-grid-controlled {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.spontaneous-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.audio-card {
  padding: 16px;
}

.audio-card.spontaneous {
  background: linear-gradient(180deg, #eef5ff 0%, #e5efff 100%);
}

audio {
  width: 100%;
  margin-top: 12px;
}

.lang {
  display: none;
}

.lang.active {
  display: block;
}

@media (max-width: 1040px) {
  .hero,
  .audio-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .audio-grid-controlled,
  .spontaneous-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 12px;
  }

  .hero,
  .audio-grid {
    grid-template-columns: 1fr;
  }

  .audio-grid-controlled,
  .spontaneous-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .section {
    padding: 18px;
  }

  .hero-side {
    justify-items: start;
  }

  .logo {
    width: min(100%, 210px);
  }

  .scene-card {
    padding: 16px;
  }

  .scene-header {
    flex-direction: column;
    gap: 10px;
  }
}
