        .test-video-page {
            min-height: 100vh;
            background: #f5f5f5;
        }

        .test-video-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
        }

        .test-video-header {
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .test-video-content {
            display: flex;
            gap: 20px;
            align-items: flex-start;
        }

        .test-video-sidebar {
            width: 250px;
            flex-shrink: 0;
            background: #fff;
            border-radius: 8px;
            padding: 15px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            max-height: calc(100vh - 200px);
            overflow-y: auto;
        }

        .test-video-sidebar .nav-link {
            word-wrap: break-word;
            overflow-wrap: break-word;
            white-space: normal;
            word-break: break-word;
            text-align: left;
        }

        /* サイドバーヘッダー（タイトル + 閉じるボタン） */
        .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e0e0e0;
        }

        .sidebar-header h5 {
            margin: 0;
            font-size: 18px;
            font-weight: bold;
            color: #333;
        }

        /* サイドバー閉じるボタン */
        .sidebar-close-btn {
            display: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: none;
            background: #f5f5f5;
            color: #666;
            font-size: 20px;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            flex-shrink: 0;
            position: relative;
            z-index: 1001;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .sidebar-close-btn:hover {
            background: #e0e0e0;
            color: #333;
            box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        }

        .sidebar-close-btn:active {
            transform: scale(0.95);
        }

        /* ハンバーガーメニューボタン */
        .hamburger-menu-btn {
            display: none;
            background: #f5f5f5;
            border: none;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            padding: 0;
            cursor: pointer;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            flex-shrink: 0;
        }

        .hamburger-menu-btn:hover {
            background: #e0e0e0;
        }

        .hamburger-menu-btn span {
            display: block;
            width: 18px;
            height: 2px;
            background: #666;
            margin: 3px auto;
            transition: 0.3s;
        }

        .hamburger-menu-btn.active span:nth-child(1) {
            transform: rotate(45deg) translate(4px, 4px);
        }

        .hamburger-menu-btn.active span:nth-child(2) {
            opacity: 0;
        }

        .hamburger-menu-btn.active span:nth-child(3) {
            transform: rotate(-45deg) translate(5px, -5px);
        }

        /* 閉じるボタンの基本スタイル（.instructor-header内で使用） */
        /* 注: 現在は.instructor-header .close-page-btnでスタイルを適用 */

        /* モバイル用サイドバーオーバーレイ */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
        }

        .sidebar-overlay.active {
            display: block;
        }

        /* 画面回転警告オーバーレイ（モバイルのみ、モード選択後） */
        .orientation-warning-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            z-index: 10000;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            color: #fff;
            text-align: center;
            padding: 20px;
        }

        .orientation-warning-overlay.active {
            display: flex;
        }

        .orientation-warning-icon {
            font-size: 80px;
            margin-bottom: 30px;
            animation: rotate-device 2s ease-in-out infinite;
        }

        @keyframes rotate-device {
            0%, 100% { transform: rotate(0deg); }
            50% { transform: rotate(90deg); }
        }

        .orientation-warning-title {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 15px;
        }

        .orientation-warning-message {
            font-size: 16px;
            line-height: 1.6;
            max-width: 300px;
        }

        /* メインコンテンツのWrapper - 動画とフッターを同じカラムに配置 */
        .test-video-main-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .test-video-main {
            flex: 1;
            position: relative; /* カウントダウンの位置指定用 */
            background: #fff;
            border-radius: 8px 8px 0 0;
            overflow: hidden;
            position: relative;
            height: calc(100vh - 300px);
            max-height: calc(100vh - 300px);
            line-height: 0;
        }

        /* カウントダウンタイマーのスタイル */
        #countdown.timer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            margin: 0;
        }

        #countdown.timer svg {
            width: 200px;
            height: 200px;
        }

        #countdown.timer #myTimer {
            font-size: 60px;
            fill: #fff;
            font-weight: bold;
        }

        .test-video-group {
            display: flex;
            gap: 20px;
            width: 100%;
            height: 100%;
            max-height: 100%;
            line-height: 0;
            font-size: 0;
            overflow: hidden;
        }

        .test-video-tab-content {
            flex: 1;
            background: #fff;
            display: block;
            width: 100%;
            height: 100%;
            max-height: 100%;
            position: relative;
            line-height: 0;
            font-size: 0;
            overflow: hidden;
        }

        .test-video-filming {
            display: none; /* デフォルトでは非表示 */
            flex: 1;
            background: #000;
            max-width: 50%;
        }

        /* デフォルト（先生の動画を画面いっぱいに表示） */
        .test-video-group {
            display: flex;
            flex-direction: row;
        }

        /* 二分割モード */
        .test-video-page.two-partition-mode .test-video-tab-content {
            display: block !important;
            width: 50% !important;
            flex: 0 0 50%;
        }

        .test-video-page.two-partition-mode .test-video-filming {
            display: block !important;
            width: 50% !important;
            flex: 0 0 50%;
            max-width: 50% !important;
        }

        .test-video-page.two-partition-mode .test-video-filming video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transform: scaleX(-1); /* カメラを鏡像反転 */
        }

        .test-video-main video {
            width: 100% !important;
            max-width: 100% !important;
            max-height: 100% !important;
            object-fit: contain !important;
            display: block;
            background: #000 !important;
        }

        .test-video-tab-content .tab-pane {
            height: 100% !important;
            max-height: 100% !important;
            width: 100%;
            display: none;
            position: relative;
            margin: 0 !important;
            padding: 0 !important;
            background: #000;
            overflow: hidden;
            line-height: 0;
            font-size: 0;
        }

        .test-video-tab-content .tab-pane.active,
        .test-video-tab-content .tab-pane.show {
            display: block !important;
        }

        .test-video-tab-content .tab-pane video {
            width: 100% !important;
            max-width: 100% !important;
            height: 100% !important;
            max-height: 100% !important;
            object-fit: contain !important;
            display: block !important;
            margin: 0 !important;
            padding: 0 !important;
            background: #000 !important;
            border: none !important;
            outline: none !important;
            vertical-align: top !important;
            line-height: 0;
        }

        /* 先生の動画保護用スタイル */
        .test-teacher-video {
            -webkit-user-select: none !important;
            -moz-user-select: none !important;
            -ms-user-select: none !important;
            user-select: none !important;
            -webkit-touch-callout: none !important;
            -webkit-tap-highlight-color: transparent !important;
            pointer-events: auto !important;
        }

        /* コンテキストメニューを非表示 */
        .test-teacher-video::-webkit-media-controls {
            -webkit-user-select: none !important;
        }

        /* 動画上での右クリックメニューを無効化 */
        .test-teacher-video::selection {
            background: transparent !important;
        }

        .test-teacher-video::-moz-selection {
            background: transparent !important;
        }

        /* 先生の動画：Video.js v10 ニュートラルスキン（コントロールバーを枠なし・フラットに表示） */
        .test-video-tab-content .tab-pane video-neutral-skin {
            display: block;
            width: 100%;
            max-width: 100%;
            height: 100%;
            overflow: hidden;
            /* font-size / line-height はShadow DOM内にも継承されるため、.tab-pane の 0 を打ち消す */
            font-size: 16px;
            line-height: normal;
            /* Video.js スキンの角丸を無効化（従来の<video>と同じく角を四角に） */
            --media-border-radius: 0;
            /* 従来と同じく動画全体を表示（スキン既定は cover） */
            --media-object-fit: contain;
        }

        /* 全画面時はページ側の max-height 制限を解除（ネイティブ全画面と同じく画面いっぱいに表示） */
        #test-video-tabContent video-neutral-skin.is-fullscreen video {
            height: 100% !important;
            max-height: none !important;
        }

        /* 動画コントロールバーの余白を削除 */
        .test-video-tab-content .tab-pane video::-webkit-media-controls {
            margin: 0 !important;
            padding: 0 !important;
        }

        /* 先生をズームモード */
        .test-video-page.zoom-teacher .test-video-sidebar {
            display: none;
        }

        .test-video-page.zoom-teacher .test-video-group {
            flex-direction: column;
            height: calc(100vh - 300px);
        }

        .test-video-page.zoom-teacher .test-video-tab-content {
            flex: 1;
            width: 100%;
            position: relative;
        }

        .test-video-page.zoom-teacher .test-video-tab-content video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #000;
        }

        /* [OLD CODE - コメントアウト] 自分の動画が表示されない問題があった
        .test-video-page.zoom-teacher .test-video-filming {
            width: 300px;
            height: 170px;
            position: fixed;
            top: 80px;
            right: 20px;
            z-index: 1000;
            border: 2px solid white;
            border-radius: 8px;
            max-width: none;
        }
        */

        /* [NEW CODE] 自分の動画を右下に表示（PiP） */
        .test-video-page.zoom-teacher .test-video-filming {
            width: 220px;
            height: 124px;
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
            border: 2px solid white;
            border-radius: 8px;
            max-width: none;
            display: block !important;
        }

        .test-video-page.zoom-teacher .test-video-filming video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transform: scaleX(-1); /* カメラを鏡像反転 */
        }

        /* 自分をズームモード（先生をズームと同様のレイアウトで役割を入れ替え） */
        .test-video-page.zoom-self .test-video-sidebar {
            display: none;
        }

        /* 自分のみモードと同じスタイル - containerを自然な高さに */
        .test-video-page.zoom-self .test-video-group {
            /* flex-direction: column; 削除 - 自分のみモードと同じ */
            /* height: calc(100vh - 300px); 削除 - 自分のみモードと同じ */
        }

        /* 自分のカメラをメインビューとして表示 - 自分のみモードと同じスタイル */
        .test-video-page.zoom-self .test-video-filming {
            display: block !important;
            flex: 1;
            width: 100%;
            max-width: 100%;
            /* position: relative; 削除 - 自分のみモードと同じ */
            /* order: -1; 削除 - 自分のみモードと同じ */
        }

        .test-video-page.zoom-self .test-video-filming video {
            width: 100%;
            height: calc(100vh - 300px); /* 自分のみモードと完全に同じ */
            object-fit: contain; /* 動画全体を表示 */
            transform: scaleX(-1); /* カメラを鏡像反転 */
            /* 自分のみモードと同じスタイルに統一 */
        }

        /* 先生の動画を右下に小さく表示（PiP） */
        .test-video-page.zoom-self .test-video-tab-content {
            width: 220px;
            height: 124px;
            position: absolute;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
            border: 2px solid white;
            border-radius: 8px;
            flex: none;
            overflow: hidden;
        }

        .test-video-page.zoom-self .test-video-tab-content video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .test-video-page.zoom-self .test-video-tab-content .tab-pane {
            height: 100% !important;
            max-height: 100% !important;
        }

        /* 自分のみモード */
        .test-video-page.only-self-mode .test-video-sidebar {
            display: none;
        }

        .test-video-page.only-self-mode .test-video-tab-content {
            display: none !important;
        }

        .test-video-page.only-self-mode .test-video-filming {
            display: block !important;
            flex: 1;
            width: 100%;
            max-width: 100%;
        }

        .test-video-page.only-self-mode .test-video-filming video {
            width: 100%;
            height: calc(100vh - 300px);
            object-fit: contain;
            transform: scaleX(-1); /* カメラを鏡像反転 */
        }

        /* 先生のみモード */
        .test-video-page.only-teacher-mode .test-video-sidebar {
            display: none;
        }

        .test-video-page.only-teacher-mode .test-video-filming {
            display: none !important;
        }

        .test-video-page.only-teacher-mode .test-video-tab-content {
            flex: 1;
            width: 100% !important;
        }

        .test-video-page.only-teacher-mode .test-video-tab-content video {
            width: 100%;
            height: calc(100vh - 300px);
            object-fit: contain;
        }

        /* フッター - 動画と同じカラム内に配置 */
        .test-video-footer {
            background: #fff;
            padding: 15px 20px;
            border-radius: 0 0 8px 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .test-video-footer .content-name {
            font-size: 1.5rem;
            font-weight: bold;
            color: #333;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px solid #eee;
        }

        /* 指導者名の表示 */
        .instructor-name {
            font-size: 20px;
            font-weight: bold;
            color: #333;
            padding: 10px 15px;
            background: #fff;
            border-radius: 8px 8px 0 0;
            margin-bottom: 0;
            box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
        }

        .instructor-name .label {
            color: #666;
            font-weight: normal;
            margin-right: 10px;
        }

        /* 指導者ヘッダー（指導者名 + 閉じるボタン） */
        .instructor-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #fff;
            border-radius: 8px 8px 0 0;
            padding-right: 10px;
            position: relative;
        }

        .instructor-header .instructor-name {
            box-shadow: none;
            border-radius: 0;
            flex: 1;
        }

        .instructor-header .instructor-name-placeholder {
            flex: 1;
            padding: 10px 15px;
        }

        .instructor-header .close-page-btn {
            position: relative;
            top: auto;
            right: auto;
            padding: 6px 16px;
            border-radius: 6px;
            border: 1px solid #ccc;
            background: #f5f5f5;
            color: #666;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            pointer-events: auto;
            white-space: nowrap;
        }

        .instructor-header .close-page-btn:hover {
            background: #e0e0e0;
            color: #333;
        }

        /* 指導者ヘッダーがある場合、動画エリアの上部角丸を削除 */
        .instructor-header + .test-video-main {
            border-radius: 0;
        }

        /* 指導者名がある場合、動画エリアの上部角丸を削除 */
        .instructor-name + .test-video-main {
            border-radius: 0;
        }

        .test-video-controls {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: center;
        }

        /* 録画オプションボタンの展開アニメーション */
        .recording-options {
            display: none;
            opacity: 0;
            max-height: 0;
            overflow: hidden;
            transition: opacity 0.3s ease, max-height 0.3s ease;
        }

        .recording-options.expanded {
            display: flex;
            opacity: 1;
            max-height: 200px;
            flex-wrap: wrap;
            gap: 10px;
            align-items: center;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #e0e0e0;
        }

        .recording-options button {
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .recording-options button:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        }

        /* Main controls - 録画する, 録画停止 cùng hàng */
        .main-controls {
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        /* Mode button styles */
        .mode-btn.selected {
            background-color: #007bff !important;
            color: #fff !important;
            border-color: #007bff !important;
            box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
        }

        .mode-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none !important;
        }

        /* Video watched check mark */
        .nav-link.video-watched {
            position: relative;
        }
        
        .nav-link.video-watched .key {
            color: #33A852;
            margin-right: 5px;
        }

        .mode-btn:disabled:hover {
            transform: none !important;
            box-shadow: none !important;
        }

        /* モバイル対応 */
