﻿@charset "utf-8";

/* ============================================================
   /css/gallery.css
   STEP 8
   ============================================================ */

.gallery-head {
    margin-bottom: 12px;
}

.gallery-head-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.gallery-head h1 {
    margin: 0 0 4px;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.gallery-category-path {
    margin-bottom: 4px;
    color: #5570a6;
    font-size: 11px;
}

.gallery-description {
    color: #777;
    font-size: 13px;
}

.gallery-head-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
}

.gallery-head-actions form {
    margin: 0;
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 8px;
}

.gallery-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-form {
    margin: 0;
}

.page-size-form select {
    width: 76px;
    min-height: 30px;
    padding: 4px 6px;
}

.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.gallery-tabs a {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #dfe3ea;
    border-radius: 3px;
    background: #fff;
    color: #555;
    font-size: 12px;
}

.gallery-tabs a.active {
    border-color: #2f64d6;
    background: #2f64d6;
    color: #fff;
}

.gallery-count {
    color: #777;
    font-size: 12px;
}

.board-table {
    width: 100%;
    border-top: 2px solid #44516b;
    table-layout: fixed;
}

.board-table th {
    height: 38px;
    border-bottom: 1px solid #dfe3e9;
    background: #f7f8fa;
    color: #555;
    font-size: 12px;
    font-weight: 600;
}

.board-table td {
    height: 38px;
    padding: 7px 6px;
    border-bottom: 1px solid #eceef2;
    color: #444;
    font-size: 12px;
    text-align: center;
}

.board-table td.title {
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-table .notice-row {
    background: #fbfcff;
}

.board-table .post-title {
    color: #222;
}

.board-empty {
    height: 90px !important;
    color: #888 !important;
}

.board-notice-label {
    color: #315eb9;
    font-weight: 700;
}

.post-best-label,
.post-type-label,
.new-label {
    display: inline-block;
    margin-right: 4px;
    vertical-align: 1px;
    font-size: 10px;
    font-weight: 700;
}

.post-best-label {
    color: #d43e3e;
}

.post-type-label {
    color: #496aa8;
}

.new-label {
    width: 15px;
    height: 15px;
    margin-left: 3px;
    border-radius: 2px;
    background: #e84e4e;
    color: #fff;
    font-size: 9px;
    line-height: 15px;
    text-align: center;
}

.post-icon {
    margin-left: 4px;
    color: #6c7fa7;
    font-size: 11px;
}

.comment-count {
    margin-left: 4px;
    color: #e24a4a;
    font-size: 11px;
    font-weight: 700;
}

.board-list-mobile {
    display: none;
}

.board-mobile-item {
    padding: 12px 4px;
    border-bottom: 1px solid #eceef2;
}

.board-mobile-title {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
}

.board-mobile-title a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #888;
    font-size: 11px;
}

.board-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.board-search {
    display: flex;
    gap: 5px;
}

.board-search select {
    width: 110px;
}

.board-search input {
    width: 200px;
}


/* ============================================================
   글쓰기 / 수정
   ============================================================ */

.write-wrap {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.write-head {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #44516b;
}

.write-head h1 {
    margin: 0;
    font-size: 20px;
}

.write-form-row {
    margin-bottom: 14px;
}

.write-form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.write-content {
    min-height: 360px !important;
    line-height: 1.7;
}

.write-guest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.write-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 18px;
}

.guest-auth-wrap,
.delete-confirm-wrap {
    width: 100%;
    max-width: 440px;
    margin: 30px auto;
}

.guest-auth-card,
.delete-confirm-card {
    padding: 24px;
    border: 1px solid #dfe3ea;
    border-radius: 6px;
    background: #fff;
}

.guest-auth-card h1,
.delete-confirm-card h1 {
    margin: 0 0 14px;
    font-size: 20px;
}

.guest-auth-card p,
.delete-confirm-card p {
    color: #666;
    font-size: 13px;
    line-height: 1.7;
}


