@font-face {
  font-family: "HiraGoFix";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: local("Hiragino Sans W3"), local("Hiragino Kaku Gothic ProN W3");
}

@font-face {
  font-family: "HiraGoFix";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local("Hiragino Sans W6"), local("Hiragino Kaku Gothic ProN W6");
}

/* WEBガス展の共通スタイル。色はカスタムプロパティで管理する。 */

:root {
  --accent: #e65100;
  --sale-color: #192855;
  --notice-stripe-base: #c34266;
  --notice-stripe-accent: #b9385c;
  --benefit-amount-color: #ffe100;
  --benefit-stripe-base: #218477;
  --benefit-stripe-accent: #187f72;
  --black: #000;
  --button-background: #0090de;
  --button-hover: #c91925;
  --button-hover-shadow: 0 8px 12px rgba(0, 0, 0, 0.35);
  --button-motion-duration: 220ms;
  --button-border: #fff;
  --button-current-background: #333;
  --button-text: #fff;
  --card-background: #fded20;
  --card-divider: #ffe100;
  --card-header-background: #3a9f3a;
  --card-header-alternate-background: #74b550;
  --card-header-text: #fff;
  --card-radius: 18px;
  --card-shadow: rgba(0, 0, 0, 0.3);
  --card-text: #333;
  --category-background: #fff;
  --category-panel-background: #fff;
  --category-text: #0090de;
  --feature-background: #fff;
  --font-base: "HiraGoFix", "Noto Sans JP", Meiryo, "Yu Gothic";
  --gray-border: #aaa;
  --gray-dark: #888;
  --gray-light: #eee;
  --gray-medium: #555;
  --header-news-background: #ac2e3a;
  --heading-background: #444;
  --ink: #111;
  --issue-background: #8620fd;
  --line: #b7b7b7;
  --muted: #666;
  --page-background: #fffacc;
  --photo-background: #fff;
  --price-red: #c91925;
  --ribbon-background: #8a521c;
  --ribbon-fold: #60350f;
  --ribbon-tail: #b47739;
  --ribbon-text: #fff;
  --soft: #f2f2f2;
  --text-base: #333;
  --title-gradient-end: #f1fcff;
  --title-gradient-start: #80dcff;
  --title-text: #145575;
  --white: #fff;
  --font-accent: "Hiragino Mincho ProN", "Hiragino Mincho", "Noto Serif JP", "Yu Mincho";
  --font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
}

/* --- 全体・アクセシビリティー --- */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base), var(--font-emoji), sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a {
  color: inherit;
}

.container {
  padding-inline: 30px;
  width: 100%;
  max-width: none;
}

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

.skip-link {
  position: fixed;
  inset: 10px auto auto 10px;
  z-index: 10;
  padding: 0.6rem 1rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* --- サイトタイトル --- */

.page-header {
  padding-block: 100px;
  border-block-end: 1px solid var(--ink);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 1.15;
  text-align: center;
}

.page-header a {
  text-decoration: none;
}

/* --- トップページ・見積特典 --- */

.top-intro {
  padding-block: 60px 10px;
}

.coloring-notice {
  display: grid;
  place-items: center;
  min-height: 220px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  text-decoration: none;
  color: var(--gray-medium);
  background: var(--gray-light);
  border: 2px solid var(--gray-border);
}

.benefits {
  margin-block-start: 40px;
}

.benefits h2, .exhibition h2, .related-products h2, .survey h2 {
  margin: 0 0 24px;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.4;
}

.benefits ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefits li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px 20px;
}

.benefits span {
  font-weight: 700;
}

/* --- 商品ナビゲーション --- */

.filter-panel {
  padding-block-start: 50px;
}

.all-page .filter-panel {
  padding-block-end: 100px;
}

.filter-group + .filter-group {
  margin-block-start: 32px;
}

