:root{
	--eb-red:#e53935;
	--eb-black:#111;
	--eb-white:#fff;
	--eb-gray:#f5f5f5;
	--eb-line:#d7d7d7;
	--eb-text:#111;
	--eb-muted:#666;
	--eb-success:#0a7a35;
}

/* =========================
   共通ラッパー
   ========================= */

.ebfv-wrap,
.ebfv-ranking-wrap{
	max-width:1280px;
	margin:0 auto;
	padding:40px 20px 60px;
}

/* =========================
   タイトル・説明
   ========================= */

.ebfv-title{
	font-size:32px;
	line-height:1.2;
	margin:0 0 20px;
	font-weight:700;
	text-align:center;
}

.ebfv-message{
	text-align:center;
	margin-bottom:18px;
	font-size:16px;
}

.ebfv-selection-status{
	text-align:center;
	margin:0 0 28px;
	font-size:14px;
	font-weight:700;
	letter-spacing:.04em;
	color:var(--eb-text);
}

.ebfv-selection-status.is-full{
	color:var(--eb-red);
}

/* =========================
   投票ページグリッド
   ========================= */

.ebfv-song-grid{
	display:grid;
	grid-template-columns:repeat(5, minmax(0, 1fr));
	gap:20px;
	align-items:stretch;
}

.ebfv-song-card{
	display:flex;
	flex-direction:column;
	height:100%;
	border:1px solid var(--eb-line);
	border-radius:16px;
	overflow:hidden;
	cursor:pointer;
	background:var(--eb-white);
	transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease;
}

.ebfv-song-card:hover{
	transform:translateY(-4px);
	box-shadow:0 18px 40px rgba(0,0,0,.12);
}

.ebfv-song-card input{
	display:none;
}

.ebfv-song-card:has(input:checked){
	border:2px solid var(--eb-red);
	box-shadow:0 0 0 3px rgba(229,57,53,.14);
	transform:scale(.985);
}

.ebfv-song-card:has(input:checked) .ebfv-song-name{
	color:var(--eb-red);
	font-weight:700;
}

.ebfv-song-card.is-selected{
	outline:3px solid var(--eb-red);
	transform:translateY(-4px) scale(1.02);
}

.ebfv-song-card.is-disabled{
	opacity:.35;
	pointer-events:none;
}

.ebfv-song-card.is-disabled:hover{
	transform:none;
	box-shadow:none;
}

.ebfv-song-thumb{
	aspect-ratio:1 / 1;
	background:#f6f6f6;
	overflow:hidden;
}

.ebfv-song-thumb img{
	width:100%;
	height:100%;
	object-fit:cover;
	display:block;
}

.ebfv-song-name{
	min-height:48px;
	padding:12px 10px 14px;
	font-size:15px;
	font-weight:600;
	text-align:center;
	line-height:1.35;
	word-break:break-word;
	display:flex;
	align-items:center;
	justify-content:center;
}

/* =========================
   送信ボタン
   ========================= */

.ebfv-submit-wrap{
	text-align:center;
	margin-top:30px;
}

.ebfv-submit-btn{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	border:none;
	background:var(--eb-red);
	color:var(--eb-white);
	padding:14px 34px;
	border-radius:999px;
	font-size:15px;
	font-weight:700;
	letter-spacing:.05em;
	cursor:pointer;
	text-decoration:none;
	transition:transform .15s ease, opacity .15s ease, box-shadow .15s ease;
	box-shadow:0 10px 24px rgba(229,57,53,.22);
}

.ebfv-submit-btn:hover{
	transform:translateY(-1px);
	opacity:.92;
}

.ebfv-submit-btn:disabled{
	opacity:.5;
	cursor:not-allowed;
	box-shadow:none;
}

/* =========================
   レスポンス
   ========================= */

.ebfv-response{
	text-align:center;
	margin-top:18px;
	font-size:14px;
}

