/* 019 こもれび動物病院 ― 色はここだけ触れば差し替わる */
:root {
  --c-bg: #f8f6ee;
  --c-leaf: #cfe6c8;
  --c-green: #5fa36a;
  --c-accent-text: #2f6b3a;
  --c-ink: #263a2b;
  --c-yellow: #f5d77a;
  --c-line: #e3dfcf;
  --c-text: #374151;
  --c-sub: #4b5563;
  --font: "Zen Maru Gothic", sans-serif;
  --font-head: "Kiwi Maru", serif;
  --font-en: "Quicksand", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 1.95; color: var(--c-text); background: var(--c-bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; font-weight: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; }
/* グリッドの中身が、表や写真の元の幅で列を押し広げないように */
[class*="__inner"] > * { min-width: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.en { font-family: var(--font-en); font-weight: 700; font-size: 15px; letter-spacing: .16em; color: var(--c-accent-text); margin-bottom: 6px; }
.en--light { color: var(--c-yellow); }
.h2 { font-family: var(--font-head); font-weight: 500; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.55; color: var(--c-ink); margin-bottom: 28px; }
.h2--light { color: #fff; }
.note { margin-top: 14px; font-size: 15px; color: var(--c-sub); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; border: 2px solid transparent; transition: background-color .3s, color .3s, transform .2s; }
.btn--green { background: var(--c-accent-text); color: #fff; }
.btn--green:hover { background: var(--c-ink); transform: translateY(-2px); }
.btn--line { border-color: var(--c-accent-text); color: var(--c-accent-text); background: #fff; }
.btn--line:hover { background: var(--c-leaf); }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 17px; }

/* ヘッダー */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.header__inner { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 10px 0 16px; background: rgba(248, 246, 238, .93); backdrop-filter: blur(8px); }
.logo { display: flex; align-items: center; gap: 8px; min-height: 48px; text-decoration: none; color: var(--c-ink); white-space: nowrap; flex: none; }
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo span { font-family: var(--font-head); font-size: 19px; }
.gnav { display: none; }
.header__btn { margin-left: auto; min-height: 44px; font-size: 15px; padding: 0 16px; }
@media (max-width: 379px) { .logo span { font-size: 17px; } .header__btn { padding: 0 12px; } }
@media (min-width: 1080px) {
  .header__inner { height: 76px; padding: 0 40px; }
  .logo span { font-size: 22px; }
  .gnav { display: flex; gap: 28px; margin-left: auto; }
  .gnav a { display: flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 15px; text-decoration: none; color: var(--c-ink); }
  .gnav a:hover { color: var(--c-accent-text); }
  .header__btn { margin-left: 0; }
}
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--c-leaf); color: var(--c-ink); }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -6px; } .spmenu__bar::after { top: 6px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; left: 10px; right: 10px; top: calc(100% + 6px); background: #fff; border-radius: 24px; box-shadow: 0 16px 36px rgba(38, 58, 43, .16); padding: 8px 22px 14px; display: flex; flex-direction: column; }
.spmenu__nav a { display: flex; align-items: center; min-height: 52px; font-weight: 700; font-size: 17px; color: var(--c-ink); text-decoration: none; border-bottom: 1px dashed var(--c-leaf); }
.spmenu__nav a:last-child { border-bottom: 0; }
@media (min-width: 1080px) { .spmenu { display: none; } }

/* ===== メインビジュアル（E07：丸い写真の外周の文字） ===== */
.hero { position: relative; padding: 96px 0 96px; overflow: hidden; }
.hero__inner { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: grid; gap: 40px; }
.hero__title { font-family: var(--font-head); font-weight: 500; font-size: clamp(34px, 5.2vw, 64px); line-height: 1.45; color: var(--c-ink); margin: 10px 0 18px; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__visual { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin: 0 auto; }
.ring-text { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ring-text text { font-family: var(--font-en); font-weight: 700; font-size: 25px; letter-spacing: 3px; fill: var(--c-accent-text); }
.hero__photo { position: absolute; inset: 11%; border-radius: 50%; overflow: hidden; border: 8px solid #fff; box-shadow: 0 24px 50px rgba(38, 58, 43, .16); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.leaf { position: absolute; display: block; background: var(--c-green); border-radius: 0 100% 0 100%; }
.leaf--1 { width: 18%; height: 18%; left: -2%; bottom: 8%; transform: rotate(-20deg); opacity: .85; }
.leaf--2 { width: 12%; height: 12%; right: 2%; top: 6%; background: var(--c-yellow); transform: rotate(30deg); }
@media (min-width: 1080px) {
  .hero { padding: 140px 0 120px; }
  .hero__inner { padding: 0 48px; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .hero__lead { font-size: 17px; }
}

/* ===== 演出①（F01）：境目をまたぐ写真 ===== */
.wave { display: block; width: 100%; height: 50px; }
.about { position: relative; z-index: 2; }
.about__bg { background: var(--c-leaf); padding: 48px 0 0; margin-top: -1px; }
.about__inner { display: grid; gap: 40px; }
.about__text p { color: var(--c-ink); }
.about__text p + p { margin-top: 16px; }
.about__photo { margin-bottom: -120px; border-radius: 40px 40px 40px 120px; overflow: hidden; border: 8px solid #fff; box-shadow: 0 24px 50px rgba(38, 58, 43, .16); }
.about__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 900px) {
  .wave { height: 70px; }
  .about__bg { padding-top: 72px; }
  .about__inner { grid-template-columns: 1fr 1.1fr; align-items: end; gap: 64px; }
  .about__text { padding-bottom: 96px; }
  .about__photo { margin-bottom: -160px; }
}

/* ===== 診療案内 ===== */
.service { padding: 200px 0 140px; }
.service__list { display: grid; gap: 16px; }
.service__list li { background: #fff; border-radius: 28px; padding: 24px; display: grid; grid-template-columns: 64px 1fr; gap: 4px 16px; align-items: start; }
.service__list svg { width: 64px; height: 64px; grid-row: span 2; }
.service__list h3 { font-family: var(--font-head); font-weight: 500; font-size: 21px; color: var(--c-ink); }
@media (min-width: 900px) { .service { padding: 240px 0 180px; } .service__list { grid-template-columns: repeat(4, 1fr); gap: 20px; } .service__list li { grid-template-columns: 1fr; text-align: center; justify-items: center; } .service__list svg { width: 80px; height: 80px; grid-row: auto; } }

/* ===== はじめての方へ（猫が境目にすわる） ===== */
.first { position: relative; }
.first__cat { position: absolute; z-index: 3; right: 8vw; top: -120px; width: 140px; filter: drop-shadow(0 10px 10px rgba(38, 58, 43, .25)); }
.first__bg { background: var(--c-accent-text); color: #eef5ec; padding: 56px 0 112px; margin-top: -1px; }
.first__inner { display: grid; gap: 40px; }
.steps { display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.steps span { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--c-yellow); color: var(--c-ink); font-family: var(--font-en); font-weight: 700; font-size: 21px; }
.steps h3 { font-family: var(--font-head); font-weight: 500; font-size: 19px; color: #fff; }
.first__photo { border-radius: 120px 40px 40px 40px; overflow: hidden; border: 8px solid #fff; margin-bottom: -150px; position: relative; z-index: 2; }
.first__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 900px) {
  .first__cat { width: 200px; top: -170px; right: 12vw; }
  .first__bg { padding: 72px 0 140px; }
  .first__inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .first__photo { margin-bottom: -220px; }
}

/* ===== 診療時間・アクセス ===== */
.hours { padding: 200px 0 112px; }
.hours__inner { display: grid; gap: 40px; }
.table-scroll { overflow-x: auto; }
.hours__table { width: 100%; min-width: 340px; border-collapse: separate; border-spacing: 3px; font-size: 15px; }
.hours__table th, .hours__table td { padding: 10px 2px; text-align: center; background: #fff; border-radius: 10px; }
.hours__table thead th { background: var(--c-leaf); color: var(--c-ink); }
.hours__table tbody th { color: var(--c-ink); white-space: nowrap; }
.hours__table td { color: var(--c-accent-text); font-weight: 700; }
.info { margin-top: 24px; }
.info div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px dashed var(--c-line); }
.info dt { font-weight: 700; color: var(--c-ink); }
.hours__photo { border-radius: 50% 50% 32px 32px; overflow: hidden; }
.hours__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.waiting { margin-top: 56px; border-radius: 32px; overflow: hidden; }
.waiting img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (min-width: 900px) { .hours { padding: 280px 0 140px; } .hours__inner { grid-template-columns: 1.2fr 1fr; align-items: center; gap: 64px; } .info div { grid-template-columns: 5em 1fr; gap: 16px; } .waiting img { aspect-ratio: 21 / 8; } }

/* ===== 演出②（G01）：のぞく犬 ===== */
.peek { position: fixed; z-index: 40; right: 0; bottom: 0; width: 96px; pointer-events: none; }
.peek__dog { width: 100%; transform: translateX(14%); filter: drop-shadow(0 6px 10px rgba(38, 58, 43, .25)); }
.peek__bubble { display: none; position: absolute; right: 64px; bottom: 100%; margin-bottom: -6px; width: max-content; max-width: min(230px, calc(100vw - 100px)); background: #fff; color: var(--c-ink); border: 2px solid var(--c-ink); border-radius: 20px 20px 4px 20px; padding: 8px 14px; font-weight: 700; font-size: 15px; line-height: 1.6; box-shadow: 0 8px 20px rgba(38, 58, 43, .15); pointer-events: auto; }
.peek__close { display: none; }
/* JSが動くときだけ、吹き出しと閉じるボタンを出す（JSなしで閉じられない吹き出しを置かない） */
.is-js .peek__bubble { display: block; transition: opacity .3s, transform .3s; }
.is-js .peek__close { display: flex; align-items: center; justify-content: center; position: absolute; right: 10px; bottom: calc(100% + 30px); width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--c-ink); font-size: 0; pointer-events: auto; cursor: pointer; }
.is-js .peek__close::before { content: "×"; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-ink); color: #fff; font-size: 17px; line-height: 1; }
.peek.is-quiet .peek__bubble, .peek.is-quiet .peek__close { opacity: 0; transform: translateY(8px); pointer-events: none; }
.peek.is-away { transform: translateY(110%); transition: transform .5s; }
.peek { transition: transform .5s; }
@media (min-width: 768px) {
  .peek { width: 150px; }
  .peek__bubble { right: 100px; font-size: 16px; max-width: 260px; }
}

/* ===== フッター ===== */
.footer { background: var(--c-ink); color: #eef5ec; padding: 64px 20px 32px; text-align: center; font-size: 15px; }
.footer__logo { font-family: var(--font-head); font-size: 26px; color: #fff; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; margin: 12px 0; }
.footer__nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 700; }
.footer__fiction { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
