@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
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/

/* =========================================================
   ★★ 追加（最重要）：ページ全体の横スクロールを禁止
   - テーブルは wrapper 内で横スクロールさせる
   ========================================================= */
html,
body {
    overflow-x: hidden;
}

/* WordPressのカスタムCSS用 - チャット表示スタイル */

/* 基本的なページレイアウト */
.page-container {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    font-family: "Hiragino Kaku Gothic Pro", "Meiryo", sans-serif;
}

.race-info-header {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* Purple background removed */
    background-color: #f8f9fa;
    /* Example fallback background */
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.race-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.race-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    font-size: 14px;
}

.race-detail-item {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

/* チャットコンテナ */
.chat-container {
    flex: 1;
    padding: 20px;
    background-color: #f8f9fa;
    overflow-y: auto;
}

/* メッセージスタイル */
.message {
    display: flex;
    margin-bottom: 15px;
    animation: slideIn 0.3s ease-out;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
}

.message-content {
    flex: 1;
    max-width: calc(100% - 70px);
}

.agent-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.timestamp {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
}

.bubble {
    background: #fff;
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
}

/* エージェント別スタイリング */
.amane .bubble {
    background-color: #e8f5e8;
    border-left: 4px solid #4caf50;
}

.rin .bubble {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.misaki .bubble {
    background-color: #fce4ec;
    border-left: 4px solid #e91e63;
}

.yuzuha .bubble {
    background-color: #f3e5f5;
    border-left: 4px solid #9c27b0;
}

.kanade .bubble {
    background-color: #fffde7;
    border-left: 4px solid #ffeb3b;
}

.whiteboard .bubble {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: 4px solid #6c757d;
    font-family: 'Courier New', monospace;
}

/* 日本語の名前も対応 */
.朝霧.天音 .bubble,
.朝霧天音 .bubble {
    background-color: #e8f5e8;
    border-left: 4px solid #4caf50;
}

.鞍馬.凛 .bubble,
.鞍馬凛 .bubble {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.小鳥遊.美咲 .bubble,
.小鳥遊美咲 .bubble {
    background-color: #fce4ec;
    border-left: 4px solid #e91e63;
}

.白雪.柚葉 .bubble,
.白雪柚葉 .bubble {
    background-color: #f3e5f5;
    border-left: 4px solid #9c27b0;
}

.七海.奏 .bubble,
.七海奏 .bubble {
    background-color: #fffde7;
    border-left: 4px solid #ffeb3b;
}

/* 桃井杏 (ANZU) - Sakura Color（統合版） */
.anzu .bubble,
.桃井.杏 .bubble,
.桃井杏 .bubble {
    background-color: #fce4ec;
    border-left: 4px solid #ec407a;
}

/* ========================================
   修正1: 吹き出し内マークダウン要素のスタイル強化
   ======================================== */

/* message-body 構造のスタイル定義 */
.message-body {
    font-size: 14px;
    line-height: 1.6;
}

.message-body>*:first-child {
    margin-top: 0;
}

.message-body>*:last-child {
    margin-bottom: 0;
}

.message-body h1,
.message-body h2,
.message-body h3 {
    margin: 12px 0 8px 0;
    color: #333;
}

.message-body ul,
.message-body ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-body li {
    margin: 4px 0;
}

.message-body table.markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}

.message-body table.markdown-table th,
.message-body table.markdown-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: left;
}

.message-body table.markdown-table th {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: bold;
}

.message-body pre {
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-body code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* 既存のマークダウンスタイル（後方互換性維持） */
.bubble h1,
.bubble h2,
.bubble h3,
.bubble h4,
.bubble h5,
.bubble h6 {
    margin: 8px 0 6px 0;
    color: #333;
}

.bubble h1 {
    font-size: 1.3em;
    color: #e74c3c;
}

.bubble h2 {
    font-size: 1.2em;
    color: #27ae60;
}

.bubble h3 {
    font-size: 1.1em;
    color: #f39c12;
}

.bubble ul,
.bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.bubble li {
    margin: 4px 0;
}

.bubble strong {
    font-weight: bold;
    color: #2c3e50;
}

.bubble em {
    font-style: italic;
    color: #7f8c8d;
}

.bubble code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.bubble table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
    font-size: 0.9em;
}

.bubble th,
.bubble td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: left;
}

.bubble th {
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: bold;
}

/* アニメーション */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cocoon Chat Styles */
.cocoon-chat-container {
    margin: 1em 0;
    font-family: "Segoe UI", "Meiryo", sans-serif;
    max-width: 95%;
}

.cocoon-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1em;
    padding: 0.5em 0;
}

.cocoon-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 0.9em;
    color: #fff;
    flex-shrink: 0;
}

.cocoon-agent-name {
    font-weight: bold;
    font-size: 0.95em;
    margin-bottom: 0.2em;
}

.cocoon-timestamp {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 0.3em;
}

.cocoon-bubble {
    background: #f1f1f1;
    border-radius: 18px;
    padding: 0.8em 1em;
    max-width: 85%;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.天音-bubble {
    --bubble-color: #ccfbe9;
}

/* Agent-specific bubble colors */
.kanon .cocoon-bubble {
    background: #FFB6C1;
    border-left: 4px solid #FFB6C1;
}

.toru .cocoon-bubble {
    background: #90EE90;
    border-left: 4px solid #90EE90;
}

.hana .cocoon-bubble {
    background: #87CEEB;
    border-left: 4px solid #87CEEB;
}

.miho .cocoon-bubble {
    background: #DDA0DD;
    border-left: 4px solid #DDA0DD;
}

.yuki .cocoon-bubble {
    background: #F0E68C;
    border-left: 4px solid #F0E68C;
}

.teruo .cocoon-bubble {
    background: #98FB98;
    border-left: 4px solid #98FB98;
}

/* 新規ウマバト！エージェントカラー */
.misaki .cocoon-bubble {
    background: #f397a5;
    border-left: 4px solid #f397a5;
}

.amane .cocoon-bubble {
    background: #90EE90;
    border-left: 4px solid #90EE90;
}

.rin .cocoon-bubble {
    background: #87CEEB;
    border-left: 4px solid #87CEEB;
}

.kanade .cocoon-bubble {
    background: #F0E68C;
    border-left: 4px solid #F0E68C;
}

.yuzuha .cocoon-bubble {
    background: #ddb2dd;
    border-left: 4px solid #ddb2dd;
}

.whiteboard .cocoon-bubble {
    background: #D3D3D3;
    border-left: 4px solid #D3D3D3;
}

.cocoon-bubble::after {
    content: "";
    width: 0;
    height: 0;
    border-style: solid;
    border-color: transparent var(--bubble-color) transparent transparent;
    border-width: 12px 48px 12px 0px;
    position: absolute;
    top: -12px;
    left: -33px;
    rotate: 30deg;
    content: none;
}

.cocoon-message-content {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 50px);
}

