:root{
  --bg:#ffffff;
  --panel:#ffffff;
  --panel2:#fbfbfd;
  --line:rgba(0,0,0,.08);
  --text:rgba(0,0,0,.86);
  --muted:rgba(0,0,0,.58);
  --muted2:rgba(0,0,0,.45);
  --accent:#0ea5e9;
  --accent2:#7c3aed;
  --danger:#ef4444;
  --ok:#16a34a;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --r:16px;
}

*{box-sizing:border-box}

.ssum-wrap{
  color:var(--text);
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--shadow);
  margin:18px 0;
  font-family: Pretendard, Apple SD Gothic Neo, Malgun Gothic, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.ssum-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding:6px 6px 14px;
  border-bottom:1px solid var(--line);
}
.ssum-title h2{margin:0; font-size:22px; letter-spacing:-.02em}
.ssum-sub{margin:6px 0 0; color:var(--muted); font-size:13px}
.ssum-top-actions{display:flex; gap:8px; flex-wrap:wrap}

.ssum-main{
  display:grid;
  gap:14px;
  padding-top:14px;
}
.ssum-main.single{grid-template-columns:1fr;}

.panel{
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(251,251,253,1));
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow: 0 8px 26px rgba(0,0,0,.05);
  overflow:hidden;
}

.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 12px;
  background:rgba(0,0,0,.02);
  border-bottom:1px solid var(--line);
}
.panel-head h3{margin:0; font-size:16px}
.panel-head-left{display:flex; align-items:center; gap:10px}
.panel-head-right{display:flex; align-items:center; gap:8px; flex-wrap:wrap}

.badge{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
  background:rgba(0,0,0,.02);
}

.dropzone{position:relative; padding:12px;}
.dropzone.dragover{
  outline:2px dashed rgba(14,165,233,.65);
  outline-offset:-6px;
  border-radius:14px;
}

.drop-hint{
  display:grid;
  place-items:center;
  text-align:center;
  padding:22px 16px;
  border:1px dashed rgba(0,0,0,.14);
  border-radius:14px;
  background:rgba(0,0,0,.015);
  margin-bottom:12px;
}
.drop-icon{font-size:26px; margin-bottom:6px}
.drop-text{color:var(--text); font-size:14px; line-height:1.55}
.drop-sub{color:var(--muted2); font-size:12px; margin-top:8px}
.hl{color:var(--accent)}

.stage{
  position:relative;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.10);
  overflow:hidden;
  background:#f3f4f6;
}
#editorCanvas{
  width:100%;
  height:auto;
  display:block;
  background:transparent;
}
.stage-help{
  position:absolute;
  left:10px; bottom:10px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.78);
  color:rgba(0,0,0,.62);
  font-size:12px;
  line-height:1.45;
  backdrop-filter: blur(6px);
}

.preview-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  padding:12px;
}
@media (max-width: 700px){ .preview-grid{grid-template-columns:1fr} }

.preview-box{
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  overflow:hidden;
  background:rgba(0,0,0,.01);
}
.preview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 10px;
  border-bottom:1px solid rgba(0,0,0,.06);
  background:rgba(0,0,0,.015);
}
.preview-head h4{margin:0; font-size:13px; color:var(--text)}
.preview-body{
  padding:10px;
  display:grid;
  place-items:center;
  min-height:180px;
}
.preview-body img{
  max-width:100%;
  max-height:260px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
}

.controls{padding:12px; display:flex; flex-direction:column; gap:12px;}
.controls-compact{padding-top:10px;}

.grid-3{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:12px;
}
@media (max-width: 1100px){ .grid-3{grid-template-columns:1fr} }

.group{
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  background:rgba(0,0,0,.01);
  overflow:hidden;
}
.group-title{
  padding:10px 12px;
  border-bottom:1px solid rgba(0,0,0,.06);
  color:rgba(0,0,0,.78);
  font-size:13px;
  background:rgba(0,0,0,.015);
}

.row{
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  border-top:1px solid rgba(0,0,0,.05);
}
.row:first-of-type{border-top:none}
.row.two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.row.two.tight{gap:8px; padding-top:0}

.lbl{font-size:12px; color:var(--muted)}
.lbl.mini{font-size:11px; color:var(--muted2)}

.inp{
  width:100%;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  color:var(--text);
  outline:none;
}
.inp:disabled{opacity:.60}
textarea.inp{resize:vertical; min-height:74px}

.inline{display:flex; align-items:center; gap:10px;}
.inline.wrap{flex-wrap:wrap}

.mini{font-size:12px; color:var(--muted2);}
.mini.right{margin-left:auto}
.mini.note{margin-top:6px; color:rgba(0,0,0,.50)}

.btn{
  border:1px solid rgba(0,0,0,.14);
  background:#fff;
  color:var(--text);
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
  font-size:13px;
  user-select:none;
}
.btn:hover{background:rgba(0,0,0,.03)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.55; cursor:not-allowed}

.btn.primary{
  background:linear-gradient(90deg, rgba(14,165,233,.14), rgba(124,58,237,.12));
  border-color:rgba(14,165,233,.30);
}
.btn.danger{
  background:rgba(239,68,68,.10);
  border-color:rgba(239,68,68,.26);
}
.btn.ghost{background:rgba(0,0,0,.02);}
.btn.block{width:100%}

.file-btn input{display:none}

.switch{position:relative; display:inline-block; width:46px; height:26px}
.switch input{opacity:0; width:0; height:0}
.slider{
  position:absolute; cursor:pointer;
  top:0; left:0; right:0; bottom:0;
  background:rgba(0,0,0,.08);
  border:1px solid rgba(0,0,0,.12);
  transition:.2s;
  border-radius:999px;
}
.slider:before{
  position:absolute; content:"";
  height:20px; width:20px; left:3px; top:2px;
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  transition:.2s;
  border-radius:50%;
}
.switch input:checked + .slider{
  background:rgba(22,163,74,.16);
  border-color:rgba(22,163,74,.25);
}
.switch input:checked + .slider:before{transform:translateX(20px)}

input[type="color"]{
  width:44px; height:38px;
  border:none;
  background:transparent;
  padding:0;
}
input[type="color"]:disabled{opacity:.60}

.ssum-footer{
  border-top:1px solid var(--line);
  padding:12px 6px 0;
  margin-top:12px;
}

/* ✅ 도움말 박스 */
.helpbox{
  margin-top:12px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  overflow:hidden;
  background:rgba(0,0,0,.01);
}
.helpbox-title{
  padding:10px 12px;
  font-size:13px;
  color:rgba(0,0,0,.78);
  border-bottom:1px solid rgba(0,0,0,.06);
  background:rgba(0,0,0,.015);
}
.helpbox-body{padding:12px;}

.help-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.help-table th, .help-table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(0,0,0,.06);
  vertical-align:top;
  font-size:13px;
}
.help-table th{
  background:rgba(0,0,0,.02);
  color:rgba(0,0,0,.75);
  text-align:left;
}
.help-table td{color:rgba(0,0,0,.70);}
.help-table tr:last-child th,
.help-table tr:last-child td{border-bottom:none;}