/* tagiii.me のデザイン（クリーム色・丸ゴシック・太い線と影）に合わせている。 */
:root {
  --cream: #fff8ec;
  --cream-deep: #ffecd0;
  --paper: #ffffff;
  --ink: #3b2414;
  --ink-soft: #76583f;
  --line: #2a1a0e;
  --green: #1e9a4b;
  --green-deep: #157a3a;
  --green-soft: #e4f4e9;
  --coral: #f07a6a;
  --tile-border: #f1e1c8;

  --radius: 20px;
  --gutter: 16px;
  --max: 760px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  line-break: strict;
}
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

a { color: var(--green-deep); font-weight: 700; text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
a[target="_blank"]:not(.btn)::after { content: "↗"; font-size: 0.8em; margin-left: 0.1em; display: inline-block; }
a.tel { white-space: nowrap; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; padding: 8px 16px; background: var(--paper); border: 2.5px solid var(--line); border-radius: 999px; }

/* ヘッダー */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px;
  max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter);
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--ink); font-size: 17px; font-weight: 900; white-space: nowrap; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: -8px; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 11px; border-radius: 999px; color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.site-header nav a:hover { background: var(--cream-deep); }
.site-header nav a[aria-current="page"] { background: var(--ink); color: var(--cream); }

main { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter) 64px; }

