.my-study-page {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--warm-text);
  background: #181714;
}

.my-study-background {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: var(--my-study-media-url, url("assets/warm-study-background.jpg")) center / cover;
}

.my-study-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
}

.my-study-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.my-study-page .page-shell {
  position: relative;
  z-index: 1;
}

.learning-main {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding: 132px 0 84px;
}

.learning-intro {
  margin-bottom: 26px;
  text-align: center;
}

.learning-intro p,
.learning-panel-heading > div > p {
  margin: 0;
  color: rgba(255, 246, 232, 0.5);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.learning-intro h1 {
  margin: 10px 0 7px;
  font-family: "STZhongsong", "华文中宋", "STSong", "SimSun", serif;
  font-size: 58px;
  font-weight: 700;
}

.learning-intro > span {
  color: rgba(255, 246, 232, 0.68);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
}

.learning-profile-panel,
.learning-calendar-panel,
.learning-day-panel,
.learning-posts-panel {
  margin-top: 18px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(13, 19, 17, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.learning-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.learning-panel-heading h2 {
  margin: 7px 0 0;
  font-family: "STZhongsong", "华文中宋", "STSong", "SimSun", serif;
  font-size: 27px;
  font-weight: 700;
}

.learning-total,
.day-duration {
  padding-top: 7px;
  color: rgba(255, 246, 232, 0.62);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 12px;
  white-space: nowrap;
}

.learning-goal-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 21px;
}

.learning-goal-form label {
  display: grid;
  gap: 7px;
}

.learning-goal-form label > span,
.learning-tags-block > span {
  color: rgba(255, 246, 232, 0.58);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 11px;
}

.learning-goal-form input {
  min-width: 0;
  min-height: 43px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  outline: 0;
  color: var(--warm-text);
  background: rgba(255, 255, 255, 0.06);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 15px;
}

.learning-goal-form input::placeholder {
  color: rgba(255, 246, 232, 0.35);
}

.learning-goal-form button {
  align-self: end;
  min-height: 43px;
  padding-inline: 17px;
  border-radius: 12px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 14px;
}

.learning-goal-form button[hidden] {
  display: none;
}

.learning-tags-block {
  display: grid;
  gap: 9px;
  margin-top: 19px;
}

.learning-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.learning-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 246, 232, 0.28);
  border-radius: 999px;
  color: rgba(255, 246, 232, 0.8);
  background: rgba(255, 255, 255, 0.07);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 11px;
}

.learning-goal-tag {
  gap: 6px;
  max-width: 100%;
  color: var(--warm-text);
  background: rgba(255, 246, 232, 0.12);
  line-height: 1.55;
  white-space: normal;
}

.learning-tag-remove {
  display: inline-grid;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 246, 232, 0.16);
  cursor: pointer;
  font: 16px/1 Arial, sans-serif;
}

.learning-tag-remove:hover {
  background: rgba(255, 246, 232, 0.3);
}

.calendar-controls {
  display: flex;
  gap: 7px;
}

.calendar-controls button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 246, 232, 0.34);
  border-radius: 11px;
  color: var(--warm-text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1;
}

.calendar-controls button:hover,
.calendar-day:hover {
  background: rgba(255, 255, 255, 0.13);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 18px;
  color: rgba(255, 246, 232, 0.58);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 11px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}

.calendar-dot.light,
.calendar-day.has-light .calendar-day-dot { background: #a6d9ed; }
.calendar-dot.medium,
.calendar-day.has-medium .calendar-day-dot { background: #4d9dcc; }
.calendar-dot.deep,
.calendar-day.has-deep .calendar-day-dot { background: #17608f; }

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

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

.calendar-weekdays span {
  color: rgba(255, 246, 232, 0.46);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 11px;
  text-align: center;
}

.calendar-day,
.calendar-blank {
  width: min(100%, 88px);
  aspect-ratio: 1;
  min-height: 0;
  justify-self: center;
}

.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: rgba(255, 246, 232, 0.76);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
  transition: background 0.25s var(--ease-quiet), border-color 0.25s var(--ease-quiet), transform 0.25s var(--ease-quiet);
}

.calendar-day.is-today {
  border-color: rgba(255, 246, 232, 0.35);
}

.calendar-day.is-selected {
  border-color: rgba(255, 246, 232, 0.76);
}

.calendar-day-dot {
  position: absolute;
  bottom: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(126, 207, 235, 0.46);
}

.calendar-day.has-light,
.calendar-day.has-medium,
.calendar-day.has-deep {
  border-color: rgba(255, 255, 255, 0.52);
}

.calendar-day.has-light {
  color: rgba(10, 46, 68, 0.88);
  background: #a6d9ed;
}

.calendar-day.has-medium {
  color: rgba(255, 255, 255, 0.94);
  background: #4d9dcc;
}

.calendar-day.has-deep {
  color: rgba(255, 255, 255, 0.94);
  background: #17608f;
}

.calendar-day.has-light .calendar-day-dot,
.calendar-day.has-medium .calendar-day-dot,
.calendar-day.has-deep .calendar-day-dot {
  display: none;
}

.learning-day-records {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.learning-record,
.learning-empty {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.learning-record:first-child,
.learning-empty:first-child {
  border-top: 0;
}

.learning-record-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.learning-record strong {
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
  font-weight: 400;
}

.learning-record small,
.learning-empty {
  color: rgba(255, 246, 232, 0.54);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 11px;
}

.learning-record-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.learning-record-tasks span {
  padding: 4px 8px;
  border-radius: 8px;
  color: rgba(255, 246, 232, 0.7);
  background: rgba(255, 255, 255, 0.07);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 10px;
}

.profile-post-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.profile-post-card,
.profile-post-empty {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.profile-post-card:first-child,
.profile-post-empty:first-child {
  padding-top: 0;
  border-top: 0;
}

.profile-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 246, 232, 0.52);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 10px;
}

.profile-post-meta span {
  color: rgba(255, 246, 232, 0.72);
}

.profile-post-card h3 {
  margin: 8px 0 5px;
  color: var(--warm-text);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  font-weight: 400;
}

.profile-post-card > p,
.profile-post-empty {
  margin: 0;
  color: rgba(255, 246, 232, 0.62);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 12px;
  line-height: 1.75;
}

.profile-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.profile-post-tags span {
  padding: 4px 8px;
  border-radius: 8px;
  color: rgba(255, 246, 232, 0.7);
  background: rgba(255, 255, 255, 0.07);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 10px;
}

@media (max-width: 720px), (min-width: 721px) and (max-width: 1024px) and (orientation: portrait) {
  .learning-main {
    width: min(100% - 32px, 680px);
    padding-top: 116px;
  }

  .learning-intro h1 {
    font-size: 46px;
  }

  .learning-profile-panel,
  .learning-calendar-panel,
  .learning-day-panel,
  .learning-posts-panel {
    padding: 18px;
  }

  .learning-goal-form {
    grid-template-columns: 1fr;
  }

.learning-goal-form button {
  justify-self: start;
}

.learning-goal-status {
  min-height: 18px;
  margin: 0;
  color: rgba(255, 246, 232, 0.72);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 12px;
}

  .calendar-day,
  .calendar-blank {
    width: min(100%, 62px);
  }
}

@media (max-width: 440px) {
  .learning-panel-heading h2 {
    font-size: 23px;
  }

  .calendar-legend {
    display: grid;
    gap: 7px;
  }

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

  .calendar-day {
    border-radius: 50%;
    font-size: 14px;
  }
}
