:root {
	--font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

p {
	margin-bottom: 1.4em;
	max-width: 600px;
}

body {
	font-family: var(--font);
	font-size: 1.125em;
	line-height: 1.56;
	background: #f9f9f9;
	color: #222;
}

h1 {
	font-weight: 700;
	font-size: 1.6em;
	line-height: 1.1;
	margin-bottom: 0;
}

header {
	background: #FFD60A;
	padding: 16px 40px;
	text-align: center;
}

header a {
	color: #222;
	text-decoration: none;
	font-size: 1.4em;
	letter-spacing: 0.04em;
	font-weight: 600;
}

header a:hover {
	text-decoration: underline;
}

.layout {
	display: flex;
	max-width: 1000px;
	margin: 40px auto;
	gap: 40px;
	padding: 0 20px;
}

main {
	flex: 0 0 600px;
	max-width: 600px;
	background: white;
	padding: 40px;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
	overflow: hidden;
}

main.index-main {
	background: transparent;
	padding: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

aside {
	flex: 1;
	min-width: 0;
}

aside ul {
	list-style: none;
}

.sidebar-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	border-bottom: 1px solid #f0f0f0;
	border-radius: 8px;
	margin: 2px 0;
	gap: 12px;
}

.sidebar-row a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	text-decoration: none;
	color: inherit;
	width: 100%;
	gap: 12px;
}

.sidebar-row:hover {
	background: #f2f2f2;
}

.sidebar-row.current {
	background: #FFF3B0;
}

.sidebar-row-content {
	flex: 1;
	min-width: 0;
}

.sidebar-row-title {
	display: block;
	font-size: 0.85em;
	font-weight: 500;
	color: #222;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 2px;
}

.sidebar-row-date {
	display: block;
	font-size: 0.7em;
	color: #999;
}

.sidebar-thumb {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 5px;
}

.sidebar-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	max-width: none;
}

.sidebar-links {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid #ddd;
	font-size: 0.78em;
}

.sidebar-link {
	color: #0066cc;
	text-decoration: none;
}

.sidebar-link:hover {
	text-decoration: underline;
}

.sidebar-link-current {
	color: #222;
	font-weight: 600;
}

.post-meta {
	font-size: 0.78em;
	color: #999;
	margin-top: 0.3em;
	margin-bottom: 1em;
	font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	font-weight: 400;
	text-align: center;
}

.full-post {
	background: white;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
	padding: 40px;
	margin-bottom: 24px;
	overflow: hidden;
}

.full-post:last-child {
	margin-bottom: 0;
}

.full-post .post-meta {
	font-size: 0.78em;
	color: #999;
	margin-bottom: 0.5em;
	font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	font-weight: 400;
	text-align: center;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 1.5em 0;
}

.post-image {
	margin-left: -40px;
	margin-right: -40px;
	margin-top: 1.5em;
	margin-bottom: 1.5em;
}

.post-image img {
	width: 100%;
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0;
}

.archive-group-title {
	font-size: 1.1em;
	font-weight: 700;
	color: #222;
	padding: 20px 0 8px;
	border-bottom: 1px solid #ddd;
	margin-bottom: 0;
}

.archive-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: inherit;
	gap: 16px;
	border-radius: 8px;
	margin: 2px 0;
}

.archive-row:hover {
	background: #f2f2f2;
	border-bottom: 1px solid transparent;
}

.archive-row-content {
	flex: 1;
	min-width: 0;
}

.archive-row-title {
	font-weight: 400;
	font-size: 1em;
	color: #222;
	margin-bottom: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.archive-row-meta {
	font-size: 0.82em;
	color: #999;
	font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.archive-thumb {
	width: 56px;
	height: 56px;
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 6px;
}

.archive-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	max-width: none;
}

@media (max-width: 768px) {
	.layout {
		flex-direction: column;
		margin: 20px auto;
		padding: 0 16px;
		gap: 24px;
	}

	main {
		flex: none;
		max-width: 100%;
		padding: 24px 20px;
	}

	.full-post {
		padding: 24px 20px;
	}

	.post-image {
		margin-left: -20px;
		margin-right: -20px;
	}

	aside {
		width: 100%;
	}

	header {
		padding: 12px 16px;
	}

	h1 {
		font-size: 1.6em;
	}

	p {
		max-width: 100%;
	}
}
