/*
 * LP第2版 ページごとの場面と飾り(atlas-v2.css の上に重ねる)
 *   トップ      = 星図の夜   (深い緑の夜空・金の枠・星)
 *   無料診断    = 星読みの紙 (紺のインク・星図の円・目盛り)
 *   制作・監修  = 工房の手もと(糸と玉・判子・縫い目の線)
 *   オラクル    = 天然石の国 (藤色の空・カードの額縁・結晶)
 */

/* ---------- 共通の飾り ---------- */

/* 金の二重線のまんなかに星 */
.av2-orn {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-size: 14px;
  line-height: 1;
}

.av2-orn::before,
.av2-orn::after {
  content: "";
  flex: 1;
  height: 5px;
  border-block: 1px solid var(--gold);
  opacity: 0.7;
}

.av2-orn--short {
  max-width: 220px;
}

.av2-orn--center {
  margin-inline: auto;
}

/* 写真の内側に金の細い額 */
.av2-frame {
  position: relative;
}

.av2-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}

.av2-frame--gold::after {
  border-color: var(--gold);
}

/* 写真を少しずらして重ねる */
.av2-offset {
  position: relative;
}

.av2-offset::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  pointer-events: none;
}

.av2-offset > .av2-figure {
  position: relative;
}

/* 星の散らし(固定しない背景の点) */
.av2-starfield {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 72%, var(--star) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 41% 34%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 12%, var(--star) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 66% 64%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 79% 28%, var(--star) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 88% 80%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 46%, var(--star) 50%, transparent 51%);
  background-size: 420px 300px;
  opacity: 0.8;
  pointer-events: none;
}

/* 星図の円(目盛りつき) */
.av2-chart {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle, transparent 31%, var(--chart) 31.2%, transparent 31.6%),
    radial-gradient(circle, transparent 46%, var(--chart) 46.2%, transparent 46.6%),
    radial-gradient(circle, transparent 69%, var(--chart) 69.2%, transparent 69.8%),
    repeating-conic-gradient(var(--chart) 0deg 0.6deg, transparent 0.6deg 7.5deg);
  -webkit-mask: radial-gradient(circle, #000 70%, transparent 70.4%);
  mask: radial-gradient(circle, #000 70%, transparent 70.4%);
}

.av2-chart::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--chart) 0deg 0.4deg, transparent 0.4deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 46.6%, #000 46.8%, #000 69%, transparent 69.2%);
  mask: radial-gradient(circle, transparent 46.6%, #000 46.8%, #000 69%, transparent 69.2%);
}

/* ---------- トップ: 星図の夜 ---------- */

.av2--top {
  --star: rgba(233, 218, 176, 0.9);
  --night: #142520;
  --night-ink: #eef2ee;
  --night-muted: rgba(238, 242, 238, 0.78);
}

.av2--top .av2-hero {
  position: relative;
  padding: 0;
  background: var(--night);
  color: var(--night-ink);
  isolation: isolate;
  overflow: hidden;
}

.av2--top .av2-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.av2--top .av2-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
}

.av2--top .av2-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(14, 28, 24, 0.94) 0%, rgba(14, 28, 24, 0.82) 42%, rgba(14, 28, 24, 0.15) 78%);
}

.av2--top .av2-hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(201, 176, 122, 0.55);
  pointer-events: none;
}

.av2--top .av2-hero__inner {
  display: grid;
  gap: 24px;
  max-width: 620px;
  padding-block: clamp(80px, 11vw, 140px);
}

.av2--top .av2-hero h1,
.av2--top .av2-hero .av2-hero__title {
  color: var(--night-ink);
}

/* 2・3枚目の見出しは h2 だが、1枚目の h1 と同じ大きさにそろえる */
.av2--top .av2-hero .av2-hero__title {
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.35;
}

/* 最初の画面のスライド(3枚)。横にスクロールしてぴたっと止まる。自動送りは7秒、触ったら止める */
.av2--top .av2-slider {
  position: relative;
  background: var(--night);
}

