html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

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

.g-header {
	background-color: transparent;
}

.g-footer {
	background-color: transparent;
}


/* =========================
   Dream Archive
========================= */

.dream-archive {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: -120px;
  padding-top: 120px;
  min-height: 100vh;
  background: none;
}

body {
  background-image: url('../../well-being-dreams/wp-content/themes/well-being-dreams/assets/bg-dream-pc.png');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
}

.g-footer,
.g-footer__footer,
.g-footer__inner {
  background: transparent !important;
}

@media (max-width: 1024px) {
  body {
    background-image: url('../../well-being-dreams/wp-content/themes/well-being-dreams/assets/bg-dream-tablet.png');
  }
}

@media (max-width: 767px) {
  body {
    background-image: url('../../well-being-dreams/wp-content/themes/well-being-dreams/assets/bg-dream-sp.png');
  }
}

.dream-archive__container {
  display: flex;
  flex-direction: column;
  gap: 60px;
  padding: 0 80px 120px;
}

.dream-archive__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.dream-archive__title {
  margin: 0;
  width: 100%;
  color: #541b85;
  font-size: 56px;
  font-family: Noto Serif JP;
  font-weight: 200;
  line-height: 1.6;
  text-align: center;
}

.dream-archive__lead {
  margin: 0;
  width: 100%;
  color: #3b3e47;
  font-size: 20px;
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  line-height: 1.8;
  text-align: center;
}

@media (min-width: 767px) {
.dream-archive__lead__sp {
  display:none;
}
}

.dream-archive__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 120px 40px;
  align-items: start;
}

.dream-archive__more {
  display: flex;
  justify-content: center;
}

.dream-archive__empty {
  margin: 0;
  padding: 40px 20px 120px;
  color: #3b3e47;
  font-size: 16px;
  font-family: "M PLUS 1p", sans-serif;
  text-align: center;
}

/* =========================
   Common : dream-head-note
========================= */

.dream-head-note__frame {
  gap: 8px;
  width: 100%;
  display: flex;
  padding: 30px 40px 60px;
  align-items: flex-start;
  flex-direction: column;
}

.dream-head-note__body {
  gap: 8px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.dream-head-note__text {
  color: #3b3e47;
  font-size: 12px;
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 400;
  line-height: 2;
  text-align: left;
}

.dream-head-note__icon {
  width: 20px;
  height: 20px;
  animation: rotate 6s linear infinite;
}

@keyframes rotate{
  from {
    transform:rotate(0deg);
  }
  to{
    transform:rotate(360deg);
  }
}

/* =========================
   Common : Divider
========================= */

.dream-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  gap: 10px;
  box-sizing: border-box;
}

.dream-divider__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  animation: rotate 6s linear infinite;
}

.dream-divider__line {
  flex: 1;
  height: 0.5px;
  background: #EA6094; /* ライン色 */
}

/* =========================
   Common : Project Note
========================= */

.dream-project-note {
  display: flex;
  align-items: stretch;
  flex-direction: column;
}

.dream-project-note__logo {
  gap: 60px;
  display: flex;
  padding: 60px 20px;
  align-items: center;
  justify-content: center;
}

.dream-project-note__logo-image {
  width: 240px;
  height: auto;
}

.dream-project-note__logo-mark {
  width: 120px;
  height: auto;
}

.dream-project-note__logo a {
  display: inline-block;
}

.dream-project-note__logo a:hover .dream-project-note__logo-mark {
  opacity: 0.7;
}

.dream-project-note__body {
  gap: 30px;
  display: flex;
  padding: 0 20px 60px;
  align-items: center;
  flex-direction: column;
}

.dream-project-note__text {
  width: 100%;
  color: #ea6094;
  font-size: 20px;
  font-family: "Shippori Mincho", serif;
  font-weight: 500;
  line-height: 2;
  text-align: center;
}

