/* クラロワAPI（clashroyale-lab）の表示。色は SWELL のメインカラー（--color_main）に合わせる。
   見出しには触らない（SWELL の h2/h3 デザインをそのまま使う）。 */

.crl-note {
	margin: .6em 0 0;
	font-size: .8em;
	color: #666;
}
.crl-note--warn {
	color: #a15c00;
}
.crl-empty {
	padding: 1em;
	background: #f5f7fb;
	border-radius: 6px;
	font-size: .9em;
	color: #555;
}
.crl-muted {
	color: #999;
}
.crl-more {
	text-align: right;
	font-size: .9em;
}

/* ---- カード画像 ---- */
.crl-icon {
	position: relative;
	display: inline-block;
	line-height: 0;
	text-decoration: none;
}
.crl-icon img {
	width: 100%;
	height: auto;
	display: block;
}
.crl-icon--s {
	width: 48px;
}
.crl-icon--m {
	width: 72px;
}
.crl-icon--unknown {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 58px;
	background: #eee;
	border-radius: 4px;
	line-height: 1;
	color: #999;
}
.crl-icon__badge {
	position: absolute;
	left: 50%;
	bottom: -4px;
	transform: translateX(-50%);
	padding: 2px 4px;
	border-radius: 3px;
	font-size: 9px;
	line-height: 1.2;
	font-weight: 700;
	white-space: nowrap;
	color: #fff;
}
.crl-icon__badge--evo {
	background: #8a3fd1;
}
.crl-icon__badge--hero {
	background: #d18a00;
}

