/* ===== AoiroAD ヘルプサイト 共通スタイル ===== */

:root {
    --blue-dark:  #1a3a5c;
    --blue-main:  #1e6db5;
    --blue-mid:   #2e86de;
    --blue-light: #a8d4f5;
    --blue-pale:  #e8f4fd;
    --gray-light: #f4f7fa;
    --gray-mid:   #cdd8e3;
    --gray-text:  #555f6d;
    --white:      #ffffff;
    --success:    #27ae60;
    --warning:    #f39c12;
    --danger:     #e74c3c;

    --sidebar-w:  260px;
    --header-h:   56px;
}

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

body {
    font-family: 'Segoe UI', 'Meiryo UI', Meiryo, sans-serif;
    background: var(--gray-light);
    color: #2c3e50;
    min-height: 100vh;
}

/* ===== ヘッダー ===== */
.help-header {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-main));
    color: var(--white);
    height: var(--header-h);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.help-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.help-logo img { height: 28px; }

.help-site-label {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.help-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.help-back-btn {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    transition: all 0.2s;
}
.help-back-btn:hover {
    background: rgba(255,255,255,0.15);
    color: var(--white);
}

/* ===== 検索バー ===== */
.help-search-wrap {
    position: relative;
}
.help-search {
    padding: 6px 12px 6px 32px;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    font-size: 13px;
    width: 200px;
    outline: none;
    transition: all 0.2s;
}
.help-search::placeholder { color: rgba(255,255,255,0.6); }
.help-search:focus {
    background: rgba(255,255,255,0.25);
    width: 240px;
}
.help-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
}

/* ===== レイアウト ===== */
.help-layout {
    display: flex;
    min-height: calc(100vh - var(--header-h));
}

/* ===== サイドバー ===== */
.help-sidebar {
    width: var(--sidebar-w);
    background: var(--white);
    border-right: 1px solid var(--gray-mid);
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
}

.help-sidebar::-webkit-scrollbar { width: 4px; }
.help-sidebar::-webkit-scrollbar-track { background: transparent; }
.help-sidebar::-webkit-scrollbar-thumb { background: var(--gray-mid); border-radius: 2px; }

.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-text);
    padding: 16px 16px 6px;
}

.sidebar-section-title:first-child { padding-top: 20px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: #2c3e50;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    line-height: 1.3;
}

.sidebar-link:hover {
    background: var(--blue-pale);
    color: var(--blue-main);
    border-left-color: var(--blue-light);
}

.sidebar-link.active {
    background: var(--blue-pale);
    color: var(--blue-main);
    border-left-color: var(--blue-main);
    font-weight: 600;
}

.sidebar-link .link-icon { font-size: 14px; flex-shrink: 0; }

.sidebar-link .admin-badge {
    margin-left: auto;
    font-size: 9px;
    padding: 1px 5px;
    background: #fff3cd;
    color: #856404;
    border-radius: 8px;
    border: 1px solid #ffc107;
    white-space: nowrap;
}

.sidebar-divider {
    height: 1px;
    background: var(--gray-mid);
    margin: 8px 16px;
}

/* ===== メインコンテンツ ===== */
.help-content {
    flex: 1;
    padding: 40px 48px;
    max-width: 860px;
    min-width: 0;
}

/* パンくずリスト */
.help-breadcrumb {
    font-size: 12px;
    color: var(--gray-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.help-breadcrumb a { color: var(--blue-main); text-decoration: none; }
.help-breadcrumb a:hover { text-decoration: underline; }

/* ページタイトル */
.help-page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.help-page-subtitle {
    font-size: 14px;
    color: var(--gray-text);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--gray-mid);
}

/* 管理者専用バナー */
.admin-only-banner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ===== セクション ===== */
.help-section {
    margin-bottom: 40px;
}

.help-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--blue-pale);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 手順ステップ ===== */
.help-steps { counter-reset: step; }

.help-step {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--blue-main);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-body { flex: 1; }

.step-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
}

.step-desc {
    font-size: 13px;
    color: var(--gray-text);
    line-height: 1.7;
}

/* ===== スクリーンショット枠 ===== */
.help-img {
    width: 100%;
    border: 1px solid var(--gray-mid);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 12px 0 4px;
    display: block;
}

.help-img-caption {
    font-size: 11px;
    color: var(--gray-text);
    text-align: center;
    margin-bottom: 8px;
}

/* 画像プレースホルダー（スクリーンショット未撮影時） */
.help-img-placeholder {
    width: 100%;
    background: var(--gray-light);
    border: 2px dashed var(--gray-mid);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    color: var(--gray-text);
    font-size: 13px;
    margin: 12px 0;
}

/* ===== 情報ボックス ===== */
.help-box {
    border-radius: 8px;
    padding: 14px 16px;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.7;
    display: flex;
    gap: 10px;
}

.help-box-icon { font-size: 18px; flex-shrink: 0; }

.help-box.tip    { background: #e8f5e9; border-left: 4px solid var(--success); }
.help-box.note   { background: var(--blue-pale); border-left: 4px solid var(--blue-main); }
.help-box.warn   { background: #fff8e1; border-left: 4px solid var(--warning); }
.help-box.danger { background: #fdecea; border-left: 4px solid var(--danger); }

/* ===== テーブル ===== */
.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 12px 0;
}
.help-table th {
    background: var(--blue-dark);
    color: var(--white);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.help-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--gray-mid);
    vertical-align: top;
    line-height: 1.6;
}
.help-table tr:nth-child(even) td { background: var(--gray-light); }

/* ===== ページナビゲーション（前へ/次へ） ===== */
.help-page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-mid);
    gap: 12px;
}

.page-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--white);
    border: 1px solid var(--gray-mid);
    border-radius: 8px;
    text-decoration: none;
    color: var(--blue-main);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    max-width: 48%;
}

.page-nav-btn:hover {
    background: var(--blue-pale);
    border-color: var(--blue-light);
}

.page-nav-btn.next { margin-left: auto; text-align: right; flex-direction: row-reverse; }

.page-nav-label {
    font-size: 10px;
    font-weight: 400;
    color: var(--gray-text);
    display: block;
}

/* ===== 目次ページ専用 ===== */
.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.index-card {
    background: var(--white);
    border: 1px solid var(--gray-mid);
    border-radius: 10px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: block;
}

.index-card:hover {
    border-color: var(--blue-light);
    box-shadow: 0 4px 12px rgba(30,109,181,0.12);
    transform: translateY(-2px);
}

.index-card-icon { font-size: 28px; margin-bottom: 8px; }
.index-card-title { font-size: 14px; font-weight: 700; color: var(--blue-dark); margin-bottom: 4px; }
.index-card-desc { font-size: 12px; color: var(--gray-text); line-height: 1.5; }

.index-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--blue-dark);
    margin: 36px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--blue-pale);
}

/* ===== モバイル対応 ===== */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

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

    .help-sidebar {
        position: fixed;
        top: var(--header-h);
        left: 0;
        height: calc(100vh - var(--header-h));
        z-index: 150;
        transform: translateX(-100%);
        transition: transform 0.25s;
        box-shadow: 4px 0 16px rgba(0,0,0,0.12);
    }

    .help-sidebar.open { transform: translateX(0); }

    .help-content { padding: 24px 20px; }

    .help-search { display: none; }
}
