/* Brumeのレスポンシブ。共通値→共通部品→17役割の順で編集する。 */

@media (max-width: 75rem) {
  /* 共通デザイン値 */
  [data-template="brume"] {
    --space-inline: 48px;
    --space-grid: 48px;
    --space-card-gap: 32px;
    --font-size-card: 1.375rem;
    --font-size-heading: 2.25rem;
    --font-size-hero-title: 3.25rem;
    --font-size-wordmark: 6rem;
  }
  /* ヘッダー */
  :where([data-section="header"][data-ui="brume"]) .site-header__inner {
    column-gap: var(--space-stack);
  }
  :where([data-section="header"][data-ui="brume"]) .site-nav {
    gap: var(--space-stack);
  }
  /* お悩み */
  :where([data-section="worries"][data-ui="brume"]) {
    --worries-columns: var(--worries-columns-tablet);
  }
  /* 選ばれる理由 */
  :where([data-section="reasons"][data-ui="brume"]) .reasons__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-card-gap) var(--space-stack);
  }
  /* ご利用の流れ */
  :where([data-section="steps"][data-ui="brume"]) .steps__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-card-gap) var(--space-stack);
  }
  /* お問い合わせ */
  :where([data-section="contact"][data-ui="brume"]) {
    --contact-label-width: var(--contact-label-width-tablet);
  }
  :where([data-section="contact"][data-ui="brume"]) .contact__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  :where([data-section="contact"][data-ui="brume"]) .contact__methods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  html {
    scroll-padding-block-start: var(--size-scroll-offset);
  }
  /* 共通デザイン値 */
  [data-template="brume"] {
    --space-inline: 24px;
    --space-section: 40px;
    --space-header-y: 10px;
    --space-header-inline: var(--space-inline);
    --space-footer-y: 40px;
    /* スマホ表示でファーストビュー全体に使う高さ */
    --size-hero-height: 640px;
    --font-size-hero-title: 2.25rem;
    --font-size-wordmark: 4rem;
    --font-size-brand-large: 3rem;
    --space-page-top-x: 4px;
    --space-grid: 40px;
    --space-card-gap: 32px;
    --space-heading: 32px;
    --space-list: 20px;
    --font-size-heading: 1.75rem;
    --font-size-card: 1.375rem;
    --font-size-number: 1.875rem;
    --size-button-width: 256px;
    --space-button-padding: 28px;
  }
  /* Brume共通部品・ページ操作 */
  :where([data-section][data-ui="brume"]) .split-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  /* ボタン・リンクはスマホでは中央にそろえる（めぐ決定 2026-10-31）。ドロワー内のボタンは幅いっぱいのまま */
  :where([data-section][data-ui="brume"]) :is(.button, .text-link) {
    display: flex;
    width: fit-content;
    margin-inline: auto;
  }
  /* スマホヘッダーと右側ドロワー */
  :where([data-section="header"][data-ui="brume"]).site-header {
    position: sticky;
    top: 0;
    z-index: 6;
  }
  body.is-menu-open {
    overflow: hidden;
  }
  :where([data-section="header"][data-ui="brume"]).site-header::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--color-shade);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--motion-duration) var(--motion-easing), visibility var(--motion-duration);
  }
  body.is-menu-open > :where([data-section="header"][data-ui="brume"]).site-header::before {
    opacity: 1;
    visibility: visible;
  }
  /* ヘッダー */
  :where([data-section="header"][data-ui="brume"]) .site-header__inner {
    grid-template-columns: 1fr auto;
  }
  :where([data-section="header"][data-ui="brume"]) .site-header__toggle {
    position: relative;
    z-index: 2;
    display: block;
    grid-column: 2;
    grid-row: 1;
  }
  :where([data-section="header"][data-ui="brume"]) .site-nav {
    position: fixed;
    z-index: 1;
    inset: 0 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--space-stack);
    width: 70%;
    height: 100dvh;
    padding: var(--space-drawer);
    overflow-y: auto;
    background: var(--color-background);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--motion-duration) var(--motion-easing), visibility var(--motion-duration);
  }
  :where([data-section="header"][data-ui="brume"]) .site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  :where([data-section="header"][data-ui="brume"]) .site-nav .button {
    width: 100%;
    padding-inline: var(--space-offset);
  }
  /* ファーストビュー（写真を上、文字を下に重ねる） */
  :where([data-section="hero"][data-ui="brume"]) .hero__media {
    inset-block: 0 auto;
    width: 100%;
    height: 60%;
  }
  :where([data-section="hero"][data-ui="brume"]) .hero__media::after {
    background: linear-gradient(0deg, var(--color-background), var(--color-transparent) 60%);
  }
  :where([data-section="hero"][data-ui="brume"]) .hero__inner {
    align-items: flex-end;
    padding-block-end: var(--space-section);
  }
  /* 本文の幅を画面いっぱいにして、ボタンを画面の中央に置く */
  :where([data-section="hero"][data-ui="brume"]) .hero__copy {
    flex: 1;
    max-width: none;
  }
  :where([data-section="hero"][data-ui="brume"]) .hero__title {
    margin-block-start: var(--space-stack);
  }
  :where([data-section="hero"][data-ui="brume"]) .hero__scroll {
    display: none;
  }
  /* お悩み */
  :where([data-section="worries"][data-ui="brume"]) {
    --worries-columns: var(--worries-columns-sp);
  }
  /* コンセプト */
  :where([data-section="concept"][data-ui="brume"]) .concept__photo {
    position: relative;
    width: 100%;
    height: var(--concept-photo-height-sp);
    margin-block: calc(var(--space-section) * -1) var(--space-section);
  }
  :where([data-section="concept"][data-ui="brume"]) .concept__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  :where([data-section="concept"][data-ui="brume"]) .concept__copy {
    grid-column: 1;
    padding-inline-start: 0;
  }
  /* 選ばれる理由 */
  :where([data-section="reasons"][data-ui="brume"]) .reasons__list {
    grid-template-columns: minmax(0, 1fr);
  }
  /* コース */
  :where([data-section="services"][data-ui="brume"]) .services__list {
    grid-template-columns: minmax(0, 1fr);
  }
  :where([data-section="services"][data-ui="brume"]) .service__content {
    align-items: stretch;
  }
  /* 料金（名前と説明の下に金額） */
  :where([data-section="prices"][data-ui="brume"]) .price-list__row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-small);
    padding-inline: 0;
  }
  /* ギャラリー */
  :where([data-section="gallery"][data-ui="brume"]) .gallery__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: var(--gallery-row-height-sp);
  }
  :where([data-section="gallery"][data-ui="brume"]) .gallery__item:nth-child(1) {
    grid-row: auto;
  }
  :where([data-section="gallery"][data-ui="brume"]) .gallery__item:is(:nth-child(4), :nth-child(5)) {
    grid-column: 1 / -1;
  }
  /* お客様の声 */
  :where([data-section="voices"][data-ui="brume"]) .voices__list {
    grid-template-columns: minmax(0, 1fr);
  }
  :where([data-section="voices"][data-ui="brume"]) .quote {
    padding-block-start: var(--space-stack);
  }
  /* ご利用の流れ */
  :where([data-section="steps"][data-ui="brume"]) .steps__list {
    grid-template-columns: minmax(0, 1fr);
  }
  /* シェフ紹介 */
  :where([data-section="staff"][data-ui="brume"]) .staff__portrait {
    position: relative;
    width: 100%;
    height: var(--staff-portrait-height-sp);
    margin-block: calc(var(--space-section) * -1) var(--space-section);
  }
  :where([data-section="staff"][data-ui="brume"]) .staff__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  :where([data-section="staff"][data-ui="brume"]) .staff__details {
    grid-column: 1;
    padding-inline-start: 0;
  }
  /* よくある質問 */
  :where([data-section="faq"][data-ui="brume"]) .faq__item summary {
    padding-inline: 0;
  }
  :where([data-section="faq"][data-ui="brume"]) .faq__item p {
    padding-inline: calc(var(--space-stack) + 1em) 0;
  }
  /* お知らせ */
  :where([data-section="news"][data-ui="brume"]) .news__list {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-card-gap);
  }
  /* アクセス */
  :where([data-section="access"][data-ui="brume"]) .access__layout {
    grid-template-columns: minmax(0, 1fr);
  }
  :where([data-section="access"][data-ui="brume"]) .access__list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-tiny);
    padding-block: var(--space-small);
  }
  /* 地図の店名は、印の下の中央に置く */
  :where([data-section="access"][data-ui="brume"]) .access__map-label {
    inset: 64% auto auto 50%;
    transform: translateX(-50%);
  }
  /* お問い合わせ */
  :where([data-section="contact"][data-ui="brume"]) .contact__form {
    padding: var(--space-stack);
  }
  :where([data-section="contact"][data-ui="brume"]) .contact__methods {
    grid-template-columns: minmax(0, 1fr);
  }
  :where([data-section="contact"][data-ui="brume"]) .contact__method {
    justify-items: stretch;
  }
  :where([data-section="contact"][data-ui="brume"]) .field {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-tiny);
  }
  /* CTA帯 */
  :where([data-section="cta"][data-ui="brume"]) .cta-band__title {
    font-size: var(--font-size-card);
  }
  /* フッター */
  :where([data-section="footer"][data-ui="brume"]) .site-footer__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-stack);
  }
  :where([data-section="footer"][data-ui="brume"]) .site-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :where([data-section="footer"][data-ui="brume"]) .site-footer__policies {
    justify-content: flex-start;
    padding-block-start: 0;
    border-block-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Brume共通部品・ページ操作 */
  html:has(body[data-template="brume"]) {
    scroll-behavior: auto;
  }
  .page-tools[data-ui="brume"] .page-top {
    transition: none;
  }
  :where([data-section][data-ui="brume"]),
  :where([data-section][data-ui="brume"])::before,
  :where([data-section][data-ui="brume"])::after {
    transition: none !important;
    animation: none !important;
  }
  :where([data-section][data-ui="brume"]) * {
    transition: none !important;
    animation: none !important;
  }
  :where([data-section][data-ui="brume"]) *::before {
    transition: none !important;
    animation: none !important;
  }
  :where([data-section][data-ui="brume"]) *::after {
    transition: none !important;
    animation: none !important;
  }
  :where([data-section][data-ui="brume"]) .text-link:is(:hover, :focus-visible)::after {
    transform: none !important;
  }
  :where([data-section][data-ui="brume"]) .button:is(:hover, :focus-visible)::after {
    transform: none !important;
  }
}
