:root {
	--primary-color: #333;
	--secondary-color: #666;
	--bg-gray: #f8f8f8;
	--border-color: #e0e0e0;
	--text-black: #222;
	--text-gray: #888;
}
body {
	margin: 0;
	padding: 0;
	font-family: 'Noto Sans JP', sans-serif;
	color: var(--text-black);
	background-color: #fff;
	line-height: 1.6;
}

/* 共通のリンクスタイル */
a {
	color: #48e;
	text-decoration: none;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}
a:hover {text-decoration: underline;}

/* page = <lr_margin, main, lr_margin> */
.page-container {
	display: flex;
	justify-content: center;
	width: 100%;
}

.main-content {
	width: 100%;
	max-width: min(1100px, calc(100% - 40px)); /* 適切なメインコンテンツ幅 */
	margin: 0 20px;
}

/* title_bar */
.title-bar {
	display: flex;
	align-items: center;
	padding: 20px 0;
	border-bottom: 1px solid var(--border-color);
	user-select: none;	/* 文字選択の抑制 */
}
.title-bar a:hover {text-decoration: none;}

.logo {
	font-size: 24px;
	font-weight: 700;
	text-decoration: none;
	color: var(--text-black);
	margin-right: 20px;
}

.genre-info {
	display: flex;
	flex-direction: column;
	font-size: 13px;
	color: var(--secondary-color);
	line-height: 1.2;
}

.search-container {
	margin-left: auto;
	position: relative;
}

.search-box {
	background-color: var(--bg-gray);
	border: none;
	padding: 8px 15px 8px 35px;
	border-radius: 20px;
	width: 200px;
	font-size: 14px;
}

.search-container i {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-gray);
}

.mypage-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-left: 20px;
	text-decoration: none;
	color: var(--text-black);
	font-size: 12px;
}

.mypage-link i {
	font-size: 18px;
	margin-bottom: 2px;
}

/* title_menu */
.title-menu {
	display: flex;
	gap: 30px;
	padding: 15px 0;
	list-style: none;
	border-bottom: 1px solid var(--border-color);
	margin: 0;
}

.title-menu a {
	text-decoration: none;
	color: var(--text-black);
	font-weight: 500;
	font-size: 15px;
	white-space: nowrap;
}

/* bc_list (Breadcrumbs) */
.bc-list {
	padding: 15px 0;
	font-size: 13px;
	display: flex;
	gap: 6px; /* 要素同士の基本の隙間 */
	align-items: center;
}
.bc-list a, .bc-list span.current {
	display: inline-flex;
	align-items: center;
}
.bc-list a {
	color: var(--text-gray);
	text-decoration: none;
}
.bc-list span.current {
	color: var(--text-black);
	font-weight: 500;
}

/* 2番目以降の要素の前に「＞」を追加する */
.bc-list > *:not(:first-child)::before {
	content: "＞";
	font-size: 8px;
	margin-right: 5px; /* 「＞」と右側要素の間の微調整 */
	color: var(--text-gray);
	line-height: 1;
}

/* 全体配置 */
.contents-wrapper {
	display: flex;
	gap: 40px;
	margin-top: 20px;
}
.l-cont {
	flex: 1;
	min-width: 0; /* flexアイテムの縮小を許可 */
}
.r-cont {
	width: 300px;
}

/* l_cont内要素 */
.top-image {
	width: 100%;
	height: 350px;
	object-fit: cover;
	border-radius: 8px;
}

.article-title {
	font-size: 32px;
	margin: 20px 0 10px 0;
}

.article-desc {
	color: var(--secondary-color);
	margin-bottom: 15px;
}

.update-date {
	text-align: right;
	color: var(--text-gray);
	font-size: 12px;
}

.divider {
	height: 1px;
	background-color: var(--border-color);
	margin: 30px 0;
}

.section-title {
	font-size: 24px;
	margin-bottom: 25px;
	border-left: 4px solid var(--text-black);
	padding-left: 15px;
}

.rank-item {
	margin-bottom: 40px;
}

