@charset "UTF-8";

/*******************************
ドリーム戦出場ページ専用CSS（共通部分は common.css）
********************************/
.racer-tab_boatno {
  font-family: "Oswald", sans-serif;
  font-weight: 600;
}

/* 数字・ローマ字：Barlow Condensed（Google Fonts）で統一 */
.racer_regno,
.racer_roma,
.racer_stats dd,
.racer-tab_regno {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
}

.racer_grade {
  font-family: "Dela Gothic One", sans-serif;
}

/* 選手カード */
.racers {
  position: relative;
  z-index: 1;
}

.racer {
  position: relative;
}

.racer::before {
  content: "";
  position: absolute;
  background: no-repeat 0 0 / 100% 100%;
}

.racer_visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.racer_visual > * {
  position: absolute;
  max-width: none;
}

.racer_photo img {
  width: 100%;
  height: 100%;
}


.racer_head,
.racer_stats,
.racer_text {
  position: absolute;
  z-index: 2;
}

.racer_head {
  inset: 0;
  pointer-events: none;
}

.racer_head > * {
  position: absolute;
  line-height: normal;
  white-space: pre;
}

.racer_name {
  font-weight: 700;
  color: #fff;
}

/* 登番と級別は横並び（フォントの字幅が変わっても級別が登番に被らない） */
.racer_tag {
  display: flex;
  align-items: center;
  background: no-repeat 0 0 / 100% 100%;
  color: #000;
}

.racer_regno {
  line-height: 1;
}

.racer_grade {
  line-height: normal;
  white-space: nowrap;
}

/* 「A1/」はAB-quadraのアウトライン画像（Figma書き出し）で表示し、テキストは透明にして幅だけ確保
   修飾クラスが無い級別（A2/B1等）はテキスト（Dela Gothic One）でそのまま表示 */
.racer_grade--a1 {
  background: url(../images/dream/grade_a1.svg) no-repeat 0 0 / 2em 1.4375em;
  color: transparent;
}

.racer_grade span {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  color: #000;
}

.racer_roma {
  line-height: 1.75;
  color: #fff;
  white-space: nowrap;
}

.racer_stats h3 {
  background: no-repeat 0 0 / 100% 100%;
  font-weight: 700;
  line-height: normal;
  text-align: center;
  color: #fff;
}

.racer_stats dl div {
  position: relative;
  background: #ffed00;
  border: solid #000;
  text-align: center;
}

/* 影の箱 */
.racer_stats dl div::before {
  content: "";
  position: absolute;
  z-index: -1;
  box-sizing: content-box;
  background: #ffed00;
  border: inherit;
}

/* 左上の三角 */
.racer_stats dl div::after {
  content: "";
  position: absolute;
  background: no-repeat 0 0 / 100% 100%;
}

.racer_stats dt {
  font-weight: 700;
  line-height: normal;
  color: #000;
}

.racer_stats dd {
  line-height: 1.2;
  color: #0a4cfe;
}

.racer_text {
  font-weight: 700;
  color: #fff;
}

.dream-note {
  font-weight: 700;
  text-align: center;
  color: #fff;
}

/***********************************************************************
  「★PC版 CSS★」ブラウザの幅が751px以上ならここの記述が有効になる
  **********************************************************************/
@media all and (min-width: 751px) {

  /* 選手カード（座標はFigma 1920px基準） */
  .racer {
    height: 478px;
  }

  .racer::before {
    top: 116px;
    left: 99px;
    width: 1721px;
    height: 439px;
    background-image: url(../images/dream/card_bg.svg);
  }

  .racer_splash {
    width: 481px;
    height: 447px;
  }

  .racer_splash--shadow {
    top: 89px;
    left: 66px;
  }

  .racer_splash--main {
    top: 69px;
    left: 56px;
  }

  .racer_photo {
    top: var(--photo-y);
    left: var(--photo-x);
    width: var(--photo-width);
    height: var(--photo-height);
  }

  .racer_boatno {
    top: var(--num-y);
    left: var(--num-x);
    width: var(--num-width);
    height: var(--num-height);
  }


  .racer_name {
    top: 356px;
    left: 358px;
    font-size: 84px;
    letter-spacing: 5px;
    text-shadow: 6px 8px 0 #000;
  }

  .racer_tag {
    top: 476px;
    left: 326px;
    gap: 8px;
    width: 259px;
    height: 50px;
    padding-left: 27px;
    background-image: url(../images/dream/name_tag.svg);
  }

  .racer_regno {
    font-size: 44px;
  }

  .racer_grade {
    font-size: 32px;
  }

  /* Barlow CondensedはDINより字幅が広いため、48pxだと長い名前が右のコラムに被る */
  .racer_roma {
    top: 468px;
    left: 596px;
    font-size: 42px;
    text-shadow: 3px 3px 0 #000;
  }

  .racer_stats {
    top: 149px;
    left: 899px;
    width: 877px;
  }

  .racer_stats h3 {
    height: 57px;
    padding-top: 4px;
    background-image: url(../images/dream/stats_head.svg);
    font-size: 32px;
  }

  .racer_stats dl {
    display: flex;
    gap: 18px;
    margin-top: 15px;
  }

  .racer_stats dl div {
    width: 130px;
    height: 130px;
    border-width: 2px;
  }

  .racer_stats dl div::before {
    top: 4px;
    left: 4px;
    width: 127px;
    height: 127px;
  }

  .racer_stats dl div::after {
    top: -1px;
    left: -1px;
    width: 23px;
    height: 23px;
    background-image: url(../images/dream/stats_corner.svg);
  }

  .racer_stats dt {
    margin-top: 7px;
    font-size: 24px;
  }

  .racer_stats dd {
    margin-top: -10px;
    font-size: 64px;
  }

  .racer_text {
    top: 372px;
    left: 901px;
    width: 875px;
    font-size: 18px;
    line-height: 30px;
  }

  .dream-note {
    width: 1237px;
    margin: 128px 0 0 362px;
    font-size: 16px;
  }
}

