/* トップ：全員が同期して交代するチームフォーメーション */
.team-hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  overflow: hidden;
  isolation: isolate;
  background: #efede7;
}

.immersive-home {
  overflow: hidden;
  background: #efede7;
}

.intro-logo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 13%, rgba(255,255,255,.98), transparent 31%),
    radial-gradient(circle at 8% 24%, rgba(226,34,64,.15), transparent 29%),
    radial-gradient(circle at 92% 24%, rgba(61,125,202,.14), transparent 30%),
    radial-gradient(circle at 54% 96%, rgba(217,174,91,.2), transparent 34%),
    linear-gradient(138deg, #faf8f2, #e9e8e3 50%, #f6f0e7);
}

.intro-logo::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: -45%;
  opacity: .64;
  background: conic-gradient(from 210deg,
    transparent 0 16%, rgba(255,255,255,.94) 21%, rgba(229,27,58,.12) 25%,
    transparent 32% 54%, rgba(69,134,211,.13) 61%, transparent 69% 83%,
    rgba(222,179,94,.16) 89%, transparent 96%);
  filter: blur(58px) saturate(1.22);
  animation: formation-prism 15s linear infinite;
}

.intro-logo::after {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 47%;
  width: min(84vw, 1080px);
  aspect-ratio: 2.5;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.72) 50%, transparent),
    radial-gradient(ellipse, rgba(255,255,255,.44), transparent 68%);
  filter: blur(18px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.team-orbit {
  position: absolute;
  z-index: 5;
  inset: 0 0 clamp(99px, 13vh, 126px);
  overflow: hidden;
  opacity: 0;
  transform: scale(.99);
  transition: opacity .7s ease, transform .9s cubic-bezier(.17,.8,.22,1);
}

.team-orbit.is-ready {
  opacity: 1;
  transform: scale(1);
}

.formation-effects {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.formation-effects::before {
  content: '';
  position: absolute;
  left: -20%;
  top: 44%;
  width: 140%;
  height: 34%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.8) 47%, transparent 63%);
  transform: translateX(-110%) skewX(-12deg);
  animation: formation-light-pass 4.6s 1.1s ease-in-out infinite;
}

.formation-effects::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(86vw, 1080px);
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.78), rgba(205,171,104,.1) 44%, transparent 72%);
  filter: blur(17px);
  transform: translate(-50%, -50%);
}

.formation-effects i {
  position: absolute;
  left: var(--spark-x);
  top: var(--spark-y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  box-shadow: 0 0 13px rgba(215,37,65,.62);
  opacity: 0;
  animation: formation-spark 5.8s var(--spark-delay) ease-in-out infinite;
}

.formation-effects i:nth-child(3n) { box-shadow: 0 0 14px rgba(61,127,207,.72); }
.formation-effects i:nth-child(5n) { box-shadow: 0 0 14px rgba(201,156,75,.7); }

.intro-logo-center {
  position: absolute;
  z-index: 55;
  left: 50%;
  top: calc(47% - clamp(44px, 6vh, 68px));
  width: clamp(154px, 18vw, 246px);
  height: clamp(72px, 9vw, 112px);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.formation-stage > .intro-logo-center {
  top: 50%;
}

.rim-core-sphere {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: clamp(176px, 21vw, 286px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  perspective: 900px;
  filter: drop-shadow(0 24px 30px rgba(38, 27, 33, .2));
}

.rim-sphere-aura,
.rim-sphere-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.rim-sphere-aura {
  inset: -18%;
  background:
    radial-gradient(circle, rgba(213,173,94,.16) 0 31%, rgba(218,30,61,.1) 48%, transparent 70%);
  filter: blur(15px);
  animation: rim-sphere-breathe 4.8s ease-in-out infinite;
}

.rim-sphere-core {
  inset: 9%;
  overflow: hidden;
  border: 2px solid rgba(208,28,56,.62);
  background: #fff;
  box-shadow:
    inset -42px -30px 60px rgba(4,3,6,.58),
    inset 23px 18px 38px rgba(255,255,255,.28),
    inset 0 0 0 2px rgba(255,255,255,.2),
    0 22px 58px rgba(56,43,49,.2);
}

.rim-sphere-core::before,
.rim-sphere-core::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.rim-sphere-core::before {
  inset: 5% 17% 42% 12%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 38% 28%, rgba(255,255,255,.62), rgba(255,255,255,.17) 35%, transparent 68%);
  filter: blur(2px);
  mix-blend-mode: screen;
}

.rim-sphere-core::after {
  box-shadow:
    inset -46px -32px 58px rgba(3,2,5,.64),
    inset 19px 13px 31px rgba(255,255,255,.17),
    inset 0 0 22px rgba(17,8,14,.32);
  background:
    radial-gradient(circle at 25% 18%, rgba(255,255,255,.2), transparent 27%),
    linear-gradient(108deg, rgba(255,255,255,.08), transparent 38% 64%, rgba(8,5,9,.34));
}

.rim-sphere-core img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border-radius: 50%;
  transform: scale(1.025);
  filter: saturate(1.14) contrast(1.06);
}

.intro-logo-center::before,
.intro-logo-center::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 32%;
  height: 1px;
}

