﻿
/* ヘッダー */

/* タイトル */

.recipe-label {
    display: inline-block;
    color: #818cf8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.recipe-intro h1 {
    margin-top: 16px;
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1.1;
}

.recipe-intro p {
    margin-top: 24px;
    max-width: 600px;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1.8;
}

/* カテゴリ一覧 */

.recipe-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 64px;
}

.recipe-category {
    display: block;
    padding: 28px;
    background: #111c2e;
    border: 1px solid #263449;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition:
        border-color 0.2s,
        background 0.2s,
        transform 0.2s;
}

.recipe-category:hover {
    background: #162338;
    border-color: #818cf8;
    transform: translateY(-3px);
}

.recipe-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recipe-category h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.recipe-arrow {
    color: #818cf8;
    font-size: 24px;
}

.recipe-category p {
    margin-top: 16px;
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.7;
}

.recipe-category-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #263449;
    color: #64748b;
    font-size: 13px;
}

/* スマートフォン */

@media (max-width: 640px) {
    .recipe-categories {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 40px;
    }

    .recipe-category {
        padding: 22px;
    }

    .recipe-intro h1 {
        font-size: 48px;
    }
}

/* Recipe全体のレイアウト */

.recipe-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    width: calc(100% + 256px);
    margin-left: -128px;
    min-height: calc(100vh - 73px);
}
/* サイドバー */

.recipe-sidebar {
    padding: 40px 24px;
    border-right: 1px solid #1e293b;
}

.recipe-sidebar-title span {
    color: #818cf8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.recipe-sidebar-title h2 {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
}

.recipe-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 32px;
}

.recipe-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.recipe-sidebar-link:hover {
    background: #111c2e;
    color: #e2e8f0;
}

.recipe-sidebar-link span:first-child {
    color: #64748b;
}

/* メインコンテンツ */

.recipe-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 40px 16px 64px;
    min-width: 0;
}

/* ヘッダー */

/* サイドバーの記事一覧 */

.recipe-sidebar-articles {
    display: flex;
    flex-direction: column;
    margin-left: 24px;
    margin-top: 2px;
    padding-left: 12px;
    border-left: 1px solid #263449;
}

.recipe-sidebar-article {
    display: block;
    padding: 8px 10px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.6;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.recipe-sidebar-article:hover {
    color: #818cf8;
    background: #111c2e;
}
/* サイドバーの記事一覧 */
.recipe-sidebar-articles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recipe-sidebar-article {
    display: block;
    padding: 8px 12px 8px 32px;
    border-radius: 6px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.6;
    transition: background 0.2s, color 0.2s;
}

.recipe-sidebar-article:hover {
    background: #111c2e;
    color: #e2e8f0;
}

/* Recipeの記事ページ */
.recipe-article {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* 記事タイトル */
.recipe-article-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid #1e293b;
}

.recipe-article-header h1 {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -1px;
    color: #e2e8f0;
}

/* 記事本文 */
.recipe-article-content {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.9;
}

/* 見出し */
.recipe-article-content h2 {
    margin-top: 56px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #263449;
    color: #e2e8f0;
    font-size: 26px;
    font-weight: 700;
}

.recipe-article-content h3 {
    margin-top: 36px;
    margin-bottom: 16px;
    color: #e2e8f0;
    font-size: 20px;
    font-weight: 700;
}

/* 段落 */
.recipe-article-content p {
    margin-top: 16px;
    margin-bottom: 16px;
}

/* リンク */
.recipe-article-content a {
    color: #818cf8;
    text-decoration: underline;
    text-decoration-color: #818cf8;
    text-underline-offset: 4px;
    transition: color 0.2s;
}

.recipe-article-content a:hover {
    color: #7dd3fc;
}

/* リスト */
.recipe-article-content ul,
.recipe-article-content ol {
    margin-top: 16px;
    margin-bottom: 24px;
    padding-left: 28px;
}

.recipe-article-content li {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* コードブロック */
.recipe-article-content pre {
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 24px;
    overflow-x: auto;
    background: #111c2e;
    border: 1px solid #263449;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.7;
}

/* インラインコード */
.recipe-article-content code {
    color: #7dd3fc;
    font-size: 0.9em;
}

/* コードブロック内のコード */
.recipe-article-content pre code {
    color: #e2e8f0;
    font-size: inherit;
}

/* 引用 */
.recipe-article-content blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    border-left: 3px solid #818cf8;
    background: #111c2e;
    color: #94a3b8;
}

/* 画像 */
.recipe-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* スマートフォン */
@media (max-width: 640px) {
    .recipe-article-header h1 {
        font-size: 30px;
    }

    .recipe-article-header {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }

    .recipe-article-content h2 {
        font-size: 22px;
        margin-top: 40px;
    }

    .recipe-article-content pre {
        padding: 16px;
        font-size: 13px;
    }
}

/* Recipe内の見出しアンカーを非表示 */
.recipe-article-content .anchor {
    display: none;
}

.recipe-article-content h2 a,
.recipe-article-content h3 a,
.recipe-article-content h4 a {
    display: none;
}

/* 現在選択中のカテゴリ */
.recipe-sidebar-link.is-active {
    background: #162338;
    color: #818cf8;
    font-weight: 600;
}

.recipe-sidebar-link.is-active span:first-child {
    color: #818cf8;
}

/* 現在選択中の記事 */
.recipe-sidebar-article.is-active {
    background: #162338;
    color: #818cf8;
    font-weight: 600;
    border-left: 2px solid #818cf8;
}
/* Recipeのスマホ対応 */

@media (max-width: 640px) {
    .recipe-layout {
        grid-template-columns: 1fr;
        width: 100%;
        margin-left: 0;
    }

    .recipe-sidebar {
        border-right: none;
        border-bottom: 1px solid #1e293b;
    }

    .recipe-main {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 40px 16px 64px;
        min-width: 0;
    }
}

/* スマホ用サイドバー開閉 */

.recipe-sidebar-toggle > summary {
    list-style: none;
}

.recipe-sidebar-toggle > summary::-webkit-details-marker {
    display: none;
}

.recipe-sidebar-toggle > summary::marker {
    content: "";
}

/* PCでは開閉操作を無効化 */
@media (min-width: 641px) {
    .recipe-sidebar-toggle > summary {
        pointer-events: none;
    }
}

/* スマホ */
@media (max-width: 640px) {
    .recipe-sidebar-toggle > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }

    .recipe-sidebar-toggle > summary h2 {
        margin: 0;
    }

    .recipe-sidebar-toggle > summary::after {
        content: "⌄";
        color: #818cf8;
        font-size: 20px;
        transition: transform 0.2s;
    }

    .recipe-sidebar-toggle:not([open]) > summary::after {
        transform: rotate(-90deg);
    }

    .recipe-sidebar-nav {
        margin-top: 20px;
    }
}

body:has(.recipe-layout) #hero {
    height: 160px;
}

@media (max-width: 767px) {
    body:has(.recipe-layout) #hero {
        height: 120px;
    }
}
