﻿/* いきもの年齢図鑑：かわいい系（殿 10/3「全体的に可愛く・NNも背景かわいい」）
   色ははっきりめ（パステルは「ダサい」）、丸い文字、背景にうすい足あと模様 */
:root {
  --bg: #fffaf0;
  --card: #ffffff;
  --ink: #3a2f2a;
  --sub: #85776d;
  --line: #f0e3d0;
  --main: #f08a3c;      /* オレンジ（メイン） */
  --main-d: #d96b1c;
  --main-l: #fff0e2;
  --green: #3fae64;
  --green-l: #e7f7ec;
  --blue: #3f9fd8;
  --pink: #ef6f9a;
  --yellow: #ffd23f;
  --senior: #fff4d6;
  --radius: 20px;
  --shadow: 0 3px 12px rgba(120, 70, 30, .10);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0;
  background: var(--bg) url("bg.svg?v=2") repeat;
  background-size: 300px 300px;
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Meiryo", sans-serif;
  font-weight: 500;
  line-height: 1.75;
}
main { max-width: 820px; margin: 0 auto; padding: 0 16px 48px; }
a { color: var(--main-d); }
img { max-width: 100%; height: auto; display: block; }

/* ヘッダー */
.hd {
  background: var(--card);
  border-bottom: 3px solid var(--main);
  padding: 10px 16px;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 8px rgba(120, 70, 30, .06);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 19px; text-decoration: none; color: var(--ink); }
.logo span {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--main); color: #fff; font-size: 17px;
}
.lang a {
  font-size: 13px; font-weight: 700; text-decoration: none; color: var(--sub);
  border: 2px solid var(--line); border-radius: 999px; padding: 3px 12px; background: #fff;
}
.crumb { font-size: 13px; color: var(--sub); margin: 14px 0 0; }
.crumb a { color: var(--sub); }

/* トップの大きな絵とタイトル */
.hero { text-align: center; padding: 26px 0 6px; }
.hero h1 { font-size: 27px; font-weight: 900; margin: 0 0 8px; line-height: 1.4; }
.hero p { margin: 6px 0; }
.top-visual { position: relative; margin: 16px 0 4px; }
.top-visual img, .top-visual video { width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: var(--shadow); }
.top-visual .title {
  position: absolute; left: 50%; top: 7%; transform: translateX(-50%);
  background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 6px 22px;
  font-size: clamp(18px, 5vw, 32px); font-weight: 900; white-space: nowrap; color: var(--ink);
  box-shadow: 0 3px 0 var(--main);
}
.lead {
  display: inline-block; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 18px; margin-top: 10px;
}
.lead b { color: var(--main-d); }

