/* A sunlit learning nook, with the task kept clear and central. */
body.earning-screen .app{background-color:#fff6e6;background-image:radial-gradient(ellipse at 15% 10%,#fffdf3 0,transparent 55%),url('paper-grain.svg');background-size:auto;background-position:initial;padding-bottom:calc(106px + env(safe-area-inset-bottom))}
.earning-screen header{padding:3px 3px 5px;margin-bottom:7px}.earning-screen #screen-title{color:#476856!important}.earning-screen #main{gap:9px}
.earning-screen .settings{border:1.5px solid #c9af7e;background:#fff4dcdd;box-shadow:inset 0 2px #fffaf0,0 2px #c9ac7940;border-radius:17px;padding:4px;gap:5px}.earning-screen .settings .chip{border-radius:12px;padding:8px 3px;font-size:14px;font-weight:600;color:#7e6848;min-height:37px}.earning-screen .settings .chip.active{background:linear-gradient(#49bca7,#229883);color:white;border:1px solid #227c6c;box-shadow:inset 0 2px #9fe0c7,0 2px #286e5d;text-shadow:0 1px #246655}
.earning-screen .puzzle.math-nook-card{position:relative;isolation:isolate;padding:12px 15px 10px;border:3px solid #c99e60;border-radius:26px;background:linear-gradient(145deg,#fffdf4,#fff5de);box-shadow:inset 0 0 0 2px #fffdf4,0 4px #a77a45,0 7px 19px #6b4b2720;overflow:visible}
.earning-screen .puzzle>.row{display:flex;align-items:center;justify-content:space-between;min-height:64px;padding-left:53px;gap:8px}.earning-screen .puzzle>.row>b{display:flex;flex-direction:column;gap:4px;text-align:left;color:#526d56;line-height:1.15;font-size:16px}.earning-screen .puzzle>.row>b small{font-size:9px;letter-spacing:1.5px;color:#9a8057}.earning-screen .puzzle>.math-buddy{display:block;position:absolute;left:13px;top:8px;width:45px;height:78px;margin:0;pointer-events:none;filter:drop-shadow(0 3px 2px #6c543324)}.earning-screen .math-buddy svg{width:100%;height:100%}
.earning-screen .math-reward{display:grid;grid-template-columns:auto auto;column-gap:3px;align-items:center;padding:7px 9px;border:1.5px solid #d8a74c;border-radius:15px;background:linear-gradient(#fff2b0,#ffda70);box-shadow:inset 0 2px #fff9d8,0 2px #d6af61;color:#7c541d}.math-reward>span{font-size:21px;grid-row:span 2}.math-reward>b{font-size:19px;line-height:1}.math-reward>small{font-size:9px;line-height:1.1}
.earning-screen .equation{font-size:clamp(34px,6.3dvh,53px);font-weight:600;letter-spacing:1px;color:#425f50;background:#edf3df;border:1px solid #cedbb9;border-radius:17px;padding:12px 4px;margin:10px 0;box-shadow:inset 0 2px #fbfff4;text-shadow:0 1px #fff;line-height:1.1}
.earning-screen .answer{width:156px;font-size:31px;line-height:1.2;min-height:48px;padding:6px;border:2px solid #c6a66a;border-radius:15px;background:#fffef8;color:#49624e;box-shadow:inset 0 3px 5px #9a733018,0 2px #ead9b7}.earning-screen .answer.correct-answer{background:#e5f7dc;border-color:#58a56b;color:#327c45}.earning-screen .answer.wrong{background:#fff0e9;border-color:#d16d5a;color:#a34336}
.earning-screen .feedback{color:#7e7359;font-size:12px;line-height:1.25;min-height:29px;margin:4px 0 0}.earning-screen .feedback.success-text{color:#328351;font-weight:600}.earning-screen .feedback.wrong-feedback{color:#ad493a}
.earning-screen .keypad{max-width:370px;gap:8px;margin:5px auto 9px}.earning-screen .keypad button{font-family:inherit;font-size:clamp(22px,3.3dvh,30px);font-weight:600;border:1.5px solid #d4b17a;border-radius:14px;background:linear-gradient(#fffdf6,#f7e5bc);color:#725132;box-shadow:inset 0 2px white,0 3px #c4a06a;min-height:39px;text-shadow:0 1px #fff7df}.earning-screen .keypad button[data-key="✓"]{background:linear-gradient(#59cda6,#2ba67f);border-color:#298a69;color:white;box-shadow:inset 0 2px #a6eccb,0 3px #267a5e;text-shadow:0 1px #277653}.earning-screen .keypad button[data-key="⌫"]{background:linear-gradient(#ffddc7,#f3b69c);border-color:#cf9376;color:#89513a;box-shadow:inset 0 2px #ffede0,0 3px #bc8569}.earning-screen .keypad button:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 1px #fff8,0 1px #bd9d68}.earning-screen #hint{min-height:31px;padding:5px 12px;border:1px solid #dbc697;background:#fff8e3;border-radius:13px;color:#84704d;box-shadow:inset 0 1px #fff;font-size:12px}
@media(max-height:720px){.earning-screen .puzzle.math-nook-card{padding:8px 11px}.earning-screen .puzzle>.row{min-height:48px;padding-left:40px}.earning-screen .puzzle>.math-buddy{width:33px;height:58px;left:12px;top:6px}.earning-screen .puzzle>.row>b{font-size:14px}.earning-screen .equation{padding:8px 3px;margin:7px 0}.earning-screen .answer{min-height:40px;padding:4px;font-size:27px}.earning-screen .keypad{gap:6px;margin:3px auto 7px}.earning-screen .keypad button{min-height:33px;font-size:23px}.earning-screen .settings .chip{min-height:32px;padding:5px 3px}.earning-screen .feedback{min-height:25px;font-size:11px}}
@media(max-height:590px){body.earning-screen{overflow:auto}.earning-screen .app{height:auto;min-height:100dvh;overflow:visible}.earning-screen #main{min-height:410px}.earning-screen .puzzle{min-height:360px}.earning-screen .keypad{flex:none;grid-template-rows:repeat(4,38px)}}
/* V113: let the problem lead; no character or decorative heading. */
.earning-screen .puzzle.math-nook-card>.row{min-height:22px;padding:0;justify-content:flex-end}.earning-screen .math-simple-reward{font-size:13px;font-weight:600;line-height:1.2;color:#a17735;padding:2px 1px;background:none;border:0;box-shadow:none}.earning-screen .puzzle.math-nook-card>.math-buddy{display:none}

/* V116: keep the shared header clean; illustration belongs to the task area. */
.earning-screen .math-answer-tools{display:flex;align-items:center;justify-content:center;gap:12px;max-width:100%;margin:auto}
.earning-screen .math-answer-tools .answer{margin:0!important;min-width:0}
.earning-screen .math-report-shortcut{display:grid;place-items:center;flex:none;box-sizing:border-box;width:48px;height:48px;padding:9px;font:inherit;border:1.5px solid #d4b17a;border-radius:14px;background:linear-gradient(#fffdf6,#f7e5bc);color:#725132;box-shadow:inset 0 2px white,0 3px #c4a06a;cursor:pointer}
.earning-screen .math-report-shortcut svg{width:27px;height:27px}
.earning-screen .math-report-shortcut:active{transform:translateY(2px);box-shadow:inset 0 1px #fff8,0 1px #bd9d68}
.earning-screen .math-report-shortcut:focus-visible{outline:3px solid #1b817e;outline-offset:3px}
@media(max-height:720px){.earning-screen .math-report-shortcut{width:44px;height:44px;padding:8px}}
@media(orientation:landscape) and (max-height:500px){.earning-screen .math-answer-tools{grid-column:1;grid-row:3;gap:6px}.earning-screen .math-answer-tools .answer{width:min(156px,22vw)}}
.earning-screen #main{background-image:linear-gradient(#fff8e250,#fff8e280),url('math-nook-v110.webp');background-size:cover;background-position:center top;border-radius:20px}.earning-screen header{padding:0 0 8px;margin-bottom:10px}.earning-screen #screen-title{color:var(--ink)!important}

/* Keep all four difficulty tabs on a single row, including narrow phones. */
.earning-screen #main>.settings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;min-width:0}.earning-screen #main>.settings .chip{min-width:0;white-space:nowrap;padding-inline:3px;font-size:clamp(12px,3.3vw,14px)}
