/* Shared tree layout and today's emotion colors. */

.tree-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.tree-page__main {
  flex: 1;
  padding-block: 48px 56px;
}

.tree-page__heading {
  text-align: center;
}

.tree-page__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.45;
}

.tree-page__date-navigation {
  display: grid;
  grid-template-columns: minmax(4rem, 1fr) auto minmax(4rem, 1fr);
  align-items: center;
  gap: 16px;
  width: min(100%, 400px);
  margin: 16px auto 0;
}

.tree-page__date-navigation > :first-child {
  justify-self: end;
}

.tree-page__date-navigation > :last-child {
  justify-self: start;
}

.tree-page__date-navigation a {
  color: var(--color-text);
}

.tree-page__date-navigation-disabled {
  color: var(--color-text-muted);
}

.tree-page__date {
  margin: 0;
}

.tree-page__notice {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.tree-page__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 48px;
  margin-top: 24px;
}

.tree-visual {
  width: min(100%, 640px);
  margin: 0 auto;
}

.tree-visual__layers {
  position: relative;
}

.tree-visual__base {
  width: 100%;
}

.tree-visual__color {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse var(--tree-radius) var(--tree-radius) at var(--tree-x) var(--tree-y),
    var(--tree-color) 15%,
    transparent 100%
  );
  opacity: calc(var(--tree-opacity) * 0.50);
  mask: url("/assets/shikisai_leaf_color_mask-5cdd3632.png") center / 100% 100% no-repeat;
}

.tree-visual__empty {
  margin-top: 16px;
  text-align: center;
}

.tree-visual__empty p {
  margin: 0 0 16px;
}

.tree-legend {
  padding: 28px 24px;
  border: 1px solid var(--color-border);
  border-radius: calc(var(--border-radius) + 10px);
  background-color: var(--color-surface);
}

.tree-legend__title {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.tree-legend__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tree-legend__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.tree-legend__swatch {
  width: 24px;
  height: 24px;
  border: 1px solid rgb(52 57 52 / 15%);
  border-radius: 50%;
}

@media (max-width: 1060px) {
  .tree-page__content {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 24px;
  }
}

@media (max-width: 720px) {
  .tree-page__main {
    padding-block: 32px;
  }

  .tree-page__title {
    font-size: 1.75rem;
  }

  .tree-page__date-navigation {
    gap: 10px;
  }

  .tree-page__content {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .tree-visual {
    max-width: 440px;
  }

  .tree-legend {
    padding: 24px 12px;
  }

  .tree-legend__title {
    text-align: center;
  }

  .tree-legend__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 8px;
  }

  .tree-legend__item {
    font-size: 0.8125rem;
  }
}
