.hanzi-brand { font-size: 27px; letter-spacing: 0; }
.hanzi-intro { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 22px; padding: 0 0 15px; color: var(--muted); font-size: 11px; }
.hanzi-intro p { margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.hanzi-intro span { text-align: right; }
.hanzi-controls { display: flex; flex-wrap: wrap; gap: 9px; padding: 14px 22px 0; border-top: 1px solid var(--line); }
.lesson-picker { position: relative; width: 100%; }
.lesson-picker::after { content: "⌄"; position: absolute; right: 14px; top: 7px; color: var(--coral); font-size: 22px; pointer-events: none; }
.lesson-picker select { width: 100%; height: 44px; padding: 0 36px 0 13px; appearance: none; border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; color: var(--ink); font-size: 14px; font-weight: 700; }
.hanzi-search { flex: 1; }
.hanzi-section-heading h2 { max-width: 265px; font-size: 19px; text-wrap: balance; }
.hanzi-card { padding-bottom: 18px; }
.hanzi-card::before { background: repeating-linear-gradient(90deg, var(--coral) 0 64px, var(--rose) 64px 96px, oklch(84% .058 70) 96px 128px); }
.review-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border-radius: 999px; background: oklch(91% .045 230); color: oklch(42% .105 230); font-size: 11px; font-weight: 800; }
.hanzi-pronunciation { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; width: min(100%, 286px); margin: 11px auto 10px; }
.pinyin-grid { position: relative; grid-column: 2; width: 100%; height: 80px; background: linear-gradient(to bottom, transparent 12px, #dfbbb6 12px 13px, transparent 13px 32px, #dfbbb6 32px 33px, transparent 33px 52px, #dfbbb6 52px 53px, transparent 53px 72px, #dfbbb6 72px 73px, transparent 73px); }
.hanzi-pinyin { position: absolute; inset: 19px 0 auto; margin: 0; color: var(--coral); font-family: "Chalkboard SE", "Comic Sans MS", ui-rounded, sans-serif; font-size: 36px; font-weight: 700; line-height: 1; text-align: center; white-space: nowrap; letter-spacing: .015em; }
.hanzi-speak { display: grid; grid-column: 3; place-items: center; justify-self: end; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--coral-soft); color: var(--coral); transition: transform .16s ease, background-color .16s ease; }
.hanzi-speak svg { width: 21px; height: 21px; }
.hanzi-speak:active { transform: scale(.94); }
.hanzi-speak[data-playing="true"] { background: var(--coral); color: white; }
.hanzi-speak:disabled { cursor: not-allowed; opacity: .45; }
.speech-feedback { margin: 0 0 8px; text-align: center; }
.mi-grid { position: relative; width: 220px; height: 220px; margin: 0 auto; overflow: hidden; border: 2px solid oklch(75% .082 25); background: oklch(98% .015 62); }
.mi-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mi-lines path { fill: none; stroke: oklch(84% .058 25); stroke-width: .55; stroke-dasharray: 2 2; }
.stroke-target { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; font-family: "Songti SC", "Noto Serif SC", serif; font-size: 145px; line-height: 1; }
.stroke-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; }
.stroke-toolbar > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stroke-actions { display: flex; align-items: center; gap: 6px; }
.stroke-button { min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); background: var(--coral); color: white; font-size: 12px; font-weight: 800; transition: transform .16s ease, opacity .16s ease; }
.stroke-button-fast { padding-inline: 12px; background: var(--coral-soft); color: var(--coral); }
.stroke-button:active { transform: scale(.96); }
.stroke-button:disabled { cursor: not-allowed; opacity: .45; }
.stroke-status { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.stroke-sequence { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.stroke-sequence-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.stroke-sequence-heading strong { color: var(--ink); font-size: 13px; }
.stroke-sequence-heading span { color: var(--muted); font-size: 11px; }
.stroke-steps { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.stroke-step { flex: 0 0 67px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 5px 4px; border-radius: var(--radius-sm); background: oklch(98% .015 62); scroll-snap-align: start; }
.stroke-step svg { display: block; width: 57px; height: 57px; }
.stroke-step span { color: var(--muted); font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stroke-future { fill: #e4d9d0; }
.stroke-done { fill: #352a27; }
.stroke-current { fill: #c45b60; }
.hanzi-detail { margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line); }
.hanzi-detail h3, .hanzi-example h3 { margin: 0; font-size: 13px; font-weight: 800; }
.hanzi-words { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.hanzi-words span { display: inline-flex; align-items: center; min-height: 37px; padding: 0 12px; border-radius: 9px; background: oklch(93% .035 230); color: oklch(38% .06 230); font-size: 16px; font-weight: 700; }
.hanzi-example { margin-top: 18px; }
.hanzi-sentence { margin: 14px 0 0; font-size: 18px; font-weight: 700; line-height: 1.7; text-wrap: pretty; }
.hanzi-sentence mark { color: var(--coral); background: transparent; }
.hanzi-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.hanzi-list button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 58px; padding: 4px 0; border: 0; border-radius: var(--radius-sm); background: white; color: var(--ink); font-size: 23px; font-weight: 700; transition: transform .16s ease, background-color .16s ease; }
.hanzi-list button[aria-current="true"] { color: var(--coral); background: var(--coral-soft); }
.hanzi-list button[data-review="true"] { color: var(--blue); }
.hanzi-list button small { color: var(--muted); font-size: 9px; font-weight: 600; }
.hanzi-list button:active { transform: scale(.96); }

@media (max-width: 359px) {
  .hanzi-intro { flex-direction: column; align-items: flex-start; gap: 2px; margin-inline: 16px; }
  .hanzi-intro span { text-align: left; }
  .hanzi-controls { padding-inline: 16px; }
  .hanzi-list { gap: 5px; }
  .hanzi-list button { min-height: 52px; font-size: 20px; }
  .stroke-button { padding-inline: 10px; }
  .stroke-button-fast { padding-inline: 9px; }
}

@media (hover: hover) {
  .hanzi-list button:not([aria-current="true"]):hover { background: var(--coral-soft); }
  .stroke-button:hover { opacity: .88; }
  .hanzi-speak:hover { background: oklch(91% .055 21); }
}
