.scratch-workspace{--scratch-purple:#71378c;--scratch-gold:#d3aa58;color:#5e3e71;font-family:StudioSans,sans-serif;display:flex;flex-direction:column;min-height:calc(100dvh - 16px);background:#fbf7fc;border-radius:22px;overflow:hidden;margin:8px}.scratch-workspace *{box-sizing:border-box}.scratch-header{display:flex;align-items:center;gap:12px;padding:15px 20px;background:#fff;border-bottom:1px solid #eddfef}.scratch-header h1{font-family:StudioRounded,sans-serif;font-size:clamp(19px,2.2vw,27px);line-height:1.15;margin:0;color:var(--scratch-purple)}.scratch-header p{font-size:13px;margin:4px 0 0;color:#8d739c}.scratch-header-actions{margin-left:auto;display:flex;gap:7px;align-items:center}.scratch-workspace .scratch-button{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:40px;padding:8px 12px;border:1px solid var(--scratch-gold)!important;border-radius:13px;background:#fff;color:var(--scratch-purple);font:inherit;font-size:14px;cursor:pointer;text-decoration:none;box-shadow:none;line-height:1.3}.scratch-workspace .scratch-button:hover{background:#f5eafa}.scratch-workspace .scratch-button:focus-visible,.scratch-workspace input:focus-visible,.scratch-workspace textarea:focus-visible,.scratch-workspace select:focus-visible{outline:3px solid #bc8ed9;outline-offset:2px}.scratch-workspace .scratch-button:disabled{opacity:.45;cursor:default}.scratch-workspace .scratch-button[aria-pressed=true]{background:#eee0f7;border-color:#9e69bb!important;color:#633382;font-weight:700}.scratch-workspace .scratch-button.primary{background:linear-gradient(120deg,#b47acb,#9250b5);color:#fff;font-weight:700}.scratch-workspace .scratch-button.danger{color:#a13d68}.scratch-workspace .scratch-button.icon-button{width:40px;min-width:40px;padding:8px}.scratch-pages{display:flex;gap:8px;overflow-x:auto;padding:10px 18px;background:#fff;border-bottom:1px solid #eddfef;flex-shrink:0}.scratch-pages .scratch-button{white-space:nowrap;min-height:35px;padding:6px 12px;font-size:13px}.scratch-stage{display:grid;grid-template-columns:minmax(0,1fr) 310px;flex:1;min-height:0}.scratch-canvas-area{min-width:0;display:flex;flex-direction:column;min-height:0;background:radial-gradient(ellipse at 20% 80%,#f8e8f2 0,transparent 70%),#f3edf6}.scratch-preview-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 16px;flex-wrap:wrap}.scratch-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:8px 0}.scratch-preview-controls .scratch-row{margin:0}.scratch-canvas-scroll{overflow:auto;flex:1;min-height:350px;max-height:calc(100dvh - 285px);padding:24px 30px 32px;overscroll-behavior:contain}.scratch-paper{width:calc(min(100%,480px) * var(--scratch-zoom));max-width:none;aspect-ratio:var(--scratch-ratio);background:#fff;box-shadow:0 5px 30px #71378c20;margin:0 auto;flex-shrink:0;position:relative}.scratch-paper svg{display:block;width:100%;height:100%;overflow:visible;touch-action:pan-x pan-y}.scratch-paper [data-scratch-object],.scratch-paper [data-scratch-resize]{touch-action:none;cursor:move}.scratch-paper [data-scratch-resize]{cursor:nwse-resize}.scratch-status{font-size:12px;line-height:1.5;color:#877092;padding:8px 16px;margin:0;background:#faf5fc;min-height:38px}.scratch-panel{background:#fff;padding:20px;overflow:auto;max-height:calc(100dvh - 240px);border-left:1px solid #eddfef;min-width:0}.scratch-panel h2{font-size:19px;margin:0 0 12px;color:var(--scratch-purple);font-family:StudioRounded,sans-serif}.scratch-panel p{font-size:14px;line-height:1.6;margin:10px 0;color:#83688f}.scratch-workspace p.scratch-hint{font-size:12px;line-height:1.6;color:#917b9e}.scratch-field{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:600;margin:12px 0;min-width:0}.scratch-field input,.scratch-field select,.scratch-field textarea,.scratch-zoom select{max-width:100%;min-width:0;width:100%;padding:10px;border:1px solid #ddcbe7!important;border-radius:11px;color:#633c7b;background:#fff;font:inherit;font-size:15px;min-height:42px}.scratch-field textarea{resize:vertical;line-height:1.5}.scratch-field .scratch-button{max-width:100%;overflow:hidden;text-overflow:ellipsis}.scratch-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 10px;min-width:0}.scratch-check{display:flex;gap:8px;align-items:center;color:#76588a;font-size:13px;line-height:1.5}.scratch-workspace input[type=checkbox]{accent-color:#9253b5;min-width:19px;width:19px;height:19px;border-radius:4px}.scratch-agenda-toggle{padding:14px;background:#f6edf9;border:1px solid #d7b9e7;border-radius:13px;font-size:15px}.scratch-workspace p.scratch-fixed-rule{padding:12px;border-radius:12px;color:#527762;background:#edf6ef;font-size:13px;line-height:1.8}.scratch-workspace fieldset{padding:0;border:0;min-width:0;margin:0}.scratch-property-title{display:flex;justify-content:space-between;align-items:center;gap:6px}.scratch-property-title h2{margin:0}.scratch-swatch{display:inline-block;width:18px;height:18px;border-radius:50%;border:1px solid #d3b9de;flex-shrink:0}.scratch-add-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.scratch-add-grid .scratch-button{flex-direction:column;padding:14px 8px;gap:9px;min-height:85px}.scratch-layer-list{display:grid;gap:8px;margin:15px 0}.scratch-layer-list .scratch-button{justify-content:flex-start;text-align:left;overflow-wrap:anywhere}.scratch-tools{display:flex;gap:6px;overflow-x:auto;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #eddfef;flex-shrink:0}.scratch-workspace .scratch-tools .scratch-button.tool{min-width:76px;border:0!important;border-radius:12px;padding:7px 10px;font-size:12px;flex-direction:column;gap:4px}.scratch-tools .brand-icon{width:28px;height:28px;object-fit:contain}.scratch-zoom{display:flex;align-items:center;gap:8px;font-size:12px}.scratch-zoom select{min-height:34px;padding:6px;width:82px;font-size:13px}body[data-screen=scratch] #app{min-width:0;overflow-x:hidden;padding:0}@media(min-width:1100px){.scratch-workspace{min-height:calc(100dvh - 30px);margin:15px}.scratch-panel{width:330px}.scratch-stage{grid-template-columns:minmax(0,1fr) 330px}}@media(max-width:700px){.scratch-workspace{margin:0;border-radius:0;min-height:100dvh}.scratch-header{padding:12px 10px;gap:8px}.scratch-header h1{font-size:17px}.scratch-header p{font-size:11px}.scratch-header-actions{gap:4px}.scratch-header-actions .scratch-button{padding:8px;min-width:36px;min-height:36px;font-size:12px;gap:4px}.scratch-header-actions .scratch-button.icon-button{width:34px;min-width:34px}.scratch-header-actions .scratch-button span{display:none}.scratch-pages{padding:8px 10px}.scratch-stage{display:flex;flex-direction:column}.scratch-preview-controls{padding:7px 10px;gap:5px}.scratch-preview-controls .scratch-button{font-size:12px;padding:6px 9px;min-height:34px}.scratch-canvas-scroll{min-height:270px;max-height:52dvh;height:46dvh;flex:auto;padding:20px 28px 28px}.scratch-paper{width:calc(min(100%,360px) * var(--scratch-zoom))}.scratch-panel{border-left:0;border-top:1px solid #eddfef;padding:15px;max-height:37dvh;min-height:180px}.scratch-panel h2{font-size:18px}.scratch-panel p{font-size:13px}.scratch-tools{padding:7px 8px calc(7px + env(safe-area-inset-bottom));position:sticky;bottom:0;z-index:3;box-shadow:0 -3px 20px #71378c0c}.scratch-workspace .scratch-tools .scratch-button.tool{min-width:65px;padding:6px;font-size:11px}.scratch-add-grid{grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px}.scratch-add-grid .scratch-button{min-height:70px;padding:9px 5px;font-size:12px}.scratch-status{font-size:11px;padding:6px 10px;min-height:30px}}
