:root {
    --bg: #1c1e20;
    --panel: #202326;
    --raised: #292d31;
    --border: #41464c;
    --text: #f4f5f6;
    --muted: #b1b6bd;
    --red: #db203a;
    --red-dark: #a81027;
    --gap: 12px;
    --chat-height: 48 dvh
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 Arial, Helvetica, sans-serif;
    border-top: 3px solid var(--red)
}

button, input, select {
    font: inherit
}

button, a, input, select {
    touch-action: manipulation
}

button {
    color: inherit
}

.btn {
    font-size: .875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    white-space: normal;
    border-radius: 5px
}

.btn:hover {
    color: #fff
}

.btn:disabled {
    opacity: .4;
    cursor: not-allowed
}

.btn:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid #f8d66d !important;
    outline-offset: 3px;
    box-shadow: none !important
}

.btn-accent {
    background: var(--red-dark);
    border: 1px solid #e02741;
    color: #fff
}

.btn-accent:hover {
    background: #c51631
}

.btn-tool {
    background: #25282b;
    border: 1px solid var(--border);
    color: var(--text)
}

.btn-tool:hover {
    background: #353a40
}

.btn-link {
    color: #ff8291;
    padding: 4px 8px;
    text-decoration: none
}

.btn-link:hover {
    color: #ffb5be;
    text-decoration: underline
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
    flex-shrink: 0;
    color: var(--text)
}

.btn-icon:hover {
    background: #ffffff15
}

.icon {
    width: 19px;
    height: 19px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round
}

.app-shell {
    padding: 0 18px;
    max-width: 2000px;
    margin: auto
}

.app-header {
    min-height: 58px;
    gap: 16px;
    padding: 10px 0
}

.heading h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -.035em;
    display: flex;
    align-items: center;
    gap: 12px
}

.heading p {
    font-size: .875rem;
    color: var(--muted);
    margin: 3px 0 0
}

.demo-chip {
    font-size: .625rem;
    letter-spacing: .1em;
    font-weight: 600;
    border: 1px solid #636b73;
    border-radius: 3px;
    padding: 3px 5px;
    color: #c1c7ce
}

.header-actions {
    gap: 8px
}

.matches-panel {
    background: linear-gradient(120deg, #24272a, #1e2123);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0 12px 12px
}

.panel-heading {
    padding: 10px 2px 0;
    gap: 8px
}

.panel-heading h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .035em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fa4055;
    border-radius: 50%;
    flex-shrink: 0
}

.heading-inline {
    gap: 20px
}

.selection-counter {
    color: var(--muted);
    font-size: .8125rem;
    white-space: nowrap
}

.selection-counter b {
    font-weight: 400;
    color: var(--text)
}

.selection-hint {
    font-size: .75rem;
    color: var(--muted);
    margin: 2px 2px 10px
}

.selection-actions {
    display: flex;
    align-items: center;
    gap: 8px
}

.mobile-done {
    display: none
}

.league-grid {
    margin: 0 -5px
}

.league-column {
    padding: 0 5px
}

.league {
    background: #1a1d1f;
    border: 1px solid #3c4147;
    border-radius: 5px;
    overflow: hidden
}

.league-heading {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #3b4045;
    background: #2b2f33;
    min-height: 52px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: left;
    color: var(--text)
}

.league-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 5px;
    padding: 3px;
    flex-shrink: 0
}

.league-name {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1
}

.league-meta {
    display: block;
    font-size: .75rem;
    color: #c0c5cc;
    font-weight: 400;
    margin-top: 2px
}

.league-chevron {
    width: 15px;
    height: 15px;
    transition: transform .15s
}

.league-heading[aria-expanded=false] .league-chevron {
    transform: rotate(-90deg)
}

.league-selected {
    font-size: .6875rem;
    min-width: 19px;
    line-height: 19px;
    border-radius: 4px;
    background: #9c1830;
    color: #fff;
    text-align: center
}

.league-selected:empty {
    display: none
}

