/* 選手情報一覧。ページ固有のレイアウトのみ。コンポーネントの上書き禁止 */

.p-players {
  background: var(--color-red);
}

/* 赤コンクリートテクスチャ(相関図・フッターは各自の背景で覆う) */
.p-players__main {
  padding-top: 48px;
  background: var(--color-red) url(/sasuke_rising/assets/img/common_texture_red.webp) center top / cover;
}

.p-players__title {
  padding: 24px 0;
}

.p-players__teams {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.p-players__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.p-players__chart {
  position: relative;
  margin-top: 0;
}

.p-players__yamada {
  position: absolute;
  top: -203.6px;
  left: calc(50% - 134.9px);
  width: 261.7px;
  max-width: none;
  transform: rotate(-177.58deg);
  pointer-events: none;
}

@media (min-width: 991.98px) {
  .p-players__main {
    padding-top: 84px;
  }

  .p-players__title {
    padding: 0;
    margin-bottom: 40px;
  }

  .p-players__teams {
    gap: 40px;
  }

  .p-players__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin-top: 5px;
  }

  .p-players__yamada {
    top: -332.5px;
    left: calc(50% - 259px);
    width: 473px;
  }
}
/* 選手詳細ページ */


.p-player-detail {
     background: #1f180b;
}

/* JSON読み込み中はデータ依存セクションを隠す */
.p-player-detail__main.is-loading .p-player-detail__hero,
.p-player-detail__main.is-loading .p-player-detail__stats,
.p-player-detail__main.is-loading .p-player-detail__history,
.p-player-detail__main.is-loading .p-player-detail__qa,
.p-player-detail__main.is-loading .p-player-detail__movie {
  display: none;
}

.p-player-detail__loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50vh;
  color: var(--color-white);
  font-family: var(--font-en);
  font-size: 28px;
  letter-spacing: 0.14em;
}

.p-player-detail__main.is-loading .p-player-detail__loading {
  display: flex;
}

.p-player-detail__loading::before {
  content: '';
  width: 26px;
  height: 26px;
  border: 3px solid rgb(255 255 255 / 25%);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: p-player-loading-spin 0.8s linear infinite;
}

@keyframes p-player-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .p-player-detail__loading::before {
    animation: none;
  }
}

.p-player-detail__notice {
  display: grid;
  place-items: center;
  min-height: 50vh;
  color: var(--color-white);
  font-size: 14px;
}



/* ヒーロー。写真の上にページラベル・チームタグ・プロフィール
   SPの上部余白は直筆メッセージゾーン(通常フロー)のmin-heightで確保する */
.p-player-detail__hero {
  position: relative;
  padding-top: 0;
  padding-bottom: 25px;
  background: var(--color-black);
}

.p-player-detail__hero-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
    height: 200vw;
  overflow: hidden;
}

.p-player-detail__hero-image,
.p-player-detail__hero-message {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-player-detail__hero-image--pc,
.p-player-detail__hero-message--pc {
  display: none;
}

.p-player-detail__hero-image {
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .p-player-detail__hero-message {
    animation: none;
    opacity: 1;
    transform: none;
  }

}

.p-player-detail__hero-message {
  top: 40px;
  bottom: auto;
  z-index: 2;
  animation: p-player-hero-message-reveal .55s ease-out .75s both;
  will-change: opacity, transform;
}


.p-player-detail__hero-message--sp {
  position: static;
  inset: auto;
  height: auto;
  object-fit: initial;
}


.p-player-detail__hero-message-zone {
  display: flex;
  align-items: flex-end;
 min-height: 186vw;
    padding-inline: 15px;
    padding-bottom: 30px;
}

@keyframes p-player-hero-message-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.p-player-detail__hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translateY(200px);
      background:linear-gradient(to top, var(--color-black) 37%, rgb(0 0 0 / 85%) 45%, rgba(0, 0, 0, 0.62) 54%, rgba(0, 0, 0, 0.28) 60%, rgba(0, 0, 0, 0) 71%)
}

.p-player-detail__label {
  position: absolute;
  z-index: 3;
  top: 72px;
  left: 0;
  width: 100%;
}

.p-player-detail__hero-inner {
  position: relative;
  z-index: 3;
}

.p-player-detail__tag {
  width: calc(292vw / 3.2);
  margin-inline: auto;
}

.p-player-detail__profile {
  padding: 0 15px;
  margin: 9px auto 0;
  color: var(--color-white);
}

/* テキストボックス高さ固定のため、flexで中央寄せして高さを一致させる。
   枠に収まらない長いキャッチ・カタカナ名はplayer-detail.jsが字間詰め→縮小で1行に収める */
