@charset "UTF-8";
/* トップページ初回表示モーダル：第57回（次年度）公式WEBへの案内
   見た目は 57回サイトのトップ／Xカードに寄せている（オーシャンブルー＋波＋星のきらめき＋パズル）。
   クラスは全部 nym-（next year modal）で始める。index.css に既にある .modal / #overlay と衝突させないため。 */

.nym-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000; /* 56側の最大は 10000（診断モーダル）。その上に出す */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(50, 78, 90, 0.72); /* 57 --themevintage */
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.nym-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease, visibility 0s; /* 開くときは即 visible にして focus() を効かせる */
}

/* 開いている間は背面をスクロールさせない */
html.nym-lock,
html.nym-lock body {
  overflow: hidden;
}

.nym-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100svh - 32px);
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(160deg, #0c5f81 0%, #1b5a73 55%, #324e5a 100%); /* 57 ocean → vintage */
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 20, 30, 0.45);
  font-family: "Zen Kaku Gothic New", "Kiwi Maru", "Noto Serif JP", sans-serif;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.nym-overlay.is-open .nym-card {
  transform: none;
}

/* スクロールが要るほど低い画面では中身側をスクロール */
.nym-scroll {
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* 56 共通の赤いスクロールバーを出さない */
}
.nym-scroll::-webkit-scrollbar {
  display: none;
}

/* ---- 装飾：星のきらめき・パズル ---- */
.nym-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.nym-star {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: #f6e3a2; /* 57 --themecream */
  filter: drop-shadow(0 0 4px rgba(255, 233, 123, 0.7));
  animation: nym-twinkle 2.6s ease-in-out infinite;
}
.nym-star.s1 { top: 14px; left: 18px; width: 26px; height: 26px; }
.nym-star.s2 { top: 48px; left: 54px; width: 12px; height: 12px; animation-delay: 0.9s; }
.nym-star.s3 { top: 22px; right: 70px; width: 14px; height: 14px; fill: #cbe8ec; animation-delay: 1.5s; }
.nym-star.s4 { top: 44%; left: 10px; width: 14px; height: 14px; animation-delay: 0.4s; }
.nym-star.s5 { top: 40%; right: 12px; width: 20px; height: 20px; fill: #cbe8ec; animation-delay: 2s; }

.nym-puzzle {
  position: absolute;
  right: -28px;
  top: 92px;
  width: 120px;
  height: 120px;
  fill: #8cbbb8; /* 57 --thememix */
  opacity: 0.18;
  transform: rotate(18deg);
}
.nym-puzzle.p2 {
  right: auto;
  left: -40px;
  top: 160px;
  width: 110px;
  height: 110px;
  fill: #f6e3a2;
  opacity: 0.12;
  transform: rotate(-25deg);
}

@keyframes nym-twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ---- 閉じる × ---- */
.nym-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}
.nym-close:hover,
.nym-close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  outline: none;
}
.nym-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* ---- 上段：見出し ---- */
.nym-head {
  position: relative;
  z-index: 1;
  padding: 24px 28px 8px;
  text-align: center;
}
.nym-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(246, 227, 162, 0.16);
  border: 1px solid rgba(246, 227, 162, 0.55);
  color: #f6e3a2;
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.nym-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f6e3a2;
  box-shadow: 0 0 6px #ffe97b;
}
.nym-title {
  /* common_general.css の h2（赤い下線・左マージン）を全部打ち消す */
  display: block;
  position: static;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", "Noto Serif JP", sans-serif;
  font-weight: 500;
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.nym-title::before,
.nym-title::after {
  display: none;
  content: none;
}
.nym-title small {
  display: block;
  font-size: 14px;
  letter-spacing: 0.18em;
  opacity: 0.9;
  margin-bottom: 2px;
}

/* ---- 中段：Xカード画像 ---- */
.nym-visual {
  position: relative;
  z-index: 1;
  display: block;
  margin: 10px 24px 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 20, 30, 0.4);
  outline: 1px solid rgba(255, 255, 255, 0.25);
  outline-offset: -1px;
  transition: transform 0.3s ease;
}
.nym-visual:hover {
  transform: translateY(-2px);
}
.nym-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.909 / 1; /* Xカードは 1.91:1 */
  object-fit: cover;
}

