.ink-calendar {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 18px 18px 16px;
  border: 1px solid var(--andong-line, rgba(27, 33, 30, 0.12));
  border-radius: 12px;
  background: rgba(239, 246, 242, 0.76);
  color: var(--andong-text, #1b211e);
  box-shadow: 0 12px 34px rgba(27, 33, 30, 0.04);
  backdrop-filter: blur(10px) saturate(0.82);
  -webkit-backdrop-filter: blur(10px) saturate(0.82);
}

.ink-calendar::before,
.ink-calendar::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}

.ink-calendar::before {
  inset: -28%;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(63, 107, 87, 0.18), transparent 34%),
    radial-gradient(ellipse at 18% 88%, rgba(27, 33, 30, 0.095), transparent 39%);
  filter: blur(14px);
  transform: rotate(-4deg);
}

.ink-calendar::after {
  top: 15px;
  right: -28px;
  width: 135px;
  height: 42px;
  border-radius: 50%;
  background: rgba(63, 107, 87, 0.07);
  filter: blur(7px);
  transform: rotate(-12deg);
}

.ink-calendar__header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  margin-bottom: 15px;
}

.ink-calendar__heading {
  min-width: 0;
  text-align: center;
}

.ink-calendar__title {
  display: block;
  color: inherit;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.ink-calendar__archive-link {
  display: inline-block;
  margin-top: 2px;
  color: var(--andong-muted, #69706c);
  font-size: 9.5px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.ink-calendar__title:hover,
.ink-calendar__archive-link:hover {
  color: var(--andong-accent, #3f6b57);
}

.ink-calendar__nav {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--andong-muted, #69706c);
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.ink-calendar__nav:hover {
  background: rgba(63, 107, 87, 0.09);
  color: var(--andong-accent, #3f6b57);
}

.ink-calendar__nav svg {
  width: 15px;
  height: 15px;
}

.ink-calendar__week,
.ink-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}

.ink-calendar__week {
  margin-bottom: 7px;
  color: var(--andong-muted, #69706c);
  font-size: 10px;
  font-weight: 520;
}

.ink-calendar__week span:nth-last-child(-n + 2) {
  color: var(--andong-accent, #3f6b57);
}

.ink-calendar__days {
  row-gap: 5px;
}

.ink-calendar__day,
.ink-calendar__blank {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  justify-self: center;
}

.ink-calendar__day {
  position: relative;
  border-radius: 50%;
  color: var(--andong-muted, #69706c);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.ink-calendar__day:hover {
  background: rgba(63, 107, 87, 0.1);
  color: var(--andong-accent, #3f6b57);
  transform: translateY(-1px);
}

.ink-calendar__day.is-today {
  background: var(--andong-accent, #3f6b57);
  color: #fff;
  font-weight: 680;
  box-shadow: 0 0 0 4px rgba(63, 107, 87, 0.1);
}

.ink-calendar__day.has-post::after {
  position: absolute;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.ink-calendar__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--andong-line, rgba(27, 33, 30, 0.12));
  color: var(--andong-muted, #69706c);
  font-size: 10px;
}

.ink-calendar__today {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--andong-accent, #3f6b57);
  font: inherit;
  cursor: pointer;
}

[data-scheme="dark"] .ink-calendar {
  background: rgba(18, 28, 23, 0.76);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.13);
}

[data-scheme="dark"] .ink-calendar::before {
  background:
    radial-gradient(ellipse at 82% 18%, rgba(143, 184, 162, 0.15), transparent 34%),
    radial-gradient(ellipse at 18% 88%, rgba(232, 237, 233, 0.06), transparent 39%);
}

@media (max-width: 1024px) {
  .ink-calendar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ink-calendar__day,
  .ink-calendar__nav {
    transition: none;
  }
}
