/* =========================================================
   シニアペットケア — 全ページ共通スタイル（信頼性ページ含む集約）
   カラートークン・コントラスト比は SPEC §5.1 の確定値
   ========================================================= */

:root {
  --bg:        #FFF9F3;  /* ページ背景 */
  --bg-soft:   #FBEEDD;  /* カード内ボックス背景 */
  --white:     #FFFFFF;  /* カード背景 */
  --text:      #4A3528;  /* 本文（既定文字色） */
  --text-soft: #6E5236;  /* 補助文字（説明・キャプション） */
  --accent:    #A65A3A;  /* ボタン背景・リンク文字・強調（白文字を載せる面） */
  --accent-hover:#8F4A2E;/* ボタンhover背景 */
  --accent-soft:#C9886B; /* 装飾専用：枠線/hover縁。文字色には使わない */
  --border:    #E7D3BD;  /* 枠線（装飾） */
  --footer-bg: #3D2A1E;  /* フッター背景 */
  --footer-text:#FFFFFF; /* フッター本文 */
  --footer-soft:#E6D2BE; /* フッター補助文字 */
  --error:     #B3261E;  /* エラー文字 */
  --shadow:0 2px 10px rgba(74,53,40,.08);
  --shadow-hover:0 6px 18px rgba(74,53,40,.15);
  --radius:16px; --radius-sm:10px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%; /* 16px 基準 */
  scroll-behavior: smooth;
}

[id] { scroll-margin-top: 16px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.7;
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.4; color: var(--text); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); } /* リンク文字は白/ページ背景上のみ（bg-soft上には置かない） */

p { margin: 0 0 1rem; }

/* ---------- Focus visibility (all interactive elements) ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Site header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.site-header__inner {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.site-header__logo {
  display: inline-block;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  line-height: 1.3;
  min-height: 48px;
  padding: 0.25rem 0;
}
.site-header__tagline {
  margin: 0.25rem 0 0;
  color: var(--text-soft);
  font-size: 1rem;
}

/* ---------- PR banner ---------- */
.pr-banner {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.pr-banner__text {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  color: var(--text-soft);  /* on bg-soft: 6.29:1 */
  font-size: 1rem;
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(180deg, rgba(251, 238, 221, 0.86), rgba(255, 249, 243, 0.93)),
    url("images/pattern-paws.webp");
  background-size: cover, 300px;
  background-repeat: no-repeat, repeat;
  padding: 2.5rem 0 2rem;
  text-align: center;
}
.hero__art {
  display: block;
  margin: 0 auto 1.25rem;
  max-width: 760px;
}
.hero__art img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero__title {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
}
.hero__accent { color: var(--accent); }
.hero__lead {
  max-width: 40rem;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 1.0625rem;
}

/* ---------- Generic section ---------- */
.section { padding: 2.25rem 0; }
.section__title {
  text-align: center;
  margin: 0 0 0.5rem;
}
.section__subtitle {
  text-align: center;
  color: var(--text-soft);
  margin: 0 auto 1.5rem;
  max-width: 42rem;
}

/* ---------- Age tool ---------- */
.age-tool {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  max-width: 720px;
  margin: 0 auto;
}
.age-tool__head {
  text-align: center;
  margin: 0 0 0.5rem;
}
.age-tool__sub {
  text-align: center;
  color: var(--text-soft);
  margin: 0 0 1.5rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.form-group {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group__label {
  font-weight: 700;
  color: var(--text);
}
.form-group__select,
.form-group__input {
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  font-size: 1.0625rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-sm);
}

.age-tool__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--white);            /* on accent: 5.07:1 */
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.age-tool__button:hover { background: var(--accent-hover); }

/* result panel */
.age-result {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.age-result--active { display: block; }
.age-result__stage {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.age-result__human {
  margin: 0 0 0.75rem;
  color: var(--text-soft);   /* on bg-soft: 6.29:1 */
  font-size: 1.0625rem;
}
.age-result__human-num {
  font-weight: 700;
  color: var(--text);
  font-size: 1.5rem;
}
.age-result__summary {
  margin: 0 0 1rem;
  color: var(--text);
}
.age-result__list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--text);
}
.age-result__list li { margin-bottom: 0.4rem; }
.age-result__rec-label {
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.age-result__rec {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.age-result__rec a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.4rem 0.9rem;
  background: var(--white);   /* accent text on white: 5.07:1 */
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
}
.age-result__rec a:hover { border-color: var(--accent); }
.age-result__error {
  margin: 0;
  color: var(--error);
  font-weight: 700;
}
.age-result__note {
  margin: 1rem 0 0;
  color: var(--text-soft);
  font-size: 1rem;
}

/* static "まず受診" note placed under the tool */
.age-result__note--static {
  color: var(--text-soft);
  max-width: 720px;
  margin: 1rem auto 0;
  text-align: center;
  font-size: 1rem;
}

/* ---------- Category grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.category-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 48px;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
}
.category-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-soft);
}
.category-card__icon {
  width: 72px;
  height: 72px;
  margin-bottom: 0.25rem;
}
.category-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.category-card__title {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.0625rem;
}
.category-card__desc {
  color: var(--text-soft);
  font-size: 1rem;
}

/* ---------- Filter chips ---------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);       /* on white: 5.07:1 */
  background: var(--white);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip--active {
  color: var(--white);        /* on accent: 5.07:1 */
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- Product sections / cards ---------- */
.product-section { padding: 1.5rem 0; }
.product-section__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
}
.product-section__icon { width: 40px; height: 40px; flex: 0 0 auto; }
.product-section__icon img { width: 100%; height: 100%; object-fit: contain; }
.product-section__title { margin: 0; }
.rec-icon { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; }

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.product-card:hover { box-shadow: var(--shadow-hover); }
.product-card__media {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}
.product-card__media img { width: 100%; height: 100%; object-fit: contain; }
.product-card__media--empty { background: var(--bg-soft); }
.product-card__name {
  margin: 0 0 0.6rem;
  font-size: 1.0625rem;
  color: var(--text);
}
.product-card__attrs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0 0 0.75rem;
}
.attr-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.9375rem;
  color: var(--text-soft);    /* on bg-soft: 6.29:1 — never accent here */
  background: var(--bg-soft);
  border-radius: 999px;
}
.product-card__criteria {
  margin: 0 0 0.75rem;
  color: var(--text);
}
.product-card__pros,
.product-card__cons {
  margin: 0 0 0.6rem;
}
.product-card__pros ul,
.product-card__cons ul {
  margin: 0.2rem 0 0;
  padding-left: 1.25rem;
  color: var(--text);
}
.product-card__pros ul li { margin-bottom: 0.2rem; }
.product-card__cons ul li { margin-bottom: 0.2rem; color: var(--text-soft); }
.product-card__fit {
  margin: 0.4rem 0 0.6rem;
  color: var(--text-soft);
  font-size: 1rem;
}
.product-card__source {
  margin: 0 0 0.9rem;
  color: var(--text-soft);
  font-size: 0.9375rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.6rem;
}
.product-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: auto;
  padding: 0.75rem 1.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--white);        /* on accent: 5.07:1 */
  background: var(--accent);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.product-card__cta:hover { background: var(--accent-hover); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 3rem;
  padding: 2.5rem 0;
}
.site-footer .container { color: var(--footer-text); }
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.25rem;
}
.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--footer-text);  /* on footer-bg: 13.56:1 */
  text-decoration: underline;
}
.site-footer__nav a:hover { color: var(--footer-soft); }
.site-footer__disclosure {
  font-weight: 700;
  color: var(--footer-text);
  margin: 0 0 1rem;
}
.site-footer__note {
  color: var(--footer-soft);  /* on footer-bg: 9.25:1 */
  font-size: 1rem;
  margin: 0 0 1rem;
}
.site-footer__updated,
.site-footer__copy {
  color: var(--footer-soft);
  font-size: 0.9375rem;
  margin: 0.25rem 0 0;
}