/* ---- 下段：波の上に本文とボタン（Xカード下部の構図） ---- */
.nym-bottom {
  position: relative;
  z-index: 1;
  margin-top: -12px;
  padding: 40px 28px 22px;
  color: #324e5a;
  text-align: center;
}
.nym-bottom::before {
  /* 波の形。57 の白波 SVG と同じ曲線を使う */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #cbe8ec 0%, #e6f3f5 55%, #f4f5f5 100%);
  -webkit-mask:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1364 615' preserveAspectRatio='none'><path d='M1359 0l5 468c-53 13-95 48-142 72-99 52-218 61-332 52-114-9-225-36-338-52-93-14-189-20-283-10-94 10-187 37-265 86L0 147c78-49 171-76 265-86 94-10 189-4 283 10 113 16 224 43 337 52 114 9 234 0 332-52 47-25 90-59 142-72z'/></svg>") no-repeat top center / 100% 140px,
    linear-gradient(#000 0 0) no-repeat 0 60px / 100% calc(100% - 60px);
  mask:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1364 615' preserveAspectRatio='none'><path d='M1359 0l5 468c-53 13-95 48-142 72-99 52-218 61-332 52-114-9-225-36-338-52-93-14-189-20-283-10-94 10-187 37-265 86L0 147c78-49 171-76 265-86 94-10 189-4 283 10 113 16 224 43 337 52 114 9 234 0 332-52 47-25 90-59 142-72z'/></svg>") no-repeat top center / 100% 140px,
    linear-gradient(#000 0 0) no-repeat 0 60px / 100% calc(100% - 60px);
}
.nym-text {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #324e5a;
  text-align: center;
}
.nym-text strong {
  color: #0c5f81;
  font-weight: 700;
}

/* 主ボタン：57 の reco_day_button のグラデーションと影を踏襲 */
.nym-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  min-height: 52px;
  padding: 10px 22px;
  box-sizing: border-box;
  border-radius: 999px;
  background: linear-gradient(150deg, #2d94b0 0%, #a8dcdf 30%, #e0ebec 60%, #cae8eb 85%, #a2d9dd 100%);
  color: #0c5f81;
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 3px 3px 0 #54767a6e, 0 10px 24px rgba(12, 95, 129, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nym-btn:hover,
.nym-btn:focus-visible {
  transform: translate(2.5px, 2.5px);
  box-shadow: 0 0 0 #54767a6e, 0 6px 16px rgba(12, 95, 129, 0.25);
  outline: none;
}
.nym-btn .nym-check {
  font-family: "Kiwi Maru", serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 2px 10px;
  border-radius: 999px;
  background: #0c5f81;
  color: #f6e3a2;
}
.nym-btn .nym-arrow {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.25s ease;
}
.nym-btn:hover .nym-arrow {
  transform: translateX(3px);
}

/* 副ボタン：このまま56回を見る */
.nym-stay {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: #324e5a;
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(50, 78, 90, 0.4);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.nym-stay:hover,
.nym-stay:focus-visible {
  color: #0c5f81;
  text-decoration-color: #0c5f81;
  outline: none;
}

/* ---- 小さい画面 ---- */
@media (max-width: 480px) {
  .nym-head { padding: 26px 20px 8px; }
  .nym-title { font-size: 20px; }
  .nym-title small { font-size: 12px; }
  .nym-visual { margin: 8px 16px 0; }
  .nym-bottom { padding: 40px 18px 22px; }
  .nym-text { font-size: 13px; text-align: left; }
  .nym-text br { display: none; } /* 狭い幅では改行位置を固定せず流し込む */
  .nym-btn { font-size: 15px; min-height: 48px; }
  .nym-puzzle { width: 90px; height: 90px; top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  .nym-overlay, .nym-card, .nym-btn, .nym-visual { transition: none; }
  .nym-star { animation: none; opacity: 0.8; }
}
