/**
 * Cashless Compare - 機能上必要な最小限のスタイル。
 * サイト固有の装飾（配色・フォント・角丸・影・余白など）はテーマ側（arkhe_child）で上書きする。
 * 色や寸法は CSS カスタムプロパティで差し替えられる。すべて .cc-compare 配下に限定。
 */
.cc-compare {
	--cc-text: #1b2a33;
	--cc-muted: #5b6b74;
	--cc-bg: #fff;
	--cc-alt: #f6f9fa;
	--cc-open: #eaf6f6;
	--cc-head-bg: #eef5f6;
	--cc-line: #d9e2e6;
	--cc-accent: #0f8b8d;
	--cc-accent-ink: #fff;
	--cc-ok: #137a4b;
	--cc-ok-bg: #e3f5ea;
	--cc-cond: #8a5a00;
	--cc-cond-bg: #fff1cf;
	--cc-ng: #4a5560;
	--cc-ng-bg: #e6e9ec;
	--cc-unknown: #4a5560;
	--cc-unknown-bg: #fff;
	--cc-mixed: #1d4f8c;
	--cc-mixed-bg: #e4eefa;
	--cc-name-w: 9.5rem;
	--cc-table-min-w: 1100px;
	--cc-table-max-h: min(80vh, 46rem);
	--cc-vw: 100%;
	color: var(--cc-text);
	box-sizing: border-box;
}
.cc-compare *, .cc-compare *::before, .cc-compare *::after { box-sizing: inherit; }
.cc-compare [hidden] { display: none !important; }
.cc-compare .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.cc-compare button, .cc-compare select, .cc-compare input { font: inherit; color: inherit; }
.cc-compare button { cursor: pointer; }
.cc-compare :focus-visible { outline: 3px solid var(--cc-accent); outline-offset: 2px; }

/* ---------- 絞り込み ---------- */
.cc-fgroup { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.cc-fgroup__label { padding: 0; font-weight: 700; flex: 0 0 7em; }
.cc-fgroup__opts { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; flex: 1 1 0; min-width: 0; }
.cc-chip {
	position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem;
	padding: 0 1.1rem; border: 1px solid var(--cc-line); border-radius: 999px; background: var(--cc-bg); cursor: pointer;
	user-select: none; line-height: 1.2; white-space: nowrap;
}
.cc-chip__input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.cc-chip:has(.cc-chip__input:focus-visible) { outline: 3px solid var(--cc-accent); outline-offset: 2px; }
.cc-chip:has(.cc-chip__input:checked), .cc-chip--all.is-on { background: var(--cc-accent); border-color: var(--cc-accent); color: var(--cc-accent-ink); }
/* 選択状態は色だけでなくチェック記号でも示す */
.cc-chip__input:checked + .cc-chip__t::before { content: "✓ "; }
.cc-chip--all { font: inherit; }
.cc-hint { font-size: .8125rem; color: var(--cc-muted); flex-basis: 100%; }
.cc-select, .cc-search__input { min-height: 2.5rem; border: 1px solid var(--cc-line); border-radius: 6px; padding: 0 .75rem; background: var(--cc-bg); }
.cc-check { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.5rem; cursor: pointer; }
.cc-check input { width: 1.25rem; height: 1.25rem; accent-color: var(--cc-accent); }
.cc-adv-toggle { background: none; border: 0; padding: .5rem 0; color: var(--cc-accent); font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; }
.cc-adv-toggle__i::before { content: "＋"; }
.cc-adv-toggle[aria-expanded="true"] .cc-adv-toggle__i::before { content: "－"; }
.cc-adv { display: grid; gap: .9rem; padding-top: .5rem; }

.cc-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin: 1.25rem 0 .5rem; }
.cc-count { margin: 0; display: flex; align-items: baseline; gap: .5rem; }
.cc-count__n strong { font-size: 1.5em; font-variant-numeric: tabular-nums; }
.cc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.cc-search__input { min-width: 14rem; }
.cc-sort { display: inline-flex; align-items: center; gap: .4rem; }
.cc-reset { background: none; border: 0; padding: .5rem; min-height: 2.75rem; color: var(--cc-accent); font-weight: 700; text-decoration: underline; }
.cc-selected { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .75rem; }
.cc-selected__list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.cc-tag { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.25rem; padding: 0 .75rem; border: 1px solid var(--cc-accent); border-radius: 999px; background: var(--cc-open); }
.cc-empty { text-align: center; padding: 2rem 1rem; border: 1px dashed var(--cc-line); border-radius: 8px; margin: 1rem 0; }
.cc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.25rem; border: 1px solid var(--cc-accent); border-radius: 999px; background: var(--cc-bg); color: var(--cc-accent); font-weight: 700; text-decoration: none; }

