/* style.css */
*{box-sizing:border-box}
html,body{
  height:100%;
  margin:0;
  padding:0;
  background:#f9f9f9;
  font-family:BookkMyungjo,serif;
  color:#111;
}
.wrap{
  display:flex;
  gap:24px;
  padding:24px;
  align-items:flex-start;
  min-height:100vh;
}
.panel{
  width:360px;
  border:2px solid #000;
  padding:18px;
  border-radius:4px;
  background:#fff;
}
.panel h2{margin-top:0;font-weight:700;font-size:18px}
.label{display:block;margin:10px 0 6px;font-size:13px;font-weight:700}
.editable{
  min-height:44px;
  border:1px solid #000;
  padding:10px;
  border-radius:2px;
  outline:none;
  font-size:15px;
  line-height:1.5;
  background:#fff;
}
.editable[contenteditable="true"]:empty:before{
  content:attr(data-placeholder);
  color:#888;
  font-weight:400;
}
.img-controls{margin-top:8px}
.img-controls input[type="range"]{width:100%}
.img-actions{margin-top:8px}
button{
  cursor:pointer;
  padding:8px 12px;
  border-radius:4px;
  border:1px solid #222;
  background:#f4f4f4;
}
button.primary{
  background:#000;
  color:white;
  border-color:#000;
}
.hint{font-size:12px;color:#666;margin-top:10px}

.preview-wrap{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.canvas{
  width:100%;
  position:relative;
  background:#fff;
  
  overflow:hidden;
  border:3px solid #000;
  display:block;
}
.img-area{
  overflow:hidden;
  position:relative;
  min-width:40px;
  background: transparent; 
  flex-shrink: 0; 
}
.canvas-inner{
  position:relative;
  width:100%;
  height:auto;
  background:#ffffff;
  overflow:hidden;
  
  display: flex; 
  align-items: stretch;
  min-height: 400px;
}
.img-inner{
  position:relative;
  width:100%;
  height:100%;
  background-size:cover;
  background-position:center center;
  position: relative;
}
.text-area{
  flex:1;
  padding: 108px;
  display:flex;
  flex-direction:column;
  gap: 36px;
  align-items:flex-start;
  justify-content:flex-start;
  flex-grow: 1; 
}

.title-preview{font-weight:700;line-height:1.1;white-space:pre-line}
.subtitle-preview{font-weight:400;white-space:pre-line}
.body-preview{font-weight:400;white-space:pre-line;max-width:100%}

@media (max-width:1000px){
  .wrap{flex-direction:column}
  .panel{width:100%}
  .text-area{padding: 36px; gap: 12px;}
  .canvas-inner{flex-direction: column; min-height: initial;}
  .img-area{
    height: auto;
    width: 100% !important;
    min-height: initial;
  } 
}