.ebfv-success{
	text-align:center;
	font-size:16px;
	font-weight:700;
	color:#1b8f3a;
	animation:fadeIn .6s ease;
}

.ebfv-error{
	color:#c62828;
	font-weight:700;
}

@keyframes fadeIn{
	from{opacity:0; transform:translateY(10px);}
	to{opacity:1; transform:none;}
}

/* =========================
   NO IMAGE
   ========================= */

.ebfv-noimage{
	background:#f3f3f3;
	color:#888;
	width:100%;
	height:100%;
	min-height:180px;
	display:flex;
	align-items:center;
	justify-content:center;
	font-size:12px;
}

.ebfv-noimage.small{
	min-height:72px;
	width:72px;
	height:72px;
}

/* =========================
   アルバムセクション
   ========================= */

.ebfv-album-section{
	margin:0 0 42px;
}

.ebfv-album-section + .ebfv-album-section{
	margin-top:48px;
}

.ebfv-album-title{
	position:relative;
	margin:0 0 18px;
	padding-left:10px;
	font-size:20px;
	line-height:1.3;
	font-weight:800;
	letter-spacing:.03em;
	color:var(--eb-text);
	border-left:4px solid var(--eb-red);
	text-transform:none;
}

.ebfv-album-title small{
	display:block;
	font-size:12px;
	font-weight:400;
	color:#777;
	letter-spacing:.08em;
	margin-top:4px;
}

.ebfv-album-section .ebfv-song-grid{
	margin-top:6px;
}

/* =========================
   試聴リンク
   ========================= */

.ebfv-song-links{
	display:flex;
	flex-wrap:wrap;
	gap:8px;
	justify-content:center;
	align-content:flex-start;
	min-height:74px;
	padding:0 10px 14px;
}

.ebfv-song-link{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-width:68px;
	min-height:30px;
	padding:6px 10px;
	border-radius:999px;
	font-size:12px;
	font-weight:700;
	line-height:1;
	text-align:center;
	text-decoration:none;
	border:1px solid #ddd;
	background:#fff;
	color:#111;
	transition:transform .15s ease, opacity .15s ease, border-color .15s ease, background .15s ease;
}

.ebfv-song-link:hover{
	transform:translateY(-1px);
	opacity:.9;
	text-decoration:none;
}

.ebfv-song-link.is-youtube{
	border-color:var(--eb-red);
	color:var(--eb-red);
}

.ebfv-song-link.is-spotify{
	border-color:#1db954;
	color:#1db954;
}

.ebfv-song-link.is-apple{
	border-color:#555;
	color:#555;
}

/* ランキング側のリンク群は左寄せ */
.ebfv-ranking-meta .ebfv-song-links,
.ebfv-rank1-meta .ebfv-song-links,
.ebfv-top3-meta .ebfv-song-links{
	justify-content:flex-start;
	min-height:auto;
	padding:8px 0 0;
}

/* =========================
   投票結果リンクボタン
   ========================= */

.ebfv-result-link-wrap{
	text-align:center;
	margin-top:24px;
}

.ebfv-result-link-wrap.is-after-vote{
	margin-top:18px;
}

.ebfv-result-link-btn{
	display:inline-flex !important;
	align-items:center;
	justify-content:center;
	min-height:46px;
	padding:12px 24px;
	border-radius:999px;
	background:var(--eb-black) !important;
	color:var(--eb-white) !important;
	font-size:14px;
	font-weight:700;
	letter-spacing:.04em;
	text-decoration:none !important;
	border:none;
	transition:transform .15s ease, opacity .15s ease, box-shadow .15s ease;
	box-shadow:0 10px 24px rgba(0,0,0,.16);
}

.ebfv-result-link-btn:hover{
	transform:translateY(-1px);
	opacity:.92;
	color:var(--eb-white) !important;
	text-decoration:none !important;
}

/* =========================
   ランキングページ基本
   ========================= */

.ebfv-ranking-list{
	list-style:none;
	padding:0;
	margin:0;
}