/* ============================================================
   갤러리 디렉터리
   ============================================================ */

.gallery-directory {
    width: 100%;
}

.gallery-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.gallery-category-link {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #dfe3e9;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font-size: 12px;
}

.gallery-category-link.active {
    border-color: #2f64d6;
    background: #2f64d6;
    color: #fff;
}

.gallery-directory-search {
    display: flex;
    max-width: 460px;
    gap: 6px;
    margin-bottom: 16px;
}

.gallery-directory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.gallery-directory-card {
    display: block;
    min-height: 130px;
    padding: 14px;
    border: 1px solid #e0e4eb;
    border-radius: 5px;
    background: #fff;
}

.gallery-directory-card:hover {
    border-color: #aebbd8;
    text-decoration: none;
}

.gallery-directory-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.gallery-directory-card-head strong {
    min-width: 0;
    overflow: hidden;
    color: #222;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-directory-description {
    display: -webkit-box;
    overflow: hidden;
    min-height: 38px;
    margin-bottom: 10px;
    color: #777;
    font-size: 12px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.gallery-directory-meta {
    color: #8b8b8b;
    font-size: 11px;
}

.gallery-directory-empty {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {

    .gallery-head-main {
        flex-direction: column;
        gap: 10px;
    }

    .gallery-head-actions {
        width: 100%;
    }

    .gallery-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .board-table {
        display: none;
    }

    .board-list-mobile {
        display: block;
        border-top: 2px solid #44516b;
    }

    .board-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .board-search {
        width: 100%;
    }

    .board-search select {
        width: 105px;
    }

    .board-search input {
        min-width: 0;
        flex: 1;
    }

    .gallery-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-directory-search {
        max-width: none;
    }
}

@media (max-width: 600px) {

    .gallery-directory-grid {
        grid-template-columns: 1fr;
    }

    .gallery-directory-card {
        min-height: auto;
    }

    .board-search {
        flex-wrap: wrap;
    }

    .board-search select {
        width: 100px;
    }

    .board-search input {
        min-width: 150px;
    }

    .write-guest-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .write-content {
        min-height: 280px !important;
    }
}


/* ============================================================
   STEP 9 upload styles merged into full gallery.css
   ============================================================ */

/* ============================================================
   /css/gallery.css
   STEP 9 additions
   기존 STEP8 CSS 아래에 추가 적용 가능
   ============================================================ */

.upload-file-list {
    display: grid;
    gap: 7px;
}

.upload-file-input {
    padding: 6px 8px;
    background: #fafbfc;
}

.existing-file-list {
    display: grid;
    gap: 8px;
}

.existing-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 10px;
    border: 1px solid #e0e4ea;
    border-radius: 4px;
    background: #fafbfc;
}

.existing-file-item.pending-delete {
    opacity: 0.48;
    text-decoration: line-through;
}

.existing-file-thumb {
    display: block;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border: 1px solid #e0e3e8;
    border-radius: 3px;
    background: #fff;
}

.existing-file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.existing-file-info {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.existing-file-info span {
    min-width: 0;
    overflow: hidden;
    color: #555;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-small {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
}

.form-help {
    margin-top: 6px;
    color: #888;
    font-size: 11px;
    line-height: 1.5;
}

@media (max-width: 600px) {

    .existing-file-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .existing-file-item {
        align-items: flex-start;
    }
}


/* ============================================================
   STEP 9 EDITOR
   CKEditor + 동적 일반 첨부파일
   ============================================================ */

.write-wrap .cke {
    border: 1px solid #d5d9e2;
    border-radius: 4px;
    box-shadow: none;
}

.write-wrap .cke_top {
    border-bottom: 1px solid #e1e4ea;
    background: #f8f9fb;
}

.write-wrap .cke_bottom {
    border-top: 1px solid #e1e4ea;
    background: #fafbfc;
}

.attachment-list {
    display: grid;
    gap: 7px;
}

.attachment-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
}

.attachment-row .form-control {
    min-width: 0;
}

.attachment-add-button {
    margin-top: 8px;
}

.existing-attachment-line {
    display: block;
    padding: 7px 9px;
    border-bottom: 1px solid #eceef2;
    color: #555;
    font-size: 12px;
}

.existing-attachment-line:last-child {
    border-bottom: 0;
}

@media (max-width: 600px) {

    .attachment-row {
        grid-template-columns: 1fr;
    }

    .attachment-row .btn {
        width: 100%;
    }

    .write-wrap .cke_contents {
        min-height: 320px !important;
    }
}


/* ============================================================
   STEP 10 게시글 상세보기
   ============================================================ */

.post-view {
    width: 100%;
}

.post-view-gallery {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.post-gallery-name {
    display: inline-block;
    margin-bottom: 4px;
    color: #1f4ea8;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.post-gallery-description {
    color: #777;
    font-size: 12px;
}

.post-view-card {
    border-top: 2px solid #44516b;
    border-bottom: 1px solid #dfe3e9;
    background: #fff;
}

.post-view-head {
    padding: 18px 16px 14px;
    border-bottom: 1px solid #e4e7ed;
}

.post-view-header-name {
    margin-bottom: 6px;
    color: #4a68a0;
    font-size: 11px;
    font-weight: 600;
}

.post-view-title {
    margin: 0 0 14px;
    color: #1f1f1f;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.45;
    word-break: break-word;
}

.post-view-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.post-view-writer {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #444;
    font-size: 12px;
}

.post-author-badge {
    display: inline-flex;
    min-height: 19px;
    align-items: center;
    padding: 0 6px;
    border: 1px solid #dfe3e9;
    border-radius: 10px;
    color: #777;
    font-size: 10px;
}

.post-view-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    color: #888;
    font-size: 11px;
}

.post-view-body {
    min-height: 280px;
    padding: 28px 18px 36px;
    color: #292929;
    font-size: 14px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.post-view-body img {
    display: block;
    max-width: 100%;
    height: auto !important;
    margin: 14px 0;
}

.post-view-body table {
    max-width: 100%;
    border-collapse: collapse;
}

.post-view-body th,
.post-view-body td {
    padding: 7px;
    border: 1px solid #dfe3e9;
}

.post-view-body blockquote {
    margin: 14px 0;
    padding: 10px 14px;
    border-left: 3px solid #9badcf;
    background: #f7f9fc;
    color: #555;
}

.post-view-body a {
    color: #245fc7;
    text-decoration: underline;
}

.post-attachments {
    margin: 0 16px 20px;
    border: 1px solid #e0e4eb;
    border-radius: 4px;
    background: #fafbfc;
}

.post-attachments-title {
    padding: 9px 12px;
    border-bottom: 1px solid #e4e7ed;
    color: #555;
    font-size: 12px;
    font-weight: 600;
}

.post-attachments-list {
    display: grid;
}

.post-attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid #eceef2;
    color: #444;
    font-size: 12px;
}

.post-attachment-item:last-child {
    border-bottom: 0;
}

.post-attachment-item:hover {
    background: #f3f6fb;
    text-decoration: none;
}

.post-attachment-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-attachment-size {
    flex: 0 0 auto;
    color: #999;
    font-size: 11px;
}

.post-vote-area {
    display: flex;
    justify-content: center;
    padding: 14px 16px 24px;
}

.post-vote-box {
    display: flex;
    gap: 8px;
}

.post-vote-button {
    min-width: 96px;
    min-height: 48px;
    padding: 6px 14px;
    border: 1px solid #d8dde6;
    border-radius: 5px;
    background: #fff;
    color: #555;
    font-size: 12px;
}

.post-vote-button strong {
    display: block;
    margin-top: 2px;
    font-size: 15px;
}

.post-vote-button.recommend strong {
    color: #2f64d6;
}

.post-vote-button.oppose strong {
    color: #c34b4b;
}

.post-vote-button[disabled] {
    cursor: default;
    opacity: 0.72;
}

.post-view-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
}

