:root{font-family:"PingFang SC","Microsoft YaHei",sans-serif;color:#45415b;background:#fff8eb;--ink:#45415b;--cream:#fff8eb;--paper:#fffefa;--mint:#e1f0e7;--peach:#fbe1d2;--lavender:#ece5f7;--yellow:#fff0be;--rose:#f9e2e9;--sky:#e2eff5;--line:#e6ddcd;--blue:#357f73;--green:#357f73;--gold:#ac7428}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{border:1.5px solid var(--line);border-radius:12px;background:#fffefa;color:var(--ink);cursor:pointer;padding:9px 13px;min-height:40px;touch-action:manipulation;transition:background .15s,transform .15s,box-shadow .15s}button:hover{background:#fff3d9}button:active{transform:translateY(2px)}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #8573bf;outline-offset:3px}button:disabled{opacity:.42;cursor:default;transform:none}button.primary{background:#357f73;border-color:#29685f;color:#fffefa;box-shadow:0 3px 0 #28665d;font-weight:650}button.primary:hover{background:#2f7268}button.correct{background:#e4f0e6;border-color:#7fb28f;color:#27684d}button.retry{background:#fff1d1;border-color:#d5aa64}a{color:#39796e}.kid-icon{width:29px;height:29px;flex:none;display:inline-block;vertical-align:middle;color:#5b525b}.icon-button{display:flex;align-items:center;justify-content:center;width:43px;padding:7px}.icon-button .kid-icon{width:23px;height:23px}#courseApp{height:100dvh;max-width:1660px;margin:auto;overflow:hidden;container-name:mathapp;container-type:size}#homeScreen,#lessonScreen{height:100%;width:100%;display:flex;flex-direction:column;min-height:0}#homeScreen{background:radial-gradient(circle at 83% 4%,#f7dfad55 0,transparent 28%),var(--cream)}.home-header{height:85px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:15px 35px;border-bottom:1px solid #e8ddc9;background:#fffaf0}.home-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink)}.brand-mark{width:48px;height:48px;border:2px solid #5c535e;background:#ffdb81;border-radius:17px;transform:rotate(-7deg);display:grid;place-items:center;box-shadow:2px 3px 0 #e6cfa5}.brand-mark .kid-icon{width:31px;height:31px}.home-brand strong{font-size:22px;letter-spacing:1px}.home-brand small{display:block;font-size:12px;color:#8c8378;letter-spacing:2px;margin-top:2px}.brand-dot{color:#c58d44}.home-header-right{display:flex;align-items:center;gap:22px}.home-welcome{font-size:14px;color:#837966}.home-layout{display:grid;grid-template-columns:216px 1fr;gap:26px;min-height:0;flex:1;padding:24px 32px 17px}.island-sidebar{display:flex;flex-direction:column;gap:13px;min-height:0;padding-right:3px}.map-caption{padding:0 10px 6px}.map-caption span{font-size:17px;font-weight:650;letter-spacing:.5px}.map-caption small{display:block;color:#978a79;font-size:12px;margin-top:4px}#islandNav{display:flex;flex-direction:column;gap:10px}.island-choice{width:100%;min-height:68px;display:flex;align-items:center;gap:10px;padding:9px 11px;border:1.5px solid transparent;background:transparent;text-align:left;box-shadow:none}.island-choice.active{border-color:#95b6a1;background:#e6f0e4;box-shadow:0 3px 0 #c8d9c7}.island-choice.peach.active{background:var(--peach);border-color:#dcb497;box-shadow:0 3px #e7c9b7}.island-choice.lavender.active{background:var(--lavender);border-color:#bca9d2;box-shadow:0 3px #d7cce7}.island-choice.yellow.active{background:var(--yellow);border-color:#d4bb70;box-shadow:0 3px #e8d89c}.island-choice.rose.active{background:var(--rose);border-color:#d0a0af;box-shadow:0 3px #e8c6d0}.island-choice.sky.active{background:var(--sky);border-color:#9dbac9;box-shadow:0 3px #c9dce6}.island-icon{width:38px;height:40px;display:flex;align-items:center;justify-content:center}.island-icon .kid-icon{width:36px;height:36px}.island-copy{flex:1;min-width:0}.island-copy b{display:block;font-size:16px;letter-spacing:.4px}.island-copy small{display:block;font-size:10px;color:#908477;margin-top:4px;white-space:nowrap}.island-arrow{font-size:24px;color:#a29784;opacity:0}.island-choice.active .island-arrow{opacity:1}.island-note{margin-top:auto;display:flex;align-items:center;padding:0 4px;gap:3px;color:#968774}.island-note .math-bear{width:83px;height:78px;object-fit:contain}.island-note p{font-size:11px;line-height:1.8;margin:0}.teacher-log{font-size:11px;text-decoration:none;color:#9c907e;padding:0 12px}.teacher-log:hover{text-decoration:underline}.home-main{min-width:0;min-height:0;display:flex;flex-direction:column}.welcome-banner{flex:none;min-height:205px;position:relative;display:flex;align-items:center;justify-content:space-between;background:#e9efdf;border:1.5px solid #d4ddc6;border-radius:25px;padding:23px 36px;overflow:hidden}.welcome-banner:before{content:"";position:absolute;width:200px;height:200px;border:1px dashed #d5c695;border-radius:50%;right:85px;top:17px;transform:rotate(-20deg)}.welcome-copy{position:relative;z-index:1;flex:1}.hello-sticker{display:inline-block;font-size:12px;letter-spacing:1px;color:#8e7856;background:#fff4cf;border:1px solid #e0cf9d;border-radius:7px 7px 7px 1px;padding:3px 9px;transform:rotate(-2deg)}.welcome-copy h1{font-family:"Yuanti SC","PingFang SC",sans-serif;font-size:35px;line-height:1.4;letter-spacing:2px;margin:10px 0 7px;color:#464953;font-weight:750}.welcome-copy h1 em{font-style:normal;color:#477c66;position:relative;white-space:nowrap}.welcome-copy h1 em:after{content:"";position:absolute;bottom:0;left:0;width:100%;height:7px;background:#d4d9a1aa;z-index:-1;transform:rotate(-2deg);border-radius:8px}.welcome-copy p{font-size:14px;color:#7e826d;margin:0 0 17px}.hero-button{font-size:14px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:8px 16px;border-radius:11px}.hero-button .kid-icon{width:20px;height:20px;color:#fffefa}.welcome-art{height:215px;width:290px;flex:none;margin:-23px -10px -23px 12px;position:relative;z-index:1}.welcome-art .math-bear{width:100%;height:100%;animation:gentle-sway 5s ease-in-out infinite}.home-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:23px 0 14px}.island-heading{min-width:0}.island-heading h2{font-size:19px;margin:0;letter-spacing:.3px}.island-heading>span{display:block;color:#9b8e7a;font-size:11px;margin-top:4px}.lesson-search{width:238px;display:flex;align-items:center;gap:7px;border:1.5px solid #e1d6c2;border-radius:12px;background:#fffdfa;padding:8px 11px;flex:none}.lesson-search .kid-icon{width:19px;height:19px;color:#a1947f}.lesson-search input{border:0;outline:none;background:transparent;min-width:0;width:100%;font-size:12px;color:#544a5c;padding:3px 0}.lesson-search input::placeholder{color:#aaa08d}.lesson-search:focus-within{border-color:#a69bc9;box-shadow:0 0 0 3px #e5dcf155}.lesson-list-wrap{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#d2c8b3 transparent;padding:2px 3px 5px}#lessonGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.lesson-card{display:flex;align-items:center;gap:12px;min-width:0;min-height:110px;padding:16px 15px;background:#fffdfa;border:1.5px solid #e2d8c8;border-radius:17px;box-shadow:0 4px 0 #eee3d1;text-align:left;position:relative}.lesson-card:hover{background:#fffdf6;border-color:#b9c7a8;transform:translateY(-3px);box-shadow:0 7px 0 #e4dfcb}.chapter-art{width:56px;height:60px;flex:none;display:flex;align-items:center;justify-content:center;border-radius:18px 15px 21px 17px;background:var(--mint);transform:rotate(-4deg)}.lesson-card:nth-child(2n) .chapter-art{transform:rotate(4deg);border-radius:17px 21px 15px 19px}.lesson-card.peach .chapter-art{background:var(--peach)}.lesson-card.lavender .chapter-art{background:var(--lavender)}.lesson-card.yellow .chapter-art{background:var(--yellow)}.lesson-card.rose .chapter-art{background:var(--rose)}.lesson-card.sky .chapter-art{background:var(--sky)}.chapter-art .kid-icon{width:40px;height:40px}.card-copy{flex:1;min-width:0}.card-copy>small{font-size:10px;letter-spacing:1px;color:#a18f78;display:block;margin-bottom:4px}.card-copy strong{font-size:15px;line-height:1.5;display:block;font-weight:650;overflow-wrap:anywhere}.card-status{font-size:10px;display:block;color:#b0a18e;margin-top:5px}.card-status.has-practiced{color:#56856a}.last-lesson{border-color:#a4bd9c}.last-lesson .card-status{color:#6a8d62}.card-arrow{align-self:flex-start;font-size:16px;color:#c4b6a0}.home-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#a49680;font-size:10px;padding:12px 3px 0;flex:none}#emptySearch{text-align:center;padding:30px 15px;color:#847666}#emptySearch .kid-icon{width:55px;height:55px;transform:rotate(-15deg);color:#b9a689}#emptySearch h3{font-size:18px;margin:12px 0 5px}#emptySearch p{font-size:13px;margin:5px 0 20px}#emptySearch button{font-size:13px}
/* The lesson keeps a quiet paper canvas; illustrations stay in the navigation. */
#lessonScreen{background:#fff8eb}.classroom-header{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;background:#fffdf5;border-bottom:2px solid #e9dfcd;flex:none}.home-back{display:flex;align-items:center;gap:6px;min-width:76px;justify-content:center;background:#f5eacb;border-color:#e2d0a4;box-shadow:0 2px #e4d5b4;font-size:14px}.home-back .kid-icon{width:22px;height:22px}.heading{flex:1;min-width:0}.heading h1{font-size:21px;line-height:1.4;margin:0 0 5px;color:#51495c}.heading p{font-size:16px;line-height:1.55;margin:0;color:#645b63}.top-tools{display:flex;gap:5px}.classroom-main{display:flex;flex:1;min-height:0;gap:12px;padding:12px}.lesson-sidebar{width:160px;flex:none;display:flex;flex-direction:column;gap:8px;overflow:hidden}.lesson-sidebar>button{display:flex;align-items:center;gap:9px;text-align:left;font-weight:650;padding:9px 10px;flex:none;border-color:#e1d7c7;box-shadow:0 2px #ebdfcd}.lesson-sidebar>button .kid-icon{width:25px;height:25px}.lesson-sidebar>button.active{border-color:#a5bba9;background:#e1ede3;box-shadow:0 3px #c7d8c8}#handsMode.active{background:#fff0ca;border-color:#d0b772;box-shadow:0 3px #e4d6a2}#practiceMode.active{background:#eee5f7;border-color:#bca8d4;box-shadow:0 3px #d7cae6}#steps{display:flex;flex-direction:column;gap:5px;flex:1;min-height:0;overflow:auto;scrollbar-width:thin}#steps button{border:1px solid transparent;text-align:left;background:transparent;font-size:14px;line-height:1.45;padding:9px 8px;display:flex;gap:7px;align-items:flex-start;color:#7f746b;box-shadow:none}#steps button:hover{background:#f3ead7}#steps button.active{background:#f6e7bd;border-color:#e9d7a3;color:#695438}#steps b{font-size:12px;border-radius:8px 7px 9px 7px;background:#fffcf0;color:#a99060;width:21px;height:21px;line-height:21px;text-align:center;flex:none}#steps button.active b{background:#dcb165;color:#fff}#steps span{flex:1}#subQuestions{display:flex;gap:3px;flex:none}#subQuestions:empty{display:none}#subQuestions button{padding:6px;font-size:13px;flex:1}#subQuestions button.active{background:#f4e5bd;border-color:#d1b877}#progress{font-size:11px;line-height:1.6;color:#a2927c;margin:0;padding:6px;flex:none}.board{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;background:#fffefa;border-radius:19px;border:2px solid #e4dac8;box-shadow:0 3px #eee4d1;overflow:hidden}.board-head{padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px dashed #e4dac7;background:#fffcf4}.board-head>div{min-width:0}.board-head h2{font-size:19px;line-height:1.4;margin:2px 0;color:#5b5063}.board-head span{font-size:12px;color:#b09566}.board-head button{font-size:13px;min-height:34px;padding:6px 10px;flex:none;background:#faf5e7;border-color:#e6d8b9;color:#9a845d}#scene{flex:1;min-height:0;padding:7px 12px;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;background-color:#fffefa;background-image:radial-gradient(#e8dfcc44 .8px,transparent .8px);background-size:19px 19px}#scene svg{display:block;width:100%;height:100%;max-height:440px;font-family:"PingFang SC","Microsoft YaHei",sans-serif}#scene svg text{user-select:none}#scene [data-action],#scene [data-m]{cursor:pointer}#scene [data-drag],#scene [data-drop]{cursor:default}#scene [data-m]:hover>circle{filter:brightness(1.05)}#modelControls{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;padding:4px 10px 6px;background:#fffefa}#modelControls:empty{display:none}#modelControls button{font-size:14px;padding:7px 10px;min-height:36px;border-color:#e5d6ba;box-shadow:0 2px #eee0c8;color:#74603f;border-radius:11px}#modelControls button:hover{background:#fff0ca}#explanation{padding:7px 16px;background:#f2f2df;border-top:1px dashed #dddcc3;font-size:15px;line-height:1.5;min-height:36px;color:#7b775c}#explanation.success{background:#e3f0e5;color:#32724e}#exercise{padding:8px 14px;display:flex;gap:7px;align-items:center;flex-wrap:wrap;background:#fffefa}#exercise:empty{display:none}.answer-field{display:flex;align-items:center;gap:5px;font-size:14px;color:#6a5d55}.answer-field input,.answer-field select{width:95px;padding:8px;border:1.5px solid #cebd9c;border-radius:9px;min-height:39px;background:#fffaf0;color:#54485d}.answer-field select{width:115px}.answer-field.field-ok input,.answer-field.field-ok select{background:#edf7ef;border-color:#75a98a}.answer-field.field-retry input,.answer-field.field-retry select{background:#fff2d7;border-color:#d3ac61}#exercise button{min-height:37px;padding:8px 11px;font-size:14px}.transport{padding:9px 14px;border-top:1px solid #e8dfcf;display:flex;gap:8px;align-items:center;background:#fffcf5}.transport span{margin-left:auto;font-size:12px;color:#a99c86}.transport button{font-size:14px}.transport #next{min-width:132px}.transport #play{background:#f7e9bd;border-color:#e4cea0;color:#897047}.model-table{width:94%;border-collapse:collapse;font-size:18px;text-align:center}.model-table td,.model-table th{border:1px solid #e0d5c2;padding:8px}.model-table th{background:#f5e9cd;color:#8a744f}.model-table button{font-size:16px;padding:5px 10px}.model-table small{font-size:13px}.practice-note{font-size:16px;line-height:1.7;max-width:650px;padding:16px}.solution{max-width:900px;font-size:19px;line-height:1.8;margin:auto;padding:5px 10px}.solution p{margin:5px 0}.solution small{font-size:.75em;color:#9b8c76}#scene:has(.solution){overflow:auto;display:block}.model-html{width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;justify-content:flex-start}.model-html table{width:100%;flex:1;table-layout:fixed}.model-html th,.model-html td{padding:3px}.model-html .notice{flex:none;font-size:13px;margin:4px}.model-table button{max-width:100%}#courseApp[data-lesson="37"] .model-table{height:100%}#courseApp[data-lesson="37"] .model-table td,#courseApp[data-lesson="37"] .model-table th{height:20%;padding:1px 5px}#courseApp[data-lesson="37"] .model-table button{height:100%;min-height:22px;width:100%;padding:1px 5px;display:block;border-radius:5px}.book-canvas{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0}.book-canvas svg{flex:1;min-height:0}.book-canvas .book-equation{font-size:23px;padding:4px;color:#7f7059}.book-canvas .money-layout{display:flex;gap:20px;width:95%;align-items:center}.money-stock{display:flex;flex-direction:column;gap:7px;font-size:17px;min-width:135px}.money-results{flex:1}.money-table{border-collapse:collapse;width:100%;font-size:17px;text-align:center}.money-table td,.money-table th{border:1px solid #dfd4c2;padding:7px}.money-table th{background:#f5e8ca}.money-layout .empty-ways{font-size:20px;line-height:1.8}.notice{margin:10px;font-size:16px;line-height:1.7}.practice-guide{padding:10px 6px;font-size:13px;line-height:1.5;color:#9b8b73}.practice-guide p{margin:10px 0}.practice-guide small{color:#aa9b85}body[data-mode=practice] #scene{min-height:85px}body[data-mode=practice] .transport span{margin-left:0}body[data-mode=practice] .transport #next{margin-left:auto}#scene .equation,#scene .book-equation{font-size:28px;text-align:center}#scene .book-tools,#scene .book-notice{display:none}.muted{color:#a89a87}.tag{display:inline-block;background:#f4eacb;padding:3px 9px;border-radius:7px;font-size:14px}.practice-choices{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.practice-choices button{font-size:20px;padding:12px 20px}.key-item{transition:all .3s ease}
@container mathapp (max-width:1150px){.home-header{padding:12px 25px;height:75px}.home-layout{grid-template-columns:185px 1fr;gap:18px;padding:18px 22px 15px}.welcome-banner{padding:20px 25px;min-height:190px}.welcome-copy h1{font-size:29px}.welcome-art{width:220px;height:195px;margin:-20px -10px -20px 0}.welcome-copy p{font-size:12px}.home-toolbar{gap:10px;margin-top:20px}.island-heading h2{font-size:16px}.lesson-search{width:195px}.lesson-card{gap:9px;padding:13px 11px;min-height:101px}.chapter-art{width:46px;height:53px}.chapter-art .kid-icon{width:34px;height:34px}.card-copy strong{font-size:14px}.card-arrow{display:none}#lessonGrid{gap:11px}.island-choice{padding:8px;gap:7px}.island-copy b{font-size:15px}}
@container mathapp (max-height:520px){.home-header{height:46px;padding:5px 14px}.home-brand{gap:8px}.brand-mark{width:31px;height:31px;border-radius:11px;box-shadow:1px 2px #e6cfa5}.brand-mark .kid-icon{width:22px;height:22px}.home-brand strong{font-size:15px;letter-spacing:.3px}.home-brand small{font-size:8px;letter-spacing:1px;margin-top:0}.home-header-right{gap:14px}.home-welcome{font-size:10px}.home-full{min-height:30px;width:32px;padding:5px}.home-full .kid-icon{width:18px;height:18px}.home-layout{grid-template-columns:132px 1fr;gap:12px;padding:10px 12px 9px}.island-sidebar{gap:7px}.map-caption{padding:0 4px 2px}.map-caption span{font-size:12px}.map-caption small{display:none}#islandNav{gap:4px}.island-choice{min-height:39px;padding:4px 6px;gap:5px;border-radius:10px}.island-icon{width:27px;height:29px}.island-icon .kid-icon{width:27px;height:27px}.island-copy b{font-size:12px;letter-spacing:.2px}.island-copy small{font-size:7px;margin-top:2px;letter-spacing:-.1px}.island-arrow{font-size:16px}.island-note{display:none}.teacher-log{font-size:8px;margin-top:auto;padding:2px 6px}.welcome-banner{min-height:103px;padding:10px 19px;border-radius:17px}.hello-sticker{font-size:8px;letter-spacing:.4px;padding:1px 6px;border-radius:4px}.welcome-copy h1{font-size:24px;line-height:1.25;letter-spacing:1px;margin:5px 0 3px}.welcome-copy p{font-size:10px;margin:0 0 8px}.hero-button{font-size:10px;min-height:27px;padding:4px 9px;gap:5px;border-radius:8px;box-shadow:0 2px #28665d!important}.hero-button .kid-icon{width:14px;height:14px}.welcome-art{width:175px;height:130px;margin:-10px 0 -10px 0}.welcome-banner:before{width:120px;height:120px;right:40px;top:0}.home-toolbar{gap:10px;margin:10px 0 8px}.island-heading h2{font-size:13px;letter-spacing:0}.island-heading>span{font-size:8px;margin-top:2px}.lesson-search{width:176px;padding:5px 8px;gap:5px;border-radius:9px}.lesson-search .kid-icon{width:14px;height:14px}.lesson-search input{font-size:10px;padding:1px 0}#lessonGrid{gap:8px}.lesson-card{min-height:77px;padding:9px 8px;gap:8px;border-radius:12px;box-shadow:0 3px #eee3d1}.chapter-art{width:37px;height:43px;border-radius:12px 10px 15px 11px}.chapter-art .kid-icon{width:29px;height:29px}.card-copy>small{font-size:8px;letter-spacing:.6px;margin-bottom:2px}.card-copy strong{font-size:12px;line-height:1.4}.card-status{font-size:8px;margin-top:3px}.home-footer{font-size:8px;padding-top:7px}#emptySearch{padding:8px}#emptySearch .kid-icon{width:35px;height:35px}#emptySearch h3{font-size:14px;margin:5px}#emptySearch p{font-size:10px;margin:4px 0 8px}#emptySearch button{font-size:10px;min-height:27px;padding:5px 9px}.classroom-header{padding:6px 10px;gap:8px}.heading h1{font-size:16px;margin:0 0 3px}.heading p{font-size:13px;line-height:1.4}.home-back{min-height:33px;min-width:62px;font-size:12px;padding:5px 8px;gap:4px;border-radius:10px}.home-back .kid-icon{width:19px;height:19px}.top-tools button{min-height:33px;width:33px;padding:5px}.top-tools .kid-icon{width:19px;height:19px}.classroom-main{padding:6px;gap:6px}.lesson-sidebar{width:124px;gap:5px}.lesson-sidebar>button{min-height:31px;padding:5px 8px;font-size:13px;gap:6px;border-radius:10px}.lesson-sidebar>button .kid-icon{width:21px;height:21px}#steps{gap:2px}#steps button{font-size:12px;line-height:1.35;padding:5px 4px;min-height:28px;gap:4px;border-radius:8px}#steps b{width:17px;height:17px;line-height:17px;font-size:10px;border-radius:6px}#progress{display:none}#subQuestions button{font-size:11px;min-height:27px;padding:4px}.board{border-radius:12px}.board-head{padding:5px 9px}.board-head h2{font-size:15px;margin:0}.board-head span{font-size:10px}.board-head button{min-height:28px;font-size:11px;padding:5px 7px;border-radius:8px}#scene{padding:2px 7px}#explanation{font-size:12px;padding:4px 9px;line-height:1.4;min-height:25px}#modelControls{gap:4px;padding:2px 6px 4px}#modelControls button{font-size:12px;min-height:29px;padding:5px 8px;border-radius:9px}.transport{padding:5px 8px;gap:5px}.transport button{min-height:30px;padding:6px 8px;font-size:12px;border-radius:9px}.transport #next{min-width:112px}.transport span{font-size:10px}#exercise{padding:5px 8px;gap:5px}#exercise button{font-size:12px;min-height:30px;padding:5px 7px;border-radius:9px}.answer-field{font-size:12px;gap:3px}.answer-field input,.answer-field select{width:68px;min-height:30px;padding:5px;font-size:13px}.answer-field select{width:78px}.model-table{font-size:14px}.model-table td,.model-table th{padding:4px}.model-table button{min-height:26px;font-size:12px;padding:3px 7px}.solution{font-size:14px;line-height:1.6}.practice-note{font-size:13px}.book-canvas .book-equation{font-size:16px;padding:2px}.money-stock{font-size:12px;gap:3px;min-width:95px}.money-table{font-size:12px}.money-table td,.money-table th{padding:4px}.money-layout .empty-ways{font-size:14px}.model-html th,.model-html td{padding:2px}.model-html table button{min-height:24px;padding:2px 5px;font-size:12px}.model-html .notice{font-size:11px}.practice-guide{font-size:12px;padding:7px 5px}.practice-guide p{margin:8px 0}.practice-guide small{font-size:10px}}
@container mathapp (max-width:720px) and (max-height:520px){.home-layout{grid-template-columns:112px 1fr;gap:9px;padding:8px 9px}.island-choice{padding:4px;gap:3px}.island-icon{width:24px}.island-icon .kid-icon{width:24px;height:24px}.island-copy b{font-size:11px}.island-copy small{font-size:6.5px;letter-spacing:-.2px}.island-arrow{display:none}.welcome-banner{min-height:96px;padding:10px 14px}.welcome-art{width:132px;height:122px;margin-right:-4px}.welcome-copy h1{font-size:22px}.welcome-copy p{font-size:9px}.welcome-copy h1 em{letter-spacing:0}.home-toolbar{margin-top:9px;gap:7px}.island-heading h2{font-size:11px;max-width:200px}.lesson-search{width:155px}.lesson-card{gap:5px;padding:8px 7px;min-height:77px}.chapter-art{width:31px;height:37px}.chapter-art .kid-icon{width:26px;height:26px}.card-copy strong{font-size:11px}.card-status{font-size:7.5px}.home-footer>span:last-child{font-size:7px}.teacher-log{font-size:7px}.home-brand small{display:none}}
@media(orientation:portrait){#courseApp{position:fixed;left:0;top:0;width:100dvh;height:100dvw;max-width:none;transform-origin:top left;transform:translateX(100dvw) rotate(90deg)}}
@keyframes gentle-sway{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-4px) rotate(1deg)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
#explanation{position:relative;padding-left:49px}#explanation:before{content:"";position:absolute;left:12px;top:7px;width:26px;height:26px;background:url("bear-face.svg") center/contain no-repeat}.board-head #stageLabel:before{content:"✦";display:inline-block;margin-right:5px;color:#c59853}.island-choice:focus-visible{outline-offset:1px}
@container mathapp (max-height:520px){#explanation{padding-left:34px}#explanation:before{left:9px;top:4px;width:18px;height:18px}}
@container mathapp (max-width:720px) and (max-height:520px){.island-copy small{font-size:7.5px;letter-spacing:-.1px}}
@container mathapp (max-height:520px){.welcome-banner{height:98px;min-height:98px;padding:8px 19px}.welcome-copy{padding-right:172px}.welcome-copy h1{margin:0 0 3px;font-size:23px}.hello-sticker{display:none}.welcome-copy p{margin:0 0 6px}.welcome-art{position:absolute;width:174px;height:112px;right:8px;top:50%;transform:translateY(-50%);margin:0}.hero-button{min-height:28px}}
@container mathapp (max-width:720px) and (max-height:520px){.welcome-banner{height:90px;min-height:90px;padding:6px 14px}.welcome-copy{padding-right:130px}.welcome-copy h1{font-size:22px}.welcome-copy p{margin-bottom:5px}.welcome-art{width:135px;height:102px;right:7px}.lesson-card{min-height:74px}}
body[data-mode=practice] #scene{min-height:90px}.practice-table-wrap{width:100%;height:100%;overflow:auto;scrollbar-width:thin;padding:5px 0}.condition-table{border-collapse:collapse;max-width:780px;width:96%;margin:auto;text-align:center;font-size:18px;line-height:1.5}.condition-table th,.condition-table td{border:1px solid #dfd4c2;padding:8px}.condition-table th{background:#f3e9ce;font-weight:600;color:#8a744f}.condition-table td{background:#fffdf5}
@container mathapp (max-height:520px){.practice-table-wrap{padding:0}.condition-table{font-size:12px;line-height:1.4;width:100%}.condition-table th,.condition-table td{padding:2px 4px}}

/* The third card line follows the printed table of contents. */
.card-status.book-directory-title{font-size:12px;line-height:1.5;color:#817461;white-space:normal;overflow-wrap:anywhere}.last-lesson .book-directory-title{color:#817461}
.top-tools .read-question{display:flex;align-items:center;justify-content:center;gap:5px;width:auto;min-width:76px;color:#39796e;font-size:13px;white-space:nowrap;padding:8px 10px}.read-question[aria-pressed="true"]{background:#e1f0e7;border-color:#88ac9c}.read-question[data-state="loading"]{color:#8b7551}.read-question[data-state="error"]{color:#98644f}.voice-toast{position:absolute;right:15px;top:58px;max-width:min(340px,70vw);padding:10px 14px;font-size:13px;line-height:1.5;background:#fff5df;border:1px solid #d8c39d;box-shadow:0 3px 12px #69564222;border-radius:10px;z-index:10}.top-tools{position:relative;flex:none}
@container mathapp (max-height:520px){.card-status.book-directory-title{font-size:9px;line-height:1.45;margin-top:3px}.lesson-card{min-height:84px}.top-tools .read-question{width:auto;min-width:57px;font-size:11px;padding:5px 7px;gap:3px}.voice-toast{top:39px;font-size:11px;right:0;max-width:220px}}
@container mathapp (max-width:720px) and (max-height:520px){.card-status.book-directory-title{font-size:8.5px}.lesson-card{padding:8px 7px;min-height:84px}}

#scene .scene-picture{overflow:visible;max-width:none;pointer-events:none;color:#635563}.fruit-segment{transition:d .2s ease}.fruit-line-row{isolation:isolate}

#scene .scene-portrait{pointer-events:none;overflow:visible}#scene .postage-stamp{pointer-events:none}
/* Illustrations support the math: bounded to the classroom SVG and never intercept taps. */
.teaching-art{overflow:visible;pointer-events:none;max-width:none}
.scene-portrait{max-width:none;pointer-events:none}
.math-mover{pointer-events:none}
.timber-piece{transition:transform .24s ease}
.saw-spark{animation:saw-twinkle .3s ease-out both}
@keyframes saw-twinkle{from{opacity:.2;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.timber-piece{transition:none}.saw-spark{animation:none}}
.table-person{display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap}.table-person svg{width:26px;height:26px;flex:none;vertical-align:middle}.stock-note{display:flex;align-items:center;justify-content:center;gap:5px}.stock-note svg{width:66px;height:33px;flex:none}
#courseApp[data-lesson="33"] .model-table th:first-child{width:10%}#courseApp[data-lesson="33"] .model-table th:nth-child(2){width:13%}#courseApp[data-lesson="33"] .model-table button{white-space:nowrap}
@container mathapp (max-height:520px){#courseApp[data-lesson="33"] .table-person svg{width:21px;height:22px}#courseApp[data-lesson="33"] .model-table button{padding:2px 4px}}
/* Keep the drawing visible when a small landscape exercise has several answer fields. */
@container mathapp (max-width:720px) and (max-height:520px){body[data-mode=practice] #exercise{padding:3px 8px;gap:3px 5px}body[data-mode=practice] #explanation{padding:3px 9px}}
/* Paper notes are inline illustrations, not the full-size scene canvas. */
#scene .money-stock .stock-note svg{width:66px;height:33px;max-width:66px;max-height:33px;flex:0 0 66px}
#scene .book-canvas:has(.money-layout) .book-equation{font-size:18px;line-height:1.35;padding:2px;flex:none;max-width:100%;text-align:center}
@container mathapp (max-height:520px){#scene .book-canvas:has(.money-layout) .book-equation{font-size:12px;line-height:1.35}}
@container mathapp (max-height:520px){#scene .book-canvas .money-layout .money-table td,#scene .book-canvas .money-layout .money-table th{padding:2px 4px;line-height:1.3}}
@container mathapp (max-height:520px){
#scene .money-stock{font-size:11px;line-height:1.1;gap:1px}
#scene .money-stock .stock-note svg{width:58px;height:28px;max-width:58px;max-height:28px;flex:0 0 58px}
#scene .book-canvas:has(.money-layout) .book-equation{line-height:1.2;padding:2px}
}
