
/* モーダル背景 */
.semekata-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.semekata-modal[hidden] {
    display: none;
}

/* モーダル本体 */
.semekata-dialog {
    background: #fff;
    color: #222;
    width: 100%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
}

/* ヘッダー */
.semekata-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.semekata-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.semekata-close {
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
}

/* 選手ごと */
.semekata-player {
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
}

.semekata-player:last-child {
    border-bottom: none;
}

.semekata-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    margin-bottom: 10px;
}

.semekata-results {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 攻め方 */
.semekata-item {
    background: #f1f3f5;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 13px;
}

/* ボタン */
.semekata-btn {
    padding: 7px 12px;
    background: #1768b3;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.semekata-btn:hover {
    opacity: 0.85;
}

@media (max-width: 600px) {
    .semekata-dialog {
        padding: 15px;
    }

    .semekata-item {
        padding: 5px 7px;
        font-size: 12px;
    }
}

/* モーダル内の艇番 */
.semekata-title .waku {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 15px;
    line-height: 1;
}

/* 1号艇 白 */
.semekata-title .waku-1 {
    background: #fff;
    color: #111;
    border: 1px solid #ccc;
}

/* 2号艇 黒 */
.semekata-title .waku-2 {
    background: #222;
    color: #fff;
}

/* 3号艇 赤 */
.semekata-title .waku-3 {
    background: #e60012;
    color: #fff;
}

/* 4号艇 青 */
.semekata-title .waku-4 {
    background: #005bac;
    color: #fff;
}

/* 5号艇 黄 */
.semekata-title .waku-5 {
    background: #ffdb00;
    color: #111;
}

/* 6号艇 緑 */
.semekata-title .waku-6 {
    background: #009944;
    color: #fff;
}

/* 過去10走テーブル */
.semekata-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.semekata-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    font-size: 12px;
    color: #222;
}

.semekata-table th,
.semekata-table td {
    padding: 10px 7px;
    border: 1px solid #ddd;
    text-align: center;
    white-space: nowrap;
}

.semekata-table thead th {
    background: #eef2f6;
    font-weight: bold;
}

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

.semekata-player-cell {
    min-width: 150px;
    text-align: left !important;
}

.semekata-player-cell .semekata-title {
    margin-bottom: 0;
    white-space: nowrap;
}

.semekata-table td {
    font-size: 12px;
}

@media (max-width: 600px) {
    .semekata-table {
        font-size: 11px;
    }

    .semekata-table th,
    .semekata-table td {
        padding: 8px 6px;
    }
}

/* 攻め方の色分け */
.semekata-table td.semekata-kimete {
    font-weight: 600;
    text-align: center;
    padding: 7px 4px;
}

/* 先マイ */
.semekata-table td.semekata-kimete-1 {
    background: #e5e7eb;
    color: #374151;
}

/* 差し */
.semekata-table td.semekata-kimete-2 {
    background: #59c2d0;
    color: #fff;
}

/* まくり */
.semekata-table td.semekata-kimete-3 {
    background: #f36b64;
    color: #fff;
}

/* まくり差し */
.semekata-table td.semekata-kimete-4 {
    background: #9670ae;
    color: #fff;
}

/* 差され */
.semekata-table td.semekata-kimete-6 {
    background: #d9f2f5;
    color: #247987;
}

/* まくられ */
.semekata-table td.semekata-kimete-7 {
    background: #fde0dd;
    color: #a43c36;
}

/* まくり差され */
.semekata-table td.semekata-kimete-8 {
    background: #eee2f4;
    color: #684583;
}

/* 計測不能 */
.semekata-table td.semekata-kimete-9 {
    background: #f1f3f5;
    color: #777;
}

/* テーブルの横幅をコンパクトに */
.semekata-table {
    min-width: 850px;
    font-size: 11px;
}

.semekata-table th,
.semekata-table td {
    padding: 7px 4px;
}

.semekata-player-cell {
    min-width: 110px;
}

.semekata-player-cell .semekata-title {
    gap: 6px;
}
.semekata-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #eef2f6;
}

.semekata-table tbody th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
}
/* 選手名の列をコンパクトに */
.semekata-table .semekata-player-cell {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    padding: 5px 3px;
}

/* 艇番と選手名の間隔 */
.semekata-player-cell .semekata-title {
    gap: 4px;
    margin-bottom: 0;
}

/* 艇番を少し小さく */
.semekata-player-cell .waku {
    width: 26px;
    min-width: 26px;
    height: 26px;
    font-size: 13px;
}

/* 選手名 */
.semekata-player-cell .semekata-title span:last-child {
    font-size: 11px;
}