.kbt-guide {
    --guide-wine: #7b2022;
    --guide-wine-dark: #5e171a;
    --guide-wine-soft: #f3c9c4;
    --guide-wine-text: #f1dcd8;
    --guide-cream: #fbf7f4;
    --guide-line: #eee5e0;
    --guide-line-strong: #e6dad4;
    --guide-ink: #1b1414;
    --guide-muted: #6b5a55;
    width: 100%;
    min-width: 0;
    color: var(--guide-ink);
    background: #fff;
}

.kbt-guide *,
.kbt-guide *::before,
.kbt-guide *::after {
    box-sizing: border-box;
}

.kbt-guide a {
    color: inherit;
    text-decoration: none;
}

.kbt-guide-split {
    display: grid;
    grid-template-columns: 40% 60%;
    min-height: 670px;
}

.kbt-guide-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    min-width: 0;
    overflow: hidden;
    padding: 44px 56px 40px 72px;
    color: #fff;
    background: var(--guide-wine);
}

.kbt-guide-mark {
    position: absolute;
    right: 0.12em;
    bottom: -0.12em;
    z-index: -1;
    color: rgba(255, 255, 255, 0.055);
    font-family: "KbtNoto", "Noto Sans KR", sans-serif;
    font-size: 260px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.kbt-guide-kick {
    margin: 0;
    color: var(--guide-wine-soft);
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.kbt-guide-word {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--guide-wine-text);
    font-size: 13.5px;
}

.kbt-guide-word b {
    padding: 0 9px;
    border-radius: 6px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-family: "KbtNoto", "Noto Sans KR", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
}

.kbt-guide-panel h1 {
    max-width: 680px;
    margin: 0;
    color: #fff;
    font-size: clamp(46px, 4.6vw, 66px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.kbt-guide-panel h1.is-long {
    font-size: clamp(38px, 4vw, 58px);
    overflow-wrap: anywhere;
}

.kbt-guide-lead {
    max-width: 30em;
    margin: 0;
    color: var(--guide-wine-text);
    font-size: 17px;
    line-height: 1.55;
}

.kbt-guide-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 4px;
}

.kbt-guide a.kbt-guide-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 24px;
    border-radius: 5px;
    color: var(--guide-wine);
    background: #fbefe6;
    font-size: 16px;
    font-weight: 700;
    transition: transform 150ms ease;
}

.kbt-guide a.kbt-guide-primary:hover,
.kbt-guide a.kbt-guide-primary:focus-visible {
    color: var(--guide-wine);
    transform: translateY(-1px);
}

.kbt-guide-alt {
    padding-bottom: 1px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.55);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.kbt-guide-alt:hover,
.kbt-guide-alt:focus-visible {
    color: #fff;
    border-bottom-color: #fff;
}

.kbt-guide-grid {
    display: grid;
    gap: 1px;
    min-width: 0;
    min-height: 0;
    background: var(--guide-line);
}

.kbt-guide-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr;
}

.kbt-guide-grid-one {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
}

.kbt-guide-span {
    grid-column: 1 / -1;
}

.kbt-guide-rail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 32px;
    color: var(--guide-muted);
    background: #fff;
    font-size: 14px;
}

.kbt-guide-rail p {
    margin: 0;
}

.kbt-guide-rail a {
    color: var(--guide-wine);
    font-weight: 700;
}

.kbt-guide-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
    padding: 28px 32px;
    color: var(--guide-ink);
    background: var(--guide-cream);
}

.kbt-guide-cell.is-hot,
a.kbt-guide-cell:hover,
a.kbt-guide-cell:focus-visible {
    color: var(--guide-ink);
    background: #fff;
}

.kbt-guide-label {
    margin: 0;
    color: var(--guide-wine) !important;
    font-size: 13px !important;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.kbt-guide-cell h2 {
    margin: 0;
    color: var(--guide-ink);
    font-size: clamp(27px, 2.4vw, 34px);
    font-weight: 760;
    line-height: 1.04;
    letter-spacing: -0.025em;
}

.kbt-guide-cell > p,
.kbt-guide-cell li {
    color: var(--guide-muted);
    font-size: 15px;
}

.kbt-guide-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: guide-step;
}