.intro-logo-center::before {
  right: 100%;
  background: linear-gradient(90deg, transparent, rgba(174,132,57,.72));
}

.intro-logo-center::after {
  left: 100%;
  background: linear-gradient(90deg, rgba(174,132,57,.72), transparent);
}

.formation-stage {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 47%;
  width: min(100%, 1320px);
  height: min(54vh, 460px);
  transform: translate(-50%, -50%);
  perspective: 1200px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.formation-stage.is-dragging { cursor: grabbing; }
.formation-stage.is-dragging .formation-card { transition: none; }

.formation-stage::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: min(94vw, 1160px);
  height: min(74%, 340px);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 88%, rgba(180,138,65,.17), transparent 38%),
    radial-gradient(ellipse, rgba(255,255,255,.64), rgba(255,255,255,.06) 58%, transparent 72%);
  filter: blur(12px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.formation-stage::after {
  content: '';
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 84%;
  width: min(46vw, 430px);
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(55,40,47,.2), transparent 68%);
  filter: blur(13px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.formation-line {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(82vw, 1020px);
  height: min(62%, 290px);
  border: 1px solid rgba(166,124,52,.22);
  border-left-color: rgba(217,29,57,.14);
  border-right-color: rgba(59,125,201,.14);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.5), transparent 64%);
  box-shadow: 0 0 34px rgba(191,149,75,.09), inset 0 0 34px rgba(255,255,255,.54);
  transform: translate(-50%, -50%);
}

.formation-line::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 28%;
  height: 3px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #bc8f3d, transparent);
  transform: translateX(-50%) scaleX(.6);
  filter: blur(.2px);
  animation: formation-line-pulse 2.2s ease-in-out infinite;
}

.formation-line::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(188,143,61,.12), 0 0 18px rgba(188,143,61,.7);
  transform: translateX(-50%);
}

.formation-card {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  width: clamp(116px, 12vw, 170px);
  aspect-ratio: .76;
  overflow: hidden;
  border: 1px solid rgba(75,60,42,.3);
  border-radius: clamp(13px, 1.3vw, 19px);
  color: #fff;
  background: #282329;
  box-shadow:
    0 25px 60px rgba(55,41,48,.2),
    0 0 0 1px rgba(255,255,255,.62),
    inset 0 1px rgba(255,255,255,.42);
  transform-origin: center bottom;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  transition:
    transform .88s cubic-bezier(.2,.8,.16,1),
    opacity .48s ease,
    filter .35s ease,
    box-shadow .25s ease,
    border-color .25s ease;
  filter: brightness(var(--orbit-brightness, 1)) saturate(var(--orbit-saturation, 1)) blur(var(--orbit-blur, 0));
}

.formation-card::before {
  content: '';
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.17), transparent 30% 58%, rgba(7,7,9,.9)),
    linear-gradient(112deg, transparent 38%, rgba(255,255,255,.5) 49%, transparent 60%);
  background-size: auto, 240% 100%;
  background-position: center, 130% 0;
  transition: background-position .75s ease;
}

.formation-card::after {
  content: '';
  position: absolute;
  z-index: 5;
  inset: 5px;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: calc(clamp(13px, 1.3vw, 19px) - 4px);
  pointer-events: none;
}

