@charset "UTF-8";
:root{--orange:#ff9b38;--ink:#57321e;--muted:#8a6448;--paper:#fffdf7;--line:#f1d6bd;--accent:#f06b25;--green:#50764d;--round:24px;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);font-synthesis:none;color-scheme:light}
*{box-sizing:border-box}body{margin:0;background:var(--orange);background-image:radial-gradient(#ffc36c 1.2px,transparent 1.2px);background-size:24px 24px;min-height:100dvh}button,input{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{opacity:.55;cursor:wait}button:focus-visible,input:focus-visible{outline:3px solid #3c7772;outline-offset:4px}button{border:0;background:none}button:active{transform:translateY(1px)}[hidden]{display:none!important}.app{width:min(100%,540px);margin:auto;padding:28px 20px max(22px,env(safe-area-inset-bottom));}.masthead{display:flex;align-items:center;gap:12px;margin-bottom:25px;position:relative}.brand-icon{width:46px;height:46px;flex:none;background:#ffdc7d;border:1.5px solid var(--ink);border-radius:14px;display:grid;place-items:center;font-size:34px;transform:rotate(-7deg);box-shadow:2px 3px 0 #8d4c2630}h1{font-size:25px;letter-spacing:1px;margin:0 0 6px;font-weight:900}.masthead p{margin:0;font-size:11px;font-weight:600;letter-spacing:.7px}.sun{font-size:45px;margin-left:auto;color:#85451f;line-height:1;transform:rotate(-12deg)}.search-panel{margin-bottom:18px}.search-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:15px;font-weight:800}.voice-tag{font-size:10px;border:1px solid #9f572938;border-radius:20px;padding:4px 8px;font-weight:500}.search-box{display:flex;align-items:center;background:var(--paper);padding:6px;border:1.5px solid #79431c;border-radius:17px;box-shadow:0 4px 0 #94512125;gap:2px}.icon-button{width:40px;height:44px;flex:none;display:grid;place-items:center}.mic svg{width:23px;height:25px;fill:#f47b2a;stroke:#a54d20;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.mic svg path{fill:none}input{min-width:0;flex:1;width:100%;border:0;outline:0;background:transparent;font-size:15px;color:var(--ink);height:44px;text-overflow:ellipsis}input::placeholder{color:#a17d5a;opacity:1}input[readonly]{cursor:pointer}.keyboard{font-size:24px;width:31px;color:#8a6a50}#search{padding:12px 13px;background:#633b25;color:#fffaf0;border-radius:11px;font-size:13px;white-space:nowrap;font-weight:700}.examples{display:flex;align-items:center;gap:6px;margin-top:11px;font-size:11px;flex-wrap:wrap}.examples>span{opacity:.75;margin-right:2px}.examples button{background:#ffb459;border:1px solid #d37c32;border-radius:20px;padding:5px 9px}.selection{background:#ffb75e99;border:1px solid #d778303a;border-radius:16px;padding:12px;margin-bottom:16px}.selection-label{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#754629;margin-bottom:9px}#ai-status{font-weight:700}.character-chips{display:flex;gap:7px;flex-wrap:wrap}.character-chip{display:grid;place-items:center;min-width:43px;min-height:47px;padding:4px 10px;border-radius:11px;border:1.5px solid #a8734540;background:#fff1b1;font-size:25px;box-shadow:0 2px 0 #9a562327}.character-chip:nth-child(4n+2){background:#d8efb4}.character-chip:nth-child(4n+3){background:#c4e8ee}.character-chip:nth-child(4n){background:#ffd5d4}.character-chip[aria-pressed=true]{background:#633b25;color:white;border-color:#633b25;box-shadow:0 0 0 2px #fff8df}.alternatives{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:9px;font-size:11px}.alternatives button{font-size:19px;min-width:36px;min-height:36px;border-radius:9px;background:#fff9e8aa;border:1px dashed #ad733e}.message{padding:12px 14px;background:#fff0cf;border-radius:14px;font-size:13px;line-height:1.7;margin-bottom:14px;border:1px solid #bc6932}.lesson-card{position:relative;background:var(--paper);border:1.5px solid #7f482b;border-radius:var(--round);padding:18px 21px 14px;box-shadow:0 6px 0 #ae58212b;overflow:hidden}.lesson-top{display:flex;align-items:center;justify-content:space-between;font-size:11px}.small-label{display:flex;align-items:center;gap:6px;color:var(--muted);letter-spacing:.5px}.small-label i{width:6px;height:6px;border-radius:50%;background:#83a86e}.favorite{background:#f8eedc;padding:7px 10px;border-radius:20px;color:#9b703b;font-size:11px}.favorite[aria-pressed=true]{background:#ffe2a3;color:#7f4b1d}.pronunciation{display:flex;gap:11px;align-items:center;justify-content:center;margin:9px auto 0;min-height:52px;padding:0 18px}.pronunciation #pinyin{font-size:42px;letter-spacing:4px;font-family:"Trebuchet MS","Arial",sans-serif;font-weight:700;line-height:1.3;color:#633b25}.pronunciation svg{width:22px;height:22px;stroke:#ba7c42;stroke-width:1.7;fill:none;stroke-linejoin:round;stroke-linecap:round}.pronunciation.speaking{background:#fff0cf;border-radius:18px}.pronounce-hint{text-align:center;font-size:10px;color:#9b7a5e;margin:2px 0 15px;letter-spacing:1px}.other-readings{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;font-size:10px;margin:-5px 0 11px;color:var(--muted)}.other-readings button{background:#f1f1df;padding:5px 9px;border-radius:8px;color:#50764d;min-height:30px}.grid-wrap{width:100%;max-width:412px;margin:auto;position:relative}.character-grid{position:relative;width:100%;aspect-ratio:1;background:#fff9ed;border:2px solid #cf8a63;border-radius:5px;overflow:hidden;touch-action:none}.grid-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;fill:none;stroke:#e5b998;stroke-dasharray:6 5;stroke-width:1.2}.grid-lines .diagonal{stroke:#edd6bd;stroke-width:1;stroke-dasharray:4 5}#writer{position:absolute;inset:0}#writer svg{display:block;width:100%;height:100%;overflow:visible}#grid-fallback{position:absolute;inset:0;display:grid;place-items:center;font-family:KaiTi,STKaiti,"楷体",serif;font-size:260px;color:#633b25}.grid-corner{position:absolute;right:-8px;bottom:-10px;color:#e9a135;font-size:27px;text-shadow:1px 0 #fffdf7,-1px 0 #fffdf7}.character-meta{display:flex;justify-content:center;gap:0;margin:15px 0 17px;color:#8a694f;font-size:12px}.character-meta span+span:before{content:"";display:inline-block;height:10px;border-left:1px solid #dac2a7;margin:0 12px}.writing-controls{display:flex;gap:8px}.writing-controls button{flex:1;border:1px solid #e8d3b8;border-radius:12px;background:#f7f0e3;padding:13px 4px;font-weight:700;font-size:13px;white-space:nowrap}.primary-control,.writing-controls .primary-control{background:#f07832;color:white;border:1px solid #d66329;box-shadow:0 3px 0 #cc61202b;border-radius:12px;padding:13px 20px;font-weight:700}.writing-controls #practice[aria-pressed=true]{background:#e1eccd;border-color:#8aa16c;color:#44673d}.playback-row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:14px;font-size:10px;color:#987254;min-height:27px}#speed{background:#f7eedc;border-radius:6px;padding:5px 6px;font-size:10px;color:#856040;white-space:nowrap}.writing-tip{background:#f6f4e4;border-radius:10px;padding:11px 12px;color:#66754c;font-size:12px;line-height:1.7;margin:9px 0 0;display:flex;gap:7px}.writing-tip span{font-size:18px;line-height:1.2;flex:none}.words-section{margin-top:27px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}.section-title h2{font-size:17px;margin:0;font-weight:800}.section-title h2>span{margin-right:4px}.section-title>span{font-size:10px;color:#865127}.meaning{font-size:12px;margin:-4px 0 12px;color:#754626;line-height:1.6}.words{display:grid;gap:10px}.word-card{border:1px solid #9d572c50;background:#fff7e8;border-radius:17px;padding:16px 17px;box-shadow:0 3px 0 #a65d2420}.word-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.word-label{display:flex;align-items:baseline;gap:12px}.word-label strong{font-size:22px;letter-spacing:2px}.word-label small{font-family:Arial,sans-serif;font-size:12px;color:#a07450}.word-meaning{font-size:11px;color:#9a7859;margin:6px 0 10px}.word-sentence{border-top:1px dashed #e8cfac;padding-top:10px;margin:0;font-size:14px;line-height:1.85;color:#71513a;display:flex;align-items:start;gap:8px}.word-sentence .sentence-text{flex:1}.word-sentence mark{color:#d95f24;background:#ffdfae80;padding:1px 2px;border-radius:3px}.read-button{background:#f6e6cc;border-radius:50%;height:32px;width:32px;flex:none;display:grid;place-items:center;color:#986540}.read-button svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}.sentence-label{font-size:9px;line-height:22px;white-space:nowrap;border-radius:5px;background:#f1e6cf;padding:0 5px;color:#9b805e}.history-section{margin-top:26px}.history-section h2{font-size:15px}.library-tabs{display:flex;gap:3px;font-size:10px}.library-tabs button{padding:5px 8px;border-radius:8px;min-height:32px}.library-tabs button[aria-pressed=true]{background:#633b25;color:#fff7df}.history{display:flex;gap:9px;flex-wrap:wrap;min-height:46px}.history button{width:44px;height:44px;display:grid;place-items:center;background:#ffdf9e;border:1px solid #af6b32;border-radius:11px;font-size:25px}.history p{font-size:12px;color:#87512b}footer{text-align:center;font-size:10px;color:#895126;padding:23px 0 0;line-height:2;letter-spacing:.5px}footer>span{padding-left:4px}footer button{display:block;margin:4px auto 0;text-decoration:underline;font-size:10px;color:#7b4d2f;min-height:30px}dialog{color:var(--ink);background:var(--paper);border:1.5px solid #8b512c;border-radius:26px;width:min(calc(100% - 36px),420px);padding:28px 24px;box-shadow:0 15px 70px #6d36194d}dialog::backdrop{background:#66351566;backdrop-filter:blur(4px)}.voice-dialog{text-align:center}.voice-dialog h2{font-size:23px;margin:13px 0}.voice-dialog p{font-size:13px;line-height:1.8;color:var(--muted)}.recording-symbol{font-size:45px}.voice-dialog .primary-control{display:block;width:100%;margin-top:20px}.text-button{margin-top:12px;padding:10px;font-size:13px}.privacy-note{font-size:10px!important;line-height:1.8;margin-bottom:0}.sound-bars{display:flex;align-items:center;justify-content:center;gap:7px;height:50px;margin:18px}.sound-bars i{display:block;background:#f78c38;width:7px;height:17px;border-radius:7px;animation:sound .9s ease-in-out infinite alternate}.sound-bars i:nth-child(2n){animation-delay:-.4s;height:38px}.sound-bars i:nth-child(3n){animation-delay:-.8s;height:48px}.help-dialog h2{font-size:21px;margin:0 0 20px}.help-dialog p{font-size:13px;line-height:1.9;margin:12px 0;color:#805b40}.help-dialog button{width:100%;margin-top:12px}@keyframes sound{to{transform:scaleY(.35);opacity:.5}}@media(min-width:760px){.app{padding-top:35px}.masthead{margin-bottom:28px}.lesson-card{padding:20px 27px 18px}.sun{font-size:50px}}@media(max-width:360px){.app{padding:21px 12px 20px}.masthead{gap:9px}h1{font-size:22px}.masthead p{font-size:10px;letter-spacing:0}.sun{font-size:32px}.lesson-card{padding:14px 16px}.search-box{padding:4px}input{font-size:13px}.keyboard{width:24px}#search{padding:12px 9px}.writing-controls{gap:6px}.writing-controls button{font-size:12px}.section-title>span{font-size:9px}.word-label{gap:8px}.word-label strong{font-size:21px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}}