.kbt-guide-steps li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    color: var(--guide-ink);
    counter-increment: guide-step;
}

.kbt-guide-steps li::before {
    content: counter(guide-step);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--guide-line-strong);
    border-radius: 50%;
    color: var(--guide-wine);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
}

.kbt-guide-go {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--guide-line-strong);
    color: var(--guide-ink);
    font-size: 15px;
    font-weight: 700;
}

.kbt-guide-go i {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    background: var(--guide-wine);
    font-style: normal;
    transition: transform 150ms ease;
}

.kbt-guide-go:hover i,
a.kbt-guide-cell:hover .kbt-guide-go i {
    transform: translateX(3px);
}

.kbt-guide-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kbt-guide-chips a {
    padding: 6px 14px;
    border: 1px solid var(--guide-line-strong);
    border-radius: 999px;
    color: var(--guide-ink);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
}

.kbt-guide-chips a:hover,
.kbt-guide-chips a:focus-visible,
.kbt-guide-chips a.is-on {
    border-color: var(--guide-wine);
    color: var(--guide-wine);
}

.kbt-guide-chips a.is-on {
    background: #fbefee;
}

.kbt-guide-mini-list {
    display: grid;
}

.kbt-guide-mini-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--guide-line-strong);
    color: var(--guide-ink);
    font-size: 14px;
}

.kbt-guide-mini-list a:last-child {
    border-bottom: 0;
}

.kbt-guide-mini-list a > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kbt-guide-mini-list time {
    color: var(--guide-muted);
    font-size: 13px;
    white-space: nowrap;
}

.kbt-guide-empty {
    margin: 12px 0;
}

.kbt-guide-board-cell,
.kbt-guide-post-cell {
    gap: 16px;
}

.kbt-guide-board-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kbt-guide-board-tools h2 {
    font-size: 24px;
}

.kbt-guide-search {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--guide-line-strong);
    border-radius: 6px;
    background: #fff;
}

.kbt-guide-search input {
    width: 240px;
    min-width: 0;
    padding: 9px 14px;
    border: 0;
    outline: 0;
    color: var(--guide-ink);
    background: transparent;
}

.kbt-guide-search input:focus {
    box-shadow: inset 0 0 0 2px var(--guide-wine);
}

.kbt-guide-search button {
    padding: 0 16px;
    border: 0;
    color: #fff;
    background: var(--guide-ink);
    font-weight: 600;
    cursor: pointer;
}

.kbt-guide-board {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--guide-line-strong);
    border-radius: 8px;
    background: #fff;
}

.kbt-guide-board > a {
    display: grid;
    grid-template-columns: 44px auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--guide-line);
}

.kbt-guide-board > a:last-child {
    border-bottom: 0;
}

.kbt-guide-board > a:hover,
.kbt-guide-board > a:focus-visible {
    color: var(--guide-ink);
    background: #fdfaf8;
}

.kbt-guide-board .number {
    color: var(--guide-muted);
    font-size: 14px;
}

.kbt-guide-board .kind {
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--guide-wine);
    background: #fbefee;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.kbt-guide-board .title {
    overflow: hidden;
    color: var(--guide-ink);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kbt-guide-board .date {
    color: var(--guide-muted);
    font-size: 13px;
    white-space: nowrap;
}

.kbt-guide-board-empty {
    margin: 0;
    padding: 54px 20px;
    color: var(--guide-muted);
    text-align: center;
}

.kbt-guide-pager {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
}

.kbt-guide-pager a {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--guide-line-strong);
    border-radius: 6px;
    color: var(--guide-ink);
    background: #fff;
}

.kbt-guide-pager a.is-current {
    border-color: var(--guide-wine);
    color: #fff;
    background: var(--guide-wine);
    font-weight: 700;
}

.kbt-guide-post-head {
    display: grid;
    gap: 6px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--guide-line-strong);
}

.kbt-guide-post-head h2 {
    font-size: 28px;
    overflow-wrap: anywhere;
}

