/* Extracted from create-community.html */
.comm-wrap{--cc-banner-overlap:40px;--cc-wrap-pad:var(--page-side-pad,20px);--cc-banner-height:200px;--cc-banner-fill:none;--cc-banner-empty-bg:var(--surface);max-width:1180px;margin:0 auto;padding:var(--page-top-gap) var(--cc-wrap-pad) var(--page-bottom-gap);position:relative}
.comm-wrap > *{position:relative;z-index:1}

.cc-editor-layout{
  display:grid;
  grid-template-columns:minmax(220px,390px) 732px;
  gap:18px;
  align-items:start;
  margin:0 0 40px;
}
.cc-editor-form,
.cc-editor-preview{
  min-width:0;
}
.cc-editor-preview{width:732px;align-self:start}
.cc-preview-stack{min-width:0;display:flex;flex-direction:column}
.cc-editor-form{
  --cc-form-edge-gap:22px;
  position:relative;
  background:var(--white);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.cc-form-card{
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  padding:0 var(--cc-form-edge-gap) var(--cc-form-edge-gap);
}
.cc-form-media{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:18px;
}
.cc-media-btn{
  height:40px;
  border:1.5px solid var(--border-strong);
  border-radius:999px;
  background:#fff;
  color:var(--text2);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-family:var(--site-font);
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  transition:background .15s,border-color .15s,transform .15s,box-shadow .15s;
}
.cc-media-btn svg,.cc-media-btn i{width:15px;height:15px}
.cc-media-btn:hover{
  background:var(--bg-hover,#f5f5f5);
  border-color:#cfcfc8;
}
.cc-preview-toggle{display:none}

.cc-preview-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:1200;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.42);
}
.cc-preview-modal.open{display:flex}
.cc-preview-dialog{
  position:relative;
  width:min(900px,100%);
  max-height:calc(100vh - 36px);
  box-sizing:border-box;
  overflow:auto;
  border:1px solid var(--border);
  border-radius:24px;
  background:var(--white);
  box-shadow:0 28px 80px rgba(0,0,0,.22);
}
.cc-preview-dialog-head{
  height:52px;
  padding:0 14px 0 20px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.cc-preview-dialog-head h2{
  margin:0;
  font-size:18px;
  font-weight:800;
  line-height:1;
}
.cc-preview-close{
  flex:0 0 auto;
  width:34px;
  height:34px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .15s,color .15s;
}
.cc-preview-close:hover{background:var(--bg-hover,#f5f5f5);color:var(--text)}
.cc-preview-close svg,.cc-preview-close i{width:19px;height:19px}
.cc-preview-dialog .comm-content-grid{flex:none}
.cc-preview-dialog :is(.cc-preview-post-shell,.cc-preview-widget){height:auto}
.cc-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin:0 0 10px;
  min-width:0;
}
.cc-field-label{
  display:block;
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:-.02em;
}
.cc-form-input,
.cc-form-textarea-frame,
.cc-form-handle,
.cc-form-country-btn{
  width:100%;
  box-sizing:border-box;
  border:1px solid var(--border-strong);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  font-family:var(--site-font);
  font-size:14px;
  font-weight:700;
  outline:none;
  transition:border-color .2s ease,box-shadow .2s ease,background .2s ease;
}
.cc-form-input,
.cc-form-handle,
.cc-form-country-btn{
  height:42px;
}
.cc-form-input{
  padding:0 13px;
}
.cc-form-textarea-frame{
  display:block;
  height:104px;
  min-height:104px;
  max-height:104px;
  overflow:hidden;
}
.cc-form-textarea{
  display:block;
  width:calc(100% - 4px);
  height:calc(100% - 8px);
  min-height:0;
  max-height:none;
  box-sizing:border-box;
  margin:4px 4px 4px 0;
  border:0;
  border-radius:0;
  outline:0;
  resize:none;
  padding:7px 9px 7px 13px;
  background:transparent;
  color:var(--text);
  font-family:var(--site-font);
  font-size:14px;
  font-weight:700;
  line-height:1.55;
  overflow-y:scroll;
}
.cc-form-textarea::-webkit-scrollbar{width:5px}
.cc-form-textarea::-webkit-scrollbar-track{
  margin-block:4px;
  background:transparent;
}
.cc-form-textarea::-webkit-scrollbar-thumb{
  min-height:24px;
  border-radius:999px;
  background:#d8d8d3;
}
.cc-form-input:focus,
.cc-form-textarea-frame:focus-within,
.cc-form-handle:focus-within,
.cc-form-country-btn:focus{
  border-color:var(--orange);
  box-shadow:0 0 0 3px rgba(255,34,34,.08);
}
.cc-form-handle{
  display:flex;
  align-items:center;
  padding:0 13px;
}
.cc-form-handle-prefix{
  flex:0 0 auto;
  color:var(--muted2);
  font-size:14px;
  font-weight:700;
  user-select:none;
  transition:color .18s ease;
}
.cc-form-handle:focus-within .cc-form-handle-prefix{color:var(--text)}
.cc-form-handle-input{
  flex:1;
  min-width:0;
  height:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  padding:0 0 0 2px;
}
.cc-form-handle-input::placeholder{color:var(--muted2);-webkit-text-fill-color:var(--muted2);opacity:1}
.cc-form-country-btn{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 13px;
  cursor:pointer;
  text-align:left;
}
.cc-form-country-btn span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cc-form-country-btn svg{width:16px;height:16px;flex:0 0 auto;color:var(--text3)}
.cc-editor-form .comm-actions{
  margin-top:18px;
  transform:none;
}
.comm-top-shell{
  margin:var(--page-top-gap,20px) 0 0;
  position:relative;
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--white);
  box-shadow:var(--shadow-sm);
}
.comm-top-shell::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  box-shadow:inset 0 0 0 1px var(--border);
  pointer-events:none;
  z-index:4;
}
.comm-page-head{
  background:var(--white);
  padding:16px 24px;
  position:relative;
  z-index:1;
}
body.community-edit-mode .comm-page-head{display:block}
.comm-page-head h1{
  margin:0;
  color:var(--text);
  font-size:18px;
  font-weight:900;
  letter-spacing:-.4px;
  line-height:1.25;
}
.comm-page-head-main{display:inline}
.comm-page-head-sep{display:inline;color:var(--muted)}
.comm-page-head-sub{
  display:inline;
  font-size:.66em;
  font-weight:700;
  color:var(--text3);
  letter-spacing:-.3px;
}
.cc-editor-form .comm-page-head{
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  padding:var(--cc-form-edge-gap);
}
.cc-editor-form .comm-page-head h1{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.cc-editor-form .comm-page-head-main,
.cc-editor-form .comm-page-head-sub{
  display:block;
}
.cc-editor-preview .comm-top-shell{
  margin:0;
  border:1px solid var(--border);
  border-bottom:0;
  border-radius:var(--radius) var(--radius) 0 0;
  overflow:visible;
  background:var(--white);
  box-shadow:var(--shadow-sm);
}
.cc-editor-preview .comm-top-shell::before{
  display:none;
}
.cc-editor-preview .comm-page-head{
  background:var(--white);
  border:0;
  border-radius:calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  box-shadow:none;
  box-sizing:border-box;
  height:30px;
  min-height:0;
  padding:0 14px;
  display:flex;
  align-items:center;
  position:relative;
  z-index:1;
}
.cc-editor-preview .comm-page-head h1{
  display:flex;
  height:100%;
  align-items:center;
  margin:0;
  color:#8A8A86;
  font-size:12px;
  font-weight:600;
  line-height:1;
}
.cc-editor-preview :is(.comm-banner,.comm-avatar,.comm-country-btn){
  cursor:default;
  pointer-events:none;
}
.cc-editor-preview :is(.comm-av-overlay,.comm-banner-remove){
  display:none!important;
}

/* 배너 */
.comm-banner{width:100%;height:var(--cc-banner-height);background:var(--cc-banner-empty-bg);border:none;border-radius:0;box-shadow:none;overflow:hidden;position:relative;cursor:pointer;transition:opacity .15s}
.comm-banner.has-image{height:var(--cc-banner-total-height)}
.comm-banner.has-image::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--cc-banner-overlap);background-color:var(--surface);background-image:var(--cc-banner-fill);background-size:var(--cc-banner-fill-size,100% 100%);background-position:var(--cc-banner-fill-position,center top);background-repeat:no-repeat;z-index:0;pointer-events:none}
.comm-banner img{
  position:absolute;
  left:var(--cc-banner-image-left,0px);
  top:0;
  width:var(--cc-banner-image-width,100%);
  height:var(--cc-banner-image-height,calc(100% - var(--cc-banner-overlap)));
  max-width:none;
  display:block;
  z-index:1;
}
.comm-banner-empty{position:absolute;left:0;right:0;top:0;height:calc(100% - var(--cc-banner-overlap));background:var(--cc-banner-empty-bg);display:grid;place-content:center;justify-items:center;gap:8px;color:var(--muted);text-align:center;padding:0 16px}
.cc-editor-preview .comm-banner{
  box-sizing:border-box;
  width:calc(100% + 2px);
  border:1px solid var(--border);
  border-bottom:0;
  border-radius:var(--radius) var(--radius) 0 0;
  box-shadow:none;
  margin:-1px -1px 0;
  position:relative;
  z-index:2;
}
.comm-banner-empty svg,.comm-banner-empty i{opacity:.4;flex-shrink:0}
.comm-banner-placeholder-icon{width:36px;height:36px}
.comm-banner-placeholder-title{font-size:12px;font-weight:700;line-height:1.25}
.comm-banner-placeholder-title,.comm-banner-size{display:block}
.comm-banner-size{font-size:11px;font-weight:600;line-height:1.2;color:var(--muted2)}
.comm-banner-remove{
  position:absolute;
  top:10px;
  right:10px;
  z-index:4;
  width:32px;
  height:32px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.82);
  color:var(--text2);
  box-shadow:0 8px 18px rgba(26,24,20,.13);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0;
  line-height:0;
  cursor:pointer;
  padding:0;
  opacity:0;
  pointer-events:none;
  transform:scale(.94);
  transition:opacity .18s ease,background .15s,box-shadow .15s,transform .18s cubic-bezier(.2,.74,.2,1);
}
.comm-banner.has-image:hover .comm-banner-remove{
  opacity:1;
  pointer-events:auto;
  transform:scale(1);
}
.comm-banner-remove svg{
  position:absolute;
  left:50%;
  top:50%;
  width:16px;
  height:16px;
  display:block;
  transform:translate(-50%,-50%);
  stroke:currentColor;
  stroke-width:2.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}
