@charset "UTF-8";

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #f5f6f8;
    color: #222;
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    word-break: keep-all;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* 헤더 */
.site-header {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    padding: 42px 32px 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.site-header h1 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111;
}

.site-header h1 a {
    color: #111;
}

.site-header .intro {
    margin: 0;
    font-size: 15px;
    color: #666;
}

/* SNS 연결 바 */
.sns-connect-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    margin: 0 0 22px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.sns-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.sns-link:hover {
    transform: translateY(-2px);
    opacity: 0.94;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
}

.sns-facebook { background: #1877f2; }
.sns-youtube { background: #ff0000; }
.sns-whatsapp { background: #25d366; }
.sns-instagram { background: #e1306c; }
.sns-tiktok { background: #111111; }
.sns-x { background: #000000; }
.sns-telegram { background: #229ed9; }
.sns-linkedin { background: #0a66c2; }
.sns-pinterest { background: #e60023; }
.sns-snapchat {
    background: #fffc00;
    color: #111;
}

/* 리스트 */
.post-list {
    display: block;
}

.post-card {
    overflow: hidden;
}

.thumb-link {
    display: block;
}

.thumb {
    width: 100%;
    border-radius: 14px;
    margin: 0 0 18px;
    object-fit: cover;
    background: #f1f3f5;
    border: 1px solid #edf0f2;
}

.post-category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 12px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2b6ef3;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.meta-block {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.meta-block span {
    display: inline-block;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.5;
    color: #667085;
}

/* 카드 */
.card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    padding: 28px 28px 24px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    border-color: #dfe3e8;
}

.card h2 {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111;
}

.card h2 a {
    color: #111;
}

.card h2 a:hover {
    color: #2b6ef3;
}

.card p {
    margin: 0 0 14px;
    color: #444;
    font-size: 16px;
}

/* 태그 */
.tags {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0f2f5;
    font-size: 13px;
    color: #2b6ef3;
    font-weight: 600;
}

/* 공유 버튼 */
.post-share-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef1f4;
}

.post-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid #e7edf3;
    color: #344054;
    line-height: 1.2;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.post-share-btn:hover {
    transform: translateY(-1px);
    background: #eef4ff;
    border-color: #cfe0ff;
    color: #2b6ef3;
    opacity: 0.98;
}

.post-share-btn:active {
    transform: translateY(0);
}

/* 오류 / 빈목록 */
.error-box {
    border: 1px solid #ffd7d7;
    background: #fff5f5;
    color: #b42318;
}

.error-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.error-box p {
    margin: 0;
    color: #b42318;
}

.post-list-empty {
    text-align: center;
    color: #666;
}

.footer-note {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-top: 32px;
}

/* 상세 */
.post-detail-card {
    padding: 34px 34px 28px;
}

.post-detail-top {
    margin-bottom: 22px;
}

.post-detail-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.post-detail-category-left {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2b6ef3;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.post-detail-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.post-detail-stats span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.post-detail-title {
    margin: 0 0 14px;
    font-size: 36px;
    line-height: 1.32;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111;
}

.post-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.post-detail-meta span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e8edf3;
    font-size: 13px;
    color: #667085;
    line-height: 1.4;
}

.post-detail-summary {
    margin: 0;
    font-size: 17px;
    line-height: 1.8;
    color: #555;
}

.post-detail-thumb-wrap {
    margin: 0 0 24px;
}

.post-detail-thumb {
    width: 100%;
    border-radius: 16px;
    border: 1px solid #edf0f2;
    background: #f1f3f5;
}

.post-detail-content {
    font-size: 17px;
    line-height: 1.95;
    color: #222;
    word-break: keep-all;
}

.post-detail-content p {
    margin: 0 0 18px;
}

.post-detail-tags {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #eef1f4;
    font-size: 13px;
    color: #2b6ef3;
    font-weight: 600;
}

.post-detail-bottom {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef1f4;
}

.back-to-list-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.back-to-list-btn:hover {
    transform: translateY(-1px);
    opacity: 0.93;
}

/* 모바일 */
@media (max-width: 768px) {
    .wrap {
        padding: 18px 14px 50px;
    }

    .site-header {
        padding: 28px 20px 22px;
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .site-header h1 {
        font-size: 26px;
    }

    .site-header .intro {
        font-size: 14px;
    }

    .sns-connect-bar {
        padding: 10px;
        gap: 6px;
        border-radius: 14px;
        margin-bottom: 18px;
    }

    .sns-link {
        min-width: 64px;
        font-size: 9px;
        padding: 6px 8px;
    }

    .card {
        padding: 20px 18px 18px;
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .card h2 {
        font-size: 22px;
    }

    .card p {
        font-size: 15px;
    }

    .post-category-badge {
        font-size: 11px;
        padding: 6px 10px;
        margin-bottom: 10px;
    }

    .meta-block {
        gap: 6px;
        margin-bottom: 14px;
    }

    .meta-block span {
        font-size: 12px;
        padding: 7px 10px;
        border-radius: 12px;
    }

    .thumb {
        border-radius: 12px;
        margin-bottom: 14px;
    }

    .post-detail-card {
        padding: 22px 18px 18px;
    }

    .post-detail-head-row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .post-detail-category-left {
        font-size: 11px;
        padding: 6px 10px;
    }

    .post-detail-stats {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
    }

    .post-detail-stats span {
        font-size: 11px;
        padding: 6px 9px;
    }

    .post-detail-title {
        font-size: 28px;
        line-height: 1.38;
        margin-bottom: 12px;
    }

    .post-detail-meta {
        gap: 6px;
        margin-bottom: 14px;
    }

    .post-detail-meta span {
        font-size: 12px;
        padding: 7px 10px;
    }

    .post-detail-summary {
        font-size: 15px;
        line-height: 1.8;
    }

    .post-detail-thumb {
        border-radius: 12px;
    }

    .post-detail-content {
        font-size: 15px;
        line-height: 1.9;
    }

    .back-to-list-btn {
        font-size: 12px;
        padding: 9px 12px;
    }

    .post-share-box {
        gap: 8px;
        margin-top: 18px;
        padding-top: 16px;
    }

    .post-share-btn {
        font-size: 12px;
        padding: 9px 12px;
        min-height: 36px;
    }
}

.post-action-row {
    margin: 26px 0 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-like-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid #f1c7cf;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff5f7 0%, #ffeef2 100%);
    color: #c2185b;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(194, 24, 91, 0.08);
    transition: all .18s ease;
}

.post-like-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #ffeef2 0%, #ffe3ea 100%);
    box-shadow: 0 10px 22px rgba(194, 24, 91, 0.14);
}

.post-like-btn:active {
    transform: translateY(0);
}

.post-like-btn.is-liked {
    border-color: #e59ab1;
    background: linear-gradient(180deg, #ffdce6 0%, #ffcfdc 100%);
    color: #ad1457;
}

.comment-section {
    margin-top: 34px;
    padding: 24px;
    border: 1px solid #e6ecf2;
    border-radius: 22px;
    background: #fbfcfe;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.04);
}

.comment-title {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

.comment-form {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid #edf1f5;
    border-radius: 18px;
    background: #ffffff;
}

.comment-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-form-row input[type="text"],
.comment-form-row input[type="password"],
.comment-form-row textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d6dde6;
    border-radius: 14px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    line-height: 1.5;
    padding: 13px 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.comment-form-row input[type="text"]:focus,
.comment-form-row input[type="password"]:focus,
.comment-form-row textarea:focus {
    border-color: #2b6ef3;
    box-shadow: 0 0 0 4px rgba(43, 110, 243, 0.08);
}

.comment-form-row textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-submit-row {
    justify-content: flex-end;
    margin-bottom: 0;
}

.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all .18s ease;
}

.comment-submit-btn:hover {
    transform: translateY(-1px);
    background: #0b1220;
}

.comment-help-text {
    margin: -4px 0 12px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.comment-item {
    padding: 16px 18px;
    border: 1px solid #e7edf3;
    border-radius: 16px;
    background: #fff;
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #667085;
}

.comment-meta strong {
    color: #111827;
    font-size: 14px;
    font-weight: 800;
}

.comment-content {
    color: #222;
    font-size: 14px;
    line-height: 1.7;
    word-break: break-word;
}

.comment-empty {
    padding: 20px;
    border: 1px dashed #d7dee7;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    color: #7b8794;
    font-size: 14px;
}

.comment-admin-row {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d6dde6;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    text-decoration: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.comment-admin-btn.delete {
    border-color: #f1c4c4;
    color: #b42318;
    background: #fff7f7;
}

.comment-admin-edit-box {
    margin-top: 12px;
    display: none;
}

.comment-admin-edit-box textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 90px;
    padding: 12px 13px;
    border: 1px solid #d6dde6;
    border-radius: 12px;
    resize: vertical;
}

.comment-admin-edit-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    .comment-section {
        padding: 18px;
        border-radius: 18px;
    }

    .comment-title {
        font-size: 22px;
    }

    .comment-form {
        padding: 14px;
        border-radius: 16px;
    }

    .comment-form-row {
        flex-direction: column;
        gap: 10px;
    }

    .comment-submit-row {
        justify-content: stretch;
    }

    .comment-submit-btn {
        width: 100%;
    }

    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* =========================
   post.php 추가분 (중복 제거본)
   style.css 맨 아래에 추가
   ========================= */

/* 상세 상단 메타 카드 */
.post-meta-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #eef2f7;
}

.post-meta-item {
    padding: 12px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.post-meta-item strong {
    display: inline-block;
    margin-right: 8px;
    color: #111827;
    font-weight: 700;
}

.post-meta-wide {
    grid-column: span 3;
}

/* 요약 박스 */
.post-summary-box {
    margin-bottom: 22px;
    padding: 18px 20px;
    border-left: 5px solid #2563eb;
    border-radius: 14px;
    background: #eff6ff;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.8;
}

/* 좋아요 / 공유 / 주소복사 버튼 줄 */
.post-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 22px;
}

.action-btn {
    appearance: none;
    border: 1px solid #dbe2ea;
    background: #ffffff;
    color: #111827;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.action-count {
    margin-left: 6px;
}

.like-btn {
    background: #fff1f2;
    border-color: #fecdd3;
}

.like-btn:hover {
    background: #e11d48;
    border-color: #e11d48;
    color: #ffffff;
}

.copy-btn:hover,
.share-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* 공통 섹션 제목 */
.section-title {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.4;
    color: #111827;
    font-weight: 800;
}

/* 공유 링크 영역 */
.post-share-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #eef2f7;
}

.share-link-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-link {
    display: inline-block;
    padding: 10px 15px;
    border: 1px solid #dbe2ea;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.share-link:hover {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

/* SNS 타이틀/랩퍼 */
.sns-connect-wrap {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #eef2f7;
}

.sns-connect-title {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    line-height: 1.4;
}

/* 댓글 폼 라벨/컬럼 */
.comment-form-col {
    flex: 1 1 260px;
}

.comment-form label {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
}

.comment-form-row-full {
    display: block;
}

.comment-form-actions {
    margin-top: 16px;
}

.btn-comment-submit {
    appearance: none;
    border: 0;
    background: #2563eb;
    color: #ffffff;
    border-radius: 12px;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-comment-submit:hover {
    background: #1d4ed8;
}

/* 댓글 헤드/본문 */
.comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-writer {
    color: #111827;
    font-size: 15px;
    font-weight: 800;
}

.comment-date {
    color: #6b7280;
    font-size: 13px;
}

.comment-body {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.8;
    word-break: break-word;
}

/* 관리자 댓글 수정 박스 */
.comment-admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.comment-admin-delete {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fff5f5;
}

.comment-admin-delete:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

.comment-edit-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f9fafb;
}

.comment-edit-box textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 110px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.comment-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* 모바일 보정 */
@media (max-width: 900px) {
    .post-meta-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-meta-wide {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .post-meta-card {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .post-meta-wide {
        grid-column: span 1;
    }

    .post-action-bar,
    .share-link-bar,
    .comment-admin-actions,
    .comment-edit-actions {
        flex-direction: column;
    }

    .action-btn,
    .share-link,
    .comment-admin-btn,
    .btn-comment-submit {
        width: 100%;
        text-align: center;
    }

    .comment-head {
        flex-direction: column;
        align-items: flex-start;
    }
}