/* ===== style.css ===== */

/* ===== ベース ===== */
html,
body {
  margin: 0;
  padding: 0;
  text-align: left; /* 中央寄せ → 左寄せに戻す */
  scroll-behavior: smooth;
  overflow-x: hidden; /* 横スクロール無効 */
}

/* ===== フォント ===== */
.kaisei-opti-regular {
  font-family: "Kaisei Opti", serif;
  font-weight: 400;
}
.kiwi-maru-regular {
  font-family: "Kiwi Maru", serif;
  font-weight: 400;
}
.hina-mincho-regular {
  font-family: "Hina Mincho", serif;
  font-weight: 400;
  font-style: normal;
}
.sawarabi-gothic-regular {
  font-family: "Sawarabi Gothic", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* ===== 汎用リンク装飾（領域ごとの文字色を維持） ===== */
a {
  /* 通常・未訪問 */
  color: inherit; /* 親要素の文字色をそのまま継承 */
  text-decoration: underline; /* 下線あり */
}

a:visited {
  /* 訪問済み */
  text-decoration: underline; /* 下線だけ指定（色は継承したまま） */
}

a:hover,
a:focus {
  /* ホバーやフォーカス時 */
  text-decoration: none; /* 下線を外す */
}

/* ===== 言語選択ページ ===== */
.language-select main {
  display: flex;
  flex-direction: column;
  background: #c7dcd0;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
.lang-buttons {
  margin-top: 2rem;
}
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border: 2px solid #2e222f;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s;
  color: #2e222f;
}
.btn:hover {
  background: #2e222f;
  color: #c7dcd0;
}

/* ===== 目次 ===== */
#toc {
  position: sticky;
  top: 0;
  background: #c7dcd0;
  z-index: 10;
  border-bottom: 1px solid #c7dcd0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
}
#toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}
#toc a {
  color: #2e222f;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}
#toc a:hover {
  text-decoration: underline;
}

.lang-links {
  margin-left: auto;
  display: flex;
  gap: 1rem;
}

/* ===== 背景画像 ===== */
.section-image-wrapper,
.section-image-bottom {
  width: 100%;
  height: 200px;
  background-repeat: repeat-x;
  background-size: auto;
}
.section-image-wrapper {
  background-position: center top;
}
.section-image-bottom {
  background-position: center bottom;
}

.white-section .section-image-wrapper {
  background-image: url("https://kitty-pool.com/wp-content/uploads/2025/06/BgBlackToWhite.gif");
}
.dark-section .section-image-wrapper {
  background-image: url("https://kitty-pool.com/wp-content/uploads/2025/06/BgWhiteToBlack.gif");
}
.white-section .section-image-bottom {
  background-image: url("https://kitty-pool.com/wp-content/uploads/2025/06/BottomBG_WhiteToBlack.gif");
}
.dark-section .section-image-bottom {
  background-image: url("https://kitty-pool.com/wp-content/uploads/2025/06/BottomBG_BlackToWhite.gif");
}

/* 最初のセクションは背景画像非表示 */
#overview .section-image-wrapper,
#overview .section-image-bottom {
  display: none;
}

/* ===== セクション ===== */
.white-section,
.dark-section {
  width: 100%;
  padding: 0;
}
.white-section {
  background: #c7dcd0;
  color: #2e222f;
}
.dark-section {
  background: #2e222f;
  color: #c7dcd0;
}

.inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 8rem 1rem;
}

/* 追加・上書き */
.inner,
h2 {
  text-align: left;
}

h2:not(.main-title) {
  position: relative;
  margin-bottom: 2.5rem;
}
h2:not(.main-title)::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.6rem;
  width: 120%;
  height: 1px;
  background: currentColor;
}

/* 箇条書き */
.feature-list {
  padding-left: 1.2rem;
  margin: 1rem 0 2rem;
}
.feature-list li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
}

/* タイトル用に .inner を全幅解放 */
#overview .inner {
  max-width: none;
}

/* Arrow */
.arrow-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}
/* アイコンは常に 32×32 に固定 */
.arrow-container img {
  width: 32px !important;
  height: 32px !important;
}

/* ===== 見出し ===== */
h1,
h2 {
  margin: 0 0 1.5rem;
}
.white-section h2,
.dark-section h2 {
  font-size: 3.2rem;
}
h2 {
  margin-bottom: 0;
}

/* ===== table ===== */
.table_info {
  overflow: auto;
  width: 100%;
}
.table_info table {
  border-collapse: collapse;
  width: 100%;
  table-layout: auto;
  text-align: left;
}
.table_info th,
.table_info td {
  border: none;
  padding: 5px;
}

/* ===== シンプルなテーブル ===== */
.simple-table {
  border-collapse: collapse; /* 線を重ねず表示 */
}