.match-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    border: 0;
    border-bottom: 1px solid #353a40;
    background: none;
    color: #edf0f3;
    padding: 10px;
    min-height: 48px;
    text-align: left;
    font-size: .8125rem
}

.match-button:last-child {
    border-bottom: 0
}

.match-button:hover {
    background: #353a40
}

.match-button[aria-pressed=true] {
    background: linear-gradient(90deg, #601b28, #3c2228);
    box-shadow: inset 3px 0 #ff3b53
}

.match-name {
    flex: 1;
    min-width: 0;
    line-height: 1.4
}

.match-status {
    font-size: .6875rem;
    color: #bec3c9;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px
}

.match-status .live-dot {
    width: 5px;
    height: 5px
}

.match-button .selection-mark {
    width: 18px;
    height: 18px
}

.workspace-toolbar {
    min-height: 57px;
    gap: 12px
}

.toolbar-left {
    gap: 16px;
    min-width: 0
}

.stream-count {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .8125rem;
    color: #d1d5da;
    white-space: nowrap
}

.stream-count b {
    font-weight: 400
}

.layout-switch {
    border: 1px solid #41464c;
    border-radius: 5px;
    overflow: hidden
}

.layout-switch .btn {
    min-width: 100px;
    min-height: 36px;
    background: #25292c;
    color: #cbd0d6;
    border: 0;
    border-radius: 0
}

.layout-switch .btn[aria-pressed=true] {
    background: var(--red-dark);
    color: white
}

.audio-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    background: #282c30;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0 6px 0 10px;
    max-width: 260px
}

.audio-selector .custom-select {
    color: #eee;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    min-height: 36px;
    max-width: 220px;
    font-size: .8125rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d1d5db' stroke-width='1.5'/%3E%3C/svg%3E")
}

.custom-select option {
    background: #282c30;
    color: #fff
}

.viewing-area {
    display: grid;
    grid-template-columns:minmax(0, 1fr) 300px;
    gap: var(--gap);
    align-items: start
}

.viewing-area.chat-hidden {
    grid-template-columns:minmax(0, 1fr)
}

.player-region {
    min-width: 0
}

.players {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: var(--gap)
}

.players[data-count="1"] {
    grid-template-columns:1fr
}

.players[data-count="1"] .player {
    max-width: 1280px;
    width: 100%;
    justify-self: center
}

.players[data-count="3"][data-layout=grid] .player:last-child {
    grid-column: 1/-1;
    width: calc(50% - 6px);
    justify-self: center
}

.player {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #4c5157;
    border-radius: 6px;
    background: #0e1011;
    box-shadow: 0 1px 1px #0006
}

.player.is-audio {
    border-color: #fa304b;
    box-shadow: 0 0 0 1px #fa304b
}

