.board-container {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    padding: 1.25rem 0 2.2rem;
}

.board-header {
    margin-bottom: 1rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid #d9e2ef;
}

.board-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.45rem;
}

.board-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #5f6e84;
    margin-bottom: 0;
}

.board-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

/* 밑줄은 긋지 않는다 — 까닭은 classic-detail.css 의 .cd-breadcrumb a:hover 주석에.
   다크는 theme.dark.css 의 전역 `a:hover` 가 이 선택자를 이겨 #edf0f3 로 밝히므로
   여기 색은 라이트에만 걸린다. */
.board-breadcrumb a:hover {
    color: var(--color-primary-strong);
}

.board-breadcrumb i {
    font-size: 0.72rem;
    color: #5f6e84;
}

.board-header h1 {
    color: #1f2f46;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.25;
}

.board-header p {
    color: #5f6e84;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* 게시판 헤더 스켈레톤 */
.board-header-skeleton {
    margin-bottom: 1rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid #d9e2ef;
}

.board-header-skeleton-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.62rem;
}

.board-header-skeleton-breadcrumb {
    height: 12px;
    width: min(320px, 70%);
    border-radius: 6px;
}

.board-header-skeleton-write {
    height: 34px;
    width: 82px;
    border-radius: 999px;
}

.board-header-skeleton-title {
    height: 34px;
    width: min(420px, 88%);
    border-radius: 8px;
    margin-bottom: 0.65rem;
}

.board-header-skeleton-desc {
    height: 14px;
    width: min(520px, 96%);
    border-radius: 6px;
}

.board-header-skeleton-desc.sub {
    width: min(450px, 82%);
    margin-top: 0.42rem;
}

/* 컨트롤 영역복구 */
.board-actions {
    display: block;
    margin-bottom: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.btn-board {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.7rem 1.4rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-write-new {
    background: #fff;
    color: var(--color-primary);
    border: 1px solid #b8c9e4;
    border-radius: 999px;
    padding: 0.56rem 1.05rem;
    gap: 6px;
    box-shadow: none;
}

.btn-write-new:hover {
    background: #f3f8ff;
    border-color: #9fb7dd;
    color: #355587;
    transform: none;
    box-shadow: none;
}

/* 검색 필터 복구 */
.board-search-box {
    position: relative;
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    margin-right: 0;
}

.board-search-box .search-icon {
    position: absolute;
    left: 1.2rem;
    color: var(--color-primary);
    font-size: 1rem;
    z-index: 2;
}

.board-search-input {
    width: 100%;
    padding: 0.8rem 3.4rem 0.8rem 3rem;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.95rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    outline: none;
}

.board-search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px color-mix(in srgb, var(--color-primary) 10%, transparent);
    background: #fff;
}

.advanced-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 1px solid #d7e3f6;
    border-radius: 50%;
    background: #edf4ff;
    color: #2f5da8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    z-index: 3;
}

.advanced-search-btn:hover {
    background: #e3eeff;
    border-color: #bfd2f2;
}

.advanced-search-btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.advanced-search-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0 0.8rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f9fbff;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
    transition:
        max-height 280ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 200ms ease,
        transform 220ms ease,
        margin 220ms ease,
        padding 220ms ease,
        border-color 220ms ease,
        visibility 0s linear 280ms;
}

.advanced-search-panel.is-open {
    margin: 0.8rem 0 0;
    padding: 0.72rem 0.8rem;
    border-color: #e2ebf8;
    max-height: 280px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition:
        max-height 300ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 220ms ease,
        transform 220ms ease,
        margin 220ms ease,
        padding 220ms ease,
        border-color 220ms ease,
        visibility 0s linear 0s;
}

.advanced-search-panel label {
    font-size: 0.8rem;
    color: #3f4f66;
    font-weight: 700;
}

#posts-container {
    margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {

    .advanced-search-panel,
    .advanced-search-panel.is-open {
        transition: none;
    }
}