.filter-group h2 {
  margin: 0 0 14px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-buttons a {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
  color: var(--button-text);
  background: var(--button-background);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

/* --- 商品一覧・カード --- */

.exhibition {
  padding-block: 60px 100px;
}

.material-page .exhibition, .issue-page .exhibition {
  padding-block-end: 40px;
}

.card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  min-width: 0;
}

.card article {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.card-header {
  padding: 18px 20px;
  border-block-end: 1px solid var(--ink);
}

.card-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.card-body {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 0.75rem;
  padding: 18px 20px;
}

.card-body p {
  margin: 0;
}

.product-issue {
  font-size: 0.9rem;
  font-weight: 700;
}

.product-issue span {
  color: var(--accent);
}

.product-model, .product-price {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.product-model span, .product-price span {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.product-pr {
  padding-block-start: 0.65rem;
  font-size: 0.92rem;
  border-block-start: 1px solid var(--line);
}

.card-footer {
  display: grid;
  place-items: center;
  padding: 18px 20px;
  border-block-start: 1px solid var(--ink);
}

.card-footer a {
  display: block;
  padding: 0.7rem 1.25rem;
  width: 100%;
  max-width: 260px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.related-products {
  padding-block: 20px 100px;
}

/* --- アンケート --- */

.survey {
  padding-block: 60px 100px;
}

.survey .container {
  margin-inline: auto;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--muted);
}

.survey-note {
  margin: -10px 0 32px;
}

.survey form {
  display: grid;
  gap: 28px;
}

.survey fieldset {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--ink);
}

.survey legend {
  padding-inline: 8px;
  font-weight: 700;
}

.choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.choice-list label {
  cursor: pointer;
}

.survey button {
  justify-self: center;
  padding: 0.75rem 1.5rem;
  min-width: 220px;
  min-height: 50px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.survey button:hover, .survey button:focus-visible {
  color: var(--button-text);
  background: var(--button-background);
  filter: brightness(0.94);
}

.survey-disclosure {
  margin: 24px 0 0;
  font-size: 0.9rem;
  text-align: center;
  color: var(--muted);
}

.survey-disclosure span {
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .card-list, .benefits ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1025px) {
  .card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .benefits ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .card-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 商品写真：全体を正方形の枠内に表示 */

.product-photo {
  margin: 0;
}

.product-photo img {
  display: block;
  margin-inline: auto;
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--white);
}

.product-photo figcaption {
  margin-block-start: 4px;
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: right;
  color: var(--card-text);
}

/* --- 商品カードの配色と価格表示 --- */

body {
  color: var(--text-base);
  background: var(--page-background);
}

.page-header {
  background: linear-gradient(to bottom, var(--title-gradient-start), var(--title-gradient-end));
  border: 0;
}

.page-header h1 {
  color: var(--title-text);
}

.filter-group h2, .exhibition h2, .related-products h2, .benefits h2, .survey h2 {
  color: var(--text-base);
}

.benefits li {
  color: var(--white);
  background: var(--heading-background);
  border: 0;
}

.filter-buttons a {
  color: var(--button-text);
  background: var(--button-background);
  border-color: transparent;
}

.filter-buttons a:hover, .filter-buttons a:focus-visible {
  color: var(--button-text);
  background: var(--button-background);
  filter: brightness(0.94);
}

.filter-buttons a[aria-current="page"] {
  color: var(--button-text);
  background: var(--button-current-background);
  box-shadow: none;
}

.card-list {
  column-gap: 20px;
}

.card {
  display: flex;
}

.card article {
  width: 100%;
  min-width: 0;
  background: var(--card-background);
  border: 0;
  border-radius: var(--card-radius);
  box-shadow: 0 6px 12px var(--card-shadow);
}

.card-header {
  color: var(--card-header-text);
  background-color: var(--card-header-background);
  background-image: url("../images/header-paint-texture.webp");
  background-position: center;
  background-size: cover;
  background-blend-mode: multiply;
  border: 0;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.card-list > .card:nth-child(odd) .card-header {
  background-color: var(--card-header-alternate-background);
}

.card-title {
  font-weight: 700;
}

.product-photo {
  padding: 9px 10px;
  color: var(--card-text);
  background: var(--photo-background);
}

.card-body {
  color: var(--card-text);
  background: var(--card-background);
  border-top: 5px solid var(--card-divider);
}

.card-body .product-issue {
  font-size: 0.9rem;
  font-weight: 400;
}

.card-body .product-label, .product-model > span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--card-text);
}

.product-issue .issue-badge {
  display: inline-block;
  margin-block-start: 4px;
  padding: 4px 9px;
  width: fit-content;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--white);
  background: var(--issue-background);
}

.product-model {
  font-size: 16px;
  font-weight: 700;
  color: var(--card-text);
}

.product-price {
  min-width: 0;
  font-weight: 400;
  overflow-wrap: normal;
}

.product-price .list-price {
  display: block;
  margin-block: 3px 4px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--gray-medium);
}

.list-price .list-price-amount {
  display: inline;
  font-size: 2em;
  font-weight: 700;
}

.product-price .price-value {
  display: flex;
  align-items: baseline;
  width: 100%;
  min-width: 0;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--price-red);
}