.av2--top .av2-slider__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.av2--top .av2-slider__track::-webkit-scrollbar {
  display: none;
}

.av2--top .av2-slider__track:focus-visible {
  outline: 2px solid #d9c38f;
  outline-offset: -4px;
}

.av2--top .av2-slider__track > .av2-hero {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

.av2--top .av2-slider__nav {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

/* テーマのボタンの余白・幅が入るので、ここだけ強く打ち消す */
.av2--top .av2-slider__arrow,
.av2--top .av2-slider__dots button {
  padding: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  box-shadow: none !important;
}

.av2--top .av2-slider__arrow {
  display: grid;
  place-items: center;
  width: 36px !important;
  height: 36px !important;
  border: 1px solid rgba(238, 242, 238, 0.55);
  border-radius: 999px;
  background: rgba(14, 28, 24, 0.5);
  color: var(--night-ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.av2--top .av2-slider__dots {
  display: flex;
  gap: 10px;
}

.av2--top .av2-slider__dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid #d9c38f;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.av2--top .av2-slider__dots button[aria-current="true"] {
  background: #d9c38f;
}

.av2--top .av2-slider__arrow:focus-visible,
.av2--top .av2-slider__dots button:focus-visible {
  outline: 2px solid #d9c38f;
  outline-offset: 3px;
}

.av2--top .av2-hero .av2-lead {
  color: var(--night-muted);
  font-size: 17px;
}

.av2--top .av2-hero .av2-eyebrow {
  color: #d9c38f;
}

.av2--top .av2-hero .av2-btn {
  background: #d9c38f;
  border-color: #d9c38f;
  color: #142520 !important;
}

.av2--top .av2-hero .av2-btn--ghost {
  background: transparent;
  border-color: rgba(238, 242, 238, 0.6);
  color: var(--night-ink) !important;
}

.av2--top .av2-facts {
  border: 0;
  background: var(--night);
  color: var(--night-ink);
}

.av2--top .av2-facts li {
  color: var(--night-ink);
}

.av2--top .av2-facts li + li {
  border-left: 1px solid rgba(201, 176, 122, 0.4);
}

.av2--top .av2-facts li::before {
  content: "✦";
  margin-right: 10px;
  color: #d9c38f;
  font-size: 12px;
}

.av2--top .av2-statement-wrap {
  position: relative;
  overflow: hidden;
}

.av2--top .av2-statement-wrap .av2-chart {
  --chart: rgba(156, 131, 80, 0.32);
  width: min(560px, 70vw);
  right: -140px;
  top: -120px;
}

.av2--top .av2-group h3::before,
.av2--production .av2-group h3::before {
  content: "✦ ";
  color: var(--gold);
}

.av2--top .av2-group h3 {
  border-bottom: 0;
  padding-bottom: 14px;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 100% 1px no-repeat,
              linear-gradient(var(--gold), var(--gold)) left calc(100% - 4px) / 100% 1px no-repeat;
}

/* 流れ=星座の線 */
.av2--top .av2-steps {
  position: relative;
  gap: 0;
}

.av2--top .av2-steps li {
  position: relative;
  padding: 38px 16px 0 0;
  border-top: 0;
}

.av2--top .av2-steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--bg);
  font-size: 13px;
}

.av2--top .av2-steps li::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 30px;
  right: 6px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 11px);
}

.av2--top .av2-steps li:last-child::after {
  display: none;
}

.av2--top .av2-close {
  position: relative;
  isolation: isolate;
  background: var(--night);
  color: var(--night-ink);
}

.av2--top .av2-close h2 {
  color: var(--night-ink);
}

.av2--top .av2-close .av2-lead {
  color: var(--night-muted);
}

.av2--top .av2-close .av2-close__mark {
  filter: invert(1) sepia(0.5) saturate(1.4) hue-rotate(5deg) brightness(0.95);
  mix-blend-mode: screen;
}