.player-heading {
    display: flex;
    align-items: center;
    padding: 0 4px 0 10px;
    gap: 6px;
    min-height: 42px;
    background: linear-gradient(110deg, #33373c, #292d32)
}

.player-heading h3 {
    font-size: .8125rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.player-heading .icon {
    width: 16px;
    height: 16px
}

.player-heading .btn-icon {
    width: 34px;
    height: 36px;
    min-height: 36px;
    padding: 8px
}

.source-select {
    width: 90px;
    font-size: .6875rem;
    background-color: #22262b;
    color: #d9dde1;
    border-color: #4b5158;
    min-height: 30px;
    padding: 2px 20px 2px 7px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d1d5db' stroke-width='1.5'/%3E%3C/svg%3E")
}

.audio-badge {
    background: #bd1931;
    border-radius: 3px;
    color: #fff;
    padding: 3px 5px;
    font-size: .625rem;
    white-space: nowrap;
    display: none
}

.is-audio .audio-badge {
    display: inline-block
}

.video-stage {
    position: relative;
    aspect-ratio: 16/9;
    background: #111518;
    overflow: hidden
}

.poster {
    position: absolute;
    inset: 0;
    background-image: url('assets/soccer-previews.png');
    background-size: 200% 200%;
    background-repeat: no-repeat
}

.poster-0 {
    background-position: 0 0
}

.poster-1 {
    background-position: 100% 0
}

.poster-2 {
    background-position: 0 100%
}

.poster-3 {
    background-position: 100% 100%
}

.video-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #090b0c
}

.preview-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: .625rem;
    letter-spacing: .08em;
    background: #101416bd;
    border: 1px solid #ffffff33;
    border-radius: 3px;
    padding: 3px 6px;
    color: #e0e4e9;
    pointer-events: none
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 46px;
    padding: 8px 8px 3px;
    display: flex;
    align-items: center;
    gap: 2px;
    background: linear-gradient(transparent, #071109e6);
    color: white
}

.player-controls .btn-icon {
    width: 36px;
    min-height: 36px;
    height: 36px
}

.player-controls .icon {
    width: 18px;
    height: 18px
}

.player-status {
    font-size: .6875rem;
    margin-left: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e9ecef;
    flex: 1
}

.player-status .live-dot {
    width: 6px;
    height: 6px
}

.focus-player {
    font-size: .6875rem;
    padding: 4px 8px;
    min-height: 32px;
    background: #121618b0;
    border: 1px solid #ffffff4d;
    color: #fff
}

.focus-player:hover {
    background: #a81027
}

.players[data-layout=focus] {
    grid-template-columns:repeat(3, minmax(0, 1fr))
}

.players[data-layout=focus] .player.is-main {
    grid-column: 1/-1;
    order: -1
}

.players[data-layout=focus] .player:not(.is-main) .source-select, .players[data-layout=focus] .player:not(.is-main) .audio-badge, .players[data-layout=focus] .player:not(.is-main) .player-controls {
    display: none
}

.players[data-layout=focus] .player:not(.is-main) .player-heading {
    padding: 5px 6px;
    min-height: 36px
}

.players[data-layout=focus] .player:not(.is-main) h3 {
    font-size: .75rem
}

.players[data-layout=focus] .player:not(.is-main) .player-heading > .icon {
    display: none
}

.focus-overlay {
    display: none
}

.players[data-layout=focus] .player:not(.is-main) .focus-overlay {
    display: flex;
    position: absolute;
    inset: 0;
    border: 0;
    background: #0001;
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

.focus-overlay .icon {
    background: #141619bc;
    padding: 7px;
    width: 36px;
    height: 36px;
    border-radius: 50%
}

.focus-overlay:hover {
    background: #0004 !important
}

.focus-hint {
    margin: -2px 0 10px;
    font-size: .75rem;
    color: #bfc4cb
}

.empty-state {
    min-height: 400px;
    border: 1px dashed #596069;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    background: radial-gradient(ellipse at 50% 40%, #30232a, #1c2023 65%)
}

.empty-state h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.025em
}

.empty-state p {
    font-size: .875rem;
    line-height: 1.8;
    color: var(--muted)
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    color: #f33e54;
    background: #b3213526;
    border: 1px solid #6f2936;
    border-radius: 16px;
    margin-bottom: 24px
}

.empty-icon .icon {
    width: 30px;
    height: 30px
}

.chat-panel {
    background: #171a1d;
    border: 1px solid #454b51;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    min-height: 440px;
    height: var(--desktop-chat-height, 550px);
    overflow: hidden
}

.chat-heading {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 7px 8px 7px 14px;
    border-bottom: 1px solid #373d43;
    min-height: 52px
}

.chat-heading h2 {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
    white-space: nowrap
}

.chat-room {
    font-size: .6875rem;
    color: #b2bac3;
    flex: 1
}

.chat-heading .btn-icon {
    width: 32px;
    height: 34px;
    min-height: 34px
}

.chat-messages {
    overflow: auto;
    overscroll-behavior: contain;
    flex: 1;
    min-height: 0;
    padding: 10px 12px;
    scrollbar-width: thin;
    scrollbar-color: #4a5159 transparent
}

.chat-message {
    display: grid;
    grid-template-columns:26px minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 15px;
    align-items: start
}

.avatar {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: .6875rem;
    color: #fff
}

.message-body {
    min-width: 0;
    font-size: .8125rem;
    line-height: 1.55;
    overflow-wrap: anywhere
}

.message-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 2px
}

