/* =========================
   EVENT グリッド
========================= */
.kp-event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* =========================
   EVENT カード本体
========================= */
.kp-event-card {
  display: block;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  color: #222;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.kp-event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
}

/* =========================
   サムネ（16:9 / 中心トリム）
========================= */
.kp-event-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #eef4ff, #f7fbff);
}

.kp-event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* ★中心から16:9にトリム */
  object-position: center;
  display: block;
}

/* =========================
   出演者（左上）
========================= */
.kp-event-actor {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0,0,0,.55);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  z-index: 3;
  pointer-events: none;
}

/* 左上バッジ：アイコン枠 */
.kp-event-actor-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 22px;
}

.kp-event-actor-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kp-event-actor-name {
  white-space: nowrap;
  font-weight: 600;
}

/* img が無いときは枠ごと消す（PHP触らずCSSで制御） */
.kp-event-actor-icon:empty {
  display: none;
}

/* =========================
   日付バッジ（右上）
========================= */
.kp-event-date {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  text-align: center;
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  background: #2ecc71; /* 通常：緑 */
  z-index: 3;
  min-width: 56px;
}

/* バッジ内の行 */
.kp-event-date .kp-md { font-size: 14px; opacity:.98; display:block; }
.kp-event-date .kp-w  { font-size: 11px; opacity:.95; display:block; margin-top:2px; }
.kp-event-date .kp-c  { display:block; margin-top:3px; font-size:12px; font-weight:700; }

/* =========================
   状態カラー（指定反映）
========================= */
/* 当日：赤 */
.kp-event-card.is-today .kp-event-date {
  background: #e53935;
}

/* 前日：オレンジ */
.kp-event-card.is-yesterday .kp-event-date {
  background: #ff8f00;
}

/* 過去 */
.kp-event-card.is-past {
  opacity: .45;
  filter: grayscale(100%);
}

.kp-event-card.is-past:hover {
  opacity: .7;
  filter: grayscale(60%);
}

/* =========================
   本文
========================= */
.kp-event-body {
  padding: 2px 4px;
}

/* タイトル行：左に投稿者アイコン */
.kp-event-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}

.kp-event-title-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 22px;
}

.kp-event-title-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* img が無いときは枠ごと消す */
.kp-event-title-icon:empty {
  display: none;
}

.kp-event-text {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
