/* Studio: one navigation, a quiet work surface, contextual node settings. */
body{background:#090d15!important;background-image:none!important;color:#e6edf7;font-family:Jost,'Yu Gothic',Meiryo,sans-serif}
body::before,body::after{display:none!important}.shell{max-width:none!important;padding:0 22px 40px!important}.top{min-height:80px!important;margin:0 -22px 0;padding:12px 24px!important;background:linear-gradient(90deg,#263746,#172432 20%,#101722 55%,#0b1019);border-bottom:1px solid #9bafd324;gap:18px!important}.brand img.brand-lockup{width:48px;height:48px;object-fit:contain;border-radius:11px}.top .profile-control{display:none!important}.top .project-picker{margin-right:auto}.top .top-actions{margin-left:0!important}.cinovex-workspace{display:block!important;margin:0!important;padding:0!important}.production-nav{display:none!important}.production-main{min-width:0!important;padding:0!important}.production-heading{display:none!important}.living-storyboard{margin:0!important;padding:0!important;background:none!important}.living-storyboard::before,.living-storyboard::after{display:none!important}.living-storyboard button{box-shadow:none}.studio-heading{display:flex;align-items:center;gap:12px;padding:18px 0 14px;border-bottom:1px solid #8ea6cb25}.studio-heading .living-modes{display:flex!important;gap:4px;background:#101826;border:1px solid #829dc82c;border-radius:10px;padding:4px;width:auto!important;max-width:none;margin:0 auto 0 0!important}.studio-heading .living-modes button{padding:9px 18px!important;min-height:40px;border:0!important;background:none!important;border-radius:7px!important;font-size:14px!important;color:#92a5bf;flex:none!important;min-width:0!important}.studio-heading .living-modes button.selected{background:#25394f!important;color:#f0f6ff!important;box-shadow:inset 0 0 0 1px #7eb8ec55}.studio-heading>button{font-size:13px!important;border-radius:8px!important;background:#111d2c;padding:9px 15px;min-height:38px}.studio-shot-summary{display:flex;align-items:center;gap:18px;padding:12px 0}.studio-shot-summary select{max-width:360px;background:#121b28;border:1px solid #8ba1c033;padding:9px 13px;border-radius:7px;color:#e3ebf7;font-size:14px}.studio-shot-summary>span{color:#8fa1bb;font-size:13px}.studio-shot-summary>button{margin-left:auto;font-size:13px!important;background:#172437;border-radius:7px}.living-message{margin:0!important;min-height:0!important;font-size:13px!important;color:#b6cbe5!important}.living-message:empty{display:none}.living-message:not(:empty){padding:8px 12px;background:#172a40;border-radius:7px;margin-bottom:10px!important}.studio-canvas-layout{width:100%;min-width:0}.studio-canvas{position:relative;overflow:hidden;border:1px solid #889fc330;border-radius:12px;background:#0d131d}.studio-canvas-toolbar{display:flex;align-items:center;gap:6px;padding:10px 14px;background:#111a27;border-bottom:1px solid #8ba1c022;min-height:60px;flex-wrap:wrap}.studio-canvas-toolbar>button,.studio-canvas-toolbar>select{background:#192435;border:1px solid #7894b933;border-radius:7px;padding:8px 13px;color:#dce7f6;font-size:13px!important;min-height:36px}.studio-canvas-toolbar>[data-pipeline-run]{margin-left:auto;background:#4569d8;color:white;border-color:#6e8cf2}.studio-canvas-toolbar>[data-pipeline-stop]{background:#512d39}.studio-viewport{height:calc(100dvh - 305px);min-height:480px;max-height:1100px;position:relative;overflow:hidden;touch-action:none;background-color:#0b111a;background-image:radial-gradient(#7185a42e .8px,transparent .8px);background-size:22px 22px;cursor:grab}.studio-world{position:absolute;left:0;top:0;width:0;height:0;transform-origin:0 0}.studio-edges{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible;pointer-events:none}.studio-edge{fill:none;stroke:#74bbdf;stroke-width:3;pointer-events:stroke;cursor:pointer}.studio-edge.text{stroke:#b19ce5}.studio-edge.video{stroke:#79cba7}.studio-edge.selected{stroke:#f0dd9a;stroke-width:6}.studio-node{position:absolute;width:310px;background:#172130;border:1px solid #6e87a94d;border-radius:11px;box-shadow:0 5px 14px #0003;overflow:visible;cursor:default}.studio-node.selected{border-color:#89b6ed;box-shadow:0 0 0 1px #89b6ed55,0 5px 14px #0004}.studio-node>header{padding:12px 15px;background:#1d2a3c;border-bottom:1px solid #6e87a92b;border-radius:10px 10px 0 0;display:flex;align-items:center;gap:10px;cursor:grab;touch-action:none}.studio-node>header small{font-size:11px;color:#90aacd;font-weight:500;white-space:nowrap}.studio-node>header strong{font-size:16px;color:#e5efff}.studio-node-body{padding:12px 15px}.studio-node-body img,.studio-node-body video{width:100%;max-height:175px;object-fit:contain;border-radius:6px;display:block;background:#080c13}.studio-node-body .living-image{height:155px;aspect-ratio:16/9;border:0}.studio-node-body .living-media-meta{font-size:11px!important}.studio-node-text{white-space:pre-wrap;font-size:15px!important;line-height:1.8!important;color:#ccd9eb;margin:0;max-height:none;overflow:visible}
.studio-node.is-text{min-width:310px;max-width:720px;max-height:80vh;overflow:visible;display:flex;flex-direction:column}
.studio-node.is-text .studio-node-body{flex:1;min-height:0;overflow:auto}
.studio-node.is-text .studio-node-text{max-height:none;overflow:visible;height:auto}
.studio-node.is-text>footer{overflow:visible;flex:none}
.studio-node-resize{position:absolute;right:2px;bottom:2px;width:14px;height:14px;cursor:nwse-resize;opacity:.55;background:linear-gradient(135deg,transparent 50%,#8aa7c8 50%);border-radius:0 0 8px 0;z-index:3}
.studio-node-resize:hover{opacity:1}
.studio-canvas-generate{position:absolute;bottom:18px;right:16px;z-index:9;display:inline-flex;align-items:center;gap:8px;padding:11px 18px;border:0;border-radius:999px;background:linear-gradient(110deg,#7656d9,#5a6fe6 45%,#257eae);color:#fff;font-size:13px;font-weight:700;cursor:pointer;box-shadow:0 8px 26px rgba(98,92,232,.45)}
.studio-canvas-generate:disabled{opacity:.55;cursor:default}
.studio-canvas-generate:not(:disabled):hover{filter:brightness(1.08)}
/* living-primary の position:relative（シマー用）が flex 親で横伸びするので、FAB は absolute を強制 */
:root:not(#_) .studio-canvas-generate.living-primary,:root:not(#_) .studio-canvas-generate{position:absolute!important;inset:auto 16px 18px auto!important;width:auto!important;max-width:none;flex:none;align-self:auto;left:auto;top:auto}
.studio-minimap{bottom:72px!important}.studio-node-empty{height:110px;display:grid;place-content:center;color:#7086a2;border:1px dashed #7690b33b;border-radius:6px;font-size:14px}.studio-node-meta{color:#9eafc5;font-size:12px!important;margin:9px 0 0}.studio-node-state{font-size:12px;color:#8ed7be;display:block;padding-top:8px}.studio-node-inputs{display:flex;gap:10px 15px;flex-wrap:wrap;padding:10px 15px 0}.studio-port-row{display:flex;align-items:center;gap:6px;font-size:11px;color:#a5b8d2}.studio-port{width:15px!important;height:15px!important;min-height:15px!important;min-width:15px!important;border:2px solid #74bbdf!important;border-radius:50%!important;background:#102232!important;padding:0!important;box-shadow:none!important;cursor:crosshair!important}.studio-port.text{border-color:#b19ce5!important;background:#291f38!important}.studio-port.video{border-color:#79cba7!important;background:#1c322a!important}.studio-port.compatible{outline:3px solid #fff8;outline-offset:2px}.studio-node>footer{display:flex;align-items:center;gap:7px;padding:10px 15px;border-top:1px solid #7894b922}.studio-node>footer button:not(.studio-port){font-size:12px!important;background:#243750;border-radius:6px!important;min-height:32px;padding:7px 9px;border:1px solid #7da6db3a}.studio-node>footer .studio-port{margin-left:auto}.studio-node-run{color:#bfdaff}.studio-inspector{position:absolute;right:12px;top:72px;width:300px;max-height:calc(100% - 125px);overflow:auto;background:#131d2cf5;border:1px solid #8ba1c04a;border-radius:9px;padding:15px;box-shadow:0 8px 25px #0005;z-index:5;scrollbar-width:thin}.studio-inspector[hidden]{display:none!important}.studio-inspector>header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.studio-inspector>header strong{font-size:15px}.studio-inspector label{display:block;font-size:12px;color:#a9bdd7;margin:14px 0}.studio-inspector label>span{display:block;margin-bottom:7px}.studio-inspector input:not([type=checkbox]),.studio-inspector select,.studio-inspector textarea{width:100%;background:#0a121e;border:1px solid #8099bf3d;border-radius:6px;color:#e0ebfa;padding:9px 10px;font:inherit;box-sizing:border-box}.studio-inspector textarea{min-height:110px;resize:vertical;line-height:1.7}.studio-inspector>button{display:block;width:100%;text-align:left;margin:8px 0;font-size:12px!important;background:#1c2c43;padding:10px;border-radius:6px!important;border:1px solid #839dc02a}.studio-inspector>button.living-primary{background:#4569d8}.studio-inspector h3{font-size:13px}.studio-connection-row{font-size:11px;display:flex;justify-content:space-between;align-items:center;gap:8px;margin:6px 0;color:#a7bbd5}.studio-connection-row button{font-size:11px!important;padding:5px;min-height:24px}.studio-canvas-status{margin:0;padding:9px 15px;border-top:1px solid #8ba1c022;font-size:12px!important;color:#95abc7!important;min-height:36px;background:#101925}.creation-dock{display:none!important}body.studio-running .top .project-picker{pointer-events:none;opacity:.6}.studio-delivery{max-width:min(1600px,100%);margin:24px auto;padding:0 12px;box-sizing:border-box}.studio-delivery h1{font-size:30px}.studio-delivery>p{font-size:14px;color:#a6b9d4}.studio-delivery-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:24px 0}.studio-delivery-list article{padding:10px;background:#121c2a;border:1px solid #6d87ae33;border-radius:10px;display:flex;flex-direction:column;gap:6px;min-width:0}.studio-delivery-list .living-image{height:auto;aspect-ratio:16/9;width:100%}.studio-delivery-list strong{font-size:12px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.studio-delivery-list span{font-size:12px;color:#a5bbd7}.studio-delivery-actions{display:flex;gap:12px;margin-top:20px;flex-wrap:wrap}.studio-delivery-actions button{font-size:14px!important;padding:13px 18px;border-radius:8px;background:#21354e}.studio-delivery-actions .living-primary{background:#4569d8}.studio-settings-dialog,.studio-documents{width:min(1000px,calc(100vw - 40px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #7895bd66;border-radius:14px;background:#111b29;color:#e2edff;overflow:auto}.studio-settings-dialog::backdrop,.studio-documents::backdrop{background:#0009;backdrop-filter:blur(5px)}.studio-settings-dialog>header,.studio-documents>header{position:sticky;top:0;z-index:20;background:#172438;display:flex;justify-content:space-between;align-items:center;padding:16px 22px;border-bottom:1px solid #7d96bd33;font-size:18px}.studio-settings-dialog h2{font-size:20px;margin:0}.studio-settings-dialog>footer{position:sticky;bottom:0;background:#172438;padding:15px 22px;display:flex;justify-content:space-between;align-items:center;gap:12px;z-index:20}.studio-settings-dialog>footer button,.studio-documents>button{padding:12px 20px;background:#4569d8;color:white;border:0;border-radius:8px}.studio-settings-body,.studio-documents-body{padding:22px}.studio-settings-body .workspace{display:block!important;background:none}.studio-settings-body .side,.studio-settings-body .kind-top,.studio-settings-body .run-plan,.studio-settings-body .generation-destination,.studio-settings-body .draft-route,.studio-settings-body .composer .bar,.studio-settings-body .project-generator-heading{display:none!important}.studio-settings-body .controls{display:block!important;width:100%;border:0!important;background:none!important}.studio-settings-body .control-main{max-height:none!important;overflow:visible!important}.studio-settings-body #engineList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.studio-settings-body .composer{padding:0!important;background:none!important}.studio-settings-body .frames-panel{margin-bottom:20px}.studio-settings-body .frames{max-width:650px}.studio-documents .story-dna-editor{max-height:none}.studio-documents label{display:block;margin:16px 0}.studio-documents textarea{width:100%;background:#0a1422;border:1px solid #88a4ce44;padding:12px;color:#e0ebfc;box-sizing:border-box}.guest-banner{opacity:.95;transform:scale(.9);transform-origin:bottom left}.living-cards{background:none!important}.living-card{background:#121d2b!important;box-shadow:none!important;backdrop-filter:none!important}.living-card.selected{background:#182940!important}.living-inspector,.living-review-choices{background:#121d2b!important}.living-board-edges{opacity:.3}.living-intro{display:none!important}.living-filmstrip{margin-top:24px}.living-cinema{background:#070b12!important}.living-badge{font-size:11px!important}.living-primary{background:#4569d8!important;border-color:#7894e8!important}
@media(max-width:1000px){.studio-heading{flex-wrap:wrap}.studio-heading .living-modes{max-width:100%;overflow:auto}.studio-heading .living-modes button{padding:8px 12px!important}.studio-inspector{width:260px}.top{flex-wrap:wrap!important}.studio-delivery-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.shell{padding:0 10px 90px!important}.top{margin:0 -10px!important;padding:10px 12px!important;gap:10px!important}.brand img.brand-lockup{width:40px;height:40px;object-fit:contain;border-radius:9px}.top .project-picker{max-width:calc(100% - 150px)}.top .project-picker select{max-width:150px}.top .top-actions{display:none!important}.studio-heading{gap:7px;padding:10px 0}.studio-heading .living-modes{width:100%!important;margin:0!important}.studio-heading .living-modes button{font-size:12px!important;padding:7px 9px!important}.studio-shot-summary{gap:8px;flex-wrap:wrap}.studio-shot-summary>span{font-size:11px}.studio-shot-summary select{max-width:65%}.studio-canvas-toolbar{gap:5px;padding:8px}.studio-canvas-toolbar>button,.studio-canvas-toolbar>select{font-size:11px!important;padding:7px 9px}.studio-viewport{height:560px;min-height:400px}.studio-inspector{width:min(270px,calc(100% - 24px));top:100px;max-height:calc(100% - 150px)}.studio-delivery-list{grid-template-columns:1fr}.studio-settings-body #engineList{grid-template-columns:1fr}.studio-settings-dialog,.studio-documents{width:calc(100vw - 12px);max-height:calc(100dvh - 12px)}.studio-settings-body{padding:12px}.guest-banner{max-width:calc(100vw - 20px);font-size:10px}.guest-banner>div span{font-size:9px}}
.studio-node.multi-selected{border-color:#c3b1ff;outline:2px solid #a997f477;outline-offset:3px}.studio-welcome{max-width:800px;margin:14vh auto;padding:40px;border:1px solid #7799c633;border-radius:14px;background:#111d2b}.studio-welcome h1{font-size:36px}.studio-welcome p{color:#a5bddb}.studio-welcome button{padding:13px 22px;background:#4569d8;border:0;border-radius:8px;color:white}

/* Inputs sit on the left boundary, outputs on the right: no wires behind cards. */
.studio-node-inputs{display:flex;flex-direction:column;gap:8px;padding:12px 15px 0}.studio-port-row{position:relative;min-height:18px;padding-left:8px}.studio-port-row>.studio-port.input{position:absolute;left:-23px;top:1px;z-index:2}.studio-node>footer{position:relative;padding-right:24px}.studio-node>footer>.studio-port.output{position:absolute;right:-8px;top:calc(50% - 8px);z-index:2}.studio-port.connected{background:currentColor!important;box-shadow:0 0 0 3px #0b111a}.studio-port.text{color:#b19ce5}.studio-port.image{color:#74bbdf}.studio-port.video{color:#79cba7}.studio-port.connection-focus{outline:3px solid #f0dd9a!important;outline-offset:3px}.studio-edge{stroke-linejoin:round;stroke-linecap:round;stroke-width:3;vector-effect:non-scaling-stroke}.studio-edge.hovered,.studio-edge.selected{stroke:#f0dd9a;stroke-width:5}.studio-edges{z-index:0;pointer-events:none}.studio-node{z-index:2}.studio-node.selected,.studio-node.multi-selected{z-index:3}
.studio-edge{pointer-events:stroke}
.studio-viewport,.studio-world,.studio-node,.studio-node-group,.studio-edges{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.studio-inspector input,.studio-inspector textarea,.studio-inspector select{-webkit-user-select:text;user-select:text}
.studio-canvas.is-panning,.studio-canvas.is-panning *{-webkit-user-select:none!important;user-select:none!important;cursor:grabbing!important}
.studio-canvas.is-wiring .studio-edges{z-index:0}
.studio-canvas.is-wiring .studio-node{opacity:.72;z-index:2}
.studio-canvas.is-wiring .studio-port.compatible,.studio-canvas.is-wiring .studio-port.wiring-source{opacity:1;z-index:7}
.studio-edge-preview{stroke-dasharray:8 6;stroke-width:3.5;opacity:.95;pointer-events:none!important;animation:studio-wire-dash .7s linear infinite}
@keyframes studio-wire-dash{to{stroke-dashoffset:-28}}
.studio-port.wiring-source{outline:3px solid #f0dd9a!important;outline-offset:3px;transform:scale(1.25)}
.studio-port.compatible{outline:3px solid #fff!important;outline-offset:3px;box-shadow:0 0 0 6px #79cba744,0 0 16px #79cba688!important;animation:studio-port-pulse 1s ease-in-out infinite}
.studio-port.compatible.text{box-shadow:0 0 0 6px #b19ce544,0 0 16px #b19ce588!important}
.studio-port.compatible.image{box-shadow:0 0 0 6px #74bbdf44,0 0 16px #74bbdf88!important}
@keyframes studio-port-pulse{50%{transform:scale(1.2)}}
.studio-port-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#a5b8d2;line-height:1.2}
.studio-port-label>em{font-style:normal;font-size:10px;font-weight:700;letter-spacing:.02em;padding:1px 6px;border-radius:999px;border:1px solid currentColor;opacity:.95}
.studio-port-label.text,.studio-port-out-badge.text{color:#c4b0ef}
.studio-port-label.image,.studio-port-out-badge.image{color:#8ec8ef}
.studio-port-label.video,.studio-port-out-badge.video{color:#8ed9b8}
.studio-port-out-badge{margin-left:auto;margin-right:18px;font-size:10px;font-weight:700;padding:2px 7px;border-radius:999px;border:1px solid currentColor;opacity:.9;white-space:nowrap}
.studio-port-legend{display:inline-flex;align-items:center;gap:10px;margin-left:8px;padding:4px 10px;border-radius:999px;background:#0c1520;border:1px solid #7894b933;font-size:11px;color:#9eb2cc}
.studio-port-legend-item{display:inline-flex;align-items:center;gap:5px}
.studio-port-legend-item>i{width:9px;height:9px;border-radius:50%;border:2px solid currentColor;display:inline-block}
.studio-port-legend-item.text{color:#b19ce5}.studio-port-legend-item.image{color:#74bbdf}.studio-port-legend-item.video{color:#79cba7}
@media(max-width:900px){.studio-port-legend{display:none}}
/* 生成ノードのスキルの組み合わせ */
.node-skills{display:grid;gap:8px;margin:6px 0 4px;padding:12px;border:1px solid #8f7bff40;border-radius:12px;background:linear-gradient(135deg,#7656d91f,#257eae14)}
.node-skills h3{margin:0;font-size:13px}
.node-skills-note{margin:0;font-size:12px;line-height:1.5;color:#b9c3dc}
.node-skills-chips{display:flex;flex-wrap:wrap;gap:6px}
.node-skills-empty{font-size:12px;color:#8e98b3}
.node-skills-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 4px 4px 10px;border-radius:999px;border:1px solid #9b7bff66;background:#140f2bcc;font-size:12px;color:#eef2ff}
.node-skills-chip small{font-size:12px;color:#a996ff}
.node-skills-chip.is-unused{opacity:.55}
.studio-inspector .node-skills-remove{flex:none;width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:#ffffff14!important;color:#dfe5f7!important;font-size:13px!important;line-height:24px!important;box-shadow:none!important;cursor:pointer}
.studio-inspector .node-skills-remove:hover,.studio-inspector .node-skills-remove:focus-visible{background:#ffffff2e!important}
.node-skills-add{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
.node-skills-add select:nth-child(2){grid-column:1}
.node-skills-add select{min-width:0;width:100%;font-size:12px}
.node-skills-add select:first-child{grid-column:1/-1}
.studio-inspector .node-skills-button{width:auto!important;margin:0!important;padding:6px 14px!important;border:0!important;border-radius:8px!important;background:linear-gradient(135deg,#7656d9,#257eae)!important;color:#fff!important;font-size:12px!important;font-weight:700;cursor:pointer}
.studio-inspector .node-skills-button:disabled{opacity:.45;cursor:default}
