/* =============================================
   sfsim.css — 費用シミュレーター
   すべて .sfsim 配下にスコープ（SWELL干渉防止）
   ============================================= */

.sfsim {
	--sfsim-pink:  #e8357a;
	--sfsim-pink2: #f06fa0;
	--sfsim-deep:  #a01848;
	--sfsim-dark:  #c0206a;
	--sfsim-pale:  #fde0ee;
	--sfsim-free:  #1a9e64;
	--sfsim-ink:   #2a0f1a;

	font-family: inherit;
	max-width: 720px;
	margin: 28px auto;
	background: #fff;
	border: 1px solid var(--sfsim-pale);
	border-radius: 14px;
	overflow: hidden;
	color: var(--sfsim-ink);
}

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

.sfsim-head {
	padding: 12px 18px;
	background: linear-gradient(90deg, var(--sfsim-pink) 0%, var(--sfsim-pink2) 55%, var(--sfsim-pink) 100%);
	color: #fff;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.14em;
	position: relative;
	overflow: hidden;
}

.sfsim-head::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		-55deg, transparent, transparent 6px,
		rgba(255,255,255,0.06) 6px, rgba(255,255,255,0.06) 7px);
	pointer-events: none;
}

.sfsim-body { padding: 16px 18px 18px; }

.sfsim-lead {
	margin: 0 0 16px !important;
	font-size: 12.5px;
	line-height: 1.8;
	color: #5a4a50;
}

/* 本文中のアプリ名 */
.sfsim-name {
	font-weight: 900;
	color: var(--sfsim-dark);
}


/* =============================================
   スライダー
   ============================================= */

.sfsim-control { margin-bottom: 16px; }

.sfsim-control-label {
	display: block;
	font-size: 13px;
	font-weight: 900;
	color: var(--sfsim-ink);
	margin-bottom: 9px;
}

.sfsim-control-row {
	display: flex;
	align-items: center;
	gap: 14px;
}

.sfsim-range {
	flex: 1;
	min-width: 0;
	-webkit-appearance: none;
	appearance: none;
	height: 8px;
	border-radius: 20px;
	outline: none;
	margin: 0;
	background: linear-gradient(
		90deg,
		var(--sfsim-pink) 0%,
		var(--sfsim-pink2) var(--pos, 0%),
		#f3eef0 var(--pos, 0%),
		#f3eef0 100%
	);
}

.sfsim-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: linear-gradient(160deg, var(--sfsim-pink), var(--sfsim-deep));
	border: 3px solid #fff;
	box-shadow: 0 2px 8px rgba(232,53,122,0.4);
	cursor: pointer;
}

.sfsim-range::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: linear-gradient(160deg, var(--sfsim-pink), var(--sfsim-deep));
	border: 3px solid #fff;
	box-shadow: 0 2px 8px rgba(232,53,122,0.4);
	cursor: pointer;
}

.sfsim-range:focus-visible { outline: 2px solid var(--sfsim-pink); outline-offset: 4px; }

.sfsim-count {
	flex-shrink: 0;
	display: inline-flex;
	align-items: baseline;
	gap: 5px;
}

.sfsim-number {
	width: 74px;
	padding: 7px 9px;
	font-size: 16px;
	font-weight: 900;
	text-align: right;
	color: var(--sfsim-dark);
	background: #fff;
	border: 1.5px solid #f0c6d8;
	border-radius: 7px;
	-moz-appearance: textfield;
	appearance: textfield;
}

.sfsim-number::-webkit-outer-spin-button,
.sfsim-number::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.sfsim-count b { font-size: 12px; font-weight: 700; color: #8a7a80; }


/* =============================================
   4指標
   ============================================= */

.sfsim-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 14px;
}

.sfsim-stat {
	background: #faf8f9;
	border: 1px solid #efe9eb;
	border-radius: 9px;
	padding: 10px 6px 11px;
	text-align: center;
}

.sfsim-stat-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	color: #8a7a80;
	line-height: 1.45;
	margin-bottom: 5px;
}

.sfsim-stat-num {
	display: block;
	font-size: clamp(14px, 3.6vw, 17px);
	font-weight: 900;
	line-height: 1.2;
	color: #4a3038;
	letter-spacing: -0.01em;
}

