/* タコピーの原罪 - キャラクター一覧ページ 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;
}

/* リセット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;
}

/* タブレット用 */
@media screen and (max-width: 1024px) {
  main {
    padding: 40px 20px;
  }
}

/* タイトル */
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;
  -webkit-animation: title-pop 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: title-pop 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: visible;
}

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

@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;
  -webkit-animation: tako-appear 0.6s ease-out 0.8s forwards, tako-gentle-float 4s ease-in-out 1.4s infinite;
  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;
  -webkit-animation: tako-appear 0.6s ease-out 1s forwards, tako-gentle-float 4s ease-in-out 1.6s infinite reverse;
  animation: tako-appear 0.6s ease-out 1s forwards, tako-gentle-float 4s ease-in-out 1.6s infinite reverse;
}

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

h1::before {
  top: -20px;
  left: -40px;
  -webkit-animation: tako-appear 0.6s ease-out 0.8s forwards, tako-gentle-float 4s ease-in-out 1.4s infinite;
  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;
  -webkit-animation: tako-appear 0.6s ease-out 1s forwards, tako-gentle-float 4s ease-in-out 1.6s infinite reverse;
  animation: tako-appear 0.6s ease-out 1s forwards, tako-gentle-float 4s ease-in-out 1.6s infinite reverse;
}

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

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

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

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);
}

h2::after {
  content: "★";
  color: var(--takopi-yellow);
  font-size: 1.2rem;
  position: absolute;
  right: 20px;
  top: 10px;
  transform: 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;
  opacity: 0;
  -webkit-animation: gentle-fade-in 0.8s ease-out 0.5s forwards;
  animation: gentle-fade-in 0.8s ease-out 0.5s forwards;
}

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  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;
}

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

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

/* 記事 */
article {
  overflow: visible;
  padding: 0 5px;
}

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

.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);
}

/* あらすじセクションの改善 */
#story-outline {
  position: relative;
  padding: 40px;
  background: linear-gradient(135deg, rgba(255,182,224,0.2) 0%, rgba(255,215,0,0.1) 100%);
  border-radius: 20px;
  margin: 40px 0;
}

#story-outline::before {
  content: "★";
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 3rem;
  color: var(--takopi-yellow);
  transform: rotate(-15deg);
}

#story-outline::after {
  content: "★";
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 2.5rem;
  color: var(--takopi-yellow);
  transform: rotate(25deg);
}

#story-outline p {
  margin-bottom: 25px;
  line-height: 2;
  font-size: 1.05rem;
  text-indent: 1em;
}

/* 重要な段落を強調 */
#story-outline p:has(br) {
  padding: 20px;
  background-color: rgba(255,255,255,0.8);
  border-left: 5px solid var(--takopi-pink);
  border-radius: 10px;
  margin: 30px 0;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* キャラクター紹介部分の強調 */
.character-intro {
  text-align: center;
  margin: 40px 0;
  padding: 30px;
  background: radial-gradient(circle at center, rgba(255,215,0,0.2) 0%, transparent 70%);
  border-radius: 20px;
  position: relative;
}

.character-intro::before,
.character-intro::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="%23ffb6e0" opacity="0.5" 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;
}

.character-intro::before {
  top: 10px;
  left: 10px;
  -webkit-transform: rotate(-10deg);
  transform: rotate(-10deg);
  -webkit-animation: tako-wobble 6s ease-in-out infinite;
  animation: tako-wobble 6s ease-in-out infinite;
}

.character-intro::after {
  bottom: 10px;
  right: 10px;
  -webkit-transform: rotate(10deg) scaleX(-1);
  transform: rotate(10deg) scaleX(-1);
  -webkit-animation: tako-wobble-reverse 6s ease-in-out infinite;
  animation: tako-wobble-reverse 6s ease-in-out infinite;
}

.character-intro img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 8px solid var(--takopi-pink);
  box-shadow: 0 0 30px rgba(255,105,180,0.5), 0 0 60px rgba(255,215,0,0.3);
  transition: all 0.3s;
}

.character-intro img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255,105,180,0.7), 0 0 80px rgba(255,215,0,0.5);
}

/* キャラクター名の説明文を装飾 */
#story-outline p:has(+ .character-intro) {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--takopi-dark-pink);
  text-align: center;
  margin-bottom: 0;
}

/* ループの説明部分を強調 */
#story-outline > p:first-of-type {
  font-size: 1.15rem;
  padding: 25px;
  background: linear-gradient(to right, rgba(255,215,0,0.3) 0%, rgba(255,182,224,0.3) 100%);
  border-radius: 15px;
  border: 2px dashed var(--takopi-pink);
  margin-bottom: 40px;
}

/* 対話セクション */
.dialog-section {
  margin: 40px 0;
  padding: 30px 20px;
  background: linear-gradient(135deg, rgba(255,105,180,0.1) 0%, rgba(255,215,0,0.1) 100%);
  border-radius: 20px;
  border: 2px solid var(--takopi-light-pink);
}

.character-message {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
}

