/* タコピーの原罪 - キャラクター一覧ページ CSS */

/* フォントインポート */
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@700;900&family=Noto+Sans+JP:wght@400;700&family=Bebas+Neue&display=swap');

/* CSS変数定義 */
:root {
  --takopi-pink: #ff69b4;
  --takopi-light-pink: #ffb6e0;
  --takopi-yellow: #ffd700;
  --takopi-dark-pink: #ff1493;
  --text-dark: #333;
  --text-gray: #666;
  --bg-white: #fff;
  --bg-light: #fffafc;
  --max-width: 1200px;

  /* キャラクターキーカラー */
  --color-takopi: #ff69b4;
  --color-shizuka: #6495ed;
  --color-marina: #dc143c;
  --color-naoki: #32cd32;
  --color-chappy: #8b4513;
  --color-junya: #ff8c00;
  --color-shizuka-mother: #9370db;
  --color-shizuka-father: #778899;
  --color-marina-mother: #4b0082;
  --color-marina-father: #2f4f4f;
  --color-azuma-mother: #20b2aa;
  --color-happymama: #ffd700;
}

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

/* ベース設定 */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.8;
  background-image:
    /* 星のパターン */
    radial-gradient(circle at 10% 20%, var(--takopi-yellow) 0%, transparent 2%),
    radial-gradient(circle at 80% 80%, var(--takopi-yellow) 0%, transparent 2%),
    radial-gradient(circle at 40% 40%, var(--takopi-yellow) 0%, transparent 1.5%),
    radial-gradient(circle at 90% 10%, var(--takopi-yellow) 0%, transparent 1.5%),
    radial-gradient(circle at 30% 70%, var(--takopi-yellow) 0%, transparent 2%),
    /* タコのパターン - SVGをインラインで埋め込み */
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="%23ffb6e0" opacity="0.2" d="M24.74,22.39l-1.53-1.27c1.51-1.72,2.43-3.98,2.43-6.45,0-5.4-4.39-9.8-9.8-9.8S6.05,9.27,6.05,14.67c0,2.69,1.09,5.12,2.85,6.9l-1.45,1.2c-.81.67-.92,1.86-.25,2.66.37.45.92.69,1.46.69.42,0,.85-.14,1.2-.43l2.33-1.92c.05.02.11.04.16.06l-.51,1.08c-.45.94-.04,2.07.9,2.52.26.12.54.18.81.18.71,0,1.39-.4,1.71-1.08l.98-2.06c.07,0,.15,0,.22-.01l1.01,2.13c.32.68,1,1.08,1.71,1.08.27,0,.55-.06.81-.18.94-.45,1.35-1.58.9-2.52l-.65-1.38,2.09,1.73c.35.29.78.43,1.2.43.55,0,1.09-.23,1.46-.69.67-.81.55-2-.25-2.66Z"/></svg>');
  background-position:
    10% 20%, 80% 80%, 40% 40%, 90% 10%, 30% 70%,
    0 0;
  background-size:
    100px 100px, 100px 100px, 100px 100px, 100px 100px, 100px 100px,
    80px 80px;
  background-repeat: repeat;
}

/* ヘッダー */
header {
  background-color: var(--takopi-pink);
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  font-size: 14px;
  color: var(--bg-white);
}

.breadcrumb a {
  color: var(--bg-white);
  text-decoration: none;
  transition: opacity 0.3s;
}

.breadcrumb a:hover {
  opacity: 0.8;
}

/* メインコンテンツ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 40px 40px;
  background-color: var(--bg-white);
  box-shadow: 0 0 20px rgba(255,105,180,0.1);
  border-radius: 20px;
  margin-top: 20px;
  margin-bottom: 40px;
  overflow: visible;
}

/* タイトル */
h1 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--takopi-dark-pink);
  text-align: center;
  margin: 20px 0 60px;
  text-shadow: 4px 4px 0 var(--takopi-yellow), 8px 8px 0 var(--takopi-light-pink);
  line-height: 1.3;
  letter-spacing: 0.05em;
  animation: title-pop 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: visible;
}

