/*
 * 論文ニュース公式アプリの案内バナー
 * 本文の流れの中に置き、固定表示・ポップアップ・アニメーションは使わない。
 * 置き場所の幅に合わせて、狭い所では縦長のカード、640px以上では横長の帯になる。
 */

.rnab {
	--rnab-bg: #f3faf6;
	--rnab-line: #d3eadf;
	--rnab-ink: #2b3330;
	--rnab-sub: #4d5a55;
	--rnab-green: #1f5d46;
	--rnab-pink: #c83d5b;
	--rnab-btn: #1d2523;
	--rnab-btn-hover: #3a4643;
	container-type: inline-size;
	margin: 40px 0 24px;
	color: var(--rnab-ink);
	font-family: inherit;
	line-height: 1.5;
}

.rnab *,
.rnab *::before,
.rnab *::after {
	box-sizing: border-box;
}

.rnab .rnab__inner {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	grid-template-areas:
		"art body"
		"actions actions"
		"qr qr";
	gap: 12px 14px;
	align-items: center;
	padding: 16px;
	background: var(--rnab-bg);
	border: 1px solid var(--rnab-line);
	border-radius: 16px;
}

.rnab .rnab__art {
	grid-area: art;
	width: 56px;
	line-height: 0;
}

.rnab .rnab__art svg {
	display: block;
	width: 100%;
	height: auto;
}

.rnab .rnab__body {
	grid-area: body;
	min-width: 0;
}

.rnab .rnab__eyebrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 4px;
	color: var(--rnab-green);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.02em;
}

.rnab .rnab__free {
	display: inline-block;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--rnab-pink);
	color: #fff;
	font-size: 11px;
	line-height: 1.7;
}

.rnab .rnab__title {
	margin: 0;
	color: var(--rnab-ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.45;
}

/* 句読点の位置でだけ折り返す */
.rnab .rnab__title span {
	display: inline-block;
}

.rnab .rnab__features {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 6px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.rnab .rnab__features li {
	margin: 0;
	padding: 1px 8px;
	border: 1px solid var(--rnab-line);
	border-radius: 999px;
	background: #fff;
	color: var(--rnab-sub);
	font-size: 12px;
	line-height: 1.6;
	list-style: none;
}

.rnab .rnab__features li::before,
.rnab .rnab__features li::marker {
	content: none;
}

.rnab .rnab__actions {
	grid-area: actions;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.rnab .rnab__store {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 48px;
	padding: 6px;
	border-radius: 10px;
	background: var(--rnab-btn);
	color: #fff !important;
	text-align: center;
	text-decoration: none !important;
	line-height: 1.25;
	transition: background-color 0.15s;
}

.rnab .rnab__store:hover {
	background: var(--rnab-btn-hover);
}

.rnab .rnab__store:focus-visible {
	outline: 3px solid #74b3e6;
	outline-offset: 2px;
}

.rnab .rnab__store small {
	display: block;
	font-size: 11px;
	font-weight: 400;
	opacity: 0.8;
}

.rnab .rnab__store span {
	display: block;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.rnab .rnab__qr {
	grid-area: qr;
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 12px;
	border-top: 1px dashed var(--rnab-line);
}

.rnab .rnab__qr img {
	flex: none;
	width: 76px;
	max-width: none;
	height: 76px;
	margin: 0;
	padding: 4px;
	border-radius: 6px;
	background: #fff;
}

.rnab .rnab__qr-text {
	color: var(--rnab-sub);
	font-size: 12px;
	line-height: 1.5;
}

/* 横長（トップ・記事下のPC表示） */
@container (min-width: 640px) {
	.rnab .rnab__inner {
		grid-template-columns: 80px minmax(0, 1fr) 176px auto;
		grid-template-areas: "art body actions qr";
		gap: 0 20px;
		padding: 18px 22px;
	}

	.rnab .rnab__art {
		width: 80px;
	}

	.rnab .rnab__eyebrow {
		font-size: 13px;
	}

	.rnab .rnab__title {
		font-size: 21px;
	}

	.rnab .rnab__actions {
		grid-template-columns: 1fr;
	}

	.rnab .rnab__store span {
		font-size: 15px;
	}

	.rnab .rnab__qr {
		flex-direction: column;
		gap: 4px;
		padding: 0 0 0 20px;
		border-top: 0;
		border-left: 1px dashed var(--rnab-line);
		text-align: center;
	}

	.rnab .rnab__qr img {
		width: 92px;
		height: 92px;
	}

	.rnab .rnab__qr-text {
		font-size: 11px;
	}
}

/* QRコードはPCで見ている人向け。スマホ・タブレットでは出さない */
@media (hover: none) and (pointer: coarse) {
	.rnab .rnab__qr {
		display: none;
	}
}

/* サイドカラムは1199px以下で本文の下に回るため、記事下と重ならないよう隠す */
.rnab.rnab--side {
	display: none;
	margin: 0 0 32px;
}

@media (min-width: 1200px) {
	.rnab.rnab--side {
		display: block;
	}
}
