@charset "UTF-8";

.huayue-calendar {
  margin-top: 5px;
  margin-bottom: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.calendar-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.calendar-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.25;
}

.calendar-section-heading h2 svg {
  width: 24px;
  height: 24px;
  color: #94a180;
}

#huayue-calendar-title > img {
  flex: 0 0 auto;
  width: 1.4em;
  height: 1.4em;
  object-fit: contain;
}

.huayue-calendar svg {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.calendar-section-heading > div > p:last-child {
  margin: 0;
  color: #8b947e;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.calendar-today-label {
  margin-bottom: 4px;
  color: #98a088;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.huayue-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: stretch;
  gap: 22px;
}

.calendar-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

.calendar-sidebar .calendar-paper {
  flex: 1;
}

.love-counter-card,
.calendar-paper,
.calendar-occasions-card {
  min-width: 0;
  border: 1px solid #e0e4d6;
  border-radius: 13px;
}

.love-counter-card {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 108px;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 16px;
  border-color: #e3ddea;
  background: var(--calendar-love-bg, #E6CEED);
}

.love-card-flower {
  position: absolute;
  top: 22px;
  right: -23px;
  width: 107px;
  height: 107px;
  transform: rotate(16deg);
  color: #c6b7d3;
  opacity: 0.27;
  pointer-events: none;
}

.love-card-intro {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #aa9ab5;
  font-size: 8px;
  letter-spacing: 0.17em;
}

.love-card-intro svg {
  width: 15px;
  height: 15px;
}

.love-counter-content {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0;
}

.love-counter-caption {
  margin: 0;
  color: #897b94;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.love-counter {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-height: 0;
  color: #647955;
}

.love-counter strong {
  font-family: Georgia, "Times New Roman", var(--serif);
  font-size: clamp(32px, calc(52px - var(--love-extra-digits, 0) * 6px), 52px);
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.love-counter > span {
  color: #8c967e;
  font-family: var(--serif);
  font-size: 16px;
}

.love-counter-note {
  margin: 4px 0 0;
  color: #9a90a1;
  font-size: 9px;
  letter-spacing: 0.03em;
  line-height: 1.9;
}

.calendar-paper {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fffef9;
}

.calendar-paper::before,
.calendar-paper::after {
  position: absolute;
  z-index: 1;
  top: -7px;
  width: 5px;
  height: 18px;
  border: 2px solid var(--paper);
  border-radius: 5px;
  background: #a3af91;
  box-sizing: content-box;
  content: "";
}

.calendar-paper::before {
  left: 27%;
}

.calendar-paper::after {
  right: 27%;
}

.calendar-month-header {
  display: grid;
  grid-template-columns: 25px 1fr 25px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e1e7d6;
  border-radius: 12px 12px 0 0;
  background: #edf1e5;
  text-align: center;
}

.calendar-month-header p {
  display: none;
  margin: 0;
  color: #9aa68a;
  font-size: 7px;
  letter-spacing: 0.19em;
}

.calendar-month-header h3 {
  margin: 0;
  color: #71845f;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.calendar-nav-button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  padding: 0;
  border: 1px solid #d6dfca;
  border-radius: 50%;
  background: transparent;
  color: #9ca98b;
  transition: background 180ms ease, color 180ms ease;
}

.calendar-nav-button:hover:not(:disabled) {
  background: #dce5cf;
  color: #627550;
}

.calendar-nav-button svg {
  width: 15px;
  height: 15px;
}

.calendar-paper-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 10px 12px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.calendar-weekdays {
  margin-bottom: 4px;
  color: #a1a792;
  font-size: 9px;
  text-align: center;
}

.calendar-weekdays span:nth-last-child(-n + 2) {
  color: #b1a0bb;
}

.calendar-day {
  position: relative;
  display: grid;
  min-width: 0;
  height: 38px;
  place-items: start center;
  padding: 1px 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #7f8872;
  font-size: 16px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  transition: background 180ms ease, border-color 180ms ease;
}

.calendar-day.is-outside {
  color: #c6c8bc;
}

.calendar-day:hover:not(:disabled) {
  border-color: #dce3d0;
  background: #f0f3e9;
}

.calendar-day.is-today {
  border-color: #b5c1a5;
  background: #f0f3e8;
  color: #71875c;
}

.calendar-day.is-selected {
  border-color: #93a47e;
  background: #93a47e;
  color: #fffef8;
}

.calendar-day.is-selected:hover {
  background: #83966d;
  color: #fffef8;
}

.calendar-day-number {
  align-self: start;
}

.calendar-day .calendar-star {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translateX(-50%);
  color: var(--calendar-sparkle, #EDE990);
  stroke: currentColor;
  stroke-width: 2;
  filter: drop-shadow(0 0 0.6px #8e786980);
  pointer-events: none;
}

.calendar-day .calendar-star.is-filled,
.calendar-legend .legend-star.is-filled {
  fill: var(--calendar-sparkle, #EDE990);
  stroke: var(--calendar-sparkle, #EDE990);
}

.calendar-day .calendar-star.is-hollow,
.calendar-legend .legend-star.is-hollow {
  fill: none;
  stroke: var(--calendar-sparkle, #EDE990);
}

.calendar-day.is-selected .calendar-star.is-filled {
  fill: var(--calendar-sparkle, #EDE990);
  stroke: var(--calendar-sparkle, #EDE990);
}

.calendar-day.is-selected .calendar-star.is-hollow {
  stroke: var(--calendar-sparkle, #EDE990);
}

.calendar-legend .legend-star {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  filter: drop-shadow(0 0 0.6px #8e786980);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 6px;
  color: #a5ab97;
  font-size: 8px;
}

.calendar-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.calendar-legend i {
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
}

.legend-today {
  border: 1px solid #9bac87;
}

.calendar-today-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 2px 0 2px 4px;
  border: 0;
  background: transparent;
  color: #91a07d;
  font-size: 8px;
}

.calendar-today-button:hover {
  color: #536e40;
}

.calendar-selected-note {
  margin-top: 8px;
}

.calendar-selected-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed #e5e7da;
}

.calendar-selected-heading > p {
  margin: 0;
  color: #8c997a;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.calendar-selected-note > p:last-child {
  max-height: none;
  margin: 4px 0 0;
  color: #a0a68f;
  font-size: 9px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.calendar-occasions-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  background: #fdfcf7;
}

.occasion-display {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.occasions-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.occasions-heading h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #7b846c;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.occasions-heading h3 svg {
  width: 17px;
  height: 17px;
  color: #af9cba;
}

.occasions-heading > span {
  padding: 4px 7px;
  border-radius: 4px;
  background: #eeefe5;
  color: #a0a68d;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.occasion-list {
  --occasion-row-height: 176px;
  --occasion-row-gap: 10px;
  display: grid;
  overflow-y: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  grid-auto-rows: var(--occasion-row-height);
  min-height: var(--occasion-row-height);
  max-height: calc(3 * var(--occasion-row-height) + 2 * var(--occasion-row-gap));
  gap: var(--occasion-row-gap);
  margin: 14px 0 0;
  padding: 0 6px 0 0;
  list-style: none;
  scrollbar-color: #dde2d0 transparent;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  overscroll-behavior-y: contain;
  scroll-snap-type: y proximity;
}

.occasion-item {
  position: relative;
  display: block;
  min-width: 0;
  height: var(--occasion-row-height);
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-faint);
  container-type: inline-size;
  scroll-snap-align: start;
}

.occasion-item.is-confession {
  background: var(--accent-faint);
}

.occasion-jump {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
}

.occasion-jump:hover .occasion-name {
  color: #566e44;
}

.occasion-icon {
  display: grid;
  width: 28px;
  height: 30px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid #e1e5d6;
  border-radius: 6px;
  background: #f0f2e8;
  color: #a2af90;
}

.occasion-icon svg {
  width: 14px;
  height: 14px;
}

.occasion-item.is-confession .occasion-icon {
  border-color: #e7deec;
  background: #f1eaf6;
  color: #b49bc5;
}

.occasion-copy {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.occasion-title-row {
  display: flex;
  min-height: 50px;
  align-items: flex-start;
  gap: 8px;
  padding-right: 15px;
}

.occasion-name {
  display: -webkit-box;
  overflow: hidden;
  color: #818b72;
  min-width: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.occasion-date-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.occasion-date {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding-inline: 1px;
  isolation: isolate;
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", var(--serif);
  font-size: 34px;
  font-style: italic;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.occasion-date-text {
  display: block;
  color: #9d456e;
  font-size: 1em;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
  white-space: nowrap;
  filter: drop-shadow(0 1px 0 #fffafc) drop-shadow(0 2px 3px #bc87a129);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .occasion-date-text {
    background-image: linear-gradient(105deg, #8f375f 0%, #b66d93 23%, var(--calendar-sparkle, #EDE990) 39%, #ac5880 54%, #8f375f 100%);
    background-size: 260% 100%;
    background-position: 110% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 0.25px #a15d7c55;
    animation: occasion-date-sheen 6.8s ease-in-out infinite;
    animation-delay: var(--date-glint-delay, 0s);
  }
}

.occasion-date-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.occasion-date .occasion-date-sparkle {
  position: absolute;
  fill: var(--calendar-sparkle, #EDE990);
  stroke: none;
  filter: drop-shadow(0 0 0.6px #9f896980);
  opacity: 0.65;
  transform-origin: center;
  animation: occasion-date-twinkle 4.8s ease-in-out infinite;
  animation-delay: var(--date-glint-delay, 0s);
}

.occasion-date-sparkle.is-first {
  top: -7px;
  right: 2px;
  width: 16px;
  height: 16px;
}

.occasion-date-sparkle.is-second {
  bottom: 6px;
  left: -7px;
  width: 10px;
  height: 10px;
  animation-direction: reverse;
}

@keyframes occasion-date-sheen {
  0%, 55% {
    background-position: 110% 50%;
  }
  85%, 100% {
    background-position: -120% 50%;
  }
}

@keyframes occasion-date-twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.65) rotate(-8deg);
  }
  45%, 60% {
    opacity: 1;
    transform: scale(1) rotate(8deg);
  }
}

.occasion-future-label {
  padding: 1px 5px;
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.occasion-distance {
  margin-top: auto;
  max-width: 100%;
  flex-shrink: 0;
  color: #a69aaf;
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  text-align: left;
  white-space: nowrap;
}

.occasion-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #bebbae;
}

.occasion-remove:hover {
  background: #f5eae7;
  color: #b78d86;
}

.occasion-remove svg {
  width: 16px;
  height: 16px;
}

.occasion-list-hint {
  margin: 12px 0 0;
  color: #a3aa94;
  font-size: 9px;
  line-height: 1.9;
}

.calendar-occasions-card[data-empty="true"] .occasion-list {
  min-height: 0;
}

.calendar-occasions-card[data-empty="true"] .occasion-list-hint {
  display: flex;
  min-height: 124px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 14px;
  padding: 22px;
  border: 1px dashed var(--accent-border);
  border-radius: 10px;
  background: var(--accent-faint);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
}

.calendar-occasions-card[data-empty="true"] .occasion-list-hint::before {
  color: var(--accent);
  font-family: var(--sans);
  font-size: 27px;
  line-height: 1;
  content: "♡";
}

.occasion-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, 0.8fr) auto;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e1e5d5;
}

.occasion-form-title {
  display: flex;
  align-items: center;
  gap: 5px;
  grid-column: 1 / -1;
  margin: 0;
  color: #8b987a;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.occasion-form-title > span {
  color: #a2ae91;
  font-size: 15px;
}

.occasion-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  margin: 0;
}

.occasion-field label {
  color: #8c967f;
  font-size: 10px;
}

.occasion-field input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #e1e5d6;
  border-radius: 5px;
  background: #fffef9;
  color: #758369;
  font-size: 11px;
}

.occasion-field input::placeholder {
  color: #b3b8a6;
}

.huayue-calendar input:focus {
  border-color: #aebd98;
  outline: 2px solid #e5ecd9;
  outline-offset: 1px;
}

.occasion-add {
  width: auto;
  min-height: 40px;
  align-self: end;
  justify-content: space-between;
  margin: 0;
  padding: 9px 12px;
  border-color: #93a480;
  background: #93a480;
  font-size: 11px;
  white-space: nowrap;
}

.occasion-add:hover {
  background: #82966e;
}

.occasion-add svg {
  width: 14px;
  height: 14px;
}

.huayue-calendar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.calendar-section-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 30px;
  padding-top: 10px;
}

.calendar-feedback-area {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.calendar-feedback,
.calendar-storage-note {
  margin: 0;
  color: #a0a88f;
  font-size: 9px;
  line-height: 1.9;
}

.calendar-feedback {
  overflow-wrap: anywhere;
}

.calendar-feedback.is-error {
  color: #b37c70;
}

.calendar-storage-note {
  max-width: 450px;
  color: #adb19f;
  text-align: right;
}

#occasion-undo {
  flex-shrink: 0;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid #b3bda3;
  background: transparent;
  color: #8c9d75;
  font-size: 9px;
}

@media (max-width: 1100px) {
  .huayue-calendar-layout {
    gap: 18px;
  }

  .calendar-occasions-card {
    padding: 21px;
  }

  .occasion-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .occasion-add {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .huayue-calendar {
    margin-bottom: 22px;
    padding-top: 22px;
  }

  .calendar-section-heading {
    display: block;
    margin-bottom: 16px;
  }

  .calendar-section-heading h2 {
    font-size: 24px;
  }

  .calendar-section-heading > div > p:last-child {
    font-size: 10px;
  }

  .calendar-today-label {
    display: block;
    margin-top: 15px;
    font-size: 9px;
  }

  .huayue-calendar-layout {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  .love-counter-card {
    min-height: 108px;
    padding: 12px 16px;
  }

  .love-counter-content {
    padding: 0;
  }

  .calendar-paper-body {
    padding: 10px 12px;
  }

  .calendar-day {
    height: 38px;
    font-size: 16px;
  }

  .calendar-selected-note {
    margin-top: 6px;
  }

  .calendar-occasions-card {
    min-height: 0;
    padding: 18px;
  }

  .occasion-field input {
    min-height: 40px;
    font-size: 12px;
  }

  .occasion-add {
    min-height: 41px;
    font-size: 11px;
  }

  .calendar-section-footer {
    flex-direction: column;
    gap: 10px;
  }

  .calendar-storage-note {
    text-align: left;
  }
}

@media (max-width: 370px) {
  .calendar-paper-body {
    padding-inline: 12px;
  }

  .calendar-occasions-card {
    padding-inline: 20px;
  }
}

@media (max-width: 540px) {
  .occasion-list {
    --occasion-row-height: 176px;
  }

  .occasion-item {
    padding: 12px;
  }

  .occasion-icon {
    display: none;
  }

  .occasion-title-row {
    min-height: 45px;
  }
}

@media (min-width: 1200px), (max-width: 540px) {
  .occasion-list {
    --occasion-row-height: 164px;
  }
}

@media (max-width: 1100px) {
  .occasion-date {
    font-size: 28px;
  }
}

@media (max-width: 370px) {
  .occasion-item {
    padding-inline: 10px;
  }

  .occasion-date-text {
    letter-spacing: -0.055em;
  }
}

@media (max-width: 540px) {
  .occasion-date {
    font-size: 18px;
  }
}

@supports (font-size: 1cqi) {
  .occasion-date {
    font-size: clamp(18px, 15cqi, 34px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .occasion-date .occasion-date-text {
    animation: none !important;
    background: none;
    color: var(--accent-strong);
    -webkit-text-stroke: 0;
    filter: none;
  }

  .occasion-date .occasion-date-sparkle {
    animation: none !important;
    opacity: 0.6;
    transform: none;
  }
}
