@charset "utf-8";

/*
 * REGINA / お客様とのお約束
 * 現在のHTML・JavaScriptに合わせて整理した置換用CSS。
 * スマホを基本とし、各セクション内の @media でPCを調整します。
 *
 * よく使う調整箇所（検索用）
 * --grace-body-size       本文の文字サイズ（スマホ／PC）
 * --grace-fade            背景動画の切替時間：300ms
 * .grace-story__veil      動画の暗幕：opacity 0.4
 * --grace-layout-width    PC本文＋タイトルの幅：640px
 * --grace-title-lead      PC番号からタイトルまでの高さ：90px
 * .grace-story__copy      本文と縦書きタイトルの間隔
 * .grace-reveal           目次・結びの表示時間：1.6s
 * .grace-closing          動画の下の余白
 * .grace-index__illust img イラストの位置
 *
 * 画像・動画URLとHTML・JavaScriptは変更不要。
 * 共通フッター用の :root 変数を保持しています。
 */

/* =========================================================
   01 基本設定・共通タイポグラフィ
   ========================================================= */

:root {
  --color-primary: #1E2A44;
  --color-secondary: #C6B7A3;
  --color-accent: #F5F4F0;
  --color-frame: #CCCCCC;
  --color-text: #444444;
  --color-back: #E8D5CC;
  --color-light: #F5F5F5;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-sand: #B4A27B;
  --color-pink: #D8A7A7;
  --color-mint: #A8C3A3;
  --color-blue: #A7C6D8;
  --color-green: #3E6C68;
  --color-attn: #D59B09;
  --color-sale: #A24C5A;
  --color-line: #3D863D;
  --color-rakuten: #BF0000;
  --color-yahoo: #FF0033;
  --transition: all 0.4s ease;
  --font-serif: "游明朝", "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "MS PMincho", serif;
  --font-sans: "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "Yu Gothic", "游ゴシック体", "Meiryo", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  letter-spacing: 0.03em;
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-accent);
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  opacity: 0.8;
}

h1,
h2,
h4,
h3,
h5,
h6 {
  font-family: "Noto Serif JP", Georgia, "Times New Roman", "游明朝", "Yu Mincho", "游明朝体", "YuMincho", "ヒラギノ明朝 Pro W3", "Hiragino Mincho Pro", "HGS明朝E", "MS P明朝", serif;
  line-height: 1.4;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  font-weight: 500;
}

h2 {
  letter-spacing: 0.05em;
}

@media (prefers-reduced-motion: reduce) {
  html,
    body {
    scroll-behavior: auto;
  }
}

/* =========================================================
   02 ヘッダー：中央ロゴ
   ========================================================= */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  padding: 0 24px;
  background: var(--color-accent);
  transition: transform .35s ease, background .35s ease;
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.brand img {
  width: 150px;
  height: auto;
  margin: 0.5rem 0;
}

.site-header .brand {
  position: relative;
  left: auto;
  right: auto;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   03 冒頭ヒーロー：背景・文章・花
   ========================================================= */

.hero {
  z-index: 1;
}

.hero::after {
  content: "";
  background-color: var(--color-accent);
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
  pointer-events: none;
}

.hero.is-dimmed::after {
  opacity: 0.8;
}

.hero__slider-wrapper {
  z-index: 0;
}

.hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 1;
}

.hero__slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero__slide img {
  object-position: center;
}

/* スクロール案内：画面中央下 */
#hero .hero__scrollcue {
  position: absolute;
  bottom: max(32px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 4;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  pointer-events: none;

  color: #1E2A44;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

/* 小さく、字間を広めに */
#hero .hero__scrollcue-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
}

/* 縦線の薄いベース */
#hero .hero__scrollcue-line {
  position: relative;
  display: block;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

/* 上から下へ、ゆっくり伸びる線 */
#hero .hero__scrollcue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  transform-origin: center top;
  animation: grace-scroll-guide 2.6s ease-in-out infinite;
}

