/* TOPページ — 洗練ビジュアル（ナンバーズ3基準で全カード統一） */

.page-home .l_container_main .l_content {
  position: relative;
  isolation: isolate;
}

/* ─── 背景（ブランド青のみ・控えめ） ─── */
.top-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.top-ambient::before {
  content: "";
  position: absolute;
  inset: -15% -8%;
  background:
    radial-gradient(ellipse 50% 40% at 20% 15%, rgba(34, 123, 231, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 45% 35% at 80% 75%, rgba(26, 91, 180, 0.08) 0%, transparent 55%);
  animation: ambientShift 18s ease-in-out infinite alternate;
}

.top-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.4;
  animation: orbFloat 12s ease-in-out infinite;
}

.top-orb--1 {
  width: 200px;
  height: 200px;
  background: rgba(34, 123, 231, 0.28);
  top: 5%;
  left: -2%;
}

.top-orb--2 {
  width: 160px;
  height: 160px;
  background: rgba(26, 91, 180, 0.2);
  bottom: 12%;
  right: -4%;
  animation-delay: -5s;
}

.top-orb--3 {
  display: none;
}

.top-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 8px 2px rgba(34, 123, 231, 0.5);
  animation: sparkTwinkle 4s ease-in-out infinite;
}

.top-spark--1 { top: 18%; left: 32%; }
.top-spark--2 { top: 55%; right: 22%; animation-delay: 1.5s; }
.top-spark--3,
.top-spark--4,
.top-spark--5 {
  display: none;
}

.page-home .l_content > *:not(.top-ambient) {
  position: relative;
  z-index: 1;
}

/* ─── ヒーロー ─── */
.page-home .top-hero.seo-summary-box {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(232, 241, 252, 0.9) 100%);
  border: 1px solid rgba(26, 91, 180, 0.18);
  box-shadow: 0 8px 28px rgba(26, 91, 180, 0.1);
  backdrop-filter: blur(6px);
}

.page-home .top-hero.seo-summary-box::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 123, 231, 0.5), rgba(26, 91, 180, 0.15), rgba(34, 123, 231, 0.35));
  background-size: 200% 200%;
  animation: borderGlow 10s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

.page-home .top-hero.seo-summary-box h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.05rem);
}

.page-home .top-hero h1 {
  background: linear-gradient(90deg, #1a5fb4 0%, #227be7 55%, #1a5fb4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleShine 8s linear infinite;
}

.top-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.top-badge {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #227be7 0%, #1a5fb4 100%);
  box-shadow: 0 3px 10px rgba(26, 91, 180, 0.28);
  animation: badgePop 0.5s ease backwards;
}

.top-hero-badges li:nth-child(2) .top-badge,
.top-hero-badges li:nth-child(3) .top-badge {
  background: linear-gradient(135deg, #3d8fd9 0%, #1a5fb4 100%);
  box-shadow: 0 3px 10px rgba(26, 91, 180, 0.22);
}

.top-hero-badges li:nth-child(1) .top-badge { animation-delay: 0.1s; }
.top-hero-badges li:nth-child(2) .top-badge { animation-delay: 0.2s; }
.top-hero-badges li:nth-child(3) .top-badge { animation-delay: 0.3s; }

.page-home .top-hero.seo-summary-box p,
.page-home .top-hero .seo-summary-lead {
  font-size: 1.4rem;
}

.page-home .top-hero .seo-summary-safety {
  font-size: 1.3rem;
}

.page-home .top-hero .seo-summary-links {
  font-size: 1.3rem;
}

/* ─── 当せん口数 ─── */
.page-home .top-prize-section {
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%) !important;
  border: 1px solid rgba(26, 91, 180, 0.16) !important;
  box-shadow: 0 8px 28px rgba(26, 91, 180, 0.08) !important;
  padding: 1.1rem 1.1rem 1.27rem !important;
  width: 100%;
}

.page-home .top-prize-section .lottery-title {
  color: #1a1a2e;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: clamp(1.55rem, 3vw, 1.85rem);
  margin-bottom: 0.77rem;
}

.page-home .top-prize-section #prizeSummaryContainer {
  gap: 11px;
}

.page-home .top-prize-section .prize-block {
  padding: 13px 15px !important;
}

.page-home .top-prize-section .prize-title {
  margin-bottom: 9px !important;
  padding-bottom: 7px;
}

.page-home .top-prize-section .prize-title .prize-name {
  font-size: 1.45rem;
}

.page-home .top-prize-section .prize-title .prize-issue {
  margin-top: 0.25rem;
  font-size: 1.25rem;
}

.page-home .top-prize-section .prize-block li {
  margin-bottom: 5px;
  font-size: 1.35rem;
  padding: 3px 0;
}

