:root { color-scheme: light; --ink: #473849; --purple: #7852b4; --pink: #f4b5c4; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font-family: ui-rounded, "SF Pro Rounded", system-ui, sans-serif; background: #fcf3ed; background-image: radial-gradient(circle at 8% 20%, #f9dfeb 0, transparent 34%), radial-gradient(circle at 90% 90%, #ece1f8 0, transparent 38%); }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
button:disabled { opacity: .42; cursor: default; }
button:not(:disabled):active { transform: translateY(2px); }
.studio { width: min(1440px, 100%); margin: auto; padding: 27px 32px 15px; }
.topbar { margin-bottom: 25px; }
.title { padding-left: 6px; }
.eyebrow { margin: 0 0 4px; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 800; color: #886d81; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -2px; line-height: 1.1; }
h1 span { color: #d7819f; font-weight: 400; }
.paper-actions { display: flex; gap: 12px; }
.paper-actions button { border: 1px solid #e7d7df; background: #fffaf7; border-radius: 16px; padding: 12px 22px; min-height: 53px; font-size: 17px; font-weight: 750; box-shadow: 0 3px 0 #e5d8dc; }
.paper-actions span { margin-right: 5px; font-size: 24px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 235px; gap: 26px; align-items: start; }
.paper-heading { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 13px; color: #816879; font-size: 14px; font-weight: 650; }
.paper-heading span { color: #c099b9; }
.paper-frame { padding: 12px; background: #efdfd8; border-radius: 15px; box-shadow: 0 12px 30px #6f466316; }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 680; background: #fff; border-radius: 5px; touch-action: none; cursor: crosshair; box-shadow: 0 2px 6px #75485b12; }
.paper-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 3px 0; }
.paper-footer p { font-size: 14px; color: #795f74; margin: 0; }
#save { border: 0; background: none; padding: 9px 6px; font-size: 13px; font-weight: 750; color: #6d4d92; white-space: nowrap; }
.toolbox { margin-top: 31px; padding: 21px 16px 17px; background: #fffbf8; border: 1px solid #e9dbe2; border-radius: 23px; box-shadow: 0 6px 18px #72536808; }
.toolbox-heading { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-bottom: 17px; }
h2 { font-size: 15px; margin: 0; letter-spacing: -.3px; }
#color-name { font-size: 12px; color: #816185; }
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 9px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px 0; background: transparent; border: 0; font-size: 10px; font-weight: 700; }
.swatch i { width: 43px; height: 43px; border-radius: 50%; background: var(--paint); box-shadow: inset 0 -3px 0 #00000012, 0 0 0 1px #0000000a; position: relative; }
.swatch[aria-pressed="true"] i { outline: 3px solid var(--ink); outline-offset: 3px; }
.swatch[aria-pressed="true"] i::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; color: var(--tick, white); text-shadow: 0 1px 2px #0003; }
.swatch:hover i { transform: scale(1.09); }
.brush-tools { border-top: 1px dashed #e3d4df; margin-top: 18px; padding-top: 18px; }
.sizes { display: flex; gap: 7px; margin-top: 11px; }
.sizes button { display: flex; flex: 1; min-width: 0; min-height: 65px; align-items: center; justify-content: end; flex-direction: column; gap: 10px; padding: 10px 3px; border: 1px solid #e6dce7; background: #fff; border-radius: 12px; font-size: 10px; font-weight: 700; }
.sizes i { display: block; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--ink); margin: auto; }
.sizes button[aria-pressed="true"] { background: #eee5fa; border-color: #a58cc9; }
#eraser { margin-top: 11px; width: 100%; background: #faf5f8; border: 1px solid #e3d6e1; border-radius: 12px; min-height: 43px; font-size: 13px; font-weight: 700; }
#eraser span { font-size: 24px; vertical-align: -2px; margin-right: 5px; }
#eraser[aria-pressed="true"] { background: #eee5fa; border-color: #a58cc9; }
.little-note { text-align: center; font-size: 11px; line-height: 1.8; color: #9b8195; margin: 17px 0 0; }
.little-note strong { color: #7e6380; }
footer { text-align: center; font-size: 11px; color: #a08496; padding: 19px 0 5px; }
footer span { color: #c2829d; }
@media (min-width: 1600px) { .studio { padding-top: 45px; } }
@media (max-width: 900px) { .studio { padding: 20px 20px 12px; } .workspace { grid-template-columns: minmax(0, 1fr) 195px; gap: 16px; } .toolbox { padding: 16px 10px; } .swatch i { width: 37px; height: 37px; } .palette { gap: 10px 6px; } .little-note { display: none; } .paper-frame { padding: 8px; } }
@media (max-width: 700px) { .studio { padding: 15px 12px; } .paper-actions { justify-content: flex-end; } .paper-actions button { min-height: 44px; padding: 8px 19px; font-size: 15px; } .topbar { margin-bottom: 19px; } .eyebrow { font-size: 8px; letter-spacing: .8px; } .workspace { grid-template-columns: 1fr; gap: 8px; } .paper-heading { font-size: 12px; } .toolbox { margin-top: 5px; padding: 16px; } .palette { grid-template-columns: repeat(5, 1fr); gap: 9px; } .swatch i { width: 42px; height: 42px; } .brush-tools { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding-top: 13px; margin-top: 13px; } .sizes { margin: 0; } .sizes button { min-height: 57px; } #eraser { margin: 0; padding: 7px 12px; } .paper-footer { gap: 7px; } .paper-footer p { font-size: 12px; } footer { font-size: 10px; } }
@media (max-width: 400px) { .brush-tools { grid-template-columns: 1fr auto; } .brush-tools h2 { grid-column: 1 / -1; } .paper-footer { align-items: start; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

@media (max-width: 600px) { .paper-actions { justify-content: center; gap: 8px; } .paper-actions button { padding-inline: 10px; } }

.paper-surface { position: relative; }
#pencil-cursor { display: none; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; border-radius: 50%; border: 2px dashed #483449; box-shadow: 0 0 0 2px white; transform: translate(-50%, -50%); pointer-events: none; }
#paper:focus-visible + #pencil-cursor { display: block; }
#pencil-cursor.drawing { border-style: solid; background: #98659755; }
#paper:focus-visible { outline: 3px solid #7d467b; outline-offset: 2px; }
#pencil-help { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.paper-area:has(#paper:focus-visible) #pencil-help { position: static; clip-path: none; width: auto; height: auto; margin: 8px 2px 0; font-size: 13px; }