/* タイトルアニメーション */
@keyframes title-pop {
  0% {
    transform: scale(0.5) translateY(-20px);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) translateY(5px);
  }
  70% {
    transform: scale(0.98) translateY(-2px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* タイトルの装飾アニメーション */
h1::before,
h1::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="%23ff69b4" d="M24.74,22.39l-1.53-1.27c1.51-1.72,2.43-3.98,2.43-6.45,0-5.4-4.39-9.8-9.8-9.8S6.05,9.27,6.05,14.67c0,2.69,1.09,5.12,2.85,6.9l-1.45,1.2c-.81.67-.92,1.86-.25,2.66.37.45.92.69,1.46.69.42,0,.85-.14,1.2-.43l2.33-1.92c.05.02.11.04.16.06l-.51,1.08c-.45.94-.04,2.07.9,2.52.26.12.54.18.81.18.71,0,1.39-.4,1.71-1.08l.98-2.06c.07,0,.15,0,.22-.01l1.01,2.13c.32.68,1,1.08,1.71,1.08.27,0,.55-.06.81-.18.94-.45,1.35-1.58.9-2.52l-.65-1.38,2.09,1.73c.35.29.78.43,1.2.43.55,0,1.09-.23,1.46-.69.67-.81.55-2-.25-2.66Z"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(255,105,180,0.5));
}

h1::before {
  top: -20px;
  left: -40px;
  animation: tako-appear 0.6s ease-out 0.8s forwards, tako-gentle-float 4s ease-in-out 1.4s infinite;
}

h1::after {
  bottom: -20px;
  right: -40px;
  animation: tako-appear 0.6s ease-out 1s forwards, tako-gentle-float 4s ease-in-out 1.6s infinite reverse;
}

@keyframes tako-appear {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes tako-gentle-float {
  0%, 100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-8px) rotate(5deg);
  }
}

/* 見出し */
h2 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: var(--takopi-dark-pink);
  margin: 60px 0 20px;
  padding: 15px 25px;
  background: linear-gradient(135deg, var(--takopi-yellow) 0%, var(--takopi-light-pink) 50%, transparent 100%);
  border-radius: 10px;
  border-left: 8px solid var(--takopi-dark-pink);
  position: relative;
  text-shadow: 2px 2px 0 var(--bg-white);
  letter-spacing: 0.05em;
}

h2::before {
  content: "★";
  color: var(--takopi-yellow);
  font-size: 1.5rem;
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(-15deg);
  animation: star-twinkle 2s infinite;
}

h2::after {
  content: "★";
  color: var(--takopi-yellow);
  font-size: 1.2rem;
  position: absolute;
  right: 20px;
  top: 10px;
  transform: rotate(15deg);
  animation: star-twinkle 2s infinite;
  animation-delay: 1s;
}

@keyframes star-twinkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(15deg);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9) rotate(15deg);
  }
}

h3 {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-gray);
  margin-bottom: 30px;
  padding-left: 20px;
  position: relative;
}

h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-color: var(--takopi-yellow);
  border-radius: 50%;
}

/* 目次 */
.table-of-contents {
  background-color: var(--bg-light);
  border: 3px solid var(--takopi-light-pink);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  animation: gentle-fade-in 0.8s ease-out 0.5s forwards;
  opacity: 0;
}

@keyframes gentle-fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-of-contents::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background-color: var(--takopi-yellow);
  border-radius: 50%;
  opacity: 0.3;
}

.table-of-contents h2 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 1.5rem;
  margin: 0 0 20px;
  padding: 0;
  background: none;
  border: none;
  text-align: center;
  text-shadow: none;
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
}

.table-of-contents li {
  margin-bottom: 10px;
  padding-left: 30px;
  position: relative;
}

.table-of-contents li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="%23ff1493" d="M24.74,22.39l-1.53-1.27c1.51-1.72,2.43-3.98,2.43-6.45,0-5.4-4.39-9.8-9.8-9.8S6.05,9.27,6.05,14.67c0,2.69,1.09,5.12,2.85,6.9l-1.45,1.2c-.81.67-.92,1.86-.25,2.66.37.45.92.69,1.46.69.42,0,.85-.14,1.2-.43l2.33-1.92c.05.02.11.04.16.06l-.51,1.08c-.45.94-.04,2.07.9,2.52.26.12.54.18.81.18.71,0,1.39-.4,1.71-1.08l.98-2.06c.07,0,.15,0,.22-.01l1.01,2.13c.32.68,1,1.08,1.71,1.08.27,0,.55-.06.81-.18.94-.45,1.35-1.58.9-2.52l-.65-1.38,2.09,1.73c.35.29.78.43,1.2.43.55,0,1.09-.23,1.46-.69.67-.81.55-2-.25-2.66Z"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
}

.table-of-contents a {
  color: var(--takopi-pink);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
}

.table-of-contents a:hover {
  color: var(--takopi-dark-pink);
  padding-left: 5px;
}

/* 画像 */
.main-image {
  margin: 30px 0;
  text-align: center;
  animation: gentle-fade-in 0.8s ease-out 0.8s forwards;
  opacity: 0;
}

.main-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.main-image figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-gray);
}

