  /* body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 20px; max-width: 700px; background: #f4f7f6; color: #333; line-height: 1.6; }
        .card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
        h3 { margin-top: 0; color: #007bff; font-size: 18px; } */
        
        /* select, textarea { width: 100%; padding: 12px; box-sizing: border-box; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; margin-bottom: 15px; background: #fff; } */
         select{ padding: 5px; box-sizing: border-box; border: 1px solid #ddd; border-radius: 5px; font-size: 12px; margin-bottom: 15px; background: #fff;float: right; }
        /* textarea { height: 120px; resize: vertical; } */

        /* .controls { display: flex; gap: 10px; margin-bottom: 20px; }
        button { padding: 15px; cursor: pointer; border: none; border-radius: 8px; font-weight: bold; flex: 1; font-size: 16px; transition: 0.2s; } */

        .controls { width: 50%;float:right;  display: flex; gap: 10px; margin-bottom: 5px; }
        button { padding: 5px; cursor: pointer; border: none; border-radius: 5px; font-weight: bold; font-size: 12px; transition: 0.2s; }
        
        /* .btn-play { background: #bad0e7; color: #333; }
        .btn-pause { background: #f4eedc; color: #333; }
        .btn-stop { background: #cad6e1; color: ＃333; } */
        button:hover { opacity: 0.8; transform: translateY(-1px); }
        button:active { transform: translateY(0); }

        /* #displayArea { font-size: 24px; padding: 25px; background: #fafafa; border: 2px solid #007bff; border-radius: 10px; min-height: 120px; white-space: pre-wrap; word-wrap: break-word; } */
        #displayArea {display: none;}
        .highlight { background: #fff176; padding: 2px 4px; border-radius: 4px; }
        .status { font-size: 12px; color: #999; text-align: right; margin-top: 5px; }

  /* 画面全体のレイアウト調整 */
    body {
      /* margin: 0;
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      background-color: #f0f2f5; */
    }

    /* ボタンを並べるコンテナ */
    /* .control-container {
     
      background-color: #ffffff;
      padding: 0 5px;
      border-radius: 30px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
      align-items: center;
      float: right;
    } */

    /* 共通のベーススタイル */
    .btn {
      width: 30px;
      height: 30px;
      background-color: #ccc;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      transition: background-color 0.2s ease, transform 0.2s ease;
      float: right;
      margin-left: 5px;
    }

    .btn:hover {
      background-color: #007bff;
      transform: scale(1.08);
    }
    .btn:active {
      transform: scale(0.95);
    }

    /* ==========================================
       【メイン】再生 / 一時停止の切り替えボタン
    ========================================== */
    
    /* 共通設定：アイコンを絶対配置で重ねる */
    .icon-play, .icon-pause {
      position: absolute;
      transition: opacity 0.2s ease, transform 0.2s ease;
    }

    /* 1. 再生アイコン（三角形） */
    .icon-play {
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 8px 0 8px 15px;
      border-color: transparent transparent transparent #ffffff;
      margin-left: 4px;  */
      /* 重心の微調整 */
     }

    /* 2. 一時停止アイコン（2本線） */
    .icon-pause {
      display: flex;
      gap: 5px;
    }
    .icon-pause::before,
    .icon-pause::after {
      content: "";
      display: block;
      width: 5px;
      height: 15px;
      background-color: #ffffff;
      border-radius: 2px;
    }

    /* ------------------------------------------
       表示・非表示の切り替え（クラスによる制御）
    ------------------------------------------ */
    
    /* 初期状態（再生待ち）: 一時停止アイコンを隠す */
    .btn-toggle .icon-pause {
      opacity: 0;
      transform: scale(0.5);
      pointer-events: none;
    }

    /* 再生中（.playingクラスがついた時）: 再生アイコンを隠し、一時停止アイコンを出す */
    .btn-toggle.playing .icon-play {
      opacity: 0;
      transform: scale(0.5);
      pointer-events: none;
    }
    .btn-toggle.playing .icon-pause {
      opacity: 1;
      transform: scale(1);
    }


    /* ==========================================
       停止ボタン（正方形）
    ========================================== */
    .btn-stop::after {
      content: "";
      display: block;
      width: 15px;
      height: 15px;
      background-color: #ffffff;
      border-radius: 3px;
    }

    .voice-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: #0066cc;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background-color 0.2s;
}

.voice-read-btn:hover {
  background-color: #004999;
}

/* スピーカーの本体部分 */
.voice-read-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
}

.voice-read-icon::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 6px;
  height: 8px;
  background-color: #ccc;
}

/* スピーカーのコーン部分 */
.voice-read-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 10px;
  border-style: solid;
  border-width: 3px 6px 3px 0;
  border-color: #ccc;
}

   /* 全体の横並びとレイアウト調整 */
  .control-container {
    display:inline-flex;
    align-items: center;
    /* gap: 10px;  */
    flex-wrap: nowrap;   /* 画面が狭くても絶対に折り返さない */
    background: #fff;
    /* padding: 10px; */
    font-family: sans-serif;
    width: auto;
    float: right;
  }

  /* 各要素の配置設定 */
  .voice-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .progress-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;             /* プログレスバーエリアを可能な限り広く伸ばす */
    min-width: 80px;
  }

  .progress-slider {
    width: 100%;
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
    outline: none;
    margin: 0;
  }

  .progress-num {
    font-size: 12px;
    color: #666;
    font-family: monospace;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .speed-group {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
  }

  /* ボタン類の共通スタイル */
  /* .btn {
    padding: 0;         
    cursor: pointer;
    border: 1px solid #ccc;
    font-weight: bold;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
  } */

  /* 横長カプセル型（倍速ボタン） */
  .btn-speed {
    width: 32px;
    height: 32px;
    border-radius: 30px;
    background: #ccc;
    color: #fff;
  }
  .btn-speed.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
  }

  /* ★完全な正円（再生・一時停止・停止ボタン） */
  .btn-circle {
    width: 36px;         /* 操作ボタンは少しだけ大きくして押しやすく */
    height: 36px;
    border-radius: 50%;  /* 50%にすることで完全な正円になります */
  }
/* 
  .btn-stop {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
  }
  .btn-toggle {
    background: #007bff;
    color: white;
    border-color: #007bff;
  } */

  /* 再生・一時停止のアイコン切り替え（playingクラス連動） */
  /* .btn-toggle .icon-pause { display: none; }
  .btn-toggle .icon-play { display: inline; }
  .btn-toggle.playing { background: #ffc107; color: #333; border-color: #ffc107; }
  .btn-toggle.playing .icon-pause { display: inline; }
  .btn-toggle.playing .icon-play { display: none; } */

  /* ★文字を排除し、シンプルな記号のみにデザインを統一 */
  /* .icon-play::before { content: "▶"; font-size: 14px; margin-left: 2px; } 
  .icon-pause::before { content: "⏸"; font-size: 14px; }
  .btn-stop::before { content: "■"; font-size: 12px; } */