/* ---------- 表 ---------- */
.cc-scroll { position: relative; }
.cc-scrollhint { display: none; margin: 0 0 .4rem; font-size: .875rem; color: var(--cc-muted); text-align: center; }
.cc-tablewrap {
	overflow: auto; max-height: var(--cc-table-max-h); border: 1px solid var(--cc-line); border-radius: 8px;
	background: var(--cc-bg); -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.cc-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: var(--cc-table-min-w); font-size: .9375rem; line-height: 1.5; }
.cc-table th, .cc-table td { padding: .6rem .7rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--cc-line); background: var(--cc-bg); }
.cc-table thead th { position: sticky; top: 0; z-index: 3; background: var(--cc-head-bg); font-weight: 700; white-space: nowrap; vertical-align: middle; }
.cc-col--name, .cc-th--name { position: sticky; left: 0; z-index: 2; width: var(--cc-name-w); min-width: var(--cc-name-w); max-width: var(--cc-name-w); }
.cc-th--name { z-index: 4; }
/* 固定列の境目に影をつけ、横スクロール中であることを分かりやすくする */
.cc-scroll.is-scrolled .cc-col--name, .cc-scroll.is-scrolled .cc-th--name { box-shadow: 4px 0 6px -4px rgba(0, 0, 0, .25); }
.cc-item.is-alt .cc-row > * { background: var(--cc-alt); }
.cc-item.is-open .cc-row > * { background: var(--cc-open); }
.cc-item.is-open .cc-row > th, .cc-item.is-open .cc-row > td { border-bottom-color: transparent; }
.cc-detail > td { padding: 0; background: var(--cc-open); }
.cc-detail__inner { position: sticky; left: 0; width: var(--cc-vw); max-width: 100%; padding: 1rem; }
.cc-detail__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.cc-d { background: var(--cc-bg); border: 1px solid var(--cc-line); border-radius: 8px; padding: .9rem 1rem; min-width: 0; overflow-wrap: anywhere; }
.cc-d__title { margin: 0 0 .6rem; font-size: 1rem; }
.cc-d__sub { margin: .75rem 0 .25rem; font-weight: 700; }
.cc-method + .cc-method { margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--cc-line); }
.cc-method__name { margin: 0 0 .4rem; font-size: .9375rem; }
.cc-dl { margin: 0; display: grid; gap: .45rem; }
.cc-dl > div { display: grid; grid-template-columns: 8.5em 1fr; gap: .5rem; }
.cc-dl dt { font-weight: 700; color: var(--cc-muted); font-size: .875rem; }
.cc-dl dd { margin: 0; min-width: 0; }
.cc-dl--inline { margin-bottom: .6rem; }
.cc-lines, .cc-links, .cc-cats, .cc-timings, .cc-places, .cc-evidence { list-style: none; margin: 0; padding: 0; }
.cc-lines li { position: relative; padding-left: 1em; margin: 0 0 .3rem; }
.cc-lines li::before { content: "・"; position: absolute; left: 0; }
.cc-links li { margin: 0 0 .3rem; overflow-wrap: anywhere; }
.cc-d--notes { grid-column: 1 / -1; }
.cc-more { margin-top: .75rem; }
.cc-more__s { cursor: pointer; font-weight: 700; min-height: 2.5rem; display: flex; align-items: center; }
.cc-evidence { margin-top: .5rem; columns: 20rem 3; column-gap: 1.5rem; }
.cc-evidence li { break-inside: avoid; margin-bottom: .5rem; }
.cc-evidence li { display: block; padding-top: .5rem; border-top: 1px dashed var(--cc-line); }
.cc-evidence__item { font-weight: 700; margin-right: .5em; }
.cc-evidence__status { margin-right: .5em; color: var(--cc-muted); }
.cc-evidence__body, .cc-evidence__note { display: block; }
.cc-evidence__note { color: var(--cc-muted); font-size: .875rem; }

/* 列幅（内容で潰れないよう最小幅を指定） */
.cc-table thead th:nth-child(2), .cc-row > :nth-child(2) { min-width: 6.5rem; }
.cc-table thead th:nth-child(3), .cc-row > :nth-child(3) { min-width: 5.75rem; }
.cc-table thead th:nth-child(4), .cc-row > :nth-child(4) { min-width: 8rem; }
.cc-table thead th:nth-child(5), .cc-row > :nth-child(5) { min-width: 8rem; }
.cc-table thead th:nth-child(6), .cc-row > :nth-child(6) { min-width: 8rem; }
.cc-table thead th:nth-child(7), .cc-row > :nth-child(7) { min-width: 9.5rem; }
.cc-table thead th:nth-child(8), .cc-row > :nth-child(8) { min-width: 8rem; }
.cc-table thead th:nth-child(9), .cc-row > :nth-child(9) { min-width: 13rem; }
.cc-table thead th:nth-child(10), .cc-row > :nth-child(10) { min-width: 5.5rem; }
.cc-toggle { white-space: nowrap; }

