:root {
	--brand: #ea0000;
	--brand-d: #c70000;
	--ink: #111;
	--muted: #6b7280;
	--border: #e5e7eb;
	--rank-gold: #f7b500;
	--rank-silver: #c0c7d1;
	--rank-bronze: #d08a57;
	--rank-top10: #008acd;
	--rank-top20: #8a8a8a;
}
.step .list {
	width: 100% !important;
	display: block !important
}
/* ========== タブ ========== */
.r-tabs {
	position: relative;
	display: flex;
	gap: .2rem;
	margin: 0 0 1.4rem 0;
	overflow-x: auto;
	padding-top: 10px;
	padding-bottom: .4rem;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}
/* スクロールバー消す */
.r-tabs::-webkit-scrollbar {
	display: none;
}
/* タブ */
.r-tab {
	position: relative;
	display: flex;
	align-items: center;
	gap: .3rem;
	padding: .65rem 1.4rem;
	font-size: .92rem;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
	color: var(--ink);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
	transition: all .2s;
}
.r-tab:hover {
	color: var(--brand);
	transform: translateY(-1px);
}
/* アクティブ */
.r-tab.is-active {
	background: linear-gradient(90deg, #ff4b4b, #ea0000);
	color: #fff;
	box-shadow: 0 6px 18px rgba(234, 0, 0, .25);
	transform: translateY(-2px);
}
/* 下線エフェクト */
.r-tabs .underline {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 80px; /* JSで自動調整されるからダミー */
	background: var(--brand);
	border-radius: 4px;
	transition: .25s ease;
}
/* スマホ */
@media (max-width:600px) {
	.r-tab {
		padding: .55rem 1rem;
		font-size: .88rem;
	}
}
/* ========== 検索ヘッダ（件数ラベルは要らんけど一応残す） ========== */
.p-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: .25rem 0 1rem;
	font-size: .92rem;
}
.p-search-label {
	font-weight: 700;
	color: #333;
	margin: 0
}
.p-count {
	color: #666;
	margin: 0;
	white-space: nowrap
}
/* ========== ランキング：横長カード ========== */
.p-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 50px;
}
.p-card {
	position: relative;
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	padding: 1rem;
	border: 1px solid #eee;
	border-radius: 12px;
	background: #fff;
}
/* 共通トークン（サイズだけ変えたくなった時用） */ :root {
	--rank-size: 56px; /* TOP3アイコンサイズ */
	--rank-size-num: 44px; /* 数字バッジサイズ（4〜20位） */
}
/* ランクバッジ（左上固定） */
.p-rank {
	position: absolute;
	top: -1rem;
	left: -1rem;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--rank-size-num);
	height: var(--rank-size-num);
	font-size: .9rem;
	font-weight: 700;
	color: #fff;
	border-radius: 50%;
	background: #666; /* ← 4位以下の丸バッジ */
	box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
	overflow: hidden; /* 念のためはみ出し防止 */
}
/* --- TOP3：専用アイコン（灰色背景を完全に無効化） --- */
.p-rank.r-1, .p-rank.r-2, .p-rank.r-3 {
	width: var(--rank-size);
	height: var(--rank-size);
	border-radius: 0; /* 王冠/メダルの形をそのまま */
	background: transparent; /* ← グレー背景を完全に消す */
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	box-shadow: none; /* 影もナシでフラットに */
}
.p-rank.r-1 {
	background-image: url('../img/rank_1.png');
}
.p-rank.r-2 {
	background-image: url('../img/rank_2.png');
}
.p-rank.r-3 {
	background-image: url('../img/rank_3.png');
}
/* TOP3の数字を“中央やや下”に */
.p-rank.r-1 > span, .p-rank.r-2 > span, .p-rank.r-3 > span {
	position: relative;
	top: 6px; /* アイコンの“空き”に合わせて微調整 */
	font-size: 1rem;
	font-weight: 800;
	color: #111; /* 金銀銅に乗るので黒系で視認性UP */
	text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
/* ふわっと出す演出（1位だけ軽くPOP） */
.p-rank.r-1 {
	animation: rank-pop .45s ease-out;
}
@keyframes rank-pop {
	0% {
		transform: scale(.8);
		opacity: .15;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}
/* 4〜10位・11〜20位の色分け（丸バッジ） */
.p-rank.r-top10 {
	background: linear-gradient(180deg, #0aa1ff, #006aa0);
}
.p-rank.r-top20 {
	background: linear-gradient(180deg, #9b9b9b, #6c6c6c);
}
/* 数字バッジ側の数字（4〜20位） */
.p-rank:not(.r-1):not(.r-2):not(.r-3) > span {
	font-size: .95rem;
	font-weight: 800;
	line-height: 1;
}
/* 画像・本文はそのまま */
.p-img {
	flex: 0 0 260px;
}
.p-img img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	object-fit: cover;
}
.p-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: .5rem;
}
.p-name {
	font-size: 1rem;
	font-weight: 700;
	color: #222;
	margin: 0;
	line-height: 1.35;
	text-align: left;
}
.p-price {
	color: #d30000;
	font-size: 120%;
	font-weight: 700;
	text-align: right;
}
.p-evaluation {
	font-size: .9rem;
	display: flex;
	align-items: center;
	gap: .6rem;
	justify-content: flex-end;
	color: #444;
	text-align: right;
	margin-top: 0;
}
.p-evaluation .p-good, .p-evaluation .p-bad {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	font-weight: bold;
}
.p-evaluation .p-good {
	color: #0a7a00;
}
.p-evaluation .p-bad {
	color: #d00; /* わるいね：グレー */
}
.p-evaluation i {
	font-size: .95rem;
}
.p-act {
	margin-top: .4rem;
	display: flex;
	gap: .5rem;
	align-items: center;
	justify-content: flex-end;
}
.p-act.p-meta-right {
	justify-content: flex-end
}
/* ボタン（既存と馴染む軽めのサイズ） */
.btn-sm {
	padding: .6rem 1rem;
	font-size: .85rem;
	border-radius: 8px
}
.btn-ghost {
	background: #fff;
	border: 1px solid var(--border);
	color: var(--ink);
	text-decoration: none;
}
.btn-cart {
	background: linear-gradient(180deg, var(--brand), var(--brand-d));
	color: #fff;
	border: 0;
	cursor: pointer;
}
/* 空表示 */
.p-empty {
	border: 2px dashed #ccc;
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
}
.p-empty i {
	font-size: 2rem;
	color: #bbb;
	margin-bottom: .6rem;
	display: block
}
.r-updated {
	margin: 1rem 2.5rem 1rem;
	font-size: .9rem;
	color: #666;
}
.r-updated span {
	color: #333;
	font-weight: 600;
}
/* レスポンシブ */
@media (max-width: 780px) {
	.p-img {
		flex-basis: 120px
	}
}
@media (max-width: 600px) {
	.r-tabs {
		gap: .4rem
	}
	.p-card {
		padding: .8rem
	}
	.p-img {
		flex-basis: 100px
	}
	.p-body {
		gap: .35rem
	}
	.p-head {
		flex-direction: column;
		align-items: flex-start;
		gap: .3rem
	}
	.p-act {
		justify-content: flex-start;
		flex-wrap: wrap
	}
}