:root{color-scheme:light;--ink:#293e34;--muted:#53655a;--green:#315d47;--green2:#e7efe3;--line:#cdd7ca;--base:#edf0e6;--card:#fffcf3}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(ellipse at 75% 0%,#e4ecdc,transparent 53%),var(--base);color:var(--ink);font:400 1rem/1.5 system-ui,"Hiragino Sans","Meiryo",sans-serif}
main{max-width:1060px;margin:auto;padding:22px clamp(10px,4vw,34px) 18px}
.hero{margin:0 0 20px;padding:6px 3px}.brand{display:flex;gap:8px;align-items:center;font-size:.9rem;font-weight:700;color:var(--green)}
h1{font-size:clamp(1.65rem,5.2vw,2.9rem);font-weight:800;letter-spacing:.03em;line-height:1.24;margin:10px 0 6px;overflow-wrap:anywhere} h1 span{display:inline-block}
.hero p{margin:0;color:var(--muted);font-weight:600}.phone{display:none}
.workshop{display:grid;grid-template-columns:minmax(250px,.69fr) minmax(360px,1.17fr);align-items:start;gap:20px}
.card{background:var(--card);border:1px solid #dadfcd;border-radius:24px;padding:16px;box-shadow:0 5px 20px #203b2710;min-width:0}
.paneltop{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
h2{font-size:1.2rem;line-height:1.2;margin:0}
button{appearance:none;border:1px solid var(--line);border-radius:12px;padding:7px 12px;min-height:44px;line-height:1.16;font-family:inherit;font-size:.92rem;font-weight:700;background:#fafbf3;color:var(--ink);cursor:pointer;touch-action:manipulation}
button:hover:not(:disabled){background:#e8eee2}
button:disabled{opacity:.52;cursor:default}
button:focus-visible,canvas:focus-visible{outline:3px solid #ad5c26;outline-offset:2px}
.primary{background:var(--green);border-color:var(--green);color:white}.primary:hover:not(:disabled){background:#224935}
.example{display:grid;place-items:center;border-radius:16px;background:#f5f0e4;min-height:140px}.example svg{width:100%;height:clamp(178px,27vw,264px);padding:7px;overflow:visible}
#guide-text{text-align:center;margin:10px 0;min-height:104px}.eyebrow{font-weight:750;color:#4c6955;font-size:.87rem;margin:0 0 3px}h3{font-size:1.32rem;line-height:1.24;margin:0 0 5px}#tip{margin:0;color:var(--muted);font-size:.93rem}
.stepnav,.actions{display:flex;gap:8px}.stepnav button,.actions button{flex:1}
.steps{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;margin-top:7px}
.steps button{padding:0;min-height:38px;border-color:transparent;background:transparent;font-size:.86rem}.steps button[aria-current="step"]{background:var(--green2);border-color:#a6b8a6}
.surface{position:relative;background:#fffef8;border:1px solid #d4d8c9;border-radius:14px;overflow:hidden}
canvas{display:block;width:100%;height:auto;aspect-ratio:1;touch-action:none;cursor:crosshair;background:#fffef8}
#hint{position:absolute;inset:0;display:grid;place-items:center;color:#637267;font-weight:750;pointer-events:none}
[hidden],#hint[hidden]{display:none!important}
.tools{margin:9px 0;display:grid;gap:7px}.toolrow{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.legend{width:3.1rem;color:var(--muted);font-weight:750;font-size:.9rem;flex-shrink:0}
.colors,.sizes{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.swatch{width:40px;height:44px;min-height:44px;padding:4px;border-color:transparent;display:grid;place-items:center;background:transparent}.swatch i{width:26px;height:26px;border:1px solid #0002;border-radius:50%;background:var(--swatch)}button[aria-pressed="true"]{border-color:#476653;background:#edf3e8}.size,#eraser{padding-inline:8px}
.status{color:var(--muted);margin:7px 0 0;font-size:.87rem;min-height:1.4em}
footer{text-align:center;color:var(--muted);margin-top:14px;font-size:.89rem}
.finish-anim{animation:peek .65s ease-in-out both;transform-origin:center}@keyframes peek{0%{transform:translateY(6px) rotate(-2deg)}58%{transform:translateY(-3px) rotate(1deg)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){.finish-anim{animation:none}}
@media(max-width:680px){main{padding-top:12px}.workshop{display:flex;flex-direction:column;gap:9px}.card{width:100%;padding:10px;border-radius:17px}.hero{margin-bottom:10px;padding:2px}.hero p{font-size:.9rem}h1{margin:6px 0 4px}.paneltop{margin-bottom:5px}.guide #guide-body{display:grid;grid-template-columns: minmax(92px,.55fr) 1fr;grid-template-areas:"example caption" "example nav" "example steps";gap:3px 7px;align-items:center}.example{grid-area:example;min-height:138px}.example svg{height:138px;padding:2px}.stepnav{grid-area:nav}.stepnav button{padding:6px 3px;min-height:40px} #guide-text{grid-area:caption;min-height:0;margin:0;padding:1px}h3{font-size:1.05rem}#tip{font-size:.85rem;line-height:1.3}.steps{grid-area:steps;margin:0;gap:1px}.steps button{min-height:27px;font-size:.8rem}.tools{gap:4px}.toolrow{gap:4px}.legend{width:2.7rem}.swatch{width:35px}.colors,.sizes{gap:3px}.paper .paneltop{margin-bottom:5px}}
@media(max-width:360px){.phone{display:block}.brand{font-size:.85rem}.swatch{width:32px}.legend{width:2.5rem}.card{padding-inline:8px}}

.guide-tools{display:flex;gap:5px;justify-content:flex-end}.guide-tools button{padding-inline:8px}.help{margin-top:6px;font-size:.92rem;color:var(--muted)}.help summary{padding:6px 0;cursor:pointer}.help ul{margin:2px 0 0;padding-left:1.25rem}.help li+li{margin-top:5px}
@media(max-width:680px){.guide .paneltop{flex-wrap:wrap}.guide-tools button{font-size:.84rem}.guide .steps{display:none}.guide .stepnav button{min-height:44px}.example,.example svg{min-height:113px;height:113px}}
/* Keep the canvas first in view on smaller screens; the colour tray stays compact. */
.colors{min-width:0}
@media(max-width:680px){.tools .toolrow:first-child{align-items:flex-start}.tools .legend{padding-top:10px}.tools .colors{flex:1}}
@media(min-width:681px) and (max-width:720px){.workshop{grid-template-columns:minmax(230px,.69fr) minmax(320px,1.17fr);gap:12px}}

.hero-top{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;column-gap:14px}.return-home{min-height:44px;display:inline-flex;align-items:center;color:var(--green);font-size:.9rem;font-weight:650;text-underline-offset:3px}.return-home:focus-visible{outline:3px solid #ad5c26;outline-offset:2px;border-radius:3px}