/* セル内部 */
.cc-cats li, .cc-timings li { margin: 0 0 .2rem; white-space: nowrap; }
.cc-places li { display: flex; align-items: center; gap: .4rem; margin: 0 0 .25rem; white-space: nowrap; }
.cc-places__l { min-width: 4.5em; font-size: .875rem; }
.cc-name { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }
.cc-logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
.cc-match { display: block; margin-top: .25rem; font-size: .8125rem; color: var(--cc-muted); font-weight: 400; }
.cc-note { display: block; margin-top: .15rem; font-size: .8125rem; color: var(--cc-muted); line-height: 1.4; overflow-wrap: anywhere; }
.cc-note--none { font-style: normal; }
.cc-muted { color: var(--cc-muted); }
.cc-rate__v { font-weight: 700; font-size: 1.05em; font-variant-numeric: tabular-nums; }
.cc-cost__t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; font-size: .875rem; overflow-wrap: anywhere; }
.cc-af { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin-bottom: .3rem; }
.cc-af__n { font-size: .875rem; }

/* 判定バッジ：記号＋文字で判別できる（色は補助） */
.cc-st { display: inline-flex; align-items: center; gap: .3em; padding: .15em .6em; border-radius: 999px; font-weight: 700; font-size: .875rem; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.cc-st--sm { font-size: .8125rem; padding: .05em .5em; }
.cc-st--ok { color: var(--cc-ok); background: var(--cc-ok-bg); border-color: var(--cc-ok); }
.cc-st--cond { color: var(--cc-cond); background: var(--cc-cond-bg); border-color: var(--cc-cond); }
.cc-st--ng { color: var(--cc-ng); background: var(--cc-ng-bg); border-color: #98a2ab; }
.cc-st--unknown { color: var(--cc-unknown); background: var(--cc-unknown-bg); border-color: #98a2ab; border-style: dashed; }
.cc-st--na { color: var(--cc-ng); background: transparent; border-color: var(--cc-line); }
.cc-st--mixed { color: var(--cc-mixed); background: var(--cc-mixed-bg); border-color: var(--cc-mixed); }
.cc-st__mark { font-weight: 700; }

.cc-sortbtn { background: none; border: 0; padding: 0; font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; min-height: 2rem; text-align: left; }
.cc-sortbtn__i::before { content: "⇅"; opacity: .55; }
.cc-sortbtn.is-active .cc-sortbtn__i::before { content: "▼"; opacity: 1; font-size: .75em; }
.cc-sortbtn.is-active[data-sort-btn="name"] .cc-sortbtn__i::before { content: "▲"; }

.cc-toggle { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.5rem; min-width: 4.5rem; padding: 0 .75rem; border: 1px solid var(--cc-line); border-radius: 999px; background: var(--cc-bg); font-weight: 700; justify-content: center; }
.cc-toggle__i::before { content: "▾"; }
.cc-toggle[aria-expanded="true"] .cc-toggle__i::before { content: "▴"; }

.cc-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; margin: .9rem 0 0; padding: 0; font-size: .875rem; }
.cc-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.cc-legend__d { color: var(--cc-muted); }

/* ---------- スマホ・タブレット ---------- */
@media (max-width: 900px) {
	.cc-scrollhint { display: block; }
	.cc-scroll.can-scroll:not(.at-end) .cc-tablewrap { box-shadow: inset -14px 0 10px -10px rgba(0, 0, 0, .25); }
	.cc-scroll.can-scroll.is-scrolled .cc-scrollhint { opacity: .6; }
}
@media (max-width: 640px) {
	.cc-compare { --cc-name-w: 7.25rem; --cc-table-max-h: 72vh; }
	.cc-fgroup { align-items: flex-start; }
	.cc-fgroup__label { flex-basis: 100%; }
	.cc-chip { min-height: 2.75rem; padding: 0 .9rem; font-size: .9375rem; }
	.cc-fgroup { gap: .25rem .75rem; }
	.cc-fgroup__opts { gap: .4rem; }
	.cc-filters__body { gap: .55rem !important; }
	.cc-table { font-size: .9375rem; }
	.cc-table th, .cc-table td { padding: .55rem .55rem; }
	.cc-search { flex: 1 1 100%; }
	.cc-search__input { width: 100%; min-height: 2.75rem; }
	.cc-select { min-height: 2.75rem; }
	.cc-dl > div { grid-template-columns: 1fr; gap: .1rem; }
	.cc-detail__inner { padding: .75rem; }
	.cc-detail__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.cc-compare * { transition: none !important; scroll-behavior: auto !important; }
}