@keyframes grace-scroll-guide {
  0% {
    transform: scaleY(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  65% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* PC */
@media (min-width: 768px) {
  #hero .hero__scrollcue {
    bottom: 44px;
    gap: 14px;
  }

  #hero .hero__scrollcue-line {
    height: 60px;
  }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
  #hero .hero__scrollcue-line::after {
    animation: none;
    transform: none;
    opacity: 1;
  }
}

@media (min-width: 1280px) {
  .hero__slider-wrapper {
    display: flex !important;
    flex-direction: row !important;
  }

  .hero__slide {
    position: relative !important;
    width: 33.3333% !important;
    height: 100% !important;
    opacity: 1 !important;
    z-index: 1 !important;
    visibility: visible !important;
  }
}

.hero__copy {
  padding: 0 2rem;
  opacity: 0;
  visibility: hidden;
  color: var(--color-text);
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s;
  z-index: 3;
  font-family: var(--font-serif);
  pointer-events: none;
}

.hero__copy.is-shown {
  opacity: 1;
  visibility: visible;
}

.hero__copy--1 .eyebrow {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.2em;
  font-weight: 500;
  margin-bottom: 1.2rem;
}

.hero__copy--1 .kicker {
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  margin-bottom: 3rem;
  font-weight: 300;
  line-height: 1.6;
}

.hero__copy--1 .body-medium p {
  margin: 0.8rem 0;
  line-height: 1.8;
  letter-spacing: 0.1em;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.hero__copy--2 {
  padding: 0 2rem;
  z-index: 3;
  font-family: var(--font-serif);
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s;
  opacity: 0;
  visibility: hidden;
}

.hero__copy--2.is-shown {
  opacity: 1;
  visibility: visible;
}

.hero__copy--2 .body-small {
  position: relative;
  z-index: 10;
}

.hero__copy--2 .body-small p {
  margin: 1.5rem 0;
  line-height: 1.8;
  letter-spacing: 0.1em;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.hero__images {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.hero__img-wrap {
  position: absolute;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
  overflow: hidden;
}

.hero__copy--2.is-shown .hero__img-wrap {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.hero__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__img-wrap.img-right {
  top: -5%;
  right: 1%;
  width: 45%;
  max-width: 220px;
  aspect-ratio: 3 / 4;
}

.hero__copy--2.is-shown .hero__img-wrap.img-right img {
  transform: scaleX(-1) rotate(35deg);
}

.hero__img-wrap.img-left {
  bottom: -20%;
  left: 2%;
  width: 45%;
  max-width: 200px;
  aspect-ratio: 3 / 4;
}

.hero__copy--2.is-shown .hero__img-wrap.img-left img {
  transform: rotate(-35deg);
}

.body-small {
  margin-top: 5rem;
}

.hero-scroll {
  position: relative;
  height: 350vh;
  width: 100%;
  max-width: none;
}

.hero-scroll .hero {
  position: sticky;
  top: 0;
  overflow: hidden;
  isolation: isolate;
  height: 100vh;
}

.hero-scroll .hero::after {
  position: absolute;
  inset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll .hero__copy,
    .hero-scroll .hero__img-wrap,
    .hero-scroll .hero::after {
    transition: none;
  }
}

@supports (height: 100dvh) {
  .hero-scroll {
    height: 350dvh;
  }

  .hero-scroll .hero {
    height: 100dvh;
  }
}

.hero-scroll .hero__slider-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-scroll .hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scroll #hero {
  width: 100%;
  max-width: none;
}

#hero .hero__copy {
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  text-align: center;
  transform: translate(-50%, -43%);
}

#hero .hero__copy--1 {
  max-width: 1200px;
}

#hero .hero__copy--2 {
  max-width: 600px;
}

#hero .hero__copy.is-shown {
  transform: translate(-50%, -50%);
}

/* =========================================================
   04 Grace 1〜5 目次：丸いアイコン
   ========================================================= */

.grace-index {
  position: relative;
  z-index: 6;
}

