/* =========================================================
   chrome.css
   下バー / 先頭へ戻る / プリローダ
   ========================================================= */

/* ---------------------------------------------------------
   モバイル下バー（旧 .mobile-bar）
   1200px未満だけ出す。PCでは出さない。
   --------------------------------------------------------- */
.mobile-bar {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  height: 50px;
  background: #fff;
  border-top: 1px solid #ddd;
}

.mobile-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  background: #f00;
}

body.has-mobile-bar {
  padding-bottom: 70px;
}

@media (min-width: 1200px) {
  .mobile-bar {
    display: none;
  }

  body.has-mobile-bar {
    padding-bottom: 0;
  }
}

/* ---------------------------------------------------------
   サイトドック（トップ下部）
   --------------------------------------------------------- */
.site-dock {
  z-index: 1030;
  padding-bottom: env(safe-area-inset-bottom);
  background: #2a241f;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-dock__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 8px;
  color: #f7f3ef;
  font-family: "Helvetica Neue", Arial, "YuGothic", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  background: #3a342f;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.site-dock .col:last-child .site-dock__btn {
  border-right: none;
}

.site-dock__btn--main {
  color: #fff;
  background: #a83818;
}

.site-dock__btn:hover,
.site-dock__btn:focus-visible {
  color: #fff;
  opacity: 0.92;
}

.fixed-bottom .col {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

/* ---------------------------------------------------------
   先頭へ戻る
   下バーがある狭い画面では、バーの上に乗せる
   --------------------------------------------------------- */
.scroll-top {
  position: fixed;
  right: 15px;
  bottom: -15px;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  visibility: hidden;
  opacity: 0;
  background-color: #cfcffc;
  border-radius: 50px;
  transition: 0.4s;
}

.scroll-top i {
  color: var(--contrast-color, #000);
  font-size: 24px;
  line-height: 0;
}

.scroll-top:hover {
  background-color: color-mix(in srgb, var(--color-accent, #ffbb27), transparent 20%);
}

.scroll-top.active {
  bottom: 15px;
  visibility: visible;
  opacity: 1;
}

@media (max-width: 1199.98px) {
  .scroll-top.active {
    bottom: 85px;
  }
}

/* ---------------------------------------------------------
   プリローダ
   --------------------------------------------------------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--color-bg, #fff);
}

#preloader::before {
  content: "";
  position: fixed;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  width: 60px;
  height: 60px;
  border: 6px solid var(--color-accent, #ffbb27);
  border-color: var(--color-accent, #ffbb27) transparent;
  border-radius: 50%;
  animation: chrome-spin 1.5s linear infinite;
}

@keyframes chrome-spin {
  to {
    transform: rotate(360deg);
  }
}



.site-dock {
  display: none;
}

@media (max-width: 1199.98px) {
  .site-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 48px;
    padding-bottom: env(safe-area-inset-bottom);
    background: #2a241f;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .site-dock__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f7f3ef;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    background: #3a342f;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-dock__btn:last-child {
    border-right: none;
  }

  .site-dock__btn--main {
    color: #fff;
    background: #a83818;
  }

  body {
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
  }
}
