:root{font-family:ui-rounded,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#514c5c;background:white;--purple:#9a83d3;--safe-top:max(12px,env(safe-area-inset-top));--safe-bottom:max(14px,env(safe-area-inset-bottom));--safe-left:max(12px,env(safe-area-inset-left));--safe-right:max(12px,env(safe-area-inset-right))}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{position:fixed;inset:0}button,input{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;border:0;background:none;color:inherit;touch-action:manipulation;user-select:none;-webkit-user-select:none}button:focus-visible,input:focus-visible{outline:3px solid #9a83d3;outline-offset:3px}button:disabled{opacity:.25;cursor:default}button:hover:not(:disabled){background:#eee8f7}button[aria-expanded=true]{background:#ebe3f6}.glass{background:rgba(250,248,252,.94);border:1px solid #e9e3ee;box-shadow:0 4px 24px #39264b12;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}#canvas-wrap{position:fixed;inset:0;width:100%;height:100%;height:100dvh;touch-action:none;user-select:none;-webkit-user-select:none}canvas{display:block;width:100%;height:100%;touch-action:none}.empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:none;color:#c5b7d6;gap:12px}.empty>span{font-size:38px}.empty p{font-size:15px;letter-spacing:.2px;margin:0}.empty[hidden],.panel[hidden]{display:none!important}.top-controls{position:fixed;top:var(--safe-top);left:var(--safe-left);display:flex;gap:2px;align-items:center;padding:5px;border-radius:18px;z-index:2}.icon-button{width:44px;height:44px;display:inline-grid;place-items:center;border-radius:12px;font-size:23px}.icon-button svg,.dock-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.divider{display:block;align-self:center;width:1px;height:25px;background:#e1d9e8;margin:0 4px}.dock{position:fixed;bottom:var(--safe-bottom);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:5px;border-radius:23px;padding:7px;z-index:2}.dock-button{width:63px;min-height:61px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px}.dock-button.selected,.dock-button.active{background:#ece4f6;color:#7c5eab}.dock-label{font-size:10px}.dock-button>span:first-child{font-size:28px;line-height:29px}#current-color{width:27px;height:27px;border-radius:50%;background:var(--purple);box-shadow:0 0 0 3px #fff,0 0 0 4px #e1d6ed;margin:1px 0}#eraser svg{height:28px;width:28px}.panel{position:fixed;z-index:3;border-radius:23px;padding:18px;width:340px;max-width:calc(100vw - var(--safe-left) - var(--safe-right));max-height:calc(100dvh - 110px - var(--safe-top) - var(--safe-bottom));overflow:auto;overscroll-behavior:contain}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}.panel h1,.panel h2{font-size:16px;letter-spacing:-.3px;font-weight:650;margin:0}.close-panel{width:36px;height:36px;border-radius:50%;font-size:26px;flex-shrink:0;color:#a191b1}.menu-panel,.scene-panel{top:calc(var(--safe-top) + 66px);left:var(--safe-left)}.paper-title{font-size:11px;color:#a395af;margin:0 0 13px}.menu-items{display:grid;gap:2px}.menu-items>button{display:flex;align-items:center;gap:15px;text-align:left;font-size:14px;padding:10px 12px;min-height:46px;border-radius:12px}.menu-items>button>span{width:22px;text-align:center;font-size:22px;color:#9a83ba}.menu-settings{display:flex;gap:6px;align-items:center;border-top:1px solid #e9e1ef;margin-top:10px;padding-top:10px}.menu-settings>span{font-size:12px;margin-right:auto;color:#a395af}.menu-settings #sound[aria-pressed=true]{background:#ece4f6;color:#8668ac}.status{display:flex;flex-direction:column;gap:6px;font-size:10px;color:#a99bb4;margin-top:13px}.status #offline{color:#819b80}.bottom-panel{bottom:calc(var(--safe-bottom) + 88px);left:50%;transform:translateX(-50%);width:360px}.brushes{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}.tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;border-radius:13px;min-height:78px;font-size:10px;padding:5px 2px}.tool>span{font-size:27px}.tool.active{background:#eae0f5;color:#8062a7;box-shadow:inset 0 0 0 1px #dacbea}.size-control{display:flex;align-items:center;gap:12px;margin-top:18px;border-top:1px solid #e9e1ef;padding-top:14px}.size-control label{font-size:12px;color:#9a8da5}input[type=range]{flex:1;min-width:0;accent-color:var(--purple);height:36px;touch-action:pan-x}.size-preview{width:34px;height:34px;display:grid;place-items:center}#size-dot{display:block;width:18px;height:18px;background:var(--purple);border-radius:50%}.palette{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;padding:8px 3px 17px;justify-items:center}.swatch{width:48px;height:48px;border-radius:50%;background:var(--color);border:4px solid #faf8fc;box-shadow:0 0 0 1px transparent;position:relative}.swatch:hover:not(:disabled){background:var(--color);transform:scale(1.05)}.swatch.active{box-shadow:0 0 0 2px var(--color)}.swatch.active:after{content:'✓';color:white;position:absolute;inset:0;display:grid;place-items:center;font-size:21px}.custom-color{position:relative;display:flex;justify-content:center;align-items:center;min-height:44px;border:1px dashed #cdbedb;border-radius:12px;font-size:13px;color:#9580ac;overflow:hidden;cursor:pointer}.custom-color input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.scene-list{display:grid;gap:10px}.scene-card{display:flex;align-items:center;gap:20px;background:#f0e9e3;border-radius:15px;padding:9px 14px;text-align:left}.scene-card:nth-child(2){background:#ebe6f3}.scene-card:nth-child(3){background:#e8efe6}.scene-card svg{width:95px;height:72px}.scene-card span{font-size:13px}.scene-card small{display:block;color:#a295ae;font-size:10px;margin-top:7px}.scene-card.active{box-shadow:inset 0 0 0 2px #b5a0cd}.panel-note{font-size:11px;line-height:1.7;color:#a093ac;margin:15px 3px 0}dialog{border:1px solid #e4d9e9;border-radius:24px;padding:32px;background:#fffdfd;color:#514759;max-width:620px;width:calc(100% - 32px);max-height:85dvh;box-shadow:0 20px 100px #49385025}dialog::backdrop{background:#3c32453a;backdrop-filter:blur(4px)}.dialog-close{position:absolute;right:10px;top:8px;width:40px;height:40px;font-size:29px;color:#9f8cab;border-radius:50%}dialog h2{font-size:23px;font-weight:600;margin-top:0;padding-right:20px}dialog p,dialog li{line-height:1.8;font-size:14px;color:#8a7c91}dialog ul{padding-left:20px}.primary{background:#957bb8;color:white;padding:14px 22px;border-radius:12px;margin-top:12px}.primary:hover:not(:disabled){background:#8162a5}.secondary{padding:14px 22px;border:1px solid #ded4e6;border-radius:12px;margin:12px 0 0 8px}.gallery-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.gallery-item{border:1px solid #e6ddeb;border-radius:14px;overflow:hidden}.gallery-item img{width:100%;display:block;aspect-ratio:1.5;object-fit:contain;background:white}.gallery-item .caption{display:flex;justify-content:space-between;align-items:center;padding:8px;font-size:11px}.gallery-item button{padding:8px;min-height:40px;color:#9174ac}.toast{position:fixed;top:calc(var(--safe-top) + 70px);left:50%;transform:translate(-50%,-6px);background:#655575ed;color:#fff;padding:12px 20px;border-radius:14px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;z-index:5;max-width:min(420px,90vw);text-align:center;line-height:1.5}.toast.visible{opacity:1;transform:translate(-50%,0)}@media(max-width:480px){.panel{padding:14px}.menu-panel,.scene-panel{width:310px}.dock-button{width:60px;min-height:58px}.bottom-panel{bottom:calc(var(--safe-bottom) + 84px)}dialog{padding:28px 20px}.gallery-grid{gap:8px}}@media(max-height:520px) and (orientation:landscape){.menu-panel,.scene-panel{max-height:calc(100dvh - 90px)}.bottom-panel{max-height:calc(100dvh - 110px)}.dock{left:auto;right:var(--safe-right);transform:none}.bottom-panel{left:auto;right:var(--safe-right);transform:none}.tool{min-height:60px}.size-control{margin-top:7px;padding-top:7px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