/* Adjust avatar images */
.cocoon-avatar img {
    width: 60px;
    height: auto;
    border-radius: 50%;
    margin-right: 10px;
}

/* Right-side messages */
.cocoon-message.reverse {
    flex-direction: row-reverse;
}

.cocoon-message.reverse .cocoon-avatar {
    margin-left: 10px;
    margin-right: 0;
}

.cocoon-message.reverse .cocoon-message-content {
    align-items: flex-end;
}

/* ベッティングダッシュボード CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    /* Purple background removed */
    background-color: #f0f2f5;
    /* Example fallback background */
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    /* max-width: 1400px; */
    margin: 0 auto;
    padding: 0px;
}

/* ヘッダー */
#header-container,
#header-container .navi {
    background: #306BB2;
}

#navi .navi-in a {
    color: #fff;
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 i {
    margin-right: 15px;
    color: #3498db;
}

.load-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.load-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.load-btn i {
    margin-right: 8px;
}

/* サマリーセクション */
.summary-section {
    margin-bottom: 30px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 3em;
    margin-right: 20px;
    color: #3498db;
}

.card-content h3 {
    /*font-size: 2.2em; */
    color: #2c3e50;
    margin-bottom: 5px;
}

.card-content p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* フィルターセクション */
.filter-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.filter-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3498db;
}

.filter-group input {
    min-width: 200px;
}

/* ベッティングパネル */
.betting-panels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 25px;
}

.betting-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 5px solid #3498db;
    animation: fadeIn 0.5s ease-out;
}

.betting-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.betting-panel.violation {
    border-left-color: #e74c3c;
}

.betting-panel.valid {
    border-left-color: #27ae60;
}

.panel-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.agent-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.status-valid {
    background: #d4edda;
    color: #155724;
}

.status-violation {
    background: #f8d7da;
    color: #721c24;
}

.panel-content {
    padding: 20px;
}

.info-section {
    margin-bottom: 20px;
}

.info-section h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.race-info {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #4a7c59;
}

.race-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.race-info-item:last-child {
    margin-bottom: 0;
}

.race-info-label {
    font-weight: 600;
    color: #495057;
}

.race-info-value {
    color: #6c757d;
}

.budget-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e8f4fd;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.budget-label {
    font-weight: 600;
    color: #2c3e50;
}

.budget-amount {
    font-size: 1.3em;
    font-weight: bold;
    color: #3498db;
}

.budget-amount.over-limit {
    color: #e74c3c;
}

.main-pick {
    background: #fff3cd;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-bottom: 15px;
}

.main-pick-label {
    font-size: 0.9em;
    color: #856404;
    margin-bottom: 5px;
}

.main-pick-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #856404;
}

.bets-list {
    margin-bottom: 20px;
}

.bet-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.bet-item:hover {
    background: #e9ecef;
}

.bet-item.invalid {
    border-color: #dc3545;
    background: #f8d7da;
}

.bet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bet-type {
    font-weight: bold;
    color: #495057;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.bet-amount {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1em;
}

.bet-horses {
    color: #6c757d;
    margin-bottom: 5px;
}

.bet-description {
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
}

.violations-section {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.violations-title {
    color: #721c24;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.violations-title i {
    margin-right: 8px;
}

.violation-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    color: #721c24;
    font-size: 0.9em;
}

.violation-item:last-child {
    margin-bottom: 0;
}

.strategy-section {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    padding: 15px;
    border-radius: 8px;
}

.strategy-title {
    color: #0c5460;
    font-weight: bold;
    margin-bottom: 8px;
}

.strategy-content {
    color: #0c5460;
    font-size: 0.95em;
    line-height: 1.5;
}

.reasoning-section {
    background: #f7f7f7;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #6c757d;
    margin-top: 15px;
}

.reasoning-title {
    color: #495057;
    font-weight: bold;
    margin-bottom: 8px;
}

.reasoning-content {
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.5;
}

/* データなしメッセージ */
.no-data {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.no-data i {
    font-size: 4em;
    color: #95a5a6;
    margin-bottom: 20px;
}

.no-data p {
    font-size: 1.2em;
    color: #7f8c8d;
}

/* Blog Template CSS for Horse Racing Prediction Blog Generation */
/* Version: v2.1.0 */
/* Created: 2025-01-19 */
/* Description: Styling for generated horse racing blog articles */

body.blog-body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.8;
    color: #333;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fafafa;
}

.blog-body .container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-body .header {
    text-align: center;
    border-bottom: 3px solid #2c5530;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.blog-body h1 {
    color: #2c5530;
    margin-bottom: 10px;
    font-size: 2.2em;
}

.blog-body h2 {
    color: #2c5530;
    border-left: 4px solid #4a7c59;
    padding-left: 15px;
    margin: 30px 0 15px 0;
    font-size: 1.5em;
}

.blog-body h3 {
    color: #4a7c59;
    margin: 25px 0 10px 0;
    font-size: 1.3em;
}

.blog-body .meta-info {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.blog-body .favorite-horse {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
}

.blog-body .favorite-horse h3 {
    color: #dc3545;
    margin-top: 0;
}

.blog-body .blog-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid #e9ecef;
    text-align: justify;
}

