*{box-sizing:border-box}html,body,#root{height:100%}body{color:#1e1e1e;background:#fff;margin:0;font-family:system-ui,-apple-system,sans-serif;overflow:hidden}canvas{touch-action:none;width:100vw;height:100vh;display:block;position:fixed;inset:0}.toolbar{z-index:10;background:#fff;border:1px solid #e0e0e0;border-radius:12px;align-items:center;gap:4px;padding:6px 10px;display:flex;position:fixed;top:12px;left:50%;transform:translate(-50%);box-shadow:0 2px 8px #00000014}.toolbar button{color:#1e1e1e;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:8px;justify-content:center;align-items:center;width:32px;height:30px;padding:0;transition:background .1s,transform .1s;display:flex}.toolbar button svg{display:block}.toolbar button:hover:not(:disabled){background:#f0f0f0;transform:translateY(-1px)}.toolbar button.active{background:#dbeafe;border-color:#93c5fd}.toolbar button:disabled{opacity:.35;cursor:default}.toolbar .divider{background:#e0e0e0;width:1px;height:20px;margin:0 4px}.toolbar .status{color:#666;white-space:nowrap;margin-left:4px;font-size:12px}.export-menu{display:flex;position:relative}.export-menu-items{z-index:20;background:#fff;border:1px solid #e0e0e0;border-radius:10px;flex-direction:column;min-width:200px;padding:4px;display:flex;position:absolute;top:calc(100% + 6px);left:50%;transform:translate(-50%);box-shadow:0 4px 14px #0000001f}.export-menu-items button{white-space:nowrap;justify-content:flex-start;width:auto;height:auto;padding:7px 10px;font-size:13px}.zoom-controls{z-index:10;background:#fff;border:1px solid #e0e0e0;border-radius:10px;align-items:center;gap:2px;padding:4px 6px;display:flex;position:fixed;bottom:16px;left:16px;box-shadow:0 2px 8px #00000014}.zoom-controls button{color:#1e1e1e;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;width:32px;height:28px;font-size:15px;display:flex}.zoom-controls button:hover{background:#f0f0f0}.zoom-controls .zoom-level{font-variant-numeric:tabular-nums;min-width:48px;font-size:12px}.grid-controls{z-index:10;background:#fff;border:1px solid #e0e0e0;border-radius:10px;align-items:center;gap:4px;padding:4px 6px;display:flex;position:fixed;bottom:16px;right:16px;box-shadow:0 2px 8px #00000014}.grid-controls button{color:#666;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;padding:5px 10px;font-size:12px}.grid-controls button:hover{background:#f0f0f0}.grid-controls button.active{color:#1e1e1e;background:#dbeafe;border-color:#93c5fd}.color-palette{z-index:15;background:#fff;border:1px solid #e0e0e0;border-radius:999px;align-items:center;gap:7px;padding:6px 9px;animation:.12s ease-out palette-fade;display:flex;position:fixed;transform:translate(-50%,-100%);box-shadow:0 2px 10px #0000001a}.color-palette.below{transform:translate(-50%)}.color-swatch{cursor:pointer;border:none;border-radius:50%;width:18px;height:18px;padding:0;transition:transform .1s,box-shadow .1s;box-shadow:inset 0 0 0 1px #00000026}.color-swatch:hover{transform:scale(1.25)}.color-swatch.active{box-shadow:0 0 0 2px #fff,0 0 0 4px #4a90d9}.fill-swatch-none{background:linear-gradient(to top right,#0000 calc(50% - 1px),#dc2626 calc(50% - 1px) calc(50% + 1px),#0000 calc(50% + 1px)),#fff}.text-swatch-auto{color:#1e1e1e;background:#fff;justify-content:center;align-items:center;font-size:11px;font-weight:600;display:flex}.palette-divider{background:#e0e0e0;width:1px;height:18px}.font-scale{color:#1e1e1e;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;justify-content:center;align-items:center;width:24px;height:22px;padding:0;transition:background .1s,transform .1s;display:flex}.font-scale span{font-weight:600;line-height:1}.font-scale:hover{background:#f0f0f0;transform:translateY(-1px)}.font-scale.active{background:#dbeafe;border-color:#93c5fd}.palette-delete{color:#6b7280;cursor:pointer;background:0 0;border:none;border-radius:6px;justify-content:center;align-items:center;width:24px;height:22px;padding:0;transition:background .1s,color .1s,transform .1s;display:flex}.palette-delete:hover{color:#dc2626;background:#fee2e2;transform:translateY(-1px)}.extend-chip{z-index:15;color:#fff;cursor:pointer;background:#4a90d9;border:none;border-radius:50%;justify-content:center;align-items:center;width:26px;height:26px;padding:0 0 2px;font-size:18px;line-height:1;transition:transform .12s,background .12s,box-shadow .12s;animation:.16s ease-out chip-pop;display:flex;position:fixed;box-shadow:0 2px 8px #4a90d980}.extend-chip:hover{background:#3b7cc4;transform:scale(1.18);box-shadow:0 3px 12px #4a90d9a6}@keyframes palette-fade{0%{opacity:0}to{opacity:1}}@keyframes chip-pop{0%{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}.text-input{z-index:20;color:#1e1e1e;resize:none;background:#fffffff2;border:1px dashed #4a90d9;border-radius:4px;outline:none;min-width:120px;padding:4px 8px;font:16px sans-serif;position:fixed;overflow:hidden}.text-input-centered{text-align:center;transform:translate(-50%,-50%)}.save-indicator{color:#16a34a;opacity:0;pointer-events:none;z-index:10;background:#fff;border:1px solid #bbf7d0;border-radius:8px;padding:4px 10px;font-size:12px;transition:opacity .3s;position:fixed;bottom:64px;right:16px;box-shadow:0 2px 8px #00000014}.save-indicator.visible{opacity:1}.restore-toast{color:#fff;z-index:20;background:#1e1e1e;border-radius:8px;align-items:center;gap:10px;padding:8px 12px;font-size:13px;animation:.15s ease-out palette-fade;display:flex;position:fixed;top:64px;left:50%;transform:translate(-50%);box-shadow:0 2px 10px #0003}.restore-toast button{color:#fff;cursor:pointer;opacity:.7;background:0 0;border:none;padding:0 2px;font-size:15px;line-height:1}.restore-toast button:hover{opacity:1}.storage-warning{color:#92400e;z-index:25;background:#fef3c7;border:1px solid #f59e0b;border-radius:8px;align-items:center;gap:10px;padding:8px 12px;font-size:13px;display:flex;position:fixed;top:64px;left:50%;transform:translate(-50%);box-shadow:0 2px 10px #0000001f}.storage-warning button{color:#92400e;cursor:pointer;background:0 0;border:none;padding:0 2px;font-size:15px;line-height:1}.file-error{color:#991b1b;z-index:25;background:#fee2e2;border:1px solid #ef4444;border-radius:8px;align-items:center;gap:10px;padding:8px 12px;font-size:13px;display:flex;position:fixed;top:64px;left:50%;transform:translate(-50%);box-shadow:0 2px 10px #0000001f}.file-error button{color:#991b1b;cursor:pointer;background:0 0;border:none;padding:0 2px;font-size:15px;line-height:1}
