@charset "utf-8";

/* ===== 全体の背景を薄いベージュに ===== */
body {
  margin: 0;
  font-family: "Zen Maru Gothic", "Hiragino Sans", Meiryo, sans-serif;
  background: var(--base-bg);
  color: var(--text-main);
  line-height: 1.8;
}

#header {
  padding: 36px;
  text-align: center;
  border-bottom: 5px solid #181839;
  background: #fff;
}
#header .logo { max-width: 100px; margin: 0 auto; }

#nav { text-align: center; background: #fff; border-bottom: 1px solid #ccc; }
#nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; justify-content: center; flex-wrap: wrap;
}
#nav li { margin: 12px; }
#nav a {
  color: #6a5636; text-decoration: none; font-weight: bold;
  padding: 6px 14px; border-radius: 20px; transition: background .3s;
}
.nav a:hover, .nav a.active { background: rgba(201,176,126,0.25); }

/* ===== 黒板 ===== */
.chalkboard{
  position: relative;
  background: linear-gradient(145deg, #2d5532, #1c3d22);
  border: 8px solid #cbbf92; border-radius: 18px;
  max-width: 980px; margin: 40px auto; padding: 20px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  min-height: 400px;
}
.chalk-copy{
  color: #fff; font-weight: bold; text-align: center; font-size: 1.2rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  font-family: "Schoolbell","Chalkduster","Comic Sans MS",cursive;
  margin-top: 20px;
}
/* 黒板テクスチャ */
.chalkboard::before{
  content:""; position:absolute; inset:0;
  background:url("img/chalk_texture.png"); opacity:.15; pointer-events:none;
}

/* ===== スライド ===== */
.slider{ position:relative; overflow:hidden; border-radius:12px; height:400px; }
@media (max-width:1024px){ .slider{ height:320px;} .chalkboard{ min-height:350px; } }
@media (max-width:768px) { .slider{ height:260px;} .chalkboard{ min-height:300px; } }
@media (max-width:480px) { .slider{ height:200px;} .chalkboard{ min-height:260px; } }

.slider .track{ display:flex; transition: transform .6s ease; }
.slider .slide{ flex:0 0 100%; }
.slider .slide img{ width:100%; display:block; border-radius:10px; }

/* ナビ */
.slider .nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:44px; height:44px; border:none; border-radius:50%;
  background:rgba(255,255,255,.2); color:#fff; font-size:24px; cursor:pointer;
}
.slider .nav:hover{ background:rgba(255,255,255,.4); }
.prev{ left:10px; } .next{ right:10px; }

/* ドット */
.dots{ display:flex; justify-content:center; gap:8px; margin-top:10px; }
.dot{ width:10px; height:10px; border-radius:50%; background:#ddd; border:none; cursor:pointer; }
.dot.active{ background:#0ea5e9; }

/* ===== 黒板内：イラスト列 ===== */
.chalk-characters{
  position: absolute;
  left: 16px; right: 16px;
  bottom: -18px;             /* 少し板からはみ出して“座ってる風” */
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;      /* クリックを邪魔しない */
  z-index: 3;
}
.chara{
  width: 110px;
  max-width: 16vw;
  transform: translateY(24px) scale(.8);
  opacity: 0;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.25));
}

/* ぴょこん！と飛び出す */
@keyframes popIn {
  0%   { opacity:0; transform: translateY(24px) scale(.8); }
  60%  { opacity:1; transform: translateY(-8px) scale(1.05); }
  100% { opacity:1; transform: translateY(0)    scale(1); }
}
.pop-in{ animation: popIn .8s ease-out forwards; }
.chara:nth-child(1){ animation-delay:.05s; }
.chara:nth-child(2){ animation-delay:.18s; }
.chara:nth-child(3){ animation-delay:.31s; }
.chara:nth-child(4){ animation-delay:.44s; }
.chara:nth-child(5){ animation-delay:.57s; }
.chara:nth-child(6){ animation-delay:.70s; }
.chara:nth-child(7){ animation-delay:.83s; }

/* ===== メニュー ===== */
.menu{
  display:flex; flex-wrap:wrap; justify-content:center; gap:20px;
  margin:60px auto 40px; max-width:1024px;
}
.item{ background:#fff; padding:10px; border-radius:10px; box-shadow:0 4px 10px rgba(0,0,0,.1); }
.item img{ width:300px; border-radius:8px; }
.item a{ text-decoration:none; color:#222; font-weight:bold; }
.item a:hover{ color:#ff6600; }

/* ===== フッター ===== */
#footer{
  text-align:center; padding:30px; background:#fff; border-top:1px solid #ccc; color:#333;
}

/* ---- 触ると動く用の補助 ---- */
.chalk-characters { pointer-events: none; }  /* 親は拾わない */
.chara{
  pointer-events: auto;     /* 画像自体は拾う */
  cursor: pointer;
}

/* ホバーで“ゆらゆら” */
@keyframes wobble{
  0%   { transform: translateY(0) scale(1) rotate(0); }
  25%  { transform: translateY(-3px) rotate(-2deg) scale(1.02); }
  50%  { transform: translateY(0) rotate(0) scale(1); }
  75%  { transform: translateY(-2px) rotate(1.5deg) scale(1.01); }
  100% { transform: translateY(0) rotate(0) scale(1); }
}
@media (hover:hover){
  .chara:hover { animation: wobble .9s ease both; }
}

/* クリック/タップで“ぷるん” */
@keyframes boing{
  0%   { transform: scale(1); }
  20%  { transform: scale(1.12,.90); }
  40%  { transform: scale(.95,1.06); }
  60%  { transform: scale(1.04,.98); }
  100% { transform: scale(1); }
}
.boing { animation: boing .55s cubic-bezier(.2,.7,.3,1) both; }

