/*
 * 0.6.0：トップ・一覧のカードをそろえる（tayu 2026-10-19「OTONAPRICEのようにきれいに整形」）。
 * このプラグインが作るカード（.sm-nl-card ／ .sm-nl-person）だけに効く。テーマのほかのカードは変えない。
 */

/* 1行のカードの高さをそろえ、購入ボタンをいちばん下に並べる */
.sm-card-grid > .sm-nl-card,
.sm-card-grid > .sm-nl-person {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* 画像の枠は同じ比率。表紙は切らずに全体を見せる（縦長・横長が混ざっても枠はそろう） */
.sm-nl-card .sm-nl-media {
	aspect-ratio: 3 / 2;
	flex: 0 0 auto;
}
.sm-nl-card .sm-nl-media img {
	object-fit: contain;
	background: rgba(0, 0, 0, .35);
}

.sm-nl-card .sm-nl-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 2px;
}
.sm-nl-card .sm-nl-date {
	margin: 0;
	white-space: nowrap;
}

/* 題名は2行まで（長い題名は「…」）。短い題名でも2行ぶんの高さをとる */
.sm-nl-card .sm-nl-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.45;
	min-height: 2.9em;
	margin: 4px 0 2px;
}

/* 出演者・作者は1行（長いときは「…」） */
.sm-nl-card .sm-nl-sub {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-height: 1.5em;
	margin: 0;
}

.sm-nl-card .sm-nl-offers {
	margin-top: auto;
	padding-top: 8px;
}

/* 出演者のカード：名前・よみは1行ずつ */
.sm-nl-person .sm-card-body h3,
.sm-nl-person .sm-card-body p {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* 出演者のカードは小さめに（tayu 2026-10-19「1枚あたりをもう少し小さく」）。広い画面は1行に10人 */
.sm-card-grid.sm-performer-grid.sm-nl-person-grid {
	grid-template-columns: repeat(10, minmax(0, 1fr));
	gap: 10px;
}
.sm-nl-person-grid .sm-card-body {
	padding: 7px 8px 9px;
}
.sm-nl-person-grid .sm-card-body h3 {
	font-size: 12px;
	margin: 0 0 2px;
}
.sm-nl-person-grid .sm-card-body p {
	font-size: 10px;
}
@media (max-width: 1100px) {
	.sm-card-grid.sm-performer-grid.sm-nl-person-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.sm-card-grid.sm-performer-grid.sm-nl-person-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
