@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
@media screen and (max-width: 834px){
  table tr td div  {
    width: 100% !important;
  }

  table tr td div table tr td {
      display: inline-block;
      border: unset !important;
      width: 90% !important;
      margin-left: auto;
      margin-right: auto;
  }
}

/* ========================================
   音声読み上げボタン - 黄金色デザイン（完成版）
   Version: 2.0.0
   ======================================== */

.speech-reader-button {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #c9a961 100%);
    padding: 10px 15px;
    margin: 20px 0;
    border-radius: 2px;
    border-top: 2px solid #ffd700;
    border-bottom: 2px solid #b8860b;
    font-family: "游明朝", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", "MS PMincho", serif;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
    position: relative;
    overflow: hidden;
}

/* ボタングループ */
.speech-button-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ボタンスタイル */
.speech-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #6b4423;
    border: 2px solid #b8860b;
    padding: 5px 12px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "游明朝", "Yu Mincho", YuMincho, "Hiragino Mincho ProN", sans-serif;
    box-shadow: 0 2px 4px rgba(184, 134, 11, 0.3);
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.speech-btn:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    color: #4a2c0f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(184, 134, 11, 0.5);
    border-color: #daa520;
}

.speech-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(184, 134, 11, 0.3);
}

/* フォーカス表示（アクセシビリティ） */
.speech-btn:focus {
    outline: 2px solid #daa520;
    outline-offset: 2px;
}

.speech-btn:focus-visible {
    outline: 3px solid #daa520;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(218, 165, 32, 0.3);
}

/* アイコン */
.speech-btn .play-icon,
.speech-btn .pause-icon,
.speech-btn .stop-icon {
    display: inline-block;
    margin-right: 3px;
    font-size: 10px;
}

/* 速度設定グループ */
.speech-settings {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-left: 2px solid rgba(184, 134, 11, 0.5);
}

.speech-settings label {
    color: #4a2c0f;
    font-size: 10px;
    font-weight: 600;
    font-family: "游明朝", "Yu Mincho", YuMincho, sans-serif;
    letter-spacing: 0.02em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* スライダー */
#rateControl {
    width: 70px;
    vertical-align: middle;
    cursor: pointer;
    height: 4px;
    border-radius: 2px;
    outline: none;
    background: linear-gradient(90deg, #b8860b 0%, #daa520 100%);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #8b6914;
}

#rateControl:focus {
    outline: 2px solid #daa520;
    outline-offset: 2px;
}

#rateControl:focus-visible {
    outline: 3px solid #daa520;
    outline-offset: 3px;
}

#rateControl::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700 0%, #ffed4e 50%, #daa520 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(184, 134, 11, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
    border: 2px solid #b8860b;
}

#rateControl::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(184, 134, 11, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

#rateControl::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700 0%, #ffed4e 50%, #daa520 100%);
    cursor: pointer;
    border: 2px solid #b8860b;
    box-shadow: 0 2px 6px rgba(184, 134, 11, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

#rateControl::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(184, 134, 11, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

#rateControl::-moz-range-track {
    background: linear-gradient(90deg, #b8860b 0%, #daa520 100%);
    height: 4px;
    border-radius: 2px;
    border: 1px solid #8b6914;
}

#rateValue {
    color: #4a2c0f;
    font-weight: 600;
    font-family: "游明朝", "Yu Mincho", YuMincho, sans-serif;
    letter-spacing: 0.01em;
    font-size: 10px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    min-width: 2em;
    text-align: center;
}

/* 進行状況コンテナ */
#progressContainer {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(218, 165, 32, 0.15) 100%);
    padding: 8px 12px;
    border-radius: 2px;
    margin-top: 10px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid rgba(184, 134, 11, 0.4);
    border-bottom: 1px solid rgba(184, 134, 11, 0.4);
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(184, 134, 11, 0.1);
    animation: fadeInElegant 0.3s ease;
}

/* 時間表示 */
.progress-time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

#currentTime,
#progressPercent,
#totalTime {
    color: #6b4423;
    font-size: 9px;
    font-weight: 600;
    font-family: "游明朝", "Yu Mincho", YuMincho, sans-serif;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* 進行バーコンテナ */
#progressBarContainer {
    background: linear-gradient(90deg, rgba(70, 50, 20, 0.4) 0%, rgba(90, 70, 30, 0.4) 100%);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(184, 134, 11, 0.6);
}

#progressBarContainer:hover {
    background: linear-gradient(90deg, rgba(70, 50, 20, 0.5) 0%, rgba(90, 70, 30, 0.5) 100%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

#progressBarContainer:focus {
    outline: 2px solid #daa520;
    outline-offset: 2px;
}

#progressBarContainer:focus-visible {
    outline: 3px solid #daa520;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(218, 165, 32, 0.3), inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* 進行バー - 赤色で視認性向上 */
#progressBar {
    background: linear-gradient(90deg, #ff4444 0%, #ff6666 50%, #ff4444 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
    position: relative;
}

#progressBar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
}

/* ホバー時の進行バー効果 */
#progressBarContainer:hover #progressBar {
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.8);
}

