.board-layout {
    --board-accent: var(--tripbora-primary);
    --board-accent-dark: var(--tripbora-primary-hover);
    --board-accent-soft: var(--tripbora-soft);
    --board-border: #e2e8f0;
    --board-text: #172033;
    --board-muted: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 28px;
    width: min(1240px, 100%);
    min-height: 680px;
    margin: 42px auto 64px;
    padding: 0 20px;
    box-sizing: border-box;
}

.board-sidebar {
    position: sticky;
    top: 20px;
    flex: 0 0 220px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--board-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.board-sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.board-sidebar li + li {
    margin-top: 4px;
}

.board-sidebar a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    box-sizing: border-box;
    border-radius: 11px;
    color: var(--board-muted);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.board-sidebar a:hover {
    background: #f8fafc;
    color: var(--board-text);
}

.board-sidebar a:focus-visible {
    outline: 3px solid rgba(118, 87, 200, 0.24);
    outline-offset: 2px;
}

.board-sidebar a.active {
    background: var(--board-accent-soft);
    color: var(--board-accent-dark);
    font-weight: 750;
}

.board-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 34px 36px 30px;
    border: 1px solid var(--board-border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.board-list-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 26px;
}

.board-heading {
    min-width: 0;
}

.board-heading-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--board-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.board-heading h1 {
    margin: 0;
    color: var(--board-text);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.2;
}

.board-heading p {
    margin: 10px 0 0;
    color: var(--board-muted);
    font-size: 14px;
    line-height: 1.55;
}

.board-write-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 12px;
    background: var(--board-accent);
    box-shadow: 0 4px 10px rgba(118, 87, 200, 0.16);
    color: #fff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.board-list-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.board-write-btn::before {
    content: "+";
    margin-right: 7px;
    font-size: 19px;
    font-weight: 500;
    line-height: 1;
}

.board-write-btn:hover {
    background: var(--board-accent-dark);
    box-shadow: 0 5px 12px rgba(118, 87, 200, 0.2);
}

.board-write-btn:focus-visible {
    outline: 3px solid rgba(118, 87, 200, 0.28);
    outline-offset: 3px;
}

/* 글쓰기 종류 선택 모달 스타일은 작성폼과 공유하므로 board-write-modal.css 에 둔다. */

.board-sort-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--board-border);
}

.board-country-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 11px 12px;
    border: 1px solid var(--board-border);
    border-radius: 12px;
    background: #fafbfc;
}

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

.board-scope-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 34px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--board-muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.board-scope-link:hover {
    border-color: var(--tripbora-border);
    background: var(--tripbora-soft);
    color: var(--tripbora-primary-hover);
}

.board-scope-link:focus-visible,
.board-country-select-wrap input:focus-visible {
    outline: 3px solid var(--tripbora-focus);
    outline-offset: 2px;
}

.board-scope-link.active,
.board-scope-link[aria-current="page"] {
    border-color: var(--tripbora-border);
    background: var(--tripbora-soft);
    color: var(--tripbora-primary);
    font-weight: 800;
}

.board-scope-link:active {
    border-color: var(--tripbora-primary-active);
    background: var(--tripbora-soft);
    color: var(--tripbora-primary-active);
}

.board-country-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-country-select-wrap label {
    color: var(--board-muted);
    font-size: 12px;
    font-weight: 700;
}

.board-country-combobox {
    position: relative;
    width: 210px;
}

.board-country-select-wrap input {
    width: 100%;
    min-height: 36px;
    padding: 0 12px 0 34px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 13px;
}

.board-country-search-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 12px;
    width: 11px;
    height: 11px;
    border: 1.5px solid #64748b;
    border-radius: 50%;
    transform: translateY(-58%);
    pointer-events: none;
}

.board-country-search-icon::after {
    position: absolute;
    right: -4px;
    bottom: -3px;
    width: 5px;
    height: 1.5px;
    background: #64748b;
    content: "";
    transform: rotate(45deg);
}