.post-owner-actions {
    display: flex;
    gap: 6px;
}

@media (max-width: 700px) {

    .post-view-gallery {
        align-items: stretch;
        flex-direction: column;
    }

    .post-view-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .post-view-stats {
        justify-content: flex-start;
        gap: 8px;
    }

    .post-view-head {
        padding: 15px 12px 12px;
    }

    .post-view-title {
        font-size: 18px;
    }

    .post-view-body {
        min-height: 220px;
        padding: 22px 12px 28px;
        font-size: 14px;
    }

    .post-attachments {
        margin-right: 12px;
        margin-left: 12px;
    }

    .post-view-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .post-view-actions > div,
    .post-owner-actions {
        display: flex;
        width: 100%;
    }

    .post-view-actions .btn,
    .post-owner-actions .btn {
        flex: 1;
        text-align: center;
    }
}


/* ============================================================
   STEP 11 댓글 / 대댓글
   ============================================================ */

.comment-section {
    margin-top: 26px;
    border-top: 2px solid #44516b;
}

.comment-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 4px 10px;
    border-bottom: 1px solid #dfe3e9;
}

.comment-section-head h2 {
    margin: 0;
    font-size: 16px;
}

.comment-section-head h2 span {
    margin-left: 4px;
    color: #2f64d6;
    font-size: 13px;
}