/* キャラクターグリッド - ボタンスタイルに変更 */
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(255,182,224,0.1) 100%);
  border-radius: 20px;
  position: relative;
}

.character-grid::before {
  content: "★";
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 2rem;
  color: var(--takopi-yellow);
  transform: rotate(-15deg);
  opacity: 0.5;
}

/* キャラクターボタン */
.character-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: linear-gradient(145deg, var(--bg-white) 0%, #f0f0f0 100%);
  border: 3px solid var(--takopi-light-pink);
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
}

.character-button::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--takopi-yellow) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.character-button:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 30px rgba(255,105,180,0.4);
  border-color: var(--takopi-pink);
}

.character-button:hover::before {
  opacity: 0.3;
}

.character-button:active {
  transform: translateY(-3px) scale(1.02);
}

.character-button img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--takopi-pink);
  box-shadow: 0 0 15px rgba(255,105,180,0.3);
  transition: all 0.3s;
  margin-bottom: 10px;
}

.character-button:hover img {
  box-shadow: 0 0 25px rgba(255,105,180,0.6);
  border-color: var(--takopi-dark-pink);
  transform: scale(1.1);
}

.character-button span {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
}

/* キャラクターカード - より魅力的なデザインに */
.character-cards {
  margin-top: 40px;
}

/* キャラクターごとのテーマカラー適用 */
#takopi { --theme-color: var(--color-takopi); }
#shizuka { --theme-color: var(--color-shizuka); }
#marina { --theme-color: var(--color-marina); }
#naoki { --theme-color: var(--color-naoki); }
#chappy { --theme-color: var(--color-chappy); }
#junya { --theme-color: var(--color-junya); }
#shizuka-mother { --theme-color: var(--color-shizuka-mother); }
#shizuka-father { --theme-color: var(--color-shizuka-father); }
#marina-mother { --theme-color: var(--color-marina-mother); }
#marina-father { --theme-color: var(--color-marina-father); }
#azuma-mother { --theme-color: var(--color-azuma-mother); }
#happymama { --theme-color: var(--color-happymama); }

.character-card {
  background: linear-gradient(135deg, var(--bg-white) 0%, rgba(255,255,255,0.8) 100%);
  border-radius: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  margin-bottom: 40px;
  overflow: hidden;
  position: relative;
  border: 4px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s;
  animation: card-slide-in 0.6s ease-out forwards;
  opacity: 0;
}

/* キャラクターカードの背景グラデーション */
.character-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--theme-color) 0%, transparent 30%);
  opacity: 0.1;
  z-index: 0;
}

.character-card::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--theme-color), var(--takopi-pink), var(--theme-color));
  border-radius: 30px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.character-card:hover::after {
  opacity: 1;
}