.price-amount {
  flex: 0 0 auto;
  font-size: var(--price-font-size, 18px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.product-price .price-tax {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--price-red);
}

.product-price .price-note {
  display: block;
  margin-block-start: 7px;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray-medium);
}

.product-pr {
  border: 0;
}

.card-footer {
  color: var(--card-text);
  background: var(--card-background);
  border: 0;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

.card-footer a {
  color: var(--button-text);
  background: var(--button-background);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 8px var(--card-shadow);
}

.card-footer a:hover, .card-footer a:focus-visible {
  color: var(--button-text);
  background: var(--button-background);
  filter: brightness(0.94);
}

.survey {
  color: var(--text-base);
}

.survey fieldset {
  border-color: var(--gray-dark);
}

.survey .eyebrow, .survey-disclosure {
  color: var(--gray-medium);
}

.survey button {
  color: var(--button-text);
  background: var(--button-background);
  border: 0;
}

/* 同じ横列のカードでタイトル・写真・価格・ボタンの位置を揃える */

@supports (grid-template-rows: subgrid) {
  .card-list {
    row-gap: 0;
  }

  .card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 7;
    margin-block-end: 20px;
  }

  .card article {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 7;
    row-gap: 0;
  }

  .card-body {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
    row-gap: 0;
    padding-block: 18px;
  }

  .card-body > p {
    padding-block-end: 14px;
  }

  .card-body > .product-pr {
    padding-block-end: 0;
  }

  .card-footer {
    align-content: end;
  }
}

@media (max-width: 479px) {
  .container {
    padding-inline: 18px;
  }

  .card-header, .card-body, .card-footer {
    padding-inline: 16px;
  }

  .product-photo {
    padding-inline: 8px;
  }
}

/* 通貨単位は金額より小さく表示 */

.product-price .price-amount .price-currency {
  display: inline;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--price-red);
}

/* 2026-10-07 商品資料更新 */

.product-price .list-price {
  min-height: 2.8em;
  line-height: 1.4;
  white-space: normal;
}

.product-photo-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  aspect-ratio: 1 / 1;
}