.rank-header {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 15px;
}

.rank-badge {
	font-weight: bold;
	color: #337;
	font-size: 18px;
}

.rank-body, .rank-body a {color: #fff; text-align: center; font-size: 3px}	/* デフォルトの読み込み失敗文字表示を薄くする */

.hash-tag {
	background-color: var(--bg-gray);
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 12px;
	color: var(--secondary-color);
}

.view-original {
	display: block;
	text-align: left;
	color: var(--text-gray);
	text-decoration: none;
	font-size: 13px;
	margin-top: 10px;
}

.report-link {
	display: block;
	text-align: right;
	color: var(--text-gray);
	text-decoration: none;
	font-size: 12px;
	margin: 50px 0;
}

/* 広告スペース */
.ad-space {
	background-color: #eee;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: flex;
	margin-bottom: 40px;
	cursor: pointer;
}
.ad-space img {
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: center;
}

/* サイドバーリンク集 */
.sidebar-ranking-title {
	font-size: 18px;
	margin-bottom: 15px;
	font-weight: 700;
}
.ranking-list-item {
	display: flex;
	gap: 12px;
	margin-bottom: 20px;
	text-decoration: none;
	color: inherit;
}
.thumb-img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;	/* 要素が縮小されないように固定する */
}
.thumb-text {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 1;	/* 残りの幅をすべて占有させる */
	min-width: 0;	/* Flex子要素の「中身に合わせる」挙動を抑制 */
}
.thumb-title {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	overflow-wrap: break-word;
	word-break: break-all;
}
.thumb-date {
	font-size: 11px;
	color: var(--text-gray);
}

/* Footer */
footer {
	margin-top: 60px;
	padding-bottom: 40px;
}
.footer-nav {
	display: flex;
	justify-content: center;
	gap: 20px;
	padding: 20px 0;
	list-style: none;
	font-size: 13px;
}
.footer-nav a {
	text-decoration: none;
	color: var(--secondary-color);
}
.copyright {
	text-align: center;
	font-size: 12px;
	color: var(--text-gray);
}

/* --- Mobile Styles --- */
@media (max-width: 768px) {
	/* 全体配置 */
	.contents-wrapper {
		flex-direction: column;
	}
	.r-cont {
		width: 100%;
	}

	/* header */
	.title-bar {
		flex-wrap: wrap;
	}

	/* PC用の検索ボックスをスマホでは削除 */
	.pc-search { display: none; }

	/* スマホ版の検索・マイページアイコン並び */
	.mobile-icons {
		display: flex;
		gap: 15px;
		margin-left: auto;
	}
	.mobile-icons i {
		font-size: 18px;
		margin-bottom: 2px;
	}
	.mobile-search-btn i {
		color: #444;
	}
	.mobile-search-btn {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-decoration: none;
		color: var(--text-black);
		font-size: 12px;
	}
	.mypage-link {
		margin-left: auto;
	}

	/*スマホ版nav_bar*/
	.title-menu {
		gap: 15px;
		justify-content: space-around;
	}
	.shorten-text {
		display: none;
	}

	/* スマホ版タブデザイン */
	.ranking-tabs {
		display: flex;
		border-bottom: 2px solid var(--border-color);
		margin-bottom: 20px;
	}

	.tab-item {
		flex: 1;
		text-align: center;
		padding: 10px 0;
		font-size: 14px;
		color: var(--text-gray);
		cursor: pointer;
	}
	.tab-item:hover {text-decoration: none;}

	.tab-item.active {
		color: var(--text-black);
		border-bottom: 2px solid var(--text-black);
		margin-bottom: -2px;
		font-weight: bold;
	}

	/* スマホ版フッター */
	.footer-nav {
		flex-wrap: wrap;
		justify-content: center;
		gap: 10px 20px;
		padding: 20px 15px;
	}
	.footer-nav li {
		white-space: nowrap;
	}
}

@media (min-width: 769px) {
	.mobile-search-btn { display: none; }
	.ranking-tabs-pc-hidden { display: none; }
}
