:root { color-scheme: light; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #153f2c; background: #faf7ef; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 90% 15%, #e7f1e7, transparent 55%), #faf7ef; }
.brand { max-width: 1080px; margin: auto; padding: 24px; display: flex; align-items: center; gap: 12px; font-weight: 750; font-size: 16px; }
.brand small { display: block; margin-top: 5px; font-size: 9px; letter-spacing: .13em; color: #5d6b63; }
main { max-width: 650px; margin: 32px auto 0; padding: 0 20px; }
.card { background: #fffdf8; border: 1px solid #e1e7dc; border-radius: 28px; padding: 40px; box-shadow: 0 20px 65px #153f2c09; }
.eyebrow { color: #985537; font-size: 11px; font-weight: 750; letter-spacing: .16em; margin: 0 0 22px; }
h1 { font-family: Georgia, "Songti SC", serif; font-size: clamp(30px, 5vw, 42px); line-height: 1.15; margin: 0 0 24px; font-weight: 500; white-space: pre-line; }
.hero-art { width: 210px; max-width: 100%; margin: -2px 0 10px auto; }
.hero-art svg { display: block; width: 100%; height: auto; }
.card.card--hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: none; border: 0; border-radius: 0; box-shadow: none; padding: 16px 8px 20px; }
.card--hero .eyebrow, .card--hero h1, .card--hero .primary { grid-column: 1 / -1; }
.card--hero h1 { position: relative; z-index: 1; font-size: clamp(29px, 7.8vw, 46px); line-height: 1.12; letter-spacing: -.035em; margin-bottom: 0; }
.card--hero .hero-art { grid-column: 2; grid-row: 3 / 5; width: 190px; max-width: 115%; justify-self: end; align-self: center; margin: 0 -4px 0 0; transform: rotate(-5deg); }
.card--hero .meta { grid-column: 1; align-self: end; width: max-content; max-width: 100%; margin: 30px 0 8px; padding: 8px 0; border-top: 1px solid #bdcbb7; border-bottom: 1px solid #bdcbb7; font-size: 12px; }
.card--hero .description { grid-column: 1; align-self: start; font-size: 13px; margin: 4px 0 24px; max-width: 170px; }
.card--hero .primary { border-radius: 4px 13px 4px 4px; margin-top: 12px; }
@media (min-width: 760px) {
  main:has(.card--hero) { max-width: 940px; margin-top: 48px; }
  .card.card--hero { grid-template-columns: minmax(0, 1fr) 350px; padding: 12px 30px 20px; }
  .card--hero h1 { font-size: 56px; line-height: 1.08; }
  .card--hero .eyebrow { margin-bottom: 24px; }
  .card--hero .hero-art { grid-row: 3 / 6; width: 350px; max-width: 100%; margin: -48px -12px 0 0; }
  .card--hero .meta { margin: 32px 0 8px 36px; font-size: 13px; }
  .card--hero .description { max-width: none; margin: 8px 0 16px 36px; font-size: 14px; }
  .card--hero .primary { grid-column: 1; width: auto; min-width: 210px; justify-self: start; margin: 0 0 0 36px; }
}
.meta { font-size: 14px; font-weight: 650; }
.description, .coming { color: #5d6b63; font-size: 14px; line-height: 1.6; }
.description { margin: 12px 0 26px; }
button { font: inherit; cursor: pointer; min-height: 48px; touch-action: manipulation; }
.primary { width: 100%; border: 1px solid #153f2c; border-radius: 14px; padding: 15px 20px; color: white; background: #153f2c; font-weight: 650; }
.primary:hover { background: #245b40; }
button:focus-visible { outline: 3px solid #b17835; outline-offset: 4px; }
h1:focus, h2:focus { outline: none; }
.card:not(.card--hero) > .eyebrow::after { content: ""; display: block; width: 34px; margin-top: 10px; border-top: 2px solid #c18a61; }
.modes { display: grid; gap: 12px; }
.mode { display: grid; grid-template-columns: 26px 1fr; text-align: left; gap: 6px 12px; border: 1px solid #e0e6da; background: #f7f7f0; color: #5d6b63; border-radius: 16px; padding: 20px; }
.mode strong { font: 23px Georgia, serif; color: #153f2c; }
.mode > span:not(.number) { grid-column: 2; font-size: 13px; }
.number { grid-row: 1 / 4; font-size: 11px; padding-top: 5px; }
.available { background: #eaf3e8; border-color: #90b29a; }
.available:hover { background: #dfeddd; }
.mode:disabled { cursor: default; }
.badge { justify-self: start; padding: 4px 8px; border: 1px solid #d8dfd3; border-radius: 20px; font-size: 10px !important; margin-top: 5px; }
.mode-action { font-weight: 750; margin-top: 5px; color: #245b40; }
progress { display: block; appearance: none; width: 100%; height: 4px; border: 0; margin-bottom: 28px; background: #e6eadf; border-radius: 4px; }
progress::-webkit-progress-bar { background: #e6eadf; border-radius: 4px; }
progress::-webkit-progress-value { background: #2c7552; border-radius: 4px; }
progress::-moz-progress-bar { background: #2c7552; }
h1.word { text-align: center; font-size: 68px; margin: 15px 0; }
.prompt { text-align: center; font-size: 14px; color: #5d6b63; margin: 0 0 25px; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; min-height: 56px; border: 1px solid #d9e3d6; border-radius: 13px; text-align: left; background: #fffefa; color: #153f2c; }
.letter { display: grid; place-items: center; width: 25px; height: 25px; background: #f0f3ea; border-radius: 7px; font-size: 11px; }
.option:hover:not(:disabled), .option.selected { background: #eaf2e5; border-color: #5f8969; }
.option:disabled { cursor: default; opacity: 1; }
.sentence-title { font-size: clamp(31px, 6vw, 40px); margin-bottom: 10px; }
.pinyin-toggle { display: block; width: max-content; min-height: 34px; margin: -6px auto 8px; padding: 6px 3px; border: 0; border-bottom: 1px solid #b6c3b5; background: transparent; color: #607067; font-size: 12px; }
.pinyin-toggle:hover { color: #245b40; border-color: #5f8969; }
.question-pinyin { margin: -2px 0 15px; text-align: center; color: #68736c; font-size: 14px; line-height: 1.4; }
.sentence-answer { display: flex; flex-wrap: wrap; align-content: center; gap: 9px; min-height: 70px; margin: 4px 0 18px; padding: 11px 14px; border: 1px solid #a9bea9; border-radius: 15px; background: #f5f5eb; }
.sentence-placeholder { align-self: center; color: #758077; font-size: 13px; }
.tile-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 60px; padding: 6px 0 20px; }
.sentence-tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 58px; min-height: 52px; padding: 9px 15px; border: 1px solid #cad6c5; border-radius: 11px 15px 10px 12px; background: #fffdf8; color: #153f2c; box-shadow: 0 3px 0 #d9dfd3; font: 22px Georgia, "Songti SC", serif; }
.tile-pinyin { color: #6c786f; font: 10px/1.15 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.sentence-tile:hover:not(:disabled) { border-color: #5f8969; background: #edf3e8; transform: translateY(-1px); }
.sentence-tile.placed { background: #e5efdf; border-color: #79997c; box-shadow: none; }
.sentence-tile:disabled { cursor: default; opacity: 1; }
.sentence-controls { display: grid; grid-template-columns: minmax(100px, .45fr) 1fr; gap: 10px; }
.secondary { border: 1px solid #aab9aa; border-radius: 13px; padding: 12px 16px; color: #245b40; background: transparent; font-weight: 650; }
.secondary:hover:not(:disabled) { background: #edf3e8; }
.primary:disabled, .secondary:disabled { cursor: default; opacity: .48; }
.fill-sentence { text-align: center; font-size: clamp(31px, 6vw, 40px); margin: 8px 0 15px; }
.gap-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-options .option { justify-content: flex-start; font-size: 20px; }
.picture-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.picture-option { position: relative; display: grid; place-items: center; width: 100%; min-height: 148px; padding: 10px; overflow: hidden; border: 1px solid #d5dfd1; border-radius: 15px; background: #fffefa; color: #153f2c; }
.picture-option img { display: block; width: 100%; max-width: 210px; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.picture-option:hover:not(:disabled), .picture-option.selected { background: #eef4e9; border-color: #678d70; }
.picture-option.correct { border: 2px solid #2c7552; background: #e5f0e2; }
.picture-option.incorrect { border: 2px solid #985537; background: #f8ece4; }
.picture-status { position: absolute; right: 8px; bottom: 8px; padding: 5px 8px; border-radius: 999px; background: #153f2c; color: #fff; font-size: 10px; font-weight: 750; letter-spacing: .03em; }
.picture-option.incorrect .picture-status { background: #985537; }
.feedback:not(:empty) { margin-top: 20px; padding: 18px; background: #f3efe3; border-radius: 15px; }
.feedback h2 { margin: 0 0 8px; font: 25px Georgia, serif; }
.feedback p { font-size: 14px; line-height: 1.5; margin: 8px 0 16px; }
.answer { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.answer span[lang] { font-size: 24px; }
.feedback-actions { display: grid; grid-template-columns: minmax(0, .9fr) minmax(135px, 1.1fr); gap: 10px; margin: 2px 0 15px; }
.feedback-actions .primary { min-width: 0; }
.explore-toggle { width: 100%; min-height: 48px; margin: 0; padding: 8px 4px; border: 0; border-bottom: 1px solid #9aac9b; border-radius: 0; }
.explore-panel { margin: 2px 0 18px; padding: 18px 0; border-top: 1px solid #c8d2c3; border-bottom: 1px solid #c8d2c3; }
.explore-word { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: end; }
.explore-word h3 { grid-row: 1 / 3; margin: 0; font: 46px/1 Georgia, "Songti SC", serif; }
.feedback .explore-pinyin, .feedback .explore-meaning { margin: 0; }
.explore-pinyin { color: #647167; font-size: 13px !important; }
.explore-meaning { font-weight: 700; }
.explore-example, .explore-characters { margin-top: 22px; }
.feedback .explore-label { margin: 0 0 10px; color: #985537; font-size: 10px; font-weight: 750; letter-spacing: .15em; }
.feedback .example-chinese { margin: 0 0 5px; font: 25px/1.3 Georgia, "Songti SC", serif; }
.feedback .example-pinyin { margin: 0 0 5px; color: #66736b; font-size: 13px; }
.feedback .example-english { margin: 0; font-weight: 650; }
.character-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.character-button { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 8px; min-width: 104px; min-height: 62px; padding: 9px 13px; border: 1px solid #bdccba; border-radius: 12px; background: #fffdf8; color: #153f2c; text-align: left; }
.character-button[aria-expanded="true"] { background: #e5efdf; border-color: #78947b; }
.character-hanzi { grid-row: 1 / 3; font: 31px/1 Georgia, "Songti SC", serif; }
.character-pinyin { color: #66736b; font-size: 11px; }
.character-arrow { font-size: 12px; }
.character-detail { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin-top: 14px; padding: 4px 0 4px 14px; border-left: 2px solid #c18a61; }
.detail-hanzi { grid-row: 1 / 4; font: 42px/1.1 Georgia, "Songti SC", serif; }
.character-detail p, .character-detail small { margin: 0; }
.character-detail small { color: #67736b; }
.single-character { display: grid; grid-template-columns: auto 1fr; column-gap: 13px; align-items: center; }
.single-character .character-hanzi { grid-row: 1 / 3; }
.single-character .character-meaning { font-weight: 650; }
.score { font: 66px Georgia, serif; margin: 25px 0 8px; }
.practiced-title { font-size: 14px; font-weight: 650; }
.words { padding: 0; margin: 15px 0 30px; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.words li { font-size: 23px; background: #eaf2e5; border-radius: 10px; padding: 10px 14px; }
.sentence-results { display: grid; gap: 7px; }
.sentence-results li { font-size: 18px; padding: 9px 12px; }
.coming { text-align: center; margin: 20px 0 0; font-size: 12px; }
footer { padding: 26px 20px; text-align: center; color: #647366; font-size: 11px; }
@media (max-width: 520px) { .brand { padding: 20px; } main { margin-top: 12px; padding: 0 16px; } .card { padding: 26px 22px; border-radius: 22px; } .eyebrow { margin-bottom: 18px; } h1.word { font-size: 60px; } .card--hero { border-radius: 22px 30px 22px 22px; padding-top: 22px; padding-bottom: 22px; } .card--hero .eyebrow { margin-bottom: 14px; } .card--hero .description { margin: 8px 0 20px; } .hero-art { width: 166px; margin-top: -4px; margin-bottom: 0; } .sentence-answer { min-height: 64px; padding: 9px 11px; } .sentence-tile { min-width: 54px; min-height: 50px; padding: 8px 13px; font-size: 21px; } .sentence-controls { grid-template-columns: 92px 1fr; } .gap-options { gap: 9px; } .picture-options { gap: 9px; } .picture-option { min-height: 118px; padding: 7px; } .picture-option img { max-width: 150px; } .explore-panel { padding: 16px 0; } .explore-word h3 { font-size: 41px; } .character-button { flex: 1; min-width: 96px; } }