.comment-empty,
.comment-disabled {
    padding: 36px 12px;
    border-bottom: 1px solid #eceef2;
    color: #888;
    font-size: 12px;
    text-align: center;
}

.comment-item {
    padding: 13px 12px;
    border-bottom: 1px solid #eceef2;
    background: #fff;
}

.comment-item.reply {
    position: relative;
    padding-left: 42px;
    background: #fafbfc;
}

.comment-item.reply::before {
    position: absolute;
    top: 16px;
    left: 22px;
    color: #9aa3b3;
    content: "↳";
    font-size: 14px;
}

.comment-item.deleted {
    color: #999;
}

.comment-main {
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 11px;
}

.comment-meta strong {
    color: #333;
    font-size: 12px;
}

.comment-author-badge {
    display: inline-flex;
    min-height: 18px;
    align-items: center;
    padding: 0 5px;
    border: 1px solid #dfe3e9;
    border-radius: 9px;
    color: #777;
    font-size: 9px;
}

.comment-date {
    color: #999;
}

.comment-content {
    color: #333;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 9px;
    margin-top: 8px;
}

.comment-action-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #6c7480;
    cursor: pointer;
    font-size: 11px;
}

.comment-action-button:hover {
    color: #2f64d6;
    text-decoration: underline;
}

.comment-action-button.danger:hover {
    color: #c33f3f;
}

.comment-reply-form,
.comment-delete-form {
    margin-top: 11px;
    padding: 12px;
    border: 1px solid #e1e5ec;
    border-radius: 4px;
    background: #f8f9fb;
}

.comment-delete-form form {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.comment-delete-form .form-control {
    width: 180px;
}

.comment-write-box {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #dfe3e9;
    border-radius: 5px;
    background: #fafbfc;
}

.comment-guest-fields {
    display: grid;
    grid-template-columns: 160px 180px;
    gap: 6px;
    margin-bottom: 7px;
}

.comment-textarea {
    min-height: 100px !important;
    resize: vertical;
}

.comment-textarea.small {
    min-height: 78px !important;
}

.comment-anonymous-check {
    margin-top: 0;
    margin-bottom: 7px;
}

.comment-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

.comment-guide {
    color: #999;
    font-size: 10px;
}

.comment-pagination {
    margin-top: 14px;
}

.comment-edit-wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.comment-edit-wrap h1 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #44516b;
    font-size: 20px;
}

.comment-edit-content {
    min-height: 180px !important;
}

