/* =========================================================
   Bloomy Cookie の案内 v2（2026-11-17）
   色は skin2 の変数（--bl-*）に合わせ、無いときは同じ値を直に持つ。
   クラスは bck-（compare-cards が bloomy-cc-* を使っているため別名）。
   ========================================================= */
.bck, .bck-sheet {
	--bck-ink: var(--bl-ink, #0B1F44);
	--bck-ink2: var(--bl-ink-2, #46536B);
	--bck-ink3: var(--bl-ink-3, #5E6A7E);
	--bck-line: var(--bl-line, #E3E8EF);
	--bck-line2: var(--bl-line-2, #C5CCD8);
	--bck-paper: var(--bl-paper, #fff);
	--bck-wash: var(--bl-wash, #F5F7FA);
	--bck-blue: var(--bl-blue, #0964F0);
	--bck-blue-d: #0751C4;
	--bck-focus: 0 0 0 3px rgba(9, 100, 240, .35);
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}
.bck *, .bck-sheet * { box-sizing: border-box; }

/* ---------- 1 段目のカード ---------- */
/* v1 の CSS（.bloomy-cc-banner の中央寄せ・余白）が同じ要素に当たるので打ち消す */
.bck.bloomy-cc-banner {
	padding: 0; justify-content: flex-start; left: 12px; right: 12px;
	bottom: calc(12px + var(--bck-lift, 0px) + env(safe-area-inset-bottom, 0px));
}
.bck {
	position: fixed;
	z-index: 2300;
	left: 12px;
	right: 12px;
	bottom: calc(12px + var(--bck-lift, 0px) + env(safe-area-inset-bottom, 0px));
	display: flex;
	justify-content: flex-start;
	pointer-events: none;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .2s ease, transform .2s cubic-bezier(.2, .8, .25, 1);
}
.bck.is-in { opacity: 1; transform: none; }
.bck.is-out { opacity: 0; transform: translateY(10px); }
.bck__card {
	pointer-events: auto;
	width: 100%;
	max-width: 440px;
	background: var(--bck-paper);
	color: var(--bck-ink);
	border: 1px solid var(--bck-line);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(11, 31, 68, .06), 0 12px 32px -14px rgba(11, 31, 68, .28);
	padding: 14px 14px 12px 16px;
}
.bck__text {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--bck-ink);
	font-weight: 500;
}
.bck__more {
	color: var(--bck-blue);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}
.bck__gpc { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--bck-ink3); }
.bck__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
}
.bck__choose {
	appearance: none;
	background: none;
	border: 0;
	padding: 10px 6px;
	margin-right: auto;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	color: var(--bck-ink2);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	min-height: 44px;
	white-space: nowrap;
}
.bck__btn {
	appearance: none;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.bck__btn--main { background: var(--bck-blue); color: #fff; }
.bck__btn--main:hover { background: var(--bck-blue-d); }
.bck__btn--quiet { background: var(--bck-wash); color: var(--bck-ink); border-color: var(--bck-line); }
.bck__btn--quiet:hover { border-color: var(--bck-line2); }
.bck__btn--line { background: var(--bck-paper); color: var(--bck-ink); border-color: var(--bck-line2); }
.bck__btn--line:hover { background: var(--bck-wash); }
.bck__btn:focus-visible, .bck__choose:focus-visible, .bck__more:focus-visible,
.bck-sheet__close:focus-visible, .bck-sheet a:focus-visible { outline: none; box-shadow: var(--bck-focus); border-radius: 999px; }
/* std・light: 文と小さなリンクが左、OK が右（低いカード） */
.bck__card--row { display: flex; align-items: center; gap: 12px; }
.bck__main { flex: 1 1 auto; min-width: 0; }
.bck__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin-top: 2px; }
.bck__link {
	appearance: none; background: none; border: 0; padding: 6px 0; min-height: 32px;
	font: inherit; font-size: 12.5px; font-weight: 700; color: var(--bck-ink2);
	text-decoration: underline; text-underline-offset: 3px; cursor: pointer; white-space: nowrap;
}
.bck__link:hover { color: var(--bck-ink); }
.bck__link:focus-visible { outline: none; box-shadow: var(--bck-focus); border-radius: 6px; }
.bck__link--inline { padding: 0; min-height: 0; font-size: inherit; vertical-align: baseline; }
.bck__text:lang(ja), .bck-sheet__lead:lang(ja), .bck-item__desc:lang(ja), .bck-sheet__foot:lang(ja) { word-break: auto-phrase; }
.bck__dot { color: var(--bck-ink3); font-size: 12px; }
.bck__card--row > .bck__btn { flex: 0 0 auto; }
/* strict: 2 つのボタンは同じ幅・同じ色（どちらも押しやすく） */
.bck--strict .bck__actions .bck__btn { flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; }
.bck--std .bck__btn--main, .bck--light .bck__btn--main { min-width: 88px; }

@media (max-width: 480px) {
	.bck, .bck.bloomy-cc-banner { left: 8px; right: 8px; bottom: calc(8px + var(--bck-lift, 0px) + env(safe-area-inset-bottom, 0px)); }
	.bck__card { max-width: none; padding: 12px 12px 10px 14px; }
	.bck__card--row { padding: 10px 10px 8px 14px; gap: 10px; }
	.bck__text { font-size: 13px; }
	.bck__btn { padding: 10px 14px; }
}

/* ---------- 2 段目（シート） ---------- */
.bck-sheet { position: fixed; inset: 0; z-index: 100002; display: flex; align-items: center; justify-content: center; padding: 20px; }
.bck-sheet[hidden] { display: none; }
.bck-sheet__overlay { position: absolute; inset: 0; background: rgba(11, 31, 68, .42); opacity: 0; transition: opacity .2s ease; }
.bck-sheet.is-in .bck-sheet__overlay { opacity: 1; }
.bck-sheet__box {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: calc(100dvh - 40px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--bck-paper);
	color: var(--bck-ink);
	border-radius: 20px;
	padding: 24px 22px 18px;
	box-shadow: 0 30px 70px -24px rgba(11, 31, 68, .5);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .2s ease, transform .22s cubic-bezier(.2, .8, .25, 1);
}
.bck-sheet.is-in .bck-sheet__box { opacity: 1; transform: none; }
.bck-sheet__close {
	position: absolute; top: 10px; right: 10px;
	width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	border: 0; background: none; color: var(--bck-ink3); cursor: pointer; border-radius: 999px;
}
.bck-sheet__close:hover { background: var(--bck-wash); }
.bck-sheet__title { margin: 0 0 4px; font-size: 19px; font-weight: 800; line-height: 1.4; color: var(--bck-ink); padding-right: 40px; }
.bck-sheet__lead { margin: 0 0 14px; font-size: 13px; line-height: 1.65; color: var(--bck-ink2); }
.bck-list { list-style: none; margin: 0 0 14px; padding: 0; border: 1px solid var(--bck-line); border-radius: 14px; }
.bck-item { padding: 12px 14px; }
.bck-item + .bck-item { border-top: 1px solid var(--bck-line); }
.bck-item__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.bck-item__name { font-size: 14.5px; font-weight: 700; color: var(--bck-ink); cursor: pointer; }
.bck-item__always { font-size: 12px; font-weight: 700; color: var(--bck-ink2); background: var(--bck-wash); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.bck-item__desc { margin: 4px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--bck-ink2); }
.bck-item__to { margin: 3px 0 0; font-size: 12px; line-height: 1.5; color: var(--bck-ink3); }
.bck-switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 48px; height: 28px; }
.bck-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.bck-switch input:disabled { cursor: not-allowed; }
.bck-switch__track { position: absolute; inset: 0; border-radius: 999px; background: #8A94A6; transition: background-color .18s ease; }
.bck-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(11, 31, 68, .3); transition: transform .18s ease; }
.bck-switch input:checked + .bck-switch__track { background: var(--bck-blue); }
.bck-switch input:checked + .bck-switch__track::after { transform: translateX(20px); }
.bck-switch input:disabled + .bck-switch__track { opacity: .45; }
.bck-switch input:focus-visible + .bck-switch__track { box-shadow: var(--bck-focus); }
.bck-sheet__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bck__btn--wide { grid-column: 1 / -1; }
.bck-sheet__foot { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: var(--bck-ink3); }
.bck-sheet__foot a { color: var(--bck-blue); font-weight: 700; }
html.bck-lock, html.bck-lock body { overflow: hidden; }

@media (max-width: 600px) {
	.bck-sheet { align-items: flex-end; padding: 0; }
	.bck-sheet__box {
		max-width: none;
		max-height: 88dvh;
		border-radius: 20px 20px 0 0;
		padding: 22px 16px calc(14px + env(safe-area-inset-bottom, 0px));
		transform: translateY(24px);
	}
	.bck-sheet__box::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--bck-line2); }
}

@media (prefers-reduced-motion: reduce) {
	.bck, .bck-sheet__box, .bck-sheet__overlay, .bck__btn, .bck-switch__track, .bck-switch__track::after { transition: none; }
}
@media print { .bck, .bck-sheet { display: none !important; } }
