/* =========================
   全体
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

.character-body {
  min-height: 100vh;

  font-family:
    "BIZ UDPGothic",
    "Yu Gothic",
    "Hiragino Kaku Gothic ProN",
    "Meiryo",
    sans-serif;

  color: #3d352f;

  background:
    linear-gradient(
      rgba(249, 246, 239, 0.92),
      rgba(240, 246, 250, 0.92)
    );
}


/* =========================
   ヘッダー
========================= */

.character-header {
  position: relative;

  max-width: 1100px;
  margin: 0 auto;
  padding: 45px 24px 35px;

  text-align: center;
}

.back-link {
  position: absolute;
  top: 24px;
  left: 24px;

  color: #5c7180;
  font-size: 14px;
  text-decoration: none;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.back-link:hover {
  color: #304d61;
  transform: translateX(-3px);
}

.character-label {
  margin: 24px 0 8px;

  color: #8da3b1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  letter-spacing: 0.28em;
}

.character-header h1 {
  margin: 0;

  color: #384c59;
  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;

  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: 0.08em;
}

.character-lead {
  margin: 20px auto 0;

  color: #6b7479;
  font-size: 16px;
  line-height: 1.9;
}


/* =========================
   メイン
========================= */

.character-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 70px;
}


/* =========================
   集合写真
========================= */

.group-photo-section {
  margin: 15px auto 65px;
}

.group-photo {
  max-width: 650px;
  margin: 0 auto;
  padding: 18px 18px 22px;

  background: rgba(255, 255, 255, 0.96);

  border: 1px solid rgba(121, 139, 149, 0.22);
  border-radius: 8px;

  box-shadow:
    0 18px 45px rgba(52, 68, 78, 0.15),
    0 3px 10px rgba(52, 68, 78, 0.08);

  transform: rotate(-0.3deg);
}

.group-photo img {
  display: block;

  width: 100%;
  height: auto;

  border-radius: 3px;
}

.group-photo figcaption {
  margin-top: 17px;

  color: #6f777b;
  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;

  font-size: 14px;
  letter-spacing: 0.12em;
  text-align: center;
}


/* =========================
   登場人物カード
========================= */

.character-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 26px;
}

.character-card {
  position: relative;

  display: flex;
  gap: 20px;

  min-height: 245px;
  padding: 30px 28px;

  background: rgba(255, 255, 255, 0.88);

  border: 1px solid rgba(125, 148, 161, 0.24);
  border-radius: 18px;

  box-shadow:
    0 10px 28px rgba(59, 80, 92, 0.08);

  overflow: hidden;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.character-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 5px;

  background:
    linear-gradient(
      90deg,
      #8faebe,
      #c5d9e2
    );
}

.character-card:hover {
  transform: translateY(-4px);

  box-shadow:
    0 16px 34px rgba(59, 80, 92, 0.13);
}

.character-card-kagawa::before {
  background:
    linear-gradient(
      90deg,
      #d3ad69,
      #ecdbad
    );
}

.character-number {
  flex: 0 0 auto;

  color: #c4d4dc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  line-height: 1;
}

.character-text {
  min-width: 0;
}

.character-role {
  margin: 0 0 7px;

  color: #9b7d55;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.14em;
}

.character-text h2 {
  margin: 0 0 18px;

  color: #344d5c;
  font-family:
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;

  font-size: 25px;
  letter-spacing: 0.06em;
}

.character-text h2 span {
  display: block;

  margin-top: 5px;

  color: #89979f;
  font-family:
    "BIZ UDPGothic",
    "Yu Gothic",
    sans-serif;

  font-size: 12px;
  font-weight: normal;
  letter-spacing: 0.1em;
}

.character-text p:last-child {
  margin: 0;

  color: #514a45;
  font-size: 15px;
  line-height: 1.95;
}


/* =========================
   フッター
========================= */

.character-footer {
  padding: 28px 20px 45px;

  text-align: center;
}

.character-footer a {
  display: inline-block;

  padding: 12px 28px;

  color: #ffffff;
  background: #688495;

  border-radius: 999px;

  font-size: 14px;
  text-decoration: none;

  box-shadow:
    0 6px 15px rgba(66, 91, 105, 0.18);

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.character-footer a:hover {
  background: #4f6e80;
  transform: translateY(-2px);
}

.ai-image-note {
  max-width: 760px;
  margin: 42px auto 0;
  padding: 16px 20px;

  color: #727b80;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;

  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}


/* =========================
   タブレット・スマホ
========================= */

@media screen and (max-width: 760px) {

  .character-header {
    padding:
      calc(72px + env(safe-area-inset-top))
      18px
      28px;
  }

  .back-link {
    top: 24px;
    left: 18px;
  }

  .character-header h1 {
    font-size: 30px;
    line-height: 1.45;
  }

  .character-lead {
    font-size: 14px;
  }

  .character-main {
    padding: 0 15px 55px;
  }

  .group-photo-section {
    margin-bottom: 45px;
  }

  .group-photo {
    padding: 10px 10px 17px;

    border-radius: 5px;

    transform: none;
  }

  .group-photo figcaption {
    margin-top: 12px;

    font-size: 12px;
  }

  .character-section {
    grid-template-columns: 1fr;

    gap: 18px;
  }

  .character-card {
    min-height: 0;

    gap: 14px;
    padding: 25px 20px;
  }

  .character-number {
    font-size: 29px;
  }

  .character-text h2 {
    font-size: 22px;
  }

  .character-text p:last-child {
    font-size: 14px;
    line-height: 1.9;
  }
}


/* =========================
   小さいスマホ
========================= */

@media screen and (max-width: 420px) {

  .character-header h1 {
    font-size: 26px;
  }

  .character-card {
    display: block;
  }

  .character-number {
    margin-bottom: 12px;
  }
}