.theater-body {
    min-height: 100vh;
}

.theater-descr.subtle,
.theater-sidebar-hint.subtle,
.subtle {
    color: var(--muted);
}

.theater-header {
    align-items: flex-start;
}

.theater-tagline {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 42rem;
}

.theater-nav {
    margin-left: auto;
}

.theater-layout {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.75rem);
    padding: clamp(1rem, 2.5vw, 1.75rem) clamp(1rem, 3vw, 2rem);
    max-width: 1680px;
    margin: 0 auto;
    align-items: start;
}

.theater-layout > * {
    width: 100%;
}

.theater-bottom-layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
    gap: clamp(1rem, 2vw, 1.75rem);
    align-items: start;
    width: 100%;
}

@media (max-width: 980px) {
    .theater-bottom-layout {
        grid-template-columns: 1fr;
    }

    .theater-sidebar {
        order: 0;
    }

    .theater-playlist {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.6rem;
        max-height: none;
    }
}

.theater-main-col {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.5rem);
    min-width: 0;
}

.theater-player-card.panel {
    margin: 0;
    width: 100%;
}

.theater-player-host {
    position: relative;
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 9;
    background: #0b0e14;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.theater-player-host iframe,
.theater-player-host video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #000;
}

.theater-player-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--muted);
    font-size: 0.95rem;
    padding: 1rem;
    text-align: center;
}

.theater-now-meta {
    margin-top: 1rem;
}

.theater-player-card.panel {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.35rem);
}

.theater-queue {
    margin: 0;
    padding: clamp(0.85rem, 2vw, 1.25rem) 0 0;
    border-top: 1px solid var(--border);
}

.theater-queue-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 600;
}

.theater-queue-count {
    font-weight: 500;
    color: var(--muted);
}

.theater-queue-hint {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
}

.theater-queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.75rem;
}

.theater-queue-grid .theater-track {
    flex-direction: column;
    align-items: stretch;
}

.theater-queue-grid .theater-track-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    flex: none;
    height: auto;
    min-height: 84px;
}

.theater-queue-grid .theater-track-body {
    padding-top: 0.35rem;
}

.theater-title {
    font-size: 1.25rem;
    margin: 0 0 0.35rem;
    font-weight: 600;
}

.theater-descr {
    margin: 0;
    white-space: pre-wrap;
}

.theater-owner-line {
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
}

.theater-owner-line code {
    background: rgba(79, 140, 255, 0.12);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.theater-sidebar.panel {
    margin: 0;
    padding: clamp(1rem, 2vw, 1.35rem);
    position: sticky;
    top: 0.75rem;
    align-self: start;
}

@media (max-width: 980px) {
    .theater-sidebar.panel {
        position: static;
    }
}

.theater-sidebar-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.theater-sidebar-hint {
    margin: 0 0 1rem;
}

.theater-playlist {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: min(78vh, 920px);
    overflow-y: auto;
    padding-right: 4px;
    margin-right: -4px;
}

.theater-track {
    display: flex;
    gap: 0.65rem;
    align-items: stretch;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    text-align: left;
    color: inherit;
    text-decoration: none;
    font: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.theater-track:hover {
    border-color: var(--border);
    background: rgba(79, 140, 255, 0.06);
    text-decoration: none;
}

.theater-track.active {
    border-color: var(--accent);
    background: rgba(79, 140, 255, 0.1);
}

.theater-track-thumb {
    flex: 0 0 120px;
    width: 120px;
    height: 68px;
    border-radius: 6px;
    background: #252b38 center/cover no-repeat;
    flex-shrink: 0;
}

.theater-track-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--muted);
    text-align: center;
    padding: 0.2rem;
}

.theater-track-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.theater-track-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.theater-track-meta {
    font-size: 0.72rem;
    color: var(--muted);
}

.theater-section-title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

.theater-engagement.panel {
    margin: 0;
}

.engage-block-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.engage-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.engage-btn-row .engage-vote.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(79, 140, 255, 0.12);
}

