/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Feb 23 2026 | 12:34:15 */
/* Main container for the horse training viewer app (v2) */
#horse-training-data-viewer-app-v2 {
    font-family: 'Arial', sans-serif;
    margin: 0 auto;
    padding: 0;
    border-radius: 8px;
    max-width: 1200px;
}

/* New Section Container Styles */
#horse-training-data-viewer-app-v2 .v2-htv-section-container {
    background-color: #f8f9fa; /* デフォルトは薄いグレー */
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

#horse-training-data-viewer-app-v2 .v2-htv-section-container:last-child {
    margin-bottom: 0;
}

#horse-training-data-viewer-app-v2 .v2-htv-section-container h3 { /* 主に「各馬の追い切り評価」と「レース横断検索」のタイトル */
    text-align: center;
    color: #1f2937;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: center;
    align-items: center;
    /* flex-direction: column; は削除またはコメントアウト。カードタイトル側で制御 */
}

/* Specific background color for the cross-search section */
#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section {
    background-color: #fffef0; /* 薄いクリーム色 */
}

/* --- Styles for Deviation Filter (v2) --- */
#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-container {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 20px;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-container:last-child {
    margin-bottom: 0;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-container h4,
#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-container h4,
#horse-training-data-viewer-app-v2 #v2-htv-common-controls-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #1f2937;
    font-size: 1em;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 5px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}


#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

