/*
 * `/reading/` — 읽은 책 목록. 이 화면에서만 실린다(inc/reading-collection.php).
 *
 * 첫 화면 "읽고 있는 책"과 같은 말투다 — 책 비율의 작은 표지 자리. 표지가 있으면 사진이 제목 블록 위에 겹쳐 자리를 채우고,
 * 없거나 불러오지 못하면 제목 블록이 남는다. 좁은 폭에서는 표지 옆에 글자가 놓이는 목록이고, 넓은 폭에서는 표지 아래 글자가 놓이는
 * 작은 책 격자다. 카드 테두리 · 그림자는 두지 않는다.
 */
.eeyoremind-reading {
	--erc-ink: #191814;
	--erc-ink-2: #3e3b34;
	--erc-muted: #6f6a5e;
	--erc-rule: #d8d2c6;
	--erc-surface-low: #faf8f3;
	--erc-accent: #4a6150;
}

.eeyoremind-reading .erc-heading {
	margin: 0;
	font-size: 1.6rem;
	line-height: 1.4;
	color: var(--erc-ink);
}

.eeyoremind-reading .erc-lead {
	margin: 0.4rem 0 1.6rem;
	font-size: 0.9rem;
	color: var(--erc-muted);
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--erc-rule);
}

.erc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.1rem;
}

.erc-book {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	min-width: 0;
	margin: 0;
}

.erc-book__cover {
	position: relative;
	flex: 0 0 56px;
	box-sizing: border-box;
	display: flex;
	align-items: flex-end;
	width: 56px;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	padding: 0.35rem;
	border: 1px solid var(--erc-rule);
	border-radius: 2px;
	background: var(--erc-surface-low);
	color: var(--erc-muted);
	font-size: 0.6rem;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.erc-book__cover span {
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.erc-book__cover .eeyoremind-cover {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	background: var(--erc-surface-low);
}

.erc-book__text {
	flex: 1 1 auto;
	min-width: 0;
}

.erc-book__title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
	font-weight: 600;
	color: var(--erc-ink);
	overflow-wrap: anywhere;
}

.erc-book__authors,
.erc-book__source,
.erc-book__date {
	margin: 0.2rem 0 0;
	font-size: 0.85rem;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

.erc-book__authors {
	color: var(--erc-ink-2);
}

.erc-book__source,
.erc-book__date {
	color: var(--erc-muted);
}

.erc-book__date {
	font-size: 0.8rem;
}

.erc-empty {
	margin: 0;
	color: var(--erc-muted);
}

.erc-empty a,
.erc-pages a {
	color: var(--erc-accent);
}

.erc-pages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--erc-rule);
	font-size: 0.9rem;
}

.erc-pages__at {
	color: var(--erc-muted);
	margin: 0 auto;
}

/* 넓은 폭 — 제목 블록이 위, 글자가 아래인 작은 책 격자 */
@media (min-width: 640px) {
	.erc-list {
		grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
		gap: 1.8rem 1.4rem;
	}

	.erc-book {
		flex-direction: column;
		gap: 0.6rem;
	}

	.erc-book__cover {
		flex: none;
		width: 96px;
		padding: 0.5rem;
		font-size: 0.72rem;
	}

	.erc-book__text {
		width: 100%;
	}

	.erc-book__title {
		font-size: 0.95rem;
	}
}
