@charset "utf-8";

      @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap');

/* ====== 基本配色 ====== */
:root{
  --bg: #c6f1e0;       /* 背景 */
  --line: #373737;     /* 罫線 */
  --btn: #f5b05b;      /* ボタン系アクセント（今回は未使用でも保持） */
}

/* フォント共通設定（全ページのベース） */
:root {
  --font-sans: "Zen Kaku Gothic New", system-ui, -apple-system, "Segoe UI", Roboto,
               "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic",
               Meiryo, sans-serif;
}


html {
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* ====== ヘッダー ====== */
.site-header {
  position: sticky; 
   margin: 0;
  top: 0;
  display: flex;
  justify-content: center;  /* 中央揃えのベース */
  align-items: center;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 2px solid var(--line);
  z-index: 1000;
}

/* 「たらばがに」を中央固定 */
.site-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: .05em;
}

/* メニューを右端に */
.header-nav {
  margin-left: auto;
  display: flex;
  gap: 16px;
}
.header-nav a {
  font-weight: 700; 
  text-decoration: none; 
  color: var(--line);
  padding: 6px 16px; 
  border: 2px solid var(--line); 
  border-radius: 999px;
  background: #fff;
}
.header-nav a:hover {
  background: var(--btn); 
  color: #fff;
}

/* 後から追加されるCPリンクの基本スタイル */
.header-nav .cp-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--line);
  padding: 6px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: background 0.2s ease;
}

.header-nav .cp-link:hover {
  background: var(--btn);
  color: #fff;
}

/* ====== サイドバー ====== */
.sidebar{
  position: fixed; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
  z-index: 2000;
}
.sidebar-left{ left: 25px; }
.sidebar-right{ right: 25px; }

.sidebar-left img{
  width: 45px; height: 45px; border-radius: 50%;
  border: 2px solid var(--line); background:#fff;
  display: block;

}

/* 右側 黒縁TARABAGANI!!!!（縦） */
.right-banner {
  writing-mode: vertical-rl;
  font-weight: 900;
  font-size: 35px;           /* 少し大きく */
  color: #fff;
  -webkit-text-stroke: 0.3px #000; /* 枠を細くする */
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000,
               1px -1px 0 #000, -1px -1px 0 #000;
  letter-spacing: 20px;       /* 文字の間隔を広げる */
  padding: 12px 8px;         /* 上下左右に余裕を追加 */
  user-select: none;
}

.intro {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%); /* ← 中央に補正 */
  width: 400px;
  height: 100px;
  border: 2px solid #666;
  border-radius: 330px;
  color: #555;
  font-size: 0.8rem;
  font-weight: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ==== キャラステージ ==== */
.cp-stage {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: visible;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding-top: 10px;
  z-index: 50;
}

/* ==== キャラ常時ゆらゆら ==== */
@keyframes sway {
  0%   { transform: translateY(0) rotate(0deg); }
  25%  { transform: translateY(-4px) rotate(-1deg); }
  50%  { transform: translateY(0) rotate(0deg); }
  75%  { transform: translateY(4px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.cp-char.dragging {
  animation: none; /* ドラッグ中は停止 */
}

/* ==== キャラ ==== */
.cp-char {
  width: 200px;
  cursor: grab;
  user-select: none;
  transition: transform 0.2s ease;
  z-index: 100;
   animation: sway 3s ease-in-out infinite; /* ← ゆらゆら追加 */
   animation-delay: var(--delay, 0s);
}
.cp-char:active {
  transform: scale(1.05);
}

/* ==== 2行×2組（スロット＋カード）のレイアウト ==== */
#cp-area {
  display: grid;
  grid-template-columns: repeat(2, auto); /* 2組／1行 */
  grid-template-rows: repeat(2, auto);    /* 2行 */
  gap: 40px 150px; /* 行と列の間隔（上段・左右） */
  justify-content: center;
  align-items: start;
  padding: 40px 0;
}

/* 各組（スロット＋カード） */
.cp-block {
  display: grid;
  grid-template-columns: 180px 260px; /* slot幅 / card幅 */
  gap: 20px;
  align-items: center;
}

/* スロット本体 */
.cp-slot {
  width: 180px;
  height: 240px;
  border: 2px solid #666;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 2em;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
}

.cp-slot.correct {
  border-color: #ff4444;
  color: #ff4444;
  box-shadow: 0 0 10px #ff4444;
}

/* ==== カード（スロットの右隣り） ==== */
.cp-block .cp-card {
  display: none;
  width: 350px;
  max-height: 260px;
  min-height: 200px;
  border: 2px solid var(--border, #000);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: #111;
  box-shadow: 5px 5px 0  var(--bs, #000); 
  animation: popIn 0.4s ease forwards;
   background:
    /* 横線 */
    repeating-linear-gradient(
      0deg,
      var(--grid-color, rgba(0,0,0,0.1)) 0px,
      var(--grid-color, rgba(0,0,0,0.1)) 1px,
      transparent 1px,
      transparent 20px
    ),
    /* 縦線 */
    repeating-linear-gradient(
      90deg,
      var(--grid-color, rgba(0,0,0,0.1)) 0px,
      var(--grid-color, rgba(0,0,0,0.1)) 1px,
      transparent 1px,
      transparent 20px
    );
  background-color: transparent; /* 背景色なし */
  animation: popIn 0.4s ease forwards;
}

.cp-card {
  display: none;
  opacity: 0;
  transition: 0.4s ease;
}

.cp-card.show {
  display: block;
}

/* ====== CPごとのカラーデザイン ====== */

/* 💗 にいたく（1-2） → ピンク系 */
#cp1-2 {
  --border: #ffd500;
  --bs: #ffff1a;
  --grid-color: rgba(255, 230, 102, 0.35);
  --mc: rgba(92,92,230,0.9);

}

/* 💛 だいゆみ（3-4） → イエロー系 */
#cp3-4 {
  --border: #b3b3b3;
  --bs: #e6cfda;
    --grid-color: rgba(179, 179, 179, 0.35);
    --mc: rgba(255,153,187,0.9);
}

/* 💚 ばむかず（5-6） → グリーン系 */
#cp5-6 {
  --border: #ff7733;
  --bs: #ffb366;
    --grid-color: rgba(255, 179, 102, 0.35);
    --mc: rgba(179,48,36,0.9);
}

/* 💙 らくがい（7-8） → ブルー系 */
#cp7-8 {
  --border: #14cc52;
  --bs: #99ffee;
  --mc: rgba(255,51,85,0.9);
   --grid-color: rgba(64, 255, 26, 0.35);
   
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}