.notion-tag-filter-wrap {
    position: relative;
    width: min(560px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.42rem;
}

.notion-tag-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d7deeb;
    border-radius: 12px;
    background: #fff;
    padding: 0.42rem 0.56rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.36rem;
}

.notion-tag-input:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.notion-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid #d7e4f8;
    border-radius: 999px;
    background: #edf4ff;
    color: #2f5da8;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.18rem 0.5rem;
    line-height: 1.1;
}

.notion-tag-chip button {
    border: 0;
    background: transparent;
    color: #5d7fb8;
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1;
}

.notion-tag-search-input {
    border: 0;
    outline: none;
    min-width: 180px;
    flex: 1 1 140px;
    font-size: 0.82rem;
    color: #334155;
    text-align: left;
    padding: 0.16rem 0.2rem;
    background: transparent;
}

.notion-tag-search-input::placeholder {
    color: #94a3b8;
}

.notion-tag-dropdown {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0;
    right: 0;
    border: 1px solid #dbe5f4;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    max-height: 220px;
    overflow-y: auto;
    display: none;
    z-index: 20;
    text-align: left;
}

.notion-tag-dropdown.is-open {
    display: block;
}

.notion-tag-option {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.68rem;
    color: #334155;
    font-size: 0.8rem;
    cursor: pointer;
}

.notion-tag-option:hover {
    background: #f2f7ff;
}

.notion-tag-option-count {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
}

.notion-tag-empty {
    padding: 0.55rem 0.68rem;
    color: #94a3b8;
    font-size: 0.78rem;
}

.notion-tag-skeleton-list {
    padding: 0.5rem 0.68rem 0.6rem;
    display: grid;
    gap: 0.45rem;
}

.notion-tag-skeleton-item {
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eef3fb 25%, #f7faff 50%, #eef3fb 75%);
    background-size: 200% 100%;
    animation: tagSkeletonShift 1.1s ease-in-out infinite;
}

@keyframes tagSkeletonShift {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.notion-tag-reset-btn {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: 1px solid #d7e3f6;
    border-radius: 50%;
    background: #edf4ff;
    color: #2f5da8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    transition: all 0.18s ease;
}

.notion-tag-reset-btn:hover {
    background: #e3eeff;
    border-color: #bfd2f2;
}

.advanced-reset-btn {
    border: 1px solid #d7deeb;
    border-radius: 8px;
    background: #fff;
    color: #475467;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
}

/* 게시글 목록 */

.board-posts-list {
    border-top: 0;
    background: transparent;
    border-top: 1px solid #e8eef8;
    border-bottom: 1px solid #e8eef8;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    width: 100%;
    margin-top: 0;
    overflow: hidden;
}

/* 게시글 목록 스켈레톤 */
.board-posts-skeleton-list {
    border-top: 1px solid #e8eef8;
    border-bottom: 1px solid #e8eef8;
}

.board-post-skeleton-item {
    display: grid;
    grid-template-columns: 1fr 130px 110px 220px;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
    gap: 0.8rem;
}

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

.board-post-skeleton-title-wrap {
    min-width: 0;
}

.board-post-skeleton-title {
    height: 16px;
    width: min(420px, 92%);
    border-radius: 6px;
    margin-bottom: 0.42rem;
}

.board-post-skeleton-tags {
    height: 12px;
    width: min(260px, 66%);
    border-radius: 999px;
}

.board-post-skeleton-meta {
    height: 12px;
    width: 78%;
    border-radius: 6px;
    justify-self: center;
}

.board-post-skeleton-stats {
    height: 12px;
    width: 74%;
    border-radius: 6px;
    justify-self: end;
}

.board-skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: #eef2f8;
}

.board-skeleton-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 45%, rgba(255, 255, 255, 0) 100%);
    animation: boardSkeletonShimmer 1.28s ease-in-out infinite;
}

@keyframes boardSkeletonShimmer {
    100% {
        transform: translateX(100%);
    }
}

.board-list-header {
    display: grid;
    grid-template-columns: 1fr 140px 100px 70px 70px;
    padding: 12px 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
    font-weight: 700;
    font-size: 0.85rem;
    color: #333;
    text-align: center;
    align-items: center;
}

