:root{font-family:"Nunito Sans","Trebuchet MS",system-ui,sans-serif;color:#243452;background:#f8f9fd;font-synthesis:none;--ink:#243452;--blue:#214db7;--blue-dark:#173d95;--muted:#53627d;--border:#dbe3f3;--yellow:#ffcf65}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-width:280px}
button,input,select{font:inherit}
button{border:0;cursor:pointer;color:inherit;min-width:64px;min-height:64px;touch-action:manipulation}
button:disabled{opacity:.4;cursor:default}
button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:3px solid #1450d2;outline-offset:4px}
.ico{width:24px;height:24px;flex:none;vertical-align:middle}
.top{background:var(--blue);color:white;border-bottom:4px solid #163a99}
.top-inner,.shell,.footer{width:min(1280px,calc(100% - 96px));margin-inline:auto}
.top-inner{display:flex;align-items:center;justify-content:space-between;min-height:88px;gap:16px}
.brand{display:flex;align-items:center;gap:12px}
.brand img{border-radius:15px;box-shadow:0 3px 0 #173a90}
.brand strong,.brand small{display:block}
.brand strong{font-size:28px;line-height:1.04;font-weight:950;letter-spacing:-1.15px}
.brand strong span{color:#ffcf65}
.brand small{font-size:11px;font-weight:800;letter-spacing:2px;margin-top:6px;color:#ecf1ff}
nav{display:flex;gap:16px}
.nav-btn{display:flex;align-items:center;justify-content:center;gap:10px;padding:0 19px;border-radius:15px;background:transparent;border:1px solid #7696de;color:#fff;font-weight:800}
.nav-btn[aria-current],.nav-btn:hover{background:#fff;color:var(--blue);border-color:#fff}
.top button:focus-visible{outline-color:#ffda82}
.shell{margin-block:30px 42px}
.hero{display:grid;grid-template-columns:1fr 1.03fr;align-items:center;isolation:isolate;position:relative;overflow:hidden;min-height:402px;border:1px solid #d5e3fb;border-radius:32px;background:#eaf2ff;box-shadow:0 5px 0 #e1e9f8}
.hero-copy{padding:38px 0 42px 49px;position:relative;z-index:1}
.eyebrow{background:white;border:1px solid #d3def4;border-radius:999px;padding:9px 13px;display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:900;letter-spacing:1.2px;color:var(--blue-dark)}
.eyebrow .ico{width:18px;height:18px;fill:#ffcf65;stroke:#925514}
h1,h2,p{margin:0}
.hero h1{font-weight:950;font-size:clamp(2.7rem,5vw,4.7rem);line-height:1.01;letter-spacing:-.062em;margin:20px 0 21px;color:#1f3055}
.hero h1 em{color:var(--blue);font-style:normal;position:relative;display:inline-block;white-space:nowrap}
.hero h1 em svg{position:absolute;left:-1%;width:102%;height:19px;bottom:-11px;z-index:-1}
.hero p{color:var(--muted);font-size:1.09rem;line-height:1.55;max-width:360px;margin:0 0 22px}
.hero-art{align-self:stretch;display:grid;place-items:center;padding:4px 16px 0 0}
.hero-art svg{width:100%;max-width:570px;display:block;height:auto}
.primary,.secondary,.icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:11px;border-radius:16px;padding:10px 18px;font-weight:850}
.primary{background:var(--blue);color:#fff;box-shadow:0 4px 0 var(--blue-dark);font-size:1.12rem}
.yellow{background:var(--yellow);box-shadow:0 4px 0 #c38c2d;color:#263452}
.green{background:#287d59;box-shadow:0 4px 0 #19563c}
.primary:not(:disabled):hover,.secondary:not(:disabled):hover,.icon-btn:not(:disabled):hover{filter:brightness(.96)}
.primary:not(:disabled):active{transform:translateY(2px);box-shadow:0 2px 0 var(--blue-dark)}
.secondary,.icon-btn{background:#fff;border:1px solid var(--border);color:var(--blue-dark)}
.gallery{margin-top:37px;scroll-margin-top:18px}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:20px}
h2{font-size:2rem;line-height:1.14;font-weight:950;letter-spacing:-.045em}
.section-head p{margin-top:7px;color:var(--muted);font-size:1rem}
.levels{display:flex;gap:16px}
.levels button{background:#fff;border:1px solid var(--border);border-radius:15px;padding:0 15px;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:850}
.levels button .ico{width:19px;height:19px}
.levels button[aria-pressed=true],.mode-row button[aria-pressed=true]{color:#fff;background:var(--blue);border-color:var(--blue)}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.card{width:100%;border:1px solid var(--border);background:#fff;border-radius:22px;padding:8px;box-shadow:0 4px 0 #e4eaf5;text-align:left;transition:box-shadow .15s,transform .15s}
.card:hover{box-shadow:0 6px 0 #cddbf2;transform:translateY(-2px)}
.card-picture{height:clamp(120px,13vw,180px);border-radius:15px;display:grid;place-items:center;overflow:hidden;background-image:radial-gradient(#ffffff9c 1.4px,transparent 1.5px);background-size:19px 19px}
.peach{background-color:#fbe5d9}.lavender{background-color:#eee7fa}.mint{background-color:#e1f2e6}.sky{background-color:#e1edfc}
.card-picture svg{height:100%;width:100%}
.card-caption{padding:13px 9px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:1.12rem;font-weight:900}
.card-caption .ico{padding:6px;width:33px;height:33px;border-radius:10px;background:#edf3ff;color:var(--blue)}
.pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:24px;font-weight:800;color:var(--muted)}
.footer{border-top:1px solid var(--border);color:var(--muted);display:flex;justify-content:space-between;gap:16px;padding-block:22px 26px;font-size:.9rem;font-weight:750}
.footer .ico{width:18px;height:18px;margin-right:8px;color:var(--blue)}
#studio h1,#result h1{font-size:clamp(2rem,5vw,3.3rem);line-height:1.05;letter-spacing:-.05em}
.workspace{display:grid;grid-template-columns:minmax(0,1fr) 298px;gap:20px}
.board,.controls,.result-body{background:#fff;border:1px solid var(--border);border-radius:24px}
.board{padding:16px;min-width:0}
.zoom{display:flex;align-items:center;justify-content:flex-end;gap:16px;font-weight:850;margin-bottom:12px}
.zoom output{min-width:52px;text-align:center}
.drawing{overflow:auto;display:flex;min-height:275px;border:1px dashed #b8c9ed;background:#f7faff;border-radius:16px;padding:10px}
.drawing svg{display:block;width:min(100%,660px);flex-shrink:0;margin:auto;touch-action:manipulation;user-select:none;overflow:visible;stroke-width:7}
.drawing.brush-active svg{touch-action:none}
.drawing [data-region]{cursor:pointer}
.drawing [data-region]:focus-visible{outline:none;stroke:#174ed0;stroke-width:9}
.controls{display:flex;flex-direction:column;gap:16px;padding:18px}
.controls h2{font-size:1.26rem;letter-spacing:-.02em}
.mode-row,.palette{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.mode-row button{padding-inline:6px}
.palette{grid-template-columns:repeat(3,minmax(0,1fr))}
.swatch{display:grid;justify-items:center;align-content:center;gap:4px;border:2px solid transparent;border-radius:14px;background:#f3f6fd;font-size:.79rem;font-weight:850;padding:4px 0}
.swatch[aria-pressed=true]{border-color:var(--blue);background:#e6eeff}
.swatch-sample{display:grid;place-items:center;width:36px;height:30px;border-radius:9px;border:1px solid #24345266;color:#202e46}
.swatch-sample .ico{width:19px;height:19px;}
.result-head{text-align:center;margin-bottom:22px}
#reward{color:#96650c;font-size:2.25rem;margin-bottom:10px;animation:appear .55s ease-out both}
@keyframes appear{from{opacity:.2;transform:translateY(6px)}to{opacity:1;transform:none}}
.result-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,350px);gap:24px;padding:24px;max-width:940px;margin:auto}
#finished-art{background:#edf4ff;border:6px solid #d9e6fc;border-radius:20px;display:grid;place-items:center}
#finished-art svg{width:min(100%,500px);display:block}
.save-panel{display:grid;align-content:center;gap:16px}
.save-panel label,dialog label{font-weight:850}
.save-panel label span{font-weight:500;color:var(--muted)}
input:not([type=checkbox]),select{min-height:64px;border:1px solid #a7b9d7;border-radius:12px;background:white;color:var(--ink);padding:10px 13px;width:100%}
dialog{border:1px solid var(--border);border-radius:22px;padding:22px;color:var(--ink);width:min(480px,calc(100% - 32px));max-height:calc(100% - 32px)}
dialog::backdrop{background:#172749a8}
dialog form{display:grid;gap:16px}
.dialog-actions{display:flex;gap:16px;justify-content:flex-end}
.setting-row{display:flex;align-items:center;gap:14px;padding:0 10px;min-height:64px;border-radius:10px;background:#edf3ff}
.setting-row input{width:27px;height:27px;accent-color:var(--blue);flex:none}
.contrast{--blue:#14378b;--blue-dark:#0a2157;--muted:#121c2d;--border:#273654;--ink:#111;color:#111;background:#fff}
.contrast .drawing svg{color:#000;stroke-width:8}
.contrast .drawing [data-region]:focus-visible{stroke:#173ad8;stroke-width:10}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#print-sheet{display:none}
@media(max-width:1050px){.top-inner,.shell,.footer{width:calc(100% - 48px)}.hero-copy{padding-left:32px}.hero{min-height:360px}.levels button{padding-inline:10px}.workspace{grid-template-columns:minmax(0,1fr) 280px}}
@media(max-width:760px){.section-head{align-items:start;flex-wrap:wrap}.hero{grid-template-columns:1fr 0.82fr;min-height:320px}.hero-copy{padding:28px 0 31px 23px}.hero h1{font-size:clamp(2.15rem,6.3vw,3.5rem)}.hero p{font-size:1rem}.hero-art{padding-right:5px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.card-picture{height:151px}.workspace{grid-template-columns:1fr}.controls{max-width:100%}.palette{grid-template-columns:repeat(4,minmax(0,1fr))}.result-body{grid-template-columns:1fr}}
@media(max-width:510px){.top-inner,.shell,.footer{width:calc(100% - 32px)}.brand strong{font-size:22px}.brand img{width:39px;height:39px}.brand{gap:7px}.brand small{font-size:9px;letter-spacing:1px}.nav-btn{padding:0 11px}.nav-btn span{display:none}.hero{grid-template-columns:1fr}.hero-copy{padding:25px 20px 0}.hero-art{max-width:340px;justify-self:center;margin-top:-4px}.hero h1{font-size:clamp(2.45rem,9vw,3.5rem)}.hero p{margin-bottom:17px}.levels{width:100%;gap:16px;flex-wrap:wrap}.levels button{flex:1;padding:0 5px}.levels button .ico{display:none}.footer{flex-wrap:wrap}.card-caption{font-size:.99rem}.card-caption .ico{display:none}}
@media(max-width:390px){.palette{grid-template-columns:repeat(auto-fit,minmax(64px,1fr))}.top-inner{gap:8px}.brand strong{font-size:18px}.brand img{width:32px;height:32px}}
@media(max-width:320px){.brand small{display:none}.brand img{width:24px;height:24px}.brand strong{font-size:16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{body>*:not(#print-sheet){display:none!important}body{background:white!important}#print-sheet{display:block;text-align:center;color:#19253d;padding:20mm}#print-sheet svg{width:100%;max-height:150mm;display:block;margin:10mm auto}}
