body {

    background-color: azure;
}



.wlink {
    margin-bottom: 8px;
}

nav {
    width: 250px;
    padding: 15px 15px;

}

.third {
    width: 1536px;
    border: 6px inset brown;
    background-color: white;
    color: black;
    text-align: left;
    margin: auto;


}


.first {
    float: left;
}

.second2 {
    width: 250px;
    color: brown;

}

section {
    width: 800px;
}

.second {
    width: 800px;
    border: 6px inset brown;
    background-color: white;
    color: black;
}

h1 {
    border: 6px inset brown;
    width: 800px;
    background-color: white;
    color: black;
}

.writing {
    color: navy;
    font-size: medium;

}

.writings {
    color: navy;
    font-size: medium;
}

/* スマホ・タブレット向けのレスポンシブデザイン（画面幅 1100px 以下） */
@media screen and (max-width: 1100px) {
    /* ページ全体の余白調整 */
    body {
        margin: 0;
        padding: 10px;
        box-sizing: border-box;
    }

    /* 各種コンテナと見出しの幅を100%にし、ボーダーがはみ出さないように box-sizing を設定 */
    .third,
    h1,
    .second,
    section {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* メインタイトルの調整 */
    .third {
        font-size: 1.5rem;
        padding: 12px;
        margin: 10px 0;
        text-align: center;
    }

    /* インラインスタイルの flex コンテナを縦並びに変更 */
    body > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
    }

    /* イントロダクションなどの文章の幅と余白調整 */
    .writing {
        padding: 15px 10px !important;
        font-size: 1rem;
        line-height: 1.7;
    }

    /* floatの解除 */
    .first {
        float: none !important;
    }

    /* ナビゲーションの幅調整とグリッドレイアウト化 */
    nav {
        width: 100% !important;
        max-width: 600px !important;
        box-sizing: border-box;
        padding: 10px !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }

    /* ナビゲーションの見出し */
    .second2 {
        width: 100% !important;
        grid-column: 1 / -1;
        margin: 15px 0 5px 0;
        font-size: 1.1rem;
        border-bottom: 2px solid brown;
        padding-bottom: 3px;
    }

    /* リンクをタップしやすいボタン状に変更 */
    .wlink {
        margin-bottom: 0;
        background-color: #fff;
        border: 2px solid brown;
        border-radius: 4px;
        text-align: center;
        transition: background-color 0.2s, transform 0.1s;
    }

    .wlink:hover {
        background-color: #faebd7; /* アンティークホワイト */
    }

    .wlink:active {
        transform: scale(0.98);
    }

    .wlink a {
        display: block;
        padding: 10px 5px;
        text-decoration: none;
        color: brown;
        font-weight: bold;
        font-size: 0.9rem;
    }

    .wlink br {
        display: none;
    }

    /* 記事部分 */
    article {
        width: 100% !important;
        max-width: 800px !important;
        box-sizing: border-box;
        padding: 0;
    }

    section {
        margin-bottom: 25px;
    }

    section h1 {
        font-size: 1.3rem;
        padding: 10px;
        margin-top: 15px;
    }

    /* 本文の可読性向上 */
    .writings {
        font-size: 1rem;
        line-height: 1.7;
        padding: 10px 5px;
    }
}