﻿.wel4u-editor{border:1px solid #cbd5e1;border-radius:12px;background:#fff;overflow:hidden}
.wel4u-editor-toolbar{display:flex;flex-wrap:wrap;gap:5px;padding:9px;background:#f8fafc;border-bottom:1px solid #e2e8f0}
.wel4u-editor-toolbar button,.wel4u-editor-toolbar select{min-height:32px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;padding:5px 8px;font:inherit;cursor:pointer}
.wel4u-editor-toolbar button:hover{background:#f1f5f9}
.wel4u-editor-area{min-height:320px;padding:16px;outline:0;line-height:1.75;overflow:auto}
.wel4u-editor-area:empty:before{content:attr(data-placeholder);color:#94a3b8}
.wel4u-editor-source{display:none;width:100%;min-height:320px;border:0;padding:16px;font:13px/1.6 Consolas,monospace;resize:vertical}
.wel4u-editor.source-mode .wel4u-editor-area{display:none}
.wel4u-editor.source-mode .wel4u-editor-source{display:block}
.wel4u-editor-status{display:flex;justify-content:space-between;gap:10px;padding:7px 10px;background:#f8fafc;border-top:1px solid #e2e8f0;color:#64748b;font-size:.82rem}
.board-content h1,.board-content h2,.board-content h3{margin-top:1.4em}
.board-content table{width:100%;border-collapse:collapse;margin:16px 0}
.board-content th,.board-content td{border:1px solid #cbd5e1;padding:8px;vertical-align:top}
.board-content blockquote{margin:16px 0;padding:10px 14px;border-left:4px solid #cbd5e1;background:#f8fafc}
.board-content pre{overflow:auto;padding:12px;border-radius:8px;background:#0f172a;color:#e2e8f0}

.wel4u-editor-area img,.board-content img{max-width:100%;height:auto}
.wel4u-editor-area a,.board-content a{word-break:break-all}


/* v2.4.7 게시판 본문 이미지 파일 업로드 */
.wel4u-editor-toolbar button:disabled{opacity:.55;cursor:not-allowed;background:#f1f5f9}
.wel4u-editor-image-picker{display:none!important}
.wel4u-editor-upload-status{flex:1;text-align:center;color:#475569;font-weight:700}
.wel4u-editor-upload-status.success{color:#166534}
.wel4u-editor-upload-status.error{color:#b91c1c}
.wel4u-editor-area .editor-image-block{margin:16px 0;text-align:center}
.wel4u-editor-area .editor-image-block img,.board-content .editor-image-block img{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:10px}
@media(max-width:600px){
  .wel4u-editor-status{flex-wrap:wrap}
  .wel4u-editor-upload-status{order:3;flex-basis:100%;text-align:left}
}


/* v2.5.0 기존 본문 이미지 수정 */
.wel4u-editor-area img[data-editor-selected="1"]{
  outline:3px solid #64748b;
  outline-offset:3px;
}
.wel4u-image-edit-panel{
  border-top:1px solid #cbd5e1;
  background:#fff;
  padding:14px;
}
.wel4u-image-edit-panel[hidden]{display:none!important}
.wel4u-image-edit-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.wel4u-image-edit-head strong{color:#0f172a;font-size:1rem}
.wel4u-image-edit-head button{
  width:34px;height:34px;border:1px solid #cbd5e1;border-radius:8px;
  background:#fff;color:#334155;font:inherit;font-size:1.2rem;cursor:pointer
}
.wel4u-image-edit-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}
.wel4u-image-edit-grid label{
  display:grid;gap:6px;color:#334155;font-size:.82rem;font-weight:800
}
.wel4u-image-edit-grid input,
.wel4u-image-edit-grid select{
  min-width:0;min-height:38px;border:1px solid #cbd5e1;border-radius:8px;
  padding:8px;background:#fff;color:#0f172a;font:inherit
}
.wel4u-image-edit-preview{
  display:flex;justify-content:center;align-items:center;
  min-height:120px;max-height:300px;margin-bottom:12px;padding:10px;
  border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;overflow:auto
}
.wel4u-image-edit-preview img{display:block;max-width:100%;max-height:270px;height:auto}
.wel4u-image-edit-actions{display:flex;flex-wrap:wrap;gap:8px}
.wel4u-image-edit-actions button{
  min-height:38px;border:1px solid #cbd5e1;border-radius:8px;
  padding:8px 11px;background:#fff;color:#334155;font:inherit;font-weight:700;cursor:pointer
}
.wel4u-image-edit-actions button:hover{background:#f1f5f9;color:#0f172a}
.wel4u-image-edit-actions button.danger{
  margin-left:auto;border-color:#fecaca;background:#fff1f2;color:#991b1b
}
@media(max-width:700px){
  .wel4u-image-edit-grid{grid-template-columns:1fr}
  .wel4u-image-edit-actions{display:grid;grid-template-columns:1fr 1fr}
  .wel4u-image-edit-actions button{width:100%}
  .wel4u-image-edit-actions button.danger{margin-left:0;grid-column:1/-1}
}


/* =========================================================
   v2.5.1 게시판 WYSIWYG 운영 UX 보강
   ========================================================= */
.wel4u-editor-toolbar{
  align-items:center;
  gap:7px;
}
.wel4u-toolbar-group{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px;
  padding-right:7px;
  border-right:1px solid #e2e8f0;
}
.wel4u-toolbar-group:last-child{
  padding-right:0;
  border-right:0;
}
.wel4u-editor-toolbar button,
.wel4u-editor-toolbar select{
  min-height:36px;
}
.wel4u-editor-toolbar button.is-active{
  border-color:#64748b;
  background:#e2e8f0;
  color:#0f172a;
  box-shadow:inset 0 0 0 1px #94a3b8;
  font-weight:900;
}
.wel4u-format-select{
  min-width:92px;
}
.wel4u-editor-area td[data-editor-cell-selected="1"],
.wel4u-editor-area th[data-editor-cell-selected="1"]{
  outline:3px solid #64748b;
  outline-offset:-3px;
  background:#f1f5f9;
}

/* 임시저장 복구 */
.wel4u-draft-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 12px;
  border-bottom:1px solid #fde68a;
  background:#fffbeb;
  color:#78350f;
  font-size:.82rem;
  line-height:1.4;
}
.wel4u-draft-bar[hidden]{display:none!important}
.wel4u-draft-bar>div{
  display:flex;
  gap:6px;
  flex:0 0 auto;
}
.wel4u-draft-bar button{
  min-height:32px;
  padding:5px 9px;
  border:1px solid #d6b968;
  border-radius:7px;
  background:#fff;
  color:#78350f;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}

/* 표 수정 패널 */
.wel4u-table-edit-panel{
  border-top:1px solid #cbd5e1;
  padding:14px;
  background:#fff;
}
.wel4u-table-edit-panel[hidden]{display:none!important}
.wel4u-table-edit-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
}
.wel4u-table-edit-head strong{
  color:#0f172a;
  font-size:1rem;
}
.wel4u-table-edit-head button{
  width:34px;
  height:34px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font:inherit;
  font-size:1.2rem;
  cursor:pointer;
}
.wel4u-table-edit-panel>p{
  margin:0 0 11px;
  color:#64748b;
  font-size:.82rem;
}
.wel4u-table-edit-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.wel4u-table-edit-actions button{
  min-height:38px;
  padding:8px 11px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.wel4u-table-edit-actions button:hover{
  background:#f1f5f9;
  color:#0f172a;
}
.wel4u-table-edit-actions button.danger{
  border-color:#fecaca;
  background:#fff1f2;
  color:#991b1b;
}

/* 편집기 표 자체도 화면에서 읽기 편하게 */
.wel4u-editor-area table{
  width:100%;
  border-collapse:collapse;
  margin:16px 0;
  background:#fff;
}
.wel4u-editor-area th,
.wel4u-editor-area td{
  min-width:70px;
  border:1px solid #cbd5e1;
  padding:9px;
  vertical-align:top;
}
.wel4u-editor-area th{
  background:#f1f5f9;
  color:#0f172a;
  font-weight:900;
}

/* 전체화면 */
body.wel4u-editor-lock{
  overflow:hidden!important;
}
.wel4u-editor.wel4u-editor-fullscreen{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  flex-direction:column;
  width:100vw;
  height:100vh;
  border:0;
  border-radius:0;
  background:#fff;
}
.wel4u-editor.wel4u-editor-fullscreen .wel4u-editor-toolbar{
  flex:0 0 auto;
}
.wel4u-editor.wel4u-editor-fullscreen .wel4u-editor-area,
.wel4u-editor.wel4u-editor-fullscreen .wel4u-editor-source{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
.wel4u-editor.wel4u-editor-fullscreen .wel4u-editor-status{
  flex:0 0 auto;
}

/* 키보드 접근성 */
.wel4u-editor button:focus-visible,
.wel4u-editor select:focus-visible,
.wel4u-editor input:focus-visible{
  outline:3px solid #94a3b8;
  outline-offset:2px;
}

@media(max-width:760px){
  .wel4u-editor-toolbar{
    flex-wrap:nowrap;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    padding:8px;
  }
  .wel4u-toolbar-group{
    flex:0 0 auto;
    flex-wrap:nowrap;
  }
  .wel4u-editor-toolbar button,
  .wel4u-editor-toolbar select{
    min-height:42px;
    white-space:nowrap;
  }
  .wel4u-editor-area{
    min-height:280px;
    padding:13px;
  }
  .wel4u-draft-bar{
    align-items:flex-start;
    flex-direction:column;
  }
  .wel4u-table-edit-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .wel4u-table-edit-actions button{
    width:100%;
  }
}
@media(max-width:430px){
  .wel4u-table-edit-actions{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   v2.5.2 WYSIWYG 글꼴·색상·미리보기·드래그업로드
   ========================================================= */
.wel4u-font-select{min-width:118px}
.wel4u-size-select{min-width:72px}
.wel4u-color-tool{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:36px;
  padding:4px 7px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#fff;
  color:#334155;
  font-size:.78rem;
  font-weight:700;
  cursor:pointer;
}
.wel4u-color-tool input[type="color"]{
  width:25px;
  height:25px;
  padding:1px;
  border:0;
  background:transparent;
  cursor:pointer;
}
.wel4u-editor-area.is-image-dragover{
  outline:3px dashed #64748b;
  outline-offset:-7px;
  background:#f8fafc;
}
.wel4u-editor-area.is-image-dragover:after{
  content:"이미지를 여기에 놓으면 본문에 업로드합니다";
  position:sticky;
  display:block;
  bottom:12px;
  width:max-content;
  max-width:calc(100% - 24px);
  margin:12px auto 0;
  padding:8px 12px;
  border-radius:999px;
  background:#0f172a;
  color:#fff;
  font-size:.8rem;
  font-weight:800;
  text-align:center;
}

/* 저장 후에도 표가 좁은 화면에서 깨지지 않도록 wrapper 유지 */
.editor-table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  margin:16px 0;
}
.editor-table-wrap table{
  margin:0;
  min-width:520px;
}

/* 미리보기 */
.wel4u-preview-panel{
  border-top:1px solid #cbd5e1;
  padding:14px;
  background:#fff;
}
.wel4u-preview-panel[hidden]{display:none!important}
.wel4u-preview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.wel4u-preview-head strong{
  color:#0f172a;
  font-size:1rem;
}
.wel4u-preview-head>div{
  display:flex;
  gap:6px;
}
.wel4u-preview-head button{
  min-height:34px;
  padding:6px 10px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}
.wel4u-preview-content{
  min-height:180px;
  padding:20px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
  color:#1e293b;
  line-height:1.75;
}
.wel4u-preview-content img{
  max-width:100%;
  height:auto;
}
.wel4u-preview-content .editor-table-wrap{
  overflow-x:auto;
}

/* 서버 저장 후에도 inline style과 무관하게 이미지/표 기본 반응형 */
.board-content .editor-table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.board-content .editor-table-wrap table{
  min-width:520px;
}

/* 키보드/마우스 편집 도움 */
.wel4u-editor-toolbar [aria-pressed="true"]{
  border-color:#64748b;
  background:#e2e8f0;
  color:#0f172a;
  font-weight:900;
}

@media(max-width:760px){
  .wel4u-font-select{min-width:110px}
  .wel4u-size-select{min-width:68px}
  .wel4u-color-tool{
    min-height:42px;
    white-space:nowrap;
  }
  .wel4u-preview-content{
    padding:14px;
  }
}


/* =========================================================
   v2.5.3 색 적용 / 색 고르기 분리
   ========================================================= */
.wel4u-color-group{
  display:inline-flex;
  align-items:stretch;
  gap:4px;
}
.wel4u-editor-toolbar .wel4u-color-apply{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:36px;
  padding:5px 8px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#fff;
  color:#334155;
  font:inherit;
  font-size:.78rem;
  font-weight:800;
  cursor:pointer;
}
.wel4u-color-swatch{
  display:inline-block;
  width:18px;
  height:18px;
  border:1px solid #94a3b8;
  border-radius:4px;
  background:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45);
}
.wel4u-color-picker-label{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:36px;
  padding:4px 6px 4px 8px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#fff;
  color:#475569;
  font-size:.76rem;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.wel4u-color-picker-label:hover,
.wel4u-editor-toolbar .wel4u-color-apply:hover{
  background:#f1f5f9;
  color:#0f172a;
}
.wel4u-color-picker-label input[type="color"]{
  width:27px;
  height:27px;
  padding:1px;
  border:1px solid #cbd5e1;
  border-radius:5px;
  background:#fff;
  cursor:pointer;
}
.wel4u-color-picker-label input[type="color"]::-webkit-color-swatch-wrapper{
  padding:1px;
}
.wel4u-color-picker-label input[type="color"]::-webkit-color-swatch{
  border:0;
  border-radius:3px;
}
@media(max-width:760px){
  .wel4u-color-group{
    flex:0 0 auto;
  }
  .wel4u-editor-toolbar .wel4u-color-apply,
  .wel4u-color-picker-label{
    min-height:42px;
  }
}


/* =========================================================
   v2.5.4 Word 스타일 간결 리본 UI
   ========================================================= */
.wel4u-editor-ribbon{
  position:relative;
  display:flex;
  align-items:stretch;
  flex-wrap:wrap;
  gap:0;
  padding:6px 8px 22px;
  background:#f8fafc;
  border-bottom:1px solid #dbe2ea;
}
.wel4u-editor-ribbon .wel4u-toolbar-group{
  position:relative;
  display:flex;
  align-items:center;
  align-content:center;
  flex-wrap:wrap;
  gap:3px;
  min-height:58px;
  padding:5px 9px 4px;
  border-right:1px solid #dbe2ea;
}
.wel4u-editor-ribbon .wel4u-toolbar-group:after{
  content:attr(data-group-label);
  position:absolute;
  left:0;
  right:0;
  bottom:-17px;
  color:#64748b;
  font-size:10px;
  font-weight:700;
  line-height:14px;
  text-align:center;
  pointer-events:none;
}
.wel4u-editor-ribbon .wel4u-toolbar-group:last-of-type{border-right:0}
.wel4u-editor-ribbon button,
.wel4u-editor-ribbon select{
  min-height:30px;
  height:30px;
  padding:3px 6px;
  border-color:transparent;
  background:transparent;
  border-radius:5px;
  color:#1e293b;
  font-size:12px;
  line-height:1;
}
.wel4u-editor-ribbon button:hover,
.wel4u-editor-ribbon select:hover{
  border-color:#cbd5e1;
  background:#eef2f7;
}
.wel4u-editor-ribbon button.is-active,
.wel4u-editor-ribbon button[aria-pressed="true"]{
  border-color:#94a3b8;
  background:#dfe7f0;
}
.wel4u-editor-ribbon .wel4u-format-select{width:80px;min-width:80px}
.wel4u-editor-ribbon .wel4u-font-select{width:102px;min-width:102px}
.wel4u-editor-ribbon .wel4u-size-select{width:54px;min-width:54px}
.wel4u-editor-ribbon .wel4u-color-group{
  gap:0;
  border:1px solid transparent;
  border-radius:5px;
}
.wel4u-editor-ribbon .wel4u-color-group:hover{
  border-color:#cbd5e1;
  background:#eef2f7;
}
.wel4u-editor-ribbon .wel4u-color-apply{
  position:relative;
  min-width:34px;
  height:30px;
  min-height:30px;
  padding:2px 5px;
  border:0;
  background:transparent;
}
.wel4u-editor-ribbon .wel4u-ribbon-letter{
  display:block;
  min-width:17px;
  color:#0f172a;
  font-size:14px;
  font-weight:900;
  line-height:16px;
  text-align:center;
}
.wel4u-editor-ribbon .wel4u-color-swatch{
  position:absolute;
  left:6px;
  right:6px;
  bottom:2px;
  width:auto;
  height:3px;
  border:0;
  border-radius:2px;
}
.wel4u-editor-ribbon .wel4u-color-picker-label{
  position:relative;
  width:23px;
  min-width:23px;
  height:30px;
  min-height:30px;
  padding:0;
  border:0;
  border-left:1px solid #dbe2ea;
  border-radius:0 5px 5px 0;
  background:transparent;
  justify-content:center;
  overflow:hidden;
}
.wel4u-editor-ribbon .wel4u-color-picker-label>span{
  font-size:9px;
  pointer-events:none;
}
.wel4u-editor-ribbon .wel4u-color-picker-label input[type="color"]{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:.001;
  cursor:pointer;
}
.wel4u-editor-ribbon .wel4u-toolbar-group.is-advanced{
  display:none;
  flex-basis:100%;
  order:20;
  min-height:46px;
  margin-top:7px;
  padding-top:5px;
  border-top:1px dashed #cbd5e1;
  border-right:0;
}
.wel4u-editor-ribbon.show-advanced .wel4u-toolbar-group.is-advanced{display:flex}
.wel4u-editor-ribbon .wel4u-ribbon-more{
  order:30;
  position:absolute;
  right:8px;
  bottom:3px;
  height:20px;
  min-height:20px;
  padding:1px 7px;
  border:0;
  background:transparent;
  color:#475569;
  font-size:10px;
  font-weight:800;
}
.wel4u-editor-ribbon .wel4u-ribbon-more:hover{background:#e2e8f0}

.wel4u-editor-area{
  min-height:360px;
  padding:24px 28px;
  background:#fff;
  color:#1e293b;
  line-height:1.75;
}
.wel4u-editor-status{
  min-height:30px;
  align-items:center;
  padding:5px 10px;
}

@media(max-width:760px){
  .wel4u-editor-ribbon{
    flex-wrap:nowrap;
    align-items:stretch;
    overflow-x:auto;
    overflow-y:hidden;
    padding:5px 48px 20px 5px;
    scrollbar-width:thin;
  }
  .wel4u-editor-ribbon .wel4u-toolbar-group{
    flex:0 0 auto;
    flex-wrap:nowrap;
    min-height:50px;
    padding:4px 7px;
  }
  .wel4u-editor-ribbon .wel4u-toolbar-group.is-advanced{
    flex-basis:auto;
    order:initial;
    margin-top:0;
    border-top:0;
    border-right:1px solid #dbe2ea;
  }
  .wel4u-editor-ribbon .wel4u-ribbon-more{
    position:sticky;
    right:0;
    bottom:auto;
    align-self:center;
    flex:0 0 auto;
    height:34px;
    min-height:34px;
    margin-left:4px;
    padding:4px 8px;
    border:1px solid #cbd5e1;
    background:#fff;
    font-size:11px;
    z-index:3;
  }
  .wel4u-editor-ribbon button,
  .wel4u-editor-ribbon select{
    min-height:34px;
    height:34px;
  }
  .wel4u-editor-ribbon .wel4u-color-apply,
  .wel4u-editor-ribbon .wel4u-color-picker-label{
    min-height:34px;
    height:34px;
  }
  .wel4u-editor-area{
    min-height:300px;
    padding:17px 15px;
  }
}


/* =========================================================
   v2.5.5 Word형 리본 탭 + 기본색/팔레트 UI
   ========================================================= */
.wel4u-editor-ribbon{
  display:block!important;
  padding:0!important;
  background:#f8fafc;
  border-bottom:1px solid #cbd5e1;
  overflow:visible;
}

/* Word처럼 홈 / 삽입 / 도구 탭 */
.wel4u-ribbon-tabs{
  display:flex;
  align-items:end;
  gap:2px;
  min-height:34px;
  padding:4px 8px 0;
  border-bottom:1px solid #dbe2ea;
  background:#fff;
}
.wel4u-ribbon-tab{
  min-width:58px;
  min-height:30px!important;
  height:30px!important;
  padding:4px 11px!important;
  border:0!important;
  border-radius:5px 5px 0 0!important;
  background:transparent!important;
  color:#475569!important;
  font-size:12px!important;
  font-weight:800!important;
  cursor:pointer;
}
.wel4u-ribbon-tab:hover{
  background:#f1f5f9!important;
  color:#0f172a!important;
}
.wel4u-ribbon-tab.is-active{
  position:relative;
  background:#f8fafc!important;
  color:#0f172a!important;
}
.wel4u-ribbon-tab.is-active:after{
  content:"";
  position:absolute;
  left:8px;
  right:8px;
  bottom:-1px;
  height:2px;
  background:#334155;
}

/* 선택된 탭의 그룹만 표시 */
.wel4u-ribbon-body{
  display:flex;
  align-items:stretch;
  gap:0;
  min-height:94px;
  padding:6px 8px 20px;
  overflow:visible;
}
.wel4u-editor-ribbon .wel4u-toolbar-group[data-ribbon-tab]{
  display:none!important;
}
.wel4u-editor-ribbon[data-active-tab="home"] .wel4u-toolbar-group[data-ribbon-tab="home"],
.wel4u-editor-ribbon[data-active-tab="insert"] .wel4u-toolbar-group[data-ribbon-tab="insert"],
.wel4u-editor-ribbon[data-active-tab="blocks"] .wel4u-toolbar-group[data-ribbon-tab="blocks"],
.wel4u-editor-ribbon[data-active-tab="tools"] .wel4u-toolbar-group[data-ribbon-tab="tools"]{
  display:flex!important;
}
.wel4u-editor-ribbon .wel4u-toolbar-group{
  position:relative;
  align-items:center;
  align-content:center;
  flex-wrap:wrap;
  gap:4px;
  min-height:72px;
  padding:4px 10px;
  border-right:1px solid #dbe2ea;
}
.wel4u-editor-ribbon .wel4u-toolbar-group:last-child{border-right:0}
.wel4u-editor-ribbon .wel4u-toolbar-group:after{
  content:attr(data-group-label);
  position:absolute;
  left:0;
  right:0;
  bottom:-16px;
  color:#64748b;
  font-size:10px;
  font-weight:700;
  line-height:13px;
  text-align:center;
  pointer-events:none;
}

/* 공통 Word식 버튼 */
.wel4u-editor-ribbon .wel4u-ribbon-body button,
.wel4u-editor-ribbon .wel4u-ribbon-body select{
  min-height:30px;
  height:30px;
  padding:3px 6px;
  border:1px solid transparent;
  border-radius:4px;
  background:transparent;
  color:#1e293b;
  font:inherit;
  font-size:12px;
  line-height:1;
}
.wel4u-editor-ribbon .wel4u-ribbon-body button:hover,
.wel4u-editor-ribbon .wel4u-ribbon-body select:hover{
  border-color:#cbd5e1;
  background:#eef2f7;
}
.wel4u-editor-ribbon .wel4u-ribbon-body button.is-active,
.wel4u-editor-ribbon .wel4u-ribbon-body button[aria-pressed="true"]{
  border-color:#94a3b8;
  background:#dfe7f0;
}
.wel4u-editor-ribbon .wel4u-format-select{width:82px;min-width:82px}
.wel4u-editor-ribbon .wel4u-font-select{width:104px;min-width:104px}
.wel4u-editor-ribbon .wel4u-size-select{width:55px;min-width:55px}

/* 글꼴 그룹 */
.wel4u-font-buttons{
  display:inline-flex;
  gap:2px;
  align-items:center;
}
.wel4u-font-buttons button{
  min-width:28px;
  padding-left:5px!important;
  padding-right:5px!important;
}
.wel4u-clear-format{
  font-weight:800!important;
}
.wel4u-color-rows{
  display:grid;
  flex-basis:100%;
  gap:3px;
  min-width:330px;
}

/* 글자색/배경색 — 현재색 + 기본색 + 팔레트 */
.wel4u-word-color{
  position:relative;
  display:flex;
  align-items:center;
  gap:4px;
  min-height:25px;
}
.wel4u-word-color-main{
  position:relative;
  width:32px;
  min-width:32px;
  height:25px!important;
  min-height:25px!important;
  padding:1px 4px!important;
  font-weight:900!important;
}
.wel4u-word-color-icon{
  display:block;
  font-size:13px;
  line-height:16px;
}
.wel4u-word-color-current{
  position:absolute;
  left:5px;
  right:5px;
  bottom:2px;
  height:3px;
  border-radius:2px;
}
.wel4u-basic-colors{
  display:flex;
  align-items:center;
  gap:2px;
  padding:2px 3px;
  border:1px solid #e2e8f0;
  border-radius:4px;
  background:#fff;
}
.wel4u-editor-ribbon .wel4u-basic-color{
  width:16px!important;
  min-width:16px!important;
  height:16px!important;
  min-height:16px!important;
  padding:0!important;
  border:1px solid rgba(15,23,42,.18)!important;
  border-radius:2px!important;
  box-shadow:none!important;
}
.wel4u-editor-ribbon .wel4u-basic-color:hover{
  outline:2px solid #475569;
  outline-offset:1px;
}
.wel4u-editor-ribbon .wel4u-palette-button{
  width:auto;
  min-width:46px;
  height:25px!important;
  min-height:25px!important;
  padding:2px 6px!important;
  border:1px solid #cbd5e1!important;
  background:#fff!important;
  color:#475569!important;
  font-size:10px!important;
  font-weight:800!important;
}
.wel4u-color-palette{
  position:absolute;
  top:calc(100% + 5px);
  left:32px;
  z-index:10050;
  width:228px;
  padding:10px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  box-shadow:0 12px 30px rgba(15,23,42,.18);
}
.wel4u-color-palette[hidden]{display:none!important}
.wel4u-color-palette>strong{
  display:block;
  margin:0 0 8px;
  color:#334155;
  font-size:12px;
}
.wel4u-palette-grid{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  gap:3px;
}
.wel4u-editor-ribbon .wel4u-palette-color{
  aspect-ratio:1/1;
  width:100%!important;
  height:auto!important;
  min-height:21px!important;
  padding:0!important;
  border:1px solid rgba(15,23,42,.14)!important;
  border-radius:2px!important;
}
.wel4u-editor-ribbon .wel4u-palette-color:hover{
  outline:2px solid #334155;
  outline-offset:1px;
}
.wel4u-custom-color{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:9px;
  padding-top:8px;
  border-top:1px solid #e2e8f0;
  color:#475569;
  font-size:11px;
  font-weight:700;
}
.wel4u-custom-color input[type="color"]{
  width:44px;
  height:27px;
  padding:1px;
  border:1px solid #cbd5e1;
  border-radius:5px;
  background:#fff;
  cursor:pointer;
}

/* 문단 그룹 — Word형 목록/정렬 아이콘 */
.wel4u-paragraph-row{
  display:flex;
  flex-basis:100%;
  align-items:center;
  justify-content:center;
  gap:2px;
}
.wel4u-list-icon{
  display:grid;
  grid-template-columns:8px 20px;
  grid-template-rows:repeat(3,3px);
  gap:2px 2px;
  width:30px;
  height:14px;
  align-content:center;
}
.wel4u-list-icon b{
  grid-row:1/-1;
  align-self:center;
  font-size:13px;
  line-height:1;
}
.wel4u-list-icon.number b{font-size:10px}
.wel4u-list-icon i{
  display:block;
  height:2px;
  background:#334155;
  border-radius:2px;
}
.wel4u-align-icon{
  display:flex;
  width:20px;
  height:16px;
  flex-direction:column;
  justify-content:center;
  gap:2px;
}
.wel4u-align-icon i{
  display:block;
  height:2px;
  background:#334155;
  border-radius:2px;
}
.wel4u-align-icon.left i:nth-child(2),
.wel4u-align-icon.left i:nth-child(4){width:68%}
.wel4u-align-icon.center i:nth-child(2),
.wel4u-align-icon.center i:nth-child(4){width:68%;align-self:center}
.wel4u-align-icon.right i:nth-child(2),
.wel4u-align-icon.right i:nth-child(4){width:68%;align-self:flex-end}
.wel4u-align-icon.justify i{width:100%}

/* 삽입/도구 탭의 Word식 큰 명령 */
.wel4u-editor-ribbon .wel4u-ribbon-command{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  width:auto;
  min-width:58px;
  height:54px!important;
  min-height:54px!important;
  padding:4px 7px!important;
  white-space:nowrap;
}
.wel4u-command-icon{
  display:block;
  min-height:20px;
  color:#334155;
  font-size:19px;
  font-weight:800;
  line-height:20px;
}
.wel4u-ribbon-command>span:last-child{
  font-size:10px;
  font-weight:700;
}

/* 본문은 Word 문서처럼 충분한 여백 */
.wel4u-editor-area{
  min-height:380px;
  padding:28px 32px;
  background:#fff;
  line-height:1.75;
}

/* 모바일: 탭은 고정, 선택된 리본 본문만 가로스크롤 */
@media(max-width:760px){
  .wel4u-ribbon-tabs{
    position:sticky;
    left:0;
    z-index:3;
    min-width:max-content;
    padding-left:5px;
  }
  .wel4u-ribbon-body{
    min-height:88px;
    padding:5px 5px 20px;
    overflow-x:auto;
    overflow-y:visible;
    -webkit-overflow-scrolling:touch;
  }
  .wel4u-editor-ribbon .wel4u-toolbar-group{
    flex:0 0 auto;
    min-height:68px;
    padding:4px 7px;
  }
  .wel4u-color-rows{min-width:320px}
  .wel4u-color-palette{
    position:fixed;
    top:110px;
    left:12px;
    right:12px;
    width:auto;
    max-width:360px;
    margin:auto;
  }
  .wel4u-editor-area{
    min-height:320px;
    padding:18px 15px;
  }
}


/* =========================================================
   v2.5.6 밝고 깨끗한 Word형 리본 테마
   ========================================================= */
.wel4u-editor-ribbon{
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  border-bottom-color:#dbe4ee!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}
.wel4u-ribbon-tabs{
  background:#fff!important;
  border-bottom:1px solid #e6edf5!important;
}
.wel4u-ribbon-tab{
  color:#64748b!important;
  background:transparent!important;
}
.wel4u-ribbon-tab:hover{
  color:#334155!important;
  background:#f8fbff!important;
}
.wel4u-ribbon-tab.is-active{
  color:#2563eb!important;
  background:#f7fbff!important;
}
.wel4u-ribbon-tab.is-active:after{
  background:#60a5fa!important;
}
.wel4u-ribbon-body{
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
}
.wel4u-editor-ribbon .wel4u-toolbar-group{
  border-right:1px solid #edf2f7!important;
}
.wel4u-editor-ribbon .wel4u-toolbar-group:after{
  color:#94a3b8!important;
}
.wel4u-editor-ribbon .wel4u-ribbon-body button,
.wel4u-editor-ribbon .wel4u-ribbon-body select{
  color:#475569!important;
  background:#fff!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
.wel4u-editor-ribbon .wel4u-ribbon-body button:hover,
.wel4u-editor-ribbon .wel4u-ribbon-body select:hover{
  color:#1e3a5f!important;
  background:#f1f7fd!important;
  border-color:#cfe0f2!important;
}
.wel4u-editor-ribbon .wel4u-ribbon-body button.is-active,
.wel4u-editor-ribbon .wel4u-ribbon-body button[aria-pressed="true"]{
  color:#1d4ed8!important;
  background:#eaf4ff!important;
  border-color:#bfdbfe!important;
}
.wel4u-editor-ribbon .wel4u-ribbon-body button:disabled{
  color:#cbd5e1!important;
  background:#f8fafc!important;
  border-color:transparent!important;
  opacity:1!important;
}
.wel4u-editor-ribbon select{
  color:#475569!important;
  background-color:#fff!important;
  border:1px solid #dbe5ef!important;
}
.wel4u-editor-ribbon select:focus{
  border-color:#93c5fd!important;
  box-shadow:0 0 0 2px #dbeafe!important;
  outline:0!important;
}
.wel4u-font-buttons button{color:#475569!important}
.wel4u-font-buttons b,
.wel4u-font-buttons i,
.wel4u-font-buttons u,
.wel4u-font-buttons s{color:inherit!important}

.wel4u-list-icon i,
.wel4u-align-icon i{background:#64748b!important}
.wel4u-list-icon b{color:#64748b!important}
.wel4u-editor-ribbon button:hover .wel4u-list-icon i,
.wel4u-editor-ribbon button:hover .wel4u-align-icon i,
.wel4u-editor-ribbon button.is-active .wel4u-align-icon i,
.wel4u-editor-ribbon button[aria-pressed="true"] .wel4u-align-icon i{background:#2563eb!important}
.wel4u-editor-ribbon button:hover .wel4u-list-icon b{color:#2563eb!important}

.wel4u-word-color{background:transparent!important}
.wel4u-word-color-main{
  background:#fff!important;
  color:#475569!important;
  border-color:#e2e8f0!important;
}
.wel4u-word-color-main:hover{
  background:#f4f9ff!important;
  border-color:#bfdbfe!important;
}
.wel4u-word-color-icon{color:#475569!important}
.wel4u-basic-colors{
  background:#fff!important;
  border-color:#e5edf5!important;
}
.wel4u-editor-ribbon .wel4u-basic-color{border-color:#d6dee8!important}
.wel4u-editor-ribbon .wel4u-basic-color:hover{outline-color:#60a5fa!important}
.wel4u-editor-ribbon .wel4u-palette-button{
  color:#64748b!important;
  background:#f8fbff!important;
  border-color:#dbe5ef!important;
}
.wel4u-editor-ribbon .wel4u-palette-button:hover{
  color:#2563eb!important;
  background:#eef6ff!important;
  border-color:#bfdbfe!important;
}
.wel4u-color-palette{
  background:#fff!important;
  border-color:#dbe5ef!important;
  box-shadow:0 12px 30px rgba(51,65,85,.14)!important;
}
.wel4u-color-palette>strong{color:#475569!important}
.wel4u-custom-color{
  color:#64748b!important;
  border-top-color:#edf2f7!important;
}

.wel4u-editor-ribbon .wel4u-ribbon-command{
  background:#fff!important;
  border-color:transparent!important;
}
.wel4u-editor-ribbon .wel4u-ribbon-command:hover{
  background:#f1f7fd!important;
  border-color:#cfe0f2!important;
}
.wel4u-command-icon{color:#64748b!important}
.wel4u-ribbon-command:hover .wel4u-command-icon{color:#3b82f6!important}
.wel4u-ribbon-command>span:last-child{color:#64748b!important}
.wel4u-ribbon-command:hover>span:last-child{color:#334155!important}

.wel4u-editor-area{
  background:#fff!important;
  color:#334155!important;
  border-top:0!important;
}
.wel4u-editor-status{
  background:#f8fafc!important;
  color:#94a3b8!important;
  border-top:1px solid #edf2f7!important;
}
.wel4u-editor-upload-status{color:#64748b!important}

.wel4u-image-edit-panel,
.wel4u-table-edit-panel,
.wel4u-preview-panel{
  background:#fff!important;
  border-top-color:#e2e8f0!important;
}
.wel4u-image-edit-head strong,
.wel4u-table-edit-head strong,
.wel4u-preview-head strong{color:#475569!important}
.wel4u-image-edit-actions button,
.wel4u-table-edit-actions button,
.wel4u-preview-head button{
  color:#475569!important;
  background:#fff!important;
  border-color:#dbe5ef!important;
}
.wel4u-image-edit-actions button:hover,
.wel4u-table-edit-actions button:hover,
.wel4u-preview-head button:hover{
  color:#2563eb!important;
  background:#f1f7fd!important;
  border-color:#bfdbfe!important;
}
.wel4u-draft-bar{
  background:#fffbeb!important;
  color:#785f2f!important;
  border-bottom-color:#fef3c7!important;
}
.wel4u-editor.wel4u-editor-fullscreen{background:#fff!important}

@media(max-width:760px){
  .wel4u-ribbon-tabs{background:#fff!important}
  .wel4u-ribbon-body{background:#fbfdff!important}
  .wel4u-color-palette{background:#fff!important}
}


/* =========================================================
   v2.5.7 색상칸 실제 색 표시 수정
   밝은 테마의 button background:white !important 보다 우선
   ========================================================= */
.wel4u-editor-ribbon .wel4u-basic-color{
  background-color:var(--wel4u-swatch-color,#ffffff)!important;
  background-image:none!important;
  border:1px solid rgba(71,85,105,.28)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.28)!important;
}
.wel4u-editor-ribbon .wel4u-basic-color:hover{
  background-color:var(--wel4u-swatch-color,#ffffff)!important;
  outline:2px solid #60a5fa!important;
  outline-offset:1px!important;
}
.wel4u-editor-ribbon .wel4u-palette-color{
  background-color:var(--wel4u-swatch-color,#ffffff)!important;
  background-image:none!important;
  border:1px solid rgba(71,85,105,.22)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)!important;
}
.wel4u-editor-ribbon .wel4u-palette-color:hover{
  background-color:var(--wel4u-swatch-color,#ffffff)!important;
  outline:2px solid #60a5fa!important;
  outline-offset:1px!important;
}
.wel4u-editor-ribbon .wel4u-word-color-current{
  background-color:var(--wel4u-swatch-color,#1e293b)!important;
}

/* 흰색 계열도 배경과 구분되도록 체크 느낌의 미세 테두리 */
.wel4u-editor-ribbon .wel4u-basic-colors{
  background:#f8fafc!important;
}
.wel4u-color-palette .wel4u-palette-grid{
  padding:4px;
  border-radius:5px;
  background:#f8fafc;
}


/* =========================================================
   v2.5.8 실제 색상칸을 버튼 내부 독립 CHIP으로 렌더링
   ========================================================= */

/* 버튼 자체는 밝은 UI 유지 */
.wel4u-editor-ribbon .wel4u-basic-color,
.wel4u-editor-ribbon .wel4u-palette-color{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#ffffff!important;
  background-image:none!important;
  overflow:visible!important;
}

/* 실제 색은 버튼의 자식 CHIP에 표시한다.
   inline style + !important로 밝은 테마와 완전히 분리 */
.wel4u-basic-color-chip{
  display:block!important;
  width:13px!important;
  height:13px!important;
  min-width:13px!important;
  min-height:13px!important;
  border:1px solid rgba(51,65,85,.30)!important;
  border-radius:2px!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)!important;
  pointer-events:none!important;
}
.wel4u-palette-color-chip{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:18px!important;
  min-height:18px!important;
  border:1px solid rgba(51,65,85,.24)!important;
  border-radius:2px!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)!important;
  pointer-events:none!important;
}

/* 이전 버전의 버튼 background-color 규칙은 더 이상 색상 표시용으로 사용하지 않는다 */
.wel4u-editor-ribbon .wel4u-basic-color{
  width:18px!important;
  min-width:18px!important;
  height:18px!important;
  min-height:18px!important;
  padding:2px!important;
}
.wel4u-editor-ribbon .wel4u-palette-color{
  width:100%!important;
  min-width:22px!important;
  height:22px!important;
  min-height:22px!important;
  padding:2px!important;
}

/* 현재 선택색 막대도 실제 색을 inline !important로 직접 표시 */
.wel4u-editor-ribbon .wel4u-word-color-current{
  display:block!important;
  border:1px solid rgba(51,65,85,.22)!important;
  min-height:4px!important;
}

/* 색상 묶음의 밝은 바탕 */
.wel4u-basic-colors{
  background:#f8fafc!important;
  padding:3px 4px!important;
}
.wel4u-palette-grid{
  background:#f8fafc!important;
  padding:5px!important;
}

/* 선택색/팔레트 색상에 흰색이 포함되어도 경계가 보이도록 */
.wel4u-basic-color-chip[data-visible-color="#ffffff"],
.wel4u-palette-color-chip[data-visible-color="#ffffff"]{
  border-color:#94a3b8!important;
  box-shadow:inset 0 0 0 1px #e2e8f0!important;
}


/* =========================================================
   v2.5.24 이미지 비율 크기 + 표/셀 너비·높이 조절
   ========================================================= */
.wel4u-image-edit-grid{
  grid-template-columns:minmax(220px,2fr) minmax(115px,.8fr) minmax(130px,.8fr) minmax(110px,.7fr);
}
.wel4u-image-size-control{
  display:grid;
  grid-template-columns:minmax(0,1fr) 38px;
  align-items:center;
  gap:5px;
}
.wel4u-image-size-control span{
  display:grid;
  place-items:center;
  min-height:38px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#f8fafc;
  color:#475569;
  font-size:.8rem;
  font-weight:800;
}
.wel4u-image-scale-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 8px;
}
.wel4u-image-scale-row button{
  min-height:34px;
  padding:6px 9px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font:inherit;
  font-size:.79rem;
  font-weight:800;
  cursor:pointer;
}
.wel4u-image-scale-row button:hover{
  background:#f1f5f9;
}
.wel4u-image-ratio-note{
  margin:0 0 10px;
  color:#64748b;
  font-size:.8rem;
}
.wel4u-editor-area img[width],
.board-content img[width],
.wel4u-preview-content img[width]{
  height:auto!important;
  max-width:100%;
}

.wel4u-table-size-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:10px;
}
.wel4u-table-size-grid fieldset{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  min-width:0;
  padding:11px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
}
.wel4u-table-size-grid legend{
  padding:0 5px;
  color:#334155;
  font-size:.8rem;
  font-weight:900;
}
.wel4u-table-size-grid label{
  display:grid;
  gap:5px;
  min-width:0;
  color:#475569;
  font-size:.78rem;
  font-weight:800;
}
.wel4u-table-size-grid label>div{
  display:grid;
  grid-template-columns:minmax(0,1fr) 58px;
  gap:5px;
}
.wel4u-table-size-grid input,
.wel4u-table-size-grid select{
  width:100%;
  min-width:0;
  min-height:36px;
  padding:6px 7px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#fff;
  color:#0f172a;
  font:inherit;
}
.wel4u-table-size-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:11px;
}
.wel4u-table-size-actions button{
  min-height:36px;
  padding:7px 11px;
  border:1px solid #94a3b8;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font:inherit;
  font-weight:800;
  cursor:pointer;
}
.wel4u-table-size-actions button:first-child{
  background:#334155;
  color:#fff;
}

/* 기존 강제 100%/520px 최소폭을 해제하고 사용자가 정한 크기를 우선 */
.wel4u-editor-area table{
  width:auto;
  max-width:none;
}
.editor-table-wrap table,
.board-content .editor-table-wrap table,
.wel4u-preview-content .editor-table-wrap table{
  min-width:0;
}
.wel4u-editor-area th,
.wel4u-editor-area td{
  min-width:0;
}
.editor-table-wrap table[style*="width"],
.board-content .editor-table-wrap table[style*="width"],
.wel4u-preview-content .editor-table-wrap table[style*="width"]{
  max-width:none;
}

@media(max-width:820px){
  .wel4u-image-edit-grid{
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:700px){
  .wel4u-image-edit-grid,
  .wel4u-table-size-grid{
    grid-template-columns:1fr;
  }
  .wel4u-table-size-grid fieldset{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   v2.5.33 페이지 콘텐츠 블록 편집
   ========================================================= */
.wel4u-block-edit-panel{
  margin-top:10px;
  padding:13px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
}
.wel4u-block-edit-panel[hidden]{display:none!important}
.wel4u-block-edit-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:11px;
}
.wel4u-block-edit-head>div{display:grid;gap:2px}
.wel4u-block-edit-head strong{font-size:.95rem}
.wel4u-block-edit-head small{color:#64748b}
.wel4u-block-edit-head>button{
  width:34px;height:34px;border:0;border-radius:8px;background:#f1f5f9;cursor:pointer;font-size:1.15rem
}
.wel4u-block-edit-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.wel4u-block-edit-grid label{display:grid;gap:5px;font-size:.8rem;font-weight:800;color:#475569}
.wel4u-block-edit-grid label.wide{grid-column:1/-1}
.wel4u-block-edit-grid input,.wel4u-block-edit-grid textarea,.wel4u-block-edit-grid select{
  width:100%;min-width:0;padding:9px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;font:inherit;color:#0f172a
}
.wel4u-block-photo-row,.wel4u-block-card-actions,.wel4u-block-edit-actions{
  display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:10px
}
.wel4u-block-photo-row small{color:#64748b}
.wel4u-block-edit-panel button[data-block-photo],
.wel4u-block-edit-panel button[data-block-card-add],
.wel4u-block-edit-panel button[data-block-card-delete],
.wel4u-block-edit-panel button[data-block-apply],
.wel4u-block-edit-panel button[data-block-delete]{
  min-height:36px;padding:7px 11px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;font:inherit;font-size:.8rem;font-weight:800;cursor:pointer
}
.wel4u-block-edit-panel button[data-block-apply]{background:#0f172a;color:#fff;border-color:#0f172a}
.wel4u-block-edit-panel button.danger{color:#b91c1c;border-color:#fecaca;background:#fff}
.wel4u-editor-area .cms-content-block{
  position:relative;
  margin:20px 0;
  cursor:default;
}
.wel4u-editor-area .cms-content-block[data-editor-block-selected]{
  outline:3px solid #94a3b8;
  outline-offset:4px;
}
.wel4u-editor-area .cms-photo-card[data-editor-card-selected]{
  outline:3px solid #475569;
  outline-offset:2px;
}

/* 편집기에서도 실제 페이지와 유사한 블록 미리보기 */
.wel4u-editor-area .cms-card-grid{display:grid;gap:16px}
.wel4u-editor-area .cms-card-grid.cms-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.wel4u-editor-area .cms-card-grid.cms-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.wel4u-editor-area .cms-card-grid.cms-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.wel4u-editor-area .cms-photo-card{
  overflow:hidden;border:1px solid #e2e8f0;border-radius:14px;background:#fff
}
.wel4u-editor-area .cms-photo-card>img{
  display:block;width:100%;height:180px!important;object-fit:cover
}
.wel4u-editor-area .cms-card-photo-placeholder,
.wel4u-editor-area .cms-block-image-placeholder{
  display:grid;place-items:center;min-height:180px;padding:18px;background:#eef2f7;color:#64748b;font-weight:800;text-align:center
}
.wel4u-editor-area .cms-card-body{padding:15px}
.wel4u-editor-area .cms-card-body h3{margin:0 0 7px}
.wel4u-editor-area .cms-card-body p{margin:0 0 12px}
.wel4u-editor-area .cms-card-body a,
.wel4u-editor-area .cms-block-copy a,
.wel4u-editor-area .cms-button-row a{
  display:inline-flex;padding:8px 11px;border-radius:8px;background:#0f172a;color:#fff;text-decoration:none;font-weight:800
}
.wel4u-editor-area .cms-block-image-text{
  display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:22px;align-items:center;padding:18px;border:1px solid #e2e8f0;border-radius:16px
}
.wel4u-editor-area .cms-block-image-text>img{
  width:100%;height:260px!important;object-fit:cover;border-radius:12px
}
.wel4u-editor-area .cms-block-banner{
  padding:34px;border-radius:18px;background:#f1f5f9;text-align:center
}
.wel4u-editor-area .cms-block-callout{
  padding:20px 22px;border-left:5px solid #64748b;border-radius:10px;background:#f8fafc
}
.wel4u-editor-area .cms-block-buttons{
  padding:22px;border:1px solid #e2e8f0;border-radius:14px;background:#fff
}
.wel4u-editor-area .cms-button-row{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}

@media(max-width:800px){
  .wel4u-editor-area .cms-card-grid.cms-cols-3,
  .wel4u-editor-area .cms-card-grid.cms-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .wel4u-editor-area .cms-block-image-text{grid-template-columns:1fr}
}
@media(max-width:560px){
  .wel4u-block-edit-grid{grid-template-columns:1fr}
  .wel4u-block-edit-grid label.wide{grid-column:auto}
  .wel4u-editor-area .cms-card-grid,
  .wel4u-editor-area .cms-card-grid.cms-cols-2,
  .wel4u-editor-area .cms-card-grid.cms-cols-3,
  .wel4u-editor-area .cms-card-grid.cms-cols-4{grid-template-columns:1fr}
}


/* =========================================================
   v2.5.34 콘텐츠 블록 탭 표시 핫픽스
   ========================================================= */
.wel4u-editor-ribbon[data-active-tab="blocks"] .wel4u-toolbar-group[data-ribbon-tab="blocks"]{
  display:flex!important;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
}
.wel4u-editor-ribbon[data-active-tab="blocks"] .wel4u-block-command,
.wel4u-editor-ribbon[data-active-tab="blocks"] [data-ribbon-tab="blocks"]>.wel4u-ribbon-command{
  min-width:72px;
}
@media(max-width:760px){
  .wel4u-editor-ribbon[data-active-tab="blocks"] .wel4u-toolbar-group[data-ribbon-tab="blocks"]{
    min-width:max-content;
  }
}


/* =========================================================
   v2.5.75 이모티콘 도구
   ========================================================= */
.wel4u-emoji-control{
  position:relative;
  display:inline-flex;
  align-items:stretch;
}
.wel4u-emoji-palette{
  position:absolute;
  z-index:80;
  top:calc(100% + 7px);
  left:0;
  width:286px;
  max-width:min(286px,82vw);
  padding:10px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  box-shadow:0 14px 34px rgba(15,23,42,.16);
}
.wel4u-emoji-palette[hidden]{
  display:none!important;
}
.wel4u-emoji-palette>strong{
  display:block;
  margin-bottom:7px;
  color:#475569;
  font-size:.72rem;
}
.wel4u-emoji-grid{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:4px;
}
.wel4u-emoji-item{
  display:flex;
  width:30px;
  height:30px;
  align-items:center;
  justify-content:center;
  padding:0;
  border:1px solid transparent;
  border-radius:7px;
  background:#fff;
  font-size:1.08rem;
  line-height:1;
  cursor:pointer;
}
.wel4u-emoji-item:hover,
.wel4u-emoji-item:focus-visible{
  border-color:#bfdbfe;
  background:#eff6ff;
  outline:none;
}
@media(max-width:520px){
  .wel4u-emoji-palette{
    width:246px;
  }
  .wel4u-emoji-grid{
    grid-template-columns:repeat(7,minmax(0,1fr));
  }
}


/* =========================================================
   v2.5.76 카테고리형 확장 이모티콘 팔레트
   ========================================================= */
.wel4u-emoji-palette{
  width:390px;
  max-width:min(390px,88vw);
}
.wel4u-emoji-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.wel4u-emoji-head>strong{
  color:#334155;
  font-size:.76rem;
}
.wel4u-emoji-head>small{
  color:#94a3b8;
  font-size:.57rem;
  line-height:1.3;
  text-align:right;
}
.wel4u-emoji-tabs{
  display:flex;
  gap:4px;
  margin:0 -2px 8px;
  padding:2px;
  overflow-x:auto;
  scrollbar-width:thin;
}
.wel4u-emoji-tab{
  flex:0 0 auto;
  min-height:28px;
  padding:4px 8px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#f8fafc;
  color:#64748b;
  font-size:.6rem;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.wel4u-emoji-tab:hover,
.wel4u-emoji-tab:focus-visible,
.wel4u-emoji-tab.active{
  border-color:#93c5fd;
  background:#eff6ff;
  color:#1d4ed8;
  outline:none;
}
.wel4u-emoji-grid{
  grid-template-columns:repeat(10,minmax(0,1fr));
  max-height:230px;
  overflow-y:auto;
  padding-right:3px;
}
@media(max-width:520px){
  .wel4u-emoji-palette{
    width:292px;
  }
  .wel4u-emoji-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .wel4u-emoji-head>small{
    text-align:left;
  }
  .wel4u-emoji-grid{
    grid-template-columns:repeat(7,minmax(0,1fr));
    max-height:250px;
  }
}