@media (max-width: 600px) {

    .comment-item {
        padding-right: 8px;
        padding-left: 8px;
    }

    .comment-item.reply {
        padding-left: 30px;
    }

    .comment-item.reply::before {
        left: 12px;
    }

    .comment-guest-fields {
        grid-template-columns: 1fr;
    }

    .comment-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-form-actions .btn {
        width: 100%;
    }

    .comment-delete-form form {
        flex-direction: column;
    }

    .comment-delete-form .form-control {
        width: 100%;
    }
}

/* ============================================================
   CKEditor 직접 이미지 첨부 버튼
   ============================================================ */

.editor-upload-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.editor-direct-upload {
    min-height: 32px;
    padding-right: 13px;
    padding-left: 13px;
}

.editor-upload-help {
    color: #8a8f98;
    font-size: 11px;
}

@media (max-width: 600px) {

    .editor-upload-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ============================================================
   STEP 12 추천 / 비추천
   ============================================================ */

.post-vote-button {
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        transform 0.05s ease;
}

.post-vote-button:hover {
    border-color: #9caccc;
    background: #f7f9fd;
}

.post-vote-button:active {
    transform: translateY(1px);
}

.post-vote-button.recommend:hover {
    border-color: #6e92df;
}

.post-vote-button.oppose:hover {
    border-color: #d58a8a;
}

.comment-vote-button span {
    margin-left: 2px;
    font-weight: 700;
}

.comment-vote-button[data-comment-vote="RECOMMEND"] span {
    color: #2f64d6;
}

.comment-vote-button[data-comment-vote="OPPOSE"] span {
    color: #c34b4b;
}


/* ============================================================
   STEP 14 인기글 / 베스트글
   ============================================================ */

.popular-page {
    width: 100%;
}

.popular-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #44516b;
}

