body {
        font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont,
          sans-serif;
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        margin: 0;
        padding: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        color: #333;
      }
      #app {
        background: #fff;
        width: 100%;
        max-width: 1200px;
        padding: 28px;
        border-radius: 16px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
      }
      button {
        background: #1976d2;
        border: none;
        border-radius: 8px;
        color: #fff;
        padding: 12px 24px;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        display: flex;
        align-items: center;
        gap: 8px;
      }
      button:hover {
        background: #1565c0;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
      }
      button.recording {
        background: #d32f2f;
        animation: pulse 2s infinite;
      }
      @keyframes pulse {
        0% {
          box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
        }
        70% {
          box-shadow: 0 0 0 10px rgba(211, 47, 47, 0);
        }
        100% {
          box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
        }
      }
      .transcripts-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-top: 20px;
        height: 500px;
        min-height: 400px;
      }
      .transcript-box {
        background: #fafafa;
        padding: 0;
        border-radius: 12px;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
      }
      .transcript-header {
        font-weight: 500;
        margin: 0;
        padding: 15px 20px 10px 20px;
        color: #555;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #fafafa;
        border-bottom: 1px solid #eee;
        flex-shrink: 0;
      }
      .transcript-header .language-indicator {
        background: #e0e0e0;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 0.8em;
        font-weight: bold;
      }
      .transcript {
        flex: 1;
        white-space: pre-wrap;
        line-height: 1.6;
        overflow-y: auto;
        overflow-x: hidden;
        font-size: 16px;
        padding: 15px 20px;
        background: #fff;
        border-radius: 0 0 12px 12px;
        border: none;
        box-shadow: none;
        word-wrap: break-word;
        scroll-behavior: smooth;
      }

      /* カスタムスクロールバー */
      .transcript::-webkit-scrollbar {
        width: 8px;
      }
      .transcript::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
      }
      .transcript::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
      }
      .transcript::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
      }

      /* 自動スクロール用のアニメーション */
      .transcript.auto-scrolling {
        scroll-behavior: smooth;
      }

      /* ストリーミング表示用のスタイル */
      .transcript .streaming {
        opacity: 0.9;
        background: linear-gradient(90deg, 
          rgba(25, 118, 210, 0.1) 0%, 
          rgba(25, 118, 210, 0.05) 50%, 
          transparent 100%);
        border-radius: 4px;
        padding: 2px 4px;
        margin: 0 2px;
        position: relative;
        animation: streamingPulse 1.5s ease-in-out infinite;
      }
      
      .transcript .streaming::after {
        content: '';
        display: inline-block;
        width: 2px;
        height: 1.2em;
        background: #1976d2;
        animation: cursorBlink 1s infinite;
        margin-left: 2px;
        vertical-align: middle;
      }
      
      @keyframes streamingPulse {
        0%, 100% {
          background: linear-gradient(90deg, 
            rgba(25, 118, 210, 0.1) 0%, 
            rgba(25, 118, 210, 0.05) 50%, 
            transparent 100%);
        }
        50% {
          background: linear-gradient(90deg, 
            rgba(25, 118, 210, 0.15) 0%, 
            rgba(25, 118, 210, 0.1) 50%, 
            rgba(25, 118, 210, 0.05) 100%);
        }
      }
      
      @keyframes cursorBlink {
        0%, 50% {
          opacity: 1;
        }
        51%, 100% {
          opacity: 0;
        }
      }

      .control-panel {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding: 20px;
        background: rgba(0, 0, 0, 0.02);
        border-radius: 12px;
        border: 1px solid #eaeaea;
      }
      .input-group {
        display: flex;
        align-items: center;
        gap: 15px;
        flex-wrap: wrap;
      }
      .source-select {
        padding: 10px 15px;
        border-radius: 8px;
        border: 1px solid #ddd;
        min-width: 220px;
        font-size: 15px;
        appearance: none;
        background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e")
          no-repeat right 10px center/15px;
        cursor: pointer;
      }
      .status-controls {
        display: flex;
        align-items: center;
        gap: 15px;
      }
      .clear-btn {
        background: transparent;
        color: #888;
        padding: 2px 6px;
        box-shadow: none;
        font-size: 12px;
      }
      .clear-btn:hover {
        background: rgba(0, 0, 0, 0.05);
        transform: none;
        box-shadow: none;
        color: #d32f2f;
      }
      .mode-toggle-container {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
      }
      .mode-toggle {
        display: flex;
        background: #f1f1f1;
        border-radius: 30px;
        overflow: hidden;
        padding: 4px;
        margin-top: 10px;
      }
      .mode-toggle.left-aligned {
        justify-self: flex-start;
        margin-left: 0;
      }
      .mode-toggle-container:has(.left-aligned) {
        justify-content: flex-start;
      }
      .mode-option {
        padding: 10px 20px;
        cursor: pointer;
        font-weight: 500;
        transition: all 0.3s ease;
        font-size: 14px;
        background: transparent;
        color: #555;
        border: none;
      }
      .mode-option.active {
        background: #1976d2;
        color: white;
        border-radius: 25px;
      }
      .voice-select-container {
        margin-left: 20px;
        display: flex;
        align-items: center;
      }
      .voice-select {
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid #ddd;
        font-size: 14px;
        margin-left: 8px;
      }
      
      /* 音声読み上げ切り替えコントロール */
      .voice-playback-toggle-container {
        margin-left: 20px;
        display: flex;
        align-items: center;
      }
      
      .voice-playback-checkbox {
        margin-right: 8px;
      }
      
      .voice-playback-label {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 14px;
        cursor: pointer;
        color: #333;
      }
      
      .voice-playback-label .material-icons {
        font-size: 18px;
      }
      
      .voice-playback-checkbox:not(:checked) + .voice-playback-label .material-icons {
        color: #999;
      }
      
      .voice-playback-checkbox:not(:checked) + .voice-playback-label {
        color: #999;
      }
      
      .audio-player {
        width: 100%;
        margin-top: 10px;
      }

      /* オーディオレベルメーター */
      .level-meter-container {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: 15px;
      }
      .level-meter {
        width: 150px;
        height: 15px;
        background: #e0e0e0;
        border-radius: 4px;
        overflow: hidden;
        position: relative;
      }
      .level-meter-fill {
        height: 100%;
        width: 0%;
        background: linear-gradient(to right, #4caf50, #ffc107, #f44336);
        transition: width 0.1s ease;
        border-radius: 4px;
      }
      .level-meter-label {
        font-size: 12px;
        color: #666;
      }

      /* デバッグ情報のスタイル */
      .debug-container {
        background: #f8f8f8;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
      }
      .debug-log-entry {
        padding: 4px 8px;
        border-bottom: 1px solid #eee;
      }
      .debug-log-entry.send {
        background-color: rgba(200, 230, 255, 0.2);
      }
      .debug-log-entry.receive {
        background-color: rgba(200, 255, 200, 0.2);
      }
      .debug-log-entry.error {
        background-color: rgba(255, 200, 200, 0.3);
      }
      .debug-timestamp {
        color: #666;
        font-size: 10px;
        margin-right: 5px;
      }

      /* ▼ ② VAD パネルの開閉 */
      .vad-panel {
        display: none;
        gap: 8px;
      }
      .vad-panel label {
        font-size: 12px;
      }

      /* ノイズリダクション設定のスタイル */
      .noise-select {
        margin-right: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
      }

      /* 即時再生モード用のスタイル */
      .immediate-playback-container {
        display: flex;
        align-items: center;
        margin-left: 10px;
        gap: 8px;
      }
      .immediate-playback-checkbox {
        width: 16px;
        height: 16px;
      }

      /* 全画面モード切り替えボタン用スタイル */
      .fullscreen-switch {
        position: absolute;
        top: 20px;
        right: 20px;
        display: flex;
        gap: 10px;
      }
      
      .fullscreen-button,
      .mobile-button {
        display: flex;
        align-items: center;
        gap: 8px;
        background: rgba(25, 118, 210, 0.1);
        color: #1976d2;
        text-decoration: none;
        padding: 8px 16px;
        border-radius: 20px;
        font-weight: 500;
        transition: all 0.2s ease;
      }
      
      .fullscreen-button:hover,
      .mobile-button:hover {
        background: rgba(25, 118, 210, 0.2);
        transform: translateY(-2px);
      }
      
      .mobile-button {
        background: rgba(76, 175, 80, 0.1);
        color: #4caf50;
      }
      
      .mobile-button:hover {
        background: rgba(76, 175, 80, 0.2);
      }
      
      .fullscreen-button .material-icons,
      .mobile-button .material-icons {
        font-size: 18px;
      }

      /* モバイルデバイスでは通常モードのボタンを非表示 */
      @media (max-width: 768px) {
        .fullscreen-switch {
          display: none;
        }
      }

      /* プッシュトゥートーク説明（洗練されたUI） */
      .ptt-instructions-elegant {
        margin-top: 12px;
        padding: 12px 16px;
        background: linear-gradient(135deg, rgba(245, 247, 250, 0.8), rgba(250, 250, 250, 0.9));
        border: 1px solid rgba(25, 118, 210, 0.15);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
      }

      .ptt-instructions-elegant:hover {
        border-color: rgba(25, 118, 210, 0.25);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      }

      .ptt-elegant-content {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
      }

      .ptt-elegant-label {
        font-size: 13px;
        color: #555;
        font-weight: 500;
        letter-spacing: 0.3px;
        opacity: 0.8;
      }

      .ptt-elegant-keys {
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
      }

      .ptt-key-item {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 12px;
        color: #666;
        font-weight: 400;
      }

      .ptt-key-item kbd {
        background: linear-gradient(135deg, #1976d2, #1565c0);
        color: white;
        padding: 3px 7px;
        border-radius: 4px;
        font-family: 'Courier New', monospace;
        font-size: 11px;
        font-weight: 600;
        box-shadow: 0 1px 3px rgba(25, 118, 210, 0.3);
        border: none;
        min-width: 18px;
        text-align: center;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease;
      }

      .ptt-key-item:hover kbd {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(25, 118, 210, 0.4);
      }

      /* レスポンシブ対応 */
      @media (max-width: 768px) {
        .ptt-instructions-elegant {
          margin-top: 8px;
          padding: 10px 12px;
        }
        
        .ptt-elegant-label {
          font-size: 12px;
        }
        
        .ptt-elegant-keys {
          gap: 12px;
        }
        
        .ptt-key-item {
          font-size: 11px;
        }
        
        .ptt-key-item kbd {
          padding: 2px 5px;
          font-size: 10px;
        }
      }
