:root{--bg: #0b0c10;--panel: rgba(17, 24, 39, .85);--panel-border: rgba(255, 255, 255, .08);--text: #e5e7eb;--muted: #9ca3af;--canvas-bg: #111827;--accent: #93c5fd;--btn-bg: #111827;--btn-border: #374151;--badge-bg: #1f2937;--grid: rgba(255, 255, 255, .08)}html[data-theme=light]{--bg: #f7fafc;--panel: rgba(255, 255, 255, .9);--panel-border: rgba(0, 0, 0, .08);--text: #111827;--muted: #4b5563;--canvas-bg: #ffffff;--accent: #2563eb;--btn-bg: #ffffff;--btn-border: #d1d5db;--badge-bg: #e5e7eb;--grid: rgba(0, 0, 0, .08)}html,body,#root{height:100%;margin:0;background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji"}.topbar{position:fixed;top:8px;left:50%;transform:translate(-50%);display:flex;gap:10px;align-items:center;justify-content:center;background:var(--panel);border:1px solid var(--panel-border);padding:8px 12px;border-radius:12px;z-index:40;box-shadow:0 6px 20px #00000026;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);max-width:min(980px,96vw);flex-wrap:wrap}.sidebar{position:fixed;top:50%;left:8px;transform:translateY(-50%);display:flex;flex-direction:column;gap:8px;background:var(--panel);border:1px solid var(--panel-border);padding:10px;border-radius:12px;z-index:40;box-shadow:0 6px 20px #00000026;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);max-height:calc(100vh - 24px);overflow:auto}.btn,.checkbox{background:var(--btn-bg);color:var(--text);border:1px solid var(--btn-border);border-radius:8px;padding:6px 10px;height:34px;display:inline-flex;align-items:center;gap:6px;cursor:pointer}.btn.active{outline:2px solid var(--accent)}.input{cursor:text}.select{cursor:pointer}.checkbox{height:auto;padding:6px 8px;gap:8px}.range{accent-color:var(--accent);width:160px}.stack{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px}.stack .btn{width:38px;height:38px;overflow:hidden;text-align:center}.stack .btn:focus{outline:2px solid var(--accent)}.stack .btn svg{width:24px;height:24px}.row{display:flex;gap:8px;align-items:center;flex-wrap:nowrap;justify-content:center}.row .input,.row .role{padding:4px 8px;border:1px solid var(--btn-border);border-radius:8px;background:var(--btn-bg);color:var(--text);height:28px;font-size:14px;width:100px}.row .role{height:35px}.row select option{background:var(--btn-bg);color:var(--text);border-radius:9px;padding:4px 8px;font-size:14px}.badge{position:fixed;top:8px;right:8px;background:var(--badge-bg);color:var(--text);border:1px solid var(--panel-border);border-radius:999px;padding:6px 10px;font-size:12px;z-index:45}.palette-popover{position:absolute;top:75%;left:70px;background:var(--panel);border:1px solid var(--panel-border);padding:8px;border-radius:12px;box-shadow:0 6px 20px #00000026;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:50}.size-slider{position:absolute;top:26%;left:70px;background:var(--panel);border:1px solid var(--panel-border);padding:8px;border-radius:12px;box-shadow:0 6px 20px #00000026;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:50}.palette{display:grid;grid-template-columns:repeat(4,24px);gap:6px;justify-content:start}.swatch{width:22px;height:22px;border-radius:50%;border:2px solid var(--panel-border);cursor:pointer}.swatch.active{outline:2px solid var(--accent)}.canvas-wrap{position:absolute;inset:0}canvas{width:100%;height:100%;display:block;touch-action:none;background:var(--canvas-bg)}.canvas-wrap.pan canvas{cursor:grab}.canvas-wrap.pan.grabbing canvas{cursor:grabbing}.text-layer{position:absolute;inset:0;z-index:40;pointer-events:none;transform-origin:0 0;will-change:transform}.text-item{position:absolute;pointer-events:auto;white-space:pre-wrap;-webkit-user-select:text;user-select:text;font-weight:700}.textbox{position:absolute;transform:translate(-50%,-50%);background:transparent;color:var(--text);border:1px dashed var(--btn-border);outline:none;z-index:50;min-width:60px;min-height:28px;resize:both;overflow:auto;white-space:pre-wrap}.hint{position:fixed;bottom:8px;left:50%;transform:translate(-50%);background:var(--panel);color:var(--muted);border:1px solid var(--panel-border);border-radius:8px;padding:4px 8px;font-size:12px;z-index:35}@media (max-width: 640px){.sidebar{transform:none;top:80px}.topbar{width:auto;gap:8px;padding:8px 18px}.row .input,.row .role{max-width:80px;font-size:12px;height:22px}.row .role{height:30px}.btn{height:26px;font-size:13px}.btn svg{width:16px;height:16px}.stack .btn{width:34px;height:34px}.badge{font-size:10px;padding:4px 8px;top:auto;bottom:8px;right:8px}}