.grace-item {
  position: relative;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.grace-item:hover {
  opacity: 1;
  transform: none;
}

#grace-index.grace-index--circles {
  padding: 64px 24px 72px;
  background: #f5f4f0;
  box-sizing: border-box;
}

#grace-index.grace-index--circles * {
  box-sizing: border-box;
}

#grace-index .grace-circle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 36px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

#grace-index.grace-index--circles .grace-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 8px 0;
  overflow: visible;
  background: transparent;
  border: 0;
  color: #1e2a44;
  font-family: "游明朝",
    "Yu Mincho",
    "Hiragino Mincho ProN",
    "Hiragino Mincho Pro",
    "MS PMincho",
    serif;
  text-align: center;
  text-decoration: none;
}

#grace-index.grace-index--circles .grace-item::before,
#grace-index.grace-index--circles .grace-item::after {
  content: none;
}

#grace-index.grace-index--circles .grace-item:last-child {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - 20px) / 2);
}

#grace-index .grace-circle {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  margin-bottom: 16px;
  border: 1px solid #c6b7a3;
  border-radius: 50%;
  background: #faf9f6;
  transition: background-color 0.4s ease,
    border-color 0.4s ease,
    transform 0.4s ease;
}

#grace-index .grace-circle img {
  display: block;
  position: static;
  width: 68%;
  height: 68%;
  margin: 0;
  object-fit: contain;
  opacity: 1;
}

#grace-index .grace-circle-number {
  display: block;
  margin-bottom: 8px;
  color: #837a71;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

#grace-index .grace-circle-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  #grace-index .grace-item:hover .grace-circle {
    background: #efebe4;
    border-color: #a89a85;
    transform: translateY(-3px);
  }
}

#grace-index.grace-index--circles .grace-item:focus-visible {
  outline: 2px solid #837a71;
  outline-offset: 6px;
  border-radius: 8px;
}

@media (min-width: 1024px) {
  #grace-index.grace-index--circles {
    padding: 96px 40px 104px;
  }

  #grace-index .grace-circle-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-width: 1080px;
    gap: 24px;
  }

  #grace-index.grace-index--circles .grace-item:last-child {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }

  #grace-index .grace-circle {
    width: 112px;
    height: 112px;
    margin-bottom: 20px;
  }

  #grace-index .grace-circle-number {
    font-size: 0.9375rem;
  }

  #grace-index .grace-circle-title {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #grace-index .grace-circle {
    transition: none;
  }

  #grace-index .grace-item:hover .grace-circle {
    transform: none;
  }
}

/* =========================================================
   05 Our Grace：背景動画・固定タイトル・本文
   ========================================================= */

/* スマホ共通：本文サイズ／左右余白／動画切替時間 */
.grace-story {
  --grace-body-size: 0.95rem;
  --grace-side: 20px;
  position: relative;
  z-index: 10;
  color: #fff;
  background: #49443f;
  font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  isolation: isolate;
  --grace-fade: 300ms;
}

.grace-story *,
.grace-story *::before,
.grace-story *::after {
  box-sizing: border-box;
}

.grace-story__stage {
  position: sticky;
  top: 0;
  pointer-events: none;
  overflow: hidden;
}

.grace-story__media,
.grace-story__media-item,
/* 暗幕の濃さ。opacity を下げると動画が明るく見えます */
.grace-story__veil {
  position: absolute;
  inset: 0;
}

.grace-story__media {
  background: #24201e;
}