/* 中間サイズ対応（768px - 1024px）- 12〜14インチノートPC */
@media screen and (min-width: 769px) and (max-width: 1024px) {
            .test-video-page {
                min-height: auto;
                height: auto;
            }

            .test-video-container {
                padding: 15px;
            }

            .test-video-content {
                align-items: stretch;
            }

            .test-video-main-wrapper {
                min-height: 0;
            }

            .test-video-main {
                max-height: none !important;
                height: auto !important;
                min-height: 300px;
            }
            
            .test-video-footer {
                position: relative;
                z-index: 10;
                flex-shrink: 0;
            }

            .test-video-sidebar {
                max-height: calc(100vh - 150px);
            }
        }

        /* 大きいモニター対応（1367px以上）- 15インチ以上 */
        @media screen and (min-width: 1367px) {
            .test-video-page {
                min-height: auto;
                height: auto;
            }

            .test-video-content {
                align-items: stretch;
            }

            .test-video-main-wrapper {
                min-height: 0;
            }

            .test-video-main {
                max-height: none !important;
                height: auto !important;
                min-height: 500px;
            }

            .test-video-main video,
            .test-video-tab-content .tab-pane video {
                width: 100% !important;
                max-height: calc(100vh - 350px) !important;
                object-fit: contain !important;
                background: #000 !important;
            }

            .test-video-sidebar {
                max-height: calc(100vh - 180px);
            }
        }

        /* 小さいノートPC対応（1024px - 1366px）- 12〜14インチ */
        @media screen and (min-width: 1025px) and (max-width: 1366px) {
            .test-video-page {
                min-height: auto;
                height: auto;
            }

            .test-video-content {
                align-items: stretch;
            }

            .test-video-main-wrapper {
                min-height: 0;
            }

            .test-video-main {
                max-height: none !important;
                height: auto !important;
                min-height: 400px;
            }

            .test-video-sidebar {
                max-height: calc(100vh - 180px);
            }
        }

        /* タブレットサイズ対応（600px - 768px） */
        @media screen and (min-width: 600px) and (max-width: 768px) {
            .test-video-page {
                min-height: auto;
                height: auto;
            }

            .test-video-container {
                padding: 15px;
            }

            .test-video-content {
                align-items: stretch;
            }

            .test-video-main-wrapper {
                min-height: 0;
            }

            .test-video-main {
                max-height: none !important;
                height: auto !important;
                min-height: 250px;
            }
            
            .test-video-footer {
                position: relative;
                z-index: 10;
                flex-shrink: 0;
            }

            .test-video-group {
                max-height: none !important;
                height: auto !important;
            }

            .test-video-tab-content {
                max-height: none !important;
                height: auto !important;
            }

            .test-video-tab-content .tab-pane {
                max-height: none !important;
                height: auto !important;
            }

            .test-video-sidebar {
                max-height: calc(100vh - 120px);
            }
        }
        @media screen and (max-width: 599px) {
            /* モバイルでヘッダーを非表示 */
            .main-navbar,
            .header-middle-banner {
                display: none !important;
            }

            .test-video-container {
                padding: 20px 20px 0 20px;
                margin-top: 0; /* ヘッダー非表示のためmargin-topを削除 */
            }

            .test-video-content {
                margin-bottom: 0;
            }

            /* モバイルでの指導者名表示 */
            .instructor-name {
                font-size: 16px;
                padding: 8px 12px;
            }

            .instructor-header {
                padding-left: 8px;
                padding-right: 8px;
                gap: 8px;
            }

            .instructor-header .close-page-btn {
                width: 32px;
                height: 32px;
                font-size: 16px;
            }

            .test-video-sidebar {
                position: fixed;
                top: 0;
                left: -100%;
                width: 280px;
                max-width: 80%;
                height: 100vh;
                max-height: 100vh;
                z-index: 1000;
                transition: left 0.3s ease;
                box-shadow: 2px 0 8px rgba(0,0,0,0.2);
            }

            .test-video-sidebar.active {
                left: 0;
            }

            /* モバイルでサイドバー閉じるボタンを表示 */
            .sidebar-close-btn {
                display: flex !important;
                width: 44px !important;
                height: 44px !important;
                font-size: 22px !important;
                z-index: 1002 !important;
            }

            .hamburger-menu-btn {
                display: flex;
                flex-direction: column;
                width: 36px;
                height: 36px;
            }

            .test-video-main-wrapper {
                flex: 1;
                display: flex;
                flex-direction: column;
            }

            .test-video-main {
                height: auto !important;
                max-height: none !important;
                min-height: 180px;
                background: #000;
                line-height: 0;
                font-size: 0;
                overflow: hidden;
                margin-bottom: 0;
                padding-bottom: 0;
                border-radius: 8px 8px 0 0;
            }

            .test-video-group {
                line-height: 0;
                font-size: 0;
                height: 100% !important;
                max-height: 180px !important;
                margin: 0;
                padding: 0;
                overflow: hidden;
            }

            .test-video-tab-content {
                background: #000;
                height: 100% !important;
                max-height: 180px !important;
                line-height: 0;
                font-size: 0;
                margin: 0;
                padding: 0;
                position: relative;
                overflow: hidden;
            }

            .test-video-tab-content .tab-pane {
                height: 100% !important;
                max-height: 180px !important;
                overflow: hidden !important;
                margin: 0 !important;
                padding: 0 !important;
                line-height: 0;
                font-size: 0;
                position: relative !important;
                background: #000;
            }

            .test-video-tab-content .tab-pane.active {
                display: block !important;
                position: relative !important;
            }

            .test-video-tab-content .tab-pane video {
                width: 100% !important;
                max-width: 100% !important;
                height: 100% !important;
                max-height: 180px !important;
                object-fit: contain !important;
                display: block !important;
                margin: 0 !important;
                padding: 0 !important;
                background: #000 !important;
                border: none !important;
                outline: none !important;
                vertical-align: top !important;
                line-height: 0;
            }

            .test-video-footer {
                margin-top: 0;
                padding-top: 20px;
            }

            .test-video-controls {
                flex-direction: column;
            }

            .test-video-controls .btn {
                width: 100%;
            }

            /* モバイルでのズームモード */
            .test-video-page.zoom-teacher .test-video-group {
                height: calc(100vh - 200px);
            }

            .test-video-page.zoom-teacher .test-video-filming {
                width: 25%;
                max-width: 160px;
                min-width: 100px;
                aspect-ratio: 16 / 9;
                bottom: 10px;
                top: auto;
            }

            /* モバイルでの自分をズーム - 自分のみモードと同じスタイル */
            .test-video-page.zoom-self .test-video-main {
                height: auto !important;
                max-height: none !important;
                min-height: 0 !important;
            }

            .test-video-page.zoom-self .test-video-group {
                width: 100% !important;
                height: auto !important;
                display: flex !important;
                justify-content: center !important;
                align-items: center !important;
                gap: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            /* モバイルでの自分をズーム - 先生動画をPiPとして表示 */
            .test-video-page.zoom-self .test-video-tab-content {
                width: 25%;
                max-width: 160px;
                min-width: 100px;
                height: auto;
                aspect-ratio: 16 / 9;
                bottom: 10px;
                right: 10px;
                top: auto;
            }

            /* モバイルでの自分のカメラ表示 - 自分のみモードと同じスタイル */
            .test-video-page.zoom-self .test-video-filming {
                width: 100% !important;
                flex: 1 1 100% !important;
                max-width: 100% !important;
                height: auto !important; /* 自分のみモードと同じ */
                position: relative !important;
                overflow: hidden !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            .test-video-page.zoom-self .test-video-filming video {
                width: 100% !important;
                height: auto !important; /* 自分のみモードと同じスタイル */
                max-height: 70vh !important; /* 画面の70%を超えないようにする - 自分のみモードと同じ */
                object-fit: contain !important; /* 動画全体を表示 */
                object-position: center center !important; /* 中央配置 */
                margin: 0 auto !important; /* 中央揃え */
                padding: 0 !important;
                display: block !important;
                background: #000;
                transform: scaleX(-1); /* カメラを鏡像反転 */
            }

            /* モバイルでの二分割モード */
            .test-video-page.two-partition-mode .test-video-main {
                height: auto !important;
                max-height: none !important;
                min-height: 0 !important;
            }

            .test-video-page.two-partition-mode .test-video-group {
                flex-direction: row !important;
                width: 100% !important;
                height: auto !important;
                aspect-ratio: 16 / 9 !important;
                gap: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            .test-video-page.two-partition-mode .test-video-tab-content {
                width: 50% !important;
                flex: 0 0 50% !important;
                max-width: 50% !important;
                min-width: 0 !important;
                height: 100% !important;
                margin: 0 !important;
                padding: 0 !important;
                box-sizing: border-box !important;
                position: relative !important;
                overflow: hidden !important;
            }

            .test-video-page.two-partition-mode .test-video-filming {
                width: 50% !important;
                flex: 0 0 50% !important;
                max-width: 50% !important;
                min-width: 0 !important;
                height: 100% !important;
                margin: 0 !important;
                padding: 0 !important;
                display: block !important;
                box-sizing: border-box !important;
                position: relative !important;
                overflow: hidden !important;
            }

            /* ms-3クラスなどのmarginを無効化 */
            .test-video-page.two-partition-mode .test-video-filming.ms-3 {
                margin-left: 0 !important;
                margin-inline-start: 0 !important;
            }

            .test-video-page.two-partition-mode .test-video-tab-content .tab-pane {
                height: 100% !important;
                position: relative !important;
                overflow: hidden !important;
            }

            .test-video-page.two-partition-mode .test-video-tab-content .tab-pane video {
                width: 100% !important;
                height: 100% !important;
                object-fit: contain !important;
                object-position: center center !important;
                margin: 0 !important;
                padding: 0 !important;
                display: block !important;
                background: #000 !important;
            }

            .test-video-page.two-partition-mode .test-video-filming video {
                width: 100% !important;
                height: 100% !important;
                object-fit: cover !important;
                object-position: center center !important;
                margin: 0 !important;
                padding: 0 !important;
                display: block !important;
                transform: scaleX(-1); /* カメラを鏡像反転 */
            }

            /* モバイルでの自分のみモード - 黒い領域をなくす、左側の隙間をなくす */
            .test-video-page.only-self-mode .test-video-main {
                height: auto !important;
                max-height: none !important;
                min-height: 0 !important;
            }

            .test-video-page.only-self-mode .test-video-group {
                width: 100% !important;
                height: auto !important;
                display: flex !important;
                justify-content: center !important;
                align-items: center !important;
                gap: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            .test-video-page.only-self-mode .test-video-filming {
                width: 100% !important;
                flex: 1 1 100% !important;
                max-width: 100% !important;
                height: auto !important;
                position: relative !important;
                overflow: hidden !important;
                margin: 0 !important;
                padding: 0 !important;
            }

            .test-video-page.only-self-mode .test-video-filming video {
                width: 100% !important;
                height: auto !important;
                max-height: 70vh !important; /* 画面の70%を超えないようにする */
                object-fit: contain !important; /* 動画全体を表示 */
                object-position: center center !important;
                margin: 0 auto !important;
                padding: 0 !important;
                display: block !important;
                transform: scaleX(-1); /* カメラを鏡像反転 */
            }
        }
        /* ===== Expandable Panel Styles ===== */
        .custom-expandable-panel {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 10000;
            background: #fff;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            transform: translateY(-100%);
            transition: transform 0.3s ease;
            max-height: 80vh;
            overflow-y: auto;
        }

        .custom-expandable-panel.active {
            transform: translateY(0);
        }

        .custom-expandable-panel-content {
            padding: 20px 30px;
            text-align: center;
            max-width: 800px;
            margin: 0 auto;
        }

        .custom-expandable-panel-header {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 15px;
            position: relative;
        }

        .custom-expandable-panel-close {
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            font-size: 24px;
            color: #666;
            cursor: pointer;
            padding: 5px 10px;
            line-height: 1;
            transition: color 0.2s ease;
            z-index: 10003;
            pointer-events: auto;
        }

        .custom-expandable-panel-close:hover {
            color: #333;
        }

        .custom-expandable-panel-icon {
            font-size: 36px;
            flex-shrink: 0;
        }

        .custom-expandable-panel-icon.success {
            color: #28a745;
        }

        .custom-expandable-panel-icon.error {
            color: #dc3545;
        }

        .custom-expandable-panel-icon.warning {
            color: #ffc107;
        }

        .custom-expandable-panel-icon.info {
            color: #17a2b8;
        }

        .custom-expandable-panel-title {
            font-size: 20px;
            font-weight: bold;
            color: #333;
            margin: 0;
        }

        .custom-expandable-panel-message {
            font-size: 16px;
            color: #666;
            margin-bottom: 20px;
            line-height: 1.6;
            text-align: left;
        }

        .custom-expandable-panel-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .custom-expandable-panel-btn {
            padding: 12px 30px;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.2s ease;
            min-width: 120px;
        }

        .custom-expandable-panel-btn.primary {
            background: #007bff;
            color: #fff;
        }

        .custom-expandable-panel-btn.primary:hover {
            background: #0056b3;
        }

        .custom-expandable-panel-btn.secondary {
            background: #6c757d;
            color: #fff;
        }

        .custom-expandable-panel-btn.secondary:hover {
            background: #545b62;
        }

        .custom-expandable-panel-btn.success {
            background: #28a745;
            color: #fff;
        }

        .custom-expandable-panel-btn.success:hover {
            background: #1e7e34;
        }

        .custom-expandable-panel-btn.danger {
            background: #d33;
            color: #fff;
        }

        .custom-expandable-panel-btn.danger:hover {
            background: #c82333;
        }

        .custom-expandable-panel-btn.orientation-stop {
            background: #9b2424;
            color: #fff;
        }

        .custom-expandable-panel-btn.orientation-stop:hover {
            background: #7a1c1c;
        }

        /* パネルが表示されている時のページコンテンツの余白調整 */
        body.has-expandable-panel {
            padding-top: 0;
        }

        /* モバイル対応 */
        @media (max-width: 768px) {
            .custom-expandable-panel-content {
                padding: 15px 20px;
            }

            .custom-expandable-panel-icon {
                font-size: 28px;
            }

            .custom-expandable-panel-title {
                font-size: 18px;
            }

            .custom-expandable-panel-message {
                font-size: 14px;
            }

            .custom-expandable-panel-btn {
                padding: 10px 20px;
                font-size: 14px;
                min-width: 100px;
            }

            .custom-expandable-panel-close {
                font-size: 20px;
                padding: 5px;
            }
        }

        /* ===== Loading Overlay Styles ===== */
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 10001;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .loading-overlay.active {
            display: flex;
        }

        .loading-spinner {
            width: 60px;
            height: 60px;
            border: 5px solid rgba(255, 255, 255, 0.3);
            border-top: 5px solid #fff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 20px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .loading-text {
            color: #fff;
            font-size: 18px;
            margin-bottom: 15px;
        }

        .loading-progress-container {
            width: 300px;
            max-width: 80%;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 10px;
        }

        .loading-progress-bar {
            height: 10px;
            background: linear-gradient(90deg, #28a745, #20c997);
            width: 0%;
            transition: width 0.3s ease;
            border-radius: 10px;
        }

        .loading-progress-text {
            color: #fff;
            font-size: 14px;
        }

        /* ===== Chat Bubble Icon - Always on Top ===== */
        #chatBubble {
            z-index: 10002 !important;
            position: fixed !important;
        }