.product-photo-pair img {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* --- 商品カテゴリーとWeb見積特典 --- */

.all-page .benefits, :is(.all-page, .survey-page) .filter-group {
  text-align: center;
}

.all-page .benefits ul {
  margin-inline: auto;
  max-width: 1100px;
}

.all-page .benefits li {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

:is(.all-page, .survey-page) .filter-buttons {
  justify-content: center;
  gap: 16px;
}

:is(.all-page, .survey-page) .filter-buttons a {
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 20px 12px;
  width: 180px;
  color: var(--button-text);
  background: var(--button-background);
  border-radius: 24px;
}

:is(.all-page, .survey-page) .filter-buttons a img {
  display: block;
  flex: none;
  width: 80px;
  height: 80px;
  object-fit: contain;
}

:is(.all-page, .survey-page) .filter-buttons a:hover, :is(.all-page, .survey-page) .filter-buttons a:focus-visible {
  color: var(--button-text);
  background: var(--button-background);
  border-color: transparent;
  filter: brightness(0.94);
}

@media (max-width: 479px) {
  :is(.all-page, .survey-page) .filter-buttons a {
    padding-inline: 6px;
    width: calc((100% - 16px) / 2);
    font-size: 14px;
    color: var(--button-text);
    background: var(--button-background);
  }
}

/* 商品一覧・生活課題ページのナビゲーション */

:is(.material-page, .issue-page) .filter-group {
  text-align: center;
}

:is(.material-page, .issue-page) .filter-buttons {
  justify-content: center;
}

:is(.material-page, .issue-page) .filter-buttons a {
  color: var(--button-text);
  background: var(--button-background);
  border-radius: 24px;
}

:is(.material-page, .issue-page) .filter-buttons a:hover,
:is(.material-page, .issue-page) .filter-buttons a:focus-visible {
  color: var(--button-text);
  background: var(--button-background);
  border-color: transparent;
  filter: brightness(0.94);
}

:is(.material-page, .issue-page) .filter-buttons a[aria-current="page"] {
  color: var(--button-text);
  background: var(--button-current-background);
  box-shadow: none;
}

/* トップページ以外のタイトル領域 */

body:not(.all-page) .page-header {
  display: flex;
  align-items: center;
  padding-block: 0;
  height: 150px;
}

body:not(.all-page) .page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

/* 選択を促す見出し */

.filter-group h2.selection-heading {
  color: var(--price-red, var(--price-red));
}

/* 選択した商品カテゴリーを次の画面でも表示 */

.survey-page .filter-buttons a[aria-current="page"],
.issue-page .filter-buttons a[aria-current="true"] {
  color: var(--button-text);
  background: var(--button-current-background);
  box-shadow: none;
}

/* 商品価格・訴求文・構成品写真の調整 */

.card-body > .product-pr {
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--card-text);
  background: var(--feature-background);
  border: 0;
  border-radius: 12px;
}

.product-photo-composition {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 1;
}

.product-photo-composition > div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  min-height: 0;
}

.product-photo-composition img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.product-photo-composition .photo-remote {
  height: 50%;
}

.product-photo-heating {
  grid-template-rows: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-photo-heating .photo-remote {
  grid-column: 1 / -1;
  align-items: flex-start;
  justify-self: center;
  gap: 4px;
  width: 44%;
  height: 100%;
}

.product-photo-heating .photo-remote img {
  flex: 1 1 0;
  min-width: 0;
}

@supports (grid-template-rows: subgrid) {
  .card {
    grid-row: span 4;
  }

  .card article {
    grid-row: span 4;
  }

  .card-body {
    grid-template-rows: auto;
    grid-row: span 1;
    align-content: start;
  }
}

.product-photo-heating .photo-main img {
  width: 75%;
}

/* 機器同士の間隔を詰め、リモコンを見やすく表示 */

.product-photo-heating .photo-main, .product-photo-heating .photo-dryer {
  align-items: flex-end;
}

.product-photo-heating img {
  height: auto;
}

/* --- 商品一覧のリボン見出し --- */

:is(.exhibition, .benefits, .survey) h2, .related-products h2 {
  position: relative;
  isolation: isolate;
  margin-inline: auto;
  margin-block-end: 70px;
  padding: 0;
  width: fit-content;
  max-width: calc(100% - 96px);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--ribbon-text);
  background: transparent;
}

/* --- センターリボン：中央の帯・切り込みのある垂れ・折り返し --- */

:is(.exhibition, .benefits, .survey) h2::before, .related-products h2::before,
:is(.exhibition, .benefits, .survey) h2::after, .related-products h2::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -10px;
  z-index: -1;
  width: 68px;
  background: var(--ribbon-tail);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%);
}

:is(.exhibition, .benefits, .survey) h2::before, .related-products h2::before {
  left: -48px;
}

:is(.exhibition, .benefits, .survey) h2::after, .related-products h2::after {
  right: -48px;
  transform: scaleX(-1);
}

:is(.exhibition, .benefits, .survey) h2 > span, .related-products h2 > span {
  display: block;
  position: relative;
  padding: 9px 20px;
  background: var(--ribbon-background);
  border-radius: 4px;
  box-shadow: 0 3px 0 var(--ribbon-fold);
}

