:root {
    --primary-color: #2563eb;
    --text-color: #1f2937;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

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

header.main_header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    margin: 0;
    /* デフォルト（PC）のサイズ */
    font-size: 2.8rem;
    letter-spacing: -1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    /* 改行されないように指定 */
    white-space: nowrap;
}

/* スマホ用の設定（画面幅が600px以下の場合） */
@media (max-width: 600px) {
    header h1 {
        /* スマホで見やすいサイズに自動調整（10vwは画面横幅の10%という意味） */
        font-size: 8vw; 
        /* もしvwが不安なら、固定で 1.8rem 程度にしてもOK */
    }
    
    header p {
        font-size: 0.9rem;
        padding: 0 10px;
    }
}

/* header h1 a の設定部分を強化 */
header h1 a, 
header h1 a:visited, 
header h1 a:hover, 
header h1 a:active {
    color: white;
    text-decoration: none;
}

header h1 span {
    color: #93c5fd;
    font-weight: 400; /* .com だけ少し細くするとモダンに見えます */
}

.intro {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.intro h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.card.preview { opacity: 0.7; background: #e2e8f0; }

.icon { font-size: 2rem; margin-bottom: 10px; }

.btn {
    margin-top: auto;
    display: inline-block;
    color: var(--primary-color);
    font-weight: bold;
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    border-radius: 6px;
    text-align: center;
}

footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.9rem;
    color: #64748b;
}

/* 記事全体のコンテナ */
.tech-guide { 
    text-align: left; 
    max-width: 850px; 
    margin: 0 auto 40px; /* 上の余白を削り、base.htmlとの間隔を調整 */
    padding: 40px;
    background: #ffffff;
    border-radius: 0 0 12px 12px; /* 上側は角を丸めず、自然に繋げる */
}

/* 記事ヘッダー：装飾を最小限に */
.guide-header { 
    background-color: #fff;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0; /* 細い線一本に */
}

.guide-header h1 {
    font-size: 1.8rem; /* base.htmlのタイトルより控えめに */
    color: #1e293b;    /* 落ち着いた黒に近い紺 */
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.post-date { 
    color: #64748b;
    font-size: 0.85rem; 
    display: block;
}

/* 以下、ステップ等の装飾は維持しつつスッキリ */
.step { margin-bottom: 35px; }

.step h3 { 
    color: var(--primary-color); 
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

/* 見出しの頭に小さな青い四角をつけてアクセントに */
.step h3::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 1.2em;
    background: var(--primary-color);
    margin-right: 12px;
    border-radius: 2px;
}

pre { 
    background: #1e293b; 
    color: #f8fafc; 
    padding: 15px; 
    border-radius: 8px; 
    overflow-x: auto; 
    font-size: 0.9rem;
    line-height: 1.5;
}

code { 
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    color: #fff;
    padding: 2px 5px; 
    border-radius: 4px; 
}

.warning { 
    border: none;
    border-left: 5px solid #f59e0b;
    background: #fffbeb; 
    padding: 15px 20px;
}

/* 次のステップへのリンク */
.next-guide {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px dashed #e2e8f0;
    text-align: center;
}

.next-guide p {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 1rem;
}

.next-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white !important;
    text-decoration: none !important;
    padding: 20px 40px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.next-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.next-button span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.next-button strong {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .next-button {
        padding: 15px 25px;
        width: 100%;
        box-sizing: border-box;
    }
    .next-button strong {
        font-size: 1rem;
    }
}

/* 以前のCSSを継承 + 追加分 */
.tech-guide { text-align: left; max-width: 850px; margin: 0 auto 40px; padding: 40px; background: #fff; border-radius: 12px; }
.guide-header { border-bottom: 1px solid #e2e8f0; margin-bottom: 30px; padding-bottom: 15px; }
.step h3 { color: var(--primary-color); font-size: 1.3rem; margin-bottom: 15px; display: flex; align-items: center; }
.step h3::before { content: ""; display: inline-block; width: 6px; height: 1.2em; background: var(--primary-color); margin-right: 12px; border-radius: 2px; }
pre { background: #1e293b; color: #f8fafc; padding: 15px; border-radius: 8px; overflow-x: auto; font-size: 0.9rem; margin: 10px 0; }
.success-box { background: #f0fdf4; border: 2px solid #22c55e; padding: 20px; border-radius: 12px; color: #166534; }
code { font-weight: bold; color: #e11d48; background: #fff1f2; padding: 2px 4px; border-radius: 4px; }
pre code { color: inherit; background: inherit; padding: 0; }

/* セクション全体の調整 */
.section-container { margin: 40px 0; }
.section-title { 
    font-size: 1.5rem; 
    color: #1e293b; 
    margin-bottom: 25px; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}
.section-title i { color: var(--primary-color); }
.section-divider { border: 0; border-top: 1px solid #e2e8f0; margin: 50px 0; }

/* アンテナサイト用カード (既存を活かす) */
.service-card:hover { transform: translateY(-5px); border-color: var(--primary-color); }

/* 技術ガイド用カード (差別化) */
.tech-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tech-card {
    background: #f8fafc; /* わずかにグレーにして「資料感」を出す */
    border: 1px solid #e2e8f0;
    text-align: left;
    display: flex;
    flex-direction: row; /* アイコンとテキストを横並びに */
    gap: 20px;
    padding: 20px;
}
.tech-card .icon { 
    font-size: 1.8rem; 
    color: #64748b; 
    background: #fff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.tech-content h3 { font-size: 1.1rem; margin-bottom: 8px; color: #0f172a; }
.tech-content p { font-size: 0.85rem; line-height: 1.5; margin-bottom: 12px; }
.read-more { font-size: 0.85rem; color: var(--primary-color); font-weight: bold; }

/* プレビュー (Coming Soon) */
.preview-section { opacity: 0.7; }
.section-title.small { font-size: 1rem; color: #94a3b8; }
.preview-card { padding: 10px; background: transparent; border: 1px dashed #cbd5e1; font-size: 0.8rem; }

@media (max-width: 600px) {
    .tech-card { flex-direction: column; text-align: center; }
    .tech-card .icon { margin: 0 auto; }
}

/* タブのスタイル */
.tabs {
    margin-bottom: 30px;
}

/* ラジオボタンを完全に隠す */
.tabs input[type="radio"] {
    display: none;
}

/* タブインデックス（ラベル）の配置 */
.tab-labels {
    display: flex;
    gap: 5px;
    margin-left: 20px; /* ファイルのインデックスっぽく少しずらす */
}

.tab-labels label {
    padding: 10px 20px;
    background-color: #ddd;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    color: #555;
    z-index: 1;
}

/* 競馬ラベルのカラー */
.tab-labels .label-keiba { border-top: 3px solid #b8860b; }
/* 坂道ラベルのカラー */
.tab-labels .label-sakamichi { border-top: 3px solid #ff69b4; }
/* なんJラベルのカラー */
.tab-labels .label-nanj { border-top: 3px solid #1e90ff; }

/* コンテンツエリアのスタイル */
.tab-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
    position: relative;
    z-index: 2;
}

/* 記事リスト */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.article-list li {
    padding: 8px 0;
}

.article-list a {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column; /* 縦並びにする */
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.article-list a:hover {
    background-color: #f9f9f9; /* ホバー時に背景色を変える */
}

.article-list .article-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: #222;
    margin-bottom: 2px; /* サイト名との間隔 */
}

.article-list .article-site {
    font-size: 0.75rem; /* 小さく */
    color: #888; /* 薄く */
}

/* もっと見るボタン */
.btn-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* --- タブ切り替えのロジック --- */
/* 初期状態：パネルは全て非表示 */
.tab-content .panel {
    display: none;
}

/* 選択されたラベルのスタイル */
#tab-keiba:checked ~ .tab-labels label.label-keiba,
#tab-sakamichi:checked ~ .tab-labels label.label-sakamichi,
#tab-nanj:checked ~ .tab-labels label.label-nanj {
    background-color: white;
    border-bottom: 1px solid white; /* 下のパネルと繋げる */
    color: #000;
}

/* 選択されたパネルを表示 */
#tab-keiba:checked ~ .tab-content .panel-keiba,
#tab-sakamichi:checked ~ .tab-content .panel-sakamichi,
#tab-nanj:checked ~ .tab-content .panel-nanj {
    display: block;
}

/* データがない場合のメッセージスタイル */
.no-data-message {
    text-align: center;
    padding: 50px 20px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    height: 300px; /* パネルと同じ高さにする */
    box-sizing: border-box;
}

div.guide-img {
    margin: 20px 0;
    text-align: center; /* 中央寄せ */
}

div.guide-img img {
    max-width: 100%;    /* 親要素の幅を超えない（レスポンシブ） */
    height: auto;       /* アスペクト比を維持 */
    border-radius: 8px; /* 角を少し丸めると柔らかい印象に */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* 軽い影をつけて記事と区別 */
    border: 1px solid #eee; /* 背景が白い画像でも境界がわかるように */
    
    /* PCで見るときに巨大化しすぎないよう上限を設定 */
    display: inline-block;
    max-height: 500px;  /* 縦に長くなりすぎるのを防ぐ */
    object-fit: contain; /* 枠内に収める */
}

div.guide-img p {
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
}