/* TypeHanzi - design system (see DESIGN.md) */
:root {
  --bg: #f8faf8;
  --bg-hero: #f5faf6;
  --surface: #ffffff;
  --ink: #1f2933;
  --muted: #66736f;
  --faint: #98a5a0;
  --green: #0b8f68;
  --green-dark: #087757;
  --mint: #e8f7ef;
  --mint-2: #dcf4e8;
  --teal: #18a69b;
  --border: #e4ebe7;
  --yellow: #fef3c7;
  --yellow-ink: #a16207;
  --danger: #dc4c4c;
  --shadow: 0 8px 30px rgba(31, 41, 51, .045);
  --radius: 16px;
  --font: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --zh: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
img { max-width: 100%; display: block; }
::selection { background: var(--mint-2); color: var(--ink); }

/* ---------- shared layout ---------- */
.container { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 48px)); margin: 0 auto; }
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--green); font-size: 11px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
h1, h2, h3, h4 { margin: 0 0 16px; line-height: 1.18; letter-spacing: -.03em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.15rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 16px; color: var(--muted); }
.lead { font-size: 1.06rem; color: var(--muted); }
.text-green { color: var(--green); }
.center { text-align: center; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.zh { font-family: var(--zh); }
.small { font-size: 13px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 10px;
  border: 1px solid transparent; background: transparent;
  font-size: 14px; font-weight: 650; line-height: 1;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(11, 143, 104, .18); }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-soft { background: var(--mint); color: var(--green-dark); }
.btn-soft:hover { background: var(--mint-2); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: 15px; }
.link-arrow { color: var(--green); font-weight: 650; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow:hover { gap: 10px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 80; height: 72px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid #edf1ee;
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -.035em; }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav > a, .nav > .nav-item > a { font-size: 14px; font-weight: 550; color: #485651; transition: color .15s; }
.nav > a:hover, .nav > .nav-item > a:hover, .nav a.active { color: var(--green); }
.nav-item { position: relative; }
.nav-item > a::after { content: " ▾"; font-size: 10px; color: var(--faint); }
.dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  width: 268px; padding: 8px; background: #fff; border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 18px 45px rgba(31,41,51,.1);
  opacity: 0; visibility: hidden; transition: .16s ease;
}
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.dropdown a:hover { background: var(--mint); color: var(--green-dark); }
.dropdown a strong { display: block; color: var(--ink); font-size: 13px; font-weight: 650; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions .login { font-size: 14px; font-weight: 550; }
.header-actions .login:hover { color: var(--green); }
.mobile-toggle { display: none; background: none; border: 0; font-size: 22px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: #fff; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { max-width: 300px; font-size: 13px; }
.footer-col h4 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.footer-col a { display: block; padding: 4px 0; font-size: 13px; color: var(--muted); }
.footer-col a:hover { color: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 44px; padding-top: 22px; font-size: 12px; color: var(--faint); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg-hero); padding: 76px 0 96px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 340px; height: 340px; border: 54px solid rgba(183, 232, 204, .5); top: -170px; left: -120px; transform: rotate(18deg); }
.hero::after { width: 400px; height: 400px; border: 62px solid rgba(183, 232, 204, .32); right: -210px; bottom: -270px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: .92fr 1.08fr; gap: 68px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 4.8vw, 4.25rem); line-height: 1.06; margin-bottom: 22px; }
.hero-copy p { max-width: 520px; font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { margin-top: 22px; font-size: 12.5px; color: var(--faint); }
.demo-card {
  background: linear-gradient(135deg, #fff 45%, #e9f8f0 100%);
  border: 1px solid rgba(255,255,255,.9); border-radius: 24px;
  padding: 30px; box-shadow: 0 26px 70px rgba(31, 55, 45, .09);
  min-height: 290px; display: flex; flex-direction: column; justify-content: center;
}
.demo-card .eyebrow { margin-bottom: 16px; }
.demo-input { border: 1px solid #dfe7e2; background: #fff; border-radius: 11px; padding: 12px 14px; font-size: 15px; color: var(--ink); width: 100%; max-width: 300px; }
.demo-hanzi { font-family: var(--zh); font-size: 68px; font-weight: 500; letter-spacing: .06em; text-align: center; margin: 14px 0 2px; line-height: 1.2; }
.demo-meaning { text-align: center; color: var(--green); font-size: 10px; letter-spacing: .18em; font-weight: 700; }

/* ---------- generic content ---------- */
.page-head { padding: 52px 0 34px; }
.page-head h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 12px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--faint); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--green); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stack { display: grid; gap: 18px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.step-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.step-card::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: var(--mint); right: -50px; bottom: -55px; opacity: .6; }
.step-num { font-size: 12px; color: var(--green); font-weight: 700; letter-spacing: .08em; }
.step-title { font-size: 1.4rem; font-weight: 700; margin: 14px 0 6px; }
.step-hanzi { font-family: var(--zh); font-size: 30px; margin: 14px 0 8px; }
.step-pinyin { color: var(--green); font-size: 13px; letter-spacing: .04em; }
.step-card p { font-size: 13.5px; margin: 12px 0 0; }
.feature-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--mint); color: var(--green); display: grid; place-items: center; font-size: 20px; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: 13.5px; margin: 0; }
.quote-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.quote-mark { color: var(--green); font-size: 32px; line-height: 1; font-weight: 700; }
.quote-card blockquote { margin: 10px 0 22px; font-size: 15px; line-height: 1.7; }
.quote-author { font-size: 13px; font-weight: 700; }
.quote-role { font-size: 12px; color: var(--faint); }

/* faq */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 18px 20px; background: none; border: 0; font-weight: 650; font-size: 14px; }
.faq-q span:last-child { color: var(--green); font-size: 18px; }
.faq-a { display: none; padding: 0 20px 18px; font-size: 14px; color: var(--muted); }
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q span:last-child { transform: rotate(45deg); }

