/*
  写真から動画 — service-tools の昼の光をそのまま継承する。
  新しい色や意匠は足さない: --tools-sun 系の金、夜紺の地、18px の切り欠き、
  縁を走る信号線。ここで足すのは「動く実物を置く枠」と「選ぶための面」だけ。
*/

.pv-page {
  background: #02101c;
}

.pv-page [hidden] {
  display: none !important;
}

/* 上端から絵が始まるページではないので、ヘッダーは通常フローに戻す */
.pv-page .header {
  position: relative;
}

/* ---------- 共通の面 ---------- */

.pv-section {
  position: relative;
  isolation: isolate;
  padding: clamp(64px, 8svh, 104px) clamp(24px, 5vw, 72px);
}

.pv-section__inner {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.pv-section:nth-of-type(even) {
  background:
    radial-gradient(ellipse at 84% 14%, rgba(var(--tools-sun-rgb), 0.06), transparent 34%),
    #03121f;
}

.pv-heading {
  max-width: 780px;
  margin-bottom: clamp(34px, 4.5svh, 54px);
}

.pv-heading h2 {
  font-size: clamp(30px, 3.3vw, 46px);
  font-weight: 500;
  line-height: 1.45;
}

.pv-heading h2 em {
  color: var(--tools-sun);
  font-style: normal;
}

.pv-heading > p {
  max-width: 60ch;
  margin-top: 18px;
  color: rgba(226, 244, 248, 0.79);
  font-size: 16px;
  line-height: 1.95;
}

/* ---------- 1. ヒーロー: 見出しの隣で見本が動く ---------- */

.pv-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(40px, 6svh, 72px) clamp(24px, 5vw, 72px) clamp(64px, 8svh, 104px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  background:
    radial-gradient(ellipse at 16% 20%, rgba(var(--tools-sun-rgb), 0.09), transparent 38%),
    radial-gradient(ellipse at 88% 74%, rgba(var(--tools-sun-deep-rgb), 0.07), transparent 34%),
    #02101c;
}

.pv-hero__inner {
  max-width: 620px;
}

.pv-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(var(--tools-sun-rgb), 0.9);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.pv-eyebrow i {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--tools-sun-rgb), 0.7), rgba(var(--tools-sun-rgb), 0.15));
}

.pv-hero h1 {
  margin-top: 18px;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 500;
  line-height: 1.4;
}

.pv-hero h1 em {
  color: var(--tools-sun);
  font-style: normal;
}

.pv-lead {
  max-width: 52ch;
  margin-top: 20px;
  color: rgba(226, 244, 248, 0.82);
  font-size: 16px;
  line-height: 1.95;
}

.pv-hero__facts {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pv-hero__facts span {
  padding: 7px 15px;
  color: rgba(236, 246, 242, 0.86);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(var(--tools-sun-rgb), 0.34);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

/* 見本の枠。切り欠きと縁の信号線は tool-card と同じ語彙 */
.pv-stage {
  margin: 0;
  justify-self: center;
}

.pv-stage__frame {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  box-shadow: 0 26px 52px rgba(0, 4, 9, 0.44);
}

.pv-stage__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(var(--tools-sun-rgb), 0.42);
  clip-path: inherit;
  pointer-events: none;
}

.pv-stage__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pv-stage__signal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tools-sun), transparent);
  animation: pv-signal 3.6s linear infinite;
}

@keyframes pv-signal {
  0% { transform: translateX(-100%); opacity: 0; }
  20% { opacity: 0.9; }
  100% { transform: translateX(100%); opacity: 0; }
}

.pv-stage figcaption {
  margin-top: 14px;
  color: rgba(226, 244, 248, 0.6);
  font-size: 12.5px;
  text-align: center;
}

.pv-pause {
  width: min(440px, 100%);
  justify-self: center;
  padding: clamp(24px, 4vw, 40px);
  color: rgba(226, 244, 248, 0.78);
  line-height: 1.9;
  background: rgba(var(--tools-sun-deep-rgb), 0.1);
  border: 1px solid rgba(var(--tools-sun-rgb), 0.34);
  border-left: 3px solid var(--tools-sun);
}

.pv-pause p + p {
  margin-top: 16px;
}

.pv-pause strong {
  color: var(--tools-sun);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 500;
}

/* ---------- 2. 完成イメージの一覧 ---------- */

.pv-gallery {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}

.pv-sample__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  border: 1px solid rgba(var(--tools-sun-rgb), 0.24);
}

.pv-sample__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 未再生のときだけ出す再生の合図。JSで is-playing を付けたら消える */
.pv-sample__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 12, 20, 0.32);
  transition: opacity 240ms ease;
}

.pv-sample__play::before {
  content: "";
  width: 46px;
  height: 46px;
  border: 1px solid rgba(var(--tools-sun-rgb), 0.7);
  border-radius: 50%;
  background:
    linear-gradient(rgba(var(--tools-sun-rgb), 0.16), rgba(var(--tools-sun-rgb), 0.16)) padding-box;
  clip-path: circle(50%);
}

