html, body {
    padding: 0;
    margin: 0;
    border: 0;
}

body {
    padding-top: 51px;
    background-color: #EDF1F7;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #46596a;
    box-sizing: border-box;
}

.studio-footer {
    display: block;
    width: 100%;
    height: 164px;
    border: 0;
    flex-shrink: 0;
}

.studio-page {
    width: 1098px;
    max-width: calc(100% - 32px);
    margin: 0 auto;
    padding: 28px 0 56px;
}

.studio-hero {
    flex-shrink: 0;
    margin-bottom: 16px;
}

.studio-title {
    margin: 0;
    padding-bottom: 9px;
    border-bottom: 5px solid #2b2b2b;
    display: inline-block;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.1;
    color: #2b2b2b;
}

.studio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: stretch;
}

.studio-primary {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.player-card,
.meta-card,
.playlist-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.player-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.player-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #1a1a1a;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.player-frame video,
.player-empty {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-frame video {
    display: block;
    background: #000;
    object-fit: contain;
}

.player-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9dafbe;
    font-size: 14px;
    background: #2b2b2b;
}

.player-empty[hidden] {
    display: none;
}

.meta-card {
    margin-top: 16px;
    padding: 18px 20px 20px;
    flex-shrink: 0;
}

.meta-title {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.35;
    color: #46596a;
}

.meta-desc {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: #627c94;
}

.meta-desc:empty {
    display: none;
}

.meta-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.meta-links:empty {
    display: none;
    margin-top: 0;
}

.ext-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border-radius: 17px;
    background: #f7f8f8;
    color: #46596a;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: box-shadow 0.2s, transform 0.1s;
}

.ext-btn img {
    width: 18px;
    height: 18px;
    display: block;
}

.ext-btn:hover {
    box-shadow: 0 6px 12px rgba(0, 46, 92, 0.2);
    color: #46596a;
}

.playlist-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playlist-head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid #edf1f7;
    font-size: 13px;
    font-weight: bold;
    color: #46596a;
    flex-shrink: 0;
}

.playlist-series {
    padding: 10px 16px 6px;
    font-size: 12px;
    color: #9dafbe;
    letter-spacing: 0.02em;
}

.playlist-list {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px 8px 10px;
    flex: 1;
    min-height: 0;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.playlist-item:hover {
    background: #f4f7fb;
}

.playlist-item.is-active {
    background: #eef6fa;
    box-shadow: inset 3px 0 0 #01fdfe;
}

.playlist-index {
    width: 22px;
    flex-shrink: 0;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #9dafbe;
}

.playlist-item.is-active .playlist-index {
    color: #46596a;
}

.playlist-thumb {
    width: 112px;
    height: 63px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    background: #d8dee6;
    background-size: cover;
    background-position: center;
}

.playlist-info {
    min-width: 0;
    flex: 1;
}

.playlist-title {
    font-size: 13px;
    font-weight: bold;
    line-height: 1.4;
    color: #46596a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.playlist-duration {
    margin-top: 4px;
    font-size: 12px;
    color: #9dafbe;
}

@media (min-width: 961px) {
    html, body {
        height: 100%;
    }

    body {
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .studio-page {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        padding: 20px 0 16px;
        overflow: hidden;
    }

    .studio-layout {
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }

    .studio-primary {
        overflow: hidden;
    }

    .player-card {
        flex: 1;
    }

    .player-frame {
        flex: 1;
        padding-top: 0;
        min-height: 0;
        height: auto;
    }
}

@media (min-width: 1345px) {
    .studio-page {
        width: 1345px;
    }

    .studio-layout {
        grid-template-columns: minmax(0, 1fr) 380px;
    }
}

@media (max-width: 960px) {
    body {
        overflow: auto;
    }

    .studio-layout {
        grid-template-columns: 1fr;
    }

    .playlist-card {
        overflow: visible;
    }

    .playlist-list {
        overflow: visible;
        flex: none;
    }
}

@media (max-width: 449px) {
    .studio-title {
        font-size: 24px;
    }

    .playlist-thumb {
        width: 96px;
        height: 54px;
    }
}
