/* ---- タイトル・説明文 ---- */
.sansho-title-h2 {
    font-size: 22px !important; font-weight: bold !important; color: #000000 !important;
    margin: 30px 0 10px 0 !important; border-bottom: 2px solid #222222 !important;
    padding-bottom: 8px !important; line-height: 1.3 !important;
}
.sansho-title-h3 {
    font-size: 19px !important; font-weight: bold !important; color: #000000 !important;
    margin: 25px 0 10px 0 !important; border-left: 5px solid #222222 !important;
    padding-left: 10px !important; line-height: 1.3 !important;
}
.sansho-desc {
    margin: 0 0 15px 0 !important; line-height: 1.6 !important; color: #000000 !important;
}
.sansho-title-bar {
    font-size: 18px !important; font-weight: bold !important; color: #000000 !important;
    margin: 25px 0 12px 0 !important; border-bottom: 2px solid #222222 !important;
    padding-bottom: 8px !important; line-height: 1.3 !important; display: block !important;
}
/* ---- コンテナ ---- */
.sansho-table-container {
    width: 100%; margin: 15px 0 30px 0;
    overflow: auto; -webkit-overflow-scrolling: touch;
    border-radius: 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.18);
    background: #fff; border: 2px solid #000000; max-height: 600px;
}
@media (max-width: 768px), (max-height: 768px) {
    .sansho-table-container { max-height: 450px; }
}
/* ---- テーブル本体 ---- */
.sansho-table {
    border-collapse: collapse;
    table-layout: fixed !important;
    width: 100%;
    font-size: 14px !important; line-height: 1.45;
    text-align: left; color: #000000 !important; font-weight: bold !important;
}
/* ---- ヘッダー（縦スクロール時に上固定） ---- */
.sansho-table thead th {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0;
    background-color: #222222 !important; color: #ffffff !important;
    font-weight: bold !important; padding: 8px 10px;
    border-right: 1px solid #333333 !important;
    text-align: center !important; font-size: 14px !important; z-index: 20;
}
/* ヘッダー下境界線（rowspan干渉を避けるため ::after で描画） */
.sansho-table thead th::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    border-bottom: 2px solid #333333;
}
/* ---- セル共通（V99装甲：iPad/Android縦割り防止込み） ---- */
.sansho-table th, .sansho-table td {
    padding: 6px 10px !important;
    border-bottom: 1px solid #333333 !important;
    border-right: 1px solid #333333 !important;
    vertical-align: top !important;
    color: #000000 !important; font-size: 14px !important;
    word-break: keep-all !important; white-space: nowrap !important;
}
/* ---- ストライプ ---- */
.sansho-table tbody tr:nth-child(even) { background-color: #fafafa; }
.sansho-table tbody tr:hover           { background-color: #f1f4f8; }
/* ---- 場所境目の太線（インラインstyleと組み合わせ） ---- */
.sansho-table tbody tr.sansho-last-row-of-basho th,
.sansho-table tbody tr.sansho-last-row-of-basho td {
    border-bottom: 2px solid #000000 !important;
}
/* ---- 1列目：横スクロール時に左固定 ---- */
.sansho-sticky-left {
    position: -webkit-sticky !important; position: sticky !important; left: 0;
    background-color: #e5e5e5 !important; color: #000000 !important;
    font-weight: bold !important; z-index: 10;
    box-shadow: 2px 0 5px rgba(0,0,0,0.15);
    border-right: 2px solid #000000 !important;
    text-align: right !important; vertical-align: top !important;
    font-size: 14px !important;
    width: 105px !important; min-width: 105px !important; max-width: 105px !important;
    white-space: nowrap !important; box-sizing: border-box !important;
}
/* 左上角の交差点：z-index 最大 */
.sansho-table thead th.sansho-sticky-left {
    z-index: 30 !important; text-align: center !important; vertical-align: middle !important;
}
/* ---- 寄せ ---- */
.sansho-align-right  { text-align: right  !important; vertical-align: top !important; }
.sansho-align-center { text-align: center !important; vertical-align: top !important; }
.sansho-align-left   { text-align: left   !important; vertical-align: top !important; }
/* ---- セル内3行レイアウト ---- */
.sansho-cell-inner {
    display: flex !important; flex-direction: column !important;
    gap: 1px !important; width: 100%; text-align: left !important;
}
.sansho-cell-line1 {
    font-size: 14px !important; color: #000000 !important;
    display: flex !important; align-items: center !important;
    gap: 5px !important; flex-wrap: wrap !important;
}
.sansho-cell-line2 {
    font-size: 13px !important; color: #000000 !important;
    margin-top: 1px !important; font-weight: bold !important;
}
.sansho-cell-line3 {
    font-size: 13px !important; color: #000000 !important;
    margin-top: 1px !important; white-space: nowrap !important; font-weight: bold !important;
}
/* ---- バッジ類 ---- */
.sansho-rank {
    background: #cdcdcd; padding: 1px 4px; border-radius: 3px;
    font-size: 11px; color: #000000; font-weight: bold;
}
.sansho-name, .sansho-heya a { color: #000000; text-decoration: none; font-weight: bold; }
.sansho-heya a { color: #0044cc; }
.sansho-heya a:hover { text-decoration: underline; }
.sansho-count { color: #cc0000; font-weight: bold; font-size: 12px; }
.sansho-stats { color: #000000; font-size: 13px; font-weight: bold; }
.sansho-yusho {
    background: #d9534f; color: #ffffff; padding: 1px 4px; border-radius: 3px;
    font-size: 10.5px; font-weight: bold; display: inline-block; margin-top: 2px !important;
}
.sansho-separator { color: #000000; }
.sansho-empty { color: #1a5276; font-weight: bold; font-style: italic; }
/* ---- モバイル：番付列を非表示 ---- */
@media (max-width: 768px) {
    .sansho-col-rank { display: none !important; }
    /* モバイルでは table-layout:auto に戻し、コンテンツ幅で自然に配分 */
    .sansho-table {
        table-layout: auto !important;
        width: auto !important;
    }
    .sansho-sticky-left {
        font-size: 11px !important; padding: 3px 5px !important;
        width: 88px !important; min-width: 88px !important; max-width: 88px !important;
        white-space: nowrap !important;
    }
}
/* ---- 年月PC/モバイル切り替え ---- */
.sansho-basho-mobile { display: none; }
@media (max-width: 768px) {
    .sansho-basho-pc     { display: none; }
    .sansho-basho-mobile { display: block; margin-bottom: 2px; }
}
/* ---- 各表のモバイル最小幅 ---- */
@media (max-width: 768px) {
    .sansho-table-pattern-b { min-width: 500px !important; }
    .sansho-table-list      { min-width: 450px !important; }
}
/* ---- 三賞総合表 PC/モバイル切り替え ---- */
.sansho-main-pc     { display: block; }
.sansho-main-mobile { display: none;  }
@media (max-width: 768px) {
    .sansho-main-pc     { display: none;  }
    .sansho-main-mobile { display: block; }
}
/* ---- モバイル縦積みカード ---- */
.sansho-mobile-basho {
    background: #222222; color: #ffffff;
    font-size: 14px; font-weight: bold; padding: 7px 12px;
}
.sansho-mobile-award-label {
    background: #5d6d7e; color: #ffffff;
    font-size: 12px; font-weight: bold; padding: 4px 12px;
}
.sansho-mobile-card { padding: 8px 12px; border-bottom: 1px solid #cccccc; }
.sansho-mobile-card:last-child { border-bottom: none; }
.sansho-mobile-basho-block { border-bottom: 2px solid #000000; }
.sansho-mobile-line1 {
    display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
    font-size: 15px; font-weight: bold;
}
.sansho-mobile-line2 { font-size: 14px; color: #333333; margin-top: 3px; font-weight: bold; }