:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#253c35;background:#f7f7f2;font-synthesis:none;--green:#285b50;--ink:#253c35;--muted:#6a7770;--line:#dfe4dc;--soft:#e5ede4;--white:#fffefa}
*{box-sizing:border-box}body{margin:0;height:100vh;height:100dvh;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer;color:inherit;border:0;background:transparent;touch-action:manipulation}button:disabled{opacity:.28;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #c5853a;outline-offset:3px}button, a,input{ -webkit-tap-highlight-color:transparent}button svg{width:22px;height:22px;flex:none}button:not(:disabled):hover{background-color:var(--soft)}button{transition:background-color .16s,box-shadow .16s}input{color:inherit}button[hidden],[hidden]{display:none!important}
.topbar{height:84px;display:flex;align-items:center;gap:40px;padding:0 30px;border-bottom:1px solid var(--line);background:var(--white)}.brand{display:flex;gap:11px;align-items:center;text-decoration:none;color:var(--ink);font-size:25px;letter-spacing:-1px;font-weight:720}.brand small{display:block;font-size:8px;letter-spacing:2.1px;font-weight:650;margin-top:3px;color:var(--muted)}.brand img{border-radius:13px}.document{display:flex;flex-direction:column;gap:5px;min-width:80px;flex:1;padding-left:28px;border-left:1px solid var(--line)}.document input{border:0;background:transparent;font-size:15px;font-weight:550;width:min(100%,350px);padding:0;text-overflow:ellipsis}.document input:hover{color:var(--green)}#save-state{font-size:11px;color:var(--muted)}#save-state.error{color:#b34132}.header-actions{display:flex;gap:12px;align-items:center}.quiet,.primary,.danger{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:0 17px;border-radius:12px;font-size:13px;font-weight:600}.primary{background:var(--green);color:white;box-shadow:0 2px 2px #173f2710}.primary:not(:disabled):hover{background:#1c493e}.danger{background:#a63d33;color:white}.danger:not(:disabled):hover{background:#863228}.icon-button{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px}.studio{height:calc(100% - 84px);display:flex;position:relative;gap:22px;padding:24px 30px 14px 22px}.tools{display:flex;flex-direction:column;gap:7px;flex:none;width:76px;padding-top:8px}.tool{display:flex;flex-direction:column;gap:6px;align-items:center;justify-content:center;width:76px;height:70px;border-radius:18px;font-size:10px;font-weight:550}.tool svg{width:26px;height:26px}.tool[aria-pressed=true]{background:var(--green);color:#fffefa;box-shadow:0 4px 8px #285b5012}.tool[aria-pressed=true]:hover{background:#214e44}.tool-divider{height:1px;background:var(--line);margin:7px 16px}.desk{min-width:0;flex:1;display:flex;flex-direction:column;gap:12px}.workspace-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}.history,.zoom{display:flex;align-items:center;gap:4px}.separator{display:block;flex:none;width:1px;height:24px;background:var(--line);margin:0 9px}.zoom{border:1px solid var(--line);border-radius:13px;background:var(--white);padding:0 2px}.zoom .icon-button{width:36px;height:36px}#fit{font-size:12px;min-width:54px;height:36px;border-radius:8px;font-variant-numeric:tabular-nums}.canvas-wrap{min-height:0;flex:1;position:relative;overflow:hidden;border-radius:20px;background:#e9ede5;border:1px solid #dbe1d7}iframe{border:0;display:block;width:100%;height:100%}#loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:14px;background:#e9ede5;font-size:14px}#loading.failure{color:#a63d33}.palette-bar{display:flex;align-items:center;justify-content:center;gap:5px;min-height:76px;padding:12px 18px;border:1px solid var(--line);border-radius:18px;background:var(--white)}.palette{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}.swatch{width:34px;height:42px;border-radius:12px;padding:5px;border:2px solid transparent;flex:none}.swatch span{display:block;background:var(--color);width:22px;height:22px;border-radius:50%;box-shadow:inset 0 0 0 1px #00000010}.swatch[aria-pressed=true]{border-color:var(--green);background:#edf2e9}.custom-color{height:42px;width:42px;position:relative;flex:none;background:conic-gradient(#d37562,#e8c977,#a6bb8b,#66a4ad,#9c88b7,#d37562);border:5px solid var(--white);box-shadow:0 0 0 1px var(--line);border-radius:50%;overflow:hidden;cursor:pointer}.custom-color input{opacity:0;position:absolute;inset:-5px;width:52px;height:52px;cursor:pointer}.custom-color:focus-within{outline:3px solid #c5853a}.custom-color span{display:block;background:white;width:12px;height:12px;border-radius:50%;margin:10px}.size-control{display:flex;align-items:center;gap:10px;border-left:1px solid var(--line);padding-left:22px;margin-left:18px;height:30px}.size-control label{font-size:11px;color:var(--muted)}#size{width:104px;accent-color:var(--green);cursor:pointer}#size-value{font-size:12px;min-width:22px;font-variant-numeric:tabular-nums}#size-preview{border-radius:50%;background:#285b50;width:12px;height:12px;max-width:22px;max-height:22px;flex:none}.workspace-footer{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:10px;min-height:24px;letter-spacing:.1px}.workspace-footer button{height:26px;width:30px;display:grid;place-items:center;border-radius:8px}.workspace-footer svg{width:17px;height:17px}.options{position:absolute;left:112px;top:92px;width:246px;padding:20px;border:1px solid var(--line);border-radius:20px;background:var(--white);box-shadow:0 12px 40px #233b3520;z-index:5}.options h2{font-size:15px;margin:0 0 16px}.options label{display:flex;flex-direction:column;gap:7px;font-size:12px;margin-top:16px}.options select,.options input[type=number]{width:100%;min-height:40px;border:1px solid var(--line);background:white;border-radius:9px;padding:8px}.option-row{display:flex;gap:6px;flex-wrap:wrap}.option-row button{width:60px;height:48px;border:1px solid var(--line);border-radius:12px;display:grid;place-items:center}.option-row button[aria-pressed=true]{background:var(--soft);border-color:var(--green)}.options .wide{justify-content:flex-start;margin-top:4px;padding:0 8px}.options p{font-size:12px;line-height:1.6;color:var(--muted)}.wide{width:100%}
dialog{border:1px solid var(--line);border-radius:26px;padding:30px;background:var(--white);color:var(--ink);width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 48px);box-shadow:0 24px 100px #183c342c}dialog::backdrop{background:#1e342f60;backdrop-filter:blur(5px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px}h1{font-size:28px;font-weight:650;letter-spacing:-1px;margin:7px 0}.dialog-head small{font-size:9px;letter-spacing:1.6px;color:var(--muted);font-weight:650}.muted{color:var(--muted);font-size:13px;line-height:1.6}.formats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:26px 0}.formats button{border:1px solid var(--line);border-radius:16px;display:flex;align-items:center;flex-direction:column;padding:20px 5px 16px;gap:8px;background:#f2f4ed}.formats b{font-size:13px;margin-top:8px}.formats small{font-size:10px;color:var(--muted)}.paper{display:block;background:white;box-shadow:1px 3px 7px #253c3517;width:62px;height:54px;position:relative}.paper.landscape{height:39px;margin-top:8px;margin-bottom:7px}.paper.portrait{width:39px}.paper.square{width:54px}.help-content{font-size:14px;line-height:1.8}.help-content a{color:var(--green)}.gallery-dialog{width:min(900px,calc(100vw - 32px))}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:18px;margin-top:24px}.picture-card{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#f0f2eb;min-width:0}.picture-open{width:100%;padding:12px;display:flex;flex-direction:column;gap:14px;text-align:left}.picture-open img{width:100%;height:145px;object-fit:contain;background:white;box-shadow:0 2px 8px #183c3412}.picture-open b{font-size:13px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.picture-meta{display:flex;align-items:center;justify-content:space-between;padding:0 8px 8px 12px}.picture-meta small{font-size:10px;color:var(--muted)}.picture-meta button{width:36px;height:36px}.picture-meta svg{width:16px}.empty{grid-column:1/-1;text-align:center;padding:40px;color:var(--muted)}.toast{position:fixed;bottom:110px;left:50%;transform:translateX(-50%);background:#253c35;color:white;padding:13px 22px;border-radius:12px;font-size:13px;z-index:100;max-width:90vw;box-shadow:0 8px 20px #0002}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
@media(min-width:1500px){.studio{padding:30px 50px 18px 32px;gap:30px}.topbar{padding:0 48px}.palette-bar{align-self:center;min-width:920px}.canvas-wrap{border-radius:24px}}
@media(max-width:1100px){.topbar{padding:0 20px;gap:24px}.studio{padding:16px 18px 10px 12px;gap:12px}.tools{width:66px}.tool{width:66px;height:64px}.palette-bar{padding:10px 12px;flex-wrap:wrap;row-gap:7px}.swatch{width:30px;padding:3px}.size-control{padding-left:12px;margin-left:6px;gap:6px}#size{width:76px}.size-control label{display:none}.options{left:86px;top:82px}}
@media(max-width:800px){.topbar{height:72px;padding:0 16px;gap:16px}.brand{font-size:21px;gap:8px}.brand img{width:34px;height:34px}.document{padding-left:16px}.header-actions{gap:4px}.header-actions .quiet{font-size:0;gap:0;padding:0;width:44px}.primary{padding:0 13px}.studio{height:calc(100% - 72px)}.palette-bar{justify-content:center}.size-control{width:100%;justify-content:center;border:0;margin:0;padding:0;height:30px}.size-control label{display:block}#size{width:160px}.palette{gap:3px}.swatch{height:36px}.canvas-wrap{border-radius:14px}.palette-bar{min-height:92px}.tool{height:60px}.tools{gap:4px}.options{top:80px}}
@media(max-width:580px){.topbar{height:68px;padding:0 12px;gap:12px}.brand{font-size:0;gap:0}.brand small{display:none}.brand img{width:36px;height:36px}.document{border:0;padding:0;gap:4px}.document input{font-size:13px}.header-actions{gap:3px}.header-actions .primary{font-size:0;gap:0;width:44px;padding:0}.studio{height:calc(100% - 68px);padding:10px 10px max(8px,env(safe-area-inset-bottom));gap:8px;flex-direction:column}.tools{order:2;width:100%;flex-direction:row;align-items:center;justify-content:space-between;padding:0;gap:2px}.tool{flex:1;min-width:0;width:auto;height:54px;border-radius:13px;font-size:9px;gap:4px}.tool svg{width:23px;height:23px}.tool-divider{display:none}.desk{min-height:0;gap:8px}.workspace-bar{min-height:36px}.workspace-bar .icon-button{width:36px;height:36px}.history{gap:0}.history .quiet{font-size:11px;min-height:36px;padding:0 7px;gap:5px}.separator{margin:0 5px}.zoom .icon-button{width:30px;height:32px}.zoom #fit{min-width:44px;font-size:11px;height:32px}.palette-bar{border-radius:14px;padding:7px 8px;gap:3px;row-gap:2px;min-height:78px}.palette{gap:0;justify-content:space-between;flex:1}.swatch{width:24px;height:32px;padding:2px;border-radius:9px;border-width:1px}.swatch span{width:18px;height:18px}.custom-color{width:30px;height:30px;border-width:3px}.custom-color span{margin:7px;width:10px;height:10px}.custom-color input{width:36px;height:36px}.palette-bar>.separator{margin:0 3px;height:18px}.size-control{height:28px;gap:9px}#size{width:140px}.workspace-footer{display:none}.options{left:12px;top:auto;bottom:76px;max-height:calc(100dvh - 170px);overflow:auto;width:240px}.toast{bottom:155px}dialog{padding:22px;border-radius:22px}h1{font-size:25px}.formats{gap:8px}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.picture-open img{height:110px}.picture-open{padding:9px}.picture-meta{padding-left:9px}}
@media(max-height:650px) and (min-width:581px){.topbar{height:64px}.studio{height:calc(100% - 64px);padding-top:8px;gap:12px}.tools{padding:0;gap:0;overflow:auto}.tool{height:50px;min-height:50px;gap:3px}.tool svg{width:21px;height:21px}.tool-divider{margin:3px 16px}.palette-bar{min-height:55px}.workspace-footer{display:none}.desk{gap:7px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:580px){.palette{min-width:0;overflow-x:auto;overscroll-behavior-x:contain;justify-content:flex-start}.swatch{width:30px;flex-shrink:0}}

.student-label{display:flex;flex-direction:column;gap:8px;font-size:13px;margin:20px 0}.student-label input{border:1px solid var(--line);border-radius:12px;padding:12px;background:white;width:100%}#share-ready{text-align:center}#share-qr{display:block;margin:auto;max-width:100%;height:auto}#share-link{font-size:12px;color:var(--green)}#share-status{text-align:center;font-size:13px;color:var(--muted)}
.share-card{width:180px;flex:none;align-self:flex-start;margin-top:56px;padding:19px 17px;background:#fffefa;border:1px solid var(--line);border-radius:20px}.share-card .eyebrow{font-size:8px;letter-spacing:1.5px;color:var(--muted)}.share-card h2{font-size:14px;margin:9px 0 16px;font-weight:600}.share-card>button{display:grid;place-items:center;width:144px;min-height:144px;border-radius:8px;background:white;padding:0}.share-card>button span{font-size:12px;line-height:1.6;color:var(--muted);padding:10px}.share-card .student-label{font-size:11px;margin:18px 0 12px}.share-card input{font-size:12px;padding:10px}.share-card p{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 20px}.share-card a{font-size:10px;color:var(--green);text-decoration:none}.share-card a:hover{text-decoration:underline}@media(max-width:1250px){.share-card{display:none}}@media(min-width:1251px) and (max-width:1500px){.palette-bar{flex-wrap:wrap}.palette{gap:3px}.swatch{width:29px;padding:2px}.size-control{margin-left:5px;padding-left:10px}#size{width:80px}.size-control label{display:none}}
