/* =========================================================
   「被害に遭ったかもしれない」のページ（emergency.html と emergency/*.html）で共通のスタイル
   - 窓口の丸いボタン（.aid-c）と窓口の札（.contact）
   - 状況ごとの記事（body.help-article）
   この CSS は手で書いたものです（生成物ではありません）
   ========================================================= */
:root {
  --ic-tel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
  --ic-web: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.7 3.8 5.7 3.8 9s-1.3 6.3-3.8 9c-2.5-2.7-3.8-5.7-3.8-9S9.5 5.7 12 3z'/%3E%3C/svg%3E");
}

/* ---------- 窓口の丸いボタン：その場で電話・表示できる ---------- */
.aid-c { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.aid-c a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; max-width: 100%; padding: 8px 20px 8px 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.4; -webkit-tap-highlight-color: transparent; transition: background .15s; }
.aid-c a::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--ic-web) center / contain no-repeat; mask: var(--ic-web) center / contain no-repeat; }
.aid-c a[href^="tel:"]::before { -webkit-mask-image: var(--ic-tel); mask-image: var(--ic-tel); }
.aid-c a b { font-family: var(--font-head); font-size: 1.2rem; letter-spacing: .02em; white-space: nowrap; }
.aid-c a span { font-family: var(--font-head); font-weight: 700; font-size: .9rem; }
.aid-c a b + span { font-family: var(--font-body); font-weight: 400; font-size: .84rem; color: var(--ink-2); }
@media (hover: hover) { .aid-c a:hover { background: var(--bg-2); color: var(--ink); } }
.aid-c a:active { background: var(--bg-2); }

/* ---------- 窓口の札 ---------- */
.contacts { display: grid; gap: 0; max-width: 860px; }
.contact { display: grid; grid-template-columns: 1fr; gap: 4px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.contact:last-child { border-bottom: 1px solid var(--line); }
/* 電話番号の欄は、いちばん長い番号（0120-0-78310 など）が収まる幅にする。iPad の Safari は数字が広く描かれるため余裕を持たせる */
@media (min-width: 760px) { .contact { grid-template-columns: 12em 1fr; } .contact .num { font-size: 1.3rem; } }
.contact .num { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; line-height: 1.4; white-space: nowrap; }
.contact .num a { text-decoration: none; }
.contact .num.web { color: var(--ink-3); } /* 「Web」も電話番号と同じ大きさにそろえる */
.contact h3 { margin-bottom: 4px; }
.contact p { color: var(--ink-2); font-size: .93rem; margin: 0; }
.contact p + p { margin-top: 4px; }
.contact .hours { font-size: .86rem; color: var(--ink-3); }
.contact .hours::before { content: "受付　"; content: "受付　" / ""; color: var(--ink-3); }
/* 電話をかけられる端末では、番号と Web の窓口を押せるボタンとして示す */
@media (pointer: coarse) {
  .contact { gap: 10px 32px; }
  .contact .num a { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px 0 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--surface); font-size: 1.35rem; line-height: 1; -webkit-tap-highlight-color: transparent; transition: background .15s; }
  .contact .num a::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--ic-tel) center / contain no-repeat; mask: var(--ic-tel) center / contain no-repeat; }
  .contact .num a:active { background: var(--bg-2); }
  .contact .num.web { min-height: 48px; display: flex; align-items: center; }
  .contact .lnk a { display: block; position: relative; width: fit-content; max-width: 100%; min-height: 48px; margin-top: 6px; padding: 13px 20px 13px 44px; border: 1px solid var(--ink); border-radius: 24px; background: var(--surface); color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: .95rem; line-height: 1.4; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background .15s; }
  .contact .lnk a::before { content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: currentColor; -webkit-mask: var(--ic-web) center / contain no-repeat; mask: var(--ic-web) center / contain no-repeat; }
  @media (max-width: 359px) { .contact .lnk a { padding-right: 16px; padding-left: 40px; } .contact .lnk a::before { left: 14px; } }
  .contact .lnk a:hover { color: var(--ink); }
  .contact .lnk a:active { background: var(--bg-2); }
}
@media (pointer: fine) { .contact .lnk a { display: inline-block; padding: 6px 0; } }