.popular-head h1 {
    margin: 0 0 5px;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.popular-head p {
    margin: 0;
    color: #777;
    font-size: 12px;
}

.popular-gallery-name {
    display: inline-block;
    margin-bottom: 5px;
    color: #315eb9;
    font-size: 12px;
    font-weight: 600;
}

.popular-list {
    border-top: 1px solid #e1e4ea;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    padding: 12px 10px;
    border-bottom: 1px solid #eceef2;
    background: #fff;
}

.popular-item:hover {
    background: #fafbfc;
}

.popular-rank {
    display: flex;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9dfeb;
    border-radius: 6px;
    background: #f7f9fc;
    color: #315eb9;
    font-size: 14px;
    font-weight: 700;
}

.popular-item-main {
    min-width: 0;
    flex: 1;
}

.popular-gallery-link {
    margin-bottom: 3px;
}

.popular-gallery-link a {
    color: #66799e;
    font-size: 10px;
}

.popular-title {
    display: block;
    overflow: hidden;
    margin-bottom: 7px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popular-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #888;
    font-size: 10px;
}

.popular-score {
    color: #c14848;
    font-weight: 700;
}

.popular-empty {
    padding: 60px 10px;
    color: #888;
    font-size: 13px;
    text-align: center;
}

.gallery-popular-tab {
    color: #c54444 !important;
    font-weight: 600;
}

@media (max-width: 600px) {

    .popular-head {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .popular-item {
        align-items: flex-start;
        gap: 10px;
        padding-right: 4px;
        padding-left: 4px;
    }

    .popular-rank {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .popular-title {
        font-size: 13px;
    }
}


/* ============================================================
   STEP 16 즐겨찾기 / 스크랩 / 최근 본 갤러리
   ============================================================ */

.btn.is-active {
    border-color: #315eb9;
    background: #eef4ff;
    color: #2454aa;
}

.post-scrap-area {
    display: flex;
    justify-content: center;
    padding: 0 16px 18px;
}

.mypage-wrap {
    width: 100%;
}

.mypage-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #44516b;
}

.mypage-head h1 {
    margin: 0 0 5px;
    font-size: 19px;
}

.mypage-head p {
    margin: 0;
    color: #777;
    font-size: 11px;
}

.mypage-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.mypage-menu-card {
    display: block;
    min-height: 135px;
    padding: 17px;
    border: 1px solid #e0e4eb;
    border-radius: 6px;
    background: #fff;
}

.mypage-menu-card:hover {
    border-color: #aebbd8;
    text-decoration: none;
}

.mypage-menu-card strong {
    display: block;
    margin-bottom: 5px;
    color: #222;
    font-size: 12px;
}

.mypage-menu-card span {
    color: #315eb9;
    font-size: 11px;
    font-weight: 700;
}

.mypage-menu-card p {
    margin: 12px 0 0;
    color: #777;
    font-size: 10px;
    line-height: 1.6;
}

.activity-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.activity-card {
    display: block;
    min-height: 115px;
    padding: 14px;
    border: 1px solid #e1e4ea;
    border-radius: 5px;
    background: #fff;
}

.activity-card:hover {
    border-color: #aebbd8;
    text-decoration: none;
}

.activity-card strong {
    display: block;
    margin-bottom: 7px;
    color: #222;
    font-size: 14px;
}

.activity-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 36px;
    margin: 0 0 8px;
    color: #777;
    font-size: 11px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.activity-card span {
    color: #999;
    font-size: 10px;
}

.activity-empty {
    grid-column: 1 / -1;
    padding: 55px 10px;
    color: #888;
    font-size: 12px;
    text-align: center;
}

.scrap-list {
    border-top: 1px solid #e1e4ea;
}

.scrap-item {
    padding: 14px 8px;
    border-bottom: 1px solid #eceef2;
}

.scrap-gallery {
    margin-bottom: 4px;
    color: #66799e;
    font-size: 10px;
}

.scrap-title {
    display: block;
    overflow: hidden;
    margin-bottom: 7px;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scrap-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #999;
    font-size: 10px;
}

@media (max-width: 760px) {

    .mypage-menu-grid,
    .activity-list {
        grid-template-columns: 1fr;
    }

    .mypage-head {
        align-items: stretch;
        flex-direction: column;
    }

    .mypage-menu-card,
    .activity-card {
        min-height: auto;
    }
}


/* ============================================================
   USER UI HOTFIX 2026-10-07
   댓글 답글 정렬 / 익명 체크 / 마이페이지 헤더
   ============================================================ */

.comment-item.reply {
    position: relative;
    padding: 13px 12px 13px 38px;
    border-left: 3px solid #edf1f6;
    background: #fafbfc;
}

.comment-item.reply::before {
    top: 15px;
    left: 15px;
    color: #8e99a8;
    font-size: 13px;
}

.comment-item.reply .comment-main {
    width: 100%;
}

.comment-content {
    margin: 0;
}

.comment-anonymous-check {
    display: inline-flex;
    width: auto;
    min-height: 22px;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 0;
    color: #4f5966;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    vertical-align: middle;
}

.comment-anonymous-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #2f64d6;
}

.comment-write-box .comment-anonymous-check + .comment-textarea,
.comment-reply-form .comment-anonymous-check + .comment-textarea {
    display: block;
}

@media (max-width: 760px) {

    .mypage-head {
        align-items: flex-start;
    }

    .mypage-head .btn {
        width: auto;
        align-self: flex-start;
    }
}

@media (max-width: 600px) {

    .comment-item.reply {
        padding: 12px 8px 12px 30px;
        border-left-width: 2px;
    }

    .comment-item.reply::before {
        top: 14px;
        left: 10px;
    }

    .comment-content {
        font-size: 12px;
        line-height: 1.65;
    }

    .comment-actions {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .comment-write-box,
    .comment-reply-form,
    .comment-delete-form {
        padding: 12px;
    }

    .comment-anonymous-check {
        margin-bottom: 10px;
        font-size: 12px;
    }
}


/* ============================================================
   GALLERY VIEW - SHARE BUTTON
   ============================================================ */

.post-view-left-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.post-share-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
}

@media (max-width: 760px) {

    .post-view-left-actions {
        gap: 5px;
    }

    .post-share-button {
        min-height: 34px;
    }
}