/* 偶数番目のメッセージは右寄せ */
.character-message:nth-child(even) {
  flex-direction: row-reverse;
}

.character-message img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 4px solid var(--takopi-yellow);
  box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

.character-message p {
  background-color: var(--bg-white);
  padding: 20px 25px;
  border-radius: 25px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  flex: 1;
  max-width: 70%;
  font-weight: 700;
  border: 3px solid var(--takopi-pink);
}

/* 左側の吹き出しの矢印 */
.character-message:nth-child(odd) p::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 15px 15px 0;
  border-color: transparent var(--takopi-pink) transparent transparent;
}

.character-message:nth-child(odd) p::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 12px 12px 0;
  border-color: transparent var(--bg-white) transparent transparent;
}

/* 右側の吹き出しの矢印 */
.character-message:nth-child(even) p::before {
  content: "";
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 0 15px 15px;
  border-color: transparent transparent transparent var(--takopi-pink);
}

.character-message:nth-child(even) p::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 12px;
  border-color: transparent transparent transparent var(--bg-white);
}

/* テーブル */
.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 30px 0;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  border-radius: 15px;
  overflow: hidden;
  border: 3px solid var(--takopi-pink);
}

.info-table th {
  background: linear-gradient(135deg, var(--takopi-pink) 0%, var(--takopi-dark-pink) 100%);
  color: var(--bg-white);
  padding: 20px;
  text-align: left;
  font-weight: 900;
  width: 30%;
  font-size: 1.1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  letter-spacing: 0.05em;
}

.info-table td {
  background-color: var(--bg-white);
  padding: 20px;
  border-bottom: 3px solid var(--takopi-light-pink);
  font-weight: 700;
  position: relative;
}

.info-table tr:nth-child(even) td {
  background-color: #fff9e6;
}

.info-table tr:last-child td {
  border-bottom: none;
}

.info-table tr:hover td {
  background-color: var(--bg-light);
  transition: background-color 0.3s;
}

/* 受賞歴の行を特別にスタイリング */
.info-table tr:last-child th {
  background: linear-gradient(135deg, var(--takopi-yellow) 0%, var(--takopi-pink) 100%);
}

.info-table tr:last-child td {
  background: linear-gradient(to right, #fffadc 0%, var(--bg-white) 100%);
  font-size: 0.95rem;
  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;
}

.related-link,
.official-link {
  background-color: var(--bg-light);
  border-left: 5px solid var(--takopi-yellow);
  padding: 20px;
  margin: 30px 0;
  border-radius: 5px;
}

.related-link a,
.official-link a {
  color: var(--takopi-pink);
  font-weight: 700;
  display: inline-block;
  margin-top: 5px;
}

/* フッター */
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: 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;
  }

  h1::before,
  h1::after {
    width: 35px;
    height: 35px;
    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;
  }

  .dialog-section {
    padding: 15px 8px;
    margin: 30px -5px;
  }

  .character-message {
    flex-direction: column !important;
    text-align: center;
    gap: 10px;
  }

  .character-message img {
    width: 60px;
    height: 60px;
  }

  .character-message p {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .info-table th {
    width: 40%;
    padding: 10px;
    font-size: 0.9rem;
  }

  .info-table td {
    padding: 10px;
    font-size: 0.9rem;
  }

  /* フッターのモバイル調整 */
  footer {
    padding: 30px 10px;
    font-size: 0.85rem;
  }

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

/* アニメーション */
@keyframes tako-gentle-float {
  0%, 100% {
    -webkit-transform: translateY(0) rotate(-5deg);
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    -webkit-transform: translateY(-8px) rotate(5deg);
    transform: translateY(-8px) rotate(5deg);
  }
}

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

@keyframes float {
  0%, 100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
  50% {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
  }
}

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

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

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

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

@keyframes tako-wobble {
  0%, 100% {
    -webkit-transform: rotate(-10deg) scale(1);
    transform: rotate(-10deg) scale(1);
  }
  50% {
    -webkit-transform: rotate(10deg) scale(1.05);
    transform: rotate(10deg) scale(1.05);
  }
}

@keyframes tako-wobble-reverse {
  0%, 100% {
    -webkit-transform: rotate(10deg) scaleX(-1) scale(1);
    transform: rotate(10deg) scaleX(-1) scale(1);
  }
  50% {
    -webkit-transform: rotate(-10deg) scaleX(-1) scale(1.05);
    transform: rotate(-10deg) scaleX(-1) scale(1.05);
  }
}

h2::before,
h2::after {
  animation: star-twinkle 2s infinite;
}

h2::after {
  animation-delay: 1s;
}

#story-outline::before,
#story-outline::after {
  animation: float 3s infinite ease-in-out;
}

#story-outline::after {
  animation-delay: 1.5s;
  /* 背景パターンのサイズ調整 */
  body {
    background-size:
      50px 50px, 50px 50px, 50px 50px, 50px 50px, 50px 50px,
      50px 50px;
  }

  /* アニメーションの軽量化 */
  @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 {
    display: none;
  }

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

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

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