/* --- 全体基本設定 --- */
body {
    font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
}

a {
    color: #2E7D32;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* --- ヘッダー --- */
header {
    background-color: #222;
    color: #fff;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4em;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav li {
    position: relative;
}

nav a {
    color: #fff;
    padding: 5px 10px;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #444;
    padding: 10px;
    min-width: 160px;
}

nav li:hover .submenu {
    display: block;
}

.submenu li {
    display: block;
}

/* --- ヒーローセクション --- */
.hero {
    background: linear-gradient(to bottom, #4CAF50, #388E3C);
    color: #fff;
    padding: 15px 15px;
    text-align: center;
}

.hero h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1em;
}

.cta-buttons {
    margin-top: 20px;
}

.btn {
    display: inline-block;
    background: #fff;
    color: #388E3C;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    margin: 5px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #E8F5E9;
}

.btn-small {
    display: inline-block;
    background: #2E7D32;
    color: #fff;
    padding: 6px 12px;
    font-size: 0.9em;
    border-radius: 3px;
    margin-top: 10px;
    margin-bottom: 5px;
}

/* --- ツールカード --- */
.tool-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.card {
    flex: 1 1 45%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card h3 {
    margin-top: 0;
}

/* --- お知らせ --- */
.news ul {
    padding-left: 20px;
}

.news li {
    margin-bottom: 8px;
}

/* --- フッター --- */
footer {
    background: #333;
    color: #ccc;
    padding: 20px 0;
    margin-top: 40px;
}

footer ul {
    list-style: none;
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 0;
    margin-bottom: 10px;
}

footer a {
    color: #ccc;
}

/* --- レスポンシブ対応 --- */
@media screen and (max-width: 768px) {
    .tool-cards {
        flex-direction: column;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .container {
        padding: 15px;
    }

    .card {
        flex: 1 1 100%;
    }
}


/* --- ロゴの視認性改善 --- */
.logo a {
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
}



/* --- PC表示時のサブメニューを横に表示（改行させない） --- */
@media screen and (min-width: 769px) {
    nav ul.nav-menu > li {
        position: relative;
    }

    nav ul.submenu {
        white-space: nowrap;
        padding: 10px;
        background: #444;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 160px;
        z-index: 1000;
    }

    nav ul.submenu li {
        margin: 0;
    }
}



/* --- ハンバーガーメニュー対応 --- */
.menu-toggle {
    display: none;
    font-size: 1.5em;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul.nav-menu {
        display: none;
        flex-direction: column;
        background-color: #222;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 20px;
    }

    nav ul.nav-menu.active {
        display: flex;
    }

    nav li {
        margin-bottom: 10px;
    }

    nav li:hover .submenu {
        position: static;
        display: block;
        background-color: #333;
        padding-left: 20px;
    }

    .submenu {
        position: static;
        background: #333;
        padding-left: 10px;
    }
}

/* テーブルの基本スタイル */
.race-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.race-table th, .race-table td {
    border: 1px solid #ccc;
    padding: 3px;
    text-align: center;
    font-size: 0.95em;
}

.race-table th {
    background-color: #f4f4f4;
}

/* 枠番の色分け */
.Waku1 {
  background: #ffffff;
  color: #444444 !important;
}

.Waku2 {
  background: #444444;
  color: #ffffff !important;
}

.Waku3 {
  background: #e95556;
  color: #ffffff !important;
}

.Waku4 {
  background: #416cba;
  color: #ffffff !important;
}

.Waku5 {
  background: #e7c52c;
  color: #ffffff !important;
}

.Waku6 {
  background: #45af4c;
  color: #ffffff !important;
}

.Waku7 {
  background: #ee9738;
  color: #ffffff !important;
}

.Waku8 {
  background: #ef8fa0;
  color: #ffffff !important;
}
/* スマホ対応: テーブルを横スクロール可能に */
@media screen and (max-width: 768px) {
    .race-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}


/* --- 入力UIのサイズ改善 --- */

/* プルダウンサイズ調整 */
select {
    font-size: 1.1em;
    padding: 6px 10px;
    min-width: 80px;
}

/* チェックボックスサイズ調整 */
input[type="checkbox"] {
    width: 15px;
    height: 15px;
    transform: scale(1.2);
    margin: 4px;
}


/* 選出結果のテーブル表示 */
.result-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.result-table th,
.result-table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: center;
}

.result-table th {
    background-color: #f4f4f4;
}

.result-table td {
    background-color: #fff;
    font-weight: bold;
}