.blog-body .author-info {
    text-align: right;
    color: #666;
    font-style: italic;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.blog-body .seo-keywords {
    margin-top: 30px;
    font-size: 0.9em;
    color: #888;
    text-align: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 5px;
}

.blog-body .blog-type {
    display: inline-block;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Blog type specific colors */
.blog-body .blog-type.prediction {
    background: #007bff;
}

.blog-body .blog-type.review {
    background: #dc3545;
}

.blog-body strong {
    color: #2c5530;
    font-weight: 600;
}

.blog-body em {
    color: #666;
    font-style: italic;
}

.blog-body .highlight {
    background: linear-gradient(transparent 60%, #ffeb3b 60%);
    padding: 2px 4px;
    font-weight: bold;
}

.blog-body ul,
.blog-body ol {
    padding-left: 20px;
}

.blog-body li {
    margin-bottom: 8px;
}

.blog-body p {
    margin-bottom: 1.2em;
}

/* Race entries styling */
.blog-body .race-entries {
    margin: 15px 0;
}

.blog-body .race-entries li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.blog-body .race-entries li:last-child {
    border-bottom: none;
}

/* Winner styling */
.blog-body .winner {
    background: linear-gradient(135deg, #fff9c4 0%, #ffecb3 100%);
    padding: 8px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
    font-weight: bold;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スクロールバーカスタマイズ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Panel styling */
.prediction-panels,
.review-panels {
    margin: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.panels-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.agent-panel {
    margin: 15px 0;
    padding: 20px;
    border-radius: 12px;
    border-left: 6px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.agent-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.agent-panel.success {
    border-left-color: #4caf50;
}

.agent-panel.warning {
    border-left-color: #ff9800;
}

.agent-panel.danger {
    border-left-color: #f44336;
}

.agent-panel-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-avatar-fallback {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.panel-title-text {
    flex: 1;
}

.panel-content {
    font-size: 14px;
    line-height: 1.6;
}

.prediction-item,
.result-item {
    margin: 8px 0;
    padding: 5px 0;
}

.betting-details,
.betting-results {
    margin: 12px 0;
}

.betting-list,
.results-list {
    margin: 8px 0;
    padding-left: 20px;
}

.betting-list li,
.results-list li {
    margin: 4px 0;
    padding: 2px 0;
}

.prediction-comment,
.review-comment {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-style: italic;
}

.result-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.recovery-rate {
    font-weight: bold;
    font-size: 16px;
}

.tg-afi-area {
    background: #FEF7EB;
    margin: 0 20px;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
}

.tg-afi-area p {
    margin: 0;
}

.tg-afi-area .tg-afi-area-text {
    margin-bottom: 10px;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/

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

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

/* 768px以下 */
@media (max-width: 768px) {

    .page-container,
    .blog-body {
        max-width: 100%;
        padding: 10px;
    }

    .race-info-header {
        padding: 15px;
    }

    .race-title {
        font-size: 20px;
    }

    .chat-container {
        padding: 15px;
    }

    /* =========================================================
     ★★ 修正：負のmarginがページ横スクロールを誘発するため無効化
     ========================================================= */
    .page-shell .bubble {
        margin-left: 0 !important;
    }

    /*（元の .bubble { margin-left: -10vw; } は無効化）*/

    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .dashboard-header h1 {
        font-size: 2em;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group input {
        min-width: auto;
    }

    .betting-panels {
        grid-template-columns: 1fr;
    }

    .bet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .blog-body .container {
        padding: 20px;
    }

    .blog-body h1 {
        font-size: 1.8em;
    }

    .blog-body h2 {
        font-size: 1.3em;
    }

    .blog-body .blog-content {
        padding: 20px;
    }

    .blog-body .race-info {
        padding: 15px;
    }

    .tg-afi-area {
        margin: 0;
    }

    .tg-afi-area p {
        font-size: calc(14 / 412 * 100vw);
    }

    /* 修正5: message-bodyテーブルのレスポンシブ対応 */
    .message-body table.markdown-table {
        font-size: 11px;
    }

    .message-body table.markdown-table th,
    .message-body table.markdown-table td {
        padding: 4px 6px;
    }
}

/*480px以下*/
@media screen and (max-width: 480px) {
    .panel-content {
        padding: 15px;
    }

    .budget-info {
        flex-direction: column;
        gap: 5px;
    }

    .summary-card {
        flex-direction: column;
        text-align: center;
    }

    .card-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Print styles */
@media print {
    body.blog-body {
        background-color: white;
        padding: 0;
    }

    .blog-body .container {
        box-shadow: none;
        padding: 20px;
    }

    .blog-body .seo-keywords {
        display: none;
    }
}

/* ========================================================================== */
/* MERGED NEW STYLES (Scoped to .page-shell where possible) */
/* ========================================================================== */

/**
 * 会話HTML共通スタイル
 * PREP/PREDICTION/RETROSPECT の3モードで共有するスタイル定義。
 * hero/timeline/table構造の統一スタイル。
 */

/* ========================================
   グローバル設定
   ======================================== */

.page-shell {
    font-family: "Hiragino Kaku Gothic Pro", "Meiryo", "Yu Gothic", sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;

    /* =========================================================
     ★★ 追加：page-shell 自体も横方向に伸びないようにする
     ========================================================= */
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
    /* ページ（外側）横スクロール禁止 */
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   ページコンテナ
   ======================================== */

.page-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   ヒーローセクション（共通）
   ======================================== */

.conversation-hero {
    display: none;
}

.conversation-hero.race-header {
    background: linear-gradient(135deg, #2d5016 0%, #3a6b1e 100%);
    border: 8px solid #8b6914;
    border-radius: 8px;
    margin: 20px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.2);
    position: relative;
}

.conversation-hero.race-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px);
    pointer-events: none;
}

.hero-headings {
    position: relative;
    z-index: 1;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.9;
}

.conversation-hero h1,
.race-title {
    font-family: "Keifont", "Hiragino Kaku Gothic Pro", "Meiryo", sans-serif;
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin-top: 10px;
}

/* レース情報テーブル */
.race-info-table {
    width: 100%;
    max-width: 600px;
    margin: 20px auto 0;
    border-collapse: separate;
    border-spacing: 0;
}

.race-info-table td {
    padding: 12px 20px;
    color: #fff;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.race-info-table .label {
    text-align: right;
    font-weight: bold;
    color: #c8e6c9;
    width: 35%;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

.race-info-table .value {
    text-align: left;
    font-weight: bold;
    font-size: 18px;
    padding-left: 25px;
}

/* ========================================
   メインコンテンツ
   ======================================== */

main {
    flex: 1;
    padding: 20px;
}

.section-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

.section-header h2 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.section-header p {
    font-size: 14px;
    color: #666;
}

/* ========================================
   チャット（LINE風）調整
   ======================================== */

.agent-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.page-shell .avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #1f2937;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.chat-message .page-shell .message-bubble {
    max-width: 100%;
    word-break: break-word;
}

.chat-message .page-shell .message-bubble p {
    font-size: 14px;
    line-height: 1.55;
    font-family: "Hiragino Kaku Gothic Pro", "Meiryo", "Yu Gothic", sans-serif;
}

/* ========================================
   タイムライン（会話ログ）
   ======================================== */

.conversation-timeline,
.chat-section {
    margin-bottom: 30px;
}

.timeline,
.page-shell .chat-container {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.chat-message,
.page-shell .message {
    display: flex;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

/* ========================================
   構造化カード（Tier/指数/展開/ベッティング）
   ======================================== */

.structured-cards {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;

    /* flex/grid内の“押し広げ”対策 */
    min-width: 0;
}

.structured-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);

    /* =========================================================
     ★★ 最重要：grid/flex配下で子が親を押し広げるのを防ぐ
     ========================================================= */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.structured-card h4 {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
}

.structured-card .badge {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: #eef2ff;
    color: #4c51bf;
}

.structured-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.structured-card th,
.structured-card td {
    border: 1px solid #e0e0e0;
    padding: 6px 8px;
    text-align: left;
}

.structured-card th {
    background: #f5f7fb;
    font-weight: 700;
}

.structured-card ul {
    margin-left: 16px;
    color: #444;
}

.betting-line {
    font-family: "SFMono-Regular", "Menlo", monospace;
    font-size: 13px;
    margin-bottom: 6px;
}

/* エージェントアイコン */
.agent-icon,
.page-shell .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.agent-icon img,
.page-shell .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-shell .avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 18px;
    border-radius: 50%;
}

/* メッセージ内容 */
.page-shell .message-content {
    flex: 1;
    max-width: calc(100% - 70px);
}

.agent-name {
    font-family: "Keifont", "Hiragino Kaku Gothic Pro", "Meiryo", sans-serif;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 600;
}

.timestamp {
    font-size: 11px;
    color: #999;
    margin-bottom: 5px;
}

/* 修正4: .page-shell スコープの吹き出しスタイル優先度明確化 */
.page-shell .message-bubble,
.page-shell .bubble {
    background: #fff;
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    word-wrap: break-word;
    line-height: 1.6;
}

.page-shell .message-bubble::before,
.page-shell .bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-right: 8px solid #fff;
    border-bottom: 8px solid transparent;
}

.page-shell .bubble strong {
    font-weight: bold;
    color: #2c3e50;
}

.page-shell .bubble em {
    font-style: italic;
    color: #7f8c8d;
}

.page-shell .bubble code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* バッジ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 6px;
    font-size: 11px;
    border-radius: 12px;
    background-color: #667eea;
    color: #fff;
    font-weight: 600;
}

.badge.hit {
    background-color: #f59e0b;
}

.badge.tag {
    background-color: #8b5cf6;
}

.badge.phase {
    background-color: #10b981;
}

/* 差分ログ */
.diff-log-container {
    margin-top: 10px;
    padding: 12px;
    background-color: #fff9e6;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
}

.diff-log-container h4 {
    font-size: 14px;
    font-weight: bold;
    color: #d97706;
    margin-bottom: 8px;
}

.diff-list {
    list-style: none;
    font-size: 13px;
    line-height: 1.8;
}

.diff-list li {
    margin: 4px 0;
}

.diff-reason {
    color: #666;
    font-size: 12px;
}

/* ========================================
   テーブルセクション
   ======================================== */

.status-table {
    margin: 24px 0;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    /* flex/grid配下でも押し広げ防止 */
    min-width: 0;
}

.status-table .section-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #333;
}

.status-table .section-header p {
    margin: 0 0 12px;
    color: #777;
    font-size: 12px;
}

/* =========================================================
    ★★ 最重要：テーブル“だけ”を横スクロールさせるラッパー
    - 影を右端に固定し、中身だけが潜り抜ける設定
   ========================================================= */
.table-container,
.skill-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    display: block;

    /* 子要素の押し広げを防止 */
    min-width: 0;

    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #fff;
    position: relative;
    z-index: 1;
    /* スタッキングコンテキストを形成 */
}

/* ★ 右側に固定されるシャドウ（スクロールしても位置が変わらない） */
.table-container::after,
.skill-table-scroll::after {
    content: '';
    /* 修正：stickyを使用することで表示領域の右端に固定 */
    position: sticky;
    right: 0;
    top: 0;
    bottom: 0;

    /* 修正：テーブルの横幅を広げずに、上に重ねるための設定 */
    float: right;
    margin-left: -40px;

    width: 40px;
    height: 100%;
    /* 親要素の高さに追従（※表示されない場合は 500px等固定値を検討） */
    min-height: 100px;

    /* グラデーションを少し濃くして視認性を向上 */
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95) 10%, transparent 100%);

    pointer-events: none;
    /* 下のテーブル操作を邪魔しない */
    z-index: 10;
    /* テーブルセルより上に表示 */
}

/* ★ 任意：左側にもシャドウを出すと、スクロールしたことが分かりやすくなります */
.table-container::before,
.skill-table-scroll::before {
    content: '';
    position: sticky;
    left: 0;
    top: 0;
    bottom: 0;
    float: left;
    margin-right: -40px;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 10%, transparent 100%);
    pointer-events: none;
    z-index: 10;
    /* 初期状態（スクロール前）は非表示にしたい場合は JSが必要ですが、
       このままでもデザイン的なアクセントになります */
}

/* =========================================================
    ★★ テーブル本体の設定
   ========================================================= */
.table-container>table.ability-table,
.skill-table-scroll>table.ability-table,
.status-table .skill-table-scroll>table.ability-table {
    /* 修正：内容幅を維持しつつ、確実に横スクロールを発生させる */
    width: max-content !important;
    min-width: 1100px;
    /* 列数が多いので広めに確保 */
    border-collapse: collapse;
    background: #fff;
    font-size: 12px;
    margin-top: 0;
    /* ラッパーのpadding等に合わせる */
    position: relative;
    z-index: 1;
    /* 影の下を潜り抜けさせる */
}

/* セル設定：折り返し禁止 */
.table-container th,
.table-container td,
.skill-table-scroll th,
.skill-table-scroll td {
    white-space: nowrap;
    padding: 12px 10px;
    border: 1px solid #e9ecef;
}

/* ヘッダー固定などの装飾（維持） */
.ability-table th {
    background-color: #667eea;
    color: #fff;
    font-weight: bold;
    text-align: center;
}

.ability-table td {
    text-align: center;
    font-weight: 600;
}

/* 信頼度による色分け（維持） */
.ability-table td[data-confidence="high"] {
    background-color: #d1fae5;
}

.ability-table td[data-confidence="medium"] {
    background-color: #fef3c7;
}

.ability-table td[data-confidence="low"] {
    background-color: #fee2e2;
}

.ability-table td.missing-value {
    color: #999;
    font-style: italic;
}

/* ========================================
   ベッティングセクション（以下は元のまま）
   ======================================== */

.betting-section {
    margin: 30px 0;
    padding: 25px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.agent-betting-panel {
    margin: 20px 0;
    padding: 20px;
    border-radius: 12px;
    border-left: 6px solid #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.agent-betting-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.panel-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.panel-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-agent-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.betting-content {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

.betting-list {
    margin: 10px 0;
    padding-left: 20px;
}

.betting-list li {
    margin: 6px 0;
    padding: 4px 0;
}

.betting-summary {
    margin-top: 12px;
    padding: 12px;
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

/* 最終ベッティングパネル */
.final-betting-panel {
    margin: 20px 0;
    padding: 25px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3d6 100%);
    border-radius: 15px;
    border: 3px solid #ffd700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.final-betting-panel .section-title {
    color: #d97706;
    border-bottom-color: #ffd700;
}

/* TextGradセクション */
.textgrad {
    margin: 30px 0;
}

.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.feedback-block {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.feedback-block h3 {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 12px;
}

.feedback-block ul {
    list-style: disc;
    padding-left: 20px;
}

.feedback-block li {
    margin: 6px 0;
    line-height: 1.6;
}

/* エージェント別サマリー */
.agent-summary {
    margin: 30px 0;
}

/* アフィリエイトエリア */
.tg-afi-area {
    margin: 30px 20px;
    padding: 20px;
    background-color: #fff9e6;
    border: 2px solid #ffd700;
    border-radius: 10px;
    text-align: center;
}

.tg-afi-area-text {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* フッター */
footer {
    padding: 30px 20px;
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    font-size: 14px;
}

/* ========================================
   レスポンシブ（page-shell系）
   ======================================== */

@media (max-width: 768px) {
    .page-shell {
        margin: 0;
        box-shadow: none;
    }

    .conversation-hero {
        padding: 30px 20px;
    }

    .conversation-hero h1,
    .race-title {
        font-size: 24px;
    }

    .race-info-table td {
        padding: 8px 12px;
        font-size: 14px;
    }

    .race-info-table .label {
        width: 40%;
    }

    .race-info-table .value {
        font-size: 16px;
        padding-left: 15px;
    }

    main {
        padding: 15px;
    }

    .timeline,
    .page-shell .chat-container {
        padding: 15px;
    }

    .agent-icon,
    .page-shell .avatar {
        width: 40px;
        height: 40px;
    }

    .page-shell .message-bubble,
    .page-shell .bubble {
        font-size: 14px;
    }

    .feedback-grid {
        grid-template-columns: 1fr;
    }

    .ability-table,
    .summary-table {
        font-size: 13px;
    }

    .ability-table th,
    .ability-table td,
    .summary-table th,
    .summary-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {

    .conversation-hero h1,
    .race-title {
        font-size: 20px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .agent-icon,
    .page-shell .avatar {
        width: 35px;
        height: 35px;
        margin-right: 8px;
    }

    .ability-table,
    .summary-table {
        font-size: 11px;
    }

    .ability-table th,
    .ability-table td,
    .summary-table th,
    .summary-table td {
        padding: 6px 4px;
    }
}

#navi-menu-input:checked~#navi-menu-content,
#sidebar-menu-input:checked~#sidebar-menu-content,
#search-menu-input:checked~#search-menu-content,
#share-menu-input:checked~#share-menu-content,
#follow-menu-input:checked~#follow-menu-content {
    background: #306BB2;
}

.menu-drawer a {
    color: #fff;
}

.mobile-header-menu-buttons {
    background: #306BB2;
    color: #fff;
}

.content-top {
    margin: 3em 0 1em;
}

/**
 * WordPress V2 Template Styles
 *
 * このCSSファイルをWordPressの「外観 → カスタマイズ → 追加CSS」に貼り付けてください。
 * 対応モード: pred (直前予想), skill (事前分析), review (振り返り)
 *
 * 作成日: 2026-01-30
 * バージョン: 2.0.0
 */

/* ========================================
   Reset & Base Styles - Clean Design
   ======================================== */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: auto;
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* ========================================
   Header Section - Minimal
   ======================================== */
.page-header {
    background: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.page-header h1 {
    margin: 0 0 4px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.page-header .race-info {
    font-size: 0.85em;
    opacity: 0.8;
}

/* ========================================
   Section Base Styles
   ======================================== */
.section {
    padding: 24px 20px;
    border-bottom: 1px solid #eee;
}

.section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .icon {
    font-size: 1em;
}

.subsection-title {
    font-size: 1em;
    font-weight: 600;
    color: #555;
    margin: 20px 0 12px 0;
    padding-left: 12px;
    border-left: 3px solid #333;
}

/* ========================================
   Summary Section (結論ファースト)
   ======================================== */
.summary-section {
    background: #fff;
}

.summary-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #eee;
}

.summary-card:last-child {
    margin-bottom: 0;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.summary-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.summary-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #666;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
}

.summary-meta {
    flex: 1;
}

.summary-agent-name {
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
}

.summary-role {
    font-size: 0.8em;
    color: #888;
}

.summary-content {
    font-size: 0.95em;
    line-height: 1.8;
    color: #444;
}

.summary-content h3,
.summary-content h4 {
    margin: 12px 0 6px 0;
    font-size: 0.95em;
    color: #333;
}

.summary-content p {
    margin: 0 0 8px 0;
}

.summary-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Agent Analysis Panels
   ======================================== */
.analysis-section {
    background: #fff;
}

.analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agent-panel {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #333;
    margin-bottom: 16px;
}

.agent-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.agent-panel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #eee;
}

.agent-panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-panel-info {
    flex: 1;
}

.agent-panel-name {
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
}

.agent-panel-role {
    font-size: 0.75em;
    color: #888;
}

.agent-panel-content {
    font-size: 0.9em;
    line-height: 1.7;
    color: #555;
}

/* ========================================
   Tier Table (柚葉)
   ======================================== */
.tier-panel {
    margin-bottom: 16px;
}

.tier-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tier-row:last-child {
    border-bottom: none;
}

.tier-label {
    width: 48px;
    font-weight: bold;
    font-size: 0.9em;
    padding: 4px 8px;
    text-align: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.tier-label.tier-sss {
    background: #111;
    color: #fff;
}

.tier-label.tier-ss {
    background: #222;
    color: #fff;
}

.tier-label.tier-s {
    background: #333;
    color: #fff;
}

.tier-label.tier-a {
    background: #555;
    color: #fff;
}

.tier-label.tier-b {
    background: #888;
    color: #fff;
}

.tier-label.tier-c {
    background: #bbb;
    color: #fff;
}

.tier-label.tier-d {
    background: #ddd;
    color: #666;
}

.tier-horses {
    flex: 1;
    padding-left: 12px;
}

.tier-horse {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.85em;
}

.tier-horse .number {
    font-weight: 600;
    color: #333;
}

/* ========================================
   Betting Panel (奏)
   ======================================== */
.betting-panel {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.betting-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.betting-row:last-child {
    border-bottom: none;
}

.betting-label {
    width: 80px;
    font-weight: 600;
    font-size: 0.85em;
    color: #666;
}

.betting-value {
    flex: 1;
    font-size: 0.95em;
}

.betting-horse {
    font-weight: 600;
    color: #333;
}

.betting-reason {
    font-size: 0.85em;
    color: #888;
    margin-top: 4px;
}

.bet-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    margin: 4px 4px 4px 0;
}

.bet-tag.honmei {
    background: #333;
    color: #fff;
}

.bet-tag.taikou {
    background: #666;
    color: #fff;
}

.bet-tag.tanana {
    background: #999;
    color: #fff;
}

.bet-tag.danger {
    background: #fff;
    color: #c00;
    border: 1px solid #c00;
}

.bet-tag.longshot {
    background: #fff;
    color: #080;
    border: 1px solid #080;
}

/* ========================================
   Pace Analysis (杏)
   ======================================== */
.pace-panel {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

.pace-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.pace-type {
    font-size: 1.1em;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    background: #333;
    color: #fff;
}

.pace-advantage {
    font-size: 0.9em;
    color: #666;
}

.pace-horses {
    display: flex;
    gap: 24px;
}

.pace-group {
    flex: 1;
}

.pace-group-title {
    font-size: 0.85em;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.pace-horse {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ========================================
   Prediction Summary Cards
   ======================================== */
.prediction-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.prediction-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #333;
}

.prediction-card-header {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 4px;
}

.prediction-card-horse {
    font-size: 1em;
    font-weight: 600;
    color: #333;
}

.prediction-card-comment {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    line-height: 1.5;
}

/* ========================================
   Result Panels (振り返り)
   ======================================== */
.result-panel {
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #888;
    background: #fff;
}

.result-panel.success {
    border-left-color: #2a2;
    background: #f8fff8;
}

.result-panel.warning {
    border-left-color: #f90;
    background: #fffcf0;
}

.result-panel.danger {
    border-left-color: #c22;
    background: #fff8f8;
}

.result-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.result-stat {
    text-align: center;
    min-width: 60px;
}

.result-stat-label {
    font-size: 0.75em;
    color: #888;
}

.result-stat-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.result-stat-value.positive {
    color: #2a2;
}

.result-stat-value.negative {
    color: #c22;
}

/* ========================================
   Skill Table Section
   ======================================== */
.skill-section {
    background: #fff;
}

.skill-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.skill-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 0.85em;
}

.skill-table th,
.skill-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
}

.skill-table th {
    background: #333;
    color: #fff;
    font-weight: 600;
}

.skill-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* ========================================
   Chat Section (会話は追加コンテンツ)
   ======================================== */
.chat-section {
    background: #fff;
}

.chat-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 20px;
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.95em;
    border-radius: 0;
}

.chat-toggle:hover {
    background: #eee;
}

.chat-toggle::-webkit-details-marker {
    display: none;
}

.chat-toggle::marker {
    content: "";
}

.chat-toggle-icon {
    font-size: 1em;
    transition: transform 0.3s;
}

details.chat-details[open] .chat-toggle-icon {
    transform: rotate(180deg);
}

.chat-container {
    padding: 20px;
    background-color: #fafafa;
    max-height: 600px;
    overflow-y: auto;
    border-top: 1px solid #eee;
}

.chat-message {
    display: flex;
    margin-bottom: 16px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    background: #666;
}

.chat-content {
    flex: 1;
    max-width: calc(100% - 60px);
}

.chat-name {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 4px;
    font-weight: 600;
}

.chat-bubble {
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    line-height: 1.6;
    font-size: 0.9em;
}

/* ========================================
   Markdown Content in Bubbles
   ======================================== */
.chat-bubble h1,
.chat-bubble h2,
.chat-bubble h3 {
    margin: 8px 0 6px 0;
    color: #333;
}

.chat-bubble h1 {
    font-size: 1.1em;
}

.chat-bubble h2 {
    font-size: 1em;
}

.chat-bubble h3 {
    font-size: 0.95em;
}

.chat-bubble ul,
.chat-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.chat-bubble li {
    margin: 4px 0;
}

.chat-bubble strong {
    color: #333;
    font-weight: 600;
}

.chat-bubble code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Standalone tables (outside bubbles) */
.standalone-table {
    margin: 16px 0;
    width: 100%;
    overflow-x: auto;
}

.standalone-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.standalone-table th,
.standalone-table td {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.standalone-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center {
    text-align: center;
}

.text-bold {
    font-weight: 600;
}

.text-small {
    font-size: 0.85em;
}

.text-muted {
    color: #888;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 600px) {
    .page-header h1 {
        font-size: 1.1em;
    }

    .section {
        padding: 16px;
    }

    .section-title {
        font-size: 1em;
    }

    .prediction-cards {
        grid-template-columns: 1fr;
    }

    .pace-horses {
        flex-direction: column;
        gap: 12px;
    }

    .result-stats {
        gap: 12px;
    }

    .summary-header {
        flex-direction: column;
        text-align: center;
    }

    .chat-avatar {
        width: 32px;
        height: 32px;
    }

    .tier-row {
        flex-direction: column;
        gap: 8px;
    }

    .tier-label {
        width: auto;
    }

    .tier-horses {
        padding-left: 0;
    }
}

/* ========================================
   Agent-specific Border Colors
   ======================================== */
.agent-panel[style*="border-left-color: #7CB342"] {
    border-left-color: #7CB342 !important;
}

/* AMANE */
.agent-panel[style*="border-left-color: #FFD54F"] {
    border-left-color: #FFD54F !important;
}

/* KANADE */
.agent-panel[style*="border-left-color: #E53935"] {
    border-left-color: #E53935 !important;
}

/* MISAKI */
.agent-panel[style*="border-left-color: #1976D2"] {
    border-left-color: #1976D2 !important;
}

/* RIN */
.agent-panel[style*="border-left-color: #CE93D8"] {
    border-left-color: #CE93D8 !important;
}

/* YUZUHA */
.agent-panel[style*="border-left-color: #EC407A"] {
    border-left-color: #EC407A !important;
}

/* ANZU *//* ==========================================================================
   WordPress V2 Styles (Prefixed with v2-)
   Merged automatically on 2026-01-30
   ========================================================================== */
/**
 * WordPress V2 Template Styles
 *
 * このCSSファイルをWordPressの「外観 → カスタマイズ → 追加CSS」に貼り付けてください。
 * 対応モード: pred (直前予想), skill (事前分析), review (振り返り)
 *
 * 作成日: 2026-01-30
 * バージョン: 2.0.0
 */

/* ========================================
   Reset & Base Styles - Clean Design
   ======================================== */
.v2-page-container {
    display: flex;
    flex-direction: column;
    min-height: auto;
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

/* ========================================
   Header Section - Minimal
   ======================================== */
.v2-page-header {
    background: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.v2-page-header h1 {
    margin: 0 0 4px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.v2-page-header .v2-race-info {
    font-size: 0.85em;
    opacity: 0.8;
}

/* ========================================
   Section Base Styles
   ======================================== */
.v2-section {
    padding: 24px 20px;
    border-bottom: 1px solid #eee;
}

.v2-section:last-child {
    border-bottom: none;
}

.v2-section-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-section-title .v2-icon {
    font-size: 1em;
}

.v2-subsection-title {
    font-size: 1em;
    font-weight: 600;
    color: #555;
    margin: 20px 0 12px 0;
    padding-left: 12px;
    border-left: 3px solid #333;
}

/* ========================================
   Summary Section (結論ファースト)
   ======================================== */
.v2-summary-section {
    background: #fff;
}

.v2-summary-card {
    background: #fafafa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #eee;
}

.v2-summary-card:last-child {
    margin-bottom: 0;
}

.v2-summary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.v2-summary-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.v2-summary-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-summary-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #666;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
}

.v2-summary-meta {
    flex: 1;
}

.v2-summary-agent-name {
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
}

.v2-summary-role {
    font-size: 0.8em;
    color: #888;
}

.v2-summary-content {
    font-size: 0.95em;
    line-height: 1.8;
    color: #444;
}

.v2-summary-content h3,
.v2-summary-content h4 {
    margin: 12px 0 6px 0;
    font-size: 0.95em;
    color: #333;
}

.v2-summary-content p {
    margin: 0 0 8px 0;
}

.v2-summary-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Agent Analysis Panels
   ======================================== */
.v2-analysis-section {
    background: #fff;
}

.v2-analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.v2-agent-panel {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #333;
    margin-bottom: 16px;
}

.v2-agent-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.v2-agent-panel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #eee;
}

.v2-agent-panel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-agent-panel-info {
    flex: 1;
}

.v2-agent-panel-name {
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
}

.v2-agent-panel-role {
    font-size: 0.75em;
    color: #888;
}

.v2-agent-panel-content {
    font-size: 0.9em;
    line-height: 1.7;
    color: #555;
}

/* ========================================
   Tier Table (柚葉)
   ======================================== */
.v2-tier-panel {
    margin-bottom: 16px;
}

.v2-tier-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.v2-tier-row:last-child {
    border-bottom: none;
}

.v2-tier-label {
    width: 48px;
    font-weight: bold;
    font-size: 0.9em;
    padding: 4px 8px;
    text-align: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.v2-tier-label.v2-tier-sss {
    background: #111;
    color: #fff;
}

.v2-tier-label.v2-tier-ss {
    background: #222;
    color: #fff;
}

.v2-tier-label.v2-tier-s {
    background: #333;
    color: #fff;
}

.v2-tier-label.v2-tier-a {
    background: #555;
    color: #fff;
}

.v2-tier-label.v2-tier-b {
    background: #888;
    color: #fff;
}

.v2-tier-label.v2-tier-c {
    background: #bbb;
    color: #fff;
}

.v2-tier-label.v2-tier-d {
    background: #ddd;
    color: #666;
}

.v2-tier-horses {
    flex: 1;
    padding-left: 12px;
}

.v2-tier-horse {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.85em;
}

.v2-tier-horse .v2-number {
    font-weight: 600;
    color: #333;
}

/* ========================================
   Betting Panel (奏)
   ======================================== */
.v2-betting-panel {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.v2-betting-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.v2-betting-row:last-child {
    border-bottom: none;
}

.v2-betting-label {
    width: 80px;
    font-weight: 600;
    font-size: 0.85em;
    color: #666;
}

.v2-betting-value {
    flex: 1;
    font-size: 0.95em;
}

.v2-betting-horse {
    font-weight: 600;
    color: #333;
}

.v2-betting-reason {
    font-size: 0.85em;
    color: #888;
    margin-top: 4px;
}

.v2-bet-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    margin: 4px 4px 4px 0;
}

.v2-bet-tag.v2-honmei {
    background: #333;
    color: #fff;
}

.v2-bet-tag.v2-taikou {
    background: #666;
    color: #fff;
}

.v2-bet-tag.v2-tanana {
    background: #999;
    color: #fff;
}

.v2-bet-tag.v2-danger {
    background: #fff;
    color: #c00;
    border: 1px solid #c00;
}

.v2-bet-tag.v2-longshot {
    background: #fff;
    color: #080;
    border: 1px solid #080;
}

/* ========================================
   Pace Analysis (杏)
   ======================================== */
.v2-pace-panel {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

.v2-pace-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.v2-pace-type {
    font-size: 1.1em;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    background: #333;
    color: #fff;
}

.v2-pace-advantage {
    font-size: 0.9em;
    color: #666;
}

.v2-pace-horses {
    display: flex;
    gap: 24px;
}

.v2-pace-group {
    flex: 1;
}

.v2-pace-group-title {
    font-size: 0.85em;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.v2-pace-horse {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ========================================
   Prediction Summary Cards
   ======================================== */
.v2-prediction-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.v2-prediction-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #333;
}

.v2-prediction-card-header {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 4px;
}

.v2-prediction-card-horse {
    font-size: 1em;
    font-weight: 600;
    color: #333;
}

.v2-prediction-card-comment {
    font-size: 0.85em;
    color: #666;
    margin-top: 8px;
    line-height: 1.5;
}

/* ========================================
   Result Panels (振り返り)
   ======================================== */
.v2-result-panel {
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #888;
    background: #fff;
}

.v2-result-panel.v2-success {
    border-left-color: #2a2;
    background: #f8fff8;
}

.v2-result-panel.v2-warning {
    border-left-color: #f90;
    background: #fffcf0;
}

.v2-result-panel.v2-danger {
    border-left-color: #c22;
    background: #fff8f8;
}

.v2-result-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.v2-result-stat {
    text-align: center;
    min-width: 60px;
}

.v2-result-stat-label {
    font-size: 0.75em;
    color: #888;
}

.v2-result-stat-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.v2-result-stat-value.v2-positive {
    color: #2a2;
}

.v2-result-stat-value.v2-negative {
    color: #c22;
}

/* ========================================
   Skill Table Section
   ======================================== */
.v2-skill-section {
    background: #fff;
}

.v2-skill-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.v2-skill-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 0.85em;
}

.v2-skill-table th,
.v2-skill-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
}

.v2-skill-table th {
    background: #333;
    color: #fff;
    font-weight: 600;
}

.v2-skill-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* ========================================
   Chat Section (会話は追加コンテンツ)
   ======================================== */
.v2-chat-section {
    background: #fff;
}

.v2-chat-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 20px;
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.95em;
    border-radius: 0;
}

.v2-chat-toggle:hover {
    background: #eee;
}

.v2-chat-toggle::-webkit-details-marker {
    display: none;
}

.v2-chat-toggle::marker {
    content: "";
}

.v2-chat-toggle-icon {
    font-size: 1em;
    transition: transform 0.3s;
}

details.v2-chat-details[open] .v2-chat-toggle-icon {
    transform: rotate(180deg);
}

.v2-chat-container {
    padding: 20px;
    background-color: #fafafa;
    max-height: 600px;
    overflow-y: auto;
    border-top: 1px solid #eee;
}

.v2-chat-message {
    display: flex;
    margin-bottom: 16px;
}

.v2-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.v2-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v2-chat-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    background: #666;
}

.v2-chat-content {
    flex: 1;
    max-width: calc(100% - 60px);
}

.v2-chat-name {
    font-size: 0.8em;
    color: #888;
    margin-bottom: 4px;
    font-weight: 600;
}

.v2-chat-bubble {
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    line-height: 1.6;
    font-size: 0.9em;
}

/* ========================================
   Markdown Content in Bubbles
   ======================================== */
.v2-chat-bubble h1,
.v2-chat-bubble h2,
.v2-chat-bubble h3 {
    margin: 8px 0 6px 0;
    color: #333;
}

.v2-chat-bubble h1 {
    font-size: 1.1em;
}

.v2-chat-bubble h2 {
    font-size: 1em;
}

.v2-chat-bubble h3 {
    font-size: 0.95em;
}

.v2-chat-bubble ul,
.v2-chat-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.v2-chat-bubble li {
    margin: 4px 0;
}

.v2-chat-bubble strong {
    color: #333;
    font-weight: 600;
}

.v2-chat-bubble code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Standalone tables (outside bubbles) */
.v2-standalone-table {
    margin: 16px 0;
    width: 100%;
    overflow-x: auto;
}

.v2-standalone-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}

.v2-standalone-table th,
.v2-standalone-table td {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.v2-standalone-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* ========================================
   Utility Classes
   ======================================== */
.v2-text-center {
    text-align: center;
}

.v2-text-bold {
    font-weight: 600;
}

.v2-text-small {
    font-size: 0.85em;
}

.v2-text-muted {
    color: #888;
}

.v2-mt-0 {
    margin-top: 0;
}

.v2-mb-0 {
    margin-bottom: 0;
}

.v2-mb-1 {
    margin-bottom: 8px;
}

.v2-mb-2 {
    margin-bottom: 16px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 600px) {
    .v2-page-header h1 {
        font-size: 1.1em;
    }

    .v2-section {
        padding: 16px;
    }

    .v2-section-title {
        font-size: 1em;
    }

    .v2-prediction-cards {
        grid-template-columns: 1fr;
    }

    .v2-pace-horses {
        flex-direction: column;
        gap: 12px;
    }

    .v2-result-stats {
        gap: 12px;
    }

    .v2-summary-header {
        flex-direction: column;
        text-align: center;
    }

    .v2-chat-avatar {
        width: 32px;
        height: 32px;
    }

    .v2-tier-row {
        flex-direction: column;
        gap: 8px;
    }

    .v2-tier-label {
        width: auto;
    }

    .v2-tier-horses {
        padding-left: 0;
    }
}

/* ========================================
   Agent-specific Border Colors
   ======================================== */
.v2-agent-panel[style*="border-left-color: #7CB342"] {
    border-left-color: #7CB342 !important;
}

/* AMANE */
.v2-agent-panel[style*="border-left-color: #FFD54F"] {
    border-left-color: #FFD54F !important;
}

/* KANADE */
.v2-agent-panel[style*="border-left-color: #E53935"] {
    border-left-color: #E53935 !important;
}

/* MISAKI */
.v2-agent-panel[style*="border-left-color: #1976D2"] {
    border-left-color: #1976D2 !important;
}

/* RIN */
.v2-agent-panel[style*="border-left-color: #CE93D8"] {
    border-left-color: #CE93D8 !important;
}

/* YUZUHA */
.v2-agent-panel[style*="border-left-color: #EC407A"] {
    border-left-color: #EC407A !important;
}

/* ANZU */

/* ========================================
   Cocoon TOC (目次) 非表示
   ======================================== */
.v2-toc,
.v2-toc-content,
#toc,
.v2-table-of-contents,
.v2-ez-toc-container,
.v2-ez-toc-v2_0_66_1,
.v2-toc-widget-wrap,
.v2-toc-list,
.v2-entry-content>.v2-toc,
div[class*="toc"],
#ez-toc-container {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ========================================
   Toggle (details/summary) 強化スタイル for WordPress
   ======================================== */
details.v2-chat-details {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

details.v2-chat-details>summary {
    list-style: none !important;
    outline: none !important;
    cursor: pointer !important;
}

details.v2-chat-details>summary::-webkit-details-marker {
    display: none !important;
}

details.v2-chat-details>summary::marker {
    display: none !important;
    content: "" !important;
}

details.v2-chat-details[open]>.v2-chat-container {
    display: block !important;
}

details.v2-chat-details:not([open])>.v2-chat-container {
    display: none !important;
}

.v2-chat-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    padding: 16px 20px !important;
    background: #f5f5f5 !important;
    color: #333 !important;
    font-weight: 600 !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    font-size: 0.95em !important;
    border-radius: 0 !important;
}

.v2-chat-toggle:hover {
    background: #eee !important;
}

.v2-chat-toggle-icon {
    font-size: 1em !important;
    transition: transform 0.3s !important;
}

details.v2-chat-details[open] .v2-chat-toggle-icon {
    transform: rotate(180deg) !important;
}

/* ========================================
   Summary Section 強化（WordPress競合対策）
   ======================================== */
.v2-summary-section {
    background: #fff !important;
    padding: 24px 20px !important;
}

.v2-summary-card {
    background: #fafafa !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    border: 1px solid #eee !important;
}

.v2-summary-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
}

.v2-summary-avatar {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 2px solid #ddd !important;
    flex-shrink: 0 !important;
}

.v2-summary-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.v2-summary-meta {
    flex: 1 !important;
}

.v2-summary-agent-name {
    font-weight: 600 !important;
    font-size: 0.95em !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.v2-summary-role {
    font-size: 0.8em !important;
    color: #888 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.v2-summary-content {
    font-size: 0.95em !important;
    line-height: 1.8 !important;
    color: #444 !important;
}

.v2-summary-content p {
    margin: 0 0 8px 0 !important;
}

/* ========================================
   Section Title 強化（WordPress競合対策）
   ======================================== */
.v2-section-title {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 16px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #333 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.v2-section-title .v2-icon {
    font-size: 1em !important;
}
