/* torisetsu-core: シミュレーション（あなた専用のやることリスト）／手順のチェック */
.ts-sim { margin: 0 0 2em; padding: 18px 16px 14px; background: var(--ts-primary-soft); border: 1px solid #f9d4c6; border-radius: var(--ts-radius); }
.ts-sim [hidden] { display: none !important; }
.ts-sim .ts-sec__title { border-bottom-color: var(--ts-primary); }
.ts-sim__lead { margin: 0 0 1em; line-height: 1.7; }
.ts-sim__lead small { color: var(--ts-muted); font-size: .78rem; }
.ts-sim__form { display: grid; gap: 14px; }
.ts-sim__q { border: 0; margin: 0; padding: 0; min-width: 0; }
.ts-sim__q legend { display: flex; align-items: flex-start; gap: 8px; font-weight: 800; margin-bottom: 8px; padding: 0; line-height: 1.5; }
.ts-sim__q legend small { font-weight: 500; color: var(--ts-muted); margin-left: .3em; }
.ts-sim__qn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ts-primary); color: #fff; font-size: .8rem; font-weight: 800; }
.ts-sim__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-sim__opt { position: relative; }
.ts-sim__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ts-sim__opt span { display: inline-block; padding: 9px 14px; background: #fff; border: 1.5px solid var(--ts-line); border-radius: 999px; font-size: .92rem; line-height: 1.35; transition: border-color .15s, background .15s; }
.ts-sim__opt input:checked + span { background: var(--ts-primary); border-color: var(--ts-primary); color: #fff; font-weight: 700; }
.ts-sim__opt input:focus-visible + span { outline: 3px solid #f9a88e; outline-offset: 2px; }
.ts-sim__base { display: grid; gap: 6px; }
.ts-sim__base label { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.ts-sim__base input[type="date"] { max-width: 220px; padding: 8px 10px; border: 1.5px solid var(--ts-line); border-radius: var(--ts-radius-sm); font: inherit; background: #fff; }
.ts-sim__base small { color: var(--ts-muted); }
.ts-sim__err { margin: 0; color: var(--ts-danger); font-weight: 700; }
.ts-sim__form .ts-btn { justify-self: start; }
.ts-sim__summary { font-size: .88rem; color: var(--ts-muted); margin: 0 0 .8em; line-height: 1.6; }
.ts-sim__progress { margin: 0 0 .8em; }
.ts-sim__progress > span { display: block; height: 10px; background: #fff; border: 1px solid var(--ts-line); border-radius: 999px; overflow: hidden; }
.ts-sim__progress b { display: block; height: 100%; width: 0; background: var(--ts-ok-line); transition: width .25s; }
.ts-sim__progress em { display: block; margin-top: 4px; font-style: normal; font-size: .82rem; font-weight: 700; text-align: right; }
.ts-sim__tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1em; }
.ts-sim__group { margin: 0 0 14px; background: #fff; border: 1px solid var(--ts-line); border-radius: var(--ts-radius); overflow: hidden; }
.ts-sim__group h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; font-size: 1rem; background: var(--ts-ink); color: #fff; }
.ts-sim__group h3 em { font-style: normal; font-size: .78rem; font-weight: 700; opacity: .85; white-space: nowrap; }
.ts-sim__list { list-style: none; margin: 0; padding: 0; }
.ts-sim__item { padding: 11px 14px; border-top: 1px solid var(--ts-line); }
.ts-sim__item:first-child { border-top: 0; }
.ts-sim__item.is-warn { background: var(--ts-warn-bg); }
.ts-sim__check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ts-sim__check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ts-ok-line); }
.ts-sim__title { font-weight: 700; line-height: 1.55; }
.ts-sim__title i { font-style: normal; }
.ts-sim__item.is-done .ts-sim__title { color: var(--ts-muted); text-decoration: line-through; font-weight: 500; }
.ts-sim__due { display: block; margin: 3px 0 0 30px; font-size: .8rem; font-weight: 700; color: var(--ts-muted); }
.ts-sim__due.is-soon { color: #b45309; }
.ts-sim__due.is-over { color: var(--ts-danger); }
.ts-sim__item.is-done .ts-sim__due { opacity: .6; }
.ts-sim__more { margin: 4px 0 0 30px; font-size: .88rem; }
.ts-sim__more summary { cursor: pointer; color: var(--ts-primary-dark); font-weight: 700; font-size: .82rem; list-style: none; }
.ts-sim__more summary::-webkit-details-marker { display: none; }
.ts-sim__more summary::after { content: " ▾"; }
.ts-sim__more[open] summary::after { content: " ▴"; }
.ts-sim__more > div { margin-top: 4px; line-height: 1.7; color: var(--ts-ink); }
.ts-sim__more p { margin: .3em 0; }
.ts-sim__note { margin: .6em 0 0; font-size: .78rem; color: var(--ts-muted); line-height: 1.6; }

/* 簡易チェックリスト（手順） */
.ts-chk__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 1em; padding: 10px 12px; background: var(--ts-ok-bg); border: 1px solid #c3e6d1; border-radius: var(--ts-radius-sm); }
.ts-chk__prog { font-weight: 800; font-size: .9rem; }
.ts-chk__track { flex: 1 1 120px; height: 8px; background: #fff; border-radius: 999px; overflow: hidden; border: 1px solid #c3e6d1; }
.ts-chk__track b { display: block; height: 100%; width: 0; background: var(--ts-ok-line); transition: width .25s; }
.ts-chk__bar small { flex-basis: 100%; color: var(--ts-muted); font-size: .76rem; }
.ts-chk__box { display: inline-flex; align-items: center; gap: 6px; margin-top: .5em; font-size: .85rem; font-weight: 700; cursor: pointer; color: var(--ts-ok-line); }
.ts-chk__box input { width: 18px; height: 18px; accent-color: var(--ts-ok-line); }
.ts-step.is-done .ts-step__title { color: var(--ts-muted); text-decoration: line-through; }
.ts-step.is-done .ts-step__num { background: var(--ts-ok-line); }

@media (max-width: 599px) {
	.ts-sim { margin-left: -4px; margin-right: -4px; padding: 14px 12px 12px; }
	.ts-sim__opts { gap: 6px; }
	.ts-sim__opt span { padding: 8px 12px; font-size: .88rem; }
	.ts-sim__item { padding: 10px 10px; }
}

/* リンクのバナー（記事の上部） */
.ts-sim-cta { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; padding: 14px 16px; background: linear-gradient(135deg, #e8613c, #f0803f); color: #fff; border-radius: var(--ts-radius); text-decoration: none; box-shadow: 0 4px 14px rgba(232,97,60,.28); transition: transform .15s, box-shadow .15s; }
.ts-sim-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(232,97,60,.34); color: #fff; }
.ts-sim-cta__icon { flex: none; font-size: 1.7rem; line-height: 1; }
.ts-sim-cta__text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.ts-sim-cta__text b { font-size: 1.05rem; font-weight: 900; }
.ts-sim-cta__text small { font-size: .8rem; opacity: .95; line-height: 1.5; }
.ts-sim-cta__go { flex: none; font-size: 1.4rem; font-weight: 900; }

/* 結果：あなた専用の取説 */
.ts-sim__rtitle { margin: 0 0 .6em; font-size: 1.1rem; }
.ts-sim__pdfhint { margin: -.4em 0 .8em; font-size: .76rem; color: var(--ts-muted); }
.ts-sim__na { display: flex; align-items: center; gap: 8px; margin: 0 0 1em; font-size: .88rem; font-weight: 700; cursor: pointer; }
.ts-sim__na input { width: 18px; height: 18px; accent-color: var(--ts-primary); }
.ts-sim__where { display: block; margin: 3px 0 0 30px; font-size: .78rem; color: var(--ts-muted); }
.ts-sim__item.is-na { background: var(--ts-bg-soft); }
.ts-sim__item.is-na .ts-sim__title { color: #a8aeb5; font-weight: 500; }
.ts-sim__item.is-na .ts-sim__title::after { content: "（あなたには不要）"; margin-left: .4em; font-size: .72rem; font-weight: 500; }
.ts-sim__item.is-na .ts-sim__check { cursor: default; }
.ts-sim__item.is-na .ts-sim__check input { opacity: .35; }
.ts-sim__item.is-na .ts-sim__where, .ts-sim__item.is-na .ts-sim__more summary { opacity: .5; }
.ts-sim__group.is-allna h3 { background: #9aa0a6; }

/* PDF（画面では非表示。「PDFで保存」で印刷画面に出る） */
#ts-print-root { display: none; }

@media (max-width: 599px) {
	.ts-sim-cta { padding: 12px; gap: 10px; }
	.ts-sim-cta__icon { font-size: 1.4rem; }
}

@media print {
	.ts-sim { background: #fff; border: 0; padding: 0; }
	.ts-sim__form, .ts-sim__tools, .ts-sim__pdfhint, .ts-sim__na, .ts-chk__bar button, .ts-sim-cta { display: none !important; }
	.ts-sim__item[hidden], .ts-sim__group[hidden] { display: none !important; }
	.ts-sim__group { break-inside: avoid; border-color: #999; }
	.ts-sim__group h3 { background: #eee !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

	/* 「PDFで保存」：A4 の表 */
	@page { size: A4; margin: 12mm 10mm 14mm; @bottom-center { content: counter(page) " / " counter(pages); font-size: 9pt; color: #666; } }
	html.ts-printing body > *:not(#ts-print-root) { display: none !important; }
	html.ts-printing body { background: #fff !important; }
	html.ts-printing #ts-print-root { display: block; font-family: "Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic","Meiryo",sans-serif; color: #1f2933; font-size: 9.5pt; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.ts-pdf__head { margin: 0 0 8px; padding: 10px 12px; border: 2px solid #1f2933; border-radius: 4px; }
	.ts-pdf__badge { display: inline-block; padding: 1px 10px; background: #1f2933; color: #fff; border-radius: 999px; font-size: 8.5pt; font-weight: 700; }
	.ts-pdf__head h1 { margin: 5px 0 3px; font-size: 15pt; line-height: 1.35; }
	.ts-pdf__head p { margin: 2px 0; font-size: 8.5pt; color: #444; }
	.ts-pdf__meta { color: #777 !important; font-size: 7.5pt !important; }
	.ts-pdf__table { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1.5px solid #c94a28; }
	.ts-pdf__table thead { display: table-header-group; }
	.ts-pdf__table th { background: #e8613c; color: #fff; font-size: 8.5pt; padding: 4px 3px; border: 1px solid #fff; text-align: center; }
	.ts-pdf__table th small { display: block; font-weight: 500; font-size: 6.5pt; opacity: .95; }
	.ts-pdf__table th:nth-child(1) { width: 24%; } .ts-pdf__table th:nth-child(2), .ts-pdf__table th:nth-child(3) { width: 6%; } .ts-pdf__table th:nth-child(5) { width: 20%; }
	.ts-pdf__table tr { break-inside: avoid; }
	.ts-pdf__table td { border: 1px solid #c9c9c9; padding: 4px 5px; vertical-align: middle; font-size: 9pt; word-break: break-word; }
	.ts-pdf__table tr.ts-pdf__grp th { background: #fde3d8; color: #8a2f12; text-align: left; font-size: 9.5pt; padding: 3px 6px; border: 1px solid #f3b9a4; }
	.ts-pdf__due { font-size: 8pt; color: #b45309; font-weight: 700; }
	.ts-pdf__c { text-align: center; font-size: 10pt; }
	.ts-pdf__box { display: inline-block; width: 4.2mm; height: 4.2mm; border: 1.2px solid #444; border-radius: 1px; line-height: 4mm; font-size: 9pt; font-weight: 900; color: #2f9e66; }
	.ts-pdf__what b { font-weight: 700; }
	.ts-pdf__what em { display: block; font-style: normal; font-size: 7.5pt; color: #999; }
	.ts-pdf__what small { display: block; margin-top: 2px; font-size: 7.8pt; color: #555; line-height: 1.5; }
	.ts-pdf__where { font-size: 8pt; color: #333; }
	.ts-pdf__table tr.is-warn td.ts-pdf__what b { color: #b45309; }
	.ts-pdf__table tr.is-na td { color: #aaa; background: #f4f4f4; }
	.ts-pdf__table tr.is-na td b, .ts-pdf__table tr.is-na td .ts-pdf__due { color: #aaa; font-weight: 500; }
	.ts-pdf__foot { margin-top: 8px; font-size: 7.5pt; color: #666; }
	.ts-pdf__foot p { margin: 2px 0; }
}