/* ---------- Legal / trust pages ---------- */
.legal-page {
  max-width: 760px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.legal-page__title {
  margin: 0 0 1.25rem;
}
.legal-page h2 { margin: 1.75rem 0 0.75rem; }
.legal-page h3 { margin: 1.25rem 0 0.5rem; }
.legal-page p,
.legal-page li { color: var(--text); }
.legal-page a { color: var(--accent); } /* on white: 5.07:1 */
.legal-page__updated {
  margin-top: 2rem;
  color: var(--text-soft);
  font-size: 0.9375rem;
}
.ref-list {
  padding-left: 1.25rem;
}
.ref-list li { margin-bottom: 0.75rem; color: var(--text); }
.ref-list a { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero__title { font-size: 1.5rem; }
  .form-group { flex: 1 1 100%; }
}

/* ===== お問い合わせフォーム ===== */
.contact-form { margin: 1.25rem 0 1.5rem; display: flex; flex-direction: column; gap: 1rem; max-width: 38rem; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field__label { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.form-field__req { color: var(--accent); font-weight: 700; }
.form-field__input {
  width: 100%; padding: 0.7rem 0.8rem; font-size: 1rem; color: var(--text);
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit;
}
.form-field__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea.form-field__input { resize: vertical; min-height: 7rem; }
.form-field__note { margin: 0; font-size: 0.85rem; color: var(--text-soft); }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__submit {
  align-self: flex-start; min-height: 48px; padding: 0.75rem 2rem; font-size: 1rem; font-weight: 700;
  color: #fff; background: var(--accent); border: none; border-radius: var(--radius-sm); cursor: pointer;
}
.contact-form__submit:hover { background: var(--accent-hover); }
.contact-form__submit:disabled { opacity: 0.6; cursor: default; }
.contact-form__submit:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.contact-form__status { margin: 0; font-size: 0.95rem; min-height: 1.2em; }
.contact-form__status--ok { color: #2E7D32; font-weight: 700; }
.contact-form__status--error { color: var(--error); font-weight: 700; }
.cf-turnstile { margin: 0.25rem 0; }

/* ===== 記事一覧 ===== */
.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; max-width: 48rem; }
.article-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.article-card__link { display: block; padding: 1rem 1.25rem; min-height: 48px; color: var(--accent); text-decoration: none; font-weight: 700; }
.article-card:hover { box-shadow: var(--shadow-hover); border-color: var(--accent-soft); }
