/* ==========================================================
   暑中見舞いポップアップ
   装飾はすべてHTML/CSSで描画し、作品画像には重ねません。
   ========================================================== */
.shochu-popup {
  --indigo: #123d63;
  --deep-indigo: #092842;
  --water: #6baec2;
  --paper: #fffdf4;
  --gold: #c8a65a;
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}

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

.shochu-popup.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.shochu-popup.is-closing {
  opacity: 0;
}

html.shochu-popup-open,
html.shochu-popup-open body {
  overflow: hidden;
}

.shochu-popup__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(118, 193, 205, 0.28), transparent 28%),
    radial-gradient(circle at 85% 88%, rgba(42, 112, 143, 0.3), transparent 34%),
    rgba(5, 27, 46, 0.84);
  backdrop-filter: blur(8px);
}

.shochu-popup__window {
  position: relative;
  width: min(1100px, calc(100vw - 32px));
  margin: auto;
  padding: clamp(8px, 1.2vw, 14px);
  overflow: hidden;
  color: var(--deep-indigo);
  background:
    repeating-linear-gradient(0deg, rgba(35, 73, 91, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, #fffef8, #f4f1df);
  border: 1px solid rgba(222, 203, 146, 0.9);
  border-radius: 4px;
  box-shadow:
    0 22px 65px rgba(0, 14, 30, 0.48),
    inset 0 0 0 5px rgba(255, 255, 255, 0.66),
    inset 0 0 0 7px rgba(27, 83, 111, 0.2);
  transform: translateY(22px) scale(0.97);
  transition: transform 0.54s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.shochu-popup.is-active .shochu-popup__window {
  transform: translateY(0) scale(1);
}

.shochu-popup__window::before,
.shochu-popup__window::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(200, 166, 90, 0.35);
  transform: rotate(45deg);
}

.shochu-popup__window::before {
  top: -105px;
  left: -105px;
}

.shochu-popup__window::after {
  right: -105px;
  bottom: -105px;
}

.shochu-popup__header {
  position: relative;
  z-index: 2;
  min-height: 64px;
  padding: 2px clamp(48px, 6vw, 78px) 8px;
  text-align: center;
}

.shochu-popup__season {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(280px, 62%);
  margin: 0 auto 3px;
  color: #587080;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(0.62rem, 0.8vw, 0.74rem);
  letter-spacing: 0.2em;
  white-space: nowrap;
}

.shochu-popup__season::before,
.shochu-popup__season::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(18, 61, 99, 0.55));
}

.shochu-popup__season::after {
  transform: rotate(180deg);
}

.shochu-popup__title {
  margin: 0;
  color: var(--indigo);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.18rem, 2.35vw, 1.9rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 0 #fff;
}

.shochu-popup__title::after {
  content: "";
  display: block;
  width: min(220px, 60%);
  height: 1px;
  margin: 5px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.shochu-popup__picture {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: clamp(4px, 0.55vw, 7px);
  background: linear-gradient(135deg, #d9c28a, #f1e6be 42%, #b8974b);
  box-shadow: 0 8px 22px rgba(21, 51, 64, 0.22);
}

.shochu-popup__image {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 112px);
  margin-inline: auto;
  object-fit: contain;
  background: #eef3ee;
}

.shochu-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 253, 244, 0.92);
  border: 1px solid rgba(18, 61, 99, 0.36);
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(8, 39, 63, 0.16);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.shochu-popup__close:hover,
.shochu-popup__close:focus-visible {
  color: #fff;
  background: var(--indigo);
  outline: 2px solid #fff;
  outline-offset: 2px;
  transform: rotate(6deg);
}

.shochu-popup__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 19px;
  height: 1.5px;
  background: currentColor;
  transform-origin: center;
}

.shochu-popup__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.shochu-popup__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* 青海波を思わせる、水だけで描いた控えめな文様 */
.shochu-popup__wave {
  position: absolute;
  z-index: 1;
  right: -12px;
  bottom: -16px;
  width: 250px;
  height: 96px;
  opacity: 0.18;
  background-color: transparent;
  background-image:
    radial-gradient(circle at 25px 30px, transparent 21px, var(--indigo) 22px 23px, transparent 24px),
    radial-gradient(circle at 75px 30px, transparent 21px, var(--indigo) 22px 23px, transparent 24px);
  background-size: 100px 50px;
}

/* 風鈴：枠の外側だけに置き、作品画像には重ねない */
.shochu-popup__furin {
  position: absolute;
  top: -1px;
  right: 74px;
  z-index: 3;
  width: 42px;
  height: 83px;
  transform-origin: 50% 0;
  animation: shochu-furin 4.5s ease-in-out infinite;
}

.shochu-popup__furin::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 1px;
  height: 18px;
  background: #8b7855;
}

.shochu-popup__furin-bowl {
  position: absolute;
  top: 16px;
  left: 6px;
  width: 31px;
  height: 26px;
  border: 2px solid rgba(65, 132, 164, 0.75);
  border-top-width: 1px;
  border-radius: 50% 50% 28% 28%;
  background: rgba(182, 225, 234, 0.28);
}

.shochu-popup__furin-strip {
  position: absolute;
  top: 43px;
  left: 13px;
  width: 17px;
  height: 36px;
  padding-top: 5px;
  color: #fff;
  background: #487c98;
  font-family: "Yu Mincho", serif;
  font-size: 0.68rem;
  text-align: center;
  box-shadow: 0 2px 5px rgba(23, 70, 94, 0.18);
}

@keyframes shochu-furin {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg); }
}

@media (max-width: 720px) {
  .shochu-popup {
    padding: 10px;
  }

  .shochu-popup__window {
    width: min(100%, 650px);
    padding: 7px;
  }

  .shochu-popup__header {
    min-height: 54px;
    padding: 2px 38px 6px;
  }

  .shochu-popup__season {
    width: min(230px, 72%);
    margin-bottom: 2px;
  }

  .shochu-popup__title {
    font-size: clamp(1.1rem, 5.6vw, 1.55rem);
    line-height: 1.45;
    letter-spacing: 0.08em;
  }

  .shochu-popup__title::after {
    margin-top: 5px;
  }

  .shochu-popup__image {
    max-height: calc(100dvh - 92px);
  }

  .shochu-popup__close {
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
  }

  .shochu-popup__furin {
    display: none;
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .shochu-popup {
    align-items: start;
  }

  .shochu-popup__header {
    min-height: 46px;
    padding-top: 2px;
    padding-bottom: 8px;
  }

  .shochu-popup__image {
    max-height: calc(100dvh - 72px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shochu-popup,
  .shochu-popup__window,
  .shochu-popup__furin {
    animation: none;
    transition-duration: 0.01ms;
  }
}
