@charset "utf-8";

/* [추가] 변수가 비어있을 때를 대비한 기본 색상 설정 */
:root {
    --bg-color: #ffffff;
    --bg-image: none;
    --text-color: #333333;
    --time-color: #666666;
    --btn-bg: #333333;
    --btn-text: #ffffff;
    --like: #ff4747;
    --box-bg: rgba(250, 250, 250, 1);
    --radius: 4px
}

body {
    font-family: sans-serif;
    margin: 0;
    background: var(--bg-color);
    color: var(--text-color);
}

.wrap {
    width: var(--wrap-w);
    margin: var(--wrap-mt) auto;
    padding: 0 var(--wrap-pad-x);
    box-sizing: border-box;
}

h1 { font-size: 20px; margin: 0 0 20px; text-align: center; }

input[type="checkbox"], input[type="radio"] {
    accent-color: var(--text-color); 
    cursor: pointer;
    width: 13px;
    height: 13px;
    vertical-align: middle;
}

/* 카드 메인 */
.post-card {
    width: 100%;
    box-sizing: border-box;
    padding: var(--card-pad);
    margin-bottom: var(--card-mb);
    background: var(--box-bg);
    border-radius: var(--radius); 
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(var(--card-blur));
    -webkit-backdrop-filter: blur(var(--card-blur));
}

/* 버튼 및 페이징 */
.btn, .pagination strong, .reply-form button, .secret-form button {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    line-height: normal;
    padding: var(--btn-pad-y) var(--btn-pad-x);
    font-size: var(--btn-font);
    background-color: var(--btn-bg);
    color: var(--btn-text);
    border-radius: var(--btn-radius) !important; 
    border: var(--btn-border) !important;
    box-shadow: var(--btn-shadow);
    backdrop-filter: blur(var(--btn-blur));
    -webkit-backdrop-filter: blur(var(--btn-blur));
}

.btn:hover, .reply-form button:hover, .secret-form button:hover {
    opacity: var(--btn-hover-opacity);
    transform: translateY(-1px); 
    transition: all 0.2s;
}