:is(.exhibition, .benefits, .survey) h2 > span::before, .related-products h2 > span::before,
:is(.exhibition, .benefits, .survey) h2 > span::after, .related-products h2 > span::after {
  content: "";
  position: absolute;
  top: 100%;
  width: 18px;
  height: 10px;
  background: var(--ribbon-fold);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

:is(.exhibition, .benefits, .survey) h2 > span::before, .related-products h2 > span::before {
  left: 0;
}

:is(.exhibition, .benefits, .survey) h2 > span::after, .related-products h2 > span::after {
  right: 0;
  transform: scaleX(-1);
}

/* --- トップのカテゴリー：白地・青い枠・影 --- */

.all-page .filter-buttons a,
.all-page .filter-buttons a:hover,
.all-page .filter-buttons a:focus-visible {
  color: var(--category-text);
  background: var(--category-background);
  border: 2px solid var(--button-background);
  box-shadow: 0 5px 9px var(--card-shadow);
  filter: none;
}

/* --- アンケート --- */

.survey-page {
  background: var(--white);
}

/* --- Rinnaiの給湯器本体とリモコンの比率 --- */

.product-photo-ufb-rinnai {
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr);
}

.product-photo-ufb-rinnai .photo-main img {
  width: 90%;
  height: 90%;
}

.product-photo-ufb-rinnai .photo-remote {
  height: 60%;
}

/* --- 商品名の補足と注記 --- */

.card-title-detail {
  font-weight: 400;
}

.card-title-note {
  display: block;
  font-weight: 400;
}

/* --- 選択見出しの左右の案内マーク --- */

.filter-group h2.selection-heading {
  display: grid;
  grid-template-columns: auto minmax(0, auto) auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.selection-heading > span[aria-hidden] {
  font-size: 0.55em;
  white-space: nowrap;
}

@media (max-width: 479px) {
  :is(.exhibition, .benefits, .survey) h2 > span, .related-products h2 > span {
    padding-inline: 16px;
  }
}

/* --- トップ・商品ページに共通する背景 --- */

.all-page > main, .page-content {
  position: relative;
  isolation: isolate;
  background-image: url("../images/bg.svg");
  background-repeat: repeat;
  background-position: left top;
  background-size: 300px 300px;
}

.all-page > main::before, .page-content::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../images/header-paint-texture.webp");
  background-repeat: repeat;
  background-position: left top;
  background-size: 600px 400px;
  mix-blend-mode: screen;
  filter: invert(1);
  pointer-events: none;
}

/* --- タイトルロゴ --- */

.site-title img {
  display: block;
  margin-inline: auto;
  width: min(100%, 380px);
  height: auto;
}

body:not(.all-page) .site-title img {
  width: auto;
  max-width: 100%;
  height: 126px;
  object-fit: contain;
}

/* --- 本文・フッターの明るい筆跡 --- */

.card-body, .card-footer {
  position: relative;
  isolation: isolate;
}

.card-body::before, .card-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../images/header-paint-texture.webp");
  background-position: center;
  background-size: cover;
  border-radius: inherit;
  mix-blend-mode: screen;
  filter: invert(1);
  pointer-events: none;
}

/* --- 選択見出しとボタンをつなぐ白い枠 --- */

.filter-group {
  margin-inline: auto;
  width: fit-content;
  max-width: 100%;
  filter: drop-shadow(0 5px 7px var(--card-shadow));
}

.filter-group h2 {
  margin: 0 auto;
  padding: 15px;
  width: fit-content;
  max-width: calc(100% - 68px);
  background: var(--white);
  border-radius: 18px 18px 0 0;
}

.filter-group .filter-buttons {
  padding: 15px;
  background: var(--white);
  border-radius: 999px;
}

.all-page .filter-group .filter-buttons {
  border-radius: 39px;
}

.all-page .filter-group h2 {
  max-width: calc(100% - 40px);
}

@media (max-width: 767px) {
  .filter-group .filter-buttons {
    border-radius: 39px;
  }
}

/* --- 選択ボタンのホバー --- */

:is(.material-page, .issue-page) .filter-buttons a:hover,
:is(.material-page, .issue-page) .filter-buttons a:focus-visible {
  background: var(--button-hover);
  filter: none;
}

.all-page .filter-buttons a:hover,
.all-page .filter-buttons a:focus-visible {
  border-color: var(--button-hover);
}

/* --- トップの商品カテゴリー枠を不透明な純白に固定 --- */