/* 見出し・本文 */
h1, h2, h3, p { margin: 0; }
.section-en { color: transparent; -webkit-text-stroke: 2px var(--line); font-size: clamp(36px, 10vw, 52px); font-weight: 900; line-height: 1.1; letter-spacing: 0.06em; }
h1 { margin: 6px 0 14px; font-size: clamp(24px, 6.4vw, 32px); font-weight: 900; line-height: 1.45; }
h2 { margin: 56px 0 16px; padding-bottom: 12px; border-bottom: 2px dashed var(--tile-border); font-size: clamp(20px, 5.2vw, 24px); font-weight: 900; line-height: 1.5; }
h3 { font-size: 18px; font-weight: 900; line-height: 1.5; }
p { margin-bottom: 14px; }
ul, ol { margin: 0 0 14px; padding-left: 1.3em; }
li { margin-bottom: 6px; }
li::marker { color: var(--green); }
hr { display: none; }
strong { font-weight: 900; }
.updated { color: var(--ink-soft); font-size: 13px; font-weight: 700; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 26px;
  border: 2.5px solid var(--line); border-radius: 999px; box-shadow: 0 4px 0 var(--line);
  background: var(--paper); color: var(--ink); font-size: 16px; font-weight: 900; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
.btn-official { width: 100%; margin-top: 16px; background: var(--green); color: #fff; }
.btn-official:hover { background: var(--green-deep); }
.btn-official::after { content: "↗"; margin-left: 6px; }

/* さがす */
.search { margin: 20px 0 0; padding: 16px 18px 14px; border: 2.5px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 5px 0 var(--line); }
.search label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 900; }
.search-row { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; min-height: 48px; padding: 8px 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--ink); font: inherit; font-size: 16px; }
.search input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.search button { flex: none; min-height: 48px; padding: 4px 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.search-status { margin: 10px 0 0; min-height: 1.6em; color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.search-status:empty { display: none; }

/* 目次（ピル） */
.toc { margin: 20px 0 0; }
.toc p { margin-bottom: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.toc ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.toc a:hover { background: var(--cream-deep); }
.searching .toc { display: none; }

/* 支援先カード */
.cards { display: grid; gap: 20px; margin: 0 0 20px; }
.card { min-width: 0; padding: 20px 18px; border: 2.5px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 5px 0 var(--line); }
.card h3 { margin-bottom: 12px; font-size: 19px; }
.card dl { display: grid; gap: 12px; margin: 0; }
.card .field { display: grid; gap: 2px; }
.card dt { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.card dd { margin: 0; font-size: 15.5px; line-height: 1.8; }
.card-status { display: grid; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 2px dashed var(--tile-border); }

.st { display: block; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.st b { display: inline-block; margin-right: 6px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 900; letter-spacing: 0.04em; white-space: nowrap; }
.st.ok b { background: var(--green-soft); color: var(--green-deep); }
.st.warn b { background: var(--cream-deep); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
li .st, p .st { display: inline; }
li .st b, p .st b { margin-right: 2px; }

li.warn-item { margin: 0 0 16px -1.3em; padding: 16px 18px; border: 2px dashed var(--ink-soft); border-radius: var(--radius); background: var(--paper); list-style: none; font-size: 15.5px; }
li.warn-item > .st { display: block; margin-bottom: 4px; }

/* 表（列の少ないもの） */
.table-wrap { margin: 0 0 20px; overflow-x: auto; border: 2.5px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 5px 0 var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 16px; border-bottom: 2px dashed var(--tile-border); text-align: left; vertical-align: top; }
th { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 900; white-space: nowrap; }

/* ホーム */
.hero { display: grid; gap: 4px; margin-bottom: 8px; padding: 28px 20px 30px; border: 2.5px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 6px 0 var(--line); }
.eyebrow { margin: 0; color: var(--ink-soft); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; }
.hero h1 { margin: 4px 0 14px; font-size: clamp(27px, 7.6vw, 40px); line-height: 1.4; }
.hero h1 span, .nw { display: inline-block; }
.lead { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 2px dashed var(--tile-border); font-size: 16px; font-weight: 700; }
.hero .btn { justify-self: start; }
.hero .lead { margin-bottom: 16px; }

/* ホームの検索 */
.site-search label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 900; }
.site-search input { flex: 1; min-width: 0; min-height: 52px; padding: 8px 18px; border: 2.5px solid var(--line); border-radius: 999px; background: var(--cream); color: var(--ink); font: inherit; font-size: 16px; }
.site-search input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.site-search .search-row button, .quick button { min-height: 44px; padding: 4px 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick button { min-height: 40px; }
.quick button:hover { background: var(--cream-deep); }
.results { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.results:empty { display: none; }
.results li { margin: 0; }
.results a { display: grid; gap: 0; padding: 12px 16px; border: 2px solid var(--line); border-radius: 16px; background: var(--cream); color: var(--ink); text-decoration: none; }
.results a:hover { background: var(--cream-deep); }
.results strong { font-size: 16px; line-height: 1.5; }
.results span { color: var(--ink-soft); font-size: 13px; font-weight: 700; }

/* いますぐ話したいとき */
.now { margin-top: 28px; padding: 20px 18px; border: 2.5px dashed var(--ink-soft); border-radius: var(--radius); background: var(--cream-deep); }
.now h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 19px; }
.now ul { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.now li { margin: 0; }
.now li a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 12px; min-height: 60px; padding: 10px 16px; border: 2.5px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 4px 0 var(--line); color: var(--ink); text-decoration: none; }
.now li a::after { content: "→"; grid-column: 2; grid-row: 1 / span 2; font-size: 18px; font-weight: 900; }
.now li a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.now li strong { grid-column: 1; font-size: 16px; line-height: 1.5; }
.now li span { grid-column: 1; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.now p { margin: 0; font-size: 14px; font-weight: 700; }

/* ページの注意書き（折りたたみ） */
.notes { margin: 4px 0 0; border: 2px solid var(--tile-border); border-radius: 16px; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.notes summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 8px 16px; font-size: 14px; font-weight: 900; cursor: pointer; list-style: none; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: "＋"; font-size: 18px; }
.notes[open] summary::after { content: "－"; }
.notes ul { margin: 0; padding: 0 16px 14px 2.3em; font-size: 15px; }

/* 検索やリンクで直接来たカードを目立たせる */
.card { scroll-margin-top: 110px; }
.card:target { outline: 4px solid var(--coral); outline-offset: 3px; }
.section-title { display: flex; flex-direction: column; align-items: flex-start; margin: 48px 0 20px; }
.section-ja { margin-top: 4px; color: var(--ink-soft); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; }
h2.section-title { padding: 0; border: 0; }

.entry { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.entry li { margin: 0; }
.entry a {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; height: 100%; min-height: 72px; padding: 14px 18px;
  border: 2.5px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 4px 0 var(--line);
  color: var(--ink); font-weight: 500; text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.entry a:hover { background: var(--cream-deep); }
.entry a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.entry-kicker { grid-column: 1; color: var(--green-deep); font-size: 13px; font-weight: 900; }
.entry strong { grid-column: 1; font-size: 18px; line-height: 1.5; }
.entry-desc { grid-column: 1; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.entry a::after { content: "→"; grid-column: 2; grid-row: 1 / span 3; font-size: 20px; font-weight: 900; }

/* 上へもどる */
.to-top {
  position: fixed; right: 14px; bottom: 16px; z-index: 9; display: inline-flex; align-items: center; min-height: 44px; padding: 4px 16px;
  border: 2.5px solid var(--line); border-radius: 999px; background: var(--paper); box-shadow: 0 4px 0 var(--line);
  color: var(--ink); font-size: 14px; font-weight: 900; text-decoration: none;
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity 0.15s ease, transform 0.15s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* フッター */
.site-footer { padding: 24px var(--gutter) 88px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-bottom: 16px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 700; }
.footer-nav a[aria-current="page"] { text-decoration: none; }
.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 8px; }
.site-footer a { color: inherit; }

@media (max-width: 560px) {
  html { scroll-padding-top: 100px; }
  .site-header nav { flex-wrap: nowrap; width: 100%; }
  .site-header nav a { padding: 4px 9px; font-size: 13px; }
}
@media (max-width: 374px) {
  .site-header nav a { padding: 4px 6px; font-size: 12px; }
  .brand { font-size: 16px; }
}
@media (min-width: 720px) {
  body { font-size: 17px; }
  main { padding-top: 32px; }
  .hero { padding: 44px 48px 48px; }
  .entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 26px 28px; }
  .card .field { grid-template-columns: 5.5em 1fr; gap: 16px; align-items: baseline; }
  .card dt { font-size: 13px; }
  .btn-official { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .entry a, .to-top { transition: none; }
  .btn:active, .entry a:active { transform: none; }
}
@media print {
  .site-header, .toc, .search, .to-top, .site-footer { display: none; }
  body { background: #fff; }
  .card, .table-wrap, .hero { box-shadow: none; break-inside: avoid; }
}

/* さがしているあいだは、見出しや説明をかくして結果だけを見せる。 */
.searching .content > h2,
.searching .content > h2 ~ p,
.searching .content > h2 ~ .table-wrap,
.searching .content > h2 ~ ul:not(:has(.warn-item)) { display: none; }
.searching .search { margin-bottom: 24px; }
