/*
 * リアルトレジャーハンティング（ゴールデンスライム → 純金プレート）
 * Figma【Web】2405PV版 / node 813:904（SP 390px）
 * マークアップの元は tools/real-treasure-section.html。広告LP（キービジュアルの直下）で使う。
 *
 * 長さはすべて「390px幅のときの値 × --u」。--u は LPの幅 ÷ 390 なので、
 * どの画面幅でもデザインと同じ比率で縮む・伸びる（事前登録キャンペーンと同じ作り）。
 * 行の高さは Figma の丸め（13px×1.25＝16.25 → 16px など）に合わせて px で指定している。
 *
 * 金色の文字は background-clip: text で塗っている。text-shadow だと影が文字の上に乗って
 * グラデーションが白っぽく潰れるので、影は filter: drop-shadow で付ける。
 */
.promo-rt {
  --u: calc(min(100vw, 480px) / 390);
  --rt-ink: #402006;
  --rt-gold-text: linear-gradient(180deg, #926c32 0%, #543310 48%, #2e1704 100%);
  /*
   * 金属の文字（「純金」「10点」）。2026-10-01 デザイン更新（Figma node 835:1435）で、
   * 光の帯を増やしてよりギラギラさせた。グラデーションの位置・色は Figma の値のまま。
   */
  --rt-metal: linear-gradient(180deg,
    #c37f14 0%, #fff8bf 18.76%, #feef80 25%, #fec10f 30.288%, #f9d73c 30.298%,
    #fff3df 43%, #854401 48%, #eeb110 52.404%, #fff1a2 60.096%, #886a00 65.865%,
    #eab219 73.558%, #fff184 80.769%, #d9be59 83.654%, #fffad6 91.827%, #946009 100%);
  --rt-metal-badge: linear-gradient(180deg,
    #c37f14 15%, #feef80 21.121%, #fff8bf 33.197%, #fec10f 44.38%, #f9d73c 49.043%,
    rgba(133, 68, 1, 0.6) 55.106%, #eeb110 69.563%, #fff1a2 77.49%, #eab219 86.351%,
    #fff184 93.346%, #946009 98.476%);
  /*
   * キービジュアルの下端で絵が消えていく帯の高さ（promo.css の .kv-art の消え方と同じ式）。
   * この高さぶん、背景をキービジュアルの下に潜り込ませる。
   */
  --rt-overlap: calc(clamp(555px, 143vw, 650px) - min(109.24vw, 516px));
  /* 下端で背景が透けていく長さ */
  --rt-fade: calc(150 * var(--u));
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(34 * var(--u)) 0 calc(16 * var(--u));
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
  color: var(--rt-ink);
  text-align: center;
}

/*
 * 背景（支給のヤシの島の絵＋地の色）。Figmaでは 390×860.8 に cover で敷いている。
 * 下端は --rt-fade かけて透明にして、次のセクションとパキッと分けない。
 */
.promo-rt::after,
.promo-rt::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
  background:
    url("../assets/real-treasure/bg.webp?v=20260930") 50% 0 / auto calc(860.8 * var(--u)) no-repeat,
    #fff7df;
}
.promo-rt::after {
  top: 0;
  bottom: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - var(--rt-fade)), transparent 100%);
          mask-image: linear-gradient(180deg, #000 calc(100% - var(--rt-fade)), transparent 100%);
}
/*
 * キービジュアルの下に潜り込ませる部分。背景の上端を鏡写しにして上へ延ばしているので、
 * セクションの上端で絵がつながり、継ぎ目の線が出ない（セクション内の絵の位置はFigmaのまま）。
 * キービジュアルの絵は同じ帯で透明になっていくので、そこからこの背景が見えてくる。
 * 反転しているので、マスクは要素の上（＝画面では下）を不透明にしている。
 */
.promo-rt::before {
  /* セクションの背景と 2px 重ねる（1px未満の隙間から地の水色が線になって見えるのを防ぐ） */
  bottom: calc(100% - 2px);
  height: calc(var(--rt-overlap) + 2px);
  transform: scaleY(-1);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

/* 金色の文字の共通 */
.promo-rt__title-1, .promo-rt__t-a, .promo-rt__t-b, .promo-rt__prize-name,
.promo-rt__badge-1, .promo-rt__badge-3 {
  background: var(--rt-gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.promo-rt__t-gold, .promo-rt__badge-2 {
  background: var(--rt-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.promo-rt__badge-2 { background-image: var(--rt-metal-badge); }

/* ---------- 見出し ---------- */
.promo-rt__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(5 * var(--u));
  width: calc(366 * var(--u));
}
.promo-rt__kicker { width: 100%; font-size: calc(13 * var(--u)); line-height: calc(16 * var(--u)); }
.promo-rt__title { display: flex; flex-direction: column; align-items: center; gap: calc(5 * var(--u)); width: 100%; font-weight: 900; }
.promo-rt__title-1 {
  display: block;
  width: 100%;
  font-size: calc(24 * var(--u));
  line-height: calc(30 * var(--u));
  filter: drop-shadow(0 calc(1 * var(--u)) 0 rgba(255, 255, 255, 0.8));
}
.promo-rt__title-2 { display: flex; align-items: center; justify-content: center; height: calc(50 * var(--u)); }
.promo-rt__t-a, .promo-rt__t-b {
  font-size: calc(30 * var(--u));
  line-height: calc(38 * var(--u));
  filter: drop-shadow(0 calc(1 * var(--u)) 0 rgba(255, 255, 255, 0.65));
}
.promo-rt__t-a { width: calc(96 * var(--u)); }
.promo-rt__t-b { width: calc(128 * var(--u)); }
.promo-rt__t-gold {
  width: calc(91 * var(--u));
  font-size: calc(40 * var(--u));
  line-height: calc(50 * var(--u));
  /*
   * 金属の文字には、外側に 1px の茶の縁取りがある（Figmaの部品説明「縁取り」、色は実測 #71470b）。
   * 4方向の影を1回ずつ重ねて縁にする（文字の中のグラデーションには被らない）。そのあとに元の影。
   */
  filter:
    drop-shadow(calc(1 * var(--u)) 0 0 #71470b)
    drop-shadow(calc(-1 * var(--u)) 0 0 #71470b)
    drop-shadow(0 calc(1 * var(--u)) 0 #71470b)
    drop-shadow(0 calc(-1 * var(--u)) 0 #71470b)
    drop-shadow(0 calc(1 * var(--u)) calc(1.2 * var(--u)) rgba(84, 48, 11, 0.28));
}

/*
 * 金文字の上のキラキラ（Figma node 879:2213「純金 / 金文字＋キラキラ」「キラキラ（バッジ）」）。
 * 金文字・バッジと同じ枠の中に置いているので、文字や行の並びが変わってもずれない。
 */
.promo-rt__t-goldbox { position: relative; display: block; flex: none; width: calc(91 * var(--u)); height: calc(50 * var(--u)); }
.promo-rt__t-goldbox .promo-rt__t-gold { display: block; }
.promo-rt__spk { position: absolute; max-width: none; pointer-events: none; }
.promo-rt__spk--g1 { left: calc(1.5 * var(--u));  top: calc(5 * var(--u));  width: calc(14.43 * var(--u)); height: calc(16 * var(--u)); }
.promo-rt__spk--g2 { left: calc(34.5 * var(--u)); top: calc(32 * var(--u)); width: calc(10.7 * var(--u));  height: calc(11.86 * var(--u)); }
.promo-rt__spk--g3 { left: calc(67.5 * var(--u)); top: calc(7 * var(--u));  width: calc(10.7 * var(--u));  height: calc(11.86 * var(--u)); }
.promo-rt__spk--b1 { left: calc(35 * var(--u));   top: calc(50 * var(--u)); width: calc(10.7 * var(--u));  height: calc(11.86 * var(--u)); }
.promo-rt__spk--b2 { left: calc(86 * var(--u));   top: calc(66 * var(--u)); width: calc(8 * var(--u));     height: calc(8.87 * var(--u)); }

/* ---------- お宝から純金へ（重なり順はFigmaどおり） ---------- */
.promo-rt__visual { position: relative; width: calc(390 * var(--u)); height: calc(320 * var(--u)); }
.promo-rt__visual > * { position: absolute; }
.promo-rt__visual img { max-width: none; }
.promo-rt__find {
  left: calc(16 * var(--u));
  top: calc(131 * var(--u));
  width: calc(190 * var(--u));
  font-size: calc(13 * var(--u));
  line-height: calc(16 * var(--u));
}
.promo-rt__find .promo-rt__w700 { display: block; font-size: calc(12 * var(--u)); font-weight: 700; line-height: calc(15 * var(--u)); }
.promo-rt__badge {
  left: calc(246 * var(--u));
  top: calc(18 * var(--u));
  width: calc(122 * var(--u));
  height: calc(122 * var(--u));
  background: url("../assets/real-treasure/badge.webp?v=20260930") 0 0 / 100% 100% no-repeat;
}
.promo-rt__badge > span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100 * var(--u));
  font-size: calc(20 * var(--u));
  line-height: calc(25 * var(--u));
}
.promo-rt__badge-1, .promo-rt__badge-3 { filter: drop-shadow(0 calc(1 * var(--u)) 0 rgba(255, 255, 255, 0.7)); }
.promo-rt__badge-1 { top: calc(18 * var(--u)); }
.promo-rt__badge-3 { top: calc(80 * var(--u)); }
.promo-rt__badge-2 {
  top: calc(36 * var(--u));
  width: calc(96 * var(--u)) !important;
  font-size: calc(40 * var(--u)) !important;
  line-height: calc(50 * var(--u)) !important;
  /* 「純金」と同じ縁取り */
  filter:
    drop-shadow(calc(1 * var(--u)) 0 0 #71470b)
    drop-shadow(calc(-1 * var(--u)) 0 0 #71470b)
    drop-shadow(0 calc(1 * var(--u)) 0 #71470b)
    drop-shadow(0 calc(-1 * var(--u)) 0 #71470b)
    drop-shadow(0 calc(1 * var(--u)) calc(1.2 * var(--u)) rgba(84, 48, 11, 0.28));
}
.promo-rt__badge-2 small { font-size: calc(18 * var(--u)); }
.promo-rt__arrow { left: calc(160 * var(--u)); top: calc(73 * var(--u)); width: calc(76 * var(--u)); height: calc(85 * var(--u)); }
.promo-rt__slime { left: calc(45 * var(--u)); top: 0; width: calc(157 * var(--u)); height: calc(137 * var(--u)); object-fit: contain; }
/* 純金プレート（2026-10-01 差し替え）。143×143・角丸9・-2.55°傾け。中心は Figma の外枠（149.2角）と同じ */
.promo-rt__plate {
  left: calc(123.11 * var(--u));
  top: calc(166.11 * var(--u));
  width: calc(143 * var(--u));
  height: calc(143 * var(--u));
  border-radius: calc(9 * var(--u));
  object-fit: cover;
  transform: rotate(-2.55deg);
}
.promo-rt__sparkle--1 { left: calc(35 * var(--u));  top: calc(25 * var(--u));  width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
.promo-rt__sparkle--2 { left: calc(206 * var(--u)); top: calc(45 * var(--u));  width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.promo-rt__sparkle--3 { left: calc(37 * var(--u));  top: calc(203 * var(--u)); width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
.promo-rt__sparkle--4 { left: calc(337 * var(--u)); top: calc(159 * var(--u)); width: calc(22 * var(--u)); height: calc(22 * var(--u)); }

/* ---------- 賞品名 ---------- */
.promo-rt__prize { width: calc(366 * var(--u)); }
.promo-rt__prize-name {
  font-size: calc(29 * var(--u));
  line-height: calc(36 * var(--u));
  filter: drop-shadow(0 calc(1 * var(--u)) 0 rgba(255, 255, 255, 0.8));
}
.promo-rt__prize-spec { font-size: calc(14 * var(--u)); line-height: calc(18 * var(--u)); }

/* ---------- 参加条件と希少性 ---------- */
.promo-rt__benefits {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(4 * var(--u));
  width: calc(350 * var(--u));
  margin-top: calc(8 * var(--u));
  padding: calc(7 * var(--u)) calc(8 * var(--u));
  list-style: none;
  background: rgba(255, 249, 226, 0.88);
  border: calc(1.4 * var(--u)) solid #ecb326;
  border-radius: calc(12 * var(--u));
}
.promo-rt__benefits li {
  display: flex;
  align-items: center;
  gap: calc(9 * var(--u));
  height: calc(39 * var(--u));
  padding: 0 calc(10 * var(--u));
  background: #fff;
  border-radius: calc(10 * var(--u));
}
.promo-rt__benefits img { width: calc(28 * var(--u)); height: calc(28 * var(--u)); flex: none; }
.promo-rt__benefits span { width: calc(272 * var(--u)); font-size: calc(16 * var(--u)); line-height: calc(20 * var(--u)); text-align: left; }
.promo-rt__benefits em { font-style: normal; color: #d97d00; }

/* ---------- 開催時期と案内 ---------- */
.promo-rt__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(6 * var(--u));
  width: calc(366 * var(--u));
  margin-top: calc(10 * var(--u));
}
.promo-rt__period {
  width: calc(180 * var(--u));
  padding: calc(3 * var(--u)) 0;
  border-radius: calc(16 * var(--u));
  background: linear-gradient(180deg, #e9ad13 0%, #945705 100%);
  color: #fff;
  font-size: calc(13 * var(--u));
  line-height: calc(16 * var(--u));
}
.promo-rt__join { width: 100%; font-size: calc(20 * var(--u)); line-height: calc(25 * var(--u)); }
.promo-rt__note { width: calc(350 * var(--u)); font-size: calc(9 * var(--u)); font-weight: 400; line-height: calc(11 * var(--u)); }
/* 純金プレートの下、賞品名の上の「※画像はイメージです」（Figma node 879:2213、高さ 20 の行の上詰め） */
.promo-rt__img-note {
  height: calc(20 * var(--u));
  font-size: calc(9 * var(--u));
  font-weight: 400;
  line-height: calc(11 * var(--u));
  white-space: nowrap;
}

/* ---------- 次のセクションへの案内（スクロールを促す） ----------
 * デザインの下矢印の代わり。事前登録キャンペーンの見出しと同じ青→紫の丸いボタンに、
 * 白い山形の矢印を入れる。ボタンはゆっくり上下に揺れ、外側に輪が広がって消える（1.8秒でくり返す）。
 * 細い線と矢印だけの案では、明るい背景の上で弱すぎて目に入らなかった。
 * 全体がリンクで、押すと事前登録キャンペーンの見出しまでなめらかにスクロールする。
 */
.promo-rt__next {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(366 * var(--u));
  margin-top: calc(6 * var(--u));
  padding: calc(5 * var(--u)) 0 calc(6 * var(--u));
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.promo-rt__next:focus-visible { outline: 2px solid #753bff; outline-offset: 4px; border-radius: calc(8 * var(--u)); }
.promo-rt__next-text {
  display: block;
  width: 100%;
  font-size: calc(16 * var(--u));
  line-height: calc(44 * var(--u));
  background: linear-gradient(90deg, #009cee 0%, #753bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.promo-rt__cue {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  border-radius: 50%;
  background: linear-gradient(135deg, #009cee 0%, #753bff 100%);
  box-shadow: 0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(83, 70, 255, 0.35);
  animation: rt-cue-bob 1.8s ease-in-out infinite;
}
/* 外に広がって消える輪 */
.promo-rt__cue::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: calc(2 * var(--u)) solid #6a4bf9;
  opacity: 0;
  animation: rt-cue-ring 1.8s ease-out infinite;
}
/* 矢印は SVG。枠線を回転させて描く方法は、Safari で線がかすれて見えたため */
.promo-rt__cue-chevron {
  position: relative;
  width: calc(14 * var(--u));
  height: calc(9 * var(--u));
  margin-top: calc(2 * var(--u));
}
.promo-rt__next:active .promo-rt__cue { transform: scale(0.94); }
@keyframes rt-cue-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(calc(5 * var(--u))); }
}
@keyframes rt-cue-ring {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .promo-rt__cue, .promo-rt__cue::before { animation: none; }
}

/* 案内から飛んだとき、事前登録キャンペーンの見出しが画面の上端に貼りつかないように */
#ms-title { scroll-margin-top: calc(24 * var(--u, 1px)); }

/* ===========================================
   公式トップ（.promo-rt--site）
   公式ではゲーム紹介（トレジャー）の下、事前登録キャンペーンの上に置く。
   上にキービジュアルがないので、KVの下へ潜り込ませる部分（::before）は使わず、
   背景の上端もページの地の色からふわっと出す。
   タブレット・PCでは、事前登録キャンペーンと同じく、地の色は横いっぱい、
   ヤシの島の絵は中身の列の後ろに置いて端をぼかす（横に伸ばすと絵が荒れるため）。
=========================================== */
.promo-rt--site {
  --rt-top-fade: calc(110 * var(--u));
  /* 絵の上端の位置。中身もこのぶん下げる（絵と中身の位置関係は Figma のまま） */
  --rt-img-y: calc(var(--rt-top-fade) * 0.6);
  /*
   * 上端のぼかし。絵の上端（--rt-img-y）まではまだ完全に透明で、そこから --rt-top-fade かけて出す。
   * 絵の上端がぼかしの途中にあると、絵の端が横線になって見えるため。
   */
  --rt-vmask: linear-gradient(180deg, transparent 0, transparent var(--rt-img-y), #000 calc(var(--rt-img-y) + var(--rt-top-fade)), #000 calc(100% - var(--rt-fade)), transparent 100%);
  padding-top: calc(34 * var(--u) + var(--rt-img-y));
}
.promo-rt--site::before { content: none; }
.promo-rt--site::after {
  background:
    url("../assets/real-treasure/bg.webp?v=20260930") 50% var(--rt-img-y) / auto calc(860.8 * var(--u)) no-repeat,
    #fff7df;
  -webkit-mask-image: var(--rt-vmask);
          mask-image: var(--rt-vmask);
}
/* LP では使わない */
.promo-rt__bg { display: none; }
/*
 * タブレット・PC（横に広いとき）
 * 地の色は横いっぱい。ヤシの島の絵は、左半分を画面の左端に、右半分を画面の右端に寄せて置く
 * （絵そのものが、左右の端にヤシの島が並ぶ作りなので、半分ずつに割って両端へ寄せる）。
 * 中央だけに絵を置くと、左右が無地で絵が浮いて見えたため（2026-10 デザイン確認）。
 * 各半分は、画面の中央側の端をぼかして地の色になじませる。
 */
@media (min-width: 520px) {
  .promo-rt--site {
    /* 絵の高さ・幅（Figma では 390px 幅で高さ 860.8px。原画は 869×1810） */
    --rt-bg-h: calc(860.8 * var(--u));
    --rt-bg-w: calc(var(--rt-bg-h) * 869 / 1810);
    /* 片側に見せる幅。原画の外側 42% にヤシの島がある */
    --rt-side: calc(var(--rt-bg-w) * 0.42);
  }
  /* 地の色は絵より奥に（同じ重なり順だと、あとに描かれる ::after が絵を覆ってしまう） */
  .promo-rt--site::after { background: #fff7df; z-index: -2; }
  .promo-rt--site .promo-rt__bg {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    -webkit-mask-image: var(--rt-vmask);
            mask-image: var(--rt-vmask);
  }
  .promo-rt--site .promo-rt__bg::before,
  .promo-rt--site .promo-rt__bg::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--rt-side);
    background-image: url("../assets/real-treasure/bg.webp?v=20260930");
    background-size: auto var(--rt-bg-h);
    background-repeat: no-repeat;
  }
  .promo-rt--site .promo-rt__bg::before {
    left: 0;
    background-position: left var(--rt-img-y);
    -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
  }
  .promo-rt--site .promo-rt__bg::after {
    right: 0;
    background-position: right var(--rt-img-y);
    -webkit-mask-image: linear-gradient(270deg, #000 55%, transparent 100%);
            mask-image: linear-gradient(270deg, #000 55%, transparent 100%);
  }
}
/*
 * トレジャー（ゲーム紹介の最後）との間を詰める。
 * 公式の .contents の下の余白（120px）と、このセクションの上のぼかしが重なって、
 * 見出しまで 160〜240px 空いていたため、幅ごとに引き上げて 100〜120px にそろえる。
 * 引き上げた部分は .contents の空いた余白に重なるだけ（中身には重ならない）。
 */
.promo-rt--site { margin-top: -100px; }
@media (min-width: 810px)  { .promo-rt--site { margin-top: -60px; } }
@media (min-width: 1200px) { .promo-rt--site { margin-top: -120px; } }
/* 公式のフェードイン（他のセクションと同じく、セクション単位。html.js-reveal ＋ .is-visible は公式の仕組み） */
.js-reveal .promo-rt {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.js-reveal .promo-rt.is-visible { opacity: 1; transform: none; }