.p-player-detail__catch {
  display: flex;
  align-items: center;
  height: 23px;
  font-size: 24px;
  line-height: 1.5;
  white-space: nowrap;
}

.p-player-detail__name {
  display: flex;
  align-items: center;
  height: 52px;
  margin-top: 10px;
  font-weight: 900;
  font-size: 48px;
  line-height: 1.5;
  white-space: nowrap;
}

.p-player-detail__name-en {
  display: flex;
  align-items: center;
  height: 19px;
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.5;
}

.p-player-detail__bio {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.6;
}

/* STATS */
.p-player-detail__stats {
  padding: 25px 0 24px;
  overflow-x: clip; 
  background: var(--color-red) url(/sasuke_rising/assets/img/common_texture_red.webp) center / cover;
}

.p-player-detail__stats-image {
  display: block;
  margin: 24px auto 0;
  aspect-ratio: 288 / 193;
  object-fit: cover;
  padding: 0 16px;
}

.p-player-detail__stats-chart {
  --stats-chart-value-size: 100%;
  position: relative;
  width: clamp(288px, 76.8vw, calc(100% - 30px));
  margin: 24px auto 0;
  aspect-ratio: 1181 / 843;
}

.p-player-detail__stats-chart img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.p-player-detail__stats-chart-value {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: var(--stats-chart-value-size);
  height: auto;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.55);
  transform-origin: center;
}

.p-player-detail__stats-chart.is-in .p-player-detail__stats-chart-value {
  animation: p-player-detail-chart-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes p-player-detail-chart-reveal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
  }

  72% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .p-player-detail__stats-chart-value {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* HISTORY */
.p-player-detail__history {
  position: relative;
  padding-top: 24px;
  background: var(--color-blue);
  overflow-x: clip;
}

/* 出場歴なしの選手。タイムラインの代わりに中央表示 */
.p-player-detail__history-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 15px 0;
  color: var(--color-yellow);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 991.98px) {
  .p-player-detail__history-empty {
    padding: 100px 15px 0;
    font-size: 30px;
  }
}

.p-player-detail__history-scroll {
  margin-top: 24px;
  padding: 0 15px 0 max(34px, 9.07vw);
  overflow-x: auto;
  scrollbar-width: none;
}

.p-player-detail__history-scroll::-webkit-scrollbar {
  display: none;
}

.p-player-detail__history-scrollbar {
  --history-scrollbar-thumb-size: 100%;
  --history-scrollbar-thumb-offset: 0%;
  --history-scrollbar-thumb-inset: 2px;
  position: relative;
  height: 18px;
  margin: 24px 32px 0;
  border-radius: 20px;
  background: #324D84;
  cursor: pointer;
  touch-action: none;
}

.p-player-detail__history-scrollbar::before {
  content: '';
  position: absolute;
  top: var(--history-scrollbar-thumb-inset);
  bottom: var(--history-scrollbar-thumb-inset);
  left: calc(var(--history-scrollbar-thumb-offset) + var(--history-scrollbar-thumb-inset));
  width: calc(var(--history-scrollbar-thumb-size) - 4px);
  border-radius: 20px;
  background: var(--color-yellow);
}

.p-player-detail__history-scrollbar[aria-hidden='true'] {
  display: none;
}

.p-player-detail__history-scrollbar:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 4px;
}

.p-player-detail__timeline {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: max-content;
}


.p-player-detail__timeline::before {
  content: '';
  position: absolute;
  top: 96px;
  left: 87px;
  right: 0;
  height: 3px;
  background: var(--color-yellow);
}

.p-player-detail__history-item {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 175px;
  color: var(--color-yellow);
}

/* 丸マーカーと縦線 */
.p-player-detail__history-item::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  width: 23px;
  height: 23px;
  border: 3px solid var(--color-yellow);
  border-radius: 50%;
  background: var(--color-blue);
}

.p-player-detail__history-item::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 78px;
  background: var(--color-yellow);
}

/* 動画なしの縦長バリエーション */
.p-player-detail__history-item--long::after {
  height: 112px;
}

/* 結果テキストがない項目(日置琉青のジュニアCUP等)でも縦線(下端86+112)が収まる高さを確保 */
.p-player-detail__history-item--long {
  min-height: 198px;
}

.p-player-detail__history-date {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 78px;
  font-size: 16px;
  text-align: center;
  line-height: normal;
}

.p-player-detail__history-date span {
  transform: rotate(-20deg);
}

.p-player-detail__history-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 174px;
  height: 97px;
  margin-top: 78px;
  overflow: hidden;
  background: var(--color-placeholder);
}

.p-player-detail__history-photo .lazy,
.p-player-detail__history-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.p-player-detail__history-photo .lazy {
  position: absolute;
  inset: 0;
}

