dialog.bg-editor {
  --be-blue:#64beff;
  --be-white:#f7f7f8;
  --be-dark:#141415;
  position:fixed;
  inset:0;
  width:100%;
  max-width:none;
  height:100%;
  height:100dvh;
  max-height:none;
  padding:0;
  margin:0;
  border:0;
  border-radius:0;
  box-sizing:border-box;
  overflow:hidden;
  overscroll-behavior:contain;
  background:#19191a;
  color:var(--be-white);
  box-shadow:none;
  color-scheme:dark;
  font:500 16px/1.35 -apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;
}
dialog.bg-editor[open] {display:grid;grid-template-rows:auto minmax(0,1fr) auto}
dialog.bg-editor::backdrop {background:#111}
.bg-editor *, .bg-editor *::before, .bg-editor *::after {box-sizing:border-box}
.bg-editor :is(button,input) {font:inherit}
.bg-editor button {cursor:pointer;color:inherit;border:0;letter-spacing:normal;box-shadow:none;line-height:1.2}
.bg-editor button:disabled {cursor:default;opacity:.35}
.bg-editor :is(button,input,.be-stage):focus-visible {outline:2px solid var(--be-blue);outline-offset:-3px}
.bg-editor button:active:not(:disabled) {transform:none;filter:brightness(1.15)}
.bg-editor [hidden] {display:none!important}
.bg-editor .be-header {z-index:1;background:#060606;padding-top:env(safe-area-inset-top,0px)}
.bg-editor .be-bar, .bg-editor .be-controls {width:min(100%,760px);margin:0 auto}
.bg-editor .be-bar {display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:clamp(7px,2.6vw,23px);padding:10px max(13px,env(safe-area-inset-right,0px)) 10px max(13px,env(safe-area-inset-left,0px))}
.bg-editor .be-circle, .bg-editor .be-help-button, .bg-editor .be-dismiss {display:grid;place-items:center;line-height:1;padding:0}
.bg-editor .be-circle {width:46px;height:46px;border-radius:50%;background:#222224;border:1px solid #3d3d3f}
.bg-editor .be-circle svg {width:27px;height:27px}
.bg-editor .be-cancel {color:#ff6a74}
.bg-editor .be-apply {color:#10141c;background:#62bcff;border-color:#83caff}
.bg-editor .be-help-button {width:39px;height:44px;color:var(--be-blue);background:transparent}
.bg-editor .be-help-button svg {width:29px;height:29px}
.bg-editor .be-range {display:flex;flex-flow:column;align-items:stretch;justify-content:center;gap:0;min-width:0;margin:0;color:#fff;text-align:center}
.bg-editor .be-range>span {font-size:clamp(13px,3.3vw,16px);line-height:1.2;white-space:nowrap}
.bg-editor .be-range b {font-weight:550;font-variant-numeric:tabular-nums}
.bg-editor input[type=range] {
  --be-pct:0%;
  --be-rail:#404042;
  --be-fill:var(--be-blue);
  display:block;
  width:100%;height:24px;min-width:0;margin:0;
  padding:0;appearance:none;-webkit-appearance:none;border:0;border-radius:10px;
  background:transparent;cursor:pointer;
}
.bg-editor input[type=range]::-webkit-slider-runnable-track {height:6px;border-radius:6px;background:linear-gradient(to right,var(--be-fill) 0 var(--be-pct),var(--be-rail) var(--be-pct) 100%)}
.bg-editor input[type=range]::-moz-range-track {height:6px;border-radius:6px;background:var(--be-rail)}
.bg-editor input[type=range]::-moz-range-progress {height:6px;border-radius:6px;background:var(--be-fill)}
.bg-editor input[type=range]::-webkit-slider-thumb {width:30px;height:22px;border:0;border-radius:20px;margin-top:-8px;appearance:none;-webkit-appearance:none;background:#fff;box-shadow:0 1px 2px #0005}
.bg-editor input[type=range]::-moz-range-thumb {width:30px;height:22px;border:0;border-radius:20px;background:#fff;box-shadow:0 1px 2px #0005}
.bg-editor .be-stage, .bg-editor .be-checker {
  --be-check1:#939395;
  --be-check2:#666668;
  --be-grid:16px;
  background-color:var(--be-check1);
  background-image:conic-gradient(var(--be-check2) 25%,transparent 0 50%,var(--be-check2) 0 75%,transparent 0);
  background-size:var(--be-grid) var(--be-grid);
}
.bg-editor .be-stage {position:relative;isolation:isolate;overflow:hidden;min-width:0;min-height:0;touch-action:none;cursor:crosshair;user-select:none;-webkit-user-select:none}
.bg-editor .be-stage.be-light {--be-check1:#fff;--be-check2:#cdcdcf}
.bg-editor .be-stage.be-panning {cursor:grab}
.bg-editor .be-stage.be-panning:active {cursor:grabbing}
.bg-editor .be-picture {position:absolute;top:0;left:0;display:block;max-width:none;max-height:none;pointer-events:none;transform-origin:top left}
.bg-editor .be-move {position:absolute;top:max(14px,env(safe-area-inset-top,0px));left:max(14px,env(safe-area-inset-left,0px));width:66px;height:66px;padding:0;border-radius:50%;background:rgb(245 245 247 / .82);color:#17699c;font-size:14px;font-weight:650;box-shadow:0 2px 5px #0002;border:1px solid #ffffff60}
.bg-editor .be-move[aria-pressed=true] {background:#60bdff;color:#102434;border-color:#d4ecff}
.bg-editor .be-cursor, .bg-editor .be-finger {position:absolute;z-index:1;transform:translate(-50%,-50%);pointer-events:none;width:30px;height:30px;border-radius:50%;border:2px solid #ff17b8;box-shadow:0 0 0 1px #fff9}
.bg-editor .be-cursor::after {content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#ff17b8;border-radius:50%;width:4px;height:4px;box-shadow:0 0 0 1px #fff8}
.bg-editor .be-finger {width:15px;height:15px;border-width:1.5px}
.bg-editor .be-footer {z-index:1;background:#28282a;padding:0 0 env(safe-area-inset-bottom,0px)}
.bg-editor .be-controls {padding:6px max(6px,env(safe-area-inset-right,0px)) 9px max(6px,env(safe-area-inset-left,0px))}
.bg-editor .be-options {min-height:45px;display:grid;grid-template-columns:37px minmax(0,1fr) 42px 42px;align-items:center;gap:6px;margin-bottom:5px}
.bg-editor .be-checker {width:31px;height:31px;justify-self:center;--be-check1:#fff;--be-check2:#c8c8cb;--be-grid:10px;border-radius:7px;border:1.5px solid var(--be-blue)}
.bg-editor .be-checker[aria-pressed=true] {--be-check1:#939395;--be-check2:#666668}
.bg-editor .be-history {min-height:40px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;line-height:1;background:transparent;color:var(--be-blue)}
.bg-editor .be-history span {font-size:12px}
.bg-editor .be-history svg {width:27px;height:19px}
.bg-editor .be-redo svg {transform:scaleX(-1)}
.bg-editor .be-redo:disabled, .bg-editor .be-undo:disabled {color:#b5b5b9}
.bg-editor .be-tools {background:#424246;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));padding:2px;border-radius:999px}
.bg-editor .be-tools button {min-height:44px;padding:4px 1px;background:transparent;border-radius:999px;font-weight:530;color:#f7f7f7;font-size:clamp(14px,3.7vw,17px)}
.bg-editor .be-tools button[aria-pressed=true] {background:#236df0;color:white;font-weight:700}
.bg-editor .be-tools button[data-tool=magic] {font-size:21px}
.bg-editor .be-help, .bg-editor .be-alert {position:absolute;z-index:3;right:max(12px,env(safe-area-inset-right,0px));border:1px solid #5b5b61;border-radius:13px;background:#242427f7;color:white;box-shadow:0 4px 20px #0004;text-align:left}
.bg-editor .be-help {top:12px;max-width:min(340px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;overscroll-behavior:contain;padding:12px 15px;font-size:14px;line-height:1.6;user-select:text;cursor:default;touch-action:pan-y}
.bg-editor .be-help>div {display:flex;align-items:center;justify-content:space-between;gap:12px}
.bg-editor .be-help p {margin:7px 0}
.bg-editor .be-dismiss {color:#e3e3e6;background:#414146;border-radius:50%;width:30px;height:30px;flex-shrink:0}
.bg-editor .be-dismiss svg {width:16px;height:16px}
.bg-editor .be-alert {left:50%;right:auto;bottom:12px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 20px);padding:8px 12px;font-size:14px;line-height:1.4;margin:0;pointer-events:none}
@media (max-height:500px) and (orientation:landscape) {
  .bg-editor .be-bar {padding-block:4px}
  .bg-editor .be-circle {width:37px;height:37px}
  .bg-editor .be-help-button {height:37px}
  .bg-editor .be-controls {max-width:1000px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:12px;padding-block:3px}
  .bg-editor .be-options {margin:0}
  .bg-editor .be-tools button {min-height:36px}
  .bg-editor .be-move {width:54px;height:54px;top:8px}
}
@media (max-width:348px) {
  .bg-editor .be-bar {gap:4px;padding-inline:7px}
  .bg-editor .be-circle {width:39px;height:39px}
  .bg-editor .be-options {grid-template-columns:32px minmax(0,1fr) 35px 35px;gap:4px}
}
