:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #29272f;
  background: #f5f6f8;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f5f6f8;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f5f6f8;
}

button {
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.mood-main {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.mood-notice {
  margin-bottom: 14px;
  padding: 10px 13px;
  border: 1px solid #9ecfc2;
  border-radius: 6px;
  background: #f1faf7;
  color: #246e61;
  font-size: 14px;
}

.mood-notice.error {
  border-color: #efacb8;
  background: #fff3f5;
  color: #a82c4b;
}

.mood-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.mood-calendar-panel,
.mood-editor-panel {
  border: 1px solid #dfe2e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 39, 47, 0.06);
}

.mood-calendar-panel {
  min-width: 0;
  padding: 22px;
}

.mood-editor-panel {
  padding: 20px;
}

.mood-toolbar {
  min-height: 42px;
  margin-bottom: 17px;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
}

.mood-toolbar h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
}

.mood-toolbar button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #5f5c66;
}

.mood-toolbar button:hover {
  border-color: #d9dde3;
  background: #f7f8fa;
  color: #d75579;
}

.mood-toolbar svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mood-weekdays,
.mood-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.mood-weekdays {
  margin-bottom: 7px;
}

.mood-weekdays span {
  min-height: 27px;
  display: grid;
  place-items: center;
  color: #77747e;
  font-size: 12px;
  font-weight: 700;
}

.mood-day-blank,
.mood-day {
  min-width: 0;
  min-height: 91px;
}

.mood-day {
  padding: 8px;
  display: grid;
  grid-template-rows: auto 1fr 1fr;
  gap: 4px;
  border: 1px solid #dfe2e7;
  border-radius: 6px;
  background: #fff;
  color: #34323a;
  text-align: left;
}

.mood-day:hover {
  border-color: #aeb4bd;
  box-shadow: 0 3px 10px rgba(36, 40, 48, 0.08);
}

.mood-day.selected {
  border-color: #d75579;
  box-shadow: 0 0 0 2px rgba(215, 85, 121, 0.13);
}

.mood-day.today .mood-day-number {
  color: #d13f67;
}

.mood-day-number {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.mood-person {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  font-size: 15px;
}

.mood-person b {
  font-size: 10px;
}

.mood-yu b {
  color: #42749f;
}

.mood-mei b {
  color: #c64669;
}

.editor-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #77747e;
  font-size: 13px;
}

.editor-heading strong {
  color: #302e36;
  font-size: 17px;
}

.person-switch {
  margin-bottom: 16px;
  padding: 3px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  border: 1px solid #dfe2e7;
  border-radius: 7px;
}

.person-button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #65626c;
  font-weight: 700;
}

.person-button.active {
  background: #29272f;
  color: #fff;
}

.mood-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mood-choice {
  min-height: 62px;
  padding: 7px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid #dfe2e7;
  border-radius: 6px;
  background: #fff;
  color: #5f5c66;
}

.mood-choice:hover {
  border-color: #d75579;
}

.mood-choice.active {
  border-color: #d75579;
  background: #fff1f5;
  color: #a82c4b;
}

.mood-choice span {
  font-size: 25px;
  line-height: 1;
}

.mood-choice small {
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 820px) {
  .mood-layout {
    grid-template-columns: 1fr;
  }

  .mood-editor-panel {
    order: -1;
  }

  .mood-choices {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .mood-main {
    width: calc(100% - 24px);
    padding: 16px 0 30px;
  }

  .mood-calendar-panel,
  .mood-editor-panel {
    padding: 14px;
  }

  .mood-choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mood-weekdays,
  .mood-calendar-grid {
    gap: 4px;
  }

  .mood-day-blank,
  .mood-day {
    min-height: 65px;
  }

  .mood-day {
    padding: 5px;
    gap: 2px;
  }

  .mood-person b {
    display: none;
  }

  .mood-person {
    justify-content: center;
    font-size: 13px;
  }
}

@media (max-width: 350px) {
  .mood-main {
    width: calc(100% - 16px);
  }

  .mood-calendar-panel,
  .mood-editor-panel {
    padding: 10px;
  }

  .mood-day-blank,
  .mood-day {
    min-height: 59px;
  }
}
