:root {
  --bg: #f8f6ff;
  --panel: #ffffff;
  --ink: #1f1f2e;
  --accent: #7b1fa2;
  --accent-soft: #efe2f7;
  --border: #e4dff1;
  --muted: #6a6280;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans Tamil", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
header, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
footer {
  border-top: 1px solid var(--border);
  border-bottom: none;
}
button {
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: 0.6rem;
  font-weight: 600;
}
button:hover { filter: brightness(0.95); }
.layout {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr;
  gap: 1rem;
  padding: 1rem;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 1rem;
}
.field { margin-bottom: 0.8rem; }
label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
input, select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 0.5rem;
  border: 1px solid #c8bedb;
}
.coords {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.actions { display: flex; gap: 0.6rem; margin-top: 0.6rem; flex-wrap: wrap; }
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.7rem;
}
.card {
  border: 1px solid var(--border);
  background: #faf8ff;
  border-radius: 0.65rem;
  padding: 0.7rem;
}
.card h3 { margin: 0 0 0.4rem 0; font-size: 1rem; color: var(--accent); }
.card p { margin: 0; }

.news-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}
#news-search {
  max-width: 230px;
  border-radius: 999px;
  border: 1px solid #1d1d1f55;
  background: #fff;
}
.news-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.55rem 0 0.8rem;
}
.news-chip {
  border: 1px solid #1d1d1f55;
  background: #fff;
  color: #222;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}
.news-chip.active {
  background: #121418;
  color: #fff;
}
.news-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.news-card {
  border: 1px solid #e8e8e8;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #fff;
}
.news-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #d6d6e8, #f0dbe9);
}
.news-card-body { padding: 0.7rem; }
.news-date {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.35rem;
}
.news-title-link {
  text-decoration: none;
  color: #222;
  font-weight: 700;
  line-height: 1.35;
}
.news-title-link:hover { text-decoration: underline; }

.month-panel {
  margin: 0 1rem 1rem;
}
.month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.month-nav {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
#month-title { min-width: 220px; text-align: center; }
.dpMonthGrid {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.6rem;
}
.dpGridWeekday {
  display: grid;
  grid-template-rows: repeat(7, minmax(72px, 1fr));
  gap: 0.35rem;
}
.dpVGridWeekdayCell {
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #f6f1ff;
  padding: 0.4rem;
  text-align: center;
  font-weight: 700;
  color: #4d3a74;
}
.dpMonthGridBody {
  display: grid;
  gap: 0.35rem;
}
.dpMonthGridRow {
  display: grid;
  grid-template-columns: repeat(7, minmax(145px, 1fr));
  gap: 0.35rem;
}
.dpMonthGridCell {
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.45rem;
  min-height: 132px;
  font-size: 0.76rem;
}
.dpInert { opacity: 0.45; }
.dpCurrentFocusedDay {
  border: 2px solid #4f89ff;
  box-shadow: 0 0 0 2px rgba(79, 137, 255, 0.12);
}
.dpHoliday { background: #fcf7ff; }
.dpCellDate {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 0.25rem;
}
.dpBigDate { text-align: center; font-weight: 700; font-size: 1.05rem; }
.dpSmallDate { text-align: right; color: var(--muted); }
.dpSunriseTiming, .dpSunsetTiming {
  color: var(--muted);
  font-size: 0.65rem;
}
.dpCellTithi { display: block; font-weight: 700; margin-top: 0.25rem; }
.dpMoonTiming, .dpNakshatra { color: #41356b; margin-top: 0.12rem; }
.dpCellFestivalName { margin-top: 0.2rem; color: #1d7e53; font-weight: 700; }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .dpMonthGrid { grid-template-columns: 1fr; }
  .dpGridWeekday { grid-template-columns: repeat(7, 1fr); grid-template-rows: none; }
  .dpMonthGridRow { grid-template-columns: repeat(2, minmax(145px, 1fr)); }
}