/* cta band */
.cta-band { background: linear-gradient(120deg, #e9f7f0, #f3faf5); border: 1px solid #dcefe4; border-radius: 24px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 8px; }

/* ---------- courses ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 26px; }
.pill { border: 1px solid var(--border); background: #fff; color: var(--muted); border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 600; }
.pill:hover, .pill.active { background: var(--green); border-color: var(--green); color: #fff; }
.course-group { margin-bottom: 46px; }
.course-group-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.course-group-head h2 { font-size: 1.5rem; margin: 0; }
.course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.course-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, border-color .18s; }
.course-card:hover { transform: translateY(-3px); border-color: #b8ddcd; }
.course-cover { position: relative; height: 136px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.course-cover .cover-text { font-family: var(--zh); font-size: 34px; font-weight: 700; letter-spacing: .08em; color: rgba(255,255,255,.94); text-shadow: 0 2px 12px rgba(0,0,0,.08); }
.course-cover .cover-sub { position: absolute; bottom: 12px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.9); font-weight: 700; }
.level-badge { position: absolute; top: 10px; right: 10px; background: var(--yellow); color: var(--yellow-ink); border-radius: 6px; padding: 3px 9px; font-size: 10px; font-weight: 750; }
.level-badge.Intermediate { background: #dbeafe; color: #1d4ed8; }
.level-badge.Advanced { background: #ede9fe; color: #6d28d9; }
.course-body { padding: 14px 16px 17px; }
.course-body h3 { font-size: 13.5px; font-weight: 650; margin: 0 0 4px; line-height: 1.4; }
.course-body p { font-size: 12px; color: var(--faint); margin: 0; }
.more-card { border: 1px dashed var(--green); color: var(--green); border-radius: 14px; display: grid; place-items: center; text-align: center; background: rgba(232,247,239,.4); min-height: 200px; font-size: 13px; }
.more-card strong { display: block; font-size: 16px; }
.search-input { width: 100%; max-width: 320px; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.search-input:focus, .field:focus, textarea:focus { outline: 2px solid rgba(11,143,104,.18); border-color: var(--green); }

/* course detail */
.course-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; padding: 20px 0 44px; }
.course-hero h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
.course-cover-large { height: 260px; border-radius: 20px; display: grid; place-items: center; box-shadow: var(--shadow); }
.course-cover-large .cover-text { font-family: var(--zh); font-size: 76px; font-weight: 700; color: #fff; }
.lesson-list { display: grid; gap: 8px; }
.lesson-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.lesson-row .num { color: var(--faint); font-size: 12px; width: 30px; }
.lesson-row .title { flex: 1; font-weight: 600; font-size: 14px; }
.lesson-row .zh { color: var(--muted); font-size: 13px; }
.lesson-row.done { background: var(--mint); border-color: #c9e9d8; }

/* ---------- tools ---------- */
.tool-card { padding: 24px; }
.field-label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.field, .tool-input, textarea.field { width: 100%; border: 1px solid var(--border); background: #fbfcfb; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
textarea.field { min-height: 150px; resize: vertical; line-height: 1.7; }
.segmented { display: inline-flex; gap: 4px; background: #f1f5f2; border-radius: 999px; padding: 4px; }
.segmented button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 650; color: var(--muted); }
.segmented button.active { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(31,41,51,.07); }
.candidate-bar { display: flex; gap: 8px; flex-wrap: wrap; min-height: 44px; margin: 10px 0; }
.candidate { border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 6px 12px; display: flex; align-items: center; gap: 8px; font-family: var(--zh); font-size: 18px; }
.candidate:hover, .candidate:focus { border-color: var(--green); background: var(--mint); }
.candidate small { font-family: var(--font); font-size: 10px; color: var(--faint); }
.punct-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.punct-row button { background: #f4f7f5; border: 1px solid var(--border); border-radius: 8px; min-width: 32px; height: 30px; font-family: var(--zh); font-size: 15px; }
.punct-row button:hover { background: var(--mint); }
.phrase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.phrase-tile { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 8px; text-align: center; }
.phrase-tile:hover { border-color: var(--green); background: var(--mint); }
.phrase-tile .hz { font-family: var(--zh); font-size: 18px; font-weight: 600; display: block; }
.phrase-tile .py { color: var(--green); font-size: 11px; display: block; }
.phrase-tile .en { color: var(--faint); font-size: 10px; display: block; }
.result-box { background: #fbfcfb; border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-top: 18px; font-size: 15px; line-height: 2; }
.result-box .syl { display: inline-flex; flex-direction: column; align-items: center; min-width: 34px; line-height: 1.2; vertical-align: middle; }
.result-box .syl small { color: var(--green); font-size: 11px; }
.result-box .syl.poly { text-decoration: underline dotted var(--teal); cursor: pointer; }
.result-box .unit-inline { display: inline-flex; flex-direction: column; align-items: center; margin: 0 1px; vertical-align: middle; }
.result-box .unit-inline small { color: var(--green); font-size: 10.5px; line-height: 1.2; }
.notice { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; }
.tone-demo { display: inline-flex; gap: 16px; align-items: baseline; font-family: var(--zh); font-size: 32px; margin: 12px 0; }
.tone-demo span { display: grid; place-items: center; gap: 2px; }
.tone-demo small { font-family: var(--font); font-size: 11px; color: var(--green); }

/* pinyin chart */
.chart-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
table.chart { border-collapse: collapse; width: 100%; font-size: 12px; white-space: nowrap; }
table.chart th, table.chart td { border: 1px solid #eaf0ec; padding: 7px 8px; text-align: center; }
table.chart thead th { background: var(--teal); color: #fff; font-weight: 700; position: sticky; top: 0; }
table.chart tbody th { background: var(--teal); color: #fff; font-weight: 700; }
table.chart td:not(:empty) { cursor: pointer; }
table.chart td:not(:empty):hover { background: var(--mint); color: var(--green-dark); }
.syllable-pop { margin-top: 16px; padding: 18px; border-radius: 12px; background: var(--mint); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.syllable-pop .tone { font-family: var(--zh); font-size: 26px; cursor: pointer; }
.toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.toolbar-row select { border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 7px 10px; font-size: 13px; }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); transition: transform .18s; }
.post-card:hover { transform: translateY(-3px); }
.post-cat { color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.post-card h3 { font-size: 1.08rem; margin: 10px 0 8px; }
.post-card p { font-size: 13px; margin: 0 0 14px; }
.post-date { font-size: 11px; color: var(--faint); }
.article { max-width: 780px; margin: 0 auto; }
.article h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
.article-meta { display: flex; gap: 14px; font-size: 12px; color: var(--faint); margin-bottom: 30px; }
.article-body p { font-size: 16px; line-height: 1.9; margin-bottom: 20px; }
.article-body h2 { font-size: 1.5rem; margin-top: 40px; }
.article-body .pull { background: var(--mint); border-left: 3px solid var(--green); padding: 18px 22px; border-radius: 0 12px 12px 0; font-size: 15px; color: var(--ink); }
.article-hero { height: 220px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 34px; }
.article-hero .zh { font-size: 62px; color: #fff; }

/* ---------- auth / progress / info ---------- */
.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-card { padding: 32px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.stat-card .value { font-size: 28px; font-weight: 750; color: var(--green); }
.stat-card .label { font-size: 12px; color: var(--muted); }
.bar-track { height: 8px; background: #eef3ef; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); border-radius: 999px; }
.info-list { display: grid; gap: 10px; margin-top: 20px; }
.info-row { display: flex; justify-content: space-between; gap: 18px; padding: 14px 18px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.podcast-list { display: grid; gap: 12px; }
.podcast-row { display: flex; align-items: center; gap: 18px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.play-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #fff; border: 0; flex: none; font-size: 15px; }
.podcast-row .ep { flex: 1; }
.podcast-row .ep strong { display: block; font-size: 14px; }
.podcast-row .ep small { color: var(--faint); }
.result-chip { display: inline-block; background: var(--mint); color: var(--green-dark); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 650; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--mint); color: var(--green); display: grid; place-items: center; font-size: 13px; font-weight: 700; }

/* ---------- practice app ---------- */
body.practice-mode { background: #fbfcfb; }
body.practice-mode .site-header, body.practice-mode .site-footer { display: none; }
.game-topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--border); }
.game-topbar .left, .game-topbar .right { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 15px; }
.icon-btn:hover { background: var(--mint); color: var(--green); }
.game-crumb { font-size: 13px; color: var(--faint); }
.game-title { font-size: 14px; font-weight: 700; }
.game-count { font-size: 11px; background: #eef3f0; padding: 3px 8px; border-radius: 999px; color: var(--muted); }
.game-stat { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.game-stat b { color: var(--ink); }
.game-main { min-height: calc(100vh - 108px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 44px 20px; text-align: center; position: relative; }
.game-timer { position: absolute; top: 84px; right: 26px; z-index: 5; font-family: ui-monospace, monospace; font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.game-ads { position: absolute; top: 20px; left: 22px; right: 22px; display: flex; justify-content: space-between; pointer-events: none; }
.ad-card { width: 130px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 14px; font-size: 11px; pointer-events: auto; }
.ad-card .zh { font-size: 24px; font-weight: 700; display: block; margin-bottom: 6px; }
.ad-card .btn { margin-top: 8px; font-size: 10px; min-height: 28px; }
.ad-card small { display: block; margin-top: 8px; color: #b0986a; font-size: 8px; }
.prompt-meaning { font-size: 34px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 18px; }
.audio-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--green); color: #fff; border: 0; display: grid; place-items: center; margin: 0 auto 12px; font-size: 20px; box-shadow: 0 6px 18px rgba(11,143,104,.2); }
.audio-btn:hover { background: var(--green-dark); }
.game-hint-text { font-size: 13px; color: var(--faint); max-width: 560px; margin-bottom: 24px; }
.tianzige { width: 74px; height: 74px; border: 2px solid #8ed0b5; border-radius: 2px; position: relative; margin: 0 auto 26px; background: #fff; }
.tianzige::before, .tianzige::after { content: ""; position: absolute; background: repeating-linear-gradient(to bottom, #b9dccd 0 4px, transparent 4px 8px); }
.tianzige::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.tianzige::after { top: 50%; left: 0; right: 0; height: 1px; background: repeating-linear-gradient(to right, #b9dccd 0 4px, transparent 4px 8px); }
.tianzige .hidden-hanzi { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--zh); font-size: 46px; color: var(--ink); }
.game-input { width: min(420px, 90vw); border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 14px 18px; text-align: center; font-size: 17px; margin: 0 auto 8px; }
.game-input:focus { outline: 2px solid rgba(11,143,104,.2); border-color: var(--green); }
.game-input.correct { border-color: var(--green); background: var(--mint); }
.game-input.wrong { border-color: var(--danger); background: #fef2f2; }
.game-candidates { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 10px 0 4px; min-height: 34px; }
.game-candidates button { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 5px 12px; font-family: var(--zh); font-size: 17px; }
.game-candidates button:hover { border-color: var(--green); background: var(--mint); }
.game-feedback { min-height: 22px; font-size: 13px; font-weight: 600; }
.game-feedback.ok { color: var(--green); }
.game-feedback.no { color: var(--danger); }
.game-buttons { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }
.game-shortcuts { min-height: 52px; background: #1e2933; color: #cbd5d1; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; font-size: 11px; }
.game-shortcuts span { display: inline-flex; align-items: center; gap: 6px; }
kbd { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 5px; padding: 2px 6px; font-family: var(--font); font-size: 10px; color: #fff; }
.sep-dot { opacity: .4; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(12px); background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 18px; font-size: 13px; z-index: 200; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* misc */
.spinner { width: 22px; height: 22px; border: 3px solid var(--mint); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .zh { font-size: 40px; color: var(--green); display: block; margin-bottom: 10px; }

/* responsive */
@media (max-width: 1020px) {
  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { gap: 34px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; padding: 14px 24px; flex-direction: column; align-items: stretch; gap: 6px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav .dropdown { position: static; transform: none; opacity: 1; visibility: visible; width: 100%; box-shadow: none; border: 0; }
  .mobile-toggle { display: block; }
  .header-actions .login { display: none; }
  .hero-grid, .course-hero, .grid-3, .grid-2, .steps, .post-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 64px; }
  .hero-copy { order: 1; }
  .demo-card { order: 2; }
  .phrase-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .game-ads { display: none; }
  .section { padding: 56px 0; }
}
@media (max-width: 560px) {
  .container, .narrow { width: calc(100% - 32px); }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 30px 22px; }
  .prompt-meaning { font-size: 26px; }
  .game-topbar .game-crumb, .game-topbar .game-stat span { display: none; }
}
