@font-face{font-family:PaperBrush;src:url('../assets/fonts/ma-shan-zheng.ttf') format('truetype');font-display:block;font-weight:400}
.mother-sprite{display:block;position:relative;pointer-events:none!important;flex:none}
/* Alpha-zero atlas gutters must never make a focused control scroll the stage. */
#stage,#viewport{overflow:clip}
.mother-sprite>img{position:absolute;max-width:none;object-fit:fill;pointer-events:none!important}
.ui-symbol{width:36px;height:36px;fill:currentColor;pointer-events:none}
.art-button,.round-button,.map-node,h2{font-family:PaperBrush,PaperCJK,serif;font-weight:400}
.home-mother-art{position:absolute;inset:0 auto auto 0;width:780px;height:auto;pointer-events:none!important;mask-image:linear-gradient(#000 calc(100% - 8px),transparent)}
.home-title,.home-sub{position:absolute!important;left:0!important;top:0!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);background:none!important}
.home-actions{top:800px}
.home-actions>.primary{width:520px;height:173.333px;font-size:50px;letter-spacing:3px;color:#102d21}
.home-tools{gap:58px;margin-top:-12px}
.home-tools .round-button{width:100px;height:100px;background:none;color:#151b16;isolation:isolate}
.circle-art{position:absolute;z-index:-1;left:3px;top:0}
.home-tools .ui-symbol{position:absolute;left:34px;top:15px;width:32px;height:32px}
.circle-label{position:absolute;left:0;top:59px;width:100%;font-family:PaperBrush,PaperCJK,serif;font-size:24px;line-height:1.1;color:#121a14}
.home-note{font-family:PaperBrush,PaperCJK,serif;font-size:22px;line-height:1.2;margin-top:9px;letter-spacing:2px;color:#171b14}
.home-note::before,.home-note::after{content:'◆';font-size:10px;display:inline-block;width:58px;vertical-align:middle;border-top:1px solid #6b654d;line-height:0;margin:0 14px;color:#4e4b39}
.continue-badge{top:779px;font-family:PaperBrush,PaperCJK,serif;font-size:20px;line-height:24px;background:#f7eedbc9;color:#171f17}

#stage[data-mode=map] #scenery{background-image:url('../assets/images/map-scene-mother.png')!important;opacity:1!important;background-size:780px 1080px}
#stage[data-mode=map] #scenery::after{display:none}
.map-mother-heading{position:absolute;left:0;top:0;width:780px;height:190.244px;pointer-events:none!important}
.map-mother-heading>img{width:780px;height:auto;mask-image:linear-gradient(#000 calc(100% - 16px),transparent)}
.map-mother-heading>h1,.map-mother-heading>p{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.map-node{position:absolute;padding:0;display:block;isolation:isolate;z-index:2;background:none!important;color:#191e14}
.map-node .map-marker{position:absolute;left:0;top:0;z-index:-1}
.map-node .map-number{position:absolute;left:19%;top:10%;width:62%;height:54%;font-family:PaperBrush,PaperCJK,serif;font-size:44px;line-height:1;display:grid;place-items:center;border:0;border-radius:0;background:none;color:#211f14}
.map-node.selected .map-number{color:#fff7d9;font-size:50px}
.map-node .map-label{position:absolute;left:0;top:75%;width:100%;height:24%;padding:0;margin:0;font-family:PaperBrush,PaperCJK,serif;font-size:23px;line-height:1;letter-spacing:1px;color:#141c12;display:grid;place-items:center;background:none}
.map-node.selected .map-label{font-size:26px}
.map-label::before{display:none}
.map-lock{position:absolute;left:71%;top:32%;width:30px;height:36px;object-fit:contain}
.map-finished{position:absolute;left:77%;top:39%;width:24px;height:24px;border-radius:50%;background:#f6edd6;color:#1a6c41;border:1px solid #796b43;display:grid;place-items:center}
.map-finished .ui-symbol{width:17px;height:17px}
.map-detail{left:21px;top:738px;width:738px;height:234px;padding:0;display:block;gap:0}
.map-detail .vignette{position:absolute;left:48px;top:22px;width:313px;height:193px;max-width:none;border-radius:0;object-fit:cover;mask-image:linear-gradient(to right,transparent,#000 9%,#000 90%,transparent),linear-gradient(to bottom,transparent,#000 8%,#000 91%,transparent);mask-composite:intersect}
.map-detail .map-card-copy{position:absolute;left:365px;top:23px;width:347px}
.map-card-heading{display:flex;gap:8px;align-items:center;white-space:nowrap}
.map-detail h2{font-family:PaperBrush,PaperCJK,serif;font-size:50px;line-height:1.1;letter-spacing:1px;color:#062c1d;margin:0}
.chapter-red-mark{font-family:PaperBrush,serif;display:grid;place-items:center;border:2px solid #ac2923;color:#ac2923;font-size:19px;width:21px;height:29px;line-height:1;transform:rotate(-3deg);margin-top:12px}
.map-detail p{font-family:PaperBrush,PaperCJK,serif;font-size:24px;line-height:1.25;letter-spacing:1px;margin-top:12px;color:#141b13;white-space:nowrap;text-wrap:nowrap}
.map-detail .map-objectives{position:absolute;left:374px;top:116px;display:flex;gap:54px;width:auto}
.map-objectives>div{width:70px;flex:none;display:flex;align-items:center;flex-direction:column;gap:4px}
.map-objectives img{width:70px;height:70px;object-fit:contain;clip-path:circle(48%)}
.map-objectives span{font-family:PaperBrush,PaperCJK,serif;font-size:20px;line-height:1.15;white-space:nowrap;color:#171e12}
.map-enter{left:235px;top:969px}
.map-enter .primary.dark-primary{position:relative;display:block;width:360px;height:114.2px;min-height:0;padding:0;background:none;font-family:PaperBrush,PaperCJK,serif;color:#fff4cf;font-size:46px;letter-spacing:3px;isolation:isolate}
.dark-primary .dark-plate{position:absolute;inset:0;z-index:-1}
.map-enter .dark-primary>span:last-child{position:absolute;left:14px;top:17px;width:282px;text-align:center;line-height:1}
.map-back{left:79px;top:981px;width:90px;height:92px;background:none;isolation:isolate}
.map-back .circle-art{left:3px;top:0}
.map-back .ui-symbol{position:absolute;width:30px;height:30px;left:30px;top:12px}
.map-back .circle-label{top:51px;font-size:23px}

/* Fixed, independently visible components copied from the approved mother. */
.home-actions{top:785px}
.home-tools{margin-top:-21px}
.home-note{margin-top:7px;font-size:20px}
.native-l1-card{background:none}
.native-l1-card::before{display:none}
.native-l1-card>.native-card{position:absolute;inset:0;width:738px;height:auto;pointer-events:none}
.native-l1-card>.vignette,.native-l1-card>.map-card-copy,.native-l1-card>.map-objectives{clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.map-enter{left:232.68px;top:971.7px}
.mother-map-enter{display:block;width:365.85px;height:108.29px;padding:0}
.mother-map-enter>img{display:block;width:100%;height:auto;pointer-events:none}
.mother-map-back{position:absolute;left:80.49px;top:973.17px;width:95.12px;height:88.54px;padding:0}
.mother-map-back>img{display:block;width:100%;height:auto;pointer-events:none}
.map-node .map-number,.map-node .map-label{-webkit-text-stroke:.55px currentColor}
.map-node.selected .map-marker{filter:drop-shadow(0 0 4px #fff8b8)}
.map-detail h2{-webkit-text-stroke:.8px currentColor}
.map-detail{height:230.625px;background:#f4e8cf url('../assets/images/paper-texture.png') center/780px 1080px}
.map-detail:not(.native-l1-card)::before{inset:0;border:0;background:url('../assets/images/map-card-frame-native.png') center/100% 100% no-repeat;mask-image:linear-gradient(to right,#000 11px,transparent 30px,transparent calc(100% - 120px),#000 calc(100% - 78px)),linear-gradient(to bottom,#000 10px,transparent 26px,transparent calc(100% - 26px),#000 calc(100% - 10px)),radial-gradient(circle at left top,#000 38px,transparent 64px),radial-gradient(circle at left bottom,#000 38px,transparent 64px);mask-size:100% 100%;mask-position:center;mask-repeat:no-repeat}
.map-detail .chapter-red-mark{width:22px;height:30px;display:block;object-fit:contain;border:0;transform:none;margin-top:12px}

/* The board remains a square; every sprite keeps a uniform scale. */
#stage[data-mode=playing] #scenery{background-image:url('../assets/images/play-scene-mother.png')!important;opacity:1!important;background-size:780px 1080px}
#stage[data-mode=playing] #scenery::after{display:none}
/* Leave the complete corner glyph/ice/wood silhouettes inside the jade curls.
   One uniform square applies to every chapter; no per-cell sprite shrink. */
#board{left:96px;top:260px;width:588px;height:588px;border-radius:8px;z-index:2}
.board-frame{position:absolute;left:48px;top:230px;width:684px;height:648px;pointer-events:none!important;background:none;border:0;border-radius:0;box-shadow:none;z-index:3}
#stage[data-mode=playing] #screen::before{content:'';position:absolute;left:78px;top:252px;width:624px;height:604px;border-radius:24px;background:#eee6d1 url('../assets/images/paper-texture.png') center/780px 1080px;pointer-events:none;z-index:1}
.hud-title{left:252px;top:27px;width:276px;height:60px;background:none;font-family:PaperBrush,PaperCJK,serif;font-size:24px;letter-spacing:1px;color:#141b13;font-weight:400;display:block;isolation:isolate}
.hud-title::before{display:none}
.hud-title-art{position:absolute;left:0;top:0;z-index:-1}
.hud-title>span:last-child{position:absolute;left:20px;top:11px;width:230px;text-align:center;white-space:nowrap}
.hud-home{left:20px;top:24px;width:88px;height:88px;color:#1d291d;opacity:1;isolation:isolate;padding:0;z-index:5}
.hud-home .hud-back-circle{position:absolute;left:7px;top:4px;z-index:-1}
.hud-home .ui-symbol{position:absolute;left:29px;top:14px;width:30px;height:30px}
.hud-home .hud-back-label{position:absolute;left:0;top:46px;width:100%;font-family:PaperBrush,PaperCJK,serif;font-size:26px;line-height:1;text-align:center}
.hud-pause{left:686px;top:-4px;width:72px;height:169px;display:block;padding:0}
.hud-pause .pause-art{position:absolute;top:0;left:0}
.hud-strip{left:90px;top:160px;width:610px;height:91px;background:none;padding:12px 31px 16px;gap:5px;isolation:isolate}
.hud-strip::before{display:none}
.hud-strip-art{position:absolute;left:0;top:0;z-index:-1}
.goals{gap:12px;align-items:center}
.goal{min-width:0;gap:8px;flex:1;color:#17190f}
.goal .goal-art{flex:none;position:relative;display:block}
.goal-art:not(.mother-sprite){width:45px;height:54px}
.goal-art:not(.mother-sprite)>img{display:block;width:100%;height:100%;object-fit:contain}
.goal-label{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.goal-value{font-family:PaperBrush,PaperCJK,serif;font-size:30px;font-weight:400;line-height:1}
.moves{width:139px;padding-left:15px;gap:6px;border-color:#9c845855;color:#ad211c}
.moves strong{font-family:PaperBrush,PaperCJK,serif;font-size:65px;font-weight:400;-webkit-text-stroke:1px currentColor}
.moves span{font-family:PaperBrush,PaperCJK,serif;font-size:27px;color:#161b12}
.moves .moves-icon{display:none}
.hud-strip:has(.goal:nth-child(3)){padding-left:25px;padding-right:24px}
.hud-strip:has(.goal:nth-child(3)) .goals{gap:7px}
.hud-strip:has(.goal:nth-child(3)) .goal{gap:4px}
.hud-strip:has(.goal:nth-child(3)) .goal-value{font-size:25px}
.hud-strip:has(.goal:nth-child(3)) .moves{width:112px}
.hud-strip:has(.goal:nth-child(3)) .moves strong{font-size:58px}
.hud-helper{left:180px;top:886px;width:420px;height:34px;border:1px solid #b4a380;border-radius:18px;font-family:PaperBrush,PaperCJK,serif;font-size:24px;line-height:32px;color:#1b2015;letter-spacing:1px;background:#f3ead4b5;padding:0 10px}
.hud-helper::before,.hud-helper::after{content:'❧';position:absolute;top:0;color:#a28b5f;font-size:30px;line-height:28px}
.hud-helper::before{left:-23px}.hud-helper::after{right:-23px;transform:scaleX(-1)}
.hud-helper.tool-instruction{left:112px;top:886px;width:556px;height:34px;padding:0 12px;font-size:24px;line-height:32px;white-space:nowrap;background:#f5ead8f2}
.tool-bar{left:171px;top:923px;gap:26px}
.tool{display:block;width:125px;height:145px;padding:0;isolation:isolate;font-family:PaperBrush,PaperCJK,serif;color:#17190f}
.tool::before{display:none}
.tool .tool-art{position:absolute;inset:0;z-index:-1;background:none;border:0;border-radius:0}
.tool .tool-art img{position:absolute;max-width:none;object-fit:fill}
.tool>span:not(.tool-art){position:absolute;left:0;top:111px;bottom:auto;width:125px;height:31px;background:none;border:0;border-radius:0;font-family:PaperBrush,PaperCJK,serif;font-size:27px;line-height:30px}
.tool>b{position:absolute;left:90px;top:84px;width:29px;height:29px;min-width:0;background:none;border:0;font-family:PaperBrush,PaperCJK,serif;font-size:25px;line-height:29px}
.tool.active .tool-art{filter:drop-shadow(0 0 5px #ce912f)}

/* Pause/settings follows the original tall panel and parallel action rows. */
.modal.settings{position:absolute;left:84px;top:110px;width:612px;height:914px;min-height:0;max-height:914px;padding:0;color:#141c13;overflow:visible}
.settings>h2{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.settings .modal-body{position:absolute;inset:0;display:block;padding:0;overflow:visible}
.settings-mother-heading{position:absolute;left:20px;top:15px;width:572px;height:auto;pointer-events:none;mask-image:radial-gradient(ellipse 105px 112px at 100% 0,transparent 68%,#000 100%),radial-gradient(ellipse 55px 75px at 0 0,transparent 60%,#000 100%),linear-gradient(#000 88%,transparent);mask-composite:intersect}
.settings .setting-row{position:absolute;left:66px;top:267px;display:flex;align-items:center;justify-content:normal;gap:15px;width:480px;height:70px;min-height:0;padding:0 27px;border:1px solid #c3ad7b88;border-radius:35px;background:#eee3c734;font-family:PaperBrush,PaperCJK,serif;font-size:31px;color:#111b13}
.settings .setting-row:nth-of-type(2){top:344px}.settings .setting-row:nth-of-type(3){top:421px}
.setting-symbol{width:38px;text-align:center;font-family:PaperCJK,serif;font-size:35px;color:#123e2d}
.settings .switch{margin-left:auto;width:102px;height:65px;min-height:0;flex:none;background-size:contain}
.settings .teaching-link{position:absolute;left:72px;top:509px;width:468px;height:129px;padding:0;display:block}
.teaching-link>img{display:block;width:100%;height:auto;pointer-events:none}
.settings .modal-actions{position:absolute;left:0;top:632px;width:100%;margin:0;display:flex;align-items:center;flex-direction:column;gap:0}
.setting-symbol .ui-symbol{width:36px;height:36px}
.settings-secondary .ui-symbol{width:29px;height:29px;margin-right:8px;flex:none}
.settings-save-note{white-space:nowrap}
.settings .settings-save-note{font-size:20px;line-height:24px;margin-top:5px}
.settings .modal-actions>.primary{width:492px;height:164px;min-height:0;font-size:48px;letter-spacing:3px;color:#082e1e}
.settings-secondary{display:flex;gap:12px;margin-top:-12px}
.settings-secondary .art-button.secondary{width:212px;min-width:0;height:72px;min-height:0;font-size:25px;padding:0 19px;white-space:nowrap}
.settings-save-note{font-family:PaperBrush,PaperCJK,serif;font-size:22px;color:#24281b;margin-top:11px;line-height:30px}
.settings .close{z-index:5}

/* Dedicated vertical hanging scroll and separate real result controls. */
#stage[data-mode=result] #scenery{background-image:url('../assets/images/result-scene-mother.png')!important;opacity:1!important;background-size:780px 1080px}
#stage[data-mode=result] #scenery::after{display:none}
/* Completed board feedback ends at the result boundary; do not fade it over stars. */
#stage[data-mode=result] #toast:not(.show){transition:none}
/* Routine board feedback uses the existing instruction band, outside the board. */
#stage[data-mode=playing] #toast{top:886px;left:112px;width:556px;height:34px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;font:24px/34px PaperBrush,PaperCJK,serif;color:var(--ink);white-space:nowrap;transition:none}
#stage[data-mode=playing]:has(#toast.show) #helper{visibility:hidden}
.result-mother-heading{position:absolute;left:0;top:0;width:780px;height:auto;pointer-events:none!important;mask-image:linear-gradient(#000 92%,transparent)}
.result-mother-heading.shared-heading{mask-image:linear-gradient(to right,#000 352px,transparent 352px,transparent 428px,#000 428px),linear-gradient(to bottom,#000 178px,transparent 178px)}
.result-title{top:57px;left:30px;width:720px;font-family:PaperBrush,PaperCJK,serif;font-size:104px;letter-spacing:3px;color:#111910;-webkit-text-stroke:1.7px currentColor;text-align:center;line-height:1.25}
.result-sub{top:179px;left:354px;width:72px;height:68px;padding:4px;background:#ad2723;color:#fff2d3;font-family:PaperBrush,PaperCJK,serif;font-size:24px;line-height:26px;border:3px double #f8e7c2;text-align:center;letter-spacing:1px}
.native-heading-label{clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.result-scroll{left:165px;top:245px;width:450px;height:644px;padding:0;display:block;background:none;isolation:isolate}
.result-scroll::before,.result-scroll::after{display:none}
.result-scroll-art{position:absolute;left:0;top:0;z-index:-1}
.result-lantern{position:absolute;left:158px;top:39px;width:120px;height:180px;object-fit:contain}
.result-lantern-art{position:absolute;left:164px;top:42px}
.result-stars{position:absolute;left:48px;top:239px;width:330px;display:flex;justify-content:center;gap:7px;margin:0}
.result-star{position:relative;display:block;width:102px;height:102px;flex:none}
.result-stars>img{width:102px;height:102px;object-fit:contain}
.result-stats{position:absolute;left:49px;top:349px;width:331px;display:flex;justify-content:space-around;margin:0;padding-top:18px;border-top:1px solid #a8905e77;font-family:PaperBrush,PaperCJK,serif;font-size:25px;color:#151f14;isolation:isolate}
.result-stats::before{content:'';position:absolute;inset:-7px -8px -9px;z-index:-1;background:center/600px auto url('../assets/images/paper-texture.png');mask-image:linear-gradient(to right,transparent,#000 5%,#000 95%,transparent),linear-gradient(to bottom,transparent,#000 6%,#000 94%,transparent);mask-composite:intersect;pointer-events:none}
.result-stats>div{flex:1;text-align:center;border-right:1px solid #b09d7155}
.result-stats>div:last-child{border:0}
.result-stat-icon{display:block;width:40px;height:38px;margin:0 auto 3px;object-fit:contain;mask-image:linear-gradient(to right,transparent,#000 12%,#000 88%,transparent),linear-gradient(to bottom,transparent,#000 12%,#000 88%,transparent);mask-composite:intersect}
.result-stats b{font-family:PaperBrush,PaperCJK,serif;font-size:47px;color:#052d1b;line-height:1.3;font-weight:400;font-variant-numeric:tabular-nums}
.result-stats small{font-size:24px}
.result-text{position:absolute;left:53px;top:500px;width:325px;text-align:center;margin:0;padding-top:12px;border-top:1px solid #a8905e77;font-family:PaperBrush,PaperCJK,serif;font-size:23px;line-height:1.3;color:#121b11;isolation:isolate}
/* Sample the same scroll's blank paper, at its existing 450/982 body scale.
   Broad feathering avoids a foreign rectangular strip over the landscape. */
.result-text::before{content:'';position:absolute;inset:-8px -16px -14px;z-index:-1;background:-57.281px -320.774px/482.994px 683.707px no-repeat url('../assets/images/result-scroll-mother.png');mask-image:linear-gradient(to right,transparent,#000 20%,#000 80%,transparent),linear-gradient(to bottom,transparent,#000 25%,#000 75%,transparent);mask-composite:intersect;pointer-events:none}
.result-buttons{left:0;top:827px;width:100%;gap:0}
.dark-action{position:relative;display:block;padding:0;background:none;min-height:0;isolation:isolate;font-family:PaperBrush,PaperCJK,serif;color:#fff0c9;font-size:43px;letter-spacing:3px}
.dark-action .dark-plate{position:absolute;left:0;top:0;z-index:-1}
.dark-action>span:last-child{position:absolute;left:12px;top:25px;width:calc(100% - 80px);line-height:1;text-align:center}
.result-buttons>.secondary{margin-top:-5px;width:282px;min-width:0;height:69px;min-height:0;font-size:29px;padding:0 38px}
.result-buttons>.plain-button{margin-top:5px;font-family:PaperBrush,PaperCJK,serif;font-size:24px;min-height:44px;padding:5px 20px;border:0;color:#171e13}
.modal.restoration{width:650px;height:926px;padding:78px 60px 40px;overflow:visible}
.restoration h2{font-size:40px;line-height:1.2;letter-spacing:2px;margin-bottom:18px}
.restoration .modal-body{flex:none;overflow:hidden;padding:0}
.restoration-hero{display:block;flex:none;width:510px;height:510px;object-fit:contain;border:2px solid #517c65;border-radius:9px}
.restoration-note{font-family:PaperBrush,PaperCJK,serif;font-size:27px;line-height:1.4;margin-top:12px}
.restoration .modal-actions{margin-top:18px}
.intro-delivery{display:flex;align-items:center;justify-content:center;gap:13px;width:190px;height:84px;margin:0 auto 12px;color:#28553e;font:30px PaperCJK,serif}
.intro-delivery img{display:block;object-fit:contain}
.intro-delivery-lantern{width:44px;height:76px}
.intro-delivery-exit{width:80px;height:80px}

/* The 296x384 panel has complete corner ornaments within 96px on each side.
   Nine-slice keeps those source corners square in short and tall dialogs. */
.modal::after{content:'';position:absolute;inset:18px;z-index:-2;border-radius:24px;background:center/780px 1080px url('../assets/images/paper-texture.png');pointer-events:none}
.modal::before{background:none;border:96px solid transparent;border-image:url('../assets/images/panel.png') 96 fill stretch;mask-image:linear-gradient(to right,#000 24px,transparent 42px,transparent calc(100% - 42px),#000 calc(100% - 24px)),linear-gradient(to bottom,#000 24px,transparent 42px,transparent calc(100% - 42px),#000 calc(100% - 24px)),radial-gradient(circle at 24px 24px,#000 54px,transparent 78px),radial-gradient(circle at calc(100% - 24px) 24px,#000 54px,transparent 78px),radial-gradient(circle at 24px calc(100% - 24px),#000 54px,transparent 78px),radial-gradient(circle at calc(100% - 24px) calc(100% - 24px),#000 54px,transparent 78px)}
/* Preserve the full 268x303 close sprite inside the existing 88px hit box. */
.modal .close{background-size:62px auto}

/* r24: native rendering of unchanged approved settings sheet regions. */
.settings .setting-row{left:70px;width:472px;padding-left:45px;padding-right:34px}
.setting-row-curls{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1}
.settings .setting-row{isolation:isolate}
.settings .switch{width:114px;height:65px}
.mother-button-frame{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1}
.art-button.secondary{background:#f3e9d2 url('../assets/images/paper-texture.png') center/780px 1080px;border:0;clip-path:polygon(6% 0,94% 0,100% 17%,100% 83%,94% 100%,6% 100%,0 83%,0 17%)}
.art-button.secondary::before{display:none}

/* r26: quota warning shares the non-interactive instruction band.
   Board ends at848 LU, frame878; this band is886..920, tools start923.
   Keep all49 cells and all three tool controls unobscured during play. */
#stage[data-mode=playing] #toast.save-warning{color:#8d241c;background:#f5ebd8f2;font-size:24px;white-space:nowrap}

/* r27: keep the mother HUD's red count on quiet paper, with the bamboo
   still visible to its left. The feathered inset never covers the jade edge. */
.moves{isolation:isolate}
.moves::before{content:'';position:absolute;inset:-5px -2px -10px -8px;z-index:-1;pointer-events:none;background:#f4e8cf url('../assets/images/paper-texture.png') center/780px 1080px;mask-image:linear-gradient(to right,transparent,#000 12%,#000 92%,transparent),linear-gradient(to bottom,transparent,#000 12%,#000 92%,transparent);mask-composite:intersect}
/* Mother statistics use upright weight and stable numerals, rather than the
   display brush's narrow leaning digits. Reuse the existing licensed face. */
.moves strong{font-family:PaperCJK,serif;font-weight:700;font-size:61px;-webkit-text-stroke:.85px currentColor}
.hud-strip:has(.goal:nth-child(3)) .moves strong{font-size:52px}
.result-stats b{font-family:PaperCJK,serif;font-weight:700;font-size:47px;-webkit-text-stroke:.45px currentColor}
.settings .settings-save-note{margin-top:-3px;line-height:22px}
.intro .intro-goal-item{display:inline-block;white-space:nowrap}

/* r29: modal save notes own this message; transient warnings stay below the scrim. */
#stage.paused #toast{visibility:hidden}

/* r30: keep the mother's paper, labels and counts opaque when input is disabled.
   Desaturate the illustrated tool alone, including during a busy animation. */
.tool:disabled{opacity:1;filter:none}
.tool:disabled .tool-art{filter:grayscale(.9)}

/* r31 focus draft: retain a keyboard-visible accent following the painted
   jade alpha instead of the button's rectangular hit box. Geometry is intact. */
.modal.error .art-button.primary:focus-visible,
.modal.recovery .art-button.primary:focus-visible {
  outline:0;
  filter:drop-shadow(3px 0 0 #a5342b) drop-shadow(-3px 0 0 #a5342b) drop-shadow(0 3px 0 #a5342b) drop-shadow(0 -3px 0 #a5342b) drop-shadow(0 0 2px #fff0c9);
}
/* Preserve a native system-color focus indicator if forced colors are used.
   This fallback is not a claim of completed high-contrast device testing. */
@media (forced-colors:active) {
  .modal.error .art-button.primary:focus-visible,
  .modal.recovery .art-button.primary:focus-visible {
    outline:3px solid Highlight;
    outline-offset:3px;
    filter:none;
  }
}

/* Phone auxiliary copy remains in its existing single-line paper band.
   The wider band already belongs to tool instructions and transient feedback.
   All board, tool and mother panel geometry remains intact. */
@media (max-width:480px) {
  .hud-helper { left:112px; width:556px; font-size:28px; white-space:nowrap; }
  .hud-helper.tool-instruction { font-size:28px; }
  #stage[data-mode=playing] #toast,
  #stage[data-mode=playing] #toast.save-warning { font-size:28px; }
  .settings .settings-save-note { font-size:28px; line-height:32px; }
}

/* Actual result-mother contour; settings secondary frames keep their source. */
.result-buttons>.secondary{clip-path:none;background:none}
.result-buttons>.secondary[data-mother-label-painted="true"]{color:transparent;text-shadow:none;-webkit-text-stroke:0}

/* Dynamic seals use the adopted mother's original irregular inked rim. */
.result-sub:not(.native-heading-label){left:358.14px;top:180.90px;width:62.99px;height:70.31px;padding:0;border:0;background:none;display:flex;align-items:center;justify-content:center;font-size:22px;line-height:26px;letter-spacing:1px;-webkit-text-stroke:.25px currentColor}
.result-seal-art{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.result-seal-label{position:relative;z-index:1}

/* Shared title keeps the original bottom feather. Intersect it with the
   union that removes the old chapter print, so no baked scroll cap leaks. */
.result-mother-heading.shared-heading{mask-image:linear-gradient(#000 92%,transparent),linear-gradient(to right,#000 352px,transparent 352px,transparent 428px,#000 428px),linear-gradient(to bottom,#000 178px,transparent 178px);mask-composite:intersect,add}

/* The adopted title crop includes a sliver of its old scroll end. Exclude
   only that source corner; its lantern, seal and the real scroll are separate. */
.result-mother-heading.shared-heading{clip-path:polygon(0 0,100% 0,100% 100%,618px 100%,618px 239px,563px 239px,563px 100%,0 100%)}