.engage-vote-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    margin-left: 0.35rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.78em;
    font-weight: 600;
    line-height: 1.35;
}

.engage-votes-block {
    margin-bottom: 1.25rem;
}

.engage-share-block {
    margin-bottom: 1.25rem;
}

.engage-share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.engage-share-row a.btn {
    text-decoration: none;
}

.engage-share-row .share-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.35rem;
}

.share-logo-img {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.share-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 700;
}

.share-logo-native {
    background: rgba(79, 140, 255, 0.15);
    color: var(--accent);
}

.share-logo-copy {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.engage-comments-block {
    padding-top: 0.25rem;
}

.engage-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.engage-comment-form textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    padding: 0.6rem 0.75rem;
    font: inherit;
    resize: vertical;
    min-height: 5rem;
}

.engage-comment-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.engage-comment {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    background: rgba(0, 0, 0, 0.15);
}

.engage-comment-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.engage-comment-author {
    font-weight: 600;
    color: var(--text);
}

.engage-comment-body {
    font-size: 0.9rem;
    white-space: pre-wrap;
    margin-bottom: 0.5rem;
}

.engage-comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.engage-comment-actions .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.45rem;
}

.engage-comment-actions .btn.is-active {
    border-color: var(--accent);
    color: var(--accent);
}

.engage-auth-modal[hidden] {
    display: none;
}

.engage-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.engage-auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.72);
    backdrop-filter: blur(3px);
}

.engage-auth-window {
    position: relative;
    width: min(94vw, 520px);
    max-height: min(88vh, 720px);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.engage-auth-window h3 {
    margin: 0;
    font-size: 1.05rem;
}

.engage-auth-window p {
    margin: 0;
}

.engage-auth-close {
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.engage-auth-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.engage-auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.engage-auth-frame {
    width: 100%;
    min-height: 380px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.medias-auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.medias-auth-modal.is-open {
    display: flex;
}

.medias-auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    cursor: pointer;
}

.medias-auth-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: min(90vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.medias-auth-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #edf2f7;
}

.medias-auth-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a365d;
}

.medias-auth-modal-close {
    border: none;
    background: #f1f5f9;
    color: #475569;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.medias-auth-tabs {
    display: flex;
    padding: 0 18px;
    border-bottom: 1px solid #edf2f7;
}

.medias-auth-tabs button {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.medias-auth-tabs button.is-active {
    color: #1a365d;
    border-bottom-color: #2c5282;
}

.medias-auth-modal-body {
    padding: 16px 18px 20px;
}

.medias-auth-pane label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.medias-auth-pane input[type="text"],
.medias-auth-pane input[type="email"],
.medias-auth-pane input[type="tel"],
.medias-auth-pane input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.medias-auth-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.medias-auth-btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #2c5282;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
}

.medias-auth-btn-success {
    background: #276749;
}

.medias-auth-notif {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.medias-auth-notif--info {
    background: #ebf8ff;
    color: #2c5282;
}

.medias-auth-notif--ok {
    background: #c6f6d5;
    color: #22543d;
}

.medias-auth-notif--err {
    background: #fed7d7;
    color: #822727;
}

.medias-auth-notif--warn {
    background: #feebc8;
    color: #744210;
}

.medias-auth-forgot {
    display: block;
    margin-top: 8px;
    font-size: 13px;
}

.medias-auth-google p {
    font-size: 13px;
    color: #64748b;
}

.medias-auth-google a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.medias-auth-google-featured {
    margin-bottom: 14px;
}

.medias-auth-google-featured a {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.medias-auth-google-featured a:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.medias-auth-link-button {
    display: block;
    margin: 10px auto 0;
    border: 0;
    background: transparent;
    color: #2c5282;
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
}

.medias-auth-field-hint {
    display: block;
    min-height: 1rem;
    margin-top: -8px;
    margin-bottom: 8px;
    color: #822727;
    font-size: 12px;
}
