/* リセットと基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* フォントの読み込み */
@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;700;900&display=swap');

/* ルート変数 */
:root {
    --mario-red: #e52528;
    --mario-red-muted: #d45a5c;
    --mario-blue: #0099db;
    --mario-yellow: #ffd93d;
    --mario-green: #10b95a;
    --mario-brown: #8b4513;
    --white: #ffffff;
    --black: #333333;
    --background-red: #c85050;
}

/* ボディ全体の設定 */
body {
    font-family: 'M PLUS Rounded 1c', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;
    color: var(--black);
    line-height: 1.7;
    background-color: var(--background-red);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M13.71,34.22c-29.08-9.03-2.01,30.09,28.58,12.03,22.06,7.52,26.58-19.56,8.02-24.07C42.3,5.14.68,7.65,13.71,34.22Z' fill='%23ffffff' opacity='0.12'/%3E%3Cpath d='M16.44,35.92c-5.05-17.33,24.81-15.73,18.12,1.79,0,0-10.38,2.92-18.12-1.79Z' fill='%23ffffff' opacity='0.15'/%3E%3Cpolyline points='18.51 34.4 22 28.42 25.29 33.93 29.46 28.72 32.84 35.69' fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.51' opacity='0.15'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    min-height: 100vh;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--white);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    margin-top: 20px;
}

/* パンくずリスト */
.breadcrumb {
    background: linear-gradient(to bottom, #f8f8f8 0%, #f0f0f0 100%);
    padding: 12px 30px;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--mario-yellow);
    position: relative;
}

.breadcrumb::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--mario-red) 0%, var(--mario-yellow) 25%, var(--mario-green) 50%, var(--mario-blue) 75%, var(--mario-red) 100%);
    opacity: 0.3;
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    margin: 3px 0;
    position: relative;
}

.breadcrumb li::after {
    content: '▶';
    margin: 0 10px;
    color: var(--mario-red);
    font-size: 0.8rem;
    opacity: 0.6;
}

.breadcrumb li:last-child::after {
    content: '';
    margin: 0;
}

.breadcrumb a {
    color: var(--mario-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 2px 5px;
    border-radius: 5px;
}

.breadcrumb a:hover {
    color: var(--white);
    background-color: var(--mario-red);
    transform: scale(1.05);
}

.breadcrumb .current {
    color: #666;
    font-weight: 700;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, var(--mario-red) 0%, var(--mario-red-muted) 100%);
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M13.71,34.22c-29.08-9.03-2.01,30.09,28.58,12.03,22.06,7.52,26.58-19.56,8.02-24.07C42.3,5.14.68,7.65,13.71,34.22Z' fill='%23ffffff' opacity='0.1'/%3E%3Cpath d='M16.44,35.92c-5.05-17.33,24.81-15.73,18.12,1.79,0,0-10.38,2.92-18.12-1.79Z' fill='%23ffffff' opacity='0.2'/%3E%3Cpolyline points='18.51 34.4 22 28.42 25.29 33.93 29.46 28.72 32.84 35.69' fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.51' opacity='0.2'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* タイトル */
h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--white);
    text-shadow:
        3px 3px 0 var(--black),
        -1px -1px 0 var(--black),
        1px -1px 0 var(--black),
        -1px 1px 0 var(--black),
        1px 1px 0 var(--black);
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

h2 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--mario-red);
    margin: 40px 0 20px;
    padding: 15px 30px;
    background: linear-gradient(to right, #fff0f0 0%, #ffffff 100%);
    border-left: 8px solid var(--mario-red);
    border-radius: 0 30px 30px 0;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--mario-blue);
    margin: 20px 0 15px;
    padding-left: 20px;
    position: relative;
}

h3::before {
    content: '★';
    position: absolute;
    left: 0;
    color: var(--mario-yellow);
    font-size: 1.2rem;
}

h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--mario-red);
    margin: 15px 0 10px;
}