.av2--top .av2-close .av2-btn {
  background: #d9c38f;
  border-color: #d9c38f;
  color: #142520 !important;
}

.av2--top .av2-close .av2-btn--ghost {
  background: transparent;
  border-color: rgba(238, 242, 238, 0.6);
  color: var(--night-ink) !important;
}

/* ---------- 無料診断: 星読みの紙 ---------- */

.av2--service {
  --accent: #26375e;
  --accent-ink: #f2f4f8;
  --bg: #eef0f4;
  --surface: #f9fafc;
  --tint: #e2e6ef;
  --ink: #18203a;
  --muted: #545c72;
  --line: rgba(24, 32, 58, 0.15);
  --chart: rgba(38, 55, 94, 0.22);
  --shadow: 0 24px 60px rgba(30, 44, 80, 0.16);
}

.av2--service .av2-hero {
  position: relative;
  overflow: hidden;
}

.av2--service .av2-hero .av2-chart {
  width: min(760px, 110vw);
  right: -160px;
  top: 50%;
  transform: translateY(-50%);
}

.av2--service .av2-hero__grid {
  position: relative;
}

/* 丸窓の写真 */
.av2--service .av2-porthole {
  position: relative;
  justify-self: center;
  width: min(420px, 100%);
  aspect-ratio: 1;
}

.av2--service .av2-porthole .av2-figure {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.av2--service .av2-porthole::before {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.av2--service .av2-porthole::after {
  content: "";
  position: absolute;
  inset: -26px;
  border: 1px dashed var(--chart);
  border-radius: 50%;
}

.av2--service .av2-facts li::before {
  content: "◇";
  margin-right: 8px;
  color: var(--gold);
}

.av2--service .av2-group {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, var(--tint) 0 90px, transparent 91px),
    var(--surface);
}

.av2--service .av2-group h3 {
  border-bottom: 1px solid var(--accent);
}

/* 流れ=縦の目盛り */
.av2--service .av2-steps {
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 720px;
  border-left: 1px solid var(--accent);
  margin-left: 16px;
}

.av2--service .av2-steps li {
  position: relative;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  padding: 18px 0 18px 28px;
  border-top: 0;
  font-size: 17px;
}

.av2--service .av2-steps li::before {
  font-size: 26px;
}

.av2--service .av2-steps li::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 30px;
  width: 11px;
  height: 11px;
  border: 1px solid var(--accent);
  background: var(--bg);
  transform: rotate(45deg);
}

.av2--service .av2-close {
  position: relative;
  overflow: hidden;
}

.av2--service .av2-close .av2-chart {
  width: 720px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.6;
}

.av2--service .av2-close .av2-wrap {
  position: relative;
}

/* ---------- 制作・監修: 工房の手もと ---------- */

.av2--production {
  --bg: #edefea;
  --surface: #f8f9f6;
  --tint: #e3e7df;
  --thread: rgba(36, 69, 60, 0.4);
}

/* 写真2枚を重ねる */
.av2--production .av2-collage {
  position: relative;
  min-height: 460px;
}

.av2--production .av2-collage .av2-figure:first-child {
  width: 78%;
  aspect-ratio: 4 / 5;
}

.av2--production .av2-collage .av2-figure:last-child {
  position: absolute;
  right: 0;
  bottom: -24px;
  width: 52%;
  aspect-ratio: 1;
  border: 6px solid var(--surface);
}

/* 判子 */
.av2--production .av2-stamp {
  position: absolute;
  top: -22px;
  right: 6%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  outline: 1px solid var(--accent);
  outline-offset: -8px;
  background: var(--surface);
  color: var(--accent);
  font-family: var(--font-display) !important;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  transform: rotate(-12deg);
}

/* 縫い目の線 */
.av2--production .av2-section + .av2-section {
  border-top: 1px dashed var(--thread);
}

