:root {
  /* babyco本体・Topicsと同じ配色。deep green / coral の2系統はIMPLEMENTATION_SPEC.mdの承認済み値をそのまま使う */
  --green: #3e614f;
  --green-dark: #29483a;
  --terra: #de7c5b;
  --terra-dark: #b85a38;
  --ink: #4f5262;
  --muted: #777a84;
  --warm: #f6f2ef;
  --paper: #fdfbfa;
  --white: #fff;
  --line: #e5ded9;
  --soft-terra: #fbede8;

  /* babyco本体で使っているアクセント4色(leaf/sun/sky/plum)。絵本ガイドの切り口ごとの色分けに使う */
  --leaf: #648572;
  --leaf-soft: #e4eee7;
  --sun-bright: #ffe7a5;
  --sun-soft: #fff4ce;
  --sun-ink: #846320;
  --sky: #3d7584;
  --sky-soft: #e7f4f8;
  --plum: #7b5a89;
  --plum-soft: #f4edf8;

  /* babycoは端末標準フォント・軽い影・小さい角丸が基本。Zen系Webフォントや強い影は使わない */
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --shadow: 0 4px 16px rgba(79, 82, 98, .1);
  --shadow-float: 0 10px 26px rgba(41, 72, 58, .16);
  --shadow-modal: 0 18px 44px rgba(41, 72, 58, .22);
  --radius: 8px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; color: #fff; background: var(--green-dark); border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

/* babyco本体のヘッダー(スマホ58px／PC80px、ロゴ+サービス名、幅は本ページのコンテンツ幅に合わせる) */
.site-header { height: 58px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
.header-inner { max-width: 1180px; height: 100%; padding: 0 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.babyco-mark-group { display: flex; min-width: 0; align-items: center; gap: 12px; }
.babyco-mark { display: block; flex: none; }
.babyco-mark img { display: block; height: 34px; width: 86px; object-fit: contain; }
.babyco-service-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--green-dark); }
.babyco-service-label small { margin-left: 2px; font-weight: 500; color: var(--muted); }
.babyco-mark-group:hover .babyco-service-label { color: var(--terra-dark); }
.header-nav { display: flex; align-items: center; gap: 20px; font-size: .84rem; font-weight: 500; flex: none; }
.header-nav a { padding: 12px 0; position: relative; }
.header-nav a::after { content: ""; position: absolute; height: 2px; left: 50%; right: 50%; bottom: 6px; background: var(--terra); transition: .2s; }
.header-nav a:hover::after { left: 0; right: 0; }
.saved-button { min-height: 40px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 13px; display: flex; gap: 7px; align-items: center; cursor: pointer; }
.saved-button:hover { border-color: var(--terra); }
.saved-button > span:first-child { color: var(--terra-dark); font-size: 1.1rem; }

main { max-width: 1180px; margin: 0 auto; padding: 0 28px 84px; }

/* babyco本体で使う「見出し左の色バー」と「3色ドットの帯」を、このページの見出し・アイキャッチにも合わせる */
.eyebrow { display: inline-flex; align-items: center; font-size: .72rem; letter-spacing: .14em; font-weight: 700; color: var(--terra-dark); }
.eyebrow::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 28px; border-radius: 999px; background: var(--terra); box-shadow: 12px 0 0 var(--sun-bright), 24px 0 0 var(--leaf); }
.intro .eyebrow { color: #ffe0d4; }
.intro .eyebrow::before { background: #fff; box-shadow: 12px 0 0 var(--sun-bright), 24px 0 0 #ffd4c4; }

:where(.section-heading h2, .search-copy h2, .filter-heading-row h2, .detail-section h3, .guide-article-body section h3, .story-modal h2, .empty-state h2, .experience-cta h3, .guide-next h3) {
  display: flex;
  align-items: center;
  gap: 14px;
}
:where(.section-heading h2, .search-copy h2, .filter-heading-row h2, .detail-section h3, .guide-article-body section h3, .story-modal h2, .empty-state h2, .experience-cta h3, .guide-next h3)::before {
  content: "";
  flex: 0 0 auto;
  width: 32px;
  height: 11px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, var(--terra), var(--sun-bright));
}
.empty-state h2 { justify-content: center; }

.intro { min-height: 260px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch; padding: 0; margin-top: 24px; border-radius: var(--radius-lg); color: #fff; background: var(--green); overflow: hidden; }
.intro-copy { max-width: 650px; padding: 40px 48px; align-self: center; }
.intro h1 { margin: 9px 0 10px; font-size: clamp(1.9rem, 3vw, 2.7rem); font-weight: 700; letter-spacing: .01em; line-height: 1.25; white-space: nowrap; }
.intro h1 span { color: #ffd4c4; }
.intro h1 small { font-size: .78rem; font-weight: 500; margin-left: 10px; vertical-align: middle; opacity: .75; }
.intro p { margin: 0; font-size: .96rem; letter-spacing: .01em; }
.growth-route { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.growth-route span { padding: 5px 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(255,255,255,.1); font-size: .78rem; font-weight: 700; }
.growth-route i { color: #ffd4c4; font-style: normal; font-weight: 700; }
.intro-image { width: 100%; height: 100%; min-height: 260px; object-fit: cover; object-position: 58% center; }

.guide-hub { margin: 64px 0 68px; scroll-margin-top: 76px; }
.section-heading { display: grid; grid-template-columns: 1fr 420px; gap: 42px; align-items: end; margin-bottom: 26px; }
.section-heading h2 { margin: 1px 0 0; color: var(--green); font-size: clamp(1.55rem, 2.4vw, 2rem); font-weight: 700; line-height: 1.35; }
.section-heading > p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.9; }
.section-number { display: inline-block; margin-bottom: 8px; padding: 3px 9px; border-radius: 3px; color: #fff; background: var(--green-dark); font-size: .66rem; font-weight: 700; letter-spacing: .13em; }
.featured-guide-card { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); min-height: 380px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-float); }
.featured-guide-image { min-height: 380px; position: relative; overflow: hidden; background: var(--warm); }
.featured-guide-image img { width: 100%; height: 100%; object-fit: cover; }
.featured-guide-image > span { position: absolute; left: 20px; top: 20px; padding: 5px 12px; border-radius: 999px; color: #fff; background: var(--green-dark); font-size: .74rem; font-weight: 700; }
.featured-guide-copy { padding: 42px 42px; display: flex; flex-direction: column; justify-content: center; }
.guide-card-label { margin: 0 0 8px; color: var(--terra-dark); font-size: .75rem; font-weight: 700; letter-spacing: .06em; }
.featured-guide-copy h3 { margin: 0; color: var(--green-dark); font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 700; line-height: 1.5; }
.featured-guide-copy > p:not(.guide-card-label) { margin: 16px 0 20px; line-height: 1.95; }
.guide-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.guide-meta span { padding: 4px 9px; border-radius: 999px; background: var(--soft-terra); color: var(--terra-dark); font-size: .72rem; font-weight: 700; }
.featured-guide-copy > button { align-self: flex-start; min-height: 46px; margin-top: 24px; padding: 9px 18px; border: 0; border-radius: var(--radius); color: #fff; background: var(--terra-dark); font-weight: 700; cursor: pointer; transition: opacity .15s; }
.featured-guide-copy > button:hover { opacity: .88; }
.featured-guide-copy > button span { margin-left: 14px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.guide-card { min-height: 240px; display: grid; grid-template-columns: 38% 62%; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: transform .15s, box-shadow .15s; }
.guide-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-float); }
.guide-card-visual { min-height: 240px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: var(--warm); }
.guide-card-visual::before { content: ""; position: absolute; width: 120px; height: 120px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; }
.guide-terra .guide-card-visual { background: var(--soft-terra); }
.guide-night .guide-card-visual { background: var(--plum-soft); }
.guide-mustard .guide-card-visual { background: var(--sun-soft); }
.guide-sky .guide-card-visual { background: var(--sky-soft); }
.mini-book { width: 54px; height: 82px; margin: 0 -11px; border-radius: 4px 8px 8px 4px; display: grid; place-items: center; position: relative; color: var(--green); background: #fdf9eb; box-shadow: var(--shadow); transform: rotate(-6deg); }
.mini-book:nth-child(2) { z-index: 2; height: 92px; color: #fff; background: var(--terra); transform: translateY(-4px) rotate(0); }
.mini-book:nth-child(3) { background: var(--green); color: #fff; transform: rotate(6deg); }
.mini-book i { max-width: 44px; font-size: .55rem; font-style: normal; font-weight: 700; line-height: 1.45; text-align: center; }
.guide-card-copy { min-width: 0; padding: 22px 22px 18px; display: flex; flex-direction: column; }
.guide-card h3 { margin: 0; color: var(--green-dark); font-size: 1.04rem; font-weight: 700; line-height: 1.6; }
.guide-card-copy > p:not(.guide-card-label) { margin: 8px 0 15px; color: var(--muted); font-size: .8rem; line-height: 1.75; }
.guide-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.guide-card-bottom > span { color: var(--muted); font-size: .7rem; }
.guide-card-bottom button { min-width: 68px; min-height: 40px; border: 0; color: var(--terra-dark); background: transparent; font-weight: 700; cursor: pointer; }
.guide-card-bottom b { margin-left: 7px; }
.guide-index-row { margin-top: 24px; padding: 16px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.guide-index-row p { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: .77rem; }
.guide-index-row p b { margin-right: 6px; color: var(--green); }
.guide-index-row p span { padding: 3px 9px; border-radius: 999px; background: var(--leaf-soft); color: var(--leaf); font-weight: 700; }
.guide-all-button { min-height: 44px; flex: none; border: 0; color: var(--terra-dark); background: transparent; font-weight: 700; cursor: pointer; }
.guide-all-button span { margin-left: 8px; }

.search-panel { margin-top: 0; padding: 32px 40px 30px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--terra); border-radius: var(--radius-lg); box-shadow: var(--shadow); position: relative; z-index: 2; scroll-margin-top: 76px; }
.search-panel::before { content: "1冊ずつ探す"; position: absolute; right: 22px; top: -14px; padding: 3px 12px; border-radius: 999px; color: #fff; background: var(--green); font-size: .72rem; font-weight: 700; }
.search-copy { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.step-mark { display: inline-grid; place-items: center; min-width: 38px; height: 30px; border-radius: 999px; background: var(--soft-terra); color: var(--terra-dark); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.search-copy h2, .filter-heading-row h2 { margin: 0; color: var(--green); font-size: 1.2rem; font-weight: 700; }
.search-copy p { margin: 0; font-size: .82rem; color: var(--muted); }
.semantic-search { display: flex; gap: 10px; }
.semantic-search input { width: 100%; min-height: 54px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; outline: 0; background: var(--paper); font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.semantic-search input:focus { border-color: var(--terra-dark); box-shadow: 0 0 0 4px rgba(184,90,56,.12); }
.semantic-search input::placeholder { color: #8b8c92; }
.semantic-search button, .apply-button { min-width: 140px; min-height: 52px; border: 0; border-radius: var(--radius); background: var(--terra-dark); color: #fff; font-weight: 700; cursor: pointer; transition: opacity .15s; }
.semantic-search button:hover, .apply-button:hover { opacity: .88; }
.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-left: 4px; }
.quick-tags::before { content: "こんなふうに："; align-self: center; font-size: .76rem; color: var(--muted); }
.quick-tags button { min-height: 38px; border: 0; background: transparent; color: var(--terra-dark); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-size: .82rem; }

.content-shell { display: grid; grid-template-columns: 278px minmax(0,1fr); gap: 42px; align-items: start; margin-top: 54px; }
.filter-panel { position: sticky; top: 84px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); overflow: hidden; }
.filter-heading-row { padding: 20px 20px 16px; border-bottom: 1px solid var(--line); }
.filter-heading-row > div { display: flex; align-items: center; gap: 10px; }
.text-button { border: 0; background: transparent; color: var(--terra-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 38px; padding: 4px; font-size: .8rem; }
.filter-heading-row .text-button { display: block; margin: 7px 0 0 auto; }
.filter-group { border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; }
.filter-group summary { list-style: none; min-height: 52px; display: flex; justify-content: space-between; align-items: center; padding: 12px 19px; color: var(--green); font-weight: 700; cursor: pointer; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "+"; font-size: 1.2rem; color: var(--terra-dark); font-weight: 400; }
.filter-group[open] summary::after { content: "−"; }
.filter-options { padding: 0 15px 15px; display: grid; gap: 3px; }
.filter-option { position: relative; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 7px; min-height: 43px; padding: 5px 4px; border-radius: 6px; cursor: pointer; font-size: .88rem; }
.filter-option:hover { background: var(--warm); }
.filter-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--terra-dark); }
.filter-option .count { min-width: 26px; text-align: right; color: var(--muted); font-size: .78rem; }
.filter-option.disabled { color: #aca9a6; cursor: not-allowed; }

.selected-area { position: sticky; top: 58px; z-index: 20; margin: -14px 0 24px; padding: 12px 15px; border: 1px solid var(--soft-terra); border-radius: var(--radius); background: rgba(255,255,255,.96); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.selected-area > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .74rem; }
#selectedChips { display: flex; gap: 7px; flex-wrap: wrap; }
.selected-chip { min-height: 34px; padding: 5px 10px 5px 12px; border: 1px solid var(--terra); border-radius: 999px; background: var(--soft-terra); color: var(--terra-dark); display: inline-flex; gap: 8px; align-items: center; font-size: .8rem; font-weight: 700; }
.selected-chip button { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--terra-dark); cursor: pointer; font-size: 1.05rem; }

.result-toolbar { min-height: 62px; display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.result-kicker { margin: 0 0 2px; color: var(--green); font-size: .8rem; font-weight: 700; letter-spacing: .06em; }
.result-toolbar h2 { margin: 0; color: var(--ink); font-weight: 700; line-height: 1.2; }
.result-toolbar h2 strong { color: var(--terra-dark); font-size: 2rem; margin-right: 6px; }
.result-toolbar h2 span { font-size: 1rem; }
.sort-label { color: var(--muted); font-size: .78rem; display: flex; align-items: center; gap: 8px; }
.sort-label select { min-height: 42px; padding: 7px 34px 7px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--white); }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 22px; }
.related-guide { margin: 0 0 26px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--leaf-soft); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.related-guide span { color: var(--terra-dark); font-size: .72rem; font-weight: 700; }
.related-guide h3 { margin: 2px 0 4px; color: var(--green); font-size: 1.05rem; font-weight: 700; }
.related-guide p { margin: 0; color: var(--muted); font-size: .78rem; }
.related-guide button { min-width: 120px; min-height: 44px; border: 0; border-radius: var(--radius); color: #fff; background: var(--green); font-weight: 700; cursor: pointer; transition: opacity .15s; }
.related-guide button:hover { opacity: .88; }
.book-card { min-width: 0; animation: card-in .2s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } }
.cover-button { width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.cover-frame { aspect-ratio: .76; padding: 11px; border-radius: 6px; background: var(--warm); border: 1px solid var(--line); display: grid; place-items: center; position: relative; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.cover-frame > .cover-button { position: absolute; inset: 0; height: 100%; z-index: 1; }
.cover-frame::before { content: ""; width: 66%; height: 76%; border: 1px dashed #c9c1ba; background: rgba(255,255,255,.5); }
.cover-frame span { position: absolute; color: #8a817c; font-size: .75rem; letter-spacing: .06em; }
.cover-frame.has-image::before, .cover-frame.has-image span { display: none; }
.cover-frame > .cover-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-button:hover .cover-frame { border-color: var(--terra); box-shadow: var(--shadow); }
.match-badge { position: absolute !important; left: 9px; top: 9px; padding: 4px 9px; border-radius: 999px; color: #fff !important; background: var(--green); font-size: .68rem !important; letter-spacing: 0 !important; font-weight: 700; }
.save-book { position: absolute; right: 9px; top: 9px; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.92); color: var(--terra-dark); font-size: 1.2rem; cursor: pointer; z-index: 2; }
.save-book.saved { color: #fff; background: var(--terra-dark); border-color: var(--terra-dark); }
.book-card h3 { margin: 12px 0 5px; color: var(--green-dark); font-size: 1rem; font-weight: 700; line-height: 1.5; }
.book-card .book-meta { margin: 0 0 7px; color: var(--muted); font-size: .75rem; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card-tags span { padding: 3px 9px; border-radius: 999px; background: var(--soft-terra); color: var(--terra-dark); font-size: .7rem; font-weight: 700; }

.empty-state { padding: 56px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); text-align: center; }
.empty-visual { width: 104px; height: 92px; margin: 0 auto 20px; border: 2px solid var(--green); border-radius: 8px 14px 14px 8px; display: grid; place-items: center; color: var(--terra-dark); font-size: 1.9rem; font-weight: 700; background: var(--leaf-soft); }
.empty-state h2 { color: var(--green); font-size: 1.4rem; font-weight: 700; line-height: 1.5; }
.empty-state > p:not(.result-kicker) { color: var(--muted); }
.relax-actions { max-width: 430px; margin: 22px auto 14px; display: grid; gap: 9px; }
.relax-actions button { min-height: 48px; border: 1px solid var(--terra); border-radius: var(--radius); color: var(--terra-dark); background: var(--soft-terra); font-weight: 700; cursor: pointer; }
.outline-button { min-height: 44px; padding: 7px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }

.site-footer { max-width: 1180px; margin: auto; padding: 32px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; font-weight: 700; color: var(--green-dark); }
.site-footer nav a:hover { color: var(--terra-dark); }
.site-footer p { margin: 6px 0 0; line-height: 1.8; }
.site-footer p a { color: var(--terra-dark); text-decoration: underline; text-underline-offset: 2px; }

.mobile-filter-bar { display: none; }
.sheet-backdrop, .detail-backdrop, .story-backdrop, .guide-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(31,44,38,.45); }
.filter-sheet { position: absolute; inset: 0; background: var(--paper); display: flex; flex-direction: column; }
.filter-sheet > header { min-height: 60px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
.filter-sheet h2 { margin: 0; color: var(--green); font-size: 1.08rem; font-weight: 700; }
.filter-sheet header button, .detail-close { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--warm); font-size: 1.5rem; cursor: pointer; }
.sheet-selected { min-height: 0; padding: 0; background: var(--soft-terra); display: flex; gap: 6px; overflow-x: auto; }
.sheet-selected:not(:empty) { min-height: 50px; padding: 8px 14px; }
.sheet-body { min-height: 0; flex: 1; display: grid; grid-template-columns: 124px 1fr; }
.sheet-tabs { background: var(--warm); overflow-y: auto; }
.sheet-tabs button { width: 100%; min-height: 60px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font-size: .82rem; cursor: pointer; }
.sheet-tabs button.active { color: var(--green); background: #fff; font-weight: 700; border-left: 3px solid var(--terra); }
.sheet-options { padding: 14px 15px 80px; overflow-y: auto; background: #fff; }
.sheet-options h3 { margin: 3px 4px 12px; color: var(--green); font-weight: 700; }
.sheet-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 80px 1fr; gap: 10px; align-items: center; border-top: 1px solid var(--line); background: #fff; }
.apply-button { width: 100%; min-width: 0; }

.detail-backdrop { display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.detail-modal { width: min(980px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; background: var(--paper); border-radius: var(--radius-lg); position: relative; box-shadow: var(--shadow-modal); }
.detail-close { position: sticky; top: 16px; float: right; margin: 16px 16px -60px 0; z-index: 2; background: #fff; box-shadow: var(--shadow); }
.detail-inner { padding: 56px 60px 52px; }
.detail-top { display: grid; grid-template-columns: 260px 1fr; gap: 46px; }
.detail-cover { aspect-ratio: .76; border: 1px solid var(--line); border-radius: 6px 12px 12px 6px; background: var(--warm); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-top h2 { margin: 7px 0 12px; color: var(--green); font-size: 1.75rem; font-weight: 700; line-height: 1.35; }
.detail-top .lead-heading { margin: 4px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); color: var(--green); font-size: 1.2rem; font-weight: 700; }
.detail-intro { font-size: 1rem; line-height: 2; }
.detail-meta { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 20px 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; font-size: .82rem; }
.detail-meta b { color: var(--green); }
.detail-section { margin-top: 44px; }
.detail-section h3 { margin: 0 0 12px; color: var(--green); font-size: 1.25rem; font-weight: 700; }
.detail-section > p { margin: 0; line-height: 1.95; }
.reading-note { padding: 20px 24px; border-left: 4px solid var(--terra); background: var(--soft-terra); border-radius: 0 var(--radius) var(--radius) 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 32px; }
.detail-card { min-height: 178px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.detail-card:nth-child(2) { background: var(--warm); }
.detail-card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--line); color: var(--green); font-size: 1.2rem; font-weight: 700; }
.detail-card h3 span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--terra-dark); background: var(--soft-terra); font-size: .85rem; }
.detail-card p { margin: 0; line-height: 1.85; }
.sub-heading { margin: 0 0 8px; color: var(--terra-dark); font-size: .95rem; font-weight: 700; line-height: 1.6; }
.sub-heading::before { content: "◆"; margin-right: 6px; font-size: .7em; vertical-align: .1em; }
.reading-note .sub-heading { margin-top: 0; }
.detail-top .sub-heading { margin-bottom: 6px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-tags button { min-height: 42px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--terra-dark); background: var(--soft-terra); cursor: pointer; font-weight: 700; }
.detail-tags button:hover { border-color: var(--terra-dark); background: #f8dfd6; }
.tag-guide { margin: -3px 0 17px !important; color: var(--muted); font-size: .86rem; }
.voice-section { padding: 26px; border-radius: var(--radius-lg); background: var(--warm); }
.voice-empty { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: center; }
.voice-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: var(--green); background: #fff; font-size: 1.3rem; font-weight: 700; }
.voice-empty p { margin: 0; }
.voice-note { color: var(--muted); font-size: .82rem; }
.experience-cta { display: grid; grid-template-columns: 1fr auto; gap: 25px; align-items: center; margin-top: 18px; padding: 26px 28px; border-radius: var(--radius-lg); color: #fff; background: var(--green); }
.experience-cta h3 { margin: 0 0 5px; color: #fff; font-size: 1.18rem; }
.experience-cta p { margin: 0; font-size: .9rem; opacity: .9; }
.experience-cta button { min-width: 190px; min-height: 48px; border: 0; border-radius: var(--radius); color: var(--terra-dark); background: #fff; font-weight: 700; cursor: pointer; transition: opacity .15s; }
.experience-cta button:hover { opacity: .88; }
.detail-disclaimer { margin-top: 32px; color: var(--muted); font-size: .75rem; }
.book-in-guides { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--leaf-soft); }
.book-in-guides > div { display: grid; gap: 8px; margin-top: 16px; }
.book-in-guides button { min-height: 60px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: grid; grid-template-columns: 100px 1fr 25px; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.book-in-guides button span { color: var(--terra-dark); font-size: .7rem; }
.book-in-guides button b { color: var(--green); }
.book-in-guides button i { font-style: normal; color: var(--terra-dark); }

.guide-backdrop { display: grid; place-items: center; padding: 24px; overflow-y: auto; z-index: 90; }
.guide-modal { width: min(1040px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; border-radius: var(--radius-lg); background: var(--paper); position: relative; box-shadow: var(--shadow-modal); }
.guide-article-hero { min-height: 360px; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; color: #fff; background: var(--green); }
.guide-article-hero > div:first-child { padding: 60px 50px 44px; align-self: center; }
.guide-article-hero .guide-card-label { color: #ffd8cb; }
.guide-article-hero h2 { margin: 8px 0 15px; font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.45; }
.guide-article-hero p:not(.guide-card-label) { margin: 0 0 19px; line-height: 1.9; }
.guide-article-hero .guide-meta span { color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); }
.guide-article-hero img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }
.guide-article-hero.guide-terra { background: var(--terra-dark); }
.guide-article-hero.guide-night { background: #4f3a5c; }
.guide-article-hero.guide-mustard { background: #7a5a28; }
.guide-article-hero.guide-sky { background: var(--sky); }
.article-book-stack { min-height: 360px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12); }
.article-book-stack .mini-book { width: 96px; height: 148px; }
.article-book-stack .mini-book:nth-child(2) { height: 166px; }
.article-book-stack .mini-book i { max-width: 74px; font-size: .78rem; }
.guide-article-body { padding: 32px 62px 52px; }
.article-summary { min-height: 62px; margin-bottom: 34px; padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; gap: 20px; background: #fff; font-size: .8rem; }
.article-summary span { color: var(--green); font-weight: 700; }
.article-summary a { color: var(--terra-dark); text-decoration: underline; text-underline-offset: 3px; }
.guide-article-body > section { display: grid; grid-template-columns: 60px 1fr; gap: 20px; margin-top: 46px; scroll-margin-top: 20px; }
.article-number { margin: 0; color: var(--terra); font-size: 1.02rem; font-weight: 700; border-top: 2px solid var(--terra); padding-top: 8px; }
.guide-article-body section h3 { margin: 0 0 14px; color: var(--green); font-size: 1.4rem; font-weight: 700; }
.guide-article-body section p { line-height: 1.95; }
.guide-article-body section aside { margin-top: 22px; padding: 18px 20px; border-left: 4px solid var(--terra); background: var(--soft-terra); border-radius: 0 var(--radius) var(--radius) 0; }
.guide-article-body section aside b { color: var(--green); }
.guide-article-body section aside p { margin: 5px 0 0; }
.article-lead { color: var(--muted); }
.article-book-list { margin-top: 22px; display: grid; gap: 16px; }
.article-book-list article { display: grid; grid-template-columns: 128px 1fr; gap: 24px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.article-cover { aspect-ratio: .76; display: grid; place-items: center; position: relative; border: 1px solid var(--line); border-radius: 4px 9px 9px 4px; color: var(--muted); background: var(--warm); font-size: .72rem; text-align: center; overflow: hidden; }
.article-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.article-cover b { position: absolute; left: -8px; top: -8px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--terra-dark); font-size: .72rem; z-index: 1; }
.article-book-list h4 { margin: 0 0 4px; color: var(--green); font-size: 1.12rem; font-weight: 700; }
.article-book-list article p:not(.guide-card-label) { margin: 0 0 10px; font-size: .85rem; }
.article-book-list article button { min-height: 42px; margin-top: 12px; padding: 6px 0; border: 0; color: var(--terra-dark); background: transparent; font-weight: 700; cursor: pointer; }
.article-search-button { min-height: 48px; padding: 8px 20px; border: 0; border-radius: var(--radius); color: #fff; background: var(--terra-dark); font-weight: 700; cursor: pointer; transition: opacity .15s; }
.article-search-button:hover { opacity: .88; }
.guide-next { margin-top: 56px; padding: 26px; border-radius: var(--radius-lg); background: var(--green); color: #fff; }
.guide-next > span { font-size: .68rem; letter-spacing: .15em; color: #ffd8cb; }
.guide-next h3 { margin: 3px 0 17px; font-weight: 700; }
.guide-next > div { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.guide-next button { min-height: 72px; padding: 12px 15px; border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); color: #fff; background: rgba(255,255,255,.08); text-align: left; cursor: pointer; }
.guide-next button small { display: block; color: #ffd8cb; }
.guide-next button i { float: right; font-style: normal; }
.story-backdrop { z-index: 100; display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.story-modal { width: min(620px,100%); max-height: calc(100vh - 48px); overflow-y: auto; padding: 32px 36px 36px; border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-modal); }
.story-modal header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.story-modal h2 { margin: 4px 0 0; color: var(--green); font-size: 1.4rem; font-weight: 700; }
.story-eyebrow { color: var(--terra-dark); }
.story-modal header button { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: var(--warm); font-size: 1.5rem; cursor: pointer; }
.story-lead { margin: 18px 0 22px; }
.story-modal form { display: grid; gap: 17px; }
.story-modal form > label:not(.story-consent) { display: grid; gap: 6px; color: var(--green); font-weight: 700; }
.story-modal label span { color: var(--terra-dark); font-size: .72rem; }
.story-modal label small { color: var(--muted); font-weight: 400; }
.story-modal input[type="text"], .story-modal input:not([type]), .story-modal textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: #fff; outline: 0; resize: vertical; }
.story-modal input:focus, .story-modal textarea:focus { border-color: var(--terra-dark); box-shadow: 0 0 0 3px rgba(184,90,56,.12); }
.story-note { margin: 0; color: var(--muted); font-size: .78rem; }
.story-consent { display: flex; align-items: flex-start; gap: 9px; font-size: .84rem; }
.story-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--terra-dark); }
.story-submit { width: 100%; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px); padding: 10px 17px; border-radius: 999px; color: #fff; background: var(--green-dark); opacity: 0; pointer-events: none; transition: .2s; font-size: .84rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .header-nav > a { display: none; }
  .intro-copy { padding: 32px 34px; }
  .section-heading { grid-template-columns: 1fr 340px; gap: 25px; }
  .featured-guide-copy { padding: 30px 28px; }
  .guide-card { grid-template-columns: 34% 66%; }
  .guide-card-copy { padding: 20px 18px 16px; }
  .guide-card-visual { min-height: 260px; }
  .content-shell { grid-template-columns: 230px 1fr; gap: 25px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .site-header { height: 80px; }
  .babyco-mark img { height: 46px; width: 116px; }
  .selected-area { top: 80px; }
}

@media (max-width: 680px) {
  body { padding-bottom: 72px; }
  .header-inner { padding: 0 16px; }
  .babyco-service-label small, .saved-label { display: none; }
  .babyco-service-label { font-size: .7rem; }
  .header-nav { gap: 0; }
  main { padding: 0 16px 54px; }
  .intro { min-height: 0; margin: 0 -16px; grid-template-columns: 1fr; border-radius: 0; }
  .intro-copy { padding: 24px 20px 26px; }
  .intro h1 { font-size: 1.8rem; white-space: normal; }
  .intro p { max-width: none; font-size: .82rem; }
  .growth-route { gap: 5px; margin-top: 13px; }
  .growth-route span { padding: 4px 8px; font-size: .68rem; }
  .intro-image { min-height: 180px; max-height: 210px; object-position: center 55%; }
  .guide-hub { margin: 40px 0 50px; }
  .section-heading { display: block; margin-bottom: 18px; }
  .section-heading h2 { font-size: 1.4rem; }
  .section-heading > p { margin-top: 12px; font-size: .82rem; }
  .featured-guide-card { display: block; min-height: 0; border-radius: var(--radius-lg); }
  .featured-guide-image { min-height: 210px; }
  .featured-guide-copy { padding: 24px 20px 26px; }
  .featured-guide-copy h3 { font-size: 1.28rem; }
  .featured-guide-copy > p:not(.guide-card-label) { font-size: .86rem; }
  .featured-guide-copy > button { width: 100%; }
  .guide-grid { display: flex; margin-left: -16px; margin-right: -16px; padding: 0 16px 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .guide-card { min-width: 282px; display: block; scroll-snap-align: start; }
  .guide-card-visual { min-height: 148px; }
  .guide-card-copy { min-height: 230px; padding: 20px; }
  .guide-index-row { display: block; padding: 16px 0; }
  .guide-index-row p { align-items: flex-start; }
  .guide-index-row p b { width: 100%; }
  .guide-all-button { margin-top: 10px; padding-left: 0; }
  .search-panel { margin: 0 -4px; padding: 24px 18px 22px; border-radius: var(--radius-lg); }
  .search-copy { margin-bottom: 13px; }
  .semantic-search { display: block; }
  .semantic-search input { min-height: 58px; padding: 10px 14px; font-size: .94rem; }
  .semantic-search button { width: 100%; margin-top: 9px; min-height: 48px; }
  .quick-tags { gap: 1px 8px; }
  .quick-tags::before { width: 100%; }
  .quick-tags button { font-size: .78rem; padding-left: 0; }
  .content-shell { display: block; margin-top: 32px; }
  .filter-panel { display: none; }
  .selected-area { top: 60px; margin: -10px 0 18px; }
  .result-toolbar { align-items: flex-end; margin-bottom: 17px; }
  .result-toolbar h2 strong { font-size: 1.8rem; }
  .sort-label { display: block; text-align: right; }
  .sort-label select { display: block; max-width: 135px; margin-top: 4px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 26px 13px; }
  .related-guide { grid-template-columns: 1fr; gap: 13px; padding: 18px; }
  .related-guide button { width: 100%; }
  .cover-frame { padding: 7px; }
  .match-badge { display: none; }
  .book-card h3 { font-size: .9rem; }
  .card-tags span:nth-child(n+3) { display: none; }
  .empty-state { padding: 40px 18px; }
  .site-footer { padding: 26px 18px 18px; }
  .mobile-filter-bar { display: flex; position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); min-height: 54px; padding: 9px 18px; border: 0; border-radius: var(--radius-lg); color: #fff; background: var(--green); align-items: center; justify-content: center; gap: 10px; font-weight: 700; box-shadow: var(--shadow-float); cursor: pointer; }
  .mobile-filter-bar b { display: grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; color: var(--green); background: #fff; font-size: .78rem; }
  .detail-backdrop { padding: 0; place-items: end center; }
  .detail-modal { width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; }
  .detail-inner { padding: 52px 20px 36px; }
  .detail-top { display: block; }
  .detail-cover { width: 56%; max-width: 220px; margin: 0 auto 28px; }
  .detail-top h2 { font-size: 1.5rem; }
  .detail-meta { grid-template-columns: 1fr; }
  .book-in-guides { padding: 20px 16px; }
  .book-in-guides button { grid-template-columns: 1fr 24px; }
  .book-in-guides button span { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .experience-cta { grid-template-columns: 1fr; padding: 22px; }
  .experience-cta button { width: 100%; }
  .voice-section { padding: 20px 16px; }
  .story-backdrop { padding: 0; place-items: end center; }
  .story-modal { width: 100%; max-height: 94vh; padding: 26px 18px 30px; border-radius: 16px 16px 0 0; }
  .guide-backdrop { padding: 0; place-items: end center; }
  .guide-modal { width: 100%; max-height: 96vh; border-radius: 16px 16px 0 0; }
  .guide-article-hero { display: block; min-height: 0; }
  .guide-article-hero > div:first-child { padding: 52px 20px 26px; }
  .guide-article-hero h2 { font-size: 1.55rem; }
  .guide-article-hero img, .article-book-stack { min-height: 200px; max-height: 225px; }
  .article-book-stack .mini-book { width: 66px; height: 102px; }
  .article-book-stack .mini-book:nth-child(2) { height: 116px; }
  .article-book-stack .mini-book i { max-width: 52px; font-size: .6rem; }
  .guide-article-body { padding: 22px 18px 36px; }
  .article-summary { display: grid; gap: 5px; }
  .guide-article-body > section { grid-template-columns: 36px 1fr; gap: 12px; margin-top: 36px; }
  .guide-article-body section h3 { font-size: 1.2rem; }
  .article-book-list article { grid-template-columns: 92px 1fr; gap: 14px; padding: 13px; }
  .article-book-list h4 { font-size: 1rem; }
  .article-book-list .card-tags { grid-column: 1 / -1; }
  .guide-next { padding: 22px 18px; }
  .guide-next > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* 基本情報（作家・出版社・発売日・ページ数・語彙数） */
.basic-info { margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; font-size: .86rem; }
.basic-info div { display: flex; gap: 12px; align-items: baseline; }
.basic-info dt { flex: none; min-width: 4.6em; color: var(--green); font-weight: 700; }
.basic-info dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 680px) { .basic-info { grid-template-columns: 1fr; } }

/* 書き手（AI）が確かめきれなかった箇所。人が確かめて消す */
mark.needs-check { padding: 1px 4px; border-radius: 4px; background: #fff0b8; color: #6b4e00; font-weight: 700; }

.cover-credit { margin: 6px 0 0; font-size: .68rem; color: var(--muted); }
.cover-credit-tag { position: absolute; right: 6px; bottom: 4px; z-index: 2; font-size: .6rem; font-style: normal; color: #6f6661; background: rgba(255,255,255,.8); padding: 1px 4px; border-radius: 3px; pointer-events: none; }
.detail-cover-wrap { align-self: start; }
.detail-cover-wrap .cover-credit { text-align: left; }
@media (max-width: 680px) { .detail-cover-wrap .detail-cover { margin-bottom: 6px; } .detail-cover-wrap .cover-credit { text-align: center; margin-bottom: 22px; } }

/* 新形式（編集部の原稿）：複数の段落と、おすすめの箇条書き */
.rich p { margin: 0 0 .9em; line-height: 1.9; }
.rich p:last-child { margin-bottom: 0; }
.detail-top .rich.detail-intro p { font-size: 1rem; line-height: 2; }
.check-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 1.6em; line-height: 1.8; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--terra-dark); font-weight: 700; }
.detail-card .rich p, .reading-note .rich p { margin: 0 0 .9em; }

/* 絵本の個別ページ（book/<ID>/）：詳細をモーダルでなくページとして出す */
a.cover-button { display: block; color: inherit; text-decoration: none; }
body.book-page main, body.book-page .detail-close { display: none; }
body.book-page .detail-backdrop { position: static; display: block; padding: 24px 24px 56px; background: none; overflow: visible; }
body.book-page .detail-modal { width: min(980px, 100%); max-height: none; margin: 0 auto; overflow: visible; box-shadow: none; }
.book-back { margin: 0 0 20px; }
.book-back a { display: inline-flex; align-items: center; min-height: 42px; padding: 6px 18px; border: 1px solid var(--terra-dark); border-radius: 999px; color: var(--terra-dark); font-weight: 700; text-decoration: none; background: #fff; }
.book-back a:hover { background: var(--warm); }
.book-back-bottom { margin: 28px 0 0; text-align: center; }
@media (max-width: 680px) { body.book-page .detail-backdrop { padding: 12px 12px 40px; } body.book-page .detail-modal { border-radius: 16px; } }
body.book-page { display: flex; flex-direction: column; min-height: 100vh; }
body.book-page .detail-backdrop { order: 1; flex: 1; }
body.book-page .site-footer { order: 2; width: 100%; box-sizing: border-box; }
body.book-page .detail-backdrop { z-index: auto; }
