/* リセットCSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基本設定 */
body {
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.6;
  color: #333;
  background: repeat center url("photo/bk.jpg");
  background-size: 100%;
  background-color: #f5f5f5;
  min-height: 100vh;
}

/* ヘッダースタイル */
.header {
  background-color: #2c2c2c;
  color: white;
  padding: 0;
  text-align: center;
  position: relative;
  opacity: 0.9;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #b4aa88 0%, #d4c49a 50%, #b4aa88 100%);
}

.header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #b4aa88 0%, #d4c49a 50%, #b4aa88 100%);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.logo-year-section {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 48px;
  color: #b4aa88;
  font-weight: bold;
}

.logo-text {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 12px;
  color: #b4aa88;
  text-align: center;
  line-height: 1.2;
  font-weight: 500;
}

.logo-svg {
  width: 60px;
  height: 70px;
  fill: #b4aa88;
}

.divider {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 60px;
  color: #b4aa88;
  font-weight: lighter;
}

.year {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 60px;
  font-weight: bold;
  color: #b4aa88;
}

.title-section {
  text-align: center;
}

.main-title {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.subtitle {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 30px;
  margin-bottom: 8px;
  font-weight: bold;
}

.subtitle-jp {
  font-size: 18px;
  font-weight: bold;
}

/* メインコンテンツ */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

.players-section,
.managers-section {
  margin-bottom: 100px;
}

/* セクションタイトル */
.section-title {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  color: #2c2c2c;
  letter-spacing: 2px;
}

.underline {
  width: 80px;
  height: 4px;
  background-color: #b4aa88;
  margin: 0 auto 60px;
}

/* カードグリッド */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}