.message-meta b {
    font-size: .75rem;
    color: #d9dee5;
    font-weight: 600
}

.message-meta time {
    font-size: .625rem;
    color: #aeb5bd;
    white-space: nowrap
}

.message-body p {
    margin: 0;
    color: #e0e4e9
}

.chat-form {
    padding: 10px 10px 2px;
    border-top: 1px solid #343b42;
    display: flex;
    gap: 7px
}

.chat-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #454d55;
    border-radius: 22px;
    flex: 1;
    min-width: 0;
    background: #22272c
}

.chat-input-wrap input {
    background: transparent;
    color: white;
    font-size: .8125rem;
    border: 0;
    min-width: 0;
    height: 40px;
    border-radius: 22px;
    padding: 8px 4px 8px 12px
}

.chat-input-wrap input::placeholder {
    color: #b6bec7
}

.chat-input-wrap .btn-icon {
    width: 30px;
    margin-right: 5px;
    padding: 4px
}

.send-button {
    border-radius: 50%;
    background: #c61732;
    color: white;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    padding: 8px
}

.chat-caption {
    font-size: .625rem;
    color: #aeb5bd;
    text-align: center;
    margin: 5px 0 8px
}

.page-note {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    font-size: .6875rem;
    color: #a7afb7
}

.sheet-handle, .mobile-dock {
    display: none
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: #0009;
    z-index: 40
}

.app-toast {
    position: fixed;
    z-index: 1100;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(600px, calc(100% - 24px));
    background: #30353c;
    border: 1px solid #69717d;
    border-radius: 8px;
    box-shadow: 0 8px 30px #0007;
    color: #fff;
    padding: 8px 10px 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .875rem
}

.app-toast .btn-link {
    flex-shrink: 0
}

.modal-content {
    background: #23272c;
    border: 1px solid #525963;
    color: white;
    border-radius: 10px
}

.modal-header, .modal-footer {
    border-color: #434a53
}

.modal-title {
    font-size: 1.2rem
}

.modal-body > p {
    font-size: .875rem;
    color: #c6cbd2
}

.replace-option {
    width: 100%;
    justify-content: space-between;
    background: #30363d;
    border: 1px solid #4f5863;
    color: #fff;
    margin-bottom: 8px;
    padding: 12px;
    text-align: left
}

.replace-option:hover {
    background: #701b2a
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 12px;
    background: white;
    color: black;
    padding: 12px;
    z-index: 2000
}

.skip-link:focus {
    top: 5px
}

[hidden] {
    display: none !important
}

.noscript-note {
    padding: 30px;
    background: #7d2131
}

.player:fullscreen {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: 0
}

.player:fullscreen .video-stage {
    flex: 1;
    aspect-ratio: auto
}

.player:fullscreen .poster {
    background-size: 200% 200%
}

.player:fullscreen .player-heading {
    flex-shrink: 0
}

.source-message {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #0b0e13e8;
    text-align: center;
    gap: 10px;
    font-size: .875rem
}

.source-message p {
    margin: 0;
    color: #cbd0d7
}

.source-message .btn {
    min-height: 36px
}

.theatre .heading p, .theatre .demo-chip, .theatre .page-note {
    display: none
}

.theatre .app-header {
    min-height: 58px
}

.theatre .app-shell {
    max-width: none;
    padding: 0 10px
}