.av2--production .av2-points > div {
  position: relative;
}

.av2--production .av2-points strong::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--accent) 60%);
  vertical-align: -1px;
}

/* 選び方=糸に通した玉 */
.av2--production .av2-chips {
  position: relative;
  padding-top: 18px;
}

.av2--production .av2-chips::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--thread) 0 8px, transparent 8px 13px);
}

.av2--production .av2-chips li {
  position: relative;
  padding-left: 40px;
}

.av2--production .av2-chips li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #fff 0 16%, var(--bead, #7aa596) 62%);
}

.av2--production .av2-chips li:nth-child(2) { --bead: #8e7ab5; }
.av2--production .av2-chips li:nth-child(3) { --bead: #5f7fb3; }
.av2--production .av2-chips li:nth-child(4) { --bead: #a9b3c2; }
.av2--production .av2-chips li:nth-child(5) { --bead: #c99a6b; }
.av2--production .av2-chips li:nth-child(6) { --bead: #d29aa8; }

/* ---------- オラクル: 天然石の国 ---------- */

.av2--oracle {
  --bg: #f1eef6;
  --surface: #fbfafd;
  --tint: #e8e2f2;
  --ink: #2a2140;
  --muted: #5e5672;
  --line: rgba(42, 33, 64, 0.14);
  --accent: #4b3a6b;
  --accent-ink: #f7f4fb;
  --gold: #a88a4c;
  --star: rgba(168, 138, 76, 0.75);
  --shadow: 0 24px 60px rgba(75, 58, 107, 0.18);
}

.av2--oracle .av2-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(214, 196, 240, 0.9), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(244, 214, 226, 0.7), transparent 50%),
    var(--bg);
}

.av2--oracle .av2-hero::before {
  z-index: -1;
}

/* カードの額縁 */
.av2--oracle .av2-cardframe {
  position: relative;
  padding: 14px;
  border: 1px solid var(--gold);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.av2--oracle .av2-cardframe::before,
.av2--oracle .av2-cardframe::after {
  content: "◆";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 12px;
  line-height: 1;
  background: var(--surface);
  padding-inline: 6px;
}

.av2--oracle .av2-cardframe::before { top: -7px; }
.av2--oracle .av2-cardframe::after { bottom: -7px; }

.av2--oracle .av2-cardframe .av2-figure {
  box-shadow: none;
}

.av2--oracle .av2-hero .av2-cardframe {
  justify-self: end;
  width: min(330px, 78%);
  transform: rotate(5deg);
}

.av2--oracle .av2-hero .av2-cardframe--back {
  position: absolute;
  width: min(290px, 66%);
  left: 0;
  top: 10%;
  transform: rotate(-9deg);
}

.av2--oracle .av2-hero__cards {
  position: relative;
  display: grid;
  min-width: 0;
}

.av2--oracle .av2-hero__cards .av2-cardframe:not(.av2-cardframe--back) {
  position: relative;
  z-index: 1;
}

.av2--oracle .av2-contents h3::before {
  content: "◆ ";
  font-size: 12px;
  vertical-align: 2px;
}

.av2--oracle .av2-contents .av2-figure {
  outline: 1px solid var(--gold);
  outline-offset: 5px;
  margin: 6px;
}

.av2--oracle .av2-sample__card {
  position: relative;
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: -8px;
  padding: clamp(32px, 5vw, 48px);
}

.av2--oracle .av2-signs > div b::before {
  content: "✦ ";
  color: var(--gold);
  font-size: 14px;
}

.av2--oracle .av2-close {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(214, 196, 240, 0.8), transparent 60%),
    var(--tint);
}

/* ---------- 暗い表示 ---------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .av2--service {
    --accent: #a9bce6; --accent-ink: #10162a; --bg: #10141f; --surface: #171c2a; --tint: #1b2233;
    --ink: #e7ebf4; --muted: #a6aec2; --line: rgba(231, 235, 244, 0.14); --chart: rgba(169, 188, 230, 0.22);
  }
  :root:not([data-theme="light"]) .av2--production {
    --bg: #121714; --surface: #19201c; --tint: #1e2622; --thread: rgba(156, 196, 178, 0.4);
  }
  :root:not([data-theme="light"]) .av2--oracle {
    --bg: #17131f; --surface: #1f1a2a; --tint: #241e33; --ink: #ede8f6; --muted: #b3aac6;
    --line: rgba(237, 232, 246, 0.14); --accent: #c9b6ef; --accent-ink: #17131f; --gold: #cdb27a;
  }
  :root:not([data-theme="light"]) .av2--oracle .av2-hero {
    background: radial-gradient(ellipse at 80% 20%, rgba(90, 70, 130, 0.6), transparent 55%), var(--bg);
  }
  :root:not([data-theme="light"]) .av2--oracle .av2-close {
    background: radial-gradient(ellipse at 50% 0%, rgba(90, 70, 130, 0.5), transparent 60%), var(--tint);
  }
}

:root[data-theme="dark"] .av2--service {
  --accent: #a9bce6; --accent-ink: #10162a; --bg: #10141f; --surface: #171c2a; --tint: #1b2233;
  --ink: #e7ebf4; --muted: #a6aec2; --line: rgba(231, 235, 244, 0.14); --chart: rgba(169, 188, 230, 0.22);
}
:root[data-theme="dark"] .av2--production {
  --bg: #121714; --surface: #19201c; --tint: #1e2622; --thread: rgba(156, 196, 178, 0.4);
}
:root[data-theme="dark"] .av2--oracle {
  --bg: #17131f; --surface: #1f1a2a; --tint: #241e33; --ink: #ede8f6; --muted: #b3aac6;
  --line: rgba(237, 232, 246, 0.14); --accent: #c9b6ef; --accent-ink: #17131f; --gold: #cdb27a;
}
:root[data-theme="dark"] .av2--oracle .av2-hero {
  background: radial-gradient(ellipse at 80% 20%, rgba(90, 70, 130, 0.6), transparent 55%), var(--bg);
}
:root[data-theme="dark"] .av2--oracle .av2-close {
  background: radial-gradient(ellipse at 50% 0%, rgba(90, 70, 130, 0.5), transparent 60%), var(--tint);
}

/* ---------- スマホ ---------- */

@media (max-width: 767px) {
  .av2--top .av2-hero::before {
    background: linear-gradient(180deg, rgba(14, 28, 24, 0.55) 0%, rgba(14, 28, 24, 0.92) 55%);
  }

  .av2--top .av2-hero::after {
    inset: 10px;
  }

  .av2--top .av2-hero__inner {
    padding-block: 220px 64px;
  }

  /* スライドの丸と矢印が、ボタンに重ならないように下を空ける */
  .av2--top .av2-slider .av2-hero__inner {
    padding-bottom: 112px;
  }

  .av2--top .av2-slider__nav {
    bottom: 26px;
  }

  .av2--top .av2-steps li {
    grid-template-columns: 1fr;
    padding: 0 0 22px 40px;
  }

  .av2--top .av2-steps li::after {
    top: 30px;
    bottom: 0;
    left: 12px;
    right: auto;
    width: 1px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--gold) 0 6px, transparent 6px 11px);
  }

  .av2--top .av2-steps li:last-child::after {
    display: none;
  }

  .av2--production .av2-collage {
    min-height: 0;
    margin-bottom: 40px;
  }

  .av2--production .av2-stamp {
    width: 88px;
    height: 88px;
    font-size: 13px;
    top: -14px;
  }

  .av2--oracle .av2-hero .av2-cardframe--back {
    right: 4%;
    width: 62%;
  }

  .av2--service .av2-porthole {
    width: min(300px, 80%);
    margin-top: 24px;
  }
}