/* プレイヤーカード */
.player-card {
  background: white;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid #ddd;
}
/*
.player-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
*/
.card-image {
  width: 100%;
  height: 240px;
  background-color: #f8f8f8;
  display: flex;
  align-items: start;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-number-container {
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.placeholder-image {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-info {
  padding: 20px;
  text-align: center;
  background: white;
}

.card-number {
  font-size: 32px;
  font-weight: bold;
  color: #b4aa88;
  margin-bottom: 15px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-decoration: underline;
  text-decoration-color: #b4aa88;
  text-underline-offset: 12px;
  text-decoration-thickness: 1px;
  text-decoration-skip-ink: none;
}

/* 肩書スタイル */
.card-position {
  font-size: 12px;
  color: #b4aa88;
  font-weight: 500;
  margin-bottom: 8px;
  text-align: center;
}

.card-name-jp {
  font-size: 1.2em;
  font-weight: 500;
  margin-bottom: 8px;
  color: #2c2c2c;
  line-height: 1.3;
}

.card-name-en {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.8em;
  color: #666;
  margin-bottom: 15px;
}

/* 出身チーム・出身校ラベル */
.card-team-label,
.card-school-label {
  font-size: 10px;
  color: #b4aa88;
  background-color: transparent;
  border: 1px solid #b4aa88;
  padding: 3px 6px;
  display: inline-block;
  margin-bottom: 6px;
}

.card-team,
.card-school {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

/* 画面表示時は一部要素を非表示 */
.card-school-container,
.card-message-container {
  display: none;
}

.manager-card .card-team-container {
  display: none;
}
.manager-card .card-school-container {
  display: block;
}

/* 空欄時の非表示 */
.card-team-container.hidden,
.card-school-container.hidden {
  display: none;
}

/* フッタースタイル */
.footer {
  position: relative;
  height: 80px;
  overflow: hidden;
  margin-top: 50px;
  background-image: url("images/footer-design-new.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.footer-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.footer-triangle {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 80px 0 0 100vw;
  border-color: transparent transparent transparent #2c2c2c;
}

.footer-gold-section {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(135deg, #b4aa88 0%, #d4c49a 50%, #b4aa88 100%);
  clip-path: polygon(40% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.footer-text {
  position: absolute;
  bottom: 20px;
  right: 30px;
  color: #2c2c2c;
  font-size: 12px;
  font-weight: 300;
  z-index: 10;
}

/* レスポンシブデザイン */
@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .header-content {
    flex-direction: column;
    gap: 30px;
  }

  .title-section {
    text-align: center;
  }

  .main-title {
    font-size: 28px;
  }

  .logo,
  .year,
  .divider {
    font-size: 48px;
  }
}

@media (max-width: 600px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .section-title {
    font-size: 36px;
  }

  .main-content {
    padding: 60px 15px;
  }
}

@media (max-width: 430px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .card-number {
    font-size: 22px;
    margin-bottom: 12px;
    text-underline-offset: 8px;
  }
  .main-content {
    padding: 50px 8px;
  }

  .card-image {
    width: 100%;
    height: 200px;
    background-color: #f8f8f8;
    display: flex;
    align-items: start;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }

  .header {
    padding: 40px 15px;
  }

  .logo-year-section {
    gap: 20px;
  }

  .logo,
  .year,
  .divider {
    font-size: 40px;
  }

  .main-title {
    font-size: 22px;
  }

  .subtitle,
  .subtitle-jp {
    font-size: 16px;
  }

  .footer-text {
    font-size: 10px;
    bottom: 15px;
    right: 20px;
  }
  .card-team-label,
  .card-school-label {
    display: none;
  }
  .card-info {
    padding: 8px 10px 14px 10px;
  }
  .card-number-container {
    margin-bottom: 0px;
  }
  .card-name-jp {
    font-size: 1em;
    margin-bottom: 2px;
  }
  .card-name-en {
    font-size: 0.6em;
    margin-bottom: 6px;
  }
  .card-team,
  .card-school {
    font-size: 12px;
  }
}

/* PC表示での5列固定 */
@media (min-width: 1201px) {
  .cards-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
  }
}

.manager-card .card-number {
  display: none;
}

/* 初期状態では非表示（PC用） */
.sp-only {
  display: none;
}

/* スマホだけ表示する */
@media screen and (max-width: 767px) {
  .sp-only {
    display: inline;
  }
}

/* 印刷用CSS */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .sp-only {
    display: inline;
  }

  /* メニューボタンとオーバーレイを非表示 */
  .menu-button,
  .menu-overlay {
    display: none !important;
  }

  /* A4サイズ設定 - 余白を12mmに変更 */
  @page {
    size: A4;
    margin:12mm;
  }

  body {
    font-size: 12px;
    line-height: 1.4;
    background-image: url("photo/bk.jpg") !important;
    background-repeat: repeat-y;
    background-size: 100% auto !important;
    background-position: top center;
    color: black !important;
    margin: 0;
    padding: 0;
  }

  /* 表紙用ヘッダー（1ページ目のみ） */
  .header {
    background-color: #2c2c2c !important;
    color: white !important;
    padding: 0 !important;
    page-break-after: always;
    height: 13cm;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 70%;
    margin: 8cm auto 0 auto;
  }

  .header::before {
    background: linear-gradient(90deg, #b4aa88 0%, #d4c49a 50%, #b4aa88 100%) !important;
    height: 4px !important;
  }

  .header::after {
    background: linear-gradient(90deg, #b4aa88 0%, #d4c49a 50%, #b4aa88 100%) !important;
    height: 4px !important;
  }

  .header-content {
    padding: 70px 35px !important;
    gap: 35px !important;
    background-color: #2c2c2c;
  }

  .logo-svg {
    width: 72px !important;
    height: 90px !important;
    fill: #b4aa88 !important;
  }

  .divider {
    font-size: 50px !important;
  }

  .year {
    font-size: 50px !important;
  }

  .main-title {
    font-size: 38px !important;
    margin-bottom: 30px !important;
  }

  .subtitle,
  .subtitle-jp {
    font-size: 20px !important;
  }

  /* メインコンテンツ */
  .main-content {
    padding: 0 !important;
  }

  /* セクション改ページ設定 */
  .players-section {
    page-break-before: always;
    margin-bottom: 0 !important;
  }

  .managers-section {
    page-break-before: always;
    margin-bottom: 0 !important;
  }

  /* セクションタイトルを表示 - 幅186mm、高さ52.2mm */
  .section-title {
    /*display: block !important;
    width: 186mm !important;
    height: 52.2mm !important;
    margin: 12mm auto 0 auto!important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 42px !important;
    font-weight: bold !important;
    letter-spacing: 2px !important;
    margin-bottom: 3mm !important;*/
    display: none !important;
  }

  .underline {
    display: none !important;
  }

  /* A4サイズに合わせて5列グリッドに変更、ギャップ3mm */
  .cards-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 34.8mm) !important;
    gap: 3mm !important;
    margin-bottom: 3mm !important;
    justify-content: center !important;
    grid-template-rows: repeat(5, auto);
    padding-top: 12mm;
  }

  /* カードサイズを固定 - 幅34.8mm、高さ52.2mm */
  .player-card {
    background: white !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
    page-break-inside: avoid;
    display: block !important;
    width: 34.8mm !important;
    height: 52.2mm !important;
    margin: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    opacity: 0.9;
  }

  /* カード画像部分をカードサイズに合わせて調整 */
  .card-image {
    position: relative !important;
    width: 100% !important;
    height: 28mm !important;
    background-color: #f8f8f8 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: start !important;
    justify-content: center !important;
  }

  .card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top !important;
  }

  /* カード情報部分のパディング調整 */
  .card-info {
    position: relative !important;
    padding: 2mm 1.5mm !important;
    text-align: center !important;
    background: white !important;
  }

  /* 背番号のサイズ調整 */
  .card-number-container {
    position: relative !important;
    display: inline-block !important;
    margin-bottom: 1.5mm !important;
  }

  .card-number {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #b4aa88 !important;
    margin-bottom: 1.5mm !important;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    text-decoration: underline !important;
    text-decoration-color: #b4aa88 !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 1px !important;
  }

  /* 肩書のサイズ調整 */
  .card-position {
    font-size: 7px !important;
    color: #b4aa88 !important;
    font-weight: 500 !important;
    margin-bottom: 0.8mm !important;
    text-align: center !important;
  }

  /* 名前のサイズ調整 */
  .card-name-jp {
    font-size: 10px !important;
    font-weight: 500 !important;
    margin-bottom: 0.8mm !important;
    color: #2c2c2c !important;
    line-height: 1.2 !important;
  }

  .card-name-en {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 7px !important;
    color: #666 !important;
    margin-bottom: 1.5mm !important;
  }

  /* 出身チーム・出身校ラベルのサイズ調整 */
  .card-team-label,
  .card-school-label {
    /*font-size: 6px !important;
    color: #b4aa88 !important;
    background-color: transparent !important;
    border: 1px solid #b4aa88 !important;
    padding: 1px 2px !important;
    display: inline-block !important;
    margin-bottom: 0.8mm !important;*/
    display: none
  }

  .card-team,
  .card-school {
    font-size: 7px !important;
    color: #333 !important;
    font-weight: 500 !important;
  }

  /* 画面表示時は一部要素を非表示 */
  .card-school-container,
  .card-message-container {
    display: none !important;
  }

  .manager-card .card-team-container {
    display: none !important;
  }
  .manager-card .card-school-container {
    display: block !important;
  }

  /* 空欄時の非表示 */
  .card-team-container.hidden,
  .card-school-container.hidden {
    display: none !important;
  }

  /* マネージャーカードは背番号非表示 */
  .manager-card .card-number-container {
    display: none !important;
  }

  /* 25枚ごとに改ページ（5列×5行）*/ 
  .player-card:nth-child(25n) {
    page-break-after: always !important;
  }
  .player-card:nth-child(25n+1) {
    margin-top: 12mm !important; /* 2ページ目以降に余白を挿入 */
  }
  /* フッターは印刷時非表示 */
  .footer {
    display: none !important;
  }
}
@media print {
  .player-card:nth-child(25n)::after {
    content: "";
    display: block;
    height: 12mm; /* 上余白分のスペース */
    page-break-after: always;
  }
}