/* guide/guide.css */

/* --- 1. 全体のリセットと基本設定 --- */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
    line-height: 1.7;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    -webkit-text-size-adjust: 100%;
}

/* --- 2. 文章・見出しのデザイン --- */
p {
    margin-bottom: 1.6rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h1 {
    border-bottom: 3px solid #007bff;
    padding-bottom: 12px;
    font-size: 1.5rem;
    margin-top: 10px;
    margin-bottom: 1.5rem;
}

h2 {
    background: #f8f9fa;
    padding: 12px 15px;
    border-left: 5px solid #007bff;
    margin-top: 40px;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
}

h3 {
    color: #007bff;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

/* --- 3. 目次 (TOC) --- */
.toc {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 25px 0;
    border-radius: 8px;
}

.toc strong {
    display: block;
    margin-bottom: 10px;
}

.toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 12px;
}

.toc a {
    color: #007bff;
    text-decoration: none;
    display: block;
}

/* --- 4. テーブル・装飾 --- */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border: 1px solid #ddd;
}

table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px;
    font-size: 0.95rem;
}

th {
    background-color: #f2f2f2;
}

.highlight {
    background: #fff3cd;
    padding: 2px 4px;
    font-weight: bold;
    border-radius: 3px;
}

/* --- 5. 開発者メモ・アプリ誘導 --- */
.developer-note {
    background-color: #fef4f4;
    border: 1px dashed #ee8181;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 25px 0;
    font-size: 0.9rem;
}

.developer-note p {
    margin-bottom: 0.8rem;
}

.note-title {
    font-weight: bold;
    color: #d32f2f;
}

.app-link {
    text-align: center;
    margin: 50px 0;
    padding: 30px 15px;
    background: #e7f3ff;
    border-radius: 12px;
}

.app-button {
    display: block;
    max-width: 300px;
    margin: 20px auto 0;
    padding: 18px 20px;
    background: #007bff;
    color: #fff !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}

/* --- 6. 戻るボタン (ここを強化しました) --- */
.back-button-container {
    margin: 10px 0;
    text-align: center;
}

.back-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #888;          /* 初期カラー */
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    position: relative;   /* 下線の基準 */
    padding: 10px 15px;
    transition: color 0.3s ease;
    cursor: pointer;
}

/* 矢印のデザイン */
.back-button .arrow {
    margin-right: 8px;
    display: inline-block;
    transition: transform 0.3s ease; /* 動きを滑らかに */
}

/* ホバー時の挙動 */
.back-button:hover {
    color: #000;          /* 文字を黒にする */
}

.back-button:hover .arrow {
    transform: translateX(-5px); /* 矢印を左に動かす */
}

/* 下線のアニメーション設定 */
.back-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;             /* 最初は線なし */
    height: 1px;
    background: #333;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.back-button:hover::after {
    width: 100%;          /* ホバーで線が伸びる */
}

/* --- 7. フッター・その他 --- */
.guide-footer {
    margin-top: 60px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #666;
}

.ad-banner {
    margin-top: 40px;
    text-align: center;
}

/* PC向けのレスポンシブ調整 */
@media (min-width: 600px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    .app-button { display: inline-block; }
}