/*
 * おっぱい総選挙
 * -----------------------------------------------------------------
 * 2枚を並べて選ばせるだけの画面なので、迷う要素を置かない。
 *
 * 【スマホでも横2列】
 * 縦に積むと見比べられず、スクロールしながら選ぶことになる。
 * 「見比べて選ぶ」が中身なので、狭くても必ず横に並べる。
 */

.odu {
	--odu-pink: #e0245e;
	--odu-ink: #22222a;
	--odu-sub: #8a8a98;
	--odu-line: #e7e7ef;
	--odu-win: #16a34a;

	max-width: 900px;
	margin: 0 auto 26px;
}

/* =================================================================
 *  ブロック（panel="1"）
 * ============================================================== */

/*
 * トップに置くときの見た目。
 * まわりは一覧（カードが並ぶ節）ばかりなので、同じ平地に置くと
 * 「見るもの」として読み飛ばされる。1枚の箱にして色を変え、
 * ここだけ参加するところだと分かるようにする。
 */
.odu--panel {
	padding: 18px 16px 20px;
	border: 1px solid #f3d7e0;
	border-radius: 18px;
	background:
		radial-gradient(120% 70% at 50% 0%, #fff0f5 0%, #fff 62%),
		#fff;
	box-shadow: 0 2px 14px rgba(224, 36, 94, .06);
}

@media (min-width: 600px) {
	.odu--panel { padding: 22px 24px 26px; }
}

.odu__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 10px;
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px dashed #f0dbe3;
}

.odu__badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--odu-pink);
	color: #fff;
	font-size: 10.5px;
	font-weight: 900;
	letter-spacing: .08em;
}

.odu__title {
	margin: 0;
	font-size: clamp(17px, 4.4vw, 21px);
	font-weight: 900;
	line-height: 1.3;
	color: var(--odu-ink);
	border: 0;
	padding: 0;
	background: none;
}

/* 右端へ。見出しの行に置くと、節の見出しと同じ並びに見える */
.odu__headLink {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 700;
	color: var(--odu-pink);
	text-decoration: none;
	white-space: nowrap;
}

.odu__headLink:hover { text-decoration: underline; }

/* 箱の中では、問いの上の余白を詰める */
.odu--panel .odu__q { margin-top: 0; }

/* 好みのまとめは箱の中では白地にして、入れ子に見せる */
.odu--panel .odu__taste {
	background: #fff;
	border-color: #f0dbe3;
}

/* ---- 問い ---- */

.odu__q {
	text-align: center;
	margin: 0 0 14px;
}

.odu__qmain {
	display: block;
	font-size: clamp(17px, 4.6vw, 22px);
	font-weight: 800;
	letter-spacing: .01em;
	color: var(--odu-ink);
}

.odu__qsub {
	display: block;
	margin-top: 4px;
	font-size: 11.5px;
	color: var(--odu-sub);
}

/* ---- 対戦盤 ---- */

/*
 * 盤面。
 * 【狭いときは縦に積む】
 * 胸画像は 912:450 の横長なので、スマホで横2列にすると
 * 1枚160x79px にしかならない。縦に積めば 343x169 で倍以上大きく、
 * それでも2枚とも1画面に収まる。
 */
.odu__board {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	align-items: start;
}

@media (min-width: 600px) {
	.odu__board {
		grid-template-columns: 1fr 1fr;
		gap: 18px;
	}
}

@media (min-width: 600px) {
	.odu__vs { top: 30%; }
}

/* 縦積みのときは2枚のあいだ、横並びのときは写真の高さの真ん中あたり */
.odu__vs {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%) rotate(-8deg);
	z-index: 3;
	pointer-events: none;

	padding: 4px 9px;
	border-radius: 7px;
	background: var(--odu-ink);
	color: #fff;
	font-size: 12px;
	font-weight: 900;
	font-style: italic;
	letter-spacing: .06em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

/* ---- カード ---- */

.odu__card {
	display: block;
	width: 100%;
	padding: 0 0 9px;
	border: 2px solid var(--odu-line);
	border-radius: 14px;
	background: #fff;
	text-align: left;
	cursor: pointer;
	overflow: hidden;
	transition: border-color .18s, box-shadow .18s, opacity .18s, filter .18s, transform .1s;
	-webkit-tap-highlight-color: transparent;
}