.simple-table td,
.simple-table th {
  border: 1px solid #2e222f; /* 黒い1px枠 */
  padding: 16px; /* セルの余白 */
  background-image: url(https://kitty-pool.com/wp-content/uploads/2025/08/TableBG5.png);
}

/* ===== タイトル（くつひも物語） ===== */
.white-section .main-title,
.dark-section .main-title {
  font-size: 20vw;
  letter-spacing: -0.3em;
  line-height: 0.55;
  display: block;
  width: max-content;
  margin: 0 auto 3rem;
  white-space: nowrap;
  padding: 5rem 1rem;
  text-align: center;
}
.white-section .main-title span,
.dark-section .main-title span {
  display: inline-block;
  transform: translateY(calc(var(--offset) * 1px));
}

/* ===== ロゴ直下の中央揃え背景 ===== */
.section-image-center-ja {
  width: 2000px;
  height: 2000px;
  background: url("https://kitty-pool.com/wp-content/uploads/2025/06/bigweb_ja.png")
    center/contain no-repeat;
}
.section-image-center-en {
  width: 2000px;
  height: 2000px;
  background: url("https://kitty-pool.com/wp-content/uploads/2025/06/bigweb_en.png")
    center/contain no-repeat;
}
.section-image-center-zhCN {
  width: 2000px;
  height: 2000px;
  background: url("https://kitty-pool.com/wp-content/uploads/2025/06/bigweb_zhCN.png")
    center/contain no-repeat;
}

/* === ニュース用追加 === */
.news-section .inner {
  padding: 4rem 1rem;
}
.news-item + .news-item {
  margin-top: 1.5rem;
}

.news-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 1.1rem;
  outline: none;
  display: flex;
  align-items: center;
}
.news-item summary::-webkit-details-marker {
  display: none;
}
.news-item summary::before {
  content: "+";
  font-weight: 700;
  margin-right: 0.6rem;
  transition: 0.2s;
}
.news-item[open] summary::before {
  content: "-";
}
.news-item p {
  margin: 0.5rem 0 0 1.7rem;
  line-height: 1.7;
}

/* ===== モバイル共通（～768px） ===== */
@media (max-width: 768px) {
  /* 目次を縦並び＋折り返し */
  #toc {
    flex-direction: column;
    align-items: stretch; /* UL が全幅を使えるように */
    padding: 0.5rem 1rem;
  }
  #toc ul {
    flex-wrap: wrap;
    width: 100%; /* 折り返し幅を確保 */
    gap: 0.8rem 1.2rem;
    margin: 0 0 0.4rem;
  }
  .lang-links {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  /* 画像・動画をビューポート幅にフィット（矢印等の小アイコン除外） */
  iframe,
  img:not([width="32"]):not([width="64"]) {
    width: 100% !important;
    height: auto !important;
  }
  /* Steam ウィジェット */
  iframe[src*="steampowered"] {
    width: 100% !important;
  }

  /* Kickstarter ロゴを拡大 */
  #cf img[src*="Kickstarter-Logo"] {
    width: 80% !important;
    max-width: 480px;
  }

  /* 万一残る中央寄せを強制リセット */
  .inner,
  .inner * {
    text-align: left !important;
  }
}

/* ===== レビュー専用テーブル ===== */
.review-table {
  max-width: 1000px;          /* PCで最大px */
  width: 100%;               /* スマホでは全幅 */
  margin: 0 auto;            /* 中央寄せ */
  border-collapse: collapse;
  background: #fff;
  background-image: url(https://kitty-pool.com/wp-content/uploads/2025/08/TableBG11.png);
  line-height: 1.8;
  table-layout: fixed;       /* 横伸び防止 */
  word-wrap: break-word;
  overflow-wrap: break-word; /* 長い単語も折り返す */

    /* シャドウを右下方向へ */
  box-shadow: 6px 6px 12px rgba(46,34,47,1);
}

.review-table td {
  border: none;
  padding: 1.2em;
}

/* テーブル内の画像を枠内に収める */
.review-table img {
  max-width: 90%;   /* 枠を超えない */
  height: auto;      /* アスペクト比維持 */
  display: block;
  margin: 2em auto;
  border-radius: 12px;
}

.review-content {
  max-width: 800px;
  margin: 0 auto;   /* 中央寄せ */
}

/* 見出し h1〜h3：テーブル全幅にする */
.review-table h1,
.review-table h2,
.review-table h3 {
  font-family: "Sawarabi gothic", serif;
  font-weight: bold;
  border: 1px solid currentColor;
  padding: 1.5em 0em 0em 1em; /* 上 / 右 / 下 / 左 */
  margin: 3em 0 1em;
  display: block;
  width: 100%;
  box-sizing: border-box;     /* 枠も含めて幅100% */
}

.review-box {
  border: 1px solid currentColor; /* 枠線 */
  padding: 1.2em;
  margin: 2em 0;
  border-radius: 8px;            /* 角を丸めたいなら */
}

/* ===== レビュー専用調整 ===== */
#review .inner {
  max-width: none !important;
}

.review-table + .inner {
  padding: 5rem !important;
}