.board-country-option-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
}

.board-country-option {
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.board-country-option:hover,
.board-country-option.is-highlighted {
    background: #f1f5f9;
}

.board-country-option[aria-selected="true"] {
    color: var(--board-accent-dark);
    font-weight: 750;
}

.board-country-option:focus-visible {
    outline: 2px solid rgba(118, 87, 200, 0.24);
    outline-offset: -1px;
}

.board-country-option-empty {
    margin: 0;
    padding: 14px 8px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

.board-sort-button {
    position: relative;
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--board-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.board-sort-button:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: var(--board-text);
}

.board-sort-button:focus-visible {
    outline: 3px solid rgba(118, 87, 200, 0.24);
    outline-offset: 2px;
}

.board-sort-button.active,
.board-sort-button[aria-pressed="true"] {
    border-color: transparent;
    background: #f8fafc;
    color: var(--board-accent-dark);
    font-weight: 750;
}

.board-sort-button.active::after,
.board-sort-button[aria-pressed="true"]::after {
    position: absolute;
    right: 9px;
    bottom: 2px;
    left: 9px;
    height: 2px;
    border-radius: 2px;
    background: var(--board-accent);
    content: "";
}

.board-profile-link {
    color: inherit;
    text-decoration: none;
}

.board-profile-link:hover {
    color: var(--board-accent-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.board-profile-link:focus-visible {
    outline: 2px solid rgba(118, 87, 200, 0.28);
    outline-offset: 2px;
}

.board-list {
    width: 100%;
}

.board-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    min-width: 0;
    padding: 20px 6px;
    border-bottom: 1px solid #edf1f5;
    transition: background-color 150ms ease;
}

.board-list-row:hover {
    background: #fbfdfd;
}

.board-list-row--course {
    padding-top: 14px;
    padding-bottom: 14px;
    background: linear-gradient(90deg, rgba(240, 253, 250, 0.46), transparent 52%);
}

.board-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.board-type {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 28px;
    padding: 4px 9px;
    box-sizing: border-box;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.board-type--question {
    background: #eff6ff;
    color: #2563eb;
}

.board-type--tip {
    background: #fff7ed;
    color: #c2410c;
}

.board-type--course {
    min-height: 25px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
}

.board-title {
    min-width: 0;
    margin: 0;
    color: var(--board-text);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.45;
}

.board-list-row--course .board-title {
    font-size: 15px;
}

.board-title a {
    display: block;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-title a:hover {
    color: var(--board-accent-dark);
}

.board-title a:focus-visible {
    border-radius: 3px;
    outline: 3px solid rgba(118, 87, 200, 0.22);
    outline-offset: 3px;
}

.board-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
    color: var(--board-muted);
}

.board-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
    font-size: 12px;
    white-space: nowrap;
}

.board-meta-item + .board-meta-item::before {
    content: "·";
    margin-right: 2px;
    color: #cbd5e1;
    font-weight: 700;
}

.board-meta-label {
    color: #94a3b8;
    font-size: 11px;
}

.board-meta-value {
    color: #526078;
    font-weight: 650;
}

.board-nickname {
    max-width: 110px;
}

.board-nickname .board-meta-value {
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-comments .board-meta-value,
.board-bookmarks .board-meta-value {
    color: var(--board-accent-dark);
}

.board-list-empty {
    padding: 72px 20px;
    border-bottom: 1px solid var(--board-border);
    color: var(--board-muted);
    font-size: 14px;
    text-align: center;
}

.board-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 28px;
}

.board-page-button {
    min-width: 76px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.board-page-button:hover:not(:disabled) {
    border-color: var(--board-accent);
    background: var(--board-accent-soft);
    color: var(--board-accent-dark);
}

.board-page-button:focus-visible {
    outline: 3px solid rgba(118, 87, 200, 0.24);
    outline-offset: 2px;
}

.board-page-button:disabled {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #cbd5e1;
    cursor: not-allowed;
}

.board-page-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 74px;
    color: #94a3b8;
    font-size: 13px;
}

.board-page-status strong {
    color: var(--board-accent-dark);
    font-size: 15px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1100px) {
    .board-list-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .board-meta {
        justify-content: flex-start;
        padding-left: 84px;
    }
}

@media (max-width: 1024px) {
    .board-layout {
        flex-direction: column;
        gap: 18px;
        margin-top: 30px;
    }

    .board-sidebar {
        position: static;
        width: 100%;
        box-sizing: border-box;
    }

    .board-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .board-sidebar li + li {
        margin-top: 0;
    }

    .board-sidebar a {
        padding-right: 16px;
        padding-left: 16px;
    }

    .board-main {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .board-layout {
        padding: 0 16px;
    }

    .board-main {
        padding: 26px 22px;
        border-radius: 18px;
    }

    .board-list-header {
        margin-bottom: 22px;
    }

    .board-heading p {
        max-width: 460px;
    }

    .board-sort-bar {
        justify-content: flex-start;
    }

    .board-country-filter {
        align-items: flex-start;
        flex-direction: column;
    }

    .board-list-row {
        padding-right: 2px;
        padding-left: 2px;
    }

    .board-list-row--course {
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .board-meta {
        flex-wrap: wrap;
        gap: 7px 14px;
        padding-left: 84px;
    }
}

@media (max-width: 480px) {
    .board-layout {
        gap: 12px;
        margin: 20px auto 42px;
        padding: 0 12px;
    }

    .board-sidebar {
        padding: 8px;
        border-radius: 14px;
        overflow: hidden;
    }

    .board-sidebar ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .board-sidebar li {
        flex: 0 0 auto;
    }

    .board-sidebar a {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 13px;
    }

    .board-main {
        padding: 22px 16px;
        border-radius: 16px;
    }

    .board-list-header {
        margin-bottom: 18px;
    }

    .board-heading-kicker {
        font-size: 10px;
    }

    .board-heading h1 {
        font-size: 26px;
    }

    .board-heading p {
        display: none;
    }

    .board-write-btn {
        min-height: 42px;
        padding: 0 14px;
        font-size: 13px;
    }

    .board-list-actions {
        margin-top: 16px;
    }

    .board-sort-bar {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
    }

    .board-country-filter {
        padding: 9px;
    }

    .board-scope-options,
    .board-country-select-wrap,
    .board-country-combobox {
        width: 100%;
    }

    .board-scope-link {
        flex: 1 1 0;
    }

    .board-country-select-wrap label {
        flex: 0 0 auto;
    }

    .board-sort-button {
        min-width: 0;
        min-height: 42px;
        padding: 0 5px;
        font-size: 12px;
    }

    .board-row-main {
        align-items: flex-start;
        gap: 9px;
    }

    .board-type {
        min-width: 62px;
        min-height: 26px;
        padding-right: 7px;
        padding-left: 7px;
        font-size: 11px;
    }

    .board-title,
    .board-list-row--course .board-title {
        padding-top: 1px;
        font-size: 14px;
    }

    .board-meta {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 7px;
        padding-left: 71px;
    }

    .board-meta-item {
        gap: 3px;
        font-size: 11px;
    }

    .board-meta-label {
        font-size: 10px;
    }

    .board-nickname {
        grid-column: span 3;
        max-width: none;
    }

    .board-date {
        grid-column: span 3;
        min-width: 0;
        overflow: hidden;
    }

    .board-date .board-meta-value {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .board-views,
    .board-comments,
    .board-bookmarks {
        grid-column: span 2;
    }

    .board-pagination {
        gap: 8px;
        padding-top: 22px;
    }

    .board-page-button {
        min-width: 68px;
        min-height: 44px;
    }

    .board-page-status {
        min-width: 58px;
    }
}