/*
 * ホバーの演出。
 *
 * 【選んだほうを持ち上げるのではなく、相手を沈める】
 * 2つから1つ選ぶ画面なので、片方だけ浮かせても「どちらが選ばれて
 * いるか」が伝わりにくい。相手を薄く・色を抜いて落とすと、
 * 残ったほうが自然に前に出て、選んでいる最中だと分かる。
 *
 * 【写真を少しだけ寄る】
 * 枠は動かさず、中の写真だけ寄せる。カード自体が動くと、
 * 2枚を見比べている最中に視線がずれる。
 */
@media (hover: hover) {
	.odu:not(.is-done) .odu__card:hover,
	.odu:not(.is-done) .odu__card:focus-visible {
		border-color: var(--odu-pink);
		box-shadow:
			0 0 0 3px rgba(224, 36, 94, .18),
			0 10px 26px rgba(224, 36, 94, .16);
		outline: none;
	}

	.odu:not(.is-done) .odu__card:hover .odu__img,
	.odu:not(.is-done) .odu__card:focus-visible .odu__img {
		transform: scale(1.05);
	}

	.odu:not(.is-done) .odu__card:hover .odu__blur,
	.odu:not(.is-done) .odu__card:focus-visible .odu__blur {
		transform: scale(1.3);
	}

	/* 相手を沈める。:has が無い環境では何も起きないだけで、害はない */
	.odu:not(.is-done) .odu__board:has(.odu__card:hover) .odu__card:not(:hover),
	.odu:not(.is-done) .odu__board:has(.odu__card:focus-visible) .odu__card:not(:focus-visible) {
		opacity: .4;
		filter: grayscale(.5);
	}
}

/* 押した瞬間の手ごたえ。スマホにはホバーが無いので、ここだけが返事になる */
.odu:not(.is-done) .odu__card:active {
	transform: scale(.985);
}

/*
 * 画像の枠。
 *
 * 【切り取らない】
 * プレイ別ギャラリー（style.css の .play-swiper）も同じ理由で
 * contain にしてあるので、そろえる。
 *
 * 【念のため contain のまま】
 * 胸画像は全員 912:450 に切り抜いてあるので、本来は枠にぴったり入る。
 * ただし chest_imgs が無い名鑑はアイキャッチに落ちるので、
 * 切り抜き前の写真が混ざることがある。そこだけ余白が出る。
 *
 * 【余白は同じ写真のぼかしで埋める】
 * 黒帯だと欠けて見えるし、2枚並ぶと余白のほうが目立つ。
 * 同じURLなのでダウンロードは増えない。
 */
.odu__shot {
	position: relative;
	display: block;
	width: 100%;
	/* Model Imager の切り抜き比率（oppai-scan-ui.js の 912/450）。
	   全員そろっているので、ふつうは余白なしでぴったり収まる */
	aspect-ratio: 912 / 450;
	overflow: hidden;
	background: #11111a;
}

.odu__shot img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}

/* 動きを嫌う設定なら、寄りも止める */
@media (prefers-reduced-motion: reduce) {
	.odu__shot img { transition: none; }
	.odu:not(.is-done) .odu__card:hover .odu__img { transform: none; }
}

.odu__pick { z-index: 2; }

.odu__blur {
	object-fit: cover;
	filter: blur(18px) brightness(.5);
	/* ぼかすと端が透けるので、少し大きく広げる */
	transform: scale(1.18);
}

.odu__img { object-fit: contain; }

/*
 * 選ぶ印。
 *
 * 【札をやめて、写真アプリの選択マークにする】
 * ピンクの錠剤に「♥ こっち」と書いていたが、写真の上に
 * 色の付いた吹き出しが乗ると安く見えるうえ、胸を隠してしまう。
 * 白い細枠の丸にチェックだけなら、写真の邪魔をせずに
 * 「ここを押すと選べる」が伝わる。
 *
 * 色を使わないのは、2枚のうちどちらが選ばれているかは
 * 相手が沈むことで既に分かっているため。印まで主張させる必要がない。
 */