@media (min-width: 1600px) {

    .match-button {
        font-size: .875rem
    }

    .player-heading h3 {
        font-size: .875rem
    }

    .chat-messages {
        padding: 12px 16px
    }

    .chat-message {
        margin-bottom: 18px
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .league-column {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 10px
    }

    .league-grid {
        margin-bottom: -10px
    }

    .match-button {
        padding: 8px 10px;
        min-height: 42px
    }

    .viewing-area {
        grid-template-columns:minmax(0, 1fr) 280px
    }

    .source-select {
        width: 78px
    }

    .audio-badge {
        display: none !important
    }
}

@media (max-width: 1199px) {
    .app-header {
        min-height: 72px
    }

    .viewing-area {
        grid-template-columns:1fr
    }

    .league-column {
        margin-bottom: 10px
    }

    .league-grid {
        margin-bottom: -10px
    }

    .league-name {
        font-size: .875rem
    }

    .chat-panel {
        position: fixed;
        right: 14px;
        bottom: 14px;
        width: 350px;
        max-height: calc(100dvh - 100px);
        height: 570px;
        z-index: 60;
        box-shadow: 0 20px 80px #0008
    }

    .chat-panel:focus {
        outline: none
    }

    .page-note {
        padding-bottom: 24px
    }

    .app-shell {
        padding: 0 14px
    }

    .players[data-layout=focus] .player.is-main .video-stage {
        max-height: 64 dvh
    }

    .player-heading h3 {
        font-size: .875rem
    }

    .player-heading {
        min-height: 44px
    }

    .player-heading .btn-icon {
        height: 40px;
        width: 40px
    }

    .source-select {
        min-height: 34px;
        font-size: .75rem
    }

    .match-button {
        min-height: 48px
    }

    .league-heading {
        min-height: 52px
    }

    .chat-room {
        font-size: .75rem
    }

    .chat-messages .message-body {
        font-size: .875rem
    }

    .chat-caption {
        font-size: .6875rem
    }

    .chat-input-wrap input {
        font-size: 16px
    }

    .btn {
        min-height: 44px
    }

    .layout-switch .btn {
        min-height: 40px
    }

    .audio-selector .custom-select {
        min-height: 40px
    }
}

@media (max-width: 767px) {
    body {
        --gap: 9px;
        padding-bottom: calc(67px + env(safe-area-inset-bottom))
    }

    .app-shell {
        padding: 0 10px
    }

    .app-header {
        min-height: 55px;
        padding: 10px 0;
        gap: 8px
    }

    .heading h1 {
        font-size: 1.35rem;
        gap: 7px
    }

    .heading p {
        display: none
    }

    .demo-chip {
        font-size: .5625rem;
        padding: 2px 4px
    }

    .header-actions {
        gap: 4px
    }

    .header-actions .action-label {
        display: none
    }

    .header-actions .btn {
        width: 40px;
        min-height: 40px;
        padding: 7px
    }

    .header-actions #chatToggle {
        display: none
    }

    .heading {
        min-width: 0
    }

    .header-actions .icon {
        width: 19px;
        height: 19px
    }

    .workspace-toolbar {
        min-height: 56px;
        gap: 6px
    }

    .stream-count {
        display: none
    }

    .toolbar-left {
        gap: 0
    }

    .layout-switch .btn {
        min-width: 74px;
        min-height: 42px;
        gap: 5px;
        font-size: .8125rem;
        padding: 5px 9px
    }

    .layout-switch .icon {
        width: 16px;
        height: 16px
    }

    .audio-selector {
        max-width: 170px;
        padding: 0 0 0 6px;
        gap: 0
    }

    .audio-selector > .icon {
        width: 16px;
        height: 16px
    }

    .audio-selector select.custom-select {
        max-width: 145px;
        min-height: 42px;
        padding-left: 5px;
        font-size: .75rem
    }

    .players {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }

    .player-heading {
        padding: 0 3px 0 7px;
        min-height: 40px;
        gap: 3px
    }

    .player-heading h3 {
        font-size: .75rem
    }

    .player-heading > .icon, .player-heading .audio-badge {
        display: none !important
    }

    .player-heading .btn-icon {
        width: 32px;
        height: 40px;
        padding: 8px
    }

    .player-heading .source-select {
        display: none
    }

    .player-controls {
        min-height: 40px;
        padding: 3px 2px 0;
        gap: 0
    }

    .player-controls .btn-icon {
        width: 34px;
        min-height: 38px;
        height: 38px;
        padding: 6px
    }

    .player-controls .icon {
        width: 17px;
        height: 17px
    }

    .player-status {
        display: none
    }

    .focus-player {
        padding: 4px;
        min-height: 36px;
        width: 32px;
        font-size: 0;
        border: 0;
        background: transparent
    }

    .focus-player .icon {
        width: 16px;
        height: 16px
    }

    .preview-badge {
        font-size: .5rem;
        padding: 2px 4px;
        left: 5px;
        top: 5px
    }

    .players[data-layout=focus] .player.is-main .player-heading h3, .players[data-count="1"] h3 {
        font-size: .875rem
    }

    .players[data-layout=focus] .player.is-main .source-select, .players[data-count="1"] .source-select {
        display: block;
        width: 85px;
        min-height: 34px
    }

    .players[data-layout=focus] .player.is-main .player-heading {
        padding-left: 9px;
        min-height: 44px
    }

    .players[data-layout=focus] .player.is-main .player-status, .players[data-count="1"] .player-status {
        display: flex;
        font-size: .6875rem
    }

    .players[data-layout=focus] .player.is-main .player-controls {
        padding: 7px 5px 2px
    }

    .players[data-layout=focus] .player.is-main .player-controls .btn-icon {
        width: 40px;
        height: 40px
    }

    .players[data-layout=focus] .player:not(.is-main) .player-heading {
        padding: 5px;
        min-height: 36px
    }

    .players[data-layout=focus] .player:not(.is-main) .player-heading h3 {
        font-size: .625rem;
        white-space: normal;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden
    }

    .players[data-layout=focus] .player:not(.is-main) .player-heading .btn-icon {
        display: none
    }

    .players[data-layout=focus] .player:not(.is-main) .preview-badge {
        display: none
    }

    .players[data-layout=focus] .player:not(.is-main) .focus-overlay .icon {
        height: 25px;
        width: 25px;
        padding: 4px
    }

    .focus-hint {
        font-size: .75rem;
        margin: 0 0 9px
    }

    .matches-panel {
        padding: 0 10px 10px;
        max-height: none
    }

    .panel-heading {
        padding-top: 8px
    }

    .heading-inline {
        gap: 9px
    }

    .panel-heading h2 {
        font-size: .875rem
    }

    .selection-counter {
        font-size: .75rem
    }

    .selection-actions .btn-link {
        font-size: .75rem
    }

    .selection-hint {
        font-size: .75rem;
        margin: 6px 0 12px
    }

    .league-column {
        padding: 0 5px
    }

    .league-grid {
        margin: 0 -5px -10px
    }

    .league-logo {
        width: 34px;
        height: 34px
    }

    .league-name {
        font-size: .875rem
    }

    .match-button {
        min-height: 52px;
        font-size: .875rem;
        padding: 10px 12px
    }

    .match-status {
        font-size: .75rem
    }

    .matches-panel.mobile-sheet {
        position: fixed;
        inset: auto 0 0;
        max-height: 83 dvh;
        z-index: 65;
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
        padding: 0 12px calc(20px + env(safe-area-inset-bottom));
        box-shadow: 0 -15px 70px #0008
    }

    .mobile-sheet .panel-heading {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #24272a;
        padding: 14px 0 8px
    }

    .mobile-sheet .mobile-done {
        display: inline-flex
    }

    .mobile-sheet .selection-actions .btn-link {
        display: none
    }

    .chat-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: var(--chat-height, 48 dvh);
        max-height: 80 dvh;
        min-height: 230px;
        border-radius: 16px 16px 0 0;
        z-index: 65;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -12px 60px #0009
    }

    .sheet-handle {
        display: block;
        width: 36px;
        height: 4px;
        border-radius: 4px;
        background: #858c95;
        margin: 9px auto 0;
        flex-shrink: 0;
        touch-action: none
    }

    .chat-heading {
        padding: 3px 10px 5px 15px;
        min-height: 48px
    }

    .chat-heading h2 {
        font-size: 1rem
    }

    .chat-heading .btn-icon {
        min-height: 40px;
        width: 40px
    }

    .chat-messages {
        padding: 9px 14px
    }

    .chat-message {
        grid-template-columns:28px 1fr;
        gap: 10px;
        margin-bottom: 13px
    }

    .avatar {
        width: 28px;
        height: 28px;
        font-size: .75rem
    }

    .message-meta b {
        font-size: .75rem
    }

    .message-meta time {
        font-size: .6875rem
    }

    .chat-form {
        padding-top: 8px
    }

    .chat-input-wrap input {
        height: 42px
    }

    .send-button {
        height: 44px;
        width: 44px
    }

    .chat-caption {
        margin: 4px 0 5px
    }

    .mobile-dock {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 30;
        background: #202428f5;
        backdrop-filter: blur(12px);
        border-top: 1px solid #484f57;
        padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
        gap: 8px
    }

    .mobile-dock > .btn {
        flex: 1;
        color: #e9edf2;
        min-height: 46px;
        font-weight: 600;
        font-size: .875rem
    }

    .mobile-dock > .btn[aria-expanded=true] {
        background: #55222d;
        color: #fff
    }

    .mobile-dock > .btn:first-child {
        border-right: 1px solid #454b53
    }

    .dock-count {
        display: inline-grid;
        place-items: center;
        font-size: .6875rem;
        background: #972039;
        border-radius: 4px;
        min-width: 19px;
        height: 19px;
        padding: 0 4px
    }

    .empty-state {
        min-height: 290px;
        padding: 28px 15px
    }

    .empty-state h2 {
        font-size: 1.3rem
    }

    .empty-state p {
        font-size: .8125rem
    }

    .page-note {
        font-size: .625rem;
        padding: 14px 0 18px;
        gap: 6px;
        flex-wrap: wrap
    }

    .app-toast {
        bottom: calc(76px + env(safe-area-inset-bottom));
        font-size: .8125rem
    }

    .chat-is-open .mobile-dock, .matches-is-sheet .mobile-dock {
        visibility: hidden
    }

    .sheet-backdrop.chat-backdrop {
        top: var(--chat-backdrop-top, 45 dvh)
    }

    .chat-is-open main {
        padding-bottom: var(--chat-height, 48 dvh)
    }

    .theatre .app-header {
        min-height: 55px
    }

    .modal-dialog {
        margin: 12px
    }

    .source-message {
        font-size: .75rem;
        padding: 10px
    }

    .source-message .btn {
        min-height: 32px;
        font-size: .75rem
    }
}