.ebfv-ranking-item{
	display:flex;
	align-items:center;
	gap:16px;
	padding:14px 0;
	border-bottom:1px solid #ddd;
}

.ebfv-ranking-thumb img{
	width:72px;
	height:72px;
	object-fit:cover;
	border-radius:10px;
	display:block;
}

.ebfv-ranking-song{
	font-size:18px;
	font-weight:700;
}

.ebfv-ranking-votes{
	font-size:14px;
	color:var(--eb-muted);
	margin-top:4px;
}

/* =========================
   ランキングページ強化
   ========================= */

.ebfv-ranking-hero{
	text-align:center;
	margin:0 0 36px;
}

.ebfv-ranking-lead{
	margin:0 0 8px;
	font-size:12px;
	font-weight:700;
	letter-spacing:.18em;
	color:#777;
}

.ebfv-ranking-main-title{
	margin:0;
	font-size:40px;
	line-height:1.1;
	font-weight:800;
	letter-spacing:.02em;
}

.ebfv-rank1-card{
	position:relative;
	margin:0 0 34px;
	padding:28px;
	border:1px solid #ddd;
	border-radius:24px;
	background:#fff;
	box-shadow:0 14px 40px rgba(0,0,0,.06);
}

.ebfv-rank1-inner{
	display:grid;
	grid-template-columns:minmax(260px, 420px) 1fr;
	gap:28px;
	align-items:center;
}

.ebfv-rank1-thumb{
	border-radius:18px;
	overflow:hidden;
	background:#f6f6f6;
}

.ebfv-rank1-thumb img{
	width:100%;
	height:auto;
	display:block;
}

.ebfv-rank1-meta{
	display:flex;
	flex-direction:column;
	justify-content:center;
}

.ebfv-rank-label{
	margin-bottom:10px;
	font-size:12px;
	font-weight:700;
	letter-spacing:.16em;
	color:var(--eb-red);
	text-transform:uppercase;
}

.ebfv-rank1-title{
	margin:0 0 12px;
	font-size:34px;
	line-height:1.15;
	font-weight:800;
}

.ebfv-rank1-votes{
	margin-bottom:16px;
	font-size:18px;
	font-weight:700;
	color:#333;
}

.ebfv-rank-badge{
	position:absolute;
	top:16px;
	left:16px;
	width:46px;
	height:46px;
	border-radius:999px;
	display:flex;
	align-items:center;
	justify-content:center;
	font-size:20px;
	font-weight:800;
	background:var(--eb-red);
	color:#fff;
	box-shadow:0 10px 24px rgba(229,57,53,.26);
}

.ebfv-rank-badge.is-sub{
	position:absolute;
	top:12px;
	left:12px;
	width:38px;
	height:38px;
	font-size:16px;
}

.ebfv-top3-subgrid{
	display:grid;
	grid-template-columns:repeat(2, minmax(0, 1fr));
	gap:24px;
	margin-bottom:34px;
}

.ebfv-top3-card{
	position:relative;
	border:1px solid #ddd;
	border-radius:22px;
	background:#fff;
	overflow:hidden;
	box-shadow:0 12px 30px rgba(0,0,0,.05);
}

.ebfv-top3-thumb{
	aspect-ratio:1 / 1;
	background:#f6f6f6;
	overflow:hidden;
}

.ebfv-top3-thumb img{
	width:100%;
	height:100%;
	object-fit:cover;
	display:block;
}

.ebfv-top3-meta{
	padding:18px 16px 18px;
}

.ebfv-top3-title{
	margin:0 0 8px;
	font-size:24px;
	line-height:1.2;
	font-weight:800;
}

.ebfv-top3-votes{
	margin-bottom:12px;
	font-size:15px;
	font-weight:700;
	color:#444;
}

.ebfv-ranking-rest{
	margin-top:8px;
}

.ebfv-ranking-rest-title{
	margin:0 0 16px;
	font-size:22px;
	font-weight:800;
	line-height:1.2;
}

