/* ----
 * 리워드웍스 칼럼 관리 - 모아보기/썸네일 목록 + 대형 등록 폼
 * ----- */

body.rw-admin-unified-active .rw-col-page.page-body.rw-admin-page{
    background:#fff !important;
    padding-top:8px !important;
}

.rw-col-page,
.rw-col-page *{
    box-sizing:border-box;
}

.rw-col-wrap{
    width:100%;
    max-width:1248px; /* 모아보기·썸네일보기 동일 폭 */
    margin:0 auto;
    padding:12px 0 40px;
}
.rw-col-wrap.is-thumb{
    max-width:1248px;
}

.rw-col-flash{
    margin:0 0 18px;
    padding:12px 16px;
    border-radius:12px;
    font-size:13px;
    font-weight:600;
}
.rw-col-flash.ok{
    background:#ecfdf5;
    border:1px solid #a7f3d0;
    color:#065f46;
}
.rw-col-flash.err{
    background:#fef2f2;
    border:1px solid #fecaca;
    color:#991b1b;
}

/* ---- 히어로 ---- */
.rw-col-hero{
    text-align:center;
    padding:18px 8px 8px;
}
.rw-col-hero-title-row{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:16px;
    position:relative;
    margin:0 0 10px;
    min-height:40px;
}
.rw-col-hero h1{
    margin:0;
    font-size:32px;
    font-weight:800;
    letter-spacing:-.8px;
    color:#111827;
    line-height:1.25;
}
/* 메인 노출 스위치 — 제목 우측 끝 */
.rw-col-home-switch{
    position:absolute;
    right:0;
    top:50%;
    transform:translateY(-50%);
    display:inline-flex;
    align-items:center;
    gap:10px;
    margin:0;
    cursor:pointer;
    user-select:none;
}
.rw-col-home-switch-label{
    font-size:13px;
    font-weight:700;
    color:#4b5563;
    letter-spacing:-.02em;
    white-space:nowrap;
}
.rw-col-home-switch input{
    position:absolute;
    opacity:0;
    width:1px;
    height:1px;
    pointer-events:none;
}
.rw-col-home-switch-ui{
    position:relative;
    width:48px;
    height:28px;
    border-radius:999px;
    background:#d1d5db;
    transition:background .25s ease, box-shadow .25s ease;
    flex-shrink:0;
    box-shadow:inset 0 1px 2px rgba(15,23,42,.12);
}
.rw-col-home-switch-knob{
    position:absolute;
    top:3px;
    left:3px;
    width:22px;
    height:22px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 2px 6px rgba(15,23,42,.2);
    transition:transform .25s cubic-bezier(.22,1,.36,1);
}
.rw-col-home-switch input:checked + .rw-col-home-switch-ui{
    background:linear-gradient(90deg, #2460FF 0%, #5F59FF 100%);
    box-shadow:0 4px 12px rgba(36,96,255,.28);
}
.rw-col-home-switch input:checked + .rw-col-home-switch-ui .rw-col-home-switch-knob{
    transform:translateX(20px);
}
.rw-col-home-switch.is-saving{
    opacity:.65;
    pointer-events:none;
}
.rw-col-hero p{
    margin:0 auto 22px;
    max-width:560px;
    font-size:14px;
    line-height:1.65;
    color:#6b7280;
}

.rw-col-tabs{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:4px;
    background:#f3f4f6;
    border-radius:999px;
}
.rw-col-tab{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:88px;
    height:38px;
    padding:0 18px;
    border-radius:999px;
    font-size:14px;
    font-weight:700;
    color:#4b5563;
    text-decoration:none !important;
    background:transparent;
    transition:background .15s,color .15s;
}
.rw-col-tab:hover{ color:#111827; }
.rw-col-tab.is-active{
    background:#111827;
    color:#fff !important;
}

/* ---- 툴바: 검색 + 등록 + 보기전환 ---- */
.rw-col-toolbar{
    display:flex;
    align-items:center;
    gap:10px;
    margin:28px 0 18px;
}

.rw-col-search{
    position:relative;
    flex:1 1 auto;
    min-width:0;
}
.rw-col-search i{
    position:absolute;
    left:16px;
    top:50%;
    transform:translateY(-50%);
    color:#9ca3af;
    font-size:14px;
    pointer-events:none;
}
.rw-col-search input{
    width:100%;
    height:46px;
    padding:0 16px 0 42px !important;
    border:1px solid #b8bec9 !important;
    border-radius:999px !important;
    background:#fff !important;
    font-size:14px !important;
    color:#111827 !important;
    box-shadow:none !important;
    outline:none;
}
.rw-col-search input:focus{
    border-color:#111827 !important;
}

.rw-col-write-btn{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    height:46px;
    padding:0 18px;
    border:0;
    border-radius:999px;
    background:#111827;
    color:#fff !important;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    white-space:nowrap;
    text-decoration:none !important;
}
.rw-col-write-btn:hover{ background:#1f2937; }

.rw-col-views{
    display:flex;
    gap:6px;
    flex:0 0 auto;
}
.rw-col-view-btn{
    width:42px;
    height:42px;
    border:1px solid #b8bec9;
    border-radius:12px;
    background:#fff;
    color:#9ca3af;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0;
}
.rw-col-view-btn svg{
    width:18px;
    height:18px;
    display:block;
}
.rw-col-view-btn.is-active{
    background:#111827;
    border-color:#111827;
    color:#fff;
}

/* ---- 모아보기 (리스트) ---- */
.rw-col-list{
    display:flex;
    flex-direction:column;
    gap:8px;
}
.rw-col-card{
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    align-items:center;
    gap:20px;
    padding:14px 16px;
    background:#fff;
    border:1px solid #cfd3db;
    border-radius:14px;
    text-decoration:none;
    color:inherit;
    cursor:pointer;
    transition:border-color .15s, box-shadow .15s, background .15s;
    position:relative;
}
.rw-col-card:hover{
    border-color:#b8bec9;
    background:#fcfcfd;
    box-shadow:0 4px 14px rgba(17,24,39,.04);
}
.rw-col-card.is-off{ opacity:.55; }

/* ---- 드래그 핸들 ---- */
.rw-col-drag{
    flex:0 0 28px;
    width:28px;
    align-self:center;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:36px;
    margin:0;
    padding:0;
    border:0;
    border-radius:8px;
    background:transparent;
    color:#c0c4cc;
    cursor:grab;
    touch-action:none;
    user-select:none;
    -webkit-user-select:none;
    z-index:3;
}
.rw-col-drag:hover{
    color:#6b7280;
    background:#f3f4f6;
}
.rw-col-drag:active{
    cursor:grabbing;
}
.rw-col-wrap.is-dragging .rw-col-card{
    cursor:grabbing;
}
.rw-col-wrap.is-dragging .rw-col-card *{
    pointer-events:none;
}
.rw-col-wrap.is-dragging .rw-col-drag{
    pointer-events:auto;
}
.sortable-fallback{
    opacity:.95 !important;
    box-shadow:0 12px 28px rgba(17,24,39,.18) !important;
}
.rw-col-wrap.is-sorting{
    pointer-events:none;
    opacity:.92;
}
.rw-col-ghost{
    opacity:.45;
    background:#f8fafc !important;
    border-style:dashed !important;
}
.rw-col-chosen{
    box-shadow:0 10px 28px rgba(17,24,39,.12);
    border-color:#94a3b8;
}
.rw-col-dragging{
    opacity:.95;
}

/* 모아보기 좌측 썸네일 — PC/모바일 동일 82×106.66 */
.rw-col-thumb{
    flex:0 0 82px;
    width:82px;
    height:106.66px;
    border-radius:8px;
    overflow:hidden;
    background:#f3f4f6;
    border:1px solid #cfd3db;
}
.rw-col-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.rw-col-thumb.is-empty{
    display:flex;
    align-items:center;
    justify-content:center;
    color:#d1d5db;
    font-size:22px;
}

.rw-col-body{
    flex:1 1 auto;
    min-width:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:4px 0;
    gap:2px;
}
.rw-col-meta{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:4px;
    flex-wrap:wrap;
}
.rw-col-cat{
    font-size:12px;
    font-weight:700;
    letter-spacing:-.2px;
}
.rw-col-date{
    font-size:12px;
    color:#a1a1aa;
    font-weight:500;
}
.rw-col-off-badge{
    display:inline-flex;
    align-items:center;
    height:18px;
    padding:0 7px;
    border-radius:999px;
    background:#f3f4f6;
    color:#6b7280;
    font-size:10px;
    font-weight:700;
}
/* 가독성 — 강한 대비·과도한 볼드 완화 */
.rw-col-title{
    margin:0 0 4px;
    font-size:16px;
    font-weight:700;
    color:#374151;
    letter-spacing:-.25px;
    line-height:1.45;
    display:-webkit-box;
    -webkit-line-clamp:1;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.rw-col-summary{
    margin:0;
    font-size:13px;
    line-height:1.55;
    color:#9ca3af;
    font-weight:500;
    display:-webkit-box;
    -webkit-line-clamp:1;
    -webkit-box-orient:vertical;
    overflow:hidden;
}

.rw-col-actions{
    display:inline-flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    flex:0 0 auto !important;
    width:auto !important;
    max-width:none !important;
    height:auto !important;
    padding-left:8px;
    align-self:center;
    position:relative;
    z-index:2;
}
.rw-col-act{
    position:static !important;
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    flex:0 0 auto !important;
    float:none !important;
    width:auto !important;
    min-width:52px;
    height:32px !important;
    padding:0 12px !important;
    margin:0 !important;
    border-radius:9px;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    border:1px solid transparent;
    background:#f3f4f6;
    color:#374151 !important;
    text-decoration:none !important;
    white-space:nowrap !important;
    box-sizing:border-box;
    line-height:1;
    box-shadow:none;
}
.rw-col-act.edit{
    background:#f3f4f6;
    border-color:#b8bec9;
    color:#374151 !important;
}
.rw-col-act.edit:hover{
    background:#e5e7eb;
    color:#111827 !important;
}
/* 삭제 — 기본 붉은 계열, 호버 시 배경만 붉게·글자 흰색 */
.rw-col-act.del{
    background:#fef2f2 !important;
    border:1px solid #fca5a5 !important;
    color:#dc2626 !important;
}
.rw-col-act.del:hover{
    background:#dc2626 !important;
    border-color:#dc2626 !important;
    color:#fff !important;
}

/* ---- 썸네일보기 — 세로 포스터 3열, 테두리 없이 여백만 ---- */
.rw-col-wrap.is-thumb .rw-col-list{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:36px 28px;
}
.rw-col-wrap.is-thumb .rw-col-card{
    flex-direction:column;
    gap:12px;
    padding:0;
    align-items:stretch;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
}
.rw-col-wrap.is-thumb .rw-col-card:hover{
    border:0;
    box-shadow:none;
}
.rw-col-wrap.is-thumb .rw-col-drag{
    position:absolute;
    top:8px;
    left:8px;
    z-index:4;
    width:32px;
    height:32px;
    border-radius:10px;
    background:rgba(255,255,255,.92);
    color:#6b7280;
    box-shadow:0 2px 8px rgba(17,24,39,.12);
    align-self:auto;
}
.rw-col-wrap.is-thumb .rw-col-drag:hover{
    background:#fff;
    color:#111827;
}
.rw-col-wrap.is-thumb .rw-col-ghost{
    background:transparent !important;
}
.rw-col-wrap.is-thumb .rw-col-thumb{
    flex:none;
    width:100%;
    height:0;
    padding-bottom:133%; /* 3:4 세로 포스터 */
    position:relative;
    border-radius:8px;
    border:0;
    background:#f3f4f6;
    overflow:hidden;
}
.rw-col-wrap.is-thumb .rw-col-thumb img,
.rw-col-wrap.is-thumb .rw-col-thumb.is-empty{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
}
.rw-col-wrap.is-thumb .rw-col-thumb img{
    object-fit:cover;
    transform:scale(1);
    transition:transform .35s ease;
    will-change:transform;
}
/* 썸네일보기 — 카드/이미지 호버 시 살짝 확대 */
.rw-col-wrap.is-thumb .rw-col-card:hover .rw-col-thumb img,
.rw-col-wrap.is-thumb .rw-col-thumb:hover img{
    transform:scale(1.06);
}
.rw-col-wrap.is-thumb .rw-col-body{
    padding:2px 2px 0;
    justify-content:flex-start;
}
.rw-col-wrap.is-thumb .rw-col-meta{
    justify-content:space-between;
    flex-wrap:nowrap;
    gap:8px;
    margin-bottom:8px;
}
.rw-col-wrap.is-thumb .rw-col-cat{
    background:transparent !important;
    padding:0 !important;
    border-radius:0 !important;
    font-size:12px;
    font-weight:800;
}
.rw-col-wrap.is-thumb .rw-col-date{
    margin-left:auto;
    flex-shrink:0;
    font-size:12px;
    color:#9ca3af;
}
.rw-col-wrap.is-thumb .rw-col-title{
    font-size:16px;
    font-weight:700;
    color:#374151;
    margin-bottom:6px;
    -webkit-line-clamp:2;
}
.rw-col-wrap.is-thumb .rw-col-summary{
    font-size:13px;
    line-height:1.55;
    color:#9ca3af;
    -webkit-line-clamp:2;
}
/* 수정/삭제 — 썸네일 우상단, 가로 나란히·겹침 방지 */
.rw-col-wrap.is-thumb .rw-col-card{
    overflow:visible;
}
.rw-col-wrap.is-thumb .rw-col-actions{
    position:absolute !important;
    top:8px !important;
    right:8px !important;
    left:auto !important;
    bottom:auto !important;
    z-index:6 !important;
    display:inline-flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:6px !important;
    padding:0 !important;
    margin:0 !important;
    width:auto !important;
    max-width:calc(100% - 52px) !important;
    height:auto !important;
    opacity:1 !important;
    pointer-events:auto !important;
    background:transparent;
}
.rw-col-wrap.is-thumb .rw-col-act{
    position:static !important;
    min-width:48px;
    height:30px !important;
    padding:0 10px !important;
    border-radius:8px;
    box-shadow:0 2px 10px rgba(15,23,42,.18);
}
.rw-col-wrap.is-thumb .rw-col-act.edit{
    background:#fff !important;
    border:1px solid rgba(15,23,42,.1) !important;
    color:#111827 !important;
}
.rw-col-wrap.is-thumb .rw-col-act.edit:hover{
    background:#f3f4f6 !important;
}
.rw-col-wrap.is-thumb .rw-col-act.del{
    background:#fef2f2 !important;
    border:1px solid #fca5a5 !important;
    color:#dc2626 !important;
}
.rw-col-wrap.is-thumb .rw-col-act.del:hover{
    background:#dc2626 !important;
    border-color:#dc2626 !important;
    color:#fff !important;
}

.rw-col-empty{
    padding:72px 16px;
    text-align:center;
    border:1px dashed #b8bec9;
    border-radius:16px;
    color:#9ca3af;
}
.rw-col-empty strong{
    display:block;
    margin-bottom:8px;
    font-size:16px;
    color:#4b5563;
}
.rw-col-empty p{
    margin:0 0 16px;
    font-size:13px;
}

.rw-col-pager{
    display:flex;
    justify-content:center;
    gap:6px;
    margin-top:28px;
    flex-wrap:wrap;
}
.rw-col-pager a,
.rw-col-pager span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:36px;
    height:36px;
    padding:0 10px;
    border-radius:10px;
    font-size:13px;
    font-weight:700;
    text-decoration:none !important;
    color:#4b5563;
    background:#f3f4f6;
}
.rw-col-pager a:hover{ background:#e5e7eb; color:#111827; }
.rw-col-pager .is-cur{
    background:#111827;
    color:#fff;
}

/* ---- 등록/수정 페이지 (레이어 아님) ---- */
.rw-col-write-page .rw-col-write-wrap{
    width:100%;
    max-width:none;
    margin:0;
    padding:4px 0 32px;
}
.rw-col-write-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:12px;
    margin-bottom:18px;
}
.rw-col-write-head h1{
    margin:0 0 6px;
    font-size:26px;
    font-weight:800;
    letter-spacing:-.6px;
    color:#111827;
}
.rw-col-write-head p{
    margin:0;
    font-size:13px;
    color:#6b7280;
}
.rw-col-write-card{
    background:#fff;
    border:1px solid #c8ccd5;
    border-radius:18px;
    box-shadow:0 4px 14px rgba(20,23,40,.05);
}
.rw-col-form{
    display:flex;
    flex-direction:column;
}
.rw-col-form-body{
    padding:22px 22px 8px;
}
.rw-col-form-foot{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:8px;
    padding:16px 22px 22px;
}

.rw-col-grid-fields{
    display:grid;
    grid-template-columns:1fr 1fr 160px 140px;
    gap:12px;
    margin-bottom:12px;
}
.rw-col-field{ min-width:0; }
.rw-col-field.full{ grid-column:1 / -1; }
.rw-col-field label{
    display:block;
    margin-bottom:6px;
    font-size:12px;
    font-weight:700;
    color:#374151;
}
.rw-col-field .form-control,
.rw-col-field select,
.rw-col-field input[type="date"],
.rw-col-field input[type="text"]{
    width:100%;
    height:42px;
    border:1px solid #b8bec9 !important;
    border-radius:12px !important;
    background:#fff !important;
    padding:0 12px !important;
    font-size:13px !important;
    color:#111827 !important;
    box-shadow:none !important;
}
/* 카테고리 등 select — 우측 화살표 표시 */
.rw-col-field select{
    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;
    padding-right:36px !important;
    background-color:#fff !important;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.75L6 6.25L10.5 1.75' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat:no-repeat !important;
    background-position:right 12px center !important;
    background-size:12px 8px !important;
    cursor:pointer;
}
.rw-col-field select::-ms-expand{
    display:none;
}
.rw-col-field textarea.form-control{
    height:auto;
    min-height:72px;
    padding:10px 12px !important;
    resize:vertical;
    line-height:1.5;
}
.rw-col-field .form-control:focus,
.rw-col-field select:focus{
    border-color:#111827 !important;
}

.rw-col-type-pills{
    display:flex;
    gap:6px;
}
.rw-col-type-pills label{
    position:relative;
    margin:0;
    flex:1;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #b8bec9;
    border-radius:12px;
    font-size:13px;
    font-weight:700;
    color:#6b7280;
    cursor:pointer;
    background:#f9fafb;
}
.rw-col-type-pills input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.rw-col-type-pills label.is-on,
.rw-col-type-pills label:has(input:checked){
    background:#111827;
    border-color:#111827;
    color:#fff;
}

.rw-col-thumb-row{
    display:flex;
    align-items:center;
    gap:14px;
}
.rw-col-thumb-preview{
    width:84px;
    height:84px;
    border-radius:12px;
    overflow:hidden;
    background:#f3f4f6;
    border:1px solid #c8ccd5;
    flex:0 0 84px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#d1d5db;
}
.rw-col-thumb-preview img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.rw-col-thumb-preview img.is-hide{ display:none; }

.rw-col-editor-wrap{
    min-height:420px;
    border:1px solid #b8bec9;
    border-radius:12px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 1px 2px rgba(17,24,39,.04);
}
.rw-col-editor-wrap iframe{
    display:block;
    width:100% !important;
    max-width:100%;
    border:0 !important;
    background:#fff;
    vertical-align:top;
}

.rw-col-btn{
    height:42px;
    padding:0 18px;
    border-radius:12px;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
    border:1px solid transparent;
}
.rw-col-btn.ghost{
    background:#fff;
    border-color:#b8bec9;
    color:#374151;
    text-decoration:none !important;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.rw-col-btn.primary{
    background:#111827;
    color:#fff;
    min-width:120px;
}

html.rw-col-lock,
html.rw-col-lock body{
    overflow:hidden;
}


/* ---- 모바일 ---- */
@media (max-width:1024px){
    .rw-col-wrap.is-thumb .rw-col-list{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }
    .rw-col-grid-fields{
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width:768px){
    .rw-col-hero-title-row{
        flex-direction:column;
        align-items:stretch;
        gap:12px;
        padding-bottom:4px;
    }
    .rw-col-hero h1{ font-size:24px; text-align:center; }
    .rw-col-home-switch{
        position:static;
        transform:none;
        justify-content:center;
        align-self:center;
    }
    .rw-col-hero p{ font-size:13px; margin-bottom:16px; }
    .rw-col-toolbar{
        flex-wrap:wrap;
        margin:18px 0 14px;
        gap:8px;
    }
    .rw-col-search{ flex:1 1 100%; order:1; }
    .rw-col-write-btn{
        height:40px;
        padding:0 14px;
        font-size:13px;
        order:2;
        margin-left:auto;
    }
    .rw-col-views{ order:3; }

    .rw-col-card{ gap:12px; padding:12px; }
    .rw-col-title{ font-size:15px; font-weight:700; color:#374151; }
    .rw-col-summary{ font-size:12px; color:#9ca3af; }

    .rw-col-wrap.is-thumb .rw-col-list{ gap:22px 14px; }
    .rw-col-wrap.is-thumb .rw-col-card{ padding:0; }
    .rw-col-wrap.is-thumb .rw-col-thumb{
        flex-basis:auto;
        width:100%;
        height:0;
        padding-bottom:133%;
    }
    .rw-col-wrap.is-thumb .rw-col-actions{
        opacity:1 !important;
        pointer-events:auto !important;
        top:8px !important;
        right:8px !important;
        gap:6px !important;
        flex-direction:row !important;
    }
    .rw-col-wrap.is-thumb .rw-col-title{ font-size:14px; }
    .rw-col-wrap.is-thumb .rw-col-summary{ font-size:12px; }

    .rw-col-write-head{
        flex-direction:column;
        align-items:flex-start;
    }
    .rw-col-write-head h1{ font-size:20px; }
    .rw-col-form-body,
    .rw-col-form-foot{ padding-left:14px; padding-right:14px; }
    .rw-col-grid-fields{ grid-template-columns:1fr 1fr; }
    .rw-col-editor-wrap iframe{ min-height:280px !important; }
}

@media (max-width:640px){
    /* 썸네일보기 — 1열 */
    .rw-col-wrap.is-thumb .rw-col-list{
        grid-template-columns:minmax(0, 1fr);
        gap:22px;
        max-width:504px; /* 420 * 1.2 */
        margin-left:auto;
        margin-right:auto;
    }
}

@media (max-width:480px){
    .rw-col-grid-fields{ grid-template-columns:1fr; }
    .rw-col-actions{
        width:auto !important;
        flex-direction:row !important;
        flex-wrap:nowrap !important;
        align-items:center !important;
        justify-content:flex-end !important;
        gap:8px !important;
        padding:0;
        align-self:center;
    }
    .rw-col-wrap.is-thumb .rw-col-card{
        flex-wrap:nowrap;
    }
    .rw-col-wrap.is-thumb .rw-col-actions{
        width:auto !important;
        padding:0 !important;
        justify-content:flex-end !important;
        gap:6px !important;
        flex-direction:row !important;
    }
    .rw-col-wrap.is-thumb .rw-col-title{ font-size:13px; }
    .rw-col-wrap.is-thumb .rw-col-summary{ -webkit-line-clamp:2; }
}

/* ---- 칼럼 상세보기 (참고: 블로그형 본문) ---- */
body.rw-admin-unified-active .rw-col-view-page.page-body.rw-admin-page{
    background:#fff !important;
}
.rw-col-article{
    width:100%;
    max-width:760px;
    margin:0 auto;
    padding:8px 0 56px;
}
.rw-col-article-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:28px;
}
.rw-col-back{
    display:inline-flex;
    align-items:center;
    color:#6b7280;
    font-size:14px;
    font-weight:700;
    text-decoration:none !important;
}
.rw-col-back:hover{ color:#111827; }
.rw-col-article-actions{
    display:flex;
    gap:8px;
}
.rw-col-article-head{
    margin-bottom:28px;
}
.rw-col-article-meta{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px 10px;
    margin-bottom:14px;
}
.rw-col-article-cat{
    display:inline-flex;
    align-items:center;
    height:26px;
    padding:0 10px;
    border-radius:8px;
    font-size:12px;
    font-weight:800;
}
.rw-col-article-date,
.rw-col-article-read{
    font-size:13px;
    color:#9ca3af;
    font-weight:600;
}
.rw-col-article-title{
    margin:0 0 10px;
    font-size:34px;
    font-weight:800;
    letter-spacing:-1px;
    line-height:1.28;
    color:#111827;
}
.rw-col-article-summary{
    margin:0 0 14px;
    font-size:16px;
    line-height:1.55;
    color:#6b7280;
    font-weight:600;
}
.rw-col-article-by{
    margin:0;
    font-size:13px;
    color:#9ca3af;
    font-weight:600;
}

/* 상세 본문 최상단 썸네일 — 기사 width 꽉 채움 */
.rw-col-article-hero{
    width:100%;
    margin:0 0 28px;
    border-radius:14px;
    overflow:hidden;
    background:#f3f4f6;
    line-height:0;
}
.rw-col-article-hero img{
    display:block;
    width:100%;
    height:auto;
    max-width:100%;
    object-fit:cover;
    vertical-align:top;
}
.rw-col-article-hero.is-empty{
    min-height:180px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px dashed #b8bec9;
    background:#f9fafb;
    line-height:normal;
}
.rw-col-article-hero-ph{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    color:#9ca3af;
    font-size:13px;
    font-weight:600;
}
.rw-col-article-hero-ph i{
    font-size:28px;
    color:#d1d5db;
}

.rw-col-article-body{
    font-size:16px;
    line-height:1.85;
    color:#1f2937;
    word-break:break-word;
}
.rw-col-article-body > *:first-child{ margin-top:0; }
.rw-col-article-body p{
    margin:0 0 1.1em;
}
.rw-col-article-body h1,
.rw-col-article-body h2,
.rw-col-article-body h3,
.rw-col-article-body h4{
    margin:1.6em 0 .7em;
    font-weight:800;
    letter-spacing:-.4px;
    color:#111827;
    line-height:1.35;
}
.rw-col-article-body h2{ font-size:24px; }
.rw-col-article-body h3{ font-size:20px; }
.rw-col-article-body img{
    display:block;
    max-width:100%;
    height:auto;
    margin:1.4em auto;
    border-radius:14px;
}
.rw-col-article-body ul,
.rw-col-article-body ol{
    margin:0 0 1.2em;
    padding-left:1.25em;
}
.rw-col-article-body li{
    margin:0 0 .55em;
}
.rw-col-article-body table{
    width:100%;
    border-collapse:collapse;
    margin:1.2em 0;
    font-size:14px;
}
.rw-col-article-body th,
.rw-col-article-body td{
    border:1px solid #b8bec9;
    padding:8px 10px;
}
.rw-col-article-body a{
    color:#0f766e;
    text-decoration:underline;
}
.rw-col-article-body mark,
.rw-col-article-body .rw-hl{
    background:#fef08a;
    padding:0 .15em;
}
/* ---- 상세 이전·목록·다음 — 다크 듀얼 + 가운데 목록 ---- */
.rw-col-article-nav{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    gap:10px;
    align-items:stretch;
    margin-top:48px;
    padding-top:4px;
}
.rw-col-article-nav-item{
    position:relative;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:8px;
    min-height:88px;
    padding:18px 20px;
    border-radius:16px;
    border:1px solid rgba(103,89,255,.28);
    background:linear-gradient(145deg, #0f172a 0%, #151b33 55%, #1a1840 100%);
    color:#fff !important;
    text-decoration:none !important;
    box-shadow:0 8px 22px rgba(15,23,42,.18);
    overflow:hidden;
    transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.rw-col-article-nav-item::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:3px;
    background:linear-gradient(180deg, #6759FF 0%, #473DFE 100%);
    opacity:.9;
}
.rw-col-article-nav-item.is-next::before{
    left:auto;
    right:0;
}
.rw-col-article-nav-item:hover{
    transform:translateY(-2px);
    border-color:rgba(103,89,255,.55);
    box-shadow:0 12px 28px rgba(71,61,254,.22);
    background:linear-gradient(145deg, #111827 0%, #1a1f3d 50%, #221b52 100%);
}
.rw-col-article-nav-item.is-empty{
    visibility:hidden;
    pointer-events:none;
    box-shadow:none;
    border:0;
    background:transparent;
}
.rw-col-article-nav-item.is-empty::before{ display:none; }
.rw-col-article-nav-label{
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    font-weight:700;
    letter-spacing:-.2px;
    color:rgba(199,210,254,.78);
}
.rw-col-article-nav-label i{
    font-size:10px;
    opacity:.85;
}
.rw-col-article-nav-item.is-next .rw-col-article-nav-label{
    justify-content:flex-end;
}
.rw-col-article-nav-item strong{
    font-size:15px;
    font-weight:700;
    line-height:1.45;
    letter-spacing:-.3px;
    color:#f8fafc;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.rw-col-article-nav-item.is-next strong{
    text-align:right;
}
/* 가운데 목록으로 — 이전/다음과 높이 맞춤 */
.rw-col-article-nav-list{
    display:inline-flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-width:108px;
    width:108px;
    min-height:88px;
    padding:14px 12px;
    border-radius:16px;
    border:1px solid rgba(103,89,255,.35);
    background:linear-gradient(160deg, #6759FF 0%, #473DFE 55%, #3D5EC3 100%);
    color:#fff !important;
    text-decoration:none !important;
    box-shadow:0 8px 20px rgba(71,61,254,.28);
    transition:transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.rw-col-article-nav-list i{
    font-size:16px;
    opacity:.95;
}
.rw-col-article-nav-list span{
    font-size:13px;
    font-weight:800;
    letter-spacing:-.3px;
    white-space:nowrap;
}
.rw-col-article-nav-list:hover{
    transform:translateY(-2px);
    filter:brightness(1.06);
    box-shadow:0 12px 26px rgba(71,61,254,.36);
    color:#fff !important;
}

@media (max-width:768px){
    .rw-col-article{ padding:4px 0 40px; }
    .rw-col-article-title{ font-size:26px; }
    .rw-col-article-summary{ font-size:14px; }
    .rw-col-article-hero{
        margin-bottom:22px;
        border-radius:10px;
    }
    .rw-col-article-hero.is-empty{ min-height:140px; }
    .rw-col-article-body{ font-size:15px; line-height:1.75; }
    .rw-col-article-body h2{ font-size:20px; }
    .rw-col-article-nav{
        grid-template-columns:1fr;
        gap:10px;
    }
    .rw-col-article-nav-item{
        min-height:76px;
        padding:16px 18px;
    }
    .rw-col-article-nav-item.is-empty{ display:none; }
    .rw-col-article-nav-list{
        order:-1;
        width:100%;
        min-width:0;
        min-height:52px;
        flex-direction:row;
        gap:8px;
        padding:12px 16px;
    }
    .rw-col-article-nav-item.is-next .rw-col-article-nav-label,
    .rw-col-article-nav-item.is-next strong{
        justify-content:flex-start;
        text-align:left;
    }
    .rw-col-article-nav-item.is-next::before{
        left:0;
        right:auto;
    }
}