@media (max-width: 360px) {
    .heading h1 {
        font-size: 1.1rem
    }

    .demo-chip {
        display: none
    }

    .audio-selector {
        max-width: 140px
    }

    .audio-selector select.custom-select {
        max-width: 118px
    }

    .layout-switch .btn {
        min-width: 66px;
        padding: 4px 6px
    }

    .player-controls .btn-icon {
        width: 29px;
        padding: 5px
    }

    .focus-player {
        width: 25px
    }

    .league-name {
        font-size: .8125rem
    }
}

.app-header, .workspace-toolbar {
    flex-wrap: wrap
}

.workspace-toolbar {
    padding: 8px 0
}

.heading-inline {
    flex-wrap: wrap;
    row-gap: 4px
}

@media (max-width: 767px) {
    .players[data-layout=focus] .player:not(.is-main) .player-heading h3 {
        font-size: .75rem
    }

    .players[data-layout=focus] .player:not(.is-main) .player-heading {
        min-height: 45px
    }

    .workspace-toolbar {
        row-gap: 8px
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto
    }

    *, *::before, *::after {
        transition: none !important;
        animation: none !important
    }
}

.video-stage{
    height: 100%;
    margin: 0 auto;
    width: 100%;
}
.embed-responsive-21by9::before {
    padding-top: 42.857143%;
}

.embed-responsive-16by9::before {
    padding-top: 56.25%;
}

.embed-responsive-4by3::before {
    padding-top: 75%;
}

.embed-responsive-1by1::before {
    padding-top: 100%;
}