/* タイトル */
.cp-card h3 {
  position: relative;
  display: inline-block;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: #1a1a1a;
}

/* 💡下線（強調ライン） */
.cp-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 100%;
  height: 2px;
  background: var(--mc, rgba(0,0,0,0.1));;
  border-radius: 20px;
  opacity: 0.5;
}

/* 説明文 */
.cp-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 12px 0;
  text-align: left;
  display: inline-block;
  color: #333;
}

/* 横並びリンク */
.cp-card ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 15 0;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.cp-card li a {
  color: #000;
  text-decoration: none;
  padding: 8px 14px;
  border: 2px solid var(--border, #000);
  border-radius: 20px;
  background: #fff;
  transition: 0.25s;
  font-weight: 500;
}
.cp-card li a:hover {
  background: var(--mc, 0,0,0,0);
  border: 2px solid var(--mc, 0,0,0,0);
  color: #fff;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}



/* フッター */
.cp-footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 9999;
}

.cp-footer a {
  pointer-events: auto;
}

.cp-footer img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cp-footer a:hover img {
  animation: bounce-hover 0.5s ease;
}

@keyframes bounce-hover {
  0%   { transform: scale(1) translateY(0); }
  30%  { transform: scale(1.1) translateY(-8px); }
  60%  { transform: scale(0.95) translateY(4px); }
  100% { transform: scale(1) translateY(0); }
}


/* 表示段階に応じて少しずつ出す（10段階） */
.cp-footer.reveal-1 a:nth-child(-n+1) img,
.cp-footer.reveal-2 a:nth-child(-n+2) img,
.cp-footer.reveal-3 a:nth-child(-n+3) img,
.cp-footer.reveal-4 a:nth-child(-n+4) img {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

@keyframes bounce {
  0%   { transform: scale(1) translateY(0); }
  30%  { transform: scale(1.1) translateY(-10px); }
  60%  { transform: scale(0.95) translateY(5px); }
  100% { transform: scale(1) translateY(0); }
}

.cp-footer img.bounce {
  animation: bounce 0.5s ease;
}

@keyframes bounce-high {
  0%   { transform: scale(1) translateY(0); }
  30%  { transform: scale(1.2) translateY(-40px); }
  60%  { transform: scale(0.9) translateY(20px); }
  100% { transform: scale(1) translateY(0); }
}

.cp-footer img.bounce-high {
  animation: bounce-high 0.8s ease;
}
@keyframes heart-wiggle {
  0%   { transform: scale(1) rotate(0deg); }
  25%  { transform: scale(1.05) rotate(2deg); }
  50%  { transform: scale(1) rotate(0deg); }
  75%  { transform: scale(1.05) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.floating-heart:hover {
  animation: heart-wiggle 0.4s ease-in-out;
  cursor: pointer; filter: hue-rotate(5deg) saturate(5);
}

@keyframes clicked-wiggle {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.15); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.floating-heart.clicked-wiggle {
  animation: clicked-wiggle 0.35s ease;
}

.floating-heart {
  position: fixed;
  width: 30px;
  z-index: 10;
  
}