/* ============================
   BOARD GAME LIBRARY — FLAT UI
   ============================ */
.post-type-archive-board_game {
    background: #fff;
    color: var(--flat-ink);
}

.post-type-archive-board_game .site-header {
    background: #fff;
    backdrop-filter: none;
    border-bottom: 1px solid var(--color-border);
}

.post-type-archive-board_game .site-logo {
    color: var(--flat-ink);
    position: relative;
}

.post-type-archive-board_game .site-logo::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    right: -12px;
    top: 6px;
    background: var(--flat-blue);
    border-radius: 2px;
}

.post-type-archive-board_game .site-nav a {
    color: #3E3E3E;
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

.post-type-archive-board_game .site-nav a:hover {
    color: var(--flat-green-dark);
    text-decoration: underline;
}

.post-type-archive-board_game .page-hero {
    min-height: 280px;
    padding: 7rem 0 1.5rem;
    background: #fff;
    border-bottom: 0;
    position: relative;
    overflow: hidden;
}

.post-type-archive-board_game .page-hero-die {
    position: absolute;
    width: 116px;
    height: 116px;
    right: max(2rem, calc((100vw - var(--max-w)) / 2 + 2rem));
    bottom: -30px;
    border: 3px solid var(--flat-blue-dark);
    border-radius: 20px 6px 20px 6px;
    background: #fff;
    transform: rotate(8deg);
}

.post-type-archive-board_game .page-hero-die i {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--flat-blue-dark);
}

.post-type-archive-board_game .page-hero-die i:nth-child(1) { top: 22px; left: 22px; }
.post-type-archive-board_game .page-hero-die i:nth-child(2) { top: 22px; right: 22px; }
.post-type-archive-board_game .page-hero-die i:nth-child(3) { top: 48px; left: 48px; }
.post-type-archive-board_game .page-hero-die i:nth-child(4) { bottom: 22px; left: 22px; }
.post-type-archive-board_game .page-hero-die i:nth-child(5) { right: 22px; bottom: 22px; }

.post-type-archive-board_game .page-hero .container {
    position: relative;
    z-index: 1;
}

.post-type-archive-board_game .page-hero .section-label {
    display: inline-block;
    color: var(--flat-blue-dark);
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 1rem;
}

.post-type-archive-board_game .page-title {
    color: var(--flat-ink);
    letter-spacing: 0;
    margin-bottom: 0.75rem;
}

.post-type-archive-board_game .page-title::after {
    content: "";
    display: block;
    width: 72px;
    height: 6px;
    margin-top: 0.75rem;
    background: var(--flat-blue);
}

.post-type-archive-board_game .page-lead {
    color: var(--flat-muted);
}

.post-type-archive-board_game .board-game-search-section {
    background: #fff;
    padding-top: 3rem;
}

.post-type-archive-board_game .board-game-search {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 2fr);
    gap: 1.75rem 2rem;
    align-items: start;
    background: #fff;
    border: 1px solid #B8B8B8;
    border-radius: 12px;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    box-shadow: none;
}

.post-type-archive-board_game .search-group {
    min-width: 0;
    border: 0;
}

.post-type-archive-board_game .search-group legend {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--flat-blue-dark);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

.post-type-archive-board_game .search-group-keyword {
    grid-column: 1;
    grid-row: 1;
    padding-right: 2rem;
    border-right: 1px solid #D4D4D4;
}

.post-type-archive-board_game .search-filters-details {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.post-type-archive-board_game .search-filters-details > summary {
    display: none;
}

.post-type-archive-board_game .search-filters-details > .search-accordion-content {
    display: block !important;
}

.post-type-archive-board_game .search-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 1rem;
    align-items: end;
}

.post-type-archive-board_game .search-field {
    gap: 0.55rem;
    min-width: 0;
}

.post-type-archive-board_game .search-genre-field {
    min-width: 0;
    border: 0;
}

