:root {
  color-scheme: light;
  --background: #f5f6f7;
  --surface: #ffffff;
  --text: #202326;
  --muted: #72777d;
  --line: #e4e6e8;
  --accent: #3f6251;
  --quote: #f5f8f6;
  --button: #f1f3f2;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #171a18;
  --surface: #202421;
  --text: #e8ebe9;
  --muted: #a2a9a5;
  --line: #383e3a;
  --accent: #9cc7ae;
  --quote: #282e2a;
  --button: #303632;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: "Noto Serif SC", "Songti SC", "Microsoft YaHei", serif;
  line-height: 1.85;
  transition: color .2s ease, background-color .2s ease;
}

main {
  width: min(760px, calc(100% - 40px));
  margin: 72px auto;
  padding: 52px 58px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(20, 28, 23, .05);
}

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 600;
  letter-spacing: .16em;
  line-height: 1.25;
}

.pronunciation {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  letter-spacing: .16em;
}

#theme-toggle {
  flex: none;
  display: grid;
  width: 38px;
  height: 38px;
  margin-top: 3px;
  padding: 0;
  place-items: center;
  color: var(--text);
  background: var(--button);
  border: 1px solid var(--line);
  border-radius: 50%;
  font: inherit;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

#theme-toggle img {
  width: 18px;
  height: 18px;
  opacity: .8;
}

:root[data-theme="dark"] #theme-toggle img {
  filter: invert(1);
}

#theme-toggle:hover {
  transform: translateY(-1px);
}

section {
  padding-top: 30px;
}

h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .12em;
}

p {
  margin: 8px 0;
}

blockquote {
  margin: 18px 0;
  padding: 14px 20px;
  background: var(--quote);
  border-left: 3px solid var(--accent);
  font-size: 1.08rem;
}

.example {
  margin-top: 16px;
  color: var(--muted);
}

.example span {
  margin-right: 10px;
  color: var(--accent);
  font-size: .85rem;
}

@media (max-width: 600px) {
  main {
    margin: 20px auto;
    padding: 34px 26px;
  }

  h1 {
    letter-spacing: .1em;
  }
}