/* 目次 */
.toc {
    background-color: #fff8e8;
    padding: 30px;
    margin: 30px;
    border-radius: 20px;
    border: 3px solid var(--mario-yellow);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.toc h2 {
    background: none;
    border: none;
    text-align: center;
    padding: 0;
    margin-bottom: 20px;
    color: var(--mario-brown);
}

.toc ul {
    list-style: none;
    padding: 0;
}

.toc li {
    margin: 10px 0;
    padding-left: 30px;
    position: relative;
}

.toc li::before {
    content: '🍄';
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.toc a {
    color: var(--mario-blue);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
}

.toc a:hover {
    color: var(--mario-red);
    transform: translateX(5px);
}

/* メインコンテンツ */
main {
    padding: 20px 30px 40px;
}

/* メイン画像 */
.main-image {
    margin: 0 0 40px;
    text-align: center;
}

.main-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.main-image figcaption {
    margin-top: 15px;
    color: #666;
    font-size: 0.9rem;
}

/* セクション */
section {
    margin-bottom: 50px;
}

/* 段落 */
p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* キャラクターコメント */
.character-comment {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(to right, #f0f8ff 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.character-comment img {
    flex-shrink: 0;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.comment-content {
    flex: 1;
}

.character-name {
    font-weight: 700;
    color: var(--mario-green);
    margin-bottom: 5px !important;
}

.comment {
    background-color: var(--white);
    padding: 15px 20px;
    border-radius: 15px;
    position: relative;
    font-style: italic;
    color: #555;
}

.comment::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--white) transparent transparent;
}

/* テーブル */
.table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, var(--mario-blue) 0%, #0077b3 100%);
    color: var(--white);
}

th {
    padding: 15px;
    font-weight: 700;
    text-align: left;
    font-size: 1.1rem;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background-color: #f5f5f5;
}

tbody tr:last-child td {
    border-bottom: none;
}

table img {
    display: block;
    margin: 0 auto;
}

/* 店舗リスト */
.store-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.store-item {
    background: linear-gradient(145deg, #ffffff 0%, #f5f5f5 100%);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.store-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

a.store-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.store-item h4 {
    color: var(--mario-red);
    margin-bottom: 10px;
}

.store-item p {
    color: #666;
    margin: 0;
}

/* 関連記事 */
#related-articles {
    background-color: #f8f8f8;
    padding: 40px 0;
    margin: 50px -30px 0;
}

#related-articles h2 {
    text-align: center;
    background: none;
    border: none;
    color: var(--mario-red);
    margin-bottom: 30px;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 30px;
}

.related-article {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.related-article img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.related-article p {
    padding: 15px 20px;
    margin: 0;
    font-weight: 700;
    color: var(--black);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* フッター */
footer {
    background-color: var(--black);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
}

footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media screen and (max-width: 768px) {
    /* コンテナ */
    .container {
        margin-top: 0;
        border-radius: 0;
    /* 関連記事 */
    #related-articles {
        margin: 40px -15px 0;
        padding: 30px 0;
    }

    .related-articles-grid {
        padding: 0 15px;
        gap: 20px;
    }

    .related-article img {
        height: 180px;
    }

    .related-article p {
        font-size: 0.9rem;
        padding: 12px 15px;
    }

    /* ヘッダー */
    header {
        padding: 30px 15px;
    }

    h1 {
        font-size: 1.8rem;
        text-shadow:
            2px 2px 0 var(--black),
            -1px -1px 0 var(--black),
            1px -1px 0 var(--black),
            -1px 1px 0 var(--black);
    }

    h2 {
        font-size: 1.5rem;
        padding: 12px 20px;
        border-left-width: 5px;
        margin: 30px 0 15px;
    }

    h3 {
        font-size: 1.1rem;
        padding-left: 25px;
    }

    /* メインコンテンツ - スマホ用の余白調整 */
    main {
        padding: 15px 15px 30px;
    }

    .toc {
        margin: 20px 10px;
        padding: 20px 15px;
    }

    /* キャラクターコメント */
    .character-comment {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 15px;
    }

    .comment::before {
        display: none;
    }

    /* テーブル */
    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 10px 8px;
    }

    /* 店舗リスト */
    .store-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* 小さいスマホ用の追加調整 */
@media screen and (max-width: 480px) {
    /* パンくずリスト */
    .breadcrumb {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1rem;
    }

    main {
        padding: 10px 10px 25px;
    }

    .toc {
        margin: 15px 5px;
        padding: 15px 10px;
    }

    p {
        font-size: 1rem;
    }

    /* 関連記事 */
    #related-articles {
        margin: 30px -10px 0;
    }

    .related-articles-grid {
        padding: 0 10px;
        grid-template-columns: 1fr;
    }

    .related-article img {
        height: 160px;
    }
}