.odu__pick {
	position: absolute;
	/* 中央に置くと、ちょうど胸の上に印が乗る。角に逃がす */
	right: 11px;
	top: 11px;
	transform: scale(.78);

	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;

	border: 1.5px solid rgba(255, 255, 255, .92);
	border-radius: 50%;
	background: rgba(12, 12, 18, .22);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);

	color: #fff;
	font-size: 16px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.odu__pick::before {
	content: "\f00c";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* 写真をほんの少し明るくして、押せる面だと示す */
.odu__shot::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(255, 255, 255, .09);
	opacity: 0;
	transition: opacity .18s;
	pointer-events: none;
}

/* ホバーのある画面では、乗せたときだけ出す */
@media (hover: hover) {
	.odu__pick {
		opacity: 0;
		transition: opacity .18s, transform .22s cubic-bezier(.2, .7, .3, 1);
	}

	.odu:not(.is-done) .odu__card:hover .odu__pick,
	.odu:not(.is-done) .odu__card:focus-visible .odu__pick {
		opacity: 1;
		transform: scale(1);
	}

	.odu:not(.is-done) .odu__card:hover .odu__shot::before,
	.odu:not(.is-done) .odu__card:focus-visible .odu__shot::before {
		opacity: 1;
	}
}

/*
 * ホバーが無い画面（スマホ）では、ずっと薄く出しておく。
 * ここを消すと、押せる場所だと分かる手がかりが何も無くなる。
 */
@media (hover: none) {
	.odu__pick {
		opacity: .5;
		transform: scale(1);
		width: 36px;
		height: 36px;
		font-size: 14px;
		background: rgba(12, 12, 18, .18);
		box-shadow: none;
	}
}

/*
 * 名前と特徴。投票するまで覆いをかぶせる。
 * 中身は最初から DOM にあるので、場所も高さも動かない。
 */
.odu__who {
	position: relative;
	display: block;
	margin: 8px 10px 0;
	min-height: 34px;
}

.odu__mask {
	position: absolute;
	inset: -2px -4px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 7px;
	background: #f3f3f7;
	color: #b2b2bf;
	font-size: 17px;
	font-weight: 900;
}

.odu.is-done .odu__mask { display: none; }

.odu__name {
	display: block;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--odu-ink);

	/* 芸名は長いものもある。2行で止める */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.odu__tag {
	display: block;
	margin: 3px 0 0;
	font-size: 10.5px;
	color: var(--odu-sub);
}

/* ---- 投票後 ---- */

.odu__res {
	display: none;
	margin: 7px 10px 0;
	padding-top: 7px;
	border-top: 1px dashed var(--odu-line);
	font-size: 11px;
	line-height: 1.6;
	color: var(--odu-sub);
}

.odu.is-done .odu__res { display: block; }

.odu__resrank {
	display: block;
	font-size: 12.5px;
	font-weight: 800;
	color: var(--odu-ink);
}

.odu__reswin { display: block; }

/*
 * 投票してはじめて誰だったか分かるので、ここが名鑑への入り口になる。
 * 小さなテキストリンクだと見落とされるため、押せる形にする。
 */
.odu__reslink {
	display: block;
	margin-top: 7px;
	padding: 7px 10px;
	border-radius: 999px;
	background: var(--odu-pink);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
}

.odu__reslink:hover { background: #c01c4e; color: #fff; }

.odu.is-done .odu__card { cursor: default; }
.odu.is-done .odu__pick { display: none; }
.odu.is-done .odu__vs { display: none; }

/* 勝ったほうだけ、ほんの少し寄った状態で止める */
.odu.is-done .odu__card.is-win .odu__img { transform: scale(1.03); }
.odu.is-done .odu__card.is-lose .odu__img { filter: grayscale(.4); }

.odu__card.is-win {
	border-color: var(--odu-win);
	box-shadow: 0 0 0 3px rgba(22, 163, 74, .14);
}

.odu__card.is-lose { opacity: .55; }

/*
 * 勝ったほうに印。
 * ホバー中に出ていた白い丸と同じ中心に置く（11+42/2 = 18+28/2 = 32px）。
 * 押した場所でそのまま色が変わったように見える。
 */
.odu__card.is-win .odu__shot::after {
	content: "\f00c";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute;
	right: 18px;
	top: 18px;
	z-index: 2;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--odu-win);
	color: #fff;
	font-size: 14px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

/* ---- 足もと ---- */

.odu__foot {
	margin-top: 14px;
	text-align: center;
}

/* display を指定した要素は hidden 属性だけでは消えない */
.odu [hidden] { display: none !important; }

.odu__next {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--odu-ink);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}

