@import url('fonts.css');
:root{--ink:#16312b;--muted:#687970;--line:#dce5de;--accent:#c6f542;--blue:#4268e5}*{box-sizing:border-box}body{margin:0;background:#e9eee9;color:var(--ink);font:14px/1.5 Pretendard,'Malgun Gothic',sans-serif;height:100vh;overflow:hidden}button,input,select,textarea{font:inherit}button{border:1px solid var(--line);border-radius:8px;padding:8px 11px;background:white;color:var(--ink);cursor:pointer;white-space:nowrap}button:hover{background:#f0f5ee;border-color:#b7cbb9}button:disabled{opacity:.38;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #5278e2;outline-offset:2px}.primary{background:var(--ink);color:white;border-color:var(--ink)}.primary:hover{background:#315849}.danger{color:#a03434}.editor-top{height:70px;background:white;display:flex;align-items:center;gap:18px;padding:0 22px;border-bottom:1px solid var(--line)}.editor-brand{font-size:19px;font-weight:750;text-decoration:none;color:var(--ink);white-space:nowrap}#deck-name{border:0;background:#f5f7f4;padding:8px 12px;border-radius:7px;width:200px;font-weight:600}#save-status{font-size:12px;color:var(--muted);min-width:100px}.top-actions{margin-left:auto;display:flex;gap:8px}.editor-workspace{display:grid;grid-template-columns:210px minmax(350px,1fr) 264px;height:calc(100vh - 70px)}.slide-rail,.properties{background:#fff;overflow:auto;padding:20px 16px}.slide-rail{border-right:1px solid var(--line)}.rail-heading{display:flex;justify-content:space-between;padding-bottom:14px}.slide-item{width:100%;margin-bottom:14px;padding:8px;border:2px solid transparent;background:#f7f9f6;white-space:normal;text-align:left}.slide-item[aria-current=true]{border-color:var(--blue);background:#edf2ff}.slide-thumb{aspect-ratio:16/9;background:var(--thumb-bg,#edf2ef);color:var(--thumb-fg,#16312b);padding:13px;display:flex;flex-direction:column;justify-content:space-between;border-radius:4px;overflow:hidden}.slide-thumb strong{font-size:12px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.slide-thumb span{font-size:10px;opacity:.75}.slide-item>span{display:block;font-size:11px;margin-top:6px;color:var(--muted)}.rail-add{width:100%;border-style:dashed;padding:12px}.rail-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.editor-main{min-width:0;display:flex;flex-direction:column;overflow:hidden}.insert-bar{min-height:58px;display:flex;align-items:center;gap:8px;padding:10px 16px;background:#f9fbf8;border-bottom:1px solid var(--line);flex-wrap:wrap}.bar-separator{flex:1}.insert-bar select{max-width:140px;padding:7px;border:1px solid var(--line);border-radius:7px}.help-button{font-size:12px}#canvas-scroll{flex:1;min-height:180px;overflow:auto;background:#e9eee9}#canvas-area{min-height:100%;min-width:100%;display:flex;align-items:center;justify-content:center;padding:32px}#canvas-wrap{position:relative;width:1600px;height:900px;flex:none;box-shadow:0 12px 44px #16312b20}#deck-frame{position:absolute;left:0;top:0;width:1600px;height:900px;border:0;transform-origin:0 0;background:white}#selection{position:absolute;border:2px solid var(--blue);pointer-events:none;z-index:40}#selection[hidden]{display:none}#move-handle{position:absolute;top:-30px;left:-2px;pointer-events:auto;cursor:move;background:var(--blue);color:white;border:0;border-radius:6px 6px 0 0;padding:4px 10px;font-size:12px;height:28px}.resize-handle{position:absolute;width:12px;height:12px;border:2px solid var(--blue);padding:0;border-radius:3px;background:white;pointer-events:auto;touch-action:none}.resize-handle.nw{left:-7px;top:-7px;cursor:nwse-resize}.resize-handle.ne{right:-7px;top:-7px;cursor:nesw-resize}.resize-handle.sw{left:-7px;bottom:-7px;cursor:nesw-resize}.resize-handle.se{right:-7px;bottom:-7px;cursor:nwse-resize}.resize-handle.e{right:-7px;top:calc(50% - 6px);cursor:ew-resize}.resize-handle.w{left:-7px;top:calc(50% - 6px);cursor:ew-resize}.snap-guide{position:absolute;pointer-events:none;background:#e457b9;z-index:35}.snap-guide[hidden]{display:none}.snap-guide.vertical{width:1px;top:0;height:100%}.snap-guide.horizontal{height:1px;left:0;width:100%}.editor-bottom{min-height:38px;padding:8px 18px;display:flex;gap:20px;font-size:12px;color:var(--muted);background:#f9fbf8}#canvas-warning{margin-left:auto;color:#a34125}.notes-panel{background:white;border-top:1px solid var(--line);padding:10px 18px}.notes-panel summary{cursor:pointer;font-weight:600}.notes-panel textarea{width:100%;height:90px;margin-top:10px;resize:vertical;border:1px solid var(--line);border-radius:6px;padding:10px}.properties{border-left:1px solid var(--line)}.properties-title{display:flex;justify-content:space-between;margin-bottom:20px}.properties-title span{font-size:12px;color:var(--muted)}.properties h3{font-size:13px;margin:20px 0 12px}.properties label{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:600;margin-bottom:16px}.properties input[type=number],.properties textarea{width:100%;border:1px solid var(--line);border-radius:7px;padding:8px;background:#fcfdfb;color:var(--ink)}.properties textarea{resize:vertical;line-height:1.6}.properties input[type=color]{width:100%;height:36px;border:1px solid var(--line);border-radius:6px;padding:3px;background:white}.prop-row{display:flex;gap:10px;margin-bottom:12px}.prop-row>*{flex:1;min-width:0}.prop-row label{margin:0}.format-buttons{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:18px}.format-buttons button{font-size:11px;padding:7px}.format-buttons button[aria-pressed=true]{background:var(--ink);color:white}fieldset{margin:0;padding:0;border:0;min-width:0}#empty-selection{color:var(--muted);line-height:1.8}#empty-selection p{margin-bottom:18px}#element-properties:disabled{display:none}.muted{color:var(--muted);font-size:12px}.slide-background{border-top:1px solid var(--line);margin-top:20px}.swatches{display:flex;gap:8px;align-items:center}.swatches button{width:30px;height:30px;background:var(--swatch);padding:0;flex:none}.swatches input{width:34px!important}.layer-section{border-top:1px solid var(--line);margin-top:20px}#layers{display:flex;flex-direction:column;gap:5px}#layers button{font-size:12px;text-align:left;overflow:hidden;text-overflow:ellipsis;padding:7px 9px}#layers button[aria-current=true]{border-color:var(--blue);background:#edf2ff}dialog{border:1px solid var(--line);border-radius:18px;padding:30px;max-width:min(620px,calc(100vw - 40px));color:var(--ink);box-shadow:0 24px 90px #0003}dialog::backdrop{background:#0d241e80}dialog h2{font-size:23px;margin:0 0 24px}dialog label{display:block;margin-bottom:18px}dialog input,dialog select{width:100%;padding:10px;border:1px solid var(--line);border-radius:7px;margin-top:8px}.dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}#dialog-error{color:#a03434}#help-dialog{line-height:1.9}#help-dialog li{margin-bottom:12px}#help-dialog p{color:var(--muted);font-size:13px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#16312b;color:white;padding:13px 22px;border-radius:10px;z-index:100;box-shadow:0 8px 35px #0002;max-width:90vw}.editor-top.busy button{pointer-events:none;opacity:.5}
@media(max-width:1150px){.editor-workspace{grid-template-columns:170px minmax(300px,1fr) 236px}.editor-top{gap:10px;padding:0 12px}.editor-brand{font-size:16px}#deck-name{width:155px}.top-actions{gap:5px}.top-actions button{padding:7px;font-size:12px}#save-status{min-width:70px;font-size:11px}.insert-bar{gap:5px;padding:8px}.insert-bar button{font-size:12px}.slide-rail,.properties{padding:16px 12px}}
@media(max-width:820px){body{overflow:auto;height:auto;min-height:100vh}.editor-top{height:auto;min-height:70px;flex-wrap:wrap;padding:12px}.top-actions{width:100%;margin:0;flex-wrap:wrap}.editor-workspace{height:calc(100vh - 120px);grid-template-columns:120px minmax(250px,1fr)}.properties{display:none}.editor-bottom #hint{display:none}.slide-rail{padding:12px 8px}.rail-tools{grid-template-columns:1fr}.editor-workspace:after{content:'편집은 넓은 PC 화면에서 가장 편하게 사용할 수 있습니다.';position:fixed;bottom:0;left:0;right:0;padding:7px;background:#edf2ef;font-size:11px;text-align:center}.editor-brand{font-size:15px}}
#marquee{position:absolute;border:2px dashed var(--blue);background:#4268e51a;pointer-events:none;z-index:38}#marquee[hidden]{display:none}#selection.multi{border-style:dashed}#selection.multi .resize-handle.e,#selection.multi .resize-handle.w{display:none}
.slide-item[draggable=true]{cursor:grab}.slide-item.dragging{opacity:.42;cursor:grabbing}.slide-item.drop-before{box-shadow:0 -4px 0 var(--blue)}.slide-item.drop-after{box-shadow:0 4px 0 var(--blue)}
#selection.grouped{border-style:solid}
.resize-handle.n{left:calc(50% - 6px);top:-7px;cursor:ns-resize}.resize-handle.s{left:calc(50% - 6px);bottom:-7px;cursor:ns-resize}#selection.multi .resize-handle.n,#selection.multi .resize-handle.s{display:none}#selection.compact .resize-handle.n{top:-17px}#selection.compact .resize-handle.s{bottom:-17px}
.arrange-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px}.arrange-grid button{font-size:12px;padding:8px 4px}
.tool-toggle{display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}.tool-toggle input{margin:0}.snap-guide[data-mode=gap]::after{content:'같은 간격';position:absolute;top:6px;left:6px;white-space:nowrap;background:#fff;color:#9e277c;padding:3px 6px;border-radius:4px;font-size:11px}
.canvas-tools{display:flex;align-items:center;gap:8px;margin-left:auto}
.slide-entry{position:relative}.slide-entry .slide-item{padding-bottom:34px}.slide-remove{position:absolute;bottom:24px;right:10px;font-size:11px;padding:3px 7px;color:#a03434}
#crop-dialog{width:800px;max-height:calc(100dvh - 32px);overflow:auto}#crop-stage{position:relative;width:fit-content;max-width:100%;margin:20px auto;overflow:hidden;touch-action:none;cursor:crosshair;background:#e9eee9}#crop-preview{display:block;max-width:100%;max-height:45vh;width:auto;height:auto;user-select:none;pointer-events:none}#crop-region{position:absolute;border:2px solid white;outline:1px solid #16312b;box-shadow:0 0 0 2000px #0007;cursor:move;touch-action:none}#crop-region button{position:absolute;width:14px;height:14px;border:2px solid #16312b;background:white;border-radius:1px;padding:0}#crop-region [data-crop-handle=nw]{left:-2px;top:-2px;cursor:nwse-resize}#crop-region [data-crop-handle=ne]{right:-2px;top:-2px;cursor:nesw-resize}#crop-region [data-crop-handle=sw]{left:-2px;bottom:-2px;cursor:nesw-resize}#crop-region [data-crop-handle=se]{right:-2px;bottom:-2px;cursor:nwse-resize}.crop-fields{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}#crop-error{color:#a03434}#crop-dialog input{min-width:0}#crop-dialog h2{margin-bottom:12px}
#editor-version{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:5px;background:#edf2ff;color:#4268e5;font-size:12px;vertical-align:middle}
#selection.editing button{visibility:hidden;pointer-events:none}
#selection.compact .resize-handle.nw,#selection.compact .resize-handle.sw,#selection.compact .resize-handle.w{left:-17px}#selection.compact .resize-handle.ne,#selection.compact .resize-handle.se,#selection.compact .resize-handle.e{right:-17px}#selection.compact .resize-handle.nw,#selection.compact .resize-handle.ne{top:-17px}#selection.compact .resize-handle.sw,#selection.compact .resize-handle.se{bottom:-17px}
.layer-row{display:flex;flex-direction:column;gap:5px;min-width:0;border:1px solid var(--line);border-radius:8px;padding:6px}.layer-name{width:100%}.layer-actions{display:flex;flex-wrap:wrap;gap:4px}#layers .layer-actions button{font-size:11px;padding:4px 5px;flex:none}.layer-group>summary{display:flex;align-items:flex-start;gap:4px;cursor:pointer;list-style:none}.layer-group>summary::before{content:'▸';margin-top:12px}.layer-group[open]>summary::before{content:'▾'}.layer-group>summary .layer-row{flex:1}.layer-children{display:flex;flex-direction:column;gap:5px;padding:6px 0 6px 14px}
/* 파일 가져오기와 노트북 화면에서도 잘리지 않는 상단 도구. */
body{display:flex;flex-direction:column;height:100dvh;min-height:0}.editor-top{height:auto;min-height:70px;flex-shrink:0;flex-wrap:wrap;padding-top:12px;padding-bottom:12px;row-gap:12px}.top-actions{flex-wrap:wrap}.editor-workspace{flex:1;min-height:0;height:auto}#open-dialog{width:600px;padding:32px;max-height:calc(100dvh - 40px);overflow:auto}#open-dialog h2{margin-bottom:16px}.open-intro,.open-scope{line-height:1.7;color:var(--muted)}.open-intro{margin:0 0 24px}.open-scope{font-size:13px;margin:22px 0 0}.open-choices{display:grid;gap:12px}.open-choices button{display:flex;flex-direction:column;align-items:flex-start;white-space:normal;text-align:left;padding:18px 20px;gap:8px}.open-choices strong{font-size:16px}.open-choices span{font-size:13px;color:var(--muted)}#import-panel{margin-top:24px;border-top:1px solid var(--line);padding-top:24px}#import-panel label{font-weight:650;margin-bottom:8px}#import-deck{width:100%;margin-top:0}#import-report{font-size:14px;line-height:1.8;margin:16px 0 0;overflow-wrap:anywhere}@media(max-width:820px){.editor-workspace{min-height:300px}#open-dialog{padding:24px}.open-choices button{padding:16px}.editor-workspace:after{pointer-events:none}}
.open-drop{display:flex;flex-direction:column;align-items:center;gap:8px;padding:28px 20px;margin-bottom:12px;border:2px dashed var(--line);border-radius:12px;text-align:center;color:var(--muted)}.open-drop strong{font-size:16px;color:inherit}.open-drop span{font-size:13px}.file-dragging .open-drop{border-color:#4268e5;background:#eef2ff;color:#2a49b8}.open-choices{grid-template-columns:1fr 1fr}@media(max-width:820px){.open-choices{grid-template-columns:1fr}}