.pagination { margin: 16px 0; text-align: center; font-size: 13px; }
.pagination a, .pagination strong, .pagination span.current-page { 
    display: inline-block; margin: 0 1px; padding: 4px 7px;
    background-color: var(--btn-bg) !important; color: var(--btn-text); 
    border-radius: var(--btn-radius) !important; border: 1px solid var(--pager-border);
    text-decoration: none; line-height: normal; cursor: pointer; transition: all 0.2s;
}
.pagination strong, .pagination span.current-page {
    background-color: var(--btn-text) !important; color: var(--btn-bg) !important;           
    border-color: var(--btn-text); font-weight: bold; cursor: default;
    transform: translateY(0) !important; opacity: 1 !important;
}
.pagination a:hover { opacity: var(--btn-hover-opacity); transform: translateY(0); }
.ui-mmb-button {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}
.countDiv {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align:center;
    margin-bottom: 15px;
}
.countDiv .ui-btn {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 테마 옵션 (Basic, Modern, Glass, Sharp) */
html[data-btn="basic"]{ --btn-radius: var(--radius); --btn-border: 1px solid #bbb; --btn-hover-opacity: 0.8; --btn-shadow: none; --btn-blur: 0px; --pager-border: #ccc; --pager-hover-bg: #eee; }
html[data-btn="modern"]{ --btn-radius: 50px; --btn-border: none; --btn-hover-opacity: 0.9; --btn-shadow: 0 4px 10px rgba(0,0,0,0.15); --btn-blur: 0px; --pager-border: transparent; --pager-hover-bg: #f0f0f0; }
html[data-btn="glass"]{ --btn-radius: var(--radius); --btn-border: 1px solid rgba(255,255,255, 0.6); --btn-hover-opacity: 0.9; --btn-shadow: inset 0 0 10px rgba(255,255,255,0.2), 0 5px 15px rgba(0,0,0,0.1); --btn-blur: 4px; --pager-border: rgba(255,255,255,0.4); --pager-hover-bg: rgba(255,255,255,0.2); }
html[data-btn="sharp"]{ --btn-radius: 0px; --btn-border: 2px solid #000; --btn-hover-opacity: 1; --btn-shadow: 2px 2px 0px #000; --btn-blur: 0px; --pager-border: #000; --pager-hover-bg: #ccc; }

/* 상단 및 리스트 */
.top-bar { display: flex; justify-content: center; gap: 6px; align-items: center; margin-bottom: 14px; }
.notice { text-align: center; font-size: 12px; color: var(--text-color); margin-bottom: 14px; }
.post-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.post-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 12px; }
.post-no { font-weight: bold; }
.post-actions, .comment-actions, .reply-actions { display: flex; align-items: center; gap: 15px; justify-content: flex-end; }
.post-actions a, .comment-actions a, .reply-actions a { display: inline-block; padding: 0; border: none; background: transparent; color: inherit; font-size: 11px; text-decoration: none; cursor: pointer; line-height: normal; }
.post-actions a:hover, .comment-actions a:hover, .reply-actions a:hover { text-decoration: underline; }

/* 좋아요 하트 */
.like-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; background: transparent; color: inherit; font-size: 11px; text-decoration: none; cursor: pointer; line-height: 1; box-sizing: border-box; }
.like-btn:hover { text-decoration: underline; }
.like-heart { font-size: 17px; margin-right: 0px; }
.like-count { font-size: 12px; margin-left: 1px; }
.like-count.is-zero { display: none; }
.like-btn.liked .like-heart{color:var(--like);}
.like-btn.liked{border-color:var(--like);}

/* 이미지 및 메타 정보 */
.image-wrap { text-align: center; margin-bottom: 6px; }
.image-wrap img { max-width: 500px; max-height: 500px; border: 1px solid #ccc; background: #fff; }
.meta { text-align: left; font-size: 13px; }
.meta-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.meta-foot { display: flex; justify-content: flex-end; margin-top: 2px; }
.meta-name { font-weight: bold; display: inline-flex; align-items: center; gap: 0; }
.meta-comment { word-break: break-all; margin-bottom: 4px; font-size: 13px; }
.meta-time { font-size: 11px; color: var(--time-color, #666); }
.empty { font-size: 12px; color: #666; text-align: center; margin-top: 10px; }

/* 댓글 및 폼 */
.reply-list { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #ccc; font-size: 13px; }
.reply-item { padding: 4px 0; border-top: 1px dotted #e0e0e0; }
.reply-item:first-child { border-top: none; }
.reply-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.reply-foot { display: flex; justify-content: flex-end; margin-top: 2px; gap: 10px; align-items: center;}
.reply-name { font-weight: bold; display: inline-flex; align-items: center; gap: 0px; }
.reply-time { font-size: 11px; color: var(--time-color, #666); }
.reply-body { word-break: break-all; margin: 2px 0; font-size: 13px; }
.reply-actions { text-align: right; }
.reply-form { margin-top: 6px; border-top: 1px solid #e0e0e0; padding-top: 6px; font-size: 12px; }
.reply-form input[type="text"],.reply-form input[type="password"]{
  width:120px; font-size:12px; padding:6px 8px; margin-right:4px; box-sizing:border-box;
  background:var(--box-bg); color:var(--text-color); border:1px solid var(--card-border);
  border-radius:var(--radius); box-shadow:var(--card-shadow);
  backdrop-filter:blur(var(--card-blur)); -webkit-backdrop-filter:blur(var(--card-blur));
}
.reply-form textarea{
  width:100%; height:100px; font-size:12px; box-sizing:border-box; margin:4px 0; padding:8px 10px;
  background:var(--box-bg); color:var(--text-color); border:1px solid var(--card-border);
  border-radius:var(--radius); box-shadow:var(--card-shadow);
  backdrop-filter:blur(var(--card-blur)); -webkit-backdrop-filter:blur(var(--card-blur)); resize:vertical;
}
.reply-form input.remember-reply, .reply-form input.dice-check, .reply-form input.rps-check { width: auto; accent-color: var(--text-color) !important; }
.reply-form textarea::placeholder, .reply-form input::placeholder { color: var(--text-color); opacity: 0.6; }

/* 기타 */
#bo_v_con img, 
.view-content img, 
.bo_content img {
    max-width: 100% !important;
    height: auto !important;
    width: auto;
}
.image-toggle { text-align: center; margin-bottom: 6px; }
.img-toggle-btn { margin-bottom: 4px; padding: 0; font-size: 11px; border: none; background: none; cursor: pointer; color: #333; }
.img-toggle-btn:hover { text-decoration: underline; }
.secret-info { font-size: 11px; color: inherit; margin-bottom: 4px; text-align: center; }
.secret-form { margin: 4px 0; text-align: center; }
.secret-form input[type="password"]{ width:160px; font-size:11px; padding:6px 8px; box-sizing:border-box; margin-right:4px; background:var(--box-bg); color:var(--text-color); border:1px solid var(--card-border); border-radius:var(--radius); box-shadow:var(--card-shadow); }
.reply-form input[type="text"]:focus,.reply-form input[type="password"]:focus,.reply-form textarea:focus,.secret-form input[type="password"]:focus{ outline:2px solid var(--btn-bg); outline-offset:1px; }
.secret-error { font-size: 11px; color: #c00; margin-top: 2px; text-align: center; }
.secret-success { font-size: 11px; color: #090; margin-top: 2px; text-align: center; }
.hashtag { color: #3b82f6; text-decoration: none; font-weight: bold; }
.hashtag:hover { text-decoration: underline; }

/* 레이아웃 및 테마 기본 변수 */
html{--layout:list;--wrap-w:900px;--wrap-mt:20px;--wrap-pad-x:12px;--top-gap:6px;--top-mb:14px;--notice-color:#666;--list-gap:12px;--list-mt:16px;--card-border:#ddd;--card-shadow:none;--card-pad:15px;--card-mb:20px;--card-blur:0px;--divider:#e0e0e0;--btn-pad-y:6px;--btn-pad-x:10px;--btn-font:13px;--actions-gap:15px;--media-border:#ccc;--media-bg:#fff;--img-max:500px;--danger:#c00;--success:#090;--hashtag:#3b82f6;--like:#ff4747; --radius: 6px;}

html[data-card="basic"]{--card-border:#ddd;--card-shadow:none;--card-pad:15px;--card-blur:0px;}
html[data-card="modern"]{--card-border:rgba(0,0,0,.08);--card-shadow:0 6px 18px rgba(0,0,0,.08);--card-pad:18px;--card-blur:0px;}
html[data-card="glass"]{--card-border:rgba(255,255,255,.35);--card-shadow:0 12px 34px rgba(0,0,0,.10);--card-pad:18px;--card-blur:10px;}
html[data-card="sharp"]{--card-border:rgba(0,0,0,.12);--card-shadow:none;--card-pad:14px;--card-blur:0px;}

html[data-layout="list"]{--layout:list;}
html[data-layout="compact"]{--layout:compact;--wrap-w:760px;--wrap-mt:14px;--wrap-pad-x:10px;--top-mb:10px;--list-gap:10px;--card-mb:14px;--btn-pad-y:5px;--btn-pad-x:9px;--btn-font:12px;--actions-gap:12px;--img-max:420px;}
html[data-layout="side"]{--layout:side;--wrap-w:980px;}

/* Side Layout Grid 설정 */
html[data-layout="side"] .post-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(340px, 1.2fr);
    grid-template-rows: auto max-content max-content auto 1fr;
    column-gap: 20px;
    row-gap: 0px !important; 
    align-items: start; 
}
html[data-layout="side"] .post-head { grid-column: 1/-1; grid-row: 1; }
html[data-layout="side"] .meta { grid-column: 2; grid-row: 2; margin: 0 !important; padding-bottom: 5px !important; }
html[data-layout="side"] .meta-foot { margin-top: 0 !important; }
html[data-layout="side"] .reply-list { grid-column: 2; grid-row: 3; margin-top: 0 !important; padding-top: 5px !important; border-top: 1px dashed var(--divider) !important; min-height: 0; }
html[data-layout="side"] .reply-form { grid-column: 2; grid-row: 4; margin-top: 0; padding-top: 8px; border-top: 1px solid var(--divider); }
html[data-layout="side"] .media-zone, html[data-layout="side"] .image-toggle, html[data-layout="side"] .secret-zone {
    grid-column: 1; grid-row: 2 / 6 !important; display: flex; flex-direction: column; 
    justify-content: flex-start !important; align-items: center; text-align: left; 
    height: auto !important; min-height: 0 !important; align-self: start; width: 100%;
}
html[data-layout="side"] .image-wrap { text-align: left; margin-left: 0; }
html[data-layout="side"] .image-wrap img { max-width: 100%; max-height: none; }
html[data-layout="side"] .secret-zone { align-items: center !important; text-align: center !important; width: 100%; margin-top: 10px; }

@media (max-width: 860px){
    html[data-layout="side"] .post-card{ display: block; }
    html[data-layout="side"] .image-toggle, html[data-layout="side"] .image-wrap { text-align: center !important; align-items: center !important; }
    .image-wrap a { display: block !important; max-width: 100% !important; }
    html[data-layout="side"] .secret-zone { min-height: auto; padding: 20px 0; border-bottom: 1px dashed #eee; margin-bottom: 10px; }
}

html[data-layout="side"] .reply-form form{font-size:0;}
html[data-layout="side"] .reply-form input[type="text"],html[data-layout="side"] .reply-form input[type="password"]{width:100px;}
html[data-layout="side"] .reply-form label{white-space:nowrap;margin-left:3px!important;gap:3px!important;}
html[data-layout="side"] .post-card:has(.secret-form):not(:has(.image-toggle)) .meta{ min-height:auto !important; }
html[data-layout="side"] .post-card:has(.secret-form):not(:has(.image-toggle)) .meta .secret-info, html[data-layout="side"] .post-card:has(.secret-form):not(:has(.image-toggle)) .meta .secret-form, html[data-layout="side"] .post-card:has(.secret-form):not(:has(.image-toggle)) .meta .secret-error{ align-self:start !important; }

/* 댓글 페이징 */
.reply-pagination{ margin:12px 0 0; text-align:center; font-size:13px; }
.reply-pagination a, .reply-pagination strong{ display:inline-block; margin:0 1px; padding:4px 7px; background-color:var(--btn-bg)!important; color:var(--btn-text); border-radius:var(--btn-radius)!important; border:1px solid var(--pager-border); text-decoration:none; line-height:normal; cursor:pointer; transition:all 0.2s; }
.reply-pagination strong{ background-color:var(--btn-text)!important; color:var(--btn-bg)!important; border-color:var(--btn-text); font-weight:bold; cursor:default; transform:translateY(0)!important; opacity:1!important; }
.reply-pagination a:hover{ opacity:var(--btn-hover-opacity); transform:translateY(0); }

/* 따로 추가 2026.08.13 */
#log_list {position: relative;}
#log_list .shImg {
    width: 80px;
    position: absolute;
    top: -70px;
    left: 118px;
}
@media (max-width: 860px){
    #log_list .shImg {
        left: 20px;
    }
}