.formation-card-visual {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.formation-card-visual i {
  color: rgba(255,255,255,.86);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.formation-card-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: scale(1.035);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .7s cubic-bezier(.2,.75,.2,1), filter .3s ease;
}

.formation-card-visual.has-image i { opacity: 0; }

.formation-card strong {
  position: absolute;
  z-index: 7;
  left: 7px;
  right: 7px;
  bottom: 10px;
  color: #fff;
  font-size: clamp(10px, .95vw, 14px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -.035em;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 9px #000, 0 1px 2px #000;
}

.formation-new-badge {
  position: absolute;
  z-index: 9;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  color: #fff;
  background: #d91d39;
  box-shadow: 0 5px 16px rgba(140,8,28,.3);
  font-size: 7px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: .09em;
}

.formation-card.is-active {
  border-color: rgba(181,132,43,.96);
  box-shadow:
    0 40px 100px rgba(48,31,40,.42),
    0 0 0 3px rgba(255,255,255,.94),
    0 0 0 6px rgba(190,145,61,.44),
    0 0 42px rgba(192,147,69,.34),
    inset 0 1px rgba(255,255,255,.5);
}

.formation-card.is-active strong {
  bottom: 12px;
  font-size: clamp(12px, 1.12vw, 16px);
  text-shadow: 0 3px 12px #000, 0 1px 3px #000;
}

.formation-card.is-active::before,
.formation-card:hover::before,
.formation-card:focus-visible::before {
  background-position: center, -130% 0;
}

.formation-card:hover,
.formation-card:focus-visible {
  border-color: rgba(170,126,49,.9);
  outline: none;
}

.formation-card.is-rear {
  box-shadow:
    0 12px 28px rgba(55,41,48,.11),
    0 0 0 1px rgba(255,255,255,.46),
    inset 0 1px rgba(255,255,255,.34);
}

.formation-card:hover img,
.formation-card:focus-visible img,
.formation-card.is-active img {
  transform: scale(1.09);
}

.formation-stage.is-shifting .formation-line::after {
  animation: formation-shift-flash .85s ease-out both;
}

.hero-activity-block {
  position: absolute;
  z-index: 100;
  left: 50%;
  bottom: clamp(13px, 2.5vh, 25px);
  display: grid;
  justify-items: center;
  gap: 7px;
  transform: translateX(-50%);
}

.hero-last-call {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(39,34,38,.08);
  border-radius: 999px;
  color: rgba(28,25,28,.76);
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 24px rgba(42,34,39,.08);
  backdrop-filter: blur(14px) saturate(1.15);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.hero-last-call::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 1px 0;
  border-radius: 50%;
  background: #77716d;
  box-shadow: 0 0 0 5px rgba(86,80,77,.08);
}

.hero-last-call.is-active {
  color: #9f1029;
  border-color: rgba(222,31,61,.18);
}

.hero-last-call.is-active::before {
  background: #e11f3d;
  box-shadow: 0 0 0 5px rgba(225,31,61,.1), 0 0 14px rgba(225,31,61,.48);
  animation: activity-pulse 1.5s ease-in-out infinite;
}

.hero-activity-link {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 21px;
  border: 1px solid rgba(25,22,25,.32);
  border-radius: 999px;
  color: #1b181c;
  background: rgba(255,255,255,.8);
  box-shadow: inset 0 1px rgba(255,255,255,.95), 0 12px 32px rgba(42,34,39,.11);
  backdrop-filter: blur(16px) saturate(1.18);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.hero-activity-link:hover,
.hero-activity-link:focus-visible {
  color: #fff;
  border-color: #d91d39;
  background: #d91d39;
  transform: translateY(-3px);
  outline: none;
}

.latest-result-popup {
  position: fixed;
  z-index: 140;
  right: clamp(12px, 2vw, 28px);
  top: calc(var(--header-h) + clamp(12px, 2vw, 22px));
  width: min(360px, calc(100vw - 24px));
  opacity: 0;
  transform: translateY(-16px) scale(.97);
  transition: opacity .3s ease, transform .38s cubic-bezier(.18,.8,.18,1);
}

.latest-result-popup.is-visible {
  opacity: 1;
  transform: none;
}

.latest-result-popup.is-closing {
  opacity: 0;
  transform: translateY(-10px) scale(.98);
}

.latest-result-link {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  min-height: 76px;
  padding: 13px 43px 12px 16px;
  overflow: hidden;
  border: 1px solid rgba(128,94,40,.26);
  border-radius: 17px;
  color: #1b181b;
  background: rgba(250,248,243,.91);
  box-shadow: 0 18px 48px rgba(48,36,42,.16), inset 0 1px rgba(255,255,255,.94);
  backdrop-filter: blur(19px) saturate(1.18);
}

.latest-result-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(#d7a748, #8f671f);
}

.latest-result-label {
  grid-column: 1;
  color: #9c6c1c;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
}

.latest-result-copy {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.latest-result-copy strong,
.latest-result-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-result-copy strong { font-size: 13px; font-weight: 900; }
.latest-result-copy span { color: #6e6358; font-size: 11px; font-weight: 750; }
.latest-result-link time { position: absolute; right: 15px; top: 14px; color: #8a8178; font-size: 9px; font-weight: 800; }

.latest-result-close {
  position: absolute;
  z-index: 3;
  right: 7px;
  top: 39px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #4a4340;
  background: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.latest-result-link:hover { border-color: rgba(155,112,39,.5); }
.latest-result-close:hover,
.latest-result-close:focus-visible { color: #fff; background: #d91d39; outline: none; }

@keyframes formation-prism { to { transform: rotate(360deg); } }
@keyframes formation-light-pass {
  0%, 46%, 100% { transform: translateX(-110%) skewX(-12deg); opacity: 0; }
  58% { opacity: .82; }
  80% { transform: translateX(110%) skewX(-12deg); opacity: .08; }
}
@keyframes formation-spark {
  0%, 72%, 100% { opacity: 0; transform: scale(.2); }
  80% { opacity: .92; transform: scale(2); }
  90% { opacity: .18; transform: scale(.7); }
}
@keyframes formation-line-pulse {
  0%, 100% { opacity: .35; transform: translateX(-50%) scaleX(.45); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1.18); }
}
@keyframes formation-shift-flash {
  0% { transform: translateX(-50%) scale(.4); opacity: 0; }
  28% { transform: translateX(-50%) scale(1.8); opacity: 1; }
  100% { transform: translateX(-50%) scale(.7); opacity: .25; }
}
@keyframes activity-pulse {
  50% { box-shadow: 0 0 0 8px rgba(225,31,61,.025), 0 0 19px rgba(225,31,61,.7); }
}

@keyframes rim-sphere-breathe {
  50% { opacity: .72; transform: scale(1.08); }
}

@media (max-width: 600px) {
  .team-orbit { bottom: 93px; }
  .intro-logo-center { top: calc(46% - 36px); width: 126px; height: 58px; }
  .formation-stage { top: 46%; height: 49vh; }
  .formation-card { width: 92px; border-radius: 13px; }
  .formation-card strong { left: 4px; right: 4px; bottom: 7px; font-size: 9px; }
  .formation-line { width: 82vw; height: 56%; }
  .hero-activity-block { bottom: 9px; gap: 5px; }
  .hero-last-call { padding: 5px 10px; font-size: 10.5px; }
  .hero-activity-link { min-height: 42px; padding: 8px 18px; font-size: 11px; }
  .latest-result-popup { right: 10px; top: calc(var(--header-h) + 8px); width: min(330px, calc(100vw - 20px)); }
  .latest-result-link { min-height: 68px; padding-top: 11px; padding-bottom: 10px; }
  .latest-result-close { top: 34px; }
}

@media (max-height: 690px) {
  .team-orbit { bottom: 88px; }
  .intro-logo-center { top: calc(45% - 28px); width: 118px; height: 54px; }
  .formation-stage { top: 45%; height: 46vh; }
  .formation-card { width: 82px; }
  .hero-activity-block { bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-logo::before,
  .formation-effects::before,
  .formation-effects i,
  .formation-line::before,
  .hero-last-call.is-active::before,
  .rim-sphere-aura { animation: none !important; }
  .formation-card { transition: none; }
}