.page-home .top-prize-section .prize-block li.prize-row-primary {
  padding: 5px 7px;
  margin-bottom: 7px;
}

.page-home .top-prize-section .prize-block .count {
  font-size: 1.1rem;
}

.page-home .top-prize-section .prize-block li.prize-row-primary .count {
  font-size: 1.16rem;
}

.page-home .lottery-title {
  color: #1a1a2e;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin-bottom: 1.15rem;
}

.page-home .prize-block {
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.35s ease;
  opacity: 0;
  animation: prizeCardIn 0.55s ease forwards;
}

.page-home #prizeSummaryLoto7 { animation-delay: 0.05s; }
.page-home #prizeSummaryLoto6 { animation-delay: 0.12s; }
.page-home #prizeSummaryMiniloto { animation-delay: 0.19s; }
.page-home #prizeSummaryNumbers4 { animation-delay: 0.26s; }
.page-home #prizeSummaryNumbers3 { animation-delay: 0.33s; }

.page-home .prize-block:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 32px rgba(26, 91, 180, 0.18) !important;
}

.page-home .top-prize-section .prize-title .prize-name {
  animation: none;
}

.page-home .prize-title .prize-name {
  animation: nameShine 6s ease-in-out infinite;
}

.page-home #prizeSummaryContainer {
  align-items: stretch;
  width: 100%;
}

.page-home #prizeSummaryContainer .prize-block {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ─── クーちゃん帯 ─── */
.page-home .top-qoo-banner.m_qoo2 {
  background: linear-gradient(135deg, #eef4fc 0%, #fff 100%);
  border: 1px solid rgba(26, 91, 180, 0.14);
  box-shadow: 0 4px 18px rgba(26, 91, 180, 0.08);
}

.page-home .top-qoo-banner .m_qoo2_img {
  animation: mascotFloat 5s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(26, 91, 180, 0.15));
}

/* ─── タブ ─── */
.page-home .top-tab-nav {
  background: #e2ebf6;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.page-home .top-tab-nav button {
  transition: color 0.25s ease, background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.page-home .top-tab-nav button.active {
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(26, 91, 180, 0.12) !important;
  transform: translateY(-1px);
}

/* ─── ゲームカード（横幅はメインカラムいっぱい） ─── */
.page-home .lottery-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.25rem;
  perspective: 1200px;
  padding: 0;
  width: 100%;
}

.page-home .lottery-list > li,
.page-home .lottery-game-card {
  width: 100%;
  max-width: none;
  margin: 0;
  list-style: none;
}

.page-home .lottery-card-3d {
  transition: box-shadow 0.35s ease;
}

