/* CTF 订阅提醒平台 前台样式：分区标题 + 紧凑卡片（v2.0.3）+ 引导区/筛选/提醒时间表（v2.4.0） */
.ctf-cards-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 0;
}
.ctf-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 13px;
  color: #374151;
}
.ctf-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.ctf-legend__item i {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
}
.ctf-legend__item--registering i { background: #22c55e; }
.ctf-legend__item--pending i { background: #f59e0b; }
.ctf-legend__item--closed i { background: #9ca3af; }
/* —— v2.0.3：卡片分区标题（✅正在报名 → ⏳进行中 → 🔴已结束置底）—— */
.ctf-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
  font-size: 17px;
  line-height: 1.4;
  color: #111827;
  white-space: nowrap;
  flex-wrap: nowrap;
}
.ctf-section-title:first-of-type { margin-top: 2px; }
.ctf-section-title__icon { flex-shrink: 0; }
.ctf-section-title__count {
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
  white-space: nowrap;
}
.ctf-section-title--registering .ctf-section-title__count { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.ctf-section-title--pending .ctf-section-title__count { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.ctf-section-title--active .ctf-section-title__count { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.ctf-section-title--closed { color: #6b7280; font-size: 15px; }
.ctf-section-title--closed .ctf-section-title__count { color: #6b7280; }
.ctf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.ctf-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}
.ctf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
}
/* —— 三态颜色 —— */
/* 正在订阅：绿色 */
.ctf-card--registering {
  border-top: 4px solid #22c55e;
  background: linear-gradient(180deg, #f0fdf4 0, #fff 90px);
}
/* 截止待开赛：橙色 */
.ctf-card--pending {
  border-top: 4px solid #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0, #fff 90px);
}
/* 比赛进行中：蓝色 */
.ctf-card--active {
  border-top: 4px solid #2563eb;
  background: linear-gradient(180deg, #eff6ff 0, #fff 90px);
}
/* 已截止：灰色 */
.ctf-card--closed {
  border-top: 4px solid #9ca3af;
  background: linear-gradient(180deg, #f3f4f6 0, #fff 90px);
}
/* 兼容旧类名 */
.ctf-card--open { border-top: 4px solid #22c55e; }
.ctf-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  white-space: nowrap;
}
.ctf-card__badge--registering { background: #dcfce7; color: #15803d; border-color: #86efac; }
.ctf-card__badge--pending { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.ctf-card__badge--active { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.ctf-card__badge--closed { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.ctf-card--closed .ctf-card__badge { background: #f9fafb; color: #6b7280; border-color: #e5e7eb; }
.ctf-card__title {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.4;
  color: #111827;
  padding-right: 64px;
  word-break: break-word;
}
.ctf-card__title a { color: inherit; text-decoration: none; }
.ctf-card__title a:hover { color: #4f46e5; text-decoration: underline; }
.ctf-card__desc { font-size: 13px; color: #4b5563; line-height: 1.6; margin: 0 0 8px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.ctf-card__meta {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  font-size: 13px;
  color: #1f2937;
  line-height: 1.7;
}
.ctf-card__meta li { word-break: break-word; }
.ctf-card__meta strong { color: #111827; font-weight: 600; }
.ctf-card__countdown {
  background: linear-gradient(135deg, #eef2ff, #fdf2f8);
  border-radius: 8px;
  padding: 4px 10px;
  margin-bottom: 8px;
}
.ctf-card__countdown--pending { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.ctf-card__countdown--closed { background: #f3f4f6; }
.ctf-card--pending .ctf-countdown__text { color: #b45309; }
.ctf-card--active .ctf-countdown__text { color: #1d4ed8; }
.ctf-card--closed .ctf-countdown__text { color: #6b7280; }
.ctf-countdown__text { font-variant-numeric: tabular-nums; font-weight: 600; color: #4338ca; font-size: 14px; }
.ctf-card__actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ctf-card__joined { color: #15803d; font-weight: 600; font-size: 14px; }
/* —— 热度标：卡片右下角，1–5 档配色 —— */
.ctf-card__heat {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}
.ctf-card__heat--t2 { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.ctf-card__heat--t3 { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
.ctf-card__heat--t4 { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
.ctf-card__heat--t5 { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
/* —— 浏览量标：👁 显示详情页累计访问 —— */
.ctf-card__views {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.ctf-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
.ctf-btn:hover { background: #f9fafb; }
.ctf-btn--primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
}
.ctf-btn--primary:hover { opacity: .9; background: linear-gradient(135deg, #667eea, #764ba2); }
.ctf-btn--danger { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.ctf-register-form {
  margin-top: 14px;
  padding: 14px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
}
.ctf-register-form label { font-size: 13px; color: #374151; display: block; }
.ctf-register-form input[type="email"],
.ctf-register-form input[type="text"],
.ctf-register-form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}
.ctf-empty {
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  padding: 40px 20px;
  font-size: 15px;
}
.ctf-my-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ctf-my-table th, .ctf-my-table td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.ctf-my-table th { background: #f9fafb; color: #374151; }
/* 「下一封：10月29日 17:00 报名截止提醒」 */
.ctf-my-next { margin: 6px 0 0; font-size: 12px; color: #6b7280; }
/* 我的订阅 → 订阅提醒设置入口 */
.ctf-my-tools { margin: 0 0 10px; font-size: 13px; }
.ctf-my-tools a { color: #4338ca; }

/* —— AdSense 广告位（列表第一个分区之后） —— */
.ctf-ad-slot { margin: 20px 0; text-align: center; }
.ctf-ad-slot--live { min-height: 100px; }
.ctf-ad-slot--pending { min-height: 1px; }
.ctf-ad-slot .adsbygoogle { width: 100%; }
.ctf-ad-slot__box {
  border: 1px dashed #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 10px;
  padding: 18px 12px;
  font-size: 13px;
}
.ctf-ad-slot__box a { color: #4338ca; text-decoration: underline; }
/* —— 详情页 —— */
.ctf-detail {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  position: relative;
}
.ctf-detail.ctf-card--registering { border-top: 5px solid #22c55e; }
.ctf-detail.ctf-card--pending { border-top: 5px solid #f59e0b; }
.ctf-detail.ctf-card--active { border-top: 5px solid #2563eb; }
.ctf-detail.ctf-card--closed { border-top: 5px solid #9ca3af; }
.ctf-detail__head { margin-bottom: 12px; }
.ctf-detail__badge { position: static; font-size: 13px; }
.ctf-detail__title { margin: 8px 0 4px; font-size: 26px; color: #111827; }
.ctf-detail__meta { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; color: #1f2937; line-height: 2.1; }
.ctf-detail__meta strong { color: #111827; font-weight: 600; }
.ctf-detail__meta a { color: #4f46e5; }
.ctf-detail__desc { background: #f9fafb; border: 1px solid #eef2f7; border-radius: 10px; padding: 16px 18px; margin: 0 0 16px; }
.ctf-detail__desc h3 { margin: 0 0 8px; font-size: 15px; color: #111827; }
.ctf-detail__desc p { margin: 0; font-size: 14px; line-height: 1.9; color: #374151; white-space: pre-wrap; }
.ctf-detail__actions { margin: 8px 0 4px; }
.ctf-detail__closed-tip { color: #6b7280; font-size: 14px; }
/* —— 评论区 —— */
.ctf-comments { margin-top: 24px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 22px 24px; }
.ctf-comments__title { margin: 0 0 14px; font-size: 17px; color: #111827; }
.ctf-comment-form textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid #d1d5db; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; line-height: 1.7;
}
.ctf-comments__login-tip { font-size: 14px; color: #6b7280; background: #f9fafb; border: 1px dashed #e5e7eb; border-radius: 8px; padding: 12px 16px; }
.ctf-comments__list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ctf-comments__item { border: 1px solid #eef2f7; background: #fafbff; border-radius: 10px; padding: 12px 14px; }
.ctf-comments__meta { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.ctf-comments__meta strong { color: #111827; font-size: 14px; }
.ctf-comments__content { font-size: 14px; color: #1f2937; line-height: 1.8; word-break: break-word; }
.ctf-comments__del { margin: 6px 0 0; }
.ctf-link-danger { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 12px; padding: 0; }
.ctf-link-danger:hover { text-decoration: underline; }
.ctf-comments__pager { margin-top: 14px; display: flex; gap: 8px; font-size: 14px; }
.ctf-comments__pager a { color: #4f46e5; text-decoration: none; }
.ctf-comments__pager a:hover { text-decoration: underline; }

/* —— v1.2.0：视图切换 / 分页 / 日历 —— */
.ctf-view-switch { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ctf-view-switch .ctf-btn { padding: 4px 12px; font-size: 13px; }
.ctf-view-switch + .ctf-legend { margin-top: 6px; }
/* —— v2.8.1：国外赛事顶部一行同步时间（不再显示大标题/副标题）—— */
.ctf-intl-sync { margin: 0 0 10px; font-size: 12px; color: #6b7280; }
.ctf-pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.ctf-pager__current { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #111827; color: #fff; padding: 0 10px; }
.ctf-more { text-align: center; margin-top: 20px; }
.ctf-cal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ctf-cal__title { font-size: 18px; color: #111827; }
.ctf-cal__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.ctf-cal__weekday { text-align: center; font-size: 12px; color: #6b7280; padding: 6px 0; background: #f9fafb; border-radius: 6px; }
/* —— Gantt 月历：每周一行，比赛横条直接贯穿/压在日期格上 —— */
.ctf-cal--weeks { display: flex; flex-direction: column; gap: 8px; }
.ctf-cal__weekrow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 6px; align-items: stretch; }
.ctf-cal__cell { height: 26px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; overflow: visible; }
.ctf-cal__cell--empty { background: transparent; border-style: dashed; border-color: #f3f4f6; }
.ctf-cal__cell--today { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79, 70, 229, .18); z-index: 1; }
.ctf-cal__day { display: flex; align-items: center; justify-content: center; height: 24px; font-size: 12px; line-height: 24px; color: #6b7280; }
.ctf-cal__cell--today .ctf-cal__day { color: #4f46e5; font-weight: 700; }
.ctf-cal__daydot { width: 5px; height: 5px; margin-left: 4px; border-radius: 50%; background: #4f46e5; display: inline-block; }
.ctf-cal__bar { position: relative; display: flex; align-items: center; font-size: 12px; line-height: 24px; height: 24px; margin-top: 1px; padding: 0 8px; border-radius: 6px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); cursor: pointer; }
.ctf-cal__bar--registering { background: #22c55e; color: #fff; }
.ctf-cal__bar--pending { background: #f59e0b; color: #fff; }
.ctf-cal__bar--closed { background: #9ca3af; color: #fff; }
.ctf-cal__bar:hover { filter: brightness(.94); }
/* —— v2.0：跨天赛事显示 —— */
.ctf-cal__cell--has { background: #fffef8; }
.ctf-cal__bar--cont { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -3px; }
.ctf-cal__bar--tocont { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ctf-cal__bar--cont::before { content: ''; position: absolute; left: -6px; top: 50%; width: 6px; height: 0; border-top: 2px dashed currentColor; }
.ctf-cal__bar--tocont::after { content: ''; position: absolute; right: -6px; top: 50%; width: 6px; height: 0; border-top: 2px dashed currentColor; }
.ctf-cal__span { color: #6b7280; font-size: 12px; }
.ctf-notice { border-radius: 8px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.ctf-notice--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.ctf-notice--error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.ctf-submit-wrap h3 { margin: 22px 0 10px; font-size: 17px; color: #111827; }
.ctf-submit-wrap .ctf-form p { margin: 0 0 12px; font-size: 14px; color: #374151; }
.ctf-submit-wrap input[type="text"], .ctf-submit-wrap input[type="url"],
.ctf-submit-wrap input[type="number"], .ctf-submit-wrap input[type="email"],
.ctf-submit-wrap input[type="datetime-local"], .ctf-submit-wrap textarea {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 6px 8px; font-size: 14px;
}
.ctf-submit-wrap .ctf-form { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; }
/* —— v2.0.6：投稿表单重排（标签在上 + 双列网格 + 统一控件风格）—— */
.ctf-submit-intro {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
}
.ctf-submit-intro__limits { color: #60a5fa; font-size: 12px; margin-top: 2px; }
.ctf-submit-wrap .ctf-form-grid { padding: 20px; }
.ctf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.ctf-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ctf-field--full { grid-column: 1 / -1; }
.ctf-field--check { grid-column: 1 / -1; align-self: end; }
.ctf-field__label { font-size: 14px; font-weight: 600; color: #111827; line-height: 1.4; }
.ctf-field__opt { font-size: 12px; font-weight: 400; color: #9ca3af; }
.ctf-req { color: #dc2626; font-weight: 700; }
.ctf-submit-wrap .ctf-form-grid input[type="text"],
.ctf-submit-wrap .ctf-form-grid input[type="url"],
.ctf-submit-wrap .ctf-form-grid input[type="number"],
.ctf-submit-wrap .ctf-form-grid input[type="datetime-local"],
.ctf-submit-wrap .ctf-form-grid textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.5;
  background: #fff;
  color: #111827;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ctf-submit-wrap .ctf-form-grid input:focus,
.ctf-submit-wrap .ctf-form-grid textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.ctf-submit-wrap .ctf-form-grid textarea { resize: vertical; }
.ctf-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: #374151; cursor: pointer; }
.ctf-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: #4f46e5; cursor: pointer; }
.ctf-submit-actions { grid-column: 1 / -1; margin-top: 4px; }
.ctf-submit-actions .ctf-btn--primary { padding: 10px 32px; font-size: 15px; }
@media (max-width: 720px) {
  .ctf-form-grid { grid-template-columns: 1fr; }
}
.ctf-cal__list { margin-top: 18px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; }
.ctf-cal__list h3 { margin: 0 0 10px; font-size: 15px; color: #111827; }
.ctf-cal__row { padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ctf-cal__row:last-child { border-bottom: none; }
.ctf-cal__date { color: #4b5563; font-variant-numeric: tabular-nums; }
.ctf-cal__badge { position: static; }
.ctf-cal__row a { color: #111827; text-decoration: none; }
.ctf-cal__row a:hover { color: #4f46e5; text-decoration: underline; }
/* —— v2.0.4：主题页面标题（最近比赛/投稿赛事）过大，压到合理尺寸 —— */
body .wp-block-post-title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
}
/* —— v2.0.5：去掉页面标题上下的主题模板大留白 —— */
/* 模板给 <main> 加了 margin-top:spacing-60（最多70px），标题分组又加了上下 padding:spacing-60（各最多70px） */
body main.wp-block-group.has-global-padding {
  margin-top: 0 !important;
}
body main > .wp-block-group.alignfull {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* 标题下的空锚点段落（<span id="recent"></span><br />）折叠为 0 高度，锚点跳转保留 */
body .entry-content p:has(> span#recent) {
  margin: 0;
  line-height: 0;
}
body .entry-content p:has(> span#recent) br {
  display: none;
}
/* —— v2.0.7：投稿页正文里的重复标题（页面大标题已显示「投稿赛事」）—— */
body .entry-content h2#submit {
  display: none;
}
/* —— v2.0.3：已结束卡片弱化，整体再压一档高度 —— */
.ctf-cards .ctf-card--closed--slim { padding: 10px 14px; }
.ctf-card--closed--slim .ctf-card__badge { position: static; display: inline-block; margin: 0 0 6px; }
.ctf-card--closed--slim .ctf-card__title { font-size: 15px; padding-right: 0; margin-bottom: 4px; }
.ctf-card--closed--slim .ctf-card__countdown { padding: 4px 10px; margin-bottom: 8px; }

/* —— v2.0.8：站点 chrome 清理 —— */
/* 页头站点名「ctfbaoming」隐藏（页头整体保留，导航菜单可用） */
body .wp-block-site-title,
body h2.wp-block-site-title {
  display: none !important;
}
/* 页脚整块隐藏（默认菜单：博客/关于/常见问题/作者/事件/商店/样板/主题 + 「二〇二五 以 WordPress 设计」版权行） */
body footer.wp-block-template-part {
  display: none !important;
}
@media (max-width: 720px) {
  .ctf-cal__weekrow { grid-template-columns: repeat(7, minmax(40px, 1fr)); column-gap: 3px; }
  .ctf-cal__cell { height: 24px; }
  .ctf-cal__bar { font-size: 11px; height: 22px; line-height: 22px; padding: 0 6px; }
}

/* ==========================================================================
   提醒说明（列表底部）/ 筛选栏 / 信息标签 / 提醒时间表 / 相关赛事
   配色沿用既有变量：#e5e7eb 边框、#111827 主文、#6b7280 次文、
   绿 #22c55e·#15803d·#f0fdf4、橙 #f59e0b·#b45309·#fffbeb、灰 #9ca3af·#f3f4f6
   ========================================================================== */

/* —— 列表底部的提醒说明：一句话 + 链接，不再展开规则清单 —— */
.ctf-note {
  margin-top: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 10px 14px;
  font-size: 13px;
  color: #4b5563;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
}
.ctf-note__text { margin: 0; }
.ctf-note__links { display: flex; gap: 14px; margin: 0 0 0 auto; }
.ctf-note__links a { color: #4338ca; }

/* —— 筛选栏 —— */
.ctf-filter {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.ctf-filter__row { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; }
.ctf-filter__row .ctf-view-switch { margin: 0; padding: 0; border: 0; }
.ctf-filter__row .ctf-btn { padding: 4px 11px; font-size: 13px; }
.ctf-filter__row .ctf-legend { margin: 0 0 0 auto; }
.ctf-filter__q {
  flex: 1 1 180px;
  min-width: 140px;
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
}
.ctf-filter__q:focus { outline: 2px solid #c7d2fe; border-color: #818cf8; }
.ctf-filter select {
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
  background: #fff;
  color: #374151;
}
.ctf-filter__meta { margin: 6px 0 0; font-size: 12px; color: #6b7280; }
.ctf-filter__meta a { margin-left: 6px; }
.ctf-filter__meta b { color: #111827; }
.ctf-filter__due { color: #b45309; }
.ctf-filter__due b { color: #b45309; }

/* —— 卡片信息角标行 —— */
.ctf-card__chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; }
.ctf-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.7;
  border: 1px solid transparent;
}
.ctf-chip--format { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.ctf-chip--game   { background: #f0f9ff; color: #075985; border-color: #bae6fd; }
.ctf-chip--team   { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.ctf-chip--ai-yes { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.ctf-chip--ai-no  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
/* 官网链接：与「已订阅」同一行（meta 列表内），省掉 chips 单独一行 */
.ctf-meta-link { margin-left: 10px; }
.ctf-meta-link a { color: #4f46e5; text-decoration: none; font-weight: 600; font-size: 13px; }
.ctf-meta-link a:hover { text-decoration: underline; }
.ctf-detail__chips { margin-bottom: 10px; }

/* 48 小时内截止：左边加一条橙色强调条，不再另加文字 */
.ctf-card--urgent { border-left: 3px solid #f59e0b; }

/* —— 提醒时间表 —— */
.ctf-reminders {
  margin-top: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
}
.ctf-reminders__title { margin: 0 0 10px; font-size: 15px; color: #111827; }
.ctf-reminders__preview { font-size: 12px; font-weight: 400; color: #9ca3af; }
.ctf-reminders__list { list-style: none; margin: 0; padding: 0; }
.ctf-reminders__item {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 7px 0;
  border-top: 1px dashed #e5e7eb;
  font-size: 13px;
}
.ctf-reminders__item:first-child { border-top: 0; }
.ctf-reminders__when {
  flex: 0 0 auto;
  min-width: 130px;
  font-variant-numeric: tabular-nums;
  color: #111827;
  font-weight: 600;
}
.ctf-reminders__what { flex: 1 1 auto; color: #374151; }
.ctf-reminders__what em { font-style: normal; color: #6b7280; font-size: 12px; margin-left: 4px; }
.ctf-reminders__status {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #6b7280;
}
.ctf-reminders__item--sent .ctf-reminders__status { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.ctf-reminders__item--due .ctf-reminders__status { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
/* 到点但落在深夜：不发送也不记账，天亮后补 */
.ctf-reminders__item--deferred .ctf-reminders__status { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
/* 按规则决定不发的一行压暗，原因写在标签后面 */
.ctf-reminders__item--skipped { opacity: .62; }
.ctf-reminders__item--skipped .ctf-reminders__status { background: #f3f4f6; color: #6b7280; }
.ctf-reminders__why { color: #9ca3af; }
.ctf-reminders__note { margin: 10px 0 0; font-size: 12px; color: #9ca3af; line-height: 1.7; }

/* —— 相关赛事 —— */
.ctf-related {
  margin-top: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 12px 16px;
}
.ctf-related__title { margin: 0 0 8px; font-size: 14px; color: #374151; }
.ctf-related__list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.9; }
.ctf-related__meta { color: #9ca3af; font-size: 12px; margin-left: 6px; }
.ctf-related__badge {
  margin-left: 6px;
  font-size: 11px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

@media (max-width: 720px) {
  .ctf-filter__q { flex: 1 1 100%; }
  .ctf-reminders__item { gap: 6px; }
  .ctf-reminders__when { min-width: 0; }
  .ctf-note { padding: 10px 12px; }
  .ctf-note__links { margin-left: 0; }
}
/* 报名窗口未开 */
.ctf-card__notopen {
  display: inline-block;
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 4px 10px;
}

/* ==========================================================================
   v2.7.0 国外赛事页：月历（日期格内嵌赛事小卡片）+ 卡片视图
   配色与主站一致：绿 #22c55e、橙 #f59e0b、灰 #9ca3af、靛蓝 #4338ca
   ========================================================================== */

/* 与国内卡片网格同宽（1200px）：auto-fill minmax(300px) 在 1280px 下会多出一列空轨，
   把国外卡片挤成 311px 窄卡，和国内 392px 不一致。统一成 1200px 两边都是 3 列。 */
.ctf-intl-wrap { max-width: 1200px; }

.ctf-intl-hero {
  display: flex;
  gap: 14px 24px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 55%, #ecfeff 100%);
}
.ctf-intl-hero__title { margin: 0 0 4px; font-size: 24px; line-height: 1.3; color: #1e1b4b; }
.ctf-intl-hero__sub { margin: 0; font-size: 13px; color: #4b5563; }
.ctf-intl-hero__meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #6b7280; }
.ctf-intl-hero__warn { color: #b45309; }

.ctf-intl-tools {
  display: flex;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ctf-intl-tools__links { display: flex; gap: 14px; font-size: 13px; }
.ctf-intl-tools__links a { color: #4338ca; }

.ctf-intl-count { margin: 0 0 10px; font-size: 13px; color: #6b7280; }
.ctf-intl-count b { color: #111827; }

.ctf-intl-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 10px;
}
.ctf-intl-cal__title { font-size: 18px; color: #111827; }
.ctf-intl-cal__scroll { overflow-x: auto; padding-bottom: 4px; }
.ctf-intl-cal__week,
.ctf-intl-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  min-width: 760px;
}
.ctf-intl-cal__week { margin-bottom: 6px; }
.ctf-intl-cal__weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
}
.ctf-intl-cal__cell {
  min-height: 116px;
  padding: 5px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ctf-intl-cal__cell--outside { background: #f9fafb; border-color: #f3f4f6; }
.ctf-intl-cal__cell--today { border-color: #818cf8; box-shadow: inset 0 0 0 1px #c7d2fe; }
.ctf-intl-cal__day { font-size: 12px; font-weight: 700; color: #6b7280; }
.ctf-intl-cal__cell--today .ctf-intl-cal__day { color: #4338ca; }
.ctf-intl-cal__items { display: flex; flex-direction: column; gap: 3px; }
.ctf-intl-cal__more { font-size: 10px; color: #6b7280; text-align: right; }

.ctf-intl-mini {
  display: block;
  padding: 3px 5px;
  border-radius: 6px;
  border-left: 3px solid #6366f1;
  background: #eef2ff;
  color: inherit;
  text-decoration: none;
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
}
.ctf-intl-mini:hover { filter: brightness(.97); text-decoration: none; }
.ctf-intl-mini--registering { background: #f0fdf4; border-left-color: #22c55e; }
.ctf-intl-mini--pending { background: #fffbeb; border-left-color: #f59e0b; }
.ctf-intl-mini--active { background: #eff6ff; border-left-color: #2563eb; }
.ctf-intl-mini--closed { background: #f3f4f6; border-left-color: #9ca3af; opacity: .8; }
.ctf-intl-mini__time { display: block; font-weight: 700; color: #374151; }
.ctf-intl-mini__title {
  display: block;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctf-intl-mini__loc {
  display: block;
  color: #6b7280;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ctf-intl-agenda {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}
.ctf-intl-agenda__title { margin: 0 0 8px; font-size: 15px; color: #111827; }
.ctf-intl-agenda__list { list-style: none; margin: 0; padding: 0; }
.ctf-intl-agenda__item {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px dashed #e5e7eb;
  font-size: 13px;
}
.ctf-intl-agenda__item:first-child { border-top: 0; }
.ctf-intl-agenda__badge { flex: 0 0 auto; }
.ctf-intl-agenda__time {
  min-width: 120px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}
.ctf-intl-agenda__loc { color: #9ca3af; font-size: 12px; }

.ctf-chip--region { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.ctf-chip--location { background: #fdf4ff; color: #86198f; border-color: #f5d0fe; }

.ctf-intl-cards { margin-top: 4px; }
.ctf-intl-card .ctf-card__desc { margin: 0 0 8px; color: #4b5563; font-size: 13px; }

/* 页脚最底部：访客计数 */
.ctf-visitor-stats {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  margin: 18px auto 8px;
  padding: 8px 0;
  color: #9ca3af;
  font-size: 12px;
}
.ctf-visitor-stats strong {
  color: #6b7280;
  font-size: 15px;
  font-weight: 600;
  margin-right: 4px;
  font-variant-numeric: tabular-nums;
}
.ctf-visitor-sep { color: #d1d5db; }

@media (max-width: 760px) {
  .ctf-intl-hero { padding: 14px; }
  .ctf-intl-hero__title { font-size: 20px; }
  .ctf-intl-cal__head { flex-wrap: wrap; }
  .ctf-intl-cal__scroll { margin: 0 -4px; padding: 0 4px 6px; }
  .ctf-intl-agenda__time { min-width: 0; }
}