.ebfv-ranking-item{
	display:grid;
	grid-template-columns:52px 72px 1fr;
	gap:16px;
	align-items:center;
	padding:16px 0;
	border-bottom:1px solid #ddd;
}

.ebfv-ranking-ranknum{
	display:flex;
	align-items:center;
	justify-content:center;
	width:42px;
	height:42px;
	border-radius:999px;
	background:#111;
	color:#fff;
	font-size:15px;
	font-weight:800;
}

/* =========================
   旧UI PACK互換用
   使っていても壊れないように残す
   ========================= */

.ebfv-top3{
	display:grid;
	grid-template-columns:1fr 1fr 1fr;
	gap:20px;
	margin-bottom:40px;
}

.ebfv-rank-card{
	text-align:center;
	padding:18px;
	background:#fff;
	border-radius:16px;
	box-shadow:0 12px 28px rgba(0,0,0,.08);
}

.ebfv-rank-card img{
	border-radius:12px;
}

.ebfv-rank-list{
	margin-top:30px;
}

.ebfv-rank-item{
	display:flex;
	align-items:center;
	gap:14px;
	padding:12px 0;
	border-bottom:1px solid #ddd;
}

.ebfv-rank-item img{
	width:48px;
	border-radius:8px;
}

.ebfv-more-wrap{
	margin-top:20px;
	text-align:center;
}

.ebfv-more-btn{
	cursor:pointer;
	font-size:13px;
	opacity:.7;
}

/* =========================
   レスポンシブ
   ========================= */

@media (max-width:1200px){
	.ebfv-song-grid{
		grid-template-columns:repeat(4, minmax(0, 1fr));
	}
}

@media (max-width:900px){
	.ebfv-song-grid{
		grid-template-columns:repeat(3, minmax(0, 1fr));
		gap:16px;
	}
	
	.ebfv-ranking-main-title{
		font-size:32px;
	}
	
	.ebfv-rank1-inner{
		grid-template-columns:1fr;
	}
	
	.ebfv-top3-subgrid{
		grid-template-columns:1fr;
	}
	
	.ebfv-rank1-title{
		font-size:28px;
	}
	
	.ebfv-top3-title{
		font-size:22px;
	}
}

@media (max-width:767px){
	.ebfv-wrap,
	.ebfv-ranking-wrap{
		padding:28px 14px 46px;
	}
	
	.ebfv-title{
		font-size:26px;
	}
	
	.ebfv-message{
		font-size:15px;
		margin-bottom:14px;
	}
	
	.ebfv-selection-status{
		margin-bottom:20px;
		font-size:13px;
	}
	
	.ebfv-song-grid{
		grid-template-columns:repeat(2, minmax(0, 1fr));
		gap:14px;
	}
	
	.ebfv-song-name{
		min-height:44px;
		font-size:14px;
		padding:10px 8px 12px;
	}
	
	.ebfv-submit-btn{
		width:100%;
		max-width:320px;
	}
	
	.ebfv-album-section{
		margin-bottom:32px;
	}
	
	.ebfv-album-title{
		font-size:18px;
		margin-bottom:12px;
	}
	
	.ebfv-song-links{
		min-height:68px;
		gap:6px;
		padding:0 8px 12px;
	}
	
	.ebfv-song-link{
		min-width:64px;
		font-size:11px;
		padding:6px 8px;
	}
	
	.ebfv-ranking-hero{
		margin-bottom:24px;
	}
	
	.ebfv-ranking-main-title{
		font-size:26px;
	}
	
	.ebfv-rank1-card{
		padding:18px;
		border-radius:18px;
	}
	
	.ebfv-rank1-inner{
		gap:18px;
	}
	
	.ebfv-rank1-title{
		font-size:24px;
	}
	
	.ebfv-top3-card{
		border-radius:18px;
	}
	
	.ebfv-top3-title{
		font-size:20px;
	}
	
	.ebfv-ranking-rest-title{
		font-size:18px;
	}
	
	.ebfv-ranking-item{
		grid-template-columns:42px 56px 1fr;
		gap:12px;
	}
	
	.ebfv-ranking-thumb img{
		width:56px;
		height:56px;
	}
	
	.ebfv-ranking-ranknum{
		width:34px;
		height:34px;
		font-size:13px;
	}
	
	.ebfv-top3{
		grid-template-columns:1fr;
	}
}