.odu__next:hover { background: var(--odu-pink); }

.odu__skip {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--odu-line);
	border-radius: 999px;
	background: #fff;
	font-size: 12px;
	color: var(--odu-sub);
	cursor: pointer;
}

.odu.is-done .odu__skip { display: none; }

.odu__mine {
	margin: 10px 0 0;
	font-size: 11.5px;
	color: var(--odu-sub);
}

.odu__mine strong {
	font-size: 14px;
	color: var(--odu-pink);
}

.odu__tolist {
	margin: 6px 0 0;
	font-size: 12px;
}

.odu__tolist a {
	color: var(--odu-pink);
	font-weight: 700;
	text-decoration: underline;
}

.odu__err {
	margin: 12px 0 0;
	padding: 9px 12px;
	border-radius: 9px;
	background: #fff2f4;
	color: #a21034;
	font-size: 12px;
	text-align: center;
}

.odu__err.is-note {
	background: #f4f4f8;
	color: #70707e;
}

.odu.is-busy { pointer-events: none; opacity: .75; }

.odu-empty {
	margin: 18px 0;
	padding: 14px;
	border: 1px dashed #d8d8e2;
	border-radius: 10px;
	background: #fafafd;
	color: #70707e;
	font-size: 12.5px;
	text-align: center;
}

/* =================================================================
 *  ランキング
 * ============================================================== */

.odur {
	--odu-pink: #e0245e;
	--odu-ink: #22222a;
	--odu-sub: #8a8a98;
	--odu-line: #e7e7ef;

	max-width: 760px;
	margin: 0 auto;
}

.odur__tabs,
.odur__axis {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 10px;
}

.odur__tab,
.odur__ax {
	padding: 6px 14px;
	border: 1px solid var(--odu-line);
	border-radius: 999px;
	background: #fff;
	font-size: 12px;
	font-weight: 700;
	color: #55555f;
	text-decoration: none;
}

.odur__tab.is-on,
.odur__ax.is-on {
	background: var(--odu-pink);
	border-color: var(--odu-pink);
	color: #fff;
}

.odur__axis { margin-bottom: 18px; }

.odur__ax {
	font-size: 11.5px;
	padding: 5px 11px;
}

.odur__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.odur__row + .odur__row { border-top: 1px solid var(--odu-line); }

.odur__row > a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 9px 4px;
	text-decoration: none;
	color: inherit;
}