.comm-banner-remove:hover{background:#fff;box-shadow:0 10px 22px rgba(26,24,20,.16)}

/* 프로필 + 정보 영역 */
.comm-info-card{background:var(--white);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);margin-top:calc(var(--cc-banner-overlap) * -1);position:relative;z-index:2;padding:0 28px 29px}
.comm-avatar-row{display:flex;align-items:flex-end;gap:20px;margin-top:calc(var(--cc-banner-overlap) * -.9)}
.comm-avatar{width:96px;height:96px;margin-bottom:-6px;border-radius:50%;border:var(--avatar-border,1px solid var(--border-light));background:var(--avatar-bg,#f9f9f9);box-shadow:0 2px 12px rgba(0,0,0,.1);overflow:hidden;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--muted);cursor:pointer;position:relative}
.comm-avatar img{width:100%;height:100%;object-fit:cover}
.comm-avatar:has(> img){background:#fff}
.comm-avatar > svg{width:53%;height:53%;display:block}
.comm-avatar:hover .comm-av-overlay{opacity:1}
.comm-av-overlay{position:absolute;inset:0;background:rgba(0,0,0,.38);display:flex;align-items:center;justify-content:center;gap:6px;opacity:0;transition:opacity .18s}
.comm-av-btn{width:30px;height:30px;border:none;background:rgba(255,255,255,.18);color:#fff;cursor:pointer;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background .15s}
.comm-av-btn:hover{background:rgba(255,255,255,.35)}
.comm-av-btn svg,.comm-av-btn i{width:16px;height:16px;flex-shrink:0}
.comm-name-row{flex:1;min-width:0;display:flex;align-items:center;gap:10px;flex-wrap:nowrap;padding-bottom:6px}
.comm-name-col{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;gap:0;padding-bottom:2px;transform:translateY(8px)}
.comm-name-col .comm-name-row{flex:none;width:100%;padding-bottom:0}
.cc-editor-preview .comm-name-col{transform:translateY(6px)}
body.community-create-mode .comm-top-shell,
body.community-edit-mode .comm-top-shell{box-shadow:0 12px 24px rgba(0,0,0,.08)}
body.community-create-mode .cc-editor-preview .comm-top-shell,
body.community-edit-mode .cc-editor-preview .comm-top-shell{box-shadow:none}
body.community-create-mode .comm-info-card,
body.community-edit-mode .comm-info-card{box-shadow:0 12px 24px rgba(0,0,0,.08)}
.cc-name-inline-wrap{
  position:relative;
  flex:0 1 auto;
  min-width:120px;
  max-width:100%;
  transition:width .24s ease;
  will-change:width;
}
.cc-preview-name-wrap{min-width:0}
.cc-name-measure{
  position:absolute;
  left:0;
  top:0;
  visibility:hidden;
  pointer-events:none;
  white-space:pre;
  font-family:var(--site-font);
  font-size:25px;
  font-weight:700;
  letter-spacing:-.3px;
  line-height:32px;
}
.cc-inline-input{
  width:100%;
  border:none;
  outline:none;
  font-family:var(--site-font);
  background:transparent;
  color:var(--text);
}
.cc-inline-input::placeholder{color:var(--muted2)}
.cc-name-input{
  display:block;
  width:100%;
  min-width:0;
  font-size:25px;
  font-weight:700;
  letter-spacing:-.3px;
  height:32px;
  padding:0;
  line-height:32px;
}
.cc-desc-input{
  width:100%;
  border:none;
  outline:none;
  font-family:var(--site-font);
  background:transparent;
  color:var(--text3);
  font-size:13px;
  line-height:1.7;
  resize:none;
  padding:0;
  min-height:20px;
  margin-top:12px;
  transform:translateY(5px);
}
.cc-desc-input::placeholder{color:var(--muted2)}
.cc-handle-row{
  display:flex;
  align-items:center;
  min-height:19px;
  margin-top:-2px;
  color:var(--muted);
  font-family:var(--site-font);
  font-size:14px;
  font-weight:700;
  line-height:1.35;
  letter-spacing:normal;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.cc-handle-prefix{
  flex:0 0 auto;
  color:var(--muted);
  font-weight:700;
}
.cc-handle-input{
  flex:0 1 auto;
  min-width:0;
  width:auto;
  color:var(--muted);
  font-size:14px;
  font-weight:700;
  line-height:1.35;
}

/* 메타 영역 */
.comm-meta-row{display:flex;align-items:center;gap:16px;margin-top:14px;flex-wrap:wrap;transform:translateY(5px)}
.comm-meta-item{font-size:12px;color:var(--muted);font-weight:700;display:flex;align-items:center;gap:4px}
.comm-meta-item b{color:var(--text2);font-family:'Bebas Neue',sans-serif;font-size:16px}

/* 국가 선택 버튼 */
.comm-country,
.comm-country-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
  min-height:26px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid #c7cec9;
  background:#fff;
  color:#555b57;
  font-size:11px;
  font-weight:500;
  cursor:pointer;
  font-family:var(--site-font);
  white-space:nowrap;
  line-height:1;
  box-shadow:0 1px 2px rgba(0,0,0,.03);
  transition:background .15s,border-color .15s,transform .24s cubic-bezier(.22,.72,.2,1),box-shadow .15s,color .15s;
  will-change:transform;
  overflow:hidden;
}
.comm-country::before,
.comm-country-btn::before{
  content:'';
  width:6px;
  height:6px;
  border-radius:50%;
  background:#929a94;
  flex-shrink:0;
}
.comm-country:empty{display:none}
.comm-country-btn:hover{
  background:#fff;
  border-color:#c7cec9;
  color:#555b57;
  transform:none;
  box-shadow:0 1px 2px rgba(0,0,0,.03);
}
.comm-country-btn:active{
  transform:translateY(0) scale(.98);
  box-shadow:none;
}
.comm-country-btn:not(.selected){
  color:#555b57;
  border-color:#c7cec9;
}
.comm-country-btn:not(.selected)::before{
  background:#929a94;
}
.comm-country-btn.selected{
  color:#555b57;
  border-color:#c7cec9;
}
.comm-country-btn #countryDisplay,
.comm-country-btn #countryDisplayPreview,
.comm-country#countryDisplayPreview{display:inline-flex;align-items:center;line-height:1}
.cc-preview-country{
  cursor:default;
  pointer-events:none;
}
.cc-preview-name{
  margin:0;
  min-width:0;
  max-width:100%;
  color:var(--text);
  font-family:var(--site-font);
  font-size:25px;
  font-weight:700;
  line-height:32px;
  letter-spacing:-.3px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.cc-preview-handle{
  min-height:19px;
  margin-top:0;
  color:var(--muted);
  font-family:var(--site-font);
  font-size:14px;
  font-weight:700;
  line-height:1.35;
  letter-spacing:normal;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.cc-preview-desc{
  width:100%;
  min-height:0;
  height:0;
  margin-top:0;
  box-sizing:border-box;
  color:var(--text3);
  font-family:var(--site-font);
  font-size:13px;
  line-height:1.7;
  white-space:pre-wrap;
  word-break:break-word;
  opacity:0;
  overflow:hidden;
  transform:translateY(0);
  transition:margin-top .24s ease,opacity .18s ease,transform .24s ease;
}
.cc-preview-desc.is-visible{
  margin-top:12px;
  opacity:1;
  transform:translateY(5px);
}
/* 현재 커뮤니티 하단 틀 미리보기 */
.cc-editor-preview .comm-content-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(160px,259px);
  gap:12px;
  flex:1 1 auto;
  margin-top:18px;
  margin-bottom:0;
  padding:0 2px;
  pointer-events:none;
  user-select:none;
}
.cc-editor-preview .comm-content-main{min-width:0;display:flex}
.cc-editor-preview .comm-content-side{align-self:stretch;display:flex}
.cc-preview-post-shell{
  min-height:230px;
  width:100%;
  height:100%;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  box-shadow:var(--shadow-sm);
}
.cc-preview-post-empty{
  color:var(--muted2);
  font-size:13px;
  font-weight:500;
  line-height:1.7;
  text-align:center;
}
.cc-preview-widget{
  min-height:230px;
  width:100%;
  height:100%;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.cc-preview-side-empty{
  color:var(--muted2);
  font-size:12px;
  font-weight:500;
  line-height:1.7;
  text-align:center;
}

/* 하단 버튼 */
.comm-actions{display:flex;align-items:center;gap:8px;margin-top:16px;transform:translateY(5px)}
.comm-submit-btn{padding:8px 24px;border-radius:999px;border:none;background:linear-gradient(135deg,var(--orange),var(--orange2));color:#fff;font-weight:800;font-size:13px;cursor:pointer;font-family:var(--site-font);box-shadow:0 2px 8px rgba(255,69,0,.3);transition:all .15s}
.comm-submit-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(255,69,0,.4)}
.comm-submit-btn:active{transform:translateY(0) scale(.98);box-shadow:0 3px 10px rgba(255,69,0,.3)}
.comm-submit-btn:disabled{opacity:.5;cursor:not-allowed;transform:none}
.comm-cancel-btn{padding:8px 20px;border-radius:999px;border:1.5px solid var(--border-strong);background:#fff;color:var(--text3);font-weight:700;font-size:13px;cursor:pointer;font-family:var(--site-font);transition:all .15s}
.comm-cancel-btn:hover{background:#fff;border-color:#bcbcb6;transform:translateY(-1px);box-shadow:0 4px 10px rgba(0,0,0,.12)}
.comm-cancel-btn:active{transform:translateY(0) scale(.98);box-shadow:inset 0 1px 2px rgba(0,0,0,.08)}

/* 글자수 */
.cc-char-hint{font-size:11px;color:var(--muted2);margin-top:4px;text-align:right}

/* 국가 모달 */
.cc-country-modal{display:none;position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,.4);align-items:center;justify-content:center}
.cc-country-modal.open{display:flex}
.cc-country-box{background:#fff;border-radius:24px;width:90%;max-width:420px;height:min(520px,70vh);max-height:70vh;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.2);display:flex;flex-direction:column}
.cc-country-header{padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.cc-country-header h3{font-size:15px;font-weight:800;margin:0}
.cc-country-close{background:none;border:none;cursor:pointer;color:var(--text3);padding:4px}
.cc-country-close:hover{background:transparent}
.cc-country-search{padding:12px 16px;border-bottom:none}
.cc-country-search-input{position:relative;display:flex;align-items:center}
.cc-country-search-input i,.cc-country-search-input svg{position:absolute;left:12px;width:15px;height:15px;color:var(--muted);pointer-events:none}
.cc-country-search input{width:100%;height:36px;border:1.5px solid var(--border-strong);border-radius:999px;padding:0 10px 0 34px;font-size:14px;font-family:var(--site-font);outline:none;background:#fff;transition:border-color .15s,background .15s,box-shadow .15s}
.cc-country-search input:focus{border-color:var(--orange);background:#fff;box-shadow:0 0 0 3px rgba(255,69,0,.08)}
.cc-country-list{overflow-y:auto;overflow-x:hidden;padding:0 2px 8px 0;flex:1 1 auto;min-height:0}
.cc-country-group-title{padding:9px 20px 5px;color:var(--muted);font-size:12px;font-weight:800;line-height:1.2;letter-spacing:-.1px}
.cc-country-item{display:flex;align-items:center;gap:10px;width:calc(100% + 10px);box-sizing:border-box;padding:11px 20px;cursor:pointer;font-size:15px;transition:background .1s}
.cc-country-item:hover{background:var(--bg-hover,#f5f5f5)}
.cc-country-item.selected{background:var(--bg-hover,#f5f5f5);color:var(--text)}
.cc-country-item .flag{--country-flag-size:15px;display:inline-flex;align-items:center;justify-content:center;width:auto;height:auto;flex:0 0 auto;overflow:visible;color:currentColor;font-size:var(--country-flag-size);line-height:1}
.cc-country-item .flag svg{width:var(--country-flag-size);height:var(--country-flag-size);display:block}

/* 프로필 페이지와 동일한 이미지 수정 시스템 */
.avatar-edit-overlay{
  display:none;position:fixed;inset:0;z-index:1100;
  align-items:center;justify-content:center;padding:18px;
  background:rgba(0,0,0,.42);
}
.avatar-edit-overlay.open{display:flex}
.avatar-edit-modal{
  width:90%;max-width:420px;height:min(468px,calc(100vh - 36px));
  box-sizing:border-box;padding:22px;
  display:grid;grid-template-rows:auto auto auto auto;align-content:space-between;
  background:#fff;border:1px solid var(--border);border-radius:24px;
  box-shadow:0 28px 80px rgba(0,0,0,.22);
}
.avatar-edit-head{display:flex;align-items:center;justify-content:center;position:relative}
.avatar-edit-title{font-size:18px;font-weight:800;color:var(--text)}
.avatar-edit-close{
  position:absolute;right:0;top:50%;transform:translateY(-50%);
  display:flex;align-items:center;justify-content:center;padding:4px;
  border:0;background:none;color:var(--text3);cursor:pointer;
  transition:transform .15s;
}
.avatar-edit-close:hover{background:transparent}
.avatar-edit-close:active{transform:translateY(-50%) scale(.96)}
.avatar-edit-preview{
  width:250px;height:250px;flex:0 0 250px;aspect-ratio:1/1;
  margin:0 auto;border-radius:50%;overflow:hidden;position:relative;
  display:flex;align-items:center;justify-content:center;touch-action:none;
  background:var(--avatar-bg,#f9f9f9);border:var(--avatar-border,1px solid var(--border-light));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 8px 26px rgba(0,0,0,.09);
}
.avatar-edit-preview img{
  position:absolute;left:50%;top:50%;display:none;
  width:auto;height:auto;max-width:none;max-height:none;
  transform:translate(-50%,-50%) scale(1);transform-origin:center;
  user-select:none;-webkit-user-drag:none;
}
.avatar-edit-preview.has-image{cursor:grab;background:#fff}
.avatar-edit-preview.has-image:active{cursor:grabbing}
.avatar-edit-preview.has-image img{display:block}
.avatar-edit-preview.has-image .avatar-edit-empty{display:none}
.avatar-edit-empty{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  color:var(--text3);font-size:13px;font-weight:700;text-align:center;
}
.avatar-edit-tools{position:relative;margin:0 4px}
.avatar-edit-preview:not(.has-image) + .avatar-edit-tools{display:none}
.avatar-edit-modal:has(.avatar-edit-preview:not(.has-image)){
  grid-template-rows:auto minmax(0,1fr) auto minmax(0,1fr) auto;
}
.avatar-edit-modal:has(.avatar-edit-preview:not(.has-image)) .avatar-edit-preview{grid-row:3;margin:0 auto}
.avatar-edit-modal:has(.avatar-edit-preview:not(.has-image)) .avatar-edit-actions{grid-row:5}
.avatar-edit-range-label{position:absolute;left:0;top:-20px;font-size:12px;font-weight:800;color:var(--text2)}
.avatar-edit-range{
  width:100%;height:18px;margin:0 0 6px;border:0;outline:0;
  appearance:none;-webkit-appearance:none;background:transparent;accent-color:#EC221F;
}
.avatar-edit-range::-webkit-slider-runnable-track{height:8px;border:0;border-radius:999px;background:#deded9}
.avatar-edit-range::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;margin-top:-4px;border:0;border-radius:50%;background:#EC221F}
.avatar-edit-range::-moz-range-track{height:8px;border:0;border-radius:999px;background:#deded9}
.avatar-edit-range::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:50%;background:#EC221F}
.avatar-edit-help{margin:0;color:var(--muted);font-size:12px;line-height:1.45;text-align:center}
.avatar-edit-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin:0}
.avatar-edit-action{
  min-width:58px;min-height:32px;padding:6px 12px;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  border-radius:999px;font-family:var(--site-font);font-size:12px;
  font-weight:800;line-height:1;letter-spacing:-.2px;white-space:nowrap;cursor:pointer;
  transition:all .15s;
}
.avatar-edit-action svg{width:14px;height:14px;flex-shrink:0}
.avatar-edit-action:not(.avatar-edit-save){background:#fff;border:1.5px solid var(--border-strong);color:var(--text2)}
.avatar-edit-action:not(.avatar-edit-save):hover{background:#fff;border-color:#bcbcb6;transform:translateY(-1px);box-shadow:0 4px 10px rgba(0,0,0,.12)}
.avatar-edit-action:not(.avatar-edit-save):active{transform:translateY(0) scale(.98);box-shadow:inset 0 1px 2px rgba(0,0,0,.08)}
.avatar-edit-delete{color:#EC221F!important;border-color:#ffd5d5!important}
.avatar-edit-save{border:0;background:linear-gradient(135deg,var(--orange),var(--orange2));color:#fff;box-shadow:0 2px 8px rgba(255,69,0,.3)}
.avatar-edit-save:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(255,69,0,.4)}
.avatar-edit-save:active{transform:translateY(0) scale(.98);box-shadow:0 3px 10px rgba(255,69,0,.3)}
.avatar-edit-save:disabled{background:#ddd;color:#fff;box-shadow:none;cursor:not-allowed;transform:none}
.community-image-edit-modal.is-banner{
  width:90%;max-width:560px;height:auto;min-height:298px;
  grid-template-rows:auto auto auto auto;
  align-content:start;
  row-gap:0;
}
.community-image-edit-modal.is-banner .avatar-edit-head{
  margin-bottom:22px;
}
.community-image-edit-modal.is-banner .avatar-edit-preview{
  width:100%;height:auto;max-width:none;flex-basis:auto;
  aspect-ratio:975/160;margin:0 auto 30px;border-radius:14px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.72),0 0 22px rgba(0,0,0,.12);
}
.community-image-edit-modal.is-banner .avatar-edit-tools{
  margin:0 4px 22px;
}
.community-image-edit-modal.is-banner:has(.avatar-edit-preview:not(.has-image)){
  grid-template-rows:auto minmax(0,1fr) auto minmax(0,1fr) auto;
  align-content:stretch;
}
.community-image-edit-modal.is-banner:has(.avatar-edit-preview:not(.has-image)) .avatar-edit-head{
  margin-bottom:0;
}
.community-image-edit-modal.is-banner:has(.avatar-edit-preview:not(.has-image)) .avatar-edit-preview{
  grid-row:3;
  margin:0 auto;
}
.community-image-edit-modal.is-banner:has(.avatar-edit-preview:not(.has-image)) .avatar-edit-actions{
  grid-row:5;
}
.community-image-edit-modal.is-banner .avatar-edit-preview:not(.has-image) + .avatar-edit-tools{
  display:none;
}
.community-image-edit-modal.is-banner .avatar-edit-empty{gap:4px;font-size:12px}
.community-image-edit-modal.is-banner .avatar-edit-empty svg{width:28px!important;height:28px!important}

/* 생성 완료 모달 */
.cc-created-modal{
  position:fixed;
  inset:0;
  z-index:1100;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.42);
}
.cc-created-modal.open{display:flex}
.cc-created-box{
  position:relative;
  width:min(420px,100%);
  border:1px solid var(--border);
  border-radius:24px;
  background:var(--white);
  box-shadow:0 24px 70px rgba(0,0,0,.22);
  padding:34px 28px 28px;
  text-align:center;
  animation:ccCreatedIn .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes ccCreatedIn{
  from{opacity:0;transform:translateY(10px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
.cc-created-close{
  position:absolute;
  top:14px;
  right:14px;
  width:34px;
  height:34px;
  border:0;
  border-radius:50%;
  background:transparent;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .15s,color .15s;
}
.cc-created-close:hover{
  background:var(--bg-hover,#f5f5f5);
  color:var(--text);
}
.cc-created-close svg,
.cc-created-close i{width:19px;height:19px}
.cc-created-icon{
  position:relative;
  width:62px;
  height:48px;
  margin:0 auto 16px;
  --created-icon-shine-duration:1.45s;
  border-radius:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  color:var(--text,#111);
  background:transparent;
}
.cc-created-icon svg,
.cc-created-icon i{
  position:absolute;
  inset:50% auto auto 50%;
  width:34px;
  height:34px;
  transform:translate(-50%,-50%);
  color:currentColor;
  stroke:currentColor;
}
.cc-created-icon-base{
  z-index:1;
}
.cc-created-icon-light{
  z-index:2;
  pointer-events:none;
  color:rgba(255,255,255,.72)!important;
  stroke:currentColor!important;
  filter:drop-shadow(0 0 3px rgba(255,255,255,.38));
  opacity:0;
  clip-path:polygon(-55% 0,-28% 0,-8% 100%,-35% 100%);
  animation:createdIconLightSweep var(--created-icon-shine-duration) cubic-bezier(.38,.02,.24,1) infinite;
}
.cc-created-title{
  margin:0;
  color:var(--text);
  font-size:22px;
  line-height:1.25;
  font-weight:900;
  letter-spacing:-.45px;
}
.cc-created-name{
  margin:12px auto 0;
  max-width:100%;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
  font-weight:600;
  word-break:break-word;
}
.cc-created-name:empty{display:none}
.cc-created-desc{
  margin:0 0 22px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
  font-weight:600;
  letter-spacing:-.2px;
}
.cc-created-primary{
  min-width:128px;
  height:34px;
  padding:0 18px;
  border:0;
  border-radius:999px;
  background:var(--orange,#EC221F);
  color:#fff;
  font-family:var(--site-font);
  font-size:13px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  box-shadow:var(--red-btn-shadow,0 4px 10px rgba(236,34,31,.24));
  transition:transform .15s,box-shadow .15s,filter .15s;
}
.cc-created-primary:hover{
  transform:translateY(-1px);
  filter:brightness(1.02);
  box-shadow:0 4px 10px rgba(255,69,0,.4);
}
.cc-created-primary:active{
  transform:translateY(0) scale(.98);
  box-shadow:0 3px 10px rgba(255,69,0,.3);
}

@media(min-width:761px) and (max-width:1024px){
  .cc-editor-layout{
    grid-template-columns:minmax(200px,390px) 500px;
    gap:14px;
    justify-content:space-between;
  }
  .cc-editor-preview{width:500px}
  .cc-editor-form{
    position:static;
  }
  .cc-form-media{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:760px){
  .comm-wrap{--cc-banner-overlap:30px;--cc-wrap-pad:0px;--cc-banner-height:140px;padding:0}
  .cc-editor-layout{grid-template-columns:1fr;margin:16px 0 30px;gap:12px}
  .cc-editor-form{--cc-form-edge-gap:18px;margin:0 16px;padding:0}
  .cc-form-card{padding:0 var(--cc-form-edge-gap) var(--cc-form-edge-gap);border-radius:0}
  .cc-form-media{grid-template-columns:1fr 1fr;gap:7px}
  .cc-preview-toggle{display:flex;grid-column:1/-1}
  .cc-editor-layout > .cc-editor-preview{display:none}
  .cc-preview-modal{padding:12px}
  .cc-preview-dialog{width:min(480px,100%);max-height:calc(100vh - 24px);border-radius:20px}
  .cc-preview-dialog-head{height:48px;padding:0 8px 0 16px}
  .cc-preview-dialog-head h2{font-size:16px}
  #communityPreviewMobileSlot .cc-preview-inline-head{display:none}
  #communityPreviewMobileSlot .cc-editor-preview{
    --cc-banner-overlap:30px;
    --cc-banner-height:140px;
    --cc-banner-empty-bg:var(--surface);
    width:100%;
    padding:0;
  }
  #communityPreviewMobileSlot .comm-top-shell{
    margin:0;
    border-radius:0;
    box-shadow:none;
    border:0;
    overflow:hidden;
  }
  #communityPreviewMobileSlot .comm-top-shell::before{display:none}
  .comm-page-head{
    padding:12px 16px;
  }
  .comm-page-head h1{font-size:16px;line-height:1.28}
  .cc-editor-preview .comm-page-head h1{font-size:12px}
  .comm-page-head-sep{display:none}
  .comm-page-head-main,
  .comm-page-head-sub{display:block}
  .comm-page-head-sub{margin-top:4px;font-size:.7em}
  #communityPreviewMobileSlot .cc-editor-preview .comm-banner{
    width:100%;
    height:var(--cc-banner-total-height,140px);
    margin:0;
    border:0;
    border-radius:0;
  }
  #communityPreviewMobileSlot .comm-info-card{
    margin:calc(var(--cc-banner-overlap) * -1) 0 0;
    padding:0 16px 21px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow-sm);
  }
  #communityPreviewMobileSlot .comm-avatar-row{margin-top:calc(var(--cc-banner-overlap) * -.933);gap:12px}
  #communityPreviewMobileSlot .comm-avatar{width:76px;height:76px;margin-bottom:-8px}
  #communityPreviewMobileSlot .comm-name-col{transform:translateY(14px)}
  .comm-av-overlay{gap:4px}
  .comm-av-btn{width:24px;height:24px}
  .comm-av-btn svg,.comm-av-btn i{width:13px;height:13px}
  .comm-name-row{gap:8px;padding-bottom:4px}
  .cc-preview-name{font-size:21px;line-height:26px}
  .cc-preview-handle{font-size:13px;line-height:1.3}
  .cc-preview-desc{font-size:12px}
  .cc-preview-desc.is-visible{margin-top:8px}
  .comm-meta-row{margin-top:10px;gap:12px}
  .comm-country,
  .comm-country-btn{height:26px;padding:0 8px;font-size:10px}
  .comm-actions{margin-top:12px}
  #communityPreviewMobileSlot .cc-editor-preview .comm-content-grid{grid-template-columns:1fr;margin:12px 0 30px;gap:12px;padding:0}
  .cc-preview-post-shell{min-height:132px;padding:20px}
  .cc-editor-preview .cc-preview-side{display:none}
  .cc-created-box{border-radius:20px;padding:32px 22px 24px}
  .cc-created-title{font-size:20px}
  .avatar-edit-modal{width:100%;max-width:420px;padding:20px}
  .avatar-edit-preview{width:220px;height:220px;flex-basis:220px}
}

/* ── 커뮤니티 아이디 안내 ── */
.cc-handle-status{
  flex:0 0 100%;
  min-height:0;
  max-height:0;
  margin:2px 0 0 0;
  padding-left:2px;
  box-sizing:border-box;
  color:#EC221F;
  font-size:12px;
  font-weight:400;
  line-height:1.45;
  white-space:normal;
  opacity:0;
  overflow:hidden;
  transform:translateY(-2px);
  transition:max-height .22s ease,opacity .18s ease,transform .18s ease;
  pointer-events:none;
}
.cc-handle-status:empty{max-height:0;opacity:0;transform:translateY(-2px)}
.cc-handle-status.is-checking,
.cc-handle-status.is-ok{max-height:0;opacity:0;transform:translateY(-2px)}
.cc-handle-status.is-err{max-height:42px;opacity:1;color:#EC221F;transform:translateY(0);pointer-events:auto}

@media(max-width:760px){
  .comm-name-col{transform:translateY(4px)}
  .cc-handle-status{font-size:11px;margin-left:6px}
}

/* ─── Dark Mode ─── */
html[data-theme="dark"] :is(.comm-top-shell,.comm-page-head,.comm-info-card,.cc-editor-form,.cc-form-card,.cc-country-box){
  background:var(--white);
  border-color:var(--border);
  box-shadow:var(--shadow-sm);
}
html[data-theme="dark"] .cc-editor-form :is(.comm-page-head,.cc-form-card){
  background:transparent;
  border-color:transparent;
  box-shadow:none;
}
html[data-theme="dark"] .cc-created-box{
  background:var(--white);
  border-color:var(--border);
}
html[data-theme="dark"] .avatar-edit-modal{background:var(--white);border-color:var(--border)}
html[data-theme="dark"] .avatar-edit-action:not(.avatar-edit-save){background:var(--surface);border-color:var(--border-strong);color:var(--text2)}
html[data-theme="dark"] .avatar-edit-preview.has-image{background:#fff}

html[data-theme="dark"] .comm-top-shell::before{box-shadow:inset 0 0 0 1px var(--border)}
html[data-theme="dark"] .cc-editor-preview .comm-top-shell::before{box-shadow:none;border-color:var(--border)}
html[data-theme="dark"] :is(.comm-banner,.comm-banner-empty){background:var(--surface);color:var(--muted)}
html[data-theme="dark"] .comm-banner.has-image::after{background-color:var(--surface)}
html[data-theme="dark"] :is(.comm-country,.comm-country-btn,.comm-cancel-btn,.cc-media-btn,.cc-form-input,.cc-form-textarea-frame,.cc-form-handle,.cc-form-country-btn,.cc-country-search input,.cc-country-item){
  background:var(--surface);
  color:var(--text2);
  border-color:var(--border-strong);
}
html[data-theme="dark"] .cc-form-textarea{color:var(--text2)}
html[data-theme="dark"] .cc-form-textarea::-webkit-scrollbar-thumb{background:#8a8a86}

html[data-theme="dark"] :is(.comm-country-btn:hover,.comm-cancel-btn:hover,.cc-media-btn:hover,.cc-country-item:hover){background:var(--bg-hover);color:var(--text)}
html[data-theme="dark"] .cc-form-handle-input{color:var(--text);-webkit-text-fill-color:var(--text)}
html[data-theme="dark"] .cc-country-item.selected{background:var(--bg-hover);color:var(--text)}
html[data-theme="dark"] :is(.cc-country-header,.cc-country-search){border-color:var(--border)}
