:root{font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;color:#39304c;background:#fff6ea;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 8% 18%,#ffe7df 0,transparent 30%),radial-gradient(circle at 95% 80%,#e4efdc 0,transparent 30%),#fff6ea}button,input{font:inherit}button{min-height:46px;border:0;border-radius:15px;padding:10px 16px;background:#fff;color:#51445f;cursor:pointer;font-weight:700;touch-action:manipulation}button:hover{filter:brightness(.96)}button:focus-visible,input:focus-visible{outline:3px solid #7750b4;outline-offset:4px}button:disabled{opacity:.35;cursor:default}.studio{max-width:1450px;margin:auto;padding:max(24px,env(safe-area-inset-top)) max(26px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(26px,env(safe-area-inset-left))}header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.brand{display:flex;gap:13px;align-items:center}h1{font-size:clamp(23px,3vw,34px);letter-spacing:-1px;margin:0}.brand p{margin:4px 0 0;color:#89738c;font-size:13px}.save{background:#7953ac;color:white;box-shadow:0 5px 0 #60428b}.inspiration{background:#f2eafb;border:1px solid #e7d8f4;border-radius:20px;padding:16px 22px;display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:22px}.eyebrow{font-size:10px;font-weight:850;letter-spacing:2px;color:#9676ad}.inspiration p{margin:5px 0 0;font-weight:650;font-size:17px}.inspiration button{white-space:nowrap;background:#fff9}.workspace{display:grid;grid-template-columns:180px minmax(0,1fr);gap:24px}.tools{background:#fff9;border:1px solid #fff;border-radius:23px;padding:15px;align-self:start}.tool-list{display:grid;gap:7px}.tool-list button{text-align:left;background:transparent;padding:8px 13px}.tool-list button span{display:inline-block;font-size:24px;width:35px;vertical-align:middle}.tool-list button[aria-pressed=true]{background:#eadff7;color:#684596;box-shadow:inset 0 0 0 2px #d0b7ed}.palette{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0}.palette button{padding:0;min-height:30px;width:30px;height:30px;border-radius:50%;box-shadow:0 2px 0 #0001;border:3px solid transparent}.palette button[aria-pressed=true]{outline:3px solid #685579;outline-offset:3px;border-color:white}.size-label{font-size:12px;font-weight:750;display:flex;justify-content:space-between}input[type=range]{width:100%;min-height:44px;accent-color:#7953ac;cursor:pointer}.stamp-heading{font-size:12px;font-weight:750;margin:12px 0}.stamps{display:flex;gap:6px}.stamps button{font-size:25px;padding:4px;width:44px;background:#fff3df;color:#bd7b45}.stamps button[aria-pressed=true]{outline:2px solid #7953ac}.hint{font-size:11px;color:#998899;line-height:1.6;margin-bottom:0}.paper-area{min-width:0}.paper{position:relative;background:white;box-shadow:0 12px 30px #73594715,0 0 0 1px #eee3da;border:10px solid white;border-radius:14px;overflow:hidden;aspect-ratio:4/3;max-height:72vh;margin:auto}canvas{width:100%;height:100%;display:block;touch-action:none;background:white;cursor:crosshair;user-select:none;-webkit-user-select:none}.paper-note{position:absolute;pointer-events:none;left:0;right:0;top:45%;text-align:center;color:#d8cadd;font-size:clamp(13px,2vw,22px);font-weight:600}.canvas-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:16px}.canvas-footer>span{font-size:11px;color:#8e7f8e}.actions{display:flex;gap:7px}.actions button{font-size:12px;min-height:44px;padding:8px 12px;background:#ffffffa8}footer{display:flex;justify-content:space-between;align-items:center;color:#a38e9b;font-size:11px;margin-top:22px;gap:10px}footer button{background:transparent;font-size:11px;padding:5px}dialog{border:0;border-radius:25px;max-width:min(480px,90vw);padding:28px;color:#51445f;box-shadow:0 20px 100px #30224433}dialog::backdrop{background:#39294e66}dialog h2{margin:0 0 12px}dialog p{font-size:14px;line-height:1.7}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}#export-image{display:block;width:100%;margin:14px 0;border:1px solid #eee}
@media(max-width:760px){.studio{padding:16px 14px}header{margin-bottom:16px}.brand img{width:44px;height:44px}.brand p{font-size:10px}.save{padding:10px 12px;font-size:12px}.workspace{display:flex;flex-direction:column;gap:16px}.tools{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;padding:12px}.tool-list{grid-column:1/-1;display:flex;justify-content:space-between}.tool-list button{text-align:center;flex:1;font-size:11px;padding:5px;min-height:52px}.tool-list button span{display:block;width:auto;font-size:22px}.palette{grid-row:2/5;margin:9px 0;grid-template-columns:repeat(4,1fr);gap:9px}.palette button{width:32px;height:32px;min-height:32px}.size-label{align-self:end}.stamp-heading,.hint{display:none}.stamps{justify-content:center}.stamps button{min-height:44px}.inspiration{padding:13px 15px;margin-bottom:16px}.inspiration p{font-size:14px}.inspiration button{font-size:12px;padding:8px 10px}.canvas-footer{flex-wrap:wrap;justify-content:center}.canvas-footer>span{order:2;width:100%;text-align:center}.paper{border-width:6px;max-height:none}footer{flex-wrap:wrap}footer>span{max-width:100%}footer>div{display:flex;flex-wrap:wrap;justify-content:center;width:100%}}
@media(max-height:650px) and (min-width:761px){.studio{padding-top:12px}header{margin-bottom:12px}.inspiration{margin-bottom:12px;padding:10px 18px}.workspace{grid-template-columns:170px 1fr}.paper{max-width:calc((100dvh - 220px)*4/3);max-height:none}.tools{padding:10px}.tool-list{gap:0}.tool-list button{min-height:40px}.palette{margin:12px 0}footer{margin-top:8px}}
.magic-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}#magic-dialog{max-width:min(760px,94vw)}h3{font-size:15px;margin:0 0 10px}.extra-tools,.extra-stamps{display:flex;flex-wrap:wrap;gap:6px}.extra-tools button,.extra-stamps button{background:#f1e9f9;font-size:12px}.extra-tools button[aria-pressed=true],.extra-stamps button[aria-pressed=true]{outline:2px solid #7953ac}.small{font-size:11px!important;color:#94839a}.magic-grid label{display:block;font-size:12px;margin:12px 0}.magic-grid input[type=color]{vertical-align:middle;width:48px;height:44px;border:0;background:none}.check{display:flex!important;align-items:center;gap:8px}.check input{width:24px;height:24px}select{font:inherit;padding:12px;border:1px solid #ddd;border-radius:10px;max-width:100%}.color-row{display:flex;gap:8px;flex-wrap:wrap}.color-row button{width:36px;height:36px;min-height:36px;padding:0;border:3px solid white;outline:1px solid #ddd}.page-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:20px 0}.page-grid button{border:1px solid #eee;background:#fbf7ff}.page-grid img{display:block;width:100%;aspect-ratio:4/3;object-fit:contain;margin-bottom:8px}.gallery-card{border:1px solid #eee;border-radius:15px;padding:8px}.gallery-card button{font-size:11px;min-height:44px;padding:8px}#pages-dialog,#gallery-dialog{max-width:min(740px,94vw)}@media(max-width:520px){.magic-grid{grid-template-columns:1fr}header{gap:8px}h1{font-size:22px}.brand{gap:8px}}
.drawing-info{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#8e7f8e}#current-tool{color:#7953ac;font-weight:750}#more[aria-pressed=true]{background:#eadff7}@media(max-width:760px){.drawing-info{width:100%;order:2;text-align:center}}
/* Keep the drawing pixels square when the available viewport height changes. */
.paper{aspect-ratio:auto;width:min(100%,calc(72dvh * 4 / 3));max-height:none}canvas{height:auto;aspect-ratio:4/3}@media(max-width:760px){.paper{width:100%}}@media(max-height:650px) and (min-width:761px){.paper{width:min(100%,calc((100dvh - 220px) * 4 / 3))}}
.categories{display:flex;flex-wrap:wrap;gap:7px}.categories button{background:#f4eefb;font-size:12px;min-height:44px}.categories button[aria-pressed=true]{background:#7953ac;color:#fff}.difficulty-label{display:flex;align-items:center;gap:12px;font-size:12px;margin-top:16px}.page-detail{display:block;color:#97839f;font-size:10px;margin-top:7px;font-weight:500}[hidden]{display:none!important}#pages{grid-template-columns:repeat(3,1fr)}#pages button{font-size:12px;padding:10px}#pages-dialog{max-height:90dvh}#pages-dialog .page-grid img{background:white}#page-count{min-height:18px}@media(max-width:600px){#pages{grid-template-columns:repeat(2,1fr)}}
/* Give every color a finger-sized target, including the optional palette. */
.workspace{grid-template-columns:200px minmax(0,1fr)}.palette{grid-template-columns:repeat(3,1fr);gap:8px}.palette button{width:44px;height:44px;min-height:44px;justify-self:center}.color-row button{width:44px;height:44px;min-height:44px}@media(max-width:760px){.palette{grid-template-columns:repeat(3,1fr)}}@media(max-height:650px) and (min-width:761px){.workspace{grid-template-columns:170px minmax(0,1fr)}}
footer{align-items:flex-start}footer>div{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}footer #choose-page,footer #open-gallery{background:#f1e7fc;color:#694a91;font-size:13px;padding:10px 15px;border:1px solid #e4d3f2;min-height:44px}footer #help{font-size:11px}@media(max-width:760px){footer>div{justify-content:center}}
.top-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.top-actions button{font-size:13px;padding:10px 13px}.top-actions #choose-page,.top-actions #open-gallery{background:#f1e7fc;color:#694a91;border:1px solid #e4d3f2;min-height:44px}.paper{width:min(100%,calc(72dvh * 4 / 3),calc((100dvh - 330px) * 4 / 3))}@media(max-width:760px){header{flex-wrap:wrap}.top-actions{width:100%;justify-content:center}.top-actions button{font-size:12px;padding:10px 12px}.paper{width:100%}}@media(max-height:650px) and (min-width:761px){.paper{width:min(100%,calc((100dvh - 220px) * 4 / 3))}}
select,.check{min-height:44px}@media(max-height:850px) and (min-height:651px) and (min-width:761px){.workspace{grid-template-columns:232px minmax(0,1fr)}.tools{padding:12px}.tool-list{gap:3px}.tool-list button{min-height:44px;padding:7px 13px}.palette{grid-template-columns:repeat(4,1fr);margin:14px 0}.stamp-heading{margin:8px 0}.hint{display:none}}
