@charset "UTF-8";

.character-page .character-section {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 28px 18px 56px;
  font-family: "Oxanium", "M PLUS 1p", "Zen Kaku Gothic New", sans-serif;
}

.character-page .character-section * {
  font-family: inherit;
}

.character-icons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.character-icon {
  min-height: 86px;
  border: 1px solid rgba(255, 150, 230, 0.55);
  background: url("../image/character/list_00.jpg") center / cover no-repeat;
  color: #fff;
  font-family: var(--font-line-seed-jp);
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.character-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
  transition: opacity 0.24s ease;
}

.character-icon[data-char="spica"] { background-image: url("../image/character/list_01.jpg"); }
.character-icon[data-char="lily"] { background-image: url("../image/character/list_02.jpg"); }
.character-icon[data-char="sugar"] { background-image: url("../image/character/list_03.jpg"); }
.character-icon[data-char="morte"] { background-image: url("../image/character/list_04.jpg"); }
.character-icon[data-char="falke"] { background-image: url("../image/character/list_05.jpg"); }

.character-icon:hover,
.character-icon:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(130, 255, 180, 0.95);
  box-shadow: 0 0 16px rgba(65, 255, 150, 0.35);
}

.character-icon:hover::before,
.character-icon:focus-visible::before {
  opacity: 0;
}

.character-icon.is-active {
  border-color: rgba(255, 150, 235, 0.95);
  box-shadow: 0 0 16px rgba(255, 90, 205, 0.4);
}

.character-icon.is-active::before {
  opacity: 0;
}

.character-detail {
  display: grid;
  grid-template-columns: minmax(320px, 42%) 1fr;
  grid-template-areas:
    "visual heading"
    "visual meta";
  gap: 24px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255, 145, 230, 0.5);
}

.character-heading {
  grid-area: heading;
}

.character-detail.is-fading {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.character-visual-wrap {
  grid-area: visual;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.character-visual {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-image: url("../image/character/character_bg.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.character-figure {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}

.character-figure-img,
.character-overlay-img {
  position: absolute;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.character-figure-img {
  left: 50%;
  top: 0;
  transform-origin: center top;
}

.character-overlay-img {
  left: auto;
  right: 0;
  top: 0;
  transform-origin: top right;
  opacity: 0;
  filter:
    drop-shadow(0 0 4px rgba(255, 150, 235, 0.95))
    drop-shadow(0 0 10px rgba(255, 90, 220, 0.85))
    drop-shadow(0 0 18px rgba(255, 40, 190, 0.7));
}

.character-figure.is-costume-switching {
  animation: figureSlideFadeIn 0.34s ease both;
}

.character-costume-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.costume-btn {
  height: 40px;
  border: 1px solid rgba(255, 140, 220, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: "Oxanium", var(--font-line-seed-jp);
  cursor: pointer;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease, filter 0.24s ease;
}

.costume-btn:hover,
.costume-btn:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border-color: rgba(255, 170, 240, 0.95);
  box-shadow:
    0 0 10px rgba(255, 130, 225, 0.55),
    0 0 20px rgba(255, 80, 210, 0.35),
    inset 0 0 0 1px rgba(255, 230, 245, 0.3);
}

.costume-btn.is-active {
  border-color: rgba(130, 255, 180, 0.95);
  box-shadow: inset 0 0 0 1px rgba(130, 255, 180, 0.6);
}

.character-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
}

.character-name {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 42px);
  color: #fff;
  text-shadow:
    0 0 5px rgba(255, 145, 230, 0.95),
    0 0 12px rgba(255, 95, 210, 0.75),
    0 0 20px rgba(255, 55, 190, 0.55);
}

.character-realname {
  font-size: 0.62em;
}

.character-cv {
  margin: 8px 0 0;
  font-size: clamp(20px, 1.8vw, 30px);
  color: #fff;
  text-shadow:
    0 0 4px rgba(130, 255, 180, 0.95),
    0 0 10px rgba(70, 255, 145, 0.8),
    0 0 18px rgba(30, 255, 130, 0.62);
}

.character-stats {
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.character-stats > div {
  display: grid;
  grid-template-columns: 124px 1fr;
  border: 1px solid rgba(255, 180, 235, 0.4);
}

.character-stats dt,
.character-stats dd {
  margin: 0;
  padding: 8px;
}

.character-stats dt {
  background: rgba(255, 115, 210, 0.2);
}

.character-stats dd {
  background: rgba(255, 255, 255, 0.08);
}

.character-profile {
  margin: 0 0 14px;
  line-height: 1.8;
}

.character-voices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.character-voice-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px 0 34px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 180, 235, 0.85);
  color: #fff;
  text-decoration: none;
  font-family: "Oxanium", "M PLUS 1p", "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(12px, 0.9vw, 15px);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(100deg, rgba(104, 46, 146, 0.96) 0%, rgba(218, 83, 167, 0.96) 100%);
  box-shadow:
    0 0 10px rgba(255, 110, 215, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 0.28s ease, filter 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.character-voice-btn::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("../image/download/mic.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.character-voice-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
  background: linear-gradient(100deg, rgba(38, 120, 78, 0.96) 0%, rgba(46, 195, 126, 0.96) 55%, rgba(114, 255, 190, 0.96) 100%);
  border-color: rgba(170, 255, 210, 0.95);
  box-shadow:
    0 0 10px rgba(120, 255, 170, 0.7),
    0 0 20px rgba(70, 255, 145, 0.45),
    inset 0 0 0 1px rgba(210, 255, 230, 0.28);
}

.character-voice-btn.is-locked {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .character-detail {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "visual"
      "meta";
  }
}

@media (max-width: 767px) {
  .character-page .character-section {
    padding: 16px 10px 38px;
  }

  .character-icons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .character-icon:nth-child(1),
  .character-icon:nth-child(2) {
    grid-column: span 3;
  }

  .character-icon:nth-child(3),
  .character-icon:nth-child(4),
  .character-icon:nth-child(5) {
    grid-column: span 2;
  }

  .character-icon {
    min-height: 64px;
    font-size: 12px;
    line-height: 1.35;
  }

  .character-detail {
    padding: 12px;
    gap: 12px;
  }

  .character-stats {
    grid-template-columns: 1fr;
  }

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