:root{color:#15232e;background:#eef2f5;font-family:Inter,Segoe UI,Hiragino Sans,Yu Gothic UI,Meiryo,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}button,input,select{font:inherit}button,select,input[type=number]{border:1px solid #b9c6d1;border-radius:6px;background:#fff;color:#17232d}button{cursor:pointer}button:hover:not(:disabled){border-color:#0f766e;color:#0f766e}button:disabled{cursor:not-allowed;opacity:.45}.app-shell{width:min(1480px,100%);min-height:100vh;margin:0 auto;padding:18px 24px 24px}.app-header{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:4px 0 14px}.app-header h1{margin:0;color:#0e1720;font-size:28px;letter-spacing:0}.app-meta{color:#64717f;font-size:13px;font-weight:800}.studio-layout{--map-size: min(60vh, 680px);display:grid;grid-template-columns:280px var(--map-size) minmax(260px,280px);grid-template-rows:auto minmax(0,1fr);gap:4px;align-items:start}.x-editor{grid-column:2;grid-row:1;min-width:0}.y-editor{grid-column:1;grid-row:2;min-width:0}.preview-stage{grid-column:2;grid-row:2;min-width:0}.control-panel{grid-column:3;grid-row:1 / 3;position:sticky;top:16px}.curve-panel,.control-panel,.preview-panel{border:1px solid #d6dee6;border-radius:8px;background:#fff;box-shadow:0 8px 20px #0f172a0d}.curve-panel{display:grid;gap:0;overflow:hidden}.curve-panel-y{height:100%}.curve-panel-y .panel-head,.curve-panel-y .preset-select{align-items:stretch;grid-template-columns:1fr}.curve-panel-y .panel-head{display:grid}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:12px 14px}.panel-head h2,.settings-group h2{margin:0;color:#17232d;font-size:16px;letter-spacing:0}.panel-head span{color:#667585;font-weight:800}.preview-head{display:grid;grid-template-columns:auto minmax(220px,320px) auto;margin-bottom:12px}.preset-select,.mirror-select,.settings-group label{display:grid;gap:6px;color:#354352;font-weight:700}.preset-select{align-items:center;grid-template-columns:auto minmax(120px,150px);gap:8px}.preset-select span,.mirror-select span,.tool-cluster>span{color:#64717f;font-size:11px;font-weight:800}.preset-select select,.mirror-select select{min-height:32px;padding:4px 28px 4px 8px}.curve-canvas{display:block;width:100%;height:auto;aspect-ratio:520 / 210;border:0;border-top:1px solid #dce4ec;border-radius:0;background:#f8fafc;touch-action:none}.curve-canvas-vertical{width:auto;height:calc(var(--map-size) - 2px);margin-left:auto;margin-right:0;aspect-ratio:210 / 520;border-top:0;border-left:1px solid #dce4ec}.rule-strip{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:end;min-width:0;border-top:1px solid #edf2f7;padding:10px 14px 12px}.curve-panel-y .rule-strip{grid-template-columns:1fr;align-items:stretch;gap:8px}.curve-panel-y .mirror-select{grid-template-columns:1fr}.curve-panel-y .mirror-select select{width:100%}.preset-actions{display:grid;grid-template-columns:auto auto;gap:6px;min-width:0}.curve-panel-y .preset-actions{grid-template-columns:minmax(0,1fr) auto}.preset-actions button{min-height:32px;padding:0 10px;min-width:0;white-space:nowrap}.loop-toggle{display:flex;align-items:center;gap:7px;min-height:32px;color:#354352;font-weight:700}.loop-toggle input{width:16px;height:16px;accent-color:#0f766e}.control-panel{display:grid;gap:16px;padding:16px}.settings-group{display:grid;gap:12px}.settings-group input[type=number]{width:100%;min-height:36px;padding:6px 10px}.settings-group input[type=range]{width:100%;accent-color:#0f766e}.file-input{display:none}fieldset{min-width:0;margin:0;border:0;padding:0}legend{margin-bottom:8px;color:#354352;font-weight:700}.segmented,.map-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.segmented button,.map-tabs button,.primary-action,.settings-group>button{min-height:36px;padding:0 10px}.segmented button.active,.map-tabs button.active{border-color:#0f766e;background:#d5f6ee;color:#134e4a;font-weight:800}.map-status{color:#64717f;font-size:13px;font-weight:800}.primary-action{border-color:#0f766e;background:#0f766e;color:#fff;font-weight:800}.primary-action:hover{border-color:#115e59;background:#115e59;color:#fff}.preview-panel{min-width:0;overflow:hidden;padding:0}.map-panel{display:grid;gap:0}.preview-frame{width:100%}.preview-canvas{display:block;width:100%;height:auto;aspect-ratio:1;border:0;border-radius:0;background:#111827;image-rendering:pixelated}.hidden-canvas{display:none}.point-menu{position:fixed;z-index:50;display:grid;min-width:150px;gap:4px;border:1px solid #b9c5cf;border-radius:8px;background:#fff;box-shadow:0 12px 28px #0f172a2e;padding:6px}.point-menu button{min-height:32px;border:0;padding:0 10px;text-align:left}.point-menu button:hover:not(:disabled){background:#eef7f5}@media(max-width:1180px){.studio-layout{--map-size: min(60vh, 640px, calc(100vw - 288px) );grid-template-columns:240px var(--map-size);grid-template-rows:auto minmax(0,1fr) auto}.x-editor{grid-column:2;grid-row:1}.y-editor{grid-column:1;grid-row:2}.preview-stage{grid-column:2;grid-row:2}.control-panel{grid-column:1 / -1;grid-row:3;position:static;grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:760px){.app-shell{padding:14px}.app-header{align-items:flex-start;flex-direction:column;gap:4px}.app-header h1{font-size:25px}.studio-layout{--map-size: calc(100vw - 28px) ;grid-template-columns:1fr}.x-editor,.y-editor,.preview-stage,.control-panel{grid-column:1;grid-row:auto}.x-editor{order:1}.preview-stage{order:2}.y-editor{order:3}.control-panel{order:4}.panel-head,.preview-head{align-items:stretch;grid-template-columns:1fr}.preset-select,.control-panel{grid-template-columns:1fr}.curve-canvas-vertical{width:min(100%,210px);height:auto}.preview-frame{width:100%}.rule-strip{grid-template-columns:1fr}.preset-actions{grid-template-columns:1fr 1fr}}
