:root {
  --bg: #050505;
  --fg: #111111;
  --paper: #ffffff;
  --muted: rgba(17, 17, 17, 0.62);
  --line: rgba(17, 17, 17, 0.18);
  --accent: #111111;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "A-OTF 新ゴ Pro", "A-OTF Shin Go Pro R", "ShinGoPro-Regular", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
a {
  font: inherit;
}

.members-page {
  width: min(100%, 750px);
  margin: 0 auto;
  background: var(--paper);
  min-height: 100vh;
  overflow: hidden;
}

.members-hero,
.team-panel {
  position: relative;
  padding: 72px 58px;
}

.members-hero {
  min-height: 720px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.members-hero::before {
  content: "Members";
  position: absolute;
  left: -34px;
  top: 64px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 104px;
  line-height: 0.86;
  font-weight: 900;
  color: rgba(17, 17, 17, 0.06);
  pointer-events: none;
}

.back-link {
  position: absolute;
  left: 58px;
  top: 36px;
  color: var(--fg);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 4px;
}

.section-label {
  margin: 0;
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
}

.members-hero h1 {
  margin: 34px 0 0;
  font-size: 82px;
  line-height: 1.14;
  letter-spacing: 0;
  font-weight: 900;
}

.lead {
  margin: 48px 0 0;
  max-width: 535px;
  font-size: 28px;
  line-height: 1.58;
}

.team-panel {
  padding-top: 20px;
  padding-bottom: 86px;
}

.team-layout {
  display: grid;
  gap: 22px;
}

.team-stage-wrap,
.team-controls,
.team-list-wrap {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.team-stage-wrap {
  position: relative;
  padding: 22px;
  min-height: 388px;
}

.team-scene {
  position: relative;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 1.666 / 1;
  perspective: 1200px;
  cursor: pointer;
}

.team-card-wrapper {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s ease;
}

.team-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s ease;
  box-shadow: 0 26px 52px rgba(0, 0, 0, 0.2);
}

.team-card.is-flipped {
  transform: rotateY(180deg);
}

.team-card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  background-size: cover;
  background-position: center;
  background-color: #111111;
}

.team-back {
  transform: rotateY(180deg);
}

.team-hint {
  margin: 16px 0 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.team-controls {
  display: none;
}

.team-current-label {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.16em;
  font-weight: 900;
  color: var(--muted);
}

.team-current-name {
  margin: 12px 0 0;
  font-size: 30px;
  line-height: 1.3;
  font-weight: 900;
  word-break: break-word;
}

.team-current-role {
  margin: 8px 0 0;
  font-size: 17px;
  letter-spacing: 0.12em;
  font-weight: 900;
}

.team-count {
  margin: 10px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.team-btn {
  width: 100%;
  min-height: 54px;
  margin-top: 22px;
  border: 0;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.team-note {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.team-note.is-error {
  color: #9f1d1d;
}

.team-list-wrap {
  margin-top: 22px;
  padding: 24px;
}

.team-list-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 900;
}

.team-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-list-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--fg);
  text-align: left;
  padding: 14px;
  min-height: 74px;
  cursor: pointer;
}

.team-list-btn.is-active {
  border-color: var(--fg);
  box-shadow: 0 0 0 1px var(--fg) inset;
}

.team-list-name,
.team-list-role {
  display: block;
}

.team-list-name {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  word-break: break-word;
}

.team-list-role {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 900;
}

.stage-close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(0, 0, 0, 0.38);
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  cursor: pointer;
}

.stage-close::before,
.stage-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #ffffff;
}

.stage-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.stage-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.team-stage-wrap.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 1200;
  margin: 0;
  border: 0;
  padding: 0;
  background: rgba(4, 4, 4, 0.96);
  display: grid;
  place-items: center;
  overflow: visible;
}

.team-stage-wrap.is-expanded .team-stage-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-stage-wrap.is-expanded .team-scene {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc((100% - 24px) * 1.666), calc(100dvh - 190px), 1120px);
}

.team-stage-wrap.is-expanded .team-hint {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 24px);
  color: rgba(255, 255, 255, 0.78);
}

.no-scrollbar {
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

@media (max-width: 700px) {
  .members-hero,
  .team-panel {
    padding-left: 26px;
    padding-right: 26px;
  }

  .members-hero {
    min-height: 610px;
    padding-top: 84px;
  }

  .members-hero::before {
    left: -22px;
    top: 76px;
    font-size: 72px;
  }

  .back-link {
    left: 26px;
    top: 28px;
  }

  .section-label {
    font-size: 32px;
  }

  .members-hero h1 {
    font-size: 52px;
  }

  .lead {
    font-size: 22px;
  }

  .team-stage-wrap {
    padding: 14px;
    min-height: 260px;
  }

  .team-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 960px) {
  .members-page {
    width: min(100%, 1120px);
  }

  .members-hero,
  .team-panel {
    padding-left: 86px;
    padding-right: 86px;
  }

  .back-link {
    left: 86px;
  }

  .members-hero {
    min-height: 720px;
  }

  .members-hero::before {
    left: -22px;
    font-size: 118px;
  }

  .members-hero h1 {
    font-size: 88px;
  }

  .lead {
    max-width: 720px;
  }

  .team-stage-wrap {
    min-height: 360px;
  }

  .team-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
