/* トップページ（案5 絵本の物語）。ほかのページに影響しないよう、すべて .hm の中だけに当てる */
.hm {
    --hm-ink: #3b2a2a; --hm-muted: #7a6560; --hm-sand: #f7e3c6; --hm-sand2: #f2d2a8; --hm-cream: #fffaf0;
    --hm-dusk: #5b3565; --hm-coral: #e8704f; --hm-sun: #f6a93b; --hm-line: #ead7bd;
    font-family: "Zen Maru Gothic", "Hiragino Sans", "Yu Gothic", sans-serif; color: var(--hm-ink); background: var(--hm-cream); line-height: 1.9;
}
.hm a { color: var(--hm-dusk); }
.hm .hm-wrap { max-width: 1040px; margin: 0 auto; padding-left: 16px; padding-right: 16px; } /* 上下の余白は .hm-page に任せる */
.hm h1, .hm h2, .hm h3 { line-height: 1.4; }

/* 表紙 */
.hm-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: min(88vh, 820px); }
.hm-cover-art { background: url(../img/home-cover.jpg) center top / cover; position: relative; } /* 吹き出しの上が切れないよう上に合わせる */
.hm-cover-art::after { content: ""; position: absolute; inset: 0; box-shadow: inset -40px 0 60px -30px rgba(59,42,42,.25); }
.hm-cover-text { background: linear-gradient(180deg, #fff6e6, var(--hm-sand)); display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(20px, 5vw, 64px); }
.hm-eyebrow { font-size: .8rem; color: var(--hm-dusk); font-weight: 700; letter-spacing: .06em; margin: 0 0 .5em; }
.hm-cover h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.35; margin: 0 0 .6em; font-weight: 900; }
.hm-cover h1 .phrase { display: inline-block; }
.hm-cover h1 .phrase:first-child { font-size: .6em; }
.hm-cover h1 .em { color: var(--hm-coral); font-size: 1.3em; }
.hm-cover h1 .phrase:last-child { font-size: .85em; }
.hm-tale { font-family: "Kiwi Maru", serif; color: var(--hm-muted); margin: 0 0 20px; }
.hm-appeal { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 22px; }
.hm-appeal li { background: #fff; border: 2px solid var(--hm-sand2); border-radius: 99px; padding: .3em 1em; font-weight: 700; font-size: .9rem; }
.hm-appeal small { color: var(--hm-coral); margin-left: .3em; font-size: .8em; }
.hm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.hm-btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; border: 0; border-radius: 99px; padding: .8em 1.6em; cursor: pointer; line-height: 1.5; }
.hm .hm-btn-main { background: var(--hm-coral); color: #fff; box-shadow: 0 8px 18px rgba(232,112,79,.35); }
.hm .hm-btn-main:hover { background: #d95f3f; color: #fff; }
.hm .hm-btn-sub { background: #fff; color: var(--hm-ink); border: 2px solid var(--hm-line); }

/* 登場人物の吹き出し */
.hm-talk { display: flex; gap: 14px; align-items: flex-end; margin: 0 0 22px; }
.hm-talk img { flex: none; width: 84px; height: 84px; object-fit: cover; object-position: top; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(59,42,42,.2); }
.hm-bubble { position: relative; background: #fff; border: 2px solid var(--hm-ink); border-radius: 22px; padding: 12px 18px; font-family: "Yusei Magic", sans-serif; font-size: 1.05rem; margin: 0; }
.hm-bubble::before { content: ""; position: absolute; left: -9px; bottom: 16px; width: 14px; height: 14px; background: #fff; border-left: 2px solid var(--hm-ink); border-bottom: 2px solid var(--hm-ink); transform: rotate(45deg); }
.hm-talk.right { flex-direction: row-reverse; }
.hm-talk.right .hm-bubble::before { left: auto; right: -9px; transform: rotate(225deg); }

.hm-page { padding: 64px 0 0; }
.hm-head { text-align: center; margin: 0 0 26px; }
.hm-head h2 { margin: 0; font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.hm-head p { margin: .3em 0 0; color: var(--hm-muted); font-size: .92rem; }
.hm-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.hm-card { background: #fff; border-radius: 24px; padding: 26px; box-shadow: 0 12px 34px rgba(59,42,42,.1); }
.hm-card h3 { margin: 0 0 .6em; font-size: 1.2rem; }
.hm-tag { margin-left: .5em; font-size: .72rem; color: #b8541f; background: #fff1e0; padding: .15em .7em; border-radius: 99px; vertical-align: middle; }
.hm-field { display: block; margin-bottom: 14px; }
.hm-field > span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.hm-field em { font-style: normal; font-size: .7rem; background: var(--hm-coral); color: #fff; border-radius: 4px; padding: .05em .45em; margin-left: .4em; vertical-align: middle; }
.hm-field input { width: 100%; font: inherit; padding: .7em 1em; border: 2px solid var(--hm-line); border-radius: 14px; background: var(--hm-cream); }
.hm-field input:focus { outline: 2px solid var(--hm-coral); outline-offset: 1px; border-color: var(--hm-coral); }
.hm-check { display: flex; gap: .5em; align-items: flex-start; font-size: .85rem; margin: 6px 0 16px; }
.hm-check input { margin-top: .4em; width: 18px; height: 18px; flex: none; }
.hm-form .hm-btn { width: 100%; font-size: 1.05rem; }
.hm-form [hidden] { display: none !important; }
.hm-company { margin: 0 0 16px; padding: 14px 16px 12px; background: #fff7ec; border: 2px solid var(--hm-sand2); border-radius: 16px; }
.hm-company .hm-field { margin-bottom: 6px; }
.hm-company .hm-field input { background: #fff; }
.hm-company-note { margin: 0; font-size: .8rem; color: var(--hm-muted); }
.hm-note { font-size: .8rem; color: var(--hm-muted); margin: 12px 0 0; }
.hm-alert { background: #fde8e8; color: #c53030; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: .9rem; }
.hm-alert ul { margin: 0; padding-left: 1.2em; }
.hm-member { margin-top: 16px; padding: 14px 16px; background: var(--hm-cream); border: 2px dashed var(--hm-sand2); border-radius: 16px; font-size: .85rem; }
.hm-member b { display: block; font-size: .95rem; }
.hm-member span { display: block; color: var(--hm-muted); }
.hm-cats { list-style: none; padding: 0; margin: 0; counter-reset: c; }
.hm-cats li { counter-increment: c; padding: 10px 0 10px 46px; position: relative; border-bottom: 1px dashed var(--hm-line); }
.hm-cats li::before { content: counter(c); position: absolute; left: 0; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--hm-sun); color: #fff; font-weight: 900; display: grid; place-items: center; }
.hm-cats b { display: block; }
.hm-cats span { font-size: .85rem; color: var(--hm-muted); }
.hm-more-link { font-size: .85rem; margin: 12px 0 0; }

/* TOP10（本棚） */
.hm-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.hm .hm-book { background: #fff; border-radius: 6px 16px 16px 6px; padding: 16px 16px 14px 22px; box-shadow: 0 8px 22px rgba(59,42,42,.12); text-decoration: none; color: inherit; border-left: 8px solid var(--hm-dusk); display: block; transition: transform .15s; }
.hm .hm-book:hover { transform: translateY(-3px); }
.hm-book.top1 { border-left-color: #d4a017; background: #fff7df; }
.hm-book.top2 { border-left-color: #9aa3ad; }
.hm-book.top3 { border-left-color: #b87333; }
.hm-book .sec { display: table; margin-bottom: 6px; padding: .1em .65em; border-radius: 99px; background: var(--hm-dusk); color: #fff; font-size: .72rem; font-weight: 700; } /* 業種別1位の業種名 */
.hm-book .r { font-family: "Yusei Magic", sans-serif; font-size: 1.5rem; color: var(--hm-coral); line-height: 1; }
.hm-book b { display: block; margin: 6px 0 2px; line-height: 1.4; }
.hm-book .s { font-size: 1.4rem; font-weight: 900; }
.hm-book .s small { font-size: .75rem; font-weight: 400; }
.hm-book .w { display: block; font-size: .72rem; color: var(--hm-muted); word-break: break-all; }
.hm-book .p { display: block; margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--hm-line); font-size: .75rem; color: var(--hm-dusk); word-break: break-all; }
.hm-more { text-align: center; margin: 24px 0 0; }

/* AIO・LLMO・GEO対策とは */
.hm-prose p { margin: 0 0 1em; }
.hm-terms { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hm-terms th, .hm-terms td { border-bottom: 1px solid var(--hm-line); padding: .55em .5em; text-align: left; vertical-align: top; }
.hm-terms th { background: var(--hm-cream); font-size: .82rem; }

/* よくある質問 */
.hm-faq { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.hm-faq div { background: #fff; border-radius: 18px; padding: 16px 20px; }
.hm-faq dt { font-weight: 700; }
.hm-faq dt::before { content: "Q. "; color: var(--hm-coral); }
.hm-faq dd { margin: .3em 0 0; color: var(--hm-muted); font-size: .92rem; }

/* 最後の呼びかけ（背景は夕日と海） */
.hm-ending { margin-top: 72px; background: url(../img/home-sunset.jpg) center top / cover; text-align: center; color: #fff; padding: 60px 16px 150px; position: relative; } /* 文字を上に寄せ、ボタンの下に夕日と水平線を見せる */
.hm-ending::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(91,53,101,.6) 0%, rgba(91,53,101,.35) 55%, rgba(91,53,101,.05) 100%); }
.hm-ending > * { position: relative; }
.hm-ending h2 { font-family: "Yusei Magic", sans-serif; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 .3em; font-weight: 400; }
.hm-ending p { margin: 0 0 1.2em; }

/* フッターとの間を詰める（layouts/app のフッターは margin-top を持つ） */
.hm + .site-footer, main:has(.hm) + .site-footer { margin-top: 0; }

@media (max-width: 760px) {
    .hm-cover { grid-template-columns: 1fr; min-height: 0; }
    .hm-cover-art { aspect-ratio: 820 / 1065; background-image: url(../img/home-cover-sm.jpg); background-position: center top; } /* 絵を切らずに全体を見せる */
    .hm-cover-text { padding: 32px 16px 36px; }
    .hm-row { grid-template-columns: 1fr; }
    .hm-talk img { width: 64px; height: 64px; }
    .hm-card { padding: 22px 18px; }
    .hm-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .hm .hm-book { padding: 14px 12px 12px 16px; }
    .hm-ending { padding-bottom: 230px; }
}
.hm-agree { font-size: .8rem; color: var(--hm-muted); margin: 0 0 12px; }
.hm-head h2 .phrase { display: inline-block; } /* 見出しを語の途中で折り返さない */

/* 都道府県別（日本のタイル地図。v2.15） */
.pref-map-card { padding: 22px; }
.jp-map { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; max-width: 760px; margin: 0 auto; }
.hm .jp-tile { aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 8px; text-decoration: none; color: #3b2a2a; font-size: .78rem; line-height: 1.15; transition: transform .12s; }
.hm .jp-tile:hover { transform: scale(1.12); box-shadow: 0 4px 12px rgba(59,42,42,.25); position: relative; z-index: 1; }
.jp-tile b { font-weight: 700; }
.jp-tile small { font-size: .66rem; opacity: .8; }
.hm .jp-tile.lv0, .jp-legend .lv0 { background: #f3ece2; color: #a3948c; }
.hm .jp-tile.lv1, .jp-legend .lv1 { background: #fde3c8; }
.hm .jp-tile.lv2, .jp-legend .lv2 { background: #f9b98a; }
.hm .jp-tile.lv3, .jp-legend .lv3 { background: #ec8a62; color: #fff; }
.hm .jp-tile.lv4, .jp-legend .lv4 { background: #c4502f; color: #fff; }
.jp-legend { text-align: center; font-size: .78rem; color: var(--hm-muted); margin: 12px 0 0; }
.jp-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 2px 0 8px; }
.pref-map-sp { display: none; }
.pref-sub { text-align: center; margin: 28px 0 14px; font-size: 1.15rem; }
@media (max-width: 760px) {
    .jp-map, .jp-legend { display: none; }
    .pref-map-sp { display: block; }
    .pref-map-sp .pref-regions { margin: 0; }
    .pref-map-card { padding: 16px 14px; }
}