/* ---- 切り替え ---- */
.crl-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0 0 1em;
}
.crl-switch__group {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}
.crl-switch__btn {
	display: inline-block;
	padding: .35em .9em;
	border: 1px solid var(--color_main, #2f6fd6);
	border-radius: 999px;
	font-size: .85em;
	text-decoration: none;
	color: var(--color_main, #2f6fd6);
	background: #fff;
}
.crl-switch__btn.is-active {
	background: var(--color_main, #2f6fd6);
	color: #fff;
}

/* ---- デッキ一覧 ---- */
.crl-decks {
	list-style: none;
	margin: 0;
	padding: 0;
}
.post_content .crl-decks li.crl-deck {
	display: grid;
	grid-template-columns: 2em 1fr;
	grid-template-areas:
		"rank cards"
		"rank stats"
		"rank copy";
	gap: 6px 10px;
	margin: 0 0 12px;
	padding: 12px;
	border: 1px solid #e3e7ef;
	border-radius: 8px;
	background: #fff;
}
.post_content .crl-decks li.crl-deck::before {
	content: none;
}
.crl-deck__rank {
	grid-area: rank;
	font-weight: 700;
	font-size: 1.1em;
	color: var(--color_main, #2f6fd6);
}
.crl-deck__cards {
	grid-area: cards;
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 48px));
	gap: 4px;
}
.crl-deck__cards .crl-icon--s {
	width: 100%;
}
.crl-deck__stats {
	grid-area: stats;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 6px 0 0;
	font-size: .85em;
}
.crl-deck__stats div {
	display: flex;
	gap: 4px;
}
.crl-deck__stats dt {
	margin: 0;
	color: #666;
	font-weight: normal;
}
.crl-deck__stats dt::before,
.crl-deck__stats dt::after {
	content: none;
}
.crl-deck__stats dd {
	margin: 0;
	padding: 0;
	font-weight: 700;
}
.crl-deck__copy {
	grid-area: copy;
	justify-self: start;
	padding: .3em .9em;
	border-radius: 4px;
	font-size: .8em;
	text-decoration: none;
	color: #fff;
	background: var(--color_main, #2f6fd6);
}
.crl-deck__copy:hover {
	opacity: .85;
	color: #fff;
}
@media (max-width: 480px) {
	.post_content .crl-decks li.crl-deck {
		grid-template-columns: 1fr;
		grid-template-areas:
			"rank"
			"cards"
			"stats"
			"copy";
		padding: 10px;
	}
	.crl-deck__cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---- 表 ---- */
.crl-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.crl-table {
	width: 100%;
	font-size: .9em;
}
.crl-table th,
.crl-table td {
	vertical-align: middle;
}
.crl-table thead th {
	background: var(--color_main, #2f6fd6);
	color: #fff;
	white-space: nowrap;
}
.crl-table td {
	text-align: right;
	white-space: nowrap;
}
.crl-table__card {
	text-align: left;
	white-space: nowrap;
}
.crl-table__card .crl-icon {
	width: 32px;
	margin-right: 8px;
	vertical-align: middle;
}
.crl-table__sub th {
	font-weight: normal;
	font-size: .9em;
	color: #555;
}
.crl-table--basic th {
	width: 9em;
	text-align: left;
	background: #f5f7fb;
}
.crl-table--basic td {
	text-align: left;
	white-space: normal;
}

/* ---- カード詳細 ---- */
/* 形態ごとのカード画像。アイキャッチと同じ紺の地に並べる */
.crl-detail__images {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin: 0 0 1.2em;
	padding: 22px 12px 18px;
	border-radius: 12px;
	background: radial-gradient(circle at 100% 0%, #1e3a8a 0%, #0f1b3d 60%, #050a1c 100%);
}
/* SWELL の figure のスタイル（幅100%など）に負けないよう、幅と並びを明示する */
.post_content .crl-detail__figure {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	width: 110px;
	margin: 0;
	text-align: center;
}
.crl-detail__figure img {
	display: block;
	width: 110px;
	height: auto;
	filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45));
}
.post_content .crl-detail__figure figcaption {
	display: inline-block;
	margin: 8px 0 0;
	text-align: center;
	padding: 2px 12px;
	border-radius: 20px;
	background: rgba(255, 255, 255, .12);
	font-size: .8em;
	font-weight: 700;
	color: #fff;
}
/* スマホでは3形態（通常・進化・ヒーロー）が1段に収まる大きさにする */
@media (max-width: 599px) {
	.crl-detail__images {
		gap: 12px;
	}
	.post_content .crl-detail__figure,
	.crl-detail__figure img {
		width: 88px;
	}
}
.crl-detail__en {
	margin-left: .6em;
	font-size: .85em;
	color: #777;
}

/* ---- カード図鑑の一覧 ---- */
.crl-filter {
	margin: 0 0 1em;
	padding: 12px;
	border-radius: 8px;
	background: #f5f7fb;
}
.crl-filter__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
	margin: 0 0 8px;
}
.crl-filter__row:last-child {
	margin-bottom: 0;
}
.crl-filter__label {
	min-width: 5.5em;
	font-size: .8em;
	font-weight: 700;
	color: #555;
}
.crl-filter__btn {
	padding: .25em .7em;
	border: 1px solid #c9d3e6;
	border-radius: 999px;
	background: #fff;
	font-size: .8em;
	line-height: 1.6;
	color: #333;
	cursor: pointer;
}
.crl-filter__btn[aria-pressed="true"] {
	border-color: var(--color_main, #2f6fd6);
	background: var(--color_main, #2f6fd6);
	color: #fff;
}
.crl-filter__row--tools {
	gap: 8px 16px;
}
.crl-filter__search input {
	width: 12em;
	padding: .3em .6em;
	border: 1px solid #c9d3e6;
	border-radius: 4px;
	font-size: .9em;
}
.crl-filter__sort {
	font-size: .85em;
}
.crl-filter__sort select {
	padding: .2em .4em;
	font-size: .95em;
}
.crl-cardlist__count {
	margin: 0 0 .5em;
	font-size: .85em;
	color: #555;
}
.post_content ul.crl-cardgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 12px 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.post_content ul.crl-cardgrid > li {
	margin: 0;
	padding: 0;
}
.post_content ul.crl-cardgrid > li::before {
	content: none;
}
.crl-cardgrid__item[hidden] {
	display: none;
}
.crl-cardgrid__link {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	text-decoration: none;
	color: inherit;
}
.crl-cardgrid__link img {
	width: 72px;
	height: auto;
}
.crl-cardgrid__elixir {
	position: absolute;
	top: -4px;
	left: calc(50% - 42px);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #c13fd6;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.crl-cardgrid__name {
	font-size: 12px;
	line-height: 1.3;
	text-align: center;
}
.crl-cardgrid__stat {
	font-size: 10px;
	color: #666;
}

/* ---- 推移グラフ ---- */
.crl-charts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 .8em;
}
@media (max-width: 600px) {
	.crl-charts {
		grid-template-columns: 1fr;
	}
}
.crl-charts__item {
	margin: 0;
	padding: 8px;
	border: 1px solid #e3e7ef;
	border-radius: 8px;
	background: #fff;
}
.crl-charts__item figcaption {
	margin: 0 0 4px;
	font-size: .8em;
	font-weight: 700;
	color: #555;
}
.crl-chart {
	display: block;
	width: 100%;
	height: auto;
}
.crl-chart__grid {
	stroke: #e8ecf3;
	stroke-width: 1;
}
.crl-chart__tick {
	font-size: 10px;
	fill: #888;
}
.crl-chart__line {
	fill: none;
	stroke-width: 2;
	stroke-linejoin: round;
}
.crl-chart--usage .crl-chart__line {
	stroke: var(--color_main, #2f6fd6);
}
.crl-chart--usage .crl-chart__dot {
	fill: var(--color_main, #2f6fd6);
}
.crl-chart--win .crl-chart__line {
	stroke: #d97a00;
}
.crl-chart--win .crl-chart__dot {
	fill: #d97a00;
}
.crl-trend-table {
	margin: 0 0 1em;
	font-size: .9em;
}
.crl-trend-table summary {
	cursor: pointer;
	color: var(--color_link, #1f5bb8);
}

/* ---- 公式イベント ---- */
.post_content ul.crl-events,
.post_content ul.crl-news {
	margin: 0;
	padding: 0;
	list-style: none;
}
.post_content ul.crl-events > li::before,
.post_content ul.crl-news > li::before {
	content: none;
}
.post_content .crl-events > .crl-event {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 0 0 8px;
	padding: 10px 12px;
	border: 1px solid #e3e7ef;
	border-left: 4px solid var(--color_main, #2f6fd6);
	border-radius: 6px;
	background: #fff;
}
.post_content .crl-events > .crl-event--upcoming {
	border-left-color: #9aa6bd;
}
.crl-event__badge {
	padding: 1px 8px;
	border-radius: 999px;
	font-size: .75em;
	font-weight: 700;
	color: #fff;
	background: var(--color_main, #2f6fd6);
}
.crl-event--upcoming .crl-event__badge {
	background: #9aa6bd;
}
.crl-event__name {
	font-weight: 700;
}
.crl-event__time {
	font-size: .85em;
	color: #555;
}

/* ---- 公式ニュース ---- */
.post_content .crl-news > .crl-news__item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	margin: 0;
	padding: 8px 0;
	border-bottom: 1px solid #e8ecf3;
}
.crl-news__date {
	font-size: .8em;
	color: #666;
	white-space: nowrap;
}
.crl-news__cat {
	padding: 0 6px;
	border: 1px solid #c9d3e6;
	border-radius: 3px;
	font-size: .72em;
	color: #555;
}
.crl-news__new {
	font-size: .72em;
	font-weight: 700;
	color: #d13f3f;
}
.crl-news__title {
	flex-basis: 100%;
}
