.scw-app{--navy:#132a52;--blue:#3673ef;--purple:#7657e8;--bg1:#e8f1ff;--bg2:#eee9ff;--ink:#17233d;--muted:#66728b;--card:#fff;--line:#d9e2f2;--yellow:#ffd85c}
  .scw-app,.scw-app *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
  .scw-app{position:relative;margin:0;width:100%;min-height:100%;font-family:"Noto Sans JP","Yu Gothic",sans-serif;color:var(--ink);background:linear-gradient(135deg,var(--bg1),var(--bg2));overflow-x:hidden}
  .scw-app button{font:inherit;color:inherit;cursor:pointer}
  .scw-app{min-height:100dvh;display:flex;flex-direction:column}
  .scw-app .scw-header{height:64px;background:var(--navy);color:white;display:flex;align-items:center;padding:0 18px;gap:14px;box-shadow:0 4px 14px #132a5230;z-index:5}
  .scw-app .scw-title{font-size:22px;margin:0;letter-spacing:.04em;white-space:nowrap}
  .scw-app .badge{font-size:12px;background:#ffffff25;border:1px solid #ffffff42;border-radius:99px;padding:5px 9px}
  .scw-app .head-actions{margin-left:auto;display:flex;gap:8px}
  .scw-app .icon-btn{width:42px;height:42px;border:0;border-radius:50%;background:#ffffff18;color:#fff;font-size:21px}
  .scw-app .scw-main{flex:1;display:block;padding:14px;min-height:0}
  .scw-app .stage-card{height:100%;min-height:calc(100dvh - 92px);background:var(--card);border-radius:22px;box-shadow:0 10px 32px #324b7d1a;border:1px solid #fff}
  .scw-app .stage-card{position:relative;display:flex;flex-direction:column;overflow:hidden}
  .scw-app .stage-top{height:54px;display:flex;align-items:center;padding:8px 12px;border-bottom:1px solid var(--line);gap:8px}
  .scw-app .status{font-weight:800;white-space:nowrap}.scw-app .status small{font-weight:500;color:var(--muted);margin-left:7px}
  .scw-app [data-scw="scene"]{flex:1;min-height:360px;width:100%;touch-action:none;background:radial-gradient(circle at 50% 46%,#fff 0,#f8faff 58%,#edf2fb 100%)}
  .scw-app .hint{position:absolute;left:16px;bottom:14px;background:#fffdf2e8;border:1px solid #f0d985;border-radius:12px;padding:7px 11px;font-size:13px;font-weight:700;pointer-events:none}
  .scw-app .cut-layer{position:absolute;inset:54px 0 0;z-index:3;background:transparent;display:none;overflow:hidden}
  .scw-app .cut-layer.open{display:grid}
  .scw-app .cut-layer-top,.scw-app .cut-layer-bottom{position:absolute;left:0;right:0;z-index:2;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:10px 12px;background:linear-gradient(#f8faffee,#f8faffc8);backdrop-filter:blur(3px)}
  .scw-app .cut-layer-top{top:0}.scw-app .cut-layer-bottom{bottom:0;background:linear-gradient(#f8faffc8,#f8faffee)}
  .scw-app .cut-layer-title{font-weight:900;margin-right:8px}
  .scw-app .grid-wrap{position:absolute;inset:0;overflow:hidden;background:radial-gradient(circle at 50% 46%,#fff 0,#f8faff 58%,#edf2fb 100%);touch-action:none}
  .scw-app [data-scw="cutGrid"]{width:100%;height:100%;display:block}
  .scw-app .point-state{min-width:190px;text-align:center;font-size:13px;font-weight:800;color:var(--muted)}
  .scw-app .cut-go{border:0;border-radius:13px;padding:11px 18px;background:#ef545c;color:#fff;font-weight:900}
  .scw-app .cut-go:disabled{opacity:.38}
  .scw-app .direction-go{border:0;border-radius:13px;padding:11px 18px;background:linear-gradient(135deg,#3673ef,#7657e8);color:#fff;font-weight:900;box-shadow:0 5px 14px #5266db35}
  .scw-app .cut-layer-bottom [hidden]{display:none!important}
  .scw-app .tool-rail{position:absolute;right:18px;bottom:18px;z-index:4;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
  .scw-app .tool-rail[hidden]{display:none!important}
  .scw-app .tool-btn{width:56px;height:56px;border:2px solid #dce4f2;border-radius:50%;background:#fff;color:var(--navy);box-shadow:0 7px 18px #263d6b2b;font-size:24px;font-weight:900;display:grid;place-items:center;position:relative;transition:transform .15s,background .15s,border-color .15s}
  .scw-app .tool-btn:hover{transform:translateY(-2px)}
  .scw-app .tool-btn:focus-visible{outline:4px solid #8bb5ff;outline-offset:2px}
  .scw-app .tool-btn.primary{background:linear-gradient(135deg,#ffd85c,#ffb930);border-color:#fff0ae;color:#5a3b00}
  .scw-app .tool-btn.danger{color:#d64b55}
  .scw-app .tool-btn.active{background:linear-gradient(135deg,var(--blue),var(--purple));border-color:#d8d0ff;color:#fff;box-shadow:0 8px 20px #5266db55}
  .scw-app .tool-btn:disabled{opacity:.38;transform:none;box-shadow:none;cursor:not-allowed}
  .scw-app .tool-btn::before{content:attr(data-label);position:absolute;right:66px;top:50%;transform:translateY(-50%);white-space:nowrap;border-radius:10px;background:#17233dee;color:#fff;padding:6px 9px;font-size:12px;font-weight:800;opacity:0;pointer-events:none;transition:.15s}
  .scw-app .tool-btn:hover::before,.scw-app .tool-btn:focus-visible::before{opacity:1}
  .scw-app .tool-btn.word{font-size:13px;line-height:1.1;letter-spacing:.02em}
  .scw-app .tool-btn.zoom{font-size:28px;line-height:1}
  .scw-app .secondary{border:1px solid var(--line);border-radius:13px;background:#f6f8fc;font-weight:800;padding:11px}
  .scw-app .toast{position:fixed;left:50%;bottom:25px;transform:translate(-50%,20px);background:#17233deF;color:#fff;padding:11px 18px;border-radius:99px;font-weight:800;opacity:0;pointer-events:none;transition:.25s;z-index:20}.scw-app .toast.show{opacity:1;transform:translate(-50%,0)}
  .scw-app .solid-picker{position:absolute;inset:0;z-index:30;display:none;align-items:flex-start;justify-content:center;padding:78px 18px 22px;background:linear-gradient(135deg,#eaf2ffed,#eeeaffed);backdrop-filter:blur(5px);overflow:auto}
  .scw-app .solid-picker.open{display:flex}
  .scw-app .solid-picker-panel{width:min(1100px,100%);background:#fff;border:1px solid #d7e2f2;border-radius:24px;padding:22px;box-shadow:0 18px 50px #233d6b28}
  .scw-app .solid-picker-panel h2{margin:0 0 18px;text-align:center;color:var(--navy);font-size:23px}
  .scw-app .solid-picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
  .scw-app .solid-choice{min-width:0;border:2px solid #cbd9ec;border-radius:18px;background:#fff;padding:10px 10px 13px;font-weight:900;font-size:18px;overflow:hidden;transition:transform .15s,border-color .15s,box-shadow .15s}
  .scw-app .solid-choice svg{display:block;width:100%;height:112px;margin-bottom:4px;background-color:#fbfdff;background-image:linear-gradient(#e9f0f8 1px,transparent 1px),linear-gradient(90deg,#e9f0f8 1px,transparent 1px);background-size:20px 20px;border-radius:10px}
  .scw-app .solid-choice:hover{transform:translateY(-3px);border-color:#4a91eb;box-shadow:0 10px 22px #315b9830}
  .scw-app .solid-choice:focus-visible{outline:4px solid #8bb5ff;outline-offset:2px;border-color:#3673ef}
  @media(max-width:900px){.scw-app .solid-picker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
  @media(max-width:620px){.scw-app .solid-picker{padding:68px 8px 12px}.scw-app .solid-picker-panel{padding:14px;border-radius:18px}.scw-app .solid-picker-panel h2{font-size:20px;margin-bottom:12px}.scw-app .solid-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.scw-app .solid-choice{font-size:15px;padding:6px 6px 10px}.scw-app .solid-choice svg{height:92px}}
  @media(max-width:820px){.scw-app .scw-header{height:58px;padding:0 10px}.scw-app .scw-title{font-size:18px}.scw-app .badge{display:none}.scw-app .scw-main{padding:8px}.scw-app .stage-card{min-height:calc(100dvh - 74px)}.scw-app .cut-layer-title{width:100%;text-align:center}.scw-app .point-state{min-width:150px;font-size:12px}.scw-app .tool-rail{right:12px;bottom:12px;gap:8px}.scw-app .tool-btn{width:52px;height:52px;font-size:22px}}
  @media(prefers-reduced-motion:reduce){.scw-app .tool-btn,.scw-app .toast{transition:none}}

/* WordPress埋め込み時も作業画面を端末内へ収める */
.scw-app{
  width:100%;
  height:100vh;
  height:100dvh;
  min-height:0;
  overflow:hidden;
  isolation:isolate;
}
.scw-app .scw-main{min-height:0}
.scw-app .stage-card{height:100%;min-height:0}
body.admin-bar .scw-app{
  height:calc(100vh - 32px);
  height:calc(100dvh - 32px);
}
@media(max-width:782px){
  body.admin-bar .scw-app{
    height:calc(100vh - 46px);
    height:calc(100dvh - 46px);
  }
}
