/* === Layout shell === */
.profile-main {
  background: linear-gradient(180deg, #f6f7fb 0%, #eef0f7 100%);
  min-height: 60vh;
  padding: 24px 16px 64px;
}
.profile-inner {
  max-width: 920px;
  margin: 0 auto;
}
.profile-breadcrumb {
  font-size: 12px;
  color: #555;
  margin-bottom: 16px;
}
.profile-breadcrumb a {
  color: #17256c;
  text-decoration: none;
}
.profile-breadcrumb a:hover {
  text-decoration: underline;
}

/* === Team header === */
.profile-team-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(20,28,80,0.06);
}
.profile-team-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
}
.profile-team-meta {
  min-width: 0;
  flex: 1;
}
.profile-team-name {
  font-size: 24px;
  font-weight: 700;
  color: #17256c;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.profile-team-actions {
  margin-bottom: 12px;
}
.profile-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #17256c 0%, #2c4cc4 100%);
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(20,28,80,0.18);
  transition: transform 0.1s, box-shadow 0.1s;
}
.profile-contact-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(20,28,80,0.24);
}
.profile-achievements {
  background: #f6f7fb;
  border-radius: 8px;
  padding: 10px 14px;
  border-left: 3px solid #d7263d;
}
.profile-achievements-title {
  font-size: 12px;
  font-weight: 700;
  color: #17256c;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}
.profile-achievements-text {
  font-size: 13px;
  color: #333;
  line-height: 1.65;
  margin: 0;
  white-space: pre-wrap;
}

/* === Media row (video + photo carousels) === */
.profile-media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.profile-media-row .media-col {
  margin: 0;
  min-width: 0;
}
.profile-media-row .media-col[hidden] {
  display: none;
}
/* When only one of the two is visible, let it span the full width so it
   doesn't sit narrow on the left half of the row. */
.profile-media-row:has(> .media-col:only-of-type:not([hidden])) {
  grid-template-columns: 1fr;
}

/* === Video carousel === */
.profile-video-carousel {
  margin: 0;
}
.video-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 12px rgba(20,28,80,0.12);
  aspect-ratio: 16 / 9;
  width: 100%;
}
.video-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease;
}
.video-slide {
  flex: 0 0 100%;
  height: 100%;
  background: #000;
}
.video-slide iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* === Note link === */
.profile-note {
  margin: 28px 0 12px;
}
.profile-note-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(20,28,80,0.06);
  text-decoration: none;
  color: #333;
  transition: transform 0.1s, box-shadow 0.1s;
}
.profile-note-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20,28,80,0.12);
}
.profile-note-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #41c9b4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
}
.profile-note-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.profile-note-label {
  font-size: 14px;
  font-weight: 700;
  color: #17256c;
}
.profile-note-sub {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.profile-note-arrow {
  font-size: 18px;
  color: #17256c;
  flex-shrink: 0;
}

/* === Photo carousel === */
.profile-carousel {
  margin: 0;
}
.carousel-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #1c2440;
  box-shadow: 0 4px 12px rgba(20,28,80,0.12);
  aspect-ratio: 16 / 9;
  width: 100%;
}
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease;
}
.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c2440;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20,28,80,0.55);
  color: #fff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.carousel-btn:hover { background: rgba(20,28,80,0.75); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
/* `.carousel-btn` / `.carousel-dots` set display:flex, which would otherwise
   override the bare `hidden` attribute the script sets when there is only a
   single slide.  Make `hidden` win so single-item carousels show no nav. */
.carousel-btn[hidden],
.carousel-dots[hidden] { display: none !important; }
.carousel-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5cae0;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, transform 0.15s;
}
.carousel-dot.active {
  background: #17256c;
  transform: scale(1.25);
}

/* === Section title (shared between team / player pages) === */