/* ---------- 状況ごとの記事 ---------- */
.help-article .hero.ar-hero { padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
.ar-hero h1 { font-size: clamp(1.5rem, 4.4vw, 2.35rem); line-height: 1.5; max-width: 22em; letter-spacing: .04em; }
.ar-hero .lead { margin-top: 18px; font-size: 1.02rem; max-width: 36em; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-bottom: 14px; font-size: .86rem; line-height: 1.6; color: var(--ink-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }
@media (max-width: 600px) {
  .help-article .hero.ar-hero { padding-top: 12px; }
  .crumbs { margin-bottom: 6px; font-size: .82rem; }
  .ar-hero .lead { margin-top: 12px; font-size: .98rem; line-height: 1.85; }
}
.ar { padding-bottom: var(--section); }
.ar > * { max-width: var(--text); }
.ar > * + * { margin-top: clamp(44px, 7vw, 72px); }
.ar > .ar-urgent + .ar-first { margin-top: 16px; }
.ar h2 { font-size: clamp(1.2rem, 2.6vw, 1.45rem); margin-bottom: 18px; }

/* 時間との勝負のときの帯 */
.ar-urgent { padding: 16px 20px; border-left: 4px solid var(--danger); border-radius: 0 12px 12px 0; background: var(--danger-soft); }
.ar-urgent p { margin: 0; color: var(--ink); line-height: 1.8; }
.ar-urgent .ar-urgent-h { font-family: var(--font-head); font-weight: 700; color: var(--danger); margin-bottom: 2px; letter-spacing: .08em; }

/* まず、いますぐ */
.ar-first { padding: clamp(20px, 4vw, 32px); border: 2px solid var(--accent); border-radius: 16px; background: var(--surface); }
.ar-first h2 { display: flex; align-items: center; gap: 10px; color: var(--accent); margin-bottom: 12px; }
.ar-first h2::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%; background: currentColor; }
.ar-first ol { margin: 0; padding-left: 1.5em; }
.ar-first li { line-height: 1.85; }
.ar-first li + li { margin-top: .7em; }
.ar-first li::marker { font-family: var(--font-head); font-weight: 700; color: var(--accent); }

/* くわしい手順 */
.ar-steps > li { margin-bottom: 32px; padding-left: 48px; }
.ar-steps > li:last-child { margin-bottom: 0; }
.ar-steps > li::before { top: 4px; }
.ar-steps h3 { font-size: 1.08rem; line-height: 1.6; }
.ar-steps p { margin: 0; line-height: 1.95; color: var(--ink-2); font-size: .97rem; }
.prep { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--bg-2); }
.prep .prep-h { font-family: var(--font-head); font-weight: 700; font-size: .86rem; color: var(--ink); letter-spacing: .06em; }
.prep ul { margin: 4px 0 0; padding-left: 1.2em; font-size: .92rem; color: var(--ink-2); line-height: 1.8; }
.prep li + li { margin-top: .2em; }
@media (max-width: 480px) { .ar-steps > li { padding-left: 36px; } }

/* やってはいけないこと */
.ar-dont { list-style: none; padding: 0; margin: 0; }
.ar-dont li { position: relative; padding-left: 30px; line-height: 1.9; }
.ar-dont li + li { margin-top: .9em; }
.ar-dont li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 14px; height: 14px; background: linear-gradient(45deg, transparent 43%, var(--danger) 43%, var(--danger) 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, var(--danger) 43%, var(--danger) 57%, transparent 57%); }

/* あわせて読む・出典 */
.ar-see { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.ar-see li { margin: 0; border-bottom: 1px solid var(--line); }
.ar-see a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 0; text-decoration: none; font-family: var(--font-head); font-weight: 700; line-height: 1.6; }
.ar-see a::after { content: "→"; content: "→" / ""; flex: none; font-family: var(--mono); color: var(--accent); }
.ar-src { padding-left: 1.2em; margin-bottom: 16px; font-size: .9rem; line-height: 1.8; }
.ar-src li + li { margin-top: .5em; }
.ar-src a { overflow-wrap: anywhere; }
.ar-src .url { display: none; }

