/*
Theme Name: Cocoon Child (ヘンテコ怪獣企画室)
Description: ヘンテコ怪獣企画室の見た目。見本（monster-zukan-hp/見本）から wordpress/build.py で作る。ここを直接直さず、theme-src を直して作り直すこと
Template: cocoon-master
Version: 2.0.2
*/

/* ===== 図鑑・共通 ===== */
/* 図鑑ページの見本。見た目はトップページの見本と同じ決まりで作る */
:root {
  --ink: #1c1410;
  --paper: #e4ded1;
  --parchment: #fde9b4;
  --card: #f9e3a6;
  --brown: #5a3c24;
  --brown-dark: #3b2615;
  --red: #e60f1e;
  --yellow: #ffe100;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  font-weight: 500;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.site-header { background: #6e4f33; border-bottom: 4px solid var(--ink); }
.site-header a { display: block; max-width: 1280px; margin: 0 auto; }
.site-header img {
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
/* 下層ページでは帯を低くして、中身をすぐ見せる */
.site-header.slim { height: 170px; overflow: hidden; }
.site-header.slim img { height: 170px; width: auto; max-width: none; margin: 0 auto; }

.menu { max-width: 1120px; margin: 18px auto 0; padding: 0 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.menu a { border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.menu a:hover, .menu a[aria-current] { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.menu a[aria-current] { outline: 4px solid var(--yellow); outline-offset: -4px; }
.menu img { width: 100%; aspect-ratio: 258 / 98; object-fit: cover; }

main { max-width: 1120px; margin: 0 auto; padding: 0 16px 60px; }
.crumbs { margin: 18px 0 0; font-size: 14px; font-weight: 800; color: var(--brown); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 26px 0 14px; }
.heading h1, .heading h2 {
  margin: 0;
  font-size: clamp(26px, 4.4vw, 38px);
  font-weight: 900;
  color: var(--yellow);
  -webkit-text-stroke: 7px var(--ink);
  paint-order: stroke fill;
  letter-spacing: .04em;
  line-height: 1.25;
}
.heading h2 { font-size: clamp(22px, 3.4vw, 30px); }
.tag { background: var(--red); color: #fff; font-weight: 800; font-size: 14px; padding: 2px 10px; border: 3px solid var(--ink); border-radius: 99px; transform: rotate(-4deg); }

/* 探す欄 */
.finder { background: var(--parchment); border: 4px solid var(--ink); border-radius: 12px; padding: 14px 16px; box-shadow: 6px 6px 0 var(--ink); display: grid; gap: 12px; }
.search { display: flex; gap: 10px; align-items: center; }
.search label { font-weight: 900; white-space: nowrap; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 18px; font-weight: 800; padding: 8px 14px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; }
.search input:focus { outline: 4px solid var(--yellow); }
.rows { display: flex; flex-wrap: wrap; gap: 8px; }
.rows button { font: inherit; font-weight: 900; font-size: 17px; min-width: 46px; height: 46px; padding: 0 12px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; cursor: pointer; }
.rows button:hover { background: #fff6b8; }
.rows button[aria-pressed="true"] { background: var(--red); color: #fff; }
.rows button:disabled { opacity: .35; cursor: default; }
.count { margin: 18px 0 10px; font-weight: 800; }
.count b { font-size: 22px; color: var(--red); }

/* 図鑑カード（旧サイトの「HENTEKO」カードを、名前を文字で入れられる形にしたもの） */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--card); border: 3px solid #c79a4a; border-radius: 6px; padding: 6px 8px 8px;
  box-shadow: 0 0 0 3px var(--ink), 5px 6px 0 3px var(--ink);
  transition: transform .15s;
}
.cards .card:nth-child(odd) { transform: rotate(-1.2deg); }
.cards .card:nth-child(even) { transform: rotate(1.2deg); }
.cards .card:hover { transform: rotate(0) scale(1.05); }
.card .henteko { width: 92%; margin: 0 auto 4px; }
.card .pic { background: #fff; border: 2px solid #b0884a; aspect-ratio: 180 / 143; display: grid; place-items: center; overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: contain; }
.card .no { margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--brown); }
.card .name { font-weight: 900; font-size: 17px; color: var(--brown-dark); line-height: 1.3; overflow-wrap: anywhere; }
.empty { padding: 30px; text-align: center; font-weight: 800; background: #fff; border: 3px dashed var(--brown); border-radius: 12px; }
.button { display: inline-block; font: inherit; cursor: pointer; background: var(--red); color: #fff; text-decoration: none; font-weight: 900; font-size: 18px; border: 3px solid var(--ink); border-radius: 99px; padding: 8px 26px; box-shadow: 4px 4px 0 var(--ink); }
.button.light { background: var(--yellow); color: var(--ink); }
.button:hover { filter: brightness(1.08); }
.more-wrap { text-align: center; margin-top: 26px; }

/* 1匹の紹介 */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.profile .card { transform: rotate(-1.5deg); padding: 10px 14px 14px; width: 100%; max-width: 380px; justify-self: center; }
.profile .card .name { font-size: 26px; text-align: center; }
.profile .no-big { font-weight: 900; font-size: 18px; color: var(--brown); }
.profile .yomi { font-weight: 800; color: var(--brown); margin: -6px 0 14px; }
.panel { background: var(--parchment); border: 4px solid var(--ink); border-radius: 10px; padding: 16px 20px; box-shadow: 6px 6px 0 var(--ink); }
.panel p { margin: 0 0 8px; }
.facts { width: 100%; border-collapse: collapse; margin-top: 16px; background: #fff; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; }
.facts th, .facts td { padding: 10px 14px; border-bottom: 2px dashed #d8c08a; text-align: left; vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 8em; background: var(--yellow); font-weight: 900; border-right: 3px solid var(--ink); }
.pending { color: #8a7660; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; flex-wrap: wrap; }

footer { background: var(--brown-dark); color: #f6e7c8; border-top: 4px solid var(--ink); padding: 26px 16px 34px; text-align: center; font-size: 14px; margin-top: 40px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-bottom: 12px; font-weight: 800; }
footer a { text-decoration: none; }
.x-sample-mark { position: fixed; right: 12px; bottom: 12px; z-index: 5; background: var(--ink); color: #fff; font-size: 13px; padding: 4px 12px; border-radius: 99px; }

@media (max-width: 820px) {
  .menu { grid-template-columns: repeat(2, 1fr); }
  .site-header.slim, .site-header.slim img { height: 110px; }
  .search { flex-direction: column; align-items: stretch; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .profile { grid-template-columns: 1fr; }
  .rows button { min-width: 42px; height: 42px; font-size: 16px; }
}

/* ===== トップ ===== */
.home .heading { margin: 46px 0 14px; }
/* 地図 */
.home .map-frame { position: relative; border: 4px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--sea); box-shadow: 6px 6px 0 var(--ink); }
.home .map-frame .lead {
.home position: absolute; left: 14px; top: 12px;
  background: var(--parchment); border: 3px solid var(--ink); border-radius: 8px;
  padding: 4px 14px; font-weight: 800; font-size: clamp(13px, .home 2vw, .home 18px);
}
.map-frame .go {
.home position: absolute; right: 16px; bottom: 16px;
  background: var(--yellow); color: var(--ink); text-decoration: none;
  border: 3px solid var(--ink); border-radius: 99px; padding: 8px 22px; font-weight: 900; font-size: clamp(14px, .home 2vw, .home 18px);
  box-shadow: 4px 4px 0 var(--ink);
}
.map-frame .go:hover { background: #fff36b; }

/* ゴッドマンのひとこと */
.home .word { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.home .word .face { flex: none; width: 92px; height: 92px; border: 4px solid var(--ink); border-radius: 50%; overflow: hidden; background: #3a3f95; }
.home .word .face img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.home .bubble { position: relative; flex: 1; background: #fff; border: 4px solid var(--ink); border-radius: 22px; padding: 12px 20px; box-shadow: 5px 5px 0 var(--ink); }
.home .bubble::before { content: ""; position: absolute; left: -18px; top: 50%; margin-top: -11px; border: 11px solid transparent; border-right: 16px solid var(--ink); border-left: 0; }
.home .bubble small { display: block; font-weight: 800; color: var(--red); font-size: 14px; }
.home .bubble p { margin: 0; font-size: clamp(17px, 2.4vw, 22px); font-weight: 800; }

/* 図鑑 */
.home .top-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.home .top-cards a { display: block; transition: transform .15s; }
.home .top-cards a:nth-child(odd) { transform: rotate(-1.5deg); }
.home .top-cards a:nth-child(even) { transform: rotate(1.5deg); }
.home .top-cards a:hover { transform: rotate(0) scale(1.05); }
.home .top-cards img { width: 100%; filter: drop-shadow(3px 4px 0 rgba(28, 20, 16, .35)); }
.home .kana { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.home .kana span { font-weight: 800; margin-right: 4px; }
.home .kana a { width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none; font-weight: 900; font-size: 18px; background: #fff; border: 3px solid var(--ink); border-radius: 50%; }
.home .kana a:nth-child(4n+2) { background: var(--yellow); }
.home .kana a:nth-child(4n+3) { background: #9fdcff; }
.home .kana a:nth-child(4n+4) { background: #ffb3b8; }
.home .kana a:nth-child(4n+5) { background: #a7e3a9; }
.home .kana a:hover { transform: translateY(-2px); }
.home .more { display: inline-block; margin-top: 18px; background: var(--red); color: #fff; text-decoration: none; font-weight: 900; font-size: 18px; border: 3px solid var(--ink); border-radius: 99px; padding: 8px 26px; box-shadow: 4px 4px 0 var(--ink); }

/* ヘンテコってなんだ!? と お知らせ */
.home .two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.home .panel { background: var(--parchment); border: 4px solid var(--ink); border-radius: 10px; padding: 18px 22px; box-shadow: 6px 6px 0 var(--ink); }
.home .panel p { margin: 0 0 10px; }
.home .panel .catch { margin: 0; font-size: clamp(20px, 3vw, 26px); text-align: center; padding: 18px 0; font-weight: 900; color: var(--brown-dark); }
.home .news { list-style: none; margin: 0; padding: 0; }
.home .news li { display: flex; gap: 14px; padding: 9px 0; border-bottom: 2px dashed rgba(59, 38, 21, .35); }
.home .news li:last-child { border-bottom: 0; }
.home .news time { flex: none; font-weight: 800; color: var(--brown); }
.home .news a { text-decoration: none; }
.home .news a:hover { text-decoration: underline; }
.home .news-more { margin: 8px 0 0; text-align: right; font-weight: 900; }

.home .yt { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; align-items: center; }
.home .yt-banner { display: block; border: 4px solid var(--ink); border-radius: 10px; overflow: hidden; box-shadow: 6px 6px 0 var(--ink); transition: transform .12s; }
.home .yt-banner:hover { transform: translate(-2px, -2px); }
.home .yt-text p { font-weight: 800; font-size: 18px; }
.home .yt-text .more { margin-top: 4px; }
@media (max-width: 820px) { .home .yt { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .home .top-cards { grid-template-columns: repeat(3, 1fr); }
  .home .two { grid-template-columns: 1fr; }
  .home .map-frame .lead { position: static; border-width: 0 0 3px; border-radius: 0; }
  .home .map-frame .go { position: static; display: block; margin: 10px; text-align: center; }
  .home .word .face { width: 70px; height: 70px; }
}

/* ===== 下層ページ ===== */
/* 図鑑以外の下層ページ用。土台は ../図鑑/style.css と同じ決まり */

/* 旧サイトの題字 */
.title-banner { margin: 22px auto 0; max-width: 760px; border: 4px solid var(--ink); border-radius: 10px; overflow: hidden; box-shadow: 6px 6px 0 var(--ink); background: #fff; }
.title-banner img { width: 100%; }
h1.visually-hidden, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lead-text { max-width: 760px; margin: 22px auto 0; }
.wide { max-width: 980px; margin-left: auto; margin-right: auto; }

/* ヘンテコってなんだ!? */
.catch-big { margin: 30px auto 0; max-width: 760px; text-align: center; padding: 34px 20px; }
.catch-big p { margin: 0; font-size: clamp(22px, 4vw, 34px); font-weight: 900; color: var(--brown-dark); line-height: 1.5; }
.go-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }

/* ヘンテコランド */
.map-box { margin-top: 26px; border: 4px solid var(--ink); border-radius: 10px; overflow: hidden; box-shadow: 6px 6px 0 var(--ink); background: #0a5f8f; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips a { display: inline-block; text-decoration: none; font-weight: 800; font-size: 15px; background: #fff; border: 3px solid var(--ink); border-radius: 99px; padding: 3px 14px; }
.chips li:nth-child(4n+1) a { background: var(--yellow); }
.chips li:nth-child(4n+2) a { background: #9fdcff; }
.chips li:nth-child(4n+3) a { background: #ffb3b8; }
.chips li:nth-child(4n+4) a { background: #a7e3a9; }
.chips a:hover { transform: translateY(-2px); }
.places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; margin-top: 26px; }
.place { background: var(--parchment); border: 4px solid var(--ink); border-radius: 10px; box-shadow: 6px 6px 0 var(--ink); overflow: hidden; scroll-margin-top: 16px; }
.place .pic { border-bottom: 4px solid var(--ink); background: #fff; }
.place .pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.place .body { padding: 14px 18px 16px; }
.place h2 { margin: 0 0 6px; font-size: 22px; font-weight: 900; color: var(--brown-dark); line-height: 1.35; }
.place p { margin: 0 0 6px; }
.place .sub { font-weight: 900; color: var(--red); margin-top: 10px; }

/* 法律 */
.scroll { max-width: 820px; margin: 26px auto 0; background: #fff6d6; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); padding: 22px 26px; position: relative; }
.scroll::before, .scroll::after { content: ""; position: absolute; left: -10px; right: -10px; height: 18px; background: #e8c27a; border: 4px solid var(--ink); border-radius: 99px; }
.scroll::before { top: -12px; }
.scroll::after { bottom: -12px; }
.laws { list-style: none; margin: 8px 0; padding: 0; counter-reset: law; }
.laws li { counter-increment: law; display: flex; gap: 12px; align-items: baseline; padding: 7px 0; border-bottom: 2px dashed #e2c98d; font-weight: 800; }
.laws li:last-child { border-bottom: 0; }
.laws li::before { content: counter(law); flex: none; min-width: 2.2em; text-align: center; font-weight: 900; color: #fff; background: var(--red); border: 2px solid var(--ink); border-radius: 99px; font-size: 14px; line-height: 1.7; }
.laws li.hit { background: #fff36b; border-radius: 6px; }
.pick { max-width: 820px; margin: 30px auto 0; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pick .bubble-s { flex: 1; min-width: 240px; background: #fff; border: 4px solid var(--ink); border-radius: 22px; padding: 12px 20px; box-shadow: 5px 5px 0 var(--ink); font-weight: 900; font-size: clamp(17px, 2.4vw, 21px); }
.closing { max-width: 820px; margin: 40px auto 0; display: flex; align-items: center; gap: 18px; }
.closing img { width: 180px; flex: none; }
.closing .bubble-s { position: relative; background: #fff; border: 4px solid var(--ink); border-radius: 30px; padding: 18px 24px; box-shadow: 5px 5px 0 var(--ink); font-weight: 800; }
.closing .bubble-s b { display: block; margin-top: 6px; color: var(--red); font-size: 20px; text-align: right; }

/* お問い合わせ */
.form { max-width: 760px; margin: 26px auto 0; background: #fff; border: 4px solid var(--ink); border-radius: 12px; box-shadow: 6px 6px 0 var(--ink); padding: 20px 24px; display: grid; gap: 18px; }
.form label { display: block; font-weight: 900; margin-bottom: 4px; }
.form .req { display: inline-block; margin-left: 8px; background: var(--red); color: #fff; font-size: 12px; padding: 0 8px; border-radius: 99px; vertical-align: 2px; }
.form input[type=text], .form input[type=email], .form textarea { width: 100%; font: inherit; font-size: 17px; padding: 9px 12px; border: 3px solid var(--ink); border-radius: 8px; background: #fffdf3; }
.form textarea { min-height: 180px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 4px solid var(--yellow); }
.form .agree { font-weight: 800; display: flex; gap: 8px; align-items: center; }
.form .agree input { width: 22px; height: 22px; }
.form .error { color: var(--red); font-weight: 800; font-size: 14px; margin: 4px 0 0; }
.form .actions { text-align: center; }
.done { max-width: 760px; margin: 26px auto 0; text-align: center; }

/* お知らせ */
.news-list { list-style: none; margin: 26px auto 0; padding: 0; max-width: 820px; display: grid; gap: 14px; }
.news-list a { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; text-decoration: none; background: var(--parchment); border: 4px solid var(--ink); border-radius: 10px; padding: 14px 18px; box-shadow: 5px 5px 0 var(--ink); transition: transform .12s; }
.news-list a:hover { transform: translate(-2px, -2px); }
.news-list time, .article time { font-weight: 900; color: var(--brown); }
.news-list .t { flex: 1 1 300px; font-weight: 900; font-size: 18px; }
.cat { display: inline-block; font-size: 13px; font-weight: 900; padding: 1px 10px; border: 2px solid var(--ink); border-radius: 99px; background: #9fdcff; }
.cat.zukan { background: var(--yellow); }
.article { max-width: 820px; margin: 26px auto 0; background: #fff; border: 4px solid var(--ink); border-radius: 12px; box-shadow: 6px 6px 0 var(--ink); padding: 22px 28px; }
.article h1 { margin: 6px 0 14px; font-size: clamp(22px, 3.6vw, 30px); font-weight: 900; line-height: 1.4; }
.article .meta { display: flex; gap: 12px; align-items: center; }
.article p { margin: 0 0 14px; }

/* プライバシーポリシー */
.policy { max-width: 820px; margin: 26px auto 0; background: #fff; border: 4px solid var(--ink); border-radius: 12px; box-shadow: 6px 6px 0 var(--ink); padding: 22px 28px; }
.policy h2 { font-size: 19px; font-weight: 900; margin: 22px 0 6px; padding-left: 10px; border-left: 8px solid var(--red); }
.policy h2:first-of-type { margin-top: 6px; }
.policy p, .policy ul { margin: 0 0 10px; }
.fill { background: #fff36b; padding: 0 4px; font-weight: 800; border-bottom: 2px solid var(--red); }

@media (max-width: 820px) {
  .places { grid-template-columns: 1fr; }
  .closing { flex-direction: column; }
  .closing img { width: 140px; }
  .scroll { padding: 18px 14px; }
  .form, .article, .policy { padding: 16px; }
}

/* ===== WordPress用の追加 ===== */
.page-body > *:first-child { margin-top: 0; }
/* お問い合わせ（Contact Form 7）を見本の .form と同じ見た目に */
.wpcf7 { max-width: 760px; margin: 26px auto 0; }
.wpcf7 form.wpcf7-form { background: #fff; border: 4px solid var(--ink); border-radius: 12px; box-shadow: 6px 6px 0 var(--ink); padding: 20px 24px; display: grid; gap: 18px; }
.wpcf7 form p { margin: 0; }
.wpcf7 label { display: block; font-weight: 900; margin-bottom: 4px; }
.wpcf7 .req { display: inline-block; margin-left: 8px; background: var(--red); color: #fff; font-size: 12px; padding: 0 8px; border-radius: 99px; vertical-align: 2px; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 textarea { width: 100%; font: inherit; font-size: 17px; padding: 9px 12px; border: 3px solid var(--ink); border-radius: 8px; background: #fffdf3; }
.wpcf7 textarea { min-height: 180px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 4px solid var(--yellow); }
.wpcf7 .agree { font-weight: 800; }
.wpcf7 .agree input { width: 22px; height: 22px; vertical-align: -5px; margin-right: 6px; }
.wpcf7 .wpcf7-list-item { margin: 0; }
.wpcf7 .actions { text-align: center; }
.wpcf7 input[type=submit] { font: inherit; cursor: pointer; background: var(--red); color: #fff; font-weight: 900; font-size: 18px; border: 3px solid var(--ink); border-radius: 99px; padding: 8px 26px; box-shadow: 4px 4px 0 var(--ink); }
.wpcf7 input[type=submit]:disabled { opacity: .5; cursor: default; }
.wpcf7-not-valid-tip { color: var(--red); font-weight: 800; font-size: 14px; }
.wpcf7 form .wpcf7-response-output { margin: 0; border: 3px solid var(--ink); border-radius: 8px; padding: 10px 14px; font-weight: 800; background: var(--parchment); }
.wpcf7-spinner { display: none; }
/* お知らせの本文 */
.article .entry p, .article .entry ul { margin: 0 0 14px; }
.article .entry img { margin: 10px 0; border: 3px solid var(--ink); border-radius: 8px; }
.pager .button:empty { visibility: hidden; }