#horse-training-data-viewer-app-v2 .v2-htv-filter-control-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls .v2-htv-filter-control-item label {
    font-size: 0.9em;
    color: #374151;
    white-space: nowrap;
    flex-shrink: 0;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-threshold-value {
    font-weight: bold;
    color: #2563eb;
    margin-left: 5px;
    min-width: 25px;
    text-align: right;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls select,
#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls input[type="range"],
#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls button {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #fff;
    box-sizing: border-box;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls select {
    flex-grow: 1;
    min-width: 150px;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls input[type="range"] {
    flex-grow: 1;
    padding: 0;
    height: auto;
    accent-color: #2563eb;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls button {
    border-color: #2563eb;
    background-color: #2563eb;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 5px;
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls button:hover {
    background-color: #1d4ed8;
}

@media (min-width: 768px) {
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls .v2-htv-filter-control-item {
        flex-grow: 1;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls .v2-htv-filter-control-item:nth-child(2) {
        display: flex;
        align-items: center;
        flex-grow: 2;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls .v2-htv-filter-control-item:nth-child(2) label {
        min-width: 100px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls .v2-htv-filter-control-item:nth-child(2) input[type="range"] {
        flex-grow: 1;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls .v2-htv-filter-control-item:nth-child(2) #v2-htv-deviation-threshold-value {
        margin-left: 8px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls .v2-htv-filter-control-item:last-child {
        flex-grow: 0;
        width: auto;
        min-width: 120px;
        margin-top: 0;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls button {
        width: auto;
        margin-top: 0;
    }
}

#horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-results-container,
#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-results-container {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background-color: #f9fafb !important;
    position: relative;
}

#horse-training-data-viewer-app-v2 .v2-htv-table-scroll-wrapper {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-container {
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls .v2-htv-filter-control-item label {
    font-size: 0.9em;
    color: #374151;
    white-space: nowrap;
    flex-shrink: 0;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls select,
#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls input[type="range"],
#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls button {
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #fff;
    box-sizing: border-box;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls select {
    flex-grow: 1;
    min-width: 150px;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls input[type="range"] {
    flex-grow: 1;
    padding: 0;
    height: auto;
    accent-color: #16a34a;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-denominator-value {
    font-weight: bold;
    color: #16a34a;
    margin-left: 5px;
    min-width: 25px;
    text-align: right;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls button {
    border-color: #16a34a;
    background-color: #16a34a;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 5px;
}

#horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls button:hover {
    background-color: #15803d;
}

@media (min-width: 768px) {
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls .v2-htv-filter-control-item {
        flex-grow: 1;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls .v2-htv-filter-control-item:nth-child(2) {
        flex-grow: 2;
        max-width: none;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls .v2-htv-filter-control-item:nth-child(2) label {
        min-width: 100px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls .v2-htv-filter-control-item:nth-child(2) input[type="range"] {
        flex-grow: 1;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls .v2-htv-filter-control-item:nth-child(2) #v2-htv-self-best-denominator-value {
        margin-left: 8px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls .v2-htv-filter-control-item:last-child {
        flex-grow: 0;
        width: auto;
        min-width: 120px;
        margin-top: 0;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls button {
        width: auto;
        margin-top: 0;
    }
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-race-horse-selector-container {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 12px;
    padding: 10px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-race-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-race-controls label {
    font-size: 0.9em;
    color: #374151;
    margin-right: 2px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-race-controls select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #fff;
    cursor: pointer;
    flex-grow: 1;
}
#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-race-controls #v2-htv-horse-name-selector {
    min-width: 150px;
}


#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-common-controls-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 12px;
    padding: 12px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-radio-selector-group {
    background-color: transparent;
    padding: 0;
    border: none;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 26px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-radio-options {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-radio-selector-group label {
    margin-right: 10px;
    cursor: pointer;
    font-size: 0.9em;
    color: #343a40;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    transition: color 0.2s, font-weight 0.2s;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-radio-selector-group input[type="radio"] {
    margin-right: 4px;
    accent-color: #007bff;
    transform: scale(0.9);
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-radio-selector-group input[type="radio"]:checked + label {
    color: #0056b3;
    font-weight: bold;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-radio-selector-group label:last-child {
    margin-right: 0;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-main-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-training-cards-container,
#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container {
    width: 100%;
    box-sizing: border-box;
    min-height: 100px;
}

@media (min-width: 768px) {
    #horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-main-content-wrapper {
        flex-direction: row;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-training-cards-container,
    #horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container {
        flex: 1 1 50%;
        margin-bottom: 0;
    }
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* コース割合チャートの馬名タイトル */
.v2-htv-chart-horse-name-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #1f2937;
    text-align: center;
    margin-bottom: 5px;
}

/* コース割合チャートのメインタイトル */
#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 1em;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 5px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}


#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container .v2-htv-chart-controls-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 10px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container .v2-htv-chart-controls-wrapper .v2-htv-radio-selector-group {
    justify-content: center;
}

@media (min-width: 480px) {
    #horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container .v2-htv-chart-controls-wrapper {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0px 8px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container .v2-htv-chart-controls-wrapper .v2-htv-radio-selector-group {
        justify-content: flex-start;
    }
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-percentage-chart-items {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-percentage-chart-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.85em;
    box-sizing: border-box;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-course-name-label {
    min-width: 75px;
    color: #4b5563;
    font-weight: 500;
    margin-right: 6px;
    flex-shrink: 0;
    box-sizing: border-box;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-bar-outer {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 0;
    background-color: #f3f4f6;
    border-radius: 2px;
    height: 16px;
    overflow: hidden;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-bar-inner {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7em;
    font-weight: bold;
    white-space: nowrap;
    box-sizing: border-box;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-percentage-label {
    min-width: 70px;
    color: #374151;
    font-size: 0.8em;
    text-align: right;
    margin-left: 6px;
    flex-shrink: 0;
    box-sizing: border-box;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-course-percentage-chart-container .v2-htv-no-data,
#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-percentage-chart-items .v2-htv-no-data {
    text-align: center;
    padding: 12px;
    color: #6b7280;
    font-size: 0.9em;
    background-color: #f9fafb;
    border-radius: 3px;
    margin-top: auto;
    margin-bottom: auto;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section #v2-htv-training-cards-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    display: flex;
    flex-direction: column;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-training-card-internal-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    padding-bottom: 6px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-training-card-internal-controls .v2-htv-radio-selector-group{
    margin: 0;
}

/* 追い切り評価カードの馬名タイトル */
.v2-htv-card-horse-name-title {
    font-size: 1.1em; /* コース割合の馬名タイトルと合わせる */
    font-weight: bold;
    color: #1f2937;
    text-align: center;
    margin-bottom: 5px; /* 下のタイトルとの間隔 */
    display: block; /* ブロック要素にして改行を促す */
}

/* 追い切り評価カードのメインタイトル (h4に変更) */
#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-card-main-title {
    margin-top: 0; /* 馬名タイトルがあるので上マージンを調整 */
    margin-bottom: 8px;
    color: #1f2937;
    font-size: 1em; /* コース割合のh4と合わせる */
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}


#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-info-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-info-item strong {
    display: inline-block;
    min-width: 70px;
    color: #4b5563;
    font-weight: 600;
    margin-right: 6px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-info-item span {
    color: #1f2937;
    font-size: 1em;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-info-item.v2-htv-deviation-main-item {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-info-item.v2-htv-deviation-main-item strong {
    margin-bottom: 8px;
    font-size: 1.1em;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-deviation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 8px;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-deviation-number {
    font-size: 3em;
    font-weight: 900;
    text-align: center;
    line-height: 1;
    text-shadow:
        -2px -2px 0 rgba(255, 255, 255, 0.8),
        2px -2px 0 rgba(255, 255, 255, 0.8),
        -2px 2px 0 rgba(255, 255, 255, 0.8),
        2px 2px 0 rgba(255, 255, 255, 0.8),
        0px -2px 0 rgba(255, 255, 255, 0.8),
        0px 2px 0 rgba(255, 255, 255, 0.8),
        -2px 0px 0 rgba(255, 255, 255, 0.8),
        2px 0px 0 rgba(255, 255, 255, 0.8),
        0 0 8px rgba(0, 0, 0, 0.1),
        0 0 12px rgba(255, 255, 255, 0.4);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    transition: all 0.3s ease;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-deviation-bar-container {
    width: 100%;
    height: 20px;
    background-color: #f3f4f6;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #d1d5db;
}

#horse-training-data-viewer-app-v2 #v2-htv-individual-horse-section .v2-htv-training-card .v2-htv-deviation-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

#horse-training-data-viewer-app-v2 .v2-htv-no-data {
    text-align: center;
    padding: 15px;
    color: #6b7280;
    font-size: 0.95em;
    width: 100%;
    background-color: #f9fafb;
    border-radius: 3px;
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section .v2-htv-filter-result-item,
#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section .v2-htv-filter-result-header {
    padding: 8px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85em;
    display: grid;
    gap: 6px;
    align-items: center;
    cursor: default;
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section .v2-htv-filter-result-item {
    cursor: pointer;
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section .v2-htv-filter-result-item:hover {
    background-color: #eff6ff;
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section .v2-htv-filter-result-item:last-child {
    border-bottom: none;
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section .v2-htv-filter-result-item span,
#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section .v2-htv-filter-result-header span {
    white-space: nowrap;
    text-align: center;
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-deviation-filter-results-container .v2-htv-filter-result-item span:nth-child(4),
#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-deviation-filter-results-container .v2-htv-filter-result-header span:nth-child(4),
#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-self-best-filter-results-container .v2-htv-filter-result-item span:nth-child(4),
#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-self-best-filter-results-container .v2-htv-filter-result-header span:nth-child(4) {
    text-align: left;
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section .v2-htv-filter-result-header {
    font-weight: bold;
    background-color: #e5e7eb !important;
    border-bottom: 1px solid #d1d5db;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-deviation-filter-results-container .v2-htv-filter-result-header,
#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-deviation-filter-results-container .v2-htv-filter-result-item {
    grid-template-columns:
        minmax(40px, 0.7fr)
        minmax(30px, 0.4fr)
        minmax(30px, 0.4fr)
        minmax(130px, 2.2fr)
        minmax(45px, 0.7fr)
        minmax(50px, 0.8fr);
}

#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-self-best-filter-results-container .v2-htv-filter-result-header,
#horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-self-best-filter-results-container .v2-htv-filter-result-item {
    grid-template-columns:
        minmax(40px, 0.7fr)
        minmax(30px, 0.4fr)
        minmax(30px, 0.4fr)
        minmax(130px, 2.2fr)
        minmax(70px, 1fr)
        minmax(40px, 0.6fr)
        minmax(50px, 0.8fr);
}

@media (max-width: 767px) {
    #horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-deviation-filter-results-container .v2-htv-filter-result-item,
    #horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-deviation-filter-results-container .v2-htv-filter-result-header {
        font-size: 0.8em;
        gap: 3px;
        padding: 5px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-self-best-filter-results-container .v2-htv-filter-result-item,
    #horse-training-data-viewer-app-v2 #v2-htv-cross-search-section #v2-htv-self-best-filter-results-container .v2-htv-filter-result-header {
        font-size: 0.75em;
        gap: 3px;
        padding: 5px;
    }
    #horse-training-data-viewer-app-v2 #v2-htv-deviation-filter-controls button,
    #horse-training-data-viewer-app-v2 #v2-htv-self-best-filter-controls button {
        width: 100%;
    }
}

.v2-htv-info-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    background-color: #6c757d;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.2s, transform 0.2s;
    user-select: none;
    vertical-align: middle;
    line-height: 18px;
    text-align: center;
    flex-shrink: 0;
}

.v2-htv-info-button:hover {
    background-color: #5a6268;
    transform: scale(1.1);
}

.v2-htv-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    padding-top: 60px;
    animation: fadeIn 0.3s;
}

.v2-htv-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 25px 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    animation: slideIn 0.4s;
}

#v2-htv-modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.25em;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

#v2-htv-modal-body {
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
}

#v2-htv-modal-body h5 {
    font-size: 1em;
    color: #333;
    margin-top: 15px;
    margin-bottom: 5px;
}

#v2-htv-modal-body ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 5px;
}

#v2-htv-modal-body li {
    margin-bottom: 8px;
}

.v2-htv-modal-close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    transition: color 0.2s;
}

.v2-htv-modal-close-button:hover,
.v2-htv-modal-close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ### ADD ### 併せ情報コンテナを非表示にするスタイルを追加 */
#horse-training-data-viewer-app-v2 .v2-htv-info-item.v2-htv-awase-info {
    display: none !important;
}