/* 落ち着いたら：同じ手口の訓練（記事の末尾に控えめに。いま困っている人の手順の前には出さない） */
.ar > .ar-drill { margin-top: clamp(28px, 5vw, 40px); }
.ar-drill { padding: 12px 18px 8px; border: 1px dashed var(--line); border-radius: var(--radius); font-size: .92rem; line-height: 1.6; }
.ar-drill-h { margin: 0; color: var(--ink-2); font-size: .86rem; }
.ar-drill ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 22px; }
.ar-drill li { margin: 0; }
.ar-drill a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--font-head); font-weight: 700; text-decoration: none; }
.ar-drill a::after { content: "→"; content: "→" / ""; font-family: var(--mono); font-weight: 400; color: var(--accent); }
.ar-drill-min { font-family: var(--mono); font-weight: 400; font-size: .75rem; letter-spacing: .02em; color: var(--ink-3); }
@media (hover: hover) { .ar-drill a:hover { color: var(--accent); } }

/* ほかの状況を探す */
.ar-tools { padding-top: 32px; border-top: 1px solid var(--line); }
.ar-search label { display: block; font-family: var(--font-head); font-weight: 700; margin-bottom: 8px; }
.ar-search .input { font-family: var(--font-body); font-size: 1.05rem; letter-spacing: .02em; min-height: 52px; }
.ar-search .btn { flex: none; padding-inline: 22px; }
.ar-tools .btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* 印刷：記事一枚を、白い紙に黒い文字で、できるだけ少ない枚数に収める */
@media print {
  @page { margin: 12mm 14mm; }
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) { --ink: #000; --ink-2: #333; --ink-3: #555; --line: #bdbdbd; --surface: #fff; --bg: #fff; --bg-2: #f2f2f2; --accent: #b3321b; --danger: #b3321b; --danger-soft: #fff; color-scheme: light; }
  .help-article { font-size: 10pt; line-height: 1.7; }
  .help-article .hero.ar-hero { padding: 0 0 8px !important; }
  .crumbs { margin-bottom: 4px; font-size: 8pt; }
  .crumbs a { min-height: 0; }
  .ar-hero h1 { font-size: 16pt; max-width: none; }
  .ar-hero .lead { margin-top: 6px; font-size: 10pt; max-width: none; }
  .ar { max-width: none; padding: 0; }
  .ar > * { max-width: none; }
  .ar > * + * { margin-top: 14px; }
  .ar h2 { font-size: 12pt; margin-bottom: 6px; break-after: avoid; }
  .ar-urgent { padding: 6px 10px; border: 1px solid #b3321b; border-left-width: 4px; }
  .ar-first { padding: 10px 14px; border-width: 1.5px; break-inside: avoid; }
  .ar-first li + li { margin-top: .2em; }
  .ar-steps > li { margin-bottom: 10px; padding-left: 36px; break-inside: avoid; }
  .ar-steps p { font-size: 9.5pt; line-height: 1.7; }
  .prep { margin-top: 4px; padding: 4px 10px; border: 1px solid #ccc; }
  .ar-dont li + li { margin-top: .3em; }
  .ar-src .url { display: block; font-family: var(--mono); font-size: 7.5pt; color: #333; word-break: break-all; }
  .aid-c { gap: 0 16px; margin: 6px 0 0; }
  .aid-c a { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; line-height: 1.6; }
  .aid-c a::before { display: none; }
  .aid-c a b { margin-right: 4px; font-size: 10pt; }
  .aid-c a span, .aid-c a b + span { font-family: var(--font-body); font-weight: 400; font-size: 8.5pt; color: var(--ink-2); }
  .aid-c a:not([href^="tel:"]) { display: none; }
  /* 窓口は、窓口ごとにページをまたがないようにし、Web の窓口はアドレスも載せる */
  .contact, .contact:last-child { grid-template-columns: 7em 1fr; gap: 0 16px; padding: 6px 0; break-inside: avoid; }
  .contact .num, .contact .num.web { font-family: var(--font-head); font-weight: 700; font-size: 11pt; line-height: 1.5; letter-spacing: 0; color: var(--ink); padding: 0; }
  .contact .num a, .contact .lnk a { display: inline; position: static; width: auto; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; font: inherit; color: inherit; }
  .contact .num a::before, .contact .lnk a::before { display: none; }
  .contact h3 { margin: 0; font-size: 10pt; }
  .contact p { font-size: 8.5pt; line-height: 1.6; }
  .contact .lnk a[href^="http"]::after { content: attr(href); display: block; font-family: var(--mono); font-size: 7.5pt; color: var(--ink-2); word-break: break-all; }
}
