body {
	font-family: "Shippori Gothic B2", "M PLUS 2", "M PLUS 1", "游ゴシック", "Noto Sans CJK JP", sans-serif;
	background-image: url("/pics/haikei1.png");
	color: #121212;
	line-height: 1.8;
    hyphens: auto;
    font-feature-settings: "palt";
    hanging-punctuation: first allow-end last;
    text-autospace: ideograph-alpha ideograph-numeric;
}

p {
	font-family: "游明朝", "Noto Serif CJK JP", serif;
	line-height: 1.9;
	text-indent: 1em;
    text-align: justify;
    text-justify: auto;
}

header {
	background-color: #282828;
	text-align: center;
	padding-top: 3px;
	padding-bottom: 2px;
	margin-bottom: 2%;
	margin-right: auto;
	margin-left: auto;
	width: 92%;
	border-radius: 3px;
	color: #cfcfcf;
}

aside {
	border-radius: 3px;
	width: 14%;
	margin-left: auto;
	text-align: center;
	color: #dddddd;
}

.asidemenu {
	margin-right: 2%;
	margin-left: 2%;
	width: 96%;
}

.artwork_picspace {
	width: 50%;
	margin-right: 3px;
}

.artwork_picture {
	width: 90%;
	border: 2px solid white;
}
.artwork_explaination {
	margin-left: 6px;
	flex-grow: 1;
}
.artwork_space {
	border-bottom: 3px solid white;
	padding: 2px;
	margin: 2px;
}

td:not(.access_counter), th:not(.access_counter) {
	border: 1px solid gray;
	padding: 2px;
}
.artwork_space_flex {
	display: flex;
	justify-content: space-between;
	padding: 3px 1px;
}

article {
	background-color: rgba(255, 255, 255, 0.8);
	border-radius: 3px;
	width: 50%;
	margin-left: 2em;
	margin-right: auto;
	padding: 1.5em
}

.bold {
	font-family: "Yu Gothic", "Hiragino Gothic", "MS Gothic", sans-serif;
	font-style: bold;
}

.diary_article {
	border-top: 1px solid #222222;
	padding-top: 2px;
}

main {
	display: flex;
	justify-content: space-between;
	margin-bottom: 50px;
}

footer{
	text-align: center;
	margin-left: 7%; margin-right: 7%;
	color: #cfcfcf;
}

.flexbox {
	display: flex;
	justify-content: flex-start;
	flex-wrap: wrap;
	padding: 3px 1px;
}

.italic  {
	font-style: italic;
}

.ue_button {
	position: fixed;
	bottom: 4%;
	right: 1%;
	width: 5%;
}

ul {
	list-style-type: circle;
}


/* レスポンシブ対応 */
@media screen and (max-width: 768px) {

    /* 全体のコンテナ：横並びを解除して縦積みに */
    main {
        flex-direction: column;
    }

    /* ヘッダー：幅を画面いっぱいに */
    header {
        width: 96%;
        margin-bottom: 10px;
        padding: 10px 0;
    }

    /* サイドバー（メニュー）：上部に移動し、横幅を広げる */
    aside {
        width: 94%;
        margin: 0 auto 20px auto; /* 中央揃え */
        display: flex;
        flex-wrap: wrap;
        justify-content: center; /* メニュー画像を中央に */
        background-color: rgba(40, 40, 40, 0.5); /* 視認性向上のため背景を少し暗く */
        padding: 10px;
    }

    /* メニュー画像：スマホでは大きすぎないように調整し、横並びさせる */
    .asidemenu {
        width: auto;      /* 元の比率を維持 */
        height: 40px;     /* 高さ固定でボタン化 */
        margin: 5px;      /* ボタン同士の間隔 */
    }
    
    /* 縦並びだったメニュー画像をインラインブロック化して横に並べる */
    aside a {
        display: inline-block;
    }

    /* 記事エリア：幅を広げて読みやすく */
    article {
        width: 92%;       /* ほぼ画面いっぱい */
        margin: 0 auto;   /* 中央揃え */
        padding: 10px 3%; /* 内側の余白 */
    }

    /* 画像：画面からはみ出さないように */
    img {
        max-width: 100%;
        height: auto;
    }

    /* テーブル：画面からはみ出す場合はスクロールさせる */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap; /* 折返し禁止（必要に応じて） */
        width: 100%;
    }
    
    /* 記事内の段落：スマホでは文字サイズや余白を微調整 */
    p {
        text-align: justify;
        text-justify: auto;
        text-indent: 1em;   /* 字下げ解除（お好みで） */
        font-size: 16px;  /* 読みやすいサイズ */
    }

    /* 「上に戻る」ボタン：指で押しやすい位置とサイズに */
    .ue_button {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        opacity: 0.8; /* コンテンツに重なっても読めるように */
    }
    
    /* 検索フォームの調整 (blog.php用) */
    form input[type="text"] {
        width: 100% !important; /* 強制的に幅を広げる */
        margin-bottom: 5px;
        box-sizing: border-box; /* パディングを含めた幅計算 */
    }
}

