/* 팬덤 플랫폼 스타일 */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    background: #f0f2f5;
    color: #14171a;
    font-size: 15px;
    line-height: 1.6;
}
a { color: #e0245e; text-decoration: none; }
.hashtag-link, .mention-link { font-weight: 600; }
.mention-link:hover, .hashtag-link:hover { text-decoration: underline; }

/* @멘션 자동완성 드롭다운 */
.mention-dropdown {
    position: absolute; z-index: 1300; background: #fff; border: 1px solid #e1e8ed;
    border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.12); overflow: hidden;
    max-height: 220px; overflow-y: auto;
}
.mention-item { padding: 8px 12px; font-size: 14px; cursor: pointer; color: #14171a; }
.mention-item.on, .mention-item:hover { background: #fce8ef; }
html.dark .mention-dropdown { background: #1e2329; border-color: #2f3640; }
html.dark .mention-item { color: #e7e9ea; }
html.dark .mention-item.on, html.dark .mention-item:hover { background: #2a222a; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---------- 상단바 ---------- */
.topbar {
    position: sticky; top: 0; z-index: 100;
    background: #fff; border-bottom: 1px solid #e1e8ed;
}
.topbar-inner {
    max-width: 1000px; margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; gap: 16px; height: 48px;
}
@media (min-width: 901px) {
    body.menu-vertical .topbar-inner,
    body.menu-vertical .menu-row { max-width: 1180px; }
}
.logo { font-weight: 800; font-size: 18px; color: var(--btn-bg, #e0245e); white-space: nowrap; margin-right: auto; display: inline-flex; align-items: center; }
.logo-img { height: 32px; max-width: 200px; object-fit: contain; }
.logo:hover { text-decoration: none; }

/* 메뉴 줄 (2번째 줄) */
.menu-row {
    max-width: 1000px; margin: 0 auto; padding: 0 8px;
    display: flex; align-items: center; gap: 2px;
    border-top: 1px solid #f0f2f5; height: 42px; position: relative;
}
.menu-nav {
    display: flex; gap: 4px; overflow-x: auto; flex: 1;
    scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth;
}
.menu-nav::-webkit-scrollbar { display: none; }
.menu-nav a {
    padding: 6px 12px; border-radius: 999px; color: #444;
    white-space: nowrap; font-size: 14px; flex-shrink: 0;
}
.menu-nav a:hover { background: #f5d3de; text-decoration: none; }
.menu-nav a.active { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); font-weight: 600; }
.menu-scroll {
    flex-shrink: 0; width: 26px; height: 26px; border: 1px solid #e1e8ed;
    background: #fff; border-radius: 50%; cursor: pointer; color: #657786;
    font-size: 15px; line-height: 1; padding: 0; visibility: hidden;
}
.menu-scroll:hover { border-color: #e0245e; color: #e0245e; }
.menu-all-btn {
    flex-shrink: 0; border: 1px solid #e1e8ed; background: #fff;
    border-radius: 999px; padding: 5px 12px; font-size: 13px;
    cursor: pointer; color: #444; white-space: nowrap; margin-left: 4px;
}
.menu-all-btn:hover { border-color: #e0245e; color: #e0245e; }
.menu-all-panel {
    position: absolute; left: 0; right: 0; top: 100%;
    max-width: 1000px; margin: 0 auto;
    background: #fff; border: 1px solid #e1e8ed; border-top: 0;
    border-radius: 0 0 12px 12px; box-shadow: 0 8px 20px rgba(0,0,0,.1);
    padding: 12px; z-index: 99;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px;
}
.menu-all-panel[hidden] { display: none; }
.menu-all-panel a {
    padding: 9px 12px; border-radius: 8px; color: #333; font-size: 14px;
}
.menu-all-panel a:hover { background: #fce8ef; text-decoration: none; }
.menu-all-cnt { color: #8899a6; font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 14px; min-width: 0; }
.topbar-right a { color: #444; }
.me-nick {
    color: #888; font-size: 13px;
    max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer;
}
.me-nick:hover { color: #e0245e; text-decoration: underline; }
@media (max-width: 600px) {
    .topbar-inner { gap: 10px; }
    .topbar-right { gap: 10px; }
    .me-nick { display: none; } /* 좁은 화면에선 닉네임 숨겨 레이아웃 밀림 방지 */
    .mobile-gnb-dup { display: none; } /* 검색/글쓰기/쪽지는 하단 GNB로 이동 - 상단에서는 중복 노출 방지 (관리자 페이지 포함 전체 동일) */
    /* iOS Safari는 폼 요소 font-size가 16px 미만이면 탭할 때 화면을 확대하는데,
       이때 select의 네이티브 팝업이 확대된 화면 기준 엉뚱한 위치에 작게 뜨는 것처럼 보인다.
       16px 이상으로 맞춰 자동 확대 자체를 막는다. */
    input:not([type=checkbox]):not([type=radio]), textarea, select { font-size: 16px; }
}
.btn-write {
    background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff) !important; padding: 6px 14px;
    border-radius: 999px; font-weight: 600;
}
.btn-write:hover { filter: brightness(0.9); text-decoration: none; }
.msg-link { position: relative; }
.badge {
    background: #e0245e; color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 999px; padding: 1px 5px; vertical-align: top; margin-left: 2px;
}

/* ---------- 레이아웃 ---------- */
.wrap { max-width: 1000px; margin: 0 auto; padding: 16px; }
body.admin-page .wrap { max-width: none; margin: 0; padding: 0; }
@media (min-width: 901px) {
    body.menu-vertical .wrap { max-width: 1180px; }
}
.layout { display: flex; gap: 20px; align-items: flex-start; }
.main { flex: 1; min-width: 0; max-width: 660px; margin: 0 auto; }
@media (min-width: 901px) {
    body.menu-vertical .main { max-width: 840px; }
}
.sidebar { width: 300px; flex-shrink: 0; }
body.admin-page .main { max-width: 100%; }
@media (max-width: 900px) {
    /* 모바일: 사이드바를 피드 아래로 내리고 출석체크만 노출 */
    /* 세로 배치에선 align-items:flex-start가 가로폭을 콘텐츠 크기로 줄여
       화면보다 넓어질 수 있으므로 stretch로 강제 */
    .layout { flex-direction: column; align-items: stretch; }
    .main { width: 100%; }
    .sidebar { width: 100%; }
    .sidebar > .sidebar-rank,
    .sidebar > .ad-slot { display: none; }
    .sidebar > .attend-panel,
    .sidebar > .site-poll,
    .sidebar > .recent-comments { width: 100%; max-width: 660px; margin: 0 auto 16px; }
}

/* ---------- 세로 메뉴 (PC 전용, 관리자 설정) ---------- */
.vmenu { display: none; }
@media (min-width: 901px) {
    body.menu-vertical .menu-row { display: none; }
    body.menu-vertical .vmenu {
        display: flex; flex-direction: column; gap: 2px;
        width: 190px; flex-shrink: 0;
        position: sticky; top: 59px;
        max-height: calc(100vh - 70px); overflow-y: auto;
        background: #fff; border: 1px solid #e1e8ed; border-radius: 12px;
        padding: 8px;
    }
}
.vmenu-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 10px; border-radius: 8px; color: #444; font-size: 14px;
}
.vmenu-item:hover { background: #f5d3de; text-decoration: none; }
.vmenu-item.active { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); font-weight: 600; }
.vmenu-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmenu-cnt { color: #8899a6; font-size: 12px; flex-shrink: 0; }
.vmenu-item.active .vmenu-cnt { color: var(--btn-text, #fff); opacity: .85; }
html.dark .vmenu { background: #1e2329; border-color: #2f3640; }
html.dark .vmenu-item { color: #c8ccd0; }
html.dark .vmenu-item:hover { background: #2a323c; }

.site-footer { text-align: center; color: #aaa; font-size: 12px; padding: 32px 0; }
.footer-mailing { margin: 8px 0 0; }
.footer-mailing a { color: #999; }
.footer-legal { margin: 8px 0 0; font-size: 11px; }
.footer-legal a { color: #999; }
.footer-custom { max-width: 660px; margin: 0 auto 12px; line-height: 1.6; }
.footer-custom a { color: #999; text-decoration: underline; }

/* ---------- 패널 ---------- */
.panel {
    background: #fff; border: 1px solid #e1e8ed; border-radius: 12px;
    padding: 16px; margin-bottom: 16px;
}
.panel-title { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.more-link { margin-left: auto; font-size: 12px; font-weight: 400; }
.feed-title { font-size: 20px; margin: 4px 0 16px; }
.profile-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.profile-head .feed-title { margin: 0; }
.btn-msg { background: var(--btn-bg, #e0245e) !important; color: var(--btn-text, #fff) !important; border-color: var(--btn-bg, #e0245e) !important; }
.btn-msg:hover { filter: brightness(0.9); color: var(--btn-text, #fff) !important; }
.empty, .empty-feed { color: #999; text-align: center; padding: 24px 16px; }

/* ---------- 알림 ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecea; color: #b71c1c; }
.alert-info { background: #e3f2fd; color: #0d47a1; }

/* ---------- 게시물 ---------- */
.post {
    background: #fff; border: 1px solid #e1e8ed; border-radius: 12px;
    padding: 16px; margin-bottom: 12px;
}
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    background: var(--btn-bg, #e0245e);
    background: linear-gradient(135deg, var(--btn-bg, #e0245e), color-mix(in srgb, var(--btn-bg, #e0245e) 55%, #fff));
    color: #fff; font-weight: 700; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 700; color: #14171a; }
.post-sub { display: block; color: #8899a6; font-size: 12px; }
.menu-tag { color: #e0245e; }
.post-tools { position: relative; }
.post-tools a { color: #aab8c2; margin-left: 8px; font-size: 14px; }
.post-tools a:hover { color: #e0245e; text-decoration: none; }
.js-post-more {
    background: none; border: none; cursor: pointer; color: #aab8c2; font-size: 18px; line-height: 1; padding: 4px 6px;
}
.js-post-more:hover { color: #e0245e; }
.post-more-menu {
    position: absolute; right: 0; top: 26px; z-index: 20; min-width: 160px;
    background: #fff; border: 1px solid #e1e8ed; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
    padding: 4px 0; flex-direction: column;
}
.post-more-menu[hidden] { display: none; }
.post-more-menu:not([hidden]) { display: flex; }
.post-more-menu a { margin-left: 0; padding: 8px 12px; color: #14171a; font-size: 13px; white-space: nowrap; }
.post-more-menu a:hover { background: #f5f8fa; color: #e0245e; }
.report-reason-item { display: block; margin: 6px 0; }
.report-detail { width: 100%; margin-top: 10px; box-sizing: border-box; }

.post-content { word-wrap: break-word; overflow-wrap: break-word; }
/* [code] 블록 (자동 언어 감지 하이라이팅, assets/vendor/highlight.min.js) */
.code-block {
    margin: 10px 0; padding: 14px 16px; border-radius: 10px;
    border: 1px solid #e1e8ed; background: #f6f8fa; overflow-x: auto; max-width: 100%;
    font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
    font-size: 13px; line-height: 1.55;
}
.code-block code { background: none; padding: 0; white-space: pre; }
html.dark .code-block { border-color: #2f3640; background: #0d1117; }
.post-content img {
    border-radius: 10px; margin: 6px 4px 0 0; cursor: zoom-in;
    max-height: 420px; object-fit: cover;
}
.post-content p { margin: 0 0 8px; }
/* 본문 표: 셀 안에서 먼저 줄바꿈하고, 그래도 넓으면 표 안에서만 가로 스크롤 (본문 밖으로 넘치지 않음) */
.post-content table, .editor table {
    display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-collapse: collapse; border-spacing: 0; margin: 10px 0; font-size: 14px; line-height: 1.5;
}
.post-content th, .post-content td, .editor th, .editor td {
    border: 1px solid #e1e8ed; padding: 6px 10px; min-width: 40px;
    text-align: left; vertical-align: top; word-break: break-word; overflow-wrap: anywhere;
}
.post-content th, .editor th { background: rgba(127,127,127,.12); font-weight: 700; }
.post-content caption, .editor caption { padding: 4px 0; color: #657786; font-size: 13px; text-align: left; }
.post-content td > p:last-child, .post-content th > p:last-child,
.editor td > p:last-child, .editor th > p:last-child { margin-bottom: 0; }
.post-content td img, .post-content th img { max-width: 100%; height: auto; margin: 0; }
html.dark .post-content th, html.dark .post-content td,
html.dark .editor th, html.dark .editor td { border-color: #3a4250; }
html.dark .post-content caption, html.dark .editor caption { color: #8899a6; }
.yt-wrap, .post-content iframe { max-width: 100%; }
.yt-wrap {
    position: relative; padding-bottom: 56.25%; height: 0;
    margin: 8px 0; border-radius: 10px; overflow: hidden; background: #000;
}
.yt-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-content > iframe { width: 100%; aspect-ratio: 16/9; border-radius: 10px; margin: 8px 0; }

/* 재생 중 영상이 화면 밖으로 나가면 우하단 미니플레이어(PiP) */
.yt-wrap.yt-pip {
    position: fixed; right: 16px; bottom: 16px; z-index: 900;
    width: 340px; max-width: 46vw; height: auto; padding-bottom: 0; margin: 0;
    aspect-ratio: 16 / 9;
    box-shadow: 0 8px 28px rgba(0,0,0,.4);
    animation: pipIn .25s ease;
}
@supports not (aspect-ratio: 16/9) {
    .yt-wrap.yt-pip { height: 191px; padding-bottom: 0; } /* 340px 폭 16:9 */
}
@keyframes pipIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.yt-pip-close {
    position: absolute; top: -10px; right: -10px; z-index: 2;
    width: 26px; height: 26px; border-radius: 50%; border: 0;
    background: #14171a; color: #fff; cursor: pointer; font-size: 13px;
    line-height: 26px; padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.yt-pip-close:hover { background: #e0245e; }
.yt-pip-ph { margin: 8px 0; }
@media (max-width: 600px) {
    .yt-wrap.yt-pip { width: 200px; right: 10px; bottom: 10px; }
}

/* 링크 미리보기 카드 */
.link-card {
    display: flex; align-items: stretch; gap: 0; margin-top: 10px;
    border: 1px solid #e1e8ed; border-radius: 12px; overflow: hidden;
    color: inherit; background: #fafbfc;
}
.link-card:hover { background: #f0f2f5; text-decoration: none; }
.link-thumb { width: 120px; min-height: 90px; object-fit: cover; flex-shrink: 0; }
.link-body { padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.link-title {
    font-size: 14px; overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.link-desc { color: #657786; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-url { color: #8899a6; font-size: 12px; }
.link-card-edit { position: relative; }
.link-card-edit button {
    position: absolute; top: 6px; right: 6px; border: 0; background: rgba(0,0,0,.5);
    color: #fff; border-radius: 50%; width: 24px; height: 24px; cursor: pointer;
}

/* 액션바 */
.post-actions {
    display: flex; gap: 8px; margin-top: 10px; padding-top: 8px;
    border-top: 1px solid #f0f2f5;
}
.act {
    display: inline-flex; align-items: center; gap: 5px;
    background: none; border: 0; cursor: pointer; color: #657786;
    font-size: 13px; padding: 6px 10px; border-radius: 999px;
}
.act:hover { background: #fce8ef; color: #e0245e; text-decoration: none; }
.act.on { color: #e0245e; font-weight: 700; }
.act.stat { cursor: default; }
.act.stat:hover { background: none; color: #657786; }

/* 모바일: 좋아요/댓글/스크랩/공유/조회수 액션바가 한 줄에 다 안 들어가 깨지는 문제 -
   5개를 한 줄에 균등폭으로 유지하고, 버튼 안에서 아이콘은 윗줄 / 텍스트·숫자는 아랫줄로 세로 배치 */
@media (max-width: 480px) {
    .post-actions { flex-wrap: nowrap; gap: 2px; }
    .post-actions .act {
        flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center;
        gap: 2px; padding: 6px 2px; font-size: 11px;
    }
    .post-actions .act .cnt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- 툴팁 ---------- */
.tip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; margin-left: 4px; border-radius: 50%;
    background: #000; color: #fff; font-size: 10px; font-weight: 700;
    cursor: help; position: relative; outline: none; flex-shrink: 0;
}
.tip-box {
    position: absolute; top: 130%; left: 0; z-index: 50;
    width: 220px; padding: 10px 12px; border-radius: 8px;
    background: #14171a; color: #fff; font-size: 12px; font-weight: 400;
    line-height: 1.5; box-shadow: 0 4px 14px rgba(0,0,0,.25);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
    white-space: normal; text-align: left;
}
.tip-box:before {
    content: ""; position: absolute; bottom: 100%; left: 8px;
    border: 6px solid transparent; border-bottom-color: #14171a;
}
.tip:hover .tip-box, .tip:focus .tip-box { opacity: 1; visibility: visible; transform: translateY(0); }
@media (max-width: 340px) { .tip-box { width: 180px; } }

/* ---------- 출석체크 ---------- */
.attend-panel { scroll-margin-top: 104px; } /* 고정 헤더에 안 가리게 */
.attend-panel.attend-flash { animation: attendFlash 1.2s ease; }
@keyframes attendFlash {
    0%, 60% { box-shadow: 0 0 0 3px rgba(224,36,94,.45); }
    100% { box-shadow: 0 0 0 0 rgba(224,36,94,0); }
}
.attend-fab {
    position: fixed; left: 16px; bottom: 16px; z-index: 850;
    width: 48px; height: 48px; border-radius: 50%;
    background: #fff; border: 1px solid #e1e8ed;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.18);
    transition: opacity .2s, transform .2s;
}
.attend-fab:hover { text-decoration: none; transform: translateY(-2px); }
.attend-fab.hide { opacity: 0; pointer-events: none; }

/* 모바일 하단 고정 GNB: 검색/다크모드/글쓰기/출석체크를 한 줄로 (데스크톱에서는 숨김) */
.mobile-gnb { display: none; }
@media (max-width: 600px) {
    body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
    .mobile-gnb {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
        display: flex; align-items: stretch;
        background: #fff; border-top: 1px solid #e1e8ed;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-shadow: 0 -2px 10px rgba(0,0,0,.06);
    }
    .mobile-gnb-item {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 2px; padding: 7px 4px; border: 0; background: transparent; color: #444;
        font-size: 11px; cursor: pointer;
    }
    .mobile-gnb-item:hover { text-decoration: none; }
    .mobile-gnb-icon { font-size: 19px; line-height: 1; }
    .mobile-gnb-write .mobile-gnb-icon,
    .mobile-gnb-write .mobile-gnb-label { color: #e0245e; }
    .mobile-gnb-msg .mobile-gnb-icon { position: relative; display: inline-block; }
    .mobile-gnb-msg .msg-badge { position: absolute; top: -4px; right: -9px; margin: 0; }
    .attend-fab { display: none; }
}
html.dark .mobile-gnb { background: #1e2329; border-top-color: #2f3640; }
html.dark .mobile-gnb-item { color: #c8ccd0; }
.attend-panel-loading { padding: 24px; text-align: center; color: #657786; }
html.dark .attend-panel-loading { color: #8899a6; }
.fab-dot {
    position: absolute; top: 2px; right: 2px; width: 11px; height: 11px;
    background: #e0245e; border: 2px solid #fff; border-radius: 50%;
}
.attend-view { display: none; }
.attend-view.on { display: block; }

/* 출석 모달 팝업 */
body.modal-open { overflow: hidden; }
.fd-modal {
    position: fixed; inset: 0; z-index: 1200;
    background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: fdModalIn .18s ease;
}
.fd-modal[hidden] { display: none; }
@keyframes fdModalIn { from { opacity: 0; } to { opacity: 1; } }
.fd-modal-box {
    position: relative; width: 100%; max-width: 420px;
    max-height: 88vh; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.fd-modal-box .attend-panel.in-modal { margin: 0; }
.fd-modal-close {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 30px; height: 30px; border-radius: 50%; border: 0;
    background: #f0f2f5; color: #333; cursor: pointer; font-size: 15px; line-height: 30px; padding: 0;
}
.fd-modal-close:hover { background: #e0245e; color: #fff; }
html.dark .fd-modal-close { background: #3a4250; color: #e7e9ea; }
html.dark .fd-modal-close:hover { background: #e0245e; }
.attend-status { text-align: center; padding: 8px; border-radius: 8px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.attend-check-btn { padding: 12px; margin-top: 0; margin-bottom: 8px; }
.attend-status.done { background: #e8f5e9; color: #1b5e20; }
.attend-myimg {
    margin: 10px 0; border: 1px solid #e1e8ed; border-radius: 10px; background: #fafbfc;
    overflow: hidden;
}
.attend-myimg > summary {
    list-style: none; cursor: pointer; padding: 9px 12px;
    font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between;
}
.attend-myimg > summary::-webkit-details-marker { display: none; }
.attend-myimg-caret { color: #8899a6; transition: transform .2s; }
.attend-myimg[open] .attend-myimg-caret { transform: rotate(180deg); }
.attend-myimg-body {
    display: flex; gap: 10px; align-items: center;
    padding: 0 12px 10px;
}
.attend-myimg-body > img {
    width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
    border: 1px solid #e1e8ed;
}
.attend-myimg-txt { font-size: 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.attend-myimg-txt .attend-imgbtn { align-self: flex-start; margin-top: 2px; }
.attend-top3 {
    display: flex; justify-content: center; align-items: flex-end; gap: 14px;
    margin: 14px 0 6px; text-align: center;
}
.attend-medal { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 0 1 auto; min-width: 0; position: relative; }
.attend-img {
    position: relative; width: 100px; height: 100px; border-radius: 12px;
    overflow: hidden; background: #f0f2f5; border: 2px solid #ffd24a;
    display: flex; align-items: center; justify-content: center;
}
/* 1등을 가장 크게 + 다른 순위 위로 살짝 띄워 레이어상 맨 위에 있는 것처럼 */
.attend-medal:nth-child(1) { z-index: 2; }
.attend-medal:nth-child(1) .attend-img { box-shadow: 0 6px 16px rgba(255, 210, 74, .45); }
.attend-medal:nth-child(2) { z-index: 1; }
.attend-medal:nth-child(2) .attend-img { width: 90px; height: 90px; border-color: #c4ccd4; }
.attend-medal:nth-child(3) { z-index: 1; }
.attend-medal:nth-child(3) .attend-img { width: 80px; height: 80px; border-color: #d9a06b; }
.attend-img img { width: 100%; height: 100%; object-fit: cover; }
.attend-noimg { font-size: 34px; font-weight: 800; color: #b0b8c0; }
.attend-badge { position: absolute; top: 2px; left: 4px; font-size: 20px; }
.attend-nick {
    font-size: 12px; font-weight: 600; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attend-cnt { color: #8899a6; font-size: 11px; }
.attend-imgbtn {
    margin-top: 2px; font-size: 11px; padding: 2px 8px; border: 1px solid #ccd6dd;
    background: #fff; border-radius: 999px; cursor: pointer; color: #444;
}
.attend-imgbtn:hover { border-color: #e0245e; color: #e0245e; }
.attend-imgbtn-overlay {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 4px 2px 5px; border: 0; cursor: pointer;
    background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0));
    color: #fff; font-size: 10px; font-weight: 600;
    line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.attend-imgbtn-overlay:hover { background: linear-gradient(to top, rgba(224,36,94,.82), rgba(224,36,94,0)); }
.attend-rest { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: ar 3; }
.attend-rest li {
    counter-increment: ar; padding: 5px 2px; font-size: 13px;
    border-bottom: 1px solid #f5f8fa;
}
.attend-rest li:before { content: counter(ar); color: #8899a6; font-weight: 700; margin-right: 8px; }
.attend-rest li.me { font-weight: 700; }
.attend-rest .attend-cnt { float: right; }

/* 100px 카드가 좁은 화면에서 넘치지 않게 단계별 축소 (1등과의 10px/20px 크기 차이는 유지) */
@media (max-width: 1000px) and (min-width: 901px) {
    .attend-img { width: 84px; height: 84px; }
    .attend-medal:nth-child(2) .attend-img { width: 74px; height: 74px; }
    .attend-medal:nth-child(3) .attend-img { width: 64px; height: 64px; }
}
@media (max-width: 480px) {
    .attend-img { width: 88px; height: 88px; }
    .attend-medal:nth-child(2) .attend-img { width: 78px; height: 78px; }
    .attend-medal:nth-child(3) .attend-img { width: 68px; height: 68px; }
    .attend-noimg { font-size: 30px; }
}
@media (max-width: 360px) {
    .attend-img { width: 74px; height: 74px; }
    .attend-medal:nth-child(2) .attend-img { width: 64px; height: 64px; }
    .attend-medal:nth-child(3) .attend-img { width: 54px; height: 54px; }
    .attend-noimg { font-size: 26px; }
}

/* ---------- 공지 (상단 고정 핀) ---------- */
.notice-bar {
    display: flex; align-items: center; gap: 4px; margin-bottom: 12px;
}
.notice-track {
    position: relative; /* 카드 offsetLeft 기준을 트랙으로 고정 */
    flex: 1; min-width: 0; display: flex; gap: 8px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth;
}
.notice-track::-webkit-scrollbar { display: none; }
.notice-card {
    flex: 0 0 100%; scroll-snap-align: start;
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #e1e8ed; border-left: 3px solid #e0245e;
    border-radius: 10px; padding: 8px 12px; color: #14171a;
    min-width: 0; box-sizing: border-box;
}
.notice-card:hover { text-decoration: none; background: #fef6f9; }
.notice-pin {
    flex-shrink: 0; color: #e0245e; font-weight: 700; font-size: 12px;
    white-space: nowrap;
}
.notice-text {
    flex: 1; min-width: 0; font-size: 13px; color: #333;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notice-nav {
    flex-shrink: 0; width: 24px; height: 24px; border: 1px solid #e1e8ed;
    background: #fff; border-radius: 50%; cursor: pointer; color: #657786;
    font-size: 14px; line-height: 1; padding: 0;
}
.notice-nav:hover { border-color: #e0245e; color: #e0245e; }
.notice-count { flex-shrink: 0; font-size: 11px; color: #8899a6; min-width: 34px; text-align: center; }
.js-pin-post.on { color: #e0245e; }

/* 토스트 알림 */
.fd-toast {
    position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
    background: rgba(20,23,26,.92); color: #fff; padding: 10px 20px;
    border-radius: 999px; font-size: 14px; z-index: 1000;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.fd-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 서버 플래시 메시지(헤더) — 긴 문장도 줄바꿈되도록 */
.fd-toast-flash {
    max-width: calc(100vw - 32px); width: max-content; text-align: center;
    border-radius: 14px; line-height: 1.45; padding: 12px 20px;
}
@media (max-width: 600px) {
    .fd-toast-flash { bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 12px); }
}

/* 새 쪽지 미니 팝업 */
.msg-toast {
    position: fixed; right: 16px; bottom: 16px; z-index: 1250;
    width: 280px; max-width: calc(100vw - 32px);
    background: #fff; border: 1px solid #e1e8ed; border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 14px 16px; cursor: pointer;
    animation: msgToastIn .22s ease;
}
@keyframes msgToastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.msg-toast strong { display: block; font-size: 14px; margin-bottom: 4px; padding-right: 20px; }
.msg-toast-preview { display: block; font-size: 13px; color: #657786; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-toast-close {
    position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
    border: 0; background: #f0f2f5; color: #666; cursor: pointer; font-size: 11px; line-height: 22px; padding: 0;
}
.msg-toast-close:hover { background: #e0245e; color: #fff; }
html.dark .msg-toast { background: #1e2329; border-color: #2f3640; }
html.dark .msg-toast-preview { color: #8b98a5; }
html.dark .msg-toast-close { background: #3a4250; color: #e7e9ea; }
@media (max-width: 600px) {
    .msg-toast { left: 16px; right: 16px; width: auto; bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 12px); }
}

/* ---------- 인기/랭킹 ---------- */
.trend-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 4px;
    color: inherit; border-radius: 8px;
}
.trend-item:hover { background: #f5f8fa; text-decoration: none; }
.trend-rank { color: #e0245e; font-weight: 800; width: 20px; text-align: center; flex-shrink: 0; }
.trend-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-meta { color: #8899a6; font-size: 12px; flex-shrink: 0; }

.rank-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.rank-tab { white-space: nowrap; }
.rank-tab {
    border: 1px solid #e1e8ed; background: #fff; border-radius: 999px;
    padding: 4px 14px; font-size: 13px; cursor: pointer; color: #444;
}
.rank-tab:hover { text-decoration: none; }
.rank-tab.on { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); border-color: var(--btn-bg, #e0245e); }
.rank-list { list-style: none; margin: 0; padding: 0; display: none; }
.rank-list.on { display: block; }
.rank-list li { padding: 6px 4px; border-bottom: 1px solid #f5f8fa; counter-increment: rank; }
.rank-list li:before { content: counter(rank); color: #e0245e; font-weight: 800; margin-right: 10px; }
.rank-list li.empty:before { content: none; }
.rank-cnt { float: right; color: #8899a6; font-size: 12px; }

/* 게시물 하단 "작성자의 다른 글/댓글" (클리앙 스타일) */
.author-activity-head {
    display: none; width: 100%; align-items: center; justify-content: space-between;
    background: none; border: 0; padding: 0; font-size: 16px; font-weight: 700; cursor: pointer; color: #14171a;
}
.author-activity-caret { transition: transform .15s; color: #8899a6; }
.author-activity-item {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
    padding: 8px 4px; border-bottom: 1px solid #f5f8fa; color: #14171a;
}
.author-activity-item:hover { background: #f5f8fa; text-decoration: none; }
.aa-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.aa-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aa-sub { color: #8899a6; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.aa-time { flex: 0 0 auto; color: #8899a6; font-size: 12px; white-space: nowrap; }
.aa-cat {
    display: inline-block; background: #f0f2f5; color: #657786; font-size: 11px;
    padding: 1px 7px; border-radius: 999px; margin-right: 4px; vertical-align: middle;
}
.aa-tabs-label { color: #8899a6; font-size: 13px; align-self: center; margin-right: 2px; }
html.dark .aa-cat { background: #262c34; color: #8899a6; }
@media (max-width: 600px) {
    .author-activity-head { display: flex; }
    .author-activity-body { display: none; }
    .author-activity.open .author-activity-body { display: block; margin-top: 10px; }
    .author-activity.open .author-activity-caret { transform: rotate(180deg); }
}
html.dark .author-activity-head { color: #e7e9ea; }
html.dark .author-activity-item { color: #e7e9ea; }
html.dark .author-activity-item:hover { background: #22262b; }

/* 사이드바 랭킹 (작게) */
.sidebar-rank { font-size: 13px; }
.sidebar-rank .panel-title { font-size: 14px; }
.sidebar-rank .rank-tab { padding: 3px 10px; font-size: 12px; }
.sidebar-rank .rank-list li { padding: 5px 2px; font-size: 13px; }
.sidebar-rank .rank-list li:before { margin-right: 8px; }

/* 홈 베스트 글 패널 */
.best-panel .trend-item { padding: 7px 4px; }

/* ---------- 게시판형 목록 ---------- */
.board-wrap {
    background: #fff; border: 1px solid #e1e8ed; border-radius: 12px;
    overflow: hidden; margin-bottom: 12px;
}
.board-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.board-list thead th {
    background: #f7f9fa; color: #657786; font-weight: 600; font-size: 12px;
    padding: 10px 8px; border-bottom: 1px solid #e1e8ed; text-align: center;
}
.board-list tbody td { padding: 10px 8px; border-bottom: 1px solid #f0f2f5; text-align: center; color: #657786; }
.board-list tbody tr:hover { background: #fafbfc; }
.board-list .c-num { width: 52px; font-size: 13px; }
.board-list .c-cat { width: 78px; font-size: 12px; }
.board-list .c-cat a { color: #8899a6; }
.board-list .c-title { text-align: left; }
.board-list .c-title a { color: #14171a; font-weight: 500; }
.board-list .c-title a:hover { color: #e0245e; }
.board-list .c-author { width: 90px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.board-list .c-author a { color: #657786; }
.board-list .c-author a:hover { color: #e0245e; }
.board-list .c-date { width: 60px; font-size: 12px; }
.board-list .c-view { width: 52px; font-size: 12px; }
.board-cc { color: #e0245e; font-size: 12px; font-weight: 700; margin-left: 4px; }
.board-notice { background: #e0245e; color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.board-list tr.pinned { background: #fef6f9; }
.board-list tr.pinned .c-title a { font-weight: 700; }
.board-empty { padding: 40px 0 !important; color: #999; }
.board-actions { display: flex; justify-content: flex-end; margin: 12px 0; }

/* 게시판 제목 */
.post-title { font-size: 20px; margin: 2px 0 10px; word-break: break-word; }
.post-title-link { display: block; font-size: 16px; font-weight: 700; color: #14171a; margin: 2px 0 6px; }
.post-title-link:hover { color: #e0245e; text-decoration: none; }

/* 게시판별 추가 필드 (예: 장점/가격) */
.post-fields { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.post-field {
    background: #f5f8fa; border-radius: 8px; padding: 4px 10px; font-size: 13px; color: #444;
}
.post-field strong { color: #e0245e; margin-right: 4px; }
.post-field a { color: #1a73e8; text-decoration: underline; word-break: break-all; }
html.dark .post-field { background: #262c34; color: #c8ccd0; }
.custom-fields-wrap:not(:empty) { margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.custom-fields-wrap label { margin: 6px 0 2px; }

/* 첨부파일 */
.attach-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.attach-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: #f5f8fa; border-radius: 8px; padding: 6px 10px; font-size: 13px;
}
.attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-remove { border: 0; background: transparent; color: #999; cursor: pointer; font-size: 12px; padding: 0 4px; }
.attach-remove:hover { color: #e0245e; }
.post-attachments { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.post-attachment {
    display: inline-flex; align-items: center; gap: 6px; background: #f5f8fa;
    border-radius: 8px; padding: 8px 12px; font-size: 13px; color: #14171a; width: fit-content; max-width: 100%;
}
.post-attachment:hover { background: #eef1f4; text-decoration: none; }
.attach-size { color: #8899a6; }
html.dark .attach-row, html.dark .post-attachment { background: #262c34; color: #e7e9ea; }
html.dark .attach-remove { color: #8899a6; }

/* 번호형 페이지네이션 */
.pagination { display: flex; justify-content: center; gap: 4px; margin: 18px 0; flex-wrap: wrap; }
.pagination .pg {
    min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid #e1e8ed;
    border-radius: 8px; background: #fff; color: #444; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
}
.pagination .pg:hover { border-color: #e0245e; color: #e0245e; text-decoration: none; }
.pagination .pg.on { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); border-color: var(--btn-bg, #e0245e); font-weight: 700; }

@media (max-width: 500px) {
    .board-list .c-cat, .board-list thead .c-cat { display: none; }
    .board-list .c-author, .board-list thead .c-author { display: none; }
}

/* 정렬 바 (카테고리) */
.sort-bar { display: flex; gap: 6px; margin: -4px 0 12px; flex-wrap: wrap; }
.sort-btn {
    border: 1px solid #e1e8ed; background: #fff; border-radius: 999px;
    padding: 5px 14px; font-size: 13px; color: #444; white-space: nowrap;
}
.sort-btn:hover { text-decoration: none; border-color: #e0245e; color: #e0245e; }
.sort-btn.on { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); border-color: var(--btn-bg, #e0245e); font-weight: 600; }

/* 게시판 서브 카테고리 탭 + 목록 제목 앞 카테고리 표시 */
.cat-tabs { display: flex; gap: 2px; margin: 0 0 10px; border-bottom: 1px solid #e1e8ed; overflow-x: auto; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { padding: 8px 14px; font-size: 14px; color: #657786; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cat-tab:hover { text-decoration: none; color: #14171a; }
.cat-tab.on { color: #14171a; font-weight: 700; border-bottom-color: var(--btn-bg, #e0245e); }
.post-cat { display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 6px; border-radius: 4px; background: #eceff1; color: #546e7a; vertical-align: 1px; white-space: nowrap; }

/* 최근 댓글 */
.rc-item {
    display: block; padding: 8px 4px; border-bottom: 1px solid #f5f8fa;
    color: inherit; border-radius: 6px;
}
.rc-item:hover { background: #f5f8fa; text-decoration: none; }
.rc-item:last-child { border-bottom: 0; }
.rc-text {
    display: block; font-size: 13px; color: #333;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rc-meta { display: block; color: #8899a6; font-size: 11px; margin-top: 1px; }

/* 게시판 소개 섹션 */
.board-intro { padding: 18px 20px; }
.board-intro-title {
    font-size: 20px; margin: 0;
    display: flex; align-items: center; gap: 8px;
}
.board-intro-desc { margin: 6px 0 0; color: #657786; font-size: 14px; }

/* 소개 페이지 */
.about-content { line-height: 1.8; }
.board-guide { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.board-guide-item {
    display: block; padding: 12px 14px; border: 1px solid #e1e8ed;
    border-radius: 10px; color: inherit;
}
.board-guide-item:hover { background: #f5f8fa; text-decoration: none; border-color: #e0245e; }
.board-guide-item strong { display: flex; align-items: center; gap: 8px; }
.board-guide-desc { display: block; color: #657786; font-size: 13px; margin-top: 2px; }

/* 관리자 메뉴 소개 입력 */
.input-desc { margin-top: 4px; font-size: 12px !important; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rank-table th, .rank-table td { padding: 8px; border-bottom: 1px solid #f0f2f5; text-align: center; }
.rank-table td:nth-child(2), .rank-table th:nth-child(2) { text-align: left; }

/* ---------- 폼 공통 ---------- */
label { display: block; font-size: 13px; color: #444; margin: 14px 0 4px; font-weight: 600; }
.hint { color: #999; font-size: 12px; font-weight: 400; }
input:not([type=checkbox]):not([type=radio]), textarea, select {
    width: 100%; padding: 10px 12px; border: 1px solid #ccd6dd;
    border-radius: 10px; font-size: 14px; font-family: inherit; background: #fff;
}
.radio-group { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 14px 0 4px; }
.radio-group label {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0; font-weight: 400; cursor: pointer;
}
.radio-group input[type=radio] { width: auto; margin: 0; }
.checkbox-inline {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0; font-weight: 400; cursor: pointer; font-size: 14px;
}
.checkbox-inline input[type=checkbox] { width: auto; margin: 0; }
.modal-section-title { margin: 20px 0 4px; }
.modal-section-title:first-child { margin-top: 0; }
input:focus, textarea:focus, select:focus { outline: 2px solid #f5b5c8; border-color: #e0245e; }
.btn-primary {
    background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); border: 0; border-radius: 999px;
    padding: 10px 24px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 16px;
}
.btn-primary:hover { filter: brightness(0.9); }
.btn-sm {
    display: inline-block; background: #fff; border: 1px solid #ccd6dd; color: #444;
    border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer;
}
.btn-sm:hover { border-color: #e0245e; color: #e0245e; text-decoration: none; }
.btn-primary.btn-sm { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); border: 0; }
.btn-primary.btn-sm:hover { filter: brightness(0.9); color: var(--btn-text, #fff); }
.btn-danger { color: #b71c1c; }
.btn-danger:hover { border-color: #b71c1c; color: #b71c1c; }
.input-sm { width: 140px !important; }
.input-xs { width: 70px !important; }
.inline-form { display: flex; gap: 8px; align-items: stretch; margin: 8px 0; }
.inline-form input { width: auto; flex: 1; }
.inline-form button, .inline-form .btn-sm, .inline-form .btn-primary { padding-top: 0; padding-bottom: 0; line-height: 38px; }

/* ---------- 인증 ---------- */
.auth-box {
    max-width: 400px; margin: 24px auto; background: #fff;
    border: 1px solid #e1e8ed; border-radius: 12px; padding: 28px;
}
.auth-box h1 { font-size: 20px; margin: 0 0 16px; }
.auth-alt { text-align: center; color: #888; font-size: 13px; margin-top: 16px; }
.captcha-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

/* 카카오 로그인 */
.btn-kakao {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; box-sizing: border-box; padding: 12px;
    background: #fee500; color: #191600 !important; border-radius: 10px;
    font-size: 15px; font-weight: 700; margin-bottom: 4px;
}
.btn-kakao:hover { background: #f2da00; text-decoration: none; }
.kakao-icon { font-size: 16px; }
.auth-divider { display: flex; align-items: center; text-align: center; color: #aab8c2; font-size: 12px; margin: 16px 0; }
.auth-divider:before, .auth-divider:after { content: ""; flex: 1; height: 1px; background: #e1e8ed; }
.auth-divider span { padding: 0 12px; }
.tag-kakao { background: #fee500; color: #3a2e00; }
.captcha-row img { border: 1px solid #e1e8ed; border-radius: 8px; }

/* ---------- 에디터 ---------- */
.editor-toolbar { display: flex; gap: 8px; align-items: center; margin: 16px 0 0; }
.editor-toolbar button {
    background: #fff; border: 1px solid #ccd6dd; border-radius: 999px;
    padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.editor-toolbar button:hover { border-color: #e0245e; color: #e0245e; }
.img-count { color: #8899a6; font-size: 12px; margin-left: auto; }
.editor {
    min-height: 160px; border: 1px solid #ccd6dd; border-radius: 10px;
    padding: 12px; margin-top: 8px; background: #fff;
}
.editor:focus { outline: 2px solid #f5b5c8; border-color: #e0245e; }
.editor:empty:before { content: attr(data-placeholder); color: #aab8c2; pointer-events: none; }
.editor img { max-height: 240px; border-radius: 8px; margin: 4px 4px 0 0; }
.editor img[data-pending] { opacity: .4; }
.editor .yt-wrap { pointer-events: none; }
.editor-status { color: #e0245e; font-size: 13px; min-height: 18px; margin-top: 6px; }

/* 첨부 이미지 미리보기 스트립 */
.img-strip { display: none; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.img-thumb {
    position: relative; width: 84px; height: 84px;
    border: 1px solid #e1e8ed; border-radius: 10px;
    overflow: hidden; cursor: zoom-in; background: #f5f8fa;
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb.pending { opacity: .45; }
.img-thumb-del {
    position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
    border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff;
    cursor: pointer; font-size: 14px; line-height: 20px; padding: 0; text-align: center;
}
.img-thumb-del:hover { background: #e0245e; }

/* ---------- 댓글 ---------- */
.comment { padding: 10px 0; border-bottom: 1px solid #f0f2f5; }
.comment-head { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.comment-time { color: #8899a6; font-size: 12px; }
.comment-del { margin-left: auto; color: #aab8c2; font-size: 12px; }
.comment-body { margin-top: 2px; font-size: 14px; }
.comment-form textarea { margin-bottom: 8px; }

/* ---------- 쪽지 ---------- */
.msg-row { display: flex; align-items: center; border-bottom: 1px solid #f0f2f5; }
.msg-row.unread { background: #fef6f9; }
.msg-link-row {
    flex: 1; display: flex; align-items: center; gap: 10px;
    padding: 10px 6px; color: inherit; min-width: 0;
}
.msg-link-row:hover { text-decoration: none; background: #f5f8fa; }
.msg-preview { flex: 1; color: #657786; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-time { color: #8899a6; font-size: 12px; font-weight: 400; }
.msg-del { color: #aab8c2; padding: 0 8px; }
.msg-body { background: #f8f9fa; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.msg-form textarea { margin-bottom: 4px; }

/* ---------- 광고 ---------- */
.ad-slot { margin-bottom: 12px; text-align: center; overflow: hidden; border-radius: 12px; }
.ad-frame { width: 100%; height: 90px; border: 0; display: block; }
.ad-sidebar .ad-frame { height: 250px; }
.ad-banner-link { display: block; }
.ad-banner-img { width: 100%; height: auto; display: block; border-radius: 12px; }
.ad-slot-button { padding: 8px 0; }
.ad-button-link { text-decoration: none; }
.ad-popup-button-wrap { padding: 32px 20px; text-align: center; }
.post-content-gated { background: #f7f8fa; border-radius: 10px; padding: 14px; }
.gated-teaser { margin: 0; color: #657786; font-size: 14px; }
html.dark .post-content-gated { background: #1c2129; }
html.dark .gated-teaser { color: #8899a6; }

/* 콘텐츠 게이트 미리보기: 위쪽 70px만 선명하게, 그 아래는 블러 처리 */
.gated-peek {
    position: relative; height: 180px; overflow: hidden; border-radius: 10px; margin-bottom: 10px; background: #000;
    pointer-events: none; cursor: default; user-select: none;
}
.gated-peek img { -webkit-user-drag: none; user-drag: none; }
.gated-peek-bg {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    filter: blur(16px) brightness(0.85); transform: scale(1.15);
}
.gated-peek-sharp { position: absolute; top: 0; left: 0; right: 0; height: 70px; overflow: hidden; }
.gated-peek-sharp img { width: 100%; height: 180px; object-fit: cover; display: block; }
.gated-firstline { color: #657786; font-size: 14px; margin: 0 0 10px; }
html.dark .gated-firstline { color: #8899a6; }
.gated-divider { border: 0; border-top: 1px dashed #e1e8ed; margin: 14px 0; }
html.dark .gated-divider { border-top-color: #3a4250; }
.content-gate > .panel-title { justify-content: center; text-align: center; }

/* 팝업(레이어) 광고 */
.ad-popup-overlay {
    position: fixed; inset: 0; z-index: 1400;
    background: rgba(0,0,0,.55);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; animation: fdModalIn .18s ease;
}
.ad-popup-box {
    position: relative; width: 100%; max-width: 360px;
    max-height: 88vh; overflow: hidden; border-radius: 14px;
    background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.ad-popup-close {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 30px; height: 30px; border-radius: 50%; border: 0;
    background: rgba(0,0,0,.5); color: #fff; cursor: pointer; font-size: 14px; line-height: 30px; padding: 0;
}
.ad-popup-close:hover { background: #e0245e; }
.ad-popup-body { display: block; max-height: calc(88vh - 44px); overflow-y: auto; }
.ad-popup-img { width: 100%; display: block; }
.ad-popup-foot {
    display: flex; align-items: center; gap: 6px; padding: 10px 14px;
    font-size: 13px; color: #444; cursor: pointer; border-top: 1px solid #f0f2f5;
}
html.dark .ad-popup-box { background: #1e2329; }
html.dark .ad-popup-foot { color: #c8ccd0; border-top-color: #2f3640; }

/* 광고 후 콘텐츠 보기 게이트 */
.content-gate { text-align: center; padding: 32px 20px; }
.content-gate-ad { margin: 16px 0; }
.content-gate #gateStatus { margin-top: 10px; }
.content-gate-links { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin: 16px auto; }
.content-gate-link {
    display: block; padding: 12px 16px; border-radius: 10px;
    background: #f5f8fa; color: #14171a; font-weight: 600; font-size: 14px;
    border: 1px solid #e1e8ed;
}
.content-gate-link:hover { border-color: #e0245e; color: #e0245e; text-decoration: none; }
html.dark .content-gate-link { background: #262c34; border-color: #2f3640; color: #e7e9ea; }
html.dark .content-gate-link:hover { border-color: #e0245e; color: #e0245e; }

/* 이벤트 페이지 */
.event-page { text-align: center; }
.event-image { width: 100%; max-width: 640px; display: block; margin: 12px auto; border-radius: 12px; }
.event-cta { display: inline-block; margin: 12px auto; }
.event-text-content { text-align: left; margin: 16px 0; line-height: 1.7; }
.event-prize {
    text-align: left; background: #fef6f9; border: 1px solid #fbd6e1; border-radius: 10px;
    padding: 12px 16px; margin: 12px 0; font-size: 14px;
}
.event-prize strong { display: block; margin-bottom: 4px; color: #e0245e; }
.event-form { text-align: left; margin-top: 24px; }
.event-addr-row { display: flex; gap: 8px; align-items: center; }
.event-addr-row input { flex: 1; }
.event-addr-row .btn-sm { flex-shrink: 0; margin: 0; white-space: nowrap; }
.event-terms {
    background: #f5f8fa; border-radius: 8px; padding: 12px; font-size: 13px; color: #555;
    max-height: 160px; overflow-y: auto; margin: 8px 0;
}
html.dark .event-prize { background: #2a222a; border-color: #3a2a32; }
html.dark .event-terms { background: #262c34; color: #c8ccd0; }

/* 인라인 삭제 폼 (링크처럼 보이는 버튼) */
.inline-del { display: inline; margin: 0; }
.inline-del button {
    background: none; border: 0; padding: 0; cursor: pointer;
    font: inherit; color: inherit;
}
.comment-del { margin-left: auto; color: #aab8c2; font-size: 12px; }
.comment-del:hover { color: #e0245e; }
.msg-del { color: #aab8c2; padding: 0 8px; }
.msg-del:hover { color: #e0245e; }
.msg-row .inline-del { display: flex; align-items: center; }

/* ---------- 관리자 ---------- */
.admin-nav { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-nav a {
    background: #fff; border: 1px solid #e1e8ed; border-radius: 999px;
    padding: 6px 16px; font-size: 14px; color: #444;
}
.admin-nav a:hover { text-decoration: none; border-color: #e0245e; color: #e0245e; }
.admin-nav a.on { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); border-color: var(--btn-bg, #e0245e); }

/* 관리자 전체화면 셸: 왼쪽 사이드바 + 콘텐츠 */
.admin-shell { display: flex; min-height: 100vh; background: #f5f6f8; }
.admin-sidebar {
    width: 232px; flex-shrink: 0; background: #1c2129; color: #d7dbe0;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar-brand {
    display: flex; align-items: center; gap: 8px; padding: 18px 18px; font-weight: 800; font-size: 15px;
    color: #fff; border-bottom: 1px solid #2f3640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-sidebar-brand .star { color: var(--btn-bg, #e0245e); }
.admin-sidebar-brand:hover { text-decoration: none; }
.admin-sidebar-nav { display: flex; flex-direction: column; padding: 10px; gap: 2px; flex: 1; }
.admin-sidebar-nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
    color: #b3b9c2; font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.admin-sidebar-nav a:hover { background: #262c34; color: #fff; }
.admin-sidebar-nav a.on { background: var(--btn-bg, #e0245e); color: #fff; }
.admin-nav-ic { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.admin-sidebar-foot { padding: 12px 16px; border-top: 1px solid #2f3640; font-size: 12.5px; }
.admin-sidebar-user { color: #8b98a5; margin-bottom: 6px; }
.admin-sidebar-foot a { color: #8b98a5; text-decoration: none; }
.admin-sidebar-foot a:hover { color: #fff; }
.admin-content { flex: 1; min-width: 0; padding: 24px 28px 60px; }
.admin-sidebar-toggle {
    display: none; position: fixed; top: 10px; left: 10px; z-index: 60;
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid #e1e8ed;
    background: #fff; font-size: 18px; cursor: pointer;
}
.admin-sidebar-backdrop { display: none; }
@media (max-width: 900px) {
    .admin-shell { display: block; }
    .admin-sidebar-toggle { display: block; }
    .admin-sidebar {
        position: fixed; top: 0; left: 0; height: 100vh; z-index: 61; width: 240px;
        transform: translateX(-100%); transition: transform .2s;
    }
    .admin-shell.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-sidebar-backdrop {
        display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55;
    }
    .admin-shell.sidebar-open .admin-sidebar-backdrop { display: block; }
    .admin-content { padding: 56px 16px 80px; }
}
html.dark .admin-shell { background: #0f1216; }
html.dark .admin-sidebar { background: #15181c; border-right: 1px solid #262c34; }

.admin-page-title { font-size: 20px; margin: 4px 0 2px; font-weight: 800; }
.admin-page-sub { color: #8899a6; font-size: 13px; margin: 0 0 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid #e1e8ed; border-radius: 14px; padding: 16px 18px; }
.stat-card .label { font-size: 12.5px; color: #8899a6; font-weight: 700; }
.stat-card .num { font-size: 24px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -0.02em; }
.stat-card .delta { font-size: 12px; font-weight: 600; color: #8899a6; }
.stat-card .delta.up { color: #1b8a4c; }
.admin-dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .admin-dash-grid { grid-template-columns: 1fr; } }
.pill-ai { display: inline-block; background: var(--btn-bg, #e0245e); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; margin-left: 4px; vertical-align: middle; }
.dash-user-row { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px solid #f5f8fa; font-size: 13.5px; }
.dash-user-row:last-child { border-bottom: 0; }
.dash-quicklinks { display: flex; flex-direction: column; gap: 4px; }
.dash-quicklinks a { padding: 9px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: #444; }
.dash-quicklinks a:hover { background: #f5f8fa; text-decoration: none; color: var(--btn-bg, #e0245e); }
html.dark .stat-card { background: #1e2329; border-color: #2f3640; }
html.dark .dash-user-row { border-bottom-color: #2f3640; }
html.dark .dash-quicklinks a { color: #c8ccd0; }
html.dark .dash-quicklinks a:hover { background: #262c34; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0; }
.admin-table th, .admin-table td { padding: 8px 6px; border-bottom: 1px solid #f0f2f5; text-align: left; }

/* 메뉴 관리: 두 줄짜리 카드형 레이아웃 (기본 정보 / 상세 설정) */
.menu-card { border: 1px solid #f0f2f5; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.menu-bulk-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.menu-card-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.menu-card-row input, .menu-card-row select { width: auto; }
.menu-card-row .input-desc { width: 160px; }
.menu-check { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; white-space: nowrap; font-size: 13px; }
.menu-slug { font-size: 12px; color: #8899a6; white-space: nowrap; }
.menu-postcount { font-size: 12px; color: #8899a6; white-space: nowrap; }
html.dark .menu-card { border-color: #2f3640; }
.settings-group { margin: 24px 0 4px; padding-top: 16px; border-top: 1px solid #f0f2f5; font-size: 14px; color: #e0245e; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.tag-red { background: #fdecea; color: #b71c1c; }
.tag-green { background: #e8f5e9; color: #1b5e20; }
.tag-gray { background: #eceff1; color: #546e7a; }
.tag-series { background: #fdecf1; color: #e0245e; font-weight: 700; display: inline-block; margin-bottom: 6px; text-decoration: none; }
.tag-series:hover { filter: brightness(0.95); text-decoration: none; }
html.dark .tag-series { background: #3a1c26; color: #ff7aa2; }

/* ---------- 연재 ---------- */
.series-picker-row { margin: 4px 0 12px; }
.series-past-posts {
    max-height: 200px; overflow-y: auto; border: 1px solid #eceff1; border-radius: 8px;
    padding: 8px 12px; margin-bottom: 12px;
}
.series-past-post { display: block; margin: 6px 0; }
html.dark .series-past-posts { border-color: #2f3640; }
.series-list { list-style: none; margin: 0; padding: 0; }
.series-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #f0f2f5;
}
.series-row:last-child { border-bottom: 0; }
.series-row-title { font-weight: 700; }
.series-row-meta { font-size: 12px; color: #8899a6; white-space: nowrap; }
.series-desc { color: #555; margin: 8px 0 0; white-space: pre-wrap; }
.series-edit { margin-top: 12px; }
.series-edit summary { cursor: pointer; }
.series-edit form { margin-top: 12px; }
.series-items { list-style: none; margin: 0; padding: 0; }
.series-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}
.series-item:last-child { border-bottom: 0; }
.series-item.current { background: #fff5f7; border-radius: 8px; padding-left: 8px; }
.series-item-no { flex-shrink: 0; font-size: 12px; color: #8899a6; min-width: 40px; }
.series-item-title { flex: 1; font-weight: 600; }
.series-item-tools { display: flex; gap: 4px; flex-shrink: 0; }
.series-item-tools form { display: flex; gap: 4px; margin: 0; }
.series-item-tools button { padding: 2px 8px; }
.series-nav { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.series-nav-disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.series-items-compact .series-item { padding: 6px 0; }
html.dark .series-row,
html.dark .series-item { border-color: #2f3640; }
html.dark .series-row-meta,
html.dark .series-item-no { color: #8899a6; }
html.dark .series-item.current { background: #2a1f24; }

/* ---------- 검색 ---------- */
.search-form { flex-shrink: 0; }
.search-form input {
    width: 130px; padding: 6px 12px; border: 1px solid #e1e8ed;
    border-radius: 999px; font-size: 13px; background: #f5f8fa;
    transition: width .25s ease, background .2s;
}
/* PC: 포커스 시 검색창 확장 (화면 폭에 따라 최대 280px) */
.search-form input:focus { width: clamp(180px, 28vw, 280px); background: #fff; }
.search-link-mobile { display: none; font-size: 15px; }
@media (max-width: 700px) {
    .search-form { display: none; }
    .search-link-mobile { display: inline; }
}
@media (max-width: 600px) {
    .search-link-mobile.mobile-gnb-dup { display: none; } /* 검색은 하단 GNB로 이동 - 상단 아이콘은 중복이므로 숨김 (위 700px 규칙보다 우선) */
}

/* ---------- 레이지 로딩 ---------- */
.feed-loader { text-align: center; color: #8899a6; font-size: 13px; padding: 14px 0; }

/* ---------- 페이저 / 라이트박스 ---------- */
.pager { display: flex; justify-content: center; gap: 12px; margin: 16px 0; }
.lightbox {
    position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.85);
    display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 94vw; max-height: 94vh; border-radius: 8px; object-fit: contain; }

/* ---------- 투표/설문 ---------- */
.poll {
    margin: 10px 0; padding: 14px; border: 1px solid #e1e8ed;
    border-radius: 12px; background: #fafbfc;
}
.poll-q { font-weight: 700; margin-bottom: 4px; }
.poll-meta { color: #8899a6; font-size: 12px; margin-bottom: 10px; }
.poll-choice {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    border: 1px solid #ccd6dd; border-radius: 10px; margin-bottom: 6px;
    cursor: pointer; font-weight: 400; background: #fff;
}
.poll-choice:hover { border-color: #e0245e; }
.poll-choice input { width: auto; }
.poll-submit { margin-top: 6px; }
.poll-result {
    position: relative; padding: 10px 12px; margin-bottom: 6px;
    border-radius: 10px; background: #eceef0; overflow: hidden;
    display: flex; align-items: center; font-size: 14px;
}
.poll-bar {
    position: absolute; left: 0; top: 0; bottom: 0;
    background: #f7c6d6; z-index: 0; transition: width .4s;
}
.poll-result.mine .poll-bar { background: #f28fb0; }
.poll-label { position: relative; z-index: 1; flex: 1; }
.poll-result.mine .poll-label { font-weight: 700; }
.poll-pct { position: relative; z-index: 1; color: #555; font-size: 13px; }
.poll-note { color: #8899a6; font-size: 13px; margin-top: 6px; }

/* 사이트 투표 (사이드바) */
.site-poll { font-size: 13px; scroll-margin-top: 104px; }
.site-poll .panel-title { font-size: 14px; }
.site-poll .poll-q { font-size: 14px; }
.site-poll-desc { color: #657786; font-size: 12px; margin-bottom: 4px; }
.site-poll .poll-choice { padding: 8px 10px; }
.site-poll .poll-result { padding: 8px 10px; font-size: 13px; }
.site-poll .poll-pct { font-size: 12px; }
.site-poll .poll-submit { width: 100%; }
.site-poll-peek, .site-poll-change { margin-top: 8px; }
.site-poll-peek summary, .site-poll-change summary,
.admin-poll-result summary { cursor: pointer; color: #8899a6; font-size: 12px; margin-bottom: 6px; }
.admin-poll-result { margin-top: 4px; min-width: 220px; }
.poll-choice.is-disabled { opacity: .5; cursor: not-allowed; }
html.dark .site-poll-desc { color: #9aa5b1; }

/* 글쓰기 투표 작성 박스 */
.poll-box {
    margin-top: 10px; padding: 14px; border: 1px dashed #ccd6dd;
    border-radius: 12px; background: #fafbfc;
}
.poll-box-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.poll-opt-input { margin-bottom: 6px; }
.poll-box-opts { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.poll-inline { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; margin: 0; }
.poll-inline input { width: auto; }
.poll-expiry { width: auto !important; margin-left: auto; }
.poll-readonly { margin-top: 10px; }
.poll-readonly-opt {
    padding: 8px 12px; border: 1px solid #e1e8ed; border-radius: 8px;
    margin: 4px 0; background: #fff; color: #657786;
}

/* ---------- 다크모드 토글 버튼 ---------- */
.theme-toggle {
    flex-shrink: 0; background: none; border: 0; cursor: pointer;
    font-size: 18px; line-height: 1; padding: 4px; border-radius: 50%;
}
.theme-toggle:hover { background: rgba(128,128,128,.15); }

/* ==================== 다크모드 ==================== */
html.dark body { background: #15181c; color: #e7e9ea; }
html.dark a { color: #ff5c8a; }
html.dark .topbar { background: #1e2329; border-bottom-color: #2f3640; }
html.dark .menu-row { border-top-color: #2f3640; }
html.dark .logo { color: #ff5c8a; }
html.dark .menu-nav a { color: #c8ccd0; }
html.dark .menu-nav a:hover { background: #3a2630; }
html.dark .menu-nav a.active { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); }
html.dark .menu-scroll,
html.dark .menu-all-btn { background: #262c34; border-color: #2f3640; color: #c8ccd0; }
html.dark .menu-all-panel { background: #1e2329; border-color: #2f3640; }
html.dark .menu-all-panel a { color: #d8dbde; }
html.dark .menu-all-panel a:hover { background: #3a2630; }
html.dark .topbar-right a { color: #c8ccd0; }
html.dark .me-nick { color: #8b98a5; }
html.dark .search-form input { background: #262c34; border-color: #2f3640; color: #e7e9ea; }

html.dark .panel,
html.dark .post,
html.dark .auth-box,
html.dark .board-intro,
html.dark .board-guide-item { background: #1e2329; border-color: #2f3640; }
html.dark .post-author,
html.dark .panel-title,
html.dark .feed-title,
html.dark .board-intro-title { color: #e7e9ea; }
html.dark .post-more-menu { background: #1e2329; border-color: #2f3640; }
html.dark .post-more-menu a { color: #e7e9ea; }
html.dark .post-more-menu a:hover { background: #262c34; }
html.dark .post-sub,
html.dark .post-sub *,
html.dark .comment-time,
html.dark .msg-time,
html.dark .msg-preview,
html.dark .hint,
html.dark .empty,
html.dark .empty-feed,
html.dark .board-intro-desc,
html.dark .board-guide-desc,
html.dark .link-url,
html.dark .link-desc,
html.dark .trend-meta { color: #8b98a5; }
html.dark .post-actions { border-top-color: #2f3640; }
html.dark .act { color: #8b98a5; }
html.dark .act:hover { background: #3a2630; color: #ff5c8a; }
html.dark .comment { border-bottom-color: #2f3640; }

html.dark input:not([type=checkbox]):not([type=radio]),
html.dark textarea,
html.dark select,
html.dark .editor {
    background: #262c34; border-color: #3a4250; color: #e7e9ea;
}
html.dark .editor:empty:before,
html.dark ::placeholder { color: #6b7783; }

html.dark .panel,
html.dark .trend-item:hover,
html.dark .msg-link-row:hover,
html.dark .board-guide-item:hover { background: #262c34; }
html.dark .board-guide-item:hover { background: #2b3138; }

html.dark .btn-sm { background: #262c34; border-color: #3a4250; color: #c8ccd0; }
html.dark .rank-tab { background: #262c34; border-color: #3a4250; color: #c8ccd0; }
html.dark .rank-tab.on { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); }
html.dark .rank-list li { border-bottom-color: #2f3640; }
html.dark .rank-table th, html.dark .rank-table td,
html.dark .admin-table th, html.dark .admin-table td { border-bottom-color: #2f3640; }
html.dark .admin-nav a { background: #262c34; border-color: #3a4250; color: #c8ccd0; }
html.dark .admin-nav a.on { background: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); }

html.dark .link-card { background: #262c34; border-color: #2f3640; }
html.dark .link-card:hover { background: #2b3138; }
html.dark .link-title { color: #e7e9ea; }
html.dark .msg-body,
html.dark .comment-body { color: #e7e9ea; }
html.dark .msg-body { background: #262c34; }
html.dark .msg-row.unread { background: #2a222a; }

html.dark .poll,
html.dark .poll-box { background: #262c34; border-color: #2f3640; }
html.dark .poll-choice { background: #1e2329; border-color: #3a4250; }
html.dark .poll-result { background: #313842; }
html.dark .poll-bar { background: #7a3350; }
html.dark .poll-result.mine .poll-bar { background: #a8446a; }
html.dark .poll-pct, html.dark .poll-note, html.dark .poll-meta { color: #9aa5b1; }
html.dark .poll-readonly-opt { background: #1e2329; border-color: #3a4250; color: #9aa5b1; }
html.dark .notice-card { background: #1e2329; border-color: #2f3640; border-left-color: #e0245e; color: #e7e9ea; }
html.dark .notice-card:hover { background: #2b3138; }
html.dark .notice-text { color: #c8ccd0; }
html.dark .notice-nav { background: #262c34; border-color: #3a4250; color: #c8ccd0; }
html.dark .notice-count { color: #8b98a5; }
html.dark .attend-img { background: #262c34; }
html.dark .attend-noimg { color: #55606b; }
html.dark .attend-imgbtn { background: #262c34; border-color: #3a4250; color: #c8ccd0; }
html.dark .attend-rest li { border-bottom-color: #2f3640; }
html.dark .attend-status.done { background: #1f3324; color: #86e0a0; }
html.dark .attend-myimg { background: #262c34; border-color: #2f3640; }
html.dark .attend-myimg > img { border-color: #3a4250; }
html.dark .attend-fab { background: #262c34; border-color: #3a4250; }
html.dark .fab-dot { border-color: #262c34; }
html.dark .sort-btn { background: #262c34; border-color: #3a4250; color: #c8ccd0; }
html.dark .cat-tabs { border-bottom-color: #2f3640; }
html.dark .cat-tab { color: #8899a6; }
html.dark .cat-tab:hover, html.dark .cat-tab.on { color: #e7e9ea; }
html.dark .post-cat { background: #313842; color: #9aa5b1; }
html.dark .sort-btn.on { background: var(--btn-bg, #e0245e); border-color: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); }
html.dark .rc-item { border-bottom-color: #2f3640; }
html.dark .rc-item:hover { background: #2b3138; }
html.dark .rc-text { color: #c8ccd0; }
html.dark .board-wrap { background: #1e2329; border-color: #2f3640; }
html.dark .board-list thead th { background: #262c34; border-bottom-color: #2f3640; color: #9aa5b1; }
html.dark .board-list tbody td { border-bottom-color: #2f3640; color: #9aa5b1; }
html.dark .board-list tbody tr:hover { background: #262c34; }
html.dark .board-list .c-title a { color: #e7e9ea; }
html.dark .board-list tr.pinned { background: #2a222a; }
html.dark .post-title, html.dark .post-title-link { color: #e7e9ea; }
html.dark .pagination .pg { background: #262c34; border-color: #3a4250; color: #c8ccd0; }
html.dark .pagination .pg.on { background: var(--btn-bg, #e0245e); border-color: var(--btn-bg, #e0245e); color: var(--btn-text, #fff); }
html.dark .auth-divider:before, html.dark .auth-divider:after { background: #2f3640; }
html.dark .tip { background: #3a4250; }
html.dark .tip-box { background: #0b0d0f; }
html.dark .tip-box:before { border-bottom-color: #0b0d0f; }

html.dark .alert-error { background: #3a1f22; color: #ff9a9a; }
html.dark .alert-info { background: #1f2d3a; color: #8fc3ff; }
html.dark .avatar { color: #fff; }
html.dark .site-footer { color: #6b7783; }
html.dark .theme-toggle:hover { background: rgba(255,255,255,.12); }
html.dark .tag-gray { background: #313842; color: #9aa5b1; }
html.dark .settings-group { border-top-color: #2f3640; }
html.dark .editor-toolbar button { background: #262c34; border-color: #3a4250; color: #c8ccd0; }
html.dark .img-thumb { background: #262c34; border-color: #3a4250; }


/* GitHub 저장소 상세 카드 */
.gh-card { margin-top: 10px; border: 1px solid #e1e8ed; border-radius: 12px; padding: 14px; background: #fafbfc; }
.gh-head { display: flex; align-items: center; gap: 10px; }
.gh-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.gh-title { display: flex; flex-direction: column; min-width: 0; }
.gh-title a { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-site { font-size: 12px; color: #8899a6; }
.gh-desc { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
.gh-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gh-topics span { background: #e8f1fd; color: #1d6fd1; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.gh-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 13px; color: #657786; }
.gh-langbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 12px; background: #e1e8ed; }
.gh-langs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: #657786; }
.gh-langs b { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.gh-l0 { background: #3178c6; } .gh-l1 { background: #f1e05a; } .gh-l2 { background: #e34c26; }
.gh-l3 { background: #563d7c; } .gh-l4 { background: #89e051; } .gh-l5 { background: #b07219; }
.gh-readme { margin-top: 12px; padding: 10px 12px; background: #fff; border: 1px solid #e1e8ed; border-radius: 8px; font-size: 13px; line-height: 1.6; color: #444; }
.gh-readme-label { display: block; font-size: 11px; font-weight: 700; color: #8899a6; margin-bottom: 4px; }
.gh-home { display: inline-block; margin-top: 10px; font-size: 13px; }
html.dark .gh-card { background: #262c34; border-color: #2f3640; }
html.dark .gh-readme { background: #1c2129; border-color: #2f3640; color: #c5cdd5; }
html.dark .gh-topics span { background: #1f3550; color: #7ab8ff; }
html.dark .gh-langbar { background: #2f3640; }

/* 스포일러 금지 */
.spoiler-wrap { position: relative; margin-top: 6px; }
.spoiler-wrap:not(.revealed) { overflow: hidden; border-radius: 12px; min-height: 130px; }
.spoiler-wrap .spoiler-body { filter: blur(14px); user-select: none; pointer-events: none; max-height: 220px; min-height: 130px; overflow: hidden; }
.spoiler-cover {
    position: absolute; z-index: 2; padding: 12px; text-align: center; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 1px dashed #c4ccd4; border-radius: 12px; cursor: pointer; font: inherit; color: #14171a;
    background: rgba(255,255,255,.55);
}
.spoiler-cover:hover { background: rgba(255,255,255,.7); }
.spoiler-cover span:last-child { font-size: 13px; color: #657786; }
.spoiler-cover-ico { font-size: 24px; }
.spoiler-wrap.revealed .spoiler-body { filter: none; user-select: auto; pointer-events: auto; max-height: none; overflow: visible; }
.spoiler-wrap.revealed .spoiler-cover { display: none; }
html.dark .spoiler-cover { background: rgba(21,24,28,.6); color: #e7e9ea; border-color: #3a434e; }
html.dark .spoiler-cover:hover { background: rgba(21,24,28,.75); }


/* 익명 게시판 */
.avatar-anon { background: #8899a6; color: #fff; }
.comment-author-anon strong { color: #4a5560; }
.comment-author-anon.is-owner strong { color: #e0245e; }
html.dark .comment-author-anon strong { color: #aab8c2; }

/* 활동 잔디 */
.hm-scroll { overflow-x: auto; padding-bottom: 4px; }
.hm-months, .hm-grid { display: grid; gap: 3px; }
.hm-months { font-size: 11px; color: #8899a6; height: 16px; margin-bottom: 2px; }
.hm-months span { white-space: nowrap; }
.hm-grid { grid-auto-flow: column; grid-template-rows: repeat(7, 13px); width: max-content; }
.hm-cell { display: inline-block; width: 13px; height: 13px; border-radius: 3px; background: #ebedf0; }
.hm-off { background: transparent; }
.hm-l1 { background: #9be9a8; } .hm-l2 { background: #40c463; } .hm-l3 { background: #30a14e; } .hm-l4 { background: #216e39; }
.hm-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: #657786; }
.hm-legend { display: inline-flex; align-items: center; gap: 3px; }
html.dark .hm-cell { background: #2b3138; } html.dark .hm-off { background: transparent; }
html.dark .hm-l1 { background: #0e4429; } html.dark .hm-l2 { background: #006d32; } html.dark .hm-l3 { background: #26a641; } html.dark .hm-l4 { background: #39d353; }

/* 뱃지 */
.badge-chip { font-size: 13px; margin-left: 2px; cursor: help; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.badge-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 8px; border: 1px solid #e1e8ed; border-radius: 10px; opacity: .45; position: relative; }
.badge-item.on { opacity: 1; background: #fffbea; border-color: #f2d98a; }
.badge-item input { position: absolute; top: 6px; left: 6px; }
.badge-ico { font-size: 26px; }
.badge-item small { color: #657786; font-size: 11px; }
.badge-item .badge-date { color: #a98a1f; }
html.dark .badge-item { border-color: #2f3640; } html.dark .badge-item.on { background: #2e2a17; border-color: #6b5a1e; }
.anon-notice { font-size: 13px; line-height: 1.6; background: #f4f6f8; } html.dark .anon-notice { background: #1c2129; }

/* 다국어 */
.i18n-note { margin: 6px 0 0; font-size: 12px; color: #8899a6; }
.i18n-lang-grid { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 10px; }

.menu-i18n { margin: 4px 0 6px; font-size: 13px; }
.menu-i18n summary { cursor: pointer; color: #657786; }
.menu-i18n-lang { display: inline-block; min-width: 72px; font-weight: 600; }

/* 언어 선택: 하단 좌측 플로팅 버튼 (출석체크 버튼 바로 위) */
.lang-fab { position: fixed; left: 16px; bottom: 76px; z-index: 860; }
.lang-fab-btn {
    display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px;
    border-radius: 999px; border: 1px solid #e1e8ed; background: #fff; color: #14171a;
    font-size: 13px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.lang-fab-btn span { font-size: 17px; line-height: 1; }
.lang-fab-btn:hover { transform: translateY(-2px); }
.lang-fab-menu {
    position: absolute; left: 0; bottom: 48px; min-width: 140px; padding: 6px;
    background: #fff; border: 1px solid #e1e8ed; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
.lang-fab-menu[hidden] { display: none; }
.lang-fab-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: inherit; font-size: 14px; white-space: nowrap; }
.lang-fab-menu a:hover { background: #f0f2f5; text-decoration: none; }
.lang-fab-menu a.on { font-weight: 700; background: #f4f6f8; }
html.dark .lang-fab-btn, html.dark .lang-fab-menu { background: #1c2129; border-color: #3a434e; color: #e7e9ea; }
html.dark .lang-fab-menu a:hover, html.dark .lang-fab-menu a.on { background: #262c34; }
@media (max-width: 600px) {
    .lang-fab { bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 12px); }
}

.i18n-busy-note { animation: i18nPulse 1.2s ease-in-out infinite; }
@keyframes i18nPulse { 50% { opacity: .35; } }

/* ---------- 포럼형 레이아웃 ---------- */
body.layout-forum .menu-row, body.layout-forum .menu-all-panel, body.layout-forum .vmenu { display: none; }
@media (min-width: 901px) {
    body.layout-forum .wrap { max-width: 1180px; }
    body.layout-forum .topbar-inner { max-width: 1180px; }
    body.layout-forum .main { max-width: 840px; }
}
.forum-wrap {
    background: #fff; border: 1px solid #e1e8ed; border-radius: 12px;
    overflow: hidden; margin-bottom: 12px;
}
.forum-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.forum-list thead th {
    background: #f7f9fa; color: #657786; font-weight: 600; font-size: 12px;
    padding: 10px 12px; border-bottom: 1px solid #e1e8ed; text-align: center;
}
.forum-list tbody td { padding: 14px 12px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.forum-list tbody tr:last-child td { border-bottom: 0; }
.forum-list tbody tr:hover { background: #fafbfc; }
.forum-list .f-board { text-align: left; }
.forum-list thead .f-board { text-align: left; }
.forum-list .f-name { font-size: 16px; font-weight: 700; color: #14171a; }
.forum-list .f-name:hover { color: #e0245e; text-decoration: none; }
.forum-list .f-desc { margin: 4px 0 0; font-size: 13px; color: #657786; line-height: 1.45; }
.forum-list .f-num { width: 84px; text-align: center; white-space: nowrap; }
.forum-list .f-num strong { display: block; font-size: 16px; color: #14171a; }
.forum-list .f-label { font-size: 11px; color: #8899a6; }
.forum-list .f-last { width: 240px; text-align: left; max-width: 240px; }
.forum-list .f-last-title { display: block; color: #14171a; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-list .f-last-title:hover { color: #e0245e; }
.forum-list .f-last-meta { display: block; margin-top: 2px; font-size: 12px; color: #8899a6; }
.forum-list .f-none { font-size: 12px; color: #aab8c2; }
.forum-crumb { font-size: 13px; color: #657786; margin: 0 0 10px; }
.forum-crumb a { color: #657786; }
.forum-crumb a:hover { color: #e0245e; }
.forum-crumb span { margin: 0 4px; color: #aab8c2; }
@media (max-width: 700px) {
    .forum-list thead { display: none; }
    .forum-list, .forum-list tbody, .forum-list tr, .forum-list td { display: block; width: 100%; max-width: none; }
    .forum-list tbody tr { padding: 12px; border-bottom: 1px solid #f0f2f5; }
    .forum-list tbody td { padding: 2px 0; border: 0; }
    .forum-list .f-num { display: inline-block; width: auto; margin-right: 14px; text-align: left; }
    .forum-list .f-num strong { display: inline; font-size: 13px; }
    .forum-list .f-label { margin-left: 3px; }
    .forum-list .f-last { margin-top: 6px; }
}
html.dark .forum-wrap { background: #1e2329; border-color: #2f3640; }
html.dark .forum-list thead th { background: #262c34; border-bottom-color: #2f3640; color: #9aa5b1; }
html.dark .forum-list tbody td { border-bottom-color: #2f3640; }
html.dark .forum-list tbody tr { border-bottom-color: #2f3640; }
html.dark .forum-list tbody tr:hover { background: #262c34; }
html.dark .forum-list .f-name, html.dark .forum-list .f-num strong, html.dark .forum-list .f-last-title { color: #e7e9ea; }
html.dark .forum-list .f-desc { color: #9aa5b1; }

/* ---------- 커뮤니티형 레이아웃 (왼쪽 메뉴 + 게시판별 최신글) ---------- */
.cm-hot { margin-bottom: 14px; }
.cm-hot-list { list-style: none; margin: 0; padding: 0; }
.cm-hot-list li { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid #f0f2f5; font-size: 14px; min-width: 0; }
.cm-hot-list li:last-child { border-bottom: 0; }
.cm-rank { width: 20px; text-align: center; font-weight: 800; color: #e0245e; flex-shrink: 0; }
.cm-chip { flex-shrink: 0; background: #eef1f4; color: #657786; border-radius: 6px; padding: 1px 7px; font-size: 11px; }
.cm-chip:hover { color: #e0245e; text-decoration: none; }
.cm-title { color: #14171a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cm-hot-list .cm-title { flex: 0 1 auto; }
.cm-title:hover { color: #e0245e; text-decoration: none; }
.cm-meta { margin-left: auto; flex-shrink: 0; font-size: 12px; color: #8899a6; }

.cm-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.cm-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cm-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.cm-block { background: #fff; border: 1px solid #e1e8ed; border-radius: 12px; padding: 0 14px 6px; min-width: 0; }
.cm-block-title {
    display: flex; align-items: center; justify-content: space-between;
    margin: 0; padding: 12px 0 10px; font-size: 15px; border-bottom: 2px solid #14171a;
}
.cm-block-title a { color: #14171a; }
.cm-block-title a:hover { color: #e0245e; text-decoration: none; }
.cm-block-title .cm-more { font-size: 11px; font-weight: 600; color: #8899a6; }
.cm-list { list-style: none; margin: 0; padding: 0; }
.cm-list li { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 14px; min-width: 0; }
.cm-list li:last-child { border-bottom: 0; }
.cm-list .cm-title { flex: 0 1 auto; }
.cm-new { flex-shrink: 0; background: #e0245e; color: #fff; border-radius: 3px; font-size: 10px; font-weight: 700; padding: 0 4px; line-height: 15px; }
.cm-date { margin-left: auto; flex-shrink: 0; font-size: 12px; color: #aab8c2; padding-left: 6px; }
.cm-block .empty { padding: 14px 0; }
@media (max-width: 700px) {
    .cm-grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
    .cm-hot-list .cm-meta { display: none; }
}
html.dark .cm-block { background: #1e2329; border-color: #2f3640; }
html.dark .cm-block-title { border-bottom-color: #e7e9ea; }
html.dark .cm-block-title a, html.dark .cm-title { color: #e7e9ea; }
html.dark .cm-list li, html.dark .cm-hot-list li { border-bottom-color: #2f3640; }
html.dark .cm-chip { background: #262c34; color: #9aa5b1; }

/* ---------- 관리자: 사이트 형태 템플릿 선택 ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tpl-card {
    display: flex; flex-direction: column; gap: 6px; padding: 14px; cursor: pointer;
    border: 2px solid #e1e8ed; border-radius: 12px; background: #fff; position: relative;
}
.tpl-card input { position: absolute; top: 12px; right: 12px; }
.tpl-card.on, .tpl-card:has(input:checked) { border-color: #e0245e; box-shadow: 0 0 0 3px rgba(224, 36, 94, .12); }
.tpl-ic { font-size: 22px; }
.tpl-desc { font-size: 12px; color: #657786; line-height: 1.45; }
.tpl-thumb { display: grid; gap: 4px; margin-top: 6px; height: 64px; padding: 6px; background: #f5f8fa; border-radius: 8px; }
.tpl-thumb i { background: #cfd9de; border-radius: 3px; }
.tpl-thumb.tpl-feed { grid-template-columns: 1fr; grid-template-rows: repeat(3, 1fr); }
.tpl-thumb.tpl-feed i:nth-child(4) { display: none; }
.tpl-thumb.tpl-board, .tpl-thumb.tpl-forum { grid-template-columns: 1fr; grid-template-rows: repeat(4, 1fr); }
.tpl-thumb.tpl-forum i:nth-child(odd) { background: #b8c6cf; }
.tpl-thumb.tpl-community { grid-template-columns: 22% 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tpl-thumb.tpl-community i:first-child { grid-row: 1 / 3; background: #9fb2bd; }
.tpl-thumb.tpl-community i:nth-child(4) { display: none; }
.sub-title { font-size: 14px; margin: 18px 0 6px; }
.check-row { display: flex; align-items: center; gap: 8px; }
html.dark .tpl-card { background: #1e2329; border-color: #2f3640; }
html.dark .tpl-thumb { background: #262c34; }
html.dark .tpl-thumb i { background: #3a444f; }

/* ---------- 피드 상단 빠른 글쓰기 ---------- */
.quick-compose { padding: 12px 16px; }
.qc-row { display: flex; gap: 10px; align-items: flex-start; }
.qc-row textarea {
    flex: 1; min-width: 0; margin: 0; resize: none; overflow: hidden;
    border: 0; border-radius: 20px; background: #f0f2f5; padding: 10px 16px;
    font-size: 15px; line-height: 1.45; min-height: 42px; max-height: 360px;
}
.qc-row textarea:focus { outline: none; }
.quick-compose.open .qc-row textarea { min-height: 84px; border-radius: 12px; overflow-y: auto; }
.qc-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 52px; }
.qc-imgs:empty { display: none; }
.qc-img { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: #e1e8ed; }
.qc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qc-img button {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border: 0;
    border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; cursor: pointer;
}
.qc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 0 52px; padding-top: 10px; border-top: 1px solid #e1e8ed; }
.qc-bar .qc-menu { width: auto; max-width: 160px; margin: 0; padding: 4px 8px; font-size: 13px; border-radius: 999px; }
.qc-menu-name { font-size: 13px; color: #657786; }
.qc-status { font-size: 12px; color: #8899a6; }
.qc-full { margin-left: auto; }
.qc-submit { margin-top: 0; padding: 5px 16px; font-weight: 700; }
.qc-submit:disabled { opacity: .45; cursor: default; filter: none; }
@media (max-width: 600px) {
    .qc-imgs, .qc-bar { margin-left: 0; }
}
html.dark .qc-row textarea { background: #262c34; }
html.dark .qc-bar { border-top-color: #2f3640; }
html.dark .qc-img { background: #262c34; }

/* ---------- 게시판 스킨 (커뮤니티형) ---------- */
/* 앨범형 */
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.album-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e1e8ed; border-radius: 12px; overflow: hidden; color: inherit; }
.album-card:hover { border-color: #e0245e; text-decoration: none; }
.album-thumb { display: block; aspect-ratio: 4 / 3; background: #eef1f4 center / cover no-repeat; }
.album-noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 28px; opacity: .45; }
.album-title { padding: 8px 10px 2px; font-size: 14px; font-weight: 600; color: #14171a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-meta { padding: 0 10px 10px; font-size: 12px; color: #8899a6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 매거진형 */
.mag-list { padding: 0 14px; margin-bottom: 12px; }
.mag-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
.mag-item:last-child { border-bottom: 0; }
.mag-thumb { flex-shrink: 0; width: 96px; height: 72px; border-radius: 8px; background: #eef1f4 center / cover no-repeat; }
.mag-body { min-width: 0; flex: 1; }
.mag-title { display: block; font-size: 15px; font-weight: 700; color: #14171a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mag-title:hover { color: #e0245e; text-decoration: none; }
.mag-excerpt { margin: 4px 0; font-size: 13px; color: #657786; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mag-meta { font-size: 12px; color: #8899a6; }
/* Q&A형 */
.qna-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.qna-badge.wait { background: #eef1f4; color: #657786; }
.qna-badge.ing  { background: #fff4e0; color: #b26a00; }
.qna-badge.done { background: #e3f6ea; color: #1b8a45; }
.board-list .c-status { width: 76px; }
.qna-list .c-title { text-align: left; }
.comment-accepted { border-left: 3px solid #1b8a45; background: #f4fbf6; padding-left: 10px; border-radius: 4px; }
.qna-accept-btn { color: #1b8a45; font-weight: 600; }
/* 한줄형 */
.oneline-form { display: flex; gap: 8px; margin-bottom: 12px; }
.oneline-form input[type=text] { flex: 1; min-width: 0; }
/* 등록 버튼: .btn-primary의 margin-top 제거 + 입력칸과 같은 높이로 늘림 */
.oneline-form .btn-primary { margin: 0; align-self: stretch; flex-shrink: 0; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.oneline-login { margin-bottom: 12px; font-size: 14px; color: #657786; }
.oneline-list { padding: 4px 14px; margin-bottom: 12px; }
.oneline-item { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0f2f5; font-size: 14px; min-width: 0; }
.oneline-item:last-child { border-bottom: 0; }
.oneline-author { flex-shrink: 0; width: 92px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oneline-author a { color: #14171a; }
.oneline-text { flex: 1; min-width: 0; color: #14171a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oneline-text:hover { color: #e0245e; text-decoration: none; }
.oneline-date { flex-shrink: 0; font-size: 12px; color: #aab8c2; }
.oneline-del { margin: 0; flex-shrink: 0; }
@media (max-width: 700px) {
    .album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .oneline-author { width: 64px; }
    .mag-thumb { width: 76px; height: 60px; }
}
html.dark .album-card { background: #1e2329; border-color: #2f3640; }
html.dark .album-thumb, html.dark .mag-thumb { background-color: #262c34; }
html.dark .album-title, html.dark .mag-title, html.dark .oneline-text, html.dark .oneline-author a { color: #e7e9ea; }
html.dark .mag-item, html.dark .oneline-item { border-bottom-color: #2f3640; }
html.dark .qna-badge.wait { background: #262c34; color: #9aa5b1; }
html.dark .qna-badge.ing { background: #3a2f1a; color: #f0b255; }
html.dark .qna-badge.done { background: #1c3326; color: #5fd08a; }
html.dark .comment-accepted { background: #1a2a20; }

/* ---------- 관리자 게시물 일괄 관리 (관리자에게만 렌더링됨) ---------- */
.admin-chk { display: none; width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--btn-bg, #e0245e); vertical-align: middle; flex-shrink: 0; }
body.has-admin-bulk .admin-chk { display: inline-block; }
.admin-bulk-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    margin: 0 0 12px; padding: 8px 12px; border: 1px dashed #e0245e; border-radius: 10px;
    background: #fff7fa; font-size: 13px;
}
.admin-bulk-label { background: #e0245e; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.admin-bulk-all { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.admin-bulk-count { color: #657786; margin-right: auto; }
.admin-bulk-menu { max-width: 160px; padding: 4px 6px; font-size: 13px; }
.admin-bulk-bar .btn-sm:disabled { opacity: .45; cursor: not-allowed; }
.post-tools .admin-chk { margin-right: 2px; }
.board-list .c-chk { width: 30px; padding-left: 4px; padding-right: 0; }
.album-cell { position: relative; display: flex; flex-direction: column; min-width: 0; }
.album-cell > .album-card { flex: 1; }
.album-cell > .admin-chk { position: absolute; top: 8px; left: 8px; z-index: 2; width: 18px; height: 18px; }
.mag-item > .admin-chk, .oneline-item > .admin-chk { align-self: center; }
.admin-post-panel { border: 1px dashed #e0245e; }
.admin-post-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 0; border-top: 1px solid #f0f2f5; font-size: 13px; }
.admin-post-row:first-of-type { border-top: 0; }
.admin-post-row select { max-width: 180px; padding: 4px 6px; font-size: 13px; }
.admin-post-label { font-weight: 700; min-width: 120px; }
.admin-post-opt { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
html.dark .admin-bulk-bar { background: #2a1f26; }
html.dark .admin-bulk-count { color: #9aa5b1; }
html.dark .admin-post-row { border-top-color: #2f3640; }

/* 글 상세 하단 게시판 목록 (커뮤니티형) */
.post-boardlist .board-list tbody td { padding: 8px; }
.post-boardlist .board-list tr.current { background: #fef6f9; }
html.dark .post-boardlist .board-list tr.current { background: #2a222a; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row .cm-chip { padding: 4px 10px; font-size: 13px; }
.chip-row .cm-chip.on { background: #e0245e; color: #fff; }
.album-card.current { border-color: #e0245e; box-shadow: 0 0 0 2px rgba(224, 36, 94, .18); }
.mag-item.current, .oneline-item.current { background: #fef6f9; }
.board-list tr.current { background: #fef6f9; }
.board-list tr.current .c-title a { font-weight: 700; }
html.dark .mag-item.current, html.dark .oneline-item.current, html.dark .board-list tr.current { background: #2a222a; }
.post-boardlist > .panel-title { margin-top: 18px; }

/* ---------- 인기 검색어 (사이드바 위젯 + 관리자 통계) ---------- */
.search-rank .rank-list li { display: flex; align-items: center; gap: 4px; }
.search-rank .rank-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; }
.sr-chg { flex-shrink: 0; font-size: 11px; font-weight: 700; color: #8899a6; min-width: 28px; text-align: right; }
.sr-chg.up { color: #e0245e; }
.sr-chg.down { color: #1d72d8; }
.sr-chg.new { color: #f08c00; }
@media (max-width: 900px) {
    /* 작성자 랭킹과 달리 모바일에서도 노출 */
    .sidebar > .search-rank { display: block; width: 100%; max-width: 660px; margin: 0 auto 16px; }
}
.sr-range-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.sr-range-form input[type=date] { width: auto; margin: 0; }
.sr-range-form .btn-sm { margin: 0; }
.sr-table tr.sr-muted td { opacity: .55; }
.sr-chart { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding: 8px 0; border-bottom: 1px solid #e1e8ed; }
.sr-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.sr-bar span { display: block; width: 100%; background: var(--btn-bg, #e0245e); border-radius: 2px 2px 0 0; opacity: .85; }
.sr-bar:hover span { opacity: 1; }
.sr-chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: #8899a6; margin-top: 4px; }
html.dark .sr-chart { border-bottom-color: #2f3640; }

/* =========================================================
   관리자 화면 공통 폼 컴포넌트
   - 모든 입력칸에 항상 보이는 라벨(placeholder에 의존하지 않음)
   - af-grid: 여러 칸을 한 줄에 배치하는 라벨형 그리드
   - admin-card: 접고 펼치는 항목 카드 (메뉴/규칙/에이전트)
   ========================================================= */
.admin-sidebar-group {
    padding: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
    color: #6b7682; white-space: nowrap;
}

/* 페이지 상단 섹션 바로가기 */
.admin-toc {
    display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 8px 0;
    position: sticky; top: 0; z-index: 20; background: #f5f6f8;
}
.admin-toc a {
    background: #fff; border: 1px solid #e1e8ed; border-radius: 999px;
    padding: 5px 12px; font-size: 12.5px; color: #444; white-space: nowrap;
}
.admin-toc a:hover { text-decoration: none; border-color: var(--btn-bg, #e0245e); color: var(--btn-bg, #e0245e); }
@media (max-width: 900px) { .admin-toc { top: 0; padding-left: 46px; } }
.admin-sec { scroll-margin-top: 64px; }
.admin-sec-desc { color: #8899a6; font-size: 13px; margin: -6px 0 14px; }

/* 세로로 쌓이는 폼: 너무 넓은 화면에서 입력칸 폭 제한 + 라벨 옆 설명은 라벨 아래 줄로 */
.admin-form input:not([type=checkbox]):not([type=radio]):not([type=color]),
.admin-form select, .admin-form textarea, .admin-form .editor { max-width: 760px; }
.admin-form label:not(.menu-check):not(.af-check) > .hint { display: block; margin-top: 2px; font-weight: 400; }
.admin-form label:not(.menu-check):not(.af-check):has(> input[type=checkbox]) > .hint { padding-left: 22px; }
.admin-form .input-sm, .admin-form .input-xs { max-width: none; }

/* 라벨형 입력 그리드 */
.af-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; }
.af-grid + .af-grid, .af-grid + .af-sub { margin-top: 14px; }
.af { min-width: 0; display: flex; flex-direction: column; }
.af-wide { grid-column: span 2; }
.af-full { grid-column: 1 / -1; }
@media (max-width: 600px) { .af-wide { grid-column: 1 / -1; } }
.af > label, .af-label {
    display: block; margin: 0 0 5px; font-size: 12.5px; font-weight: 700; color: #444;
}
.af-req { color: #e0245e; margin-left: 2px; }
.af-hint { color: #99a3ad; font-size: 11.5px; margin: 4px 0 0; line-height: 1.45; }
.af input:not([type=checkbox]):not([type=radio]), .af select, .af textarea { width: 100% !important; }
.af input[type=color] { height: 42px; padding: 4px 6px; cursor: pointer; }
.af-unit { display: flex; align-items: center; gap: 6px; }
.af-unit input { flex: 1; min-width: 0; }
.af-unit > span { font-size: 13px; color: #657786; white-space: nowrap; }
.af-check {
    display: inline-flex; align-items: center; gap: 7px; margin: 0; min-height: 42px;
    font-weight: 600; font-size: 13.5px; color: #333; cursor: pointer;
}
.af > label.af-check { display: inline-flex; margin: 0; font-size: 13.5px; font-weight: 600; color: #333; }
.af-check input { margin: 0; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--btn-bg, #e0245e); }
.af-checks { display: flex; flex-wrap: wrap; gap: 0 22px; }
.af-sub {
    font-size: 12px; font-weight: 800; color: var(--btn-bg, #e0245e); letter-spacing: .02em;
    margin: 20px 0 10px; padding-top: 14px; border-top: 1px dashed #e6eaee;
}
.af-sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* 접고 펼치는 항목 카드 */
.admin-card { border: 1px solid #e6eaee; border-radius: 12px; margin: 10px 0; background: #fff; }
.admin-card > summary {
    display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap;
    padding: 12px 14px; cursor: pointer; list-style: none;
}
.admin-card > summary::-webkit-details-marker { display: none; }
.admin-card > summary::before {
    content: '\25B8'; color: #8899a6; font-size: 12px; transition: transform .15s; flex-shrink: 0;
}
.admin-card[open] > summary::before { transform: rotate(90deg); }
.admin-card[open] > summary { border-bottom: 1px solid #f0f2f5; }
.admin-card > summary:hover { background: #fafbfc; border-radius: 12px; }
.admin-card-title { font-weight: 800; font-size: 14.5px; }
.admin-card-meta { color: #8899a6; font-size: 12px; }
.admin-card-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.admin-card-body { padding: 16px 14px 14px; }
.admin-card-foot {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 16px; padding-top: 12px; border-top: 1px solid #f0f2f5;
}
.admin-card-foot .spacer { flex: 1; }
.admin-card-new { border-style: dashed; border-color: var(--btn-bg, #e0245e); }
.admin-list-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.admin-list-toolbar .spacer { flex: 1; }

/* 항목 설명 접기 박스 */
.admin-help {
    background: #f8fafb; border: 1px solid #e6eaee; border-radius: 10px;
    padding: 10px 14px; margin: 0 0 14px; font-size: 13px;
}
.admin-help > summary { cursor: pointer; font-weight: 700; color: #536471; }
.admin-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 12px 0 4px; }
.admin-help dt { font-weight: 700; color: #333; }
.admin-help dd { margin: 0; color: #657786; line-height: 1.5; }
@media (max-width: 600px) {
    .admin-help dl { grid-template-columns: 1fr; gap: 2px; }
    .admin-help dd { margin-bottom: 8px; }
}

/* 하단 고정 저장 바 */
.admin-savebar {
    position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 8px 0 0; padding: 12px 16px; background: rgba(255,255,255,.96);
    border: 1px solid #e1e8ed; border-radius: 12px; box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.admin-savebar .btn-primary { margin-top: 0; }

/* 테이블 행 관리 메뉴 (회원 관리 등) */
.row-actions > summary { list-style: none; display: inline-block; }
.row-actions > summary::-webkit-details-marker { display: none; }
.row-actions-body {
    margin-top: 8px; padding: 12px; min-width: 260px; border: 1px solid #e6eaee; border-radius: 10px;
    background: #fafbfc; display: flex; flex-direction: column; gap: 10px;
}
.row-actions-body .af-label { margin-bottom: 4px; }
.row-actions-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-actions-line input, .row-actions-line select { flex: 1; min-width: 0; padding: 6px 10px; }
.tag-blue { background: #e3f2fd; color: #0d47a1; }
.tag-pink { background: #fdecf1; color: #c2185b; }

html.dark .admin-sidebar-group { color: #5f6b77; }
html.dark .admin-toc { background: #0f1216; }
html.dark .admin-toc a { background: #1e2329; border-color: #2f3640; color: #c8ccd0; }
html.dark .af > label, html.dark .af-label, html.dark .af-check, html.dark .admin-help dt { color: #d7dbe0; }
html.dark .af-sub { border-top-color: #2f3640; }
html.dark .admin-card { background: #1e2329; border-color: #2f3640; }
html.dark .admin-card[open] > summary, html.dark .admin-card-foot { border-color: #2f3640; }
html.dark .admin-card > summary:hover { background: #262c34; }
html.dark .admin-help, html.dark .row-actions-body { background: #1a1e23; border-color: #2f3640; }
html.dark .admin-help dd { color: #8b98a5; }
html.dark .admin-savebar { background: rgba(30,35,41,.96); border-color: #2f3640; }