.board-list-header div:first-child {
    text-align: left;
}

.board-post-item {
    display: grid !important;
    grid-template-columns: 1fr 130px 110px 220px !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid #eee !important;
    border-left: none !important;
    align-items: center !important;
    transition: background 0.1s !important;
    cursor: pointer !important;
    text-decoration: none !important;
    color: inherit !important;
    background: transparent;
    min-height: auto !important;
}

.board-post-item:hover {
    background-color: #f1f6ff !important;
}

.board-post-item.pinned {
    background-color: #fff9db !important;
}

.post-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
    text-align: left;
}

.post-title-top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.post-title-text {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.comment-count {
    color: #e03131;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.post-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
    width: 100%;
}

.post-tag-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d9e2f0;
    border-radius: 999px;
    background: #f3f7fd;
    color: #3a5478;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.12rem 0.42rem;
    line-height: 1.1;
}

.post-tag-chip.is-empty {
    border-color: #e4e9f2;
    background: #f7f9fc;
    color: #7c8a9e;
}

.post-author-col,
.post-date-col,
.post-stats-col {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-stats-col {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.72rem;
}

/* 글 한 줄에 넓은 화면 열 셋과 좁은 화면 한 줄 정보가 함께 있다(board-list-render.js). 넓은 화면은 열만 */
.mobile-meta {
    display: none;
}

.post-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    color: #5f6e84;
    font-size: 0.82rem;
    font-weight: 600;
}

.post-stat-item i {
    color: #7a8aa2;
    font-size: 0.82rem;
}

.board-pagination {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.38rem;
    flex-wrap: wrap;
}

.board-page-btn {
    min-width: 34px;
    height: 34px;
    border: 1px solid #c7d9f1;
    border-radius: 9px;
    background: #fff;
    color: #3a5a8a;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: none;
}

.board-page-btn:hover:not(:disabled) {
    border-color: #c7d9f1;
    background: #f8fbff;
    box-shadow: none;
}

.board-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.board-page-btn.is-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
    box-shadow: none;
}

.board-page-btn.nav-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
}

.board-page-btn:focus,
.board-page-btn:focus-visible,
.board-page-btn:active {
    box-shadow: none;
}

.board-page-ellipsis {
    color: #627087;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0 0.12rem;
}

.loading-state,
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading-state i {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .board-container {
        max-width: 100%;
        padding-top: 0.7rem;
        padding-bottom: 1.6rem;
    }

    .board-header-top {
        flex-wrap: wrap;
        align-items: flex-start;
        row-gap: 0.55rem;
    }

    .board-breadcrumb {
        flex-wrap: wrap;
        row-gap: 0.3rem;
    }

    .board-actions {
        padding: 0;
    }

    .board-search-box {
        max-width: 100%;
    }

    .advanced-search-panel {
        margin-top: 0;
    }

    .advanced-search-panel.is-open {
        margin-top: 0.4rem;
    }

    .board-header-top .btn-write-new {
        margin-left: auto;
    }

    .board-list-header {
        display: none !important;
    }

    .board-post-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 12px 15px !important;
        gap: 5px !important;
    }

    .board-post-skeleton-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.52rem;
    }

    .board-post-skeleton-title,
    .board-post-skeleton-tags,
    .board-post-skeleton-meta,
    .board-post-skeleton-stats {
        justify-self: auto;
        width: min(92%, 360px);
    }

    .post-title-wrapper {
        width: 100%;
        margin-bottom: 2px;
    }

    .post-author-col,
    .post-date-col,
    .post-stats-col {
        display: none;
    }

    .mobile-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        color: #999;
        font-size: 0.75rem;
        align-items: center;
    }

    .mobile-meta span:not(:last-child)::after {
        content: '|';
        margin-left: 8px;
        color: #eee;
    }

    .board-pagination {
        margin-top: 12px;
        gap: 5px;
    }

    .board-page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.78rem;
        border-radius: 8px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .board-container {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }
}

@media (max-width: 576px) {
    .board-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}
