/* =========================================================================
 * top-v2.css — TOPページ 新レイアウト（DAY96）
 *
 * 方針: 既存 top.css は一切改変しない。新ブロックのCSSだけをここに追記する。
 * 停止: functions.php の 'cll-top-v2-style' の enqueue ブロックをコメントアウト
 * 依存: なし（CSS変数はすべてフォールバック付き）
 *
 * 目次
 *   [1] カレンダー  #cll-calendar
 * ====================================================================== */

/* ---------------------------------------------------------------------
 * [1] カレンダー  #cll-calendar
 *     出力元: template-parts/top/calendar.php（WordPress標準 get_calendar()）
 *     投稿がある日だけ <a> になる。0件の日はただの数字。
 * ------------------------------------------------------------------ */
#cll-calendar {
  margin: 24px auto 32px;
  width: calc(100% - 24px);
  max-width: 720px;
  padding: 14px;
  background: var(--bg-card, #141414);
  border: 1px solid var(--border, #1e1e1e);
  border-radius: var(--radius-md, 8px);
  box-sizing: border-box;
}

#cll-calendar table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-secondary, #999);
  font-size: 13px;
}

#cll-calendar caption {
  padding: 4px 0 12px;
  color: var(--text-primary, #f0f0f0);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

#cll-calendar th {
  padding: 8px 2px;
  border-bottom: 1px solid var(--border-hover, #333);
  color: var(--text-muted, #555);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

/* hello-elementor の theme.css が top-v2.css より後に読まれるため、
   ID を付けた詳細度で table 系の既定スタイルを打ち消す。 */
#cll-calendar table,
#cll-calendar thead,
#cll-calendar tbody,
#cll-calendar tr,
#cll-calendar th,
#cll-calendar td {
  background: transparent;
  border: 0;
}

#cll-calendar th {
  border-bottom: 1px solid var(--border-hover, #333);
}

#cll-calendar td {
  padding: 9px 2px;
  text-align: center;
}

/* 投稿がある日だけ <a> になる */
#cll-calendar td a {
  display: block;
  border-radius: var(--radius-sm, 4px);
  color: var(--gold, #f5c518);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition, 0.18s ease), color var(--transition, 0.18s ease);
}

#cll-calendar td a:hover {
  background: var(--bg-hover, #1c1c1c);
  color: var(--accent-hover, #ff2020);
}

/* 今日 */
#cll-calendar td#today {
  background: var(--bg-hover, #1c1c1c);
  border-radius: var(--radius-sm, 4px);
  color: var(--text-primary, #f0f0f0);
  font-weight: 700;
}

/* 前月・翌月ナビ */
#cll-calendar .wp-calendar-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border, #1e1e1e);
  font-size: 12px;
}

#cll-calendar .wp-calendar-nav a {
  color: var(--text-secondary, #999);
  text-decoration: none;
}

#cll-calendar .wp-calendar-nav a:hover {
  color: var(--gold, #f5c518);
}

@media (min-width: 768px) {
  #cll-calendar {
    margin: 24px auto 32px;
    width: calc(100% - 40px);
    padding: 18px;
  }
  #cll-calendar table { font-size: 14px; }
}

/* ---------------------------------------------------------------------
 * [2] サムネグリッド  #popular-grid.grid-2col
 *     出力元: template-parts/front-popular-ranking.php（6件）
 *
 *     top.css の既存定義は SP 2列 / PC(768px〜) 3列。
 *     モックアップは SP 1列 / PC 2列なので、ここで上書きする。
 *     top.css は inc/top-styles.php が priority 15 で <link> 出力しており
 *     読み込み順が後になりうるため、ID を足した詳細度(1,1,0)で確実に勝たせる。
 *     !important は使わない（後段の調整余地を残すため）。
 *     ブレークポイントは top.css と同じ 768px に揃える。
 * ------------------------------------------------------------------ */
#popular-grid.grid-2col {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  #popular-grid.grid-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