.post-type-archive-board_game .search-genre-field legend {
    margin-bottom: 0.55rem;
    color: var(--flat-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.post-type-archive-board_game .search-genre-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #707070;
    border-radius: 8px;
    background: #fff;
}

.post-type-archive-board_game .search-genre-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.post-type-archive-board_game .search-genre-options input {
    width: 18px;
    height: 18px;
    accent-color: var(--flat-blue-dark);
}

.post-type-archive-board_game .search-field span {
    color: var(--flat-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.post-type-archive-board_game .search-field input,
.post-type-archive-board_game .search-field select {
    width: 100%;
    height: 48px;
    min-height: 48px;
    background: #fff;
    color: var(--flat-ink);
    border: 1px solid #707070;
    border-radius: 8px;
    padding: 0 0.9rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color 0.16s ease, outline-color 0.16s ease;
}

.post-type-archive-board_game .search-field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%2318537F' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 16px 16px;
}

.post-type-archive-board_game .search-checkbox {
    background: #fff;
    color: var(--flat-ink);
    width: fit-content;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.post-type-archive-board_game .search-checkbox-group {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 2rem;
}

.post-type-archive-board_game .search-checkbox:has(input:focus-visible) {
    outline: 3px solid var(--flat-blue-pale);
    outline-offset: 3px;
}

.post-type-archive-board_game .search-checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--flat-blue-dark);
}

.post-type-archive-board_game .search-field input:hover,
.post-type-archive-board_game .search-field select:hover {
    border-color: var(--flat-blue);
}

.post-type-archive-board_game .search-field input:focus-visible,
.post-type-archive-board_game .search-field select:focus-visible {
    border-color: var(--flat-blue-dark);
    outline: 3px solid rgba(34, 111, 168, 0.22);
    outline-offset: 2px;
}

.post-type-archive-board_game .search-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #D4D4D4;
}