.pv-sample__play::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 13px solid var(--tools-sun);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.pv-sample.is-playing .pv-sample__play {
  opacity: 0;
  pointer-events: none;
}

.pv-sample__copy {
  margin-top: 14px;
}

.pv-sample__copy strong {
  display: block;
  color: var(--tools-sun);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.pv-sample__copy p {
  margin-top: 7px;
  color: rgba(226, 244, 248, 0.72);
  font-size: 13px;
  line-height: 1.8;
}

.pv-note {
  margin-top: clamp(24px, 3svh, 36px);
  color: rgba(226, 244, 248, 0.62);
  font-size: 13.5px;
  line-height: 1.9;
}

/* ---------- 3. 選ぶ ---------- */

.pv-form {
  display: grid;
  gap: clamp(28px, 4svh, 44px);
}

.pv-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.pv-field legend {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--paper);
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 500;
}

.pv-field legend b {
  color: rgba(var(--tools-sun-rgb), 0.86);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.pv-field__hint {
  margin-top: 14px;
  color: rgba(226, 244, 248, 0.6);
  font-size: 13px;
  line-height: 1.85;
}

.pv-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pv-choices--mood {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pv-optional {
  color: rgba(226, 244, 248, 0.5);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.pv-shape-time {
  display: grid;
  gap: 16px;
}

.pv-choices--shape {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 320px;
}

.pv-choices--seconds {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 480px;
}

.pv-choice--sm > span {
  min-height: 52px;
  padding: 10px 14px;
  display: grid;
  place-items: center;
  text-align: center;
}

.pv-choice--sm > span strong {
  font-size: 13.5px;
}

.pv-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.pv-choice > span {
  display: block;
  min-height: 74px;
  padding: 16px 18px;
  cursor: pointer;
  background: linear-gradient(146deg, rgba(13, 39, 52, 0.9), rgba(3, 17, 28, 0.95));
  border: 1px solid rgba(var(--tools-sun-rgb), 0.18);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: border-color 200ms ease, transform 260ms cubic-bezier(.16, 1, .3, 1);
}

.pv-choice > span strong {
  display: block;
  color: rgba(236, 246, 242, 0.92);
  font-size: 14.5px;
  font-weight: 500;
}

.pv-choice > span small {
  display: block;
  margin-top: 6px;
  color: rgba(226, 244, 248, 0.56);
  font-size: 12px;
}

.pv-choice:hover > span {
  border-color: rgba(var(--tools-sun-rgb), 0.42);
  transform: translateY(-2px);
}

.pv-choice input:checked + span {
  border-color: var(--tools-sun);
  background: linear-gradient(146deg, rgba(var(--tools-sun-deep-rgb), 0.22), rgba(3, 17, 28, 0.95));
}

.pv-choice input:checked + span strong {
  color: var(--tools-sun);
}

.pv-choice input:focus-visible + span {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

/* 写真を入れる面 */
.pv-drop {
  position: relative;
  display: block;
  padding: clamp(30px, 5vh, 48px) 24px;
  text-align: center;
  cursor: pointer;
  background: rgba(6, 24, 38, 0.6);
  border: 1px dashed rgba(var(--tools-sun-rgb), 0.4);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: border-color 200ms ease, background 200ms ease;
}

.pv-drop:hover,
.pv-drop.is-over {
  border-color: var(--tools-sun);
  background: rgba(var(--tools-sun-deep-rgb), 0.1);
}

.pv-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.pv-drop__body b {
  display: block;
  color: var(--tools-sun);
  font-size: 16px;
  font-weight: 500;
}

.pv-drop__body small {
  display: block;
  margin-top: 8px;
  color: rgba(226, 244, 248, 0.66);
  font-size: 13px;
}

.pv-drop input:focus-visible + .pv-drop__body {
  outline: 2px solid var(--paper);
  outline-offset: 6px;
}

.pv-thumbs {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pv-thumbs li {
  position: relative;
  width: 74px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(var(--tools-sun-rgb), 0.28);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.pv-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pv-thumbs li b {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 2px 6px;
  color: #02101c;
  background: rgba(var(--tools-sun-rgb), 0.92);
  font-size: 10.5px;
  font-weight: 500;
}

/* 確認と支払い */
.pv-summary {
  padding: clamp(24px, 3.5vh, 34px) clamp(24px, 3vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: clamp(24px, 3vw, 44px);
  background: linear-gradient(146deg, rgba(13, 39, 52, 0.95), rgba(3, 17, 28, 0.97));
  border: 1px solid rgba(var(--tools-sun-rgb), 0.3);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.pv-summary dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.pv-summary dl div {
  display: grid;
  gap: 5px;
}

.pv-summary dt {
  color: rgba(226, 244, 248, 0.58);
  font-size: 11.5px;
  letter-spacing: 0.1em;
}

.pv-summary dd {
  margin: 0;
  color: rgba(236, 246, 242, 0.94);
  font-size: 14.5px;
}

.pv-summary__action {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.pv-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--tools-sun);
}

.pv-price b {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.pv-price small {
  color: rgba(var(--tools-sun-rgb), 0.8);
  font-size: 13px;
}

/* 回数券だと分かる一行。価格の真下に置く */
.pv-price__note {
  margin-top: -6px;
  color: rgba(226, 244, 248, 0.72);
  font-size: 12.5px;
  line-height: 1.8;
}

.pv-price__note b {
  color: var(--tools-sun);
  font-weight: 500;
}

.pv-summary__action .tools-primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.pv-summary__note {
  color: rgba(226, 244, 248, 0.62);
  font-size: 12.5px;
  line-height: 1.8;
}

/* ---------- 支払い後: 作るボタンと進み具合 ---------- */

.pv-after {
  margin-top: clamp(20px, 3svh, 30px);
  padding: clamp(22px, 3vh, 30px) clamp(22px, 3vw, 32px);
  display: grid;
  justify-items: start;
  gap: 14px;
  background: rgba(var(--tools-sun-deep-rgb), 0.1);
  border-left: 2px solid var(--tools-sun);
}

.pv-after__lead {
  color: rgba(236, 246, 242, 0.9);
  font-size: 14.5px;
  line-height: 1.9;
}

/* ポップアップブロック時の代替リンク。新しい色は足さず既存の金色を強めるだけ */
.pv-after__lead--warn {
  color: var(--tools-sun);
  font-weight: 600;
}

.pv-after__lead--warn a {
  color: var(--tools-sun);
  text-decoration: underline;
}

.pv-after__status {
  color: rgba(var(--tools-sun-rgb), 0.9);
  font-size: 13.5px;
  line-height: 1.85;
}

.pv-results {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.pv-results a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tools-sun);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--tools-sun-rgb), 0.44);
  padding-bottom: 3px;
}

.pv-results a:hover,
.pv-results a:focus-visible {
  border-color: var(--tools-sun);
}

@media (max-width: 620px) {
  .pv-after {
    justify-items: stretch;
  }

  .pv-after .tools-primary {
    width: 100%;
  }
}

/* ---------- 4. 届くまで ---------- */

.pv-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
}

.pv-steps li {
  padding: clamp(24px, 3vh, 32px) clamp(20px, 2.4vw, 28px);
  background: linear-gradient(146deg, rgba(13, 39, 52, 0.88), rgba(3, 17, 28, 0.94));
  border-top: 1px solid rgba(var(--tools-sun-rgb), 0.44);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.pv-steps li b {
  color: rgba(var(--tools-sun-rgb), 0.8);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.pv-steps li strong {
  display: block;
  margin-top: 12px;
  color: var(--paper);
  font-size: 17px;
  font-weight: 500;
}

.pv-steps li p {
  margin-top: 10px;
  color: rgba(226, 244, 248, 0.74);
  font-size: 13.5px;
  line-height: 1.9;
}

.pv-safe {
  margin-top: clamp(24px, 3svh, 34px);
  padding: 20px 24px;
  background: rgba(var(--tools-sun-deep-rgb), 0.1);
  border-left: 2px solid var(--tools-sun);
}

.pv-safe p {
  color: rgba(236, 246, 242, 0.88);
  font-size: 14px;
  line-height: 1.9;
}

.pv-safe strong {
  color: var(--tools-sun);
  font-weight: 500;
}

/* ---------- 5. 引き返す道 ---------- */

.pv-back h2 {
  max-width: 40ch;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.5;
}

.pv-back > .pv-section__inner > p {
  max-width: 60ch;
  margin-top: 16px;
  color: rgba(226, 244, 248, 0.76);
  font-size: 15px;
  line-height: 1.95;
}

.pv-back__links {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.pv-textlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(226, 244, 248, 0.8);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--tools-sun-rgb), 0.4);
  padding-bottom: 3px;
  transition: color 200ms ease, border-color 200ms ease;
}

.pv-textlink i {
  width: 14px;
  height: 1px;
  background: currentColor;
}

.pv-textlink:hover,
.pv-textlink:focus-visible {
  color: var(--tools-sun);
  border-color: var(--tools-sun);
}

/* ---------- 画面の狭いところ ---------- */

@media (max-width: 1080px) {
  .pv-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pv-choices,
  .pv-choices--mood {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pv-hero {
    grid-template-columns: 1fr;
    padding-top: clamp(28px, 4svh, 48px);
  }

  .pv-hero__inner {
    max-width: none;
  }

  .pv-summary {
    grid-template-columns: 1fr;
  }

  .pv-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .pv-section {
    padding-inline: 20px;
  }

  .pv-hero {
    padding-inline: 20px;
  }

  .pv-gallery {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  /* スマホでは見本を横に寝かせず、1枚ずつ大きく見せる */
  .pv-sample__frame {
    max-width: 260px;
  }

  .pv-choices,
  .pv-choices--mood {
    grid-template-columns: 1fr;
  }

  .pv-summary dl {
    grid-template-columns: 1fr;
  }

  .pv-summary__action {
    justify-items: stretch;
  }

  .pv-summary__action .tools-primary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-stage__signal {
    animation: none;
    opacity: 0.7;
  }

  .pv-choice:hover > span {
    transform: none;
  }
}