/* =========================
   選択中曲数 固定表示
   ========================= */

#ebfv-vote-form{
	position:relative;
}

#ebfv-selection-status{
	position:sticky;
	top:12px;
	z-index:30;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:42px;
	padding:10px 16px;
	margin:0 auto 22px;
	border-radius:999px;
	background:rgba(255,255,255,.92);
	color:var(--eb-text);
	font-size:14px;
	font-weight:800;
	letter-spacing:.04em;
	line-height:1;
	border:1px solid rgba(0,0,0,.08);
	box-shadow:0 10px 24px rgba(0,0,0,.08);
	backdrop-filter:blur(8px);
	-webkit-backdrop-filter:blur(8px);
}

#ebfv-selection-status.is-active{
	background:rgba(255,255,255,.96);
}

#ebfv-selection-status.is-full{
	background:rgba(229,57,53,.96);
	color:#fff;
	border-color:rgba(229,57,53,1);
	box-shadow:0 10px 24px rgba(229,57,53,.24);
}

@media (max-width:767px){
	#ebfv-selection-status{
		top:8px;
		min-height:38px;
		padding:9px 14px;
		font-size:13px;
		margin:0 auto 18px;
	}
}

/* =========================
   選択済みカード 強化
   ========================= */

.ebfv-song-card{
	position: relative;
}

.ebfv-song-card::before{
	content:"";
	position:absolute;
	inset:0;
	background:rgba(229,57,53,0);
	transition:background .18s ease, opacity .18s ease;
	pointer-events:none;
	z-index:1;
}

.ebfv-song-card::after{
	content:"";
	position:absolute;
	top:10px;
	left:10px;
	width:28px;
	height:28px;
	border-radius:999px;
	background:rgba(229,57,53,0);
	box-shadow:none;
	opacity:0;
	transform:scale(.85);
	transition:opacity .18s ease, transform .18s ease, background .18s ease;
	pointer-events:none;
	z-index:3;
}

.ebfv-song-card.is-selected{
	outline:3px solid var(--eb-red);
	transform:translateY(-4px) scale(1.02);
	box-shadow:0 18px 40px rgba(229,57,53,.18);
}

.ebfv-song-card.is-selected::before{
	background:rgba(229,57,53,.05);
}

.ebfv-song-card.is-selected::after{
	content:"✓";
	display:flex;
	align-items:center;
	justify-content:center;
	background:var(--eb-red);
	color:#fff;
	font-size:15px;
	font-weight:900;
	opacity:1;
	transform:scale(1);
	box-shadow:0 8px 18px rgba(229,57,53,.28);
}

.ebfv-song-card.is-selected .ebfv-song-thumb{
	position:relative;
}

.ebfv-song-card.is-selected .ebfv-song-thumb::after{
	content:"SELECTED";
	position:absolute;
	right:10px;
	bottom:10px;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:24px;
	padding:4px 10px;
	border-radius:999px;
	background:rgba(17,17,17,.82);
	color:#fff;
	font-size:10px;
	font-weight:800;
	letter-spacing:.08em;
	line-height:1;
	z-index:2;
}

.ebfv-song-card.is-selected .ebfv-song-name{
	color:var(--eb-red);
	font-weight:800;
}

.ebfv-song-card.is-disabled{
	opacity:.42;
	filter:grayscale(.12);
}

.ebfv-song-card.is-disabled .ebfv-song-thumb img{
	opacity:.82;
}