.dream-project-note__social {
  gap: 16px;
  display: flex;
  padding: 0 20px 60px;
  align-items: center;
  flex-direction: column;
}

.dream-project-note__social-title {
  color: #3b3e47;
  font-size: 16px;
  font-family: "M PLUS 1p", sans-serif;
  font-weight: 400;
  line-height: 2;
  text-align: center;
}

.dream-project-note__social-links {
  gap: 20px;
  display: flex;
  align-items: center;
}

.dream-project-note__social-icon {
  width: auto;
  height: 40px;
  display: block;
  transition: opacity .2s ease;
}

.dream-project-note__social-links a {
  display: inline-block;
}

.dream-project-note__social-links a:hover .dream-project-note__social-icon {
  opacity: 0.7;
}

/* =========================
   Responsive
========================= */

@media (max-width: 1024px) {
  .dream-archive__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 80px 40px;
  }
}

@media (max-width: 767px) {
  .dream-archive__container {
    padding: 0 20px 80px;
    gap: 40px;
  }

  .dream-archive__title {
    font-size: 26px;
  }

  .dream-archive__lead {
    display:none;
  }

  .dream-archive__lead__sp {
  margin: 0;
  width: 100%;
  color: #3b3e47;
  font-size: 16px;
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  text-align: center;
  font-style: normal;
  line-height: 200%; /* 26px */
  }

  .dream-archive__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 40px 80px;
  }

  .dream-head-note__frame {
    padding: 20px 20px 40px;
  }

  .dream-divider {
    padding: 0 20px;
  }

  .dream-project-note__logo {
    flex-direction: column;
  }

  .dream-project-note__text {
    font-size: 13px;
  }
}

/* =========================
   Pagenation
========================= */

.dream-pagination{
  display:flex;
  justify-content:center;
  gap:10px;
}

.dream-pagination .page-numbers{
  display:flex;
  gap:10px;
  list-style:none;
  padding:0;
}

.dream-pagination a,
.dream-pagination span{
  width:50px;
  height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #3B3E47;
  border-radius:25px;
  font-size:16px;
  text-decoration:none;
}

.dream-pagination .current{
  background:#F7D6DA;
  color:#EA6094;
  border-color: #EA6094;
}

.dream-pagination a:hover {
  background: #F7D6DA;
  color: #3B3E47;
  border-color: #EA6094;
}

.dream-pagination .dots{
  border:none;
}

