@font-face{font-family:"DM Sans";src:url("/apps/homophones-spotter/assets/dm-sans-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"DM Sans";src:url("/apps/homophones-spotter/assets/dm-sans-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"DM Sans";src:url("/apps/homophones-spotter/assets/dm-sans-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
:root{--bg:#f7f5f0;--paper:#fffefb;--plum:#735b88;--plum-dark:#584269;--lavender:#ede7f2;--text:#34323c;--muted:#8b8791;--border:#e5e1e5;--green:#638d79;--sans:'DM Sans',sans-serif;--serif:'Lora',Georgia,serif}*{box-sizing:border-box}body{margin:0;color:var(--text);background:var(--bg);font-family:var(--sans);font-size:14px;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button,select{cursor:pointer}button{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,div[tabindex]:focus-visible{outline:3px solid #a894bb;outline-offset:3px}button{transition:background .18s,transform .18s,box-shadow .18s}button:active{transform:translateY(1px)}button:disabled{opacity:.4;cursor:default}button svg,i svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}i{display:inline-flex;vertical-align:middle;font-style:normal}.topbar{height:86px;background:#fcfbf8;border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 4.2%;gap:38px}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--text);font-family:var(--serif);font-weight:600;letter-spacing:-1.3px;font-size:29px}.brand-dot{color:var(--plum)}.brandmark{width:37px;height:42px;transform:rotate(-7deg)}.brandmark svg{width:100%;height:100%;fill:none;stroke:var(--plum);stroke-width:3.3;stroke-linecap:round}.brand-caption{font-size:9px;letter-spacing:2px;color:#99939d;padding-top:5px}.top-actions{margin-left:auto;display:flex;align-items:center;gap:12px}.save-state{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:7px;margin-right:18px}.save-state>span{width:6px;height:6px;background:#84a28c;border-radius:50%}.icon-btn{width:33px;height:33px;display:inline-flex;align-items:center;justify-content:center;background:none;border:1px solid transparent;border-radius:8px;color:#89828f}.icon-btn:hover{background:#eee9f1;color:var(--plum)}.app-shell{max-width:1424px;margin:0 auto;padding:39px 4.2% 0}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:31px}.eyebrow{font-size:9px;letter-spacing:1.8px;font-weight:650;color:var(--plum)}.little-star{font-size:13px;padding-right:6px;color:#b59a69}h1{font:400 35px/1.3 var(--serif);letter-spacing:-.9px;margin:10px 0 9px}h1 em{font-weight:400;color:var(--plum)}.intro p{margin:0;font-size:12px;color:#908993}.guide-launch{display:flex;align-items:center;text-align:left;background:#f1eee7;border:1px solid #e8e1d8;border-radius:12px;padding:12px 16px;gap:14px;margin-top:16px}.guide-launch:hover{background:#eae4ed}.guide-launch>span:nth-child(2){font-size:12px;font-weight:600}.guide-launch small{display:block;font-size:10px;font-weight:400;color:#958b8a;margin-top:5px}.guide-launch>i{margin-left:8px;color:#a198a6}.guide-letter{position:relative;font:italic 45px/1 var(--serif);color:#9780ab;width:32px}.guide-letter span{position:absolute;font:24px var(--sans);right:-4px;top:-6px;color:#b6a3c6}.mode-tabs{display:flex;border-bottom:1px solid #ded8e2;margin-bottom:27px;gap:32px}.mode-tab{position:relative;display:flex;gap:10px;align-items:center;padding:13px 1px 18px;background:none;border:none;color:#99919f;font-size:12px}.mode-tab.active{color:var(--plum);font-weight:650}.mode-tab.active:after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:3px;background:var(--plum);border-radius:3px 3px 0 0}.mode-tab:hover{color:var(--plum)}.active .studio-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:32px}.toolkit{background:#fbfaf7;border:1px solid #e8e3e5;border-radius:12px;align-self:start;overflow:hidden}.tool-section{padding:20px 17px;border-bottom:1px solid #eae5e8}.section-label{display:flex;align-items:center;justify-content:space-between;font-size:9px;font-weight:650;letter-spacing:1.5px;color:#746b7d;margin-bottom:17px}.section-label>span{letter-spacing:0;color:#bcb2c4;font-size:9px}.paper-options{display:grid;grid-template-columns:1fr 1fr;gap:11px 8px}.paper-choice{border:1px solid #e6e0e6;border-radius:7px;background:#fffefa;overflow:hidden;padding:0 0 6px;position:relative}.paper-choice.active{border-color:#9d86b1;box-shadow:0 0 0 1px #a58bb7;background:#f5eff9}.paper-choice.active:after{content:'✓';position:absolute;right:4px;top:4px;border-radius:50%;background:var(--plum);color:white;width:11px;height:11px;font-size:8px}.paper-choice>span:last-child{font-size:9px;color:#8e8397}.paper-choice.active>span:last-child{color:var(--plum);font-weight:600}.paper-sample{display:block;height:31px;margin:5px 5px 3px;border-bottom:1px solid #eeebec;background-color:#fffefa}.sample-handwriting{background:repeating-linear-gradient(to bottom,transparent 0 4px,#ded3df 4px 5px,transparent 5px 10px,#f1d3ce 10px 11px,transparent 11px 16px,#d7cfdf 16px 17px,transparent 17px 24px)}.sample-wide{background:repeating-linear-gradient(to bottom,transparent 0 12px,#d7cfdf 12px 13px)}.sample-ruled{background:repeating-linear-gradient(to bottom,transparent 0 7px,#d7cfdf 7px 8px)}.sample-midline{background:repeating-linear-gradient(to bottom,transparent 0 13px,#d7cfdf 13px 14px)}.sample-midline:after{content:'';display:block;border-bottom:1px dashed #e1d6df;margin-top:6px}.sample-squared{background-image:linear-gradient(#e2dce8 1px,transparent 1px),linear-gradient(90deg,#e2dce8 1px,transparent 1px);background-size:9px 9px}.compact-field{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#8b8193;margin-top:15px;gap:6px}.compact-field select{max-width:110px;border:1px solid #e6e1e8;border-radius:5px;background:#fffefa;padding:5px 6px;font-size:10px;color:#74627f}.ink-options{display:flex;align-items:center;justify-content:space-between;gap:7px}.ink{border:3px solid #fbfaf7;background:var(--ink);height:23px;width:23px;padding:0;flex-shrink:0;border-radius:50%;position:relative}.ink.active{box-shadow:0 0 0 1.5px var(--ink)}.ink.active:after{content:'✓';color:white;position:absolute;inset:0;display:grid;place-items:center;font-size:9px}.custom-ink{position:relative;overflow:hidden;display:grid;place-items:center;border:1px solid #d6cddc;border-radius:50%;width:21px;height:21px;color:#aa9bb6;font-size:17px;cursor:pointer}.custom-ink input{position:absolute;opacity:0;inset:0;width:100%;height:100%;cursor:pointer}.range-label{display:flex;justify-content:space-between;margin-top:19px;font-size:10px;color:#8b8193}.range-label>span{color:#a194aa}.pen-range{display:flex;align-items:center;gap:9px;margin-top:7px}.pen-range input{width:100%;min-width:0}.small-dot,.big-dot{display:block;border-radius:50%;background:#b7a6c3;flex-shrink:0}.small-dot{width:3px;height:3px}.big-dot{width:9px;height:9px}input[type=range]{accent-color:#9179a4;height:15px;cursor:pointer}.drawing-tools{display:flex;gap:6px;margin-top:15px}.drawing-tools button{display:flex;align-items:center;justify-content:center;gap:7px;width:50%;padding:7px;background:none;border:1px solid #e5dfe8;border-radius:5px;color:#9a8d9f;font-size:10px}.drawing-tools button.active{background:#ede5f3;color:var(--plum);border-color:#d8cae3}.drawing-tools i svg{width:13px;height:13px}.tool-description{font-size:10px;color:#9b909e;line-height:1.7;margin:-5px 0 11px}.text-section textarea{resize:vertical;width:100%;min-height:70px;max-height:180px;background:#fffefa;border:1px solid #e0d9e5;border-radius:6px;padding:10px;color:#6b5d79;font-size:12px;line-height:1.6}.text-count{text-align:right;color:#b8aebd;font-size:8px;margin-top:3px}.switch-row{position:relative;display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#8b8193;margin:17px 0}.switch-row input{position:absolute;right:0;width:28px;height:17px;opacity:0;z-index:1;cursor:pointer}.switch{width:27px;height:16px;background:#d8d0de;border-radius:10px;display:block;position:relative}.switch:after{content:'';position:absolute;top:3px;left:3px;width:10px;height:10px;background:white;border-radius:50%;transition:transform .15s}.switch-row input:checked+.switch{background:#9b83ae}.switch-row input:checked+.switch:after{transform:translateX(11px)}.primary-outline{display:inline-flex;justify-content:center;align-items:center;gap:7px;border:1px solid #cbbdd7;border-radius:6px;background:#f5eff8;color:var(--plum);font-size:10px;font-weight:550;padding:9px 11px}.primary-outline:hover{background:#e9deef}.text-section .primary-outline{width:100%}.primary-outline i svg{width:14px;height:14px}.text-link{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--plum);font-size:10px;border:0;background:none;padding:10px 0;width:100%;text-decoration:underline;text-underline-offset:3px}.text-link i svg{width:12px;height:12px}.toolkit-note{display:flex;gap:10px;padding:14px 18px;background:#f2efe9;color:#a59483}.toolkit-note>span{font-size:26px;color:#b7a386}.toolkit-note p{font-size:10px;line-height:1.7;margin:2px 0}.workspace{min-width:0}.workspace-heading{display:flex;align-items:center;justify-content:space-between;padding:0 2px 17px}.workspace-heading h2{font-size:14px;letter-spacing:-.2px;font-weight:600;margin:0 0 6px}.workspace-heading p{font-size:10px;color:#a297a5;margin:0}.board-actions{display:flex;align-items:center;gap:2px}.divider{height:15px;width:1px;background:#e1d9e5;margin:0 9px}.clear-btn{background:none;border:0;color:#a094a7;font-size:10px;display:flex;align-items:center;gap:6px;padding:7px}.clear-btn i svg{width:14px;height:14px}.clear-btn:hover{color:#bc7067}.board-frame{border:1px solid #dfd8e2;border-radius:10px;box-shadow:0 4px 18px #4c3b5c05;overflow:hidden;background:var(--paper)}.board-topline{height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 21px;border-bottom:1px solid #eee8ee;background:#fcfbf8}.board-status{display:flex;align-items:center;gap:7px;font-size:8px;letter-spacing:1.3px;font-weight:600;color:#96908e}.board-status>span{width:5px;height:5px;border-radius:50%;background:#a3b09b}.board-status.playing{color:var(--plum)}.board-status.playing>span{background:#a285b5;animation:breathe 1.2s infinite}#inputHint{font-size:9px;color:#aca2af;display:flex;align-items:center;gap:6px}#inputHint i svg{width:13px;height:13px}.paper-scroll{height:475px;overflow:auto;scrollbar-color:#d9cfe0 #fcfafb;scrollbar-width:thin;overscroll-behavior:contain}.paper{position:relative;width:100%;min-width:500px;overflow:hidden;background:var(--paper);height:1200px}.paper canvas{position:absolute;top:0;left:0;width:100%;height:100%}#paperCanvas,#guideCanvas{pointer-events:none}#inkCanvas{touch-action:none;cursor:crosshair}#inkCanvas.erasing{cursor:cell}.paper:after{content:'';pointer-events:none;position:absolute;inset:0;opacity:.07;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.35' filter='url(%23n)'/%3E%3C/svg%3E")}.welcome{position:absolute;left:0;right:0;top:100px;text-align:center;pointer-events:none;color:#9a8aa5}.welcome-script{width:210px;height:100px;margin:0 auto 10px;transform:rotate(-5deg);opacity:.6}.welcome-script svg{width:100%;height:100%}.welcome h3{font:italic 22px var(--serif);color:#91809c;margin:12px 0}.welcome p{font-size:11px;color:#aca0b3}.welcome button{display:inline-flex;align-items:center;gap:6px;background:#f5eff7d9;border:1px solid #ddd1e5;border-radius:20px;padding:8px 13px;font-size:10px;color:#90779f;margin-top:7px;pointer-events:auto}.welcome button i svg{width:12px;height:12px}.welcome-spark{position:absolute;color:#c8b7d4}.spark-one{font-size:40px;top:15px;left:calc(50% - 190px);transform:rotate(-15deg)}.spark-two{font-size:19px;top:99px;left:calc(50% + 158px)}.add-paper{display:flex;align-items:center;justify-content:center;gap:7px;height:38px;width:100%;background:#fcfbf8;border:0;border-top:1px solid #eae4ec;color:#a093a9;font-size:10px}.add-paper i svg{width:12px;height:12px}.add-paper span{font-size:8px;opacity:.65;border-left:1px solid #d7cedc;padding-left:10px;margin-left:5px}.add-paper:hover{background:#f1eaf5;color:var(--plum)}.replay-panel{position:relative;border:1px solid #e4dce8;border-radius:10px;background:#f0eaf4;margin-top:15px;overflow:hidden}.playback-main{display:flex;align-items:center;gap:13px;padding:17px 20px 14px}.play-button{display:flex;align-items:center;justify-content:center;width:43px;height:43px;background:var(--plum);color:white;border:none;border-radius:50%;box-shadow:0 3px 6px #735b8820;flex-shrink:0}.play-button:hover{background:var(--plum-dark);box-shadow:0 4px 10px #735b8833}.play-button i svg{width:18px;height:18px;fill:currentColor;stroke-width:1.3}.playback-title{display:flex;flex-direction:column;gap:5px}.playback-title strong{font-size:12px;font-weight:600;color:#665274}.playback-title>span{font-size:10px;color:#a091aa}.repeat-select{margin-left:auto;display:flex;align-items:center;gap:9px}.repeat-select label{font-size:8px;letter-spacing:1.1px;color:#a494af}.repeat-select select{background:#f9f5fc;color:#8e7b9c;border:1px solid #e2d7eb;border-radius:6px;padding:7px 20px 7px 10px;font-size:10px}.playback-options{display:flex;align-items:center;gap:20px;border-top:1px solid #e3dae9;padding:11px 20px 14px}.checkbox-label{display:flex;align-items:center;gap:5px;font-size:10px;color:#94829f;cursor:pointer}.checkbox-label i svg{width:12px;height:12px}.checkbox-label input{appearance:none;width:11px;height:11px;border:1px solid #c6b6d2;border-radius:3px;background:#f9f6fb;margin:0 2px 0 0;display:grid;place-items:center;cursor:pointer}.checkbox-label input:checked{background:#aa90bd;border-color:#aa90bd}.checkbox-label input:checked:after{content:'✓';font-size:8px;color:white}.speed-control{display:flex;align-items:center;gap:7px;font-size:10px;color:#94829f;margin-left:auto}.speed-control i svg{width:13px;height:13px}.speed-control input{width:85px;height:12px;margin-left:4px}.speed-control output{min-width:24px;text-align:right;font-size:10px;font-weight:550}.play-progress{position:absolute;bottom:0;left:0;right:0;height:3px;background:#e9dfef}.play-progress span{display:block;height:100%;width:0;background:#b29bc4}.workspace-footnote{display:flex;justify-content:space-between;padding:13px 2px;font-size:9px;color:#b2a9b7;gap:15px}.workspace-footnote>span:first-child{display:flex;align-items:center;gap:5px}.workspace-footnote i svg{width:11px;height:11px}.site-footer{display:flex;align-items:center;gap:20px;margin:37px 0 0;padding:22px 0 26px;border-top:1px solid #e4dee5;color:#b0a6b6;font-size:9px}.site-footer>span:first-child{font:500 17px var(--serif);letter-spacing:-.7px;color:#b4a5c0}.site-footer p{margin:0}.site-footer>span:last-child{margin-left:auto;font-style:italic}.challenge-model{background:#fffdf8;border:1px solid #e3dce4;border-radius:10px;margin-bottom:13px;padding:17px 22px 10px}.model-label{display:flex;justify-content:space-between;align-items:center}.model-label>span:last-child{font-size:10px;color:#a296a6}.challenge-model canvas{width:100%;height:95px;display:block;margin-top:5px}.challenge-model-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.small-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #ded4e6;border-radius:6px;background:#fcf9fe;padding:8px 12px;font-size:10px;color:#8c739f}.small-btn:hover{background:#ede4f4}.small-btn i svg{width:13px;height:13px}.hint-label{display:flex;align-items:center;gap:6px;font-size:10px;color:#a495ac}.hint-label input{accent-color:var(--plum);margin:0}.challenge-footer{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:10px}.challenge-tip{display:flex;align-items:center;gap:9px;font-size:10px;color:#a398ac}.challenge-tip i{color:#b89b70}.primary-btn{display:inline-flex;justify-content:center;align-items:center;gap:7px;background:var(--plum);border:1px solid var(--plum);border-radius:7px;color:white;padding:11px 16px;font-size:11px}.primary-btn:hover{background:var(--plum-dark)}.primary-btn i svg{width:15px;height:15px}.score-panel{margin-top:17px;display:flex;gap:25px;align-items:center;border:1px solid #dbdfce;border-radius:10px;padding:23px;background:#f1f3e9;animation:enter .25s ease}.score-ring{background:conic-gradient(#8b9e73 var(--score,0%),#e0e5d5 0);width:110px;height:110px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-shrink:0;position:relative;gap:5px}.score-ring:before{content:'';position:absolute;inset:6px;background:#f1f3e9;border-radius:50%}.score-ring>strong{position:relative;font:500 30px var(--serif);color:#71815f}.score-ring>strong span{font-size:15px}.score-ring>span{position:relative;font-size:7px;color:#98a487;letter-spacing:.6px}.score-copy .eyebrow{font-size:7px;color:#94a07c}.score-copy h3{font:400 21px var(--serif);color:#72835d;margin:8px 0}.score-copy p{font-size:11px;color:#8a937e;line-height:1.6;margin:0 0 7px}.score-copy small{font-size:8px;color:#a5ac9a}.score-actions{display:flex;gap:8px;margin-top:13px}.score-actions .primary-outline{border-color:#c6d0b5;background:#eaf0df;color:#7f9067}.score-actions .small-btn{border:0;background:none;color:#84926f}.replay-cursor{position:absolute;pointer-events:none;width:17px;height:17px;border:2px solid #9574ad;border-radius:50%;box-shadow:0 0 0 5px #bda6cd25;transform:translate(-50%,-50%);z-index:2}dialog{border:1px solid #e1d7e7;border-radius:17px;background:#fcfaf7;color:var(--text);padding:30px;box-shadow:0 25px 100px #2c193337;max-width:calc(100vw - 30px)}dialog::backdrop{background:#352b3b55;backdrop-filter:blur(4px)}.guide-dialog{width:790px}.dialog-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:26px}.dialog-head h2{font:400 28px var(--serif);margin:8px 0 0;color:#665373;letter-spacing:-.7px}.guide-content{display:grid;grid-template-columns:210px 1fr;gap:30px}.alphabet-tabs{display:flex;gap:5px;margin-bottom:15px}.alphabet-tabs button{border:1px solid #e2d8e9;background:none;padding:7px 15px;border-radius:6px;color:#a28bad;font-size:13px}.alphabet-tabs .active{background:#e9deef;color:var(--plum);border-color:#cdbadb}.alphabet-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.alphabet-grid button{border:1px solid #e5dce9;background:#fffefa;border-radius:6px;font:italic 22px var(--serif);height:39px;color:#a18aad}.alphabet-grid button.active{background:var(--plum);color:white;border-color:var(--plum)}.letter-picker>p{font-size:10px;line-height:1.9;color:#ad9eb5;margin:18px 0 0}.formation-paper{height:255px;border:1px solid #e4dce7;border-radius:10px;background:#fffefa;overflow:hidden}.formation-paper canvas{width:100%;height:100%;display:block}.formation-controls{display:flex;justify-content:space-between;align-items:center;margin-top:13px;gap:10px}.formation-controls>label{font-size:10px;color:#9b89a6}.formation-controls select{margin-left:4px;font-size:10px;border:1px solid #ded1e6;border-radius:4px;background:#fff;padding:5px;color:#8f789e}.formation-area ol{padding-left:22px;font-size:11px;color:#95809f;line-height:1.8;min-height:39px}.formation-area ol li::marker{font-weight:600;color:var(--plum)}.formation-area .text-link{justify-content:flex-start}.guide-note{border-top:1px solid #e8e0eb;padding-top:16px;margin:24px 0 0;color:#b1a5b9;font-size:9px;line-height:1.6}.help-dialog{width:690px}.help-items{display:grid;grid-template-columns:1fr 1fr;gap:27px 30px}.help-items>div>span{font:italic 24px var(--serif);color:#c3accf}.help-items h3{font-size:13px;font-weight:600;color:#897198;margin:10px 0}.help-items p{font-size:12px;line-height:1.8;color:#9f90a8;margin:0}.clear-dialog{text-align:center;padding:30px;width:365px}.clear-icon{display:inline-flex;padding:13px;background:#f1e5e7;border-radius:50%;color:#bd8c95}.clear-dialog h2{font:400 22px var(--serif);color:#795f89}.clear-dialog p{font-size:12px;line-height:1.8;color:#a18fa9;margin-bottom:22px}.clear-dialog>div:last-child{display:flex;justify-content:center;gap:10px}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:#665273;color:#fff9fe;padding:12px 21px;border-radius:9px;box-shadow:0 4px 20px #3d25442a;font-size:12px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:9;text-align:center;max-width:90vw}.toast.show{transform:translate(-50%,0);opacity:1}.hidden{display:none!important}@keyframes breathe{50%{opacity:.35}}@keyframes enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(min-width:1550px){.paper-scroll{height:550px}.app-shell{padding-top:45px}}@media(max-width:1050px){.brand-caption{display:none}.app-shell{padding:30px 3% 0}.topbar{padding:0 3%;height:75px}.studio-layout{grid-template-columns:200px minmax(0,1fr);gap:20px}.tool-section{padding:18px 13px}.intro h1{font-size:30px}.mode-tabs{gap:22px}.guide-launch{padding:10px 12px}.playback-main{padding:15px 13px}.playback-options{padding:11px 13px 14px;gap:13px}.speed-control input{width:65px}.repeat-select label{display:none}.playback-title>span{font-size:9px}.playback-title strong{font-size:11px}.play-button{width:38px;height:38px}.workspace-footnote{font-size:8px}.challenge-tip{max-width:170px;line-height:1.6}.score-panel{padding:17px;gap:15px}}@media(max-width:760px){.topbar{height:66px;padding:0 5%}.brand{font-size:25px}.brandmark{width:30px;height:34px}.save-state{display:none}.top-actions{gap:3px}.app-shell{padding:24px 4% 0}.intro{align-items:flex-start;margin-bottom:25px}.intro .eyebrow{font-size:7px;letter-spacing:1.4px}.intro h1{font-size:25px;max-width:240px;margin-top:10px}.intro h1 em{display:block}.intro p{font-size:10px;max-width:200px;line-height:1.7}.guide-launch{margin-top:15px;padding:9px 12px;gap:7px;border-radius:8px}.guide-launch small,.guide-launch>i{display:none}.guide-launch>span:nth-child(2){font-size:10px;max-width:55px;line-height:1.7}.guide-letter{font-size:35px;width:27px}.mode-tabs{justify-content:space-between;gap:8px;margin-bottom:20px}.mode-tab{font-size:10px;gap:6px;padding-bottom:13px}.mode-tab i svg{width:14px;height:14px}.studio-layout{display:flex;flex-direction:column;gap:20px}.toolkit{display:grid;grid-template-columns:1fr 1fr;border-radius:9px}.tool-section{padding:15px 13px}.tool-section:first-child{border-right:1px solid #eae5e8}.section-label{font-size:8px;letter-spacing:1px;margin-bottom:12px}.paper-options{grid-template-columns:repeat(3,1fr);gap:7px}.paper-sample{height:21px;margin:3px 3px 1px}.paper-choice{padding-bottom:3px}.paper-choice>span:last-child{font-size:7px}.paper-choice.active:after{width:9px;height:9px;font-size:7px;right:2px;top:2px}.compact-field{margin-top:11px;font-size:9px}.compact-field select{font-size:9px;padding:4px;max-width:100px}.ink-options{gap:5px;justify-content:flex-start;flex-wrap:wrap}.ink{width:22px;height:22px}.custom-ink{width:19px;height:19px}.range-label{margin-top:14px;font-size:9px}.drawing-tools{margin-top:10px}.drawing-tools button{padding:5px;font-size:9px}.text-section{grid-column:1/-1;border-bottom:0;display:grid;grid-template-columns:1fr 1fr;column-gap:15px;align-items:start}.text-section .section-label,.text-section .tool-description{grid-column:1/-1}.text-section textarea{grid-row:3/6;min-height:90px;height:90px}.text-count{grid-column:1;grid-row:6}.text-section .compact-field{grid-column:2;margin:0 0 7px}.text-section .switch-row{grid-column:2;font-size:9px;margin:2px 0 12px}.text-section .primary-outline{grid-column:2;grid-row:6/8;margin-top:4px}.text-section .text-link{grid-column:1/-1;margin-top:8px}.toolkit-note{display:none}.workspace-heading{padding-bottom:13px}.workspace-heading h2{font-size:13px}.workspace-heading p{font-size:9px}.paper-scroll{height:390px}.board-topline{padding:0 13px;height:35px}.board-status{font-size:7px;letter-spacing:.9px}#inputHint{font-size:8px}.board-actions .icon-btn{width:26px;height:30px}.divider{margin:0 5px}.clear-btn{font-size:9px}.playback-options{gap:12px;flex-wrap:wrap}.speed-control{margin-left:auto;gap:5px}.speed-control input{width:65px}.checkbox-label{font-size:9px}.playback-title>span{font-size:8px}.repeat-select select{font-size:9px;padding:6px 5px}.playback-main{gap:9px}.playback-title strong{font-size:10px}.site-footer{margin-top:22px;gap:15px}.site-footer>span:last-child{display:none}.guide-dialog{padding:22px}.guide-content{grid-template-columns:1fr;gap:20px}.letter-picker{display:flex;flex-direction:column}.alphabet-grid{grid-template-columns:repeat(9,1fr);gap:4px}.alphabet-grid button{font-size:20px;height:33px}.letter-picker>p{display:none}.alphabet-tabs{margin-bottom:9px}.formation-paper{height:220px}.dialog-head h2{font-size:24px}.dialog-head{margin-bottom:20px}.guide-note{margin-top:10px}.guide-dialog{max-height:92vh;overflow:auto}.help-items{grid-template-columns:1fr;gap:20px}.help-dialog{padding:25px}.help-items p{font-size:11px}.score-panel{align-items:flex-start}.score-ring{width:82px;height:82px}.score-ring strong{font-size:24px}.score-ring>span{font-size:5px}.score-copy h3{font-size:18px}.score-copy p{font-size:10px}.challenge-model{padding:13px}.model-label{gap:15px}.model-label>span:last-child{font-size:8px}.challenge-tip{font-size:9px;max-width:160px}.challenge-footer .primary-btn{font-size:10px;padding:10px}.welcome{top:85px}}
/* Keep the working controls visible on classroom laptop displays. */
@media(min-width:761px){.topbar{height:74px}.app-shell{padding-top:27px}.intro{margin-bottom:23px}.intro h1{font-size:32px}.mode-tabs{margin-bottom:21px}.mode-tab{padding-bottom:15px}.paper-scroll{height:clamp(300px,calc(100vh - 590px),475px)}.toolkit{display:flex;flex-direction:column}body[data-mode=trace] .text-section,body[data-mode=challenge] .text-section{order:-1}.text-section{border-bottom:1px solid #eae5e8}}
.tool-description,.compact-field,.range-label,.workspace-heading p,.playback-title>span,.checkbox-label,.speed-control,.workspace-footnote{color:#87768f}.intro p{color:#817486}.paper-choice>span:last-child{color:#807189}.board-status{color:#817987}#inputHint{color:#8f8496}.playback-options label{font-size:11px}.playback-options{padding-bottom:15px}.guide-note,.help-items p{color:#8e7c99}.guide-dialog .letter-picker>p{color:#8c7a97}.score-copy small{color:#7d876f}
@media(max-width:760px){body[data-mode=trace] .text-section,body[data-mode=challenge] .text-section{order:-1}.paper-scroll{height:360px}.playback-options label{font-size:9px}}
@media(max-width:760px){.toolkit{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-section{min-width:0}.paper-options{grid-template-columns:repeat(2,minmax(0,1fr))}.paper-choice>span:last-child{font-size:8px}.paper-sample{height:23px}.drawing-tools{flex-wrap:wrap}.drawing-tools button{width:calc(50% - 3px)!important;gap:4px;padding:6px 2px;font-size:9px}.drawing-tools button:last-child{width:100%!important}.text-section{grid-template-columns:repeat(2,minmax(0,1fr))}.ink-options{gap:5px}}
.guide-style-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 15px;margin:-8px 0 22px;background:#f2edf5;border:1px solid #e6dceb;border-radius:8px}.guide-style-row label{display:flex;align-items:center;gap:13px;font-size:11px;font-weight:500;color:#877292;flex-shrink:0}.guide-style-row select{border:1px solid #d5c4e0;border-radius:5px;background:#fffefa;color:#795c8d;font-size:11px;padding:7px 9px;max-width:170px}.guide-style-row p{margin:0;font-size:10px;line-height:1.6;color:#9a86a5}.compact-field select#fontStyle{min-width:111px}
@media(max-width:760px){.guide-style-row{align-items:flex-start;flex-direction:column;gap:8px;padding:10px 12px;margin-bottom:16px}.guide-style-row select{max-width:170px}.compact-field select#fontStyle{min-width:95px;font-size:9px}.guide-style-row p{font-size:9px}}
.paper-picker-trigger{display:block;width:100%;padding:0;overflow:hidden;border:1px solid #d9cde1;border-radius:8px;background:#fffefa;text-align:left;color:#795d8b;transition:border-color .15s,box-shadow .15s}.paper-picker-trigger:hover{border-color:#a788bb;box-shadow:0 2px 9px #735b8812}.paper-picker-trigger:focus-visible{outline:2px solid #9975b0;outline-offset:3px}.paper-picker-trigger canvas{display:block;width:100%;height:70px;object-fit:cover;border:0;border-bottom:1px solid #e9e0ed;border-radius:0;margin:0}.paper-picker-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;font-size:10px;line-height:1.4}.paper-picker-caption i{display:flex;flex-shrink:0}.paper-picker-caption i svg{width:13px;height:13px}.challenge-setup{order:-1}.challenge-setup .tool-description{line-height:1.7}.challenge-setup .primary-outline{width:100%}.paper-dialog{width:880px;max-height:90vh;padding:27px}.paper-dialog .dialog-head{margin-bottom:12px}.paper-picker-intro{font-size:11px;color:#97829f;line-height:1.7;margin:0 0 18px}.paper-gallery{max-height:64vh;overflow:auto;padding-right:8px;scrollbar-width:thin;scrollbar-color:#cab9d7 transparent}.paper-gallery section+section{margin-top:24px}.paper-gallery h3{font-size:10px;font-weight:650;letter-spacing:1.2px;text-transform:uppercase;color:#887095;margin:0 0 11px}.paper-gallery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.paper-card{position:relative;text-align:left;padding:0 0 11px;border:1px solid #e0d5e7;border-radius:8px;overflow:hidden;background:#fffefa;min-width:0}.paper-card canvas{display:block;width:100%;height:75px;border-bottom:1px solid #ece5ed;margin-bottom:10px}.paper-card strong{display:block;margin:0 9px;color:#846591;font-size:10px;font-weight:550;line-height:1.4}.paper-card small{display:block;margin:4px 9px 0;font-size:8px;line-height:1.5;color:#ab99b4}.paper-card:hover{border-color:#b09ac0}.paper-card.active{border-color:#9975b0;box-shadow:0 0 0 1px #9975b0;background:#f6effa}.paper-card.active:after{content:'✓';display:grid;place-items:center;position:absolute;right:7px;top:7px;width:17px;height:17px;border-radius:50%;color:white;background:#8b6b9f;font-size:10px}
@media(max-width:760px){.paper-picker-trigger canvas{height:61px}.paper-picker-caption{font-size:9px;padding:8px}.challenge-setup{grid-column:1/-1}.paper-dialog{padding:21px}.paper-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.paper-card canvas{height:69px}.paper-picker-intro{font-size:10px}.paper-gallery{max-height:65vh}}
/* Compact classroom branding keeps the paper close to the top of the page. */
.brand-words{display:flex;flex-direction:column;gap:1px}.brand-owner{font:600 10px var(--sans);letter-spacing:1.3px;color:var(--plum);line-height:1.2}.brand-title{line-height:1}.mode-toolbar{display:flex;align-items:center;gap:24px;margin-bottom:24px;border-bottom:1px solid #e3dce7}.mode-toolbar .mode-tabs{flex:1;margin:0;border:0;align-self:stretch;align-items:flex-end}.mode-toolbar .guide-launch{margin:0 0 12px;padding:8px 13px;box-shadow:none}.mode-toolbar .guide-letter{font-size:32px;width:31px}.mode-toolbar .guide-launch small{display:none}.mode-toolbar .guide-launch>span:nth-child(2){font-size:11px}.paper-fullscreen-btn{display:flex;align-items:center;gap:6px;background:#f1eaf5;border:1px solid #ddd0e6;color:#795b8d;padding:7px 9px;border-radius:6px;font-size:10px;margin-right:5px;white-space:nowrap}.paper-fullscreen-btn i svg{width:13px;height:13px}.paper-fullscreen-btn:hover{background:#e8dcf0}.workspace-heading{gap:15px}.board-actions{flex-shrink:0}
@media(min-width:761px){.paper-scroll{height:clamp(390px,calc(100dvh - 385px),700px)}}
body.paper-fullscreen{overflow:hidden}.workspace.is-fullscreen{position:fixed;inset:0;z-index:20;background:var(--bg,#f7f5f0);padding:16px 22px 8px;width:100%;height:100dvh;display:flex;flex-direction:column;overflow:auto}.workspace.is-fullscreen>.workspace-heading{flex-shrink:0;padding-bottom:12px}.workspace.is-fullscreen .workspace-heading p{display:none}.workspace.is-fullscreen>.board-frame{display:flex;flex:1;flex-direction:column;min-height:180px}.workspace.is-fullscreen .paper-scroll{height:auto!important;min-height:130px;flex:1}.workspace.is-fullscreen .board-topline,.workspace.is-fullscreen .add-paper{flex-shrink:0;height:30px}.workspace.is-fullscreen>.replay-panel{flex-shrink:0;margin-top:9px}.workspace.is-fullscreen .playback-main{padding:10px 16px}.workspace.is-fullscreen .playback-options{padding:8px 16px 11px}.workspace.is-fullscreen>.workspace-footnote{flex-shrink:0;padding:8px 2px}.workspace.is-fullscreen>.challenge-model,.workspace.is-fullscreen>.challenge-footer,.workspace.is-fullscreen>.score-panel{flex-shrink:0}.workspace.is-fullscreen .challenge-model canvas{max-height:130px}.paper-fullscreen .toast{z-index:30}
@media(max-width:760px){.brand-owner{font-size:8px;letter-spacing:1px}.brand-title{font-size:25px}.mode-toolbar{gap:10px;flex-wrap:wrap;margin-bottom:18px}.mode-toolbar .mode-tabs{order:1;flex-basis:100%;justify-content:space-between}.mode-toolbar .guide-launch{margin:0 0 1px auto;padding:6px 10px;gap:7px}.mode-toolbar .guide-launch>span:nth-child(2){max-width:none;font-size:10px}.mode-toolbar .guide-letter{font-size:23px;width:20px}.mode-toolbar .guide-letter>span{display:none}.mode-toolbar .mode-tab{padding-bottom:13px}.workspace-heading{align-items:flex-start;flex-wrap:wrap;gap:10px}.board-actions{margin-left:auto}.paper-fullscreen-btn{font-size:9px;padding:6px}.workspace.is-fullscreen{padding:10px 10px 4px}.workspace.is-fullscreen>.workspace-heading{align-items:center;flex-wrap:nowrap;gap:6px;padding-bottom:8px}.workspace.is-fullscreen .workspace-heading h2{font-size:11px}.workspace.is-fullscreen .board-actions .divider{margin:0 3px}.workspace.is-fullscreen .playback-main{padding:9px 10px}.workspace.is-fullscreen .playback-options{padding:8px 10px 11px}.workspace.is-fullscreen .workspace-footnote{font-size:7px}}
.paper-fullscreen .topbar,.paper-fullscreen .mode-toolbar,.paper-fullscreen .site-footer{visibility:hidden}

/* The challenge reference and pupil attempt have identical paper coordinates. */
.studio-tools{display:flex;align-items:center;gap:10px;margin:0 0 12px auto}.mode-toolbar .studio-tools .guide-launch{margin:0}
.challenge-model.matched-model{padding:0;overflow:hidden}.matched-model .model-label{padding:12px 16px;gap:12px;border-bottom:1px solid #e8deec;background:#faf7fc}.matched-model .model-label .eyebrow{font-size:8px;white-space:nowrap}.matched-model #challengePrompt{font-size:10px;line-height:1.5;color:#8b7499}.matched-model .model-paper-scroll{max-height:240px;overflow:auto;scrollbar-width:thin;scrollbar-color:#d7c6e2 transparent}.matched-model #modelCanvas{display:block;width:100%;margin:0;max-height:none}.matched-model .challenge-model-actions{padding:9px 15px;border-top:1px solid #e8deec}.workspace.is-fullscreen .matched-model #modelCanvas{max-height:none}.workspace.is-fullscreen .model-paper-scroll{max-height:min(38dvh,360px)}.workspace.is-fullscreen .matched-model .model-label{padding:6px 13px}.workspace.is-fullscreen .matched-model .challenge-model-actions{padding:6px 13px}
/* Printable worksheet builder. */
.sheet-layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:25px;align-items:start}.sheet-controls{min-width:0;max-height:72dvh;overflow:auto;padding:0 9px 0 1px;scrollbar-width:thin;scrollbar-color:#d7c6e2 transparent}.sheet-word-modes{margin:0 0 15px;border:0;padding:0;display:flex;flex-direction:column;gap:9px}.sheet-word-modes legend,.sheet-words-label,.sheet-field-title{display:block;font-size:10px;font-weight:600;color:#79628b;margin-bottom:9px}.sheet-word-modes label{font-size:11px;display:flex;align-items:center;gap:7px;color:#877092}.sheet-word-modes input,.sheet-cues input{accent-color:#735b88;margin:0}.sheet-controls textarea{width:100%;min-height:77px;resize:vertical;font:12px/1.7 var(--sans);border:1px solid #dbd0e2;border-radius:7px;padding:10px;background:#fffefa;color:#665173}.sheet-controls textarea:focus{outline:2px solid #c8b1d7;outline-offset:1px}.sheet-field-note{font-size:9px;color:#9b89a5;line-height:1.6;margin:6px 0 15px}.sheet-paper-settings{display:grid;grid-template-columns:1fr 1fr;gap:15px;align-items:center;margin-top:15px}.sheet-paper-settings .compact-field{margin:8px 0}.sheet-paper-settings .compact-field select{max-width:70px}.sheet-paper-settings .paper-picker-caption{font-size:8px;padding:6px}.sheet-paper-settings .paper-picker-trigger canvas{height:49px}.sheet-style-field{margin:15px 0}.sheet-style-field select{max-width:157px}.sheet-switches{border-top:1px solid #e8deec;border-bottom:1px solid #e8deec;padding:1px 0 13px;margin:15px 0}.sheet-switches .switch-row{font-size:11px;margin:14px 0}.sheet-switches .switch-row small{display:block;font-size:9px;font-weight:400;color:#a08ca9;margin-top:4px}.sheet-cues{display:flex;flex-wrap:wrap;gap:12px;font-size:10px;color:#887292;margin-top:16px}.sheet-cues label{display:flex;align-items:center;gap:6px}.sheet-download{width:100%;font-size:12px}.sheet-download:disabled{opacity:.5;cursor:default}.sheet-error{font-size:11px;color:#a0515f;line-height:1.6;background:#faedef;padding:10px;border-radius:6px}.sheet-preview-section{min-width:0;border-radius:10px;background:#eee9ef;border:1px solid #e1d8e6;overflow:hidden}.sheet-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;background:#f5f0f7;border-bottom:1px solid #e1d8e6;color:#8b7597;font-size:10px}.sheet-preview-toolbar>div{display:flex;align-items:center;gap:7px;white-space:nowrap}.sheet-preview-toolbar .icon-btn{width:24px;height:25px;font-size:23px}.sheet-preview-scroll{max-height:65dvh;overflow:auto;padding:20px;scrollbar-width:thin;scrollbar-color:#c9b8d5 transparent}.sheet-preview{background:white;box-shadow:0 4px 20px #4a36591a}.sheet-preview svg{display:block;width:100%;height:auto}.sheet-empty{padding:70px 20px;color:#b3a4bd;text-align:center;font-size:12px}
@media(max-width:760px){.mode-toolbar .studio-tools{margin:0 0 2px auto;gap:8px}.mode-toolbar .studio-tools .guide-launch{margin:0}.challenge-model.matched-model{padding:0}.matched-model .model-label{padding:10px 12px;flex-wrap:wrap;gap:5px}.matched-model #challengePrompt{font-size:9px}.matched-model .challenge-model-actions{padding:8px 11px}.matched-model .model-paper-scroll{max-height:190px}.sheet-layout{grid-template-columns:1fr;gap:17px}.sheet-controls{max-height:none;padding:0}.sheet-preview-scroll{max-height:none;padding:12px}.sheet-preview-toolbar{padding:8px 10px;font-size:9px}.sheet-word-modes{gap:10px}.sheet-paper-settings .paper-picker-trigger canvas{height:58px}.sheet-paper-settings .paper-picker-caption{font-size:9px}.sheet-paper-settings .compact-field select{max-width:90px}.sheet-style-field select{max-width:155px}}

.sheet-file-ready{font-size:10px;line-height:1.7;color:#6a8561;margin:8px 0}.sheet-file-ready a{color:#795d8b;text-decoration:underline;cursor:pointer;margin-left:5px}

/* The printable generator is the fourth studio tab. */
.sheet-panel{width:100%;padding:0}.sheet-panel-heading{margin:0 0 18px}.sheet-panel-heading h2{margin:0 0 6px;font:500 18px var(--serif);color:#6c567a}.sheet-panel-heading p{margin:0;font-size:11px;color:#97839f}.sheet-panel .sheet-layout{grid-template-columns:320px minmax(0,1fr);gap:25px}.sheet-panel .sheet-controls{background:#fffdf8;border:1px solid #e3dce4;border-radius:10px;padding:19px;max-height:calc(100dvh - 250px);min-height:350px}.sheet-panel .sheet-preview-scroll{max-height:calc(100dvh - 305px);min-height:300px}.sheet-panel .sheet-preview{max-width:650px;margin:0 auto}.sheet-practice-label{display:block;font-size:10px;font-weight:600;color:#79628b;margin:16px 0 8px}.sheet-practice-select{display:block;width:100%;padding:9px;border:1px solid #d8cce1;border-radius:6px;background:#fffefa;font:11px var(--sans);color:#795d8b}.sheet-practice-select:focus-visible{outline:2px solid #c8b1d7;outline-offset:2px}.sheet-switches #sheetPracticeNote{margin:8px 0 0}.mode-toolbar .mode-tabs{gap:28px}.mode-toolbar .mode-tab{white-space:nowrap}
@media(min-width:761px) and (max-width:1000px){.mode-toolbar{flex-wrap:wrap}.mode-toolbar .mode-tabs{order:1;flex-basis:100%}.mode-toolbar .studio-tools{margin-bottom:0}}
@media(max-width:760px){.sheet-panel .sheet-layout{grid-template-columns:1fr;gap:18px}.sheet-panel .sheet-controls{max-height:none;min-height:0;padding:18px}.sheet-panel .sheet-preview-scroll{max-height:none;min-height:0}.sheet-panel-heading h2{font-size:17px}.mode-toolbar .mode-tabs{gap:12px}}
@media(max-width:520px){.mode-toolbar .mode-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px;align-items:stretch}.mode-toolbar .mode-tab{justify-content:center;padding:11px 2px;font-size:10px;gap:6px}.mode-toolbar .mode-tab i svg{width:14px;height:14px}}

/* Paper workspace and full-screen options overlay. */
#studioLayout{display:block}#writingWorkspace{width:100%;max-width:1080px;margin:0 auto;min-width:0}.topbar{height:64px}.app-shell{padding-top:18px}.mode-toolbar{margin-bottom:18px}.workspace-heading{align-items:center;padding-bottom:12px}.workspace-heading h2{font-size:16px}.workspace-heading p{font-size:10px}.board-actions{gap:4px}.workspace-options{position:relative;flex-shrink:0}.workspace-options>summary{display:flex;align-items:center;justify-content:center;gap:6px;list-style:none;cursor:pointer;background:#fffdf9;border:1px solid #d9cde2;border-radius:6px;color:#795d8b;padding:8px 10px;font-size:10px;white-space:nowrap}.workspace-options>summary::-webkit-details-marker{display:none}.workspace-options>summary i{display:flex}.workspace-options>summary svg{width:14px;height:14px}.workspace-options[open]>summary{background:#ece2f2;border-color:#b69ac8}.workspace-options>summary:focus-visible{outline:2px solid #9975b0;outline-offset:3px}.options-popover{position:fixed;z-index:40;width:320px;max-width:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain;border:1px solid #d9cce2;border-radius:11px;background:#fffdf9;box-shadow:0 12px 45px #3d29492b;scrollbar-width:thin;scrollbar-color:#cbb8d7 transparent}.options-popover-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px;border-bottom:1px solid #e9e0ed;background:#fffdf9}.options-popover-head strong{font-size:11px;color:#795d8b;font-weight:600}.options-popover-head .icon-btn{width:28px;height:28px}.workspace-options:not([open])>.options-popover{display:none}
#writingOptions .toolkit{display:flex;flex-direction:column;width:100%;min-width:0;border:0;border-radius:0;background:transparent;box-shadow:none}#writingOptions .tool-section{width:100%;padding:14px;border-right:0}#writingOptions .section-label{font-size:9px;margin-bottom:11px}#writingOptions .section-label span{display:none}#writingOptions .text-section{display:block;order:-1}#writingOptions .challenge-setup{order:-1}#writingOptions .text-section textarea{display:block;width:100%;min-height:58px;height:58px;max-height:160px}#writingOptions .text-section .compact-field{display:flex;margin:10px 0}#writingOptions .text-section .switch-row{margin:12px 0}#writingOptions .text-section .primary-outline{width:100%;margin-top:2px}#writingOptions .text-section .text-link{margin:10px 0 0}#writingOptions .paper-section{display:grid;grid-template-columns:130px minmax(0,1fr);gap:0 12px;align-items:center}#writingOptions .paper-section .section-label{grid-column:1/-1}#writingOptions .paper-section .compact-field{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin:0}#writingOptions .paper-section .compact-field select{max-width:115px;width:100%}#writingOptions .paper-picker-trigger canvas{height:43px}#writingOptions .paper-picker-caption{padding:7px;font-size:9px}#writingOptions .ink-options{justify-content:flex-start;gap:10px}#writingOptions .drawing-tools{display:flex;flex-wrap:nowrap;gap:4px}#writingOptions .drawing-tools button{flex:1;width:auto!important;padding:7px 4px;font-size:10px;white-space:nowrap}#writingOptions .tool-description{font-size:10px;line-height:1.5}
.paper-writing-label{display:flex;align-items:center;gap:6px;color:#735b88;white-space:nowrap}.paper-writing-label i{display:flex}.paper-writing-label svg{width:13px;height:13px}.paper-writing-label strong{font-size:11px;font-weight:600}.board-topline{gap:12px;height:35px}.board-status{margin-left:auto}.board-topline #inputHint{margin-left:0}.paper-scroll{height:clamp(280px,calc(100dvh - 385px),650px)}body[data-mode=challenge] .paper-scroll{height:clamp(230px,calc(100dvh - 625px),470px)}.matched-model .model-label{padding:8px 13px}.matched-model .challenge-model-actions{padding:7px 13px}.matched-model .model-paper-scroll{max-height:220px}
#sheetPanel{max-width:900px;margin:0 auto}#sheetPanel .sheet-layout{display:block}#sheetPanel .sheet-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.sheet-action-group{display:flex;align-items:flex-end;flex-direction:column;gap:5px}.sheet-actions{display:flex;align-items:center;gap:8px}.sheet-actions .sheet-download{width:auto;padding:9px 12px;font-size:10px;white-space:nowrap}#sheetOptions .sheet-controls{display:block;min-height:0;max-height:none;border:0;background:transparent;border-radius:0;padding:14px;width:100%;overflow:visible}#sheetOptions .sheet-paper-settings{grid-template-columns:1fr 1fr}#sheetPanel .sheet-preview-section{width:100%;max-width:760px;margin:0 auto}#sheetPanel .sheet-preview-scroll{max-height:calc(100dvh - 295px);min-height:280px}#sheetPanel .sheet-preview{max-width:550px;margin:0 auto}.sheet-action-group .sheet-file-ready{margin:0;font-size:9px}.workspace.is-fullscreen{max-width:none!important;margin:0!important}.workspace.is-fullscreen .paper-scroll{height:auto!important}.workspace.is-fullscreen .workspace-options>summary{padding:7px 9px}
@media(max-width:760px){.topbar{height:60px}.app-shell{padding-top:15px}.mode-toolbar{margin-bottom:15px}.workspace-heading{gap:8px;align-items:center;flex-wrap:wrap}.workspace-heading h2{font-size:14px}.workspace-heading p{font-size:9px}.board-actions{gap:3px}.workspace-options>summary{padding:7px 9px;font-size:10px}.paper-fullscreen-btn{margin-right:0}.paper-fullscreen-btn span{display:none}.paper-fullscreen-btn{padding:7px}.board-topline{padding:0 11px;gap:8px}.paper-writing-label strong{font-size:10px}.board-status{font-size:6px;letter-spacing:.5px}.board-topline #inputHint{display:none}.paper-scroll{height:clamp(260px,calc(100dvh - 390px),420px)}body[data-mode=challenge] .paper-scroll{height:clamp(230px,calc(100dvh - 500px),380px)}#sheetPanel .sheet-panel-heading{align-items:flex-start;flex-wrap:wrap;gap:12px}.sheet-action-group{margin-left:auto}#sheetPanel .sheet-preview-scroll{min-height:250px;max-height:calc(100dvh - 330px);padding:12px}.options-popover{width:310px}.workspace.is-fullscreen .workspace-heading{flex-wrap:wrap!important}.workspace.is-fullscreen .board-actions{margin-left:auto}}

/* Normal view keeps its compact options panel beside the paper. */
#studioLayout{display:grid;grid-template-columns:218px minmax(0,1fr);gap:18px;align-items:start}
#writingWorkspace{max-width:none}
.options-dock{min-width:0;position:sticky;top:14px;max-height:calc(100dvh - 185px);overflow:auto;border:1px solid #ded3e4;border-radius:10px;background:#fffdf9;scrollbar-width:thin;scrollbar-color:#cbb8d7 transparent}
.options-dock .workspace-options{width:100%}
.options-dock .workspace-options>summary,.options-dock .options-popover-head{display:none}
.options-dock .options-popover{position:static;width:100%;max-width:none;max-height:none;overflow:visible;border:0;border-radius:0;box-shadow:none}
#writingOptionsDock .tool-section{padding:11px 12px}
#writingOptionsDock .section-label{margin-bottom:8px;font-size:8px;letter-spacing:1px}
#writingOptionsDock .paper-section{grid-template-columns:100px minmax(0,1fr);gap:0 9px}
#writingOptionsDock .paper-picker-trigger canvas{height:36px}
#writingOptionsDock .paper-picker-caption{font-size:8px;padding:6px}
#writingOptionsDock .paper-section .compact-field{font-size:9px;gap:6px}
#writingOptionsDock .compact-field select{padding:5px 4px;font-size:10px;max-width:122px}
#writingOptionsDock .paper-section .compact-field select{width:100%;min-width:0}
#writingOptionsDock .ink-options{gap:7px;flex-wrap:wrap}
#writingOptionsDock .ink{width:21px;height:21px}
#writingOptionsDock .range-label{margin-top:11px;font-size:9px}
#writingOptionsDock .drawing-tools{margin-top:9px}
#writingOptionsDock .drawing-tools button{padding:6px 4px;font-size:9px}
#writingOptionsDock .text-section .tool-description{display:none}
#writingOptionsDock .text-section textarea{height:55px;min-height:55px;padding:8px;font-size:11px}
#writingOptionsDock .text-section .compact-field{margin:7px 0;font-size:9px}
#writingOptionsDock .text-section .switch-row{margin:9px 0;font-size:9px}
#writingOptionsDock .text-section .primary-outline{font-size:10px;padding:8px 4px}
#writingOptionsDock .text-section .text-link{margin-top:8px;font-size:9px}
#writingOptionsDock .challenge-setup .primary-outline{font-size:10px;padding:8px 4px}
#writingOptionsDock .challenge-setup .text-link{font-size:9px;line-height:1.5}
#writingWorkspace .workspace-heading{flex-wrap:wrap;gap:8px}
#writingWorkspace .board-actions{margin-left:auto}
#sheetPanel{max-width:1180px}
#sheetPanel .sheet-layout{display:grid;grid-template-columns:256px minmax(0,1fr);gap:18px;align-items:start}
#sheetOptionsDock .sheet-controls{padding:12px}
#sheetOptionsDock .sheet-word-modes{gap:7px;margin-bottom:10px}
#sheetOptionsDock .sheet-word-modes label{font-size:10px}
#sheetOptionsDock .sheet-controls textarea{min-height:60px;height:60px;padding:8px;font-size:11px}
#sheetOptionsDock .sheet-field-note{margin:5px 0 10px;font-size:8px}
#sheetOptionsDock .sheet-paper-settings{gap:10px;margin-top:10px}
#sheetOptionsDock .sheet-style-field{margin:10px 0}
#sheetOptionsDock .sheet-switches{margin:10px 0;padding-bottom:10px}
#sheetOptionsDock .sheet-switches .switch-row{margin:10px 0;font-size:10px}
#sheetOptionsDock .sheet-practice-select{padding:7px;font-size:10px}
#sheetOptionsDock .sheet-cues{font-size:9px;gap:10px;margin-top:10px}
.paper-fullscreen .options-dock{display:none}
@media(min-width:701px) and (max-width:1000px){
 #studioLayout{grid-template-columns:198px minmax(0,1fr);gap:14px}
 #writingOptionsDock .tool-section{padding:10px}
 #writingOptionsDock .paper-section{grid-template-columns:90px minmax(0,1fr);gap:0 7px}
 #writingOptionsDock .ink-options{gap:5px}
 #writingOptionsDock .compact-field select{max-width:112px}
 #sheetPanel .sheet-layout{grid-template-columns:232px minmax(0,1fr);gap:14px}
}
@media(max-width:700px){
 #studioLayout{grid-template-columns:minmax(0,1fr);gap:14px}
 .options-dock{position:static;max-height:190px}
 #writingOptionsDock .toolkit{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
 #writingOptionsDock .text-section,#writingOptionsDock .challenge-setup{grid-column:1/-1}
 #writingOptionsDock .text-section{order:-1}
 #writingOptionsDock .paper-section{grid-template-columns:minmax(0,1fr);gap:8px}
 #writingOptionsDock .paper-section .compact-field{flex-direction:row;align-items:center}
 #writingOptionsDock .paper-section .compact-field select{width:auto}
 #writingOptionsDock .tool-section{padding:10px}
 #writingOptionsDock .ink-options{gap:4px}
 #writingOptionsDock .text-section .compact-field select{max-width:170px}
 #sheetPanel .sheet-layout{grid-template-columns:minmax(0,1fr);gap:14px}
 #sheetOptionsDock{max-height:230px}
 #writingWorkspace .paper-scroll{height:clamp(260px,calc(100dvh - 520px),420px)}
 #writingWorkspace.is-fullscreen .paper-scroll{height:auto!important}
}

/* Ruling stays independent of letter size, from KS2 exercise books upwards. */
.line-size-setting{display:grid;gap:5px;min-width:0;width:100%;margin-bottom:9px}
.line-size-setting>label{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:11px;color:var(--muted,#85778d)}
.line-size-setting output{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink,#51415e)}
.line-size-setting input[type=range]{display:block;width:100%;min-width:0;height:20px;margin:0;accent-color:#756184;cursor:pointer}
.line-size-scale{display:flex;justify-content:space-between;font-size:9px;color:#85778d}
.line-size-preset{width:100%;padding:6px 5px;border:1px solid #d6cadf;border-radius:7px;background:#faf7fd;color:#65517d;font:inherit;font-size:10px;line-height:1.35;cursor:pointer}
.line-size-preset:hover{background:#eee7f4;border-color:#a18caf}
.line-size-setting small{font-size:9px;line-height:1.45;color:#85778d}
#sheetPanel .sheet-paper-settings{align-items:start}
#writingOptionsDock .line-size-setting>label,#sheetOptionsDock .line-size-setting>label{font-size:10px}
#sheetOptionsDock .sheet-paper-settings .compact-field{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
#sheetOptionsDock #sheetLetterSize{width:100%;max-width:100%}
@media(min-width:701px) and (max-width:1000px){
 #writingOptionsDock .paper-section{grid-template-columns:minmax(0,1fr);gap:8px}
}
