:root {
	--color-bg: hsl(210, 100%, 99%);
	--color-primary: hsl(210, 100%, 93%);
	--color-accent: hsl(210, 80%, 70%);
	font-size: 16px;
}

body {
	font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro", "Yu Gothic", "YuGothic", "メイリオ", Meiryo, "Noto Sans JP", "源ノ角ゴシック", sans-serif;
	line-height: 1.6;
	max-width: 720px;
	margin: 0 auto;
	padding: 0 16px;
	color: #333;
	font-size: 1.1rem;
}

header {
	background-color: var(--color-primary);
	border-bottom: 3px solid var(--color-accent);
	padding: 16px 20px;
}

header .header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 720px;
	margin: 0 auto;
}

header .site-title h1 {
	margin: 0;
	font-size: 1.8rem;
}

header .site-title a {
	text-decoration: none;
	color: #444;
}

header .site-subtitle {
	margin: 0;
	font-size: 0.85rem;
	color: #666;
}

.github-link {
	font-size: 0.85rem;
	text-decoration: none;
	color: #666;
	border: 1px solid #ccc;
	padding: 4px 8px;
	border-radius: 4px;
	transition: background 0.2s, color 0.2s;
}

.github-link:hover {
	background-color: #333;
	color: #fff;
}

header,
main {
	box-shadow: 0 0 16px #cccccc;
}

@media screen and (max-width: 720px) {
	body {
		padding: 0;
	}
	header .header-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.github-link {
		margin-top: 8px;
	}

	header,
	main {
		box-shadow: none;
	}
}

main {
	padding: 20px 16px 40px;
	background-color: var(--color-bg);
}

figure {
	margin-bottom: 2rem;
	text-align: center;
}

figure img {
	max-width: 100%;
	max-height: 400px;
	height: auto;
}

figcaption {
	font-size: 0.85rem;
}

footer {
	text-align: right;
	padding: 12px 0;
	color: #888;
	font-size: 0.85rem;
	border-top: 1px solid #ddd;
}
footer p {
	padding: 0;
	margin: 0 8px;
}

h2, h3, h4 {
	margin-top: 1.5em;
}


/** by chatgpt **/
.lightbox {
	position: fixed;
	z-index: 999;
	inset: 0; /* top/left/right/bottom の省略形 */

	background-color: rgba(0,0,0,0.8);

	display: flex;
	align-items: center;   /* 縦中央 */
	justify-content: center; /* 横中央 */

	opacity: 0;
	visibility: hidden;
}
.lightbox.visible {
	overflow: hidden;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s ease;
}
.lightbox-content {
	max-width: 95%;
	max-height: 95%;
	object-fit: contain;
}
.lightbox-close {
	position: absolute;
	top: 20px;
	right: 40px;
	color: white;
	font-size: 40px;
	cursor: pointer;
}
