/* ── Force light background for entire calendar page ───────────── */
body { background:#f0f4f8 !important; }

/* ── Page wrapper ───────────────────────────────────────────────── */
.cal-page {
  max-width: 1200px;
  margin: 24px auto 60px;
  padding: 28px 24px 40px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  color: #1e293b;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.cal-hero  { text-align:center; margin-bottom:28px; }
.cal-hero h1 { font-size:2rem; font-weight:800; margin:0 0 6px; color:#0f172a !important; }
.cal-hero p  { color:#475569 !important; margin:0; font-size:.95rem; }

/* ── Filter bar ────────────────────────────────────────────────── */
.cal-filter { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:22px; }
.cal-filter label { font-size:.85rem; font-weight:600; color:#1e293b !important; }
.cal-filter select { padding:7px 12px; border:1px solid #cbd5e1; border-radius:8px; font-size:.85rem; background:#fff !important; color:#1e293b !important; }
.cal-filter a.reset { font-size:.8rem; color:#6b7280 !important; text-decoration:underline; }

/* ── Month nav ─────────────────────────────────────────────────── */
.cal-nav { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.cal-nav a { display:inline-flex; align-items:center; gap:4px; padding:7px 14px; border:1px solid #cbd5e1; border-radius:8px; font-size:.88rem; font-weight:600; text-decoration:none; color:#1e293b !important; background:#f1f5f9 !important; transition:background .15s; }
.cal-nav a:hover { background:#e2e8f0 !important; color:#0077b6 !important; }
.cal-nav h2 { font-size:1.3rem; font-weight:700; margin:0; color:#0f172a !important; }

/* ── Year nav ──────────────────────────────────────────────────── */
.cal-year-nav { display:flex; justify-content:center; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
.cal-year-nav a { padding:4px 12px; border-radius:20px; font-size:.82rem; font-weight:600; text-decoration:none; border:1px solid #cbd5e1; color:#1e293b !important; background:#f1f5f9 !important; }
.cal-year-nav a.active { background:#0077b6 !important; color:#fff !important; border-color:#0077b6; }

/* ── Calendar grid ─────────────────────────────────────────────── */
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; margin-bottom:36px; background:#e2e8f0; border:1px solid #e2e8f0; border-radius:10px; overflow:hidden; }
.cal-dow  { text-align:center; font-size:.72rem; font-weight:800; color:#1e293b !important; text-transform:uppercase; padding:8px 0; background:#e8eef5 !important; }
.cal-cell { min-height:90px; background:#fff !important; border:none; padding:6px; position:relative; overflow:hidden; }
.cal-cell.empty { background:#f8fafc !important; }
.cal-cell.today { background:#eff6ff !important; outline:3px solid #0077b6; outline-offset:-3px; }
.cal-cell.has-hol { background:#fefce8 !important; }
.cal-cell.today.has-hol { background:#fef9c3 !important; }
.cal-day-num { font-size:.78rem; font-weight:700; color:#374151 !important; margin-bottom:4px; display:inline-block; }
/* Today: circle around the day number */
.cal-cell.today .cal-day-num {
  color:#fff !important;
  font-weight:900;
  background:#0077b6;
  border-radius:50%;
  width:22px;
  height:22px;
  line-height:22px;
  text-align:center;
  padding:0;
  margin-bottom:4px;
}
.cal-hol-pill { display:block; font-size:.62rem; line-height:1.2; padding:1px 4px; border-radius:3px; margin-bottom:2px; color:#fff !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:default; }
.cal-more { font-size:.6rem; color:#1e293b !important; font-weight:600; }

/* ── Clickable day cells ────────────────────────────────────────── */
.clickable-day { cursor:pointer; transition:box-shadow .15s, transform .1s; }
.clickable-day:hover { box-shadow:0 0 0 2px #0077b6; transform:scale(1.02); z-index:1; }
.clickable-day:focus { outline:2px solid #0077b6; outline-offset:2px; }

/* ── Day detail modal ───────────────────────────────────────────── */
#cal-modal { color:#0f172a !important; background:#ffffff !important; }
#cal-modal * { color:#0f172a !important; }
#cal-modal .type-pill,
#cal-modal .type-pill * { color:#fff !important; }
#cal-modal .wiki-link,
#cal-modal .wiki-link * { color:#1e293b !important; }
.modal-hol-card { display:flex; gap:12px; align-items:flex-start; padding:12px 0; border-bottom:1px solid #f1f5f9; }
.modal-hol-card:last-child { border-bottom:none; }
.modal-hol-flag { font-size:1.8rem; flex-shrink:0; line-height:1; }
.modal-hol-info h4 { margin:0 0 3px; font-size:1rem; font-weight:800; color:#0f172a !important; }
.modal-hol-info .island { font-size:.8rem; color:#374151 !important; margin:0 0 6px; }
.modal-hol-info .type-pill { display:inline-block; font-size:.65rem; font-weight:700; text-transform:uppercase; padding:2px 8px; border-radius:10px; color:#fff; }
.modal-hol-info .hol-desc { font-size:.85rem; color:#374151 !important; line-height:1.55; margin:6px 0 8px; }
.modal-hol-info .wiki-link { display:inline-flex; align-items:center; gap:4px; margin-left:8px; font-size:.75rem; color:#1e293b; text-decoration:none; font-weight:600; border:1px solid #cbd5e1; border-radius:6px; padding:2px 8px; }
.modal-hol-info .wiki-link:hover { background:#f1f5f9; text-decoration:none; }

/* ── Holiday list ──────────────────────────────────────────────── */
.cal-list-section { margin-top:8px; }
.cal-list-section h2 { font-size:1.15rem; font-weight:700; margin:0 0 14px; color:#0f172a !important; }
.cal-month-group { margin-bottom:28px; }
.cal-month-group h3 { font-size:1rem; font-weight:700; color:#0077b6 !important; border-bottom:2px solid #e2e8f0; padding-bottom:6px; margin:0 0 10px; }
.cal-hol-row { display:flex; align-items:flex-start; gap:12px; padding:9px 10px; border-bottom:1px solid #f1f5f9; border-radius:6px; }
.cal-hol-row:hover { background:#f1f5f9; }
.cal-hol-row:last-child { border-bottom:none; }
.cal-hol-date { min-width:72px; font-size:.78rem; font-weight:700; color:#374151 !important; padding-top:2px; }
.cal-hol-flag { font-size:1.2rem; flex-shrink:0; }
.cal-hol-info { flex:1; }
.cal-hol-name { font-size:.88rem; font-weight:600; color:#0f172a !important; }
.cal-hol-island { font-size:.75rem; color:#475569 !important; }
.cal-hol-type { display:inline-block; font-size:.65rem; font-weight:700; text-transform:uppercase; padding:1px 6px; border-radius:10px; color:#fff !important; margin-left:6px; vertical-align:middle; }

/* ── Legend ────────────────────────────────────────────────────── */
.cal-legend { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; padding:10px 14px; background:#f1f5f9 !important; border-radius:8px; border:1px solid #e2e8f0; }
.cal-legend-item { display:flex; align-items:center; gap:5px; font-size:.75rem; color:#1e293b !important; font-weight:600; }
.cal-legend-dot { width:10px; height:10px; border-radius:2px; flex-shrink:0; }

@media(max-width:640px) {
  .cal-page { padding:16px 12px 32px; border-radius:0; margin:0; }
  .cal-grid { gap:1px; }
  .cal-cell { min-height:60px; padding:3px; }
  .cal-hol-pill { display:none; }
  .cal-day-num { font-size:.7rem; }
  .cal-cell.today .cal-day-num { width:18px; height:18px; line-height:18px; font-size:.7rem; }
  .cal-cell.has-hol::after { content:'•'; position:absolute; bottom:3px; right:4px; color:#f59e0b; font-size:1rem; }
  .cal-hero h1 { font-size:1.4rem; }
}