.all-page .filter-group h2,
.all-page .filter-group .filter-buttons {
  background: var(--category-panel-background);
}

/* --- カードボタンの右向きマーク --- */

.card-footer a {
  position: relative;
  padding-inline: 36px;
}

.card-footer a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--button-text);
  border-right: 2px solid var(--button-text);
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

/* --- 共通ボタンの浮き上がりと色のアニメーション --- */

:is(.all-page, .material-page, .issue-page, .survey-page)
:is(.filter-buttons a, .card-footer a, .header-home-button, .survey button, .nurie-button) {
  transition: background-color var(--button-motion-duration) ease,
    border-color var(--button-motion-duration) ease,
    box-shadow var(--button-motion-duration) ease,
    transform var(--button-motion-duration) ease;
}

:is(.all-page, .material-page, .issue-page, .survey-page)
:is(.filter-buttons a, .card-footer a, .header-home-button, .survey button, .nurie-button):is(:hover, :focus-visible) {
  background-color: var(--button-hover);
  box-shadow: var(--button-hover-shadow);
  transform: translateY(-3px);
  filter: none;
}

.all-page .filter-group .filter-buttons a:is(:hover, :focus-visible) {
  background-color: var(--category-background);
  border-color: var(--button-hover);
}

@media (prefers-reduced-motion: reduce) {
  :is(.all-page, .material-page, .issue-page, .survey-page)
  :is(.filter-buttons a, .card-footer a, .header-home-button, .survey button, .nurie-button) {
    transition: none;
  }

  :is(.all-page, .material-page, .issue-page, .survey-page)
  :is(.filter-buttons a, .card-footer a, .header-home-button, .survey button, .nurie-button):is(:hover, :focus-visible) {
    transform: none;
  }
}

/* --- タイトルロゴと左右のご案内 --- */

.page-header .title-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin-inline: auto;
  max-width: 1200px;
}

.title-message, .title-period {
  margin: 0;
  font-size: clamp(14px, 1.8vw, 24px);
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  overflow-wrap: anywhere;
  color: var(--title-text);
  word-break: keep-all;
}

body:not(.all-page) .page-header .title-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px) minmax(0, 1fr);
}

body:not(.all-page) .site-title img {
  width: 100%;
  height: auto;
  max-height: 126px;
}

@media (max-width: 767px) {
  .page-header .title-layout,
  body:not(.all-page) .page-header .title-layout {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 1.9fr) minmax(0, 1fr);
    gap: 8px;
  }

  .title-message, .title-period {
    font-size: 12px;
  }
}

/* --- ぬりえ告知と見積特典のストライプカード --- */

.coloring-notice, .benefits li {
  font-weight: 700;
  color: var(--white);
  background-image: repeating-linear-gradient(45deg,
    var(--stripe-base) 0 10px, var(--stripe-accent) 10px 20px);
  border: 0;
  border-radius: var(--card-radius);
  box-shadow: 0 6px 12px var(--card-shadow);
}

.coloring-notice {
  --stripe-base: var(--notice-stripe-base);
  --stripe-accent: var(--notice-stripe-accent);
}

.benefits {
  margin-block-start: 60px;
}

.benefits li {
  --stripe-base: var(--benefit-stripe-base);
  --stripe-accent: var(--benefit-stripe-accent);
}

.benefit-discount {
  white-space: nowrap;
}

.benefit-amount {
  margin-inline-end: 4px;
  font-size: clamp(36px, 3.4vw, 48px);
  line-height: 1.2;
  color: var(--benefit-amount-color);
}

/* --- クレヨン画のメインビジュアル背景 --- */

.page-header {
  background-image: url("../images/hero-background-crayon-v3.webp");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
}

body:not(.all-page) .page-header {
  min-height: 150px;
}

@media (max-width: 767px) {
  .page-header {
    background-position: 60% bottom;
  }
}

/* --- セール期間・65周年のご案内 --- */

.page-header {
  position: relative;
}

.anniversary-logo {
  position: absolute;
  top: 12px;
  left: 24px;
  width: 110px;
  height: auto;
}

body:not(.all-page) .anniversary-logo {
  top: 8px;
  left: 12px;
  width: 54px;
}

