* {
  box-sizing: border-box;
}
/* 共通スタイル */
body {
  font-family: sans-serif;
  margin: 0;
  background: #f5f5f5;
  margin-bottom: 70px; /* ナビバーの分だけ余白を空ける */
}

/* 共通のセクションスタイル */
section {
  background: white;
  margin: 10px;
  padding: 16px;
  border-radius: 12px;
}

/* タイトル */
.header {
  text-align: center;
  background: #333;
  color: white;
  padding: 30px 10px;
}

.page-title {
  display: flex;
  text-align: left;
  margin-left: 15px;
}

/* お知らせタグ共通 */
.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  margin-left: 8px;
}

/* カテゴリ別色分け */
.tag-official, .official { background-color: #e53935; }
.tag-event, .event { background-color: #1e88e5; }
.tag-performance, .performance { background-color: #fb8c00; }
.tag-exhibition, .exhibition { background-color: #43a047; }
.tag-other { background-color: #757575; }

/* カード */
.card {
  border: 1px solid #ddd;
  padding: 10px;
  margin: 8px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border-radius: 10px;
}

/* ボタン */
.button {
  display: block;
  margin: 0 auto;
  background: #007bff;
  color: white;
  padding: 14px;
  text-align: center;
  border-radius: 10px;
  margin-top: 10px;
  text-decoration: none;
  border: none;
  width: 80%;
  cursor: pointer;
}

/* 選択ボタン（日付・ステージ） */
.choice-button-group {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.choice-button-group .choice-button {
  flex: 1;
  padding: 12px;
  text-align: center;
  background: #ddd;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s; /* 色が変わるのをスムーズにする */
}

.choice-button-group .choice-button.active {
  background: #007bff;
  color: white;
}

/* タイムテーブル */
.timetable-mini {
  border-left: 3px solid #007bff;
  padding-left: 10px;
}

/* タイムテーブルのレイアウト */
.timetable {
  position: relative; /* 全体の基準 */
  margin-top: 20px;
  background: white;
}

/* 時刻列とスケジュール列を分離せず、重ねるための設定 */
.time-column {
  width: 100%; /* 線を右端まで引くために100%にする */
  position: relative;
}

.time-row {
  display: flex;
  align-items: flex-start;
  height: 30px; /* JSの1コマ30pxと連動 */
}

.time-label {
  width: 60px; /* 時刻の幅 */
  font-size: 11px;
  color: #888;
  text-align: right;
  padding-right: 10px;
  line-height: 1;
  margin-top: -6px; /* 線と文字の高さを合わせる */
  background: white; /* 重なった時に文字が見えやすくする */
  z-index: 2;
}

/* 線の修正：細くして右端まで貫通 */
.line {
  flex: 1;
  border-bottom: 1px solid #eee; /* 2pxから1pxへ、色は薄く */
  margin-top: 0;
  z-index: 1;
}

/* スケジュールを表示するエリア：時刻列の上に被せる */
.schedule-column {
  position: absolute;
  top: 0;
  left: 60px; /* time-labelの幅に合わせる */
  right: 10px; /* 右端の余白 */
  bottom: 0;
  pointer-events: none; /* 下にある要素を邪魔しない */
}

/* イベントカード：線の上に浮かせる */
.event {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(76, 175, 80, 0.95); /* 少しだけ透かして重なりを綺麗に */
  color: white;
  padding: 6px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15); /* 浮遊感を出す */
  z-index: 10; /* 線よりも上に */
  overflow: hidden;
  pointer-events: auto; /* カード自体はクリック可能に */
}

.event-item {
  margin: 5px 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ex-card {
  display: block;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s;
  transform: translate3d(0, 0, 0); /* GPUアクセラレーションで滑らかに */
}

.ex-card img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.ex-body {
  padding: 8px;
  font-size: 12px;
}

/* ブログ */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.blog-card {
  display: flex;
  flex-direction: column; 
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 1. 投稿者名 */
.blog-author-top {
  padding: 8px 10px;
  font-weight: bold;
  font-size: 13px;
  color: #333;
}

/* 2. 画像 */
.blog-card img {
  width: 100%;
  height: 120px; 
  object-fit: cover;
}

/* 3. タイトルとタイムスタンプの箱 */
.blog-card-content {
  padding: 8px 10px;
}

.blog-title {
  font-weight: bold;
  font-size: 14px;
  margin: 0 0 5px 0;
  display: block;
}

/* 4. タイムスタンプ */
.blog-timestamp-bottom {
  font-size: 10px;
  color: #666;
  text-align: left; 
  display: block;
}

/* 5. ブログ本文のスタイル */
.blog-content {
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  margin: 10px 0;
  
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ついでに画像が大きくはみ出さないようにガード */
.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* 詳細ページの本文用（後ほど使用） */
.detail-content {
  white-space: pre-wrap;    /* 改行を反映させる魔法のプロパティ */
  word-wrap: break-word;    /* 長い英単語などが突き抜けないようにする */
  line-height: 1.8;         /* 読みやすい行間 */
  font-size: 15px;
  color: #333;
}

/* ついでに：トップページの画像が歪まないようにする */
.blog-img-wrapper {
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: #eee;
}

.blog-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画像の比率を守りつつ枠いっぱいに表示 */
}

/* --- お知らせ --- */
#news {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.news-item {
  background: white;
  padding: 15px 20px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}

.news-item:hover {
  transform: translateX(5px);
}

.news-item .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 0.85rem;
}

.news-item .date {
  color: #666;
}

.news-item .tag {
  padding: 2px 8px;
  border-radius: 4px;
  color: white;
  font-weight: bold;
  font-size: 0.75rem;
}

.news-item .title {
  font-size: 1.05rem;
  font-weight: bold;
  color: #333;
}

/* 共通コンテナ */
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  justify-content: center;
  max-width: 1200px;
  padding: 10px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
}
.blog-card, .exhibition-card{
  width: 100%;
  aspect-ratio: 3 / 4;
  min-width: 100px;
  max-width: 300px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover, .exhibition-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.blog-img-wrapper, .exhibition-img-wrapper {
  width: 100%;
  height: 45%;
  overflow: hidden;
  flex-shrink: 0;
  background: #eee;
}

.blog-img-wrapper img, .exhibition-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-content, .exhibition-card-content {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.blog-title, .exhibition-title {
  font-size: clamp(0.8rem, 3vw, 1.1rem);
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* フローティングナビゲーション */
.navbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 60px;
  background: #fff;
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.05);
}

.nav-item {
  text-align: center;
  font-size: 12px;
  text-decoration: none;
  color: black;
}

.nav-icon {
  font-size: 20px;
  display: block;
}

.news-item {
  padding: 12px;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
}

.news-item:hover { background: #f5f5f5; }

.meta, .blog-meta {
  font-size: 12px;
  color: #666;
}

.title {
  font-weight: bold;
  margin-top: 4px;
}