:root {
  --border: #1a1a1a;
  --light-border: #cfcfcf;
  --holiday: #9a9a9a;
  --text: #111111;
}

* {
  box-sizing: border-box;
}

body {
  color: var(--text);
}

.calendar-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-pill {
  background: rgba(0, 153, 204, 0.12);
  color: #0a3f52;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(0, 153, 204, 0.18);
}

.controls {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.control-group input,
.control-group select {
  padding: 6px 8px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

button {
  padding: 8px 14px;
  font-size: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  border-radius: 8px;
  font-weight: 600;
}

button:hover {
  background: #f2f2f2;
}

.filter-wrap {
  position: relative;
}

.filter-toggle {
  width: 38px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.filter-toggle .bar {
  width: 18px;
  height: 2px;
  background: #1a1a1a;
  display: block;
}

.filter-panel {
  position: absolute;
  right: 0;
  top: 44px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  display: none;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 20;
  min-width: 170px;
}

.filter-panel.is-open {
  display: flex;
}

.filter-item {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-item .holiday-icon {
  margin-left: 2px;
  margin-right: 2px;
}

.filter-note {
  font-size: 11px;
  color: #6b6b6b;
  line-height: 1.3;
}

.planner {
  border: 1px solid var(--border);
  padding: 4px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: none;
}

.planner-print {
  background: #ffffff;
}

.planner-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #8d8d8d;
  margin-top: 8px;
}

.calendar-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.calendar-brand {
  text-align: right;
}

.calendar-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  margin: 0;
}

.calendar-table tr:nth-child(2) td:first-child {
  border-top-left-radius: 6px;
}

.calendar-table tr:nth-child(2) td:last-child {
  border-top-right-radius: 6px;
}

.calendar-table tr:last-child td:first-child {
  border-bottom-left-radius: 6px;
}

.calendar-table tr:last-child td:last-child {
  border-bottom-right-radius: 6px;
}

.calendar-title {
  caption-side: top;
  text-align: center;
  font-size: 50pt;
  font-weight: 600;
  padding: 0 0 18px 0;
  margin: 0;
  line-height: 1;
  letter-spacing: 0.04em;
}

.calendar-table th {
  text-align: left;
  font-size: 14px;
  padding: 6px 4px 4px;
  border: 1px solid var(--light-border);
  line-height: 1;
}

.calendar-table th:first-child {
  border-top-left-radius: 6px;
}

.calendar-table th:last-child {
  border-top-right-radius: 6px;
}


.calendar-table td {
  border: 1px solid var(--light-border);
  height: 110px;
  vertical-align: top;
  padding: 4px 4px 6px;
  position: relative;
}

.calendar-table td.empty {
  background: #fafafa;
}

.day-number {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 12px;
  font-weight: 600;
}

.holiday {
  font-size: 10px;
  color: var(--holiday);
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.holiday + .holiday {
  margin-top: 1px;
}

.holiday-icon {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex-shrink: 0;
  align-self: center;
}

.holiday-icon.official {
  background: var(--holiday);
}

.holiday-icon.observed {
  border: 1px solid var(--holiday);
  border-radius: 50%;
}

.holiday-icon.religious {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid var(--holiday);
}

.holiday-icon.other {
  width: 6px;
  height: 6px;
  border: 1px solid var(--holiday);
  transform: rotate(45deg);
}

.holiday-icon.astronomical {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid var(--holiday);
  position: relative;
}

.holiday-icon.astronomical::after {
  content: "";
  position: absolute;
  top: 2px;
  left: -4px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 7px solid var(--holiday);
}
.holiday-icon.moon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--holiday);
  position: relative;
}

.holiday-icon.moon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  top: 1px;
  left: 3px;
}

.holiday-text {
  line-height: 1.2;
}


@media print {
  app-header,
  app-footer,
  .status-pill,
  .controls {
    display: none !important;
  }

  .page-main {
    padding: 0;
  }

  .app-shell {
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .app-header-row {
    display: none;
  }

  body {
    background: #ffffff;
  }

  .no-print {
    display: none;
  }

  .page {
    padding: 0;
  }

  .planner {
    border: none;
    padding: 0;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border-radius: 0;
  }

  .planner-body {
    gap: 0;
  }

  @page {
    size: letter landscape;
    margin: 0.9in;
  }

  .calendar-table td {
    height: 95px;
  }

}
.calendar {
  flex: none;
}