.grace-story__media-item {
  background: var(--grace-fallback, #332f2c);
  opacity: 0;
  transition: opacity var(--grace-fade) ease;
}

.grace-story__media-item.is-current {
  opacity: 1;
}

.grace-story__veil {
  background: linear-gradient(180deg, rgba(10,9,8,.60), rgba(10,9,8,.24) 25%, rgba(10,9,8,.73) 58%, rgba(10,9,8,.83));
  opacity: 0.4;
}

.grace-story__topline {
  position: absolute;
  top: max(22px, env(safe-area-inset-top));
  left: var(--grace-side);
  right: var(--grace-side);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: .72rem;
  letter-spacing: .13em;
}

.grace-story__topline p {
  margin: 0;
}

.grace-story__tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grace-story__copy-stack {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

/* 本文と縦書きタイトル：スマホの列間隔は column-gap */
.grace-story__copy {
  position: relative;
  min-height: 100svh;
  padding: 100px var(--grace-side) 120px;
  scroll-margin-top: 0;
  display: grid;
  align-items: start;
  row-gap: 20px;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 5px;
}

.grace-story__title-group {
  display: flex;
  gap: 14px;
  writing-mode: vertical-rl;
  position: sticky;
  top: 100px;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0;
  z-index: 2;
  justify-self: start;
}

.grace-story__title-number {
  margin: 0;
  font-size: .8rem;
  letter-spacing: .1em;
}

.grace-story__title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.25rem, 5.2vw, 1.65rem);
  line-height: 1.65;
  letter-spacing: .09em;
  max-height: none;
}

.grace-story__body {
  width: 100%;
  align-self: flex-start;
  font-size: var(--grace-body-size);
  line-height: 2;
  letter-spacing: .035em;
  overflow: visible;
  height: auto;
  max-height: none;
  overflow-wrap: anywhere;
  pointer-events: auto;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding-top: clamp(220px, 42svh, 360px);
  max-width: none;
}

.grace-story__body p {
  margin: 0 0 1.25em;
}

.grace-story__body p:last-child {
  margin-bottom: 0;
}

.grace-story__body strong {
  font-weight: 600;
}

.grace-story__paragraph-group + .grace-story__paragraph-group {
  margin-top: 3.25rem;
}

.grace-story a:focus-visible,
.grace-story button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.grace-story__progress {
  display: none;
}