@keyframes card-slide-in {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.character-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

/* ホバー時のテキスト色変更 */
.character-card:hover .character-name {
  -webkit-text-fill-color: var(--bg-white);
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.character-card:hover .character-name::after {
  background: linear-gradient(90deg, var(--bg-white), transparent);
}

.character-card:hover .character-cast {
  color: var(--bg-white);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.character-card:hover .character-reading {
  color: var(--bg-white);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.character-card:hover .character-catchphrase {
  background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
  color: var(--bg-white);
  border: 2px solid var(--theme-color);
  box-shadow: 0 5px 20px var(--theme-color);
}

.character-card:hover .character-description {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  border-left-width: 8px;
}

.card-number {
  position: absolute;
  top: -20px;
  left: -20px;
  width: 80px;
  height: 80px;
  background: conic-gradient(from 0deg, var(--theme-color), var(--takopi-yellow), var(--theme-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 2.5rem;
  color: var(--bg-white);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 2;
  transform: rotate(-10deg);
  transition: all 0.3s;
}

.character-card:hover .card-number {
  transform: rotate(360deg) scale(1.2);
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.card-content {
  display: flex;
  padding: 40px;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.card-image {
  flex-shrink: 0;
  position: relative;
}

.card-image::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: radial-gradient(circle, var(--theme-color) 0%, transparent 70%);
  opacity: 0.3;
  border-radius: 50%;
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.1;
  }
}

.card-image img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 10px solid var(--theme-color);
  box-shadow: 0 0 40px rgba(0,0,0,0.2), 0 0 80px var(--theme-color);
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.character-card:hover .card-image img {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 0 60px rgba(0,0,0,0.3), 0 0 120px var(--theme-color);
}

.card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.character-name {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  background: linear-gradient(45deg, var(--theme-color), var(--takopi-dark-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.character-name::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--theme-color), transparent);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.character-reading {
  font-size: 1rem;
  color: var(--text-gray);
  margin: 0;
  font-style: italic;
  transition: all 0.3s ease;
}

.character-cast {
  font-size: 1.2rem;
  color: var(--theme-color);
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.character-cast::before {
  content: "🎤";
  font-size: 1.5rem;
}

.character-catchphrase {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--bg-white);
  background: linear-gradient(135deg, var(--theme-color) 0%, var(--takopi-pink) 100%);
  padding: 10px 25px;
  border-radius: 30px;
  display: inline-block;
  margin: 15px 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.character-catchphrase::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.character-description {
  margin-top: 20px;
  padding: 25px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
  border-radius: 20px;
  border-left: 5px solid var(--theme-color);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
  position: relative;
  transition: all 0.3s ease;
}

.character-description::before {
  content: "📝";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  opacity: 0.3;
}

.character-description p {
  line-height: 2;
  color: var(--text-dark);
  font-weight: 500;
}

/* 動画コンテナ */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 30px 0;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* セクション */
section {
  margin-bottom: 60px;
}

/* 段落 */
p {
  margin-bottom: 20px;
  line-height: 1.8;
}

/* リンク */
a {
  color: var(--takopi-pink);
  text-decoration: none;
  transition: all 0.3s;
}

a:hover {
  color: var(--takopi-dark-pink);
  text-decoration: underline;
}

/* フッター */
footer {
  background-color: var(--takopi-pink);
  color: var(--bg-white);
  padding: 40px 20px;
  text-align: center;
  margin-top: 60px;
}

footer a {
  color: var(--bg-white);
}

footer a:hover {
  opacity: 0.8;
}

.contact-info,
.usage-terms,
.copyright {
  margin-top: 20px;
}

/* レスポンシブデザイン */
@media screen and (max-width: 1024px) {
  /* タブレット用 */
  main {
    padding: 40px 20px;
  }

  .card-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .card-image img {
    width: 180px;
    height: 180px;
  }

  .character-name {
    font-size: 2rem;
  }
}

@media screen and (max-width: 768px) {
  /* スマホ用調整 */
  main {
    padding: 30px 15px 20px;
    margin: 10px;
    border-radius: 10px;
  }

  h1 {
    font-size: 1.6rem;
    text-shadow: 2px 2px 0 var(--takopi-yellow), 4px 4px 0 var(--takopi-light-pink);
    margin: 10px 0 40px;
    padding: 0 5px;
  }

  /* モバイルではタコアイコンを非表示 */
  h1::before,
  h1::after {
    display: none;
  }

  h2 {
    font-size: 1.3rem;
    padding: 8px 10px;
    margin: 30px -5px 15px;
  }

  h2::before,
  h2::after {
    font-size: 1rem;
  }

  h2::before {
    left: -3px;
  }

  h2::after {
    right: 10px;
    top: 5px;
  }

  h3 {
    font-size: 1.05rem;
    padding-left: 15px;
    margin-bottom: 20px;
  }

  h3::before {
    left: 0;
    width: 8px;
    height: 8px;
  }

  .table-of-contents {
    padding: 15px 10px;
    margin: 0 -5px 30px;
  }

  /* キャラクターグリッド */
  .character-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px 10px;
  }

  .character-button {
    padding: 10px 5px;
    border-width: 2px;
  }

  .character-button img {
    width: 60px;
    height: 60px;
    border-width: 2px;
    margin-bottom: 5px;
  }

  .character-button span {
    font-size: 0.75rem;
  }

  /* キャラクターカード */
  .character-card {
    margin: 0 -5px 20px;
    border-radius: 15px;
    border-width: 3px;
  }

  .card-number {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
    top: -12px;
    left: -12px;
  }

  .card-content {
    padding: 60px 15px 20px;
    gap: 20px;
  }

  .card-image::before {
    display: none;
  }

  .card-image img {
    width: 140px;
    height: 140px;
    border-width: 6px;
  }

  .character-name {
    font-size: 1.5rem;
  }

  .character-reading {
    font-size: 0.85rem;
  }

  .character-cast {
    font-size: 1rem;
  }

  .character-cast::before {
    font-size: 1.2rem;
  }

  .character-catchphrase {
    font-size: 1.1rem;
    padding: 6px 15px;
  }

  .character-description {
    margin-top: 15px;
    padding: 15px;
    font-size: 0.9rem;
  }

  .character-description::before {
    font-size: 1.5rem;
    top: 5px;
    right: 5px;
  }

  /* 動画コンテナ */
  .video-container {
    margin: 20px -5px;
  }

  /* フッター */
  footer {
    padding: 30px 10px;
    font-size: 0.85rem;
  }

  footer p {
    margin-bottom: 10px;
    line-height: 1.6;
  }
}

/* アニメーションの軽量化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* アクセシビリティ */
.sneak {
  /* 画像の遅延読み込み用クラス */
  opacity: 1;
  transition: opacity 0.3s;
}

/* プリント用スタイル */
@media print {
  body {
    background: none;
    color: #000;
  }

  header,
  footer,
  .table-of-contents,
  .video-container {
    display: none;
  }

  main {
    box-shadow: none;
    padding: 0;
  }

  h1, h2, h3 {
    color: #000;
    text-shadow: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .character-card {
    page-break-inside: avoid;
    border: 1px solid #000;
  }

  .card-number,
  .character-catchphrase::before,
  .character-description::before {
    display: none;
  }

  .character-name,
  .character-cast,
  .character-catchphrase {
    color: #000;
    background: none;
    -webkit-text-fill-color: #000;
  }
}
/* 相関図ページ専用スタイル */

/* 相関図メイン画像 */
.soukanzu-main {
  margin: 40px 0;
  position: relative;
  animation: soukanzu-fade-in 1s ease-out 0.5s forwards;
  opacity: 0;
}

.soukanzu-main img {
  border: 4px solid var(--takopi-pink);
  box-shadow: 0 10px 30px rgba(255,105,180,0.3);
  transition: all 0.3s;
}

.soukanzu-main:hover img {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(255,105,180,0.4);
}

@keyframes soukanzu-fade-in {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 凡例テーブル */
.legend-table {
  background: linear-gradient(135deg, var(--bg-light) 0%, rgba(255,215,0,0.1) 100%);
  border-radius: 20px;
  padding: 30px;
  margin: 30px 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.legend-table::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--takopi-yellow) 0%, transparent 70%);
  opacity: 0.3;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 25px;
  padding: 20px;
  background: var(--bg-white);
  border-radius: 15px;
  border-left: 5px solid var(--takopi-pink);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.legend-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,182,224,0.2), transparent);
  transition: left 0.6s;
}

.legend-item:hover::before {
  left: 100%;
}

.legend-item:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 20px rgba(255,105,180,0.2);
  border-left-color: var(--takopi-dark-pink);
}

.legend-item:nth-child(odd) {
  animation: legend-slide-left 0.8s ease-out forwards;
  opacity: 0;
}

.legend-item:nth-child(even) {
  animation: legend-slide-right 0.8s ease-out forwards;
  opacity: 0;
}

.legend-item:nth-child(1) { animation-delay: 0.1s; }
.legend-item:nth-child(2) { animation-delay: 0.2s; }
.legend-item:nth-child(3) { animation-delay: 0.3s; }
.legend-item:nth-child(4) { animation-delay: 0.4s; }
.legend-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes legend-slide-left {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes legend-slide-right {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.legend-image {
  flex-shrink: 0;
  width: 128px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(255,182,224,0.1) 100%);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.legend-item:hover .legend-image {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 5px 15px rgba(255,105,180,0.3);
}

.legend-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.legend-text {
  flex: 1;
  line-height: 1.8;
}

.legend-text strong {
  color: var(--takopi-dark-pink);
  font-size: 1.2rem;
  display: block;
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.legend-text strong::before {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--takopi-yellow);
  font-size: 1rem;
  animation: star-rotate 3s linear infinite;
}

@keyframes star-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .soukanzu-main {
    margin: 20px -15px;
  }

  .soukanzu-main img {
    border-width: 2px;
  }

  .legend-table {
    padding: 15px;
    margin: 20px -10px;
  }

  .legend-item {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
  }

  .legend-item:hover {
    transform: translateX(5px);
  }

  .legend-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 2/1;
  }

  .legend-text {
    text-align: center;
  }

  .legend-text strong {
    font-size: 1.1rem;
    padding-left: 20px;
  }

  .legend-text strong::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* 見どころセクションのh3スタイル追加 */
#midokoro h3 {
  color: var(--takopi-dark-pink);
  background: linear-gradient(90deg, rgba(255,182,224,0.3) 0%, transparent 100%);
  padding: 10px 20px;
  margin: 40px 0 20px;
  border-radius: 30px;
  display: inline-block;
  position: relative;
  font-size: 1.4rem;
}

#midokoro h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="8" fill="%23ff69b4"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.5;
}

/* アニメーション最適化 */
@media (prefers-reduced-motion: reduce) {
  .soukanzu-main,
  .legend-item {
    animation: none !important;
    opacity: 1 !important;
  }

  .legend-text strong::before {
    animation: none !important;
  }
}
