@media screen{
 .hero{position:relative;isolation:isolate}
 .hero::before{content:'';position:absolute;z-index:-1;animation:hero-drift 4.8s ease-out both;transform-origin:75% 50%}
 .hero[data-view="worksheet"]::before{animation-name:worksheet-drift}
 .hero[data-view="dictation"]::before{animation-name:dictation-drift}
 .hero h1 span{font-family:Georgia,'Palatino Linotype','Times New Roman',serif;font-style:italic;font-weight:500;letter-spacing:-.035em}
 .hero-motion{position:absolute;right:0;bottom:0;width:53%;height:100%;pointer-events:none;z-index:-1;opacity:.7}
 .hero-motion path{fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-dasharray:650;stroke-dashoffset:650;animation:hero-line 4.8s ease-out forwards}
 .hero-motion .motion-grid{stroke:#205c4860;stroke-width:1.5}
 .hero-motion circle{fill:#ffffffa0;animation:hero-light 4.8s ease-out both}
 .hero-motion .worksheet-art{display:none}
 .hero[data-view="worksheet"] .hero-motion .landscape-art{display:none}
 .hero[data-view="worksheet"] .hero-motion .worksheet-art{display:block}
 .about-page .content{padding:36px 40px;margin-bottom:64px}
 .about-page .section{padding:30px 0}
 .about-page .section:first-child{padding-top:0}
 .about-page .section:last-child{padding-bottom:0}
 .about-page .section h2{font-size:24px;line-height:1.35;margin:0 0 18px;padding-left:14px;border-left:3px solid #205c48;letter-spacing:-.025em}
 .about-page .grid{margin-top:22px;gap:16px}
 .about-page .feature{display:block;padding:24px;text-decoration:none;color:inherit;position:relative}
 .about-page a.feature h3{padding-right:20px}
 .about-page a.feature::after{content:'↗';position:absolute;right:20px;top:24px;color:#205c48;font-size:18px}
 .about-page a.feature:hover{background:#edf4ee;border-color:#9bb7a6}
 .about-page .feature h3{font-size:19px;line-height:1.4;margin:0 0 12px;letter-spacing:-.02em}
 .about-page .feature p{font-size:14px;line-height:1.7}
 .about-page .section:last-child>p{text-align:justify;text-align-last:left;hyphens:auto}
 #sentenceMode #frases>.pane-title{border:0;padding:0;margin-bottom:10px;text-transform:none;letter-spacing:0;font:650 13px/1.55 system-ui,'Segoe UI',sans-serif;color:#304f40!important}
 #sentenceInput{font-family:'Noto Sans SC','Microsoft YaHei','SimSun',sans-serif;border-radius:11px;min-height:54px;font-size:17px;padding:13px 16px;box-shadow:0 1px 2px #1b3a2904}
 #sentenceInput:focus{box-shadow:0 0 0 4px #205c4810}
 #sentenceMode .sentence-help{font-size:13px;line-height:1.65;color:#52655c;margin-top:10px}
 .worksheet-preview-controls[hidden],#worksheetPreview[hidden]{display:none!important}
 .stroke-error-message{display:block;color:#52655c;font:12px/1.45 system-ui,sans-serif;text-align:center;max-width:170px;margin:6px auto 0;overflow-wrap:anywhere}
 .stroke-unavailable{display:grid!important;place-items:center;font-size:42px!important;color:#52655c;background:#f1f5f2;border-radius:10px}
 .stroke-character:has(.stroke-unavailable) .worksheet-detail-replay,.sentence-stroke-char:has(.stroke-unavailable) .sentence-stroke-replay{display:none}
 @keyframes hero-drift{from{transform:scale(1.04) translateX(6px)}to{transform:scale(1) translateX(0)}}
 @keyframes worksheet-drift{from{transform:scale(1.04) translateY(6px)}to{transform:scale(1) translateY(0)}}
 @keyframes dictation-drift{from{transform:scale(1.04) translateX(6px)}to{transform:scale(1) translateX(0)}}
 @keyframes hero-line{to{stroke-dashoffset:0}}
 @keyframes hero-light{from{opacity:0;transform:translateY(16px)}to{opacity:.8;transform:translateY(0)}}
 @media(max-width:640px){.about-page .content{padding:26px 22px}.about-page .section h2{font-size:22px}.about-page .feature{padding:20px}.hero-motion{width:65%;opacity:.4}#sentenceInput{min-height:50px;font-size:16px}}
 @media(prefers-reduced-motion:reduce){.hero::before,.hero-motion path,.hero-motion circle{animation:none!important;transform:none}.hero-motion path{stroke-dashoffset:0}}
}
@media print{.hero-motion{display:none!important}}

@media screen {
 .dictation-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
 .dictation-choice{grid-template-columns:minmax(0,1fr);gap:12px;align-items:start;padding-right:16px}
 .dictation-choice-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
 .dictation-word-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
 .dictation-choice .dictation-word-heading strong{font-size:29px;line-height:1.3}
 .dictation-word-audio{display:inline-grid;place-items:center;width:36px;height:36px;padding:0;flex:none;font-size:17px}
 .dictation-choice-copy .dictation-choice-meaning{white-space:normal;overflow-wrap:anywhere;max-width:100%}
 .dictation-choice-strokes{grid-column:1;grid-row:auto;justify-content:center;align-self:start;margin:0;max-width:100%}
 .dictation-choice .dictation-remove{top:4px;right:4px;display:grid;place-items:center;width:23px;height:23px;padding:0;border:1px solid #e4b4b4;background:#fff;font-size:19px;z-index:1}
 .dictation-choice-stroke-wrap:first-child .dictation-choice-stroke-replay{right:32px}
 .dictation-answer-card .dictation-word-heading{margin-bottom:12px}
 .dictation-answer-card .dictation-word-heading h4{margin:0}
 .hero[data-view="dictation"] .eyebrow::before{display:none}
 .hero[data-view="dictation"] .hero-motion{display:none}
 .hero[data-view="dictation"]::before{animation:dictation-image-reveal 1.8s ease-out both}
 @keyframes dictation-image-reveal{from{opacity:0;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}
 @media(max-width:600px){.dictation-choices{grid-template-columns:minmax(0,1fr)}.dictation-choice-strokes{margin-top:8px}.dictation-choice .dictation-word-heading strong{font-size:27px}}
 @media(prefers-reduced-motion:reduce){.hero[data-view="dictation"]::before{animation:none;opacity:1}}
}
@media screen {
 .hero::before,.hero[data-view="worksheet"]::before,.hero[data-view="dictation"]::before{animation:hero-image-reveal 1.8s ease-out both}
 @keyframes hero-image-reveal{from{opacity:0;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}
 .hero-motion{display:none}
 #worksheetPreview{display:none!important}
 #worksheetPanel .worksheet-character-details{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;padding:24px;align-items:center}
 #worksheetPanel .worksheet-detail-reading{width:auto;min-width:0;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
 #worksheetPanel .worksheet-detail-reading strong{font-size:29px;line-height:1.4}
 .worksheet-stroke-pane{min-width:0;display:flex;flex-direction:column;align-items:center;gap:14px}
 .worksheet-stroke-heading{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;font-weight:600;color:#52655c}
 #worksheetPanel .worksheet-detail-remove{position:static;flex:none;font:500 13px/1.4 system-ui,sans-serif}
 #worksheetPanel #worksheetWriterTarget{min-height:0!important;height:auto!important;width:100%;padding:0!important;margin:0;display:flex;justify-content:center;align-items:center!important;gap:16px!important;flex-wrap:wrap;overflow:visible}
 #worksheetPanel #worksheetWriterTarget .stroke-character{flex:0 0 auto!important;min-height:0!important;padding:12px;border:1px solid #dce5df;border-radius:11px;background:white}
 #worksheetPanel #worksheetWriterTarget .stroke-label{display:none}
 .worksheet-word-list{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
 .worksheet-word-list[hidden]{display:none}
 .worksheet-word-chip{display:inline-flex;align-items:center;border:1px solid #dce5df;border-radius:10px;overflow:hidden;background:#f8faf8}
 .worksheet-word-chip button{border:0;background:transparent;color:#205c48;padding:9px 12px;font-size:18px;cursor:pointer}
 .worksheet-word-chip button:last-child{color:#a44848;font-size:20px}
 #hanziInput,#sentenceInput,#dictationInput,#worksheetCharacterInput,#search{font-family:system-ui,'Segoe UI','Microsoft YaHei','PingFang SC',sans-serif!important;font-size:17px!important;font-weight:400!important;line-height:1.5!important;letter-spacing:0!important;min-height:54px;padding:13px 48px 13px 16px!important;border-radius:11px}
 #hanziInput::placeholder,#sentenceInput::placeholder,#dictationInput::placeholder,#worksheetCharacterInput::placeholder{font-family:inherit;font-size:inherit;font-weight:400;color:#65776e;opacity:1}
 #characterMode>.fieldlabel,#worksheetPanel .worksheet-character-search>.fieldlabel,#dictationSetup>.fieldlabel,label[for="dictationInput"],#sentenceMode #frases>.pane-title{font:650 13px/1.55 system-ui,'Segoe UI',sans-serif!important;color:#304f40!important;letter-spacing:0;text-transform:none}
 .handwriting-canvas{touch-action:none;user-select:none;background-image:linear-gradient(90deg,transparent 49.7%,#dce5df 49.7%,#dce5df 50.3%,transparent 50.3%),linear-gradient(0deg,transparent 49.7%,#dce5df 49.7%,#dce5df 50.3%,transparent 50.3%)}
 .handwriting-results{display:flex;flex-wrap:wrap;gap:8px}
 @media(max-width:520px){#worksheetPanel .worksheet-character-details{grid-template-columns:1fr;gap:20px;padding:20px}.worksheet-stroke-pane{border-top:1px solid #dce5df;padding-top:16px}}
 @media(prefers-reduced-motion:reduce){.hero::before,.hero[data-view="worksheet"]::before,.hero[data-view="dictation"]::before{animation:none;opacity:1;transform:none}}
}
@media screen {
 #handwritingPanel{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,240px);grid-template-rows:auto 280px auto 64px;gap:12px 20px;align-items:start;overflow-anchor:none}
 #handwritingPanel[hidden]{display:none}
 #handwritingPanel .handwriting-head{grid-column:1/-1;grid-row:1;min-height:42px}
 #handwritingPanel .handwriting-canvas{grid-column:1;grid-row:2;width:280px;height:280px;max-width:100%;margin:0 auto;flex:none;align-self:start}
 #handwritingPanel .handwriting-actions{grid-column:1;grid-row:3;margin:0}
 #handwritingPanel #handwritingStatus{grid-column:1;grid-row:4;height:64px;margin:0;overflow:auto;font-size:13px;line-height:1.5}
 #handwritingPanel #handwritingResults{grid-column:2;grid-row:2/5;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:48px;align-content:start;height:400px;min-height:400px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;gap:8px;margin:0;padding:4px}
 #handwritingPanel .handwriting-candidate{min-width:0;height:48px;padding:6px;font-size:25px}
 body>#handwritingPanel{width:min(94vw,760px);height:480px;max-height:94vh;top:3vh;transform:translateX(-50%);display:grid;overflow-y:auto}
 @media(max-width:600px){
  #handwritingPanel{display:flex;flex-direction:column;height:650px;gap:10px;overflow:hidden}
  #handwritingPanel .handwriting-head{flex:none;width:100%}
  #handwritingPanel .handwriting-canvas{width:250px;height:250px;flex:none;max-width:100%;margin:0 auto}
  #handwritingPanel .handwriting-actions{flex:none;width:100%}
  #handwritingPanel #handwritingStatus{flex:none;height:60px;width:100%}
  #handwritingPanel #handwritingResults{flex:1;width:100%;height:auto;min-height:0;grid-template-columns:repeat(5,minmax(0,1fr))}
  body>#handwritingPanel{display:flex;height:94vh;width:94vw;max-height:none}
  body>#handwritingPanel .handwriting-canvas{width:min(250px,31vh);height:min(250px,31vh)}
 }
}

@media screen{.hero .eyebrow::before{content:none!important;display:none!important}.hero.hero-image-reset::before{animation:none!important}}
