/* 書道お手本（/shodo-otehon/）だけの見た目。inc/tehon.php が このページたちのときだけ読みこむ。2026-10-13 */

/* お手本と白抜き */
.th-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; margin: 0 auto; }
.th-fig { margin: 0; background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow); padding: 10px 10px 6px; }
.th-fig img { display: block; width: 100%; height: auto; border-radius: 6px; }
.th-fig figcaption { text-align: center; font-family: var(--maru); font-weight: 700; font-size: 15px; color: var(--shodo-d); padding: 8px 0 4px; }
.th-noimg { display: flex; align-items: center; justify-content: center; aspect-ratio: 300 / 414; background: var(--cream2); border-radius: 6px; font-family: var(--maru); font-size: 34px; color: var(--ink3); }
.th-noimg.big { font-size: 16px; }

/* ダウンロードのボタン */
.th-dls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 760px; margin: 22px auto 0; }
.th-btn { display: flex; align-items: center; gap: 10px; background: var(--shodo-d); color: #fff; border-radius: 16px; padding: 14px 16px; text-decoration: none; box-shadow: var(--shadow-s); transition: transform .15s; }
.th-btn:hover { transform: translateY(-2px); color: #fff; }
.th-btn svg { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.th-btn b { display: block; font-family: var(--maru); font-size: 16px; line-height: 1.3; }
.th-btn small { display: block; font-size: 12.5px; opacity: .9; }
.th-btn.wait { background: var(--cream2); color: var(--ink3); box-shadow: none; flex-direction: column; align-items: flex-start; gap: 0; }
.th-free { text-align: center; font-size: 14px; color: var(--ink2); margin: 14px 0 0; }

/* ことばと漢字 */
.th-about { background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow-s); padding: 18px 20px; margin-bottom: 16px; }
.th-about p { margin: 0 0 8px; }
.th-about p:last-child { margin: 0; }
.th-about b { color: var(--shodo-d); font-family: var(--maru); }
.th-kanji th.kj { font-family: "Klee One", "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 30px; font-weight: 600; line-height: 1.2; text-align: center; }
.th-note { font-size: 13px; color: var(--ink3); margin: 10px 0 0; }

/* 書き順 */
.th-kjbox { background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow-s); padding: 14px 16px; margin-bottom: 14px; }
.th-kjh { margin: 0 0 8px; display: flex; align-items: baseline; gap: 10px; }
.th-kjh b { font-family: "Klee One", "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 34px; line-height: 1; }
.th-kjh span { font-size: 14px; color: var(--ink2); }
.th-kj { display: flex; flex-wrap: wrap; gap: 6px; }
.th-kj figure { margin: 0; width: 64px; text-align: center; }
.th-kj figure svg { display: block; width: 64px; height: 64px; background: #fff; border: 1.5px solid #E6D9C6; border-radius: 8px; }
.th-kj .g { stroke: #EFE4D4; stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
.th-kj use { fill: none; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.th-kj use.a { stroke: var(--ink); }
.th-kj use.b { stroke: #ECE3D6; }
.th-kj use.c { stroke: #E0452B; }
.th-kj figcaption { font-size: 11.5px; color: var(--ink3); line-height: 1.6; }

/* 一覧のカード */
.th-kz { background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow-s); padding: 14px 16px; margin: 18px 0 6px; scroll-margin-top: 90px; }
.th-kzh { margin: 0 0 8px; font-family: var(--maru); font-weight: 900; font-size: 17px; color: var(--shodo-d); }
.th-kzl { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.th-kzl a { display: inline-block; background: var(--shodo-l); color: var(--shodo-d); border-radius: 10px; padding: 6px 12px; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 700; font-size: 19px; text-decoration: none; }
.th-kzl a:hover { background: var(--shodo); color: #fff; }
.th-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 8px; }
.th-chips a { background: #fff; border: 2px solid var(--shodo); color: var(--shodo-d); border-radius: 999px; padding: 6px 14px; font-family: var(--maru); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.th-chips a:hover { background: var(--shodo-l); }
.th-cath { font-family: var(--maru); font-size: 21px; margin: 30px 0 12px; scroll-margin-top: 90px; }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.th-grid.small { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.th-card { display: flex; flex-direction: column; align-items: center; background: #fff; border-radius: var(--r-s); box-shadow: var(--shadow-s); padding: 8px 8px 10px; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.th-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.th-card img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid #F1E8DA; }
.th-card b { font-family: var(--maru); font-size: 18px; margin-top: 6px; line-height: 1.3; }
.th-card small { font-size: 12.5px; color: var(--ink2); }
.th-card i { font-style: normal; font-size: 11.5px; color: var(--shodo-d); background: var(--shodo-l); border-radius: 999px; padding: 1px 9px; margin-top: 5px; }
.th-all { text-align: center; margin: 22px 0 18px; }
.th-grades td a { display: inline-block; font-family: var(--maru); font-weight: 700; margin: 2px 0; }

/* 検索窓（2026-10-13 Sana「ページの頭くらいに検索窓」）：一覧はその場でしぼりこむ、言葉のページは一覧へ送る */
.th-search { display: flex; gap: 8px; max-width: 620px; margin: 0 auto 18px; }
.th-search input { flex: 1; min-width: 0; height: 50px; border: 2.5px solid var(--shodo); border-radius: 999px; padding: 0 20px; font-size: 16px; font-family: inherit; background: #fff; color: var(--ink); }
.th-search input:focus { outline: none; box-shadow: 0 0 0 4px var(--shodo-l); }
.th-search button { display: inline-flex; align-items: center; gap: 6px; height: 50px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--shodo-d); color: #fff; font-family: var(--maru); font-weight: 700; font-size: 16px; cursor: pointer; }
.th-search button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.th-search:not(.root) { margin-bottom: 22px; }
.th-search:not(.root) input { height: 44px; font-size: 15px; border-width: 2px; }
.th-search:not(.root) button { height: 44px; padding: 0 16px; font-size: 15px; }
.th-hit { text-align: center; font-size: 14px; color: var(--shodo-d); font-weight: 700; margin: -6px 0 12px; min-height: 1em; }
.th-card[hidden], .th-cat[hidden], .th-kz[hidden], .th-none[hidden] { display: none !important; }   /* .th-card の display:flex が hidden に勝たないように */
.th-none { text-align: center; background: #fff; border-radius: var(--r-s); padding: 18px; color: var(--ink2); }
.th-cat { scroll-margin-top: 90px; }
.th-cath small { font-size: 13px; color: var(--ink3); font-weight: 700; margin-left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 680px) {
  .th-pair { gap: 10px; }
  .th-fig { padding: 6px 6px 4px; }
  .th-fig figcaption { font-size: 13px; }
  .th-dls { grid-template-columns: 1fr; gap: 10px; }
  .th-kj figure, .th-kj figure svg { width: 54px; }
  .th-kj figure svg { height: 54px; }
  .th-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .th-grid.small { grid-template-columns: repeat(3, 1fr); }
  .th-card b { font-size: 16px; }
  .th-card i { font-size: 10.5px; padding: 1px 6px; }
  .th-search button span { display: none; }
  .th-search button { padding: 0 16px; }
}
