/* カードからムービー一覧をモーダルで（再生はしない。inc/emdb_card_movies.php / js/emdb-card-movies.js。2026-11-28） */

/* ---- カードのボタン: 「ムービー n」＋「詳細」を横に並べる（位置は表示形式で変えない） ---- */
.emdb-card__actions { display: flex; gap: 8px; }
.emdb-card__actions .emdb-card__btn { flex: 1 1 auto; width: auto; }
.emdb-card .emdb-card__movies {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid #333;
	border-radius: 4px;
	background: #fff;
	color: #333;
	font-size: 13px;
	font-weight: bold;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.emdb-card .emdb-card__movies .fa-play { font-size: 11px; }
.emdb-card .emdb-card__movies-n {
	display: inline-block;
	min-width: 1.6em;
	padding: 1px 6px;
	border-radius: 999px;
	background: #f2f2f2;
	color: #555;
	font-size: 11px;
	font-weight: normal;
	transition: background .15s, color .15s;
}
.emdb-card .emdb-card__movies:hover,
.emdb-card .emdb-card__movies:focus-visible { background: #333; color: #fff; }
.emdb-card .emdb-card__movies:hover .emdb-card__movies-n,
.emdb-card .emdb-card__movies:focus-visible .emdb-card__movies-n { background: rgba(255,255,255,.2); color: #fff; }
.emdb-cards[data-view="list"] .emdb-card .emdb-card__movies { min-height: 34px; }

/* ---- モーダル ---- */
html.emdb-cm-open, html.emdb-cm-open body { overflow: hidden; }
.emdb-cm[hidden] { display: none !important; }
.emdb-cm {
	position: fixed;
	inset: 0;
	z-index: 100010; /* スマホ下部の固定メニュー・ヘッダーより上 */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.emdb-cm__back { position: absolute; inset: 0; background: rgba(0,0,0,.72); }
.emdb-cm__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(960px, 100%);
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0,0,0,.35);
	overflow: hidden;
}
.emdb-cm__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 10px 10px 16px;
	border-bottom: 1px solid #e5e5e5;
}
.emdb-cm .emdb-cm__title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 15px;
	font-weight: bold;
	line-height: 1.4;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.emdb-cm .emdb-cm__title::before, .emdb-cm .emdb-cm__title::after { content: none; }
.emdb-cm__title-label {
	display: inline-block;
	margin-right: 8px;
	padding: 1px 8px;
	border-radius: 3px;
	background: #e9608a;
	color: #fff;
	font-size: 11px;
	vertical-align: 2px;
}
.emdb-cm__close {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #555;
	font-size: 18px;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.emdb-cm__close:hover, .emdb-cm__close:focus-visible { background: #f2f2f2; color: #e9608a; }
.emdb-cm__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; }

.emdb-cm__status:empty { display: none; }
.emdb-cm__status { padding: 24px 0; text-align: center; color: #777; font-size: 14px; }

/* 一覧 */
.emdb-cm .emdb-cm__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.emdb-cm .emdb-cm__list li { margin: 0; padding: 0; list-style: none; }
.emdb-cm .emdb-cm__list li::before { content: none; }
.emdb-cm .emdb-cm__item {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	background: #fff;
	color: #333;
	text-align: left;
	text-decoration: none;
	font: inherit;
	cursor: pointer;
	overflow: hidden;
	transition: border-color .15s, background .15s;
}
.emdb-cm .emdb-cm__item:hover, .emdb-cm .emdb-cm__item:focus-visible { border-color: #e9608a; background: #fdf3f6; }
.emdb-cm__thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #ddd; overflow: hidden; }
.emdb-cm__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.emdb-cm__item:hover .emdb-cm__thumb img { transform: scale(1.05); }
.emdb-cm__ov {
	position: absolute;
	padding: 1px 6px;
	border-radius: 3px;
	background: rgba(0,0,0,.72);
	color: #fff;
	font-size: 11px;
	line-height: 1.6;
}
.emdb-cm__ov--tl { top: 6px; left: 6px; }
.emdb-cm__ov--tr { top: 6px; right: 6px; }
.emdb-cm__ov--br { bottom: 6px; right: 6px; }
.emdb-cm__body { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; }
.emdb-cm__name { font-size: 13px; font-weight: bold; line-height: 1.45; }
.emdb-cm__game, .emdb-cm__note { font-size: 12px; color: #555; line-height: 1.4; }
.emdb-cm__note { color: #777; }
.emdb-cm__date { margin-top: auto; font-size: 11px; color: #888; }

/* スマホ: 画面いっぱい（下部の固定メニューも覆う） */
@media (max-width: 767px) {
	.emdb-cm { padding: 0; align-items: stretch; }
	.emdb-cm__panel { width: 100%; max-height: none; height: 100%; border-radius: 0; }
	.emdb-cm__scroll { padding: 12px 0 calc(18px + env(safe-area-inset-bottom)); }
	.emdb-cm .emdb-cm__list { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0 12px; }
	.emdb-cm__status { padding: 24px 12px; }
	.emdb-cm .emdb-cm__item { flex-direction: row; }
	.emdb-cm__thumb { flex: 0 0 42%; }
	.emdb-cm__body { padding: 6px 10px; }
	.emdb-card__actions { flex-wrap: wrap; }
}