@media (min-width: 768px) {
  .grace-story {
    --grace-side: clamp(40px, 6vw, 100px);
    --grace-body-size: 1.0625rem;
    --grace-layout-width: 640px;
    --grace-title-lead: 90px;
  }

  .grace-story__title {
    font-size: clamp(1.65rem, 2.5vw, 2.75rem);
  }

  .grace-story__veil {
    background: linear-gradient(90deg, #100e0cd9 0%, #100e0cb8 42%, #100e0c38 65%, #100e0c99), linear-gradient(180deg, #100e0c66, transparent 30%, #100e0c66);
  }
}

@media (max-width: 359px) {
  .grace-story {
    --grace-side: 20px;
    --grace-body-size: .9375rem;
  }

  .grace-story__tools {
    gap: 6px;
  }

  .grace-story__topline {
    letter-spacing: .02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grace-story__media-item {
    transition: none;
  }
}

.grace-story__hud {
  position: sticky;
  top: 0;
  z-index: 3;
  pointer-events: none;
}

/* 非表示の操作部。HTML要素はJavaScriptが参照するため残します */
.grace-story__play,
.grace-story__nav {
  display: none !important;
}

@media (max-height: 650px) {
  .grace-story__copy {
    padding-top: 88px;
  }

  .grace-story__title-group {
    top: 88px;
    gap: 10px;
  }

  .grace-story__title-number {
    font-size: .75rem;
  }

  .grace-story__title {
    font-size: 1.125rem;
    max-height: calc(100svh - 200px);
    min-height: 80px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.grace-story__stage,
.grace-story__hud {
  height: 100vh;
  margin-bottom: -100vh;
}

@supports (height: 100dvh) {
  .grace-story__stage,
    .grace-story__hud {
    height: 100dvh;
    margin-bottom: -100dvh;
  }
}

.grace-story__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--grace-video-position, center);
}

/* Our Grace に重なる前に隠す境界。値は既存JavaScriptから設定 */
.grace-story__body,
.grace-story__title-group {
  clip-path: inset(
    var(--grace-text-clip-top, 0px) 0 0 0
  );
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

@media (min-width: 768px) {
  .grace-story .grace-story__copy {
    width: calc(100% - 96px);
    max-width: var(--grace-layout-width);
    margin: 0 auto;
    padding: 150px 0 180px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: 24px;
    row-gap: 0;
    align-items: start;
    justify-content: normal;
  }

  .grace-story .grace-story__body {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding-top: var(--grace-title-lead);
  }

  .grace-story .grace-story__title-group {
    position: sticky;
    top: 120px;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    display: grid;
    grid-template-rows: var(--grace-title-lead) auto;
    row-gap: 0;
    writing-mode: horizontal-tb;
    margin: 0;
    padding: 0;
    height: auto;
    max-height: none;
    grid-template-columns: auto;
    column-gap: 0;
    justify-items: center;
  }

  .grace-story .grace-story__title-number {
    align-self: start;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.08em;
    white-space: nowrap;
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  .grace-story .grace-story__title {
    align-self: start;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin: 0;
    padding: 0;
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
  }

  .grace-story .grace-story__topline {
    top: 32px;
    left: 50%;
    right: auto;
    width: calc(100% - 96px);
    max-width: var(--grace-layout-width);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    line-height: 1.4;
    letter-spacing: 0.12em;
  }

  .grace-story .grace-story__topline p,
    .grace-story .grace-story__tools {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
  }
}

/* =========================================================
   06 結びのメッセージ・イラスト
   ========================================================= */

.grace-closing {
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  padding: 20px 0 5rem;
  display: flow-root;
  background: #f5f4f0;
  color: var(--color-primary);
}

.grace-closing .grace-index__footer {
  position: relative;
  max-width: 650px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  font-family: var(--font-serif);
  text-align: left;
}

.grace-closing .grace-index__illust {
  margin: 0 0 -60px;
  text-align: right;
  pointer-events: none;
}

/* イラストの位置：translateY の値を増やすと下へ移動 */
.grace-closing .grace-index__illust img {
  display: inline-block;
  width: 130px;
  max-width: 40%;
  height: auto;
  transform: translateY(50px);
}

.grace-closing .grace-index__footer p {
  position: relative;
  z-index: 2;
  margin: .2rem 0;
  font-size: 1rem;
  line-height: 2;
  letter-spacing: .05em;
  overflow-wrap: anywhere;
  text-align: center;
}

.grace-closing .grace-index__footer p + p {
  margin-top: .2rem;
}

@media (min-width: 768px) {
  .grace-closing .grace-index__illust img {
    width: 200px;
	transform: translate(-30px, 150px);
  }

  .grace-closing .grace-index__footer p {
    font-size: 1.125rem;
  }
}

@media (max-width: 767px) {
  .grace-closing .grace-index__illust {
    margin-bottom: -50px;
  }
}

/* =========================================================
   07 目次・結びのフェード表示
   ========================================================= */

#grace-index .grace-item.grace-reveal,
.grace-closing .grace-index__footer.grace-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 2.4s ease,
    transform 2.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#grace-index .grace-item.grace-reveal.is-visible,
.grace-closing .grace-index__footer.grace-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#grace-index .grace-item.grace-reveal:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  #grace-index .grace-item.grace-reveal,
    .grace-closing .grace-index__footer.grace-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   08 TOPに戻るボタン・共通余白
   ========================================================= */

.circle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.2s ease, background-color 0.3s ease;
  z-index: 9999;
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  line-height: normal !important;
  vertical-align: baseline !important;
}

.up-arrow {
  font-size: 18px;
}

.text {
  font-size: 10px;
}

.back-to-top {
  left: max(15px, env(safe-area-inset-left));
  background-color: rgba(245, 244, 240,0.8);
  border: none;
}

.mb-100 {
  margin-bottom: 100px;
}

.mb-150 {
  margin-bottom: 150px;
}

@media (max-width: 767px) {
  .mb-100 {
    margin-bottom: 6.25rem;
  }

  .mb-150 {
    margin-bottom: 9.375rem;
  }
}

/* 結びのメッセージ：見出しのみ中央揃え */
.grace-closing .grace-index__footer h2 {
  text-align: center;
}
