.bo-tool{--bo-accent:#d04445;--bo-ink:#1a1a1a;--bo-muted:#6b6b6b;--bo-line:#dcdcdc;--bo-bg:#f2f2f2;--bo-ar:0.8;
  max-width:560px;margin:0 auto;font:16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:var(--bo-ink)}
.bo-tool *,.bo-tool *::before,.bo-tool *::after{box-sizing:border-box}
.bo-tool [hidden]{display:none!important}
.bo-tool button{-webkit-appearance:none;appearance:none;margin:0;font:inherit;line-height:1.2;text-transform:none;letter-spacing:normal;box-shadow:none;text-shadow:none;cursor:pointer;-webkit-tap-highlight-color:transparent}

.bo-tool .bo-stage-wrap{display:flex;justify-content:center}
.bo-tool .bo-stage{position:relative;width:100%;aspect-ratio:var(--bo-ar);
  max-width:calc(65vh * var(--bo-ar));max-width:calc(65dvh * var(--bo-ar));
  background:var(--bo-bg);border-radius:12px;overflow:hidden;
  touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;outline:none}
.bo-tool .bo-stage:focus-visible{box-shadow:0 0 0 3px var(--bo-accent)}
.bo-tool .bo-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}
.bo-tool.has-image .bo-canvas{cursor:grab}
.bo-tool .bo-canvas.is-drag{cursor:grabbing}

.bo-tool .bo-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  width:100%;padding:24px;border:2px dashed var(--bo-line);border-radius:12px;background:rgba(255,255,255,.6);color:var(--bo-ink)}
.bo-tool .bo-empty-icon{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;
  background:var(--bo-accent);color:#fff;font-size:36px;font-weight:300;line-height:1}
.bo-tool .bo-empty-title{font-size:19px;font-weight:700}
.bo-tool .bo-empty-sub{font-size:14px;color:var(--bo-muted)}

.bo-tool .bo-hint{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:8px 14px;border-radius:999px;
  background:rgba(0,0,0,.7);color:#fff;font-size:14px;white-space:nowrap;pointer-events:none}

.bo-tool .bo-msg{margin:12px 0 0;padding:10px 12px;border-radius:8px;background:#fdecec;color:#8a1f20;font-size:15px}

.bo-tool .bo-controls{display:grid;gap:14px;margin-top:16px}
.bo-tool .bo-row{display:flex;align-items:center;gap:8px}
.bo-tool .bo-formats{justify-content:center}
.bo-tool .bo-chip{min-height:44px;padding:0 18px;border:1px solid var(--bo-line);border-radius:999px;background:#fff;color:var(--bo-ink);font-size:15px;font-weight:600}
.bo-tool .bo-chip[aria-checked="true"]{background:var(--bo-ink);border-color:var(--bo-ink);color:#fff}

.bo-tool .bo-templates{justify-content:center;overflow-x:auto;padding:2px}
.bo-tool .bo-thumb{flex:0 0 auto;width:64px;aspect-ratio:var(--bo-ar);padding:0;border:3px solid transparent;border-radius:10px;overflow:hidden;background:var(--bo-bg)}
.bo-tool .bo-thumb img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.bo-tool .bo-thumb[aria-checked="true"]{border-color:var(--bo-accent)}

.bo-tool .bo-zoom{color:var(--bo-muted);font-size:20px}
.bo-tool .bo-zoom-range{flex:1;height:44px;margin:0;accent-color:var(--bo-accent)}

.bo-tool .bo-actions .bo-btn{flex:1}
.bo-tool .bo-btn{min-height:48px;padding:0 16px;border-radius:10px;border:1px solid var(--bo-line);font-size:16px;font-weight:600}
.bo-tool .bo-btn-ghost{background:#fff;color:var(--bo-ink)}
.bo-tool .bo-btn-primary{width:100%;min-height:56px;background:var(--bo-accent);border-color:var(--bo-accent);color:#fff;font-size:17px}
.bo-tool .bo-btn:disabled{opacity:.6;cursor:default}