/*
 * Robse 追加機能(全テーマ共通)。
 * 色は --rbx-primary / --rbx-accent / --rbx-on-accent(inc/extras/extras.php がテーマの色変数に対応づける)。
 * クラス名はすべて rbx- で始める(テーマ本体のCSSとぶつからないように)。
 */

/* ---------- 全テーマ共通の安全策（2026-10-17） ---------- */
/* 長い URL・メールアドレスを折り返す（行に収まる文は今までどおり。表の列幅の決まり方は変えない） */
:where(body) { overflow-wrap: break-word; }
/* キーボードで操作したときだけ、いまの場所に枠を出す（マウスのクリックでは出ない）。
   :where で優先度を0にしているので、テーマ側に枠の指定があればそちらが勝つ */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
	outline: 2px solid var(--rbx-primary, currentColor);
	outline-offset: 2px;
}

/* ---------- ボタン ---------- */
.rbx-button { margin: 1.6em 0; }
.rbx-button.is-align-center { text-align: center; }
.rbx-button.is-align-right { text-align: right; }
.rbx-button__link {
	display: inline-block;
	min-width: 14em;
	max-width: 100%;
	padding: .9em 2em;
	border: 2px solid var(--rbx-accent);
	border-radius: 999px;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	text-decoration: none !important;
	transition: opacity .2s, transform .2s;
	box-sizing: border-box;
}
.rbx-button__link.is-primary { border-color: var(--rbx-primary); }
.rbx-button__link.is-fill.is-accent { background: var(--rbx-accent); color: var(--rbx-on-accent) !important; }
.rbx-button__link.is-fill.is-primary { background: var(--rbx-primary); color: #fff !important; }
.rbx-button__link.is-outline { background: transparent; color: var(--rbx-accent) !important; }
.rbx-button__link.is-outline.is-primary { color: var(--rbx-primary) !important; }
.rbx-button__link.is-large { min-width: 18em; padding: 1.1em 2.4em; font-size: 1.1em; }
a.rbx-button__link:hover { opacity: .85; transform: translateY(-1px); }
.rbx-editor-note { margin: .4em 0 0; font-size: 12px; color: #b32d2e; }

/* ---------- FAQ ---------- */
.rbx-faq { margin: 1.6em 0; }
.rbx-faq__item {
	margin: 0 0 .8em;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}
.rbx-faq__q {
	display: flex;
	align-items: flex-start;
	gap: .8em;
	padding: 1em 3em 1em 1.1em;
	font-weight: 700;
	line-height: 1.6;
	cursor: pointer;
	list-style: none;
	position: relative;
}
.rbx-faq__q::-webkit-details-marker { display: none; }
.rbx-faq__q::after {
	content: "";
	position: absolute;
	right: 1.2em;
	top: 1.35em;
	width: .55em;
	height: .55em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s;
	opacity: .6;
}
.rbx-faq__item[open] > .rbx-faq__q::after { transform: rotate(-135deg); top: 1.6em; }
.rbx-faq__item.is-editing .rbx-faq__q::after { display: none; }
.rbx-faq__mark {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.9em;
	height: 1.9em;
	border-radius: 50%;
	background: var(--rbx-primary);
	color: #fff;
	font-weight: 700;
	font-size: .9em;
	line-height: 1;
}
.rbx-faq__a {
	display: flex;
	align-items: flex-start;
	gap: .8em;
	padding: 0 1.1em 1em;
}
.rbx-faq__a .rbx-faq__mark { background: var(--rbx-accent); color: var(--rbx-on-accent); }
.rbx-faq__a-body { flex: 1 1 auto; min-width: 0; padding-top: .2em; }
.rbx-faq__a-body > :first-child { margin-top: 0; }
.rbx-faq__a-body > :last-child { margin-bottom: 0; }

/* ---------- ステップ ---------- */
.rbx-steps { margin: 1.6em 0; counter-reset: rbx-step; }
.rbx-step {
	position: relative;
	padding: 0 0 1.6em 1.8em;
	counter-increment: rbx-step;
}
.rbx-step::before {
	content: "";
	position: absolute;
	left: .45em;
	top: .5em;
	bottom: 0;
	width: 2px;
	background: var(--rbx-primary);
	opacity: .25;
}
.rbx-step:last-child::before { display: none; }
.rbx-step::after {
	content: "";
	position: absolute;
	left: 0;
	top: .3em;
	width: 1em;
	height: 1em;
	border-radius: 50%;
	background: var(--rbx-primary);
	box-shadow: 0 0 0 4px #fff;
}
.rbx-step__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .8em; margin-bottom: .4em; }
.rbx-step__label {
	color: var(--rbx-primary);
	font-weight: 700;
	font-size: .85em;
	letter-spacing: .08em;
}
.rbx-step__label::after { content: " " counter(rbx-step); }
.rbx-step__title { font-weight: 700; font-size: 1.1em; line-height: 1.5; }
.rbx-step__body > :first-child { margin-top: 0; }
.rbx-step__body > :last-child { margin-bottom: 0; }

/* ---------- 目次 ---------- */
.rbx-toc {
	margin: 2em 0;
	padding: 1.2em 1.4em;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 8px;
	background: rgba(0, 0, 0, .02);
}
.rbx-toc__title {
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
.rbx-toc__title::-webkit-details-marker { display: none; }
.rbx-toc__title::before {
	content: "";
	display: inline-block;
	width: .45em;
	height: .45em;
	margin: 0 .7em .15em 0;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .2s;
}
.rbx-toc[open] > .rbx-toc__title::before { transform: rotate(45deg); }
/* テーマ本文の ul/ol 指定(.entry-content ol など)に負けないよう、要素名を足して詳細度を上げている */
.rbx-toc ol.rbx-toc__list { margin: .8em 0 0; padding: 0 0 0 1.6em; list-style: decimal; line-height: 1.7; }
.rbx-toc ol.rbx-toc__list ol { margin: .2em 0 .3em; padding: 0 0 0 1.4em; list-style: decimal; font-size: .95em; }
.rbx-toc ol.rbx-toc__list li { margin: .25em 0; padding: 0; }
.rbx-toc ol.rbx-toc__list li::before { content: none; }
.rbx-toc__list a { color: inherit; text-decoration: none; }
.rbx-toc__list a:hover { color: var(--rbx-primary); text-decoration: underline; }
[id^="rbx-h-"], .single-article__content h2[id], .single-article__content h3[id] { scroll-margin-top: 90px; }

/* ---------- シェア ---------- */
.rbx-share { margin: 2.4em 0 1em; }
.rbx-share__title { margin: 0 0 .6em; font-weight: 700; font-size: .9em; }
.rbx-share ul.rbx-share__list { display: flex; flex-wrap: wrap; gap: .5em; margin: 0; padding: 0; list-style: none; }
.rbx-share ul.rbx-share__list li { margin: 0; padding: 0; list-style: none; }
.rbx-share ul.rbx-share__list li::before { content: none; }
.rbx-share__btn {
	display: inline-block;
	padding: .55em 1.1em;
	border: 0;
	border-radius: 4px;
	color: #fff !important;
	font: inherit;
	font-size: .85em;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none !important;
	cursor: pointer;
}
.rbx-share__btn:hover { opacity: .85; }
.rbx-share__btn--x { background: #000; }
.rbx-share__btn--facebook { background: #1877f2; }
.rbx-share__btn--line { background: #06c755; }
.rbx-share__btn--hatena { background: #00a4de; }
.rbx-share__btn--copy { background: #666; }

/* ---------- スマホ固定フッター ---------- */
.rbx-bar { display: none; }
@media (max-width: 767px) {
	.rbx-bar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: grid;
		grid-template-columns: repeat(var(--rbx-bar-cols, 3), minmax(0, 1fr));
		background: #fff;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, .12);
		padding-bottom: env(safe-area-inset-bottom);
	}
	.rbx-bar__item {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		min-height: 58px;
		padding: 6px 2px;
		color: var(--rbx-primary) !important;
		font-size: 11px;
		font-weight: 700;
		line-height: 1.3;
		text-align: center;
		text-decoration: none !important;
		border-left: 1px solid rgba(0, 0, 0, .08);
	}
	.rbx-bar__item:first-child { border-left: 0; }
	.rbx-bar__item.is-main { background: var(--rbx-accent); color: var(--rbx-on-accent) !important; }
	body.rbx-has-bar { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
	/* テーマ本体のスマホ用固定ボタンと重ならないように隠す(Ramen / Recruit / Ride) */
	body.rbx-has-bar .mobile-bar,
	body.rbx-has-bar .mobile-entry,
	body.rbx-has-bar .mobile-contact { display: none !important; }
}

/* ---------- ページトップ ---------- */
.rbx-pagetop {
	position: fixed;
	right: 16px;
	bottom: 20px;
	z-index: 9980;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--rbx-primary);
	color: #fff !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .25s, transform .25s, visibility .25s;
}
.rbx-pagetop.is-show { opacity: .9; visibility: visible; transform: none; }
.rbx-pagetop:hover { opacity: 1; }
@media (max-width: 767px) {
	.rbx-pagetop { right: 12px; bottom: 14px; width: 42px; height: 42px; }
	body.rbx-has-bar .rbx-pagetop { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
	.rbx-button__link, .rbx-pagetop, .rbx-faq__q::after, .rbx-toc__title::before { transition: none; }
}