.odur__row > a:hover { background: #fafafd; }

.odur__rank {
	flex: 0 0 30px;
	text-align: center;
	font-size: 15px;
	font-weight: 900;
	font-style: italic;
	color: var(--odu-sub);
}

.odur__row.is-top1 .odur__rank { color: #d4a017; font-size: 19px; }
.odur__row.is-top2 .odur__rank { color: #9aa0ab; font-size: 17px; }
.odur__row.is-top3 .odur__rank { color: #b07a4b; font-size: 17px; }

/*
 * 一覧のサムネ。
 * ここは小さいので contain にすると横長が帯になって何も見えない。
 * 正方形に切り取る（向きが混ざっていても真ん中が残る）。
 */
/* 一覧のサムネも同じ切り抜きなので、同じ比率の枠に入れる */
.odur__shot {
	flex: 0 0 96px;
	width: 96px;
	aspect-ratio: 912 / 450;
	border-radius: 8px;
	overflow: hidden;
	background: #11111a;
}

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

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

.odur__name {
	display: block;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--odu-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.odur__tag {
	display: block;
	margin-top: 2px;
	font-size: 10.5px;
	color: var(--odu-sub);
}

/*
 * 勝率と戦数。
 * 【折り返させない】
 * 4桁の戦数で2行になると、行ごとに高さが変わって一覧が波打つ。
 */
.odur__num {
	flex: 0 0 auto;
	text-align: right;
	white-space: nowrap;
}

.odur__win {
	display: block;
	font-size: 15px;
	font-weight: 900;
	color: var(--odu-pink);
}

.odur__win small {
	font-size: 10px;
	font-weight: 700;
}

.odur__duels {
	display: block;
	font-size: 10.5px;
	color: var(--odu-sub);
}

.odur__note {
	margin: 14px 0 0;
	font-size: 11.5px;
	line-height: 1.7;
	color: var(--odu-sub);
}

/* =================================================================
 *  名鑑ページに出す順位
 * ============================================================== */

.odub {
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 16px 0;
	padding: 11px 14px;
	border: 1px solid #f1dfa6;
	border-radius: 12px;
	background: linear-gradient(135deg, #fffaec, #fff5f7);
}

.odub__ico {
	flex: 0 0 auto;
	font-size: 19px;
	color: #d4a017;
}

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

.odub__main {
	display: block;
	font-size: 13.5px;
	font-weight: 800;
	color: #22222a;
}

.odub__main strong {
	font-size: 20px;
	color: #e0245e;
	margin: 0 1px;
}

.odub__main small {
	font-size: 11px;
	font-weight: 600;
	color: #8a8a98;
}

.odub__sub {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	color: #8a8a98;
}

.odub__go {
	flex: 0 0 auto;
	padding: 7px 14px;
	border-radius: 999px;
	background: #e0245e;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}

.odub__go:hover { background: #c01c4e; color: #fff; }


/* =================================================================
 *  好みのまとめとおすすめ
 * ============================================================== */

/*
 * 投票が10票たまったら、下に出てくる。
 * 対戦の邪魔をしないよう、盤面の下・次へボタンの外に置く。
 */
.odu__taste {
	margin: 22px auto 0;
	padding: 16px 16px 18px;
	border: 1px solid var(--odu-line);
	border-radius: 14px;
	background: linear-gradient(180deg, #fff8fa, #fff);
}

.odu__tasteHead {
	margin: 0;
	font-size: 12.5px;
	color: var(--odu-sub);
	text-align: center;
}

.odu__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 9px 0 0;
}

.odu__chip {
	padding: 6px 15px;
	border-radius: 999px;
	background: var(--odu-pink);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
}

.odu__tasteSub {
	margin: 18px 0 9px;
	font-size: 12px;
	font-weight: 700;
	color: var(--odu-ink);
}

.odu__recs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 9px;
}

/* 狭いときは1列。横長の胸画像を小さくしすぎない */
@media (max-width: 520px) {
	.odu__recs { grid-template-columns: 1fr; }
}

.odu__rec {
	display: block;
	border: 1px solid var(--odu-line);
	border-radius: 11px;
	background: #fff;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}

.odu__rec:hover { border-color: var(--odu-pink); }

.odu__recShot {
	display: block;
	width: 100%;
	aspect-ratio: 912 / 450;
	background: #11111a;
}

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

.odu__recName {
	display: block;
	margin: 7px 9px 0;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--odu-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.odu__recTag {
	display: block;
	margin: 2px 9px 9px;
	font-size: 10.5px;
	color: var(--odu-sub);
}

.odu__tasteMore {
	display: block;
	margin: 14px auto 0;
	padding: 10px 18px;
	max-width: 280px;
	border: 1px solid var(--odu-pink);
	border-radius: 999px;
	color: var(--odu-pink);
	font-size: 12.5px;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
}

.odu__tasteMore:hover {
	background: var(--odu-pink);
	color: #fff;
}

/* =================================================================
 *  ランキング公開前
 * ============================================================== */

.odu-empty--wait {
	line-height: 2;
}

.odu-empty--wait strong { color: #55555f; }

.odur__gauge {
	display: block;
	width: min(260px, 80%);
	height: 7px;
	margin: 10px auto;
	border-radius: 999px;
	background: #e7e7ef;
	overflow: hidden;
}

.odur__gaugeBar {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: #e0245e;
}

.odur__note--admin {
	padding: 8px 11px;
	border-radius: 8px;
	background: #fff6d6;
	color: #8a6500;
}
