/* イベント(季節・テーマごとのゲームのまとめ) */
/* イベントタブでは、ジャンル・並び順などの絞り込みを隠す */
body[data-view="events"] .tag-filter,
body[data-view="events"] .toolbar-right { display: none; }

.event-list { display: flex; flex-direction: column; gap: 14px; }
.event-list[hidden] { display: none; }

.event-block {
  padding: 10px 12px 12px;
  background: var(--screen);
  border: 2px solid var(--cab-edge);
  border-radius: 12px;
}
.event-block.is-active {
  border-color: var(--neon-pink);
  box-shadow: 0 0 14px rgba(255, 62, 165, 0.35);
}
.event-block.is-draft { border-style: dashed; opacity: 0.85; }

.ev-head { display: flex; align-items: center; gap: 10px; }
.ev-emoji { font-size: 2rem; line-height: 1; }
.ev-titles { flex: 1 1 auto; min-width: 0; }
.ev-title { margin: 0; font-size: 1.15rem; line-height: 1.3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-period { margin: 2px 0 0; font-size: 0.76rem; color: var(--text-muted); }
.ev-badge {
  padding: 1px 9px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: var(--neon-pink);
  border-radius: 999px;
}
.ev-desc { margin: 8px 0 10px; font-size: 0.86rem; line-height: 1.6; color: var(--text); }
.ev-none { margin: 10px 0 0; font-size: 0.85rem; color: var(--text-muted); }
.ev-grid { margin-top: 8px; }
.ev-desc + .ev-grid { margin-top: 0; }

/* イベント限定のゲーム(リンクのタイル) */
a.game-card.tile.is-event-custom { color: inherit; text-decoration: none; }
.tile[data-genre="イベント限定"] { --g: var(--neon-pink); }
.tile-chip.event { color: #fff; background: var(--neon-pink); }
.ev-custom-desc {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- 管理者の編集画面 ---- */
.ev-dialog { width: min(680px, 100%); }
.ev-form { display: flex; flex-direction: column; gap: 10px; }
.ev-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ev-grow { flex: 1 1 200px; min-width: 0; }
.ev-emoji-in { flex: 0 0 90px; }
.ev-period-row { align-items: center; }
.ev-period-row .ad-label { flex: 1 1 100%; }
.ev-period-row select.ad-input { width: auto; flex: 0 0 auto; padding: 7px 8px; }
.ev-items, .ev-hits { margin: 0; padding: 0; list-style: none; }
.ev-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  margin-bottom: 4px;
  font-size: 0.88rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.ev-item-empty { color: var(--text-muted); justify-content: center; }
.ev-item-name { min-width: 0; overflow-wrap: anywhere; }
.ev-item-btns { display: flex; flex: 0 0 auto; gap: 4px; }
.ev-hit {
  width: 100%;
  padding: 7px 10px;
  text-align: left;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.ev-hit:hover { border-color: var(--neon-pink); }
.ev-hit small { color: var(--text-muted); }
.ev-hits li { margin-top: 3px; }
.ev-hit-none { font-size: 0.8rem; color: var(--text-muted); }
.ev-custom { padding: 8px 10px; border: 1px dashed var(--border); border-radius: 8px; }
.ev-custom summary { cursor: pointer; font-size: 0.86rem; font-weight: 700; }
.ev-custom[open] { display: flex; flex-direction: column; gap: 8px; }

/* ---- スマホ: タブが4つになったので、1行に収める(はみ出す場合は横にスクロール) ---- */
@media (max-width: 600px) {
  .view-tabs { flex: 1 1 100%; min-width: 0; gap: 3px; overflow-x: auto; scrollbar-width: none; }
  .view-tabs::-webkit-scrollbar { display: none; }
  .view-tab { flex: 1 0 auto; padding: 4px 4px; font-size: 0.68rem; white-space: nowrap; }
  .view-tab b { margin-left: 2px; padding: 0 4px; font-size: 0.62rem; }
  .ev-emoji { font-size: 1.6rem; }
  .ev-title { font-size: 1.02rem; }
  .event-block { padding: 8px 8px 10px; }
}