.p-player-detail__history-photo img {
  object-fit: cover;
}

.p-player-detail__history-item--long .p-player-detail__history-caption {
  margin-top: 112px;
}

.p-player-detail__history-caption {
  position: relative;
  z-index: 1;
  width: 100%;
  font-size: 14px;
  line-height: normal;
}

/* Q&A */
.p-player-detail__qa {
  --qa-side-inset: calc(25vw / 3.2);
  position: relative;
  z-index: 1;
  padding: 49px 0 85px;
  overflow-x: clip;
  background: var(--color-red);
}

.p-player-detail:has(.p-player-detail__movie) .p-player-detail__qa {
  padding-bottom: 105px;
}

.p-player-detail:not(:has(.p-player-detail__movie)) .p-player-detail__qa {
  padding-bottom: calc(85px / 2);
}

.p-player-detail__qa::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  width: min(calc(100% - var(--qa-side-inset) - var(--qa-side-inset)), 1176px);
  margin-inline: auto;
  background: var(--color-blue);
  pointer-events: none;
}

.p-player-detail__qa::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 200px;
  background: linear-gradient(to bottom, #0F1839, #B81C2B);
  pointer-events: none;
}

.p-player-detail__qa > * {
  position: relative;
  z-index: 2;
}
.p-player-detail__qa h2.c-heading.c-heading--arrows {
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    margin: auto;
    top: 50px;
}

.p-player-detail__qa-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - var(--qa-side-inset) - var(--qa-side-inset));
  margin: -45px auto 0;
  padding: 130px calc(13vw / 3.2) 0;
  background: var(--color-blue);
}

.p-player-detail:has(.p-player-detail__movie) .p-player-detail__movie {
  z-index: 2;
}

.p-player-detail:has(.p-player-detail__movie) .p-player-detail__movie::before {
  top: -20px;
  background-position: center top, center 20px;
}

/* ギザギザ縁はchart-cta本体上端をマスクし、QAへ食い込ませて描く。
   歯の中身は本体の相関図背景そのものになるため、下の相関図とシームレスに繋がる */
