<UserControl
    x:Class="Tornado3_2026Election.Controls.ChannelSchedulePanel"
    x:Name="Root"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:domain="using:Tornado3_2026Election.Domain"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="using:Tornado3_2026Election.ViewModels"
    mc:Ignorable="d">

    <UserControl.Resources>
        <Style x:Key="PanelCommandButtonStyle" TargetType="Button" BasedOn="{StaticResource ConsoleGhostButtonStyle}">
            <Setter Property="MinWidth" Value="78" />
            <Setter Property="FontSize" Value="12" />
            <Setter Property="FontFamily" Value="Bahnschrift SemiBold" />
        </Style>

        <Style x:Key="MiniSignalTextStyle" TargetType="TextBlock" BasedOn="{StaticResource ConsoleLabelTextStyle}">
            <Setter Property="Foreground" Value="{StaticResource ControlRoomTextPrimaryBrush}" />
            <Setter Property="FontFamily" Value="Consolas" />
        </Style>
    </UserControl.Resources>

    <Border
        Padding="22"
        Background="{StaticResource ControlRoomPanelGradientBrush}"
        BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
        BorderThickness="1"
        CornerRadius="26">
        <StackPanel Spacing="18">
            <Grid ColumnSpacing="16">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <StackPanel Spacing="6">
                    <TextBlock
                        FontFamily="Bahnschrift SemiBold"
                        FontSize="28"
                        Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                        Text="{x:Bind ViewModel.Title, Mode=OneWay}" />
                    <TextBlock
                        Style="{StaticResource ConsoleBodyTextStyle}"
                        Text="{x:Bind ViewModel.OperatorQuickSummary, Mode=OneWay}" />
                    <TextBlock
                        Style="{StaticResource ConsoleLabelTextStyle}"
                        Text="{x:Bind ViewModel.CgStatusSummary, Mode=OneWay}"
                        TextWrapping="WrapWholeWords" />
                </StackPanel>

                <StackPanel
                    Grid.Column="1"
                    HorizontalAlignment="Right"
                    Spacing="10">
                    <Border
                        Padding="12,8"
                        Background="#33FF5A54"
                        BorderBrush="{StaticResource ControlRoomSignalRedBrush}"
                        BorderThickness="1"
                        CornerRadius="14">
                        <TextBlock
                            Style="{StaticResource MiniSignalTextStyle}"
                            Text="{x:Bind ViewModel.TransmissionLabel, Mode=OneWay}" />
                    </Border>
                    <Border
                        Padding="12,8"
                        Background="#22293B52"
                        BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                        BorderThickness="1"
                        CornerRadius="14">
                        <TextBlock
                            Style="{StaticResource MiniSignalTextStyle}"
                            Text="{x:Bind ViewModel.AdapterStateLabel, Mode=OneWay}" />
                    </Border>
                </StackPanel>
            </Grid>

            <Grid ColumnSpacing="12">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1.25*" />
                    <ColumnDefinition Width="1.25*" />
                    <ColumnDefinition Width="0.8*" />
                </Grid.ColumnDefinitions>

                <Border
                    Padding="16"
                    Background="#18263A"
                    BorderBrush="#25405D"
                    BorderThickness="1"
                    CornerRadius="18">
                    <Grid ColumnSpacing="12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <Border
                            Width="{x:Bind ViewModel.CurrentPreviewWidth, Mode=OneWay}"
                            Height="{x:Bind ViewModel.CurrentPreviewHeight, Mode=OneWay}"
                            VerticalAlignment="Center"
                            Background="#0B1624"
                            BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="8">
                            <Image
                                Source="{x:Bind ViewModel.CurrentPreviewSource, Mode=OneWay}"
                                Stretch="Uniform" />
                        </Border>

                        <StackPanel
                            Grid.Column="1"
                            Spacing="6"
                            VerticalAlignment="Center">
                            <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="현재" />
                            <TextBlock
                                FontFamily="Bahnschrift SemiBold"
                                FontSize="20"
                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                Text="{x:Bind ViewModel.CurrentItemName, Mode=OneWay}"
                                TextWrapping="WrapWholeWords" />
                            <TextBlock
                                Style="{StaticResource ConsoleBodyTextStyle}"
                                Text="{x:Bind ViewModel.CurrentPreviewStatusLabel, Mode=OneWay}"
                                TextWrapping="WrapWholeWords" />
                            <TextBlock
                                Style="{StaticResource ConsoleLabelTextStyle}"
                                Text="{x:Bind ViewModel.QueueSummary, Mode=OneWay}"
                                TextWrapping="WrapWholeWords"
                                MaxLines="2" />
                        </StackPanel>
                    </Grid>
                </Border>

                <Border
                    Grid.Column="1"
                    Padding="16"
                    Background="#48260A"
                    BorderBrush="#FFB81C"
                    BorderThickness="2"
                    CornerRadius="18">
                    <Grid ColumnSpacing="12">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <Border
                            Width="{x:Bind ViewModel.NextPreviewWidth, Mode=OneWay}"
                            Height="{x:Bind ViewModel.NextPreviewHeight, Mode=OneWay}"
                            VerticalAlignment="Center"
                            Background="#0B1624"
                            BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="8">
                            <Image
                                Source="{x:Bind ViewModel.NextPreviewSource, Mode=OneWay}"
                                Stretch="Uniform" />
                        </Border>

                        <StackPanel
                            Grid.Column="1"
                            Spacing="6"
                            VerticalAlignment="Center">
                            <TextBlock
                                Foreground="#FFD166"
                                Style="{StaticResource ConsoleLabelTextStyle}"
                                Text="다음" />
                            <TextBlock
                                FontFamily="Bahnschrift SemiBold"
                                FontSize="20"
                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                Text="{x:Bind ViewModel.NextItemName, Mode=OneWay}"
                                TextWrapping="WrapWholeWords" />
                            <TextBlock
                                Style="{StaticResource ConsoleBodyTextStyle}"
                                Text="{x:Bind ViewModel.NextPreviewStatusLabel, Mode=OneWay}"
                                TextWrapping="WrapWholeWords" />
                            <TextBlock
                                Style="{StaticResource ConsoleLabelTextStyle}"
                                Text="{x:Bind ViewModel.LoopSummary, Mode=OneWay}" />
                        </StackPanel>
                    </Grid>
                </Border>

                <Border
                    Grid.Column="2"
                    Padding="16"
                    Background="#131D2B"
                    BorderBrush="#27405F"
                    BorderThickness="1"
                    CornerRadius="18">
                    <StackPanel Spacing="6">
                        <TextBlock Style="{StaticResource ConsoleLabelTextStyle}" Text="스케줄 목록" />
                        <TextBlock
                            FontFamily="Consolas"
                            FontSize="30"
                            Foreground="{StaticResource ControlRoomSignalAmberBrush}"
                            Text="{x:Bind ViewModel.QueuedItemCount, Mode=OneWay}" />
                        <TextBlock
                            Style="{StaticResource ConsoleBodyTextStyle}"
                            Text="{x:Bind ViewModel.QueueFootnote, Mode=OneWay}" />
                    </StackPanel>
                </Border>
            </Grid>

            <Border
                Padding="16"
                Background="#0C1421"
                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                BorderThickness="1"
                CornerRadius="20">
                <StackPanel Spacing="14">
                    <TextBlock
                        Style="{StaticResource ConsoleLabelTextStyle}"
                        Text="제어 패널" />

                    <Grid ColumnSpacing="16">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Spacing="14">
                            <Grid ColumnSpacing="12" RowSpacing="12">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="150" />
                                    <ColumnDefinition Width="240" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="220" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <ComboBox
                                    Grid.Column="0"
                                    Header="컷 분류"
                                    DisplayMemberPath="Label"
                                    ItemsSource="{x:Bind ViewModel.FormatCategoryOptions, Mode=OneWay}"
                                    SelectedItem="{x:Bind ViewModel.SelectedFormatCategoryOption, Mode=TwoWay}" />

                                <ComboBox
                                    Grid.Column="1"
                                    Header="컷"
                                    DisplayMemberPath="Name"
                                    ItemsSource="{x:Bind ViewModel.AvailableFormats, Mode=OneWay}"
                                    SelectedItem="{x:Bind ViewModel.SelectedFormat, Mode=TwoWay}" />

                                <ComboBox
                                    Grid.Column="2"
                                    Width="180"
                                    Header="투표율 단위"
                                    DisplayMemberPath="Label"
                                    ItemsSource="{x:Bind ViewModel.TurnoutRegionModeOptions, Mode=OneWay}"
                                    SelectedItem="{x:Bind ViewModel.SelectedTurnoutRegionModeOption, Mode=TwoWay}"
                                    Visibility="{x:Bind ViewModel.TurnoutRegionModeVisibility, Mode=OneWay}" />

                                <ComboBox
                                    Grid.Column="3"
                                    Header="지역"
                                    DisplayMemberPath="Label"
                                    ItemsSource="{x:Bind ViewModel.RegionOptions, Mode=OneWay}"
                                    SelectedItem="{x:Bind ViewModel.SelectedRegionOption, Mode=TwoWay}" />

                                <Button
                                    Grid.Column="5"
                                    Command="{x:Bind ViewModel.AddFormatCommand}"
                                    Content="컷 추가"
                                    Style="{StaticResource ConsolePrimaryButtonStyle}"
                                    VerticalAlignment="Bottom" />

                                <StackPanel
                                    Grid.Column="4"
                                    VerticalAlignment="Bottom"
                                    Orientation="Horizontal"
                                    Spacing="6">
                                    <NumberBox
                                        Width="92"
                                        Header="송출 시간"
                                        Minimum="{x:Bind ViewModel.SelectedFormatMinimumDurationSeconds, Mode=OneWay}"
                                        SmallChange="1"
                                        SpinButtonPlacementMode="Hidden"
                                        Value="{x:Bind ViewModel.SelectedFormatDraftDurationSeconds, Mode=TwoWay}" />
                                    <StackPanel
                                        VerticalAlignment="Bottom"
                                        Spacing="2">
                                        <Button
                                            Width="48"
                                            Height="24"
                                            MinWidth="48"
                                            MinHeight="24"
                                            Padding="0"
                                            Command="{x:Bind ViewModel.IncreaseSelectedFormatDurationCommand}"
                                            Content="▲"
                                            Style="{StaticResource ConsoleGhostButtonStyle}" />
                                        <Button
                                            Width="48"
                                            Height="24"
                                            MinWidth="48"
                                            MinHeight="24"
                                            Padding="0"
                                            Command="{x:Bind ViewModel.ApplySelectedFormatDurationCommand}"
                                            Content="확인"
                                            FontSize="12"
                                            Style="{StaticResource ConsolePrimaryButtonStyle}" />
                                        <Button
                                            Width="48"
                                            Height="24"
                                            MinWidth="48"
                                            MinHeight="24"
                                            Padding="0"
                                            Command="{x:Bind ViewModel.DecreaseSelectedFormatDurationCommand}"
                                            Content="▼"
                                            Style="{StaticResource ConsoleGhostButtonStyle}" />
                                    </StackPanel>
                                    <TextBlock
                                        VerticalAlignment="Bottom"
                                        Margin="0,0,0,8"
                                        Style="{StaticResource ConsoleLabelTextStyle}"
                                        Text="초" />
                                </StackPanel>

                                <ComboBox
                                    Grid.Row="1"
                                    Grid.Column="0"
                                    Width="150"
                                    Header="빈 스케줄"
                                    DisplayMemberPath="Label"
                                    ItemsSource="{x:Bind ViewModel.EmptyBehaviorOptions, Mode=OneWay}"
                                    SelectedItem="{x:Bind ViewModel.SelectedEmptyBehaviorOption, Mode=TwoWay}" />

                                <Button
                                    Grid.Row="1"
                                    Grid.Column="1"
                                    Width="22"
                                    Height="22"
                                    MinWidth="22"
                                    MinHeight="22"
                                    Padding="0"
                                    VerticalAlignment="Center"
                                    Content="?"
                                    FontFamily="Bahnschrift SemiBold"
                                    FontSize="11">
                                    <Button.Flyout>
                                        <Flyout>
                                            <TextBlock
                                                MaxWidth="240"
                                                Text="스케줄이 비었을 때의 동작입니다. 루프 유지, 정지, 대기 방식 중 하나를 선택합니다."
                                                TextWrapping="WrapWholeWords" />
                                        </Flyout>
                                    </Button.Flyout>
                                </Button>
                            </Grid>

                            <Border
                                Padding="12"
                                Background="#101C2E"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="8">
                                <StackPanel Spacing="10">
                                    <TextBlock
                                        Style="{StaticResource ConsoleLabelTextStyle}"
                                        Text="선택컷 송출 제어" />
                                    <StackPanel
                                        Orientation="Horizontal"
                                        Spacing="10">
                                        <Button
                                            Command="{x:Bind ViewModel.DirectPrepareCommand}"
                                            Content="준비"
                                            Style="{StaticResource ConsoleGhostButtonStyle}" />
                                        <Button
                                            Command="{x:Bind ViewModel.DirectStartCommand}"
                                            Content="시작"
                                            Style="{StaticResource ConsolePrimaryButtonStyle}" />
                                        <Button
                                            Command="{x:Bind ViewModel.DirectStopCommand}"
                                            Content="정지"
                                            Style="{StaticResource ConsoleGhostButtonStyle}" />
                                    </StackPanel>
                                </StackPanel>
                            </Border>

                            <Border
                                Padding="12"
                                Background="#101C2E"
                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                BorderThickness="1"
                                CornerRadius="8"
                                Visibility="{x:Bind ViewModel.CutDebugPanelVisibility, Mode=OneWay}">
                                <StackPanel Spacing="12">
                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="4">
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="컷 디버그" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleBodyTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugSummary, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="항목을 하나씩 끄고 다시 송출하면 어떤 값 묶음이 화면을 바꾸는지 바로 비교할 수 있습니다."
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            HorizontalAlignment="Right"
                                            IsOn="{x:Bind ViewModel.CutDebug.IsEnabled, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="2">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="14"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="텍스트 값" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugTextTargets, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            IsOn="{x:Bind ViewModel.CutDebug.ApplyTextValues, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="2">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="14"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="이미지 값" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugImageTargets, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            IsOn="{x:Bind ViewModel.CutDebug.ApplyImageValues, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="2">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="14"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="표시/숨김" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugVisibilityTargets, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            IsOn="{x:Bind ViewModel.CutDebug.ApplyVisibilityValues, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="2">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="14"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="득표율 텍스트" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugVoteRateTextTargets, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            IsOn="{x:Bind ViewModel.CutDebug.ApplyVoteRateTextValues, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="2">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="14"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="득표율 카운터" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugVoteRateCounterTargets, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            IsOn="{x:Bind ViewModel.CutDebug.ApplyVoteRateCounterValues, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="2">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="14"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="정당 바/막대 색상" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugPartyBarColorTargets, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            IsOn="{x:Bind ViewModel.CutDebug.ApplyPartyBarStyleColors, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="2">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="14"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="정당 판/문자 색상" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugPartyPlateColorTargets, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            IsOn="{x:Bind ViewModel.CutDebug.ApplyPartyPlateStyleColors, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Grid ColumnSpacing="12">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <StackPanel Spacing="2">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="14"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="득표율 색상" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind ViewModel.CutDebugVoteRateColorTargets, Mode=OneWay}"
                                                TextWrapping="WrapWholeWords" />
                                        </StackPanel>

                                        <ToggleSwitch
                                            Grid.Column="1"
                                            IsOn="{x:Bind ViewModel.CutDebug.ApplyVoteRateStyleColors, Mode=TwoWay}"
                                            OffContent="OFF"
                                            OnContent="ON" />
                                    </Grid>

                                    <Border
                                        Padding="12"
                                        Background="#0B1624"
                                        BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                        BorderThickness="1"
                                        CornerRadius="8">
                                        <StackPanel Spacing="8">
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="개별 항목 토글" />
                                            <TextBlock Style="{StaticResource ConsoleBodyTextStyle}">
                                                <Run Text="항목 " />
                                                <Run Text="{x:Bind ViewModel.CutDebugItemCount, Mode=OneWay}" />
                                                <Run Text="개" />
                                            </TextBlock>
                                            <ListView
                                                MaxHeight="300"
                                                ItemsSource="{x:Bind ViewModel.CutDebugItems, Mode=OneWay}"
                                                SelectionMode="None">
                                                <ListView.ItemTemplate>
                                                    <DataTemplate x:DataType="domain:CutDebugItemState">
                                                        <Grid
                                                            Margin="0,0,0,6"
                                                            ColumnSpacing="10">
                                                            <Grid.ColumnDefinitions>
                                                                <ColumnDefinition Width="Auto" />
                                                                <ColumnDefinition Width="Auto" />
                                                                <ColumnDefinition Width="*" />
                                                            </Grid.ColumnDefinitions>

                                                            <CheckBox
                                                                VerticalAlignment="Center"
                                                                IsChecked="{x:Bind IsEnabled, Mode=TwoWay}" />

                                                            <Border
                                                                Grid.Column="1"
                                                                Padding="8,4"
                                                                Background="#18314B"
                                                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                                                BorderThickness="1"
                                                                CornerRadius="6">
                                                                <TextBlock
                                                                    Style="{StaticResource ConsoleLabelTextStyle}"
                                                                    Text="{x:Bind KindLabel, Mode=OneWay}" />
                                                            </Border>

                                                            <StackPanel
                                                                Grid.Column="2"
                                                                Spacing="2">
                                                                <TextBlock
                                                                    FontFamily="Consolas"
                                                                    FontSize="13"
                                                                    Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                                    Text="{x:Bind Key, Mode=OneWay}" />
                                                                <TextBlock
                                                                    Style="{StaticResource ConsoleLabelTextStyle}"
                                                                    Text="{x:Bind GroupLabel, Mode=OneWay}" />
                                                            </StackPanel>
                                                        </Grid>
                                                    </DataTemplate>
                                                </ListView.ItemTemplate>
                                            </ListView>
                                        </StackPanel>
                                    </Border>
                                </StackPanel>
                            </Border>
                        </StackPanel>

                        <Border
                            Grid.Column="1"
                            Padding="12"
                            Background="#101C2E"
                            BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                            BorderThickness="1"
                            CornerRadius="8">
                            <StackPanel Spacing="8">
                                <TextBlock
                                    Style="{StaticResource ConsoleLabelTextStyle}"
                                    Text="선택된 컷 미리보기" />
                                <Border
                                    Width="{x:Bind ViewModel.SelectedFormatThumbnailWidth, Mode=OneWay}"
                                    Height="{x:Bind ViewModel.SelectedFormatThumbnailHeight, Mode=OneWay}"
                                    Background="#0B1624"
                                    BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                    BorderThickness="1"
                                    CornerRadius="6">
                                    <Image
                                        Source="{x:Bind ViewModel.SelectedFormatThumbnailSource, Mode=OneWay}"
                                        Stretch="Uniform" />
                                </Border>
                                <TextBlock
                                    FontFamily="Bahnschrift SemiBold"
                                    FontSize="16"
                                    Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                    Text="{x:Bind ViewModel.SelectedFormatName, Mode=OneWay}"
                                    TextWrapping="WrapWholeWords" />
                                <TextBlock
                                    Style="{StaticResource ConsoleBodyTextStyle}"
                                    Text="{x:Bind ViewModel.SelectedFormatDescription, Mode=OneWay}"
                                    TextWrapping="WrapWholeWords"
                                    MaxLines="2" />
                                <TextBlock
                                    Style="{StaticResource ConsoleLabelTextStyle}"
                                    Text="{x:Bind ViewModel.SelectedFormatPath, Mode=OneWay}"
                                    TextWrapping="WrapWholeWords"
                                    MaxLines="2" />
                                <TextBlock
                                    Style="{StaticResource ConsoleLabelTextStyle}"
                                    Text="{x:Bind ViewModel.SelectedFormatThumbnailStatus, Mode=OneWay}" />
                            </StackPanel>
                        </Border>
                    </Grid>
                </StackPanel>
            </Border>

            <Border
                Padding="16"
                Background="#0B1220"
                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                BorderThickness="1"
                CornerRadius="20">
                <StackPanel Spacing="14">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <StackPanel Orientation="Horizontal" Spacing="8">
                            <TextBlock
                                Style="{StaticResource ConsoleSectionTitleTextStyle}"
                                Text="스케줄 목록" />
                            <Button
                                Width="22"
                                Height="22"
                                MinWidth="22"
                                MinHeight="22"
                                Padding="0"
                                VerticalAlignment="Center"
                                Content="?"
                                FontFamily="Bahnschrift SemiBold"
                                FontSize="11">
                                <Button.Flyout>
                                    <Flyout>
                                        <TextBlock
                                            MaxWidth="280"
                                            Text="빨강은 현재 송출 중, 노랑은 다음 송출 예정입니다. 스케줄은 항상 목록 위에서 아래로 진행하고, 마지막 컷 이후에는 반복이 켜져 있을 때만 맨 위로 이어집니다."
                                            TextWrapping="WrapWholeWords" />
                                    </Flyout>
                                </Button.Flyout>
                            </Button>
                        </StackPanel>
                        <StackPanel
                            Grid.Column="1"
                            HorizontalAlignment="Right"
                            Orientation="Horizontal"
                            Spacing="8">
                            <ToggleSwitch
                                Header="반복"
                                IsOn="{x:Bind ViewModel.LoopEnabled, Mode=TwoWay}" />
                            <Button
                                Command="{x:Bind ViewModel.SchedulePrepareCommand}"
                                Content="준비"
                                Style="{StaticResource PanelCommandButtonStyle}" />
                            <Button
                                Command="{x:Bind ViewModel.StartCommand}"
                                Content="스케줄 시작"
                                Style="{StaticResource PanelCommandButtonStyle}" />
                            <Button
                                Command="{x:Bind ViewModel.StopCommand}"
                                Content="스케줄 정지"
                                Style="{StaticResource PanelCommandButtonStyle}" />
                            <Button
                                Command="{x:Bind ViewModel.ForceNextCommand}"
                                Style="{StaticResource PanelCommandButtonStyle}">
                                <TextBlock TextAlignment="Center">
                                    <Run Text="다음" />
                                    <LineBreak />
                                    <Run Text="즉시 송출" />
                                </TextBlock>
                            </Button>
                        </StackPanel>
                    </Grid>

                    <ListView
                        x:Name="QueueListView"
                        ItemsSource="{x:Bind ViewModel.Queue, Mode=OneWay}"
                        SelectionMode="None">
                        <ListView.ItemContainerTransitions>
                            <TransitionCollection>
                                <AddDeleteThemeTransition />
                                <ReorderThemeTransition />
                            </TransitionCollection>
                        </ListView.ItemContainerTransitions>
                        <ListView.ItemTemplate>
                            <DataTemplate x:DataType="domain:ChannelScheduleItem">
                                <Border
                                    Margin="0,0,0,10"
                                    Opacity="{x:Bind CardOpacity, Mode=OneWay}"
                                    Padding="14"
                                    Background="{x:Bind StateCardBackgroundBrush, Mode=OneWay}"
                                    BorderBrush="{x:Bind StateCardBorderBrush, Mode=OneWay}"
                                    BorderThickness="1"
                                    CornerRadius="18">
                                    <Grid ColumnSpacing="14">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="10" />
                                            <ColumnDefinition Width="140" />
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>

                                        <Border
                                            Background="{x:Bind StateBrush, Mode=OneWay}"
                                            CornerRadius="4" />

                                        <StackPanel Grid.Column="1" Spacing="6">
                                            <Border
                                                Padding="10,6"
                                                Background="{x:Bind StateBadgeBackgroundBrush, Mode=OneWay}"
                                                CornerRadius="12">
                                                <TextBlock
                                                    Style="{StaticResource MiniSignalTextStyle}"
                                                    Text="{x:Bind StateLabel, Mode=OneWay}" />
                                            </Border>
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind LastPlayedLabel, Mode=OneWay}" />
                                        </StackPanel>

                                        <StackPanel
                                            Grid.Column="2"
                                            Spacing="6"
                                            VerticalAlignment="Center">
                                            <Border
                                                Width="{x:Bind ThumbnailWidth, Mode=OneWay}"
                                                Height="{x:Bind ThumbnailHeight, Mode=OneWay}"
                                                Background="#0B1624"
                                                BorderBrush="{StaticResource ControlRoomPanelStrokeBrush}"
                                                BorderThickness="1"
                                                CornerRadius="8">
                                                <Image
                                                    Source="{x:Bind ThumbnailSource, Mode=OneWay}"
                                                    Stretch="Uniform" />
                                            </Border>
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                HorizontalAlignment="Center"
                                                Text="{x:Bind ThumbnailStatusLabel, Mode=OneWay}" />
                                        </StackPanel>

                                        <StackPanel Grid.Column="3" Spacing="6">
                                            <TextBlock
                                                FontFamily="Bahnschrift SemiBold"
                                                FontSize="18"
                                                Foreground="{StaticResource ControlRoomTextPrimaryBrush}"
                                                Text="{x:Bind DisplayName}" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleBodyTextStyle}"
                                                Text="{x:Bind Description}" />
                                            <TextBlock
                                                Style="{StaticResource ConsoleLabelTextStyle}"
                                                Text="{x:Bind DisplayRegionLabel, Mode=OneWay}" />
                                            <StackPanel
                                                Orientation="Horizontal"
                                                Spacing="8">
                                                <TextBlock
                                                    VerticalAlignment="Center"
                                                    Style="{StaticResource ConsoleLabelTextStyle}">
                                                    <Run Text="컷 " />
                                                    <Run Text="{x:Bind TotalCuts}" />
                                                    <Run Text=" | 기본" />
                                                </TextBlock>
                                                <NumberBox
                                                    Width="96"
                                                    Minimum="{x:Bind MinimumDurationSeconds, Mode=OneWay}"
                                                    SmallChange="1"
                                                    SpinButtonPlacementMode="Hidden"
                                                    Value="{x:Bind DraftCutDurationSeconds, Mode=TwoWay}" />
                                                <StackPanel
                                                    VerticalAlignment="Center"
                                                    Spacing="2">
                                                    <Button
                                                        Width="48"
                                                        Height="24"
                                                        MinWidth="48"
                                                        MinHeight="24"
                                                        Padding="0"
                                                        Click="IncreaseDurationButton_Click"
                                                        Content="▲"
                                                        Style="{StaticResource PanelCommandButtonStyle}" />
                                                    <Button
                                                        Width="48"
                                                        Height="24"
                                                        MinWidth="48"
                                                        MinHeight="24"
                                                        Padding="0"
                                                        Click="ApplyDurationButton_Click"
                                                        Content="확인"
                                                        FontSize="12"
                                                        IsEnabled="{x:Bind HasPendingDurationChange, Mode=OneWay}"
                                                        Style="{StaticResource PanelCommandButtonStyle}" />
                                                    <Button
                                                        Width="48"
                                                        Height="24"
                                                        MinWidth="48"
                                                        MinHeight="24"
                                                        Padding="0"
                                                        Click="DecreaseDurationButton_Click"
                                                        Content="▼"
                                                        Style="{StaticResource PanelCommandButtonStyle}" />
                                                </StackPanel>
                                                <TextBlock
                                                    VerticalAlignment="Center"
                                                    Style="{StaticResource ConsoleLabelTextStyle}"
                                                    Text="초" />
                                            </StackPanel>
                                        </StackPanel>

                                        <StackPanel
                                            Grid.Column="4"
                                            Orientation="Horizontal"
                                            Spacing="8"
                                            VerticalAlignment="Center">
                                            <Button
                                                Click="MoveUpButton_Click"
                                                Content="위"
                                                Style="{StaticResource PanelCommandButtonStyle}" />
                                            <Button
                                                Click="MoveDownButton_Click"
                                                Content="아래"
                                                Style="{StaticResource PanelCommandButtonStyle}" />
                                            <Button
                                                Click="RemoveItemButton_Click"
                                                Content="제거"
                                                Style="{StaticResource PanelCommandButtonStyle}" />
                                        </StackPanel>
                                    </Grid>
                                </Border>
                            </DataTemplate>
                        </ListView.ItemTemplate>
                    </ListView>
                </StackPanel>
            </Border>
        </StackPanel>
    </Border>
</UserControl>

