/* ==========================================================================
   FlexRobin ガイドページ スタイル (guide.css)
   ========================================================================== */

/* 1. パンくずリスト */
.guide-breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--theme-text-muted, #475569);
}

.guide-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.guide-breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--theme-text-muted, #94a3b8);
}

.guide-breadcrumb a {
    color: var(--theme-primary-text, #0272ab);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.guide-breadcrumb a:hover {
    color: var(--theme-primary-text, #0272ab);
}

/* 2. メインコンテナ・見出し */
.guide-container {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1rem;
}

.guide-title {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--theme-text, #0f172a);
    margin-bottom: 0.5rem;
}

.guide-dates {
    font-size: 0.875rem;
    color: var(--theme-text-muted, #475569);
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.guide-intro {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--theme-text, #0f172a);
    margin-bottom: 1.5rem;
}

.guide-intro p {
    margin-bottom: 1rem;
}

.guide-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.guide-section h2,
.guide-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-text, #0f172a);
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--theme-border, #cbd5e1);
    padding-bottom: 0.5rem;
}

.guide-section p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--theme-text, #0f172a);
    margin-bottom: 1rem;
}

/* 3. 人数タブ */
.guide-tabs {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.guide-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 2px solid var(--theme-border, #cbd5e1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.guide-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--theme-text, #0f172a);
    background-color: var(--theme-surface, #ffffff);
    border: 1px solid var(--theme-border, #cbd5e1);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guide-tab:hover {
    background-color: var(--theme-primary-light, #e0f2fe);
}

.guide-tab[aria-selected="true"],
.guide-tab.is-active {
    color: var(--theme-on-primary, #ffffff);
    background-color: var(--theme-primary, #0284c7);
    border-color: var(--theme-primary, #0284c7);
}

.guide-tab:focus-visible {
    outline: 2px solid var(--theme-ring, #38bdf8);
    outline-offset: 2px;
}

.guide-tabpanel {
    display: block;
    background-color: var(--theme-surface, #ffffff);
    border: 1px solid var(--theme-border, #cbd5e1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.guide-tabpanel h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-text, #0f172a);
    margin-top: 0;
    margin-bottom: 1rem;
}

.guide-tab-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--theme-text, #0f172a);
    margin-bottom: 1rem;
}

.guide-tabpanel.is-hidden {
    display: none;
}

/* 4. 等幅フォント */
.guide-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-variant-numeric: tabular-nums;
}

/* 5. 対戦表・検算テーブル */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-align: left;
}

.guide-table th,
.guide-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--theme-border, #cbd5e1);
}

.guide-table th {
    background-color: var(--theme-primary-light, #e0f2fe);
    color: var(--theme-text, #0f172a);
    font-weight: 700;
}

.guide-table td {
    background-color: var(--theme-surface, #ffffff);
    color: var(--theme-text, #0f172a);
}

/* 6. LINE共有用 pre */
.guide-pre {
    background-color: var(--theme-surface, #f8fafc);
    border: 1px solid var(--theme-border, #cbd5e1);
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--theme-text, #0f172a);
}

/* 7. 注記 */
.guide-note {
    font-size: 0.875rem;
    color: var(--theme-text-muted, #475569);
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* 8. CTA（導線リンク） */
.guide-cta {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--theme-primary-light, #e0f2fe);
    border: 1px solid var(--theme-border, #cbd5e1);
    border-radius: 0.75rem;
    text-align: center;
}

.guide-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--theme-on-primary, #ffffff);
    background-color: var(--theme-primary, #0284c7);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.guide-cta-btn:hover {
    background-color: var(--theme-primary-hover, #0369a1);
}

.guide-cta-btn:focus-visible {
    outline: 2px solid var(--theme-ring, #38bdf8);
    outline-offset: 2px;
}

.guide-cta-note {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--theme-text-muted, #475569);
}

/* 9. FAQ */
.guide-faq {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.guide-faq dt {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--theme-text, #0f172a);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.guide-faq dd {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--theme-text-muted, #475569);
    margin-left: 0;
    margin-bottom: 1.25rem;
    padding-left: 1rem;
    border-left: 3px solid var(--theme-primary, #0284c7);
}

/* 10. 前後人数切り替えナビゲーション */
.guide-tab-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--theme-border, #cbd5e1);
}

.guide-tab-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-primary-text, #0272ab);
    background-color: var(--theme-surface, #ffffff);
    border: 1px solid var(--theme-border, #cbd5e1);
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.guide-tab-nav-btn:hover {
    background-color: var(--theme-primary-light, #e0f2fe);
}

.guide-tab-nav-btn:focus-visible {
    outline: 2px solid var(--theme-ring, #38bdf8);
    outline-offset: 2px;
}

/* 11. 隣接ページ・出典リスト */
.guide-link-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.guide-link-list li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.guide-link-list a {
    color: var(--theme-primary-text, #0272ab);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.guide-link-list a:hover {
    color: var(--theme-primary-text, #0272ab);
}

/* 12. 非表示補助クラス */
.is-hidden {
    display: none !important;
}

/* 本文の背景・文字色はテーマ変数に追従させる。共通ヘッダー（固定・高さ5rem）の下に余白を取る */
.guide-body {
    background-color: var(--theme-bg, #f8fafc);
    color: var(--theme-text, #0f172a);
}

.guide-main {
    padding-top: 6.5rem;
}

/* 表のセルは折り返さず、横スクロール（overflow-x-auto のコンテナ）で閲覧する。2面以上の対戦表で、セルが縦に崩れるのを防ぐ */
.guide-table th,
.guide-table td {
    white-space: nowrap;
}

/* body が縦方向の flex のため、左右の auto マージンを持つ本文は、内容の最小幅まで広がる。幅を親に固定し、表は overflow-x-auto の中でスクロールさせる */
.guide-container {
    width: 100%;
    box-sizing: border-box;
}
