@charset "UTF-8";
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #071415;
  color: #1a1a1a;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure,
p,
h1,
h2,
h3 {
  margin: 0;
}

/* =========================================
   全ブラウザ（Firefox / Safari / Chrome）対応：ルビ崩れ・重なり・行間拡大防止
   ========================================= */
.article-body,
.news-card__title,
.news-detail__title {
  line-height: 1.85;
}

/* Chrome / Safari / Edge 向け標準設定（ルビと親文字の間に少し余裕を持たせる） */
ruby {
  ruby-align: center;
  -webkit-ruby-align: center;
  ruby-position: over;
  -webkit-ruby-position: before;
  line-height: inherit;
  vertical-align: baseline;
}

rt {
  font-size: 0.52em;
  line-height: 1.25;
  padding-bottom: 0.14em;
  letter-spacing: 0.02em;
  font-weight: 500;
  text-align: center;
  user-select: none;
}

/* Firefox 向け個別補正（Firefox特有のルビ行間拡大を抑えつつ高さを合わせる） */
@-moz-document url-prefix() {
  ruby {
    display: inline-ruby;
    line-height: 1;
    vertical-align: baseline;
  }
  rt {
    line-height: 1;
    padding-bottom: 0;
    transform: translateY(-0.06em);
  }
}


/* =========================================
   下層共通ローディング（トップ以外の本サイト共通）
   ========================================= */
body.is-sub-loading {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.sub-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom right, #000000 0%, #6a2a00 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.65s ease;
}

.sub-loader.is-fadeout {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sub-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.sub-loader__title {
  width: min(330px, 72vw);
  margin: 0 auto 14px;
}

.sub-loader__title img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.sub-loader__mark {
  width: min(350px, 78vw);
  margin: 0 auto 18px;
}

.sub-loader__mark img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.sub-loader__text {
  font-family: "Cinzel", "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #f5efe2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.sub-loader__dots span {
  display: inline-block;
  opacity: 0.2;
  animation: loaderDotPulse 1.4s infinite ease-in-out;
}
.sub-loader__dots span:nth-child(1) {
  animation-delay: 0s;
}
.sub-loader__dots span:nth-child(2) {
  animation-delay: 0.25s;
}
.sub-loader__dots span:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes loaderDotPulse {
  0%, 80%, 100% {
    opacity: 0.2;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (max-width: 767px) {
  .sub-loader {
    background: linear-gradient(155deg, #000000 18%, #6a2a00 100%);
  }
  .sub-loader__title {
    width: 240px;
    max-width: 68vw;
    margin-bottom: 12px;
  }
  .sub-loader__mark {
    width: 245px;
    max-width: 70vw;
    margin-bottom: 14px;
  }
}

/* =========================================
   下層共通背景レイヤー（スクロール固定＋レンガ＋歯車＋シェード＋最上層オーバーレイ）
   ========================================= */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: #091b1c;
}

/* 0. 最背面：レンガ背景 */
.bg-layer__brick {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../img/common/bg_oldbrick.webp") center top / cover no-repeat;
}

.page-news .bg-layer__brick {
  filter: brightness(1.38) contrast(1.08) saturate(0.85);
}

/* 1. レンガの上：歯車（左上の歯車・右下の歯車） */
.bg-layer__gear {
  position: absolute;
  z-index: 1;
}

.bg-layer__gear--lt {
  top: 0;
  left: 0;
  width: 25vw;
  min-width: 220px;
}

/* 右下の歯車（PCは現状維持） */
.bg-layer__gear--rb {
  right: 0;
  bottom: 0;
  width: 31vw;
  min-width: 260px;
}

/* 2. 歯車の上：シェード画像（bg_shade.webp） */
.bg-layer__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("../img/common/bg_shade.webp") center center / 100% 100% no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.92;
}

/* 3. 最前面：全体への色オーバーレイ（#5cb9bc で全体を緑っぽく統一） */
.page-news .bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background-color: #5cb9bc;
  mix-blend-mode: overlay;
  opacity: 0.94;
  pointer-events: none;
}

/* タブレット（768px〜1024px）：右下歯車はPC最小幅（1260px時の31vw≒390px）程度でとどめる */
@media (max-width: 1024px) {
  .bg-layer__gear--rb {
    width: 38vw;
    min-width: 260px;
    max-width: 390px;
  }
}

/* スマホ（767px以下）：レンガ縦100%・右下歯車は横幅の約2/3・シェード90度回転 */
@media (max-width: 767px) {
  .bg-layer__brick {
    background-position: center center;
    background-size: auto 100%;
  }
  .bg-layer__gear--lt {
    width: 36vw;
    min-width: 0;
    max-width: 150px;
  }
  .bg-layer__gear--rb {
    width: 66vw;
    min-width: 0;
    max-width: none;
  }
  .bg-layer__shade {
    inset: auto;
    top: 50%;
    left: 50%;
    width: 100vh;
    width: 100dvh;
    height: 100vw;
    transform: translate(-50%, -50%) rotate(90deg);
    background-size: 100% 100%;
  }
}

/* =========================================
   共通フッター（≪ HOME ＋ コピーライト）
   ========================================= */
.sub-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 36px 20px 44px;
  text-align: center;
}

.sub-footer__home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  padding: 8px 20px;
  font-family: "Cinzel", "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.12rem, 1.5vw, 1.34rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #ffffff;
  /* パキッとした影1つ ＋ 周りを囲む黒いグロー（ぼかし） */
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 1),
    0 0 10px rgba(0, 0, 0, 0.95),
    0 0 22px rgba(0, 0, 0, 0.9);
  transition: color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), text-shadow 0.25s ease;
}

.sub-footer__home-arrow {
  display: inline-block;
  font-size: 0.92em;
  letter-spacing: -0.05em;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.sub-footer__home:hover {
  color: #f0d78c;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 1),
    0 0 12px rgba(0, 0, 0, 0.95),
    0 0 20px rgba(240, 215, 140, 0.65);
}

.sub-footer__home:hover .sub-footer__home-arrow {
  transform: translateX(-4px);
}

.sub-footer__copy {
  margin-top: 14px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Times New Roman", serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.94);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 1),
    0 0 8px rgba(0, 0, 0, 0.9);
}

.sub-footer__copy small {
  font-size: inherit;
}

@media (max-width: 767px) {
  .sub-footer {
    padding: 28px 16px 36px;
  }
}

/* =========================================
   右下追従 GO TO TOP ボタン（PC: 120px / SP: 70px）
   ========================================= */
.btn-gotop {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 50;
  width: 120px;
  height: 120px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.75));
  transition: opacity 0.32s ease, visibility 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
}

.btn-gotop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn-gotop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-gotop:hover {
  transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.85)) brightness(1.06);
}

.btn-gotop:active {
  transform: scale(0.96);
}

@media (max-width: 767px) {
  .btn-gotop {
    right: 14px;
    bottom: 16px;
    width: 70px;
    height: 70px;
  }
  .btn-gotop:hover {
    transform: none;
  }
}
