@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Serif+SC:wght@400;500;600;700&display=swap');
:root{--ink:#333e33;--green:#52654c;--cream:#f9f7f0;--gold:#b59749}*{box-sizing:border-box}body{margin:0;background:#f7f5ee;color:var(--ink);font-family:'DM Sans',system-ui,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #b59749;outline-offset:4px}header{height:109px;display:flex;align-items:center;justify-content:space-between;margin:0 5%;border-bottom:1px solid #deded2}.brand{text-decoration:none;color:var(--ink);font-family:Georgia,serif;font-size:27px;font-weight:bold}.brand i{font-weight:normal;font-size:21px}.brand span{display:block;font:10px 'DM Sans',sans-serif;letter-spacing:3px;margin-top:10px}.edition{font-size:10px;letter-spacing:2px;color:#838676}.edition b{margin-left:22px;font-family:Georgia;font-size:16px;font-weight:400}header button{border:1px solid #cccfc1;border-radius:30px;padding:11px 19px;background:transparent;font-size:12px}.heading{text-align:center;padding-top:35px;position:relative;z-index:1;pointer-events:none}.eyebrow{font-size:9px;letter-spacing:3px;color:#8e987e}h1{font-family:'Noto Serif SC',serif;font-size:34px;letter-spacing:5px;font-weight:500;margin:15px 0 10px}.heading p{font-family:Georgia,serif;color:#858b7d;font-size:15px;font-style:italic;margin:0}#stage{height:560px;position:relative;margin-top:-5px}canvas{width:100%;height:100%;display:block;touch-action:none}.open{position:absolute;bottom:42px;left:50%;transform:translateX(-50%);border:0;background:#4a5d44;color:white;padding:16px 26px;border-radius:30px;font-size:13px;box-shadow:0 6px 20px #253a2622}.open span{margin-left:24px}#loading{position:absolute;top:43%;width:100%;text-align:center;color:#6a765f;background:#f7f5eedb;padding:20px}.bottom{margin:0 5%;border-top:1px solid #deded2;padding:22px 0;display:flex;align-items:center;justify-content:space-between;gap:10px}#hint,.footnote{font-size:10px;letter-spacing:1px;color:#89907e}.footnote{font-size:8px;letter-spacing:1.4px}nav{display:flex;align-items:center;gap:12px}nav button{border:0;background:transparent;font-size:12px;padding:8px}nav button:disabled{opacity:.3;cursor:default}#pageNumber{font-size:10px;letter-spacing:1px;min-width:95px;text-align:center}.divider{width:1px;height:20px;background:#ddd}.paper{position:absolute;top:84px;width:235px;max-height:380px;overflow:auto;padding:20px 23px;background:linear-gradient(95deg,#f9f6eb,#fffdf5);box-shadow:0 4px 16px #58492c12;border:1px solid #e2dccc;transform:rotate(-1deg);border-radius:2px;scrollbar-width:thin}.left{left:4%}.right{right:4%;transform:rotate(1deg)}.paper .kicker{font-size:8px;letter-spacing:2px;color:#9b987f}.paper h3{font-family:'Noto Serif SC',serif;font-size:20px;font-weight:500;margin:13px 0 5px}.paper .english{font-family:Georgia;font-style:italic;font-size:12px;color:#8c8e7d}.paper p{font-size:11px;line-height:1.8}.paper h4{font-size:10px;letter-spacing:1px;border-top:1px solid #ddd8c8;padding-top:17px;margin-top:20px}.words{display:flex;gap:6px;flex-wrap:wrap}.words button{border:1px solid #d9dbc9;background:#f0f2e8;padding:6px 9px;border-radius:3px;font-size:11px}.line{width:100%;display:block;text-align:left;border:0;border-bottom:1px solid #e4dfd0;background:none;padding:10px 0;font-size:12px;line-height:1.7}.line small{display:block;color:#919483;font-size:10px}.line.active{color:#647c4c}.speaker{font-size:9px;letter-spacing:1px;color:#9b8b64;display:block}.practice,.play{background:#53674a;border:0;border-radius:4px;padding:9px 12px;color:white;font-size:11px;margin-top:15px}.play{background:#e7eada;color:#52654c;margin-right:7px}#sceneLabel{position:absolute;top:15px;left:0;width:100%;text-align:center;pointer-events:none}#sceneLabel span{font-size:9px;letter-spacing:3px;color:#8b947c}#sceneLabel h2{font-family:'Noto Serif SC',serif;font-size:21px;font-weight:500;margin:7px}#sceneLabel p{font-size:10px;color:#8b947c}#bubble{position:absolute;bottom:55px;left:50%;transform:translateX(-50%);background:#fffdf3ee;border:1px solid #d3d6c4;border-radius:12px;padding:12px 22px;max-width:350px;text-align:center;font-size:14px;pointer-events:none;box-shadow:0 4px 18px #44543316}#bubble small{display:block;font-size:11px;color:#7e8875;margin-top:5px}dialog{border:1px solid #dedbcb;background:#fffdf6;color:#3f4b38;border-radius:12px;padding:38px;max-width:490px;width:90%;box-shadow:0 20px 100px #28361d33}dialog::backdrop{background:#24332055;backdrop-filter:blur(4px)}#dismiss{position:absolute;right:14px;top:9px;background:none;border:0;font-size:25px}dialog h2{font-family:'Noto Serif SC',serif;font-size:25px}dialog p{font-size:14px;line-height:1.8}.choice{display:block;width:100%;border:1px solid #d4d9c6;border-radius:5px;background:#f3f5ec;text-align:left;padding:14px;margin:10px 0}.choice:hover{background:#e5ebd8}.feedback{color:#667e4d;min-height:28px}.toc b{display:block;font-size:17px}.toc small{color:#89947c}body.opened .heading{padding-top:20px}body.opened h1{font-size:23px;margin:10px}body.opened .heading p{display:none}body.opened #stage{height:590px}body.opened .eyebrow{font-size:8px}@media(min-width:1500px){.left{left:10%}.right{right:10%}.paper{width:260px}}@media(max-width:1000px){.paper{width:200px;padding:15px;left:2%;}.right{right:2%;left:auto}.footnote,#hint,.edition{display:none}nav{margin:auto}.heading{padding-top:25px}}@media(max-width:720px){header{height:85px}.brand{font-size:23px}h1{font-size:26px}#stage{height:500px}body.opened #stage{height:900px}.paper{top:480px;width:46%;max-height:390px}.left{left:3%}.right{right:3%}.bottom{margin:0 2%}nav{gap:2px;flex-wrap:wrap;justify-content:center}nav button{font-size:10px}#bubble{bottom:440px;width:80%}#sceneLabel{top:12px}}
.stroke-section{margin:22px 0 14px;padding-top:17px;border-top:1px solid #dedbcb}.stroke-heading{font-size:10px;letter-spacing:2px;color:#8b927e;margin-bottom:12px}.stroke-layout{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.tian-grids{display:flex;gap:8px;flex-wrap:wrap}.tian-cell{width:112px;height:112px;border:1px solid #b7bfaa;position:relative;background:linear-gradient(to right,transparent calc(50% - .5px),#cdd1bf calc(50% - .5px),#cdd1bf calc(50% + .5px),transparent calc(50% + .5px)),linear-gradient(to bottom,transparent calc(50% - .5px),#cdd1bf calc(50% - .5px),#cdd1bf calc(50% + .5px),transparent calc(50% + .5px)),#fbfaf2}.tian-cell svg{display:block;position:relative;z-index:1}.strokes-button{margin:0;min-width:86px}.strokes-button:disabled{opacity:.55;cursor:wait}.stroke-status{font-size:11px!important;color:#879078;min-height:20px;margin-bottom:0}dialog{max-height:90vh;overflow:auto}
/* This edition contains one lesson, so page arrows stay out of the navigation. */
#prev,#next{display:none}#bubble .subtitle-pinyin{display:block;font-size:11px;line-height:1.65;letter-spacing:.2px;color:#7b866f;margin:0 0 5px}#bubble{max-width:390px;width:max-content}#sceneLabel p{padding:0 12px;line-height:1.6}.edition{white-space:nowrap}@media(max-width:1000px){.edition{display:block;font-size:9px;letter-spacing:1px}.edition b{font-size:13px;margin-left:10px}}@media(max-width:540px){.edition{font-size:8px}.edition b{display:block;margin:4px 0 0;text-align:right}header button{padding:9px 11px}.brand{font-size:20px}}
.learning-text{display:inline-flex;flex-direction:column;vertical-align:middle;line-height:1.5}.learning-text .pinyin{font-family:'DM Sans',system-ui,sans-serif;font-size:10px;font-weight:400;color:#7b866f;letter-spacing:.1px;line-height:1.6}.choice .pinyin{font-size:12px}.words .learning-text{align-items:center}.paper h3 .pinyin,#sceneLabel h2 .pinyin{font-size:11px}.paper p .learning-text{margin:0 2px}#sceneLabel h2{margin:4px}#sceneLabel p{margin-top:5px}
/* Two-page edition restores navigation at all screen sizes. */
#prev,#next{display:inline-block}
#dialogueDock{position:absolute;bottom:55px;left:50%;transform:translateX(-50%);width:min(410px,90%);text-align:center;pointer-events:none}#sceneInstruction{font-size:10px;line-height:1.6;color:#64735a;margin:0 0 8px;text-shadow:0 1px 3px #fffdf5}#dialogueDock #bubble{position:relative;bottom:auto;left:auto;transform:none;max-width:100%;width:fit-content;margin:0 auto}.answer-button{display:block;margin:13px 0 2px;padding:9px 16px;font-size:10px;letter-spacing:1.5px;border:1px solid #b7c1aa;border-radius:4px;background:#edf0e4;color:#52654c}.answer-button:hover{background:#e0e7d4}.answer-examples{border-top:1px solid #dedbcb;padding-top:8px}.answer-examples p{display:flex;align-items:center;gap:24px}.answer-examples small{font-size:12px;color:#7b866f}#modal{position:fixed;inset:0;margin:auto}@media(max-width:720px){#dialogueDock{bottom:440px}#sceneInstruction{font-size:9px}}
.basic-strokes{display:grid;gap:7px}.basic-stroke{display:flex;align-items:center;gap:12px}.basic-stroke svg{width:47px;height:47px;flex:none;background:#f1f1e6;border:1px solid #d4d9c6}.basic-stroke path{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:8}.stroke-guide{stroke:#d6dacb}.stroke-ink{stroke:#52654c;stroke-dasharray:1;stroke-dashoffset:0}.basic-stroke span{display:block;font-size:11px}.basic-stroke button{background:transparent;border:0;font-size:9px;color:#7b866f;padding:4px 0}.tone-rule{background:#edf0e4;padding:14px;text-align:center;font-size:16px;line-height:1.5;border-radius:4px}.tone-rule span{color:#9ba58f}.tone-example{margin:18px 0;text-align:center}.tone-example small{display:block;font-size:11px;color:#7b866f}.tone-example>.learning-text{font-size:22px}.tone-words{display:flex;gap:24px;font-size:19px}.tone-example .pinyin{font-size:12px}
/* Scale the entire panel coordinate system: text, buttons and SVG remain proportional. */
.paper{--panel-scale:1;transform:rotate(-1deg) scale(var(--panel-scale));transform-origin:top left;z-index:3}.paper.right{transform:rotate(1deg) scale(var(--panel-scale));transform-origin:top right}.paper:focus-within,.paper.panel-scaling{z-index:6}.panel-scale-toolbar{position:sticky;top:0;height:0;z-index:8;display:flex;justify-content:flex-end;pointer-events:none}.panel-scale-handle{position:relative;top:-14px;right:-15px;pointer-events:auto;touch-action:none;user-select:none;border:1px solid #c4ccb7;border-radius:4px;background:#f8f9f0eb;color:#667c57;font-size:19px;line-height:24px;width:27px;height:27px;padding:0;cursor:nwse-resize;box-shadow:0 1px 4px #43573612}.right .panel-scale-handle{cursor:nesw-resize}.panel-scaling{user-select:none}.panel-scale-handle:hover{background:#e5ebd9}@media(max-width:1000px){.panel-scale-handle{top:-9px;right:-10px}}
/* Mirror the left resize icon so its diagonal runs from top-left to bottom-right. */
.paper.left .panel-scale-handle{transform:scaleX(-1)}
.panel-shell,.panel-scale-space{display:contents}.panel-scale-toolbar{height:auto;min-height:36px;gap:4px;margin-bottom:12px;background:#fcfaf1;align-items:center;justify-content:flex-end;pointer-events:auto;top:-10px}.panel-scale-handle{position:static;flex:none}.panel-scale-button{min-width:34px;min-height:34px;padding:3px 7px;border:1px solid #c4ccb7;border-radius:4px;background:#f4f6eb;color:#52654c;font-size:12px;cursor:pointer}.panel-scale-button:hover{background:#e2ead5}button{touch-action:manipulation}#world{touch-action:pan-y pinch-zoom}#dismiss{min-width:44px;min-height:44px}.basic-stroke button{min-height:36px;padding:6px 8px}.words button,.play,.practice,.answer-button{min-height:36px}nav button{min-width:40px;min-height:40px}
@media(pointer:coarse){.panel-scale-handle{display:none}.panel-scale-button,nav button,.words button,.play,.practice,.answer-button,.basic-stroke button{min-height:44px;min-width:44px}.line{min-height:64px}}
@media(max-width:720px){body.opened #stage{height:auto;display:flex;flex-direction:column;gap:18px;padding-bottom:24px}body.opened #world{height:380px;flex:none}#sceneLabel{top:8px}#dialogueDock{position:relative;bottom:auto;left:auto;transform:none;align-self:center;order:2;margin:0 0 8px}#dialogueDock #bubble{bottom:auto;width:auto}body.opened .panel-shell{display:block;position:relative;margin:0 16px;overflow:auto;max-height:80vh;min-height:100px;order:3;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}body.opened .right-shell{order:4}body.opened .panel-scale-space{display:block;position:relative;height:var(--scaled-height,600px);width:var(--scaled-width,calc(100vw - 32px))}body.opened .paper,body.opened .paper.right{position:absolute;left:0;right:auto;top:0;width:calc(100vw - 32px);max-height:none;overflow:visible;transform:scale(var(--panel-scale));transform-origin:top left;margin:0;padding:20px}.panel-scale-toolbar{position:relative;top:auto;background:none}.paper p{font-size:14px}.line{font-size:15px}.line small{font-size:12px}.learning-text .pinyin{font-size:12px}.paper h4{font-size:12px}.basic-stroke span{font-size:14px}.paper .kicker{font-size:11px}nav{gap:4px}.bottom{padding:14px 0}.basic-stroke svg{width:58px;height:58px}dialog{width:calc(100% - 24px);padding:28px 22px;max-height:88dvh}.tone-rule{font-size:19px}}
/* Gestures are captured only inside the 3D canvas; the surrounding page still scrolls. */
#world{touch-action:none;cursor:grab}#world:active{cursor:grabbing}.example-translation{display:block;margin-top:8px;color:#7b866f;font-size:13px;line-height:1.6}
/* English headline replaces the former Chinese slogan. */
.heading,body.opened .heading{padding:46px 20px 25px}.heading>.eyebrow,body.opened .heading>.eyebrow{display:block;font-size:clamp(12px,1.4vw,18px);line-height:1.8;letter-spacing:2.5px;color:#637456}.heading>#intro{margin-top:10px}
#sceneLabel{left:4%;top:12px;width:auto;max-width:90%;text-align:left}#sceneLabel h2{margin:5px 0}#sceneLabel .learning-text{align-items:flex-start}#sceneLabel #chapter{letter-spacing:1.5px}@media(min-width:1500px){#sceneLabel{left:10%}}@media(max-width:1000px){#sceneLabel{left:2%}}@media(max-width:720px){.heading,body.opened .heading{padding:34px 16px 20px}.heading>.eyebrow,body.opened .heading>.eyebrow{font-size:12px;letter-spacing:1.3px}#sceneLabel{left:16px;top:10px;max-width:calc(100% - 32px)}#sceneLabel h2{font-size:18px}}
/* Bilingual action labels: pinyin above Chinese, then English to the right. */
button .button-label{display:inline-flex;align-items:flex-end;justify-content:center;gap:7px;vertical-align:middle;line-height:1.3;text-align:center;letter-spacing:0}button .button-chinese{display:inline-flex;flex-direction:column;font-size:12px;line-height:1.5}button .button-pinyin{display:block;font-size:9px;line-height:1.5;font-weight:400;white-space:nowrap;opacity:.8}button .button-english{display:inline;font-size:11px;line-height:1.6;white-space:nowrap}nav{flex-wrap:wrap;justify-content:center}nav button{padding:7px 9px;min-height:48px}.open .button-label,.open .button-chinese,.open .button-pinyin,.open .button-english{margin:0}.open{white-space:nowrap}.answer-button{letter-spacing:0}.basic-stroke button{padding:6px 0}.basic-stroke button .button-label{display:inline-flex}.panel-scale-button .button-label{gap:3px}.panel-scale-button .button-chinese{font-size:10px}.panel-scale-button .button-pinyin{font-size:8px}.panel-scale-button .button-english{font-size:9px}.scale-percent{display:block;font-size:10px}.panel-scale-toolbar{flex-wrap:wrap}.panel-scale-button{min-height:44px}#dismiss{font-size:12px;right:12px;top:10px;padding:4px 8px}dialog{padding-top:62px}@media(max-width:720px){.bottom nav{gap:3px}nav .divider{display:none}button .button-chinese{font-size:13px}button .button-pinyin{font-size:10px}button .button-english{font-size:11px}header #help{padding:7px 10px}.brand{font-size:18px}.edition b{font-size:11px}.edition{letter-spacing:0}.open{max-width:95%;padding:13px 18px}}
/* Warm printed-paper leaves with a sewn gutter and layered page edges. */
body{background:#f8f6ee}.paper{background:linear-gradient(90deg,#e4ddc9 0,#f6f1e1 4%,#fffcf1 13%,#fcf9ed 88%,#e9e1ca 100%);border:1px solid #dcd2b9;border-radius:3px 7px 9px 2px;box-shadow:1px 1px 0 #e5dcc4,3px 3px 0 #f7f1dd,4px 4px 0 #d9cfb5,7px 11px 24px #4c4b3030,inset 6px 0 14px #d2c29c19;max-height:440px;padding:24px 26px}.paper.right{background:linear-gradient(90deg,#e9e1ca 0,#fcf9ed 12%,#fffcf1 87%,#f0e9d6 97%,#ded2b9 100%);border-radius:7px 3px 2px 9px;box-shadow:-1px 1px 0 #e5dcc4,-3px 3px 0 #f7f1dd,-4px 4px 0 #d9cfb5,-7px 11px 24px #4c4b3030,inset -6px 0 14px #d2c29c19}.paper .kicker{color:#8a805f;letter-spacing:2px}.paper h3{font-weight:600;color:#454c37}.paper h4{border-color:#ded5bd}.panel-scale-toolbar{background:#faf6e9e8;border-bottom:1px solid #e6deca;padding-bottom:8px}.panel-scale-button{background:#f7f4e7;border-color:#d7d4bf}.line{border-color:#e6dec9}.words button{background:#f0f1e2;border-color:#d4d7be;border-radius:14px}.play,.answer-button{background:#e9edda;border-color:#c8d0b5}.bottom{border-color:#d8ddca}nav{background:#fffdf3e8;border:1px solid #e0e1d0;border-radius:28px;padding:4px 12px;box-shadow:0 3px 12px #47533b0a}#stage{isolation:isolate}.open{background:#fdfcf1;color:#4e6345;border:1px solid #d8dfc5;box-shadow:0 5px 20px #3e4e2922}.heading>.eyebrow{color:#738362}@media(max-width:1000px){.paper{padding:19px 18px}}@media(max-width:720px){body.opened .paper,body.opened .paper.right{padding:22px 24px;max-height:none}.panel-scale-toolbar{background:none}nav{border-radius:18px}.panel-shell{border-radius:6px}}
/* Learning leaves must occlude the footer when enlarged, including its text. */
#stage{position:relative;z-index:10;overflow:visible}.bottom{position:relative;z-index:1}.paper,.paper.right{isolation:isolate;opacity:1;background-color:#fcf9ed}.paper{z-index:20}.paper:focus-within,.paper.panel-scaling{z-index:25}#modal{z-index:100}
@media(max-width:720px){body.opened .panel-shell{z-index:20;background-color:#fcf9ed;isolation:isolate}}
/* Each title character and its syllable share one centred column. */
.aligned-title{display:inline-flex;align-items:flex-end;gap:.18em;vertical-align:middle}#sceneLabel .aligned-title,.paper h3 .aligned-title,.toc b .aligned-title{font-size:inherit;letter-spacing:0}.aligned-title .title-unit{display:inline-flex;flex-direction:column;align-items:center;min-width:1.9em;gap:3px;text-align:center;letter-spacing:0}#sceneLabel .title-pinyin,.paper h3 .title-pinyin,.toc b .title-pinyin{font-family:'DM Sans',system-ui,sans-serif;font-size:11px;font-weight:400;line-height:1.5;letter-spacing:0;white-space:nowrap;color:#7b866f}#sceneLabel .title-hanzi,.paper h3 .title-hanzi,.toc b .title-hanzi{font-family:'Noto Serif SC',serif;font-size:inherit;line-height:1.5;letter-spacing:0;color:inherit}.title-unit{padding:0 .08em}
/* Shared per-character annotation for all learning text and actions. */
.character-annotation{display:inline-flex;align-items:flex-end;flex-wrap:wrap;gap:.3em;vertical-align:middle;line-height:1.4}.character-reading{display:inline-flex;align-items:flex-end;flex-wrap:wrap;gap:.08em;row-gap:.3em;max-width:100%}.han-unit{display:inline-flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:1.3em;text-align:center;vertical-align:bottom}.han-pinyin{font-family:'DM Sans',system-ui,sans-serif;font-size:.67em;line-height:1.6;white-space:nowrap;font-weight:400;letter-spacing:0;color:#7b866f;padding:0 .12em}.han-char,.han-punctuation{font-size:1em;line-height:1.6;letter-spacing:0}.han-punctuation{align-self:flex-end}.reading-arrow{align-self:center;color:#8a977c}#sceneLabel .character-annotation,#sceneLabel .character-reading,#sceneLabel .han-unit,#sceneLabel .han-char,#sceneLabel .han-punctuation{font-size:inherit;letter-spacing:0;color:inherit}#sceneLabel .han-pinyin{font-size:11px;letter-spacing:0;color:#7b866f}.aligned-title .han-unit{min-width:1.9em}.paper h4 .character-annotation{font-weight:500}.line .character-annotation{margin:3px 0}button .button-chinese>.character-annotation{display:inline-flex;flex-direction:row}button .han-pinyin{color:inherit;opacity:.8}#bubble>.character-annotation{font-size:15px}#bubble small{margin-top:8px}.tone-example>.character-annotation{font-size:22px}.answer-examples .character-annotation{font-size:19px}.words .character-annotation{font-size:12px}
/* Keep short action text intact and each title translation on one shared centreline. */
.button-chinese .character-reading{flex-wrap:nowrap;white-space:nowrap}#open .button-label{flex-wrap:nowrap}#open .button-chinese,#open .character-reading{white-space:nowrap;flex-wrap:nowrap}.paper,.panel-shell{overflow-anchor:none;scroll-behavior:auto}.paper h3{text-align:center}.paper h3+.english{text-align:center}.paper h3 .aligned-title{justify-content:center}.aligned-title .character-annotation,.aligned-title .character-reading{justify-content:center}#sceneLabel{width:max-content;max-width:90%;text-align:center}#sceneLabel #chapter{display:block;text-align:center}#sceneLabel h2{display:flex;justify-content:center}#sceneLabel .aligned-title{justify-content:center}#sceneLabel .character-reading{justify-content:center}@media(max-width:720px){#sceneLabel{max-width:calc(100% - 32px)}#open .button-label{gap:6px}}
/* A compact cover action: aligned Chinese above a centred English line. */
#open{padding:13px 25px 12px;min-width:160px;border-radius:18px;line-height:1.25}#open .button-label{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}#open .button-chinese{font-size:15px;line-height:1.35}#open .character-annotation,#open .character-reading{gap:0;justify-content:center;flex-wrap:nowrap}#open .han-unit{min-width:0;padding:0 .035em}#open .han-pinyin{font-size:9px;line-height:1.4;padding:0 .04em;letter-spacing:0}#open .han-char{font-size:15px;line-height:1.45;letter-spacing:0}#open .button-english{font-size:12px;line-height:1.4;letter-spacing:.15px;margin:0}
/* Compact, explicitly centred cover button. */
#open{display:flex;align-items:center;justify-content:center;min-width:0;width:148px;padding:12px 14px;text-align:center}#open .button-label{width:100%;align-items:center;justify-content:center;text-align:center}#open .button-chinese,#open .button-english{align-self:center;text-align:center}#open .button-chinese{align-items:center}#open .character-annotation,#open .character-reading{justify-content:center}
#open[hidden]{display:none}
/* Cover label has compact fixed syllable columns and no inherited span margins. */
#open .button-label,#open .button-label span{margin:0;letter-spacing:0}#open .button-chinese .character-reading{display:inline-flex;gap:0;width:104px;justify-content:center;flex-wrap:nowrap}#open .han-unit{flex:0 0 26px;width:26px;min-width:0;padding:0}#open .han-pinyin{font-size:8px;padding:0;white-space:nowrap}#open .han-char{font-size:14px;letter-spacing:0}#open .button-chinese,#open .character-annotation{width:104px;max-width:100%;justify-content:center;align-self:center}#open .button-english{width:100%;text-align:center}
.word-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.word-heading h2{margin:12px 0}.word-speaker{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1px solid #d4dcc5;border-radius:50%;background:#edf1e2;color:#52654c;font-size:18px;flex:none}.word-speaker:hover{background:#e1e9d3}
.basic-strokes .stroke-card{display:flex;align-items:center;justify-content:flex-start;gap:14px;width:100%;min-height:58px;border:1px solid transparent;border-radius:5px;background:transparent;padding:4px 0;text-align:left;cursor:pointer;color:#465b40;font:inherit}.basic-strokes .stroke-card:hover{background:#edf1e0;border-color:#d5dec4}.basic-strokes .stroke-card .stroke-name{display:block;font-size:12px;line-height:1.5;padding:0;margin:0}.basic-strokes .stroke-card svg{flex-shrink:0}@media(pointer:coarse){.basic-strokes .stroke-card{min-height:66px}.basic-strokes .stroke-card .stroke-name{font-size:14px}}
.tian-cell[role=button]{cursor:pointer;touch-action:manipulation}.tian-cell[role=button]:focus-visible{outline:3px solid #9baa83;outline-offset:3px}
/* Desktop reading layout: large leaves occupy the reference image's side regions. */
@media(min-width:1001px){
 body.opened header{height:84px}
 body.opened .heading{position:absolute;top:104px;left:37%;width:26%;padding:4px 12px;z-index:11}
 body.opened .heading>.eyebrow{font-size:clamp(10px,.8vw,16px);letter-spacing:1.5px}
 body.opened #stage{height:calc(100dvh - 180px);min-height:560px;margin-top:20px}
 body.opened .paper,body.opened .paper.right{top:0;width:35.5%;height:100%;max-height:none;padding:clamp(22px,2vw,42px);transform:scale(var(--panel-scale));border-radius:5px 10px 10px 5px}
 body.opened .paper.left{left:1.5%;transform-origin:top left}
 body.opened .paper.right{right:1.5%;left:auto;transform-origin:top right;border-radius:10px 5px 5px 10px}
 body.opened .paper p{font-size:clamp(14px,.95vw,19px);line-height:1.85}
 body.opened .paper h3{font-size:clamp(23px,1.6vw,32px);margin:15px 0 6px}
 body.opened .paper .english{font-size:clamp(14px,1vw,19px)}
 body.opened .paper .kicker{font-size:clamp(10px,.65vw,13px)}
 body.opened .paper h4{font-size:clamp(12px,.8vw,16px);padding-top:20px;margin-top:24px}
 body.opened .line{font-size:clamp(16px,1vw,21px);padding:14px 0;line-height:1.8}
 body.opened .line small{font-size:clamp(13px,.8vw,17px)}
 body.opened .speaker{font-size:clamp(11px,.7vw,14px)}
 body.opened .words .character-annotation{font-size:clamp(15px,1vw,21px)}
 body.opened .words button{padding:9px 13px}
 body.opened .panel-scale-toolbar{top:0;margin:0 0 22px;padding-bottom:10px}
 body.opened #sceneLabel{top:72px;left:38%;max-width:24%;width:24%;text-align:center}
 body.opened #sceneLabel h2{font-size:clamp(19px,1.3vw,27px)}
 body.opened #dialogueDock{bottom:18px;width:24%}
 body.opened #sceneInstruction{font-size:10px}
 body.opened .bottom{margin:0 1.5%;padding:10px 0}
 body.opened .bottom #hint,body.opened .bottom .footnote{display:none}
 body.opened .bottom nav{margin:0 auto}
 body.opened .basic-strokes{gap:12px}
 body.opened .basic-strokes .stroke-card svg{width:64px;height:64px}
 body.opened .basic-strokes .stroke-card .stroke-name{font-size:clamp(15px,1vw,20px)}
 body.opened .tone-rule{font-size:clamp(19px,1.4vw,27px)}
 body.opened .paper button .button-chinese{font-size:clamp(13px,.8vw,17px)}
 body.opened .paper button .button-english{font-size:clamp(12px,.75vw,16px)}
}
/* Medium browser windows keep a useful scene strip and larger pages too. */
@media(min-width:721px) and (max-width:1000px){
 body.opened header{height:84px}body.opened .heading{padding:18px 15px 12px}body.opened #stage{height:calc(100dvh - 220px);min-height:560px}
 body.opened .paper,body.opened .paper.right{top:62px;width:32%;height:calc(100% - 75px);max-height:none;padding:20px 18px;transform:scale(var(--panel-scale))}
 body.opened .paper.left{left:1.5%}body.opened .paper.right{right:1.5%;left:auto}
 body.opened .paper p{font-size:13px}body.opened .line{font-size:15px}body.opened .line small{font-size:12px}
 body.opened #sceneLabel{left:35%;width:30%;max-width:30%;top:4px}body.opened #dialogueDock{width:30%;bottom:15px}
}
/* Readability pass: secondary text remains readable without oversized headings. */
.edition,.edition b{font-family:'DM Sans',system-ui,sans-serif;font-size:16px;font-weight:500;letter-spacing:1px}.edition b{margin-left:0}.paper .han-pinyin{font-size:12px;line-height:1.65}.paper .line small{font-size:14px;line-height:1.7}.paper .speaker{font-size:12px;line-height:1.6}.paper .kicker{font-size:11px}.paper button .button-english{font-size:13px}.paper button .han-pinyin{font-size:11px}.paper .panel-scale-button .button-english{font-size:11px}.paper .panel-scale-button .han-pinyin{font-size:10px}.scale-percent{font-size:12px}.paper .line{padding:15px 0}.paper h4{line-height:1.9;letter-spacing:.4px}
@media(min-width:1001px){body.opened .paper .han-pinyin{font-size:clamp(13px,.8vw,17px)}body.opened .paper .line small{font-size:clamp(15px,1vw,20px);line-height:1.75}body.opened .paper .speaker{font-size:clamp(12px,.8vw,16px)}body.opened .paper .kicker{font-size:clamp(12px,.8vw,16px)}body.opened .paper button .button-english{font-size:clamp(14px,.9vw,18px)}body.opened .paper button .han-pinyin{font-size:clamp(11px,.7vw,14px)}body.opened .paper .words .han-pinyin{font-size:clamp(12px,.8vw,16px)}body.opened .paper .panel-scale-button .button-english{font-size:11px}body.opened .paper .panel-scale-button .han-pinyin{font-size:10px}}
@media(min-width:721px) and (max-width:1000px){body.opened .paper .line small{font-size:14px}body.opened .paper .speaker{font-size:12px}.edition{font-size:15px;letter-spacing:.6px}.edition b{font-size:inherit;margin:0}}
@media(max-width:720px){.edition,.edition b{font-size:13px;font-weight:500;letter-spacing:.2px}.edition b{display:inline;margin:0}.paper .han-pinyin{font-size:13px}.paper .line small{font-size:15px}.paper .speaker{font-size:13px}.paper .kicker{font-size:12px}.paper button .button-english{font-size:13px}.paper button .han-pinyin{font-size:11px}}
.number-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}.number-tile{border:1px solid #ded8bf;border-radius:7px;padding:12px;background:#f8f6e9;min-width:0}.number-heading{display:flex;align-items:center;justify-content:center;gap:10px;font-size:24px}.number-heading b{font:500 20px 'DM Sans',sans-serif;color:#8b967c}.number-sound{border:0;background:none;min-width:44px;min-height:44px;font-size:17px}.number-writing{width:88px;height:88px;margin:12px auto 0;border:1px solid #bac3a9;background:linear-gradient(90deg,transparent 49.5%,#d3d8c3 49.5%,#d3d8c3 50.5%,transparent 50.5%),linear-gradient(transparent 49.5%,#d3d8c3 49.5%,#d3d8c3 50.5%,transparent 50.5%)}.number-step{display:block;margin:9px auto 4px}.number-tile>small{display:block;text-align:center;color:#849074;font-size:12px}.number-flashcards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.number-flashcard{display:block;border:0;background:transparent;padding:0;perspective:700px;min-height:160px;cursor:pointer}.flash-inner{display:block;position:relative;min-height:160px;transform-style:preserve-3d;transition:transform .5s}.flipped .flash-inner{transform:rotateY(180deg)}.flash-front,.flash-back{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backface-visibility:hidden;border:1px solid #ccd3b9;border-radius:10px;background:#eef1e1}.flash-front svg{width:100px;height:135px}.flash-back{transform:rotateY(180deg);flex-direction:column;gap:12px;background:#fffdf1;font-size:30px}.flash-back>b{font:500 22px 'DM Sans',sans-serif;color:#869472}.gesture-note{font-size:12px!important;color:#829074}@media(max-width:1000px) and (min-width:721px){.number-grid,.number-flashcards{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){.flash-inner{transition:none}}
.flash-front img{display:block;width:min(88%,180px);height:auto;aspect-ratio:1;object-fit:contain;border-radius:5px;box-shadow:0 2px 8px #4250391a}.number-flashcard,.flash-inner{min-height:190px}.flash-front{padding:10px;background:#f8f7ef}@media(max-width:720px){.number-flashcard,.flash-inner{min-height:170px}}@media(min-width:1500px){.number-flashcard,.flash-inner{min-height:220px}}
.ten-gestures{display:flex;gap:8px;align-items:center;justify-content:center;width:100%}.flash-front .ten-gestures img{width:46%;height:auto;max-width:150px}.review-phrases{display:grid;gap:10px;margin-top:18px}.review-phrase{position:relative;border:1px solid #d5dcc6;background:#f2f5e8;border-radius:7px;text-align:left;padding:12px 40px 12px 16px;font-size:23px}.review-phrase small{display:block;font-size:14px;margin-top:7px;color:#7b886b}.review-phrase small[hidden]{display:none}.review-check{position:absolute;right:13px;top:24px;font-size:16px}.review-numbers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.review-numbers button,.review-tone button,.review-options button{border:1px solid #d3dbc4;background:#f7f8ed;border-radius:6px;min-height:58px;padding:8px;font-size:19px}.review-numbers small{display:block;color:#8d987e;font-size:13px}.review-options{display:flex;flex-wrap:wrap;gap:8px}.review-success{color:#627c49;font-size:26px!important;text-align:center}.review-strokes{display:grid;grid-template-columns:1fr 1fr;gap:7px}.review-tone{display:grid;gap:10px}.review-tone button{font-size:20px}.review-finish{color:#7b886b;font-size:13px!important}.review-retry{border-color:#b3a06e!important}#reviewFeedback{min-height:24px;color:#8d7950}
.section-bilingual{display:inline-flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;letter-spacing:0;vertical-align:middle}.section-bilingual>.character-annotation{font-size:14px;letter-spacing:0}.section-english{font-size:inherit;letter-spacing:1px;line-height:1.5}.kicker>.section-bilingual{justify-content:flex-start}.edition{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}.edition .section-english{font-size:16px;letter-spacing:.5px}.heading .section-bilingual{flex-direction:column;gap:9px}.heading .section-bilingual>.character-annotation{font-size:17px}.heading .section-english{font-size:clamp(12px,1vw,18px);letter-spacing:1.5px}.tone-equation{display:flex;align-items:center;justify-content:center;gap:clamp(5px,.6vw,14px);margin:16px 0;padding:15px 8px;background:#edf1e0;border-radius:7px}.tone-column{display:flex;flex-direction:column;align-items:center;gap:8px}.tone-mark{font:500 32px system-ui,sans-serif;line-height:1}.tone-name{font-size:14px;line-height:1.4}.paper .section-bilingual .han-pinyin{font-size:11px}#pageNumber:empty{display:none}@media(max-width:720px){.edition{gap:4px;font-size:12px}.edition .section-english{font-size:12px}.edition .section-bilingual{gap:4px}.edition .character-annotation{font-size:11px}.heading .section-bilingual>.character-annotation{font-size:15px}.section-bilingual{gap:8px}.tone-mark{font-size:28px}}
/* Centre each joined word reading above its Chinese word, preserving sentence word gaps. */
.character-reading.word-reading{gap:.28em}.word-unit{min-width:max-content;align-items:center;text-align:center}.word-unit>.han-char{white-space:nowrap;letter-spacing:.03em}.word-unit>.han-pinyin{white-space:nowrap;text-align:center;padding:0 .08em}.aligned-title .word-unit{min-width:max-content;padding:0 .12em}#open .button-chinese .word-reading{width:auto;gap:.12em}#open .word-unit{flex:0 0 auto;width:auto;min-width:0;padding:0 .05em}#open .word-unit .han-char{letter-spacing:0}#open .button-chinese .word-annotation{width:auto;max-width:100%;justify-content:center}
/* One balanced header row replaces the separate large slogan block. */
header,body.opened header{display:grid;grid-template-columns:auto auto minmax(220px,1fr) auto;gap:clamp(18px,2.3vw,48px);align-items:center;height:auto;min-height:104px;padding:14px 0;margin:0 3%}.brand{grid-column:1}.edition{grid-column:2;white-space:nowrap;flex-wrap:nowrap;gap:7px;font-size:14px}.edition .section-bilingual{flex-wrap:nowrap;gap:8px}header .heading,body.opened header .heading{position:static;grid-column:3;top:auto;left:auto;width:auto;margin:0;padding:0;z-index:auto;text-align:center}header .heading .section-bilingual,body.opened header .heading .section-bilingual{flex-direction:column;gap:5px}header .heading .section-bilingual>.character-annotation{font-size:14px}header .heading .section-english{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:clamp(13px,1vw,19px);font-weight:400;letter-spacing:.25px;line-height:1.35}header .heading>.eyebrow{font-size:inherit;line-height:1.4;letter-spacing:0}header #intro{display:none}header #help{grid-column:4;justify-self:end}header .edition .section-english{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-size:17px}.quick-guide{display:grid;grid-template-columns:100px 1fr;gap:15px 16px;margin:24px 0 0;font-size:14px;line-height:1.65}.quick-guide dt{font-weight:600;color:#52654c}.quick-guide dd{margin:0;color:#77816a}.basic-strokes .stroke-card .stroke-name{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.basic-strokes .stroke-card .stroke-name>.character-annotation{font-size:20px}.basic-strokes .stroke-card .stroke-english{font-size:inherit}.basic-strokes .stroke-name .han-pinyin{font-size:12px}@media(min-width:1001px){body.opened #stage{height:calc(100dvh - 200px)}}@media(max-width:1100px) and (min-width:721px){header,body.opened header{grid-template-columns:auto auto minmax(190px,1fr) auto;gap:14px;margin:0 2%}.brand{font-size:22px}.edition{font-size:12px}.edition .section-english{font-size:14px}header .heading .section-bilingual>.character-annotation{font-size:12px}header #help{padding:8px}.edition .section-bilingual{gap:5px}}@media(max-width:720px){header,body.opened header{grid-template-columns:1fr auto;grid-template-areas:'brand help' 'lesson lesson' 'tagline tagline';gap:12px;padding:15px 0}.brand{grid-area:brand}.edition{grid-area:lesson;justify-self:center}header #help{grid-area:help}header .heading,body.opened header .heading{grid-area:tagline}header .heading .section-english{font-size:15px}.quick-guide{grid-template-columns:80px 1fr;gap:12px;font-size:13px}}
/* Spacious reading dialogs with legible questions, explanations and options. */
#modal{width:min(760px,calc(100vw - 48px));max-width:760px;max-height:88dvh;padding:76px 48px 38px;border-radius:14px;line-height:1.75}#modal h2{font-size:30px;line-height:1.5;margin:10px 0 22px}#modal p{font-size:20px;line-height:1.85;margin:15px 0}#modal .eyebrow{font-size:12px;line-height:1.6;letter-spacing:2px}#modal .choice{padding:18px 22px;margin:14px 0;font-size:22px;line-height:1.7;min-height:68px}#modal .han-pinyin{font-size:15px;line-height:1.7}#modal .answer-examples .character-annotation{font-size:25px}#modal .answer-examples small{font-size:18px;line-height:1.7}#modal .answer-examples p{gap:28px;flex-wrap:wrap}#modal .example-translation{font-size:19px;line-height:1.8}#modal .stroke-status{font-size:15px!important;line-height:1.7}#modal .stroke-heading{font-size:14px}#modal .button-chinese{font-size:17px}#modal .button-english{font-size:16px}#modal .button-chinese .han-pinyin{font-size:12px}#modal .play,#modal .practice{padding:12px 18px;min-height:52px}#modal #dismiss{right:16px;top:14px;padding:8px 12px;min-height:48px}#modal .quick-guide{grid-template-columns:120px 1fr;font-size:18px;gap:18px 24px;line-height:1.8}#modal .feedback{font-size:19px}#modal .word-heading{gap:18px}#modal .word-heading h2{font-size:34px;margin:12px 0}#modal .word-speaker{width:50px;height:50px;font-size:22px}@media(max-width:720px){#modal{width:calc(100vw - 24px);max-height:90dvh;padding:72px 24px 28px;border-radius:10px}#modal h2{font-size:26px}#modal p{font-size:18px;line-height:1.85}#modal .choice{font-size:21px;padding:16px}#modal .han-pinyin{font-size:14px}#modal .example-translation{font-size:17px}#modal .answer-examples small{font-size:17px}#modal .quick-guide{grid-template-columns:1fr;gap:3px;font-size:17px}#modal .quick-guide dd{margin-bottom:15px}#modal .button-english{font-size:14px}}
.knowledge-cards{display:grid;gap:15px;margin:22px 0}.knowledge-card{border:1px solid #dce1cb;background:#f2f5e8;border-radius:8px;padding:18px 22px}.knowledge-card h3{margin:0 0 11px;font:600 14px 'DM Sans',sans-serif;letter-spacing:1px;color:#81916f}.knowledge-row{font-size:21px;line-height:1.7;color:#44553b;padding:3px 0}.knowledge-row+.knowledge-row{margin-top:5px}#modal .answer-examples small{font-size:16px}@media(max-width:720px){.knowledge-card{padding:16px}.knowledge-row{font-size:18px}.knowledge-card h3{font-size:12px}}

/* Larger bilingual stroke names, scoped to the five basic-stroke cards. */
.basic-strokes .stroke-card .stroke-name>.character-annotation .han-char{font-size:28px;line-height:1.35}.basic-strokes .stroke-card .stroke-name>.character-annotation .han-pinyin{font-size:16px;line-height:1.4}.basic-strokes .stroke-card .stroke-name{row-gap:4px}