.kbt-guide-post-body {
    min-height: 300px;
    color: var(--guide-ink);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.kbt-guide-post-body:focus-visible {
    outline: 2px solid var(--guide-wine);
    outline-offset: 3px;
}

.kbt-guide-post-body img,
.kbt-guide-post-body video,
.kbt-guide-post-body iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

.kbt-guide-post-body video {
    width: min(100%, 720px);
}

.kbt-guide-post-body iframe {
    width: min(100%, 720px);
    aspect-ratio: 16 / 9;
}

.kbt-guide-attachments {
    padding: 18px 20px;
    border: 1px solid var(--guide-line-strong);
    border-radius: 8px;
    background: #fff;
}

.kbt-guide-attachments h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.kbt-guide-attachments ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kbt-guide-attachments a {
    color: var(--guide-wine);
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.kbt-guide-attachments small {
    color: var(--guide-muted);
}

.kbt-guide-post-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.kbt-guide-post-nav a {
    padding: 10px 14px;
    border: 1px solid var(--guide-line-strong);
    border-radius: 8px;
    color: var(--guide-ink);
    background: #fff;
    font-size: 14px;
}

.kbt-guide-post-nav a span {
    display: block;
    color: var(--guide-muted);
    font-size: 12px;
}

.kbt-english .kbt-guide,
.kbt-english .kbt-guide input,
.kbt-english .kbt-guide button {
    font-family: "Public Sans", Arial, sans-serif;
}

.kbt-english .kbt-guide-panel h1,
.kbt-english .kbt-guide-cell h2,
.kbt-english .kbt-guide-kick,
.kbt-english .kbt-guide-label {
    font-family: "Archivo", "Public Sans", Arial, sans-serif;
}

@media (max-width: 860px) {
    .kbt-guide-split {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .kbt-guide-panel {
        min-height: 520px;
        padding: 34px 20px;
        gap: 14px;
    }

    .kbt-guide-panel h1,
    .kbt-guide-panel h1.is-long {
        font-size: 42px;
    }

    .kbt-guide-lead {
        font-size: 16px;
    }

    .kbt-guide-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .kbt-guide-primary {
        justify-content: center;
        width: 100%;
    }

    .kbt-guide-alt {
        align-self: center;
    }

    .kbt-guide-grid-four,
    .kbt-guide-grid-one {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .kbt-guide-cell {
        padding: 22px 20px;
    }

    .kbt-guide-detail .kbt-guide-post-body {
        max-height: 60dvh;
        min-height: 280px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    .kbt-guide-rail {
        padding: 12px 20px;
    }

    .kbt-guide-board > a {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 4px 10px;
        padding: 14px;
    }

    .kbt-guide-board .number {
        display: none;
    }

    .kbt-guide-board .title {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .kbt-guide-board .date {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }
}

@media (min-width: 861px) {
    body:has(.kbt-guide-detail) {
        overflow: hidden;
    }

    .kbt-page-shell:has(.kbt-guide-detail) {
        height: 100dvh;
        min-height: 0;
    }

    .kbt-page-shell:has(.kbt-guide-detail) > main {
        min-height: 0;
        overflow: hidden;
    }

    .kbt-guide-detail {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .kbt-guide-detail .kbt-guide-split {
        height: 100%;
        min-height: 0;
    }

    .kbt-guide-detail .kbt-guide-grid-one,
    .kbt-guide-detail .kbt-guide-post-cell {
        min-height: 0;
    }

    .kbt-guide-detail .kbt-guide-post-body {
        flex: 1 1 auto;
        min-height: 0;
        padding-right: 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }
}

@media (max-width: 520px) {
    .kbt-guide-panel {
        min-height: 480px;
    }

    .kbt-guide-mark {
        font-size: 210px;
    }

    .kbt-guide-rail {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .kbt-guide-board-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .kbt-guide-search {
        width: 100%;
    }

    .kbt-guide-search input {
        flex: 1 1 auto;
        width: auto;
    }

    .kbt-guide-mini-list a {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .kbt-guide-post-head h2 {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kbt-guide-primary,
    .kbt-guide-go i {
        transition: none;
    }
}
