:root {
    --vp-bg: #f5f5fb;
    --vp-panel: #fff;
    --vp-line: #e1e1ee;
    --vp-accent: #6045cb;
    --vp-tint: #eee9ff;
    --vp-hero: #ece8ff;
    --vp-icon-red: #c71933;
    --vp-icon-green: #087d54;
    --vp-icon-blue: #245cc7;
    --vp-icon-amber: #8d520c;
    --vp-icon-teal: #087b81;
}

[data-bs-theme="dark"] {
    --vp-bg: #12131c;
    --vp-panel: #1b1c2a;
    --vp-line: #303147;
    --vp-accent: #bcaaff;
    --vp-tint: #30264d;
    --vp-hero: #27213e;
    --vp-icon-red: #ff5d70;
    --vp-icon-green: #52e7a5;
    --vp-icon-blue: #89b6ff;
    --vp-icon-amber: #ffc069;
    --vp-icon-teal: #67dedb;
}

body {
    min-height: 100vh;
    color: var(--bs-body-color);
    background: var(--vp-bg);
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

.vp-header {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .75rem clamp(.7rem, 3vw, 2rem);
    background: var(--vp-panel);
    border-bottom: 1px solid var(--vp-line);
}

.vp-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: 1.125rem;
    font-weight: 750;
    white-space: nowrap;
    color: var(--bs-body-color);
    text-decoration: none;
}
.vp-brand strong { color: var(--vp-accent); }
.vp-brand-mark {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: .65rem;
    background: var(--vp-tint);
    color: var(--vp-accent);
}

.vp-shell {
    display: grid;
    grid-template-columns: 218px minmax(0, 1fr);
    min-height: calc(100vh - 70px);
}

.vp-sidebar {
    padding: 1.25rem .85rem;
    border-right: 1px solid var(--vp-line);
    background: var(--vp-panel);
}

.vp-nav { display: flex; flex-direction: column; gap: .35rem; }
.vp-nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--bs-body-color);
    text-decoration: none;
    font-weight: 650;
    padding: .72rem .9rem;
    border-radius: .65rem;
    white-space: nowrap;
}
.vp-nav-link:hover, .vp-nav-link:focus-visible, .vp-nav-link[aria-current="page"] {
    color: var(--vp-accent);
    background: var(--vp-tint);
}
.vp-nav-link[aria-current="page"] { box-shadow: inset 3px 0 var(--vp-accent); }

.vp-icon {
    display: block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    fill: currentColor;
}
.vp-nav-link .vp-icon { font-size: 1.12em; color: var(--vp-accent); }
.vp-nav-link .vp-icon:has(use[href$="#broadcast"]),
.vp-profile .vp-icon:has(use:is([href$="#youtube"], [href$="#collection-play"])) {
    color: var(--vp-icon-red);
}
.vp-profile .vp-icon:has(use[href$="#box-arrow-up-right"]) { color: var(--vp-icon-green); }
.vp-profile .vp-icon:has(use[href$="#film"]) { color: var(--vp-icon-blue); }
.vp-profile .vp-icon:has(use[href$="#scissors"]) { color: var(--vp-accent); }
.vp-profile .vp-icon:has(use[href$="#graph-up"]) { color: var(--vp-icon-teal); }
.vp-theme-light-icon .vp-icon { color: var(--vp-icon-amber); }
.vp-theme-dark-icon .vp-icon { color: var(--vp-accent); }
.btn:is(.vp-primary, .vp-button):has(.vp-icon) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42em;
}
.vp-theme-dark-icon,
.vp-push-muted,
[data-bs-theme="light"] .vp-theme-light-icon,
[data-subscribed="true"] .vp-push-bell {
    display: none;
}
[data-bs-theme="light"] .vp-theme-dark-icon,
[data-subscribed="true"] .vp-push-muted {
    display: inline-flex;
}

.vp-content {
    width: 100%;
    max-width: 1420px;
    justify-self: center;
    padding: clamp(1.25rem, 4vw, 3.5rem);
}