/***********************************************************************
  「★SP版 CSS★」ブラウザの幅が750px以下ならここの記述が有効になる
  **********************************************************************/
@media all and (max-width: 750px) {

  /* 選手タブ */
  .racer-tabs {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(2, 343px);
    grid-auto-rows: 174px;
    margin-left: 40px;
  }

  .racer-tabs li:nth-child(even) {
    margin-left: -15px;
  }

  .racer-tab {
    position: relative;
    display: block;
    width: 343px;
    height: 174px;
    padding: 0;
    border: 0;
    background: none;
    color: #000;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }

  .racer-tab > * {
    position: absolute;
  }

  /* 書き出し画像の四隅を平行四辺形に切り抜く */
  .racer-tab_img {
    top: 21px;
    left: 0;
    width: 343px;
    height: 152px;
    clip-path: polygon(9.86% 0, 100% 0, 90.14% 100%, 0 100%);
  }

  .racer-tab_frame {
    top: 16px;
    left: -6px;
    width: 354px;
    height: 162px;
    background: url(../images/dream/tab_frame.svg) no-repeat 0 0 / 100% 100%;
  }

  .racer-tab.is-active .racer-tab_frame {
    background-image: url(../images/dream/tab_frame_active.svg);
  }

  /* 号艇バッジ（Figma：-84.48deg回転＋上下反転の平行四辺形） */
  .racer-tab_badge {
    top: 7px;
    left: 33px;
    width: 55px;
    height: 90px;
  }

  .racer-tab_badge::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 86px;
    height: 46px;
    background: no-repeat 0 0 / 100% 100%;
    transform: translate(-50%, -50%) rotate(-84.48deg) scale(1, -1);
  }

  .racer-tab--1 .racer-tab_badge::before { background-image: url(../images/dream/tab_badge1.svg); }
  .racer-tab--2 .racer-tab_badge::before { background-image: url(../images/dream/tab_badge2.svg); }
  .racer-tab--3 .racer-tab_badge::before { background-image: url(../images/dream/tab_badge3.svg); }
  .racer-tab--4 .racer-tab_badge::before { background-image: url(../images/dream/tab_badge4.svg); }
  .racer-tab--5 .racer-tab_badge::before { background-image: url(../images/dream/tab_badge5.svg); }
  .racer-tab--6 .racer-tab_badge::before { background-image: url(../images/dream/tab_badge6.svg); }

  .racer-tab_boatno,
  .racer-tab_boatlabel {
    position: absolute;
  }

  .racer-tab_boatno {
    top: -7px;
    left: 8px;
    width: 30px;
    font-size: 44px;
    font-style: italic;
    line-height: 1.75;
    text-align: center;
  }

  .racer-tab_boatlabel {
    top: 53px;
    left: 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: normal;
  }

  .racer-tab--2 .racer-tab_badge,
  .racer-tab--3 .racer-tab_badge,
  .racer-tab--4 .racer-tab_badge,
  .racer-tab--6 .racer-tab_badge {
    color: #fff;
  }

  /* 登番20px・支部16px（最小サイズの例外として指定）。横並びで被り防止 */
  .racer-tab_tag {
    top: 96px;
    left: 22px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 141px;
    height: 27px;
    padding-left: 23px;
    background: url(../images/dream/tab_tag.svg) no-repeat 0 0 / 100% 100%;
    white-space: nowrap;
  }

  .racer-tab_regno {
    font-size: 20px;
    line-height: 1;
  }

  .racer-tab_grade {
    font-family: "Dela Gothic One", sans-serif;
    font-size: 16px;
    line-height: 1;
  }

  .racer-tab_grade span {
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
  }

  .racer-tab_name {
    top: 119px;
    left: 22px;
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    line-height: 50px;
    letter-spacing: 2px;
    -webkit-text-stroke: 4.46px #000;
    paint-order: stroke fill;
    text-shadow: 1px 1px 0 #0a4cfe;
    white-space: pre;
  }

  .racers {
    margin-top: -113px;
  }

  .racers p {
    padding-bottom: 20px;
  }

  /* 本文の長さに合わせてカードを伸ばす（本文は通常フロー、Figmaの高さを最小値に） */
  .racer {
    display: none;
    box-sizing: border-box;
    min-height: 1362px;
    padding: 995px 0 20px;
  }

  .racer.is-active {
    display: block;
  }

  .racer::before {
    top: 148px;
    bottom: 0;
    left: 40px;
    width: 670px;
    background-image: url(../images/dream/card_bg_sp.svg);
  }

  .racer_splash--shadow {
    top: 124px;
    left: 24px;
    width: 299px;
    height: 278px;
  }

  .racer_splash--main {
    top: 112px;
    left: 57px;
    width: 376px;
    height: 350px;
  }

  .racer_photo {
    top: 0;
    left: 130px;
    width: 588px;
    height: 583px;
  }

  .racer_boatno {
    top: calc(58px + var(--num-y) * 0.7835);
    left: calc(111px + (var(--num-x) - 126px) * 0.7835);
    width: calc(var(--num-width) * 0.7835);
    height: calc(var(--num-height) * 0.7835);
  }


  .racer_name {
    top: 414px;
    left: 81px;
    font-size: 72px;
    letter-spacing: 4px;
    text-shadow: 5px 7px 0 #000;
  }

  .racer_tag {
    top: 532px;
    left: 81px;
    gap: 6px;
    width: 184px;
    height: 36px;
    padding-left: 19px;
    background-image: url(../images/dream/name_tag_sp.svg);
  }

  .racer_regno {
    font-size: 28px;
  }

  .racer_grade {
    font-size: 24px;
  }

  .racer_roma {
    top: 523px;
    left: 316px;
    font-size: 32px;
    text-shadow: 3px 3px 0 #000;
  }

  .racer_stats {
    top: 580px;
    left: 81px;
    width: 589px;
  }

  .racer_stats h3 {
    height: 59px;
    padding-top: 1px;
    background-image: url(../images/dream/stats_head_sp.svg);
    font-size: 36px;
  }

  .racer_stats dl {
    display: grid;
    grid-template-columns: repeat(3, 177px);
    gap: 22px 25px;
    margin: 18px 0 0 -1px;
  }

  .racer_stats dl div {
    height: 144px;
    border-width: 3px;
  }

  .racer_stats dl div::before {
    top: 4px;
    left: 6px;
    width: 172px;
    height: 139px;
  }

  .racer_stats dl div::after {
    top: -2px;
    left: -1px;
    width: 31px;
    height: 31px;
    background-image: url(../images/dream/stats_corner_sp.svg);
  }

  .racer_stats dt {
    margin-top: 4px;
    font-size: 32px;
  }

  .racer_stats dd {
    margin-top: -14px;
    font-size: 84px;
  }

  .racer_text {
    position: relative;
    margin-left: 84px;
    width: 586px;
    font-size: 24px;
    line-height: 40px;
  }

  .dream-note {
    margin-top: 35px;
    font-size: 24px;
  }
}

/*******************************
アニメーション（参考：mb2026/dream.htm）
********************************/
/* 表示時：写真・成績は左から、名前は右から（0.5s遅れ） */
.js-anime .racer_visual,
.js-anime .racer_stats,
.js-anime .racer_text,
.js-anime .racer_head {
  opacity: 0;
  transition: opacity 1s, transform 1s;
}

.js-anime .racer_visual,
.js-anime .racer_stats,
.js-anime .racer_text {
  transform: translateX(-20px);
}

.js-anime .racer_head {
  transform: translateX(20px);
  transition-delay: 0.5s;
}

.js-anime .is-inview .racer_visual,
.js-anime .is-inview .racer_stats,
.js-anime .is-inview .racer_text,
.js-anime .is-inview .racer_head {
  opacity: 1;
  transform: none;
}

/* ホバー */
.racer-tab {
  transition: transform 0.2s, opacity 0.2s;
}

.racer-tab:hover {
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .js-anime .racer_visual,
  .js-anime .racer_stats,
  .js-anime .racer_text,
  .js-anime .racer_head {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