.p-player-detail:not(:has(.p-player-detail__movie)) .c-chart-cta {
  z-index: 2;
  margin-top: -20px;
  padding-top: 46px;
  -webkit-mask-image: linear-gradient(#000, #000), url(/sasuke_rising/assets/img/top_goods_edge_sp.svg);
  mask-image: linear-gradient(#000, #000), url(/sasuke_rising/assets/img/top_goods_edge_sp.svg);
  -webkit-mask-size: 100% 100%, auto 20px;
  mask-size: 100% 100%, auto 20px;
  -webkit-mask-position: top, top left;
  mask-position: top, top left;
  -webkit-mask-repeat: no-repeat, repeat-x;
  mask-repeat: no-repeat, repeat-x;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@media (min-width: 991.98px) {
  .p-player-detail__hero {
    height: calc(100vw * 1696 / 3000);
    padding-top: clamp(58px, 5.83vw, 84px);
    padding-bottom: 0;
    background: none;
    overflow: hidden;
  }

  .p-player-detail__hero-photo {
    height: calc(100vw * 1696 / 3000);
  }

  .p-player-detail__hero-image--pc,
  .p-player-detail__hero-message--pc {
    display: block;
  }

  .p-player-detail__hero-image--sp,
  .p-player-detail__hero-message--sp,
  .p-player-detail__hero-message-zone {
    display: none;
  }

  .p-player-detail__hero-message {
    top: 0;
  }

  .p-player-detail__hero-photo::after {
    left: 0;
    right: auto;
    width: 68%;
    transform: none;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.72) 30%, rgba(0, 0, 0, 0.44) 56%, rgba(0, 0, 0, 0.18) 75%, rgba(0, 0, 0, 0) 100%);
  }

  .p-player-detail__label {
    position: relative;
    top: 0;
    width: auto;
  }

  .p-player-detail__hero-inner {
    --player-detail-info-width: clamp(360px, 29.51vw, 425px);
    width: min(100% - 30px, 1200px);
    margin-inline: auto;
  }

  .p-player-detail__tag {
    width: calc(var(--player-detail-info-width) - 30px);
    margin: clamp(18px, 2.78vw, 40px) 0 0 15px;
  }

  .p-player-detail__profile {
    box-sizing: border-box;
    width: var(--player-detail-info-width);
    margin: clamp(7px, 0.69vw, 10px) 0 0;
  }

  .p-player-detail__catch {
    height: 29px;
  }

  .p-player-detail__name {
    height: clamp(52px, 5.69vw, 82px);
    margin-top: 10px;
    font-size: clamp(48px, 5.56vw, 80px);
  }

  .p-player-detail__name-en {
    height: clamp(19px, 2.08vw, 30px);
    margin-top: 10px;
    font-size: clamp(20px, 1.67vw, 24px);
  }

  .p-player-detail__bio {
    font-size: clamp(16px, 1.39vw, 20px);
    line-height: 1.6;
  }

  .p-player-detail__stats {
    position: relative;
    padding: 81px 0 80px;
  }

  .p-player-detail__stats-image {
    width: min(100% - 30px, 742px);
    margin-top: 40px;
    aspect-ratio: 742 / 500;
  }

  .p-player-detail__stats-chart {
    width: min(100% - 30px, 742px);
    margin-top: 40px;
  }

  .p-player-detail__history {
    padding: 82px 0 160px;
  }

  .p-player-detail__history-scroll {
    margin-top: 40px;
    padding: 10px 15px 0 max(15px, calc((100% - 1100px) / 2));
  }

  .p-player-detail__history-scrollbar {
    height: 28px;
    margin: 40px 146px 0 170px;
    border-radius: 50px;
  }

  .p-player-detail__timeline {
    gap: 112px;
  }

  .p-player-detail__timeline::before {
    top: 150px;
    left: 147px;
    height: 6px;
  }

  .p-player-detail__history-item {
    gap: 10px;
    width: 295px;
  }

  .p-player-detail__history-item::before {
    top: 128px;
    width: 44px;
    height: 44px;
    border-width: 6px;
  }

  .p-player-detail__history-item::after {
    top: 128px;
    width: 6px;
    height: 141px;
  }

  .p-player-detail__history-item--long::after {
    height: 203px;
  }

  .p-player-detail__history-item--long {
    min-height: 331px;
  }

  .p-player-detail__history-date {
    height: 118px;
    font-size: 22px;
  }

  .p-player-detail__history-photo {
    width: 295px;
    height: 166px;
    margin-top: 141px;
  }

  .p-player-detail__history-item--long .p-player-detail__history-caption {
    margin-top: 203px;
  }

  .p-player-detail__history-caption {
    font-size: 20px;
  }

  .p-player-detail__qa {
    --qa-side-inset: clamp(25px, 9.17vw, 132px);
    padding: 109px 0 159px;
  }

  .p-player-detail:has(.p-player-detail__movie) .p-player-detail__qa {
    padding-bottom: 370px;
  }

  .p-player-detail:not(:has(.p-player-detail__movie)) .p-player-detail__qa {
    padding-bottom: calc(159px / 2);
  }

  .p-player-detail__qa::after {
    height: 300px;
  }

  .p-player-detail__qa-list {
    gap: 20px;
    width: min(calc(100% - var(--qa-side-inset) - var(--qa-side-inset)), 1176px);
    margin-top: -100px;
    padding: 160px 74px 140px;
  }

  .p-player-detail:has(.p-player-detail__movie) .p-player-detail__movie {
    --movie-overlap: 344px;
    padding-top: 80px;
  }

  .p-player-detail:has(.p-player-detail__movie) .p-player-detail__movie::before {
    top: -52px;
    background-position: center top, center 52px;
  }

  .p-player-detail:not(:has(.p-player-detail__movie)) .c-chart-cta {
    margin-top: -52px;
    padding-top: 188px;
    -webkit-mask-image: linear-gradient(#000, #000), url(/sasuke_rising/assets/img/top_goods_edge_pc.png);
    mask-image: linear-gradient(#000, #000), url(/sasuke_rising/assets/img/top_goods_edge_pc.png);
    -webkit-mask-size: 100% 100%, auto 52px;
    mask-size: 100% 100%, auto 52px;
  }

  .p-player-detail__crackers {
    inset: 30px auto auto 50%;
    transform: translateX(-50%);
    width: 1505px;
    height: 768px;
  }

  .p-player-detail__crackers-left {
    top: 0;
    left: 0;
    width: 54.41%;
    height: 100%;
    transform: none;
  }

  .p-player-detail__crackers-right {
    top: 1.06%;
    left: 46.82%;
    width: 53.18%;
    height: 98.94%;
    transform: none;
  }
}

@media (min-width: 991.98px) and (max-width: 1199.98px) {
  .p-player-detail__tag {
    margin-top: 10px;
  }

  .p-player-detail__catch,
  .p-player-detail__name,
  .p-player-detail__name-en {
    line-height: 1;
  }

  .p-player-detail__bio {
    margin-top: 12px;
    line-height: 1.5;
  }

  .p-player-detail__catch {
    font-size: 22px;
  }

  .p-player-detail__name {
    font-size: 52px;
  }

  .p-player-detail__name-en {
    font-size: 18px;
  }

  .p-player-detail__bio {
    font-size: 15px;
  }
}