/* いきものページの上部 */
.hero.sp { text-align: left; }
.hero.sp h1 { font-size: 23px; }
.hdimg { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; border: 4px solid #fff; }
.big {
  font-size: 64px; line-height: 1; width: 120px; height: 120px; margin: 0 auto 10px;
  display: grid; place-items: center; background: var(--card); border-radius: 50%; box-shadow: var(--shadow);
}
.life {
  display: inline-block; font-size: 17px; margin: 4px 0 8px;
  background: var(--green-l); border-radius: 999px; padding: 4px 16px;
}
.life b { color: var(--green); font-size: 22px; margin-left: 4px; }
.life small { color: var(--sub); }
.record {
  background: var(--senior); border-radius: 14px; padding: 8px 14px; font-size: 14px;
  border-left: 5px solid var(--yellow);
}
.facts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.facts li {
  background: var(--card); border: 2px solid var(--line); border-radius: 999px;
  padding: 3px 14px; font-size: 14px;
}
.facts li::before { content: "🐾 "; }

/* 見出し */
h2 { font-size: 21px; font-weight: 900; margin: 36px 0 12px; display: flex; align-items: center; gap: 8px; }
h2::before {
  content: ""; width: 12px; height: 26px; border-radius: 6px; background: var(--main); flex: none;
}
h3 { font-size: 17px; margin: 24px 0 10px; display: flex; align-items: baseline; gap: 8px; }
h3 small { color: var(--sub); font-weight: 500; font-size: 13px; }

/* 計算ツール */
.calc {
  background: var(--card); border: 3px dashed var(--main); border-radius: 24px;
  padding: 18px 16px; margin-top: 22px; box-shadow: var(--shadow);
}
.calc h2 { margin: 0 0 12px; color: var(--main-d); }
.calc h2::before { display: none; }
.calc h2::after { content: " 🧮"; }
.row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.row > span { width: 72px; flex: none; font-weight: 700; }
.row em { font-style: normal; }
.u { display: inline-flex; align-items: center; gap: 4px; }
.u[hidden] { display: none; }
select, input {
  font: inherit; font-size: 18px; padding: 8px 10px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
select { flex: 1; min-width: 0; }
input[type=number] { width: 76px; }
select:focus, input:focus { outline: none; border-color: var(--main); }
.result {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #fff3e6, #fff9e0); border-radius: 18px; padding: 14px 16px;
}
.result .em {
  font-size: 40px; line-height: 1; width: 64px; height: 64px; flex: none;
  display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: var(--shadow);
}
.result p { margin: 0; font-size: 19px; font-weight: 700; }
.result b { font-size: 42px; color: var(--main-d); font-weight: 900; }
.result small { color: var(--sub); }

/* 一覧カード */
.q {
  width: 100%; font-size: 16px; margin-bottom: 12px; border-radius: 999px; padding: 10px 18px;
  border: 2px solid var(--line); background: #fff;
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; background: var(--card); border-radius: 18px;
  padding: 12px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  border: 2px dashed #f6d2b0; transition: transform .15s;   /* 殿「サムネのまわりも計算ツールより薄い点線」 */
}
.card .em { font-size: 34px; line-height: 1.2; }
.card b { font-size: 15px; line-height: 1.4; }
.card small { color: var(--sub); font-size: 12px; }
.card.pic { padding: 0 0 10px; overflow: hidden; }
.card.pic b, .card.pic small { padding: 0 10px; }
.card .th { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 6px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { border-color: var(--main); border-style: dashed; transform: translateY(-2px); }
}
.grp { margin-bottom: 18px; }
/* カテゴリ見出し（殿「トップのカテゴリの文字ちっちゃい」） */
h3.gh {
  font-size: 22px; font-weight: 900; margin: 30px 0 12px; align-items: center; gap: 10px;
  background: var(--card); border-radius: 999px; padding: 6px 18px 6px 6px; box-shadow: var(--shadow);
  width: fit-content;
}
h3.gh .gi {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--main-l); font-size: 26px;
}
h3.gh small { font-size: 14px; color: var(--main-d); font-weight: 700; }
.more {
  display: inline-block; margin: 12px 0 0; font-weight: 700; text-decoration: none;
  background: var(--main); color: #fff; border-radius: 999px; padding: 6px 18px; box-shadow: 0 3px 0 var(--main-d);
}

/* 早見表 */
.note { font-size: 13px; color: var(--sub); }
table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card);
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
  border: 2px solid #f3c69c;   /* 殿「枠線がないからはみ出て見えた」 */
}
th, td { padding: 9px 10px; text-align: center; border-bottom: 1px solid var(--line); }
th { background: var(--main); color: #fff; font-weight: 700; }
tbody tr:nth-child(even) td { background: #fffcf6; }
tr.senior td, tbody tr.senior:nth-child(even) td { background: var(--senior); }
td b { color: var(--main-d); font-size: 17px; }
tr:last-child td { border-bottom: 0; }

/* プロフィール */
.prof { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 18px 16px; margin-top: 30px; }
.prof h2 { margin-top: 18px; }
table.kv { table-layout: fixed; overflow-wrap: anywhere; word-break: break-word; box-shadow: none; border-radius: 14px; border: 2px solid #f3c69c; }
table.kv th, table.kv td { border-bottom: 1px solid #f3d9bf; }
table.kv th { border-right: 1px solid #f3d9bf; }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: 0; }
table.kv th { background: var(--main-l); color: var(--main-d); width: 32%; text-align: left; font-size: 14px; vertical-align: top; }
table.kv td { text-align: left; background: #fff; font-size: 15px; }
table.kv tr:nth-child(even) td { background: #fff; }
.tips { margin-top: 16px; background: var(--green-l); border-radius: 16px; padding: 4px 16px 10px; }
.tips h3 { color: var(--green); margin: 12px 0 6px; }
.tips ul { margin: 0; padding-left: 20px; }

/* 出典・本文 */
.src, .txt { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 18px 14px; margin-top: 30px; }
.src h2, .txt h2 { margin-top: 18px; }
.src ul { padding-left: 20px; font-size: 14px; word-break: break-all; }
.txt { font-size: 15px; }

/* スマホ（殿 10/3「スマホサイトもすすめて」） */
@media (max-width: 560px) {
  /* スマホは余白がせまいので、模様を細かく少し濃く（殿「PCは壁紙かわいかった」） */
  body { background-image: url("bg-sp.svg?v=2"); background-size: 170px 170px; }
  main { padding: 0 14px 40px; }
  .hd { padding: 8px 12px; }
  .logo { font-size: 17px; }
  .logo span { width: 30px; height: 30px; font-size: 15px; }
  .hero { padding-top: 18px; }
  .hero h1 { font-size: 23px; }
  .hero.sp h1 { font-size: 20px; }
  .lead { font-size: 14px; padding: 10px 14px; }
  .life { display: block; border-radius: 16px; font-size: 14px; padding: 8px 14px; }
  .life b { display: block; font-size: 17px; margin: 2px 0 0; line-height: 1.5; }
  .calc { padding: 14px 12px; border-radius: 20px; }
  .calc h2 { font-size: 18px; }
  .row > span { width: 100%; font-size: 14px; color: var(--sub); }
  .row { gap: 6px; }
  select, input { font-size: 16px; padding: 8px; }   /* 16px未満だとiPhoneが勝手に拡大する */
  input[type=number] { width: 70px; }
  .result { gap: 10px; padding: 12px; }
  .result .em { width: 52px; height: 52px; font-size: 32px; }
  .result p { font-size: 16px; }
  .result b { font-size: 36px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 10px; }
  .card b { font-size: 14px; }
  h2 { font-size: 19px; margin-top: 30px; }
  th, td { padding: 8px 6px; font-size: 14px; }
  table.kv th { width: 34%; font-size: 13px; }
  table.kv td { font-size: 14px; }
  .prof, .src, .txt { padding: 2px 12px 12px; }
  .top-visual .title { padding: 4px 14px; }
}

/* フッター */
.ft {
  text-align: center; font-size: 12px; color: var(--sub);
  padding: 26px 16px 34px; background: var(--card); border-top: 3px solid var(--main); margin-top: 20px;
}
.ft p { margin: 6px auto; max-width: 720px; }

/* トップに戻るボタン（右下・少しスクロールしたら出る） */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--main); color: #fff; text-decoration: none;
  font-size: 15px; line-height: 1; box-shadow: 0 4px 12px rgba(120, 70, 30, .25);
  border: 3px solid #fff;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .25s, transform .25s;
}
.to-top span { font-size: 10px; font-weight: 700; margin-top: 2px; letter-spacing: .05em; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--main-d); }
@media (max-width: 640px) { .to-top { right: 12px; bottom: 12px; width: 48px; height: 48px; } }

/* トップのカテゴリ入口（絵なしの小さいボタン） */
.cats { margin: 24px 0 8px; }
.cat-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cat {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  background: var(--card); border: 2px dashed #f6d2b0; border-radius: 999px;
  text-decoration: none; color: var(--ink); transition: background .15s;
}
.cat:hover { background: var(--main-l); }
.cat .gi { font-size: 20px; line-height: 1; }
.cat b { font-size: 15px; white-space: nowrap; }
.cat small { color: var(--main-d); font-size: 12px; font-weight: 700; }
@media (max-width: 640px) {
  .cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cat { min-width: 0; }
  .cat b { flex: 1; white-space: normal; line-height: 1.3; word-break: keep-all; overflow-wrap: anywhere; }
  .cat { padding: 8px 10px; gap: 6px; }
  .cat b { font-size: 13px; }
  .cat .gi { font-size: 17px; }
}

/* フッターのメッセージ（殿 10/4） */
.ft .wish { font-family: "Zen Maru Gothic", sans-serif; font-size: 16px; font-weight: 700; color: var(--main-d); margin-bottom: 14px; letter-spacing: .03em; }
@media (max-width: 640px) { .ft .wish { font-size: 14px; } }

/* コラム（10/4） */
.cols { margin: 26px 0 8px; }
.colgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.colc { display: flex; flex-direction: column; background: var(--card); border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 2px solid transparent; }
.colc:hover { border-color: var(--main); border-style: dashed; }
.colc img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.colc span { padding: 10px 14px 14px; }
.colc b { display: block; font-size: 16px; line-height: 1.5; }
.colc small { display: block; color: var(--sub); font-size: 13px; margin-top: 4px; }
.col .hero h1 small { display: block; font-size: 15px; color: var(--main-d); margin-top: 6px; }
.col .txt { font-size: 16px; line-height: 1.95; }
.col .txt h2 { line-height: 1.5; margin-top: 30px; }
.col .txt ul { padding-left: 22px; }
.col .txt li { margin: 6px 0; }
.col table.ct { margin: 12px 0; }
.col table.ct td, .col table.ct th { text-align: center; }
.col table.ct tr.sn td { background: var(--main-l); }
.col .pt { background: var(--main-l); border-radius: 16px; padding: 4px 18px; font-size: 17px; }
.col .txt ul.kao { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.col .txt ul.kao li { margin: 0; background: var(--main-l); border-radius: 12px; padding: 10px 8px; text-align: center; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-pic img { width: 100%; height: auto; display: block; border-radius: 16px; box-shadow: var(--shadow); }
.col .txt .src { box-shadow: none; padding: 0; margin-top: 30px; border-top: 2px dashed #f3d9bf; border-radius: 0; }
.sites { list-style: none; padding: 0; }
.sites li { padding: 12px 0; border-bottom: 1px dashed #f3d9bf; }
.sites li p { margin: 4px 0 0; font-size: 14px; color: var(--sub); }
.sites li { display: flex; gap: 14px; align-items: flex-start; }
.sites .site-pic { flex: 0 0 200px; }
.sites .site-pic img { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid #f3d9bf; }
.sites .site-name { font-weight: 700; font-size: 17px; }
@media (max-width: 560px) { .sites li { flex-direction: column; } .sites .site-pic { flex: none; width: 100%; } }
/* 検索窓の右に検索ボタン（10/4 殿） */
.qbox { position: relative; margin-bottom: 12px; }
.qbox .q { margin-bottom: 0; padding-right: 96px; }
.qbtn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 999px;
  background: var(--main); color: #fff; font: inherit; font-weight: 700; font-size: 15px; padding: 7px 18px; cursor: pointer;
  box-shadow: 0 2px 0 var(--main-d); }
.qbtn:hover { background: var(--main-d); }

/* お問い合わせフォーム（10/5 殿） */
.cf label { display: block; font-weight: 700; margin: 14px 0 0; }
.cf input[type=text], .cf input[type=email], .cf textarea { display: block; width: 100%; margin-top: 6px; font-weight: 500; }
.cf textarea { font: inherit; font-size: 16px; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); resize: vertical; }
.cf textarea:focus { outline: none; border-color: var(--main); }
.cf .req { font-style: normal; font-size: 12px; color: #fff; background: var(--pink); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 2px; }
.cf .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-btn { display: block; width: 100%; max-width: 320px; margin: 18px auto 0; border: 0; border-radius: 999px; background: var(--main); color: #fff;
  font: inherit; font-weight: 700; font-size: 18px; padding: 12px 20px; cursor: pointer; box-shadow: 0 3px 0 var(--main-d); }
.cf-btn:hover { background: var(--main-d); }
.cf-msg { border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.cf-msg.ok { background: var(--green-l); color: #23733f; }
.cf-msg.ng { background: #ffe9ee; color: #b3244f; }
/* 掲載報告のURL（#site-…）で飛んだ先を光らせる（10/5） */
.sites li { scroll-margin-top: 70px; }
.sites li:target { background: var(--main-l); box-shadow: 0 0 0 3px var(--main); border-radius: 12px; }
/* SNSの共有ボタン（10/6 殿「INZにもいつもの共有ボタン」・NN/RMと同じ並び） */
.shares { text-align: center; margin: 18px auto 8px; max-width: 760px; }
.shares b { display: block; font-size: 14px; color: var(--sub); margin-bottom: 6px; }
.shares div { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.share { display: inline-block; border: 0; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 900; color: #fff; text-decoration: none; cursor: pointer; line-height: 1.4; }
.share:hover { opacity: .85; }
.share-x, .share-threads { background: #111; box-shadow: inset 0 0 0 1px #555; }
.share-line { background: #06c755; }
.share-facebook { background: #1877f2; }
.share-native, .share-copy { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.share[hidden] { display: none; }