/* === Roster grid === */
.profile-roster {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.profile-roster-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  padding: 14px 8px 12px;
  text-decoration: none;
  color: #17256c;
  box-shadow: 0 1px 3px rgba(20,28,80,0.06);
  transition: transform 0.12s, box-shadow 0.12s;
}
.profile-roster-item a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20,28,80,0.12);
}
.profile-roster-item a:active { transform: scale(0.97); }
.profile-roster-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: #e6eaf3;
  margin-bottom: 8px;
}
.profile-roster-meta {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.profile-roster-num {
  font-size: 12px;
  color: #888;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.profile-roster-name {
  font-size: 14px;
  font-weight: 600;
}

/* === Player hero === */
.player-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(20,28,80,0.18);
  min-height: 220px;
}
.player-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.45) saturate(1.2);
  transform: scale(1.18);
  z-index: 0;
}
.player-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(23,37,108,0.85) 0%, rgba(35,58,170,0.55) 100%);
  z-index: 1;
}
.player-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  /* PC: stack photo + meta and center the whole block in the banner. */
  justify-content: center;
  padding: 32px 24px;
  color: #fff;
  text-align: center;
}
.player-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.player-photo-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
}
.player-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #e6eaf3;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.player-num-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  margin-bottom: 8px;
}
.player-name {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.player-team-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
}
.player-team-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  padding: 2px;
}
.player-team-link {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 600;
}
.player-team-link:hover { text-decoration: underline; }

/* === Bio card === */
.player-bio-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 6px rgba(20,28,80,0.06);
  margin-bottom: 18px;
  /* style.css resets body to text-align:center — keep the bio body
     copy (野球歴 / ひとこと) left-aligned. */
  text-align: left;
}
.bio-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f7;
}
.bio-row:last-of-type { border-bottom: none; }
.bio-label {
  font-size: 12px;
  font-weight: 700;
  color: #17256c;
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.bio-value {
  margin: 0;
  font-size: 14px;
  color: #222;
  line-height: 1.65;
  white-space: pre-wrap;
}

/* === Stats === */
.stats-section { margin-bottom: 24px; }
.stats-highlight {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.stat-highlight {
  background: #fff;
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(20,28,80,0.06);
  border-top: 3px solid #d8dcec;
}
.stat-highlight.accent {
  border-top-color: #17256c;
  background: linear-gradient(180deg, #fff 0%, #f1f4ff 100%);
}
.sh-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #17256c;
  line-height: 1.1;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.sh-label {
  display: block;
  font-size: 11px;
  color: #6b7390;
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.stats-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #e6eaf3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(20,28,80,0.06);
}
.stat-card {
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: #6b7390;
}
.stat-card .stat-value {
  font-size: 14px;
  font-weight: 600;
  color: #17256c;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* === Messages === */
.profile-msg {
  text-align: center;
  padding: 32px;
  color: #666;
  font-size: 14px;
}

/* === Loading skeleton (team.html) === */
.profile-skeleton {
  padding-top: 4px;
}
.sk-shimmer {
  position: relative;
  overflow: hidden;
  background: #e6eaf3;
  border-radius: 8px;
}
.sk-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: sk-sweep 1.25s ease-in-out infinite;
}
@keyframes sk-sweep {
  100% { transform: translateX(100%); }
}
.sk-header {
  display: flex;
  gap: 18px;
  align-items: center;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(20, 28, 80, 0.06);
}
.sk-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sk-header-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sk-line { border-radius: 6px; }
.sk-media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.sk-media {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}
.sk-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.sk-card {
  height: 132px;
  border-radius: 10px;
}
.sk-caption {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: #8b93ad;
  letter-spacing: 0.04em;
}
@media (max-width: 640px) {
  .sk-media-row { grid-template-columns: 1fr; }
  .sk-header { flex-direction: column; text-align: center; }
  .sk-header-text { align-items: center; width: 100%; }
}

/* Footer comes from style.css — no overrides here. */

/* === Responsive === */
@media (max-width: 640px) {
  .profile-team-header { padding: 14px; gap: 12px; flex-direction: column; align-items: center; text-align: center; }
  .profile-team-meta { width: 100%; }
  .profile-team-logo { width: 72px; height: 72px; }
  .profile-team-name { font-size: 19px; }
  .profile-contact-btn { font-size: 12px; padding: 7px 12px; }
  .profile-achievements-text { text-align: left; }
  /* SP: video + photo carousels stack vertically. */
  .profile-media-row { grid-template-columns: 1fr; gap: 18px; }

  .player-hero-inner {
    flex-direction: column;
    padding: 22px 16px;
    text-align: center;
    gap: 14px;
  }
  .player-photo-wrap { width: 108px; height: 108px; }
  .player-name { font-size: 22px; }
  .player-team-row { justify-content: center; }

  .bio-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }

  .stats-highlight { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-highlight { padding: 12px 8px; }
  .sh-value { font-size: 20px; }

  .carousel-frame { border-radius: 10px; }
  .carousel-btn { width: 32px; height: 32px; font-size: 14px; }
}
