body {
  background: #f6f5ef;
}

.tree-card {
  overflow: hidden;
}

.tree-thumb,
.gallery-image {
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  width: 100%;
}

.tree-placeholder {
  align-items: center;
  background: linear-gradient(135deg, #e8f3df, #f7ead2);
  color: #55704d;
  display: flex;
  font-weight: 600;
  height: 100%;
  justify-content: center;
  min-height: 170px;
  padding: 1rem;
  text-align: center;
}

.gallery-image {
  height: 240px;
}

.gallery-image-button {
  background: transparent;
  border: 0;
  cursor: zoom-in;
  padding: 0;
}

.gallery-modal-image {
  max-height: 75vh;
  object-fit: contain;
}

.gallery-modal-stage {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.gallery-nav-button {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 1.8rem;
  line-height: 1;
  min-height: 3rem;
  min-width: 3rem;
  padding: 0;
}

.tree-map {
  border: 1px solid #d4ddcf;
  border-radius: 0.75rem;
  height: 360px;
  overflow: hidden;
}

.qr-code {
  height: 120px;
  image-rendering: pixelated;
  width: 120px;
}

.sort-link {
  color: #224d2c;
  text-decoration: none;
  white-space: nowrap;
}

.sort-link:hover {
  color: #198754;
  text-decoration: underline;
}

.calendar-card {
  overflow: hidden;
}

.calendar-table-wrap {
  max-height: calc(100vh - 210px);
}

.calendar-table {
  min-width: max-content;
}

.calendar-table th,
.calendar-table td {
  border-color: #d9ddcf;
}

.calendar-month-header,
.calendar-month-cell {
  background: #eef3e5;
  left: 0;
  min-width: 7.5rem;
  position: sticky;
  z-index: 3;
}

.calendar-month-header {
  top: 0;
  z-index: 5;
}

.calendar-month-cell {
  color: #224d2c;
  font-weight: 700;
}

.calendar-tree-header {
  background: #f9f8f1;
  min-width: 3.25rem;
  position: sticky;
  top: 0;
  vertical-align: bottom;
  white-space: nowrap;
  z-index: 4;
}

.calendar-value-cell {
  background: #fffdf7;
  height: 4.75rem;
  min-width: 3.25rem;
  padding: 0.35rem;
}

.calendar-event,
.calendar-legend {
  border: 1px solid rgba(34, 77, 44, 0.18);
  border-radius: 0.45rem;
  color: #2c3028;
  display: block;
  line-height: 1.2;
  padding: 0.3rem 0.45rem;
}

.calendar-tree-link {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 12rem;
  padding: 0.5rem 0.1rem;
}

.calendar-tree-link span {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: left;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.calendar-event + .calendar-event {
  margin-top: 0.25rem;
}

.calendar-event {
  min-height: 1.1rem;
  padding: 0;
}

.calendar-event-bloom {
  background: #ffffff;
}

.calendar-event-harvest {
  background: #ffd38a;
}

.calendar-event-eating {
  background: #ffc5c5;
}

.calendar-empty {
  display: block;
  min-height: 2.75rem;
}

@media print {
  body * {
    visibility: hidden;
  }

  .qr-print-card,
  .qr-print-card * {
    visibility: visible;
  }

  .qr-print-card {
    border: 0;
    box-shadow: none !important;
    left: 0;
    position: absolute;
    top: 0;
  }
}

@media (max-width: 575.98px) {
  .tree-thumb,
  .tree-placeholder {
    min-height: 220px;
  }

  .gallery-modal-stage {
    gap: 0.5rem;
  }

  .gallery-nav-button {
    min-height: 2.5rem;
    min-width: 2.5rem;
  }
}