.vp-page-heading { margin-bottom: 1.65rem; }
.vp-page-heading h1, .vp-hero h1 {
    font-size: clamp(1.8rem, 3vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -.045em;
    margin: 0 0 .55rem;
}
.vp-page-heading h1:has(> .vp-icon) {
    display: flex;
    align-items: center;
    gap: .38em;
    overflow-wrap: anywhere;
}
.vp-page-heading h1 > .vp-icon {
    font-size: .78em;
    color: var(--vp-accent);
}
.vp-page-heading h1 > .vp-icon:has(use[href$="#broadcast"]) { color: var(--vp-icon-red); }
.vp-page-heading p, .vp-hero p {
    color: var(--bs-secondary-color);
    margin: 0;
}
.vp-heading-actions { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

.vp-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: radial-gradient(ellipse at top right, var(--vp-tint), transparent 70%), var(--vp-hero);
    border: 1px solid var(--vp-line);
    border-radius: 1.3rem;
    padding: clamp(1.5rem, 5vw, 4rem);
}
.vp-hero p { margin-bottom: 1.5rem; }
.vp-hero-logo { width: min(30%, 230px); height: auto; }

.vp-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
.vp-card { background: var(--vp-panel); border: 1px solid var(--vp-line); border-radius: 1rem; }
.vp-profile { padding: 1.4rem; align-items: start; gap: 1.1rem; }
.vp-profile-heading {
    display: flex;
    align-items: center;
    gap: .9rem;
    width: 100%;
}
.vp-profile-heading > .vp-avatar { flex-shrink: 0; }
.vp-profile-details { min-width: 0; overflow-wrap: anywhere; }
.vp-profile-live .vp-profile-heading > .vp-avatar {
    outline: 2px solid var(--vp-icon-red);
    outline-offset: 3px;
}
.vp-profile-live-badge {
    background: #b51d35;
    color: #fff;
}
.vp-avatar { width: 76px; height: 76px; object-fit: cover; border-radius: 1.1rem; }
.vp-avatar-fallback { display: grid; place-items: center; background: var(--vp-tint); color: var(--vp-accent); font-size: 1.8rem; font-weight: 750; }
.vp-profile-link { margin-top: auto; }
.vp-thumbnail { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vp-form-area { max-width: 600px; }
.vp-table { --bs-table-bg: transparent; --bs-table-border-color: var(--vp-line); }
.vp-table :is(th, td) { padding: .8rem 1.1rem; white-space: nowrap; }
.vp-table tbody tr:last-child > * { border-bottom: 0; }

.vp-primary, .vp-button { border-radius: .6rem; font-weight: 650; }
.vp-primary { background: #694cd8; color: #fff; border: 1px solid #694cd8; }
.vp-primary:hover, .vp-primary:focus-visible { background: #5538c3; color: #fff; border-color: #5538c3; }
.vp-button { background: var(--vp-panel); border: 1px solid var(--vp-line); color: var(--bs-body-color); }
.vp-button:hover, .vp-button:focus-visible { background: var(--vp-tint); color: var(--vp-accent); border-color: var(--vp-accent); }
.validation-summary-valid, .field-validation-valid { display: none; }

@media (max-width: 767px) {
    .vp-shell { grid-template-columns: minmax(0, 1fr); }
    .vp-sidebar { border-right: 0; border-bottom: 1px solid var(--vp-line); padding: .45rem .65rem; }
    .vp-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .vp-nav-link {
        min-width: 0;
        min-height: 44px;
        gap: .45rem;
        padding: .5rem .6rem;
        font-size: .9rem;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .vp-header .btn,
    .vp-content .btn:is(.vp-primary, .vp-button) {
        min-height: 44px;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .vp-heading-actions > *,
    .vp-profile > * {
        min-width: 0;
        max-width: 100%;
    }
    .vp-hero-logo { display: none; }
}

@media (min-width: 480px) and (max-width: 767px) {
    .vp-nav:has(> :nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.vp-content:has(> .vp-live-board) {
    padding-block: clamp(.75rem, 2dvh, 1.5rem);
}

.vp-live-board {
    max-width: 1140px;
    margin-inline: auto;
}

.vp-live-board .vp-page-heading {
    margin-bottom: .75rem;
}

.vp-live-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.vp-live-toolbar:not([hidden]),
.vp-live-slide-controls:not([hidden]) {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.vp-live-toolbar {
    justify-content: space-between;
    margin-bottom: .75rem;
}
.vp-live-toolbar [aria-pressed="true"] {
    background: var(--vp-tint);
    border-color: var(--vp-accent);
    color: var(--vp-accent);
}

.vp-live-board[data-live-layout="slide"] .vp-live-grid {
    --vp-slide-width: 66%;
    --vp-slide-shift: 24%;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    isolation: isolate;
}
.vp-live-board[data-live-layout="slide"] [data-live-slide-position] {
    grid-area: 1 / 1;
    width: var(--vp-slide-width);
    min-width: 0;
}
.vp-live-board[data-live-layout="slide"] [data-live-slide-position="current"] {
    z-index: 1;
    box-shadow: 0 .65rem 2rem #11121b30;
}
.vp-live-board[data-live-layout="slide"] [data-live-slide-position="previous"],
.vp-live-board[data-live-layout="slide"] [data-live-slide-position="next"] {
    opacity: .65;
}
.vp-live-board[data-live-layout="slide"] [data-live-slide-position="previous"] {
    transform: translateX(calc(-1 * var(--vp-slide-shift))) scale(.92);
}
.vp-live-board[data-live-layout="slide"] [data-live-slide-position="next"] {
    transform: translateX(var(--vp-slide-shift)) scale(.92);
}
.vp-live-board[data-live-layout="slide"] [data-live-slide-position="hidden"] { display: none; }

.vp-live-board .vp-page-heading h1 {
    font-size: clamp(1.6rem, 2.5vw, 2.1rem);
    margin-bottom: .25rem;
}

.vp-live-grid .card-body {
    padding: .65rem .85rem;
    line-height: 1.35;
}

.vp-live-grid .card-body h2 {
    font-size: 1.05rem;
    margin-bottom: .35rem;
}

.vp-live-media {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    height: clamp(120px, 22dvh, 290px);
    background: var(--vp-hero);
}

.vp-live-media .vp-thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vp-live-badge {
    position: absolute;
    top: .8rem;
    left: .8rem;
}

@media (max-width: 767px) {
    .vp-live-grid { grid-template-columns: minmax(0, 1fr); }
    .vp-live-board[data-live-layout="slide"] .vp-live-grid {
        --vp-slide-width: 86%;
        --vp-slide-shift: 9%;
    }
    .vp-live-media { height: clamp(115px, 33vw, 180px); }
}

.vp-live-grid .card-body .vp-live-card-title {
    font-size: clamp(1.1rem, 1.55vw, 1.35rem);
    font-weight: 750;
    overflow-wrap: anywhere;
}

.vp-live-details,
.vp-live-metrics,
.vp-live-channel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .6rem;
}

.vp-live-details {
    font-size: .85rem;
}

.vp-live-details .vp-live-tags {
    min-width: 0;
    max-width: 100%;
}

.vp-live-metrics {
    font-variant-numeric: tabular-nums;
}

.vp-live-metrics > * {
    white-space: nowrap;
}

.vp-live-channel {
    margin-block: .55rem .65rem;
}

.vp-live-channel .vp-avatar {
    width: 42px;
    height: 42px;
    border: 2px solid var(--vp-accent);
    border-radius: 50%;
    font-size: 1rem;
}

.vp-live-tags {
    display: flex;
    gap: .3rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.vp-live-tags .badge,
.vp-video-tags .badge {
    flex: 0 0 auto;
    color: var(--vp-accent);
    background: var(--vp-tint);
    font-weight: 600;
}

.vp-video-tags .badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (min-width: 768px) and (max-height: 720px) {
    .vp-live-media { height: clamp(104px, 17dvh, 126px); }
}

.vp-follower-chart {
    display: block;
    width: 100%;
    height: clamp(190px, 35vw, 320px);
    color: var(--bs-secondary-color);
}

.vp-live-category {
    color: var(--vp-accent);
    background: var(--vp-tint);
}

.vp-public-chat-log {
    min-height: 9rem;
    max-height: min(60vh, 34rem);
    overflow-y: auto;
    border-top: 1px solid var(--vp-line);
}

.vp-public-chat-log li {
    padding: .6rem 0;
    border-bottom: 1px solid var(--vp-line);
    overflow-wrap: anywhere;
    display: flex;
    align-items: baseline;
    gap: .65rem;
}

.vp-chat-time {
    flex: 0 0 auto;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
}

.vp-chat-emote {
    width: 1.6em;
    height: 1.6em;
    object-fit: contain;
    vertical-align: middle;
}

.vp-video-layout {
    container-type: inline-size;
}

.vp-video-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

@container (min-width: 350px) {
    .vp-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (min-width: 550px) {
    .vp-video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container (min-width: 750px) {
    .vp-video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@container (min-width: 1080px) {
    .vp-video-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.vp-video-heading {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-width: 0;
}

.vp-video-heading .vp-avatar {
    flex: 0 0 auto;
    width: clamp(44px, 5vw, 64px);
    height: clamp(44px, 5vw, 64px);
    border-radius: 50%;
}

.vp-video-heading h1 {
    overflow-wrap: anywhere;
}

.vp-video-link {
    color: var(--bs-body-color);
}

.vp-video-link:is(:hover, :focus-visible) {
    color: var(--vp-accent);
}