.page-home .lottery-card-3d.is-visible .frame-container {
  animation: cardEntrance 0.65s cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

.page-home .lottery-card-3d:nth-child(2).is-visible .frame-container { animation-delay: 0.08s; }
.page-home .lottery-card-3d:nth-child(3).is-visible .frame-container { animation-delay: 0.16s; }

.page-home .lottery-card-3d .frame-container {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
  will-change: transform;
}

.page-home .lottery-card-3d .frame-container:hover {
  box-shadow: 0 8px 22px rgba(26, 91, 180, 0.18);
}

/* 当せん演出は frame-container のみ（カード全体は動かさない） */
.page-home .lottery-card-3d.miracle,
.page-home .lottery-card-3d.exclusive,
.page-home .lottery-card-3d.special,
.page-home .lottery-card-3d.advanced,
.page-home .lottery-card-3d.basic,
.page-home .lottery-card-3d[class*="background-effect-"] {
  animation: none !important;
  background: none !important;
}

.page-home .lottery-card-3d .m_cardLottery.m_cardLottery__overflow {
  box-shadow: 0 8px 24px rgba(26, 50, 90, 0.1);
  border: 1px solid rgba(26, 91, 180, 0.12);
}

.page-home .m_cardLotteryOther_imgSet {
  text-align: center;
}

.page-home .m_cardLotteryOther_imgSet_item {
  text-align: center;
  width: 100%;
}

.page-home .m_cardLotteryNumWrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.page-home .m_cardLotteryNum.m_cardLotteryNum__type2 {
  display: table;
  margin: 0 auto;
  text-align: center;
}

.page-home .m_cardLotteryNumCarryover {
  display: none;
}

/* ロゴエリア — 白地ステージでロゴをはっきり表示（オーバーレイ・回転効果なし） */
.page-home .frame-container {
  width: 100%;
  max-width: 480px;
  margin: 8px auto 11px;
  min-height: 140px;
  transform: none;
  position: relative;
  border-radius: 14px;
  background: #ffffff !important;
  border: 1px solid rgba(26, 91, 180, 0.22);
  box-shadow: 0 4px 18px rgba(26, 91, 180, 0.1);
  overflow: visible;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-home .frame-container::before,
.page-home .frame-container::after {
  display: none;
}

.page-home .frame-container.miracle,
.page-home .frame-container.exclusive,
.page-home .frame-container.special,
.page-home .frame-container.advanced,
.page-home .frame-container.basic,
.page-home .frame-container[class*="background-effect-"] {
  background: transparent !important;
}

.page-home .image-container {
  position: relative;
  z-index: 2;
  width: 100%;
  background: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
}

.page-home .image-container img.responsive.cover-img {
  width: auto;
  max-width: min(94%, 400px);
  height: auto;
  margin: 0 auto;
  display: block;
  opacity: 1;
  transition: transform 0.35s ease, opacity 0.35s ease;
  filter: contrast(1.12) saturate(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* 生成中は点滅させず一度だけフェードアウト */
.page-home .image-container.fade-effect {
  animation: logoHandoff 0.45s ease-out forwards;
}

@keyframes logoHandoff {
  to {
    opacity: 0;
  }
}

.page-home .frame-container:hover .image-container img.responsive.cover-img {
  transform: scale(1.02);
}

.page-home #aiNumbers7,
.page-home #aiNumbers6,
.page-home #aiNumbersm,
.page-home #aiNumbersN4,
.page-home #aiNumbersN3 {
  z-index: 2;
  min-height: 120px;
}

/* 生成結果の数字表示を統一 */
.page-home .result-numbers-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  max-width: 100%;
}

.page-home .result-numbers-wrapper .number {
  width: 58px;
  height: 58px;
  font-size: 1.25rem;
  margin: 0;
  border-width: 3px;
  flex-shrink: 0;
}

.page-home .fade-in-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.page-home .probability-text {
  font-size: 1rem;
  text-shadow: none;
  color: var(--color-brand);
}

/* 回転演出はナンバーズ系も同じ枠内に収める */
.page-home .circle-rotate-wrapper {
  margin: 0 auto;
}

.page-home .m_cardLotteryNum__type2 .m_cardLotteryNum_num {
  animation: prizePulse 3s ease-in-out infinite;
  text-shadow: 0 1px 8px rgba(198, 40, 40, 0.2);
}

.page-home .m_cardLotteryOther_catch_day_sub {
  box-shadow: 0 3px 10px rgba(26, 91, 180, 0.28);
}

.page-home .m_cardLotteryOther_btnWrap .m_cardLotteryOther_btn:not(.m_btn__color2),
.page-home [id^="generateNumber"] {
  box-shadow: 0 4px 14px rgba(26, 91, 180, 0.28) !important;
}

.page-home .m_cardLotteryOther_btnWrap .m_cardLotteryOther_btn:not(.m_btn__color2)::after,
.page-home [id^="generateNumber"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: btnShine 4s ease-in-out infinite;
}

.page-home .reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-home .reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ambientShift {
  0% { opacity: 0.9; }
  100% { opacity: 1; }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(12px, -14px); }
}

@keyframes sparkTwinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.7; }
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes titleShine {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes badgePop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes prizeCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes nameShine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

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

@keyframes prizePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@keyframes btnShine {
  0% { left: -100%; }
  45%, 100% { left: 130%; }
}

@media (min-width: 769px) {
  .page-home .result-numbers-wrapper .number {
    width: 64px;
    height: 64px;
    font-size: 1.35rem;
  }
}

@media (max-width: 768px) {
  .page-home .frame-container {
    max-width: 100%;
    min-height: 126px;
    padding: 12px 10px;
  }

  .page-home .top-prize-section {
    padding: 0.94rem 0.83rem 1.1rem !important;
  }

  .page-home .top-prize-section .lottery-title {
    font-size: 1.45rem;
    margin-bottom: 0.6rem;
  }

  .page-home .top-prize-section .prize-block {
    padding: 11px 11px !important;
  }

  .page-home .top-prize-section .prize-title .prize-name {
    font-size: 1.35rem;
  }

  .page-home .top-prize-section .prize-block li {
    font-size: 1.3rem;
  }

  .page-home .top-prize-section .prize-block .count {
    font-size: 1.35rem;
  }

  .page-home .top-prize-section .prize-block li.prize-row-primary .count {
    font-size: 1.4rem;
  }

  .page-home .top-prize-section #prizeSummaryContainer {
    gap: 8px;
  }

  .page-home .top-prize-section .prize-block {
    min-width: 128px !important;
    flex: 1 1 128px;
  }

  .page-home .lottery-list > li {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home *,
  .page-home *::before,
  .page-home *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .page-home .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }

  .page-home .lottery-card-3d .frame-container {
    transform: none !important;
  }
}