.ebfv-song-card.is-disabled:hover{
	transform:none;
	box-shadow:none;
}

/* =========================
   投票確認モーダル
   ========================= */

.ebfv-modal{
	position:fixed;
	inset:0;
	z-index:9999;
	display:none;
}

.ebfv-modal.is-open{
	display:block;
}

.ebfv-modal__backdrop{
	position:absolute;
	inset:0;
	background:rgba(0,0,0,.56);
	backdrop-filter:blur(3px);
	-webkit-backdrop-filter:blur(3px);
}

.ebfv-modal__dialog{
	position:relative;
	z-index:2;
	width:min(92vw, 560px);
	max-height:88vh;
	margin:6vh auto 0;
	background:#fff;
	border-radius:22px;
	box-shadow:0 24px 60px rgba(0,0,0,.24);
	overflow:hidden;
}

.ebfv-modal__head{
	padding:22px 22px 14px;
	border-bottom:1px solid #eee;
}

.ebfv-modal__title{
	margin:0;
	font-size:22px;
	line-height:1.2;
	font-weight:800;
	color:#111;
}

.ebfv-modal__lead{
	margin:10px 0 0;
	font-size:14px;
	line-height:1.7;
	color:#555;
}

.ebfv-modal__body{
	padding:18px 22px 10px;
	max-height:50vh;
	overflow:auto;
}

.ebfv-modal__list{
	list-style:none;
	margin:0;
	padding:0;
	display:flex;
	flex-direction:column;
	gap:10px;
}

.ebfv-modal__item{
	display:flex;
	align-items:flex-start;
	gap:10px;
	padding:12px 14px;
	border:1px solid #eee;
	border-radius:14px;
	background:#fafafa;
}

.ebfv-modal__num{
	flex:0 0 28px;
	height:28px;
	border-radius:999px;
	display:flex;
	align-items:center;
	justify-content:center;
	background:var(--eb-red);
	color:#fff;
	font-size:12px;
	font-weight:800;
	line-height:1;
	margin-top:1px;
}

.ebfv-modal__song{
	font-size:15px;
	font-weight:700;
	line-height:1.5;
	color:#111;
	word-break:break-word;
}

.ebfv-modal__foot{
	display:flex;
	gap:10px;
	justify-content:flex-end;
	padding:18px 22px 22px;
	border-top:1px solid #eee;
	background:#fff;
}

.ebfv-modal__btn{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:44px;
	padding:0 18px;
	border:none;
	border-radius:999px;
	font-size:14px;
	font-weight:700;
	line-height:1;
	text-decoration:none;
	cursor:pointer;
	transition:transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.ebfv-modal__btn:hover{
	transform:translateY(-1px);
	opacity:.94;
}

.ebfv-modal__btn.is-cancel{
	background:#f1f1f1;
	color:#111;
}

.ebfv-modal__btn.is-confirm{
	background:var(--eb-red);
	color:#fff;
	box-shadow:0 10px 24px rgba(229,57,53,.22);
}

body.ebfv-modal-open{
	overflow:hidden;
}

@media (max-width:767px){
	.ebfv-song-card.is-selected{
		transform:translateY(-2px) scale(1.01);
	}
	
	.ebfv-song-card.is-selected .ebfv-song-thumb::after{
		right:8px;
		bottom:8px;
		font-size:9px;
		padding:4px 8px;
	}
	
	.ebfv-modal__dialog{
		width:min(94vw, 560px);
		margin:4vh auto 0;
		border-radius:18px;
	}
	
	.ebfv-modal__head{
		padding:18px 18px 12px;
	}
	
	.ebfv-modal__title{
		font-size:19px;
	}
	
	.ebfv-modal__body{
		padding:14px 18px 8px;
		max-height:48vh;
	}
	
	.ebfv-modal__foot{
		padding:14px 18px 18px;
		flex-direction:column-reverse;
	}
	
	.ebfv-modal__btn{
		width:100%;
	}
}