/* 浮気判定シート｜紙のチェックシート風のスタイル。
   参照物：クリニックの待合室で配られる、罫線の入った1枚ものの問診票。
   記憶点は朱色の丸印（判子）ひとつだけ。他の場所は罫線と余白で静かに保つ。
   フォントは端末の日本語フォント（明朝＝見出し／ゴシック＝本文）だけ。外部フォントを読み込まないので LCP を邪魔しない。 */

:root {
  --paper: #f6f1e6;
  --surface: #fffdf8;
  --white: #ffffff;
  --ink: #241f19;
  --ink-soft: #57503f;
  --line: #ded3bd;
  --line-soft: #efe7d6;
  --seal: #b3352b;
  --seal-dark: #8d2a22;
  --ok: #2c6b5f;
  --hold: #4a5a6b;
  --gray-tone: #7a5a1c;
  --radius: 10px;
  --sh-1: 0 1px 2px rgba(36, 31, 25, 0.07);
  --sh-2: 0 8px 24px rgba(36, 31, 25, 0.09);
  --font-body: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  --font-head: serif;
  --wrap: 980px;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

a { color: var(--seal-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--seal); }
a:focus-visible, button:focus-visible, summary:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- ヘッダー ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-stamp {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--seal); color: var(--white);
  font-family: var(--font-head); font-size: 15px; line-height: 1;
}
.brand-name { font-family: var(--font-head); font-size: 18px; font-weight: 700; letter-spacing: 0.02em; }
.head-nav { display: flex; gap: 16px; }
.head-nav a { color: var(--ink-soft); font-size: 14px; text-decoration: none; }
.head-nav a:hover { color: var(--seal-dark); text-decoration: underline; }

/* ---------- ヒーロー ---------- */
.hero { padding: 32px 0 20px; }
.hero-kicker { margin: 0 0 8px; color: var(--seal-dark); font-size: 14px; letter-spacing: 0.08em; }
.hero-title { margin: 0; font-family: var(--font-head); font-size: 36px; font-weight: 700; line-height: 1.25; letter-spacing: 0.01em; }
.hero-title span { display: block; margin-top: 4px; font-size: 18px; font-weight: 400; color: var(--ink-soft); letter-spacing: 0.02em; }
.hero-lead { margin: 12px 0 0; max-width: 62ch; color: var(--ink-soft); font-size: 16px; }
.hero-note { margin: 8px 0 0; max-width: 62ch; color: var(--ink); font-size: 14px; }

/* ---------- シート本体 ---------- */
.sheet-card {
  margin: 8px 0 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--seal);
  border-radius: var(--radius);
  box-shadow: var(--sh-2);
}

