* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fefdfd;
  color: #111418;
}

.page {
  width: min(100% - 28px, 620px);
  margin: 0 auto;
  padding: 36px 0 28px;
}

header {
  display: flex;
  justify-content: center;
}

.logo {
  width: min(330px, 84vw);
  height: auto;
  display: block;
}

main {
  text-align: center;
  padding: 42px 0 86px;
}

h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.sub {
  margin: 22px auto 0;
  max-width: 560px;
  color: #4b5563;
  font-size: 21px;
  line-height: 1.45;
}

.demo {
  margin: 44px auto 0;
  width: min(100%, 500px);
  padding: 18px 20px 18px;
  border: 0;
  border-radius: 16px;
  background: #11161f;
  box-shadow: none;
  text-align: left;
  color: #f8fafc;
  overflow: hidden;
}

.line {
  display: grid;
  grid-template-columns: 36px 136px 92px 28px;
  column-gap: 10px;
  align-items: start;
  justify-content: start;
}

.word {
  text-align: center;
  min-width: 0;
  white-space: nowrap;
}

.hanzi {
  font-size: 29px;
  font-weight: 500;
  line-height: 1.15;
  color: #f8fafc;
  letter-spacing: 0;
}

.pinyin {
  margin-top: 9px;
  white-space: nowrap;
  color: #b7dcff;
  font-size: 17px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 500;
  letter-spacing: .02em;
}

.gloss {
  margin-top: 8px;
  white-space: nowrap;
  color: #c9b7ff;
  font-size: 17px;
  font-weight: 500;
  text-align: center;
  line-height: 1.15;
}

.translation {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #374151;
  color: #fff08a;
  font-size: 21px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.25;
  white-space: nowrap;
}

.cta {
  margin: 58px 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 32px;
  border-radius: 16px;
  background: #c83228;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

footer {
  color: #b8b8b8;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 380px) {
  .page { width: min(100% - 20px, 430px); }
  .logo { width: min(300px, 82vw); }
  h1 { font-size: 34px; }
  .sub { font-size: 19px; }
  .demo { padding: 16px 14px 17px; }
  .line {
    grid-template-columns: 32px 118px 82px 26px;
    column-gap: 8px;
  }
  .hanzi { font-size: 27px; }
  .pinyin { font-size: 16px; }
  .gloss { font-size: 16px; }
  .translation { font-size: 20px; }
}