.anniversary-number {
  font-size: 1.5em;
  line-height: 1;
}

.message-particle {
  font-size: 0.7em;
}

.title-period {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--sale-color);
}

.sale-label {
  padding: 4px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--white);
  background: var(--sale-color);
  border-radius: 8px;
}

.sale-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.sale-date {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.date-number {
  font-size: 30px;
  line-height: 1.2;
}

.date-unit, .date-separator {
  font-size: 12px;
}

.date-weekday {
  display: inline-grid;
  place-items: center;
  align-self: center;
  margin-inline-start: 3px;
  width: 24px;
  height: 24px;
  font-size: 13px;
  line-height: 1;
  color: var(--white);
  background: var(--sale-color);
  border-radius: 50%;
}

/* --- ぬりえコンテスト --- */

.coloring-notice.nurie {
  grid-template-columns: 1fr 220px 1.25fr;
  gap: 24px;
  padding: 32px;
  font-size: 18px;
  text-align: center;
}

.nurie h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.5;
}

.nurie-image {
  display: block;
  width: 100%;
  height: auto;
}

.nurie-content p {
  margin: 0 0 24px;
}

.nurie-period {
  display: inline-block;
  margin-block-start: 12px;
  font-size: 16px;
}

.nurie-button {
  display: inline-block;
  padding: 12px 28px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--button-text);
  background: var(--button-background);
  border-radius: 999px;
  box-shadow: 0 4px 8px var(--card-shadow);
}

@media (max-width: 767px) {
  .all-page .page-header {
    padding-block: 76px 32px;
  }

  .page-header .title-layout,
  body:not(.all-page) .page-header .title-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }

  .page-header .site-title {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .site-title img {
    width: 200px;
  }

  body:not(.all-page) .site-title img {
    width: 180px;
  }

  .anniversary-logo {
    top: 12px;
    left: 12px;
    width: 70px;
  }

  body:not(.all-page) .anniversary-logo {
    width: 44px;
  }

  .title-message {
    font-size: 14px;
  }

  .title-period {
    gap: 3px;
  }

  .sale-label {
    padding: 3px 8px;
    font-size: 11px;
  }

  .date-number {
    font-size: 20px;
  }

  .date-unit, .date-separator {
    font-size: 10px;
  }

  .date-weekday {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .coloring-notice.nurie {
    grid-template-columns: 1fr;
    padding: 24px 18px;
  }

  .nurie-image {
    max-width: 220px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .page-header .title-layout,
  body:not(.all-page) .page-header .title-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

/* --- 背景上の案内文字の輪郭 --- */

.title-message, .sale-dates {
  text-shadow: -1px -1px 0 var(--white), 1px -1px 0 var(--white),
    -1px 1px 0 var(--white), 1px 1px 0 var(--white);
}

.sale-label, .date-weekday {
  text-shadow: none;
  outline: 1px solid var(--white);
}

@media (max-width: 589px) {
  .all-page .filter-group h2 {
    margin-block-end: -1px;
    position: relative;
    padding-inline: 8px;
    font-size: 18px;
  }

  .all-page .filter-group h2::after {
    position: absolute;
    right: 0;
    bottom: -24px;
    left: 0;
    height: 24px;
    background: var(--white);
    content: "";
  }

  .all-page .filter-group .filter-buttons {
    position: relative;
  }
}

@media (max-width: 767px) {
  body:not(.all-page) .page-header .title-layout {
    gap: 6px;
  }

  body:not(.all-page) .site-title img {
    width: 240px;
    max-width: calc(100% - 60px);
  }

  body:not(.all-page) .title-message {
    font-size: 12px;
  }

  body:not(.all-page) .sale-label {
    font-size: 10px;
  }

  body:not(.all-page) .date-number {
    font-size: 18px;
  }

  body:not(.all-page) :is(.date-unit, .date-separator) {
    font-size: 9px;
  }

  body:not(.all-page) .date-weekday {
    width: 16px;
    height: 16px;
    font-size: 9px;
  }
}

/* --- アンケート確認用の案内 --- */

.survey-test-notice {
  padding: 12px;
  text-align: center;
  color: var(--text-base);
  background: var(--page-background);
}