.post-type-archive-board_game .btn {
    border-radius: 8px;
    box-shadow: none;
    transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.post-type-archive-board_game .search-actions .btn-primary {
    min-width: 140px;
    min-height: 48px;
    color: #fff;
    background: var(--flat-green-dark);
    border: 1px solid var(--flat-green-dark);
}

.post-type-archive-board_game .search-actions .btn-primary:hover {
    color: #fff;
    background: #15563D;
    border-color: #15563D;
    box-shadow: none;
    transform: none;
}

.post-type-archive-board_game .search-actions .btn-outline {
    min-height: 48px;
    color: var(--flat-ink);
    background: #fff;
    border: 1px solid #707070;
}

.post-type-archive-board_game .search-actions .btn-outline:hover {
    color: var(--flat-blue-dark);
    background: var(--flat-blue-pale);
    border-color: var(--flat-blue-dark);
    box-shadow: none;
    transform: none;
}

.post-type-archive-board_game .search-actions .btn:focus-visible {
    outline: 3px solid rgba(34, 111, 168, 0.22);
    outline-offset: 2px;
}

.post-type-archive-board_game .board-game-result-head {
    color: var(--flat-muted);
    border-bottom: 2px solid var(--flat-line);
    padding-bottom: 0.65rem;
}

.post-type-archive-board_game .board-game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.post-type-archive-board_game .board-game-card {
    background: #f2f2f2;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.18s;
    aspect-ratio: 4 / 3;
}

.post-type-archive-board_game .board-game-card:hover {
    border-color: var(--flat-blue-dark);
    box-shadow: var(--shadow-soft);
    transform: none;
}

.post-type-archive-board_game .board-game-card.is-featured-recommendation {
    border-color: #d79a18;
    aspect-ratio: auto;
}

.post-type-archive-board_game .board-game-recommendation-badge {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 3.9rem;
    overflow: hidden;
    color: #2e2105;
    background: #f1b92e;
    border-bottom: 2px solid #9b6a00;
    line-height: 1.2;
    text-align: center;
}

.post-type-archive-board_game .board-game-recommendation-badge strong {
    position: relative;
    z-index: 1;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.post-type-archive-board_game .board-game-recommendation-badge::before {
    content: "PICK UP";
    position: absolute;
    left: 0.65rem;
    z-index: 2;
    padding: 0.25rem 0.45rem;
    color: #fff;
    background: rgba(56, 36, 0, 0.78);
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1;
    white-space: nowrap;
}

.post-type-archive-board_game .board-game-recommendation-badge::after {
    content: "";
    position: absolute;
    top: -80%;
    left: 58%;
    width: 34px;
    height: 260%;
    background: rgba(255, 255, 255, 0.34);
    transform: rotate(24deg);
}

.post-type-archive-board_game .recommendation-rank-2 .board-game-recommendation-badge {
    color: #24282c;
    background: #c4ccd2;
    border-bottom-color: #7a858d;
}

.post-type-archive-board_game .recommendation-rank-3 .board-game-recommendation-badge {
    color: #321b0e;
    background: #c77a4b;
    border-bottom-color: #8b4e27;
}

.post-type-archive-board_game .is-featured-recommendation .board-game-card-link {
    height: auto;
    aspect-ratio: 4 / 3;
}

.post-type-archive-board_game .board-game-card-link:focus-visible,
.post-type-archive-board_game .btn:focus-visible,
.post-type-archive-board_game .pagination .page-numbers:focus-visible {
    outline: 3px solid var(--flat-blue);
    outline-offset: 4px;
}

.post-type-archive-board_game .board-game-thumb {
    position: relative;
    height: 100%;
    aspect-ratio: auto;
    background: #f2f2f2;
    border-bottom: 0;
    overflow: hidden;
}

.post-type-archive-board_game .board-game-thumb-placeholder {
    background: #f2f2f2;
    color: var(--flat-muted);
}

.post-type-archive-board_game .board-game-card-overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem;
    color: #fff;
    background: linear-gradient(to bottom, rgba(10, 20, 27, 0), rgba(10, 20, 27, 0.88) 52%, rgba(10, 20, 27, 0.96));
}

.post-type-archive-board_game .board-game-card h2 {
    color: #fff;
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    line-height: 1.35;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.post-type-archive-board_game .board-game-card-summary {
    display: block;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.76rem;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-type-archive-board_game .board-game-card-taxonomies {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-width: calc(100% - 1.5rem);
    min-height: 26px;
}

.post-type-archive-board_game .board-game-card-taxonomies span {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 26px;
    padding: 0.15rem 0.5rem;
    color: var(--flat-blue-dark);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--flat-blue-dark);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.post-type-archive-board_game .board-game-card-taxonomies .is-game-meta {
    color: #fff;
    background: rgba(24, 83, 127, 0.94);
    border-color: rgba(255, 255, 255, 0.82);
}

.post-type-archive-board_game .board-game-card:hover .board-game-thumb img {
    transform: scale(1.025);
}

.post-type-archive-board_game .board-game-thumb img {
    transition: transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
    .post-type-archive-board_game .board-game-thumb img {
        transition: none;
    }
}

.post-type-archive-board_game .pagination .page-numbers {
    color: var(--flat-ink);
    background: #fff;
    border: 2px solid var(--flat-line);
    border-radius: 6px;
}

.post-type-archive-board_game .pagination a.page-numbers:hover {
    color: #fff;
    background: var(--flat-blue-dark);
    border-color: var(--flat-blue-dark);
}

.post-type-archive-board_game .pagination .current {
    color: #fff;
    background: var(--flat-green-dark);
    border-color: var(--flat-green-dark);
}

.post-type-archive-board_game .empty-state {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.post-type-archive-board_game .empty-state p {
    color: var(--flat-muted);
}

.post-type-archive-board_game .site-footer {
    background: var(--flat-ink);
    border-top: 0;
}

@media (min-width: 961px) {
    .post-type-archive-board_game .board-game-search {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-type-archive-board_game .search-group-keyword {
        grid-column: 1;
        grid-row: 1;
        padding-right: 0;
        padding-bottom: 1.5rem;
        border-right: 0;
        border-bottom: 1px solid #d4d4d4;
    }

    .post-type-archive-board_game .search-group-keyword .search-field {
        max-width: 520px;
    }

    .post-type-archive-board_game .search-filters-details {
        grid-column: 1;
        grid-row: 2;
    }

    .post-type-archive-board_game .search-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }

    .post-type-archive-board_game .search-genre-field {
        grid-column: 1 / -1;
    }

    .post-type-archive-board_game .search-actions {
        grid-column: 1;
        grid-row: 3;
    }
}

@media (max-width: 960px) {
    .post-type-archive-board_game .site-nav {
        background: #fff;
        border: 3px solid var(--flat-line);
        border-radius: 0 0 8px 8px;
        box-shadow: none;
    }

    .post-type-archive-board_game .board-game-search {
        grid-template-columns: 1fr;
    }

    .post-type-archive-board_game .search-group-keyword {
        grid-column: 1;
        grid-row: auto;
        order: 1;
        padding-right: 0;
        padding-bottom: 1.75rem;
        border-right: 0;
        border-bottom: 1px solid #D4D4D4;
    }

    .post-type-archive-board_game .search-filters-details {
        grid-column: 1;
        grid-row: auto;
        order: 2;
    }

    .post-type-archive-board_game .search-actions {
        grid-row: auto;
        order: 3;
    }

    .post-type-archive-board_game .search-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-type-archive-board_game .board-game-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .post-type-archive-board_game .page-hero {
        min-height: 240px;
        padding: 6.5rem 0 1.5rem;
    }

    .post-type-archive-board_game .page-hero-die {
        width: 82px;
        height: 82px;
        right: 1.25rem;
        bottom: -24px;
    }

    .post-type-archive-board_game .page-hero-die i {
        width: 10px;
        height: 10px;
    }

    .post-type-archive-board_game .page-hero-die i:nth-child(1) { top: 15px; left: 15px; }
    .post-type-archive-board_game .page-hero-die i:nth-child(2) { top: 15px; right: 15px; }
    .post-type-archive-board_game .page-hero-die i:nth-child(3) { top: 33px; left: 33px; }
    .post-type-archive-board_game .page-hero-die i:nth-child(4) { bottom: 15px; left: 15px; }
    .post-type-archive-board_game .page-hero-die i:nth-child(5) { right: 15px; bottom: 15px; }

    .post-type-archive-board_game .page-hero .container {
        padding-right: 6.5rem;
    }

    .post-type-archive-board_game .board-game-search-section {
        padding-top: 2rem;
    }

    .post-type-archive-board_game .board-game-search {
        padding: 1.25rem;
        gap: 1rem;
    }

    .post-type-archive-board_game .search-group-keyword {
        order: 1;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .post-type-archive-board_game .search-actions {
        order: 3;
        justify-content: stretch;
        padding-top: 0;
        border-top: 0;
    }

    .post-type-archive-board_game .search-actions .btn-primary {
        flex: 1;
    }

    .post-type-archive-board_game .board-game-search:not(.has-search-state) .search-reset {
        display: none;
    }

    .post-type-archive-board_game .search-filters-details {
        order: 2;
    }

    .post-type-archive-board_game .search-filters-details > summary {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        min-height: 44px;
        color: var(--flat-blue-dark);
        font-size: 0.9rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        list-style: none;
        cursor: pointer;
    }

    .post-type-archive-board_game .search-filters-details > summary::-webkit-details-marker {
        display: none;
    }

    .post-type-archive-board_game .search-filters-details > summary:focus-visible {
        border-radius: 6px;
        outline: 3px solid rgba(34, 111, 168, 0.22);
        outline-offset: 2px;
    }

    .post-type-archive-board_game .search-filter-count {
        display: inline-grid;
        place-items: center;
        min-width: 24px;
        height: 24px;
        padding: 0 0.4rem;
        color: #fff;
        background: var(--flat-blue-dark);
        border-radius: 999px;
        font-size: 0.75rem;
        line-height: 1;
    }

    .post-type-archive-board_game .search-filter-chevron {
        width: 9px;
        height: 9px;
        margin-left: auto;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg) translateY(-2px);
        transition: transform 0.2s ease;
    }

    .post-type-archive-board_game .search-filters-details[open] .search-filter-chevron {
        transform: rotate(225deg) translate(-2px, -2px);
    }

    .post-type-archive-board_game .search-filters-details > .search-accordion-content,
    .post-type-archive-board_game .search-filters-details:not([open]) > .search-accordion-content {
        display: grid !important;
        grid-template-rows: 0fr;
        opacity: 0;
        visibility: hidden;
        transition: grid-template-rows 0.25s ease, opacity 0.2s ease, visibility 0s linear 0.25s;
    }

    .post-type-archive-board_game .search-filters-details[open] > .search-accordion-content {
        grid-template-rows: 1fr;
        opacity: 1;
        visibility: visible;
        transition: grid-template-rows 0.25s ease, opacity 0.2s ease;
    }

    .post-type-archive-board_game .search-accordion-content > .search-group {
        min-height: 0;
        overflow: hidden;
    }

    .post-type-archive-board_game .search-group-filters {
        padding-top: 1rem;
        border-top: 1px solid #D4D4D4;
    }

    .post-type-archive-board_game .search-group-filters > legend {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .post-type-archive-board_game .search-actions .btn {
        min-height: 44px;
    }

    .post-type-archive-board_game .board-game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 560px) {
    .post-type-archive-board_game .search-filter-grid {
        grid-template-columns: 1fr;
    }

    .post-type-archive-board_game .search-checkbox {
        grid-column: auto;
    }

    .post-type-archive-board_game .search-checkbox-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .post-type-archive-board_game .search-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .post-type-archive-board_game .search-actions .btn {
        width: 100%;
    }

    .post-type-archive-board_game .board-game-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .post-type-archive-board_game .search-filters-details > .search-accordion-content,
    .post-type-archive-board_game .search-filter-chevron {
        transition: none;
    }
}

@media (max-width: 420px) {
    .post-type-archive-board_game .page-hero {
        padding-bottom: 2.5rem;
    }

    .post-type-archive-board_game .page-hero-die {
        opacity: 0.8;
    }

    .post-type-archive-board_game .page-hero .container {
        padding-right: 4.75rem;
    }

    .post-type-archive-board_game .page-title {
        font-size: 2rem;
    }
}
