:root{font-family:Tahoma,"Leelawadee UI",sans-serif;color:#064c50;background:#fcfaf6;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,select{font:inherit;color:inherit}button{min-height:48px;border:1px solid #bac7c7;border-radius:12px;background:#fffdf9;padding:10px 18px;cursor:pointer;touch-action:manipulation}button:hover{background:#eaf1ed}button:focus-visible,select:focus-visible{outline:3px solid #df912e;outline-offset:3px}button:disabled{opacity:.4;cursor:default}.primary{background:#005b5e;color:white;border-color:#005b5e}.primary:hover{background:#03494b}[hidden]{display:none!important}.page{max-width:900px;margin:auto;padding:20px 22px 0}.intro{min-height:100svh;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:20px;text-align:center;padding-bottom:40px}.intro h1{font-size:clamp(28px,5vw,44px);margin:0}.intro p{margin:0;line-height:1.8}.intro small{color:#617576}.letter{font-size:80px;color:#b48745;letter-spacing:12px}.modes{display:flex;gap:16px;width:100%;max-width:620px}.modes button{flex:1;text-align:left;padding:24px}.modes strong,.modes span{display:block}.modes strong{font-size:22px;margin-bottom:12px}.modes span{font-size:15px;line-height:1.6}select{padding:10px;background:white;border:1px solid #bbc7c4;border-radius:8px}header{display:flex;gap:22px;align-items:center;margin-bottom:18px}header h1{font-size:30px;margin:0}header #progress{margin-left:auto;font-size:22px}.toolbar{display:flex;gap:12px}.toolbar button{display:flex;align-items:center;justify-content:center;gap:12px;white-space:nowrap}.toolbar #pen{flex:1}.toolbar #next{margin-left:auto}#inkDot{display:inline-block;background:#202020;width:15px;height:15px;border-radius:50%}#play{position:relative}#board{position:relative;margin-top:50px;height:calc(100svh - 310px);min-height:300px;border:1px solid #d7ccbc;border-radius:14px;background:white;overflow:hidden;touch-action:none;user-select:none}canvas,.rules,#guideImage{position:absolute;width:100%;height:100%;inset:0}canvas{touch-action:none;z-index:2}#guideImage{object-fit:contain;opacity:.18;pointer-events:none}.rules{pointer-events:none}.rule{position:absolute;left:4%;right:4%;border-top:1px dashed #d4d6d5}.rule.main{border-top:1px solid #bfc6c3}#palm{height:145px;touch-action:none;user-select:none}#notice{position:absolute;top:140px;left:24px;font-size:13px;margin:0;color:#805316;pointer-events:none}#settings{position:absolute;z-index:5;top:145px;left:22px;right:22px;max-width:510px;background:#fffdf8;box-shadow:0 12px 35px #183c3c30;border-radius:16px;padding:18px}.settingsHead{display:flex;justify-content:space-between;align-items:center}.settingsHead button{border:0;font-size:24px;padding:0;min-width:48px}#colors{display:flex;gap:6px;justify-content:space-between;margin:14px 0}#colors button{width:48px;padding:8px;border:2px solid transparent;background:none}#colors i{display:block;width:28px;height:28px;border-radius:50%;background:var(--ink);border:1px solid #0002}#colors [aria-pressed=true],#sizes [aria-pressed=true]{border-color:#005b5e;background:#edf4f0}#sizes{display:flex;gap:8px;margin-bottom:20px}#sizes button{flex:1}#settings label{display:flex;align-items:center;gap:10px;min-height:44px}input{width:22px;height:22px;accent-color:#005b5e}#results{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}#results figure{margin:0;background:white;border:1px solid #ded9ce;border-radius:12px;padding:10px}#results img{width:110px;height:110px;object-fit:contain}#results figcaption{font-size:24px}::selection{background:#d0e8df}@media(max-width:560px){.page{padding:14px 12px 0}.toolbar{gap:6px}.toolbar button{padding:8px 10px;font-size:14px;gap:5px}.toolbar #undo span{display:none}header h1{font-size:26px}.modes{flex-direction:column}#board{height:calc(100svh - 280px)}#palm{height:120px}#colors{gap:0}#colors button{width:40px;padding:5px}#settings{left:12px;right:12px}}@media(prefers-reduced-motion:no-preference){button{transition:background .15s}}
#board{container-type:size}#guideText{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;font-size:60cqh;line-height:1;color:#d6d8d6;pointer-events:none;user-select:none;padding-bottom:5cqh}
.toolbar button:disabled{opacity:1}
#fullscreen,#soundToggle{display:flex;align-items:center;justify-content:center;min-width:48px;padding:10px;flex-shrink:0;opacity:1}
#app:fullscreen,#app:-webkit-full-screen{width:100%;min-height:100%;overflow-y:auto;background:#d6e4df}
#app:fullscreen :is(ins.adsbygoogle,.adsbygoogle,[data-ad-client],[data-ad-slot],iframe[src*="googleads"],iframe[src*="doubleclick"]),#app:-webkit-full-screen :is(ins.adsbygoogle,.adsbygoogle,[data-ad-client],[data-ad-slot],iframe[src*="googleads"],iframe[src*="doubleclick"]){display:none!important}
#exitPracticeDialog{width:min(420px,calc(100% - 32px));padding:26px;border:0;border-radius:18px;background:#fcfaf6;color:#064c50;box-shadow:0 24px 70px rgba(18,51,43,.3)}#exitPracticeDialog::backdrop{background:rgba(18,51,43,.45);backdrop-filter:blur(3px)}#exitPracticeDialog h2{margin:0 0 8px;font-size:24px}#exitPracticeDialog p{margin:0;color:#5b716c;line-height:1.65}#exitPracticeDialog>div{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}#exitPracticeDialog button{min-width:120px}@media(max-width:480px){#exitPracticeDialog>div{flex-direction:column-reverse}#exitPracticeDialog button{width:100%}}
#guideText{transform:translateX(-5%)}
#board::after{content:"";position:absolute;z-index:1;pointer-events:none;left:var(--write-left,25%);width:var(--write-width,40%);top:0;bottom:0;border-left:1px dashed #d5ded9;border-right:1px dashed #d5ded9;background:#005b5e03}
#board::after{display:none}#guideText{visibility:hidden}#guideLayer{pointer-events:none;z-index:1}
#results img{width:100px;height:100px}#results small,#results a{display:block;margin-top:12px}#results a{padding:14px;color:#005b5e;text-underline-offset:4px}#previewCrop{font-size:14px}@media(max-width:560px){.toolbar{flex-wrap:wrap}.toolbar #previewCrop{flex:1}.toolbar #next{flex:1}#notice{position:static;margin:10px 0}#board{height:calc(100svh - 335px)}}
.layoutPicker{display:flex;align-items:center;gap:8px;font-size:14px;margin-left:auto}.layoutPicker select{min-height:44px}#multiBoard{display:grid;margin-top:50px;min-height:calc(100svh - 310px);align-items:stretch}.writingSlot{position:relative;min-width:0;min-height:380px;overflow:hidden;background:white;border:1px solid #d7ccbc;border-radius:14px;touch-action:none}.writingSlot canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none}.slotGuide{z-index:0;pointer-events:none}.slotLabel{position:absolute;top:8px;left:12px;font-size:13px;color:#637a72;pointer-events:none;z-index:3}#multiBoard[data-count="4"] .writingSlot{min-height:max(340px,calc((100svh - 310px)*.6 + 40px))}@media(max-width:560px){header{flex-wrap:wrap;gap:10px}.layoutPicker{font-size:12px}header #progress{font-size:16px}.writingSlot{min-height:380px}#multiBoard[data-count="2"]{gap:60px!important}}

.rules{opacity:.82}
#multiBoard[data-count="2"]{gap:0!important;grid-template-columns:35% 65%!important;border:1px solid #d7ccbc;border-radius:14px;background:white;overflow:hidden}
#multiBoard[data-count="2"] .writingSlot{border:0;border-radius:0;background:transparent}
#multiBoard[data-count="2"] .slotLabel{display:none}

/* Warm writing surface against a quiet green-gray page. */
:root{background:#5d938359}
#board,.writingSlot,#multiBoard[data-count="2"]{background:#fcfaf6}
#multiBoard[data-count="2"] .writingSlot{background:transparent}

#multiBoard[data-count="2"].stackedPair{min-height:0;align-content:start;gap:5px!important;border:0;border-radius:0;background:transparent;overflow:visible}
#multiBoard[data-count="2"].stackedPair .writingSlot{border:1px solid #d7ccbc;border-radius:14px;background:#fcfaf6;min-height:max(190px,calc((100svh - 310px)*.323 + 40px))}


#multiBoard[data-count="2"].stackedPair .writingSlot{width:60%;max-width:430px;margin-left:8%;min-height:280px;aspect-ratio:5/4}

#multiBoard[data-count="2"].stackedPair{container-type:inline-size}
#multiBoard[data-count="2"].stackedPair .writingSlot{aspect-ratio:auto;min-height:280px;height:max(280px,calc(min(56cqw,400px)*.8))}



#multiBoard[data-count="4"]{container-type:inline-size;min-height:0;align-content:start;gap:10px!important;grid-template-columns:repeat(2,minmax(0,calc((85% - 10px)/2)))!important;justify-content:start}
#multiBoard[data-count="4"] .writingSlot{min-height:280px;height:max(280px,calc(min(56cqw,400px)*.8))}





.toolbar{flex-wrap:wrap}#checkScore{font-size:14px}#scoreDialog{max-width:min(520px,90vw);border:1px solid #bac7c7;border-radius:14px;background:#fcfaf6;color:#064c50;padding:24px}#scoreDialog::backdrop{background:#12332b55}#scoreDialog p{line-height:1.7}#scoreRows{font-weight:bold}
#notice{position:static;margin:8px 0 0}#board,#multiBoard{margin-top:28px}
.arcadeCelebration{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:10}.arcadeRibbon{position:absolute;top:-35px;width:9px;height:25px;border-radius:2px;animation:ribbonRain var(--duration) var(--delay) ease-in forwards}.arcadeBadge{position:absolute;top:12%;left:50%;transform:translateX(-50%);background:#ffcf33;color:#173e37;padding:14px 28px;border:3px solid #173e37;border-radius:12px;font-size:clamp(24px,5vw,40px);white-space:nowrap;animation:arcadePop .3s ease-out both}@keyframes ribbonRain{to{transform:translate(var(--drift),110vh) rotate(var(--spin))}}@keyframes arcadePop{from{transform:translateX(-50%) scale(.7);opacity:0}to{transform:translateX(-50%) scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.arcadeBadge{animation:none}.arcadeRibbon{display:none}}
.arcadeCelebration{background:radial-gradient(ellipse at 50% 35%,#ffdf6c24,transparent 65%)}.arcadeBadge{top:17%;padding:22px 38px;text-align:center;background:#ffe069;border:4px solid #184e47;border-radius:20px;box-shadow:0 12px 40px #12332b44;animation:arcadeGrandEntrance .65s cubic-bezier(.16,1,.3,1) both}.arcadeBadge strong{display:block;font-size:clamp(44px,10vw,82px);line-height:1.25}.arcadeBadge span{display:block;font-size:clamp(17px,3vw,25px);margin-top:8px}.arcadeRibbon:nth-child(3n){width:7px;height:38px}.arcadeRibbon:nth-child(4n){width:13px;height:13px;border-radius:50%}.arcadeSpark{position:absolute;width:8px;height:8px;border-radius:50%;opacity:0;animation:arcadeBurst 1.3s ease-out both}@keyframes arcadeBurst{0%{opacity:0;transform:scale(.2)}10%{opacity:1}80%{opacity:1}100%{opacity:0;transform:translate(var(--sx),var(--sy)) scale(.3)}}@keyframes arcadeGrandEntrance{0%{opacity:0;transform:translate(-50%,-35px) scale(.5) rotate(-8deg)}65%{opacity:1;transform:translate(-50%,0) scale(1.08) rotate(2deg)}100%{opacity:1;transform:translate(-50%,0) scale(1) rotate(0)}}@media(prefers-reduced-motion:reduce){.arcadeBadge{animation:none}.arcadeSpark{display:none}}
#scoreDialog{overflow:visible}#scoreDialog>button{margin:4px}.arcadeSpark{width:6px;height:20px;box-shadow:0 0 8px currentColor}.arcadeCelebration{z-index:100;isolation:isolate}.arcadeBadge{z-index:2}@media(prefers-reduced-motion:reduce){.arcadeSpark.staticSpark{display:block;animation:none;opacity:1;transform:translate(var(--sx),var(--sy))}}
/* Tumbling paper, inspired by the supplied CodePen motion reference. */
.arcadeCelebration{perspective:800px}.arcadeRibbon,.arcadeRibbon:nth-child(3n),.arcadeRibbon:nth-child(4n){width:10px;height:16px;border-radius:1px;animation-name:rainbowPaperFall;animation-timing-function:linear;backface-visibility:visible}.arcadeRibbon:nth-child(3n){width:8px;height:12px}.arcadeRibbon:nth-child(4n){width:12px;height:20px}@keyframes rainbowPaperFall{0%{transform:translate3d(0,-20px,0) rotateX(0) rotateY(0) rotateZ(0)}50%{transform:translate3d(calc(var(--drift)*.6),52vh,25px) rotateX(280deg) rotateY(170deg) rotateZ(calc(var(--spin)*.5))}100%{transform:translate3d(var(--drift),110vh,0) rotateX(560deg) rotateY(340deg) rotateZ(var(--spin))}}
#scoreDialog .scoreConfettiCanvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;touch-action:auto}

/* Controls kept available in code, but removed from the child-facing writing surface. */
#checkScore,#undo,.layoutPicker{display:none!important}

/* The current character is the primary orientation cue. */
header #charTitle{font-size:42px;line-height:1;font-weight:700}
#inkDot{background:#333333}
@media(max-width:560px){header #charTitle{font-size:36px}}
#scoreRows .overallScore{font-size:24px;color:#005b5e;margin:16px 0;padding-bottom:12px;border-bottom:1px solid #bac7c7}

/* Tablet writing surface: a compact, consistent control system. */
.page{max-width:960px;padding:18px 24px 0}
#play header{display:grid;grid-template-columns:48px minmax(0,1fr) auto 48px;gap:12px;align-items:center;margin-bottom:14px}#soundToggle,#speakInstruction{display:none!important}.instructionGroup{display:flex;align-items:center;gap:5px;min-width:0}.instructionGroup #speakInstruction{flex:0 0 34px;width:34px;height:38px;min-height:38px;padding:7px;border:0;border-radius:8px;background:transparent;box-shadow:none}.instructionGroup #speakInstruction:hover{background:#07555b0d}.instructionGroup #speakInstruction img{width:18px;height:18px}
#play header #charTitle{display:flex;align-items:baseline;gap:8px;white-space:nowrap;font-size:40px;line-height:1;font-weight:700;letter-spacing:-.02em;color:#07555b}#play header #charTitle::before{content:"เขียนตัวอักษรไทย";color:#58736d;font-size:14px;font-weight:600;line-height:1;letter-spacing:0}
#play header #progress{margin:0;font-size:22px;font-weight:700;white-space:nowrap;color:#07555b}
.iconButton{width:48px;height:48px;min-height:48px;padding:0;border-radius:14px;display:grid!important;place-items:center;background:#fcfaf6;border-color:#b7c9c5}
.iconButton img,.controlIcon,.chevron{display:block;width:20px;height:20px;filter:invert(25%) sepia(15%) saturate(1567%) hue-rotate(132deg) brightness(83%) contrast(97%)}
#play .toolbar{display:grid;grid-template-columns:minmax(0,1fr) 72px auto;gap:12px;align-items:center}
#play .toolbar button{min-height:50px;border-radius:14px;padding:10px 16px;font-size:17px;font-weight:600}
#play .toolbar #pen{justify-content:flex-start;background:#f7fbf9;border-color:#b7c9c5}
#play .toolbar #clear{gap:8px;padding:10px;white-space:nowrap}
#play .toolbar #next{margin:0;gap:10px;padding-inline:20px;box-shadow:0 5px 14px #07555b24}
#play .toolbar #next .controlIcon{filter:brightness(0) invert(1)}
#play #notice{margin:9px 2px 0;font-size:13px;font-weight:600;letter-spacing:.01em}
#play #board,#play #multiBoard{margin-top:26px;border-color:#c7d3cf;box-shadow:0 10px 26px #365f5610}
@media(max-width:700px){.page{padding:16px 16px 0}#play header{grid-template-columns:46px minmax(0,1fr) auto 46px;gap:7px}#play header #charTitle{font-size:36px}#play header #progress{font-size:19px}.instructionGroup{gap:6px}.instructionGroup #speakInstruction{width:38px;height:38px;min-height:38px;flex-basis:38px}.iconButton{width:46px;height:46px;min-height:46px}#play .toolbar{grid-template-columns:minmax(0,1fr) 66px auto;gap:8px}#play .toolbar button{font-size:15px;padding-inline:12px}#play .toolbar #next{padding-inline:14px}}

/* Summary: one score, one goal, then the child's work. */
.summaryPage{max-width:960px;padding:38px 28px 32px}
html:has(body.summaryOpen){overflow-y:scroll;scrollbar-gutter:stable}body.summaryOpen{min-height:100vh;overflow-y:visible}html:has(body.summaryOpen)::-webkit-scrollbar{width:12px}html:has(body.summaryOpen)::-webkit-scrollbar-track{background:#d6e4df}html:has(body.summaryOpen)::-webkit-scrollbar-thumb{border:3px solid #d6e4df;border-radius:10px;background:#6f9b8f}html:has(body.summaryOpen)::-webkit-scrollbar-thumb:hover{background:#4f7f72}
.summaryTop{display:block;text-align:center;margin:0 0 28px}
.summaryTop h1{font-size:38px;line-height:1.35;color:#064c50;margin:0 0 8px}
.summaryTop p{font-size:18px;color:#365f58;margin:0}
.summaryHero{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:40px;background:#fcfaf6;border-radius:24px;padding:30px 38px;margin-bottom:36px}
.scoreNumbers{text-align:center}
.scoreNumbers p{margin:0;color:#42665e;font-size:16px}
#summaryRate{display:block;color:#006467;font-size:80px;line-height:1.15;font-weight:800;letter-spacing:-.035em;margin:8px 0}
#summaryRate small{font-size:.45em;margin-left:3px}
#summaryScore{font-size:15px}
.rewardProgress{padding-left:32px;border-left:1px solid #d9e2dc}
.rewardTitle{color:#07585b;font-size:24px;font-weight:700;margin:0 0 8px}
#rewardMessage{font-size:16px;line-height:1.6;margin:0 0 18px;color:#42665e}
#trophyProgress{display:block;appearance:none;width:100%;height:14px;border:0;border-radius:10px;overflow:hidden;background:#e6e5dc}
#trophyProgress::-webkit-progress-bar{background:#e6e5dc;border-radius:10px}
#trophyProgress::-webkit-progress-value{background:#e7ae27;border-radius:10px}
#trophyProgress::-moz-progress-bar{background:#e7ae27;border-radius:10px}
.rewardScale{display:flex;justify-content:space-between;margin-top:9px;gap:12px;font-size:12px;color:#526c62}
#earnedArtwork{width:110px;height:120px;object-fit:contain;float:right;margin:-25px 23px 5px 12px}
.resultHeading{display:flex;align-items:baseline;justify-content:space-between;margin:0 0 16px}
.resultHeading h2{font-size:24px;margin:0;color:#064c50}
.resultHeading p{margin:0;font-size:14px;color:#42665e}
#results.resultGrid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.resultCard{display:flex;flex-direction:column;align-items:center;min-width:0;background:#fcfaf6;border-radius:12px;padding:10px 8px 12px}
#results .answerLabel{display:block;align-self:flex-start;background:none;border:0;padding:0 0 4px 3px;color:#47675f;font-size:16px;line-height:1.3;font-weight:400}
#results .resultCard>img{display:block;width:100%;height:84px;object-fit:contain;mix-blend-mode:multiply}
.summaryFooter{text-align:center;margin-top:30px}
.summaryFooter button{display:inline-flex;align-items:center;justify-content:center;gap:20px;min-width:240px;min-height:56px;font-weight:700;font-size:18px;border-radius:16px}
.summaryFooter button img{width:22px;height:22px;filter:brightness(0) invert(1)}
.summaryFooter p{font-size:12px;color:#42665e;margin:14px 0 0}
@media(max-width:760px){.summaryPage{padding:28px 20px}.summaryHero{gap:22px;padding:26px 22px}.rewardProgress{padding-left:22px}#summaryRate{font-size:64px}.rewardTitle{font-size:21px}#results.resultGrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:480px){.summaryPage{padding:24px 16px}.summaryTop h1{font-size:30px}.summaryHero{grid-template-columns:1fr;gap:22px}.rewardProgress{padding:20px 0 0;border-left:0;border-top:1px solid #d9e2dc}.resultHeading h2{font-size:22px}#results.resultGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}#results .resultCard>img{height:76px}}

#summaryVictory{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:20px;border:0;background:#eaf4ed;color:#07585b;overflow:auto}
#summaryVictory::backdrop{background:#eaf4ed}
.victoryContent{position:relative;z-index:101;min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}
.victoryContent h2{margin:0;font-size:clamp(28px,5vw,48px);line-height:1.35}
.victoryContent p{margin:8px 0 0;font-size:18px}
.victoryTrophy{display:block;width:min(440px,75vw);height:min(49dvh,480px);object-fit:contain;filter:drop-shadow(0 16px 20px #6d642c26);animation:victoryEntrance .7s cubic-bezier(.16,1,.3,1) both}
.victoryScore{font-size:clamp(48px,9vw,76px);line-height:1.15;margin:0 0 18px}
.victoryContent button{pointer-events:auto;min-width:220px;font-size:18px}
#summaryVictory .arcadeBadge{display:none}
#summaryVictory .scoreConfettiCanvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#victoryReplay{display:flex;margin:0 auto 14px;background:transparent;border-color:#a2bab0;color:#07585b;font-size:15px;min-height:46px}
@keyframes victoryEntrance{0%{transform:translateY(65px) scale(.55) rotate(-8deg)}65%{transform:translateY(-10px) scale(1.04) rotate(2deg)}100%{transform:translateY(0) scale(1) rotate(0)}}
@media(prefers-reduced-motion:reduce){.victoryTrophy{animation:none}}


/* Restore the original mint, cream, and dark teal palette. */
body:has(.summaryPage:not([hidden])){background:transparent}
#summaryVictory{background:#eaf4ed;color:#07585b;border:0}
#summaryVictory::backdrop{background:#eaf4ed}
.summaryFooter .primary,.victoryContent .primary{background:#005b5e;color:#fff;border-color:#005b5e}
.summaryFooter .primary:hover,.victoryContent .primary:hover{background:#03494b}

.resultStars{display:flex;gap:5px;justify-content:center;padding-top:9px}
.resultStars i{display:block;width:20px;height:20px;background:#8c9c97;mask:url('vendor/icons/star.svg') center/contain no-repeat}
.resultCard[data-stars="0"]{background:#e9edeb}
.resultCard[data-stars="1"]{background:#f7e7d8}
.resultCard[data-stars="2"]{background:#f6f0d6}
.resultCard[data-stars="3"]{background:#e6f1e5}
.resultStars i.earned{background:transparent url('assets/gold-star-v1.png') center/contain no-repeat;mask:none}
#retryWeak{display:flex;margin:0 auto 12px}
#retryStatus{margin:8px 0 20px;font-size:14px}
.summaryFooter #again{background:transparent;color:#005b5e;border:1px solid #8faeaa}
.summaryFooter #again img{filter:none}

.resultCard[data-stars="0"]{background:#fcf1ed;outline:2px solid #b74e42;outline-offset:-2px}
.resultCard[data-stars="1"],.resultCard[data-stars="2"]{background:#fcf8eb}
.resultCard[data-stars="3"]{background:#f5f8f1}
.resultCard[data-stars="0"] .resultStars i{background:#b74e42}

.sessionMetrics{display:grid;grid-template-columns:1fr;gap:20px;max-width:560px;margin:0 auto 36px;padding:0;background:none}
.metricProgress,.metricDistribution,.metricTime{background:#fff;border-radius:18px;padding:24px 26px;box-shadow:0 5px 12px #23433b12}
.sessionMetrics h2{font-size:15px;font-weight:500;color:#646b68;margin:0 0 10px}
.metricHeadline{display:block;font-size:32px;font-weight:700;line-height:1.2;color:#242c29;margin-bottom:20px}
.sessionSegments{display:flex;gap:3px;height:34px}
.sessionSegments span{flex:1;min-width:0;background:#e9eae9;border-radius:0}
.sessionSegments span.complete{background:#e1aa43}
.metricBottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:17px;font-size:14px;color:#626966}
.metricBottom strong{color:#303b36;font-weight:500}
#remainingCount{color:#846127}
.distributionBody{display:flex;align-items:center;gap:30px;margin-top:18px}
#starDonut{width:125px;height:125px;flex-shrink:0;border-radius:50%;display:grid;place-items:center}
#starDonut>div{width:91px;height:91px;background:white;border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center}
#donutCount{font-size:26px;color:#303b36}#starDonut span{font-size:11px;color:#646b68}
#starLegend{flex:1}.legendRow{display:flex;align-items:center;gap:9px;margin:13px 0;font-size:14px;color:#535d57}.legendRow i{width:9px;height:9px;border-radius:50%;flex-shrink:0}.legendRow strong{margin-left:auto;white-space:nowrap;font-size:13px;font-weight:500;color:#303b36}
#writingTime{font-size:27px;color:#303b36}.metricTime p{margin:10px 0;font-size:14px;color:#535d57}.metricTime small{font-size:12px;color:#646b68}
@media(max-width:480px){.metricProgress,.metricDistribution,.metricTime{padding:20px}.distributionBody{gap:18px}#starDonut{width:100px;height:100px}#starDonut>div{width:72px;height:72px}.legendRow{font-size:12px;gap:6px}.legendRow strong{font-size:11px}.sessionSegments{gap:2px}}

#trophyProgress.scoreTicks{display:flex;gap:3px;width:100%;height:34px;border:0;border-radius:0;overflow:visible;background:transparent}
.scoreTicks>span{position:relative;flex:1;min-width:0;height:100%;background:#e4e5e1}
.scoreTicks>span::before{content:"";position:absolute;inset:0 auto 0 0;width:var(--fill);background:#e7ae27}
@media(max-width:480px){#trophyProgress.scoreTicks{gap:2px}}

/* Match the supplied compact reference card rather than the former split hero. */
.summaryHero.scoreReference{display:block;width:100%;max-width:560px;margin:0 auto 20px;padding:22px 24px;background:#fff;border:0;border-radius:18px;box-shadow:0 5px 12px #23433b18}
.scoreCardHeading{display:flex;justify-content:space-between;align-items:center;color:#626966;font-size:15px;margin-bottom:2px}
#scoreDetails{min-height:30px;padding:4px 10px;border:1px solid #e6e8e7;border-radius:8px;background:#fff;color:#626966;font-size:13px;line-height:1.4}
.scoreCardValue{display:flex;align-items:baseline;gap:12px;margin:0 0 18px}
.scoreReference #summaryRate{display:inline;margin:0;font-size:32px;line-height:1.25;color:#222b27;font-weight:700;letter-spacing:-.02em}
.scoreReference #summaryRate small{font-size:1em;margin:0}
.scoreReference #rewardTitle{font-size:13px;color:#39745b;font-weight:500}
.scoreReference #trophyProgress{height:34px;gap:3px}
.scoreReference .scoreTicks>span{background:#ebebeb}
.scoreReference .scoreTicks>span::before{background:#ff7b19}
.scoreCardFooter{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:17px;color:#626966;font-size:13px}
.scoreReference #summaryScore{margin:0;font-size:13px;color:#626966}
.scoreCardFooter strong{color:#39745b;font-weight:600}
#scoreExplanation{padding-top:16px;margin-top:16px;border-top:1px solid #eeeeeb}
#scoreExplanation #rewardMessage{font-size:14px;margin:0}
#scoreExplanation #earnedArtwork{float:none;display:block;width:100px;height:110px;margin:12px auto 0}
@media(max-width:480px){.summaryHero.scoreReference{padding:20px}.scoreCardValue{gap:9px}.scoreReference #rewardTitle{font-size:12px}.scoreCardFooter{font-size:12px}}

/* Result tiles follow the supplied 6 × 4 reference. */
.resultSection{padding:0;background:transparent}
.resultHeading{margin-bottom:14px}
.resultHeading h2{font-size:24px}
#results.resultGrid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.resultCard{min-height:160px;padding:12px 10px 11px;border:0;border-radius:12px;outline:0;box-shadow:none}
.resultCard{position:relative}
.resultCard .itemScore{position:absolute;top:12px;right:11px;color:#b3b3aa;font-size:11px;font-weight:400;line-height:1}
.resultCard[data-stars="0"]{background:rgba(93,147,131,.11);outline:0}
.resultCard[data-stars="1"],.resultCard[data-stars="2"]{background:rgba(246,239,211,.82)}
.resultCard[data-stars="3"]{background:rgba(252,250,246,.9)}
#results .answerLabel{padding:0;color:#42665e;font-size:16px;margin-top:-5px}
#results .resultCard>img{height:96px;margin:auto 0 0}
.resultStars{min-height:22px;padding-top:5px;gap:5px}
.resultCard[data-stars="0"] .resultStars{visibility:hidden}
.resultCard[data-stars="0"] .resultStars i{background:#8c9c97}
@media(max-width:760px){#results.resultGrid{grid-template-columns:repeat(4,minmax(0,1fr))}.resultCard{min-height:150px}}
@media(max-width:480px){#results.resultGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.resultCard{min-height:136px;padding:10px 8px}#results .resultCard>img{height:78px}.resultStars i{width:18px;height:18px}}

/* Lightweight summary charts. */
.scoreChart{position:relative;width:100%;height:30px;margin-top:14px}
#trophyProgress{display:block!important;width:100%!important;height:100%!important;background:transparent!important;border-radius:0!important}
.donutChart{position:relative;width:126px!important;height:126px!important;min-width:126px;aspect-ratio:1/1;flex:0 0 126px!important;border-radius:50%!important;background:conic-gradient(rgba(183,78,66,.7) 0 var(--red-stop,0%),rgba(213,165,75,.7) var(--red-stop,0%) var(--gold-stop,0%),rgba(77,141,121,.7) var(--gold-stop,0%) 100%)}
.donutChart::before{content:"";position:absolute;inset:17px;border-radius:50%;background:#fcfaf6}
.donutCenter{position:absolute;inset:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:50%;pointer-events:none}
.donutCenter strong{font-size:24px;line-height:1.1;color:#303b36}
.donutCenter span{margin-top:4px;font-size:11px;color:#646b68}
@media(max-width:480px){.donutChart{width:108px!important;height:108px!important;min-width:108px;flex-basis:108px!important}.donutChart::before,.donutCenter{inset:15px}.donutCenter strong{font-size:21px}}

/* Animated skill progress adapted from the supplied CodePen. */
.skillProgress{position:relative;width:100%;height:8px;margin-top:34px;background:#dfe3df;overflow:visible}
#trophyProgress.skillProgressFill{position:relative;display:block!important;height:8px!important;width:var(--score-width,0)!important;max-width:100%;overflow:visible!important;border:0!important;border-radius:0!important;background:#e7ae27!important;animation:scoreBarIn .8s cubic-bezier(.16,1,.3,1) both}
.skillProgressFill::after{content:"";position:absolute;right:0;top:-9px;width:10px;height:6px;background:#d0941a;clip-path:polygon(0 0,100% 0,50% 100%);transform:translateX(50%)}
#progressValue{position:absolute;right:0;top:-32px;transform:translateX(50%);padding:1px 4px;color:#6f4d0c;font-size:13px;font-weight:700;white-space:nowrap}
@keyframes scoreBarIn{from{width:0}}
@media(prefers-reduced-motion:reduce){.skillProgressFill{animation:none}}

.sessionMetrics.combinedResults{max-width:none;display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:0 0 36px;padding:24px;background:#fcfaf6;border-radius:18px}
.summaryTop{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.shareButton{min-height:44px;padding:0 20px;border:0;border-radius:12px;background:#00686b;color:#fff;font-size:15px;font-weight:600;box-shadow:0 5px 12px rgba(0,74,77,.16)}
.shareButton:disabled{opacity:.65;cursor:wait}
.srOnly{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.combinedResults .metricProgress,.combinedResults .metricDistribution,.combinedResults .metricTime{padding:0;background:none;border-radius:0;box-shadow:none}
.combinedResults .metricProgress{grid-column:1/-1}
.combinedResults h2{color:#064c50;font-weight:700;font-size:16px}
.combinedResults .metricProgress h2{display:flex;justify-content:space-between;align-items:center}
.combinedResults #sessionCount{font-weight:400;font-size:14px}
.combinedResults .sessionSegments{display:grid;grid-template-columns:repeat(var(--segment-columns,16),minmax(0,1fr));grid-auto-rows:28px;height:auto;gap:4px}
.combinedResults .sessionSegments.compact{grid-template-columns:repeat(var(--segment-columns),minmax(0,50px));justify-content:start}
.combinedResults .sessionSegments.compact span{width:100%;max-width:50px}
.combinedResults .sessionSegments span{display:grid;place-items:center;border-radius:2px;background:rgba(213,165,75,.3);color:#725d32;font-size:14px;font-weight:400;line-height:1}
.combinedResults .sessionSegments [data-level="0"]{background:rgba(183,78,66,.3);color:#8b443c}
.combinedResults .sessionSegments [data-level="1"],.combinedResults .sessionSegments [data-level="2"]{background:rgba(213,165,75,.3);color:#725d32}
.combinedResults .sessionSegments [data-level="3"]{background:rgba(77,141,121,.3);color:#356b5c}
.segmentLegend{font-size:12px;color:#42665e;margin:8px 0 0}
.combinedResults .distributionBody{margin:0;gap:24px}
.combinedResults #starDonut>div{background:#fcfaf6}
.combinedResults .metricTime{padding-left:24px;border-left:1px solid #d9e2dc}
.combinedResults #writingTime{color:#064c50;font-size:25px}
@media(max-width:600px){.summaryTop{gap:12px}.shareButton{min-height:40px;padding:0 14px;font-size:14px}.sessionMetrics.combinedResults{grid-template-columns:1fr;padding:20px}.combinedResults .metricTime{padding:18px 0 0;border-left:0;border-top:1px solid #d9e2dc}.combinedResults .sessionSegments{grid-template-columns:repeat(var(--segment-mobile-columns,8),minmax(0,1fr));gap:3px}.combinedResults .sessionSegments.compact{grid-template-columns:repeat(var(--segment-mobile-columns),minmax(0,50px))}.combinedResults .sessionSegments span{font-size:14px;font-weight:400}}

/* Landing page: clear educational purpose with a calm editorial rhythm. */
.landingPage{max-width:1160px;padding:0 28px 48px;color:#073f43}
.homeNav{position:relative;height:84px;margin:0;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(7,85,91,.12)}
.homeBrand{display:flex;align-items:center;gap:11px;color:#064c50;text-decoration:none;font-size:18px}
.homeBrand>span{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#00686b;color:#fff;font-size:25px;font-weight:700;box-shadow:0 7px 18px rgba(0,87,91,.17)}
.installApp{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border-color:rgba(7,85,91,.18);border-radius:13px;background:rgba(252,250,246,.7)}.installApp img{width:20px;height:20px;filter:invert(25%) sepia(15%) saturate(1567%) hue-rotate(132deg) brightness(83%) contrast(97%)}.installApp.ready{background:#00686b;border-color:#00686b}.installApp.ready img{filter:brightness(0) invert(1)}.installHint{position:absolute;top:68px;right:28px;z-index:5;max-width:290px;padding:9px 12px;border-radius:10px;background:#073f43;color:#fff;font-size:12px;line-height:1.5;box-shadow:0 8px 24px rgba(7,63,67,.18)}.installHint:empty{display:none}
.homeHero{min-height:650px;display:grid;grid-template-columns:minmax(0,1.04fr) minmax(390px,.96fr);align-items:center;gap:72px;padding:15px 24px 78px}
.eyebrow{margin:0 0 17px;color:#9b6819;font-size:13px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.homeCopy h1{margin:0;color:#073f43;font-family:"Leelawadee UI",Tahoma,sans-serif;font-size:clamp(54px,6.4vw,88px);font-weight:700;line-height:.98;letter-spacing:-.055em}
.homeCopy h1 em{color:#007174;font-style:normal}
.homeLead{max-width:590px;margin:28px 0 30px;color:#41635e;font-size:18px;line-height:1.8}
.homeStart{min-width:210px;min-height:58px;padding:12px 22px;border:0;border-radius:16px;font-size:18px;font-weight:700;box-shadow:0 12px 28px rgba(0,83,87,.2)}
.homeStart span{margin-left:18px;font-size:22px}
.homeStatus{display:inline-block;margin:0 0 0 14px;color:#66817c;font-size:12px}
.homeBenefits{display:flex;flex-wrap:wrap;gap:10px 22px;margin:27px 0 0;padding:0;list-style:none;color:#54726d;font-size:13px}
.homeBenefits li::before{content:"✓";margin-right:7px;color:#007174;font-weight:700}
.writingPreview{position:relative;width:min(100%,450px);justify-self:end;padding:20px;border:1px solid rgba(7,85,91,.16);border-radius:28px;background:#fcfaf6;box-shadow:0 28px 65px rgba(30,77,68,.16);transform:rotate(1.2deg)}
.previewTop,.previewResult{display:flex;align-items:center;justify-content:space-between;color:#56716c;font-size:13px}
.previewPaper{position:relative;height:360px;margin:18px 0;padding:20px;overflow:hidden;border-radius:18px;background:#fff}
.previewPaper i{position:absolute;left:24px;right:24px;border-top:1px dashed #d8dfdb}
.previewPaper i:nth-child(1){top:25%}.previewPaper i:nth-child(2){top:50%;border-top-style:solid;border-color:#bdcac5}.previewPaper i:nth-child(3){top:75%}
.previewPaper strong,.previewStroke{position:absolute;inset:0;display:grid;place-items:center;padding-top:8px;font-family:"Leelawadee UI",Tahoma,sans-serif;font-size:210px;line-height:1}
.previewPaper strong{color:#007174;opacity:.13}.previewStroke{color:#333;transform:translate(-3px,2px);opacity:.86}
.previewResult img{width:17px;height:17px;vertical-align:middle;margin-right:6px}.previewResult strong{color:#007174}
.floatingLetter{position:absolute;display:grid;place-items:center;width:72px;height:72px;border-radius:20px;background:#e5b454;color:#fff;font-size:38px;font-weight:700;box-shadow:0 14px 26px rgba(120,80,14,.18)}
.letterOne{left:-35px;bottom:90px;transform:rotate(-8deg)}.letterTwo{right:-25px;top:78px;background:#6c9e8e;transform:rotate(7deg)}
.homeSteps{padding:72px 24px;border-radius:32px;background:#fcfaf6}
.homeSteps>h2{max-width:630px;margin:0 0 34px;font-size:clamp(32px,4vw,50px);line-height:1.2;letter-spacing:-.035em}
.homeSteps>div{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.homeSteps article{padding:26px;background:#f7f7f2;box-shadow:inset 0 3px #cbdcd6}
.homeSteps article b{color:#b57a1f;font-size:13px}.homeSteps h3{margin:30px 0 9px;font-size:21px}.homeSteps article p{margin:0;color:#56716c;line-height:1.65;font-size:14px}
.homeAnswer{max-width:760px;margin:82px auto;padding:0 24px;text-align:center}.homeAnswer h2{margin:0 0 16px;font-size:30px}.homeAnswer p{margin:0;color:#516f69;font-size:16px;line-height:1.85}
.homeFooter{display:flex;justify-content:space-between;gap:24px;padding:25px 4px;border-top:1px solid rgba(7,85,91,.13);color:#66817c;font-size:12px}
@media(max-width:820px){.landingPage{padding-inline:20px}.homeHero{grid-template-columns:1fr;gap:60px;padding:15px 10px 72px}.writingPreview{justify-self:center}.homeSteps>div{grid-template-columns:1fr}.homeSteps article{display:grid;grid-template-columns:50px 1fr;column-gap:12px}.homeSteps h3{margin:0 0 6px}.homeSteps article p{grid-column:2}.floatingLetter{width:60px;height:60px;font-size:31px}}
@media(max-width:520px){.landingPage{padding-inline:16px}.homeNav{height:72px}.installHint{top:61px;right:16px;max-width:250px}.homeHero{padding-top:15px}.homeCopy h1{font-size:52px}.homeLead{font-size:16px;margin-top:22px}.homeStart{width:100%}.homeStatus{display:block;margin:10px 0 0;text-align:center}.homeBenefits{display:grid}.writingPreview{width:calc(100% - 18px);padding:14px}.previewPaper{height:300px}.previewPaper strong,.previewStroke{font-size:170px}.letterOne{left:-18px}.letterTwo{right:-18px}.homeSteps{padding:48px 20px}.homeFooter{flex-direction:column}}

/* Practice setup. */
.setupPage{max-width:820px;padding:38px 24px 60px}
.setupHeader{display:flex;align-items:center;gap:18px;margin:0 0 28px}
.setupHeader .eyebrow{margin:0 0 5px}.setupHeader h1{font-size:36px;line-height:1.2;margin:0;color:#064c50}
.setupPanel{padding:30px;border-radius:24px;background:#fcfaf6;box-shadow:0 18px 50px rgba(33,74,66,.12)}
.setupPanel fieldset{padding:0;margin:0 0 28px;border:0}.setupPanel legend,.setupRow label>span{display:block;margin:0 0 11px;color:#42665e;font-size:14px;font-weight:700}
.choiceCards{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.choiceCards button{min-height:104px;padding:20px;text-align:left;border:1px solid #c7d5d0;background:#f8faf7}
.choiceCards button strong,.choiceCards button span{display:block}.choiceCards button strong{font-size:20px;margin-bottom:7px}.choiceCards button span{color:#637a74;font-size:13px;line-height:1.5}
.choiceCards button[aria-pressed="true"]{border-color:#007174;background:#e5f0eb;box-shadow:inset 0 0 0 1px #007174}
.setupRow{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:28px}.setupRow select{width:100%;min-height:50px;padding:10px 14px;background:#fff}
.setupPanel fieldset.setupFont{margin:-4px 0 28px}.fontChooser{display:grid;grid-template-columns:1fr 1fr;gap:16px}.fontOptions{display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:7px}.fontOptions p{grid-column:1/-1;margin:0;padding:2px 0;color:#6a7f79;font-size:12px}.fontOptions p:not(:first-child){margin-top:6px}.fontOptions button{position:relative;min-height:40px;padding:8px 28px 8px 11px;border-color:#d4ded9;border-radius:10px;background:#fff;text-align:left;font-size:13px}.fontOptions button[aria-pressed="true"]{border-color:#4f8d7b;background:#f1f6f3;color:#07575b;box-shadow:none}.fontOptions button[aria-pressed="true"]::after{content:"✓";position:absolute;right:10px;top:50%;transform:translateY(-50%);line-height:1;color:#4f8d7b;font-weight:700}.fontPreview{display:flex;min-height:218px;margin:0;padding:14px;flex-direction:column;align-items:center;justify-content:center;border-radius:14px;background:#f0f4f1}.fontPreview>span{align-self:flex-start;color:#6a7f79;font-size:12px}.fontPreviewGlyph{position:relative;width:130px;height:150px}.fontPreviewGlyph img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}.fontPreviewGlyph #fontPreviewGhost{filter:opacity(.18)}.fontPreviewGlyph #fontPreviewImage{z-index:1}.fontPreview figcaption{margin-top:auto;color:#42665e;font-size:12px;text-align:center}
.customPicker{margin:0 0 28px;padding-top:26px;border-top:1px solid #dce4df}.customPickerHead{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.customPicker h2{font-size:20px;margin:0 0 4px}.customPicker p{margin:0;color:#637a74;font-size:13px}.customPickerHead button{min-height:40px;padding:7px 13px;font-size:13px}
.customPickerHead>button{margin-left:8px}.customPickerHead #randomSelect{margin-left:auto;border-color:#94b4aa;background:#edf4f0;color:#07575b}
.characterPicker{display:grid;grid-template-columns:repeat(11,minmax(0,1fr));gap:7px}.characterPicker button{min-width:0;min-height:46px;padding:5px;border-radius:10px;background:#fff;font-size:20px}.characterPicker button[aria-pressed="true"]{border-color:#007174;background:#007174;color:#fff;box-shadow:0 5px 12px rgba(0,91,94,.16)}
.beginPractice{display:flex;align-items:center;justify-content:center;gap:18px;width:100%;min-height:56px;border-radius:16px;font-size:18px;font-weight:700}.beginPractice span{font-size:22px}
.setupPanel #loadStatus{margin:0 0 12px;color:#8b4d34;font-size:13px}
@media(max-width:620px){.setupPage{padding:24px 16px 44px}.setupHeader h1{font-size:29px}.setupPanel{padding:20px}.choiceCards,.setupRow{grid-template-columns:1fr}.choiceCards button{min-height:90px}.fontChooser{grid-template-columns:1fr 1fr;gap:10px}.fontOptions{grid-template-columns:1fr}.fontOptions p{grid-column:auto}.fontPreview{min-height:100%;padding:10px}.fontPreviewGlyph{width:100px;height:130px}.customPickerHead{flex-wrap:wrap}.customPickerHead>div{width:100%}.customPickerHead #randomSelect{margin-left:0}.customPickerHead>button{flex:1}.characterPicker{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.characterPicker button{min-height:44px;font-size:19px}}

/* Setup opens as a modal above the landing page. */
body.setupOpen{overflow:hidden}
#choose.setupPage{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;max-width:none;padding:clamp(24px,6vh,64px) 20px;background:rgba(28,58,54,.34);backdrop-filter:blur(7px);overflow:auto}
#choose .setupHeader,#choose .setupPanel{width:min(760px,100%)}
#choose .setupHeader{gap:16px;margin:0;padding:25px 30px 18px;border-radius:24px 24px 0 0;background:#fcfaf6}
#choose .setupHeader h1{font-size:31px}
#choose .setupPanel{padding:8px 30px 30px;border-radius:0 0 24px 24px;box-shadow:0 28px 75px rgba(13,45,41,.28)}
@media(max-width:620px){#choose.setupPage{padding:16px 12px}#choose .setupHeader{padding:20px 18px 14px}#choose .setupHeader h1{font-size:26px}#choose .setupPanel{padding:7px 18px 22px}}
#settings{position:fixed;inset:145px 0 auto;margin:0 auto;width:calc(100% - 32px);max-width:510px;max-height:calc(100dvh - 165px);overflow:auto;border:0;color:inherit}#settings::backdrop{background:rgba(0,0,0,.35)}
#aiCheckDialog{border:0;border-radius:18px;background:#fcfaf6;color:#064c50;padding:24px;width:min(540px,calc(100% - 32px));max-height:85dvh;overflow:auto}#aiCheckDialog::backdrop{background:#0006}#aiCheckDialog p{line-height:1.7}#play .toolbar{flex-wrap:wrap}#checkAi{background:#e5efeb}
#play .toolbar:has(#checkAi:not([hidden])){grid-template-columns:minmax(0,1fr) auto auto auto}@media(max-width:520px){#play .toolbar:has(#checkAi:not([hidden])){grid-template-columns:minmax(0,1fr) auto}#checkAi{min-height:44px}}
.aiDebug{margin:18px 0;border:1px solid #cad6d2;border-radius:10px;padding:12px;background:#eef3f0}.aiDebug summary{cursor:pointer;font-weight:600}.aiDebug pre{max-height:280px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.6 monospace;color:#234441;user-select:text}
.aiSupportBadge{display:block;font-size:11px;color:#277768;margin-top:5px}.fontOptions button:disabled{cursor:not-allowed;opacity:.45}
.aiRequiredHint{font-size:12px;color:#496c65;margin:8px 0}
.scoreBreakdown{font-size:11px;line-height:1.6;color:#57736b;width:100%;margin-top:7px;padding-top:6px;border-top:1px solid #54786c20}.scoreBreakdown>div{display:flex;justify-content:space-between;gap:4px}.scoreBreakdown>div>span:last-child{font-variant-numeric:tabular-nums;white-space:nowrap}
.resultCard .itemScore{color:#748078}.scoreBreakdown{color:#3e5c53;margin-top:8px;margin-bottom:5px;padding-top:0;border-top:0}
.resultHeadingLabel{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 14px}.resultHeadingLabel #scoreExplanation{font-size:12px;font-weight:400;color:#57736b}
