/* 毒親度チェック（固定ページ toxic-parents 専用） */

.tp {
  --tp-mono: "SFMono-Regular", Menlo, Consolas, monospace;
  --tp-harm: #b23253;
  --tp-control: #c9863f;
  --tp-care: #4f8a70;
  width: min(100% - 2.5rem, 760px);
  margin-inline: auto;
}

.tp-note {
  margin: 1.6rem 0 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-tint);
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.85;
}

.tp-note strong { color: var(--ink); }
.tp-note p { margin: 0 0 0.6rem; }
.tp-note p:last-child { margin-bottom: 0; }

/* ---------- 進み具合 ---------- */

.tp-progress {
  position: sticky;
  top: 62px;
  z-index: 3;
  margin-top: 1.6rem;
  padding: 0.6rem 0 0.5rem;
  background: linear-gradient(#fff 70%, rgba(255, 255, 255, 0));
}

.tp-progress-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.tp-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}

.tp-progress-text {
  margin: 0.35rem 0 0;
  font-family: var(--tp-mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- パネル ---------- */

.tp-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.9rem);
  margin-top: 1.4rem;
}

.tp-panel h2 {
  font-family: var(--mincho);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.9rem;
}

.tp-panel h3 {
  font-family: var(--mincho);
  font-size: 1.05rem;
  margin: 0 0 0.8rem;
}

.tp-step {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.tp-lead {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.4rem;
  line-height: 1.85;
}

.tp-lead strong { color: var(--ink-soft); }

/* ---------- 設問 ---------- */

.tp-qs { display: grid; gap: 1.5rem; }

.tp-q {
  border-top: 1px solid var(--line-soft);
  padding: 1.3rem 0 0;
}

.tp-qs > .tp-q:first-child { border-top: 0; padding-top: 0; }

.tp-q-label {
  margin: 0;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.75;
}

.tp-q-n {
  display: inline-block;
  min-width: 1.6rem;
  margin-right: 0.35rem;
  font-family: var(--tp-mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.tp-q-note {
  margin: 0.45rem 0 0;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.8;
}

.tp-q.missing .tp-q-label { color: var(--tp-harm); }
.tp-q.missing .tp-opts label { border-color: var(--accent-soft); }

.tp-opts { display: grid; gap: 0.45rem; margin-top: 0.85rem; }

.tp-opts label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font-size: 0.94rem;
  line-height: 1.6;
}

.tp-opts label:hover { border-color: var(--accent-soft); }
.tp-opts label:has(input:checked) { border-color: var(--accent); background: var(--bg-tint); }
.tp-opts input { margin: 0.35rem 0 0; accent-color: var(--accent); flex: none; }
.tp-opts input:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.tp-opt-skip span { color: var(--muted); }

/* ---------- ボタン ---------- */

.tp-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; margin-top: 1.7rem; }

.tp button {
  font: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tp button:hover { background: var(--accent-dark); }
.tp button:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.tp button.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 400;
}

.tp button.ghost:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- 結果 ---------- */

.tp-badge {
  display: inline-block;
  margin: 0 0 0.9rem;
  padding: 0.45rem 1.5rem;
  border-radius: 999px;
  font-family: var(--mincho);
  font-size: clamp(1.5rem, 6vw, 2rem);
  letter-spacing: 0.12em;
  line-height: 1.3;
  color: #fff;
  background: var(--muted);
}

.tp-band-poison3 { background: #8e1f3d; }
.tp-band-poison2 { background: var(--tp-harm); }
.tp-band-poison1 { background: var(--tp-control); }
.tp-band-none { background: #7f8a93; }
.tp-band-good { background: var(--tp-care); }

.tp-band-lead {
  margin: 0 0 0.6rem;
  font-family: var(--mincho);
  font-size: 1.08rem;
  line-height: 1.8;
}

.tp-band-text {
  margin: 0 0 1.6rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.9;
}

.tp-axes {
  display: grid;
  gap: 0.9rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tp-axis-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.tp-axis-num {
  font-family: var(--tp-mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.82rem;
}

.tp-axis-num span { font-size: 1.05rem; color: var(--ink); }

.tp-axis-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.tp-axis-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.tp-axis-bar .harm { background: var(--tp-harm); }
.tp-axis-bar .control { background: var(--tp-control); }
.tp-axis-bar .care { background: var(--tp-care); }

.tp-severe {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 4vw, 2rem);
  align-items: center;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 520px) { .tp-severe { grid-template-columns: 1fr; } }

.tp-severe-n {
  margin: 0;
  font-family: var(--tp-mono);
  line-height: 1;
  color: var(--tp-harm);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tp-severe-n span:first-child { font-size: clamp(2.6rem, 11vw, 3.4rem); }
.tp-severe-n .u { font-size: 0.9rem; margin-left: 0.35rem; color: var(--muted); }

.tp-severe-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.9;
}

/* 4象限 */

.tp-quad { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }

.tp-plot {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-alt);
}

.tp-plot-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--muted);
  border: 0 solid var(--line);
}

.tp-plot-cell.tl { border-right-width: 1px; border-bottom-width: 1px; }
.tp-plot-cell.tr { border-bottom-width: 1px; }
.tp-plot-cell.bl { border-right-width: 1px; }

.tp-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(217, 74, 110, 0.22);
  transition: left 0.4s ease, bottom 0.4s ease;
}

.tp-plot-x,
.tp-plot-y {
  position: absolute;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.tp-plot-x { right: 0.6rem; bottom: 0.4rem; }

/* 縦軸は下から上に向かって強くなる。縦書きにすると文字まで回ってしまうので横書きのまま置く */
.tp-plot-y { left: 0.6rem; bottom: 0.4rem; }

.tp-quad-text {
  margin: 0.9rem 0 0.6rem;
  text-align: center;
  font-family: var(--mincho);
  font-size: 1rem;
}

/* 項目一覧 */

.tp-items-box { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }

.tp-items { list-style: none; margin: 0; padding: 0; }

.tp-items li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 0.92rem;
}

.tp-items li:last-child { border-bottom: 0; }
.tp-item-name { color: var(--ink); }
.tp-item-val { color: var(--muted); flex: none; }

/* いまのあなた */

.tp-now { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }

.tp-now-count { margin: 0 0 0.7rem; font-size: 0.95rem; }
.tp-now-count strong { font-family: var(--tp-mono); font-size: 1.2rem; color: var(--accent); }

.tp-now ul { margin: 0 0 0.9rem; padding-left: 1.2rem; }
.tp-now li { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.8; }

/* 相談先 */

.tp-help {
  margin-top: 1.5rem;
  padding: 1.2rem 1.3rem;
  border-radius: 12px;
  background: var(--bg-tint);
  border: 1px solid var(--accent-soft);
}

.tp-help p { margin: 0 0 0.8rem; font-size: 0.92rem; line-height: 1.85; }
.tp-help ul { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.tp-help li { font-size: 0.92rem; line-height: 1.9; }

/* 読みもの・出典 */

.tp-source p {
  margin: 0 0 0.9rem;
  font-size: 0.93rem;
  line-height: 1.95;
  color: var(--ink-soft);
}

.tp-source p:last-child { margin-bottom: 0; }
.tp-source strong { color: var(--ink); }

.tp-fine {
  font-size: 0.83rem !important;
  color: var(--muted) !important;
  line-height: 1.85 !important;
}
