@charset "UTF-8";

/* =================================================================
   1. 基本設定・リセットCSS
   - 統合スタイルシート (style.css)
================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* 1rem = 10px になるように設定 */
    font-size: 62.5%;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 1.6rem; /* 基本フォントサイズ 16px */
    line-height: 1.7;
    color: #333;
    background-color: #f4f4f4;
}

a {
    transition:
        color 0.3s ease,
        background-color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* =================================================================
   2. 共通レイアウト
================================================================= */

.container,
.station-container {
    max-width: 960px;
    margin: 3rem auto;
    padding: 2rem 3rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.station-container {
    overflow-x: auto; /* Station table requires horizontal scroll */
}

/* =================================================================
   3. 共通パーツ
================================================================= */

/* 3-1. ヘッダー */
header {
    background-color: #2e7d32; /* メインの緑 */
    color: #fff;
    padding: 1.5rem 60px;
    text-align: center;
    border-bottom: 5px solid #1b5e20; /* 濃い緑のアクセント */
}

header h1 {
    margin-bottom: 1rem;
    font-size: 2.4rem;
    font-weight: bold;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

header h1 a:hover {
    color: #c8e6c9; /* 明るい緑 */
}

header nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 4px;
}

header nav ul li a:hover,
header nav ul li a.active {
    background-color: #4caf50; /* 少し明るい緑 */
}

/* 3-2. フッター */
footer {
    text-align: center;
    padding: 2.5rem 20px;
    margin-top: 3rem;
    background-color: #333;
    color: #eee;
    font-size: 1.4rem;
}

footer p {
    margin-bottom: 1rem;
}

footer a {
    color: #a5d6a7;
    text-decoration: none;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

footer .copyright {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    color: #aaa;
}

/* 3-3. スライドナビゲーション */
.hamburger {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 15%;
    cursor: pointer;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px;
    transition:
        all 0.3s ease,
        left 0.4s ease;
}

.hamburger:hover {
    background-color: #f4f4f4;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #2e7d32;
    transition: all 0.3s ease;
}

.hamburger.is-active {
    left: 295px;
}

.hamburger.is-active span:nth-of-type(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.is-active span:nth-of-type(2) {
    opacity: 0;
}

.hamburger.is-active span:nth-of-type(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.sidenav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background-color: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 1001;
    padding: 2rem;
}

.sidenav.is-active {
    transform: translateX(0);
}

.sidenav h2 {
    font-size: 2rem;
    color: #2e7d32;
    margin-bottom: 2rem;
    border-bottom: 2px solid #a5d6a7;
    padding-bottom: 1rem;
}

.sidenav ul {
    list-style-type: none;
}

.sidenav ul li a {
    display: block;
    padding: 1.2rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 1.6rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.sidenav ul li a:hover {
    background-color: #e8f5e9;
    color: #1b5e20;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.4s ease,
        visibility 0.4s ease;
}

.overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* =================================================================
   4. 共通コンテンツ要素 (.container, .station-container)
================================================================= */

.container h2,
.station-container h2 {
    font-size: 2.2rem;
    color: #2e7d32;
    padding-bottom: 0.8rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #a5d6a7;
}

.container h3,
.station-container h3 {
    font-size: 1.8rem;
    color: #333;
    padding-left: 1.2rem;
    margin: 2.5rem 0 1.5rem;
    border-left: 5px solid #4caf50;
}

.container p,
.station-container p {
    margin-bottom: 1.5rem;
}

.container p:last-child,
.station-container p:last-child {
    margin-bottom: 0;
}

.container a,
.station-container a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: bold;
}

.station-container a:hover {
    color: #1b5e20;
    text-decoration-color: #fff;
}

.container a:hover {
    text-decoration: underline; /* Specific to .container links */
}

.container ul,
.container ol,
.station-container ul,
.station-container ol {
    margin: 0 0 1.5rem 1.5rem;
    padding-left: 1.5rem;
}

.container li,
.station-container li {
    margin-bottom: 0.8rem;
}

.container table,
.station-container table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.container th,
.container td,
.station-container th,
.station-container td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.station-container th,
.station-container td {
    white-space: nowrap; /* Specific to station tables */
}

.container th,
.station-container th {
    background-color: #e8f5e9;
    font-weight: bold;
    color: #1b5e20;
}

.container tr:nth-of-type(even),
.station-container tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.container hr,
.station-container hr {
    border: none;
    height: 1px;
    background-color: #ddd;
    margin: 3rem 0;
}

/* MX-V10導入速報ページの速報リストアイコン */
.container ul li img[src^="svg/"] {
    width: 3.6rem; /* アイコンの幅をフォントサイズに合わせる */
    height: 3.6rem; /* アイコンの高さをフォントサイズに合わせる */
    vertical-align: middle; /* アイコンをテキストの中央に配置 */
    margin-right: 0.5em; /* アイコンとテキストの間に余白を設定 */
}

.station-filter {
    margin: 1rem 0 2.5rem;
}
.station-filter label {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}
.station-filter input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.6rem;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
}

.train-line-section {
    margin-top: 1rem;
    border-top: 1px solid #eee;
}
.train-line-section:first-of-type {
    border-top: none;
}
.train-line-section summary {
    cursor: pointer;
    outline: none; /* クリック時の青い枠線を消す */
}
/* デフォルトのマーカーを非表示にする */
.train-line-section summary::-webkit-details-marker {
    display: none;
}
.train-line-section summary {
    list-style: none; /* Firefox用のマーカー非表示 */
}
.train-line-section summary h3 {
    display: inline-block;
    width: calc(100% - 25px); /* 矢印の分だけ幅を調整 */
}
/* 独自の矢印を追加 */
.train-line-section summary::after {
    content: "▼";
    font-size: 1.4rem;
    color: #4caf50;
    float: right;
    margin-top: 2.8rem;
    transition: transform 0.2s ease-in-out;
}
.train-line-section[open] > summary::after {
    transform: rotate(180deg);
}
.train-line-section[open] > ul {
    margin-top: 1rem;
}

/* =================================================================
   5. ページ固有スタイル
================================================================= */

/* 5-1. トップページ (body.top-page) */
body.top-page {
    background-image: url("http://zenmidf.fool.jp/images/fukusima_west.jpg");
    background-size: cover;
    background-position: center 41.5%;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.top-page .main-header {
    width: 100%;
    padding: 10px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.top-page .main-header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

.top-page .main-header nav ul li {
    margin-left: 15px;
}

.top-page .main-header nav ul li a {
    background-color: #282828;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 2.5px;
    transition: all 0.3s ease;
    font-size: 0.9em;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.top-page .main-header nav ul li a:hover {
    background-color: #484848;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.top-page .content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 80px 20px 20px;
    text-align: center;
}

.top-page .notice-container {
    margin-top: 2.5px;
    color: #f00;
    background-color: #fff;
}

.top-page .container {
    background-color: rgba(0, 0, 0, 0.75);
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    max-width: 700px;
    width: 90%;
    margin-top: 0;
}

.top-page h1 {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2.2em;
    letter-spacing: 1px;
}

.top-page .nav-buttons {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.top-page .nav-buttons .button {
    display: inline-block;
    padding: 10px 20px;
    margin: 8px;
    background-color: #4caf50;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1em;
    transition:
        background-color 0.3s ease,
        transform 0.2s ease;
}

.top-page .nav-buttons .button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.top-page .search-container {
    margin-top: 25px;
}

.top-page .search-container ~ .search-container {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.top-page .search-form-title {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

.top-page .search-form-warning {
    font-weight: 700;
    font-style: oblique 14deg;
    font-size: 1em;
    color: #f00;
    background-color: rgba(255, 0, 0, 0.1);
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 0, 0, 0.3);
    display: inline-block;
    margin-bottom: 10px;
}

.top-page .search-container form {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.top-page .search-container input[type="text"] {
    padding: 12px;
    width: 70%;
    max-width: 350px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    font-size: 1em;
    min-width: 200px;
}

.top-page .search-container input[type="submit"] {
    padding: 12px 22px;
    background-color: #007bff;
    color: #fff;
    border: 1px solid #007bff;
    border-left: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.top-page .search-container input[type="submit"]:hover {
    background-color: #0056b3;
}

.top-page .search-reference {
    margin-top: 5px;
    padding: 5px 7.5px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    display: inline-block;
    border: 1px solid #ccc;
    font-size: 10px;
}

.top-page .search-reference a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-page .search-reference a:hover {
    text-decoration: underline;
}

.top-page footer {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px 0;
    text-align: center;
}

.top-page footer nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.top-page footer nav ul li {
    margin: 5px 15px;
}

.top-page footer nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1em;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.top-page footer nav ul li a:hover {
    background-color: #4caf50;
}

/* 5-2. このサイトについてページ (body.about-page) */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #4caf50;
}

.page-header h2 {
    color: #2e7d32;
    font-size: 2.2rem;
}

.about-content h3 {
    color: #1b5e20;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #a5d6a7;
}

.about-content p,
.about-content ul li {
    color: #555;
}

.about-content p {
    margin-bottom: 1rem;
}

.about-content ul {
    list-style-type: none;
    margin-bottom: 1rem;
    padding-left: 0;
}

.about-content ul li {
    margin-bottom: 0.5rem;
}

.about-content a {
    color: #4caf50;
    text-decoration: none;
    font-weight: normal;
    transition:
        color 0.3s ease,
        text-decoration 0.3s ease;
}

.about-content a:hover {
    color: #2e7d32;
    text-decoration: underline;
}

.timeline {
    font-family: sans-serif;
}

.timeline-year {
    margin-top: 2em;
    margin-bottom: 0.3em;
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
}

.timeline-year:first-of-type {
    margin-top: 0;
}

.timeline-month {
    margin-top: 0.8em;
    margin-bottom: 0.5em;
    font-size: 1.1em;
    font-weight: bold;
    color: #555;
}

.timeline-event {
    margin-left: 20px;
    margin-bottom: 1em;
    line-height: 1.7;
    color: #444;
}

.timeline-event + .timeline-event {
    margin-top: 0.5em;
}

/* 5-3. 検索結果ページ (body.search-result) */
body.search-result {
    background-color: transparent;
}

.search-result .background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-size: cover;
    background-position: center 41.5%;
    background-attachment: fixed;
}

.search-result .content-wrapper {
    position: relative;
    z-index: 1;
    padding: 0;
    min-height: 100vh;
}

.search-result .container {
    color: #333; /* 文字色をリセット */
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    font-size: 2.2rem;
    color: #2e7d32;
    border-bottom: 2px solid #4caf50;
}

.search-query-title {
    padding-bottom: 10px;
    margin-top: 2rem;
    font-size: 1.8rem;
    color: #2e7d32;
    border-bottom: 2px solid #4caf50;
}

.sheet-title {
    background-color: #e8f5e9;
    padding: 12px 15px;
    border-left: 5px solid #4caf50;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    color: #1b5e20;
    border-radius: 4px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 25px;
    -webkit-overflow-scrolling: touch;
}

.results-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.results-table th,
.results-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
}

.results-table th {
    background-color: #4caf50;
    color: #fff;
    font-weight: bold;
}

.results-table tr:nth-child(even) td {
    background-color: #f8f9fa;
}

.results-table tr:hover td {
    background-color: #e0f2f1;
}

.message-display {
    color: #555;
    font-style: italic;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

.loading-indicator {
    display: none;
    text-align: center;
    padding: 30px 20px;
    font-size: 1.2em;
    color: #333;
    background-color: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
    margin: 20px 0;
}

.loading-indicator .spinner {
    border: 5px solid #f0f0f0;
    border-top: 5px solid #4caf50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.search-again-container {
    margin-top: 30px;
    text-align: center;
}

.container .search-again-button {
    display: inline-block;
    padding: 10px 25px;
    background-color: #4caf50;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1em;
    transition:
        background-color 0.3s ease,
        transform 0.2s ease;
}

.search-again-button:hover {
    background-color: #2e7d32;
    transform: translateY(-1px);
    color: #fff;
}

.station-image {
    width: 200px;
    height: auto;
}

/* 5-4. 駅別ページ (station-individual.html) */

/* パンくずリスト */
.breadcrumb {
    list-style: none;
    padding: 8px 15px;
    margin: 0;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.breadcrumb li {
    display: inline;
}

.breadcrumb li a {
    color: #0275d8;
    text-decoration: none;
}

.breadcrumb li a:hover {
    text-decoration: underline;
}

.breadcrumb li + li::before {
    content: ">";
    padding: 0 8px;
    color: #6c757d;
}

.breadcrumb li[aria-current="page"] {
    color: #333;
    font-weight: bold;
}

/* 事業者別乗り換えボタン */
.company-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 2rem;
    padding: 1rem 0;
}

.company-button {
    display: inline-block;
    padding: 12px 24px;
    color: #fff;
    background-color: #9e9e9f; /* default/other */
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    min-width: 160px;
}

.container .company-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #fff;
    text-decoration: none;
}

/* 各社の背景色 */
.company-button.jr-hokkaido {
    color: #fff;
    background-color: #44af35;
}
.company-button.jr-east {
    color: #fff;
    background-color: #008803;
}
.company-button.jr-tokai {
    color: #fff;
    background-color: #ee6d00;
}
.company-button.jr-west {
    color: #fff;
    background-color: #0068b7;
}
.company-button.jr-shikoku {
    color: #fff;
    background-color: #309ac3;
}
.company-button.jr-kyushu {
    color: #fff;
    background-color: #e50012;
}

/* 駅名リスト (Flexboxで統一) */
.station-name-01,
.station-name-02,
.station-name-03,
.station-name-04,
.station-name-05,
.station-name-06,
.station-name-otr {
    list-style: none;
    padding: 0;
    margin: 0;
}

.station-name-01 li,
.station-name-02 li,
.station-name-03 li,
.station-name-04 li,
.station-name-05 li,
.station-name-06 li,
.station-name-otr li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    min-height: 24px;
}

.station-name-01 li::before,
.station-name-02 li::before,
.station-name-03 li::before,
.station-name-04 li::before,
.station-name-05 li::before,
.station-name-06 li::before,
.station-name-otr li::before {
    content: "▶";
    font-size: 0.9em;
    margin-right: 8px;
}

/* 各リストの矢印の色 */
.station-name-01 li::before {
    color: #44af35;
} /* JR Hokkaido */
.station-name-02 li::before {
    color: #008803;
} /* JR East */
.station-name-03 li::before {
    color: #ee6d00;
} /* JR Tokai */
.station-name-04 li::before {
    color: #0068b7;
} /* JR West */
.station-name-05 li::before {
    color: #309ac3;
} /* JR Shikoku */
.station-name-06 li::before {
    color: #e50012;
} /* JR Kyushu */

/* 駅名リンク共通スタイル */
.station-name-01 li a,
.station-name-02 li a,
.station-name-03 li a,
.station-name-04 li a,
.station-name-05 li a,
.station-name-06 li a,
.station-name-otr li a {
    display: inline-block;
    width: 7.5em; /* 長い駅名に対応 */
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    text-decoration: none;
}

.station-icons-container {
    margin-left: 0.5em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.station-icon {
    width: 20px;
    height: auto;
}

/* 特殊なテキストスタイル */
.unknown-text {
    color: #f00;
    font-weight: bold;
}
.business-hour-text {
    color: #f00;
}
.amv-operation-hour-text {
    color: #00f;
}

/* 改札内テーブル専用スタイル */
.LI-table th {
    background-color: #eaf4ff; /* 水色 */
    color: #0056b3; /* 濃い青 */
}
/* MX-V10速報 */
.mx-v10_news {
    list-style: none;
    padding-left: 0;
}

/* データ検索 */

.search-form-title {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

.search-form-warning {
    font-weight: 700;
    font-style: oblique 14deg;
    font-size: 1em;
    color: #ff0000;
    background-color: rgba(255, 0, 0, 0.1);
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 0, 0, 0.3);
    display: inline-block;
    margin-bottom: 10px;
}

.search-container {
    margin-top: 25px;
}

.search-container ~ .search-container {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.search-container form {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.search-container input[type="text"] {
    padding: 12px;
    width: 70%;
    max-width: 350px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    font-size: 1em;
    box-sizing: border-box;
    min-width: 200px;
}

.search-container input[type="submit"] {
    padding: 12px 22px;
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
    border-left: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.search-container input[type="submit"]:hover {
    background-color: #0056b3;
}
.search-reference {
    margin-top: 5px;
    padding: 5px 7.5px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    display: inline-block;
    border: 1px solid #ccc;
    font-size: 10px;
}
.search-reference a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-reference a:hover {
    text-decoration: underline;
}

/* =================================================================
   5-5. 凡例 (駅設備アイコン)
================================================================= */

.legend-box {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 2.5rem 0 1.5rem; /* h3タグの余白に合わせる */
    background-color: #f9f9f9;
}

.legend-title {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.8rem; /* h3タグのフォントサイズに合わせる */
    color: #333;
    padding-left: 1.2rem;
    border-left: 5px solid #4caf50;
}

.legend-box[open] > .legend-title {
    margin-bottom: 15px; /* 開いたときにテーブルとの間に余白を設ける */
}

.legend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.5rem;
}

/* 既存の .station-container のテーブルスタイルを継承・適用 */
.legend-table th,
.legend-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.legend-table th {
    background-color: #e8f5e9;
    font-weight: bold;
    color: #1b5e20;
    text-align: center;
}

.legend-table td:first-child {
    text-align: center;
}

.legend-title {
    position: relative;
    padding-right: 20px; /* 矢印のスペース */
}

/* デフォルトの矢印を消すブラウザもあるため、自前で実装 */
.legend-title::marker,
.legend-title::-webkit-details-marker {
    display: none;
}

/* 閉じた状態の矢印 */
.legend-title::after {
    content: "▼";
    font-size: 0.8em;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s;
}

/* 開いた状態の矢印 */
.legend-box[open] > .legend-title::after {
    transform: translateY(-50%) rotate(180deg);
}

/* =================================================================
   6. レスポンシブ対応
================================================================= */

@media (max-width: 768px) {
    html {
        font-size: 60%;
    }
    .container,
    .station-container {
        margin: 2rem auto;
        padding: 1.5rem;
    }
    header h1 {
        font-size: 2.2rem;
    }
    header nav ul {
        flex-direction: column;
        align-items: center;
    }
    header nav ul li {
        margin: 8px 0;
    }
    .page-header h2,
    .page-title {
        font-size: 1.8rem;
    }
    .about-content h3 {
        font-size: 1.3rem;
    }
    .search-query-title {
        font-size: 1.5rem;
    }
    .sheet-title {
        font-size: 1.2rem;
        padding: 10px;
    }
    .results-table {
        font-size: 0.85em;
    }
    .results-table th,
    .results-table td {
        padding: 8px 10px;
    }
    .container .search-again-button {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}

@media (max-width: 600px) {
    /* トップページ専用 */
    .top-page .main-header {
        position: static;
        justify-content: flex-end;
        padding: 15px 10px;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.8);
    }
    .top-page .main-header nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .top-page .main-header nav ul li {
        margin: 5px;
    }
    .top-page .main-header nav ul li a {
        font-size: 0.8em;
        padding: 6px 12px;
    }
    .top-page .main-header nav ul li a:hover {
        transform: none;
    }
    .top-page .content-wrapper {
        padding: 20px 10px;
        justify-content: flex-start;
    }
    .top-page h1 {
        font-size: 1.8em;
    }
    .top-page .nav-buttons {
        display: none;
    }
    .top-page .search-container {
        margin-top: 20px;
    }
    .top-page .search-container + .search-container {
        margin-top: 25px;
    }
    .top-page .search-form-title {
        font-size: 1.1em;
    }
    .top-page .search-form-warning {
        font-size: 0.8em;
    }
    .top-page .search-container form {
        flex-direction: column;
    }
    .top-page .search-container input[type="text"] {
        width: 100%;
        max-width: none;
        margin-bottom: 10px;
        border-radius: 5px;
    }
    .top-page .search-container input[type="submit"] {
        width: 100%;
        border-radius: 5px;
        border-left: 1px solid #007bff;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 55%;
    }
    body {
        font-size: 1.5rem;
    }
    .container,
    .station-container {
        padding: 1.5rem 1rem;
        margin: 1.5rem auto;
    }
    .about-page .container {
        width: 95%;
        padding: 15px;
    }
    .station-container {
        font-size: 90%;
    }
    .station-container table {
        font-size: 90%;
        margin-bottom: 1.5rem;
    }
    .station-container th,
    .station-container td {
        padding: 8px 10px;
        white-space: normal; /* Allow text to wrap on very small screens */
    }
    .station-image {
        width: 160px;
    }
    .station-icon {
        width: 18px;
    }
    .page-title,
    .page-header h2 {
        font-size: 1.6rem;
    }
    .search-query-title {
        font-size: 1.3rem;
    }
    .sheet-title {
        font-size: 1.1rem;
    }
}

/* =================================================================
   7. 会員サービス・マイページ追加スタイル
================================================================= */

#member-area #mypage-contents {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

#member-area #profile-form {
    margin-top: 1.5rem;
}

#member-area label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

#member-area input[type="text"],
#member-area textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    box-sizing: border-box; /* 既存のスタイルと合わせる */
    font-family: inherit; /* bodyのフォントを継承 */
}

#member-area textarea {
    min-height: 120px;
    resize: vertical;
}

#member-area button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4caf50; /* サイトのテーマカラー */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#member-area button:hover {
    background-color: #45a049;
}

#member-area #logout-button {
    background-color: #f44336; /* ログアウトは赤系に */
    margin-top: 2rem;
}
#member-area #logout-button:hover {
    background-color: #d32f2f;
}

#update-message {
    margin-top: 1rem;
    font-weight: bold;
    color: #2e7d32; /* 成功メッセージの色 */
}

/* バッジのスタイル */
.user-badge {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff; /* バッジの色 */
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* （参考）別の色のバッジも用意する場合 */
.user-badge.special {
    background-color: #ffc107; /* 特別なバッジの色 */
    color: #333;
}

/* =================================================================
   8. 会員一覧ページ (members.html)
================================================================= */

.member-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #fff; /* 背景色を白に */
}

/* カード内のh3タグは既存のスタイルが適用されるため、微調整 */
.member-card h3 {
    font-size: 1.8rem;
    color: #333;
    padding-left: 1.2rem;
    margin: 0 0 1.5rem 0; /* 上下のマージンを調整 */
    border-left: 5px solid #4caf50;
    border-bottom: none; /* 下線を削除 */
    padding-bottom: 0;
}

.member-card p {
    margin-bottom: 1.5rem;
    white-space: pre-wrap; /* 自己紹介文の改行を反映 */
}

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

/* =================================================================
   9. 自己紹介テーブルのスタイル調整（レスポンシブ対応版）
================================================================= */

/* about-pageの自己紹介テーブルに限定して適用 */
.about-page .about-content table {
    table-layout: fixed; /* テーブルのレイアウト計算方法を固定 */
    width: 100%; /* テーブル全体の幅を親要素の100%に設定 */
}

.about-page .about-content th {
    width: 25%;
}

/* =================================================================
   10.svgサイズ設定
================================================================= */
.mars-info {
    width: 75px;
}
