body.coloring-open{overflow:hidden!important}
.color-studio{position:fixed;inset:0;box-sizing:border-box;margin:0;width:100vw;max-width:none;height:100dvh;max-height:none;border:0;border-radius:0;padding:0;background:#ecece5;color:#2d493e;font:14px/1.35 system-ui,sans-serif;overflow:hidden}
.color-studio[open]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}
.color-studio>*,.studio-palette,.studio-tools{min-width:0;max-width:100%}
.color-studio::backdrop{background:#ecece5}
.color-studio *{box-sizing:border-box}
.color-studio button{font:inherit;cursor:pointer;min-height:42px;border:1px solid #d2d9cc;border-radius:10px;padding:6px 12px;background:#fffdf8;color:#2d493e;white-space:nowrap;touch-action:manipulation}
.color-studio button:disabled{opacity:.45;cursor:default}
.color-studio button:focus-visible{outline:3px solid #536e3e;outline-offset:2px}
.studio-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:max(6px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left));border-bottom:1px solid #d4dacd;background:#fffdf7}
.studio-top strong{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.studio-stage{min-height:0;overflow:auto;overscroll-behavior:contain;display:grid;align-items:safe center;justify-items:safe center;padding:6px}
.studio-paper{flex:none;box-shadow:0 2px 15px #29463725;background:white;line-height:0}
.studio-paper canvas{display:block;width:100%;height:100%;max-width:none;touch-action:none;cursor:crosshair}
.studio-paper canvas[data-mode=pan]{cursor:grab}
.studio-tray{position:relative;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px 20px;padding:7px 10px max(5px,env(safe-area-inset-bottom));background:#fffdf7;border-top:1px solid #d4dacd}
.studio-palette,.studio-tools{display:flex;gap:5px;justify-content:center;align-items:center}
.studio-tools{flex-wrap:wrap}
.studio-palette button{height:40px;min-height:40px;width:40px;padding:0;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px #9ca899}
.studio-palette [aria-pressed=true]{box-shadow:0 0 0 3px #2d493e;transform:scale(.88)}
.studio-tools [aria-pressed=true]{background:#dce7d3;border-color:#7c976a}
.studio-palette [data-swatch="0"]{background:#e990a9}.studio-palette [data-swatch="1"]{background:#ed9b83}.studio-palette [data-swatch="2"]{background:#f4d86f}.studio-palette [data-swatch="3"]{background:#95bd8a}.studio-palette [data-swatch="4"]{background:#8ac4df}.studio-palette [data-swatch="5"]{background:#b3a1d1}.studio-palette [data-swatch="6"]{background:#c9aa85}.studio-palette [data-swatch="7"]{background:#fff}
.studio-status{flex-basis:100%;text-align:center;font-size:11px;margin:0;line-height:16px;color:#5c6c60}
.studio-options,.studio-confirm{position:absolute;bottom:100%;right:8px;background:#fffdf7;box-shadow:0 -3px 18px #29463720;border:1px solid #c4d0be;border-radius:12px;padding:14px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;max-width:calc(100vw - 16px)}
.color-studio [hidden]{display:none!important}.studio-options label{display:flex;gap:8px;align-items:center}.studio-options input{width:100px}
.studio-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:650px){.studio-tray{gap:7px;padding-inline:5px}.studio-palette{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:min(100%,322px);gap:6px}.studio-tools{gap:5px}.studio-tools button{padding:6px 10px}.studio-top{gap:5px;padding-inline:6px}.studio-top button{padding:6px 8px}.studio-top strong{font-size:12px}.studio-palette button{width:100%;height:35px;min-height:35px}}
@media(max-height:500px) and (min-width:550px){.studio-palette button{width:30px;height:30px;min-height:30px}.studio-tools button{min-height:34px;padding:4px 8px}.studio-tray{gap:3px 14px;padding-block:4px}.studio-status{font-size:10px;line-height:12px}.studio-top button{min-height:34px}}
/* Isolate the tray from the page's ordinary footer and dialog styles. */
.color-studio .studio-tray{width:100%;max-width:none;margin:0;font-family:system-ui,sans-serif}
.color-studio .studio-status{font-size:11px;line-height:16px;margin:0}
.color-studio .studio-options label{margin:0;font-size:13px}
.color-studio .studio-options input{padding:0;height:30px;border:0;background:transparent}
@media(max-width:360px){.studio-palette{gap:4px}.studio-palette button{height:32px;min-height:32px}.studio-tools button{padding:6px 8px}.studio-top strong{font-size:11px}.studio-top button{font-size:12px}}