/* ガイドテキスト */
.progress-guide-text {
    color: #6b4423;
    font-size: 8px;
    margin-top: 4px;
    text-align: center;
    font-family: "游明朝", "Yu Mincho", YuMincho, sans-serif;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* アニメーション効果 */
@keyframes fadeInElegant {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 装飾要素 - 黄金のアクセント */
.speech-reader-button::before {
    content: "✦";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffd700;
    font-size: 12px;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.6);
}

.speech-reader-button::after {
    content: "✦";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffd700;
    font-size: 12px;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.6);
}

/* 光沢効果 */
.speech-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 2px 2px 0 0;
    pointer-events: none;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .speech-reader-button {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .speech-reader-button::before,
    .speech-reader-button::after {
        font-size: 10px;
    }
    
    .speech-reader-button::before {
        left: 6px;
    }
    
    .speech-reader-button::after {
        right: 6px;
    }
    
    .speech-button-group {
        gap: 4px;
    }
    
    .speech-btn {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .speech-settings {
        padding: 0 8px;
        gap: 6px;
    }
    
    #rateControl {
        width: 60px;
    }
}

@media (max-width: 600px) {
    .speech-reader-button {
        flex-direction: column;
        gap: 8px;
    }
    
    .speech-settings {
        border-left: none;
        border-top: 2px solid rgba(184, 134, 11, 0.5);
        padding: 8px 0 0 0;
        width: 100%;
        justify-content: center;
    }
    
    .speech-button-group {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .speech-btn {
        padding: 4px 9px;
        font-size: 9px;
    }
    
    .speech-btn .play-icon,
    .speech-btn .pause-icon,
    .speech-btn .stop-icon {
        font-size: 9px;
    }
    
    .speech-settings label {
        font-size: 9px;
    }
    
    #rateControl {
        width: 55px;
        height: 3px;
    }
    
    #rateControl::-webkit-slider-thumb {
        width: 12px;
        height: 12px;
    }
    
    #rateControl::-moz-range-thumb {
        width: 12px;
        height: 12px;
    }
    
    #progressContainer {
        padding: 6px 10px;
    }
    
    #currentTime,
    #progressPercent,
    #totalTime {
        font-size: 8px;
    }
    
    .progress-guide-text {
        font-size: 7px;
    }
    
    #progressBarContainer {
        height: 5px;
    }
}

/* 印刷時は非表示 */
@media print {
    .speech-reader-button {
        display: none !important;
    }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .speech-btn {
        border-width: 3px;
    }
    
    #progressBar {
        background: #ff4444;
    }
    
    .speech-reader-button {
        border-width: 3px;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .speech-reader-button {
        background: linear-gradient(135deg, #b8860b 0%, #daa520 50%, #8b6914 100%);
        border-top-color: #daa520;
        border-bottom-color: #8b6914;
    }
    
    .speech-btn {
        background: linear-gradient(135deg, #daa520 0%, #c9a961 100%);
        color: #2c1810;
    }
    
    .speech-btn:hover {
        background: linear-gradient(135deg, #ffd700 0%, #daa520 100%);
    }
    
    .speech-settings label,
    #rateValue,
    #currentTime,
    #progressPercent,
    #totalTime,
    .progress-guide-text {
        color: #2c1810;
    }
}

/* 動きを減らす設定に対応 */
@media (prefers-reduced-motion: reduce) {
    .speech-btn,
    #progressBar,
    #progressContainer,
    #rateControl::-webkit-slider-thumb,
    #rateControl::-moz-range-thumb {
        transition: none;
    }
    
    #progressContainer {
        animation: none;
    }
}

/* スクリーンリーダー用の非表示テキスト */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Rank Mathパンくずリスト */
.breadcrumb-wrapper {
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.rank-math-breadcrumb {
  font-size: 14px;
  color: #666;
}

.rank-math-breadcrumb a {
  color: #0066cc;
  text-decoration: none;
}

.rank-math-breadcrumb a:hover {
  text-decoration: underline;
}

/*
==========================================
Cocoonのテーブルデフォルトスタイルを無効化
記事内のインラインスタイルを優先させる
==========================================
*/

/* Cocoonのテーブルヘッダーデフォルトスタイルをリセット */
.entry-content table th,
.entry-content table thead th {
    background-color: transparent !important;
    color: inherit !important;
}

/* ただし、インラインスタイルがある場合はそちらを優先 */
.entry-content table th[style*="background-color"],
.entry-content table th[style*="color"] {
    background-color: revert !important;
    color: revert !important;
}

/* ============================================
   投稿タイトルの装飾（金色の左線＋シャドウ）
   縦幅コンパクト版
   ============================================ */

.article h1.entry-title {
    background: #FFFFFF;
    padding: 25px 50px;
    margin: 30px 0 40px 0;
    border-left: 8px solid #FFD700;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.6;
    color: #333;
}

.article h1.entry-title:hover {
    box-shadow: 0 6px 24px rgba(255, 215, 0, 0.25);
    transform: translateX(2px);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .article h1.entry-title {
        padding: 20px 25px;
        font-size: 24px;
        border-left-width: 5px;
        margin: 20px 0 30px 0;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .article h1.entry-title {
        font-size: 28px;
        padding: 22px 40px;
    }
}