.judge-bar { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.judge-step { font-family: var(--font-head); font-size: 18px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.judge-step b { font-size: 28px; color: var(--ink); }
.judge-step-slash { margin: 0 2px; }
.judge-meter { flex: 1; height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.judge-meter i { display: block; height: 100%; width: 0; background: var(--seal); transition: width 200ms ease-out; }
.judge-cat { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.06em; white-space: nowrap; }

.judge-q { margin: 24px 0 20px; min-height: 3.4em; font-family: var(--font-head); font-size: 22px; font-weight: 700; line-height: 1.55; }

.judge-choices { display: grid; gap: 10px; }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 60px; padding: 12px 16px;
  background: var(--surface); color: var(--ink); text-align: left;
  border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 8px;
  font-family: var(--font-body); cursor: pointer;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out, background-color 150ms ease-out;
}
.choice-label { font-family: var(--font-head); font-size: 22px; font-weight: 700; line-height: 1.3; }
.choice-note { font-size: 13px; color: var(--ink-soft); }
.choice:hover { transform: translateY(-1px); box-shadow: var(--sh-1); background: var(--white); }
.choice-ok { border-left-color: var(--ok); }
.choice-gray { border-left-color: var(--gray-tone); }
.choice-no { border-left-color: var(--seal); }
.choice[aria-pressed="true"] { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }

.judge-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.linkbtn { padding: 6px 2px; background: none; border: 0; color: var(--ink-soft); font-family: var(--font-body); font-size: 14px; cursor: pointer; text-decoration: underline; }
.linkbtn:hover { color: var(--seal-dark); }

/* ---------- 結果 ---------- */
.judge-result { padding-top: 4px; }
.result-kicker { margin: 24px 0 6px; color: var(--seal-dark); font-size: 13px; letter-spacing: 0.1em; }
.result-head { margin: 0; font-family: var(--font-head); font-size: 26px; font-weight: 700; line-height: 1.4; }
.result-lead { margin: 10px 0 20px; color: var(--ink-soft); font-size: 16px; max-width: 62ch; }

.tally { display: grid; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.tally-row { display: flex; align-items: center; gap: 12px; }
.tally-label { width: 4.5em; font-family: var(--font-head); font-size: 15px; }
.tally-bar { flex: 1; height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.tally-fill { display: block; height: 100%; width: 0; }
.tally-num { width: 4em; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 15px; }

.verdict-no { background: var(--seal); color: var(--white); }
.verdict-gray { background: var(--gray-tone); color: var(--white); }
.verdict-ok { background: var(--ok); color: var(--white); }
.verdict-hold { background: var(--hold); color: var(--white); }

.result-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.result-sub { margin: 0 0 6px; font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.result-hint { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; }

.verdicts { margin: 0; padding: 0; list-style: none; }
.verdict-group { margin-bottom: 16px; }
.verdict-cat { margin: 0 0 6px; font-size: 14px; color: var(--ink-soft); letter-spacing: 0.04em; }
.verdict-row { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px dotted var(--line); font-size: 15px; }
.verdict-chip { flex: none; min-width: 3.6em; padding: 1px 6px; border-radius: 4px; font-size: 12px; text-align: center; }
.verdict-text { color: var(--ink); }

.memo-row { margin-bottom: 10px; }
.memo-label { display: block; margin-bottom: 4px; font-family: var(--font-head); font-size: 15px; color: var(--ink-soft); }
.memo-row textarea {
  width: 100%; padding: 10px 12px;
  background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  resize: vertical;
}
.memo-row textarea::placeholder { color: var(--ink-soft); opacity: 0.75; }

.memo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn {
  min-height: 46px; padding: 0 20px;
  border-radius: 8px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 16px; cursor: pointer;
  transition: background-color 150ms ease-out, box-shadow 150ms ease-out;
}
.btn-primary { background: var(--seal); color: var(--white); }
.btn-primary:hover { background: var(--seal-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); box-shadow: var(--sh-1); }
.memo-msg { min-height: 1.5em; margin: 8px 0 0; color: var(--ok); font-size: 14px; }

/* ---------- 事実の行 ---------- */
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin: 0 0 32px; padding: 0; list-style: none;
  color: var(--ink-soft); font-size: 14px;
}
.hero-facts li::before { content: "・"; color: var(--seal); }

/* ---------- 本文 ---------- */
.prose { max-width: 68ch; padding-bottom: 48px; }
.prose h2 {
  margin: 48px 0 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-head); font-size: 26px; font-weight: 700; line-height: 1.4;
}
.prose h3 { margin: 28px 0 8px; font-family: var(--font-head); font-size: 19px; font-weight: 700; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose strong { font-weight: 700; }
.prose .copy-block {
  margin: 16px 0 24px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.7; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
  max-height: 520px; overflow: auto;
}
.prose blockquote {
  margin: 16px 0; padding: 12px 16px;
  background: var(--surface); border-left: 4px solid var(--seal);
  border-radius: 0 8px 8px 0; color: var(--ink-soft);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .note {
  margin: 24px 0; padding: 16px 18px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  font-size: 15px; color: var(--ink-soft);
}
.prose .steps { margin: 16px 0 24px; padding: 0; list-style: none; counter-reset: step; }
.prose .steps li { position: relative; margin-bottom: 14px; padding-left: 44px; }
.prose .steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  font-family: var(--font-head); font-size: 15px; color: var(--seal-dark);
}
.prose .items-block { margin: 16px 0 24px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.prose .items-block h3 { margin-top: 0; }
.prose .items-block ul { margin-bottom: 0; }
.doc h1 { margin: 24px 0 16px; font-family: var(--font-head); font-size: 30px; font-weight: 700; line-height: 1.35; }
.doc h2 { font-size: 22px; }

.crumbs { display: flex; gap: 8px; margin: 20px 0 0; color: var(--ink-soft); font-size: 14px; }
.crumbs a { color: var(--ink-soft); }
.crumbs-sep { color: var(--line); }

/* ---------- FAQ ---------- */
.faq { max-width: 68ch; padding-bottom: 48px; }
.sec-title { margin: 48px 0 16px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--font-head); font-size: 26px; font-weight: 700; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { padding: 16px 28px 16px 0; position: relative; cursor: pointer; font-size: 16px; font-weight: 700; list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: "＋"; position: absolute; right: 4px; top: 15px; color: var(--seal); font-size: 18px; }
.faq-item[open] .faq-q::after { content: "－"; }
.faq-a { padding: 0 0 16px; color: var(--ink-soft); font-size: 16px; }
.faq-a p { margin: 0; }

/* ---------- フッター ---------- */
.site-foot { margin-top: 24px; border-top: 1px solid var(--line); background: var(--paper); }
.foot-in { padding: 32px 20px 40px; }
.foot-brand { margin: 0 0 4px; font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.foot-note { margin: 0 0 16px; max-width: 60ch; color: var(--ink-soft); font-size: 14px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
.foot-nav a { color: var(--ink-soft); font-size: 14px; }
.foot-copy { margin: 0; color: var(--ink-soft); font-size: 13px; }

/* ---------- スマホ ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .head-in { min-height: 56px; }
  .head-nav { gap: 12px; }
  .head-nav a { font-size: 13px; }
  .hero { padding: 24px 0 16px; }
  .hero-title { font-size: 28px; }
  .hero-title span { font-size: 16px; }
  .sheet-card { padding: 18px 16px; }
  .judge-q { font-size: 20px; margin: 20px 0 16px; }
  .choice { min-height: 64px; }
  .choice-label { font-size: 20px; }
  .judge-foot { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
  .prose h2, .sec-title { font-size: 22px; }
  .result-head { font-size: 22px; }
  .doc h1 { font-size: 26px; }
}

/* ---------- 印刷（結果だけを1枚で出す） ---------- */
@media print {
  body { background: var(--white); color: var(--ink); font-size: 12pt; }
  .site-head, .site-foot, .hero, .hero-facts, .prose, .faq, .judge-bar, .judge-choices, .judge-foot, .memo-actions, .memo-msg { display: none !important; }
  .sheet-card { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .verdict-chip { border: 1px solid var(--ink); }
}