@media (max-width: 767px) {
  .dream-pagination a,
  .dream-pagination span{
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
}

/* =========================
   Dream Archive card fix
========================= */

.dream-card--archive {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.dream-card--archive .dream-card__thumb--template {
  height: 252px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.dream-card--archive .dream-card__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.dream-card--archive .dream-card__thumb-overlay {
  inset: 0;
  padding: 18% 18% 20%;
  gap: 20px;
  justify-content: center;
}

.dream-card--archive .dream-card__area {
  font-size: 13px;
  line-height: 1.3;
}

.dream-card--archive .dream-card__thumb-title {
  font-size: 18px;
  line-height: 1.6;
}

.dream-card--archive .dream-card__nickname {
  font-size: 13px;
  line-height: 1.3;
}

/* =========================
   Archive reaction layout
========================= */

.dream-card--archive .dream-card-reaction {
  width: 100%;
}

.dream-card--archive .dream-card-reaction .dream-react {
  max-width: none;
  margin: 0;
}

.dream-card--archive .dream-card-reaction .dream-react-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: none;
  margin: 0;
}

.dream-card--archive .dream-card-reaction .dream-react-item {
  width: 100%;
  padding-top: 0;
}

.dream-card--archive .dream-card-reaction .dream-react-btn {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  min-height: 40px;
  min-width: 240px;
  max-width: 300px;
  width: 100%;
  padding: 16px 24px;
  align-self: stretch;
  border-radius: 26px;
  border: 1px solid #3B3E47;
}

.dream-card--archive .dream-card-reaction .dream-react-btn::before {
  content: "";
  grid-column: 1;
  width: 32px;
  height: 1px;
}

.dream-card--archive .dream-card-reaction .dream-react-label {
  grid-column: 2;
  justify-self: center;
  color: #3B3E47;
  text-align: center;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  min-width: 0;
}

.dream-card--archive .dream-card-reaction .dream-react-count {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  grid-column: 3;
  justify-self: end;
  min-width: 32px;
  margin-left: 0;
  font-family: "M PLUS 1p", sans-serif;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  text-align: right;
  pointer-events: none;
}

.dream-card--archive .dream-card-reaction .dream-react-note {
  margin-top: 12px;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 767px) {
  .dream-card--archive .dream-card__thumb--template {
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .dream-card--archive .dream-card__thumb-overlay {
    padding: 18% 14% 18%;
    gap: 8px;
  }

  .dream-archive .dream-card--archive .dream-card-reaction {
    display: none;
  }

  .dream-card--archive .dream-card__thumb-overlay {
    top: 50%;
    left: 50%;
    inset: auto;
    width: 44%;
    max-width: 235px;
    padding: 0;
    gap: 6px;
  }

  .dream-card--archive .dream-card__thumb-overlay > span {
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
  }
}

/* =====================================
   WELL-BEING FRONTIER Banner
===================================== */

.wb-banner{
  position: fixed;
  z-index: 9999;
  text-decoration: none;
  color: inherit;
}

.wb-banner__pc,
.wb-banner__icon,
.wb-banner__people {
  display: block;
}

.wb-banner__pc{
  display: block;
}

.wb-banner__sp{
  display: none;
}


/* =========================
   PC
========================= */
@media (min-width: 767px){

  .wb-banner{
    top: 260px;
    right: 0;
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
  }

  .wb-banner__pc{
    display: block;
    width: 100px;
    height: auto;
  }

  .wb-banner__sp{
    display: none;
  }
}


/* =========================
   SP
========================= */
@media (max-width: 767px){

  .wb-banner{
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    transform: none;
    width: 100%;
  }

  .wb-banner__pc{
    display: none;
  }

  .wb-banner__sp{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 60px;
    padding:0px 0px max(0px, env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
  }

  .wb-banner__icon{
    display: block;
    width: 50px;
    height: 60px;
    flex: 0 0 auto;
    margin-right: 62px;
  }

  .wb-banner__text{
    flex: 1 1 auto;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-align: center;
    color: #3b3e47;
  }

  .wb-banner__people{
    display: block;
    width: 112.42px;
    height: 60px;
    flex: 0 0 auto;
  }
  .wb-banner__sp,
  .dream-section,
  .dream-home__gallery,
  .dream-rotator {
    box-sizing: border-box;
  }
}

/* =========================
   Back to Top
========================= */

.back-to-top__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #3b3e47;
  padding: 6px 12px;
  color: #3b3e47;
  text-decoration: none;
  line-height: 1;
}

.back-to-top__icon {
  display: inline-flex;
  width: 12px;
  height: 12px;
}

.back-to-top__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.back-to-top__text {
  font-size:12px;
}

.back-to-top__link:hover {
  border: 1px solid #EA6094;
  text-decoration: none;
}

.back-to-top__link:hover .back-to-top__text,
.back-to-top__link:hover .back-to-top__icon {
  color: #EA6094;
}

/* =========================
   Move to Top Button
========================= */

/* 初期状態（非表示） */
.move-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 64px;
  height: 64px;
  padding: 0;

  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;

  /* 非表示状態 */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
}

/* 表示状態 */
.move-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* 画像 */
.move-to-top__img {
  display: block;
  width: 100%;
  height: auto;
}

/* SP調整（下部バナー回避） */
@media (max-width: 767px) {
  .move-to-top {
    right: 16px;
    bottom: 76px; /* wb-banner回避 */
    width: 56px;
    height: 56px;
  }
}