.sfsim-stat-num--free { color: var(--sfsim-free); }
.sfsim-stat-num--pay  { color: #9a9a9a; }

.sfsim.is-overfree .sfsim-stat-num--pay { color: var(--sfsim-pink); }


/* =============================================
   二色バー
   ============================================= */

.sfsim-bar {
	display: flex;
	height: 12px;
	border-radius: 20px;
	overflow: hidden;
	background: #f1eff0;
	margin-bottom: 7px;
}

.sfsim-bar-free,
.sfsim-bar-pay {
	display: block;
	height: 100%;
	width: 0;
	transition: width 0.15s ease;
}

.sfsim-bar-free { background: linear-gradient(90deg, #35c78a, var(--sfsim-free)); }
.sfsim-bar-pay  { background: linear-gradient(90deg, var(--sfsim-pink2), var(--sfsim-pink)); }

.sfsim-bar-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin-bottom: 12px;
	font-size: 10.5px;
	font-weight: 700;
	color: #8a7a80;
}

.sfsim-bar-legend span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.sfsim-dot {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 2px;
}

.sfsim-dot--free { background: var(--sfsim-free); }
.sfsim-dot--pay  { background: var(--sfsim-pink); }

.sfsim-verdict {
	margin: 0 0 16px !important;
	padding: 11px 13px;
	background: #f6fbf8;
	border-left: 3px solid var(--sfsim-free);
	border-radius: 0 7px 7px 0;
	font-size: 12.5px;
	line-height: 1.85;
	color: #234a3a;
}

.sfsim-verdict b { font-weight: 900; }

.sfsim.is-overfree .sfsim-verdict {
	background: #fff6fa;
	border-left-color: var(--sfsim-pink);
	color: #6a2038;
}


/* =============================================
   対面人数と1人あたり単価
   ============================================= */

.sfsim-result {
	border: 1px solid #f2cddc;
	border-radius: 11px;
	overflow: hidden;
	margin-bottom: 14px;
	background: linear-gradient(160deg, #fff8fb 0%, #fff2f7 100%);
}

.sfsim-result-head {
	padding: 9px 13px;
	background: rgba(232,53,122,0.08);
	border-bottom: 1px solid #f7d9e6;
	font-size: 11.5px;
	font-weight: 900;
	line-height: 1.6;
	color: var(--sfsim-dark);
}

.sfsim-result-flow {
	display: flex;
	align-items: stretch;
	gap: 6px;
	padding: 13px 12px;
}

.sfsim-result-cell {
	flex: 1;
	min-width: 0;
	background: #fff;
	border: 1px solid #f2e2e9;
	border-radius: 9px;
	padding: 9px 6px 10px;
	text-align: center;
}

.sfsim-result-cell--hot {
	background: linear-gradient(160deg, var(--sfsim-pink) 0%, var(--sfsim-deep) 100%);
	border-color: transparent;
}

.sfsim-result-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	color: #8a7a80;
	margin-bottom: 4px;
	line-height: 1.4;
}

.sfsim-result-cell--hot .sfsim-result-label { color: rgba(255,255,255,0.82); }

.sfsim-result-num {
	display: block;
	font-size: clamp(17px, 4.4vw, 22px);
	font-weight: 900;
	line-height: 1.1;
	color: #4a3038;
	letter-spacing: -0.02em;
}

.sfsim-result-cell--hot .sfsim-result-num { color: #fff; }

.sfsim-result-num i {
	font-style: normal;
	font-size: 11px;
	font-weight: 700;
	color: #a09096;
	margin-left: 2px;
}

.sfsim-result-cell--hot .sfsim-result-num i { color: rgba(255,255,255,0.75); }

.sfsim-result-arrow {
	flex-shrink: 0;
	align-self: center;
	width: 0;
	height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 8px solid #e8b8cc;
}

.sfsim-result-foot {
	padding: 0 13px 11px;
	font-size: 10.5px;
	line-height: 1.7;
	color: #9a8a90;
}

.sfsim-result-foot b { font-weight: 900; color: var(--sfsim-dark); }


/* =============================================
   前提条件
   ============================================= */

.sfsim-notes {
	background: #faf9f8;
	border: 1px solid #ececea;
	border-radius: 9px;
	padding: 12px 14px;
}

.sfsim-notes-head {
	font-size: 11.5px;
	font-weight: 900;
	letter-spacing: 0.04em;
	color: #55524f;
	margin-bottom: 7px;
}

.sfsim-notes-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.sfsim-notes-list li {
	position: relative;
	margin: 0 !important;
	padding: 3px 0 3px 13px;
	font-size: 11px;
	line-height: 1.8;
	color: #75726e;
}

.sfsim-notes-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 12px;
	width: 5px;
	height: 1px;
	background: #b4b2a9;
}

.sfsim-notes-link {
	margin: 8px 0 0 !important;
	font-size: 11.5px;
	line-height: 1.7;
}


/* =============================================
   スマホ
   ============================================= */

@media (max-width: 560px) {
	.sfsim { margin: 22px auto; border-radius: 12px; }
	.sfsim-body { padding: 14px 13px 15px; }

	.sfsim-stats { grid-template-columns: repeat(2, 1fr); }

	.sfsim-control-row { gap: 10px; }
	.sfsim-number { width: 64px; font-size: 15px; padding: 6px 8px; }

	.sfsim-result-flow { padding: 11px 10px; gap: 4px; }
	.sfsim-result-cell { padding: 8px 4px 9px; }
	.sfsim-result-arrow { border-left-width: 6px; border-top-width: 5px; border-bottom-width: 5px; }

	.sfsim-verdict { font-size: 12px; padding: 10px 11px; }
}


/* アニメーションを控える設定の端末 */
@media (prefers-reduced-motion: reduce) {
	.sfsim-bar-free,
	.sfsim-bar-pay { transition: none; }
}
