* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 12px;
  font-family: sans-serif;
  background: #f8fafc;
  color: #1f2937;
}

a {
  color: #2563eb;
}

.page-header {
  margin-bottom: 14px;
}

.page-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.year-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.year-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.year-nav-button:hover {
  background: #eff6ff;
  border-color: #60a5fa;
}

.year-nav-button:focus-visible,
.year-nav-button.persisted-focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.year-nav-button.disabled {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
  pointer-events: none;
  box-shadow: none;
}

.current-year-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 4px;
  color: #111827;
  font-weight: 700;
  line-height: 1;
  background: transparent;
  border: none;
}

.year-nav-button.now {
  background: transparent;
  border-color: #60a5fa;
  color: #2563eb;
}

.year-nav-button.now:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

.year-range-note {
  color: #475569;
  font-size: 12px;
}

.page-header h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.month {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 10px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.month h2 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.3;
}

.current-month {
  border: 2px solid #3b82f6;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.16);
}

.current-month h2 {
  font-size: 17px;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  flex: 1;
}

.calendar-table th,
.calendar-table td {
  border: 1px solid rgba(148, 163, 184, 0.28);
  text-align: center;
  vertical-align: top;
  padding: 3px 2px;
  height: 40px;
}

.calendar-table th {
  background: #f1f5f9;
  padding: 5px 0;
  height: auto;
}

.day-number {
  font-size: 12px;
  line-height: 1.2;
}

.today-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  border-radius: 9999px;
  text-decoration: none;
  color: inherit;
}

.today-link:hover {
  background: rgba(59, 130, 246, 0.10);
}

.holiday-name {
  margin-top: 4px;
  font-size: 8px;
  line-height: 1.2;
  word-break: break-word;
}

.sun {
  color: #dc2626;
}

.sat {
  color: #2563eb;
}

.holiday {
  color: #dc2626;
}

.today {
  background: rgba(245, 158, 11, 0.28);
  font-weight: bold;
  outline: 2px solid #f59e0b;
  outline-offset: -2px;
  cursor: pointer;
}

.empty {
  background: #f8fafc;
}

.summary-page {
  background: #f8fafc;
  color: #1f2937;
}

.summary-meta {
  margin-top: 12px;
  color: #475569;
}

.summary-section {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

.summary-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.summary-overview-section p,
.summary-overview-prose p {
  margin: 0 0 14px;
  line-height: 1.9;
}

.summary-overview-section p:last-child,
.summary-overview-prose p:last-child {
  margin-bottom: 0;
}

.summary-sections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
  align-items: start;
}

.summary-category-section {
  min-width: 0;
  min-height: 420px;
}

.summary-table-wrap {
  overflow: auto;
  max-height: 420px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: #ffffff;
}

.summary-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.summary-table th,
.summary-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.summary-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e2e8f0;
  color: #334155;
}

.summary-table tbody tr:nth-child(odd) {
  background: #f8fafc;
}

.summary-table tbody tr:nth-child(even) {
  background: #ffffff;
}

.summary-table tbody tr:hover {
  background: #eff6ff;
}

.summary-news-list {
  margin: 0;
  padding-left: 20px;
}

.summary-news-list li {
  margin-bottom: 8px;
  line-height: 1.7;
}

@media (max-width: 1180px) {
  .months-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 920px) {
  .months-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 1100px) {
  .summary-sections-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    padding: 10px;
  }

  .page-header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .months-grid,
  .summary-sections-grid {
    grid-template-columns: 1fr;
  }

  .month,
  .summary-category-section {
    min-height: auto;
  }

  .calendar-table th,
  .calendar-table td {
    height: 38px;
  }

  .holiday-name {
    font-size: 8px;
  }

  .summary-table {
    min-width: 520px;
  }
}
